Skip to content

Commit

Permalink
adds freed mob ban
Browse files Browse the repository at this point in the history
  • Loading branch information
Zonespace27 committed Jul 24, 2024
1 parent 03c0038 commit bd16695
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
6 changes: 6 additions & 0 deletions code/modules/admin/banjob.dm
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,12 @@ WARNING!*/
else
jobs += "<td width='20%'><a href='?src=\ref[src];[HrefToken(forceGlobal = TRUE)];jobban3=Emergency Response Team;jobban4=\ref[M]'>Emergency Response Team</a></td>"

//Freed Mobs
if(jobban_isbanned(M, "Freed Mob", P) || isbanned_dept)
jobs += "<td width='20%'><a href='?src=\ref[src];[HrefToken(forceGlobal = TRUE)];jobban3=Freed Mob;jobban4=\ref[M]'><font color=red>Freed Mob</font></a></td>"
else
jobs += "<td width='20%'><a href='?src=\ref[src];[HrefToken(forceGlobal = TRUE)];jobban3=Freed Mob;jobban4=\ref[M]'>Freed Mob</a></td>"

//Survivor
if(jobban_isbanned(M, "Survivor", P) || isbanned_dept)
jobs += "<td width='20%'><a href='?src=\ref[src];[HrefToken(forceGlobal = TRUE)];jobban3=Survivor;jobban4=\ref[M]'><font color=red>Survivor</font></a></td>"
Expand Down
8 changes: 8 additions & 0 deletions code/modules/mob/dead/observer/observer.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand All @@ -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."))
Expand Down

0 comments on commit bd16695

Please sign in to comment.