diff --git a/code/__DEFINES/conflict.dm b/code/__DEFINES/conflict.dm index c1ffec7712d9e..a3ef8b038365c 100644 --- a/code/__DEFINES/conflict.dm +++ b/code/__DEFINES/conflict.dm @@ -80,6 +80,7 @@ #define GUN_NO_PITCH_SHIFT_NEAR_EMPTY (1<<13) #define GUN_SHOWS_AMMO_REMAINING (1<<14) //Whether the mob sprite reflects the ammo level #define GUN_SHOWS_LOADED (1<<15) //Whether the mob sprite as loaded or unloaded, a binary version of the above +#define GUN_SMOKE_PARTICLES (1<<16) //Whether the gun has smoke particles //reciever_flags. Used to determin how the gun cycles, what kind of ammo it uses, etc. #define AMMO_RECIEVER_REQUIRES_UNIQUE_ACTION (1<<0) diff --git a/code/_globalvars/bitfields.dm b/code/_globalvars/bitfields.dm index 5dc6a4fb3490d..50fb84bd81d08 100755 --- a/code/_globalvars/bitfields.dm +++ b/code/_globalvars/bitfields.dm @@ -44,7 +44,8 @@ GLOBAL_LIST_INIT(bitfields, list( "GUN_AMMO_COUNT_BY_SHOTS_REMAINING" = GUN_AMMO_COUNT_BY_SHOTS_REMAINING, "GUN_NO_PITCH_SHIFT_NEAR_EMPTY" = GUN_NO_PITCH_SHIFT_NEAR_EMPTY, "GUN_SHOWS_AMMO_REMAINING" = GUN_SHOWS_AMMO_REMAINING, - "GUN_SHOWS_LOADED" = GUN_SHOWS_LOADED + "GUN_SHOWS_LOADED" = GUN_SHOWS_LOADED, + "GUN_SMOKE_PARTICLES" = GUN_SMOKE_PARTICLES ), "flags_flamer_features" = list( "FLAMER_IS_LIT" = FLAMER_IS_LIT, diff --git a/code/modules/projectiles/gun_system.dm b/code/modules/projectiles/gun_system.dm index f0e1b7c75446c..5eb97dcbd8d53 100644 --- a/code/modules/projectiles/gun_system.dm +++ b/code/modules/projectiles/gun_system.dm @@ -1,3 +1,19 @@ +/particles/firing_smoke + icon = 'icons/effects/96x96.dmi' + icon_state = "smoke5" + width = 500 + height = 500 + count = 5 + spawning = 15 + lifespan = 0.5 SECONDS + fade = 2.4 SECONDS + grow = 0.12 + drift = generator(GEN_CIRCLE, 8, 8) + scale = 0.1 + spin = generator(GEN_NUM, -20, 20) + velocity = list(50, 0) + friction = generator(GEN_NUM, 0.3, 0.6) + /obj/item/weapon/gun name = "Guns" desc = "Its a gun. It's pretty terrible, though." @@ -969,7 +985,14 @@ simulate_recoil(dual_wield, firing_angle) projectile_to_fire.fire_at(target, master_gun ? gun_user : loc, src, projectile_to_fire.ammo.max_range, projectile_to_fire.projectile_speed, firing_angle, suppress_light = HAS_TRAIT(src, TRAIT_GUN_SILENCED)) - + if(CHECK_BITFIELD(flags_gun_features, GUN_SMOKE_PARTICLES)) + var/x_component = sin(firing_angle) * 40 + var/y_component = cos(firing_angle) * 40 + var/obj/effect/abstract/particle_holder/gun_smoke = new(get_turf(src), /particles/firing_smoke) + gun_smoke.particles.velocity = list(x_component, y_component) + addtimer(VARSET_CALLBACK(gun_smoke.particles, count, 0), 5) + addtimer(VARSET_CALLBACK(gun_smoke.particles, drift, 0), 3) + QDEL_IN(gun_smoke, 0.6 SECONDS) shots_fired++ if(fire_animation) //Fires gun firing animation if it has any. ex: rotating barrel diff --git a/code/modules/projectiles/guns/grenade_launchers.dm b/code/modules/projectiles/guns/grenade_launchers.dm index c93b03e1616af..bd8156e9ff8fe 100644 --- a/code/modules/projectiles/guns/grenade_launchers.dm +++ b/code/modules/projectiles/guns/grenade_launchers.dm @@ -8,7 +8,7 @@ The Grenade Launchers /obj/item/weapon/gun/grenade_launcher w_class = WEIGHT_CLASS_BULKY gun_skill_category = SKILL_FIREARMS - flags_gun_features = GUN_WIELDED_FIRING_ONLY|GUN_AMMO_COUNTER + flags_gun_features = GUN_WIELDED_FIRING_ONLY|GUN_AMMO_COUNTER|GUN_SMOKE_PARTICLES reciever_flags = NONE throw_speed = 2 throw_range = 10 @@ -87,6 +87,15 @@ The Grenade Launchers grenade_to_launch.throw_at(target, max_range, 3, (gun_user ? gun_user : loc)) if(fire_animation) flick("[fire_animation]", src) + if(CHECK_BITFIELD(flags_gun_features, GUN_SMOKE_PARTICLES)) + var/firing_angle = Get_Angle(user_turf, target) + var/x_component = sin(firing_angle) * 40 + var/y_component = cos(firing_angle) * 40 + var/obj/effect/abstract/particle_holder/gun_smoke = new(get_turf(src), /particles/firing_smoke) + gun_smoke.particles.velocity = list(x_component, y_component) + addtimer(VARSET_CALLBACK(gun_smoke.particles, count, 0), 5) + addtimer(VARSET_CALLBACK(gun_smoke.particles, drift, 0), 3) + QDEL_IN(gun_smoke, 0.6 SECONDS) return TRUE /obj/item/weapon/gun/grenade_launcher/get_ammo_list() @@ -141,7 +150,7 @@ The Grenade Launchers slot = ATTACHMENT_SLOT_UNDER attach_delay = 3 SECONDS detach_delay = 3 SECONDS - flags_gun_features = GUN_AMMO_COUNTER|GUN_IS_ATTACHMENT|GUN_ATTACHMENT_FIRE_ONLY|GUN_WIELDED_STABLE_FIRING_ONLY|GUN_WIELDED_FIRING_ONLY + flags_gun_features = GUN_AMMO_COUNTER|GUN_IS_ATTACHMENT|GUN_ATTACHMENT_FIRE_ONLY|GUN_WIELDED_STABLE_FIRING_ONLY|GUN_WIELDED_FIRING_ONLY|GUN_SMOKE_PARTICLES pixel_shift_x = 14 pixel_shift_y = 18 allowed_ammo_types = list( @@ -199,7 +208,7 @@ The Grenade Launchers flags_equip_slot = ITEM_SLOT_BACK|ITEM_SLOT_BELT wield_delay = 0.2 SECONDS aim_slowdown = 1 - flags_gun_features = GUN_AMMO_COUNTER + flags_gun_features = GUN_AMMO_COUNTER|GUN_SMOKE_PARTICLES attachable_allowed = list() attachable_offset = list("muzzle_x" = 33, "muzzle_y" = 18,"rail_x" = 14, "rail_y" = 22, "under_x" = 19, "under_y" = 14, "stock_x" = 19, "stock_y" = 14) fire_delay = 1.05 SECONDS diff --git a/code/modules/projectiles/guns/mounted.dm b/code/modules/projectiles/guns/mounted.dm index 2d5df7c50be4f..f6167237c5f02 100644 --- a/code/modules/projectiles/guns/mounted.dm +++ b/code/modules/projectiles/guns/mounted.dm @@ -43,7 +43,7 @@ burst_scatter_mult = 0 flags_item = IS_DEPLOYABLE|TWOHANDED - flags_gun_features = GUN_AMMO_COUNTER|GUN_DEPLOYED_FIRE_ONLY|GUN_WIELDED_FIRING_ONLY|GUN_IFF + flags_gun_features = GUN_AMMO_COUNTER|GUN_DEPLOYED_FIRE_ONLY|GUN_WIELDED_FIRING_ONLY|GUN_IFF|GUN_SMOKE_PARTICLES gun_firemode_list = list(GUN_FIREMODE_BURSTFIRE, GUN_FIREMODE_AUTOMATIC) attachable_allowed = list( @@ -114,7 +114,7 @@ windup_sound = 'sound/weapons/guns/fire/tank_minigun_start.ogg' flags_item = IS_DEPLOYABLE|TWOHANDED - flags_gun_features = GUN_AMMO_COUNTER|GUN_DEPLOYED_FIRE_ONLY|GUN_WIELDED_FIRING_ONLY + flags_gun_features = GUN_AMMO_COUNTER|GUN_DEPLOYED_FIRE_ONLY|GUN_WIELDED_FIRING_ONLY|GUN_SMOKE_PARTICLES gun_firemode_list = list(GUN_FIREMODE_AUTOMATIC) actions_types = list(/datum/action/item_action/aim_mode) aim_time = 2 SECONDS @@ -172,7 +172,7 @@ extra_delay = 1.5 SECONDS flags_item = IS_DEPLOYABLE|TWOHANDED|DEPLOYED_NO_PICKUP|DEPLOY_ON_INITIALIZE - flags_gun_features = GUN_AMMO_COUNTER|GUN_DEPLOYED_FIRE_ONLY|GUN_WIELDED_FIRING_ONLY|GUN_IFF + flags_gun_features = GUN_AMMO_COUNTER|GUN_DEPLOYED_FIRE_ONLY|GUN_WIELDED_FIRING_ONLY|GUN_IFF|GUN_SMOKE_PARTICLES gun_firemode_list = list(GUN_FIREMODE_AUTOMATIC, GUN_FIREMODE_BURSTFIRE, GUN_FIREMODE_AUTOBURST) attachable_allowed = list(/obj/item/attachable/scope/unremovable/standard_atgun) @@ -216,7 +216,7 @@ fire_delay = 0.7 SECONDS flags_item = IS_DEPLOYABLE|TWOHANDED|DEPLOYED_NO_PICKUP|DEPLOY_ON_INITIALIZE - flags_gun_features = GUN_AMMO_COUNTER|GUN_DEPLOYED_FIRE_ONLY|GUN_WIELDED_FIRING_ONLY + flags_gun_features = GUN_AMMO_COUNTER|GUN_DEPLOYED_FIRE_ONLY|GUN_WIELDED_FIRING_ONLY|GUN_SMOKE_PARTICLES gun_firemode_list = list(GUN_FIREMODE_AUTOMATIC) attachable_allowed = list(/obj/item/attachable/scope/unremovable/tl102/nest) @@ -258,7 +258,7 @@ fire_delay = 3 SECONDS flags_item = IS_DEPLOYABLE|TWOHANDED|DEPLOYED_NO_PICKUP|DEPLOY_ON_INITIALIZE - flags_gun_features = GUN_AMMO_COUNTER|GUN_DEPLOYED_FIRE_ONLY|GUN_WIELDED_FIRING_ONLY + flags_gun_features = GUN_AMMO_COUNTER|GUN_DEPLOYED_FIRE_ONLY|GUN_WIELDED_FIRING_ONLY|GUN_SMOKE_PARTICLES gun_firemode_list = list(GUN_FIREMODE_SEMIAUTO) backblastdamage = FALSE @@ -292,7 +292,7 @@ aim_slowdown = 3 wield_delay = 5 SECONDS - flags_gun_features = GUN_AMMO_COUNTER|GUN_IFF + flags_gun_features = GUN_AMMO_COUNTER|GUN_IFF|GUN_SMOKE_PARTICLES // This is a deployed IFF-less MACHINEGUN, has 500 rounds, drums do not fit anywhere but your belt slot and your back slot. But it has 500 rounds. That's nice. @@ -319,7 +319,7 @@ burst_amount = 1 flags_item = IS_DEPLOYABLE|TWOHANDED - flags_gun_features = GUN_AMMO_COUNTER|GUN_DEPLOYED_FIRE_ONLY|GUN_WIELDED_FIRING_ONLY + flags_gun_features = GUN_AMMO_COUNTER|GUN_DEPLOYED_FIRE_ONLY|GUN_WIELDED_FIRING_ONLY|GUN_SMOKE_PARTICLES gun_firemode_list = list(GUN_FIREMODE_AUTOMATIC) attachable_allowed = list( @@ -383,7 +383,7 @@ attachable_offset = list("muzzle_x" = 45, "muzzle_y" = 19,"rail_x" = 18, "rail_y" = 24, "under_x" = 28, "under_y" = 13, "stock_x" = 0, "stock_y" = 0) flags_item = IS_DEPLOYABLE|TWOHANDED - flags_gun_features = GUN_AMMO_COUNTER|GUN_WIELDED_FIRING_ONLY + flags_gun_features = GUN_AMMO_COUNTER|GUN_WIELDED_FIRING_ONLY|GUN_SMOKE_PARTICLES deployable_item = /obj/machinery/deployable/mounted gun_firemode_list = list(GUN_FIREMODE_AUTOMATIC) actions_types = list(/datum/action/item_action/aim_mode) @@ -435,7 +435,7 @@ attachable_allowed = list(/obj/item/attachable/scope/unremovable/standard_atgun) flags_item = IS_DEPLOYABLE|TWOHANDED|DEPLOYED_NO_PICKUP|DEPLOY_ON_INITIALIZE|DEPLOYED_NO_ROTATE_ANCHORED|DEPLOYED_ANCHORED_FIRING_ONLY - flags_gun_features = GUN_AMMO_COUNTER|GUN_DEPLOYED_FIRE_ONLY|GUN_WIELDED_FIRING_ONLY + flags_gun_features = GUN_AMMO_COUNTER|GUN_DEPLOYED_FIRE_ONLY|GUN_WIELDED_FIRING_ONLY|GUN_SMOKE_PARTICLES gun_firemode_list = list(GUN_FIREMODE_SEMIAUTO) actions_types = list(/datum/action/item_action/aim_mode) diff --git a/code/modules/projectiles/guns/pistols.dm b/code/modules/projectiles/guns/pistols.dm index 3d7d7b4cc568f..8fb9acb7e09b1 100644 --- a/code/modules/projectiles/guns/pistols.dm +++ b/code/modules/projectiles/guns/pistols.dm @@ -31,7 +31,7 @@ /obj/item/attachable/buildasentry, ) - flags_gun_features = GUN_CAN_POINTBLANK|GUN_AMMO_COUNTER + flags_gun_features = GUN_CAN_POINTBLANK|GUN_AMMO_COUNTER|GUN_SMOKE_PARTICLES actions_types = list(/datum/action/item_action/aim_mode) // all pistols can aim mode aim_speed_modifier = 0.65 scatter = -2 @@ -95,7 +95,7 @@ ) muzzleflash_iconstate = "muzzle_flash_laser" - flags_gun_features = GUN_CAN_POINTBLANK|GUN_ENERGY|GUN_AMMO_COUNTER|GUN_IS_ATTACHMENT + flags_gun_features = GUN_CAN_POINTBLANK|GUN_ENERGY|GUN_AMMO_COUNTER|GUN_IS_ATTACHMENT|GUN_SMOKE_PARTICLES reciever_flags = AMMO_RECIEVER_MAGAZINES|AMMO_RECIEVER_AUTO_EJECT|AMMO_RECIEVER_DO_NOT_EJECT_HANDFULS|AMMO_RECIEVER_CYCLE_ONLY_BEFORE_FIRE actions_types = list() wield_delay = 0.5 SECONDS @@ -190,7 +190,7 @@ /obj/item/attachable/shoulder_mount, ) - flags_gun_features = GUN_CAN_POINTBLANK|GUN_AMMO_COUNTER + flags_gun_features = GUN_CAN_POINTBLANK|GUN_AMMO_COUNTER|GUN_SMOKE_PARTICLES attachable_offset = list("muzzle_x" = 31, "muzzle_y" = 22,"rail_x" = 13, "rail_y" = 24, "under_x" = 21, "under_y" = 17, "stock_x" = 21, "stock_y" = 17) fire_delay = 0.2 SECONDS @@ -247,7 +247,7 @@ /obj/item/attachable/buildasentry, /obj/item/attachable/shoulder_mount, ) - flags_gun_features = GUN_CAN_POINTBLANK|GUN_AMMO_COUNTER + flags_gun_features = GUN_CAN_POINTBLANK|GUN_AMMO_COUNTER|GUN_SMOKE_PARTICLES fire_delay = 0.15 SECONDS damage_mult = 1.3 @@ -328,7 +328,7 @@ /obj/item/attachable/shoulder_mount, ) - flags_gun_features = GUN_CAN_POINTBLANK|GUN_AMMO_COUNTER + flags_gun_features = GUN_CAN_POINTBLANK|GUN_AMMO_COUNTER|GUN_SMOKE_PARTICLES attachable_offset = list("muzzle_x" = 31, "muzzle_y" = 19,"rail_x" = 9, "rail_y" = 23, "under_x" = 22, "under_y" = 14, "stock_x" = 20, "stock_y" = 17) fire_delay = 0.45 SECONDS @@ -374,7 +374,7 @@ /obj/item/attachable/shoulder_mount, ) - flags_gun_features = GUN_CAN_POINTBLANK|GUN_AMMO_COUNTER + flags_gun_features = GUN_CAN_POINTBLANK|GUN_AMMO_COUNTER|GUN_SMOKE_PARTICLES attachable_offset = list("muzzle_x" = 30, "muzzle_y" = 19,"rail_x" = 10, "rail_y" = 22, "under_x" = 21, "under_y" = 18, "stock_x" = 21, "stock_y" = 18) //Making the gun have an invisible silencer since it's supposed to have one. starting_attachment_types = list(/obj/item/attachable/suppressor/unremovable/invisible) @@ -414,7 +414,7 @@ /obj/item/attachable/lace, ) - flags_gun_features = GUN_CAN_POINTBLANK|GUN_AMMO_COUNTER + flags_gun_features = GUN_CAN_POINTBLANK|GUN_AMMO_COUNTER|GUN_SMOKE_PARTICLES attachable_offset = list("muzzle_x" = 25, "muzzle_y" = 20,"rail_x" = 12, "rail_y" = 22, "under_x" = 17, "under_y" = 15, "stock_x" = 22, "stock_y" = 17) fire_delay = 0.15 SECONDS @@ -442,7 +442,7 @@ /obj/item/attachable/lace, ) - flags_gun_features = GUN_CAN_POINTBLANK|GUN_AMMO_COUNTER + flags_gun_features = GUN_CAN_POINTBLANK|GUN_AMMO_COUNTER|GUN_SMOKE_PARTICLES attachable_offset = list("muzzle_x" = 28, "muzzle_y" = 20,"rail_x" = 10, "rail_y" = 22, "under_x" = 17, "under_y" = 15, "stock_x" = 22, "stock_y" = 17) fire_delay = 0.15 SECONDS @@ -470,7 +470,7 @@ allowed_ammo_types = list(/obj/item/ammo_magazine/pistol/highpower) force = 10 - flags_gun_features = GUN_CAN_POINTBLANK|GUN_AMMO_COUNTER + flags_gun_features = GUN_CAN_POINTBLANK|GUN_AMMO_COUNTER|GUN_SMOKE_PARTICLES attachable_offset = list("muzzle_x" = 27, "muzzle_y" = 20,"rail_x" = 8, "rail_y" = 22, "under_x" = 18, "under_y" = 15, "stock_x" = 16, "stock_y" = 15) fire_delay = 0.45 SECONDS @@ -684,7 +684,7 @@ It is a modified Beretta 93R, and can fire three round burst or single fire. Whe type_of_casings = null gun_skill_category = SKILL_PISTOLS attachable_allowed = list() - flags_gun_features = GUN_AMMO_COUNTER + flags_gun_features = GUN_AMMO_COUNTER|GUN_SMOKE_PARTICLES fire_delay = 0.3 SECONDS burst_delay = 0.2 SECONDS @@ -753,7 +753,7 @@ It is a modified Beretta 93R, and can fire three round burst or single fire. Whe /obj/item/attachable/lace, ) - flags_gun_features = GUN_AMMO_COUNTER|GUN_IFF + flags_gun_features = GUN_AMMO_COUNTER|GUN_IFF|GUN_SMOKE_PARTICLES gun_skill_category = SKILL_SMARTGUN actions_types = list() // Inherits aimmode, but has IFF so.. gun_firemode_list = list(GUN_FIREMODE_AUTOMATIC, GUN_FIREMODE_SEMIAUTO) diff --git a/code/modules/projectiles/guns/revolvers.dm b/code/modules/projectiles/guns/revolvers.dm index 7c58fc7d4af06..2851e33d86c82 100644 --- a/code/modules/projectiles/guns/revolvers.dm +++ b/code/modules/projectiles/guns/revolvers.dm @@ -12,7 +12,7 @@ hand_reload_sound = 'sound/weapons/guns/interact/revolver_load.ogg' type_of_casings = "bullet" load_method = SINGLE_CASING|SPEEDLOADER //codex - flags_gun_features = GUN_CAN_POINTBLANK|GUN_AMMO_COUNTER|GUN_NO_PITCH_SHIFT_NEAR_EMPTY + flags_gun_features = GUN_CAN_POINTBLANK|GUN_AMMO_COUNTER|GUN_NO_PITCH_SHIFT_NEAR_EMPTY|GUN_SMOKE_PARTICLES actions_types = list(/datum/action/item_action/aim_mode) aim_speed_modifier = 0.75 aim_fire_delay = 0.25 SECONDS diff --git a/code/modules/projectiles/guns/rifles.dm b/code/modules/projectiles/guns/rifles.dm index 3ed1333e031a1..b29b63c537d6e 100644 --- a/code/modules/projectiles/guns/rifles.dm +++ b/code/modules/projectiles/guns/rifles.dm @@ -6,7 +6,7 @@ flags_equip_slot = ITEM_SLOT_BACK w_class = WEIGHT_CLASS_BULKY force = 15 - flags_gun_features = GUN_CAN_POINTBLANK||GUN_AMMO_COUNTER + flags_gun_features = GUN_CAN_POINTBLANK||GUN_AMMO_COUNTER|GUN_SMOKE_PARTICLES load_method = MAGAZINE //codex aim_slowdown = 0.35 wield_delay = 0.6 SECONDS @@ -71,7 +71,7 @@ /obj/item/attachable/shoulder_mount, ) - flags_gun_features = GUN_CAN_POINTBLANK|GUN_AMMO_COUNTER + flags_gun_features = GUN_CAN_POINTBLANK|GUN_AMMO_COUNTER|GUN_SMOKE_PARTICLES gun_firemode_list = list(GUN_FIREMODE_AUTOMATIC, GUN_FIREMODE_BURSTFIRE, GUN_FIREMODE_AUTOBURST) starting_attachment_types = list(/obj/item/attachable/stock/t18stock) attachable_offset = list("muzzle_x" = 30, "muzzle_y" = 16,"rail_x" = 5, "rail_y" = 19, "under_x" = 18, "under_y" = 14, "stock_x" = 0, "stock_y" = 13) @@ -153,7 +153,7 @@ /obj/item/attachable/shoulder_mount, ) - flags_gun_features = GUN_CAN_POINTBLANK|GUN_AMMO_COUNTER + flags_gun_features = GUN_CAN_POINTBLANK|GUN_AMMO_COUNTER|GUN_SMOKE_PARTICLES gun_firemode_list = list(GUN_FIREMODE_AUTOMATIC, GUN_FIREMODE_BURSTFIRE, GUN_FIREMODE_AUTOBURST) starting_attachment_types = list(/obj/item/attachable/stock/t12stock) attachable_offset = list("muzzle_x" = 30, "muzzle_y" = 17,"rail_x" = 0, "rail_y" = 23, "under_x" = 17, "under_y" = 13, "stock_x" = 0, "stock_y" = 13) @@ -241,7 +241,7 @@ /obj/item/attachable/shoulder_mount, ) - flags_gun_features = GUN_AMMO_COUNTER|GUN_CAN_POINTBLANK + flags_gun_features = GUN_AMMO_COUNTER|GUN_CAN_POINTBLANK|GUN_SMOKE_PARTICLES gun_firemode_list = list(GUN_FIREMODE_AUTOMATIC) starting_attachment_types = list(/obj/item/attachable/scope/mini/dmr) attachable_offset = list("muzzle_x" = 50, "muzzle_y" = 20,"rail_x" = 21, "rail_y" = 22, "under_x" = 31, "under_y" = 15, "stock_x" = 14, "stock_y" = 10) @@ -318,7 +318,7 @@ /obj/item/attachable/shoulder_mount, ) - flags_gun_features = GUN_AMMO_COUNTER|GUN_CAN_POINTBLANK + flags_gun_features = GUN_AMMO_COUNTER|GUN_CAN_POINTBLANK|GUN_SMOKE_PARTICLES gun_firemode_list = list(GUN_FIREMODE_AUTOMATIC, GUN_FIREMODE_BURSTFIRE, GUN_FIREMODE_AUTOBURST) starting_attachment_types = list(/obj/item/attachable/stock/t64stock, /obj/item/weapon/gun/grenade_launcher/underslung/battle_rifle, /obj/item/attachable/scope/mini) attachable_offset = list("muzzle_x" = 44, "muzzle_y" = 19,"rail_x" = 18, "rail_y" = 23, "under_x" = 33, "under_y" = 13, "stock_x" = 11, "stock_y" = 14) @@ -388,7 +388,7 @@ /obj/item/attachable/shoulder_mount, ) - flags_gun_features = GUN_CAN_POINTBLANK|GUN_AMMO_COUNTER + flags_gun_features = GUN_CAN_POINTBLANK|GUN_AMMO_COUNTER|GUN_SMOKE_PARTICLES gun_firemode_list = list(GUN_FIREMODE_AUTOMATIC, GUN_FIREMODE_BURSTFIRE, GUN_FIREMODE_AUTOBURST) starting_attachment_types = list(/obj/item/weapon/gun/grenade_launcher/underslung) attachable_offset = list("muzzle_x" = 44, "muzzle_y" = 19,"rail_x" = 15, "rail_y" = 21, "under_x" = 25, "under_y" = 16, "stock_x" = 18, "stock_y" = 15) @@ -489,7 +489,7 @@ /obj/item/attachable/shoulder_mount, ) - flags_gun_features = GUN_CAN_POINTBLANK|GUN_AMMO_COUNTER + flags_gun_features = GUN_CAN_POINTBLANK|GUN_AMMO_COUNTER|GUN_SMOKE_PARTICLES gun_firemode_list = list(GUN_FIREMODE_AUTOMATIC, GUN_FIREMODE_BURSTFIRE, GUN_FIREMODE_AUTOBURST) starting_attachment_types = list(/obj/item/attachable/stock/m41a, /obj/item/weapon/gun/grenade_launcher/underslung/invisible) attachable_offset = list("muzzle_x" = 41, "muzzle_y" = 19,"rail_x" = 12, "rail_y" = 24, "under_x" = 24, "under_y" = 13, "stock_x" = 22, "stock_y" = 16) @@ -545,7 +545,7 @@ /obj/item/weapon/gun/grenade_launcher/underslung/mpi, //alt sprite, unremovable ) - flags_gun_features = GUN_CAN_POINTBLANK|GUN_AMMO_COUNTER + flags_gun_features = GUN_CAN_POINTBLANK|GUN_AMMO_COUNTER|GUN_SMOKE_PARTICLES gun_firemode_list = list(GUN_FIREMODE_AUTOMATIC) attachable_offset = list("muzzle_x" = 35, "muzzle_y" = 18,"rail_x" = 6, "rail_y" = 20, "under_x" = 19, "under_y" = 14, "stock_x" = 5, "stock_y" = 12) starting_attachment_types = list(/obj/item/attachable/stock/mpi_km) @@ -659,7 +659,7 @@ /obj/item/attachable/flashlight/under, ) - flags_gun_features = GUN_CAN_POINTBLANK|GUN_AMMO_COUNTER + flags_gun_features = GUN_CAN_POINTBLANK|GUN_AMMO_COUNTER|GUN_SMOKE_PARTICLES gun_firemode_list = list(GUN_FIREMODE_AUTOMATIC) attachable_offset = list("muzzle_x" = 35, "muzzle_y" = 18,"rail_x" = 6, "rail_y" = 20, "under_x" = 19, "under_y" = 14, "stock_x" = 6, "stock_y" = 14) @@ -724,7 +724,7 @@ /obj/item/attachable/shoulder_mount, ) - flags_gun_features = GUN_CAN_POINTBLANK|GUN_AMMO_COUNTER + flags_gun_features = GUN_CAN_POINTBLANK|GUN_AMMO_COUNTER|GUN_SMOKE_PARTICLES gun_firemode_list = list(GUN_FIREMODE_AUTOMATIC, GUN_FIREMODE_BURSTFIRE) attachable_offset = list("muzzle_x" = 47, "muzzle_y" = 19,"rail_x" = 18, "rail_y" = 24, "under_x" = 29, "under_y" = 15, "stock_x" = 19, "stock_y" = 13) actions_types = list(/datum/action/item_action/aim_mode) @@ -789,7 +789,7 @@ /obj/item/weapon/gun/rifle/pepperball/pepperball_mini, ) - flags_gun_features = GUN_CAN_POINTBLANK|GUN_AMMO_COUNTER + flags_gun_features = GUN_CAN_POINTBLANK|GUN_AMMO_COUNTER|GUN_SMOKE_PARTICLES gun_firemode_list = list(GUN_FIREMODE_AUTOMATIC, GUN_FIREMODE_BURSTFIRE, GUN_FIREMODE_AUTOBURST) attachable_offset = list("muzzle_x" = 38, "muzzle_y" = 17,"rail_x" = 22, "rail_y" = 24, "under_x" = 28, "under_y" = 12, "stock_x" = 19, "stock_y" = 13) @@ -861,7 +861,7 @@ /obj/item/weapon/gun/rifle/pepperball/pepperball_mini, ) - flags_gun_features = GUN_AMMO_COUNTER + flags_gun_features = GUN_AMMO_COUNTER|GUN_SMOKE_PARTICLES gun_firemode_list = list(GUN_FIREMODE_AUTOMATIC, GUN_FIREMODE_AUTOBURST) gun_skill_category = SKILL_HEAVY_WEAPONS starting_attachment_types = list(/obj/item/attachable/stock/t42stock) @@ -927,7 +927,7 @@ /obj/item/attachable/shoulder_mount, ) - flags_gun_features = GUN_AMMO_COUNTER|GUN_WIELDED_FIRING_ONLY + flags_gun_features = GUN_AMMO_COUNTER|GUN_WIELDED_FIRING_ONLY|GUN_SMOKE_PARTICLES gun_firemode_list = list(GUN_FIREMODE_AUTOMATIC) starting_attachment_types = list(/obj/item/attachable/stock/t60stock) gun_skill_category = SKILL_HEAVY_WEAPONS @@ -994,7 +994,7 @@ /obj/item/attachable/shoulder_mount, ) - 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_SMOKE_PARTICLES gun_firemode_list = list(GUN_FIREMODE_AUTOMATIC, GUN_FIREMODE_BURSTFIRE, GUN_FIREMODE_AUTOBURST) gun_skill_category = SKILL_HEAVY_WEAPONS attachable_offset = list("muzzle_x" = 42, "muzzle_y" = 19,"rail_x" = 17, "rail_y" = 21, "under_x" = 31, "under_y" = 15, "stock_x" = 18, "stock_y" = 15) @@ -1070,7 +1070,7 @@ /obj/item/attachable/scope/unremovable, ) - flags_gun_features = GUN_CAN_POINTBLANK|GUN_AMMO_COUNTER + flags_gun_features = GUN_CAN_POINTBLANK|GUN_AMMO_COUNTER|GUN_SMOKE_PARTICLES attachable_offset = list("muzzle_x" = 41, "muzzle_y" = 19,"rail_x" = 18, "rail_y" = 24, "under_x" = 34, "under_y" = 16, "stock_x" = 19, "stock_y" = 13) gun_firemode_list = list(GUN_FIREMODE_BURSTFIRE, GUN_FIREMODE_AUTOBURST) actions_types = list(/datum/action/item_action/aim_mode) @@ -1171,7 +1171,7 @@ /obj/item/weapon/gun/rifle/pepperball/pepperball_mini, ) - flags_gun_features = GUN_CAN_POINTBLANK|GUN_AMMO_COUNTER|GUN_WIELDED_FIRING_ONLY //Its a shotgun type weapon effectively, most shotgun type weapons shouldn't be able to point blank 1 handed. + flags_gun_features = GUN_CAN_POINTBLANK|GUN_AMMO_COUNTER|GUN_WIELDED_FIRING_ONLY|GUN_SMOKE_PARTICLES //Its a shotgun type weapon effectively, most shotgun type weapons shouldn't be able to point blank 1 handed. gun_firemode_list = list(GUN_FIREMODE_AUTOMATIC) starting_attachment_types = list(/obj/item/attachable/stock/tx15) attachable_offset = list("muzzle_x" = 30, "muzzle_y" = 16,"rail_x" = 12, "rail_y" = 17, "under_x" = 20, "under_y" = 13, "stock_x" = 26, "stock_y" = 13) @@ -1227,7 +1227,7 @@ /obj/item/attachable/shoulder_mount, ) - flags_gun_features = GUN_AMMO_COUNTER|GUN_WIELDED_FIRING_ONLY|GUN_IFF + flags_gun_features = GUN_AMMO_COUNTER|GUN_WIELDED_FIRING_ONLY|GUN_IFF|GUN_SMOKE_PARTICLES gun_firemode_list = list(GUN_FIREMODE_AUTOMATIC) starting_attachment_types = list(/obj/item/attachable/stock/sgstock, /obj/item/attachable/sgbarrel) gun_skill_category = SKILL_SMARTGUN //Uses SG skill for the penalties. @@ -1283,7 +1283,7 @@ /obj/item/attachable/shoulder_mount, ) - flags_gun_features = GUN_AMMO_COUNTER|GUN_WIELDED_FIRING_ONLY|GUN_IFF + flags_gun_features = GUN_AMMO_COUNTER|GUN_WIELDED_FIRING_ONLY|GUN_IFF|GUN_SMOKE_PARTICLES gun_firemode_list = list(GUN_FIREMODE_AUTOMATIC) gun_skill_category = SKILL_SMARTGUN //Uses SG skill for the penalties. attachable_offset = list("muzzle_x" = 12, "muzzle_y" = 22, "rail_x" = 15, "rail_y" = 22, "under_x" = 28, "under_y" = 16, "stock_x" = 12, "stock_y" = 14) @@ -1322,7 +1322,7 @@ attachable_allowed = list() actions_types = list() gun_firemode_list = list(GUN_FIREMODE_SEMIAUTO) - flags_gun_features = GUN_IS_ATTACHMENT|GUN_WIELDED_FIRING_ONLY|GUN_ATTACHMENT_FIRE_ONLY|GUN_AMMO_COUNTER|GUN_IFF + flags_gun_features = GUN_IS_ATTACHMENT|GUN_WIELDED_FIRING_ONLY|GUN_ATTACHMENT_FIRE_ONLY|GUN_AMMO_COUNTER|GUN_IFF|GUN_SMOKE_PARTICLES flags_attach_features = NONE fire_delay = 1 SECONDS accuracy_mult = 1.25 @@ -1349,7 +1349,7 @@ allowed_ammo_types = list(/obj/item/ammo_magazine/rifle/sectoid_rifle) wield_delay = 0.4 SECONDS - flags_gun_features = GUN_CAN_POINTBLANK|GUN_AMMO_COUNTER|GUN_ENERGY + flags_gun_features = GUN_CAN_POINTBLANK|GUN_AMMO_COUNTER|GUN_ENERGY|GUN_SMOKE_PARTICLES gun_firemode_list = list(GUN_FIREMODE_SEMIAUTO, GUN_FIREMODE_BURSTFIRE, GUN_FIREMODE_AUTOBURST) attachable_offset = list("muzzle_x" = 32, "muzzle_y" = 18,"rail_x" = 12, "rail_y" = 23, "under_x" = 23, "under_y" = 15, "stock_x" = 22, "stock_y" = 12) @@ -1420,7 +1420,7 @@ /obj/item/attachable/foldable/bipod, ) - flags_gun_features = GUN_WIELDED_FIRING_ONLY|GUN_AMMO_COUNTER + flags_gun_features = GUN_WIELDED_FIRING_ONLY|GUN_AMMO_COUNTER|GUN_SMOKE_PARTICLES reciever_flags = AMMO_RECIEVER_REQUIRES_UNIQUE_ACTION|AMMO_RECIEVER_MAGAZINES|AMMO_RECIEVER_UNIQUE_ACTION_LOCKS|AMMO_RECIEVER_AUTO_EJECT cock_animation = "tl127_cock" @@ -1479,7 +1479,7 @@ /obj/item/attachable/compensator, ) - flags_gun_features = GUN_WIELDED_FIRING_ONLY|GUN_AMMO_COUNTER|GUN_IFF + flags_gun_features = GUN_WIELDED_FIRING_ONLY|GUN_AMMO_COUNTER|GUN_IFF|GUN_SMOKE_PARTICLES gun_firemode_list = list(GUN_FIREMODE_AUTOMATIC) attachable_offset = list("muzzle_x" = 48, "muzzle_y" = 18,"rail_x" = 23, "rail_y" = 23, "under_x" = 38, "under_y" = 16, "stock_x" = 9, "stock_y" = 12) starting_attachment_types = list( @@ -1531,7 +1531,7 @@ /obj/item/attachable/scope/marine, ) - flags_gun_features = GUN_AMMO_COUNTER + flags_gun_features = GUN_AMMO_COUNTER|GUN_SMOKE_PARTICLES gun_firemode_list = list(GUN_FIREMODE_AUTOMATIC, GUN_FIREMODE_BURSTFIRE, GUN_FIREMODE_AUTOBURST) starting_attachment_types = list(/obj/item/attachable/stock/tx11, /obj/item/attachable/scope/mini/tx11) attachable_offset = list("muzzle_x" = 31, "muzzle_y" = 17,"rail_x" = 6, "rail_y" = 20, "under_x" = 20, "under_y" = 12, "stock_x" = 17, "stock_y" = 14) @@ -1614,7 +1614,7 @@ /obj/item/weapon/gun/rifle/pepperball/pepperball_mini, ) - flags_gun_features = GUN_CAN_POINTBLANK|GUN_AMMO_COUNTER + flags_gun_features = GUN_CAN_POINTBLANK|GUN_AMMO_COUNTER|GUN_SMOKE_PARTICLES gun_firemode_list = list(GUN_FIREMODE_AUTOMATIC) attachable_offset = list("muzzle_x" = 46, "muzzle_y" = 16,"rail_x" = 18, "rail_y" = 19, "under_x" = 34, "under_y" = 13, "stock_x" = 0, "stock_y" = 13) actions_types = list(/datum/action/item_action/aim_mode) @@ -1667,7 +1667,7 @@ /obj/item/attachable/bayonetknife/som, ) - flags_gun_features = GUN_CAN_POINTBLANK|GUN_AMMO_COUNTER + flags_gun_features = GUN_CAN_POINTBLANK|GUN_AMMO_COUNTER|GUN_SMOKE_PARTICLES gun_firemode_list = list(GUN_FIREMODE_AUTOMATIC, GUN_FIREMODE_BURSTFIRE, GUN_FIREMODE_AUTOBURST) attachable_offset = list("muzzle_x" = 31, "muzzle_y" = 16,"rail_x" = 10, "rail_y" = 19, "under_x" = 21, "under_y" = 13, "stock_x" = 0, "stock_y" = 13) @@ -1727,7 +1727,7 @@ /obj/item/attachable/bayonetknife/som, ) - flags_gun_features = GUN_CAN_POINTBLANK|GUN_AMMO_COUNTER + flags_gun_features = GUN_CAN_POINTBLANK|GUN_AMMO_COUNTER|GUN_SMOKE_PARTICLES gun_firemode_list = list(GUN_FIREMODE_AUTOMATIC) attachable_offset = list("muzzle_x" = 32, "muzzle_y" = 17,"rail_x" = 15, "rail_y" = 17, "under_x" = 24, "under_y" = 13, "stock_x" = 0, "stock_y" = 12) @@ -1768,7 +1768,7 @@ /obj/item/attachable/shoulder_mount, ) - flags_gun_features = GUN_AMMO_COUNTER|GUN_WIELDED_STABLE_FIRING_ONLY|GUN_WIELDED_FIRING_ONLY + flags_gun_features = GUN_AMMO_COUNTER|GUN_WIELDED_STABLE_FIRING_ONLY|GUN_WIELDED_FIRING_ONLY|GUN_SMOKE_PARTICLES starting_attachment_types = list(/obj/item/attachable/scope/optical) default_ammo_type = null allowed_ammo_types = list( @@ -1800,7 +1800,7 @@ icon_state = "tx55gl" placed_overlay_iconstate = "tx55gl" attachable_allowed = list() - flags_gun_features = GUN_AMMO_COUNTER|GUN_IS_ATTACHMENT|GUN_ATTACHMENT_FIRE_ONLY|GUN_WIELDED_STABLE_FIRING_ONLY|GUN_WIELDED_FIRING_ONLY + flags_gun_features = GUN_AMMO_COUNTER|GUN_IS_ATTACHMENT|GUN_ATTACHMENT_FIRE_ONLY|GUN_WIELDED_STABLE_FIRING_ONLY|GUN_WIELDED_FIRING_ONLY|GUN_SMOKE_PARTICLES flags_attach_features = NONE slot = ATTACHMENT_SLOT_STOCK default_ammo_type = /obj/item/ammo_magazine/rifle/tx54 @@ -1850,7 +1850,7 @@ /obj/item/attachable/motiondetector, ) - flags_gun_features = GUN_AMMO_COUNTER + flags_gun_features = GUN_AMMO_COUNTER|GUN_SMOKE_PARTICLES gun_firemode_list = list(GUN_FIREMODE_AUTOMATIC, GUN_FIREMODE_BURSTFIRE, GUN_FIREMODE_AUTOBURST) starting_attachment_types = list( /obj/item/weapon/gun/rifle/tx54/mini, @@ -1926,7 +1926,7 @@ /obj/item/attachable/foldable/bipod, ) - flags_gun_features = GUN_WIELDED_FIRING_ONLY|GUN_AMMO_COUNTER + flags_gun_features = GUN_WIELDED_FIRING_ONLY|GUN_AMMO_COUNTER|GUN_SMOKE_PARTICLES reciever_flags = AMMO_RECIEVER_MAGAZINES|AMMO_RECIEVER_AUTO_EJECT|AMMO_RECIEVER_CYCLE_ONLY_BEFORE_FIRE gun_firemode_list = list(GUN_FIREMODE_SEMIAUTO) @@ -1990,7 +1990,7 @@ /obj/item/attachable/motiondetector, ) - flags_gun_features = GUN_CAN_POINTBLANK|GUN_AMMO_COUNTER + flags_gun_features = GUN_CAN_POINTBLANK|GUN_AMMO_COUNTER|GUN_SMOKE_PARTICLES gun_firemode_list = list(GUN_FIREMODE_AUTOMATIC, GUN_FIREMODE_BURSTFIRE, GUN_FIREMODE_AUTOBURST) starting_attachment_types = list( /obj/item/weapon/gun/shotgun/micro_grenade, @@ -2081,7 +2081,7 @@ /obj/item/attachable/verticalgrip, ) - flags_gun_features = GUN_CAN_POINTBLANK|GUN_AMMO_COUNTER + flags_gun_features = GUN_CAN_POINTBLANK|GUN_AMMO_COUNTER|GUN_SMOKE_PARTICLES gun_firemode_list = list(GUN_FIREMODE_AUTOMATIC) attachable_offset = list("muzzle_x" = 30, "muzzle_y" = 18,"rail_x" = 8, "rail_y" = 20, "under_x" = 17, "under_y" = 13, "stock_x" = -6, "stock_y" = 16) starting_attachment_types = list(/obj/item/attachable/foldable/som_carbine) @@ -2166,7 +2166,7 @@ /obj/item/attachable/shoulder_mount, ) - flags_gun_features = GUN_AMMO_COUNTER|GUN_WIELDED_FIRING_ONLY + flags_gun_features = GUN_AMMO_COUNTER|GUN_WIELDED_FIRING_ONLY|GUN_SMOKE_PARTICLES gun_firemode_list = list(GUN_FIREMODE_AUTOMATIC) starting_attachment_types = list(/obj/item/attachable/stock/som_mg_stock) gun_skill_category = SKILL_HEAVY_WEAPONS @@ -2244,7 +2244,7 @@ ) starting_attachment_types = list(/obj/item/attachable/stock/icc_sharpshooter) - flags_gun_features = GUN_AMMO_COUNTER|GUN_CAN_POINTBLANK + flags_gun_features = GUN_AMMO_COUNTER|GUN_CAN_POINTBLANK|GUN_SMOKE_PARTICLES gun_firemode_list = list(GUN_FIREMODE_AUTOMATIC) attachable_offset = list("muzzle_x" = 40, "muzzle_y" = 14, "rail_x" = 15, "rail_y" = 17, "under_x" = 23, "under_y" = 10, "stock_x" = 17, "stock_y" = 10) actions_types = list(/datum/action/item_action/aim_mode) @@ -2314,7 +2314,7 @@ /obj/item/weapon/gun/rifle/pepperball/pepperball_mini, ) - flags_gun_features = GUN_CAN_POINTBLANK|GUN_AMMO_COUNTER + flags_gun_features = GUN_CAN_POINTBLANK|GUN_AMMO_COUNTER|GUN_SMOKE_PARTICLES gun_firemode_list = list(GUN_FIREMODE_AUTOMATIC) attachable_offset = list("muzzle_x" = 44, "muzzle_y" = 19,"rail_x" = 20, "rail_y" = 23, "under_x" = 33, "under_y" = 13, "stock_x" = 0, "stock_y" = 13) actions_types = list(/datum/action/item_action/aim_mode) @@ -2377,7 +2377,7 @@ /obj/item/attachable/motiondetector, ) - flags_gun_features = GUN_CAN_POINTBLANK|GUN_AMMO_COUNTER + flags_gun_features = GUN_CAN_POINTBLANK|GUN_AMMO_COUNTER|GUN_SMOKE_PARTICLES gun_firemode_list = list(GUN_FIREMODE_AUTOMATIC) attachable_offset = list("muzzle_x" = 48, "muzzle_y" = 18,"rail_x" = 24, "rail_y" = 26, "under_x" = 36, "under_y" = 14, "stock_x" = 0, "stock_y" = 13) actions_types = list(/datum/action/item_action/aim_mode) @@ -2436,7 +2436,7 @@ /obj/item/attachable/motiondetector, ) - flags_gun_features = GUN_CAN_POINTBLANK|GUN_AMMO_COUNTER|GUN_WIELDED_FIRING_ONLY //Its a shotgun type weapon effectively, most shotgun type weapons shouldn't be able to point blank 1 handed. + flags_gun_features = GUN_CAN_POINTBLANK|GUN_AMMO_COUNTER|GUN_WIELDED_FIRING_ONLY|GUN_SMOKE_PARTICLES //Its a shotgun type weapon effectively, most shotgun type weapons shouldn't be able to point blank 1 handed. gun_firemode_list = list(GUN_FIREMODE_AUTOMATIC) attachable_offset = list("muzzle_x" = 30, "muzzle_y" = 26,"rail_x" = 26, "rail_y" = 24, "under_x" = 40, "under_y" = 16, "stock_x" = 26, "stock_y" = 13) gun_skill_category = SKILL_SHOTGUNS diff --git a/code/modules/projectiles/guns/sentries.dm b/code/modules/projectiles/guns/sentries.dm index 55b2163d490e5..67eb363dd18e9 100644 --- a/code/modules/projectiles/guns/sentries.dm +++ b/code/modules/projectiles/guns/sentries.dm @@ -23,7 +23,7 @@ ) turret_flags = TURRET_HAS_CAMERA|TURRET_SAFETY|TURRET_ALERTS - flags_gun_features = GUN_AMMO_COUNTER|GUN_DEPLOYED_FIRE_ONLY|GUN_WIELDED_FIRING_ONLY|GUN_IFF + flags_gun_features = GUN_AMMO_COUNTER|GUN_DEPLOYED_FIRE_ONLY|GUN_WIELDED_FIRING_ONLY|GUN_IFF|GUN_SMOKE_PARTICLES gun_firemode_list = list(GUN_FIREMODE_AUTOMATIC) deployable_item = /obj/machinery/deployable/mounted/sentry flags_item = IS_DEPLOYABLE|TWOHANDED @@ -118,7 +118,7 @@ /obj/machinery/miner, ) - flags_gun_features = GUN_AMMO_COUNTER|GUN_DEPLOYED_FIRE_ONLY|GUN_WIELDED_FIRING_ONLY|GUN_AMMO_COUNT_BY_SHOTS_REMAINING|GUN_ENERGY + flags_gun_features = GUN_AMMO_COUNTER|GUN_DEPLOYED_FIRE_ONLY|GUN_WIELDED_FIRING_ONLY|GUN_AMMO_COUNT_BY_SHOTS_REMAINING|GUN_ENERGY|GUN_SMOKE_PARTICLES reciever_flags = AMMO_RECIEVER_MAGAZINES|AMMO_RECIEVER_DO_NOT_EJECT_HANDFULS|AMMO_RECIEVER_CYCLE_ONLY_BEFORE_FIRE //doesn't autoeject its recharging battery gun_firemode_list = list(GUN_FIREMODE_AUTOMATIC) flags_item = IS_DEPLOYABLE|TWOHANDED @@ -269,7 +269,7 @@ /obj/item/weapon/gun/sentry/premade/dumb name = "\improper Modified ST-571 sentry gun" desc = "A deployable, semi-automated turret with AI targeting capabilities. Armed with an M30 Autocannon and a 500-round drum magazine. This one's IFF system has been disabled, and it will open fire on any targets within range." - flags_gun_features = GUN_AMMO_COUNTER|GUN_DEPLOYED_FIRE_ONLY|GUN_WIELDED_FIRING_ONLY + flags_gun_features = GUN_AMMO_COUNTER|GUN_DEPLOYED_FIRE_ONLY|GUN_WIELDED_FIRING_ONLY|GUN_SMOKE_PARTICLES ammo_datum_type = /datum/ammo/bullet/turret/dumb default_ammo_type = /obj/item/ammo_magazine/sentry_premade/dumb allowed_ammo_types = list(/obj/item/ammo_magazine/sentry_premade/dumb) diff --git a/code/modules/projectiles/guns/shotguns.dm b/code/modules/projectiles/guns/shotguns.dm index 6fce61a7c80d9..fca4ee6d913cc 100644 --- a/code/modules/projectiles/guns/shotguns.dm +++ b/code/modules/projectiles/guns/shotguns.dm @@ -10,7 +10,7 @@ hand_reload_sound = 'sound/weapons/guns/interact/shotgun_shell_insert.ogg' cocked_sound = 'sound/weapons/guns/interact/shotgun_reload.ogg' opened_sound = 'sound/weapons/guns/interact/shotgun_open.ogg' - 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_SMOKE_PARTICLES reciever_flags = AMMO_RECIEVER_HANDFULS type_of_casings = "shell" allowed_ammo_types = list() @@ -43,7 +43,7 @@ icon_state = "mk221" item_state = "mk221" fire_sound = 'sound/weapons/guns/fire/shotgun_automatic.ogg' - 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_SMOKE_PARTICLES default_ammo_type = /datum/ammo/bullet/shotgun/buckshot max_chamber_items = 9 attachable_allowed = list( @@ -79,7 +79,7 @@ icon_state = "t39" item_state = "t39" fire_sound = 'sound/weapons/guns/fire/tgmc/kinetic/gun_sh39.ogg' - flags_gun_features = GUN_CAN_POINTBLANK|GUN_AMMO_COUNTER + flags_gun_features = GUN_CAN_POINTBLANK|GUN_AMMO_COUNTER|GUN_SMOKE_PARTICLES default_ammo_type = /datum/ammo/bullet/shotgun/buckshot attachable_allowed = list( /obj/item/attachable/bayonet, @@ -123,7 +123,7 @@ slot = ATTACHMENT_SLOT_UNDER attach_delay = 3 SECONDS detach_delay = 3 SECONDS - flags_gun_features = GUN_IS_ATTACHMENT|GUN_AMMO_COUNTER|GUN_ATTACHMENT_FIRE_ONLY|GUN_WIELDED_STABLE_FIRING_ONLY|GUN_CAN_POINTBLANK|GUN_WIELDED_FIRING_ONLY + flags_gun_features = GUN_IS_ATTACHMENT|GUN_AMMO_COUNTER|GUN_ATTACHMENT_FIRE_ONLY|GUN_WIELDED_STABLE_FIRING_ONLY|GUN_CAN_POINTBLANK|GUN_WIELDED_FIRING_ONLY|GUN_SMOKE_PARTICLES default_ammo_type = /datum/ammo/bullet/shotgun/buckshot damage_mult = 0.6 // 40% less damage, but MUCH higher falloff. scatter = 3 @@ -155,7 +155,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_SMOKE_PARTICLES reciever_flags = AMMO_RECIEVER_TOGGLES_OPEN|AMMO_RECIEVER_TOGGLES_OPEN_EJECTS|AMMO_RECIEVER_HANDFULS attachable_offset = list("muzzle_x" = 33, "muzzle_y" = 21,"rail_x" = 15, "rail_y" = 22, "under_x" = 21, "under_y" = 16, "stock_x" = 21, "stock_y" = 16) @@ -174,7 +174,7 @@ item_state = "sshotgun" flags_equip_slot = ITEM_SLOT_BELT attachable_allowed = list() - flags_gun_features = GUN_CAN_POINTBLANK|GUN_AMMO_COUNTER + flags_gun_features = GUN_CAN_POINTBLANK|GUN_AMMO_COUNTER|GUN_SMOKE_PARTICLES attachable_offset = list("muzzle_x" = 30, "muzzle_y" = 20,"rail_x" = 11, "rail_y" = 22, "under_x" = 18, "under_y" = 16, "stock_x" = 18, "stock_y" = 16) fire_delay = 2 @@ -211,7 +211,7 @@ /obj/item/attachable/scope/mini, ) - 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_SMOKE_PARTICLES attachable_offset = list("muzzle_x" = 33, "muzzle_y" = 17,"rail_x" = 15, "rail_y" = 19, "under_x" = 21, "under_y" = 13, "stock_x" = 13, "stock_y" = 16) fire_delay = 0.65 SECONDS @@ -253,7 +253,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_SMOKE_PARTICLES reciever_flags = AMMO_RECIEVER_HANDFULS|AMMO_RECIEVER_REQUIRES_UNIQUE_ACTION|AMMO_RECIEVER_UNIQUE_ACTION_LOCKS cocked_message = "You rack the pump." cock_locked_message = "The pump is locked! Fire it first!" @@ -404,7 +404,7 @@ /obj/item/attachable/shoulder_mount, ) flags_item_map_variant = NONE - flags_gun_features = GUN_CAN_POINTBLANK|GUN_AMMO_COUNTER + flags_gun_features = GUN_CAN_POINTBLANK|GUN_AMMO_COUNTER|GUN_SMOKE_PARTICLES attachable_offset = list("muzzle_x" = 37, "muzzle_y" = 18,"rail_x" = 14, "rail_y" = 19, "under_x" = 19, "under_y" = 14, "stock_x" = 15, "stock_y" = 12) starting_attachment_types = list( /obj/item/attachable/scope/mosin, @@ -467,7 +467,7 @@ /obj/item/attachable/shoulder_mount, ) - flags_gun_features = GUN_CAN_POINTBLANK|GUN_AMMO_COUNTER + flags_gun_features = GUN_CAN_POINTBLANK|GUN_AMMO_COUNTER|GUN_SMOKE_PARTICLES attachable_offset = list("muzzle_x" = 45, "muzzle_y" = 23,"rail_x" = 17, "rail_y" = 25, "under_x" = 19, "under_y" = 14, "stock_x" = 15, "stock_y" = 12) actions_types = list(/datum/action/item_action/aim_mode) aim_slowdown = 0.35 @@ -508,7 +508,7 @@ cocked_sound = 'sound/weapons/guns/interact/martini_cocked.ogg' opened_sound = 'sound/weapons/guns/interact/martini_open.ogg' attachable_allowed = list() - flags_gun_features = GUN_CAN_POINTBLANK|GUN_AMMO_COUNTER + flags_gun_features = GUN_CAN_POINTBLANK|GUN_AMMO_COUNTER|GUN_SMOKE_PARTICLES fire_delay = 0.2 SECONDS scatter = 0 @@ -553,7 +553,7 @@ /obj/item/attachable/bayonet, ) attachable_offset = list("muzzle_x" = 50, "muzzle_y" = 21,"rail_x" = 8, "rail_y" = 21, "under_x" = 37, "under_y" = 16, "stock_x" = 20, "stock_y" = 14) - flags_gun_features = GUN_CAN_POINTBLANK|GUN_AMMO_COUNTER + flags_gun_features = GUN_CAN_POINTBLANK|GUN_AMMO_COUNTER|GUN_SMOKE_PARTICLES fire_delay = 8 accuracy_mult = 1.2 @@ -594,7 +594,7 @@ /obj/item/attachable/motiondetector, ) attachable_offset = list ("muzzle_x" = 45, "muzzle_y" = 23,"rail_x" = 21, "rail_y" = 23, "under_x" = 19, "under_y" = 14, "stock_x" = 15, "stock_y" = 12) - flags_gun_features = GUN_CAN_POINTBLANK|GUN_AMMO_COUNTER + flags_gun_features = GUN_CAN_POINTBLANK|GUN_AMMO_COUNTER|GUN_SMOKE_PARTICLES actions_types = list(/datum/action/item_action/aim_mode) aim_fire_delay = 0.3 SECONDS aim_speed_modifier = 2 @@ -771,7 +771,7 @@ dry_fire_sound = 'sound/weapons/guns/fire/v51_empty.ogg' reload_sound = 'sound/weapons/guns/interact/v51_load.ogg' hand_reload_sound = 'sound/weapons/guns/interact/v51_load.ogg' - 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_SMOKE_PARTICLES default_ammo_type = /datum/ammo/bullet/shotgun/buckshot max_chamber_items = 9 attachable_allowed = list( diff --git a/code/modules/projectiles/guns/smgs.dm b/code/modules/projectiles/guns/smgs.dm index 5f72ff33d5906..271175d16bf22 100644 --- a/code/modules/projectiles/guns/smgs.dm +++ b/code/modules/projectiles/guns/smgs.dm @@ -16,7 +16,7 @@ /obj/item/attachable/magnetic_harness, ) - flags_gun_features = GUN_CAN_POINTBLANK|GUN_AMMO_COUNTER + flags_gun_features = GUN_CAN_POINTBLANK|GUN_AMMO_COUNTER|GUN_SMOKE_PARTICLES gun_firemode_list = list(GUN_FIREMODE_AUTOMATIC, GUN_FIREMODE_BURSTFIRE, GUN_FIREMODE_AUTOBURST) gun_skill_category = SKILL_SMGS @@ -126,7 +126,7 @@ /obj/item/attachable/shoulder_mount, ) - flags_gun_features = GUN_CAN_POINTBLANK|GUN_AMMO_COUNTER + flags_gun_features = GUN_CAN_POINTBLANK|GUN_AMMO_COUNTER|GUN_SMOKE_PARTICLES gun_firemode_list = list(GUN_FIREMODE_AUTOMATIC) attachable_offset = list("muzzle_x" = 32, "muzzle_y" = 15,"rail_x" = 22, "rail_y" = 22, "under_x" = 17, "under_y" = 15, "stock_x" = 24, "stock_y" = 10) actions_types = list(/datum/action/item_action/aim_mode) @@ -366,7 +366,7 @@ /obj/item/attachable/foldable/bipod, ) - flags_gun_features = GUN_CAN_POINTBLANK|GUN_AMMO_COUNTER + flags_gun_features = GUN_CAN_POINTBLANK|GUN_AMMO_COUNTER|GUN_SMOKE_PARTICLES attachable_offset = list("muzzle_x" = 38, "muzzle_y" = 19,"rail_x" = 13, "rail_y" = 21, "under_x" = 26, "under_y" = 15, "stock_x" = 19, "stock_y" = 13) actions_types = list(/datum/action/item_action/aim_mode) aim_fire_delay = 0.15 SECONDS diff --git a/code/modules/projectiles/guns/specialist.dm b/code/modules/projectiles/guns/specialist.dm index 462b158319b29..4d5cba7d71fc0 100644 --- a/code/modules/projectiles/guns/specialist.dm +++ b/code/modules/projectiles/guns/specialist.dm @@ -58,7 +58,7 @@ Note that this means that snipers will have a slowdown of 3, due to the scope /obj/item/attachable/scope/pmc, /obj/item/attachable/shoulder_mount, ) - flags_gun_features = GUN_WIELDED_FIRING_ONLY|GUN_AMMO_COUNTER|GUN_IFF + flags_gun_features = GUN_WIELDED_FIRING_ONLY|GUN_AMMO_COUNTER|GUN_IFF|GUN_SMOKE_PARTICLES starting_attachment_types = list(/obj/item/attachable/scope/antimaterial, /obj/item/attachable/sniperbarrel) fire_delay = 2.5 SECONDS @@ -244,7 +244,7 @@ Note that this means that snipers will have a slowdown of 3, due to the scope allowed_ammo_types = list(/obj/item/ammo_magazine/sniper/elite) force = 17 attachable_allowed = list() - flags_gun_features = GUN_WIELDED_FIRING_ONLY|GUN_AMMO_COUNTER|GUN_IFF + flags_gun_features = GUN_WIELDED_FIRING_ONLY|GUN_AMMO_COUNTER|GUN_IFF|GUN_SMOKE_PARTICLES attachable_offset = list("muzzle_x" = 32, "muzzle_y" = 18,"rail_x" = 15, "rail_y" = 19, "under_x" = 20, "under_y" = 15, "stock_x" = 20, "stock_y" = 15) flags_item_map_variant = NONE attachable_allowed = list( @@ -297,7 +297,7 @@ Note that this means that snipers will have a slowdown of 3, due to the scope /obj/item/attachable/scope/slavic, ) - flags_gun_features = GUN_WIELDED_FIRING_ONLY|GUN_AMMO_COUNTER + flags_gun_features = GUN_WIELDED_FIRING_ONLY|GUN_AMMO_COUNTER|GUN_SMOKE_PARTICLES attachable_offset = list("muzzle_x" = 32, "muzzle_y" = 17,"rail_x" = 22, "rail_y" = 21, "under_x" = 32, "under_y" = 14, "stock_x" = 20, "stock_y" = 14) starting_attachment_types = list(/obj/item/attachable/scope/slavic) actions_types = list(/datum/action/item_action/aim_mode) @@ -362,7 +362,7 @@ Note that this means that snipers will have a slowdown of 3, due to the scope /obj/item/weapon/gun/grenade_launcher/underslung, ) - flags_gun_features = GUN_WIELDED_FIRING_ONLY|GUN_AMMO_COUNTER|GUN_IFF + flags_gun_features = GUN_WIELDED_FIRING_ONLY|GUN_AMMO_COUNTER|GUN_IFF|GUN_SMOKE_PARTICLES gun_firemode_list = list(GUN_FIREMODE_AUTOMATIC) gun_skill_category = SKILL_FIREARMS attachable_offset = list("muzzle_x" = 44, "muzzle_y" = 18,"rail_x" = 18, "rail_y" = 24, "under_x" = 31, "under_y" = 15, "stock_x" = 24, "stock_y" = 13) @@ -405,7 +405,7 @@ Note that this means that snipers will have a slowdown of 3, due to the scope wield_delay = 12 gun_skill_category = SKILL_FIREARMS aim_slowdown = 0.8 - flags_gun_features = GUN_WIELDED_FIRING_ONLY|GUN_AMMO_COUNTER + flags_gun_features = GUN_WIELDED_FIRING_ONLY|GUN_AMMO_COUNTER|GUN_SMOKE_PARTICLES gun_firemode_list = list(GUN_FIREMODE_AUTOMATIC) attachable_allowed = list(/obj/item/attachable/flashlight, /obj/item/attachable/magnetic_harness) attachable_offset = list("muzzle_x" = 33, "muzzle_y" = 19,"rail_x" = 10, "rail_y" = 21, "under_x" = 24, "under_y" = 14, "stock_x" = 24, "stock_y" = 12) @@ -452,7 +452,7 @@ Note that this means that snipers will have a slowdown of 3, due to the scope caliber = CALIBER_10x26_CASELESS //codex allowed_ammo_types = list(/obj/item/ammo_magazine/minigun_powerpack/smartgun) wield_delay = 1.5 SECONDS - flags_gun_features = GUN_AMMO_COUNTER|GUN_WIELDED_FIRING_ONLY|GUN_IFF + flags_gun_features = GUN_AMMO_COUNTER|GUN_WIELDED_FIRING_ONLY|GUN_IFF|GUN_SMOKE_PARTICLES gun_skill_category = SKILL_SMARTGUN attachable_allowed = list(/obj/item/attachable/flashlight, /obj/item/attachable/magnetic_harness, /obj/item/attachable/motiondetector) attachable_offset = list("muzzle_x" = 33, "muzzle_y" = 19,"rail_x" = 19, "rail_y" = 29, "under_x" = 24, "under_y" = 14, "stock_x" = 24, "stock_y" = 12) //Only has rail attachments so only the rail variables are properly aligned @@ -588,7 +588,7 @@ Note that this means that snipers will have a slowdown of 3, due to the scope /obj/item/attachable/shoulder_mount, ) - flags_gun_features = GUN_WIELDED_FIRING_ONLY|GUN_WIELDED_STABLE_FIRING_ONLY|GUN_AMMO_COUNTER + flags_gun_features = GUN_WIELDED_FIRING_ONLY|GUN_WIELDED_STABLE_FIRING_ONLY|GUN_AMMO_COUNTER|GUN_SMOKE_PARTICLES reciever_flags = AMMO_RECIEVER_MAGAZINES|AMMO_RECIEVER_AUTO_EJECT|AMMO_RECIEVER_AUTO_EJECT_LOCKED gun_skill_category = SKILL_FIREARMS fire_sound = 'sound/weapons/guns/fire/launcher.ogg' @@ -669,7 +669,7 @@ Note that this means that snipers will have a slowdown of 3, due to the scope /obj/item/attachable/buildasentry, ) - flags_gun_features = GUN_WIELDED_FIRING_ONLY|GUN_WIELDED_STABLE_FIRING_ONLY|GUN_AMMO_COUNTER|GUN_SHOWS_LOADED + flags_gun_features = GUN_WIELDED_FIRING_ONLY|GUN_WIELDED_STABLE_FIRING_ONLY|GUN_AMMO_COUNTER|GUN_SHOWS_LOADED|GUN_SMOKE_PARTICLES gun_skill_category = SKILL_FIREARMS dry_fire_sound = 'sound/weapons/guns/fire/launcher_empty.ogg' @@ -816,7 +816,7 @@ Note that this means that snipers will have a slowdown of 3, due to the scope allowed_ammo_types = list(/obj/item/ammo_magazine/rocket/oneuse) reciever_flags = AMMO_RECIEVER_CLOSED|AMMO_RECIEVER_MAGAZINES|AMMO_RECIEVER_AUTO_EJECT_LOCKED flags_equip_slot = ITEM_SLOT_BELT - flags_gun_features = GUN_WIELDED_FIRING_ONLY|GUN_WIELDED_STABLE_FIRING_ONLY|GUN_AMMO_COUNTER|GUN_DEPLOYED_FIRE_ONLY + flags_gun_features = GUN_WIELDED_FIRING_ONLY|GUN_WIELDED_STABLE_FIRING_ONLY|GUN_AMMO_COUNTER|GUN_DEPLOYED_FIRE_ONLY|GUN_SMOKE_PARTICLES attachable_allowed = list(/obj/item/attachable/magnetic_harness) /// Indicates extension state of the launcher. True: Fireable and unable to fit in storage. False: Able to fit in storage but must be extended to fire. var/extended = FALSE @@ -871,7 +871,7 @@ Note that this means that snipers will have a slowdown of 3, due to the scope icon = 'icons/Marine/gun64.dmi' icon_state = "rpg" item_state = "rpg" - flags_gun_features = GUN_WIELDED_FIRING_ONLY|GUN_WIELDED_STABLE_FIRING_ONLY|GUN_AMMO_COUNTER|GUN_SHOWS_LOADED + flags_gun_features = GUN_WIELDED_FIRING_ONLY|GUN_WIELDED_STABLE_FIRING_ONLY|GUN_AMMO_COUNTER|GUN_SHOWS_LOADED|GUN_SMOKE_PARTICLES caliber = CALIBER_84MM //codex load_method = MAGAZINE //codex default_ammo_type = /obj/item/ammo_magazine/rocket/som @@ -914,7 +914,7 @@ Note that this means that snipers will have a slowdown of 3, due to the scope icon = 'icons/Marine/gun64.dmi' icon_state = "iccrpg" item_state = "iccrpg" - flags_gun_features = GUN_WIELDED_FIRING_ONLY|GUN_WIELDED_STABLE_FIRING_ONLY|GUN_AMMO_COUNTER|GUN_SHOWS_LOADED + flags_gun_features = GUN_WIELDED_FIRING_ONLY|GUN_WIELDED_STABLE_FIRING_ONLY|GUN_AMMO_COUNTER|GUN_SHOWS_LOADED|GUN_SMOKE_PARTICLES caliber = CALIBER_84MM //codex load_method = MAGAZINE //codex default_ammo_type = /obj/item/ammo_magazine/rocket/icc diff --git a/code/modules/vehicles/mecha/equipment/weapons/weapons.dm b/code/modules/vehicles/mecha/equipment/weapons/weapons.dm index 709352d5331f5..5b6499c733fe8 100644 --- a/code/modules/vehicles/mecha/equipment/weapons/weapons.dm +++ b/code/modules/vehicles/mecha/equipment/weapons/weapons.dm @@ -43,6 +43,8 @@ var/fire_mode = GUN_FIREMODE_AUTOMATIC ///how many seconds automatic rearming takes var/rearm_time = 2 SECONDS + /// smoke effect for when the gun fires + var/smoke_effect = FALSE /obj/item/mecha_parts/mecha_equipment/weapon/Initialize(mapload) . = ..() @@ -202,6 +204,15 @@ muzzle_flash.applied = TRUE addtimer(CALLBACK(src, PROC_REF(remove_flash), muzzle_flash), 0.2 SECONDS) + if(smoke_effect) + var/x_component = sin(firing_angle) * 40 + var/y_component = cos(firing_angle) * 40 + var/obj/effect/abstract/particle_holder/gun_smoke = new(get_turf(src), /particles/firing_smoke) + gun_smoke.particles.velocity = list(x_component, y_component) + gun_smoke.particles.position = list(flash_offsets[mech_slot][dir2text_short(chassis.dir)][1] - 16, flash_offsets[mech_slot][dir2text_short(chassis.dir)][2]) + addtimer(VARSET_CALLBACK(gun_smoke.particles, count, 0), 5) + addtimer(VARSET_CALLBACK(gun_smoke.particles, drift, 0), 3) + QDEL_IN(gun_smoke, 0.6 SECONDS) return AUTOFIRE_CONTINUE|AUTOFIRE_SUCCESS /obj/item/mecha_parts/mecha_equipment/weapon/proc/reset_light_range(lightrange) @@ -225,6 +236,7 @@ /obj/item/mecha_parts/mecha_equipment/weapon/ballistic name = "general ballistic weapon" fire_sound = 'sound/weapons/guns/fire/gunshot.ogg' + smoke_effect = TRUE ///ammo left in the mag var/projectiles ///ammo left total @@ -386,6 +398,17 @@ O.throw_at(target, missile_range, missile_speed, source, FALSE) TIMER_COOLDOWN_START(chassis, COOLDOWN_MECHA_EQUIPMENT(type), equip_cooldown) chassis.use_power(energy_drain) + if(smoke_effect) + var/firing_angle = Get_Angle(get_turf(src), target) + var/x_component = sin(firing_angle) * 40 + var/y_component = cos(firing_angle) * 40 + var/obj/effect/abstract/particle_holder/gun_smoke = new(get_turf(src), /particles/firing_smoke) + gun_smoke.particles.velocity = list(x_component, y_component) + var/mech_slot = chassis.equip_by_category[MECHA_R_ARM] == src ? MECHA_R_ARM : MECHA_L_ARM + gun_smoke.particles.position = list(flash_offsets[mech_slot][dir2text_short(chassis.dir)][1] - 16, flash_offsets[mech_slot][dir2text_short(chassis.dir)][2]) + addtimer(VARSET_CALLBACK(gun_smoke.particles, count, 0), 5) + addtimer(VARSET_CALLBACK(gun_smoke.particles, drift, 0), 3) + QDEL_IN(gun_smoke, 0.6 SECONDS) for(var/mob/occupant AS in chassis.occupants) occupant.hud_used.update_ammo_hud(src, hud_icons, projectiles) if(projectiles > 0)