From 5e31841ef04204a1a7cbc4ad6b45fa893c31e9f0 Mon Sep 17 00:00:00 2001 From: cuberound <122645057+cuberound@users.noreply.github.com> Date: Tue, 12 Dec 2023 22:46:48 +0100 Subject: [PATCH 1/6] Update special_ammo.dm --- code/datums/ammo/bullet/special_ammo.dm | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/code/datums/ammo/bullet/special_ammo.dm b/code/datums/ammo/bullet/special_ammo.dm index cdf30b1af7fe..3cbdfeeb786e 100644 --- a/code/datums/ammo/bullet/special_ammo.dm +++ b/code/datums/ammo/bullet/special_ammo.dm @@ -108,6 +108,12 @@ BULLET_TRAIT_ENTRY(/datum/element/bullet_trait_iff) )) +/datum/ammo/bullet/machinegun/doorgun + flags_ammo_behavior = AMMO_IGNORE_COVER + +/datum/ammo/bullet/machinegun/set_bullet_traits() + . = ..() + /datum/ammo/bullet/machinegun/auto // for M2C, automatic variant for M56D, stats for bullet should always be moderately overtuned to fulfill its ultra-offense + flank-push purpose name = "heavy machinegun bullet" From 514ce3eb24005a478e5c99839910176c3e84c5fe Mon Sep 17 00:00:00 2001 From: cuberound <122645057+cuberound@users.noreply.github.com> Date: Tue, 12 Dec 2023 22:47:28 +0100 Subject: [PATCH 2/6] Update smartgun_mount.dm --- code/modules/cm_marines/smartgun_mount.dm | 23 +++++++++++++++-------- 1 file changed, 15 insertions(+), 8 deletions(-) diff --git a/code/modules/cm_marines/smartgun_mount.dm b/code/modules/cm_marines/smartgun_mount.dm index 01183ebceca5..9a0a91347bd4 100644 --- a/code/modules/cm_marines/smartgun_mount.dm +++ b/code/modules/cm_marines/smartgun_mount.dm @@ -1,6 +1,12 @@ ////////////////////////////////////////////////////////////// //Mounted MG, Replacment for the current jury rig code. +//Adds a coin for engi vendors +/obj/item/coin/marine/engineer + name = "marine engineer support token" + desc = "Insert this into an engineer vendor in order to access a support weapon." + icon_state = "coin_platinum" + // First thing we need is the ammo drum for this thing. /obj/item/ammo_magazine/m56d name = "M56D drum magazine (10x28mm Caseless)" @@ -825,7 +831,7 @@ to_chat(user, SPAN_WARNING("You aren't allowed to use firearms!")) return else - ADD_TRAIT(user, TRAIT_IMMOBILIZED, INTERACTION_TRAIT) + user.freeze() user.set_interaction(src) give_action(user, /datum/action/human_action/mg_exit) @@ -833,7 +839,7 @@ to_chat(usr, SPAN_NOTICE("You are too far from the handles to man [src]!")) /obj/structure/machinery/m56d_hmg/on_set_interaction(mob/user) - RegisterSignal(user, list(COMSIG_MOB_MG_EXIT, COMSIG_MOB_RESISTED, COMSIG_MOB_DEATH, COMSIG_LIVING_SET_BODY_POSITION), PROC_REF(exit_interaction)) + RegisterSignal(user, list(COMSIG_MOB_MG_EXIT, COMSIG_MOB_RESISTED, COMSIG_MOB_DEATH, COMSIG_MOB_KNOCKED_DOWN), PROC_REF(exit_interaction)) flags_atom |= RELAY_CLICK user.status_flags |= IMMOBILE_ACTION user.visible_message(SPAN_NOTICE("[user] mans \the [src]."),SPAN_NOTICE("You man \the [src], locked and loaded!")) @@ -848,12 +854,12 @@ update_pixels(user) operator = user -/obj/structure/machinery/m56d_hmg/on_unset_interaction(mob/living/user) +/obj/structure/machinery/m56d_hmg/on_unset_interaction(mob/user) flags_atom &= ~RELAY_CLICK SEND_SIGNAL(src, COMSIG_GUN_INTERRUPT_FIRE) user.status_flags &= ~IMMOBILE_ACTION user.visible_message(SPAN_NOTICE("[user] lets go of \the [src]."),SPAN_NOTICE("You let go of \the [src], letting the gun rest.")) - REMOVE_TRAIT(user, TRAIT_IMMOBILIZED, INTERACTION_TRAIT) + user.unfreeze() UnregisterSignal(user, list(COMSIG_MOB_MOUSEUP, COMSIG_MOB_MOUSEDOWN, COMSIG_MOB_MOUSEDRAG)) user.reset_view(null) user.remove_temp_pass_flags(PASS_MOB_THRU) // this is necessary because being knocked over while using the gun makes you incorporeal @@ -869,7 +875,7 @@ COMSIG_MOB_MG_EXIT, COMSIG_MOB_RESISTED, COMSIG_MOB_DEATH, - COMSIG_LIVING_SET_BODY_POSITION, + COMSIG_MOB_KNOCKED_DOWN, )) @@ -904,13 +910,13 @@ animate(user, pixel_x=diff_x, pixel_y=diff_y, 0.4 SECONDS) else if(user.client) - user.client.change_view(GLOB.world_view_size) + user.client.change_view(world_view_size) user.client.pixel_x = 0 user.client.pixel_y = 0 animate(user, pixel_x=user_old_x, pixel_y=user_old_y, 4, 1) -/obj/structure/machinery/m56d_hmg/check_eye(mob/living/user) - if(user.body_position != STANDING_UP || get_dist(user,src) > 0 || user.is_mob_incapacitated() || !user.client) +/obj/structure/machinery/m56d_hmg/check_eye(mob/user) + if(user.lying || get_dist(user,src) > 0 || user.is_mob_incapacitated() || !user.client) user.unset_interaction() /obj/structure/machinery/m56d_hmg/clicked(mob/user, list/mods) @@ -1077,6 +1083,7 @@ rounds = 1500 rounds_max = 1500 locked = 1 + ammo = /datum/ammo/bullet/machinegun/doorgun projectile_coverage = PROJECTILE_COVERAGE_HIGH icon = 'icons/turf/whiskeyoutpost.dmi' zoom = 1 From 5d8bf25c3271617469ff75a38efc7d69bce00a24 Mon Sep 17 00:00:00 2001 From: cuberound <122645057+cuberound@users.noreply.github.com> Date: Tue, 12 Dec 2023 22:49:51 +0100 Subject: [PATCH 3/6] Update special_ammo.dm --- code/datums/ammo/bullet/special_ammo.dm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/datums/ammo/bullet/special_ammo.dm b/code/datums/ammo/bullet/special_ammo.dm index 3cbdfeeb786e..375f74eb5dc7 100644 --- a/code/datums/ammo/bullet/special_ammo.dm +++ b/code/datums/ammo/bullet/special_ammo.dm @@ -111,7 +111,7 @@ /datum/ammo/bullet/machinegun/doorgun flags_ammo_behavior = AMMO_IGNORE_COVER -/datum/ammo/bullet/machinegun/set_bullet_traits() +/datum/ammo/bullet/machinegun/doorgun/set_bullet_traits() . = ..() /datum/ammo/bullet/machinegun/auto // for M2C, automatic variant for M56D, stats for bullet should always be moderately overtuned to fulfill its ultra-offense + flank-push purpose From 5ec2a8227031293619f462e146e45364b8bf7ff2 Mon Sep 17 00:00:00 2001 From: cuberound <122645057+cuberound@users.noreply.github.com> Date: Tue, 12 Dec 2023 22:52:32 +0100 Subject: [PATCH 4/6] Update smartgun_mount.dm --- code/modules/cm_marines/smartgun_mount.dm | 24 +++++++++-------------- 1 file changed, 9 insertions(+), 15 deletions(-) diff --git a/code/modules/cm_marines/smartgun_mount.dm b/code/modules/cm_marines/smartgun_mount.dm index 9a0a91347bd4..9cad7583d8d8 100644 --- a/code/modules/cm_marines/smartgun_mount.dm +++ b/code/modules/cm_marines/smartgun_mount.dm @@ -1,12 +1,6 @@ ////////////////////////////////////////////////////////////// //Mounted MG, Replacment for the current jury rig code. -//Adds a coin for engi vendors -/obj/item/coin/marine/engineer - name = "marine engineer support token" - desc = "Insert this into an engineer vendor in order to access a support weapon." - icon_state = "coin_platinum" - // First thing we need is the ammo drum for this thing. /obj/item/ammo_magazine/m56d name = "M56D drum magazine (10x28mm Caseless)" @@ -831,7 +825,7 @@ to_chat(user, SPAN_WARNING("You aren't allowed to use firearms!")) return else - user.freeze() + ADD_TRAIT(user, TRAIT_IMMOBILIZED, INTERACTION_TRAIT) user.set_interaction(src) give_action(user, /datum/action/human_action/mg_exit) @@ -839,7 +833,7 @@ to_chat(usr, SPAN_NOTICE("You are too far from the handles to man [src]!")) /obj/structure/machinery/m56d_hmg/on_set_interaction(mob/user) - RegisterSignal(user, list(COMSIG_MOB_MG_EXIT, COMSIG_MOB_RESISTED, COMSIG_MOB_DEATH, COMSIG_MOB_KNOCKED_DOWN), PROC_REF(exit_interaction)) + RegisterSignal(user, list(COMSIG_MOB_MG_EXIT, COMSIG_MOB_RESISTED, COMSIG_MOB_DEATH, COMSIG_LIVING_SET_BODY_POSITION), PROC_REF(exit_interaction)) flags_atom |= RELAY_CLICK user.status_flags |= IMMOBILE_ACTION user.visible_message(SPAN_NOTICE("[user] mans \the [src]."),SPAN_NOTICE("You man \the [src], locked and loaded!")) @@ -854,12 +848,12 @@ update_pixels(user) operator = user -/obj/structure/machinery/m56d_hmg/on_unset_interaction(mob/user) +/obj/structure/machinery/m56d_hmg/on_unset_interaction(mob/living/user) flags_atom &= ~RELAY_CLICK SEND_SIGNAL(src, COMSIG_GUN_INTERRUPT_FIRE) user.status_flags &= ~IMMOBILE_ACTION user.visible_message(SPAN_NOTICE("[user] lets go of \the [src]."),SPAN_NOTICE("You let go of \the [src], letting the gun rest.")) - user.unfreeze() + REMOVE_TRAIT(user, TRAIT_IMMOBILIZED, INTERACTION_TRAIT) UnregisterSignal(user, list(COMSIG_MOB_MOUSEUP, COMSIG_MOB_MOUSEDOWN, COMSIG_MOB_MOUSEDRAG)) user.reset_view(null) user.remove_temp_pass_flags(PASS_MOB_THRU) // this is necessary because being knocked over while using the gun makes you incorporeal @@ -875,7 +869,7 @@ COMSIG_MOB_MG_EXIT, COMSIG_MOB_RESISTED, COMSIG_MOB_DEATH, - COMSIG_MOB_KNOCKED_DOWN, + COMSIG_LIVING_SET_BODY_POSITION, )) @@ -910,13 +904,13 @@ animate(user, pixel_x=diff_x, pixel_y=diff_y, 0.4 SECONDS) else if(user.client) - user.client.change_view(world_view_size) + user.client.change_view(GLOB.world_view_size) user.client.pixel_x = 0 user.client.pixel_y = 0 animate(user, pixel_x=user_old_x, pixel_y=user_old_y, 4, 1) -/obj/structure/machinery/m56d_hmg/check_eye(mob/user) - if(user.lying || get_dist(user,src) > 0 || user.is_mob_incapacitated() || !user.client) +/obj/structure/machinery/m56d_hmg/check_eye(mob/living/user) + if(user.body_position != STANDING_UP || get_dist(user,src) > 0 || user.is_mob_incapacitated() || !user.client) user.unset_interaction() /obj/structure/machinery/m56d_hmg/clicked(mob/user, list/mods) @@ -1083,10 +1077,10 @@ rounds = 1500 rounds_max = 1500 locked = 1 - ammo = /datum/ammo/bullet/machinegun/doorgun projectile_coverage = PROJECTILE_COVERAGE_HIGH icon = 'icons/turf/whiskeyoutpost.dmi' zoom = 1 + ammo = /datum/ammo/bullet/machinegun/doorgun /obj/structure/machinery/m56d_hmg/mg_turret/dropship name = "\improper scoped M56D heavy machine gun" From 119c83ef02735d3d0cf794ee6d2dc77d3be274bf Mon Sep 17 00:00:00 2001 From: cuberound <122645057+cuberound@users.noreply.github.com> Date: Tue, 12 Dec 2023 23:11:43 +0100 Subject: [PATCH 5/6] Update special_ammo.dm --- code/datums/ammo/bullet/special_ammo.dm | 3 --- 1 file changed, 3 deletions(-) diff --git a/code/datums/ammo/bullet/special_ammo.dm b/code/datums/ammo/bullet/special_ammo.dm index 375f74eb5dc7..e49dc999032d 100644 --- a/code/datums/ammo/bullet/special_ammo.dm +++ b/code/datums/ammo/bullet/special_ammo.dm @@ -111,9 +111,6 @@ /datum/ammo/bullet/machinegun/doorgun flags_ammo_behavior = AMMO_IGNORE_COVER -/datum/ammo/bullet/machinegun/doorgun/set_bullet_traits() - . = ..() - /datum/ammo/bullet/machinegun/auto // for M2C, automatic variant for M56D, stats for bullet should always be moderately overtuned to fulfill its ultra-offense + flank-push purpose name = "heavy machinegun bullet" From 9df4812aaf5c28dc22c23c2cb9fb84d440d79cd5 Mon Sep 17 00:00:00 2001 From: cuberound <122645057+cuberound@users.noreply.github.com> Date: Thu, 14 Dec 2023 22:22:58 +0100 Subject: [PATCH 6/6] Update code/datums/ammo/bullet/special_ammo.dm Co-authored-by: fira --- code/datums/ammo/bullet/special_ammo.dm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/datums/ammo/bullet/special_ammo.dm b/code/datums/ammo/bullet/special_ammo.dm index e49dc999032d..3d53c6b0c0d0 100644 --- a/code/datums/ammo/bullet/special_ammo.dm +++ b/code/datums/ammo/bullet/special_ammo.dm @@ -109,7 +109,7 @@ )) /datum/ammo/bullet/machinegun/doorgun - flags_ammo_behavior = AMMO_IGNORE_COVER + flags_ammo_behavior = AMMO_BALLISTIC | AMMO_IGNORE_COVER /datum/ammo/bullet/machinegun/auto // for M2C, automatic variant for M56D, stats for bullet should always be moderately overtuned to fulfill its ultra-offense + flank-push purpose name = "heavy machinegun bullet"