From 53ee5c07c47a9c156c756a57517c8163b6013130 Mon Sep 17 00:00:00 2001 From: ToasterBan <54711687+ToasterBan@users.noreply.github.com> Date: Sun, 7 Apr 2024 15:15:39 +0200 Subject: [PATCH] merge-unconflict --- beestation.dme | 2 +- code/__DEFINES/actionspeed_modification.dm | 2 +- code/__DEFINES/movespeed_modification.dm | 4 +--- .../modifiers/{hunger => hunger.dm} | 2 +- .../mob/living/carbon/human/species.dm | 22 +++++++++---------- .../modules/movespeed/modifiers/components.dm | 13 ----------- code/modules/movespeed/modifiers/mobs.dm | 10 +++++++++ 7 files changed, 25 insertions(+), 30 deletions(-) rename code/modules/actionspeed/modifiers/{hunger => hunger.dm} (81%) diff --git a/beestation.dme b/beestation.dme index 1c6f7fa04c722..de0fd68726889 100644 --- a/beestation.dme +++ b/beestation.dme @@ -1709,7 +1709,7 @@ #include "code\modules\actionspeed\_actionspeed_modifier.dm" #include "code\modules\actionspeed\modifiers\base.dm" #include "code\modules\actionspeed\modifiers\race.dm" -#include "code\modules\actionspeed\modifiers\hunger" +#include "code\modules\actionspeed\modifiers\hunger.dm" #include "code\modules\actionspeed\modifiers\status_effects.dm" #include "code\modules\admin\admin.dm" #include "code\modules\admin\admin_fax_panel.dm" diff --git a/code/__DEFINES/actionspeed_modification.dm b/code/__DEFINES/actionspeed_modification.dm index d9b36bb12546b..7354ac44a3eb7 100644 --- a/code/__DEFINES/actionspeed_modification.dm +++ b/code/__DEFINES/actionspeed_modification.dm @@ -1,2 +1,2 @@ //ids -#define ACTIONSPEED_ID_SATIETY "nutrition_component" +#define ACTIONSPEED_ID_SATIETY "nutrition" diff --git a/code/__DEFINES/movespeed_modification.dm b/code/__DEFINES/movespeed_modification.dm index 66b75a0b09b9b..0bd415d1b3466 100644 --- a/code/__DEFINES/movespeed_modification.dm +++ b/code/__DEFINES/movespeed_modification.dm @@ -6,7 +6,7 @@ #define MOVE_CONFLICT_JETPACK "JETPACK" //ids -#define MOVESPEED_ID_SANITY "sanity_component" +#define MOVESPEED_ID_VISIBLE_HUNGER "VISIBLE_HUNGER" #define MOVESPEED_ID_MOB_GRAB_STATE "mob_grab_state" #define MOVESPEED_ID_MOB_WALK_RUN "mob_walk_run" @@ -40,8 +40,6 @@ #define MOVESPEED_ID_PAI_SPACEWALK_SPEEDMOD "PAI_SPACEWALK_MODIFIER" -#define MOVESPEED_ID_VISIBLE_HUNGER "VISIBLE_HUNGER" - #define MOVESPEED_ID_PHOBIA "TRAUMA_PHOBIA" #define MOVESPEED_ID_SPECIES "SPECIES_SPEED_MOD" diff --git a/code/modules/actionspeed/modifiers/hunger b/code/modules/actionspeed/modifiers/hunger.dm similarity index 81% rename from code/modules/actionspeed/modifiers/hunger rename to code/modules/actionspeed/modifiers/hunger.dm index 6aec877e076e8..8e9007dcbfda9 100644 --- a/code/modules/actionspeed/modifiers/hunger +++ b/code/modules/actionspeed/modifiers/hunger.dm @@ -2,6 +2,6 @@ multiplicative_slowdown = 0.25 id = ACTIONSPEED_ID_SATIETY -/datum/actionspeed_modifier/wellfed +/datum/actionspeed_modifier/well_fed multiplicative_slowdown = -0.1 id = ACTIONSPEED_ID_SATIETY diff --git a/code/modules/mob/living/carbon/human/species.dm b/code/modules/mob/living/carbon/human/species.dm index a2da76dcdf712..7473a638fa6c3 100644 --- a/code/modules/mob/living/carbon/human/species.dm +++ b/code/modules/mob/living/carbon/human/species.dm @@ -1427,41 +1427,41 @@ GLOBAL_LIST_EMPTY(features_by_species) H.throw_alert("nutrition", /atom/movable/screen/alert/fat) if(NUTRITION_LEVEL_FED to NUTRITION_LEVEL_FULL) H.clear_alert("nutrition") - H.remove_movespeed_modifier(MOVESPEED_ID_VISIBLE_HUNGER, TRUE) - H.add_actionspeed_modifier(/datum/actionspeed_modifier/wellfed) + H.remove_movespeed_modifier(MOVESPEED_ID_VISIBLE_HUNGER) + H.add_actionspeed_modifier(/datum/actionspeed_modifier/well_fed) if(NUTRITION_LEVEL_HUNGRY to NUTRITION_LEVEL_FED) H.clear_alert("nutrition") - H.remove_movespeed_modifier(MOVESPEED_ID_VISIBLE_HUNGER, TRUE) + H.remove_movespeed_modifier(MOVESPEED_ID_VISIBLE_HUNGER) H.remove_actionspeed_modifier(ACTIONSPEED_ID_SATIETY) if(NUTRITION_LEVEL_STARVING to NUTRITION_LEVEL_HUNGRY) H.throw_alert("nutrition", /atom/movable/screen/alert/hungry) - H.add_movespeed_modifier(MOVESPEED_ID_VISIBLE_HUNGER, TRUE, 100, override=TRUE, multiplicative_slowdown=0.2, movetypes=(~FLYING)) + H.add_movespeed_modifier(/datum/movespeed_modifier/visible_hunger/hungry) H.add_actionspeed_modifier(/datum/actionspeed_modifier/starving) if(0 to NUTRITION_LEVEL_STARVING) H.throw_alert("nutrition", /atom/movable/screen/alert/starving) - H.add_movespeed_modifier(MOVESPEED_ID_VISIBLE_HUNGER, TRUE, 100, override=TRUE, multiplicative_slowdown=0.6, movetypes=(~FLYING)) + H.add_movespeed_modifier(/datum/movespeed_modifier/visible_hunger/starving) H.add_actionspeed_modifier(/datum/actionspeed_modifier/starving) /datum/species/proc/handle_charge(mob/living/carbon/human/H) switch(H.nutrition) if(NUTRITION_LEVEL_FED to INFINITY) H.clear_alert("nutrition") - H.remove_movespeed_modifier(MOVESPEED_ID_VISIBLE_HUNGER, TRUE) - H.add_actionspeed_modifier(/datum/actionspeed_modifier/wellfed) + H.remove_movespeed_modifier(MOVESPEED_ID_VISIBLE_HUNGER) + H.add_actionspeed_modifier(/datum/actionspeed_modifier/well_fed) if(NUTRITION_LEVEL_HUNGRY to NUTRITION_LEVEL_FED) H.throw_alert("nutrition", /atom/movable/screen/alert/lowcell, 1) - H.remove_movespeed_modifier(MOVESPEED_ID_VISIBLE_HUNGER, TRUE) + H.remove_movespeed_modifier(MOVESPEED_ID_VISIBLE_HUNGER) H.remove_actionspeed_modifier(ACTIONSPEED_ID_SATIETY) if(NUTRITION_LEVEL_STARVING to NUTRITION_LEVEL_HUNGRY) H.throw_alert("nutrition", /atom/movable/screen/alert/lowcell, 2) - H.add_movespeed_modifier(MOVESPEED_ID_VISIBLE_HUNGER, TRUE, 100, override=TRUE, multiplicative_slowdown=0.2, movetypes=(~FLYING)) + H.add_movespeed_modifier(/datum/movespeed_modifier/visible_hunger/hungry) H.add_actionspeed_modifier(/datum/actionspeed_modifier/starving) if(1 to NUTRITION_LEVEL_STARVING) H.throw_alert("nutrition", /atom/movable/screen/alert/lowcell, 3) - H.add_movespeed_modifier(MOVESPEED_ID_VISIBLE_HUNGER, TRUE, 100, override=TRUE, multiplicative_slowdown=0.6, movetypes=(~FLYING)) + H.add_movespeed_modifier(/datum/movespeed_modifier/visible_hunger/starving) H.add_actionspeed_modifier(/datum/actionspeed_modifier/starving) else - H.add_movespeed_modifier(MOVESPEED_ID_VISIBLE_HUNGER, TRUE, 100, override=TRUE, multiplicative_slowdown=0.7, movetypes=(~FLYING)) + H.add_movespeed_modifier(/datum/movespeed_modifier/visible_hunger/starving) H.add_actionspeed_modifier(/datum/actionspeed_modifier/starving) var/obj/item/organ/stomach/battery/battery = H.getorganslot(ORGAN_SLOT_STOMACH) if(!istype(battery)) diff --git a/code/modules/movespeed/modifiers/components.dm b/code/modules/movespeed/modifiers/components.dm index a80bb1cf08b13..d74793f9b5b9b 100644 --- a/code/modules/movespeed/modifiers/components.dm +++ b/code/modules/movespeed/modifiers/components.dm @@ -6,16 +6,3 @@ /datum/movespeed_modifier/snail_crawl multiplicative_slowdown = -7 movetypes = GROUND - -/datum/movespeed_modifier/sanity - id = MOVESPEED_ID_SANITY - movetypes = (~FLYING) - -/datum/movespeed_modifier/sanity/insane - multiplicative_slowdown = 0.6 - -/datum/movespeed_modifier/sanity/crazy - multiplicative_slowdown = 0.3 - -/datum/movespeed_modifier/sanity/disturbed - multiplicative_slowdown = 0.15 diff --git a/code/modules/movespeed/modifiers/mobs.dm b/code/modules/movespeed/modifiers/mobs.dm index 8fe3cbb80b03b..659b0ca082c42 100644 --- a/code/modules/movespeed/modifiers/mobs.dm +++ b/code/modules/movespeed/modifiers/mobs.dm @@ -138,3 +138,13 @@ /datum/movespeed_modifier/nopowercell multiplicative_slowdown = 1.5 blacklisted_movetypes = FLOATING + +/datum/movespeed_modifier/visible_hunger + id = MOVESPEED_ID_VISIBLE_HUNGER + movetypes = (~FLYING) + +/datum/movespeed_modifier/visible_hunger/starving + multiplicative_slowdown = 0.6 + +/datum/movespeed_modifier/visible_hunger/hungry + multiplicative_slowdown = 0.2