diff --git a/GainStation13/code/mechanics/helplessness.dm b/GainStation13/code/mechanics/helplessness.dm new file mode 100644 index 00000000..7e5a6828 --- /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 == SLOT_BACK) + to_chat(H, "You are too fat to wear anything on your back.") + return FALSE + + if(!istype(I, /obj/item/clothing/under/color/grey/modular) && HAS_TRAIT(H, TRAIT_NO_JUMPSUIT) && slot == SLOT_W_UNIFORM) + to_chat(H, "You are too fat to wear [I].") + return FALSE + + if(HAS_TRAIT(H, TRAIT_NO_MISC) && (slot == SLOT_SHOES || slot == SLOT_GLOVES || slot == SLOT_WEAR_SUIT)) + to_chat(H, "You are too fat to wear [I].") + return FALSE + + return ..() diff --git a/GainStation13/code/modules/client/preferences/preferences.dm b/GainStation13/code/modules/client/preferences/preferences.dm index 1175fde5..6c20037c 100644 --- a/GainStation13/code/modules/client/preferences/preferences.dm +++ b/GainStation13/code/modules/client/preferences/preferences.dm @@ -22,8 +22,67 @@ ///stuckage var/stuckage = FALSE + // Helplessness, a set of prefs that make things extra tough at higher weights. If set to FALSE, they won't do anything. + ///What fatness level disables movement? + var/helplessness_no_movement = FALSE + ///What fatness level makes the user clumsy? + var/helplessness_clumsy = FALSE + ///What fatness level makes the user nearsighted + var/helplessness_nearsighted = FALSE + ///What fatness level makes the user's face unrecognizable. + var/helplessness_hidden_face = FALSE + ///What fatness level makes the user unable to speak? + var/helplessness_mute = FALSE + + ///What fatness level, makes the user unable to use their arms? + var/helplessness_immobile_arms = FALSE + ///What fatness level prevents the user from wearing jumpsuits + var/helplessness_clothing_jumpsuit = FALSE + ///What fatness level prevents the user from wearing non-jumpsuit clothing + var/helplessness_clothing_misc = FALSE + ///What fatness level prevents the user from wearing anything on their back + var/helplessness_clothing_back = FALSE + ///What fatness level prevents the user from being buckled to anything? + var/helplessness_no_buckle = FALSE + ///Does the person wish to be involved with non-con weight gain events? var/noncon_weight_gain = FALSE ///What is the max weight that the person wishes to be? If set to FALSE, there will be no max weight var/max_weight = FALSE + +/// Prompts the user to choose a weight and returns said weight. +/datum/preferences/proc/chose_weight(input_text = "Choose a weight.", mob/user) + var/chosen_weight = FALSE + var/picked_weight_class = input(user, + input_text, + "Character Preference", "None") as null|anything in list( + "None", "Fat", "Fatter", "Very Fat", "Obese", "Morbidly Obese", "Extremely Obese", "Barely Mobile", "Immobile", "Other") + + switch(picked_weight_class) + if("Fat") + chosen_weight = FATNESS_LEVEL_FATTER + if("Fatter") + chosen_weight = FATNESS_LEVEL_VERYFAT + if("Very Fat") + chosen_weight = FATNESS_LEVEL_OBESE + if("Obese") + chosen_weight = FATNESS_LEVEL_MORBIDLY_OBESE + if("Morbidly Obese") + chosen_weight = FATNESS_LEVEL_EXTREMELY_OBESE + if("Extremely Obese") + chosen_weight = FATNESS_LEVEL_BARELYMOBILE + if("Barely Mobile") + chosen_weight = FATNESS_LEVEL_IMMOBILE + if("Immobile") + chosen_weight = FATNESS_LEVEL_BLOB + + if(picked_weight_class != "Other") + return chosen_weight + + var/custom_fatness = input(user, "What fatness level (BFI) would you like to use?", "Character Preference") as null|num + if(isnull(custom_fatness)) + custom_fatness = FALSE + + return custom_fatness + \ No newline at end of file diff --git a/code/__DEFINES/traits.dm b/code/__DEFINES/traits.dm index a5ad770e..91e67196 100644 --- a/code/__DEFINES/traits.dm +++ b/code/__DEFINES/traits.dm @@ -222,7 +222,11 @@ //GS13 #define TRAIT_WEIGHT_LOSS_IMMUNE "weight_loss_immune" #define TRAIT_UNIVERSAL_GAINER "universal_gainer" - +#define TRAIT_NO_MOVE "no_move" +#define TRAIT_NO_JUMPSUIT "no_jumpsuit" +#define TRAIT_NO_MISC "no_misc" +#define TRAIT_NO_BACKPACK "no_backpack" +#define TRAIT_NO_BUCKLE "no_buckle" // common trait sources #define TRAIT_GENERIC "generic" @@ -284,3 +288,5 @@ #define NUKEOP_TRAIT "nuke-op" #define MEGAFAUNA_TRAIT "megafauna" #define DEATHSQUAD_TRAIT "deathsquad" +#define HELPLESSNESS_TRAIT "helplessness" + diff --git a/code/modules/client/preferences.dm b/code/modules/client/preferences.dm index b7c55eec..2d225f37 100644 --- a/code/modules/client/preferences.dm +++ b/code/modules/client/preferences.dm @@ -1072,6 +1072,19 @@ GLOBAL_LIST_EMPTY(preferences_datums) dat += "Stuckage (weight results in getting stuck in doors):[stuckage == TRUE ? "Enabled" : "Disabled"]
" dat += "Extreme Weight Gain (Sprite Size scales with weight):[weight_gain_extreme == TRUE ? "Enabled" : "Disabled"]
" + dat += "

