diff --git a/code/modules/cm_marines/equipment/kit_boxes.dm b/code/modules/cm_marines/equipment/kit_boxes.dm index 4ce6be802f3d..e27f8e52a729 100644 --- a/code/modules/cm_marines/equipment/kit_boxes.dm +++ b/code/modules/cm_marines/equipment/kit_boxes.dm @@ -530,6 +530,8 @@ pro_case_overlay = "spotter" /obj/item/storage/box/kit/spotter/fill_preset_inventory() + new /obj/item/weapon/gun/lever_action/xm88/spotter(src) + new /obj/item/ammo_magazine/internal/lever_action/xm88/spotter/box(src) new /obj/item/clothing/head/helmet/marine/ghillie(src) new /obj/item/clothing/suit/storage/marine/ghillie(src) new /obj/item/clothing/glasses/night/m42_night_goggles/spotter(src) diff --git a/code/modules/projectiles/ammo_datums.dm b/code/modules/projectiles/ammo_datums.dm index d8b158485501..104fd78c5b34 100644 --- a/code/modules/projectiles/ammo_datums.dm +++ b/code/modules/projectiles/ammo_datums.dm @@ -1443,16 +1443,26 @@ //unused and not working. need to refactor MD code. Unobtainable. //intended mechanic is to have xenos hit with it show up very frequently on any MDs around /datum/ammo/bullet/lever_action/tracker - name = "tracking lever-action bullet" + name = "tracker round" icon_state = "redbullet" damage = 70 penetration = ARMOR_PENETRATION_TIER_3 accuracy = HIT_ACCURACY_TIER_1 handful_state = "tracking_lever_action_bullet" -/datum/ammo/bullet/lever_action/tracker/on_hit_mob(mob/M, obj/item/projectile/P, mob/user) - //SEND_SIGNAL(user, COMSIG_BULLET_TRACKING, user, M) - M.visible_message(SPAN_DANGER("You hear a faint beep under [M]'s [M.mob_size > MOB_SIZE_HUMAN ? "chitin" : "skin"].")) +/datum/ammo/bullet/lever_action/tracker/proc/tracker_remove(mob/target, icon) + REMOVE_TRAIT(target, TRAIT_SPOTTER_LAZED, TRAIT_SOURCE_EQUIPMENT(2000)) + target.overlays -= icon + + +/datum/ammo/bullet/lever_action/tracker/on_hit_mob(mob/target, obj/item/projectile/projectile, mob/user) + var/image/image = image(icon = 'icons/effects/Targeted.dmi', icon_state = "spotter_lockon") + image.pixel_x = -target.pixel_x + target.base_pixel_x + image.pixel_y = (target.icon_size - world.icon_size) * 0.5 - target.pixel_y + target.base_pixel_y + target.overlays += image + ADD_TRAIT(target, TRAIT_SPOTTER_LAZED, TRAIT_SOURCE_EQUIPMENT(2000)) + addtimer(CALLBACK(src, PROC_REF(tracker_remove), target, image), 20 SECONDS) + target.visible_message(SPAN_DANGER("You hear a faint beep under [target]'s [target.mob_size > MOB_SIZE_HUMAN ? "chitin" : "skin"].")) /datum/ammo/bullet/lever_action/training name = "lever-action blank" diff --git a/code/modules/projectiles/gun_attachables.dm b/code/modules/projectiles/gun_attachables.dm index 0baf6f527d4b..5efed65a79e1 100644 --- a/code/modules/projectiles/gun_attachables.dm +++ b/code/modules/projectiles/gun_attachables.dm @@ -1083,6 +1083,11 @@ Defined in conflicts.dm of the #defines folder. desc = "Oppa! How did you get this off glorious Stalin weapon? Blyat, put back on and do job tovarish. Yankee is not shoot self no?" +/obj/item/attachable/scope/mini_iff/spotter + name = "\improper S6 Solo x4 Scope" + desc = "This scope is meant to be unobtainium, only existing on the XM88 Spotter rifle. If you obtained this without spawning it in please let a coder know how so they can fix it." + zoom_offset = 11 + zoom_viewsize = 12 // ======== Stock attachments ======== // diff --git a/code/modules/projectiles/guns/lever_action.dm b/code/modules/projectiles/guns/lever_action.dm index 259c6170ae48..058ea31fa68b 100644 --- a/code/modules/projectiles/guns/lever_action.dm +++ b/code/modules/projectiles/guns/lever_action.dm @@ -541,3 +541,35 @@ their unique feature is that a direct hit will buff your damage and firerate #undef FLOATING_PENETRATION_TIER_2 #undef FLOATING_PENETRATION_TIER_3 #undef FLOATING_PENETRATION_TIER_4 + + +/obj/item/weapon/gun/lever_action/xm88/spotter + name = "\improper XM88 Spotter Variant" + desc = "ARMAT's XM88 Scout Rifle, uniquely designed with a proprietary optics mount, synergizes flawlessly with the S6 Solo Scope, ensuring zero shift during recoil. Enhanced by a dynamic electronic interlink, the scope and rifle communicate rapidly, adjusting to atmospheric conditions for perfect aim. This pairing shines particularly with the XM88's single-shot operation, which permits the scope's advanced Recoil Compensation System (RCS) to reset after each shot, optimizing accuracy. This exquisite fusion of mechanics and electronics, born of ARMAT's precise engineering, makes the XM88 and S6 Solo Scope a peerless duo in terms of precision." + desc_lore = "The distinctiveness of the S6 Solo Scope's fit to the XM88 Scout Rifle springs from the deep-rooted secrets of ARMAT's engineering. The XM88, under its metallic skin, hides an exclusive, proprietary optics mount, a feat of craftsmanship from ARMAT. This bespoke design meshes flawlessly with the Solo Scope, creating a harmonious union that is the mark of an expert rifleman. Upon first glance, you might think it's just a unique mount, but it's more than that. The optics mount is engineered with an advanced mechanical lock-in mechanism, fortified with a responsive electronic interlink. When the S6 Solo Scope is placed onto the XM88, the lock-in mechanism secures the scope firmly, ensuring zero shift during recoil. Then, the electronic interlink takes over - the microprocessors within the XM88 and the Solo Scope commence a rapid series of high-speed data transfers, fine-tuning the scope's range settings to match the current atmospheric conditions, as detected by the XM88's internal barometric and temperature sensors./n /nThis ingenious pairing of mechanical design and electronic interfacing enables the rifleman to unlock the full lethal precision the XM88 offers. And it's in this masterful interplay between steel and silicon, the convergence of mechanics and electronics, that the XM88 and the S6 Solo Scope truly become a force to be reckoned with in the right hands./n /nThe sophisticated technology underlying the Solo Scope's functionality is best matched to a single-shot rifle like the XM88, and there's a crucial reason for that. Automatic or semi-automatic rifles may seem more powerful due to their rapid-fire capabilities, but this often comes with an unavoidable trade-off: accuracy. With each successive shot, recoil accumulates, leading to a shift in the rifle's position which can throw off the aim considerably, rendering even the best scopes less effective./n /nHowever, the XM88's single-shot mechanism sidesteps this issue elegantly. After each shot, the shooter manually reloads, which provides a moment for the rifle to return to its original position, minimizing the impact of recoil on aim./n /nFurther, the Solo Scope is integrated with a Recoil Compensation System (RCS). This sophisticated feature uses high-speed gyroscopes to detect the minute shifts from the rifle's recoil. The RCS then rapidly calculates and adjusts the scope's reticle, compensating for the minute change in angle. Yet, such a system requires a brief moment to reset and recalibrate after each shot, a time luxury that isn't available in rapid-fire firearms./n /nThe XM88, with its single-shot operation, offers just enough pause for the RCS to perform its recalibration, ensuring maximum accuracy for the next shot. This perfect harmony between the rifle and scope, built on the back of ARMAT's precision engineering, makes the XM88 and the S6 Solo Scope an unmatched combination in terms of accuracy and precision." + fire_delay = FIRE_DELAY_TIER_3 // Slow fire rate due to being a single shot rifle. + accuracy_mult = BASE_ACCURACY_MULT + HIT_ACCURACY_MULT_TIER_10 // High accuracy due to being a sniper rifle + recoil = RECOIL_AMOUNT_TIER_1 // Low recoil due to having a recoil control system + + // internal magazine + current_mag = /obj/item/ammo_magazine/internal/lever_action/xm88/spotter + + // scope + attachable_allowed = list( + /obj/item/attachable/scope/mini_iff/spotter, + ) + + attachable_offset = list("scope_x" = 11, "scope_y" = 21) + +// Initializes the gun with the scope attached +/obj/item/weapon/gun/lever_action/xm88/spotter/handle_starting_attachment() + ..() + var/obj/item/attachable/scope/mini_iff/spotter/scope = new(src) + scope.flags_attach_features &= ~ATTACH_REMOVABLE + scope.hidden = FALSE + scope.Attach(src) + update_attachable(scope.slot) + +/obj/item/weapon/gun/lever_action/xm88/spotter/Initialize(mapload, spawn_empty) + . = ..() + src.color = "#FFCC00" // Yes recoloring things is the new coder sprites what about it diff --git a/code/modules/projectiles/magazines/lever_action.dm b/code/modules/projectiles/magazines/lever_action.dm index 2eb2d25a28f8..e6dbbcbbffdc 100644 --- a/code/modules/projectiles/magazines/lever_action.dm +++ b/code/modules/projectiles/magazines/lever_action.dm @@ -74,6 +74,28 @@ Similar to shotguns.dm but not exactly. max_rounds = 9 chamber_closed = 0 +// This is the internal magazine of the spotter XM rifle +/obj/item/ammo_magazine/internal/lever_action/xm88/spotter + name = "\improper XM88 spotter rifle internal magazine" + desc = "If you see this something went wrong and the world is ending!!" + icon = 'icons/obj/items/weapons/guns/ammo_by_faction/uscm.dmi' + icon_state = "458-box" + item_state = "458-box" + default_ammo = /datum/ammo/bullet/lever_action/tracker + caliber = ".458 tracker" + gun_type = /obj/item/weapon/gun/lever_action/xm88/spotter + max_rounds = 1 + +/obj/item/ammo_magazine/internal/lever_action/xm88/spotter/Initialize(mapload, spawn_empty) + . = ..() + src.color = "#FFCC00" // Yes recoloring things is the new coder sprites what about it + +// This si the box that comes in the spotter kit +/obj/item/ammo_magazine/internal/lever_action/xm88/spotter/box + name = "box of .458 tracker rounds" + desc = "A box filled with handfuls of .458 tracker rounds, designed for use with the XM88 spotter rifle." + max_rounds = 40 + //------------------------------------------------------- /*