mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-11 10:43:20 +00:00
explo borg card (#8941)
This commit is contained in:
27
modular_chomp/code/game/objects/items/weapons/id_cards.dm
Normal file
27
modular_chomp/code/game/objects/items/weapons/id_cards.dm
Normal 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)
|
||||
..()
|
||||
@@ -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)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user