setup.getBodypart ??= function(bodypartId){
	let constantData = setup.bodypart[bodypartId];
	
	if(!constantData){
		console.error('Bodypart not found:',bodypartId);
		return {};
	}

	if(constantData.synonymFor){
		return setup.getBodypart(constantData.synonymFor);
	}
	

	return Object.assign(
		{
			id:bodypartId,
			clean:['shower'],
			label: bodypartId.toLocaleUpperFirst()
		},
		constantData
	);
}

setup.getBodyparts ??= function(){
	return Object.fromEntries(Object.keys(setup.bodypart).map(key=>[key,setup.getBodypart(key)]));
}

setup.hasBodypart ??= function(bodypartId){
	return !(!setup.bodypart[bodypartId]);
}

setup.bodypart ??= {
	hair:{
		painDisabled: true
	},
	brain:{
		inside: true,
		label:'Head',
		painDesc:'head',
		covered: true,
		clean:[]
	},
	ears:{

	},
	eyes:{

	},
	nose:{

	},
	lips:{
		clean:['toothbrush','drink','eat','shower']
	},
	tongue:{
		inside: true,
		clean:['toothbrush','drink','eat']
	},
	teeth:{
		inside: true,
		clean:['toothbrush','drink','eat']
	},
	mouth:{
		// For cum
		inside: true,
		painDisabled: true,
		clean:['toothbrush','drink','eat'],
		covered: true
	},
	face:{
		//Everything that isn't mentioned above
	},
	throat:{
		inside: true,
		covered: true,
		clean:['drink','eat']
	},
	neck:{

	},
	shoulders:{
		
	},
	arms:{

	},
	wrists:{

	},
	hands:{

	},
	breasts:{

	},
	nipples:{

	},
	belly:{

	},
	guts:{
		inside: true,
		covered: true,
		clean:[]
	},
	back:{

	},
	asscheeks:{
		synonymFor:"butt"
	},
	butt:{
		//The part you sit on. Use butthole or rectum for more specific parts.
	},
	clit:{

	},
	vagina:{
		inside: true,
		covered: true,
		clean:[]
	},
	pussy:{
		synonymFor:'vagina'
	},
	womb:{
		inside: true,
		covered: true,
		clean:[]
	},
	asshole:{
		synonymFor:'butthole'
	},
	butthole:{
		//Butthole is the outer visible part. Use rectum for the inside part.	
	},
	rectum:{
		covered: true,
		inside: true,
		clean:['enema']
	},
	anus:{
		synonymFor: 'rectum'
	},
	legs:{
		//covered: '$wardrobe.PXCloBottomShortness <= 100'
		covered:(pc:PlayerCharacter)=>pc.outfit.clothes.bottomShortness <= EOutfitBottomShortness.FLOOR_LENGTH || pc.outfit.clothes.thinness == EClothesThinness.REVEALING
	},
	feet:{
		//covered: '$wardrobe.isWearingShoes'
		covered:(pc:PlayerCharacter)=>pc.isWearingShoes
	}
}