From abf0c18af5a1fbaa7499a6d7792417662d2ca7d1 Mon Sep 17 00:00:00 2001 From: tile4 Date: Wed, 23 Oct 2024 18:14:56 -0400 Subject: [PATCH 1/4] Update _ego_gear.dm --- .../clothing/suits/ego_gear/_ego_gear.dm | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/code/modules/clothing/suits/ego_gear/_ego_gear.dm b/code/modules/clothing/suits/ego_gear/_ego_gear.dm index f396ec2d0301..aa09660da4bf 100644 --- a/code/modules/clothing/suits/ego_gear/_ego_gear.dm +++ b/code/modules/clothing/suits/ego_gear/_ego_gear.dm @@ -60,6 +60,17 @@ return neckwear.Destroy() +/obj/item/clothing/suit/armor/ego_gear/pickup(mob/user) + . = ..() + if(!user.has_movespeed_modifier(/datum/movespeed_modifier/too_many_armors) && ishuman(user)) + var/obj/item/clothing/suit/armor/equipped_armor = user.get_item_by_slot(ITEM_SLOT_OCLOTHING) + if(istype(equipped_armor, /obj/item/clothing/suit/armor/ego_gear)) + if((SSmaptype.maptype in SSmaptype.citymaps) || (SSmaptype.maptype in SSmaptype.combatmaps)) + return + else + if(user.mind.assigned_role != "Extraction Officer") + user.add_or_update_variable_movespeed_modifier(/datum/movespeed_modifier/too_many_armors) + /obj/item/clothing/suit/armor/ego_gear/dropped(mob/user) . = ..() if(hat) @@ -72,6 +83,8 @@ if(!istype(neckwear, neck)) return neckwear.Destroy() + if(user.has_movespeed_modifier(/datum/movespeed_modifier/too_many_armors)) + user.remove_movespeed_modifier(/datum/movespeed_modifier/too_many_armors) /obj/item/clothing/suit/armor/ego_gear/proc/CanUseEgo(mob/living/carbon/human/user) if(!ishuman(user)) @@ -144,3 +157,7 @@ var/mob/living/carbon/human/H = usr H.update_inv_wear_suit() H.update_body() + +/datum/movespeed_modifier/too_many_armors + variable = TRUE + multiplicative_slowdown = 3.3 //Roughly 1/3 speed for holding too many armors From d47b0a7e625ac2d76c8e50016048a2b2be2067cb Mon Sep 17 00:00:00 2001 From: tile4 Date: Thu, 24 Oct 2024 17:44:08 -0400 Subject: [PATCH 2/4] Update _ego_gear.dm --- code/modules/clothing/suits/ego_gear/_ego_gear.dm | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/code/modules/clothing/suits/ego_gear/_ego_gear.dm b/code/modules/clothing/suits/ego_gear/_ego_gear.dm index aa09660da4bf..d4303ec9ba58 100644 --- a/code/modules/clothing/suits/ego_gear/_ego_gear.dm +++ b/code/modules/clothing/suits/ego_gear/_ego_gear.dm @@ -68,7 +68,8 @@ if((SSmaptype.maptype in SSmaptype.citymaps) || (SSmaptype.maptype in SSmaptype.combatmaps)) return else - if(user.mind.assigned_role != "Extraction Officer") + var/slowdown_free_roles = list("Clerk", "Agent Support Clerk", "Facility Support Clerk", "Extraction Officer") + if(!(user.mind.assigned_role in slowdown_free_roles)) user.add_or_update_variable_movespeed_modifier(/datum/movespeed_modifier/too_many_armors) /obj/item/clothing/suit/armor/ego_gear/dropped(mob/user) From a6f983c315d129ecc99b6cd0c48003a5c8494b7f Mon Sep 17 00:00:00 2001 From: tile4 Date: Thu, 24 Oct 2024 17:46:48 -0400 Subject: [PATCH 3/4] Update _ego_gear.dm --- code/modules/clothing/suits/ego_gear/_ego_gear.dm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/modules/clothing/suits/ego_gear/_ego_gear.dm b/code/modules/clothing/suits/ego_gear/_ego_gear.dm index d4303ec9ba58..a957ded65ce8 100644 --- a/code/modules/clothing/suits/ego_gear/_ego_gear.dm +++ b/code/modules/clothing/suits/ego_gear/_ego_gear.dm @@ -68,7 +68,7 @@ if((SSmaptype.maptype in SSmaptype.citymaps) || (SSmaptype.maptype in SSmaptype.combatmaps)) return else - var/slowdown_free_roles = list("Clerk", "Agent Support Clerk", "Facility Support Clerk", "Extraction Officer") + var/list/slowdown_free_roles = list("Clerk", "Agent Support Clerk", "Facility Support Clerk", "Extraction Officer") if(!(user.mind.assigned_role in slowdown_free_roles)) user.add_or_update_variable_movespeed_modifier(/datum/movespeed_modifier/too_many_armors) From b893ecd7ad88074bc164770c362a4b18b31b8622 Mon Sep 17 00:00:00 2001 From: tile4 Date: Thu, 24 Oct 2024 17:55:02 -0400 Subject: [PATCH 4/4] Cleaner code --- code/modules/clothing/suits/ego_gear/_ego_gear.dm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/code/modules/clothing/suits/ego_gear/_ego_gear.dm b/code/modules/clothing/suits/ego_gear/_ego_gear.dm index a957ded65ce8..1b07bbc66d0f 100644 --- a/code/modules/clothing/suits/ego_gear/_ego_gear.dm +++ b/code/modules/clothing/suits/ego_gear/_ego_gear.dm @@ -63,8 +63,8 @@ /obj/item/clothing/suit/armor/ego_gear/pickup(mob/user) . = ..() if(!user.has_movespeed_modifier(/datum/movespeed_modifier/too_many_armors) && ishuman(user)) - var/obj/item/clothing/suit/armor/equipped_armor = user.get_item_by_slot(ITEM_SLOT_OCLOTHING) - if(istype(equipped_armor, /obj/item/clothing/suit/armor/ego_gear)) + var/obj/item/clothing/suit/armor/ego_gear/equipped_armor = user.get_item_by_slot(ITEM_SLOT_OCLOTHING) + if(istype(equipped_armor)) if((SSmaptype.maptype in SSmaptype.citymaps) || (SSmaptype.maptype in SSmaptype.combatmaps)) return else