From 7703890982217c976bc3b7851cb2712446778bd9 Mon Sep 17 00:00:00 2001 From: John Doe Date: Thu, 24 Aug 2023 16:08:07 -0700 Subject: [PATCH] small things --- code/modules/cm_marines/equipment/guncases.dm | 2 +- code/modules/projectiles/ammo_datums.dm | 3 ++- code/modules/projectiles/gun_attachables.dm | 2 ++ code/modules/projectiles/projectile.dm | 4 +++- 4 files changed, 8 insertions(+), 3 deletions(-) diff --git a/code/modules/cm_marines/equipment/guncases.dm b/code/modules/cm_marines/equipment/guncases.dm index a00deed0dd83..f786cb08f4d0 100644 --- a/code/modules/cm_marines/equipment/guncases.dm +++ b/code/modules/cm_marines/equipment/guncases.dm @@ -300,7 +300,7 @@ name = "\improper M707 anti-materiel rifle case" desc = "A gun case containing the M707 \"Vulture\" anti-materiel rifle and its requisite spotting tools." icon_state = "guncase_blue" - storage_slots = 7 + storage_slots = 5 can_hold = list( /obj/item/weapon/gun/boltaction/vulture, /obj/item/ammo_magazine/rifle/boltaction/vulture, diff --git a/code/modules/projectiles/ammo_datums.dm b/code/modules/projectiles/ammo_datums.dm index 063141bb7ea3..707a8894b32f 100644 --- a/code/modules/projectiles/ammo_datums.dm +++ b/code/modules/projectiles/ammo_datums.dm @@ -1623,7 +1623,8 @@ /datum/ammo/bullet/sniper/anti_materiel/vulture damage = 400 // Fully intended to vaporize anything smaller than a mini cooper - accurate_range_min = 10 // yeah. + accurate_range_min = 10 + accuracy_range_falloff = 50 handful_state = "vulture_bullet" /datum/ammo/bullet/sniper/anti_materiel/vulture/set_bullet_traits() diff --git a/code/modules/projectiles/gun_attachables.dm b/code/modules/projectiles/gun_attachables.dm index 3c8b1068096b..309d4144274e 100644 --- a/code/modules/projectiles/gun_attachables.dm +++ b/code/modules/projectiles/gun_attachables.dm @@ -1453,6 +1453,8 @@ Defined in conflicts.dm of the #defines folder. /obj/item/attachable/vulture_scope/proc/on_unscope() SIGNAL_HANDLER + if(!scope_user) + return var/mob/scoper = scope_user.resolve() if(isgun(loc)) diff --git a/code/modules/projectiles/projectile.dm b/code/modules/projectiles/projectile.dm index 7a23c33d6a50..886a4394ea66 100644 --- a/code/modules/projectiles/projectile.dm +++ b/code/modules/projectiles/projectile.dm @@ -69,6 +69,8 @@ /// The flicker that plays when a bullet hits a target. Usually red. Can be nulled so it doesn't show up at all. var/hit_effect_color = "#FF0000" + /// How much to make the bullet fall off by accuracy-wise when closer than the ideal range + var/accuracy_range_falloff = 10 /obj/item/projectile/Initialize(mapload, datum/cause_data/cause_data) . = ..() @@ -534,7 +536,7 @@ var/ammo_flags = ammo.flags_ammo_behavior | projectile_override_flags if(distance_travelled <= ammo.accurate_range) if(distance_travelled <= ammo.accurate_range_min) // If bullet stays within max accurate range + random variance - effective_accuracy -= (ammo.accurate_range_min - distance_travelled) * 10 // Snipers have accuracy falloff at closer range before point blank + effective_accuracy -= (ammo.accurate_range_min - distance_travelled) * accuracy_range_falloff // Snipers have accuracy falloff at closer range before point blank else effective_accuracy -= (distance_travelled - ammo.accurate_range) * ((ammo_flags & AMMO_SNIPER) ? 1.5 : 10) // Snipers have a smaller falloff constant due to longer max range