explo borg card (#8941)

This commit is contained in:
Kashargul
2024-09-11 10:00:54 +02:00
committed by GitHub
parent 13cdbc6d82
commit 9375ee3618
3 changed files with 29 additions and 0 deletions

View File

@@ -0,0 +1,27 @@
/obj/item/weapon/card/id/exploration/borg
var/mob/living/silicon/robot/R
var/last_robot_loc
name = "Robot Exploration ID"
/obj/item/weapon/card/id/exploration/borg/Initialize()
. = ..()
R = loc.loc
registered_name = R.braintype
RegisterSignal(src, COMSIG_OBSERVER_MOVED, PROC_REF(check_loc))
/obj/item/weapon/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/weapon/card/id/exploration/borg/Destroy()
UnregisterSignal(src, COMSIG_OBSERVER_MOVED)
..()

View File

@@ -36,6 +36,7 @@
src.modules += new /obj/item/shield_projector/line/exploborg(src)
src.modules += new /obj/item/roller_holder(src)
src.modules += new /obj/item/device/self_repair_system(src)
src.modules += new /obj/item/weapon/card/id/exploration/borg(src)
src.emag += new /obj/item/weapon/melee/dogborg/jaws/big/explojaws(src)