This commit is contained in:
Metis
2024-05-26 05:01:02 -04:00
parent 8b19a80454
commit 29fb631394
2 changed files with 45 additions and 0 deletions
@@ -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
+8
View File
@@ -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)