123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267 |
- /// <reference path="../_shared/Initializing.ts"/>
- class OutfitItem extends Initializing{
- id='';
- index:number=0;
- type:string='';
- vendor:string='';
- quality:number=0;
- isValidItem=false;
- description:string;
- static get(itemId:string):OutfitItem{
- let constantData = this.constantData(itemId);
- let item:OutfitItem;
- switch(constantData.type){
- case 'bodysuit':
- item = new OutfitItemBodyuit(); break;
- case 'bra':
- item = new OutfitItemBra(); break;
- case 'clothes':
- item = new OutfitItemClothes(); break;
- case 'coat':
- item = new OutfitItemCoat(); break;
- case 'panties':
- item = new OutfitItemPanties(); break;
- case 'purse':
- item = new OutfitItemPurse(); break;
- case 'shoes':
- item = new OutfitItemShoes(); break;
- case 'swimwear':
- item = new OutfitItemSwimwear();break;
- }
- item.init(constantData);
- item.isValidItem = true;
- item.id = itemId;
- return item;
- }
- static constantData(itemId:string):OutfitDefinition{
- return setup.outfits[itemId];
- }
- get desc():string{
- return this.description || '';
- }
- get image():string{
- return setup.outfitItemImagePath[this.type].formatUnicorn({vendor:this.vendor,id:this.index});
- }
- get inhibition(){
- return 0;
- }
- get slots():string[]{
- return [this.type];
- }
- }
- class OutfitItemBodyuit extends OutfitItem implements OutfitDefinitionBodysuit{
- type:'bodysuit' = "bodysuit";
- get slots():string[]{
- return ['bra','panties'];
- }
- }
- class OutfitItemBra extends OutfitItem implements OutfitDefinitionBra{
- type:'bra' = "bra";
- subtype?: number;
- fun?: number;
- thinness?: number;
- material?: number;
- cover?: number;
- }
- const enum clothesCoverFront{
- }
- const enum EClothesThinness{
- OBSCURING = 1,
- OBSCURING_SOMEWHAT,
- SHOWS_SOMEWHAT,
- SHOWS,
- SHOWS_DETAILS,
- REVEALING
- }
- class OutfitItemClothes extends OutfitItem implements OutfitDefinitionClothes{
- type:'clothes' = "clothes";
- isDress?: number;
- isOnepiece?: number;
- coverBack?: number;
- style?: number;
- style2?: number;
- style3?: number;
- bimbo?: number;
- subtype:string='';
- thinness:EClothesThinness;
- coverFront:number;
- coverTop:number;
- pantsShortness:number;
- skirtShortness:number;
- topcut: number;
- includesBra:number;
- includesPanties:number;
- inhib: number;
- get image():string{
- return setup.outfitItemImagePath.clothes[this.vendor][this.subtype].formatUnicorn({id:this.index});
- }
- get inhibition(){
- if(this.inhib)
- return this.inhib;
- let inhibitionOfItem = 0;
- if(this.coverFront == 4)
- inhibitionOfItem = 50
- else if(this.coverFront == 3 || this.coverTop == 4)
- inhibitionOfItem = 45
- else if(this.coverFront == 2 || this.coverTop == 3)
- inhibitionOfItem = 40
- else if(this.skirtShortness == 6 || this.coverFront == 1 || this.coverTop == 2)
- inhibitionOfItem = 35
- else if(this.skirtShortness == 5 || this.pantsShortness == 6){
- if(this.thinness == 6)
- inhibitionOfItem = 35
- else
- inhibitionOfItem = 30
- }
- else if(this.includesPanties == 1 || this.pantsShortness == 5){
- if(this.thinness == 6)
- inhibitionOfItem = 35
- else if(this.includesBra == 1 || this.coverTop == 2)
- inhibitionOfItem = 30
- else
- inhibitionOfItem = 25
- }
- else if(this.skirtShortness == 4){
- if(this.thinness == 6)
- inhibitionOfItem = 35
- else if(this.includesBra == 1 || this.coverTop == 2)
- inhibitionOfItem = 30
- else if(this.topcut == 4 || this.thinness == 5)
- inhibitionOfItem = 25
- else
- inhibitionOfItem = 20
- }
- else if(this.skirtShortness == 3){
- if(this.thinness == 6)
- inhibitionOfItem = 35
- else if(this.includesBra == 1 || this.coverTop == 2)
- inhibitionOfItem = 30
- else if(this.topcut == 4 || this.thinness == 5)
- inhibitionOfItem = 25
- else if(this.topcut == 3)
- inhibitionOfItem = 15
- else
- inhibitionOfItem = 10
- }
- else if(this.skirtShortness == 2 || this.pantsShortness == 3){
- if(this.thinness == 6)
- inhibitionOfItem = 35
- else if(this.includesBra == 1 || this.coverTop == 2)
- inhibitionOfItem = 30
- else if(this.topcut == 4 || this.thinness == 5)
- inhibitionOfItem = 25
- else if(this.topcut == 3)
- inhibitionOfItem = 15
- else if(this.thinness == 4)
- inhibitionOfItem = 10
- else
- inhibitionOfItem = 5
- }
- else{
- if(this.thinness == 6)
- inhibitionOfItem = 35
- else if(this.includesBra == 1 || this.coverTop == 2)
- inhibitionOfItem = 30
- else if(this.topcut == 4 || this.thinness == 5)
- inhibitionOfItem = 25
- else if(this.topcut == 3)
- inhibitionOfItem = 15
- else if(this.thinness == 4)
- inhibitionOfItem = 10
- else if(this.thinness == 3)
- inhibitionOfItem = 5
- else
- inhibitionOfItem = 0
- }
- return inhibitionOfItem;
-
- }
- }
- class OutfitItemCoat extends OutfitItem implements OutfitDefinitionCoat{
- type:'coat' = "coat";
- warm: number;
- }
- class OutfitItemPanties extends OutfitItem implements OutfitDefinitionPanties{
- type:'panties' = "panties";
- subtype?: number;
- fun?: number;
- thinness?: number;
- material?: number;
- coverBack?: number;
- coverFront?: number;
- }
- class OutfitItemPurse extends OutfitItem implements OutfitDefinitionPurse{
- type:'purse' = "purse";
- }
- class OutfitItemShoes extends OutfitItem implements OutfitDefinitionShoes{
- type:'shoes' = "shoes";
- style?: number;
- cut?: number;
- heels?: number=0;
-
- /**
- * Heel height in cm
- * @readonly
- * @type {number}
- */
- get heelHeight():number{
- return (this.heels * 2.54).roundToDecimal(1);
- }
- }
- class OutfitItemSwimwear extends OutfitItem implements OutfitDefinitionSwimwear{
- type:'swimwear' = "swimwear";
- subtype: 'bikini'|'swimsuit';
- thinness: number;
- topcut: number;
- includesPanties: number;
- isOnepiece: number;
- inhib: number;
- get image():string{
- return setup.outfitItemImagePath.clothes[this.vendor][this.subtype].formatUnicorn({id:this.index});
- }
- get slots(){
- return ['bra','panties','clothes'];
- }
- }
- setup.OutfitItem = OutfitItem;
|