mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-07-20 20:45:28 +01:00
[MIRROR] New circuit multitool sprite (#6161)
* sprites (#59487) imageadd: The circuit multitool has a new sprite. * New circuit multitool sprite Co-authored-by: Krysonism <49783092+Krysonism@users.noreply.github.com>
This commit is contained in:
@@ -2,6 +2,7 @@
|
||||
name = "circuit multitool"
|
||||
desc = "A circuit multitool. Used to mark entities which can then be uploaded to components by pressing the upload button on a port. \
|
||||
Acts as a normal multitool otherwise. Use in hand to clear marked entity so that you can mark another entity."
|
||||
icon_state = "multitool_circuit"
|
||||
|
||||
/// The marked atom of this multitool
|
||||
var/atom/marked_atom
|
||||
@@ -34,14 +35,24 @@
|
||||
say("Marked [target].")
|
||||
marked_atom = target
|
||||
RegisterSignal(marked_atom, COMSIG_PARENT_QDELETING, .proc/cleanup_marked_atom)
|
||||
update_icon()
|
||||
flick("multitool_circuit_flick", src)
|
||||
playsound(src.loc, 'sound/misc/compiler-stage2.ogg', 30, TRUE)
|
||||
return TRUE
|
||||
|
||||
/obj/item/multitool/circuit/update_overlays()
|
||||
. = ..()
|
||||
cut_overlays()
|
||||
if(marked_atom)
|
||||
. += "marked_overlay"
|
||||
|
||||
/// Clears the current marked atom
|
||||
/obj/item/multitool/circuit/proc/clear_marked_atom()
|
||||
if(!marked_atom)
|
||||
return
|
||||
UnregisterSignal(marked_atom, COMSIG_PARENT_QDELETING)
|
||||
marked_atom = null
|
||||
update_icon()
|
||||
|
||||
/obj/item/multitool/circuit/proc/cleanup_marked_atom(datum/source)
|
||||
SIGNAL_HANDLER
|
||||
|
||||
Reference in New Issue
Block a user