From 4db773c688fb5144b19508cd8d66a3be9464a309 Mon Sep 17 00:00:00 2001 From: John Doe Date: Wed, 26 Jul 2023 05:39:02 -0700 Subject: [PATCH 01/33] automatic guns real???? --- code/__DEFINES/conflict.dm | 2 +- code/datums/components/autofire/autofire.dm | 7 +++++-- code/modules/projectiles/gun.dm | 4 +++- code/modules/projectiles/gun_attachables.dm | 4 ++-- code/modules/projectiles/guns/energy.dm | 2 ++ code/modules/projectiles/guns/flamer/flamer.dm | 1 + code/modules/projectiles/guns/misc.dm | 2 ++ code/modules/projectiles/guns/pistols.dm | 1 + code/modules/projectiles/guns/rifles.dm | 14 ++++++++++++-- code/modules/projectiles/guns/shotguns.dm | 1 + code/modules/projectiles/guns/smartgun.dm | 1 + code/modules/projectiles/guns/smgs.dm | 7 +++++++ 12 files changed, 38 insertions(+), 8 deletions(-) diff --git a/code/__DEFINES/conflict.dm b/code/__DEFINES/conflict.dm index 7a1b322a19ee..dab539bce8df 100644 --- a/code/__DEFINES/conflict.dm +++ b/code/__DEFINES/conflict.dm @@ -68,7 +68,7 @@ #define GUN_ANTIQUE (1<<13) /// Whether the gun has been fired by its current user (reset upon `dropped()`) #define GUN_RECOIL_BUILDUP (1<<14) -/// support weapon, bipod will grant IFF +/// support weapon, bipod will grant autofire #define GUN_SUPPORT_PLATFORM (1<<15) /// No gun description, only base desc #define GUN_NO_DESCRIPTION (1<<16) diff --git a/code/datums/components/autofire/autofire.dm b/code/datums/components/autofire/autofire.dm index 31ca255f1b88..571848763f06 100644 --- a/code/datums/components/autofire/autofire.dm +++ b/code/datums/components/autofire/autofire.dm @@ -15,6 +15,8 @@ var/have_to_reset_at_burst_end = FALSE ///If we are in a burst var/bursting = FALSE + /// The multiplier for how much slower the parent should fire in automatic mode. 1 is normal, 1.2 is 20% slower, 2 is 100% slower, etc. + var/automatic_delay_mult = 1 ///Callback to set bursting mode on the parent var/datum/callback/callback_bursting ///Callback to ask the parent to reset its firing vars @@ -26,7 +28,7 @@ ///Callback to set parent's fa_firing var/datum/callback/callback_set_firing -/datum/component/automatedfire/autofire/Initialize(auto_fire_shot_delay = 0.3 SECONDS, burstfire_shot_delay, burst_shots_to_fire = 3, fire_mode = GUN_FIREMODE_SEMIAUTO, datum/callback/callback_bursting, datum/callback/callback_reset_fire, datum/callback/callback_fire, datum/callback/callback_display_ammo, datum/callback/callback_set_firing) +/datum/component/automatedfire/autofire/Initialize(auto_fire_shot_delay = 0.3 SECONDS, burstfire_shot_delay, burst_shots_to_fire = 3, fire_mode = GUN_FIREMODE_SEMIAUTO, automatic_delay_mult = 1, datum/callback/callback_bursting, datum/callback/callback_reset_fire, datum/callback/callback_fire, datum/callback/callback_display_ammo, datum/callback/callback_set_firing) . = ..() RegisterSignal(parent, COMSIG_GUN_FIRE_MODE_TOGGLE, PROC_REF(modify_fire_mode)) @@ -40,6 +42,7 @@ src.burstfire_shot_delay = burstfire_shot_delay src.burst_shots_to_fire = burst_shots_to_fire src.fire_mode = fire_mode + src.automatic_delay_mult = automatic_delay_mult src.callback_bursting = callback_bursting src.callback_reset_fire = callback_reset_fire src.callback_fire = callback_fire @@ -131,7 +134,7 @@ next_fire = world.time + burstfire_shot_delay if(GUN_FIREMODE_AUTOMATIC) callback_set_firing.Invoke(TRUE) - next_fire = world.time + auto_fire_shot_delay + next_fire = world.time + (auto_fire_shot_delay * automatic_delay_mult) if(GUN_FIREMODE_SEMIAUTO) return schedule_shot() diff --git a/code/modules/projectiles/gun.dm b/code/modules/projectiles/gun.dm index 54e066e05544..9a25ad45a48c 100644 --- a/code/modules/projectiles/gun.dm +++ b/code/modules/projectiles/gun.dm @@ -228,6 +228,8 @@ VAR_PROTECTED/start_semiauto = TRUE /// If this gun should spawn with automatic fire. Protected due to it never needing to be edited. VAR_PROTECTED/start_automatic = FALSE + /// The multiplier for how much slower this should fire in automatic mode. 1 is normal, 1.2 is 20% slower, 2 is 100% slower, etc. Protected due to it never needing to be edited. + VAR_PROTECTED/autofire_slow_mult = 1.2 /** @@ -274,7 +276,7 @@ AddElement(/datum/element/drop_retrieval/gun, auto_retrieval_slot) update_icon() //for things like magazine overlays gun_firemode = gun_firemode_list[1] || GUN_FIREMODE_SEMIAUTO - AddComponent(/datum/component/automatedfire/autofire, fire_delay, burst_delay, burst_amount, gun_firemode, CALLBACK(src, PROC_REF(set_bursting)), CALLBACK(src, PROC_REF(reset_fire)), CALLBACK(src, PROC_REF(fire_wrapper)), CALLBACK(src, PROC_REF(display_ammo)), CALLBACK(src, PROC_REF(set_auto_firing))) //This should go after handle_starting_attachment() and setup_firemodes() to get the proper values set. + AddComponent(/datum/component/automatedfire/autofire, fire_delay, burst_delay, burst_amount, gun_firemode, autofire_slow_mult, CALLBACK(src, PROC_REF(set_bursting)), CALLBACK(src, PROC_REF(reset_fire)), CALLBACK(src, PROC_REF(fire_wrapper)), CALLBACK(src, PROC_REF(display_ammo)), CALLBACK(src, PROC_REF(set_auto_firing))) //This should go after handle_starting_attachment() and setup_firemodes() to get the proper values set. /obj/item/weapon/gun/proc/set_gun_attachment_offsets() attachable_offset = null diff --git a/code/modules/projectiles/gun_attachables.dm b/code/modules/projectiles/gun_attachables.dm index 001cd9fbe10c..90350558d688 100644 --- a/code/modules/projectiles/gun_attachables.dm +++ b/code/modules/projectiles/gun_attachables.dm @@ -2657,7 +2657,7 @@ Defined in conflicts.dm of the #defines folder. UnregisterSignal(user, COMSIG_MOB_MOVE_OR_LOOK) if(G.flags_gun_features & GUN_SUPPORT_PLATFORM) - G.remove_bullet_trait("iff") + G.remove_firemode(GUN_FIREMODE_AUTOMATIC) if(!QDELETED(G)) playsound(user,'sound/items/m56dauto_rotate.ogg', 55, 1) @@ -2693,7 +2693,7 @@ Defined in conflicts.dm of the #defines folder. RegisterSignal(user, COMSIG_MOB_MOVE_OR_LOOK, PROC_REF(handle_mob_move_or_look)) if(G.flags_gun_features & GUN_SUPPORT_PLATFORM) - G.add_bullet_trait(BULLET_TRAIT_ENTRY_ID("iff", /datum/element/bullet_trait_iff)) + G.add_firemode(GUN_FIREMODE_AUTOMATIC) else to_chat(user, SPAN_NOTICE("You retract [src].")) diff --git a/code/modules/projectiles/guns/energy.dm b/code/modules/projectiles/guns/energy.dm index 25efbd420ec6..0216a1f6f711 100644 --- a/code/modules/projectiles/guns/energy.dm +++ b/code/modules/projectiles/guns/energy.dm @@ -181,6 +181,7 @@ fire_sound = 'sound/weapons/Laser4.ogg' has_charge_meter = FALSE charge_icon = "+laz_uzi_empty" + start_automatic = TRUE /obj/item/weapon/gun/energy/laz_uzi/set_gun_config_values() ..() @@ -194,6 +195,7 @@ scatter_unwielded = SCATTER_AMOUNT_TIER_6 damage_mult = BASE_BULLET_DAMAGE_MULT recoil_unwielded = RECOIL_AMOUNT_TIER_5 + fa_scatter_peak = SCATTER_AMOUNT_TIER_8 //############################ Taser ################## // Lots of bits for it so splitting off an area diff --git a/code/modules/projectiles/guns/flamer/flamer.dm b/code/modules/projectiles/guns/flamer/flamer.dm index f327a92ffc9c..3125468ee56f 100644 --- a/code/modules/projectiles/guns/flamer/flamer.dm +++ b/code/modules/projectiles/guns/flamer/flamer.dm @@ -367,6 +367,7 @@ desc = "A prototyped model of the M240-T incinerator unit, it was discontinued after its automatic mode was deemed too expensive to deploy in the field." start_semiauto = FALSE start_automatic = TRUE + autofire_slow_mult = 1 /obj/item/weapon/gun/flamer/M240T/auto/set_gun_config_values() . = ..() diff --git a/code/modules/projectiles/guns/misc.dm b/code/modules/projectiles/guns/misc.dm index 2aa6b2dfc4d3..6a1f13b68380 100644 --- a/code/modules/projectiles/guns/misc.dm +++ b/code/modules/projectiles/guns/misc.dm @@ -17,6 +17,7 @@ gun_category = GUN_CATEGORY_HEAVY start_semiauto = FALSE start_automatic = TRUE + autofire_slow_mult = 1 /obj/item/weapon/gun/minigun/Initialize(mapload, spawn_empty) . = ..() @@ -86,6 +87,7 @@ ) start_semiauto = FALSE start_automatic = TRUE + autofire_slow_mult = 1 var/cover_open = FALSE //if the gun's feed-cover is open or not. diff --git a/code/modules/projectiles/guns/pistols.dm b/code/modules/projectiles/guns/pistols.dm index 47b80f7b9218..8da9e7460491 100644 --- a/code/modules/projectiles/guns/pistols.dm +++ b/code/modules/projectiles/guns/pistols.dm @@ -790,6 +790,7 @@ It is a modified Beretta 93R, and can fire three-round burst or single fire. Whe ) start_semiauto = FALSE start_automatic = TRUE + autofire_slow_mult = 1 /obj/item/weapon/gun/pistol/skorpion/set_gun_attachment_offsets() attachable_offset = list("muzzle_x" = 29, "muzzle_y" = 18,"rail_x" = 16, "rail_y" = 21, "under_x" = 23, "under_y" = 15, "stock_x" = 23, "stock_y" = 15) diff --git a/code/modules/projectiles/guns/rifles.dm b/code/modules/projectiles/guns/rifles.dm index 09a0e2b683cf..bc6029b395ab 100644 --- a/code/modules/projectiles/guns/rifles.dm +++ b/code/modules/projectiles/guns/rifles.dm @@ -75,6 +75,7 @@ flags_gun_features = GUN_AUTO_EJECTOR|GUN_CAN_POINTBLANK|GUN_AMMO_COUNTER starting_attachment_types = list(/obj/item/attachable/attached_gun/grenade, /obj/item/attachable/stock/rifle/collapsible) map_specific_decoration = TRUE + start_automatic = TRUE /obj/item/weapon/gun/rifle/m41a/set_gun_attachment_offsets() attachable_offset = list("muzzle_x" = 32, "muzzle_y" = 18,"rail_x" = 12, "rail_y" = 23, "under_x" = 24, "under_y" = 13, "stock_x" = 24, "stock_y" = 13) @@ -88,7 +89,6 @@ accuracy_mult = BASE_ACCURACY_MULT + HIT_ACCURACY_MULT_TIER_4 + 2*HIT_ACCURACY_MULT_TIER_1 accuracy_mult_unwielded = BASE_ACCURACY_MULT - HIT_ACCURACY_MULT_TIER_7 scatter = SCATTER_AMOUNT_TIER_8 - //fa_scatter_peak = FULL_AUTO_SCATTER_PEAK_TIER_8 //Zonenote burst_scatter_mult = SCATTER_AMOUNT_TIER_10 scatter_unwielded = SCATTER_AMOUNT_TIER_2 damage_mult = BASE_BULLET_DAMAGE_MULT + BULLET_DAMAGE_MULT_TIER_2 @@ -150,6 +150,8 @@ /obj/item/attachable/attached_gun/flamer/advanced, ) start_semiauto = FALSE + start_automatic = TRUE + autofire_slow_mult = 1.1 /obj/item/weapon/gun/rifle/nsg23/Initialize(mapload, spawn_empty) . = ..() @@ -171,6 +173,7 @@ damage_mult = BASE_BULLET_DAMAGE_MULT + BULLET_DAMAGE_MULT_TIER_8 recoil_unwielded = RECOIL_AMOUNT_TIER_2 damage_falloff_mult = 0 + fa_max_scatter = SCATTER_AMOUNT_TIER_5 /obj/item/weapon/gun/rifle/nsg23/handle_starting_attachment() ..() @@ -383,6 +386,7 @@ flags_gun_features = GUN_AUTO_EJECTOR|GUN_CAN_POINTBLANK|GUN_AMMO_COUNTER starting_attachment_types = list(/obj/item/attachable/attached_gun/grenade/mk1, /obj/item/attachable/stock/rifle/collapsible) + start_automatic = TRUE /obj/item/weapon/gun/rifle/m41aMK1/set_gun_attachment_offsets() attachable_offset = list("muzzle_x" = 32, "muzzle_y" = 18,"rail_x" = 12, "rail_y" = 23, "under_x" = 23, "under_y" = 13, "stock_x" = 24, "stock_y" = 14) @@ -485,6 +489,7 @@ indestructible = TRUE auto_retrieval_slot = WEAR_J_STORE map_specific_decoration = TRUE + autofire_slow_mult = 1 var/mob/living/carbon/human/linked_human var/is_locked = TRUE @@ -528,6 +533,7 @@ scatter_unwielded = SCATTER_AMOUNT_TIER_2 damage_mult = BASE_BULLET_DAMAGE_MULT + BULLET_DAMAGE_MULT_TIER_3 recoil_unwielded = RECOIL_AMOUNT_TIER_2 + fa_max_scatter = SCATTER_AMOUNT_TIER_7 /obj/item/weapon/gun/rifle/m46c/able_to_fire(mob/user) . = ..() @@ -633,9 +639,11 @@ if(iff_enabled) modify_fire_delay(FIRE_DELAY_TIER_10) remove_firemode(GUN_FIREMODE_BURSTFIRE) + remove_firemode(GUN_FIREMODE_AUTOMATIC) else add_firemode(GUN_FIREMODE_BURSTFIRE) + add_firemode(GUN_FIREMODE_AUTOMATIC) /obj/item/weapon/gun/rifle/m46c/proc/name_after_co(mob/living/carbon/human/H) @@ -719,6 +727,7 @@ ) flags_gun_features = GUN_AUTO_EJECTOR|GUN_CAN_POINTBLANK + start_automatic = TRUE @@ -1232,7 +1241,7 @@ /obj/item/attachable/magnetic_harness, ) - flags_gun_features = GUN_CAN_POINTBLANK|GUN_AMMO_COUNTER|GUN_WIELDED_FIRING_ONLY + flags_gun_features = GUN_CAN_POINTBLANK|GUN_AMMO_COUNTER|GUN_WIELDED_FIRING_ONLY|GUN_SUPPORT_PLATFORM gun_category = GUN_CATEGORY_HEAVY /obj/item/weapon/gun/rifle/lmg/set_gun_attachment_offsets() @@ -1297,6 +1306,7 @@ flags_gun_features = GUN_AUTO_EJECTOR|GUN_CAN_POINTBLANK|GUN_AMMO_COUNTER flags_equip_slot = SLOT_BACK + start_automatic = TRUE /obj/item/weapon/gun/rifle/type71/set_gun_attachment_offsets() attachable_offset = list("muzzle_x" = 32, "muzzle_y" = 18,"rail_x" = 18, "rail_y" = 23, "under_x" = 20, "under_y" = 13, "stock_x" = 24, "stock_y" = 13) diff --git a/code/modules/projectiles/guns/shotguns.dm b/code/modules/projectiles/guns/shotguns.dm index 8903be95db95..c5fe94773ed4 100644 --- a/code/modules/projectiles/guns/shotguns.dm +++ b/code/modules/projectiles/guns/shotguns.dm @@ -327,6 +327,7 @@ can cause issues with ammo types getting mixed up during the burst. flags_gun_features = GUN_CAN_POINTBLANK|GUN_INTERNAL_MAG auto_retrieval_slot = WEAR_J_STORE start_automatic = TRUE + autofire_slow_mult = 1 /obj/item/weapon/gun/shotgun/combat/marsoc/Initialize(mapload, spawn_empty) . = ..() diff --git a/code/modules/projectiles/guns/smartgun.dm b/code/modules/projectiles/guns/smartgun.dm index 859f99b17908..c29c46030318 100644 --- a/code/modules/projectiles/guns/smartgun.dm +++ b/code/modules/projectiles/guns/smartgun.dm @@ -65,6 +65,7 @@ auto_retrieval_slot = WEAR_J_STORE start_semiauto = FALSE start_automatic = TRUE + autofire_slow_mult = 1 /obj/item/weapon/gun/smartgun/Initialize(mapload, ...) diff --git a/code/modules/projectiles/guns/smgs.dm b/code/modules/projectiles/guns/smgs.dm index 699f05ed318c..efe7eb5395f4 100644 --- a/code/modules/projectiles/guns/smgs.dm +++ b/code/modules/projectiles/guns/smgs.dm @@ -20,6 +20,7 @@ flags_gun_features = GUN_AUTO_EJECTOR|GUN_CAN_POINTBLANK gun_category = GUN_CATEGORY_SMG + start_automatic = TRUE /obj/item/weapon/gun/smg/Initialize(mapload, spawn_empty) . = ..() @@ -32,6 +33,7 @@ /obj/item/weapon/gun/smg/set_gun_config_values() ..() movement_onehanded_acc_penalty_mult = 4 + fa_max_scatter = SCATTER_AMOUNT_TIER_5 //------------------------------------------------------- //M39 SMG @@ -69,6 +71,7 @@ flags_gun_features = GUN_AUTO_EJECTOR|GUN_CAN_POINTBLANK|GUN_AMMO_COUNTER starting_attachment_types = list(/obj/item/attachable/stock/smg/collapsible) map_specific_decoration = TRUE + start_automatic = TRUE /obj/item/weapon/gun/smg/m39/set_gun_attachment_offsets() attachable_offset = list("muzzle_x" = 30, "muzzle_y" = 20,"rail_x" = 14, "rail_y" = 22, "under_x" = 21, "under_y" = 16, "stock_x" = 24, "stock_y" = 15) @@ -85,6 +88,7 @@ scatter_unwielded = SCATTER_AMOUNT_TIER_4 damage_mult = BASE_BULLET_DAMAGE_MULT recoil_unwielded = RECOIL_AMOUNT_TIER_5 + fa_max_scatter = SCATTER_AMOUNT_TIER_10 + 0.5 /obj/item/weapon/gun/smg/m39/training @@ -270,6 +274,8 @@ scatter_unwielded = SCATTER_AMOUNT_TIER_4 damage_mult = BASE_BULLET_DAMAGE_MULT recoil_unwielded = RECOIL_AMOUNT_TIER_5 + fa_max_scatter = SCATTER_AMOUNT_TIER_9 + fa_scatter_peak = 1 // Seems a bit funny, but it works pretty well in the end /obj/item/weapon/gun/smg/ppsh/with_drum_mag current_mag = /obj/item/ammo_magazine/smg/ppsh/extended @@ -567,6 +573,7 @@ flags_gun_features = GUN_AUTO_EJECTOR|GUN_CAN_POINTBLANK gun_category = GUN_CATEGORY_SMG civilian_usable_override = TRUE + start_automatic = FALSE var/nailing_speed = 2 SECONDS //Time to apply a sheet for patching. Also haha name. Try to keep sync with soundbyte duration var/repair_sound = 'sound/weapons/nailgun_repair_long.ogg' From 7ec7eb71df3067e3c5f9896d46d456a9c30c0c37 Mon Sep 17 00:00:00 2001 From: John Doe Date: Wed, 26 Jul 2023 06:16:02 -0700 Subject: [PATCH 02/33] bugfix --- code/modules/projectiles/gun.dm | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/code/modules/projectiles/gun.dm b/code/modules/projectiles/gun.dm index 9a25ad45a48c..d121995d5583 100644 --- a/code/modules/projectiles/gun.dm +++ b/code/modules/projectiles/gun.dm @@ -1204,8 +1204,7 @@ and you're good to go. shots_fired++ - else // This happens in very rare circumstances when you're moving a lot while burst firing, so I'm going to toss it up to guns jamming. - clear_jam(projectile_to_fire,user) + else return TRUE //>>POST PROCESSING AND CLEANUP BEGIN HERE.<< From 9e9fc3865e832eb717b5141a06c7824adfb0a23e Mon Sep 17 00:00:00 2001 From: John Doe Date: Wed, 26 Jul 2023 06:16:46 -0700 Subject: [PATCH 03/33] nsg is apparently not FA --- code/modules/projectiles/guns/rifles.dm | 3 --- 1 file changed, 3 deletions(-) diff --git a/code/modules/projectiles/guns/rifles.dm b/code/modules/projectiles/guns/rifles.dm index bc6029b395ab..265d74d1eb6e 100644 --- a/code/modules/projectiles/guns/rifles.dm +++ b/code/modules/projectiles/guns/rifles.dm @@ -150,8 +150,6 @@ /obj/item/attachable/attached_gun/flamer/advanced, ) start_semiauto = FALSE - start_automatic = TRUE - autofire_slow_mult = 1.1 /obj/item/weapon/gun/rifle/nsg23/Initialize(mapload, spawn_empty) . = ..() @@ -173,7 +171,6 @@ damage_mult = BASE_BULLET_DAMAGE_MULT + BULLET_DAMAGE_MULT_TIER_8 recoil_unwielded = RECOIL_AMOUNT_TIER_2 damage_falloff_mult = 0 - fa_max_scatter = SCATTER_AMOUNT_TIER_5 /obj/item/weapon/gun/rifle/nsg23/handle_starting_attachment() ..() From d4a5545508543c362fd6b31e3fb07cf1ae554577 Mon Sep 17 00:00:00 2001 From: John Doe Date: Wed, 26 Jul 2023 06:40:59 -0700 Subject: [PATCH 04/33] runtime fix --- code/modules/projectiles/gun.dm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/code/modules/projectiles/gun.dm b/code/modules/projectiles/gun.dm index d121995d5583..e9f40bfb5310 100644 --- a/code/modules/projectiles/gun.dm +++ b/code/modules/projectiles/gun.dm @@ -427,6 +427,8 @@ else if(M.r_hand == src) M.update_inv_r_hand() + setup_firemodes() + /obj/item/weapon/gun/proc/handle_random_attachments() var/attachmentchoice @@ -1766,13 +1768,11 @@ not all weapons use normal magazines etc. load_into_chamber() itself is designed /obj/item/weapon/gun/proc/set_burst_amount(value, mob/user) burst_amount = value SEND_SIGNAL(src, COMSIG_GUN_BURST_SHOTS_TO_FIRE_MODIFIED, burst_amount) - setup_firemodes() /// adder for burst_amount /obj/item/weapon/gun/proc/modify_burst_amount(value, mob/user) burst_amount += value SEND_SIGNAL(src, COMSIG_GUN_BURST_SHOTS_TO_FIRE_MODIFIED, burst_amount) - setup_firemodes() /// Adder for burst_delay /obj/item/weapon/gun/proc/modify_burst_delay(value, mob/user) From 9e241b91eb8f5e4a5dccef24396404d80313a3d2 Mon Sep 17 00:00:00 2001 From: John Doe Date: Wed, 26 Jul 2023 06:48:31 -0700 Subject: [PATCH 05/33] de-shittifies the sniper and dualtube --- code/modules/projectiles/guns/shotguns.dm | 7 ++++++- code/modules/projectiles/guns/specialist.dm | 12 ++++++++---- 2 files changed, 14 insertions(+), 5 deletions(-) diff --git a/code/modules/projectiles/guns/shotguns.dm b/code/modules/projectiles/guns/shotguns.dm index c5fe94773ed4..5296b1838157 100644 --- a/code/modules/projectiles/guns/shotguns.dm +++ b/code/modules/projectiles/guns/shotguns.dm @@ -1221,7 +1221,12 @@ can cause issues with ammo types getting mixed up during the burst. playsound(src, 'sound/machines/switch.ogg', 15, TRUE) return TRUE -/obj/item/weapon/gun/shotgun/pump/dual_tube/set_bursting() +/obj/item/weapon/gun/shotgun/pump/dual_tube/verb/toggle_tube() + set category = "Weapons" + set name = "Toggle Shotgun Tube" + set desc = "Toggles which shotgun tube your gun loads from." + set src = usr.contents + var/obj/item/weapon/gun/shotgun/pump/dual_tube/shotgun = get_active_firearm(usr) if(shotgun == src) swap_tube(usr) diff --git a/code/modules/projectiles/guns/specialist.dm b/code/modules/projectiles/guns/specialist.dm index 22fb290878e9..93010a93f17b 100644 --- a/code/modules/projectiles/guns/specialist.dm +++ b/code/modules/projectiles/guns/specialist.dm @@ -267,11 +267,15 @@ if(toggling_action) toggling_action.update_button_icon() -/obj/item/weapon/gun/rifle/sniper/set_bursting(mob/user) - if(has_aimed_shot) +/obj/item/weapon/gun/rifle/sniper/verb/toggle_laser() + set category = "Weapons" + set name = "Toggle Laser" + set desc = "Toggles your laser on or off." + set src = usr.contents + + var/obj/item/weapon/gun/rifle/sniper/sniper = get_active_firearm(usr) + if((sniper == src) && has_aimed_shot) toggle_laser(user) - else - ..() //Pow! Headshot. /obj/item/weapon/gun/rifle/sniper/M42A From 083e85412be8f21159f6408830c1c58cc2a34df1 Mon Sep 17 00:00:00 2001 From: John Doe Date: Wed, 26 Jul 2023 07:08:52 -0700 Subject: [PATCH 06/33] runtime removal --- code/modules/projectiles/gun_helpers.dm | 3 +++ code/modules/projectiles/guns/specialist.dm | 4 ++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/code/modules/projectiles/gun_helpers.dm b/code/modules/projectiles/gun_helpers.dm index a60773c88be7..ead1b24bd9d7 100644 --- a/code/modules/projectiles/gun_helpers.dm +++ b/code/modules/projectiles/gun_helpers.dm @@ -700,6 +700,9 @@ DEFINES in setup.dm, referenced here. CRASH("add_firemode called with a resulting gun_firemode_list length of [length(gun_firemode_list)].") /obj/item/weapon/gun/proc/remove_firemode(removed_firemode, mob/user) + if(!(removed_firemode in gun_firemode_list)) + return + if(!length(gun_firemode_list) || (length(gun_firemode_list) == 1)) CRASH("remove_firemode called with gun_firemode_list length [length(gun_firemode_list)].") diff --git a/code/modules/projectiles/guns/specialist.dm b/code/modules/projectiles/guns/specialist.dm index 93010a93f17b..f1ae2b4bca66 100644 --- a/code/modules/projectiles/guns/specialist.dm +++ b/code/modules/projectiles/guns/specialist.dm @@ -267,7 +267,7 @@ if(toggling_action) toggling_action.update_button_icon() -/obj/item/weapon/gun/rifle/sniper/verb/toggle_laser() +/obj/item/weapon/gun/rifle/sniper/verb/toggle_gun_laser() set category = "Weapons" set name = "Toggle Laser" set desc = "Toggles your laser on or off." @@ -275,7 +275,7 @@ var/obj/item/weapon/gun/rifle/sniper/sniper = get_active_firearm(usr) if((sniper == src) && has_aimed_shot) - toggle_laser(user) + toggle_laser(usr) //Pow! Headshot. /obj/item/weapon/gun/rifle/sniper/M42A From d338bf71b0d079bc3c14eb1b5795fb2c3edfe82b Mon Sep 17 00:00:00 2001 From: John Doe Date: Wed, 26 Jul 2023 07:12:50 -0700 Subject: [PATCH 07/33] firemode fix --- code/modules/projectiles/gun_helpers.dm | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/code/modules/projectiles/gun_helpers.dm b/code/modules/projectiles/gun_helpers.dm index ead1b24bd9d7..e86801c9d8c1 100644 --- a/code/modules/projectiles/gun_helpers.dm +++ b/code/modules/projectiles/gun_helpers.dm @@ -713,7 +713,9 @@ DEFINES in setup.dm, referenced here. do_toggle_firemode(user, gun_firemode) /obj/item/weapon/gun/proc/setup_firemodes() + var/old_firemode = gun_firemode gun_firemode_list.len = 0 + if(start_semiauto) gun_firemode_list |= GUN_FIREMODE_SEMIAUTO @@ -725,6 +727,10 @@ DEFINES in setup.dm, referenced here. if(!length(gun_firemode_list)) CRASH("[src] called setup_firemodes() with an empty gun_firemode_list") + + else if(old_firemode in gun_firemode_list) + gun_firemode = old_firemode + else gun_firemode = gun_firemode_list[1] From c208faf5a0e54ba446623a4796911d6e1f5c1f7c Mon Sep 17 00:00:00 2001 From: John Doe Date: Wed, 26 Jul 2023 08:54:22 -0700 Subject: [PATCH 08/33] fix another long-standing bug --- .../dcs/signals/atom/signals_item.dm | 3 +++ code/modules/projectiles/gun.dm | 2 ++ code/modules/projectiles/gun_attachables.dm | 24 +++++++++++++++++++ 3 files changed, 29 insertions(+) diff --git a/code/__DEFINES/dcs/signals/atom/signals_item.dm b/code/__DEFINES/dcs/signals/atom/signals_item.dm index 138e88d21746..2be5afe1056f 100644 --- a/code/__DEFINES/dcs/signals/atom/signals_item.dm +++ b/code/__DEFINES/dcs/signals/atom/signals_item.dm @@ -54,3 +54,6 @@ #define COMSIG_GUN_AUTOFIREDELAY_MODIFIED "gun_autofiredelay_modified" #define COMSIG_GUN_BURST_SHOTS_TO_FIRE_MODIFIED "gun_burst_shots_to_fire_modified" #define COMSIG_GUN_BURST_SHOT_DELAY_MODIFIED "gun_burst_shot_delay_modified" + +/// from /obj/item/weapon/gun/proc/recalculate_attachment_bonuses() : () +#define COMSIG_GUN_RECALCULATE_ATTACHMENT_BONUSES "gun_recalculate_attachment_bonuses" diff --git a/code/modules/projectiles/gun.dm b/code/modules/projectiles/gun.dm index e9f40bfb5310..cc4f53ca147e 100644 --- a/code/modules/projectiles/gun.dm +++ b/code/modules/projectiles/gun.dm @@ -429,6 +429,8 @@ setup_firemodes() + SEND_SIGNAL(src, COMSIG_GUN_RECALCULATE_ATTACHMENT_BONUSES) + /obj/item/weapon/gun/proc/handle_random_attachments() var/attachmentchoice diff --git a/code/modules/projectiles/gun_attachables.dm b/code/modules/projectiles/gun_attachables.dm index 90350558d688..e6382dde7921 100644 --- a/code/modules/projectiles/gun_attachables.dm +++ b/code/modules/projectiles/gun_attachables.dm @@ -851,6 +851,28 @@ Defined in conflicts.dm of the #defines folder. delay_scoped_nerf = FIRE_DELAY_TIER_9 //to compensate initial debuff. We want "high_fire_delay" damage_falloff_scoped_buff = -0.4 //has to be negative +/obj/item/attachable/scope/Attach(obj/item/weapon/gun/gun) + . = ..() + RegisterSignal(gun, COMSIG_GUN_RECALCULATE_ATTACHMENT_BONUSES, PROC_REF(handle_attachment_recalc)) + +/obj/item/attachable/scope/Detach(mob/user, obj/item/weapon/gun/detaching_gub) + . = ..() + UnregisterSignal(detaching_gub, COMSIG_GUN_RECALCULATE_ATTACHMENT_BONUSES) + + +/// Due to the bipod's interesting way of handling stat modifications, this is necessary to prevent exploits. +/obj/item/attachable/scope/proc/handle_attachment_recalc(obj/item/weapon/gun/source) + SIGNAL_HANDLER + + if(!source.zoom) + return + + if(using_scope) + source.accuracy_mult += accuracy_scoped_buff + source.modify_fire_delay(delay_scoped_nerf) + source.damage_falloff_mult += damage_falloff_scoped_buff + + /obj/item/attachable/scope/proc/apply_scoped_buff(obj/item/weapon/gun/G, mob/living/carbon/user) if(G.zoom) G.accuracy_mult += accuracy_scoped_buff @@ -2651,6 +2673,7 @@ Defined in conflicts.dm of the #defines folder. burst_scatter_mod = 0 delay_mod = FIRE_DELAY_TIER_10 G.recalculate_attachment_bonuses() + G.stop_fire() var/mob/living/user if(isliving(G.loc)) user = G.loc @@ -2688,6 +2711,7 @@ Defined in conflicts.dm of the #defines folder. else delay_mod = -FIRE_DELAY_TIER_10 G.recalculate_attachment_bonuses() + G.stop_fire() initial_mob_dir = user.dir RegisterSignal(user, COMSIG_MOB_MOVE_OR_LOOK, PROC_REF(handle_mob_move_or_look)) From 35be4c3ec4e5e5038cfea078c5db5edad7af5b76 Mon Sep 17 00:00:00 2001 From: John Doe Date: Wed, 26 Jul 2023 08:54:27 -0700 Subject: [PATCH 09/33] nsg is apparently FA --- code/modules/projectiles/guns/rifles.dm | 3 +++ 1 file changed, 3 insertions(+) diff --git a/code/modules/projectiles/guns/rifles.dm b/code/modules/projectiles/guns/rifles.dm index 265d74d1eb6e..bc6029b395ab 100644 --- a/code/modules/projectiles/guns/rifles.dm +++ b/code/modules/projectiles/guns/rifles.dm @@ -150,6 +150,8 @@ /obj/item/attachable/attached_gun/flamer/advanced, ) start_semiauto = FALSE + start_automatic = TRUE + autofire_slow_mult = 1.1 /obj/item/weapon/gun/rifle/nsg23/Initialize(mapload, spawn_empty) . = ..() @@ -171,6 +173,7 @@ damage_mult = BASE_BULLET_DAMAGE_MULT + BULLET_DAMAGE_MULT_TIER_8 recoil_unwielded = RECOIL_AMOUNT_TIER_2 damage_falloff_mult = 0 + fa_max_scatter = SCATTER_AMOUNT_TIER_5 /obj/item/weapon/gun/rifle/nsg23/handle_starting_attachment() ..() From e11e2a78c9b63547a7990908261df0f5049c1305 Mon Sep 17 00:00:00 2001 From: John Doe Date: Thu, 27 Jul 2023 08:36:23 -0700 Subject: [PATCH 10/33] burst fix --- code/modules/projectiles/gun.dm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/modules/projectiles/gun.dm b/code/modules/projectiles/gun.dm index cc4f53ca147e..c03153f15402 100644 --- a/code/modules/projectiles/gun.dm +++ b/code/modules/projectiles/gun.dm @@ -316,7 +316,7 @@ accuracy_mult_unwielded = BASE_ACCURACY_MULT scatter = SCATTER_AMOUNT_TIER_6 burst_scatter_mult = SCATTER_AMOUNT_TIER_7 - set_burst_amount(BURST_AMOUNT_TIER_5) + set_burst_amount(BURST_AMOUNT_TIER_1) scatter_unwielded = SCATTER_AMOUNT_TIER_6 damage_mult = BASE_BULLET_DAMAGE_MULT damage_falloff_mult = DAMAGE_FALLOFF_TIER_10 From ccc6fffe81a279e1cccc251aa22aabc870c21793 Mon Sep 17 00:00:00 2001 From: John Doe Date: Sun, 30 Jul 2023 13:45:28 -0700 Subject: [PATCH 11/33] ammo economy rework --- code/datums/supply_packs/ammo.dm | 2 -- code/datums/supply_packs/weapons.dm | 13 ------------- .../vending/vendor_types/crew/pilot_officer.dm | 12 ++++-------- .../vending/vendor_types/crew/vehicle_crew.dm | 2 -- .../vending/vendor_types/intelligence_officer.dm | 2 -- .../vending/vendor_types/requisitions.dm | 6 ------ .../vendor_types/squad_prep/squad_engineer.dm | 2 -- .../vendor_types/squad_prep/squad_leader.dm | 2 -- .../vendor_types/squad_prep/squad_medic.dm | 2 -- .../vendor_types/squad_prep/squad_prep.dm | 4 ---- .../vendor_types/squad_prep/squad_rifleman.dm | 2 -- .../vending/vendor_types/squad_prep/squad_tl.dm | 2 -- code/game/objects/items/storage/backpack.dm | 2 +- .../structures/crates_lockers/largecrate.dm | 4 ++-- .../modules/projectiles/ammo_boxes/ammo_boxes.dm | 5 ++--- .../projectiles/ammo_boxes/handful_boxes.dm | 1 - .../projectiles/ammo_boxes/magazine_boxes.dm | 16 ---------------- 17 files changed, 9 insertions(+), 70 deletions(-) diff --git a/code/datums/supply_packs/ammo.dm b/code/datums/supply_packs/ammo.dm index e598a11be5e0..5cd9232e7edb 100644 --- a/code/datums/supply_packs/ammo.dm +++ b/code/datums/supply_packs/ammo.dm @@ -415,7 +415,6 @@ /obj/item/ammo_magazine/rifle, /obj/item/ammo_magazine/rifle, /obj/item/ammo_magazine/rifle, - /obj/item/ammo_magazine/rifle/extended, /obj/item/ammo_magazine/rifle/ap, /obj/item/ammo_magazine/rifle/incendiary, /obj/item/ammo_magazine/rifle/m4ra/incendiary, @@ -430,7 +429,6 @@ /obj/item/ammo_magazine/smg/m39, /obj/item/ammo_magazine/smg/m39, /obj/item/ammo_magazine/smg/m39, - /obj/item/ammo_magazine/smg/m39/extended, /obj/item/ammo_magazine/smg/m39/ap, /obj/item/ammo_magazine/smg/m39/ap, /obj/item/ammo_magazine/revolver, diff --git a/code/datums/supply_packs/weapons.dm b/code/datums/supply_packs/weapons.dm index a28e0c7191ce..ff47cdfe9f3a 100644 --- a/code/datums/supply_packs/weapons.dm +++ b/code/datums/supply_packs/weapons.dm @@ -86,19 +86,6 @@ group = "Weapons" /datum/supply_packs/gun - contains = list( - /obj/item/weapon/gun/rifle/m41aMK1, - /obj/item/weapon/gun/rifle/m41aMK1, - /obj/item/ammo_magazine/rifle/m41aMK1, - /obj/item/ammo_magazine/rifle/m41aMK1, - ) - name = "M41A MK1 Rifle Crate (x2 MK1, x2 magazines)" - cost = 40 - containertype = /obj/structure/closet/crate/weapon - containername = "M41A MK1 Rifle Crate" - group = "Weapons" - -/datum/supply_packs/gun/heavyweapons contains = list( /obj/item/storage/box/guncase/lmg, /obj/item/storage/box/guncase/lmg, diff --git a/code/game/machinery/vending/vendor_types/crew/pilot_officer.dm b/code/game/machinery/vending/vendor_types/crew/pilot_officer.dm index 231e02bb5118..86c8b8542783 100644 --- a/code/game/machinery/vending/vendor_types/crew/pilot_officer.dm +++ b/code/game/machinery/vending/vendor_types/crew/pilot_officer.dm @@ -65,11 +65,11 @@ GLOBAL_LIST_INIT(cm_vending_clothing_pilot_officer, list( list("M30 Tactical Helmet", 0, /obj/item/clothing/head/helmet/marine/pilot, MARINE_CAN_BUY_HELMET, VENDOR_ITEM_MANDATORY), list("Leather Satchel", 0, /obj/item/storage/backpack/satchel, MARINE_CAN_BUY_BACKPACK, VENDOR_ITEM_MANDATORY), list("MRE", 0, /obj/item/storage/box/MRE, MARINE_CAN_BUY_MRE, VENDOR_ITEM_MANDATORY), - + list("ARMOR (CHOOSE 1)", 0, null, null, null), list("M70 Flak Jacket", 0, /obj/item/clothing/suit/armor/vest/pilot, MARINE_CAN_BUY_ARMOR, VENDOR_ITEM_MANDATORY), list("M3-VL Pattern Flak Vest", 0, /obj/item/clothing/suit/storage/marine/light/vest/dcc, MARINE_CAN_BUY_ARMOR, VENDOR_ITEM_MANDATORY), - + list("PERSONAL SIDEARM (CHOOSE 1)", 0, null, null, null), list("88 Mod 4 Combat Pistol", 0, /obj/item/weapon/gun/pistol/mod88, MARINE_CAN_BUY_ATTACHMENT, VENDOR_ITEM_REGULAR), list("VP78 Pistol", 0, /obj/item/weapon/gun/pistol/vp78, MARINE_CAN_BUY_ATTACHMENT, VENDOR_ITEM_REGULAR), @@ -133,9 +133,7 @@ GLOBAL_LIST_INIT(cm_vending_clothing_pilot_officer, list( list("AMMUNITION", 0, null, null, null), list("M4RA AP Magazine (10x24mm)", 10, /obj/item/ammo_magazine/rifle/m4ra/ap, null, VENDOR_ITEM_REGULAR), list("M39 AP Magazine (10x20mm)", 10, /obj/item/ammo_magazine/smg/m39/ap, null, VENDOR_ITEM_REGULAR), - list("M39 Extended Magazine (10x20mm)", 10, /obj/item/ammo_magazine/smg/m39/extended, null, VENDOR_ITEM_REGULAR), list("M41A AP Magazine (10x24mm)", 10, /obj/item/ammo_magazine/rifle/ap, null, VENDOR_ITEM_REGULAR), - list("M41A Extended Magazine (10x24mm)", 10, /obj/item/ammo_magazine/rifle/extended, null, VENDOR_ITEM_REGULAR), list("M44 Heavy Speed Loader (.44)", 10, /obj/item/ammo_magazine/revolver/heavy, null, VENDOR_ITEM_REGULAR), list("UTILITIES", 0, null, null, null), @@ -153,8 +151,8 @@ GLOBAL_LIST_INIT(cm_vending_clothing_dropship_crew_chief, list( list("Gloves", 0, /obj/item/clothing/gloves/yellow, MARINE_CAN_BUY_GLOVES, VENDOR_ITEM_MANDATORY), list("Patrol Cap", 0, /obj/item/clothing/head/cmcap, MARINE_CAN_BUY_HELMET, VENDOR_ITEM_MANDATORY), list("Leather Satchel", 0, /obj/item/storage/backpack/satchel, MARINE_CAN_BUY_BACKPACK, VENDOR_ITEM_MANDATORY), - list("MRE", 0, /obj/item/storage/box/MRE, MARINE_CAN_BUY_MRE, VENDOR_ITEM_MANDATORY), - + list("MRE", 0, /obj/item/storage/box/MRE, MARINE_CAN_BUY_MRE, VENDOR_ITEM_MANDATORY), + list("ARMOR (CHOOSE 1)", 0, null, null, null), list("M70 Flak Jacket", 0, /obj/item/clothing/suit/armor/vest/pilot, MARINE_CAN_BUY_ARMOR, VENDOR_ITEM_MANDATORY), list("M3-VL Pattern Flak Vest", 0, /obj/item/clothing/suit/storage/marine/light/vest/dcc, MARINE_CAN_BUY_ARMOR, VENDOR_ITEM_MANDATORY), @@ -223,9 +221,7 @@ GLOBAL_LIST_INIT(cm_vending_clothing_dropship_crew_chief, list( list("AMMUNITION", 0, null, null, null), list("M4RA AP Magazine (10x24mm)", 10, /obj/item/ammo_magazine/rifle/m4ra/ap, null, VENDOR_ITEM_REGULAR), list("M39 AP Magazine (10x20mm)", 10, /obj/item/ammo_magazine/smg/m39/ap, null, VENDOR_ITEM_REGULAR), - list("M39 Extended Magazine (10x20mm)", 10, /obj/item/ammo_magazine/smg/m39/extended, null, VENDOR_ITEM_REGULAR), list("M41A AP Magazine (10x24mm)", 10, /obj/item/ammo_magazine/rifle/ap, null, VENDOR_ITEM_REGULAR), - list("M41A Extended Magazine (10x24mm)", 10, /obj/item/ammo_magazine/rifle/extended, null, VENDOR_ITEM_REGULAR), list("M44 Heavy Speed Loader (.44)", 10, /obj/item/ammo_magazine/revolver/heavy, null, VENDOR_ITEM_REGULAR), list("UTILITIES", 0, null, null, null), diff --git a/code/game/machinery/vending/vendor_types/crew/vehicle_crew.dm b/code/game/machinery/vending/vendor_types/crew/vehicle_crew.dm index 023bbe390bfc..6f479c33d8c3 100644 --- a/code/game/machinery/vending/vendor_types/crew/vehicle_crew.dm +++ b/code/game/machinery/vending/vendor_types/crew/vehicle_crew.dm @@ -367,10 +367,8 @@ GLOBAL_LIST_INIT(cm_vending_clothing_vehicle_crew, list( list("AMMUNITION", 0, null, null, null), list("M4RA AP Magazine (10x24mm)", 10, /obj/item/ammo_magazine/rifle/m4ra/ap, null, VENDOR_ITEM_REGULAR), list("M39 AP Magazine (10x20mm)", 10, /obj/item/ammo_magazine/smg/m39/ap , null, VENDOR_ITEM_REGULAR), - list("M39 Extended Magazine (10x20mm)", 10, /obj/item/ammo_magazine/smg/m39/extended , null, VENDOR_ITEM_REGULAR), list("M40 HEDP Grenade", 10, /obj/item/explosive/grenade/high_explosive, null, VENDOR_ITEM_REGULAR), list("M41A AP Magazine (10x24mm)", 10, /obj/item/ammo_magazine/rifle/ap , null, VENDOR_ITEM_REGULAR), - list("M41A Extended Magazine (10x24mm)", 10, /obj/item/ammo_magazine/rifle/extended , null, VENDOR_ITEM_REGULAR), list("M44 Heavy Speed Loader (.44)", 10, /obj/item/ammo_magazine/revolver/heavy, null, VENDOR_ITEM_REGULAR), list("UTILITIES", 0, null, null, null), diff --git a/code/game/machinery/vending/vendor_types/intelligence_officer.dm b/code/game/machinery/vending/vendor_types/intelligence_officer.dm index 829c542f6b26..f68190a2ec41 100644 --- a/code/game/machinery/vending/vendor_types/intelligence_officer.dm +++ b/code/game/machinery/vending/vendor_types/intelligence_officer.dm @@ -26,9 +26,7 @@ GLOBAL_LIST_INIT(cm_vending_gear_intelligence_officer, list( list("PRIMARY AMMUNITION", 0, null, null, null), list("M4RA AP Magazine (10x24mm)", 10, /obj/item/ammo_magazine/rifle/m4ra/ap, null, VENDOR_ITEM_REGULAR), list("M39 AP Magazine (10x20mm)", 10, /obj/item/ammo_magazine/smg/m39/ap , null, VENDOR_ITEM_REGULAR), - list("M39 Extended Magazine (10x20mm)", 10, /obj/item/ammo_magazine/smg/m39/extended , null, VENDOR_ITEM_REGULAR), list("M41A AP Magazine (10x24mm)", 10, /obj/item/ammo_magazine/rifle/ap , null, VENDOR_ITEM_REGULAR), - list("M41A Extended Magazine (10x24mm)", 10, /obj/item/ammo_magazine/rifle/extended , null, VENDOR_ITEM_REGULAR), list("SIDEARM AMMUNITION", 0, null, null, null), list("M44 Heavy Speed Loader (.44)", 10, /obj/item/ammo_magazine/revolver/heavy, null, VENDOR_ITEM_REGULAR), diff --git a/code/game/machinery/vending/vendor_types/requisitions.dm b/code/game/machinery/vending/vendor_types/requisitions.dm index f85657e887a8..8ba9cedd5c54 100644 --- a/code/game/machinery/vending/vendor_types/requisitions.dm +++ b/code/game/machinery/vending/vendor_types/requisitions.dm @@ -36,7 +36,6 @@ list("MOU-53 Shotgun", round(scale * 2), /obj/item/storage/box/guncase/mou53, VENDOR_ITEM_REGULAR), list("XM88 Heavy Rifle", round(scale * 3), /obj/item/storage/box/guncase/xm88, VENDOR_ITEM_REGULAR), list("M41AE2 Heavy Pulse Rifle", round(scale * 2.5), /obj/item/storage/box/guncase/lmg, VENDOR_ITEM_REGULAR), - list("M41A Pulse Rifle MK1", round(scale * 3), /obj/item/storage/box/guncase/m41aMK1, VENDOR_ITEM_REGULAR), list("M56D Heavy Machine Gun", round(scale * 2), /obj/item/storage/box/guncase/m56d, VENDOR_ITEM_REGULAR), list("M2C Heavy Machine Gun", round(scale * 2), /obj/item/storage/box/guncase/m2c, VENDOR_ITEM_REGULAR), list("M240 Incinerator Unit", round(scale * 2), /obj/item/storage/box/guncase/flamer, VENDOR_ITEM_REGULAR), @@ -236,9 +235,6 @@ list("M41A MK2 AP Magazine (10x24mm)", round(scale * 10.5), /obj/item/ammo_magazine/rifle/ap, VENDOR_ITEM_REGULAR), list("M4A3 AP Magazine (9mm)", round(scale * 2), /obj/item/ammo_magazine/pistol/ap, VENDOR_ITEM_REGULAR), - list("EXTENDED AMMUNITION", -1, null, null), - list("M39 Extended Magazine (10x20mm)", round(scale * 9.5) + 3, /obj/item/ammo_magazine/smg/m39/extended, VENDOR_ITEM_REGULAR), - list("M41A MK2 Extended Magazine (10x24mm)", round(scale * 8.1), /obj/item/ammo_magazine/rifle/extended, VENDOR_ITEM_REGULAR), list("SPECIAL AMMUNITION", -1, null, null), list("M56 Battery", 4, /obj/item/smartgun_battery, VENDOR_ITEM_REGULAR), @@ -253,8 +249,6 @@ list("SU-6 Smartpistol Magazine (.45)", round(scale * 12,8), /obj/item/ammo_magazine/pistol/smart, VENDOR_ITEM_REGULAR), list("M240 Incinerator Tank", round(scale * 3), /obj/item/ammo_magazine/flamer_tank, VENDOR_ITEM_REGULAR), list("M41AE2 Box Magazine (10x24mm)", round(scale * 3), /obj/item/ammo_magazine/rifle/lmg, VENDOR_ITEM_REGULAR), - list("M41A MK1 Magazine (10x24mm)", round(scale * 4.5), /obj/item/ammo_magazine/rifle/m41aMK1, VENDOR_ITEM_REGULAR), - list("M41A MK1 AP Magazine (10x24mm)", round(scale * 2), /obj/item/ammo_magazine/rifle/m41aMK1/ap, VENDOR_ITEM_REGULAR), list("M56D Drum Magazine", round(scale * 2), /obj/item/ammo_magazine/m56d, VENDOR_ITEM_REGULAR), list("M2C Box Magazine", round(scale * 2), /obj/item/ammo_magazine/m2c, VENDOR_ITEM_REGULAR), diff --git a/code/game/machinery/vending/vendor_types/squad_prep/squad_engineer.dm b/code/game/machinery/vending/vendor_types/squad_prep/squad_engineer.dm index 05784ec3c161..78b3cbfbe5c9 100644 --- a/code/game/machinery/vending/vendor_types/squad_prep/squad_engineer.dm +++ b/code/game/machinery/vending/vendor_types/squad_prep/squad_engineer.dm @@ -42,9 +42,7 @@ GLOBAL_LIST_INIT(cm_vending_gear_engi, list( list("AMMUNITION", 0, null, null, null), list("M4RA AP Magazine (10x24mm)", 6, /obj/item/ammo_magazine/rifle/m4ra/ap, null, VENDOR_ITEM_REGULAR), list("M39 AP Magazine (10x20mm)", 6, /obj/item/ammo_magazine/smg/m39/ap , null, VENDOR_ITEM_REGULAR), - list("M39 Extended Magazine (10x20mm)", 6, /obj/item/ammo_magazine/smg/m39/extended , null, VENDOR_ITEM_REGULAR), list("M41A AP Magazine (10x24mm)", 6, /obj/item/ammo_magazine/rifle/ap , null, VENDOR_ITEM_REGULAR), - list("M41A Extended Magazine (10x24mm)", 6, /obj/item/ammo_magazine/rifle/extended , null, VENDOR_ITEM_REGULAR), list("RESTRICTED FIREARMS", 0, null, null, null), list("VP78 Pistol", 8, /obj/item/storage/box/guncase/vp78, null, VENDOR_ITEM_REGULAR), diff --git a/code/game/machinery/vending/vendor_types/squad_prep/squad_leader.dm b/code/game/machinery/vending/vendor_types/squad_prep/squad_leader.dm index fdfdabd8335e..e4a6e580c00d 100644 --- a/code/game/machinery/vending/vendor_types/squad_prep/squad_leader.dm +++ b/code/game/machinery/vending/vendor_types/squad_prep/squad_leader.dm @@ -73,9 +73,7 @@ GLOBAL_LIST_INIT(cm_vending_gear_leader, list( list("SPECIAL AMMUNITION", 0, null, null, null), list("M4RA AP Magazine (10x24mm)", 6, /obj/item/ammo_magazine/rifle/m4ra/ap, null, VENDOR_ITEM_REGULAR), list("M39 AP Magazine (10x20mm)", 6, /obj/item/ammo_magazine/smg/m39/ap , null, VENDOR_ITEM_REGULAR), - list("M39 Extended Magazine (10x20mm)", 6, /obj/item/ammo_magazine/smg/m39/extended , null, VENDOR_ITEM_REGULAR), list("M41A AP Magazine (10x24mm)", 6, /obj/item/ammo_magazine/rifle/ap , null, VENDOR_ITEM_REGULAR), - list("M41A Extended Magazine (10x24mm)", 6, /obj/item/ammo_magazine/rifle/extended , null, VENDOR_ITEM_REGULAR), list("M240 Incinerator Tank (Napthal)", 3, /obj/item/ammo_magazine/flamer_tank, null, VENDOR_ITEM_REGULAR), list("M240 Incinerator Tank (B-Gel)", 3, /obj/item/ammo_magazine/flamer_tank/gellied, null, VENDOR_ITEM_REGULAR), diff --git a/code/game/machinery/vending/vendor_types/squad_prep/squad_medic.dm b/code/game/machinery/vending/vendor_types/squad_prep/squad_medic.dm index 532c8e58dd02..9607f3d76c27 100644 --- a/code/game/machinery/vending/vendor_types/squad_prep/squad_medic.dm +++ b/code/game/machinery/vending/vendor_types/squad_prep/squad_medic.dm @@ -63,9 +63,7 @@ GLOBAL_LIST_INIT(cm_vending_gear_medic, list( list("AMMUNITION", 0, null, null, null), list("M4RA AP Magazine (10x24mm)", 6, /obj/item/ammo_magazine/rifle/m4ra/ap, null, VENDOR_ITEM_REGULAR), list("M39 AP Magazine (10x20mm)", 6, /obj/item/ammo_magazine/smg/m39/ap , null, VENDOR_ITEM_REGULAR), - list("M39 Extended Magazine (10x20mm)", 6, /obj/item/ammo_magazine/smg/m39/extended , null, VENDOR_ITEM_REGULAR), list("M41A AP Magazine (10x24mm)", 6, /obj/item/ammo_magazine/rifle/ap , null, VENDOR_ITEM_REGULAR), - list("M41A Extended Magazine (10x24mm)", 6, /obj/item/ammo_magazine/rifle/extended , null, VENDOR_ITEM_REGULAR), list("RESTRICTED FIREARMS", 0, null, null, null), list("VP78 Pistol", 8, /obj/item/storage/box/guncase/vp78, null, VENDOR_ITEM_REGULAR), diff --git a/code/game/machinery/vending/vendor_types/squad_prep/squad_prep.dm b/code/game/machinery/vending/vendor_types/squad_prep/squad_prep.dm index 9775c20cac33..d5c8bb74a5a3 100644 --- a/code/game/machinery/vending/vendor_types/squad_prep/squad_prep.dm +++ b/code/game/machinery/vending/vendor_types/squad_prep/squad_prep.dm @@ -177,10 +177,6 @@ list("M39 AP Magazine (10x20mm)", round(scale * 3), /obj/item/ammo_magazine/smg/m39/ap, VENDOR_ITEM_REGULAR), list("M41A AP Magazine (10x24mm)", round(scale * 3), /obj/item/ammo_magazine/rifle/ap, VENDOR_ITEM_REGULAR), - list("EXTENDED AMMUNITION", -1, null, null), - list("M39 Extended Magazine (10x20mm)", round(scale * 1.8), /obj/item/ammo_magazine/smg/m39/extended, VENDOR_ITEM_REGULAR), - list("M41A Extended Magazine (10x24mm)", round(scale * 1.9), /obj/item/ammo_magazine/rifle/extended, VENDOR_ITEM_REGULAR), - list("SPECIAL AMMUNITION", -1, null, null), list("M56 Smartgun Drum", 1, /obj/item/ammo_magazine/smartgun, VENDOR_ITEM_REGULAR), list("M44 Heavy Speed Loader (.44)", round(scale * 2), /obj/item/ammo_magazine/revolver/heavy, VENDOR_ITEM_REGULAR), diff --git a/code/game/machinery/vending/vendor_types/squad_prep/squad_rifleman.dm b/code/game/machinery/vending/vendor_types/squad_prep/squad_rifleman.dm index 543288c71706..1188cf66a53b 100644 --- a/code/game/machinery/vending/vendor_types/squad_prep/squad_rifleman.dm +++ b/code/game/machinery/vending/vendor_types/squad_prep/squad_rifleman.dm @@ -64,9 +64,7 @@ GLOBAL_LIST_INIT(cm_vending_clothing_marine, list( list("AMMUNITION", 0, null, null, null), list("M4RA AP Magazine (10x24mm)", 10, /obj/item/ammo_magazine/rifle/m4ra/ap, null, VENDOR_ITEM_REGULAR), list("M39 AP Magazine (10x20mm)", 10, /obj/item/ammo_magazine/smg/m39/ap , null, VENDOR_ITEM_REGULAR), - list("M39 Extended Magazine (10x20mm)", 10, /obj/item/ammo_magazine/smg/m39/extended , null, VENDOR_ITEM_REGULAR), list("M41A AP Magazine (10x24mm)", 10, /obj/item/ammo_magazine/rifle/ap , null, VENDOR_ITEM_REGULAR), - list("M41A Extended Magazine (10x24mm)", 10, /obj/item/ammo_magazine/rifle/extended , null, VENDOR_ITEM_REGULAR), list("M44 Heavy Speed Loader (.44)", 10, /obj/item/ammo_magazine/revolver/heavy, null, VENDOR_ITEM_REGULAR), list("UTILITIES", 0, null, null, null), diff --git a/code/game/machinery/vending/vendor_types/squad_prep/squad_tl.dm b/code/game/machinery/vending/vendor_types/squad_prep/squad_tl.dm index 4311a3982c86..944a9c43627c 100644 --- a/code/game/machinery/vending/vendor_types/squad_prep/squad_tl.dm +++ b/code/game/machinery/vending/vendor_types/squad_prep/squad_tl.dm @@ -5,9 +5,7 @@ GLOBAL_LIST_INIT(cm_vending_gear_tl, list( list("AMMUNITION", 0, null, null, null), list("M4RA AP Magazine (10x24mm)", 10, /obj/item/ammo_magazine/rifle/m4ra/ap, null, VENDOR_ITEM_REGULAR), list("M39 AP Magazine (10x20mm)", 10, /obj/item/ammo_magazine/smg/m39/ap , null, VENDOR_ITEM_REGULAR), - list("M39 Extended Magazine (10x20mm)", 10, /obj/item/ammo_magazine/smg/m39/extended , null, VENDOR_ITEM_REGULAR), list("M41A AP Magazine (10x24mm)", 10, /obj/item/ammo_magazine/rifle/ap , null, VENDOR_ITEM_REGULAR), - list("M41A Extended Magazine (10x24mm)", 10, /obj/item/ammo_magazine/rifle/extended , null, VENDOR_ITEM_REGULAR), list("M44 Heavy Speed Loader (.44)", 10, /obj/item/ammo_magazine/revolver/heavy, null, VENDOR_ITEM_REGULAR), list("M4A3 HP Magazine", 5, /obj/item/ammo_magazine/pistol/hp, null, VENDOR_ITEM_REGULAR), list("M4A3 AP Magazine", 5, /obj/item/ammo_magazine/pistol/ap, null, VENDOR_ITEM_REGULAR), diff --git a/code/game/objects/items/storage/backpack.dm b/code/game/objects/items/storage/backpack.dm index e36225177d91..53c3d2e0f2b4 100644 --- a/code/game/objects/items/storage/backpack.dm +++ b/code/game/objects/items/storage/backpack.dm @@ -410,7 +410,7 @@ throw_range = 0 xeno_types = null var/base_icon_state = "ammo_pack" - var/move_delay_mult = 0.4 + var/move_delay_mult = 0.6 /obj/item/storage/backpack/marine/ammo_rack/update_icon() . = ..() diff --git a/code/game/objects/structures/crates_lockers/largecrate.dm b/code/game/objects/structures/crates_lockers/largecrate.dm index 2393b5df8265..2a37e72470b2 100644 --- a/code/game/objects/structures/crates_lockers/largecrate.dm +++ b/code/game/objects/structures/crates_lockers/largecrate.dm @@ -194,12 +194,12 @@ /obj/item/ammo_magazine/pistol, /obj/item/ammo_magazine/revolver, /obj/item/ammo_magazine/rifle, - /obj/item/ammo_magazine/rifle/extended, + /obj/item/ammo_magazine/rifle, /obj/item/ammo_magazine/shotgun, /obj/item/ammo_magazine/shotgun/buckshot, /obj/item/ammo_magazine/shotgun/flechette, /obj/item/ammo_magazine/smg/m39, - /obj/item/ammo_magazine/smg/m39/extended, + /obj/item/ammo_magazine/smg/m39, ) /obj/structure/largecrate/random/mini/med diff --git a/code/modules/projectiles/ammo_boxes/ammo_boxes.dm b/code/modules/projectiles/ammo_boxes/ammo_boxes.dm index 69179a209f8b..e08c48260ab6 100644 --- a/code/modules/projectiles/ammo_boxes/ammo_boxes.dm +++ b/code/modules/projectiles/ammo_boxes/ammo_boxes.dm @@ -45,7 +45,7 @@ /obj/item/ammo_box/proc/deploy_ammo_box(mob/user, turf/T) user.drop_held_item() - + //---------------------FIRE HANDLING PROCS /obj/item/ammo_box/flamer_fire_act(severity, datum/cause_data/flame_cause_data) if(burning) @@ -260,10 +260,9 @@ /obj/item/ammo_box/rounds name = "\improper rifle ammunition box (10x24mm)" - desc = "A 10x24mm ammunition box. Used to refill M41A MK1, MK2, M4RA and M41AE2 HPR magazines. It comes with a leather strap allowing to wear it on the back." + desc = "A 10x24mm ammunition box. Used to refill M41A MK1, MK2, M4RA and M41AE2 HPR magazines." icon_state = "base_m41" item_state = "base_m41" - flags_equip_slot = SLOT_BACK var/overlay_gun_type = "_rounds" //used for ammo type color overlay var/overlay_content = "_reg" var/default_ammo = /datum/ammo/bullet/rifle diff --git a/code/modules/projectiles/ammo_boxes/handful_boxes.dm b/code/modules/projectiles/ammo_boxes/handful_boxes.dm index 28eab8463011..76f11ba4b5aa 100644 --- a/code/modules/projectiles/ammo_boxes/handful_boxes.dm +++ b/code/modules/projectiles/ammo_boxes/handful_boxes.dm @@ -4,7 +4,6 @@ /obj/item/ammo_box/magazine/shotgun name = "\improper shotgun shell box (Slugs x 100)" icon_state = "base_slug" - flags_equip_slot = SLOT_BACK overlay_ammo_type = "" overlay_gun_type = "_shells" overlay_content = "_slug" diff --git a/code/modules/projectiles/ammo_boxes/magazine_boxes.dm b/code/modules/projectiles/ammo_boxes/magazine_boxes.dm index ff90a6659fb2..a9cd76fd025c 100644 --- a/code/modules/projectiles/ammo_boxes/magazine_boxes.dm +++ b/code/modules/projectiles/ammo_boxes/magazine_boxes.dm @@ -2,7 +2,6 @@ /obj/item/ammo_box/magazine/ap name = "\improper magazine box (AP M41A x 10)" - flags_equip_slot = SLOT_BACK overlay_ammo_type = "_ap" overlay_content = "_ap" magazine_type = /obj/item/ammo_magazine/rifle/ap @@ -12,7 +11,6 @@ /obj/item/ammo_box/magazine/le name = "\improper magazine box (LE M41A x 10)" - flags_equip_slot = SLOT_BACK overlay_ammo_type = "_le" overlay_content = "_le" magazine_type = /obj/item/ammo_magazine/rifle/le @@ -22,7 +20,6 @@ /obj/item/ammo_box/magazine/ext name = "\improper magazine box (Ext M41A x 8)" - flags_equip_slot = SLOT_BACK overlay_ammo_type = "_ext" num_of_magazines = 8 magazine_type = /obj/item/ammo_magazine/rifle/extended @@ -32,7 +29,6 @@ /obj/item/ammo_box/magazine/incen name = "\improper magazine box (Incen M41A x 10)" - flags_equip_slot = SLOT_BACK overlay_ammo_type = "_incen" overlay_content = "_incen" magazine_type = /obj/item/ammo_magazine/rifle/incendiary @@ -42,7 +38,6 @@ /obj/item/ammo_box/magazine/explosive name = "\improper magazine box (Explosive M41A x 10)" - flags_equip_slot = SLOT_BACK overlay_ammo_type = "_expl" overlay_content = "_expl" magazine_type = /obj/item/ammo_magazine/rifle/explosive @@ -52,7 +47,6 @@ /obj/item/ammo_box/magazine/heap name = "magazine box (HEAP M41A x 10)" - flags_equip_slot = SLOT_BACK overlay_ammo_type = "_heap" overlay_content = "_heap" magazine_type = /obj/item/ammo_magazine/rifle/heap @@ -65,7 +59,6 @@ /obj/item/ammo_box/magazine/m39 name = "\improper magazine box (M39 x 12)" icon_state = "base_m39" - flags_equip_slot = SLOT_BACK overlay_ammo_type = "_reg" overlay_gun_type = "_m39" overlay_content = "_hv" @@ -126,7 +119,6 @@ /obj/item/ammo_box/magazine/m4ra name = "\improper magazine box (M4RA x 16)" icon_state = "base_m4ra" - flags_equip_slot = SLOT_BACK overlay_gun_type = "_m4ra" num_of_magazines = 16 magazine_type = /obj/item/ammo_magazine/rifle/m4ra @@ -175,7 +167,6 @@ /obj/item/ammo_box/magazine/l42a name = "\improper magazine box (L42A x 16)" icon_state = "base_l42" - flags_equip_slot = SLOT_BACK overlay_gun_type = "_l42" num_of_magazines = 16 magazine_type = /obj/item/ammo_magazine/rifle/l42a @@ -234,7 +225,6 @@ /obj/item/ammo_box/magazine/M16 name = "\improper magazine box (M16 x 12)" icon_state = "base_m16" - flags_equip_slot = SLOT_BACK overlay_ammo_type = "_reg" overlay_gun_type = "_m16" num_of_magazines = 12 @@ -259,7 +249,6 @@ /obj/item/ammo_box/magazine/m4a3 name = "\improper magazine box (M4A3 x 16)" icon_state = "base_m4a3" - flags_equip_slot = SLOT_BACK overlay_ammo_type = "_reg" overlay_gun_type = "_m4a3" num_of_magazines = 16 @@ -291,7 +280,6 @@ /obj/item/ammo_box/magazine/m44 name = "\improper speed loaders box (M44 x 16)" icon_state = "base_m44" - flags_equip_slot = SLOT_BACK overlay_ammo_type = "_m44_reg" overlay_gun_type = "_m44" overlay_content = "_speed" @@ -322,7 +310,6 @@ /obj/item/ammo_box/magazine/su6 name = "\improper magazine box (SU-6 x 16)" icon_state = "base_su6" - flags_equip_slot = SLOT_BACK overlay_ammo_type = "_reg" overlay_gun_type = "_su6" num_of_magazines = 16 @@ -336,7 +323,6 @@ /obj/item/ammo_box/magazine/mod88 name = "\improper magazine box (88 Mod 4 AP x 16)" icon_state = "base_mod88" - flags_equip_slot = SLOT_BACK overlay_ammo_type = "_ap" overlay_gun_type = "_mod88" overlay_content = "_ap" @@ -351,7 +337,6 @@ /obj/item/ammo_box/magazine/vp78 name = "\improper magazine box (VP78 x 16)" icon_state = "base_vp78" - flags_equip_slot = SLOT_BACK overlay_ammo_type = "_reg" overlay_gun_type = "_vp78" num_of_magazines = 16 @@ -365,7 +350,6 @@ /obj/item/ammo_box/magazine/type71 name = "\improper magazine box (Type71 x 10)" icon_state = "base_type71" - flags_equip_slot = SLOT_BACK overlay_ammo_type = "_type71_reg" overlay_gun_type = "_type71" overlay_content = "_type71_reg" From 6edc71f0a0473379c5ac77f9a33cc7103299b10d Mon Sep 17 00:00:00 2001 From: John Doe Date: Tue, 1 Aug 2023 02:01:45 -0700 Subject: [PATCH 12/33] enables HPR ammo restocking --- code/__DEFINES/conflict.dm | 2 ++ code/_globalvars/bitfields.dm | 1 + code/modules/projectiles/ammunition.dm | 11 +++++++---- code/modules/projectiles/magazines/rifles.dm | 2 +- 4 files changed, 11 insertions(+), 5 deletions(-) diff --git a/code/__DEFINES/conflict.dm b/code/__DEFINES/conflict.dm index dab539bce8df..30b2627bb1b0 100644 --- a/code/__DEFINES/conflict.dm +++ b/code/__DEFINES/conflict.dm @@ -99,6 +99,8 @@ #define AMMUNITION_HANDFUL_BOX (1<<2) #define AMMUNITION_HIDE_AMMO (1<<3) #define AMMUNITION_CANNOT_REMOVE_BULLETS (1<<4) +/// If this magazine can transfer to other magazines of the same type by slapping one with the other +#define AMMUNITION_SLAP_TRANSFER (1<<5) //Slowdown from various armors. /// How much shoes slow you down by default. Negative values speed you up diff --git a/code/_globalvars/bitfields.dm b/code/_globalvars/bitfields.dm index ef539b8459c7..b409557485d9 100644 --- a/code/_globalvars/bitfields.dm +++ b/code/_globalvars/bitfields.dm @@ -128,6 +128,7 @@ DEFINE_BITFIELD(flags_magazine, list( "AMMUNITION_HANDFUL_BOX" = AMMUNITION_HANDFUL_BOX, "AMMUNITION_HIDE_AMMO" = AMMUNITION_HIDE_AMMO, "AMMUNITION_CANNOT_REMOVE_BULLETS" = AMMUNITION_CANNOT_REMOVE_BULLETS, + "AMMUNITION_SLAP_TRANSFER" = AMMUNITION_SLAP_TRANSFER, )) DEFINE_BITFIELD(flags_atom, list( diff --git a/code/modules/projectiles/ammunition.dm b/code/modules/projectiles/ammunition.dm index 1947f87c574a..d747525f3feb 100644 --- a/code/modules/projectiles/ammunition.dm +++ b/code/modules/projectiles/ammunition.dm @@ -116,14 +116,17 @@ They're all essentially identical when it comes to getting the job done. /obj/item/ammo_magazine/attackby(obj/item/I, mob/living/user, bypass_hold_check = 0) if(istype(I, /obj/item/ammo_magazine)) var/obj/item/ammo_magazine/MG = I - if(MG.flags_magazine & AMMUNITION_HANDFUL) //got a handful of bullets + if((MG.flags_magazine & AMMUNITION_HANDFUL) || (MG.flags_magazine & AMMUNITION_SLAP_TRANSFER)) //got a handful of bullets if(flags_magazine & AMMUNITION_REFILLABLE) //and a refillable magazine var/obj/item/ammo_magazine/handful/transfer_from = I if(src == user.get_inactive_hand() || bypass_hold_check) //It has to be held. if(default_ammo == transfer_from.default_ammo) - transfer_ammo(transfer_from,user,transfer_from.current_rounds) // This takes care of the rest. - else to_chat(user, "Those aren't the same rounds. Better not mix them up.") - else to_chat(user, "Try holding [src] before you attempt to restock it.") + if(transfer_ammo(transfer_from,user,transfer_from.current_rounds)) // This takes care of the rest. + to_chat(user, SPAN_NOTICE("You transfer rounds to [src] from [transfer_from].")) + else + to_chat(user, SPAN_NOTICE("Those aren't the same rounds. Better not mix them up.")) + else + to_chat(user, SPAN_NOTICE("Try holding [src] before you attempt to restock it.")) //Generic proc to transfer ammo between ammo mags. Can work for anything, mags, handfuls, etc. /obj/item/ammo_magazine/proc/transfer_ammo(obj/item/ammo_magazine/source, mob/user, transfer_amount = 1) diff --git a/code/modules/projectiles/magazines/rifles.dm b/code/modules/projectiles/magazines/rifles.dm index ca008c2d1376..57bcd7f0a563 100644 --- a/code/modules/projectiles/magazines/rifles.dm +++ b/code/modules/projectiles/magazines/rifles.dm @@ -263,7 +263,7 @@ icon_state = "m41ae2" max_rounds = 300 gun_type = /obj/item/weapon/gun/rifle/lmg - flags_magazine = AMMUNITION_CANNOT_REMOVE_BULLETS|AMMUNITION_REFILLABLE + flags_magazine = AMMUNITION_CANNOT_REMOVE_BULLETS|AMMUNITION_REFILLABLE|AMMUNITION_SLAP_TRANSFER ammo_band_icon = "+m41ae2_band" ammo_band_icon_empty = "+m41ae2_band_e" From 0c5e40e84e01a39f7fdd766dda4a0b3f99c7b407 Mon Sep 17 00:00:00 2001 From: John Doe Date: Tue, 1 Aug 2023 08:37:43 -0700 Subject: [PATCH 13/33] forgot a change --- code/datums/supply_packs/ammo.dm | 20 -------------------- 1 file changed, 20 deletions(-) diff --git a/code/datums/supply_packs/ammo.dm b/code/datums/supply_packs/ammo.dm index 5cd9232e7edb..59dfea6c6696 100644 --- a/code/datums/supply_packs/ammo.dm +++ b/code/datums/supply_packs/ammo.dm @@ -68,16 +68,6 @@ containername = "\improper M41A AP magazines crate" group = "Ammo" -/datum/supply_packs/ammo_mag_box_ext - name = "Magazine box (M41A, 8x extended mags)" - contains = list( - /obj/item/ammo_box/magazine/ext, - ) - cost = 30 - containertype = /obj/structure/closet/crate/ammo - containername = "\improper M41A extended magazines crate" - group = "Ammo" - //------------------------For M4RA---------------- /datum/supply_packs/ammo_dmr_mag_box @@ -122,16 +112,6 @@ containername = "\improper M39 AP magazines crate" group = "Ammo" -/datum/supply_packs/ammo_smg_mag_box_ext - name = "Magazine box (M39, 10x extended mags)" - contains = list( - /obj/item/ammo_box/magazine/m39/ext, - ) - cost = 30 - containertype = /obj/structure/closet/crate/ammo - containername = "\improper M39 extended magazines crate" - group = "Ammo" - //------------------------For M4RA---------------- /datum/supply_packs/ammo_m4ra_mag_box From acc9ccc34bcafae20953bb8cf2a40c6221eeb179 Mon Sep 17 00:00:00 2001 From: John Doe Date: Tue, 1 Aug 2023 13:42:25 -0700 Subject: [PATCH 14/33] mar50 --- code/datums/supply_packs/black_market.dm | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/code/datums/supply_packs/black_market.dm b/code/datums/supply_packs/black_market.dm index 65b15997d1b4..3f4453d03f32 100644 --- a/code/datums/supply_packs/black_market.dm +++ b/code/datums/supply_packs/black_market.dm @@ -184,10 +184,9 @@ Non-USCM items, from CLF, UPP, colonies, etc. Mostly combat-related. new /obj/item/ammo_magazine/rifle/mar40/extended(src) new /obj/item/ammo_magazine/rifle/mar40(src) else - new /obj/item/weapon/gun/rifle/m41aMK1/tactical(src) - new /obj/item/ammo_magazine/rifle/m41aMK1/ap(src) - new /obj/item/ammo_magazine/rifle/m41aMK1(src) - new /obj/item/ammo_magazine/rifle/m41aMK1(src) + new /obj/item/weapon/gun/rifle/mar40/lmg(src) + new /obj/item/ammo_magazine/rifle/mar40/lmg(src) + new /obj/item/ammo_magazine/rifle/mar40/lmg(src) /* Misc. Individual Guns */ From c30502ac580319da13a086699a7d13dc2e990edf Mon Sep 17 00:00:00 2001 From: John Doe Date: Sat, 5 Aug 2023 16:04:44 -0700 Subject: [PATCH 15/33] Revert "ammo economy rework" This reverts commit ccc6fffe81a279e1cccc251aa22aabc870c21793. --- code/datums/supply_packs/ammo.dm | 2 ++ code/datums/supply_packs/weapons.dm | 13 +++++++++++++ .../vending/vendor_types/crew/pilot_officer.dm | 12 ++++++++---- .../vending/vendor_types/crew/vehicle_crew.dm | 2 ++ .../vending/vendor_types/intelligence_officer.dm | 2 ++ .../vending/vendor_types/requisitions.dm | 6 ++++++ .../vendor_types/squad_prep/squad_engineer.dm | 2 ++ .../vendor_types/squad_prep/squad_leader.dm | 2 ++ .../vendor_types/squad_prep/squad_medic.dm | 2 ++ .../vendor_types/squad_prep/squad_prep.dm | 4 ++++ .../vendor_types/squad_prep/squad_rifleman.dm | 2 ++ .../vending/vendor_types/squad_prep/squad_tl.dm | 2 ++ code/game/objects/items/storage/backpack.dm | 2 +- .../structures/crates_lockers/largecrate.dm | 4 ++-- .../modules/projectiles/ammo_boxes/ammo_boxes.dm | 5 +++-- .../projectiles/ammo_boxes/handful_boxes.dm | 1 + .../projectiles/ammo_boxes/magazine_boxes.dm | 16 ++++++++++++++++ 17 files changed, 70 insertions(+), 9 deletions(-) diff --git a/code/datums/supply_packs/ammo.dm b/code/datums/supply_packs/ammo.dm index 59dfea6c6696..092bf92ecd4e 100644 --- a/code/datums/supply_packs/ammo.dm +++ b/code/datums/supply_packs/ammo.dm @@ -395,6 +395,7 @@ /obj/item/ammo_magazine/rifle, /obj/item/ammo_magazine/rifle, /obj/item/ammo_magazine/rifle, + /obj/item/ammo_magazine/rifle/extended, /obj/item/ammo_magazine/rifle/ap, /obj/item/ammo_magazine/rifle/incendiary, /obj/item/ammo_magazine/rifle/m4ra/incendiary, @@ -409,6 +410,7 @@ /obj/item/ammo_magazine/smg/m39, /obj/item/ammo_magazine/smg/m39, /obj/item/ammo_magazine/smg/m39, + /obj/item/ammo_magazine/smg/m39/extended, /obj/item/ammo_magazine/smg/m39/ap, /obj/item/ammo_magazine/smg/m39/ap, /obj/item/ammo_magazine/revolver, diff --git a/code/datums/supply_packs/weapons.dm b/code/datums/supply_packs/weapons.dm index ff47cdfe9f3a..a28e0c7191ce 100644 --- a/code/datums/supply_packs/weapons.dm +++ b/code/datums/supply_packs/weapons.dm @@ -86,6 +86,19 @@ group = "Weapons" /datum/supply_packs/gun + contains = list( + /obj/item/weapon/gun/rifle/m41aMK1, + /obj/item/weapon/gun/rifle/m41aMK1, + /obj/item/ammo_magazine/rifle/m41aMK1, + /obj/item/ammo_magazine/rifle/m41aMK1, + ) + name = "M41A MK1 Rifle Crate (x2 MK1, x2 magazines)" + cost = 40 + containertype = /obj/structure/closet/crate/weapon + containername = "M41A MK1 Rifle Crate" + group = "Weapons" + +/datum/supply_packs/gun/heavyweapons contains = list( /obj/item/storage/box/guncase/lmg, /obj/item/storage/box/guncase/lmg, diff --git a/code/game/machinery/vending/vendor_types/crew/pilot_officer.dm b/code/game/machinery/vending/vendor_types/crew/pilot_officer.dm index 86c8b8542783..231e02bb5118 100644 --- a/code/game/machinery/vending/vendor_types/crew/pilot_officer.dm +++ b/code/game/machinery/vending/vendor_types/crew/pilot_officer.dm @@ -65,11 +65,11 @@ GLOBAL_LIST_INIT(cm_vending_clothing_pilot_officer, list( list("M30 Tactical Helmet", 0, /obj/item/clothing/head/helmet/marine/pilot, MARINE_CAN_BUY_HELMET, VENDOR_ITEM_MANDATORY), list("Leather Satchel", 0, /obj/item/storage/backpack/satchel, MARINE_CAN_BUY_BACKPACK, VENDOR_ITEM_MANDATORY), list("MRE", 0, /obj/item/storage/box/MRE, MARINE_CAN_BUY_MRE, VENDOR_ITEM_MANDATORY), - + list("ARMOR (CHOOSE 1)", 0, null, null, null), list("M70 Flak Jacket", 0, /obj/item/clothing/suit/armor/vest/pilot, MARINE_CAN_BUY_ARMOR, VENDOR_ITEM_MANDATORY), list("M3-VL Pattern Flak Vest", 0, /obj/item/clothing/suit/storage/marine/light/vest/dcc, MARINE_CAN_BUY_ARMOR, VENDOR_ITEM_MANDATORY), - + list("PERSONAL SIDEARM (CHOOSE 1)", 0, null, null, null), list("88 Mod 4 Combat Pistol", 0, /obj/item/weapon/gun/pistol/mod88, MARINE_CAN_BUY_ATTACHMENT, VENDOR_ITEM_REGULAR), list("VP78 Pistol", 0, /obj/item/weapon/gun/pistol/vp78, MARINE_CAN_BUY_ATTACHMENT, VENDOR_ITEM_REGULAR), @@ -133,7 +133,9 @@ GLOBAL_LIST_INIT(cm_vending_clothing_pilot_officer, list( list("AMMUNITION", 0, null, null, null), list("M4RA AP Magazine (10x24mm)", 10, /obj/item/ammo_magazine/rifle/m4ra/ap, null, VENDOR_ITEM_REGULAR), list("M39 AP Magazine (10x20mm)", 10, /obj/item/ammo_magazine/smg/m39/ap, null, VENDOR_ITEM_REGULAR), + list("M39 Extended Magazine (10x20mm)", 10, /obj/item/ammo_magazine/smg/m39/extended, null, VENDOR_ITEM_REGULAR), list("M41A AP Magazine (10x24mm)", 10, /obj/item/ammo_magazine/rifle/ap, null, VENDOR_ITEM_REGULAR), + list("M41A Extended Magazine (10x24mm)", 10, /obj/item/ammo_magazine/rifle/extended, null, VENDOR_ITEM_REGULAR), list("M44 Heavy Speed Loader (.44)", 10, /obj/item/ammo_magazine/revolver/heavy, null, VENDOR_ITEM_REGULAR), list("UTILITIES", 0, null, null, null), @@ -151,8 +153,8 @@ GLOBAL_LIST_INIT(cm_vending_clothing_dropship_crew_chief, list( list("Gloves", 0, /obj/item/clothing/gloves/yellow, MARINE_CAN_BUY_GLOVES, VENDOR_ITEM_MANDATORY), list("Patrol Cap", 0, /obj/item/clothing/head/cmcap, MARINE_CAN_BUY_HELMET, VENDOR_ITEM_MANDATORY), list("Leather Satchel", 0, /obj/item/storage/backpack/satchel, MARINE_CAN_BUY_BACKPACK, VENDOR_ITEM_MANDATORY), - list("MRE", 0, /obj/item/storage/box/MRE, MARINE_CAN_BUY_MRE, VENDOR_ITEM_MANDATORY), - + list("MRE", 0, /obj/item/storage/box/MRE, MARINE_CAN_BUY_MRE, VENDOR_ITEM_MANDATORY), + list("ARMOR (CHOOSE 1)", 0, null, null, null), list("M70 Flak Jacket", 0, /obj/item/clothing/suit/armor/vest/pilot, MARINE_CAN_BUY_ARMOR, VENDOR_ITEM_MANDATORY), list("M3-VL Pattern Flak Vest", 0, /obj/item/clothing/suit/storage/marine/light/vest/dcc, MARINE_CAN_BUY_ARMOR, VENDOR_ITEM_MANDATORY), @@ -221,7 +223,9 @@ GLOBAL_LIST_INIT(cm_vending_clothing_dropship_crew_chief, list( list("AMMUNITION", 0, null, null, null), list("M4RA AP Magazine (10x24mm)", 10, /obj/item/ammo_magazine/rifle/m4ra/ap, null, VENDOR_ITEM_REGULAR), list("M39 AP Magazine (10x20mm)", 10, /obj/item/ammo_magazine/smg/m39/ap, null, VENDOR_ITEM_REGULAR), + list("M39 Extended Magazine (10x20mm)", 10, /obj/item/ammo_magazine/smg/m39/extended, null, VENDOR_ITEM_REGULAR), list("M41A AP Magazine (10x24mm)", 10, /obj/item/ammo_magazine/rifle/ap, null, VENDOR_ITEM_REGULAR), + list("M41A Extended Magazine (10x24mm)", 10, /obj/item/ammo_magazine/rifle/extended, null, VENDOR_ITEM_REGULAR), list("M44 Heavy Speed Loader (.44)", 10, /obj/item/ammo_magazine/revolver/heavy, null, VENDOR_ITEM_REGULAR), list("UTILITIES", 0, null, null, null), diff --git a/code/game/machinery/vending/vendor_types/crew/vehicle_crew.dm b/code/game/machinery/vending/vendor_types/crew/vehicle_crew.dm index 6f479c33d8c3..023bbe390bfc 100644 --- a/code/game/machinery/vending/vendor_types/crew/vehicle_crew.dm +++ b/code/game/machinery/vending/vendor_types/crew/vehicle_crew.dm @@ -367,8 +367,10 @@ GLOBAL_LIST_INIT(cm_vending_clothing_vehicle_crew, list( list("AMMUNITION", 0, null, null, null), list("M4RA AP Magazine (10x24mm)", 10, /obj/item/ammo_magazine/rifle/m4ra/ap, null, VENDOR_ITEM_REGULAR), list("M39 AP Magazine (10x20mm)", 10, /obj/item/ammo_magazine/smg/m39/ap , null, VENDOR_ITEM_REGULAR), + list("M39 Extended Magazine (10x20mm)", 10, /obj/item/ammo_magazine/smg/m39/extended , null, VENDOR_ITEM_REGULAR), list("M40 HEDP Grenade", 10, /obj/item/explosive/grenade/high_explosive, null, VENDOR_ITEM_REGULAR), list("M41A AP Magazine (10x24mm)", 10, /obj/item/ammo_magazine/rifle/ap , null, VENDOR_ITEM_REGULAR), + list("M41A Extended Magazine (10x24mm)", 10, /obj/item/ammo_magazine/rifle/extended , null, VENDOR_ITEM_REGULAR), list("M44 Heavy Speed Loader (.44)", 10, /obj/item/ammo_magazine/revolver/heavy, null, VENDOR_ITEM_REGULAR), list("UTILITIES", 0, null, null, null), diff --git a/code/game/machinery/vending/vendor_types/intelligence_officer.dm b/code/game/machinery/vending/vendor_types/intelligence_officer.dm index f68190a2ec41..829c542f6b26 100644 --- a/code/game/machinery/vending/vendor_types/intelligence_officer.dm +++ b/code/game/machinery/vending/vendor_types/intelligence_officer.dm @@ -26,7 +26,9 @@ GLOBAL_LIST_INIT(cm_vending_gear_intelligence_officer, list( list("PRIMARY AMMUNITION", 0, null, null, null), list("M4RA AP Magazine (10x24mm)", 10, /obj/item/ammo_magazine/rifle/m4ra/ap, null, VENDOR_ITEM_REGULAR), list("M39 AP Magazine (10x20mm)", 10, /obj/item/ammo_magazine/smg/m39/ap , null, VENDOR_ITEM_REGULAR), + list("M39 Extended Magazine (10x20mm)", 10, /obj/item/ammo_magazine/smg/m39/extended , null, VENDOR_ITEM_REGULAR), list("M41A AP Magazine (10x24mm)", 10, /obj/item/ammo_magazine/rifle/ap , null, VENDOR_ITEM_REGULAR), + list("M41A Extended Magazine (10x24mm)", 10, /obj/item/ammo_magazine/rifle/extended , null, VENDOR_ITEM_REGULAR), list("SIDEARM AMMUNITION", 0, null, null, null), list("M44 Heavy Speed Loader (.44)", 10, /obj/item/ammo_magazine/revolver/heavy, null, VENDOR_ITEM_REGULAR), diff --git a/code/game/machinery/vending/vendor_types/requisitions.dm b/code/game/machinery/vending/vendor_types/requisitions.dm index 8ba9cedd5c54..f85657e887a8 100644 --- a/code/game/machinery/vending/vendor_types/requisitions.dm +++ b/code/game/machinery/vending/vendor_types/requisitions.dm @@ -36,6 +36,7 @@ list("MOU-53 Shotgun", round(scale * 2), /obj/item/storage/box/guncase/mou53, VENDOR_ITEM_REGULAR), list("XM88 Heavy Rifle", round(scale * 3), /obj/item/storage/box/guncase/xm88, VENDOR_ITEM_REGULAR), list("M41AE2 Heavy Pulse Rifle", round(scale * 2.5), /obj/item/storage/box/guncase/lmg, VENDOR_ITEM_REGULAR), + list("M41A Pulse Rifle MK1", round(scale * 3), /obj/item/storage/box/guncase/m41aMK1, VENDOR_ITEM_REGULAR), list("M56D Heavy Machine Gun", round(scale * 2), /obj/item/storage/box/guncase/m56d, VENDOR_ITEM_REGULAR), list("M2C Heavy Machine Gun", round(scale * 2), /obj/item/storage/box/guncase/m2c, VENDOR_ITEM_REGULAR), list("M240 Incinerator Unit", round(scale * 2), /obj/item/storage/box/guncase/flamer, VENDOR_ITEM_REGULAR), @@ -235,6 +236,9 @@ list("M41A MK2 AP Magazine (10x24mm)", round(scale * 10.5), /obj/item/ammo_magazine/rifle/ap, VENDOR_ITEM_REGULAR), list("M4A3 AP Magazine (9mm)", round(scale * 2), /obj/item/ammo_magazine/pistol/ap, VENDOR_ITEM_REGULAR), + list("EXTENDED AMMUNITION", -1, null, null), + list("M39 Extended Magazine (10x20mm)", round(scale * 9.5) + 3, /obj/item/ammo_magazine/smg/m39/extended, VENDOR_ITEM_REGULAR), + list("M41A MK2 Extended Magazine (10x24mm)", round(scale * 8.1), /obj/item/ammo_magazine/rifle/extended, VENDOR_ITEM_REGULAR), list("SPECIAL AMMUNITION", -1, null, null), list("M56 Battery", 4, /obj/item/smartgun_battery, VENDOR_ITEM_REGULAR), @@ -249,6 +253,8 @@ list("SU-6 Smartpistol Magazine (.45)", round(scale * 12,8), /obj/item/ammo_magazine/pistol/smart, VENDOR_ITEM_REGULAR), list("M240 Incinerator Tank", round(scale * 3), /obj/item/ammo_magazine/flamer_tank, VENDOR_ITEM_REGULAR), list("M41AE2 Box Magazine (10x24mm)", round(scale * 3), /obj/item/ammo_magazine/rifle/lmg, VENDOR_ITEM_REGULAR), + list("M41A MK1 Magazine (10x24mm)", round(scale * 4.5), /obj/item/ammo_magazine/rifle/m41aMK1, VENDOR_ITEM_REGULAR), + list("M41A MK1 AP Magazine (10x24mm)", round(scale * 2), /obj/item/ammo_magazine/rifle/m41aMK1/ap, VENDOR_ITEM_REGULAR), list("M56D Drum Magazine", round(scale * 2), /obj/item/ammo_magazine/m56d, VENDOR_ITEM_REGULAR), list("M2C Box Magazine", round(scale * 2), /obj/item/ammo_magazine/m2c, VENDOR_ITEM_REGULAR), diff --git a/code/game/machinery/vending/vendor_types/squad_prep/squad_engineer.dm b/code/game/machinery/vending/vendor_types/squad_prep/squad_engineer.dm index 78b3cbfbe5c9..05784ec3c161 100644 --- a/code/game/machinery/vending/vendor_types/squad_prep/squad_engineer.dm +++ b/code/game/machinery/vending/vendor_types/squad_prep/squad_engineer.dm @@ -42,7 +42,9 @@ GLOBAL_LIST_INIT(cm_vending_gear_engi, list( list("AMMUNITION", 0, null, null, null), list("M4RA AP Magazine (10x24mm)", 6, /obj/item/ammo_magazine/rifle/m4ra/ap, null, VENDOR_ITEM_REGULAR), list("M39 AP Magazine (10x20mm)", 6, /obj/item/ammo_magazine/smg/m39/ap , null, VENDOR_ITEM_REGULAR), + list("M39 Extended Magazine (10x20mm)", 6, /obj/item/ammo_magazine/smg/m39/extended , null, VENDOR_ITEM_REGULAR), list("M41A AP Magazine (10x24mm)", 6, /obj/item/ammo_magazine/rifle/ap , null, VENDOR_ITEM_REGULAR), + list("M41A Extended Magazine (10x24mm)", 6, /obj/item/ammo_magazine/rifle/extended , null, VENDOR_ITEM_REGULAR), list("RESTRICTED FIREARMS", 0, null, null, null), list("VP78 Pistol", 8, /obj/item/storage/box/guncase/vp78, null, VENDOR_ITEM_REGULAR), diff --git a/code/game/machinery/vending/vendor_types/squad_prep/squad_leader.dm b/code/game/machinery/vending/vendor_types/squad_prep/squad_leader.dm index e4a6e580c00d..fdfdabd8335e 100644 --- a/code/game/machinery/vending/vendor_types/squad_prep/squad_leader.dm +++ b/code/game/machinery/vending/vendor_types/squad_prep/squad_leader.dm @@ -73,7 +73,9 @@ GLOBAL_LIST_INIT(cm_vending_gear_leader, list( list("SPECIAL AMMUNITION", 0, null, null, null), list("M4RA AP Magazine (10x24mm)", 6, /obj/item/ammo_magazine/rifle/m4ra/ap, null, VENDOR_ITEM_REGULAR), list("M39 AP Magazine (10x20mm)", 6, /obj/item/ammo_magazine/smg/m39/ap , null, VENDOR_ITEM_REGULAR), + list("M39 Extended Magazine (10x20mm)", 6, /obj/item/ammo_magazine/smg/m39/extended , null, VENDOR_ITEM_REGULAR), list("M41A AP Magazine (10x24mm)", 6, /obj/item/ammo_magazine/rifle/ap , null, VENDOR_ITEM_REGULAR), + list("M41A Extended Magazine (10x24mm)", 6, /obj/item/ammo_magazine/rifle/extended , null, VENDOR_ITEM_REGULAR), list("M240 Incinerator Tank (Napthal)", 3, /obj/item/ammo_magazine/flamer_tank, null, VENDOR_ITEM_REGULAR), list("M240 Incinerator Tank (B-Gel)", 3, /obj/item/ammo_magazine/flamer_tank/gellied, null, VENDOR_ITEM_REGULAR), diff --git a/code/game/machinery/vending/vendor_types/squad_prep/squad_medic.dm b/code/game/machinery/vending/vendor_types/squad_prep/squad_medic.dm index 9607f3d76c27..532c8e58dd02 100644 --- a/code/game/machinery/vending/vendor_types/squad_prep/squad_medic.dm +++ b/code/game/machinery/vending/vendor_types/squad_prep/squad_medic.dm @@ -63,7 +63,9 @@ GLOBAL_LIST_INIT(cm_vending_gear_medic, list( list("AMMUNITION", 0, null, null, null), list("M4RA AP Magazine (10x24mm)", 6, /obj/item/ammo_magazine/rifle/m4ra/ap, null, VENDOR_ITEM_REGULAR), list("M39 AP Magazine (10x20mm)", 6, /obj/item/ammo_magazine/smg/m39/ap , null, VENDOR_ITEM_REGULAR), + list("M39 Extended Magazine (10x20mm)", 6, /obj/item/ammo_magazine/smg/m39/extended , null, VENDOR_ITEM_REGULAR), list("M41A AP Magazine (10x24mm)", 6, /obj/item/ammo_magazine/rifle/ap , null, VENDOR_ITEM_REGULAR), + list("M41A Extended Magazine (10x24mm)", 6, /obj/item/ammo_magazine/rifle/extended , null, VENDOR_ITEM_REGULAR), list("RESTRICTED FIREARMS", 0, null, null, null), list("VP78 Pistol", 8, /obj/item/storage/box/guncase/vp78, null, VENDOR_ITEM_REGULAR), diff --git a/code/game/machinery/vending/vendor_types/squad_prep/squad_prep.dm b/code/game/machinery/vending/vendor_types/squad_prep/squad_prep.dm index d5c8bb74a5a3..9775c20cac33 100644 --- a/code/game/machinery/vending/vendor_types/squad_prep/squad_prep.dm +++ b/code/game/machinery/vending/vendor_types/squad_prep/squad_prep.dm @@ -177,6 +177,10 @@ list("M39 AP Magazine (10x20mm)", round(scale * 3), /obj/item/ammo_magazine/smg/m39/ap, VENDOR_ITEM_REGULAR), list("M41A AP Magazine (10x24mm)", round(scale * 3), /obj/item/ammo_magazine/rifle/ap, VENDOR_ITEM_REGULAR), + list("EXTENDED AMMUNITION", -1, null, null), + list("M39 Extended Magazine (10x20mm)", round(scale * 1.8), /obj/item/ammo_magazine/smg/m39/extended, VENDOR_ITEM_REGULAR), + list("M41A Extended Magazine (10x24mm)", round(scale * 1.9), /obj/item/ammo_magazine/rifle/extended, VENDOR_ITEM_REGULAR), + list("SPECIAL AMMUNITION", -1, null, null), list("M56 Smartgun Drum", 1, /obj/item/ammo_magazine/smartgun, VENDOR_ITEM_REGULAR), list("M44 Heavy Speed Loader (.44)", round(scale * 2), /obj/item/ammo_magazine/revolver/heavy, VENDOR_ITEM_REGULAR), diff --git a/code/game/machinery/vending/vendor_types/squad_prep/squad_rifleman.dm b/code/game/machinery/vending/vendor_types/squad_prep/squad_rifleman.dm index 1188cf66a53b..543288c71706 100644 --- a/code/game/machinery/vending/vendor_types/squad_prep/squad_rifleman.dm +++ b/code/game/machinery/vending/vendor_types/squad_prep/squad_rifleman.dm @@ -64,7 +64,9 @@ GLOBAL_LIST_INIT(cm_vending_clothing_marine, list( list("AMMUNITION", 0, null, null, null), list("M4RA AP Magazine (10x24mm)", 10, /obj/item/ammo_magazine/rifle/m4ra/ap, null, VENDOR_ITEM_REGULAR), list("M39 AP Magazine (10x20mm)", 10, /obj/item/ammo_magazine/smg/m39/ap , null, VENDOR_ITEM_REGULAR), + list("M39 Extended Magazine (10x20mm)", 10, /obj/item/ammo_magazine/smg/m39/extended , null, VENDOR_ITEM_REGULAR), list("M41A AP Magazine (10x24mm)", 10, /obj/item/ammo_magazine/rifle/ap , null, VENDOR_ITEM_REGULAR), + list("M41A Extended Magazine (10x24mm)", 10, /obj/item/ammo_magazine/rifle/extended , null, VENDOR_ITEM_REGULAR), list("M44 Heavy Speed Loader (.44)", 10, /obj/item/ammo_magazine/revolver/heavy, null, VENDOR_ITEM_REGULAR), list("UTILITIES", 0, null, null, null), diff --git a/code/game/machinery/vending/vendor_types/squad_prep/squad_tl.dm b/code/game/machinery/vending/vendor_types/squad_prep/squad_tl.dm index 944a9c43627c..4311a3982c86 100644 --- a/code/game/machinery/vending/vendor_types/squad_prep/squad_tl.dm +++ b/code/game/machinery/vending/vendor_types/squad_prep/squad_tl.dm @@ -5,7 +5,9 @@ GLOBAL_LIST_INIT(cm_vending_gear_tl, list( list("AMMUNITION", 0, null, null, null), list("M4RA AP Magazine (10x24mm)", 10, /obj/item/ammo_magazine/rifle/m4ra/ap, null, VENDOR_ITEM_REGULAR), list("M39 AP Magazine (10x20mm)", 10, /obj/item/ammo_magazine/smg/m39/ap , null, VENDOR_ITEM_REGULAR), + list("M39 Extended Magazine (10x20mm)", 10, /obj/item/ammo_magazine/smg/m39/extended , null, VENDOR_ITEM_REGULAR), list("M41A AP Magazine (10x24mm)", 10, /obj/item/ammo_magazine/rifle/ap , null, VENDOR_ITEM_REGULAR), + list("M41A Extended Magazine (10x24mm)", 10, /obj/item/ammo_magazine/rifle/extended , null, VENDOR_ITEM_REGULAR), list("M44 Heavy Speed Loader (.44)", 10, /obj/item/ammo_magazine/revolver/heavy, null, VENDOR_ITEM_REGULAR), list("M4A3 HP Magazine", 5, /obj/item/ammo_magazine/pistol/hp, null, VENDOR_ITEM_REGULAR), list("M4A3 AP Magazine", 5, /obj/item/ammo_magazine/pistol/ap, null, VENDOR_ITEM_REGULAR), diff --git a/code/game/objects/items/storage/backpack.dm b/code/game/objects/items/storage/backpack.dm index 53c3d2e0f2b4..e36225177d91 100644 --- a/code/game/objects/items/storage/backpack.dm +++ b/code/game/objects/items/storage/backpack.dm @@ -410,7 +410,7 @@ throw_range = 0 xeno_types = null var/base_icon_state = "ammo_pack" - var/move_delay_mult = 0.6 + var/move_delay_mult = 0.4 /obj/item/storage/backpack/marine/ammo_rack/update_icon() . = ..() diff --git a/code/game/objects/structures/crates_lockers/largecrate.dm b/code/game/objects/structures/crates_lockers/largecrate.dm index 2a37e72470b2..2393b5df8265 100644 --- a/code/game/objects/structures/crates_lockers/largecrate.dm +++ b/code/game/objects/structures/crates_lockers/largecrate.dm @@ -194,12 +194,12 @@ /obj/item/ammo_magazine/pistol, /obj/item/ammo_magazine/revolver, /obj/item/ammo_magazine/rifle, - /obj/item/ammo_magazine/rifle, + /obj/item/ammo_magazine/rifle/extended, /obj/item/ammo_magazine/shotgun, /obj/item/ammo_magazine/shotgun/buckshot, /obj/item/ammo_magazine/shotgun/flechette, /obj/item/ammo_magazine/smg/m39, - /obj/item/ammo_magazine/smg/m39, + /obj/item/ammo_magazine/smg/m39/extended, ) /obj/structure/largecrate/random/mini/med diff --git a/code/modules/projectiles/ammo_boxes/ammo_boxes.dm b/code/modules/projectiles/ammo_boxes/ammo_boxes.dm index e08c48260ab6..69179a209f8b 100644 --- a/code/modules/projectiles/ammo_boxes/ammo_boxes.dm +++ b/code/modules/projectiles/ammo_boxes/ammo_boxes.dm @@ -45,7 +45,7 @@ /obj/item/ammo_box/proc/deploy_ammo_box(mob/user, turf/T) user.drop_held_item() - + //---------------------FIRE HANDLING PROCS /obj/item/ammo_box/flamer_fire_act(severity, datum/cause_data/flame_cause_data) if(burning) @@ -260,9 +260,10 @@ /obj/item/ammo_box/rounds name = "\improper rifle ammunition box (10x24mm)" - desc = "A 10x24mm ammunition box. Used to refill M41A MK1, MK2, M4RA and M41AE2 HPR magazines." + desc = "A 10x24mm ammunition box. Used to refill M41A MK1, MK2, M4RA and M41AE2 HPR magazines. It comes with a leather strap allowing to wear it on the back." icon_state = "base_m41" item_state = "base_m41" + flags_equip_slot = SLOT_BACK var/overlay_gun_type = "_rounds" //used for ammo type color overlay var/overlay_content = "_reg" var/default_ammo = /datum/ammo/bullet/rifle diff --git a/code/modules/projectiles/ammo_boxes/handful_boxes.dm b/code/modules/projectiles/ammo_boxes/handful_boxes.dm index 76f11ba4b5aa..28eab8463011 100644 --- a/code/modules/projectiles/ammo_boxes/handful_boxes.dm +++ b/code/modules/projectiles/ammo_boxes/handful_boxes.dm @@ -4,6 +4,7 @@ /obj/item/ammo_box/magazine/shotgun name = "\improper shotgun shell box (Slugs x 100)" icon_state = "base_slug" + flags_equip_slot = SLOT_BACK overlay_ammo_type = "" overlay_gun_type = "_shells" overlay_content = "_slug" diff --git a/code/modules/projectiles/ammo_boxes/magazine_boxes.dm b/code/modules/projectiles/ammo_boxes/magazine_boxes.dm index a9cd76fd025c..ff90a6659fb2 100644 --- a/code/modules/projectiles/ammo_boxes/magazine_boxes.dm +++ b/code/modules/projectiles/ammo_boxes/magazine_boxes.dm @@ -2,6 +2,7 @@ /obj/item/ammo_box/magazine/ap name = "\improper magazine box (AP M41A x 10)" + flags_equip_slot = SLOT_BACK overlay_ammo_type = "_ap" overlay_content = "_ap" magazine_type = /obj/item/ammo_magazine/rifle/ap @@ -11,6 +12,7 @@ /obj/item/ammo_box/magazine/le name = "\improper magazine box (LE M41A x 10)" + flags_equip_slot = SLOT_BACK overlay_ammo_type = "_le" overlay_content = "_le" magazine_type = /obj/item/ammo_magazine/rifle/le @@ -20,6 +22,7 @@ /obj/item/ammo_box/magazine/ext name = "\improper magazine box (Ext M41A x 8)" + flags_equip_slot = SLOT_BACK overlay_ammo_type = "_ext" num_of_magazines = 8 magazine_type = /obj/item/ammo_magazine/rifle/extended @@ -29,6 +32,7 @@ /obj/item/ammo_box/magazine/incen name = "\improper magazine box (Incen M41A x 10)" + flags_equip_slot = SLOT_BACK overlay_ammo_type = "_incen" overlay_content = "_incen" magazine_type = /obj/item/ammo_magazine/rifle/incendiary @@ -38,6 +42,7 @@ /obj/item/ammo_box/magazine/explosive name = "\improper magazine box (Explosive M41A x 10)" + flags_equip_slot = SLOT_BACK overlay_ammo_type = "_expl" overlay_content = "_expl" magazine_type = /obj/item/ammo_magazine/rifle/explosive @@ -47,6 +52,7 @@ /obj/item/ammo_box/magazine/heap name = "magazine box (HEAP M41A x 10)" + flags_equip_slot = SLOT_BACK overlay_ammo_type = "_heap" overlay_content = "_heap" magazine_type = /obj/item/ammo_magazine/rifle/heap @@ -59,6 +65,7 @@ /obj/item/ammo_box/magazine/m39 name = "\improper magazine box (M39 x 12)" icon_state = "base_m39" + flags_equip_slot = SLOT_BACK overlay_ammo_type = "_reg" overlay_gun_type = "_m39" overlay_content = "_hv" @@ -119,6 +126,7 @@ /obj/item/ammo_box/magazine/m4ra name = "\improper magazine box (M4RA x 16)" icon_state = "base_m4ra" + flags_equip_slot = SLOT_BACK overlay_gun_type = "_m4ra" num_of_magazines = 16 magazine_type = /obj/item/ammo_magazine/rifle/m4ra @@ -167,6 +175,7 @@ /obj/item/ammo_box/magazine/l42a name = "\improper magazine box (L42A x 16)" icon_state = "base_l42" + flags_equip_slot = SLOT_BACK overlay_gun_type = "_l42" num_of_magazines = 16 magazine_type = /obj/item/ammo_magazine/rifle/l42a @@ -225,6 +234,7 @@ /obj/item/ammo_box/magazine/M16 name = "\improper magazine box (M16 x 12)" icon_state = "base_m16" + flags_equip_slot = SLOT_BACK overlay_ammo_type = "_reg" overlay_gun_type = "_m16" num_of_magazines = 12 @@ -249,6 +259,7 @@ /obj/item/ammo_box/magazine/m4a3 name = "\improper magazine box (M4A3 x 16)" icon_state = "base_m4a3" + flags_equip_slot = SLOT_BACK overlay_ammo_type = "_reg" overlay_gun_type = "_m4a3" num_of_magazines = 16 @@ -280,6 +291,7 @@ /obj/item/ammo_box/magazine/m44 name = "\improper speed loaders box (M44 x 16)" icon_state = "base_m44" + flags_equip_slot = SLOT_BACK overlay_ammo_type = "_m44_reg" overlay_gun_type = "_m44" overlay_content = "_speed" @@ -310,6 +322,7 @@ /obj/item/ammo_box/magazine/su6 name = "\improper magazine box (SU-6 x 16)" icon_state = "base_su6" + flags_equip_slot = SLOT_BACK overlay_ammo_type = "_reg" overlay_gun_type = "_su6" num_of_magazines = 16 @@ -323,6 +336,7 @@ /obj/item/ammo_box/magazine/mod88 name = "\improper magazine box (88 Mod 4 AP x 16)" icon_state = "base_mod88" + flags_equip_slot = SLOT_BACK overlay_ammo_type = "_ap" overlay_gun_type = "_mod88" overlay_content = "_ap" @@ -337,6 +351,7 @@ /obj/item/ammo_box/magazine/vp78 name = "\improper magazine box (VP78 x 16)" icon_state = "base_vp78" + flags_equip_slot = SLOT_BACK overlay_ammo_type = "_reg" overlay_gun_type = "_vp78" num_of_magazines = 16 @@ -350,6 +365,7 @@ /obj/item/ammo_box/magazine/type71 name = "\improper magazine box (Type71 x 10)" icon_state = "base_type71" + flags_equip_slot = SLOT_BACK overlay_ammo_type = "_type71_reg" overlay_gun_type = "_type71" overlay_content = "_type71_reg" From 350704e3ecb275bed319ee62fd2e9b56b96252f3 Mon Sep 17 00:00:00 2001 From: John Doe Date: Sat, 5 Aug 2023 16:06:35 -0700 Subject: [PATCH 16/33] only SMGs have autofire for now, fire rate increased to 100% of burst --- code/modules/projectiles/guns/rifles.dm | 10 +++++----- code/modules/projectiles/guns/smgs.dm | 4 +--- 2 files changed, 6 insertions(+), 8 deletions(-) diff --git a/code/modules/projectiles/guns/rifles.dm b/code/modules/projectiles/guns/rifles.dm index bc6029b395ab..db3cf6d8d01e 100644 --- a/code/modules/projectiles/guns/rifles.dm +++ b/code/modules/projectiles/guns/rifles.dm @@ -75,7 +75,7 @@ flags_gun_features = GUN_AUTO_EJECTOR|GUN_CAN_POINTBLANK|GUN_AMMO_COUNTER starting_attachment_types = list(/obj/item/attachable/attached_gun/grenade, /obj/item/attachable/stock/rifle/collapsible) map_specific_decoration = TRUE - start_automatic = TRUE + //start_automatic = TRUE /obj/item/weapon/gun/rifle/m41a/set_gun_attachment_offsets() attachable_offset = list("muzzle_x" = 32, "muzzle_y" = 18,"rail_x" = 12, "rail_y" = 23, "under_x" = 24, "under_y" = 13, "stock_x" = 24, "stock_y" = 13) @@ -150,7 +150,7 @@ /obj/item/attachable/attached_gun/flamer/advanced, ) start_semiauto = FALSE - start_automatic = TRUE + //start_automatic = TRUE autofire_slow_mult = 1.1 /obj/item/weapon/gun/rifle/nsg23/Initialize(mapload, spawn_empty) @@ -386,7 +386,7 @@ flags_gun_features = GUN_AUTO_EJECTOR|GUN_CAN_POINTBLANK|GUN_AMMO_COUNTER starting_attachment_types = list(/obj/item/attachable/attached_gun/grenade/mk1, /obj/item/attachable/stock/rifle/collapsible) - start_automatic = TRUE + //start_automatic = TRUE /obj/item/weapon/gun/rifle/m41aMK1/set_gun_attachment_offsets() attachable_offset = list("muzzle_x" = 32, "muzzle_y" = 18,"rail_x" = 12, "rail_y" = 23, "under_x" = 23, "under_y" = 13, "stock_x" = 24, "stock_y" = 14) @@ -727,7 +727,7 @@ ) flags_gun_features = GUN_AUTO_EJECTOR|GUN_CAN_POINTBLANK - start_automatic = TRUE + //start_automatic = TRUE @@ -1306,7 +1306,7 @@ flags_gun_features = GUN_AUTO_EJECTOR|GUN_CAN_POINTBLANK|GUN_AMMO_COUNTER flags_equip_slot = SLOT_BACK - start_automatic = TRUE + //start_automatic = TRUE /obj/item/weapon/gun/rifle/type71/set_gun_attachment_offsets() attachable_offset = list("muzzle_x" = 32, "muzzle_y" = 18,"rail_x" = 18, "rail_y" = 23, "under_x" = 20, "under_y" = 13, "stock_x" = 24, "stock_y" = 13) diff --git a/code/modules/projectiles/guns/smgs.dm b/code/modules/projectiles/guns/smgs.dm index efe7eb5395f4..412e298739ba 100644 --- a/code/modules/projectiles/guns/smgs.dm +++ b/code/modules/projectiles/guns/smgs.dm @@ -21,6 +21,7 @@ flags_gun_features = GUN_AUTO_EJECTOR|GUN_CAN_POINTBLANK gun_category = GUN_CATEGORY_SMG start_automatic = TRUE + automatic_delay_mult = 1 /obj/item/weapon/gun/smg/Initialize(mapload, spawn_empty) . = ..() @@ -71,7 +72,6 @@ flags_gun_features = GUN_AUTO_EJECTOR|GUN_CAN_POINTBLANK|GUN_AMMO_COUNTER starting_attachment_types = list(/obj/item/attachable/stock/smg/collapsible) map_specific_decoration = TRUE - start_automatic = TRUE /obj/item/weapon/gun/smg/m39/set_gun_attachment_offsets() attachable_offset = list("muzzle_x" = 30, "muzzle_y" = 20,"rail_x" = 14, "rail_y" = 22, "under_x" = 21, "under_y" = 16, "stock_x" = 24, "stock_y" = 15) @@ -367,7 +367,6 @@ ) wield_delay = WIELD_DELAY_NONE aim_slowdown = SLOWDOWN_ADS_NONE - start_automatic = TRUE /obj/item/weapon/gun/smg/mac15/set_gun_attachment_offsets() attachable_offset = list("muzzle_x" = 32, "muzzle_y" = 20,"rail_x" = 16, "rail_y" = 22, "under_x" = 22, "under_y" = 16, "stock_x" = 22, "stock_y" = 16) @@ -416,7 +415,6 @@ ) wield_delay = WIELD_DELAY_MIN aim_slowdown = SLOWDOWN_ADS_QUICK - start_automatic = TRUE var/jammed = FALSE /obj/item/weapon/gun/smg/uzi/set_gun_attachment_offsets() From df8597aab45265a9c12ce5475cd31c3e62dff0b3 Mon Sep 17 00:00:00 2001 From: John Doe Date: Sat, 5 Aug 2023 16:08:02 -0700 Subject: [PATCH 17/33] m41a extendo back --- code/datums/supply_packs/ammo.dm | 10 ++++++++++ code/modules/projectiles/guns/smgs.dm | 2 +- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/code/datums/supply_packs/ammo.dm b/code/datums/supply_packs/ammo.dm index 092bf92ecd4e..164511c25cc0 100644 --- a/code/datums/supply_packs/ammo.dm +++ b/code/datums/supply_packs/ammo.dm @@ -68,6 +68,16 @@ containername = "\improper M41A AP magazines crate" group = "Ammo" +/datum/supply_packs/ammo_mag_box_ext + name = "Magazine box (M41A, 8x extended mags)" + contains = list( + /obj/item/ammo_box/magazine/ext, + ) + cost = 30 + containertype = /obj/structure/closet/crate/ammo + containername = "\improper M41A extended magazines crate" + group = "Ammo" + //------------------------For M4RA---------------- /datum/supply_packs/ammo_dmr_mag_box diff --git a/code/modules/projectiles/guns/smgs.dm b/code/modules/projectiles/guns/smgs.dm index 412e298739ba..13fb261d0b83 100644 --- a/code/modules/projectiles/guns/smgs.dm +++ b/code/modules/projectiles/guns/smgs.dm @@ -21,7 +21,7 @@ flags_gun_features = GUN_AUTO_EJECTOR|GUN_CAN_POINTBLANK gun_category = GUN_CATEGORY_SMG start_automatic = TRUE - automatic_delay_mult = 1 + autofire_slow_mult = 1 /obj/item/weapon/gun/smg/Initialize(mapload, spawn_empty) . = ..() From 9ddf74d8f21ca692503e289d53e764d2309ce14a Mon Sep 17 00:00:00 2001 From: John Doe Date: Sat, 5 Aug 2023 16:13:58 -0700 Subject: [PATCH 18/33] kiling m39 extended --- code/datums/supply_packs/ammo.dm | 1 - .../vending/vendor_types/crew/pilot_officer.dm | 10 ++++------ .../vending/vendor_types/crew/vehicle_crew.dm | 1 - .../vending/vendor_types/intelligence_officer.dm | 1 - .../machinery/vending/vendor_types/requisitions.dm | 1 - .../vending/vendor_types/squad_prep/squad_engineer.dm | 1 - .../vending/vendor_types/squad_prep/squad_leader.dm | 1 - .../vending/vendor_types/squad_prep/squad_medic.dm | 1 - .../vending/vendor_types/squad_prep/squad_prep.dm | 1 - .../vending/vendor_types/squad_prep/squad_rifleman.dm | 1 - .../vending/vendor_types/squad_prep/squad_tl.dm | 1 - code/game/machinery/vending/vendor_types/wo_vendors.dm | 1 - code/modules/vehicles/interior/interactable/vendors.dm | 1 - 13 files changed, 4 insertions(+), 18 deletions(-) diff --git a/code/datums/supply_packs/ammo.dm b/code/datums/supply_packs/ammo.dm index 164511c25cc0..4a7be2f9f652 100644 --- a/code/datums/supply_packs/ammo.dm +++ b/code/datums/supply_packs/ammo.dm @@ -420,7 +420,6 @@ /obj/item/ammo_magazine/smg/m39, /obj/item/ammo_magazine/smg/m39, /obj/item/ammo_magazine/smg/m39, - /obj/item/ammo_magazine/smg/m39/extended, /obj/item/ammo_magazine/smg/m39/ap, /obj/item/ammo_magazine/smg/m39/ap, /obj/item/ammo_magazine/revolver, diff --git a/code/game/machinery/vending/vendor_types/crew/pilot_officer.dm b/code/game/machinery/vending/vendor_types/crew/pilot_officer.dm index 231e02bb5118..f61d8130a7bf 100644 --- a/code/game/machinery/vending/vendor_types/crew/pilot_officer.dm +++ b/code/game/machinery/vending/vendor_types/crew/pilot_officer.dm @@ -65,11 +65,11 @@ GLOBAL_LIST_INIT(cm_vending_clothing_pilot_officer, list( list("M30 Tactical Helmet", 0, /obj/item/clothing/head/helmet/marine/pilot, MARINE_CAN_BUY_HELMET, VENDOR_ITEM_MANDATORY), list("Leather Satchel", 0, /obj/item/storage/backpack/satchel, MARINE_CAN_BUY_BACKPACK, VENDOR_ITEM_MANDATORY), list("MRE", 0, /obj/item/storage/box/MRE, MARINE_CAN_BUY_MRE, VENDOR_ITEM_MANDATORY), - + list("ARMOR (CHOOSE 1)", 0, null, null, null), list("M70 Flak Jacket", 0, /obj/item/clothing/suit/armor/vest/pilot, MARINE_CAN_BUY_ARMOR, VENDOR_ITEM_MANDATORY), list("M3-VL Pattern Flak Vest", 0, /obj/item/clothing/suit/storage/marine/light/vest/dcc, MARINE_CAN_BUY_ARMOR, VENDOR_ITEM_MANDATORY), - + list("PERSONAL SIDEARM (CHOOSE 1)", 0, null, null, null), list("88 Mod 4 Combat Pistol", 0, /obj/item/weapon/gun/pistol/mod88, MARINE_CAN_BUY_ATTACHMENT, VENDOR_ITEM_REGULAR), list("VP78 Pistol", 0, /obj/item/weapon/gun/pistol/vp78, MARINE_CAN_BUY_ATTACHMENT, VENDOR_ITEM_REGULAR), @@ -133,7 +133,6 @@ GLOBAL_LIST_INIT(cm_vending_clothing_pilot_officer, list( list("AMMUNITION", 0, null, null, null), list("M4RA AP Magazine (10x24mm)", 10, /obj/item/ammo_magazine/rifle/m4ra/ap, null, VENDOR_ITEM_REGULAR), list("M39 AP Magazine (10x20mm)", 10, /obj/item/ammo_magazine/smg/m39/ap, null, VENDOR_ITEM_REGULAR), - list("M39 Extended Magazine (10x20mm)", 10, /obj/item/ammo_magazine/smg/m39/extended, null, VENDOR_ITEM_REGULAR), list("M41A AP Magazine (10x24mm)", 10, /obj/item/ammo_magazine/rifle/ap, null, VENDOR_ITEM_REGULAR), list("M41A Extended Magazine (10x24mm)", 10, /obj/item/ammo_magazine/rifle/extended, null, VENDOR_ITEM_REGULAR), list("M44 Heavy Speed Loader (.44)", 10, /obj/item/ammo_magazine/revolver/heavy, null, VENDOR_ITEM_REGULAR), @@ -153,8 +152,8 @@ GLOBAL_LIST_INIT(cm_vending_clothing_dropship_crew_chief, list( list("Gloves", 0, /obj/item/clothing/gloves/yellow, MARINE_CAN_BUY_GLOVES, VENDOR_ITEM_MANDATORY), list("Patrol Cap", 0, /obj/item/clothing/head/cmcap, MARINE_CAN_BUY_HELMET, VENDOR_ITEM_MANDATORY), list("Leather Satchel", 0, /obj/item/storage/backpack/satchel, MARINE_CAN_BUY_BACKPACK, VENDOR_ITEM_MANDATORY), - list("MRE", 0, /obj/item/storage/box/MRE, MARINE_CAN_BUY_MRE, VENDOR_ITEM_MANDATORY), - + list("MRE", 0, /obj/item/storage/box/MRE, MARINE_CAN_BUY_MRE, VENDOR_ITEM_MANDATORY), + list("ARMOR (CHOOSE 1)", 0, null, null, null), list("M70 Flak Jacket", 0, /obj/item/clothing/suit/armor/vest/pilot, MARINE_CAN_BUY_ARMOR, VENDOR_ITEM_MANDATORY), list("M3-VL Pattern Flak Vest", 0, /obj/item/clothing/suit/storage/marine/light/vest/dcc, MARINE_CAN_BUY_ARMOR, VENDOR_ITEM_MANDATORY), @@ -223,7 +222,6 @@ GLOBAL_LIST_INIT(cm_vending_clothing_dropship_crew_chief, list( list("AMMUNITION", 0, null, null, null), list("M4RA AP Magazine (10x24mm)", 10, /obj/item/ammo_magazine/rifle/m4ra/ap, null, VENDOR_ITEM_REGULAR), list("M39 AP Magazine (10x20mm)", 10, /obj/item/ammo_magazine/smg/m39/ap, null, VENDOR_ITEM_REGULAR), - list("M39 Extended Magazine (10x20mm)", 10, /obj/item/ammo_magazine/smg/m39/extended, null, VENDOR_ITEM_REGULAR), list("M41A AP Magazine (10x24mm)", 10, /obj/item/ammo_magazine/rifle/ap, null, VENDOR_ITEM_REGULAR), list("M41A Extended Magazine (10x24mm)", 10, /obj/item/ammo_magazine/rifle/extended, null, VENDOR_ITEM_REGULAR), list("M44 Heavy Speed Loader (.44)", 10, /obj/item/ammo_magazine/revolver/heavy, null, VENDOR_ITEM_REGULAR), diff --git a/code/game/machinery/vending/vendor_types/crew/vehicle_crew.dm b/code/game/machinery/vending/vendor_types/crew/vehicle_crew.dm index 023bbe390bfc..0a9efdefb764 100644 --- a/code/game/machinery/vending/vendor_types/crew/vehicle_crew.dm +++ b/code/game/machinery/vending/vendor_types/crew/vehicle_crew.dm @@ -367,7 +367,6 @@ GLOBAL_LIST_INIT(cm_vending_clothing_vehicle_crew, list( list("AMMUNITION", 0, null, null, null), list("M4RA AP Magazine (10x24mm)", 10, /obj/item/ammo_magazine/rifle/m4ra/ap, null, VENDOR_ITEM_REGULAR), list("M39 AP Magazine (10x20mm)", 10, /obj/item/ammo_magazine/smg/m39/ap , null, VENDOR_ITEM_REGULAR), - list("M39 Extended Magazine (10x20mm)", 10, /obj/item/ammo_magazine/smg/m39/extended , null, VENDOR_ITEM_REGULAR), list("M40 HEDP Grenade", 10, /obj/item/explosive/grenade/high_explosive, null, VENDOR_ITEM_REGULAR), list("M41A AP Magazine (10x24mm)", 10, /obj/item/ammo_magazine/rifle/ap , null, VENDOR_ITEM_REGULAR), list("M41A Extended Magazine (10x24mm)", 10, /obj/item/ammo_magazine/rifle/extended , null, VENDOR_ITEM_REGULAR), diff --git a/code/game/machinery/vending/vendor_types/intelligence_officer.dm b/code/game/machinery/vending/vendor_types/intelligence_officer.dm index 829c542f6b26..0347e10d158b 100644 --- a/code/game/machinery/vending/vendor_types/intelligence_officer.dm +++ b/code/game/machinery/vending/vendor_types/intelligence_officer.dm @@ -26,7 +26,6 @@ GLOBAL_LIST_INIT(cm_vending_gear_intelligence_officer, list( list("PRIMARY AMMUNITION", 0, null, null, null), list("M4RA AP Magazine (10x24mm)", 10, /obj/item/ammo_magazine/rifle/m4ra/ap, null, VENDOR_ITEM_REGULAR), list("M39 AP Magazine (10x20mm)", 10, /obj/item/ammo_magazine/smg/m39/ap , null, VENDOR_ITEM_REGULAR), - list("M39 Extended Magazine (10x20mm)", 10, /obj/item/ammo_magazine/smg/m39/extended , null, VENDOR_ITEM_REGULAR), list("M41A AP Magazine (10x24mm)", 10, /obj/item/ammo_magazine/rifle/ap , null, VENDOR_ITEM_REGULAR), list("M41A Extended Magazine (10x24mm)", 10, /obj/item/ammo_magazine/rifle/extended , null, VENDOR_ITEM_REGULAR), diff --git a/code/game/machinery/vending/vendor_types/requisitions.dm b/code/game/machinery/vending/vendor_types/requisitions.dm index f85657e887a8..b8ddb464194d 100644 --- a/code/game/machinery/vending/vendor_types/requisitions.dm +++ b/code/game/machinery/vending/vendor_types/requisitions.dm @@ -237,7 +237,6 @@ list("M4A3 AP Magazine (9mm)", round(scale * 2), /obj/item/ammo_magazine/pistol/ap, VENDOR_ITEM_REGULAR), list("EXTENDED AMMUNITION", -1, null, null), - list("M39 Extended Magazine (10x20mm)", round(scale * 9.5) + 3, /obj/item/ammo_magazine/smg/m39/extended, VENDOR_ITEM_REGULAR), list("M41A MK2 Extended Magazine (10x24mm)", round(scale * 8.1), /obj/item/ammo_magazine/rifle/extended, VENDOR_ITEM_REGULAR), list("SPECIAL AMMUNITION", -1, null, null), diff --git a/code/game/machinery/vending/vendor_types/squad_prep/squad_engineer.dm b/code/game/machinery/vending/vendor_types/squad_prep/squad_engineer.dm index 05784ec3c161..3de4f10288af 100644 --- a/code/game/machinery/vending/vendor_types/squad_prep/squad_engineer.dm +++ b/code/game/machinery/vending/vendor_types/squad_prep/squad_engineer.dm @@ -42,7 +42,6 @@ GLOBAL_LIST_INIT(cm_vending_gear_engi, list( list("AMMUNITION", 0, null, null, null), list("M4RA AP Magazine (10x24mm)", 6, /obj/item/ammo_magazine/rifle/m4ra/ap, null, VENDOR_ITEM_REGULAR), list("M39 AP Magazine (10x20mm)", 6, /obj/item/ammo_magazine/smg/m39/ap , null, VENDOR_ITEM_REGULAR), - list("M39 Extended Magazine (10x20mm)", 6, /obj/item/ammo_magazine/smg/m39/extended , null, VENDOR_ITEM_REGULAR), list("M41A AP Magazine (10x24mm)", 6, /obj/item/ammo_magazine/rifle/ap , null, VENDOR_ITEM_REGULAR), list("M41A Extended Magazine (10x24mm)", 6, /obj/item/ammo_magazine/rifle/extended , null, VENDOR_ITEM_REGULAR), diff --git a/code/game/machinery/vending/vendor_types/squad_prep/squad_leader.dm b/code/game/machinery/vending/vendor_types/squad_prep/squad_leader.dm index fdfdabd8335e..8a8d0fa3735e 100644 --- a/code/game/machinery/vending/vendor_types/squad_prep/squad_leader.dm +++ b/code/game/machinery/vending/vendor_types/squad_prep/squad_leader.dm @@ -73,7 +73,6 @@ GLOBAL_LIST_INIT(cm_vending_gear_leader, list( list("SPECIAL AMMUNITION", 0, null, null, null), list("M4RA AP Magazine (10x24mm)", 6, /obj/item/ammo_magazine/rifle/m4ra/ap, null, VENDOR_ITEM_REGULAR), list("M39 AP Magazine (10x20mm)", 6, /obj/item/ammo_magazine/smg/m39/ap , null, VENDOR_ITEM_REGULAR), - list("M39 Extended Magazine (10x20mm)", 6, /obj/item/ammo_magazine/smg/m39/extended , null, VENDOR_ITEM_REGULAR), list("M41A AP Magazine (10x24mm)", 6, /obj/item/ammo_magazine/rifle/ap , null, VENDOR_ITEM_REGULAR), list("M41A Extended Magazine (10x24mm)", 6, /obj/item/ammo_magazine/rifle/extended , null, VENDOR_ITEM_REGULAR), list("M240 Incinerator Tank (Napthal)", 3, /obj/item/ammo_magazine/flamer_tank, null, VENDOR_ITEM_REGULAR), diff --git a/code/game/machinery/vending/vendor_types/squad_prep/squad_medic.dm b/code/game/machinery/vending/vendor_types/squad_prep/squad_medic.dm index 532c8e58dd02..1052834eea3b 100644 --- a/code/game/machinery/vending/vendor_types/squad_prep/squad_medic.dm +++ b/code/game/machinery/vending/vendor_types/squad_prep/squad_medic.dm @@ -63,7 +63,6 @@ GLOBAL_LIST_INIT(cm_vending_gear_medic, list( list("AMMUNITION", 0, null, null, null), list("M4RA AP Magazine (10x24mm)", 6, /obj/item/ammo_magazine/rifle/m4ra/ap, null, VENDOR_ITEM_REGULAR), list("M39 AP Magazine (10x20mm)", 6, /obj/item/ammo_magazine/smg/m39/ap , null, VENDOR_ITEM_REGULAR), - list("M39 Extended Magazine (10x20mm)", 6, /obj/item/ammo_magazine/smg/m39/extended , null, VENDOR_ITEM_REGULAR), list("M41A AP Magazine (10x24mm)", 6, /obj/item/ammo_magazine/rifle/ap , null, VENDOR_ITEM_REGULAR), list("M41A Extended Magazine (10x24mm)", 6, /obj/item/ammo_magazine/rifle/extended , null, VENDOR_ITEM_REGULAR), diff --git a/code/game/machinery/vending/vendor_types/squad_prep/squad_prep.dm b/code/game/machinery/vending/vendor_types/squad_prep/squad_prep.dm index 9775c20cac33..3b8e27198739 100644 --- a/code/game/machinery/vending/vendor_types/squad_prep/squad_prep.dm +++ b/code/game/machinery/vending/vendor_types/squad_prep/squad_prep.dm @@ -178,7 +178,6 @@ list("M41A AP Magazine (10x24mm)", round(scale * 3), /obj/item/ammo_magazine/rifle/ap, VENDOR_ITEM_REGULAR), list("EXTENDED AMMUNITION", -1, null, null), - list("M39 Extended Magazine (10x20mm)", round(scale * 1.8), /obj/item/ammo_magazine/smg/m39/extended, VENDOR_ITEM_REGULAR), list("M41A Extended Magazine (10x24mm)", round(scale * 1.9), /obj/item/ammo_magazine/rifle/extended, VENDOR_ITEM_REGULAR), list("SPECIAL AMMUNITION", -1, null, null), diff --git a/code/game/machinery/vending/vendor_types/squad_prep/squad_rifleman.dm b/code/game/machinery/vending/vendor_types/squad_prep/squad_rifleman.dm index 543288c71706..9276cd4dd1a3 100644 --- a/code/game/machinery/vending/vendor_types/squad_prep/squad_rifleman.dm +++ b/code/game/machinery/vending/vendor_types/squad_prep/squad_rifleman.dm @@ -64,7 +64,6 @@ GLOBAL_LIST_INIT(cm_vending_clothing_marine, list( list("AMMUNITION", 0, null, null, null), list("M4RA AP Magazine (10x24mm)", 10, /obj/item/ammo_magazine/rifle/m4ra/ap, null, VENDOR_ITEM_REGULAR), list("M39 AP Magazine (10x20mm)", 10, /obj/item/ammo_magazine/smg/m39/ap , null, VENDOR_ITEM_REGULAR), - list("M39 Extended Magazine (10x20mm)", 10, /obj/item/ammo_magazine/smg/m39/extended , null, VENDOR_ITEM_REGULAR), list("M41A AP Magazine (10x24mm)", 10, /obj/item/ammo_magazine/rifle/ap , null, VENDOR_ITEM_REGULAR), list("M41A Extended Magazine (10x24mm)", 10, /obj/item/ammo_magazine/rifle/extended , null, VENDOR_ITEM_REGULAR), list("M44 Heavy Speed Loader (.44)", 10, /obj/item/ammo_magazine/revolver/heavy, null, VENDOR_ITEM_REGULAR), diff --git a/code/game/machinery/vending/vendor_types/squad_prep/squad_tl.dm b/code/game/machinery/vending/vendor_types/squad_prep/squad_tl.dm index 4311a3982c86..8e5241cfad5f 100644 --- a/code/game/machinery/vending/vendor_types/squad_prep/squad_tl.dm +++ b/code/game/machinery/vending/vendor_types/squad_prep/squad_tl.dm @@ -5,7 +5,6 @@ GLOBAL_LIST_INIT(cm_vending_gear_tl, list( list("AMMUNITION", 0, null, null, null), list("M4RA AP Magazine (10x24mm)", 10, /obj/item/ammo_magazine/rifle/m4ra/ap, null, VENDOR_ITEM_REGULAR), list("M39 AP Magazine (10x20mm)", 10, /obj/item/ammo_magazine/smg/m39/ap , null, VENDOR_ITEM_REGULAR), - list("M39 Extended Magazine (10x20mm)", 10, /obj/item/ammo_magazine/smg/m39/extended , null, VENDOR_ITEM_REGULAR), list("M41A AP Magazine (10x24mm)", 10, /obj/item/ammo_magazine/rifle/ap , null, VENDOR_ITEM_REGULAR), list("M41A Extended Magazine (10x24mm)", 10, /obj/item/ammo_magazine/rifle/extended , null, VENDOR_ITEM_REGULAR), list("M44 Heavy Speed Loader (.44)", 10, /obj/item/ammo_magazine/revolver/heavy, null, VENDOR_ITEM_REGULAR), diff --git a/code/game/machinery/vending/vendor_types/wo_vendors.dm b/code/game/machinery/vending/vendor_types/wo_vendors.dm index bdba638c577e..0d9c3d0c1d2e 100644 --- a/code/game/machinery/vending/vendor_types/wo_vendors.dm +++ b/code/game/machinery/vending/vendor_types/wo_vendors.dm @@ -136,7 +136,6 @@ list("M4A3 AP Magazine (9mm)", round(scale * 5), /obj/item/ammo_magazine/pistol/ap, VENDOR_ITEM_REGULAR), list("EXTENDED AMMUNITION", -1, null, null), - list("M39 Extended Magazine (10x20mm)", round(scale * 1), /obj/item/ammo_magazine/smg/m39/extended, VENDOR_ITEM_REGULAR), list("M41A MK2 Extended Magazine (10x24mm)", round(scale * 3), /obj/item/ammo_magazine/rifle/extended, VENDOR_ITEM_REGULAR), list("INCENDIARY AMMUNITION", -1, null, null), diff --git a/code/modules/vehicles/interior/interactable/vendors.dm b/code/modules/vehicles/interior/interactable/vendors.dm index 96a6f6b49c0f..5b940133499f 100644 --- a/code/modules/vehicles/interior/interactable/vendors.dm +++ b/code/modules/vehicles/interior/interactable/vendors.dm @@ -226,7 +226,6 @@ list("M4A3 AP Magazine (9mm)", 0, /obj/item/ammo_magazine/pistol/ap, VENDOR_ITEM_REGULAR), list("EXTENDED AMMUNITION", -1, null, null), - list("M39 Extended Magazine (10x20mm)", 0, /obj/item/ammo_magazine/smg/m39/extended, VENDOR_ITEM_REGULAR), list("M41A MK2 Extended Magazine (10x24mm)", 0, /obj/item/ammo_magazine/rifle/extended, VENDOR_ITEM_REGULAR), list("SPECIALIST AMMUNITION", -1, null, null), From b127bb0bfc4b7a8e786e401bf87cd664236ff664 Mon Sep 17 00:00:00 2001 From: John Doe Date: Sat, 5 Aug 2023 16:19:34 -0700 Subject: [PATCH 19/33] shh --- code/modules/projectiles/guns/rifles.dm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/modules/projectiles/guns/rifles.dm b/code/modules/projectiles/guns/rifles.dm index db3cf6d8d01e..7d3f00a892d8 100644 --- a/code/modules/projectiles/guns/rifles.dm +++ b/code/modules/projectiles/guns/rifles.dm @@ -1241,7 +1241,7 @@ /obj/item/attachable/magnetic_harness, ) - flags_gun_features = GUN_CAN_POINTBLANK|GUN_AMMO_COUNTER|GUN_WIELDED_FIRING_ONLY|GUN_SUPPORT_PLATFORM + flags_gun_features = GUN_CAN_POINTBLANK|GUN_AMMO_COUNTER|GUN_WIELDED_FIRING_ONLY//|GUN_SUPPORT_PLATFORM gun_category = GUN_CATEGORY_HEAVY /obj/item/weapon/gun/rifle/lmg/set_gun_attachment_offsets() From 88acf0fc74074da54e10e3f28175db1a99ffb1cf Mon Sep 17 00:00:00 2001 From: John Doe Date: Wed, 9 Aug 2023 06:26:14 -0700 Subject: [PATCH 20/33] SMGs have improved FA spread --- code/modules/projectiles/guns/smgs.dm | 1 + 1 file changed, 1 insertion(+) diff --git a/code/modules/projectiles/guns/smgs.dm b/code/modules/projectiles/guns/smgs.dm index 13fb261d0b83..f9ff3a2961a6 100644 --- a/code/modules/projectiles/guns/smgs.dm +++ b/code/modules/projectiles/guns/smgs.dm @@ -22,6 +22,7 @@ gun_category = GUN_CATEGORY_SMG start_automatic = TRUE autofire_slow_mult = 1 + fa_max_scatter = 6.5 /obj/item/weapon/gun/smg/Initialize(mapload, spawn_empty) . = ..() From 1fd1eaf6d8494e0dfb8931a9f32d3e797095e28e Mon Sep 17 00:00:00 2001 From: John Doe Date: Fri, 11 Aug 2023 10:22:37 -0700 Subject: [PATCH 21/33] HPR now auto --- code/modules/projectiles/guns/rifles.dm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/modules/projectiles/guns/rifles.dm b/code/modules/projectiles/guns/rifles.dm index 7d3f00a892d8..db3cf6d8d01e 100644 --- a/code/modules/projectiles/guns/rifles.dm +++ b/code/modules/projectiles/guns/rifles.dm @@ -1241,7 +1241,7 @@ /obj/item/attachable/magnetic_harness, ) - flags_gun_features = GUN_CAN_POINTBLANK|GUN_AMMO_COUNTER|GUN_WIELDED_FIRING_ONLY//|GUN_SUPPORT_PLATFORM + flags_gun_features = GUN_CAN_POINTBLANK|GUN_AMMO_COUNTER|GUN_WIELDED_FIRING_ONLY|GUN_SUPPORT_PLATFORM gun_category = GUN_CATEGORY_HEAVY /obj/item/weapon/gun/rifle/lmg/set_gun_attachment_offsets() From 1260df23f355bf91c37dac023ad531b04358c77f Mon Sep 17 00:00:00 2001 From: Benedict Date: Sat, 12 Aug 2023 20:19:39 -0400 Subject: [PATCH 22/33] Souto Slinger Supremo Full Auto --- code/modules/clothing/shoes/miscellaneous.dm | 2 +- code/modules/projectiles/guns/souto.dm | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/code/modules/clothing/shoes/miscellaneous.dm b/code/modules/clothing/shoes/miscellaneous.dm index 9d53ac1103c0..6156b9b7956a 100644 --- a/code/modules/clothing/shoes/miscellaneous.dm +++ b/code/modules/clothing/shoes/miscellaneous.dm @@ -159,7 +159,7 @@ max_heat_protection_temperature = SHOE_MAX_HEAT_PROT /obj/item/clothing/shoes/souto - name = "\improper Souto Man's boots. Harder than the kick of Souto Red." + name = "\improper Souto Man's boots. Harder than the kick of Souto Red" desc = "Souto Man boots" icon_state = "souto_man" item_state = "souto_man" diff --git a/code/modules/projectiles/guns/souto.dm b/code/modules/projectiles/guns/souto.dm index 8d7a1b2550a4..db577260de6f 100644 --- a/code/modules/projectiles/guns/souto.dm +++ b/code/modules/projectiles/guns/souto.dm @@ -14,6 +14,8 @@ var/obj/item/storage/backpack/souto/soutopack current_mag = null auto_retrieval_slot = WEAR_IN_BACK + start_automatic = TRUE + autofire_slow_mult = 1 /obj/item/weapon/gun/souto/set_gun_config_values() . = ..() From d68422ce01257297418cc03b1df2c8913c7f3a3c Mon Sep 17 00:00:00 2001 From: Benedict Date: Sat, 12 Aug 2023 20:35:25 -0400 Subject: [PATCH 23/33] Souta Changes --- code/modules/clothing/shoes/miscellaneous.dm | 4 ++-- code/modules/projectiles/guns/souto.dm | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/code/modules/clothing/shoes/miscellaneous.dm b/code/modules/clothing/shoes/miscellaneous.dm index 6156b9b7956a..e3b07a76a2ff 100644 --- a/code/modules/clothing/shoes/miscellaneous.dm +++ b/code/modules/clothing/shoes/miscellaneous.dm @@ -159,8 +159,8 @@ max_heat_protection_temperature = SHOE_MAX_HEAT_PROT /obj/item/clothing/shoes/souto - name = "\improper Souto Man's boots. Harder than the kick of Souto Red" - desc = "Souto Man boots" + name = "Souto Man boots" + desc = "\improper Souto Man's boots. Harder than the kick of Souto Red" icon_state = "souto_man" item_state = "souto_man" flags_inventory = CANTSTRIP|NOSLIPPING diff --git a/code/modules/projectiles/guns/souto.dm b/code/modules/projectiles/guns/souto.dm index db577260de6f..6f45f57e1d61 100644 --- a/code/modules/projectiles/guns/souto.dm +++ b/code/modules/projectiles/guns/souto.dm @@ -15,7 +15,7 @@ current_mag = null auto_retrieval_slot = WEAR_IN_BACK start_automatic = TRUE - autofire_slow_mult = 1 + autofire_slow_mult = 0.8 //Fires FASTER when in Full Auto, that is the power of Souta /obj/item/weapon/gun/souto/set_gun_config_values() . = ..() From 3ae1aa2340e13061d44b14be0b365efad5c9dc84 Mon Sep 17 00:00:00 2001 From: John Doe Date: Sat, 12 Aug 2023 18:53:53 -0700 Subject: [PATCH 24/33] Revert "kiling m39 extended" This reverts commit 9ddf74d8f21ca692503e289d53e764d2309ce14a. revert m39 --- code/datums/supply_packs/ammo.dm | 1 + .../vending/vendor_types/crew/pilot_officer.dm | 10 ++++++---- .../vending/vendor_types/crew/vehicle_crew.dm | 1 + .../vending/vendor_types/intelligence_officer.dm | 1 + .../machinery/vending/vendor_types/requisitions.dm | 1 + .../vending/vendor_types/squad_prep/squad_engineer.dm | 1 + .../vending/vendor_types/squad_prep/squad_leader.dm | 1 + .../vending/vendor_types/squad_prep/squad_medic.dm | 1 + .../vending/vendor_types/squad_prep/squad_prep.dm | 1 + .../vending/vendor_types/squad_prep/squad_rifleman.dm | 1 + .../vending/vendor_types/squad_prep/squad_tl.dm | 1 + code/game/machinery/vending/vendor_types/wo_vendors.dm | 1 + code/modules/vehicles/interior/interactable/vendors.dm | 1 + 13 files changed, 18 insertions(+), 4 deletions(-) diff --git a/code/datums/supply_packs/ammo.dm b/code/datums/supply_packs/ammo.dm index 4a7be2f9f652..164511c25cc0 100644 --- a/code/datums/supply_packs/ammo.dm +++ b/code/datums/supply_packs/ammo.dm @@ -420,6 +420,7 @@ /obj/item/ammo_magazine/smg/m39, /obj/item/ammo_magazine/smg/m39, /obj/item/ammo_magazine/smg/m39, + /obj/item/ammo_magazine/smg/m39/extended, /obj/item/ammo_magazine/smg/m39/ap, /obj/item/ammo_magazine/smg/m39/ap, /obj/item/ammo_magazine/revolver, diff --git a/code/game/machinery/vending/vendor_types/crew/pilot_officer.dm b/code/game/machinery/vending/vendor_types/crew/pilot_officer.dm index f61d8130a7bf..231e02bb5118 100644 --- a/code/game/machinery/vending/vendor_types/crew/pilot_officer.dm +++ b/code/game/machinery/vending/vendor_types/crew/pilot_officer.dm @@ -65,11 +65,11 @@ GLOBAL_LIST_INIT(cm_vending_clothing_pilot_officer, list( list("M30 Tactical Helmet", 0, /obj/item/clothing/head/helmet/marine/pilot, MARINE_CAN_BUY_HELMET, VENDOR_ITEM_MANDATORY), list("Leather Satchel", 0, /obj/item/storage/backpack/satchel, MARINE_CAN_BUY_BACKPACK, VENDOR_ITEM_MANDATORY), list("MRE", 0, /obj/item/storage/box/MRE, MARINE_CAN_BUY_MRE, VENDOR_ITEM_MANDATORY), - + list("ARMOR (CHOOSE 1)", 0, null, null, null), list("M70 Flak Jacket", 0, /obj/item/clothing/suit/armor/vest/pilot, MARINE_CAN_BUY_ARMOR, VENDOR_ITEM_MANDATORY), list("M3-VL Pattern Flak Vest", 0, /obj/item/clothing/suit/storage/marine/light/vest/dcc, MARINE_CAN_BUY_ARMOR, VENDOR_ITEM_MANDATORY), - + list("PERSONAL SIDEARM (CHOOSE 1)", 0, null, null, null), list("88 Mod 4 Combat Pistol", 0, /obj/item/weapon/gun/pistol/mod88, MARINE_CAN_BUY_ATTACHMENT, VENDOR_ITEM_REGULAR), list("VP78 Pistol", 0, /obj/item/weapon/gun/pistol/vp78, MARINE_CAN_BUY_ATTACHMENT, VENDOR_ITEM_REGULAR), @@ -133,6 +133,7 @@ GLOBAL_LIST_INIT(cm_vending_clothing_pilot_officer, list( list("AMMUNITION", 0, null, null, null), list("M4RA AP Magazine (10x24mm)", 10, /obj/item/ammo_magazine/rifle/m4ra/ap, null, VENDOR_ITEM_REGULAR), list("M39 AP Magazine (10x20mm)", 10, /obj/item/ammo_magazine/smg/m39/ap, null, VENDOR_ITEM_REGULAR), + list("M39 Extended Magazine (10x20mm)", 10, /obj/item/ammo_magazine/smg/m39/extended, null, VENDOR_ITEM_REGULAR), list("M41A AP Magazine (10x24mm)", 10, /obj/item/ammo_magazine/rifle/ap, null, VENDOR_ITEM_REGULAR), list("M41A Extended Magazine (10x24mm)", 10, /obj/item/ammo_magazine/rifle/extended, null, VENDOR_ITEM_REGULAR), list("M44 Heavy Speed Loader (.44)", 10, /obj/item/ammo_magazine/revolver/heavy, null, VENDOR_ITEM_REGULAR), @@ -152,8 +153,8 @@ GLOBAL_LIST_INIT(cm_vending_clothing_dropship_crew_chief, list( list("Gloves", 0, /obj/item/clothing/gloves/yellow, MARINE_CAN_BUY_GLOVES, VENDOR_ITEM_MANDATORY), list("Patrol Cap", 0, /obj/item/clothing/head/cmcap, MARINE_CAN_BUY_HELMET, VENDOR_ITEM_MANDATORY), list("Leather Satchel", 0, /obj/item/storage/backpack/satchel, MARINE_CAN_BUY_BACKPACK, VENDOR_ITEM_MANDATORY), - list("MRE", 0, /obj/item/storage/box/MRE, MARINE_CAN_BUY_MRE, VENDOR_ITEM_MANDATORY), - + list("MRE", 0, /obj/item/storage/box/MRE, MARINE_CAN_BUY_MRE, VENDOR_ITEM_MANDATORY), + list("ARMOR (CHOOSE 1)", 0, null, null, null), list("M70 Flak Jacket", 0, /obj/item/clothing/suit/armor/vest/pilot, MARINE_CAN_BUY_ARMOR, VENDOR_ITEM_MANDATORY), list("M3-VL Pattern Flak Vest", 0, /obj/item/clothing/suit/storage/marine/light/vest/dcc, MARINE_CAN_BUY_ARMOR, VENDOR_ITEM_MANDATORY), @@ -222,6 +223,7 @@ GLOBAL_LIST_INIT(cm_vending_clothing_dropship_crew_chief, list( list("AMMUNITION", 0, null, null, null), list("M4RA AP Magazine (10x24mm)", 10, /obj/item/ammo_magazine/rifle/m4ra/ap, null, VENDOR_ITEM_REGULAR), list("M39 AP Magazine (10x20mm)", 10, /obj/item/ammo_magazine/smg/m39/ap, null, VENDOR_ITEM_REGULAR), + list("M39 Extended Magazine (10x20mm)", 10, /obj/item/ammo_magazine/smg/m39/extended, null, VENDOR_ITEM_REGULAR), list("M41A AP Magazine (10x24mm)", 10, /obj/item/ammo_magazine/rifle/ap, null, VENDOR_ITEM_REGULAR), list("M41A Extended Magazine (10x24mm)", 10, /obj/item/ammo_magazine/rifle/extended, null, VENDOR_ITEM_REGULAR), list("M44 Heavy Speed Loader (.44)", 10, /obj/item/ammo_magazine/revolver/heavy, null, VENDOR_ITEM_REGULAR), diff --git a/code/game/machinery/vending/vendor_types/crew/vehicle_crew.dm b/code/game/machinery/vending/vendor_types/crew/vehicle_crew.dm index 0a9efdefb764..023bbe390bfc 100644 --- a/code/game/machinery/vending/vendor_types/crew/vehicle_crew.dm +++ b/code/game/machinery/vending/vendor_types/crew/vehicle_crew.dm @@ -367,6 +367,7 @@ GLOBAL_LIST_INIT(cm_vending_clothing_vehicle_crew, list( list("AMMUNITION", 0, null, null, null), list("M4RA AP Magazine (10x24mm)", 10, /obj/item/ammo_magazine/rifle/m4ra/ap, null, VENDOR_ITEM_REGULAR), list("M39 AP Magazine (10x20mm)", 10, /obj/item/ammo_magazine/smg/m39/ap , null, VENDOR_ITEM_REGULAR), + list("M39 Extended Magazine (10x20mm)", 10, /obj/item/ammo_magazine/smg/m39/extended , null, VENDOR_ITEM_REGULAR), list("M40 HEDP Grenade", 10, /obj/item/explosive/grenade/high_explosive, null, VENDOR_ITEM_REGULAR), list("M41A AP Magazine (10x24mm)", 10, /obj/item/ammo_magazine/rifle/ap , null, VENDOR_ITEM_REGULAR), list("M41A Extended Magazine (10x24mm)", 10, /obj/item/ammo_magazine/rifle/extended , null, VENDOR_ITEM_REGULAR), diff --git a/code/game/machinery/vending/vendor_types/intelligence_officer.dm b/code/game/machinery/vending/vendor_types/intelligence_officer.dm index 0347e10d158b..829c542f6b26 100644 --- a/code/game/machinery/vending/vendor_types/intelligence_officer.dm +++ b/code/game/machinery/vending/vendor_types/intelligence_officer.dm @@ -26,6 +26,7 @@ GLOBAL_LIST_INIT(cm_vending_gear_intelligence_officer, list( list("PRIMARY AMMUNITION", 0, null, null, null), list("M4RA AP Magazine (10x24mm)", 10, /obj/item/ammo_magazine/rifle/m4ra/ap, null, VENDOR_ITEM_REGULAR), list("M39 AP Magazine (10x20mm)", 10, /obj/item/ammo_magazine/smg/m39/ap , null, VENDOR_ITEM_REGULAR), + list("M39 Extended Magazine (10x20mm)", 10, /obj/item/ammo_magazine/smg/m39/extended , null, VENDOR_ITEM_REGULAR), list("M41A AP Magazine (10x24mm)", 10, /obj/item/ammo_magazine/rifle/ap , null, VENDOR_ITEM_REGULAR), list("M41A Extended Magazine (10x24mm)", 10, /obj/item/ammo_magazine/rifle/extended , null, VENDOR_ITEM_REGULAR), diff --git a/code/game/machinery/vending/vendor_types/requisitions.dm b/code/game/machinery/vending/vendor_types/requisitions.dm index b8ddb464194d..f85657e887a8 100644 --- a/code/game/machinery/vending/vendor_types/requisitions.dm +++ b/code/game/machinery/vending/vendor_types/requisitions.dm @@ -237,6 +237,7 @@ list("M4A3 AP Magazine (9mm)", round(scale * 2), /obj/item/ammo_magazine/pistol/ap, VENDOR_ITEM_REGULAR), list("EXTENDED AMMUNITION", -1, null, null), + list("M39 Extended Magazine (10x20mm)", round(scale * 9.5) + 3, /obj/item/ammo_magazine/smg/m39/extended, VENDOR_ITEM_REGULAR), list("M41A MK2 Extended Magazine (10x24mm)", round(scale * 8.1), /obj/item/ammo_magazine/rifle/extended, VENDOR_ITEM_REGULAR), list("SPECIAL AMMUNITION", -1, null, null), diff --git a/code/game/machinery/vending/vendor_types/squad_prep/squad_engineer.dm b/code/game/machinery/vending/vendor_types/squad_prep/squad_engineer.dm index cf5936cbd017..445ae80d401c 100644 --- a/code/game/machinery/vending/vendor_types/squad_prep/squad_engineer.dm +++ b/code/game/machinery/vending/vendor_types/squad_prep/squad_engineer.dm @@ -42,6 +42,7 @@ GLOBAL_LIST_INIT(cm_vending_gear_engi, list( list("AMMUNITION", 0, null, null, null), list("M4RA AP Magazine (10x24mm)", 6, /obj/item/ammo_magazine/rifle/m4ra/ap, null, VENDOR_ITEM_REGULAR), list("M39 AP Magazine (10x20mm)", 6, /obj/item/ammo_magazine/smg/m39/ap , null, VENDOR_ITEM_REGULAR), + list("M39 Extended Magazine (10x20mm)", 6, /obj/item/ammo_magazine/smg/m39/extended , null, VENDOR_ITEM_REGULAR), list("M41A AP Magazine (10x24mm)", 6, /obj/item/ammo_magazine/rifle/ap , null, VENDOR_ITEM_REGULAR), list("M41A Extended Magazine (10x24mm)", 6, /obj/item/ammo_magazine/rifle/extended , null, VENDOR_ITEM_REGULAR), diff --git a/code/game/machinery/vending/vendor_types/squad_prep/squad_leader.dm b/code/game/machinery/vending/vendor_types/squad_prep/squad_leader.dm index 8a8d0fa3735e..fdfdabd8335e 100644 --- a/code/game/machinery/vending/vendor_types/squad_prep/squad_leader.dm +++ b/code/game/machinery/vending/vendor_types/squad_prep/squad_leader.dm @@ -73,6 +73,7 @@ GLOBAL_LIST_INIT(cm_vending_gear_leader, list( list("SPECIAL AMMUNITION", 0, null, null, null), list("M4RA AP Magazine (10x24mm)", 6, /obj/item/ammo_magazine/rifle/m4ra/ap, null, VENDOR_ITEM_REGULAR), list("M39 AP Magazine (10x20mm)", 6, /obj/item/ammo_magazine/smg/m39/ap , null, VENDOR_ITEM_REGULAR), + list("M39 Extended Magazine (10x20mm)", 6, /obj/item/ammo_magazine/smg/m39/extended , null, VENDOR_ITEM_REGULAR), list("M41A AP Magazine (10x24mm)", 6, /obj/item/ammo_magazine/rifle/ap , null, VENDOR_ITEM_REGULAR), list("M41A Extended Magazine (10x24mm)", 6, /obj/item/ammo_magazine/rifle/extended , null, VENDOR_ITEM_REGULAR), list("M240 Incinerator Tank (Napthal)", 3, /obj/item/ammo_magazine/flamer_tank, null, VENDOR_ITEM_REGULAR), diff --git a/code/game/machinery/vending/vendor_types/squad_prep/squad_medic.dm b/code/game/machinery/vending/vendor_types/squad_prep/squad_medic.dm index 1052834eea3b..532c8e58dd02 100644 --- a/code/game/machinery/vending/vendor_types/squad_prep/squad_medic.dm +++ b/code/game/machinery/vending/vendor_types/squad_prep/squad_medic.dm @@ -63,6 +63,7 @@ GLOBAL_LIST_INIT(cm_vending_gear_medic, list( list("AMMUNITION", 0, null, null, null), list("M4RA AP Magazine (10x24mm)", 6, /obj/item/ammo_magazine/rifle/m4ra/ap, null, VENDOR_ITEM_REGULAR), list("M39 AP Magazine (10x20mm)", 6, /obj/item/ammo_magazine/smg/m39/ap , null, VENDOR_ITEM_REGULAR), + list("M39 Extended Magazine (10x20mm)", 6, /obj/item/ammo_magazine/smg/m39/extended , null, VENDOR_ITEM_REGULAR), list("M41A AP Magazine (10x24mm)", 6, /obj/item/ammo_magazine/rifle/ap , null, VENDOR_ITEM_REGULAR), list("M41A Extended Magazine (10x24mm)", 6, /obj/item/ammo_magazine/rifle/extended , null, VENDOR_ITEM_REGULAR), diff --git a/code/game/machinery/vending/vendor_types/squad_prep/squad_prep.dm b/code/game/machinery/vending/vendor_types/squad_prep/squad_prep.dm index d8aafa0ef903..4f10d956ee3c 100644 --- a/code/game/machinery/vending/vendor_types/squad_prep/squad_prep.dm +++ b/code/game/machinery/vending/vendor_types/squad_prep/squad_prep.dm @@ -179,6 +179,7 @@ list("M41A AP Magazine (10x24mm)", round(scale * 3), /obj/item/ammo_magazine/rifle/ap, VENDOR_ITEM_REGULAR), list("EXTENDED AMMUNITION", -1, null, null), + list("M39 Extended Magazine (10x20mm)", round(scale * 1.8), /obj/item/ammo_magazine/smg/m39/extended, VENDOR_ITEM_REGULAR), list("M41A Extended Magazine (10x24mm)", round(scale * 1.9), /obj/item/ammo_magazine/rifle/extended, VENDOR_ITEM_REGULAR), list("SPECIAL AMMUNITION", -1, null, null), diff --git a/code/game/machinery/vending/vendor_types/squad_prep/squad_rifleman.dm b/code/game/machinery/vending/vendor_types/squad_prep/squad_rifleman.dm index 9276cd4dd1a3..543288c71706 100644 --- a/code/game/machinery/vending/vendor_types/squad_prep/squad_rifleman.dm +++ b/code/game/machinery/vending/vendor_types/squad_prep/squad_rifleman.dm @@ -64,6 +64,7 @@ GLOBAL_LIST_INIT(cm_vending_clothing_marine, list( list("AMMUNITION", 0, null, null, null), list("M4RA AP Magazine (10x24mm)", 10, /obj/item/ammo_magazine/rifle/m4ra/ap, null, VENDOR_ITEM_REGULAR), list("M39 AP Magazine (10x20mm)", 10, /obj/item/ammo_magazine/smg/m39/ap , null, VENDOR_ITEM_REGULAR), + list("M39 Extended Magazine (10x20mm)", 10, /obj/item/ammo_magazine/smg/m39/extended , null, VENDOR_ITEM_REGULAR), list("M41A AP Magazine (10x24mm)", 10, /obj/item/ammo_magazine/rifle/ap , null, VENDOR_ITEM_REGULAR), list("M41A Extended Magazine (10x24mm)", 10, /obj/item/ammo_magazine/rifle/extended , null, VENDOR_ITEM_REGULAR), list("M44 Heavy Speed Loader (.44)", 10, /obj/item/ammo_magazine/revolver/heavy, null, VENDOR_ITEM_REGULAR), diff --git a/code/game/machinery/vending/vendor_types/squad_prep/squad_tl.dm b/code/game/machinery/vending/vendor_types/squad_prep/squad_tl.dm index 8e5241cfad5f..4311a3982c86 100644 --- a/code/game/machinery/vending/vendor_types/squad_prep/squad_tl.dm +++ b/code/game/machinery/vending/vendor_types/squad_prep/squad_tl.dm @@ -5,6 +5,7 @@ GLOBAL_LIST_INIT(cm_vending_gear_tl, list( list("AMMUNITION", 0, null, null, null), list("M4RA AP Magazine (10x24mm)", 10, /obj/item/ammo_magazine/rifle/m4ra/ap, null, VENDOR_ITEM_REGULAR), list("M39 AP Magazine (10x20mm)", 10, /obj/item/ammo_magazine/smg/m39/ap , null, VENDOR_ITEM_REGULAR), + list("M39 Extended Magazine (10x20mm)", 10, /obj/item/ammo_magazine/smg/m39/extended , null, VENDOR_ITEM_REGULAR), list("M41A AP Magazine (10x24mm)", 10, /obj/item/ammo_magazine/rifle/ap , null, VENDOR_ITEM_REGULAR), list("M41A Extended Magazine (10x24mm)", 10, /obj/item/ammo_magazine/rifle/extended , null, VENDOR_ITEM_REGULAR), list("M44 Heavy Speed Loader (.44)", 10, /obj/item/ammo_magazine/revolver/heavy, null, VENDOR_ITEM_REGULAR), diff --git a/code/game/machinery/vending/vendor_types/wo_vendors.dm b/code/game/machinery/vending/vendor_types/wo_vendors.dm index 0d9c3d0c1d2e..bdba638c577e 100644 --- a/code/game/machinery/vending/vendor_types/wo_vendors.dm +++ b/code/game/machinery/vending/vendor_types/wo_vendors.dm @@ -136,6 +136,7 @@ list("M4A3 AP Magazine (9mm)", round(scale * 5), /obj/item/ammo_magazine/pistol/ap, VENDOR_ITEM_REGULAR), list("EXTENDED AMMUNITION", -1, null, null), + list("M39 Extended Magazine (10x20mm)", round(scale * 1), /obj/item/ammo_magazine/smg/m39/extended, VENDOR_ITEM_REGULAR), list("M41A MK2 Extended Magazine (10x24mm)", round(scale * 3), /obj/item/ammo_magazine/rifle/extended, VENDOR_ITEM_REGULAR), list("INCENDIARY AMMUNITION", -1, null, null), diff --git a/code/modules/vehicles/interior/interactable/vendors.dm b/code/modules/vehicles/interior/interactable/vendors.dm index 5b940133499f..96a6f6b49c0f 100644 --- a/code/modules/vehicles/interior/interactable/vendors.dm +++ b/code/modules/vehicles/interior/interactable/vendors.dm @@ -226,6 +226,7 @@ list("M4A3 AP Magazine (9mm)", 0, /obj/item/ammo_magazine/pistol/ap, VENDOR_ITEM_REGULAR), list("EXTENDED AMMUNITION", -1, null, null), + list("M39 Extended Magazine (10x20mm)", 0, /obj/item/ammo_magazine/smg/m39/extended, VENDOR_ITEM_REGULAR), list("M41A MK2 Extended Magazine (10x24mm)", 0, /obj/item/ammo_magazine/rifle/extended, VENDOR_ITEM_REGULAR), list("SPECIALIST AMMUNITION", -1, null, null), From ff42c4fc5706b18fd2895b371fc610044094e583 Mon Sep 17 00:00:00 2001 From: John Doe Date: Sat, 12 Aug 2023 18:57:31 -0700 Subject: [PATCH 25/33] automatic returns, no 20% fire reduction, tightening of spread by 2.5 deg --- code/modules/projectiles/gun.dm | 4 ++-- code/modules/projectiles/guns/flamer/flamer.dm | 1 - code/modules/projectiles/guns/misc.dm | 2 -- code/modules/projectiles/guns/pistols.dm | 1 - code/modules/projectiles/guns/rifles.dm | 12 +++++------- code/modules/projectiles/guns/shotguns.dm | 1 - code/modules/projectiles/guns/smartgun.dm | 1 - code/modules/projectiles/guns/smgs.dm | 2 -- 8 files changed, 7 insertions(+), 17 deletions(-) diff --git a/code/modules/projectiles/gun.dm b/code/modules/projectiles/gun.dm index 1be0b9a7c736..8d0e7625c23d 100644 --- a/code/modules/projectiles/gun.dm +++ b/code/modules/projectiles/gun.dm @@ -127,7 +127,7 @@ ///How many full-auto shots to get to max scatter? var/fa_scatter_peak = 4 ///How bad does the scatter get on full auto? - var/fa_max_scatter = 8.5 + var/fa_max_scatter = 6 ///Click parameters to use when firing full-auto var/fa_params = null @@ -229,7 +229,7 @@ /// If this gun should spawn with automatic fire. Protected due to it never needing to be edited. VAR_PROTECTED/start_automatic = FALSE /// The multiplier for how much slower this should fire in automatic mode. 1 is normal, 1.2 is 20% slower, 2 is 100% slower, etc. Protected due to it never needing to be edited. - VAR_PROTECTED/autofire_slow_mult = 1.2 + VAR_PROTECTED/autofire_slow_mult = 1 /** diff --git a/code/modules/projectiles/guns/flamer/flamer.dm b/code/modules/projectiles/guns/flamer/flamer.dm index 3125468ee56f..f327a92ffc9c 100644 --- a/code/modules/projectiles/guns/flamer/flamer.dm +++ b/code/modules/projectiles/guns/flamer/flamer.dm @@ -367,7 +367,6 @@ desc = "A prototyped model of the M240-T incinerator unit, it was discontinued after its automatic mode was deemed too expensive to deploy in the field." start_semiauto = FALSE start_automatic = TRUE - autofire_slow_mult = 1 /obj/item/weapon/gun/flamer/M240T/auto/set_gun_config_values() . = ..() diff --git a/code/modules/projectiles/guns/misc.dm b/code/modules/projectiles/guns/misc.dm index 6a1f13b68380..2aa6b2dfc4d3 100644 --- a/code/modules/projectiles/guns/misc.dm +++ b/code/modules/projectiles/guns/misc.dm @@ -17,7 +17,6 @@ gun_category = GUN_CATEGORY_HEAVY start_semiauto = FALSE start_automatic = TRUE - autofire_slow_mult = 1 /obj/item/weapon/gun/minigun/Initialize(mapload, spawn_empty) . = ..() @@ -87,7 +86,6 @@ ) start_semiauto = FALSE start_automatic = TRUE - autofire_slow_mult = 1 var/cover_open = FALSE //if the gun's feed-cover is open or not. diff --git a/code/modules/projectiles/guns/pistols.dm b/code/modules/projectiles/guns/pistols.dm index 8da9e7460491..47b80f7b9218 100644 --- a/code/modules/projectiles/guns/pistols.dm +++ b/code/modules/projectiles/guns/pistols.dm @@ -790,7 +790,6 @@ It is a modified Beretta 93R, and can fire three-round burst or single fire. Whe ) start_semiauto = FALSE start_automatic = TRUE - autofire_slow_mult = 1 /obj/item/weapon/gun/pistol/skorpion/set_gun_attachment_offsets() attachable_offset = list("muzzle_x" = 29, "muzzle_y" = 18,"rail_x" = 16, "rail_y" = 21, "under_x" = 23, "under_y" = 15, "stock_x" = 23, "stock_y" = 15) diff --git a/code/modules/projectiles/guns/rifles.dm b/code/modules/projectiles/guns/rifles.dm index db3cf6d8d01e..b956f471e65f 100644 --- a/code/modules/projectiles/guns/rifles.dm +++ b/code/modules/projectiles/guns/rifles.dm @@ -75,7 +75,7 @@ flags_gun_features = GUN_AUTO_EJECTOR|GUN_CAN_POINTBLANK|GUN_AMMO_COUNTER starting_attachment_types = list(/obj/item/attachable/attached_gun/grenade, /obj/item/attachable/stock/rifle/collapsible) map_specific_decoration = TRUE - //start_automatic = TRUE + start_automatic = TRUE /obj/item/weapon/gun/rifle/m41a/set_gun_attachment_offsets() attachable_offset = list("muzzle_x" = 32, "muzzle_y" = 18,"rail_x" = 12, "rail_y" = 23, "under_x" = 24, "under_y" = 13, "stock_x" = 24, "stock_y" = 13) @@ -150,8 +150,7 @@ /obj/item/attachable/attached_gun/flamer/advanced, ) start_semiauto = FALSE - //start_automatic = TRUE - autofire_slow_mult = 1.1 + start_automatic = TRUE /obj/item/weapon/gun/rifle/nsg23/Initialize(mapload, spawn_empty) . = ..() @@ -386,7 +385,7 @@ flags_gun_features = GUN_AUTO_EJECTOR|GUN_CAN_POINTBLANK|GUN_AMMO_COUNTER starting_attachment_types = list(/obj/item/attachable/attached_gun/grenade/mk1, /obj/item/attachable/stock/rifle/collapsible) - //start_automatic = TRUE + start_automatic = TRUE /obj/item/weapon/gun/rifle/m41aMK1/set_gun_attachment_offsets() attachable_offset = list("muzzle_x" = 32, "muzzle_y" = 18,"rail_x" = 12, "rail_y" = 23, "under_x" = 23, "under_y" = 13, "stock_x" = 24, "stock_y" = 14) @@ -489,7 +488,6 @@ indestructible = TRUE auto_retrieval_slot = WEAR_J_STORE map_specific_decoration = TRUE - autofire_slow_mult = 1 var/mob/living/carbon/human/linked_human var/is_locked = TRUE @@ -727,7 +725,7 @@ ) flags_gun_features = GUN_AUTO_EJECTOR|GUN_CAN_POINTBLANK - //start_automatic = TRUE + start_automatic = TRUE @@ -1306,7 +1304,7 @@ flags_gun_features = GUN_AUTO_EJECTOR|GUN_CAN_POINTBLANK|GUN_AMMO_COUNTER flags_equip_slot = SLOT_BACK - //start_automatic = TRUE + start_automatic = TRUE /obj/item/weapon/gun/rifle/type71/set_gun_attachment_offsets() attachable_offset = list("muzzle_x" = 32, "muzzle_y" = 18,"rail_x" = 18, "rail_y" = 23, "under_x" = 20, "under_y" = 13, "stock_x" = 24, "stock_y" = 13) diff --git a/code/modules/projectiles/guns/shotguns.dm b/code/modules/projectiles/guns/shotguns.dm index 5296b1838157..cc511cfb836d 100644 --- a/code/modules/projectiles/guns/shotguns.dm +++ b/code/modules/projectiles/guns/shotguns.dm @@ -327,7 +327,6 @@ can cause issues with ammo types getting mixed up during the burst. flags_gun_features = GUN_CAN_POINTBLANK|GUN_INTERNAL_MAG auto_retrieval_slot = WEAR_J_STORE start_automatic = TRUE - autofire_slow_mult = 1 /obj/item/weapon/gun/shotgun/combat/marsoc/Initialize(mapload, spawn_empty) . = ..() diff --git a/code/modules/projectiles/guns/smartgun.dm b/code/modules/projectiles/guns/smartgun.dm index c29c46030318..859f99b17908 100644 --- a/code/modules/projectiles/guns/smartgun.dm +++ b/code/modules/projectiles/guns/smartgun.dm @@ -65,7 +65,6 @@ auto_retrieval_slot = WEAR_J_STORE start_semiauto = FALSE start_automatic = TRUE - autofire_slow_mult = 1 /obj/item/weapon/gun/smartgun/Initialize(mapload, ...) diff --git a/code/modules/projectiles/guns/smgs.dm b/code/modules/projectiles/guns/smgs.dm index f9ff3a2961a6..9d68cc8a9056 100644 --- a/code/modules/projectiles/guns/smgs.dm +++ b/code/modules/projectiles/guns/smgs.dm @@ -21,8 +21,6 @@ flags_gun_features = GUN_AUTO_EJECTOR|GUN_CAN_POINTBLANK gun_category = GUN_CATEGORY_SMG start_automatic = TRUE - autofire_slow_mult = 1 - fa_max_scatter = 6.5 /obj/item/weapon/gun/smg/Initialize(mapload, spawn_empty) . = ..() From c9b53ae210c15cc80e26a9eb1b133010b9522322 Mon Sep 17 00:00:00 2001 From: John Doe Date: Sat, 12 Aug 2023 19:15:07 -0700 Subject: [PATCH 26/33] 6 -> 6.5 --- code/modules/projectiles/gun.dm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/modules/projectiles/gun.dm b/code/modules/projectiles/gun.dm index 8d0e7625c23d..9727f55d35a8 100644 --- a/code/modules/projectiles/gun.dm +++ b/code/modules/projectiles/gun.dm @@ -127,7 +127,7 @@ ///How many full-auto shots to get to max scatter? var/fa_scatter_peak = 4 ///How bad does the scatter get on full auto? - var/fa_max_scatter = 6 + var/fa_max_scatter = 6.5 ///Click parameters to use when firing full-auto var/fa_params = null From 7e674dde45c1f20972fbc2833ea2a4c5b3fe0391 Mon Sep 17 00:00:00 2001 From: John Doe Date: Sun, 13 Aug 2023 08:26:50 -0700 Subject: [PATCH 27/33] tiny fixes --- code/modules/projectiles/gun.dm | 4 ++-- code/modules/projectiles/projectile.dm | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/code/modules/projectiles/gun.dm b/code/modules/projectiles/gun.dm index 9727f55d35a8..b69d2ad53c0b 100644 --- a/code/modules/projectiles/gun.dm +++ b/code/modules/projectiles/gun.dm @@ -506,7 +506,7 @@ As sniper rifles have both and weapon mods can change them as well. ..() deals w for(var/group in fire_delay_group) LAZYSET(user.fire_delay_next_fire, group, world.time + delay_left) - if(slot in list(WEAR_L_HAND, WEAR_R_HAND)) + if(slot == user.get_active_hand()) set_gun_user(user) else set_gun_user(null) @@ -1897,7 +1897,7 @@ not all weapons use normal magazines etc. load_into_chamber() itself is designed if(!target) target = src.target if(!user) - user = src.gun_user + user = gun_user return Fire(target, user, params, reflex, dual_wield) /// Setter proc for fa_firing diff --git a/code/modules/projectiles/projectile.dm b/code/modules/projectiles/projectile.dm index e4251f5f6b31..a7295729a825 100644 --- a/code/modules/projectiles/projectile.dm +++ b/code/modules/projectiles/projectile.dm @@ -110,7 +110,7 @@ /obj/item/projectile/Crossed(atom/movable/AM) /* Fun fact: Crossed is called for any contents involving operations. * This notably means, inserting a magazing in a gun Crossed() it with the bullets in the gun. */ - if(!loc.z) + if(!loc?.z) return // Not on the map. Don't scan a turf. Don't shoot the poor guy reloading his gun. if(AM && !(AM in permutated)) if(scan_a_turf(get_turf(AM))) From 9d9f7a358304ac8d532ed0492171f16187fb32a1 Mon Sep 17 00:00:00 2001 From: John Doe Date: Sun, 13 Aug 2023 10:59:04 -0700 Subject: [PATCH 28/33] UNDO LATER - DEBUG --- code/modules/projectiles/projectile.dm | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/code/modules/projectiles/projectile.dm b/code/modules/projectiles/projectile.dm index a7295729a825..d5b2c6c0202d 100644 --- a/code/modules/projectiles/projectile.dm +++ b/code/modules/projectiles/projectile.dm @@ -1143,11 +1143,16 @@ // Need to do this in order to prevent the ping from being deleted addtimer(CALLBACK(I, TYPE_PROC_REF(/image, flick_overlay), src, 3), 1) +/// Zonennote: debug attempt for bullet lag +/mob/var/shot_cooldown = 0 + /mob/proc/bullet_message(obj/item/projectile/P) if(!P) return - visible_message(SPAN_DANGER("[src] is hit by the [P.name] in the [parse_zone(P.def_zone)]!"), \ - SPAN_HIGHDANGER("You are hit by the [P.name] in the [parse_zone(P.def_zone)]!"), null, 4, CHAT_TYPE_TAKING_HIT) + if(COOLDOWN_FINISHED(src, shot_cooldown)) + visible_message(SPAN_DANGER("[src] is hit by the [P.name] in the [parse_zone(P.def_zone)]!"), \ + SPAN_HIGHDANGER("You are hit by the [P.name] in the [parse_zone(P.def_zone)]!"), null, 4, CHAT_TYPE_TAKING_HIT) + COOLDOWN_START(src, shot_cooldown, 1 SECONDS) last_damage_data = P.weapon_cause_data if(P.firer && ismob(P.firer)) From 0c2ad13527838f4c287768cda0c5e5c12ea5fb27 Mon Sep 17 00:00:00 2001 From: John Doe Date: Sun, 13 Aug 2023 11:19:41 -0700 Subject: [PATCH 29/33] aw goddamn it --- code/modules/projectiles/gun.dm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/modules/projectiles/gun.dm b/code/modules/projectiles/gun.dm index b69d2ad53c0b..d7f194cca927 100644 --- a/code/modules/projectiles/gun.dm +++ b/code/modules/projectiles/gun.dm @@ -506,7 +506,7 @@ As sniper rifles have both and weapon mods can change them as well. ..() deals w for(var/group in fire_delay_group) LAZYSET(user.fire_delay_next_fire, group, world.time + delay_left) - if(slot == user.get_active_hand()) + if(slot in list(WEAR_L_HAND, WEAR_R_HAND)) set_gun_user(user) else set_gun_user(null) From 054ef539481a741e3c787ece1533c482e28ae449 Mon Sep 17 00:00:00 2001 From: John Doe Date: Sun, 13 Aug 2023 15:07:38 -0700 Subject: [PATCH 30/33] dumbness fix --- code/modules/projectiles/guns/shotguns.dm | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/code/modules/projectiles/guns/shotguns.dm b/code/modules/projectiles/guns/shotguns.dm index cc511cfb836d..c3666d4f43df 100644 --- a/code/modules/projectiles/guns/shotguns.dm +++ b/code/modules/projectiles/guns/shotguns.dm @@ -1186,7 +1186,7 @@ can cause issues with ammo types getting mixed up during the burst. /obj/item/weapon/gun/shotgun/pump/dual_tube name = "generic dual-tube pump shotgun" - desc = "A twenty-round pump action shotgun with dual internal tube magazines. You can switch the active internal magazine by toggling burst fire mode." + desc = "A twenty-round pump action shotgun with dual internal tube magazines. You can switch the active internal magazine by toggling the shotgun tube." current_mag = /obj/item/ammo_magazine/internal/shotgun var/obj/item/ammo_magazine/internal/shotgun/primary_tube var/obj/item/ammo_magazine/internal/shotgun/secondary_tube @@ -1234,7 +1234,7 @@ can cause issues with ammo types getting mixed up during the burst. /obj/item/weapon/gun/shotgun/pump/dual_tube/cmb name = "\improper HG 37-12 pump shotgun" - desc = "A eight-round pump action shotgun with four-round capacity dual internal tube magazines allowing for quick reloading and highly accurate fire. Used exclusively by Colonial Marshals. You can switch the active internal magazine by toggling burst fire mode." + desc = "A eight-round pump action shotgun with four-round capacity dual internal tube magazines allowing for quick reloading and highly accurate fire. Used exclusively by Colonial Marshals. You can switch the active internal magazine by toggling the shotgun tube." icon = 'icons/obj/items/weapons/guns/guns_by_faction/colony.dmi' icon_state = "hg3712" item_state = "hg3712" @@ -1274,7 +1274,7 @@ can cause issues with ammo types getting mixed up during the burst. /obj/item/weapon/gun/shotgun/pump/dual_tube/cmb/m3717 name = "\improper M37-17 pump shotgun" - desc = "A military version of the iconic HG 37-12, this design can fit one extra shell in each of its dual-tube internal magazines, and fires shells with increased velocity, resulting in more damage. Issued to select USCM vessels out on the rim. You can switch the active internal magazine by toggling burst fire mode." + desc = "A military version of the iconic HG 37-12, this design can fit one extra shell in each of its dual-tube internal magazines, and fires shells with increased velocity, resulting in more damage. Issued to select USCM vessels out on the rim. You can switch the active internal magazine by toggling the shotgun tube." icon = 'icons/obj/items/weapons/guns/guns_by_faction/uscm.dmi' icon_state = "m3717" item_state = "m3717" From 1f52d4b304ec05af80d33b05933aa3b4340c4f7f Mon Sep 17 00:00:00 2001 From: John Doe Date: Wed, 16 Aug 2023 11:24:20 -0700 Subject: [PATCH 31/33] buffs the autoflamer --- code/modules/projectiles/guns/flamer/flamer.dm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/modules/projectiles/guns/flamer/flamer.dm b/code/modules/projectiles/guns/flamer/flamer.dm index f327a92ffc9c..8f2a1eb25e0c 100644 --- a/code/modules/projectiles/guns/flamer/flamer.dm +++ b/code/modules/projectiles/guns/flamer/flamer.dm @@ -370,7 +370,7 @@ /obj/item/weapon/gun/flamer/M240T/auto/set_gun_config_values() . = ..() - set_fire_delay(FIRE_DELAY_TIER_3) + set_fire_delay(FIRE_DELAY_TIER_7) GLOBAL_LIST_EMPTY(flamer_particles) /particles/flamer_fire From db622ab58dbe119aa8eda677fd4d4ae9dc84fe22 Mon Sep 17 00:00:00 2001 From: John Doe Date: Thu, 17 Aug 2023 11:03:00 -0700 Subject: [PATCH 32/33] fixes dumb shitcode bug --- code/__DEFINES/dcs/signals/atom/signals_item.dm | 3 +++ code/datums/components/autofire/autofire.dm | 2 ++ code/modules/projectiles/gun.dm | 8 ++++++-- code/modules/projectiles/gun_attachables.dm | 2 ++ 4 files changed, 13 insertions(+), 2 deletions(-) diff --git a/code/__DEFINES/dcs/signals/atom/signals_item.dm b/code/__DEFINES/dcs/signals/atom/signals_item.dm index 2be5afe1056f..b7bbca9f64a3 100644 --- a/code/__DEFINES/dcs/signals/atom/signals_item.dm +++ b/code/__DEFINES/dcs/signals/atom/signals_item.dm @@ -57,3 +57,6 @@ /// from /obj/item/weapon/gun/proc/recalculate_attachment_bonuses() : () #define COMSIG_GUN_RECALCULATE_ATTACHMENT_BONUSES "gun_recalculate_attachment_bonuses" + +/// from /obj/item/weapon/gun/proc/load_into_chamber() : () +#define COMSIG_GUN_INTERRUPT_FIRE "gun_interrupt_fire" diff --git a/code/datums/components/autofire/autofire.dm b/code/datums/components/autofire/autofire.dm index 571848763f06..2b9401e8d346 100644 --- a/code/datums/components/autofire/autofire.dm +++ b/code/datums/components/autofire/autofire.dm @@ -37,6 +37,7 @@ RegisterSignal(parent, COMSIG_GUN_BURST_SHOT_DELAY_MODIFIED, PROC_REF(modify_burstfire_shot_delay)) RegisterSignal(parent, COMSIG_GUN_FIRE, PROC_REF(initiate_shot)) RegisterSignal(parent, COMSIG_GUN_STOP_FIRE, PROC_REF(stop_firing)) + RegisterSignal(parent, COMSIG_GUN_INTERRUPT_FIRE, PROC_REF(hard_reset)) src.auto_fire_shot_delay = auto_fire_shot_delay src.burstfire_shot_delay = burstfire_shot_delay @@ -99,6 +100,7 @@ ///Hard reset the autofire, happens when the shooter fall/is thrown, at the end of a burst or when it runs out of ammunition /datum/component/automatedfire/autofire/proc/hard_reset() + SIGNAL_HANDLER callback_reset_fire.Invoke() //resets the gun shots_fired = 0 have_to_reset_at_burst_end = FALSE diff --git a/code/modules/projectiles/gun.dm b/code/modules/projectiles/gun.dm index d7f194cca927..ba4115a96c12 100644 --- a/code/modules/projectiles/gun.dm +++ b/code/modules/projectiles/gun.dm @@ -945,6 +945,10 @@ and you're good to go. //Let's check on the active attachable. It loads ammo on the go, so it never chambers anything if(active_attachable) + if(shots_fired >= 1) // This is what you'll want to remove if you want automatic underbarrel guns in the future + SEND_SIGNAL(src, COMSIG_GUN_INTERRUPT_FIRE) + return + if(active_attachable.current_rounds > 0) //If it's still got ammo and stuff. active_attachable.current_rounds-- var/obj/item/projectile/bullet = create_bullet(active_attachable.ammo, initial(name)) @@ -1079,10 +1083,10 @@ and you're good to go. This is where the grenade launcher and flame thrower function as attachments. This is also a general check to see if the attachment can fire in the first place. */ - var/check_for_attachment_fire = 0 + var/check_for_attachment_fire = FALSE if(active_attachable?.flags_attach_features & ATTACH_WEAPON) //Attachment activated and is a weapon. - check_for_attachment_fire = 1 + check_for_attachment_fire = TRUE if(!(active_attachable.flags_attach_features & ATTACH_PROJECTILE)) //If it's unique projectile, this is where we fire it. if((active_attachable.current_rounds <= 0) && !(active_attachable.flags_attach_features & ATTACH_IGNORE_EMPTY)) click_empty(user) //If it's empty, let them know. diff --git a/code/modules/projectiles/gun_attachables.dm b/code/modules/projectiles/gun_attachables.dm index 11eefd15a9a7..2e4cf2423826 100644 --- a/code/modules/projectiles/gun_attachables.dm +++ b/code/modules/projectiles/gun_attachables.dm @@ -1997,6 +1997,8 @@ Defined in conflicts.dm of the #defines folder. G.damage_mult = 1 icon_state += "-on" + SEND_SIGNAL(G, COMSIG_GUN_INTERRUPT_FIRE) + for(var/X in G.actions) var/datum/action/A = X A.update_button_icon() From 0db4e71ed4e977eda4bd8bf0ff604012fca28c67 Mon Sep 17 00:00:00 2001 From: John Doe Date: Tue, 22 Aug 2023 20:58:24 -0700 Subject: [PATCH 33/33] zonennote --- code/modules/projectiles/projectile.dm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/modules/projectiles/projectile.dm b/code/modules/projectiles/projectile.dm index d5b2c6c0202d..eccba14a442a 100644 --- a/code/modules/projectiles/projectile.dm +++ b/code/modules/projectiles/projectile.dm @@ -1143,7 +1143,7 @@ // Need to do this in order to prevent the ping from being deleted addtimer(CALLBACK(I, TYPE_PROC_REF(/image, flick_overlay), src, 3), 1) -/// Zonennote: debug attempt for bullet lag +/// People getting shot by a large amount of bullets in a very short period of time can lag them out, with chat messages being one cause, so a 1s cooldown per hit message is introduced to assuage that /mob/var/shot_cooldown = 0 /mob/proc/bullet_message(obj/item/projectile/P)