From d506c9519866e9f08e52b2dde9500ca1909b447c Mon Sep 17 00:00:00 2001 From: lowercasedonkey <lowercasedonkey@gmail.com> Date: Wed, 5 Aug 2020 01:38:16 -0400 Subject: [PATCH] update data --- js/003-data/gameVariableData.js | 99 ++++++----- js/003-data/miscData.js | 293 ++++++++++++------------------- src/js/itemAvailability.js | 48 +---- src/neighbor/neighborInteract.js | 48 ++--- 4 files changed, 194 insertions(+), 294 deletions(-) diff --git a/js/003-data/gameVariableData.js b/js/003-data/gameVariableData.js index a44211698d5..bed3287f856 100644 --- a/js/003-data/gameVariableData.js +++ b/js/003-data/gameVariableData.js @@ -948,58 +948,65 @@ App.Data.resetOnNGPlus = { shelterAbuse: 0, shelterSlaveGeneratedWeek: 0, - // alternate clothing access variables - clothesBoughtBunny: 0, - clothesBoughtConservative: 0, - clothesBoughtChains: 0, - clothesBoughtWestern: 0, - clothesBoughtOil: 0, - clothesBoughtHabit: 0, - clothesBoughtToga: 0, - clothesBoughtHuipil: 0, - clothesBoughtKimono: 0, - clothesBoughtHarem: 0, - clothesBoughtQipao: 0, - clothesBoughtEgypt: 0, - clothesBoughtBelly: 0, - clothesBoughtMaternityDress: 0, - clothesBoughtMaternityLingerie: 0, - clothesBoughtLazyClothes: 0, - clothesBoughtBimbo: 0, - clothesBoughtCourtesan: 0, - shoesBoughtHeels: 0, - clothesBoughtPetite: 0, - // non-fs - clothesBoughtMilitary: 0, - clothesBoughtCultural: 0, - clothesBoughtMiddleEastern: 0, - clothesBoughtPol: 0, - clothesBoughtCostume: 0, - clothesBoughtPantsu: 0, - clothesBoughtCareer: 0, - clothesBoughtDresses: 0, - clothesBoughtBodysuits: 0, - clothesBoughtCasual: 0, - clothesBoughtUnderwear: 0, - clothesBoughtSports: 0, - clothesBoughtPony: 0, - clothesBoughtSwimwear: 0, - toysBoughtDildos: 0, - toysBoughtGags: 0, - toysBoughtVaginalAttachments: 0, - toysBoughtButtPlugs: 0, - toysBoughtButtPlugTails: 0, - toysBoughtSmartVibes: 0, - buckets: 0, - specialSlavesPriceOverride: 0, pregAccessibility: 0, dickAccessibility: 0, ballsAccessibility: 0, buttAccessibility: 0, ageMode: 0, - enema: 0, - medicalEnema: 0, + boughtItem: { + clothing: { + // alternate clothing access variables + Bunny: 0, + Conservative: 0, + Chains: 0, + Western: 0, + Oil: 0, + Habit: 0, + Toga: 0, + Huipil: 0, + Kimono: 0, + Harem: 0, + Qipao: 0, + Egypt: 0, + Belly: 0, + MaternityDress: 0, + MaternityLingerie: 0, + LazyClothes: 0, + Bimbo: 0, + Courtesan: 0, + Petite: 0, + // non-fs + Military: 0, + Cultural: 0, + MiddleEastern: 0, + Pol: 0, + Costume: 0, + Pantsu: 0, + Career: 0, + Dresses: 0, + Bodysuits: 0, + Casual: 0, + Underwear: 0, + Sports: 0, + Pony: 0, + Swimwear: 0, + }, + shoes: { + heels: 0, + }, + toys: { + enema: 0, + medicalEnema: 0, + buckets: 0, + toysBoughtDildos: 0, + toysBoughtGags: 0, + toysBoughtVaginalAttachments: 0, + toysBoughtButtPlugs: 0, + toysBoughtButtPlugTails: 0, + toysBoughtSmartVibes: 0, + }, + }, dairyPiping: 0, inflatedSlavesMilk: 0, inflatedSlavesCum: 0, diff --git a/js/003-data/miscData.js b/js/003-data/miscData.js index 9cbcf65a6ed..2e020b2abc0 100644 --- a/js/003-data/miscData.js +++ b/js/003-data/miscData.js @@ -1938,291 +1938,228 @@ App.Data.misc = { name: "Maternity lingerie", value: "attractive lingerie for a pregnant woman", fs: "FSRepopulationFocus", - rs: "clothesBoughtMaternityLingerie" + get rs() { return V.boughtItem.clothing.maternityLingerie; } }, { name: "Bunny outfit", value: "a bunny outfit", fs: "FSGenderFundamentalist", - rs: "clothesBoughtBunny" + get rs() { return V.boughtItem.clothing.bunny; } }, { name: "Body oil", value: "body oil", fs: "FSPhysicalIdealist", - rs: "clothesBoughtOil" + get rs() { return V.boughtItem.clothing.oil; } }, { name: "Chattel habit", value: "a chattel habit", fs: "FSChattelReligionist", - rs: "clothesBoughtHabit" + get rs() { return V.boughtItem.clothing.habit; } }, { name: "Conservative clothing", value: "conservative clothing", fs: "FSPaternalist", - rs: "clothesBoughtConservative" + get rs() { return V.boughtItem.conservative; } }, { name: "Harem gauze", value: "harem gauze", fs: "FSArabianRevivalist", - rs: "clothesBoughtHarem" + get rs() { return V.boughtItem.harem; } }, { name: "Huipil", value: "a huipil", fs: "FSAztecRevivalist", - rs: "clothesBoughtHuipil" + get rs() { return V.boughtItem.huipil; } }, { name: "Kimono", value: "a kimono", fs: "FSEdoRevivalist", - rs: { - either: { - clothesBoughtKimono: 1, - continent: "Japan" - } - } + get rs() { return (V.boughtItem.kimono || V.continent === "Japan"); } }, { name: "Maternity dress", value: "a maternity dress", fs: "FSRepopulationFocus", - rs: "clothesBoughtMaternityDress" + get rs() { return V.boughtItem.maternityDress; } }, { name: "Qipao (slutty)", value: "a slutty qipao", fs: "FSChineseRevivalist", - rs: "clothesBoughtQipao" + get rs() { return V.boughtItem.qipao; } }, { name: "Qipao (long)", value: "a long qipao", fs: "FSChineseRevivalist", - rs: "clothesBoughtCultural" + get rs() { return V.boughtItem.clothing.cultural; } }, { name: "Stretch pants and a crop-top", value: "stretch pants and a crop-top", fs: "FSHedonisticDecadence", - rs: "clothesBoughtLazyClothes" + get rs() { return V.boughtItem.clothing.clothes; } }, { name: "Toga", value: "a toga", fs: "FSRomanRevivalist", - rs: "clothesBoughtToga" + get rs() { return V.boughtItem.toga; } }, { name: "Western clothing", value: "Western clothing", fs: "FSPastoralist", - rs: "clothesBoughtWestern" + get rs() { return V.boughtItem.clothing.western; } }, { name: "Courtesan dress", value: "a courtesan dress", fs: "FSSlaveProfessionalism", - rs: "clothesBoughtCourtesan" + get rs() { return V.boughtItem.clothing.courtesan; } }, { name: "Bimbo outfit", value: "a bimbo outfit", fs: "FSIntellectualDependency", - rs: "clothesBoughtBimbo" + get rs() { return V.boughtItem.clothing.bimbo; } }, { name: "Petite admi outfit", value: "petite admi outfit", fs: "FSPetiteAdmiration", - rs: "clothesBoughtPetite" - }, - {name: "Battlearmor", value: "battlearmor", rs: "clothesBoughtMilitary"}, - {name: "Military uniform", value: "a military uniform", rs: "clothesBoughtMilitary"}, - {name: "Red Army uniform", value: "a red army uniform", rs: "clothesBoughtMilitary"}, - {name: "Battledress", value: "battledress", rs: "clothesBoughtMilitary"}, - {name: "Biyelgee costume", value: "a biyelgee costume", rs: "clothesBoughtCultural"}, - {name: "Dirndl", value: "a dirndl", rs: "clothesBoughtCultural"}, - {name: "Lederhosen", value: "lederhosen", rs: "clothesBoughtCultural"}, - {name: "Mounty outfit", value: "a mounty outfit", rs: "clothesBoughtCultural"}, - {name: "Hanbok", value: "a hanbok", rs: "clothesBoughtCultural"}, + get rs() { return V.boughtItem.clothing.petite; } + }, + {name: "Battlearmor", value: "battlearmor", get rs() { return V.boughtItem.clothing.military; }}, + {name: "Military uniform", value: "a military uniform", get rs() { return V.boughtItem.clothing.military; }}, + {name: "Red Army uniform", value: "a red army uniform", get rs() { return V.boughtItem.clothing.military; }}, + {name: "Battledress", value: "battledress", get rs() { return V.boughtItem.clothing.military; }}, + {name: "Biyelgee costume", value: "a biyelgee costume", get rs() { return V.boughtItem.clothing.cultural; }}, + {name: "Dirndl", value: "a dirndl", get rs() { return V.boughtItem.clothing.cultural; }}, + {name: "Lederhosen", value: "lederhosen", get rs() { return V.boughtItem.clothing.cultural; }}, + {name: "Mounty outfit", value: "a mounty outfit", get rs() { return V.boughtItem.clothing.cultural; }}, + {name: "Hanbok", value: "a hanbok", get rs() { return V.boughtItem.clothing.cultural; }}, { name: "Burqa", value: "a burqa", - rs: { - either: { - clothesBoughtMiddleEastern: 1, - continent: "the Middle East" - } - } + get rs() { return V.boughtItem.clothing.middleEastern || V.continent === "the Middle East"; } }, { name: "Niqab and abaya", value: "a niqab and abaya", - rs: { - either: { - clothesBoughtMiddleEastern: 1, - continent: "the Middle East" - } - } + get rs() { return V.boughtItem.clothing.middleEastern || V.continent === "the Middle East"; } }, { name: "Hijab and blouse", value: "a hijab and blouse", - rs: { - either: { - clothesBoughtConservative: 1, - continent: "the Middle East" - } - } + get rs() { return V.boughtItem.clothing.conservative || V.continent === "the Middle East"; } }, { name: "Burkini", value: "a burkini", - rs: { - clothesBoughtSwimwear: 1, - either: { - clothesBoughtMiddleEastern: 1, - continent: "the Middle East" - } - } + get rs() { return V.boughtItem.clothing.swimwear && (V.boughtItem.clothing.swimwear || V.continent === "the Middle East"); } }, - {name: "Santa dress", value: "a Santa dress", rs: "clothesBoughtCostume"}, + {name: "Santa dress", value: "a Santa dress", get rs() { return V.boughtItem.clothing.costume; }}, - {name: "Klan robe", value: "a klan robe", rs: "clothesBoughtPol"}, - {name: "Slutty klan robe", value: "a slutty klan robe", rs: "clothesBoughtPol"}, - {name: "Schutzstaffel uniform", value: "a schutzstaffel uniform", rs: "clothesBoughtPol"}, - {name: "Slutty schutzstaffel uniform", value: "a slutty schutzstaffel uniform", rs: "clothesBoughtPol"}, + {name: "Klan robe", value: "a klan robe", get rs() { return V.boughtItem.clothing.pol; }}, + {name: "Slutty klan robe", value: "a slutty klan robe", get rs() { return V.boughtItem.clothing.pol; }}, + {name: "Schutzstaffel uniform", value: "a schutzstaffel uniform", get rs() { return V.boughtItem.clothing.pol; }}, + {name: "Slutty schutzstaffel uniform", value: "a slutty schutzstaffel uniform", get rs() { return V.boughtItem.clothing.pol; }}, - {name: "Nice business attire", value: "nice business attire", rs: "clothesBoughtCareer"}, - {name: "Nurse (nice)", value: "a nice nurse outfit", rs: "clothesBoughtCareer"}, - {name: "Police uniform", value: "a police uniform", rs: "clothesBoughtCareer"}, + {name: "Nice business attire", value: "nice business attire", get rs() { return V.boughtItem.clothing.career; }}, + {name: "Nurse (nice)", value: "a nice nurse outfit", get rs() { return V.boughtItem.clothing.career; }}, + {name: "Police uniform", value: "a police uniform", get rs() { return V.boughtItem.clothing.career; }}, { name: "Maid (nice)", value: "a nice maid outfit", - rs: { - either: { - clothesBoughtCareer: 1, - PC: { - career: "servant" - } - } - } - }, - - {name: "Ballgown", value: "a ball gown", rs: "clothesBoughtDresses"}, - {name: "Gothic lolita dress", value: "a gothic lolita dress", rs: "clothesBoughtDresses"}, - - {name: "Cybersuit", value: "a cybersuit", rs: "clothesBoughtBodysuits"}, - {name: "Latex catsuit", value: "a latex catsuit", rs: "clothesBoughtBodysuits"}, - - {name: "Button-up shirt and panties", value: "a button-up shirt and panties", rs: "clothesBoughtCasual"}, - {name: "Button-up shirt", value: "a button-up shirt", rs: "clothesBoughtCasual"}, - {name: "Cutoffs", value: "cutoffs", rs: "clothesBoughtCasual"}, - {name: "Jeans", value: "jeans", rs: "clothesBoughtCasual"}, - {name: "Leather pants and a tube top", value: "leather pants and a tube top", rs: "clothesBoughtCasual"}, - {name: "Leather pants", value: "leather pants", rs: "clothesBoughtCasual"}, - {name: "Oversized t-shirt", value: "an oversized t-shirt", rs: "clothesBoughtCasual"}, - {name: "Sweater and cutoffs", value: "a sweater and cutoffs", rs: "clothesBoughtCasual"}, - {name: "Sweater and panties", value: "a sweater and panties", rs: "clothesBoughtCasual"}, - {name: "Sweater", value: "a sweater", rs: "clothesBoughtCasual"}, - {name: "T-shirt and jeans", value: "a t-shirt and jeans", rs: "clothesBoughtCasual"}, - {name: "T-shirt and panties", value: "a t-shirt and panties", rs: "clothesBoughtCasual"}, - {name: "T-shirt", value: "a t-shirt", rs: "clothesBoughtCasual"}, - {name: "Tank-top and panties", value: "a tank-top and panties", rs: "clothesBoughtCasual"}, - {name: "Tank-top", value: "a tank-top", rs: "clothesBoughtCasual"}, - {name: "Tube top", value: "a tube top", rs: "clothesBoughtCasual"}, - - {name: "Boyshorts", value: "boyshorts", rs: "clothesBoughtUnderwear"}, - {name: "Bra", value: "a bra", rs: "clothesBoughtUnderwear"}, - {name: "Kitty lingerie", value: "kitty lingerie", rs: "clothesBoughtUnderwear"}, - {name: "Panties and pasties", value: "panties and pasties", rs: "clothesBoughtUnderwear"}, - {name: "Skimpy loincloth", value: "a skimpy loincloth", rs: "clothesBoughtUnderwear"}, - {name: "Thong", value: "a thong", rs: "clothesBoughtUnderwear"}, - {name: "Pasties", value: "pasties", rs: "clothesBoughtUnderwear"}, + get rs() { return V.boughtItem.clothing.career || V.PC.career === "servant"; } + }, + + {name: "Ballgown", value: "a ball gown", get rs() { return V.boughtItem.clothing.dresses; }}, + {name: "Gothic lolita dress", value: "a gothic lolita dress", get rs() { return V.boughtItem.clothing.dresses; }}, + + {name: "Cybersuit", value: "a cybersuit", get rs() { return V.boughtItem.clothing.bodysuits; }}, + {name: "Latex catsuit", value: "a latex catsuit", get rs() { return V.boughtItem.clothing.bodysuits; }}, + + {name: "Button-up shirt and panties", value: "a button-up shirt and panties", get rs() { return V.boughtItem.clothing.casual; }}, + {name: "Button-up shirt", value: "a button-up shirt", get rs() { return V.boughtItem.clothing.casual; }}, + {name: "Cutoffs", value: "cutoffs", get rs() { return V.boughtItem.clothing.casual; }}, + {name: "Jeans", value: "jeans", get rs() { return V.boughtItem.clothing.casual; }}, + {name: "Leather pants and a tube top", value: "leather pants and a tube top", get rs() { return V.boughtItem.clothing.casual; }}, + {name: "Leather pants", value: "leather pants", get rs() { return V.boughtItem.clothing.casual; }}, + {name: "Oversized t-shirt", value: "an oversized t-shirt", get rs() { return V.boughtItem.clothing.casual; }}, + {name: "Sweater and cutoffs", value: "a sweater and cutoffs", get rs() { return V.boughtItem.clothing.casual; }}, + {name: "Sweater and panties", value: "a sweater and panties", get rs() { return V.boughtItem.clothing.casual; }}, + {name: "Sweater", value: "a sweater", get rs() { return V.boughtItem.clothing.casual; }}, + {name: "T-shirt and jeans", value: "a t-shirt and jeans", get rs() { return V.boughtItem.clothing.casual; }}, + {name: "T-shirt and panties", value: "a t-shirt and panties", get rs() { return V.boughtItem.clothing.casual; }}, + {name: "T-shirt", value: "a t-shirt", get rs() { return V.boughtItem.clothing.casual; }}, + {name: "Tank-top and panties", value: "a tank-top and panties", get rs() { return V.boughtItem.clothing.casual; }}, + {name: "Tank-top", value: "a tank-top", get rs() { return V.boughtItem.clothing.casual; }}, + {name: "Tube top", value: "a tube top", get rs() { return V.boughtItem.clothing.casual; }}, + + {name: "Boyshorts", value: "boyshorts", get rs() { return V.boughtItem.clothing.underwear; }}, + {name: "Bra", value: "a bra", get rs() { return V.boughtItem.clothing.underwear; }}, + {name: "Kitty lingerie", value: "kitty lingerie", get rs() { return V.boughtItem.clothing.underwear; }}, + {name: "Panties and pasties", value: "panties and pasties", get rs() { return V.boughtItem.clothing.underwear; }}, + {name: "Skimpy loincloth", value: "a skimpy loincloth", get rs() { return V.boughtItem.clothing.underwear; }}, + {name: "Thong", value: "a thong", get rs() { return V.boughtItem.clothing.underwear; }}, + {name: "Pasties", value: "pasties", get rs() { return V.boughtItem.clothing.underwear; }}, { name: "Leather pants and pasties", value: "leather pants and pasties", - rs: { - clothesBoughtUnderwear: 1, - clothesBoughtCasual: 1 - } + get rs() { return V.boughtItem.clothing.underwear && V.boughtItem.clothing.casual; } }, { name: "T-shirt and thong", value: "a t-shirt and thong", - rs: { - clothesBoughtUnderwear: 1, - clothesBoughtCasual: 1 - } + get rs() { return V.boughtItem.clothing.underwear && V.boughtItem.clothing.casual; } }, { name: "Tube top and thong", value: "a tube top and thong", - rs: { - clothesBoughtUnderwear: 1, - clothesBoughtCasual: 1 - } + get rs() { return V.boughtItem.clothing.underwear && V.boughtItem.clothing.casual; } }, { name: "Oversized t-shirt and boyshorts", value: "an oversized t-shirt and boyshorts", - rs: { - clothesBoughtUnderwear: 1, - clothesBoughtCasual: 1 - } + get rs() { return V.boughtItem.clothing.underwear && V.boughtItem.clothing.casual; } }, - {name: "Sport shorts and a sports bra", value: "sport shorts and a sports bra", rs: "clothesBoughtSports"}, - {name: "Sport shorts", value: "sport shorts", rs: "clothesBoughtSports"}, - {name: "Sports bra", value: "a sports bra", rs: "clothesBoughtSports"}, + {name: "Sport shorts and a sports bra", value: "sport shorts and a sports bra", get rs() { return V.boughtItem.clothing.sports; }}, + {name: "Sport shorts", value: "sport shorts", get rs() { return V.boughtItem.clothing.sports; }}, + {name: "Sports bra", value: "a sports bra", get rs() { return V.boughtItem.clothing.sports; }}, { name: "Sport shorts and a t-shirt", value: "sport shorts and a t-shirt", - rs: { - clothesBoughtSports: 1, - clothesBoughtCasual: 1 - } + get rs() { return V.boughtItem.clothing.sports && V.boughtItem.clothing.casual; } }, - {name: "Pony outfit (nice)", value: "a nice pony outfit", rs: "clothesBoughtPony"}, - {name: "Pony outfit (slutty)", value: "a slutty pony outfit", rs: "clothesBoughtPony"}, + {name: "Pony outfit (nice)", value: "a nice pony outfit", get rs() { return V.boughtItem.clothing.pony; }}, + {name: "Pony outfit (slutty)", value: "a slutty pony outfit", get rs() { return V.boughtItem.clothing.pony; }}, - {name: "Monokini", value: "a monokini", rs: "clothesBoughtSwimwear"}, - {name: "One-piece swimsuit", value: "a one-piece swimsuit", rs: "clothesBoughtSwimwear"}, + {name: "Monokini", value: "a monokini", get rs() { return V.boughtItem.clothing.swimwear; }}, + {name: "One-piece swimsuit", value: "a one-piece swimsuit", get rs() { return V.boughtItem.clothing.swimwear; }}, { name: "Striped bra", value: "a striped bra", - rs: { - either: { - clothesBoughtPantsu: 1, - continent: "Japan" - } - } + get rs() { return V.boughtItem.clothing.pantsu || V.continent === "Japan"; } }, { name: "Striped panties", value: "striped panties", - rs: { - either: { - clothesBoughtPantsu: 1, - continent: "Japan" - } - } + get rs() { return V.boughtItem.clothing.pantsu || V.continent === "Japan"; } }, { name: "Striped underwear", value: "striped underwear", - rs: { - either: { - clothesBoughtPantsu: 1, - continent: "Japan" - } - } + get rs() { return V.boughtItem.clothing.pantsu || V.continent === "Japan"; } }, // "Normal" things: @@ -2258,7 +2195,7 @@ App.Data.misc = { name: "Chains", value: "chains", fs: "FSDegradationist", - rs: "clothesBoughtChains" + get rs() { return V.boughtItem.clothing.chains; } }, {name: "Go naked", value: "no clothing"}, {name: "Penitent nun", value: "a penitent nuns habit"}, @@ -2273,34 +2210,34 @@ App.Data.misc = { {name: "Silken ribbon", value: "silk ribbon"}, {name: "Heavy gold", value: "heavy gold"}, {name: "Pretty jewelry", value: "pretty jewelry"}, - {name: "Nice retirement counter", value: "nice retirement counter", rs: "seeAge"}, + {name: "Nice retirement counter", value: "nice retirement counter", get rs() { return V.seeAge; }}, {name: "Bell", value: "bell collar"}, {name: "Cowbell", value: "leather with cowbell"}, { name: "Bowtie collar", value: "bowtie", fs: "FSGenderFundamentalist", - rs: "clothesBoughtBunny" + get rs() { return V.boughtItem.clothing.bunny; } }, { name: "Neck tie", value: "neck tie", fs: "FSPaternalist", - rs: "clothesBoughtConservative" + get rs() { return V.boughtItem.clothing.conservative; } }, { name: "Ancient Egyptian", value: "ancient Egyptian", fs: "FSEgyptianRevivalist", - rs: "clothesBoughtEgypt" + get rs() { return V.boughtItem.clothing.egypt; } }, ], harshCollars: [ {name: "Tight steel", value: "tight steel"}, - {name: "Cruel retirement counter", value: "cruel retirement counter", rs: "seeAge"}, + {name: "Cruel retirement counter", value: "cruel retirement counter", get rs() { return V.seeAge; }}, {name: "Uncomfortable leather", value: "uncomfortable leather"}, - {name: "Pregnancy biometrics", value: "preg biometrics", rs: "seePreg"}, + {name: "Pregnancy biometrics", value: "preg biometrics", get rs() { return V.seeAge; }}, {name: "Shock punishment", value: "shock punishment"}, {name: "Neck corset", value: "neck corset"}, ], @@ -2317,7 +2254,7 @@ App.Data.misc = { { name: "Massive dildo gag", value: "massive dildo gag", - rs: "toysBoughtGags" + get rs() { return V.boughtItem.toys.gags; } }, {name: "Dildo gag", value: "dildo gag"}, ], @@ -2333,19 +2270,19 @@ App.Data.misc = { name: "Platforms", value: "platform shoes", fs: "FSStatuesqueGlorification", - rs: "shoesBoughtHeels" + get rs() { return (boughtItem.clothing.heels); } }, { name: "Platform heels", value: "platform heels", fs: "FSStatuesqueGlorification", - rs: "shoesBoughtHeels" + get rs() { return (boughtItem.clothing.heels); } }, { name: "Painfully extreme platform heels", value: "extreme platform heels", fs: "FSStatuesqueGlorification", - rs: "shoesBoughtHeels" + get rs() { return (boughtItem.clothing.heels); } } ], @@ -2358,25 +2295,25 @@ App.Data.misc = { name: "1st Trimester belly", value: "a small empathy belly", fs: "FSRepopulationFocus", - rs: "clothesBoughtBelly" + get rs() { return V.boughtItem.clothing.belly; } }, { name: "2nd Trimester belly", value: "a medium empathy belly", fs: "FSRepopulationFocus", - rs: "clothesBoughtBelly" + get rs() { return V.boughtItem.clothing.belly; } }, { name: "3rd Trimester belly", value: "a large empathy belly", fs: "FSRepopulationFocus", - rs: "clothesBoughtBelly" + get rs() { return V.boughtItem.clothing.belly; } }, { name: "3rd Trimester twins belly", value: "a huge empathy belly", fs: "FSRepopulationFocus", - rs: "clothesBoughtBelly" + get rs() { return V.boughtItem.clothing.belly; } } ], @@ -2391,7 +2328,7 @@ App.Data.misc = { { name: "Smart bullet vibrator", value: "smart bullet vibrator", - rs: "toysBoughtSmartVibes" + get rs() { return V.boughtItem.toys.smartVibes; } }, { name: "Dildo", @@ -2400,7 +2337,7 @@ App.Data.misc = { { name: "Long dildo", value: "long dildo", - rs: "buyBigDildos" + get rs() { return V.boughtItem.toys.dildos; } }, { name: "Large dildo", @@ -2409,16 +2346,16 @@ App.Data.misc = { { name: "Long, large dildo", value: "long, large dildo", - rs: "buyBigDildos" + get rs() { return V.boughtItem.toys.dildos; } }, { name: "Huge dildo", - value: "huge dildo" + get rs() { return V.boughtItem.toys.dildos; } }, { name: "Long, huge dildo", value: "long, huge dildo", - rs: "buyBigDildos" + get rs() { return V.boughtItem.toys.dildos; } } ], @@ -2439,7 +2376,7 @@ App.Data.misc = { { name: "Smart bullet vibrator", value: "smart bullet vibrator", - rs: "toysBoughtSmartVibes" + get rs() { return V.boughtItem.toys.smartVibes; } } ], @@ -2454,7 +2391,7 @@ App.Data.misc = { { name: "Long plug", value: "long plug", - rs: "toysBoughtButtPlugs" + get rs() { return V.boughtItem.toys.buttPlugs; } }, { name: "Large plug", @@ -2463,7 +2400,7 @@ App.Data.misc = { { name: "Long, large plug", value: "long, large plug", - rs: "toysBoughtButtPlugs", + get rs() { return V.boughtItem.toys.buttPlugs; } }, { name: "Huge plug", @@ -2472,16 +2409,16 @@ App.Data.misc = { { name: "Long, huge plug", value: "long, huge plug", - rs: "toysBoughtButtPlugs", + get rs() { return V.boughtItem.toys.buttPlugs; } } ], buttplugAttachments: [ {name: "None", value: "none"}, - {name: "Tail", value: "tail", rs: "toysBoughtButtPlugTails"}, - {name: "Fox tail", value: "fox tail", rs: "toysBoughtButtPlugTails"}, - {name: "Cat tail", value: "cat tail", rs: "toysBoughtButtPlugTails"}, - {name: "Cow tail", value: "cow tail", rs: "toysBoughtButtPlugTails"} + {name: "Tail", value: "tail", get rs() { return V.boughtItem.toys.buttPlugTails; }}, + {name: "Fox tail", value: "fox tail", get rs() { return V.boughtItem.toys.buttPlugTails; }}, + {name: "Cat tail", value: "cat tail", get rs() { return V.boughtItem.toys.buttPlugTails; }}, + {name: "Cow tail", value: "cow tail", get rs() { return V.boughtItem.toys.buttPlugTails; }} ], chastityDevices: [ diff --git a/src/js/itemAvailability.js b/src/js/itemAvailability.js index ae2f3353f3a..7ead21f2bce 100644 --- a/src/js/itemAvailability.js +++ b/src/js/itemAvailability.js @@ -104,52 +104,8 @@ globalThis.isItemAccessible = (function() { return true; } if (item.hasOwnProperty("rs")) { - if (typeof item.rs === 'object' && item.rs !== null) { - let fail = false; - // Scan rs requirements one by one if they are an object - Object.keys(item.rs).forEach((requirement) => { - if (typeof item.rs[requirement] === 'object' && item.rs[requirement] !== null) { - let eitherCheck = 0; - if (requirement === "either") { // If we find the "either" nested object, we need to see if just one of the conditions in it are true. - Object.keys(item.rs.either).forEach((nestedRequirement) => { - if (typeof item.rs.either[nestedRequirement] === 'object' && item.rs.either[nestedRequirement] !== null) { // And yes sometimes even in either we have a nested object, to check V.PC mostly, so check for it. - let insideEitherCheck = 0; - Object.keys(item.rs.either[nestedRequirement]).forEach((insideNestedRequirement) => { - if (V[nestedRequirement][insideNestedRequirement] === item.rs.either[nestedRequirement][insideNestedRequirement]) { - insideEitherCheck++; - } - }); - if (insideEitherCheck > 0) { - eitherCheck++; - } - if (V[nestedRequirement] === item.rs.either[nestedRequirement]) { - eitherCheck++; - } - } else { - if (item.rs.either[nestedRequirement] === V[nestedRequirement]) { - eitherCheck++; - } - } - }); - } else { - Object.keys(item.rs.either).forEach((nestedRequirement) => { // Otherwise we are probably recording a nested V variable to be checked. - if (V[requirement][nestedRequirement] === item.rs[requirement][nestedRequirement]) { - eitherCheck++; - } - }); - } - if (eitherCheck === 0) { - fail = true; - } - } else { - if (V[requirement] !== item.rs[requirement]) { - fail = true; - } - } - }); - return !(fail); - } else { // string - return (V[item.rs] >= 1); + if (item.rs) { + return true; } } if (item.hasOwnProperty("fs")) { diff --git a/src/neighbor/neighborInteract.js b/src/neighbor/neighborInteract.js index 3abdab94c9f..e8c1259bfbe 100644 --- a/src/neighbor/neighborInteract.js +++ b/src/neighbor/neighborInteract.js @@ -255,7 +255,7 @@ App.Neighbor.Interact = (function() { * @param {string} itemName - the item name to check to see if the player already has this item * @param {string} category - the category to check to see if the player already has this item * @param {string} itemDisplay - a display name for a group of the item; as in, "a shipment of XXX" or "enough XXX" - * @param {string} property - the global property controlling whether this item has been acquired + * @param {function} property - adjusts the global property controlling whether this item has been acquired * @param {number} [itemPrice] - the price the player should pay for the item; by default, basePrice (computed above) */ function addAcquisitionBlock(fsRequired, itemName, category, itemDisplay, property, itemPrice = basePrice) { @@ -263,19 +263,19 @@ App.Neighbor.Interact = (function() { if (!isItemAccessible.entry(itemName, category)) { if (controlled) { const link = App.UI.DOM.link(`Request a shipment of ${itemDisplay}`, (f) => { - V[property] = 1; + property(); replaceDetails(arcID); }); App.UI.DOM.appendNewElement("div", container, link); } else if (V.PC.skill.hacking >= 50) { const link = App.UI.DOM.link(`Divert an outgoing shipment of ${itemDisplay}`, (f) => { - V[property] = 1; + property(); replaceDetails(arcID); }); App.UI.DOM.appendNewElement("div", container, link); } else if (V.arcologies[arcID].direction !== V.arcologies[0].embargoTarget) { const link = App.UI.DOM.link(`Divert an outgoing shipment of ${itemDisplay}`, (f) => { - V[property] = 1; + property(); cashX(forceNeg(itemPrice), "capEx"); // replaceDetails(arcID); - cash changed, force passage transition for sidebar update }, [], "Neighbor Interact"); @@ -289,26 +289,26 @@ App.Neighbor.Interact = (function() { } } - addAcquisitionBlock("FSRomanRevivalist", "a toga", "clothing", "togas", "clothesBoughtToga"); - addAcquisitionBlock("FSEdoRevivalist", "a kimono", "clothing", "kimonos", "clothesBoughtKimono"); - addAcquisitionBlock("FSArabianRevivalist", "harem gauze", "clothing", "silken harem garb", "clothesBoughtHarem"); - addAcquisitionBlock("FSAztecRevivalist", "a huipil", "clothing", "huipils", "clothesBoughtHuipil"); - addAcquisitionBlock("FSChineseRevivalist", "a slutty qipao", "clothing", "skimpy qipaos", "clothesBoughtQipao"); - addAcquisitionBlock("FSEgyptianRevivalist", "ancient Egyptian", "collar", "Egyptian necklace replicas", "clothesBoughtEgypt"); - addAcquisitionBlock("FSPaternalist", "conservative clothing", "clothing", "conservative clothing", "clothesBoughtConservative"); - addAcquisitionBlock("FSDegradationist", "chains", "clothing", "binding chains", "clothesBoughtChains"); - addAcquisitionBlock("FSGenderFundamentalist", "a bunny outfit", "clothing", "bunny suits", "clothesBoughtBunny"); - addAcquisitionBlock("FSIntellectualDependency", "a bimbo outfit", "clothing", "bimbo attire", "clothesBoughtBimbo"); - addAcquisitionBlock("FSSlaveProfessionalism", "a courtesan dress", "clothing", "cortesan dresses", "clothesBoughtCourtesan"); - // addAcquisitionBlock("FSPetiteAdmiration", "petite dress", "clothing", "petite-sized dresses", "clothesBoughtPetite"); - addAcquisitionBlock("FSPhysicalIdealist", "body oil", "clothing", "body oil", "clothesBoughtOil"); - addAcquisitionBlock("FSHedonisticDecadence", "stretch pants and a crop-top", "clothing", "stretch pants and crop-tops", "clothesBoughtLazyClothes"); - addAcquisitionBlock("FSChattelReligionist", "a chattel habit", "clothing", "chattel religionist habits", "clothesBoughtHabit"); - addAcquisitionBlock("FSPastoralist", "Western clothing", "clothing", "Western clothing", "clothesBoughtWestern"); - addAcquisitionBlock("FSRepopulationFocus", "a maternity dress", "clothing", "maternity dresses", "clothesBoughtMaternityDress"); - addAcquisitionBlock("FSRepopulationFocus", "attractive lingerie for a pregnant woman", "clothing", "maternity lingerie", "clothesBoughtMaternityLingerie"); - addAcquisitionBlock("FSRepopulationFocus", "a small empathy belly", "bellyAccessory", "empathy bellies", "clothesBoughtBelly"); - addAcquisitionBlock("FSStatuesqueGlorification", "platform heels", "shoes", "platform shoes", "shoesBoughtHeels"); + addAcquisitionBlock("FSRomanRevivalist", "a toga", "clothing", "togas", () => { V.boughtItem.toga = 1; }); + addAcquisitionBlock("FSEdoRevivalist", "a kimono", "clothing", "kimonos", () => { V.boughtItem.clothing.Kimono = 1; }); + addAcquisitionBlock("FSArabianRevivalist", "harem gauze", "clothing", "silken harem garb", () => { V.boughtItem.clothing.Harem = 1; }); + addAcquisitionBlock("FSAztecRevivalist", "a huipil", "clothing", "huipils", () => { V.boughtItem.clothing.Huipil = 1; }); + addAcquisitionBlock("FSChineseRevivalist", "a slutty qipao", "clothing", "skimpy qipaos", () => { V.boughtItem.clothing.Qipao = 1; }); + addAcquisitionBlock("FSEgyptianRevivalist", "ancient Egyptian", "collar", "Egyptian necklace replicas", () => { V.boughtItem.clothing.Egypt = 1; }); + addAcquisitionBlock("FSPaternalist", "conservative clothing", "clothing", "conservative clothing", () => { V.boughtItem.clothing.Conservative = 1; }); + addAcquisitionBlock("FSDegradationist", "chains", "clothing", "binding chains", () => { V.boughtItem.clothing.Chains = 1; }); + addAcquisitionBlock("FSGenderFundamentalist", "a bunny outfit", "clothing", "bunny suits", () => { V.boughtItem.clothing.Bunny = 1; }); + addAcquisitionBlock("FSIntellectualDependency", "a bimbo outfit", "clothing", "bimbo attire", () => { V.boughtItem.clothing.Bimbo = 1; }); + addAcquisitionBlock("FSSlaveProfessionalism", "a courtesan dress", "clothing", "cortesan dresses", () => { V.boughtItem.clothing.Courtesan = 1; }); + // addAcquisitionBlock("FSPetiteAdmiration", "petite dress", "clothing", "petite-sized dresses", () => { V.boughtItem.clothing.Petite = 1; }); + addAcquisitionBlock("FSPhysicalIdealist", "body oil", "clothing", "body oil", () => { V.boughtItem.clothing.Oil = 1; }); + addAcquisitionBlock("FSHedonisticDecadence", "stretch pants and a crop-top", "clothing", "stretch pants and crop-tops", () => { V.boughtItem.clothing.LazyClothes = 1; }); + addAcquisitionBlock("FSChattelReligionist", "a chattel habit", "clothing", "chattel religionist habits", () => { V.boughtItem.clothing.Habit = 1; }); + addAcquisitionBlock("FSPastoralist", "Western clothing", "clothing", "Western clothing", () => { V.boughtItem.clothing.Western = 1; }); + addAcquisitionBlock("FSRepopulationFocus", "a maternity dress", "clothing", "maternity dresses", () => { V.boughtItem.clothing.MaternityDress = 1; }); + addAcquisitionBlock("FSRepopulationFocus", "attractive lingerie for a pregnant woman", "clothing", "maternity lingerie", () => { V.boughtItem.clothing.MaternityLingerie = 1; }); + addAcquisitionBlock("FSRepopulationFocus", "a small empathy belly", "bellyAccessory", "empathy bellies", () => { V.boughtItem.clothing.Belly = 1; }); + addAcquisitionBlock("FSStatuesqueGlorification", "platform heels", "shoes", "platform shoes", () => { V.boughtItem.shoes.heels = 1; }); if (exports !== 1) { const luck = (V.arcologies[arcID].direction === V.arcologies[0].embargoTarget) ? `Fortunately` : `Unfortunately`; -- GitLab