Merge pull request #2517 from d3athrow/hud_rework_BE

port of the cyborg HUD from /tg/ with small fixes to the mat synth.
This commit is contained in:
ririchiyo
2015-01-15 00:42:39 -05:00
8 changed files with 198 additions and 120 deletions

View File

@@ -19,6 +19,9 @@
var/obj/screen/inv1 = null
var/obj/screen/inv2 = null
var/obj/screen/inv3 = null
var/shown_robot_modules = 0
var/obj/screen/robot_modules_background
//3 Modules can be activated at any one time.
var/obj/item/weapon/robot_module/module = null
@@ -81,6 +84,10 @@
wires = new /datum/wires/robot/mommi(src)
else
wires = new(src)
robot_modules_background = new()
robot_modules_background.icon_state = "block"
robot_modules_background.layer = 19
ident = rand(1, 999)
updatename("Default")
@@ -1237,31 +1244,7 @@
if(isMoMMI(src))
return
var/obj/item/O = locate(href_list["act"])
if(!(locate(O) in src.module.modules) && O != src.module.emag)
return
if(activated(O))
src << "Already activated"
return
if(!module_state_1)
module_state_1 = O
O.layer = 20
contents += O
if(istype(module_state_1,/obj/item/borg/sight))
sight_mode |= module_state_1:sight_mode
else if(!module_state_2)
module_state_2 = O
O.layer = 20
contents += O
if(istype(module_state_2,/obj/item/borg/sight))
sight_mode |= module_state_2:sight_mode
else if(!module_state_3)
module_state_3 = O
O.layer = 20
contents += O
if(istype(module_state_3,/obj/item/borg/sight))
sight_mode |= module_state_3:sight_mode
else
src << "You need to disable a module first!"
activate_module(O)
installed_modules()
if (href_list["deact"])