Add IPC knockout chem and hunger hallucination. (#32177)

* Add IPC knockout chem and hunger hallucination.

* Apply suggestions from CRUNCH review

Co-authored-by: CRUNCH <143041327+CRUNCH-Borg@users.noreply.github.com>
Signed-off-by: Alan <alfalfascout@users.noreply.github.com>

---------

Signed-off-by: Alan <alfalfascout@users.noreply.github.com>
Co-authored-by: CRUNCH <143041327+CRUNCH-Borg@users.noreply.github.com>
This commit is contained in:
Alan
2026-07-17 06:14:45 +00:00
committed by GitHub
co-authored by CRUNCH
parent 225a38b7de
commit be39ae6253
8 changed files with 94 additions and 2 deletions
@@ -196,6 +196,30 @@
target?.update_health_hud()
return ..()
/**
* # Hallucination - Fake Hunger
*
* Visually changes the target's nutrition status to something it shouldn't be.
*/
/obj/effect/hallucination/fake_nutrition
duration = list(10 SECONDS, 25 SECONDS)
/obj/effect/hallucination/fake_nutrition/Initialize(mapload, mob/living/carbon/human/target)
. = ..()
if(target.nutrition > NUTRITION_LEVEL_FED)
target.nutrition_hud_override = pick(NUTRITION_HUD_OVERRIDE_HUNGRY, NUTRITION_HUD_OVERRIDE_STARVING)
else
target.nutrition_hud_override = pick(NUTRITION_HUD_OVERRIDE_FAT, NUTRITION_HUD_OVERRIDE_FULL) // You think you're full, but you're not.
if(istype(target))
target.handle_nutrition_alerts()
/obj/effect/hallucination/fake_nutrition/Destroy()
target?.nutrition_hud_override = NUTRITION_HUD_OVERRIDE_NONE
if(ishuman(target))
var/mob/living/carbon/human/human_target = target
human_target?.handle_nutrition_alerts()
return ..()
/**
* # Hallucination - Examine Hallucination
*
@@ -2,7 +2,8 @@ GLOBAL_LIST_INIT(hallucinations, alist(
HALLUCINATE_MINOR = list(
/obj/effect/hallucination/bolts = 10,
/obj/effect/hallucination/fake_danger = 10,
/obj/effect/hallucination/fake_health = 15,
/obj/effect/hallucination/fake_health = 10,
/obj/effect/hallucination/fake_nutrition = 10,
/obj/effect/hallucination/speech = 15,
/obj/effect/hallucination/audio/localized = 25,
/obj/effect/hallucination/trait_applier/medical_machinery = 25,
@@ -782,6 +782,9 @@
nutrition_display.icon_state = null
return
nutrition_display.icon = dna.species.hunger_icon
if(nutrition_hud_override)
nutrition_display.icon_state = nutrition_hud_override
return
switch(nutrition)
if(NUTRITION_LEVEL_FULL to INFINITY)
nutrition_display.icon_state = "fat"
+2
View File
@@ -205,6 +205,8 @@
/// Overrides the health HUD element state if set.
var/health_hud_override = HEALTH_HUD_OVERRIDE_NONE
/// Overrides the nutrition HUD element state if set.
var/nutrition_hud_override = NUTRITION_HUD_OVERRIDE_NONE
/// A soft reference to the location where this mob's runechat message will appear. Uses `UID()`.
var/runechat_msg_location
/// The datum receiving keyboard input. parent mob by default.
@@ -956,6 +956,49 @@
M.Paralyse(50 SECONDS)
return ..() | update_flags
/datum/reagent/frigidi
name = "Frigidi"
id = "frigidi"
description = "Budget industrial coolant appropriate for large spacecraft and detrimental to smaller machines. May cause microbattery damage."
reagent_state = LIQUID
color = "#444E90"
metabolization_rate = 0.8
penetrates_skin = TRUE
process_flags = ORGANIC | SYNTHETIC
taste_mult = 0
/datum/reagent/frigidi/on_mob_life(mob/living/M)
if(!ismachineperson(M))
var/update_flags = STATUS_UPDATE_NONE | M.adjustFireLoss(1 * REAGENTS_EFFECT_MULTIPLIER, FALSE)
return ..() | update_flags
var/mob/living/carbon/human/target = M
switch(current_cycle)
if(1 to 5)
if(M.nutrition > NUTRITION_LEVEL_HUNGRY)
M.nutrition_hud_override = NUTRITION_HUD_OVERRIDE_HUNGRY
target.handle_nutrition_alerts()
if(6 to 9)
M.AdjustEyeBlurry(10 SECONDS)
M.nutrition_hud_override = NUTRITION_HUD_OVERRIDE_STARVING
target.handle_nutrition_alerts()
if(10)
M.emote("faint")
M.Weaken(10 SECONDS)
if(11 to INFINITY)
M.Paralyse(50 SECONDS)
if(prob(10))
var/obj/item/organ/internal/cell/microbattery = M.get_organ_slot("heart")
if(istype(microbattery))
microbattery.receive_damage(2, TRUE)
var/update_flags = STATUS_UPDATE_NONE
return ..() | update_flags
/datum/reagent/frigidi/on_mob_delete(mob/living/M)
if(ismachineperson(M))
var/mob/living/carbon/human/target = M
M.nutrition_hud_override = NUTRITION_HUD_OVERRIDE_NONE
target.handle_nutrition_alerts()
/datum/reagent/sulfonal
name = "Sulfonal"
id = "sulfonal"
@@ -177,3 +177,11 @@
required_reagents = list("lsd" = 1, "teslium" = 1, "methamphetamine" = 1)
result_amount = 3
mix_message = SPAN_DANGER("After sparks, fire, and the smell of LSD, the mix is constantly spinning with no stop in sight.")
/datum/chemical_reaction/frigidi
name = "Frigidi"
id = "frigidi"
result = "frigidi"
required_reagents = list("cryostylane" = 1, "w33d" = 1, "lube" = 1)
result_amount = 3
mix_message = "The mixture makes the container cool to the touch."