mirror of
https://github.com/vgstation-coders/vgstation13.git
synced 2025-12-10 18:32:03 +00:00
almost finished with cyborg HUD from /tg/
This commit is contained in:
@@ -23,9 +23,9 @@
|
||||
return 0
|
||||
// Make sure we're not picking up something that's in our factory-supplied toolbox.
|
||||
//if(is_type_in_list(W,src.module.modules))
|
||||
if(is_in_modules(W))
|
||||
src << "\red Picking up something that's built-in to you seems a bit silly."
|
||||
return 0
|
||||
//if(is_in_modules(W))
|
||||
//src << "\red Picking up something that's built-in to you seems a bit silly."
|
||||
//return 0
|
||||
if(tool_state)
|
||||
//var/obj/item/found = locate(tool_state) in src.module.modules
|
||||
var/obj/item/TS = tool_state
|
||||
@@ -96,8 +96,9 @@
|
||||
if(tool_state)
|
||||
//var/obj/item/found = locate(tool_state) in src.module.modules
|
||||
if(is_in_modules(tool_state))
|
||||
src << "\red This item cannot be dropped."
|
||||
return 0
|
||||
if((tool_state in contents) && (tool_state in src.module.modules))
|
||||
src << "<span class='warning'>This item cannot be dropped.</span>"
|
||||
return 0
|
||||
if(client)
|
||||
client.screen -= tool_state
|
||||
contents -= tool_state
|
||||
@@ -127,6 +128,11 @@
|
||||
var/obj/item/TS
|
||||
if(isnull(module_active))
|
||||
return
|
||||
if((module_active in src.contents) && !(module_active in src.module.modules))
|
||||
TS = tool_state
|
||||
drop_item()
|
||||
if(TS && TS.loc)
|
||||
TS.loc = get_turf(src)
|
||||
if(sight_state == module_active)
|
||||
TS = sight_state
|
||||
if(istype(sight_state,/obj/item/borg/sight))
|
||||
|
||||
@@ -16,7 +16,8 @@
|
||||
client.screen -= module
|
||||
|
||||
contents -= module
|
||||
module.loc = src.module
|
||||
if(module)
|
||||
module.loc = src.module
|
||||
return 1
|
||||
|
||||
/mob/living/silicon/robot/proc/uneq_active()
|
||||
@@ -38,6 +39,36 @@
|
||||
|
||||
module_active = null
|
||||
updateicon()
|
||||
|
||||
/mob/living/silicon/robot/proc/activate_module(var/obj/item/O)
|
||||
if(!(locate(O) in src.module.modules) && O != src.module.emag)
|
||||
return
|
||||
if(activated(O))
|
||||
src << "<span class='notice'>Already activated</span>"
|
||||
return
|
||||
if(!module_state_1)
|
||||
module_state_1 = O
|
||||
O.layer = 20
|
||||
O.screen_loc = inv1.screen_loc
|
||||
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
|
||||
O.screen_loc = inv2.screen_loc
|
||||
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
|
||||
O.screen_loc = inv3.screen_loc
|
||||
contents += O
|
||||
if(istype(module_state_3,/obj/item/borg/sight))
|
||||
sight_mode |= module_state_3:sight_mode
|
||||
else
|
||||
src << "<span class='notice'>You need to disable a module first!</span>"
|
||||
|
||||
/mob/living/silicon/robot/proc/uneq_all()
|
||||
module_active = null
|
||||
|
||||
@@ -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"])
|
||||
|
||||
Reference in New Issue
Block a user