From 6e5225d4bfaad23263d6ac8a2219214273325766 Mon Sep 17 00:00:00 2001 From: Hardly3D <66234359+Hardly3D@users.noreply.github.com> Date: Tue, 17 Dec 2024 07:07:54 -0300 Subject: [PATCH 1/2] Gun safety on deathmatch and bitdomains are off by default (#4616) * Update gun.dm * Update gun.dm * Update gun.dm * Alternative --- code/modules/projectiles/gun.dm | 6 ++++-- modular_nova/modules/gun_safety/code/safety_component.dm | 6 ++++-- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/code/modules/projectiles/gun.dm b/code/modules/projectiles/gun.dm index 10b4fd4a2b6..4c751f5a899 100644 --- a/code/modules/projectiles/gun.dm +++ b/code/modules/projectiles/gun.dm @@ -77,8 +77,10 @@ pin = new pin(src) add_seclight_point() - give_gun_safeties() // NOVA EDIT ADDITION - GUN SAFETIES - give_manufacturer_examine() // NOVA EDIT ADDITON - MANUFACTURER EXAMINE + // NOVA EDIT ADDITION BEGIN - GUN SAFETIES AND MANUFACTURER EXAMINE + give_gun_safeties() + give_manufacturer_examine() + // NOVA EDIT ADDITION END add_bayonet_point() /obj/item/gun/Destroy() diff --git a/modular_nova/modules/gun_safety/code/safety_component.dm b/modular_nova/modules/gun_safety/code/safety_component.dm index a3e904021ed..7917c4adffa 100644 --- a/modular_nova/modules/gun_safety/code/safety_component.dm +++ b/modular_nova/modules/gun_safety/code/safety_component.dm @@ -5,18 +5,20 @@ /// Holder for the toggle safety action var/datum/action/item_action/gun_safety_toggle/toggle_safety_action -/datum/component/gun_safety/Initialize(safety_currently_on = TRUE) +/datum/component/gun_safety/Initialize() . = ..() // Obviously gun safety should only apply to guns if(!isgun(parent)) return COMPONENT_INCOMPATIBLE - src.safety_currently_on = safety_currently_on var/obj/item/item_parent = parent toggle_safety_action = item_parent.add_item_action(/datum/action/item_action/gun_safety_toggle) + if(is_reserved_level(item_parent.z) && !istype(get_area(item_parent.loc), /area/shuttle)) + src.safety_currently_on = FALSE + update_action_button_state() /datum/component/gun_safety/Destroy() From 0d5acc4f4633598dfdcccb25f840f3faf6c7fd06 Mon Sep 17 00:00:00 2001 From: StealsThePRs Date: Tue, 17 Dec 2024 13:08:12 +0300 Subject: [PATCH 2/2] [MIRROR] Gun safety on deathmatch and bitdomains are off by default