Species lock for ghost spawners (#12061)

* 0

* E

* Update enclave_pirates.dm

* E

* e
This commit is contained in:
Gandalf
2022-03-13 17:34:58 -04:00
committed by GitHub
parent 5d98c43545
commit c1c39e98fd
5 changed files with 11 additions and 4 deletions
@@ -155,6 +155,7 @@
and eventually bring life to this desolate planet while waiting for contact from your creators. \
Estimated time of last contact: Deployment, 5000 millennia ago."
spawner_job_path = /datum/job/lifebringer
restricted_species = list(/datum/species/pod) //SKYRAT EDIT ADDITION
/obj/effect/mob_spawn/ghost_role/human/seed_vault/Initialize(mapload)
. = ..()
+8
View File
@@ -138,6 +138,8 @@
var/loadout_enabled = FALSE
/// Can we use our quirks for this role?
var/quirks_enabled = FALSE
/// Are we limited to a certain species type? LISTED TYPE
var/restricted_species
// SKYRAT EDIT END
/obj/effect/mob_spawn/ghost_role/Initialize(mapload)
@@ -156,6 +158,11 @@
/obj/effect/mob_spawn/ghost_role/attack_ghost(mob/user)
if(!SSticker.HasRoundStarted() || !loc)
return
// SKYRAT EDIT ADDITION
if(restricted_species && !(user.client?.prefs?.read_preference(/datum/preference/choiced/species) in restricted_species))
to_chat(user, span_warning("You cannot use this role because you are not the correct species!"))
return
// SKYRAT EDIT END
if(prompt_ghost)
var/ghost_role = tgui_alert(usr, "Become [prompt_name]? (Warning, You can no longer be revived!)",, list("Yes", "No"))
if(ghost_role != "Yes" || !loc || QDELETED(user))
@@ -257,6 +264,7 @@
icon = 'icons/obj/machines/sleeper.dmi'
icon_state = "sleeper"
mob_type = /mob/living/carbon/human
restricted_species = list(/datum/species/lizard/ashwalker) //SKYRAT EDIT ADDITION
/obj/effect/mob_spawn/corpse/human
icon_state = "corpsehuman"