mirror of
https://github.com/VOREStation/VOREStation.git
synced 2026-08-24 20:47:43 +01:00
TG Signal Port (#18741)
* click code start * snake_span * Update click.dm * Update click.dm * Update click.dm * WIP signal organization * Moooore signals * cuffs * decon * whoops * revert this * Proper name * movable moved * These * Theeese * Sort these * Update cyborg.dm
This commit is contained in:
@@ -95,7 +95,7 @@
|
||||
. += span_info("You can use a <b>crowbar</b> to remove it.")
|
||||
*/
|
||||
/mob/living/bot/updatehealth()
|
||||
if(SEND_SIGNAL(src, COMSIG_UPDATE_HEALTH) & COMSIG_UPDATE_HEALTH_GOD_MODE)
|
||||
if(SEND_SIGNAL(src, COMSIG_LIVING_HEALTH_UPDATE) & COMSIG_LIVING_HEALTH_UPDATE_GOD_MODE)
|
||||
health = getMaxHealth()
|
||||
set_stat(CONSCIOUS)
|
||||
else
|
||||
|
||||
@@ -214,19 +214,19 @@
|
||||
playsound(src, pick(preparing_arrest_sounds), 50)
|
||||
// Register to be told when the target moves
|
||||
target.AddComponent(/datum/component/recursive_move)
|
||||
RegisterSignal(target, COMSIG_OBSERVER_MOVED, /mob/living/bot/secbot/proc/target_moved)
|
||||
RegisterSignal(target, COMSIG_MOVABLE_MOVED, /mob/living/bot/secbot/proc/target_moved)
|
||||
|
||||
// Callback invoked if the registered target moves
|
||||
/mob/living/bot/secbot/proc/target_moved(atom/movable/moving_instance, atom/old_loc, atom/new_loc)
|
||||
SIGNAL_HANDLER
|
||||
if(get_dist(get_turf(src), get_turf(target)) >= 1)
|
||||
awaiting_surrender = INFINITY // Done waiting!
|
||||
UnregisterSignal(moving_instance, COMSIG_OBSERVER_MOVED)
|
||||
UnregisterSignal(moving_instance, COMSIG_MOVABLE_MOVED)
|
||||
|
||||
/mob/living/bot/secbot/resetTarget()
|
||||
..()
|
||||
if(target)
|
||||
UnregisterSignal(target, COMSIG_OBSERVER_MOVED)
|
||||
UnregisterSignal(target, COMSIG_MOVABLE_MOVED)
|
||||
awaiting_surrender = 0
|
||||
attacked = FALSE
|
||||
walk_to(src, 0)
|
||||
|
||||
Reference in New Issue
Block a user