From 15fa93c00bd69d14616b0ce30e4197bb22c7899c Mon Sep 17 00:00:00 2001 From: Mechoid Date: Mon, 20 Feb 2023 03:11:11 -0800 Subject: [PATCH] Random Rig spawner no longer spawns access locked rigs. --- code/game/objects/random/spacesuits.dm | 6 +++--- code/modules/clothing/spacesuits/rig/rig_attackby.dm | 3 ++- code/modules/clothing/spacesuits/rig/suits/light.dm | 10 ++++++++++ code/modules/clothing/spacesuits/rig/suits/merc.dm | 7 ++++++- 4 files changed, 21 insertions(+), 5 deletions(-) diff --git a/code/game/objects/random/spacesuits.dm b/code/game/objects/random/spacesuits.dm index d886391a3c..a2f665d69c 100644 --- a/code/game/objects/random/spacesuits.dm +++ b/code/game/objects/random/spacesuits.dm @@ -276,9 +276,9 @@ icon_state = "generic" /obj/random/rigsuit/item_to_spawn() - return pick(prob(4);/obj/item/rig/light/hacker, + return pick(prob(4);/obj/item/rig/light/hacker/poi, prob(5);/obj/item/rig/industrial, prob(5);/obj/item/rig/eva, - prob(4);/obj/item/rig/light/stealth, + prob(4);/obj/item/rig/light/stealth/poi, prob(3);/obj/item/rig/hazard, - prob(1);/obj/item/rig/merc/empty) + prob(1);/obj/item/rig/merc/empty/poi) diff --git a/code/modules/clothing/spacesuits/rig/rig_attackby.dm b/code/modules/clothing/spacesuits/rig/rig_attackby.dm index b974613057..0086c6b2c3 100644 --- a/code/modules/clothing/spacesuits/rig/rig_attackby.dm +++ b/code/modules/clothing/spacesuits/rig/rig_attackby.dm @@ -194,5 +194,6 @@ LAZYCLEARLIST(req_one_access) locked = 0 subverted = 1 - to_chat(user, "You short out the access protocol for the suit.") + if(user) + to_chat(user, "You short out the access protocol for the suit.") return 1 diff --git a/code/modules/clothing/spacesuits/rig/suits/light.dm b/code/modules/clothing/spacesuits/rig/suits/light.dm index a8127e3784..66cfc36dbe 100644 --- a/code/modules/clothing/spacesuits/rig/suits/light.dm +++ b/code/modules/clothing/spacesuits/rig/suits/light.dm @@ -68,6 +68,11 @@ /obj/item/rig_module/vision, ) +/obj/item/rig/light/hacker/poi/Initialize() + . = ..() + if(!QDELETED(src)) + emag_act() + //The cybersuit is not space-proof. It does however, have good siemens_coefficient values /obj/item/clothing/head/helmet/space/rig/light/hacker name = "headgear" @@ -138,3 +143,8 @@ /obj/item/rig_module/stealth_field, /obj/item/rig_module/vision ) + +/obj/item/rig/light/stealth/poi/Initialize() + . = ..() + if(!QDELETED(src)) + emag_act() diff --git a/code/modules/clothing/spacesuits/rig/suits/merc.dm b/code/modules/clothing/spacesuits/rig/suits/merc.dm index aa7a691a18..ccbda85f4e 100644 --- a/code/modules/clothing/spacesuits/rig/suits/merc.dm +++ b/code/modules/clothing/spacesuits/rig/suits/merc.dm @@ -43,4 +43,9 @@ initial_modules = list( /obj/item/rig_module/ai_container, /obj/item/rig_module/electrowarfare_suite, //might as well - ) \ No newline at end of file + ) + +/obj/item/rig/merc/empty/poi/Initialize() + . = ..() + if(!QDELETED(src)) + emag_act()