From 29fb631394db3da48097f95501014de6aa7f5a54 Mon Sep 17 00:00:00 2001 From: Metis <100518708+sheepishgoat@users.noreply.github.com> Date: Sun, 26 May 2024 05:01:02 -0400 Subject: [PATCH] evil :3 --- GainStation13/code/obj/structure/airlock.dm | 37 +++++++++++++++++++++ code/game/machinery/doors/door.dm | 8 +++++ 2 files changed, 45 insertions(+) create mode 100644 GainStation13/code/obj/structure/airlock.dm diff --git a/GainStation13/code/obj/structure/airlock.dm b/GainStation13/code/obj/structure/airlock.dm new file mode 100644 index 00000000..7e5417c5 --- /dev/null +++ b/GainStation13/code/obj/structure/airlock.dm @@ -0,0 +1,37 @@ +/obj/machinery/door/airlock + var/fatness_to_check = 0 + + var/check_fatness = FALSE + var/check_below = FALSE + +/obj/machinery/door/airlock/proc/change_fatness_to_check(mob/user) + var/fatness_type = input(usr, + "What level of fatness do you wish to alert above/under at?", + src, "None") as null|anything in list( + "None", "Fat", "Fatter", "Very Fat", "Obese", "Morbidly Obese", "Extremely Obese", "Barely Mobile", "Immobile", "Blob") + if(!fatness_type) + return FALSE + + var/fatness_amount = 0 + switch(fatness_type) + if("Fat") + fatness_amount = FATNESS_LEVEL_FAT + if("Fatter") + fatness_amount = FATNESS_LEVEL_FATTER + if("Very Fat") + fatness_amount = FATNESS_LEVEL_VERYFAT + if("Obese") + fatness_amount = FATNESS_LEVEL_OBESE + if("Morbidly Obese") + fatness_amount = FATNESS_LEVEL_MORBIDLY_OBESE + if("Extremely Obese") + fatness_amount = FATNESS_LEVEL_EXTREMELY_OBESE + if("Barely Mobile") + fatness_amount = FATNESS_LEVEL_BARELYMOBILE + if("Immobile") + fatness_amount = FATNESS_LEVEL_IMMOBILE + if("Blob") + fatness_amount = FATNESS_LEVEL_BLOB + + fatness_to_check = fatness_amount + return TRUE diff --git a/code/game/machinery/doors/door.dm b/code/game/machinery/doors/door.dm index 7bf544c4..9485a1ce 100644 --- a/code/game/machinery/doors/door.dm +++ b/code/game/machinery/doors/door.dm @@ -175,6 +175,14 @@ return TRUE if(unrestricted_side(M)) return TRUE + //GS13 EDIT + var/mob/living/carbon/human/bump_mob = M + if(check_fatness && istype(bump_mob)) + if(check_below && (bump_mob.fatness >= fatness_to_check)) + return FALSE + if(!check_below && (bump_mob.fatness < fatness_to_check)) + return FALSE + return ..() /obj/machinery/door/proc/unrestricted_side(mob/M) //Allows for specific side of airlocks to be unrestrected (IE, can exit maint freely, but need access to enter)