Fixing Borg Vision Bug

Borg vision module's wouldn't work if they were placed in the second or
third module slots. This fixes that, and a runtime error caused by
opening the inventory prior to selecting a module.
This commit is contained in:
jack-fractal
2015-06-07 21:01:38 -04:00
parent d9a456fd37
commit aa453ea99b
2 changed files with 7 additions and 6 deletions
+5 -5
View File
@@ -226,10 +226,10 @@
else
//Modules display is hidden
r.client.screen -= r.throw_icon //"store" icon
for(var/atom/A in r.module.modules)
if( (A != r.module_state_1) && (A != r.module_state_2) && (A != r.module_state_3) )
//Module is not currently active
r.client.screen -= A
if(r.module)
for(var/atom/A in r.module.modules)
if( (A != r.module_state_1) && (A != r.module_state_2) && (A != r.module_state_3) )
//Module is not currently active
r.client.screen -= A
r.shown_robot_modules = 0
r.client.screen -= r.robot_modules_background
@@ -89,7 +89,8 @@
O.layer = 20 // this bit moves the target object into the robot, and moves it's location on screen
contents += O
if(istype(O,/obj/item/borg/sight))
sight_mode |= module_state_1:sight_mode
var/obj/item/borg/sight/S = O
sight_mode |= S.sight_mode
if (selected) // replaces your selection if you're swapping
select_module(selected)