GS13 Helplessness Preferences

" + dat += "Please be careful when using these mechanics as not to use them in a way that negatively impacts those around you. If you are seriously needed for something, especially something station critical, do not use these as an excuse to ignore your duty.

" + dat += "No Movement:[helplessness_no_movement == FALSE ? "Disabled" : helplessness_no_movement]
" + dat += "Clumsy:[helplessness_clumsy == FALSE ? "Disabled" : helplessness_clumsy]
" + dat += "Nearsighted:[helplessness_nearsighted == FALSE ? "Disabled" : helplessness_nearsighted]
" + dat += "Hidden Face:[helplessness_hidden_face == FALSE ? "Disabled" : helplessness_hidden_face]
" + 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, 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]
" + //Add the Hyper stuff below here dat += "

Hyper Preferences

" dat += "NonCon - Bottom:[noncon == TRUE ? "Enabled" : "Disabled"]
" @@ -2654,30 +2667,28 @@ GLOBAL_LIST_EMPTY(preferences_datums) if("blueberry_inflation") blueberry_inflation = !blueberry_inflation if("max_fatness") - var/pickedweight = input(user, - "Choose your max fatness level, your weight will not go beyond this. None will let you gain without a limit", - "Character Preference", "None") as null|anything in list( - "None", "Fat", "Fatter", "Very Fat", "Obese", "Morbidly Obese", "Extremely Obese", "Barely Mobile", "Immobile") - if(pickedweight) - switch(pickedweight) - if("None") - max_weight = FALSE - if("Fat") - max_weight = FATNESS_LEVEL_FATTER - if("Fatter") - max_weight = FATNESS_LEVEL_VERYFAT - if("Very Fat") - max_weight = FATNESS_LEVEL_OBESE - if("Obese") - max_weight = FATNESS_LEVEL_MORBIDLY_OBESE - if("Morbidly Obese") - max_weight = FATNESS_LEVEL_EXTREMELY_OBESE - if("Extremely Obese") - max_weight = FATNESS_LEVEL_BARELYMOBILE - if("Barely Mobile") - max_weight = FATNESS_LEVEL_IMMOBILE - if("Immobile") - max_weight = FATNESS_LEVEL_BLOB + max_weight = chose_weight("Choose your max fatness level, your weight will not go beyond this. None will let you gain without a limit", user) + + if("helplessness_no_movement") + helplessness_no_movement = chose_weight("Choose the level of fatness that you would like to be made completely able to move at. None will disable this alltogether", user) + if("helplessness_clumsy") + helplessness_clumsy = chose_weight("Choose the level of fatness that you would like to be made clumsy at. None will disable this alltogether", user) + if("helplessness_nearsighted") + helplessness_nearsighted = chose_weight("Choose the level of fatness that you would like to be made nearsighted at. None will disable this alltogether", user) + if("helplessness_hidden_face") + helplessness_hidden_face = chose_weight("Choose the level of fatness that you would like to have you face hidden at. None will disable this alltogether", user) + if("helplessness_mute") + helplessness_mute = chose_weight("Choose the level of fatness that you would like to be made unable to speak at. None will disable this alltogether", user) + if("helplessness_immobile_arms") + helplessness_immobile_arms = chose_weight("Choose the level of fatness that you would like to be made unable to use your arms at. None will disable this alltogether", user) + if("helplessness_clothing_jumpsuit") + helplessness_clothing_jumpsuit = chose_weight("Choose the level of fatness that you would like to be made unable to wear jumpsuits at. None will disable this alltogether", user) + if("helplessness_clothing_misc") + helplessness_clothing_misc = chose_weight("Choose the level of fatness that you would like to be made unable to wear other non-jumpsuit clothing at. None will disable this alltogether", user) + if("helplessness_clothing_back") + helplessness_clothing_back = chose_weight("Choose the level of fatness that you would like to be made unable to wear anything on your back at. None will disable this alltogether", user) + if("helplessness_no_buckle") + helplessness_no_buckle = chose_weight("Choose the level of fatness that you would like to be made unable to be buckled to anything at. None will disable this alltogether", user) if("inflatable_belly") features["inflatable_belly"] = !features["inflatable_belly"] diff --git a/code/modules/client/preferences_savefile.dm b/code/modules/client/preferences_savefile.dm index 872eeaef..6e12fbb1 100644 --- a/code/modules/client/preferences_savefile.dm +++ b/code/modules/client/preferences_savefile.dm @@ -159,6 +159,16 @@ SAVEFILE UPDATING/VERSIONING - 'Simplified', or rather, more coder-friendly ~Car S["wl_rate"] >> wl_rate S["noncon_weight_gain"] >> noncon_weight_gain S["max_weight"] >> max_weight + S["helplessness_no_movement"] >> helplessness_no_movement + S["helplessness_clumsy"] >> helplessness_clumsy + S["helplessness_nearsighted"] >> helplessness_nearsighted + S["helplessness_hidden_face"] >> helplessness_hidden_face + S["helplessness_mute"] >> helplessness_mute + S["helplessness_immobile_arms"] >> helplessness_immobile_arms + S["helplessness_clothing_jumpsuit"] >> helplessness_clothing_jumpsuit + S["helplessness_clothing_misc"] >> helplessness_clothing_misc + S["helplessness_clothing_back"] >> helplessness_clothing_back + S["helplessness_no_buckle"] >> helplessness_no_buckle S["stuckage"] >> stuckage S["blueberry_inflation"] >> blueberry_inflation @@ -302,6 +312,16 @@ SAVEFILE UPDATING/VERSIONING - 'Simplified', or rather, more coder-friendly ~Car WRITE_FILE(S["wl_rate"], wl_rate) WRITE_FILE(S["noncon_weight_gain"], noncon_weight_gain) WRITE_FILE(S["max_weight"], max_weight) + WRITE_FILE(S["helplessness_no_movement"], helplessness_no_movement) + WRITE_FILE(S["helplessness_clumsy"], helplessness_clumsy) + WRITE_FILE(S["helplessness_nearsighted"], helplessness_nearsighted) + WRITE_FILE(S["helplessness_hidden_face"], helplessness_hidden_face) + WRITE_FILE(S["helplessness_mute"], helplessness_mute) + WRITE_FILE(S["helplessness_immobile_arms"], helplessness_immobile_arms) + WRITE_FILE(S["helplessness_clothing_jumpsuit"], helplessness_clothing_jumpsuit) + WRITE_FILE(S["helplessness_clothing_misc"], helplessness_clothing_misc) + WRITE_FILE(S["helplessness_clothing_back"], helplessness_clothing_back) + WRITE_FILE(S["helplessness_no_buckle"], helplessness_no_buckle) WRITE_FILE(S["stuckage"], stuckage) WRITE_FILE(S["blueberry_inflation"], blueberry_inflation) return 1 diff --git a/code/modules/mob/living/carbon/human/species.dm b/code/modules/mob/living/carbon/human/species.dm index 08782217..c1db1314 100644 --- a/code/modules/mob/living/carbon/human/species.dm +++ b/code/modules/mob/living/carbon/human/species.dm @@ -1354,7 +1354,148 @@ GLOBAL_LIST_EMPTY(roundstart_races) ADD_TRAIT(H, trait_gain, OBESITY) update_body_size(H, 1) +/datum/species/proc/handle_helplessness(mob/living/carbon/human/fatty) + var/datum/preferences/preferences = fatty?.client?.prefs + if(!istype(preferences)) + return FALSE + + if(preferences.helplessness_no_movement) + if(!HAS_TRAIT_FROM(fatty, TRAIT_NO_MOVE, HELPLESSNESS_TRAIT)) + if(fatty.fatness >= preferences.helplessness_no_movement) + to_chat(fatty, "You have become too fat to move anymore.") + ADD_TRAIT(fatty, TRAIT_NO_MOVE, HELPLESSNESS_TRAIT) + + else if(fatty.fatness < preferences.helplessness_no_movement) + to_chat(fatty, "You have become thin enough to regain some of your mobility.") + REMOVE_TRAIT(fatty, TRAIT_NO_MOVE, HELPLESSNESS_TRAIT) + + + if(preferences.helplessness_clumsy) + if(!HAS_TRAIT_FROM(fatty, TRAIT_CLUMSY, HELPLESSNESS_TRAIT)) + if(fatty.fatness >= preferences.helplessness_clumsy) + to_chat(fatty, "Your newfound weight has made it hard to manipulate objects.") + ADD_TRAIT(fatty, TRAIT_CLUMSY, HELPLESSNESS_TRAIT) + + else if(fatty.fatness < preferences.helplessness_clumsy) + to_chat(fatty, "You feel like you have lost enough weight to recover your dexterity.") + REMOVE_TRAIT(fatty, TRAIT_CLUMSY, HELPLESSNESS_TRAIT) + + + if(preferences.helplessness_nearsighted) + if(!HAS_TRAIT_FROM(fatty, TRAIT_NEARSIGHT, HELPLESSNESS_TRAIT)) + if(fatty.fatness >= preferences.helplessness_nearsighted) + to_chat(fatty, "Your fat makes it difficult to see the world around you. ") + fatty.become_nearsighted(HELPLESSNESS_TRAIT) + + else if(fatty.fatness < preferences.helplessness_nearsighted) + to_chat(fatty, "You are thin enough to see your enviornment again. ") + fatty.cure_nearsighted(HELPLESSNESS_TRAIT) + + + if(preferences.helplessness_hidden_face) + if(!HAS_TRAIT_FROM(fatty, TRAIT_DISFIGURED, HELPLESSNESS_TRAIT)) + if(fatty.fatness >= preferences.helplessness_hidden_face) + to_chat(fatty, "You have gotten fat enough that your face is now unrecognizable. ") + ADD_TRAIT(fatty, TRAIT_DISFIGURED, HELPLESSNESS_TRAIT) + + else if(fatty.fatness < preferences.helplessness_hidden_face) + to_chat(fatty, "You have lost enough weight to allow people to now recognize your face.") + REMOVE_TRAIT(fatty, TRAIT_DISFIGURED, HELPLESSNESS_TRAIT) + + + if(preferences.helplessness_mute) + if(!HAS_TRAIT_FROM(fatty, TRAIT_MUTE, HELPLESSNESS_TRAIT)) + if(fatty.fatness >= preferences.helplessness_mute) + to_chat(fatty, "Your fat makes it impossible for you to speak.") + ADD_TRAIT(fatty, TRAIT_MUTE, HELPLESSNESS_TRAIT) + + else if(fatty.fatness < preferences.helplessness_mute) + to_chat(fatty, "You are thin enough now to be able to speak again. ") + REMOVE_TRAIT(fatty, TRAIT_MUTE, HELPLESSNESS_TRAIT) + + + if(preferences.helplessness_immobile_arms) + if(!HAS_TRAIT_FROM(fatty, TRAIT_PARALYSIS_L_ARM, HELPLESSNESS_TRAIT)) + if(fatty.fatness >= preferences.helplessness_immobile_arms) + to_chat(fatty, "Your arms are now engulfed in fat, making it impossible to move your arms. ") + ADD_TRAIT(fatty, TRAIT_PARALYSIS_L_ARM, HELPLESSNESS_TRAIT) + ADD_TRAIT(fatty, TRAIT_PARALYSIS_R_ARM, HELPLESSNESS_TRAIT) + fatty.update_disabled_bodyparts() + + else if(fatty.fatness < preferences.helplessness_immobile_arms) + to_chat(fatty, "You are able to move your arms again. ") + REMOVE_TRAIT(fatty, TRAIT_PARALYSIS_L_ARM, HELPLESSNESS_TRAIT) + REMOVE_TRAIT(fatty, TRAIT_PARALYSIS_R_ARM, HELPLESSNESS_TRAIT) + fatty.update_disabled_bodyparts() + + + if(preferences.helplessness_clothing_jumpsuit) + if(!HAS_TRAIT_FROM(fatty, TRAIT_NO_JUMPSUIT, HELPLESSNESS_TRAIT)) + 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) && !istype(jumpsuit, /obj/item/clothing/under/color/grey/modular)) + to_chat(fatty, "[jumpsuit] can no longer contain your weight!") + fatty.dropItemToGround(jumpsuit) + + else if(fatty.fatness < preferences.helplessness_clothing_jumpsuit) + to_chat(fatty, "You feel thin enough to put on jumpsuits now. ") + REMOVE_TRAIT(fatty, TRAIT_NO_JUMPSUIT, HELPLESSNESS_TRAIT) + + + if(preferences.helplessness_clothing_misc) + if(!HAS_TRAIT_FROM(fatty, TRAIT_NO_MISC, HELPLESSNESS_TRAIT)) + 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) + to_chat(fatty, "You feel thin enough to put on suits, shoes, and gloves now. ") + REMOVE_TRAIT(fatty, TRAIT_NO_MISC, HELPLESSNESS_TRAIT) + + + if(preferences.helplessness_clothing_back) + 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) + to_chat(fatty, "You feel thin enough to hold items on your back now. ") + REMOVE_TRAIT(fatty, TRAIT_NO_BACKPACK, HELPLESSNESS_TRAIT) + + + if(preferences.helplessness_no_buckle) + if(!HAS_TRAIT_FROM(fatty, TRAIT_NO_BUCKLE, HELPLESSNESS_TRAIT)) + if(fatty.fatness >= preferences.helplessness_no_buckle) + to_chat(fatty, "You feel like you've gotten too big to fit on anything.") + ADD_TRAIT(fatty, TRAIT_NO_BUCKLE, HELPLESSNESS_TRAIT) + + else if(fatty.fatness < preferences.helplessness_no_buckle) + to_chat(fatty, "You feel thin enough to sit on things again. ") + REMOVE_TRAIT(fatty, TRAIT_NO_BUCKLE, HELPLESSNESS_TRAIT) + + /datum/species/proc/handle_fatness(mob/living/carbon/human/H) + handle_helplessness(H) if(HAS_TRAIT(H, TRAIT_BLOB)) handle_fatness_trait( H, 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"