From 05dceb78f7c1f4e21fb9c557f8263732affa72d7 Mon Sep 17 00:00:00 2001 From: Kashargul <144968721+Kashargul@users.noreply.github.com> Date: Thu, 18 Jan 2024 00:18:14 +0100 Subject: [PATCH] fix runtimes and donking! --- code/_onclick/hud/robot.dm | 10 ++++++---- code/modules/projectiles/guns/toy.dm | 3 ++- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/code/_onclick/hud/robot.dm b/code/_onclick/hud/robot.dm index c494fd685e2..ae0f7f4c474 100644 --- a/code/_onclick/hud/robot.dm +++ b/code/_onclick/hud/robot.dm @@ -240,7 +240,8 @@ var/obj/screen/robot_inventory var/display_rows = -round(-(r.module.modules.len) / 8) r.robot_modules_background.screen_loc = "CENTER-4:16,SOUTH+1:7 to CENTER+3:16,SOUTH+[display_rows]:7" - r.client.screen += r.robot_modules_background + if(r.client) + r.client.screen += r.robot_modules_background var/x = -4 //Start at CENTER-4,SOUTH+1 var/y = 1 @@ -258,7 +259,7 @@ var/obj/screen/robot_inventory r.module.modules.Remove(r.module.emag) for(var/atom/movable/A in r.module.modules) - if( (A != r.module_state_1) && (A != r.module_state_2) && (A != r.module_state_3) ) + if(r.client && (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(x < 0) @@ -276,11 +277,12 @@ var/obj/screen/robot_inventory //Modules display is hidden //r.client.screen -= robot_inventory //"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) ) + if(r.client && (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 + if(r.client) + r.client.screen -= r.robot_modules_background /mob/living/silicon/robot/update_hud() if(modtype) diff --git a/code/modules/projectiles/guns/toy.dm b/code/modules/projectiles/guns/toy.dm index 16d9526cd1a..0f0616b9486 100644 --- a/code/modules/projectiles/guns/toy.dm +++ b/code/modules/projectiles/guns/toy.dm @@ -221,6 +221,7 @@ icon = 'icons/obj/gun_toy.dmi' icon_state = "smg" caliber = "foam" + manual_chamber = FALSE load_method = SINGLE_CASING max_shells = 15 var/cleanup = 0 @@ -318,4 +319,4 @@ item_state = "retro" /obj/item/weapon/gun/energy/lasertag/omni - projectile_type = /obj/item/projectile/beam/lasertag/omni \ No newline at end of file + projectile_type = /obj/item/projectile/beam/lasertag/omni