From 9ffa3dfd85be27ff26c63ac6220cec6c3872f7f7 Mon Sep 17 00:00:00 2001
From: Metis <100518708+sheepishgoat@users.noreply.github.com>
Date: Thu, 27 Jun 2024 23:35:38 -0400
Subject: [PATCH] need to update more
---
GainStation13/code/mechanics/helplessness.dm | 20 +++++++++++++
code/modules/client/preferences.dm | 2 +-
.../mob/living/carbon/human/species.dm | 28 +++++++++++++++++--
code/modules/mob/mob_movement.dm | 4 +++
tgstation.dme | 1 +
5 files changed, 52 insertions(+), 3 deletions(-)
create mode 100644 GainStation13/code/mechanics/helplessness.dm
diff --git a/GainStation13/code/mechanics/helplessness.dm b/GainStation13/code/mechanics/helplessness.dm
new file mode 100644
index 00000000..12f2f896
--- /dev/null
+++ b/GainStation13/code/mechanics/helplessness.dm
@@ -0,0 +1,20 @@
+/mob/living/carbon/can_buckle()
+ if(HAS_TRAIT(src, TRAIT_NO_BUCKLE))
+ return FALSE
+
+ return ..()
+
+/datum/species/can_equip(obj/item/I, slot, disable_warning, mob/living/carbon/human/H, bypass_equip_delay_self)
+ if(HAS_TRAIT(H, TRAIT_NO_BACKPACK) && slot == ITEM_SLOT_BACK)
+ to_chat(H, "You are too fat to wear anything on your back.")
+ return FALSE
+
+ if(HAS_TRAIT(H, TRAIT_NO_JUMPSUIT) && slot == ITEM_SLOT_ICLOTHING)
+ to_chat(H, "You are too fat to wear [I].")
+ return FALSE
+
+ if(HAS_TRAIT(H, TRAIT_NO_MISC) && (slot == ITEM_SLOT_FEET || slot == ITEM_SLOT_GLOVES || slot == ITEM_SLOT_OCLOTHING))
+ to_chat(H, "You are too fat to wear [I].")
+ return FALSE
+
+ return ..()
diff --git a/code/modules/client/preferences.dm b/code/modules/client/preferences.dm
index c8cebeb0..fabf8b6c 100644
--- a/code/modules/client/preferences.dm
+++ b/code/modules/client/preferences.dm
@@ -1080,7 +1080,7 @@ GLOBAL_LIST_EMPTY(preferences_datums)
dat += "Mute:[helplessness_mute == FALSE ? "Disabled" : helplessness_mute]
"
dat += "Immobile Arms:[helplessness_immobile_arms == FALSE ? "Disabled" : helplessness_immobile_arms]
"
dat += "Clothing Jumpsuit:[helplessness_clothing_jumpsuit == FALSE ? "Disabled" : helplessness_clothing_jumpsuit]"
- dat += "Clothing Misc:[helplessness_clothing_misc == FALSE ? "Disabled" : helplessness_clothing_misc]
"
+ dat += "Clothing Suit, Boots, and Gloves:[helplessness_clothing_misc == FALSE ? "Disabled" : helplessness_clothing_misc]
"
dat += "Clothing Back:[helplessness_clothing_back == FALSE ? "Disabled" : helplessness_clothing_back]
"
dat += "No Buckle:[helplessness_no_buckle == FALSE ? "Disabled" : helplessness_no_buckle]
"
diff --git a/code/modules/mob/living/carbon/human/species.dm b/code/modules/mob/living/carbon/human/species.dm
index c400b70d..55bc4714 100644
--- a/code/modules/mob/living/carbon/human/species.dm
+++ b/code/modules/mob/living/carbon/human/species.dm
@@ -1380,10 +1380,10 @@ GLOBAL_LIST_EMPTY(roundstart_races)
if(preferences.helplessness_nearsighted)
if(!HAS_TRAIT_FROM(fatty, TRAIT_NEARSIGHT, HELPLESSNESS_TRAIT))
if(fatty.fatness >= preferences.helplessness_nearsighted)
- ADD_TRAIT(fatty, TRAIT_NEARSIGHT, HELPLESSNESS_TRAIT)
+ fatty.become_nearsighted(HELPLESSNESS_TRAIT)
else if(fatty.fatness < preferences.helplessness_nearsighted)
- REMOVE_TRAIT(fatty, TRAIT_NEARSIGHT, HELPLESSNESS_TRAIT)
+ fatty.cure_nearsighted(HELPLESSNESS_TRAIT)
if(preferences.helplessness_hidden_face)
@@ -1420,6 +1420,11 @@ GLOBAL_LIST_EMPTY(roundstart_races)
if(fatty.fatness >= preferences.helplessness_clothing_jumpsuit)
ADD_TRAIT(fatty, TRAIT_NO_JUMPSUIT, HELPLESSNESS_TRAIT)
+ var/obj/item/clothing/under/jumpsuit = fatty.w_uniform
+ if(istype(jumpsuit))
+ to_chat(fatty, "[jumpsuit] can no longer contain your weight!")
+ fatty.dropItemToGround(jumpsuit)
+
else if(fatty.fatness < preferences.helplessness_clothing_jumpsuit)
REMOVE_TRAIT(fatty, TRAIT_NO_JUMPSUIT, HELPLESSNESS_TRAIT)
@@ -1429,6 +1434,21 @@ GLOBAL_LIST_EMPTY(roundstart_races)
if(fatty.fatness >= preferences.helplessness_clothing_misc)
ADD_TRAIT(fatty, TRAIT_NO_MISC, HELPLESSNESS_TRAIT)
+ var/obj/item/clothing/suit/worn_suit = fatty.wear_suit
+ if(istype(worn_suit))
+ to_chat(fatty, "[worn_suit] can no longer contain your weight!")
+ fatty.dropItemToGround(worn_suit)
+
+ var/obj/item/clothing/gloves/worn_gloves = fatty.gloves
+ if(istype(worn_gloves))
+ to_chat(fatty, "[worn_gloves] can no longer contain your weight!")
+ fatty.dropItemToGround(worn_gloves)
+
+ var/obj/item/clothing/shoes/worn_shoes = fatty.shoes
+ if(istype(worn_shoes))
+ to_chat(fatty, "[worn_shoes] can no longer contain your weight!")
+ fatty.dropItemToGround(worn_shoes)
+
else if(fatty.fatness < preferences.helplessness_clothing_misc)
REMOVE_TRAIT(fatty, TRAIT_NO_MISC, HELPLESSNESS_TRAIT)
@@ -1437,6 +1457,10 @@ GLOBAL_LIST_EMPTY(roundstart_races)
if(!HAS_TRAIT_FROM(fatty, TRAIT_NO_BACKPACK, HELPLESSNESS_TRAIT))
if(fatty.fatness >= preferences.helplessness_clothing_back)
ADD_TRAIT(fatty, TRAIT_NO_BACKPACK, HELPLESSNESS_TRAIT)
+ var/obj/item/back_item = fatty.back
+ if(istype(back_item))
+ to_chat(fatty, "Your weight makes it impossible for you to carry [back_item].")
+ fatty.dropItemToGround(back_item)
else if(fatty.fatness < preferences.helplessness_clothing_back)
REMOVE_TRAIT(fatty, TRAIT_NO_BACKPACK, HELPLESSNESS_TRAIT)
diff --git a/code/modules/mob/mob_movement.dm b/code/modules/mob/mob_movement.dm
index c1a85768..1cef42ae 100644
--- a/code/modules/mob/mob_movement.dm
+++ b/code/modules/mob/mob_movement.dm
@@ -84,6 +84,10 @@
if(!mob.Process_Spacemove(direct))
return FALSE
+
+ //GS13 EDIT
+ if(HAS_TRAIT(mob, TRAIT_NO_MOVE))
+ return FALSE
//We are now going to move
var/add_delay = mob.movement_delay()
diff --git a/tgstation.dme b/tgstation.dme
index 0542ee37..2618e0d8 100644
--- a/tgstation.dme
+++ b/tgstation.dme
@@ -3096,6 +3096,7 @@
#include "GainStation13\code\machinery\feeding_tube.dm"
#include "GainStation13\code\mechanics\fatness.dm"
#include "GainStation13\code\mechanics\fattening_trap.dm"
+#include "GainStation13\code\mechanics\helplessness.dm"
#include "GainStation13\code\mechanics\infestation.dm"
#include "GainStation13\code\mechanics\metal_cruncher.dm"
#include "GainStation13\code\mechanics\spells.dm"