tgui wires initial

This commit is contained in:
AnturK
2016-01-22 19:13:23 -06:00
committed by Bjorn Neergaard
parent 14f90d8f1e
commit cda2f26d56
14 changed files with 160 additions and 164 deletions
+9
View File
@@ -0,0 +1,9 @@
/var/global/datum/ui_state/wire_state/wire_state = new()
/datum/ui_state/wire_state/can_use_topic(src_object, mob/user)
var/datum/wires/W = src_object
if(!istype(W))
return UI_CLOSE
if(!user.Adjacent(W.holder))
return UI_CLOSE
return W.CanUse(user) ? UI_INTERACTIVE : UI_CLOSE