Adds a cryostorage version of the ghost spawner. (#16466)

* Adds An infinitely reusable version of the mob spawner.

* uses

* Fixes

* updates a comment.
This commit is contained in:
Shadowlight213
2016-04-09 22:42:54 -07:00
committed by Jordie
parent 3205aa21e1
commit a6db6f0d1a

View File

@@ -12,7 +12,10 @@
var/instant = FALSE //fires on New
var/flavour_text = "The mapper forgot to set this!"
var/faction = null
var/permanent = FALSE //If true, the spawner will not disappear upon running out of uses.
var/random = FALSE //Don't set a name or gender, just go random
var/objectives = null
var/uses = 1 //how many times can we spawn from it. set to -1 for infinite.
var/brute_damage = 0
var/oxy_damage = 0
density = 1
@@ -21,6 +24,9 @@
/obj/effect/mob_spawn/attack_ghost(mob/user)
if(ticker.current_state != GAME_STATE_PLAYING || !loc)
return
if(!uses)
user << "<span class='warning'>This spawner is out of charges!</span>"
return
var/ghost_role = alert("Become [mob_name]? (Warning, You can no longer be cloned!)",,"Yes","No")
if(ghost_role == "No" || !loc)
return
@@ -58,8 +64,9 @@
/obj/effect/mob_spawn/proc/create(ckey)
var/mob/living/M = new mob_type(loc) //living mobs only
M.real_name = mob_name ? mob_name : M.name
M.gender = mob_gender
if(!random)
M.real_name = mob_name ? mob_name : M.name
M.gender = mob_gender
if(faction)
M.faction = list(faction)
if(death)
@@ -77,7 +84,10 @@
for(var/objective in objectives)
MM.objectives += new/datum/objective(objective)
special(M)
qdel(src)
if(uses > 0)
uses--
if(!permanent && !uses)
qdel(src)
// Base version - place these on maps/templates.
/obj/effect/mob_spawn/human
@@ -450,3 +460,23 @@
var/crime = pick("distribution of contraband" , "unauthorized erotic action on duty", "embezzlement", "piloting under the influence", "dereliction of duty", "syndicate collaboration", "mutiny", "multiple homicides", "corporate espionage", "recieving bribes", "malpractice", "worship of prohbited life forms", "possession of profane texts", "murder", "arson", "insulting your manager", "grand theft", "conspiracy", "attempting to unionize", "vandalism", "gross incompetence")
new_spawn << "You were convincted of: [crime]."
//For ghost bar.
/obj/effect/mob_spawn/human/alive/space_bar_patron
name = "Bar cryogenics"
mob_name = "Bar patron"
random = TRUE
permanent = TRUE
uses = -1
uniform = /obj/item/clothing/under/rank/bartender
back = /obj/item/weapon/storage/backpack
shoes = /obj/item/clothing/shoes/sneakers/black
suit = /obj/item/clothing/suit/armor/vest
glasses = /obj/item/clothing/glasses/sunglasses/reagent
/obj/effect/mob_spawn/human/alive/space_bar_patron/attack_hand(mob/user)
var/despawn = alert("Return to cryosleep? (Warning, Your mob will be deleted!)",,"Yes","No")
if(despawn == "No" || !loc || !Adjacent(user))
return
user.visible_message("<span class='notice'>[user.name] climbs back into cryosleep...</span>")
qdel(user)