From 480f537afb4191bb270d7bc88888c89710b4e941 Mon Sep 17 00:00:00 2001 From: fernerr <35879136+fernerr@users.noreply.github.com> Date: Fri, 13 Dec 2019 23:10:35 +0100 Subject: [PATCH] Moves randomized hunger/thirst setup from jobs subsystem to human/initialize (#7646) With this, bluespace technicians, emergency responders and other spawned humans without jobs will no longer start out hungry/thirsty. --- code/controllers/subsystems/job.dm | 8 -------- code/modules/mob/living/carbon/human/human.dm | 6 ++++++ html/changelogs/Ferner-191210-coding_humanhunger.yml | 4 ++++ 3 files changed, 10 insertions(+), 8 deletions(-) create mode 100644 html/changelogs/Ferner-191210-coding_humanhunger.yml diff --git a/code/controllers/subsystems/job.dm b/code/controllers/subsystems/job.dm index dee7f276d1f..ddbb1b65b79 100644 --- a/code/controllers/subsystems/job.dm +++ b/code/controllers/subsystems/job.dm @@ -331,14 +331,6 @@ job.equip(H) - // Randomize nutrition and hydration. Defines are in __defines/mobs.dm - - if(H.max_nutrition > 0) - H.nutrition = rand(CREW_MINIMUM_NUTRITION*100, CREW_MAXIMUM_NUTRITION*100) * H.max_nutrition * 0.01 - - if(H.max_hydration > 0) - H.hydration = rand(CREW_MINIMUM_HYDRATION*100, CREW_MAXIMUM_HYDRATION*100) * H.max_hydration * 0.01 - if (!megavend) spawn_in_storage += EquipCustomDeferred(H, H.client.prefs, custom_equip_leftovers, custom_equip_slots) else diff --git a/code/modules/mob/living/carbon/human/human.dm b/code/modules/mob/living/carbon/human/human.dm index 67919cf061d..c0c9238fd1a 100644 --- a/code/modules/mob/living/carbon/human/human.dm +++ b/code/modules/mob/living/carbon/human/human.dm @@ -27,6 +27,12 @@ if(mind) mind.name = real_name + // Randomize nutrition and hydration. Defines are in __defines/mobs.dm + if(max_nutrition > 0) + nutrition = rand(CREW_MINIMUM_NUTRITION*100, CREW_MAXIMUM_NUTRITION*100) * max_nutrition * 0.01 + if(max_hydration > 0) + hydration = rand(CREW_MINIMUM_HYDRATION*100, CREW_MAXIMUM_HYDRATION*100) * max_hydration * 0.01 + hud_list[HEALTH_HUD] = new /image/hud_overlay('icons/mob/hud_med.dmi', src, "100") hud_list[STATUS_HUD] = new /image/hud_overlay('icons/mob/hud.dmi', src, "hudhealthy") hud_list[ID_HUD] = new /image/hud_overlay('icons/hud/hud_security.dmi', src, "hudunknown") diff --git a/html/changelogs/Ferner-191210-coding_humanhunger.yml b/html/changelogs/Ferner-191210-coding_humanhunger.yml new file mode 100644 index 00000000000..38e5c90e163 --- /dev/null +++ b/html/changelogs/Ferner-191210-coding_humanhunger.yml @@ -0,0 +1,4 @@ +author: Ferner +delete-after: True +changes: + - tweak: "Bluespace technicians and newly spawned human mobs from ghostspawners for example will no longer start out hungry/thirsty."