From 079c2fd436313b364b4a68a2467601d0cc2a7428 Mon Sep 17 00:00:00 2001 From: Rykka Date: Sun, 27 Mar 2022 16:27:13 -0600 Subject: [PATCH] Xenochimera Feral Reduction in Darkness OR Belly Xenochimera will now reduce ferality at a tickrate of 1 per Life tick while inside a belly or in darkness, same as the hunger reduction if they're full. They will not experience hallucinations and will get safety messages while inside a belly, as well as the status indicator confirming they're safe even in a lit environment. In total: If sated, feral will reduce by 1 per Life() tick. If in darkness _or_ a belly, feral will reduce by 1 per Life() tick. A feral of 220 will take 110 seconds to clear if satiated, not in a belly, and in light. Alternatively, it will take 55 seconds to clear if satiated **and** either in a belly _or_ in the darkness. Upstream port of https://github.com/CHOMPStation2/CHOMPStation2/pull/3823 and https://github.com/CHOMPStation2/CHOMPStation2/pull/3906 --- code/_onclick/hud/screen_objects_vr.dm | 2 ++ .../human/species/station/station_special_vr.dm | 15 ++++++++++----- 2 files changed, 12 insertions(+), 5 deletions(-) diff --git a/code/_onclick/hud/screen_objects_vr.dm b/code/_onclick/hud/screen_objects_vr.dm index 7fd40a534c0..4d837803279 100644 --- a/code/_onclick/hud/screen_objects_vr.dm +++ b/code/_onclick/hud/screen_objects_vr.dm @@ -45,6 +45,8 @@ var/turf/T = get_turf(H) if(T.get_lumcount() <= 0.1) to_chat(usr, "You are slowly calming down in darkness' safety...") + else if(isbelly(H.loc)) // Safety message for if inside a belly. + to_chat(usr, "You are slowly calming down within the darkness of something's belly, listening to their body as it moves around you. ...safe...") else to_chat(usr, "You are slowly calming down... But safety of darkness is much preferred.") else diff --git a/code/modules/mob/living/carbon/human/species/station/station_special_vr.dm b/code/modules/mob/living/carbon/human/species/station/station_special_vr.dm index 10f1aa0acd1..5412660dce4 100644 --- a/code/modules/mob/living/carbon/human/species/station/station_special_vr.dm +++ b/code/modules/mob/living/carbon/human/species/station/station_special_vr.dm @@ -206,6 +206,11 @@ feral++ else feral = max(0,--feral) + + // Being in a belly or in the darkness decreases stress further. Helps mechanically reward players for staying in darkness + RP'ing appropriately. :9 + var/turf/T = get_turf(H) + if(feral && (isbelly(H.loc) || T.get_lumcount() <= 0.1)) + feral = max(0,--feral) //Set our real mob's var to our temp var H.feral = feral @@ -222,7 +227,7 @@ H.shock_stage = max(H.shock_stage-(feral/20), 0) //Handle light/dark areas - var/turf/T = get_turf(H) + // var/turf/T = get_turf(H) // Moved up to before the in-belly/dark combined check, should still safely reach here just fine. if(!T) update_xenochimera_hud(H, danger, feral_state) return //Nullspace @@ -234,8 +239,8 @@ //This is basically the 'lite' version of the below block. var/list/nearby = H.living_mobs(world.view) - //Not in the dark and out in the open. - if(!darkish && isturf(H.loc)) + //Not in the dark, or a belly, and out in the open. + if(!darkish && isturf(H.loc) && !isbelly(H.loc)) // Added specific check for if in belly //Always handle feral if nobody's around and not in the dark. if(!nearby.len) @@ -249,8 +254,8 @@ update_xenochimera_hud(H, danger, feral_state) return - // In the darkness or "hidden". No need for custom scene-protection checks as it's just an occational infomessage. - if(darkish || !isturf(H.loc)) + // In the darkness, or "hidden", or in a belly. No need for custom scene-protection checks as it's just an occational infomessage. + if(darkish || !isturf(H.loc) || isbelly(H.loc)) // Specific check for if in belly. !isturf should do this, but JUST in case. // If hurt, tell 'em to heal up if (shock) to_chat(H,"This place seems safe, secure, hidden, a place to lick your wounds and recover...")