From 6393fc4a359eb37dfed2eee8c2ac4b9dc81a34a8 Mon Sep 17 00:00:00 2001 From: Alexis Date: Mon, 17 Mar 2025 10:56:05 -0400 Subject: [PATCH] (Non-Modular) Growth Serum Size Caps (#3126) ## About The Pull Request Caps the maximum size you can get from growth serum to be at the same size as you would be with the oversized quirk. Additionally makes it so oversized people cannot be affected by growth serum. Growth serum works as it did previously when in dorms. ## Why It's Good For The Game Prevents something like this from theoretically occurring ![image](https://github.com/user-attachments/assets/71b7dfe4-548e-432b-bb70-8622b41182a6) ## Proof Of Testing It compiled, ran, and worked on a local test. https://github.com/user-attachments/assets/4d4e38dd-4db4-4a8e-bf18-2bcc12a61bd5 ## Changelog :cl: balance: oversized characters can no longer use growth serum outside of dorms balance: growth serum is now capped at the same size as you would be if you took the oversized quirk unless in dorms /:cl: --- .../__DEFINES/~skyrat_defines/lewd_defines.dm | 8 ++++ .../chemistry/reagents/other_reagents.dm | 38 +++++++++++++------ .../lewd_items/code/lewd_items/size_items.dm | 9 ----- 3 files changed, 34 insertions(+), 21 deletions(-) diff --git a/code/__DEFINES/~skyrat_defines/lewd_defines.dm b/code/__DEFINES/~skyrat_defines/lewd_defines.dm index 7674131b090..0a889a8889b 100644 --- a/code/__DEFINES/~skyrat_defines/lewd_defines.dm +++ b/code/__DEFINES/~skyrat_defines/lewd_defines.dm @@ -30,3 +30,11 @@ #define BREAST_SIZE_O "O" #define BREAST_SIZE_P "P" #define BREAST_SIZE_BEYOND_MEASUREMENT "beyond measurement" + +//ERP Size Areas +#define SIZE_WHITELISTED_AREAS list(\ + /area/centcom/interlink/dorm_rooms,\ + /area/centcom/holding/cafe/dorms,\ + /area/misc/hilbertshotel,\ + /area/station/commons/dorms,\ + ) diff --git a/code/modules/reagents/chemistry/reagents/other_reagents.dm b/code/modules/reagents/chemistry/reagents/other_reagents.dm index a065c87a766..9413251617c 100644 --- a/code/modules/reagents/chemistry/reagents/other_reagents.dm +++ b/code/modules/reagents/chemistry/reagents/other_reagents.dm @@ -2566,18 +2566,32 @@ /datum/reagent/growthserum/on_mob_life(mob/living/carbon/affected_mob, seconds_per_tick, times_fired) . = ..() var/newsize = current_size - switch(volume) - if(0 to 19) - newsize = 1.25*RESIZE_DEFAULT_SIZE - if(20 to 49) - newsize = 1.5*RESIZE_DEFAULT_SIZE - if(50 to 99) - newsize = 2*RESIZE_DEFAULT_SIZE - if(100 to 199) - newsize = 2.5*RESIZE_DEFAULT_SIZE - if(200 to INFINITY) - newsize = 3.5*RESIZE_DEFAULT_SIZE - + //BUBBER EDIT ADDITION START - CAPPING GROWTH SERUM + var/valid_area = is_type_in_list(get_area(affected_mob), SIZE_WHITELISTED_AREAS) + if(valid_area) + switch(volume) + if(0 to 19) + newsize = 1.25*RESIZE_DEFAULT_SIZE + if(20 to 49) + newsize = 1.5*RESIZE_DEFAULT_SIZE + if(50 to 99) + newsize = 2*RESIZE_DEFAULT_SIZE + if(100 to 199) + newsize = 2.5*RESIZE_DEFAULT_SIZE + if(200 to INFINITY) + newsize = 3.5*RESIZE_DEFAULT_SIZE + else + if(affected_mob.has_quirk(/datum/quirk/oversized)) + newsize = RESIZE_DEFAULT_SIZE + else + switch(volume) + if(0 to 19) + newsize = 1.25*RESIZE_DEFAULT_SIZE + if(20 to 49) + newsize = 1.5*RESIZE_DEFAULT_SIZE + if(50 to INFINITY) + newsize = 2*RESIZE_DEFAULT_SIZE + //BUBBER EDIT ADDITION END - CAPPING GROWTH SERUM affected_mob.update_transform(newsize/current_size) current_size = newsize diff --git a/modular_skyrat/modules/modular_items/lewd_items/code/lewd_items/size_items.dm b/modular_skyrat/modules/modular_items/lewd_items/code/lewd_items/size_items.dm index d50cf6342ff..df8587c405b 100644 --- a/modular_skyrat/modules/modular_items/lewd_items/code/lewd_items/size_items.dm +++ b/modular_skyrat/modules/modular_items/lewd_items/code/lewd_items/size_items.dm @@ -1,10 +1,3 @@ -/// What areas are we allowed to use size items in? -#define SIZE_WHITELISTED_AREAS list(\ - /area/centcom/interlink/dorm_rooms,\ - /area/centcom/holding/cafe/dorms,\ - /area/misc/hilbertshotel,\ -) - /obj/item/clothing/neck/size_collar name = "size collar" desc = "A shiny black collar embeded with technology that allows the user to change their own size." @@ -133,5 +126,3 @@ UnregisterSignal(parent, COMSIG_ENTER_AREA) return ..() - -#undef SIZE_WHITELISTED_AREAS