Skip to content
Snippets Groups Projects
itemAvailability.js 5.96 KiB
Newer Older
  • Learn to ignore specific revisions
  • brickode's avatar
    brickode committed
    /* eslint-disable no-undef */
    
    Pregmodder's avatar
    Pregmodder committed
    /* intended to condense the clothing/toy/etc availability checks into something less asinine */
    window.isItemAccessible = function(string) {
    	const V = State.variables;
    
    
    kopareigns's avatar
    kopareigns committed
    	if (V.cheatMode === 1){
    
    Pregmodder's avatar
    Pregmodder committed
    		return true;
    	} else {
    
    kopareigns's avatar
    kopareigns committed
    		switch (string) { /* no breaks needed because we always return */
    
    Pregmodder's avatar
    Pregmodder committed
    		case 'attractive lingerie for a pregnant woman':
    
    kopareigns's avatar
    kopareigns committed
    			return (V.arcologies[0].FSRepopulationFocus > 0 || V.clothesBoughtMaternityLingerie === 1);
    
    Pregmodder's avatar
    Pregmodder committed
    		case 'a bunny outfit':
    
    kopareigns's avatar
    kopareigns committed
    			return (V.arcologies[0].FSGenderFundamentalist > 0 || V.clothesBoughtBunny === 1);
    
    Pregmodder's avatar
    Pregmodder committed
    		case 'body oil':
    
    kopareigns's avatar
    kopareigns committed
    			return (V.arcologies[0].FSPhysicalIdealist > 0 || V.clothesBoughtOil === 1);
    
    Pregmodder's avatar
    Pregmodder committed
    		case 'chains':
    
    kopareigns's avatar
    kopareigns committed
    			return (V.arcologies[0].FSDegradationist > 0 || V.clothesBoughtChains === 1);
    
    Pregmodder's avatar
    Pregmodder committed
    		case 'a chattel habit':
    
    kopareigns's avatar
    kopareigns committed
    			return (V.arcologies[0].FSChattelReligionist > 0 || V.clothesBoughtHabit === 1);
    
    Pregmodder's avatar
    Pregmodder committed
    		case 'conservative clothing':
    
    kopareigns's avatar
    kopareigns committed
    			return (V.arcologies[0].FSPaternalist > 0 || V.clothesBoughtConservative === 1);
    
    Pregmodder's avatar
    Pregmodder committed
    		case 'harem gauze':
    
    kopareigns's avatar
    kopareigns committed
    			return (V.arcologies[0].FSArabianRevivalist > 0 || V.clothesBoughtHarem === 1);
    
    Pregmodder's avatar
    Pregmodder committed
    		case 'a huipil':
    
    kopareigns's avatar
    kopareigns committed
    			return (V.arcologies[0].FSAztecRevivalist > 0 || V.clothesBoughtHuipil === 1);
    
    Pregmodder's avatar
    Pregmodder committed
    		case 'a kimono':
    
    kopareigns's avatar
    kopareigns committed
    			return (V.arcologies[0].FSEdoRevivalist > 0 || V.clothesBoughtKimono === 1 || V.continent === 'Japan');
    
    Pregmodder's avatar
    Pregmodder committed
    		case 'a maternity dress':
    
    kopareigns's avatar
    kopareigns committed
    			return (V.arcologies[0].FSRepopulationFocus > 0 || V.clothesBoughtMaternityDress === 1);
    
    klorpa's avatar
    klorpa committed
    		case 'a slutty qipao':
    
    kopareigns's avatar
    kopareigns committed
    			return (V.arcologies[0].FSChineseRevivalist > 0 || V.clothesBoughtQipao === 1);
    
    Pregmodder's avatar
    Pregmodder committed
    		case 'a long qipao':
    
    kopareigns's avatar
    kopareigns committed
    			return (V.arcologies[0].FSChineseRevivalist > 0 || V.clothesBoughtCultural === 1);
    
    Pregmodder's avatar
    Pregmodder committed
    		case 'stretch pants and a crop-top':
    
    kopareigns's avatar
    kopareigns committed
    			return (V.arcologies[0].FSHedonisticDecadence > 0 || V.clothesBoughtLazyClothes === 1);
    
    Pregmodder's avatar
    Pregmodder committed
    		case 'a toga':
    
    kopareigns's avatar
    kopareigns committed
    			return (V.arcologies[0].FSRomanRevivalist > 0 || V.clothesBoughtToga === 1);
    
    Pregmodder's avatar
    Pregmodder committed
    		case 'Western clothing':
    
    kopareigns's avatar
    kopareigns committed
    			return (V.arcologies[0].FSPastoralist > 0 || V.clothesBoughtWestern === 1);
    
    Pregmodder's avatar
    Pregmodder committed
    		case 'battlearmor':
    		case 'a military uniform':
    		case 'a red army uniform':
    		case 'battledress':
    
    kopareigns's avatar
    kopareigns committed
    			return (V.clothesBoughtMilitary === 1);
    
    Pregmodder's avatar
    Pregmodder committed
    		case 'a biyelgee costume':
    		case 'a dirndl':
    		case 'lederhosen':
    		case 'a mounty outfit':
    
    Pregmodder's avatar
    Pregmodder committed
    		case 'a hanbok':
    
    kopareigns's avatar
    kopareigns committed
    			return (V.clothesBoughtCultural === 1);
    
    Pregmodder's avatar
    Pregmodder committed
    		case 'a burqa':
    		case 'a niqab and abaya':
    
    kopareigns's avatar
    kopareigns committed
    			return (V.clothesBoughtMiddleEastern === 1 || V.continent === 'the Middle East');
    
    klorpa's avatar
    klorpa committed
    		case 'a hijab and blouse':
    			return (V.clothesBoughtMiddleEastern === 1 || V.clothesBoughtConservative === 1 || V.continent === 'the Middle East');
    
    klorpa's avatar
    klorpa committed
    		case 'a burkini':
    
    klorpa's avatar
    klorpa committed
    			return (V.clothesBoughtMiddleEastern === 1 && V.clothesBoughtSwimwear === 1 || V.continent === 'the Middle East');
    
    klorpa's avatar
    klorpa committed
    		case 'a Santa dress':
    
    klorpa's avatar
    klorpa committed
    			return (V.clothesBoughtCostume === 1);
    
    		case 'a klan robe':
    
    Pregmodder's avatar
    Pregmodder committed
    		case 'a slutty klan robe':
    
    Pregmodder's avatar
    Pregmodder committed
    		case 'a schutzstaffel uniform':
    		case 'a slutty schutzstaffel uniform':
    
    kopareigns's avatar
    kopareigns committed
    			return (V.clothesBoughtPol === 1);
    
    Pregmodder's avatar
    Pregmodder committed
    		case 'nice business attire':
    
    klorpa's avatar
    klorpa committed
    		case 'a nice nurse outfit':
    		case 'a police uniform':
    
    kopareigns's avatar
    kopareigns committed
    			return (V.clothesBoughtCareer === 1);
    
    Pregmodder's avatar
    Pregmodder committed
    		case 'a nice maid outfit':
    
    kopareigns's avatar
    kopareigns committed
    			return (V.clothesBoughtCareer === 1 || V.PC.career === 'servant');
    
    Pregmodder's avatar
    Pregmodder committed
    		case 'a ball gown':
    		case 'a gothic lolita dress':
    
    Pregmodder's avatar
    Pregmodder committed
    		//case 'a halter top dress':
    		//case 'a mini dress':
    
    		//case 'a slave gown':
    
    kopareigns's avatar
    kopareigns committed
    			return (V.clothesBoughtDresses === 1);
    
    Pregmodder's avatar
    Pregmodder committed
    		case 'a cybersuit':
    		case 'a latex catsuit':
    
    kopareigns's avatar
    kopareigns committed
    			return (V.clothesBoughtBodysuits === 1);
    
    Pregmodder's avatar
    Pregmodder committed
    		case 'a button-up shirt and panties':
    		case 'a button-up shirt':
    		case 'cutoffs':
    		case 'jeans':
    		case 'leather pants and a tube top':
    		case 'leather pants':
    		case 'an oversized t-shirt':
    		case 'a sweater and cutoffs':
    		case 'a sweater and panties':
    		case 'a sweater':
    		case 'a t-shirt and jeans':
    		case 'a t-shirt and panties':
    		case 'a t-shirt':
    		case 'a tank-top and panties':
    		case 'a tank-top':
    		case 'a tube top':
    
    kopareigns's avatar
    kopareigns committed
    			return (V.clothesBoughtCasual === 1);
    
    Pregmodder's avatar
    Pregmodder committed
    		case 'boyshorts':
    		case 'a bra':
    		case 'kitty lingerie':
    		case 'panties and pasties':
    		case 'a skimpy loincloth':
    		case 'a thong':
    
    kopareigns's avatar
    kopareigns committed
    			return (V.clothesBoughtUnderwear === 1);
    
    Pregmodder's avatar
    Pregmodder committed
    		case 'leather pants and pasties':
    		case 'a t-shirt and thong':
    		case 'a tube top and thong':
    		case 'an oversized t-shirt and boyshorts':
    
    kopareigns's avatar
    kopareigns committed
    			return (V.clothesBoughtUnderwear === 1 && V.clothesBoughtCasual === 1);
    
    Pregmodder's avatar
    Pregmodder committed
    		case 'sport shorts and a sports bra':
    		case 'sport shorts':
    		case 'a sports bra':
    
    kopareigns's avatar
    kopareigns committed
    			return (V.clothesBoughtSports === 1);
    
    Pregmodder's avatar
    Pregmodder committed
    		case 'sport shorts and a t-shirt':
    
    kopareigns's avatar
    kopareigns committed
    			return (V.clothesBoughtSports === 1 && V.clothesBoughtCasual === 1);
    
    Pregmodder's avatar
    Pregmodder committed
    		case 'a nice pony outfit':
    		case 'a slutty pony outfit':
    
    kopareigns's avatar
    kopareigns committed
    			return (V.clothesBoughtPony === 1);
    
    Pregmodder's avatar
    Pregmodder committed
    		case 'a monokini':
    		case 'a one-piece swimsuit':
    
    kopareigns's avatar
    kopareigns committed
    			return (V.clothesBoughtSwimwear === 1);
    
    Pregmodder's avatar
    Pregmodder committed
    		case 'shimapan panties':
    
    Pregmodder's avatar
    Pregmodder committed
    		case 'a striped bra':
    		case 'striped panties':
    		case 'striped underwear':
    
    kopareigns's avatar
    kopareigns committed
    			return (V.clothesBoughtPantsu === 1 || V.continent === 'Japan');
    
    Pregmodder's avatar
    Pregmodder committed
    		case 'bowtie':
    
    kopareigns's avatar
    kopareigns committed
    			return (V.arcologies[0].FSGenderFundamentalist > 0 || V.clothesBoughtBunny === 1);
    
    Pregmodder's avatar
    Pregmodder committed
    		case 'ancient Egyptian':
    
    kopareigns's avatar
    kopareigns committed
    			return (V.arcologies[0].FSEgyptianRevivalist > 0 || V.clothesBoughtEgypt === 1);
    
    kopareigns's avatar
    kopareigns committed
    		case 'pasties': /* an option in saChoosesOwnClothes.tw, but everything else (e.g. descriptions, artwork, option in wardrobeUse.tw) is missing or not hooked up correctly */
    			return false;
    
    Pregmodder's avatar
    Pregmodder committed
    		case 'massive dildo gag':
    
    kopareigns's avatar
    kopareigns committed
    			return (V.toysBoughtGags === 1);
    		case 'a small empathy belly':
    		case 'a medium empathy belly':
    		case 'a large empathy belly':
    		case 'a huge empathy belly':
    			return (V.arcologies[0].FSRepopulationFocus > 0 || V.clothesBoughtBelly === 1);
    
    brickode's avatar
    brickode committed
    		case 'bullet vibrator':
    
    brickode's avatar
    brickode committed
    		case 'smart bullet vibrator':
    
    kopareigns's avatar
    kopareigns committed
    		case 'long dildo':
    		case 'long, large dildo':
    		case 'long, huge dildo':
    			return (V.toysBoughtDildos === 1);
    
    DCoded's avatar
    DCoded committed
    		case 'vibrator':
    			return (V.toysBoughtVaginalAttachments === 1);
    
    kopareigns's avatar
    kopareigns committed
    		case 'long plug':
    		case 'long, large plug':
    		case 'long, huge plug':
    			return (V.toysBoughtButtPlugs === 1);
    		case 'tail':
    		case 'cat tail':
    		case 'fox tail':
    			return (V.toysBoughtButtPlugTails === 1);
    
    Pregmodder's avatar
    Pregmodder committed
    		default:
    			return true;
    		}
    	}
    
    kopareigns's avatar
    kopareigns committed
    };