mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-10 18:22:39 +00:00
[MIRROR] Robot Sprite Unit test, Robot Upports, Robot Sprite Fixes [MDB IGNORE] [IDB IGNORE] (#10241)
Co-authored-by: Cameron Lennox <killer65311@gmail.com> Co-authored-by: Kashargul <144968721+Kashargul@users.noreply.github.com>
This commit is contained in:
committed by
GitHub
parent
867d377c65
commit
ede45bae10
@@ -1,32 +0,0 @@
|
||||
|
||||
/obj/item/card/id/exploration/borg
|
||||
var/mob/living/silicon/robot/R
|
||||
var/last_robot_loc
|
||||
name = "Robot Exploration ID"
|
||||
rank = JOB_EXPLORER
|
||||
|
||||
/obj/item/card/id/exploration/borg/Initialize()
|
||||
. = ..()
|
||||
if(isrobot(loc?.loc))
|
||||
R = loc.loc
|
||||
registered_name = R.braintype
|
||||
RegisterSignal(src, COMSIG_OBSERVER_MOVED, PROC_REF(check_loc))
|
||||
|
||||
/obj/item/card/id/exploration/borg/proc/check_loc(atom/movable/mover, atom/old_loc, atom/new_loc)
|
||||
if(old_loc == R || old_loc == R.module)
|
||||
last_robot_loc = old_loc
|
||||
if(!istype(loc, /obj/machinery) && loc != R && loc != R.module)
|
||||
if(last_robot_loc)
|
||||
forceMove(last_robot_loc)
|
||||
last_robot_loc = null
|
||||
else
|
||||
forceMove(R)
|
||||
if(loc == R)
|
||||
hud_layerise()
|
||||
|
||||
/obj/item/card/id/exploration/borg/Destroy()
|
||||
if(R)
|
||||
UnregisterSignal(src, COMSIG_OBSERVER_MOVED)
|
||||
R = null
|
||||
last_robot_loc = null
|
||||
..()
|
||||
Reference in New Issue
Block a user