From bd16695df19d9819bace2d25f756432f6d940f48 Mon Sep 17 00:00:00 2001 From: John Doe Date: Wed, 24 Jul 2024 12:08:23 -0700 Subject: [PATCH] adds freed mob ban --- code/modules/admin/banjob.dm | 6 ++++++ code/modules/mob/dead/observer/observer.dm | 8 ++++++++ 2 files changed, 14 insertions(+) diff --git a/code/modules/admin/banjob.dm b/code/modules/admin/banjob.dm index 18f06e79a6..230590fdf9 100644 --- a/code/modules/admin/banjob.dm +++ b/code/modules/admin/banjob.dm @@ -146,6 +146,12 @@ WARNING!*/ else jobs += "Emergency Response Team" + //Freed Mobs + if(jobban_isbanned(M, "Freed Mob", P) || isbanned_dept) + jobs += "Freed Mob" + else + jobs += "Freed Mob" + //Survivor if(jobban_isbanned(M, "Survivor", P) || isbanned_dept) jobs += "Survivor" diff --git a/code/modules/mob/dead/observer/observer.dm b/code/modules/mob/dead/observer/observer.dm index 44a3592329..409c88388f 100644 --- a/code/modules/mob/dead/observer/observer.dm +++ b/code/modules/mob/dead/observer/observer.dm @@ -1034,6 +1034,10 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp to_chat(src, SPAN_WARNING("The game hasn't started yet!")) return + if(jobban_isbanned(src, "Freed Mob")) + to_chat(src, SPAN_WARNING("You are banned from being able to join as a freed mob.")) + return + var/list/mobs_by_role = list() // the list the mobs are assigned to first, for sorting purposes for(var/mob/freed_mob as anything in GLOB.freed_mob_list) var/role_name = freed_mob.get_role_name() @@ -1059,6 +1063,10 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp if(!istype(freed_mob) || !(freed_mob in GLOB.freed_mob_list)) return + if(jobban_isbanned(src, "Freed Mob")) + to_chat(src, SPAN_WARNING("You are banned from being able to join as a freed mob.")) + return + if(QDELETED(freed_mob) || freed_mob.client) GLOB.freed_mob_list -= freed_mob to_chat(src, SPAN_WARNING("Something went wrong."))