Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adds freed mob jobban #345

Merged
merged 1 commit into from
Jul 24, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading