mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-24 04:27:35 +01:00
Fix borg module bug
This commit is contained in:
@@ -5,17 +5,9 @@
|
||||
/mob/living/silicon/robot/get_active_hand()
|
||||
return module_active
|
||||
|
||||
/*-------TODOOOOOOOOOO--------*/
|
||||
/mob/living/silicon/robot/proc/uneq_active()
|
||||
if(isnull(module_active))
|
||||
return
|
||||
if(module_state_1 == module_active)
|
||||
if(istype(module_state_1,/obj/item/borg/sight))
|
||||
sight_mode &= ~module_state_1:sight_mode
|
||||
if (client)
|
||||
client.screen -= module_state_1
|
||||
contents -= module_state_1
|
||||
|
||||
|
||||
/*-------TODOOOOOOOOOO--------*/
|
||||
/mob/living/silicon/robot/proc/uneq_module(obj/item/O)
|
||||
if(!O)
|
||||
return 0
|
||||
@@ -36,27 +28,15 @@
|
||||
|
||||
if(module_active == O)
|
||||
module_active = null
|
||||
module_state_1 = null
|
||||
if(module_state_1 == O)
|
||||
inv1.icon_state = "inv1"
|
||||
else if(module_state_2 == module_active)
|
||||
if(istype(module_state_2,/obj/item/borg/sight))
|
||||
sight_mode &= ~module_state_2:sight_mode
|
||||
if (client)
|
||||
client.screen -= module_state_2
|
||||
contents -= module_state_2
|
||||
module_active = null
|
||||
module_state_2 = null
|
||||
module_state_1 = null
|
||||
else if(module_state_2 == O)
|
||||
inv2.icon_state = "inv2"
|
||||
else if(module_state_3 == module_active)
|
||||
if(istype(module_state_3,/obj/item/borg/sight))
|
||||
sight_mode &= ~module_state_3:sight_mode
|
||||
if (client)
|
||||
client.screen -= module_state_3
|
||||
contents -= module_state_3
|
||||
module_active = null
|
||||
module_state_2 = null
|
||||
else if(module_state_3 == O)
|
||||
module_state_3 = null
|
||||
inv3.icon_state = "inv3"
|
||||
updateicon()
|
||||
return 1
|
||||
|
||||
/mob/living/silicon/robot/proc/activate_module(var/obj/item/O)
|
||||
@@ -89,35 +69,13 @@
|
||||
else
|
||||
src << "You need to disable a module first!"
|
||||
|
||||
/mob/living/silicon/robot/proc/uneq_active()
|
||||
uneq_module(module_active)
|
||||
|
||||
/mob/living/silicon/robot/proc/uneq_all()
|
||||
module_active = null
|
||||
|
||||
if(module_state_1)
|
||||
if(istype(module_state_1,/obj/item/borg/sight))
|
||||
sight_mode &= ~module_state_1:sight_mode
|
||||
if (client)
|
||||
client.screen -= module_state_1
|
||||
contents -= module_state_1
|
||||
module_state_1 = null
|
||||
inv1.icon_state = "inv1"
|
||||
if(module_state_2)
|
||||
if(istype(module_state_2,/obj/item/borg/sight))
|
||||
sight_mode &= ~module_state_2:sight_mode
|
||||
if (client)
|
||||
client.screen -= module_state_2
|
||||
contents -= module_state_2
|
||||
module_state_2 = null
|
||||
inv2.icon_state = "inv2"
|
||||
if(module_state_3)
|
||||
if(istype(module_state_3,/obj/item/borg/sight))
|
||||
sight_mode &= ~module_state_3:sight_mode
|
||||
if (client)
|
||||
client.screen -= module_state_3
|
||||
contents -= module_state_3
|
||||
module_state_3 = null
|
||||
inv3.icon_state = "inv3"
|
||||
updateicon()
|
||||
uneq_module(module_state_1)
|
||||
uneq_module(module_state_2)
|
||||
uneq_module(module_state_3)
|
||||
|
||||
/mob/living/silicon/robot/proc/activated(obj/item/O)
|
||||
if(module_state_1 == O)
|
||||
@@ -128,8 +86,6 @@
|
||||
return 1
|
||||
else
|
||||
return 0
|
||||
updateicon()
|
||||
|
||||
|
||||
//Helper procs for cyborg modules on the UI.
|
||||
//These are hackish but they help clean up code elsewhere.
|
||||
|
||||
Reference in New Issue
Block a user