mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-22 19:47:22 +01:00
Merge pull request #6711 from Crazylemon64/playercreation_assembly_line
Streamlines the ghost-to-player creation process
This commit is contained in:
@@ -72,4 +72,46 @@
|
||||
user.forceMove(get_turf(src))
|
||||
log_admin("[key_name(user)] was incarnated by a respawner machine.")
|
||||
message_admins("[key_name_admin(user)] was incarnated by a respawner machine.")
|
||||
user.incarnate_ghost()
|
||||
user.incarnate_ghost()
|
||||
|
||||
/obj/structure/ghost_beacon
|
||||
name = "ethereal beacon"
|
||||
desc = "A structure that draws ethereal attention when active. Use an empty hand to activate."
|
||||
icon = 'icons/obj/lavaland/artefacts.dmi'
|
||||
icon_state = "anomaly_crystal"
|
||||
anchored = 1
|
||||
density = 1
|
||||
var/active = FALSE
|
||||
var/ghost_alert_delay = 30 SECONDS
|
||||
var/last_ghost_alert
|
||||
|
||||
|
||||
/obj/structure/ghost_beacon/initialize()
|
||||
. = ..()
|
||||
last_ghost_alert = world.time
|
||||
if(active)
|
||||
processing_objects.Add(src)
|
||||
|
||||
/obj/structure/ghost_beacon/Destroy()
|
||||
if(active)
|
||||
processing_objects.Remove(src)
|
||||
return ..()
|
||||
|
||||
/obj/structure/ghost_beacon/attack_ghost(mob/dead/observer/user)
|
||||
if(user.can_advanced_admin_interact())
|
||||
attack_hand(user)
|
||||
|
||||
/obj/structure/ghost_beacon/attack_hand(mob/user)
|
||||
if(!is_admin(user))
|
||||
return
|
||||
to_chat(user, "<span class='notice'>You [active ? "disable" : "enable"] \the [src].</span>")
|
||||
if(active)
|
||||
processing_objects.Remove(src)
|
||||
else
|
||||
processing_objects.Add(src)
|
||||
active = !active
|
||||
|
||||
/obj/structure/ghost_beacon/process()
|
||||
if(last_ghost_alert + ghost_alert_delay < world.time)
|
||||
notify_ghosts("[src] active in [get_area(src)].", 'sound/effects/ghost2.ogg', source = src)
|
||||
last_ghost_alert = world.time
|
||||
|
||||
Reference in New Issue
Block a user