Browse Source

Weather Ruins Makeup Fix

Stephan Fuchs 9 months ago
parent
commit
f8e6ad60bb

+ 3 - 3
sugarcube/src/events/_system/tags/outdoors.tw

@@ -1,11 +1,11 @@
 :: outdoors_events[outdoors_events]
 <<event 1000>>
-    <<if getvar("$sunWeather") == 0 and !$inventory.get('umbrella') and ($pc.pcs_makeup > 1 or $pc.pcs_hairbsh == 1)>>
+    <<if $weather.isRaining and !$inventory.get('umbrella') and (($pc.makeupAmount > 0 and $pc.makeupQuality >= 0) or $pc.pcs_hairbsh == 1)>>
 		<<image "pc/activities/outsideInRain.jpg">>
 		It is raining and you do not have an umbrella.
 
-		<<if $pc.pcs_makeup > 1>>
-			<<set $pc.pcs_makeup = 0>>
+		<<if $pc.makeupAmount > 0>>
+			<<set $pc.makeupQuality = -1>>
 			<<negative>>The rain has ruined your makeup.<</negative>>
 		<</if>>
 		<<if $pc.pcs_hairbsh == 1>>

+ 2 - 2
sugarcube/src/js/Weather.js

@@ -38,9 +38,9 @@ setup.weatherSituations = {
 		},
 		weather:{
 			sunnny: 30,
-			sunnyClouds: 30,
+			sunnyClouds: 45,
 			clouds: 20,
-			rain: 20
+			rain: 5
 		}
 	},
 	summerNormal:{

+ 27 - 2
sugarcube/src/playerCharacter/Appearance.tw

@@ -355,6 +355,13 @@ setup.appearanceModificators = {
 		max: 4,
 		dec: 1
 	},
+	makeup_1_m1:{
+		label: 'Ruined subtle makeup',
+		desc: 'Your subtle makeup is ruined.',
+		priority: 100,
+		max: 6,
+		dec: 1
+	},
 	makeup_1_1:{
 		label: 'Low quality subtle makeup',
 		desc: 'Your subtle makeup does nothing to improve your appearance.',
@@ -373,6 +380,13 @@ setup.appearanceModificators = {
 		priority: 100,
 		inc: 1,
 	},
+	makeup_2_m1:{
+		label: 'Ruined makeup',
+		desc: 'Your makeup is ruined.',
+		priority: 100,
+		max: 6,
+		dec: 2
+	},
 	makeup_2_1:{
 		label: 'Low quality makeup',
 		desc: 'Your makeup slightly improves your appearance by covering your problem areas, but also makes you look fake.',
@@ -392,6 +406,13 @@ setup.appearanceModificators = {
 		priority: 100,
 		inc: 2,
 	},
+	makeup_3_m1:{
+		label: 'Ruined heavy makeup',
+		desc: 'Your heavy makeup is ruined.',
+		priority: 100,
+		max: 6,
+		dec: 3
+	},
 	makeup_3_1:{
 		label: 'Low quality heavy makeup',
 		desc: 'Your heavy makeup improves your appearance by effectively covering your problem areas, but also makes you look very fake.',
@@ -536,8 +557,12 @@ setup.appearanceModificators = {
 
 		/* Temp */
 			/* Makeup */
-				<<if $pc.makeupAmount > 0 && $pc.makeupQuality>>
-					<<run _appearanceModificators.temp.push(func('Appearance','getModificator',`makeup_${$pc.makeupAmount}_${$pc.makeupQuality}`))>>
+				<<if $pc.makeupAmount > 0>>
+					<<if $pc.makeupQuality >= 0>>
+						<<run _appearanceModificators.temp.push(func('Appearance','getModificator',`makeup_${$pc.makeupAmount}_${$pc.makeupQuality}`))>>
+					<<else>>
+						<<run _appearanceModificators.temp.push(func('Appearance','getModificator',`makeup_${$pc.makeupAmount}_m${Math.abs($pc.makeupQuality)}`))>>
+					<</if>>	
 				<</if>>
 			/* Clothes */
 				<<if !$wardrobe.clothingIsNude>>

+ 6 - 2
sugarcube/src/sidebar/Sidebar.tw

@@ -128,8 +128,12 @@
 		<<if $pc.makeupAmount > 0>>
 			<<imageWithTooltip `"system/icons/status/makeup_"+$pc.makeupAmount+".png"`>>
 				You are wearing
-				<<switch $pc.makeupQuality>><<case 1>>low<<case 2>>medium<<case 3>>high<</switch>>
-				quality 
+				<<if $pc.makeupQuality < 0 >>
+					ruined
+				<<else>>
+					<<switch $pc.makeupQuality>><<case 1>>low<<case 2>>medium<<case 3>>high<</switch>>
+					quality 
+				<</if>>
 				<<switch $pc.makeupAmount>><<case 1>>subtle<<case 3>>heavy<</switch>>
 				makeup.
 			<</imageWithTooltip>>