Adds the ability to ban people from ghost roles

This commit is contained in:
Chompstation Bot
2021-08-25 13:18:40 +00:00
parent 4b1c148522
commit aba07d1109
7 changed files with 2061 additions and 2 deletions

View File

@@ -52,6 +52,11 @@
/// Send async alerts and ask for responses. Expects you to have tested D for client and type already /// Send async alerts and ask for responses. Expects you to have tested D for client and type already
/datum/ghost_query/proc/ask_question(var/mob/observer/dead/D) /datum/ghost_query/proc/ask_question(var/mob/observer/dead/D)
//VOREStation Add Start Check the ban status before we ask
if(jobban_isbanned(D, "GhostRoles"))
return
//VOREStation Add End
var/client/C = D.client var/client/C = D.client
window_flash(C) window_flash(C)
@@ -67,7 +72,7 @@
return return
// Unhandled are "No" and "Nevermind" responses, which should just do nothing // Unhandled are "No" and "Nevermind" responses, which should just do nothing
// This response is always fine, doesn't warrant retesting // This response is always fine, doesn't warrant retesting
switch(response) switch(response)
if("Never for this round") if("Never for this round")

View File

@@ -43,7 +43,9 @@
/mob/living/simple_mob/attack_ghost(mob/observer/dead/user as mob) /mob/living/simple_mob/attack_ghost(mob/observer/dead/user as mob)
if(!ghostjoin) if(!ghostjoin)
return ..() return ..()
if(jobban_isbanned(user, "GhostRoles"))
to_chat(user, "<span class='warning'>You cannot inhabit this creature because you are banned from playing ghost roles.</span>")
return
if(!evaluate_ghost_join(user)) if(!evaluate_ghost_join(user))
return ..() return ..()

View File

@@ -64,6 +64,9 @@
var/finalized = "No" var/finalized = "No"
while(finalized == "No" && M.client) while(finalized == "No" && M.client)
if(jobban_isbanned(M, "GhostRoles"))
to_chat(M, "<span class='warning'>You cannot inhabit this creature because you are banned from playing ghost roles.</span>")
return
choice = tgui_input_list(M, "What type of predator do you want to play as?", "Maintpred Choice", possible_mobs) choice = tgui_input_list(M, "What type of predator do you want to play as?", "Maintpred Choice", possible_mobs)
if(!choice) if(!choice)
randomize = TRUE randomize = TRUE

View File

@@ -83,6 +83,11 @@
description_info = "A ghost can click on this to return to the round as whatever is contained inside this object." description_info = "A ghost can click on this to return to the round as whatever is contained inside this object."
/obj/structure/ghost_pod/ghost_activated/attack_ghost(var/mob/observer/dead/user) /obj/structure/ghost_pod/ghost_activated/attack_ghost(var/mob/observer/dead/user)
//VOREStation Add Start
if(jobban_isbanned(user, "GhostRoles"))
to_chat(user, "<span class='warning'>You cannot inhabit this creature because you are banned from playing ghost roles.</span>")
return
//VOREStation Add End
if(used) if(used)
to_chat(user, "<span class='warning'>Another spirit appears to have gotten to \the [src] before you. Sorry.</span>") to_chat(user, "<span class='warning'>Another spirit appears to have gotten to \the [src] before you. Sorry.</span>")
return return

View File

@@ -11,6 +11,10 @@
var/activated = FALSE var/activated = FALSE
/obj/structure/ghost_pod/manual/attack_ghost(var/mob/observer/dead/user) /obj/structure/ghost_pod/manual/attack_ghost(var/mob/observer/dead/user)
if(jobban_isbanned(user, "GhostRoles"))
to_chat(user, "<span class='warning'>You cannot inhabit this creature because you are banned from playing ghost roles.</span>")
return
if(!remains_active || busy) if(!remains_active || busy)
return return

View File

@@ -591,6 +591,12 @@
jobs += "<td width='20%'><a href='?src=\ref[src];jobban3=pAI;jobban4=\ref[M]'><font color=red>pAI</font></a></td>" jobs += "<td width='20%'><a href='?src=\ref[src];jobban3=pAI;jobban4=\ref[M]'><font color=red>pAI</font></a></td>"
else else
jobs += "<td width='20%'><a href='?src=\ref[src];jobban3=pAI;jobban4=\ref[M]'>pAI</a></td>" jobs += "<td width='20%'><a href='?src=\ref[src];jobban3=pAI;jobban4=\ref[M]'>pAI</a></td>"
//VOREStation Add Start
if(jobban_isbanned(M, "GhostRoles"))
jobs += "<td width='20%'><a href='?src=\ref[src];jobban3=GhostRoles;jobban4=\ref[M]'><font color=red>GhostRoles</font></a></td>"
else
jobs += "<td width='20%'><a href='?src=\ref[src];jobban3=GhostRoles;jobban4=\ref[M]'>GhostRoles</a></td>"
//VOREStation Add End
if(jobban_isbanned(M, "AntagHUD")) if(jobban_isbanned(M, "AntagHUD"))
jobs += "<td width='20%'><a href='?src=\ref[src];jobban3=AntagHUD;jobban4=\ref[M]'><font color=red>AntagHUD</font></a></td>" jobs += "<td width='20%'><a href='?src=\ref[src];jobban3=AntagHUD;jobban4=\ref[M]'><font color=red>AntagHUD</font></a></td>"
else else

File diff suppressed because it is too large Load Diff