This commit is contained in:
Erki
2017-10-17 20:39:50 -05:00
committed by Lohikar
parent dcf6bba66d
commit 6c47fb889a
24 changed files with 174 additions and 183 deletions
+1 -1
View File
@@ -50,7 +50,7 @@ var/list/ghost_traps
/datum/ghosttrap/proc/request_player(var/mob/target, var/request_string, var/request_timeout)
if(request_timeout)
request_timeouts[target] = world.time + request_timeout
target.OnDestroy(CALLBACK(src, .proc/target_destroyed))
destroyed_event.register(target, src, /datum/ghosttrap/proc/target_destroyed)
else
request_timeouts -= target
@@ -170,14 +170,14 @@
// These procs do not relocate the grenade, that's the callers responsibility
/obj/item/integrated_circuit/manipulation/grenade/proc/attach_grenade(var/obj/item/weapon/grenade/G)
attached_grenade = G
attached_grenade.OnDestroy(CALLBACK(src, .proc/detach_grenade))
destroyed_event.register(attached_grenade, src, .proc/detach_grenade)
size += G.w_class
desc += " \An [attached_grenade] is attached to it!"
/obj/item/integrated_circuit/manipulation/grenade/proc/detach_grenade()
if(!attached_grenade)
return
attached_grenade.UnregisterOnDestroy(src)
destroyed_event.unregister(attached_grenade, src)
attached_grenade = null
size = initial(size)
desc = initial(desc)
+4 -4
View File
@@ -357,8 +357,8 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp
stop_following()
following = target
following.OnMove(CALLBACK(src, /atom/movable/.proc/move_to_destination))
following.OnDestroy(CALLBACK(src, .proc/stop_following))
moved_event.register(following, src, /atom/movable/proc/move_to_destination)
destroyed_event.register(following, src, /mob/dead/observer/proc/stop_following)
src << "<span class='notice'>Now following \the [following]</span>"
move_to_destination(following, following.loc, following.loc)
@@ -366,8 +366,8 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp
/mob/dead/observer/proc/stop_following()
if(following)
src << "<span class='notice'>No longer following \the [following]</span>"
following.UnregisterOnMove(src)
following.UnregisterOnDestroy(src)
moved_event.unregister(following, src)
destroyed_event.unregister(following, src)
following = null
/mob/dead/observer/move_to_destination(var/atom/movable/am, var/old_loc, var/new_loc)
@@ -36,7 +36,7 @@
/mob/living/death(gibbed, deathmessage="seizes up and falls limp...")
. = ..()
if (.)
if(.)
// If true, the mob went from living to dead (assuming everyone has been overriding as they should...)
cultnet.updateVisibility(src)
@@ -23,7 +23,7 @@
/mob/living/death(gibbed,deathmessage="seizes up and falls limp...")
. = ..()
if (.)
if(.)
stop_aiming(no_message=1)
/mob/living/update_canmove()
@@ -173,9 +173,9 @@ obj/aiming_overlay/proc/update_aiming_deferred()
locked = 0
update_icon()
lock_time = world.time + 35
owner.OnMove(CALLBACK(src, .proc/update_aiming))
aiming_at.OnMove(CALLBACK(src, .proc/target_moved))
aiming_at.OnDestroy(CALLBACK(src, .proc/cancel_aiming))
moved_event.register(owner, src, /obj/aiming_overlay/proc/update_aiming)
moved_event.register(aiming_at, src, /obj/aiming_overlay/proc/target_moved)
destroyed_event.register(aiming_at, src, /obj/aiming_overlay/proc/cancel_aiming)
/obj/aiming_overlay/proc/aim_cooldown(var/seconds)
aimcooldown = world.time + seconds SECONDS
@@ -213,10 +213,10 @@ obj/aiming_overlay/proc/update_aiming_deferred()
if(!no_message)
owner.visible_message("<span class='notice'>\The [owner] lowers \the [aiming_with].</span>")
owner.UnregisterOnMove(src)
moved_event.unregister(owner, src)
if(aiming_at)
aiming_at.UnregisterOnMove(src)
aiming_at.UnregisterOnDestroy(src)
moved_event.unregister(aiming_at, src)
destroyed_event.unregister(aiming_at, src)
aiming_at.aimed -= src
aiming_at = null