mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-07-18 10:33:30 +01:00
permit ahud and no respawnability ghosts in ghost bar (#29632)
This commit is contained in:
@@ -52,6 +52,10 @@
|
||||
var/death_cooldown = 0
|
||||
/// If antagbanned people are prevented from using it, only false for the ghost bar spawner.
|
||||
var/restrict_antagban = TRUE
|
||||
/// If people without respawnability are prevented from using it.
|
||||
var/restrict_respawnability = TRUE
|
||||
/// If late-observers with ahud are prevented from using it.
|
||||
var/restrict_ahud = TRUE
|
||||
|
||||
/obj/effect/mob_spawn/attack_ghost(mob/user)
|
||||
if(!valid_to_spawn(user))
|
||||
@@ -107,12 +111,12 @@
|
||||
if((jobban_isbanned(user, ban_type) || (restrict_antagban && jobban_isbanned(user, ROLE_SYNDICATE))))
|
||||
to_chat(user, "<span class='warning'>You are jobanned!</span>")
|
||||
return FALSE
|
||||
if(!HAS_TRAIT(user, TRAIT_RESPAWNABLE))
|
||||
if(!HAS_TRAIT(user, TRAIT_RESPAWNABLE) && restrict_respawnability)
|
||||
to_chat(user, "<span class='warning'>You currently do not have respawnability!</span>")
|
||||
return FALSE
|
||||
if(isobserver(user))
|
||||
var/mob/dead/observer/O = user
|
||||
if(!O.check_ahud_rejoin_eligibility())
|
||||
if(!O.check_ahud_rejoin_eligibility() && restrict_ahud)
|
||||
to_chat(user, "<span class='warning'>Upon using the antagHUD you forfeited the ability to join the round.</span>")
|
||||
return FALSE
|
||||
if(time_check(user))
|
||||
|
||||
@@ -12,6 +12,8 @@ GLOBAL_LIST_EMPTY(occupants_by_key)
|
||||
assignedrole = "Ghost Bar Occupant"
|
||||
death_cooldown = 1 MINUTES
|
||||
restrict_antagban = FALSE
|
||||
restrict_respawnability = FALSE
|
||||
restrict_ahud = FALSE
|
||||
|
||||
/obj/effect/mob_spawn/human/alive/ghost_bar/create(ckey, flavour = TRUE, name, mob/user = usr) // So divorced from the normal proc it's just being overriden
|
||||
var/datum/character_save/save_to_load
|
||||
@@ -79,7 +81,10 @@ GLOBAL_LIST_EMPTY(occupants_by_key)
|
||||
H.mind.special_role = assignedrole
|
||||
H.mind.offstation_role = TRUE
|
||||
ADD_TRAIT(H, TRAIT_PACIFISM, GHOST_ROLE)
|
||||
ADD_TRAIT(H, TRAIT_RESPAWNABLE, GHOST_ROLE)
|
||||
if(isobserver(user))
|
||||
var/mob/dead/observer/ghost = user
|
||||
if(ghost.can_reenter_corpse)
|
||||
ADD_TRAIT(H, TRAIT_RESPAWNABLE, GHOST_ROLE)
|
||||
|
||||
H.key = ckey
|
||||
H.dna.species.after_equip_job(/datum/job/assistant, H)
|
||||
|
||||
Reference in New Issue
Block a user