From bb7995fd1a85bb2399dafe82218bb0c69673c8d9 Mon Sep 17 00:00:00 2001 From: Erika Fox <94164348+Erikafox@users.noreply.github.com> Date: Fri, 25 Oct 2024 22:57:45 -0400 Subject: [PATCH] RPG Fixes (#3480) ## About The Pull Request Balances the HEDP round to be more anti-armor, less Fuck You Get Gibbed Makes the Hammer have no safety. Makes weapons with no bolt un-rackable. Hides the rack text so you don't get a prompt to do it Restores old "use hand on boltless weapon" behavior to weapons with no bolt ## Why It's Good For The Game Balance + Usability Change ## Changelog :cl: balance: Hammer RPGs should no longer annihilate you completely. Just partially. fix: Weapons with no bolt can no longer be racked. Use your hand on them instead /:cl: --------- Signed-off-by: Erika Fox <94164348+Erikafox@users.noreply.github.com> Co-authored-by: Erika Fox <94164348+Bjarl@users.noreply.github.com> Co-authored-by: Theos --- code/modules/projectiles/gun.dm | 2 +- code/modules/projectiles/guns/ballistic.dm | 52 +++++++++++-------- .../frontier_import/ballistics.dm | 2 + .../projectiles/projectile/special/rocket.dm | 6 +-- 4 files changed, 35 insertions(+), 27 deletions(-) diff --git a/code/modules/projectiles/gun.dm b/code/modules/projectiles/gun.dm index 32d91294bc84..3ba8ef7ec7ac 100644 --- a/code/modules/projectiles/gun.dm +++ b/code/modules/projectiles/gun.dm @@ -957,7 +957,7 @@ // for guns firing on their own without a user /obj/item/gun/proc/discharge(cause, seek_chance = 10) var/target - if(!safety) + if(!safety && has_safety) // someone is very unlucky and about to be shot if(prob(seek_chance)) for(var/mob/living/target_mob in range(6, get_turf(src))) diff --git a/code/modules/projectiles/guns/ballistic.dm b/code/modules/projectiles/guns/ballistic.dm index 0fbf50157c8f..c583354e7eea 100644 --- a/code/modules/projectiles/guns/ballistic.dm +++ b/code/modules/projectiles/guns/ballistic.dm @@ -221,7 +221,7 @@ return if(sealed_magazine) - to_chat(user, span_warning("The magazine on [src] is sealed and cannot be reloaded!")) + to_chat(user, span_warning("The [magazine_wording] on [src] is sealed and cannot be reloaded!")) return if(!internal_magazine && istype(A, /obj/item/ammo_box/magazine)) var/obj/item/ammo_box/magazine/AM = A @@ -287,30 +287,35 @@ //ATTACK HAND IGNORING PARENT RETURN VALUE /obj/item/gun/ballistic/attack_hand(mob/user) - if(!internal_magazine && loc == user && user.is_holding(src) && magazine) - eject_magazine(user) - return + if(user.is_holding(src) && loc == user) + if(sealed_magazine) + to_chat(user, span_warning("The [magazine_wording] on [src] is sealed and cannot be accessed!")) + return + if(bolt_type == BOLT_TYPE_NO_BOLT && (chambered || internal_magazine)) + chambered = null + var/num_unloaded = 0 + for(var/obj/item/ammo_casing/CB in get_ammo_list(FALSE, TRUE)) + CB.forceMove(drop_location()) + + var/angle_of_movement =(rand(-3000, 3000) / 100) + dir2angle(turn(user.dir, 180)) + CB.AddComponent(/datum/component/movable_physics, _horizontal_velocity = rand(350, 450) / 100, _vertical_velocity = rand(400, 450) / 100, _horizontal_friction = rand(20, 24) / 100, _z_gravity = PHYSICS_GRAV_STANDARD, _z_floor = 0, _angle_of_movement = angle_of_movement, _bounce_sound = CB.bounce_sfx_override) + + num_unloaded++ + SSblackbox.record_feedback("tally", "station_mess_created", 1, CB.name) + if (num_unloaded) + to_chat(user, span_notice("You unload [num_unloaded] [cartridge_wording]\s from [src].")) + playsound(user, eject_sound, eject_sound_volume, eject_sound_vary) + update_appearance() + else + to_chat(user, span_warning("[src] is empty!")) + return + if(!internal_magazine && magazine) + eject_magazine(user) + return + return ..() return ..() /obj/item/gun/ballistic/unique_action(mob/living/user) - if(bolt_type == BOLT_TYPE_NO_BOLT) - chambered = null - var/num_unloaded = 0 - for(var/obj/item/ammo_casing/CB in get_ammo_list(FALSE, TRUE)) - CB.forceMove(drop_location()) - - var/angle_of_movement =(rand(-3000, 3000) / 100) + dir2angle(turn(user.dir, 180)) - CB.AddComponent(/datum/component/movable_physics, _horizontal_velocity = rand(350, 450) / 100, _vertical_velocity = rand(400, 450) / 100, _horizontal_friction = rand(20, 24) / 100, _z_gravity = PHYSICS_GRAV_STANDARD, _z_floor = 0, _angle_of_movement = angle_of_movement, _bounce_sound = CB.bounce_sfx_override) - - num_unloaded++ - SSblackbox.record_feedback("tally", "station_mess_created", 1, CB.name) - if (num_unloaded) - to_chat(user, "You unload [num_unloaded] [cartridge_wording]\s from [src].") - playsound(user, eject_sound, eject_sound_volume, eject_sound_vary) - update_appearance() - else - to_chat(user, "[src] is empty!") - return if((bolt_type == BOLT_TYPE_LOCKING || bolt_type == BOLT_TYPE_CLIP) && bolt_locked) drop_bolt(user) return @@ -335,7 +340,8 @@ . += "It does not seem to have a round chambered." if (bolt_locked) . += "The [bolt_wording] is locked back and needs to be released before firing." - . += "You can [bolt_wording] [src] by pressing the unique action key. By default, this is space" + if(bolt_type != BOLT_TYPE_NO_BOLT) + . += "You can [bolt_wording] [src] by pressing the unique action key. By default, this is space" ///Gets the number of bullets in the gun /obj/item/gun/ballistic/proc/get_ammo(countchambered = TRUE) diff --git a/code/modules/projectiles/guns/manufacturer/frontier_import/ballistics.dm b/code/modules/projectiles/guns/manufacturer/frontier_import/ballistics.dm index 93efbe0afbc4..478ecfe7a1fd 100644 --- a/code/modules/projectiles/guns/manufacturer/frontier_import/ballistics.dm +++ b/code/modules/projectiles/guns/manufacturer/frontier_import/ballistics.dm @@ -267,6 +267,8 @@ sealed_magazine = TRUE manufacturer = MANUFACTURER_IMPORT slot_flags = ITEM_SLOT_BACK + has_safety = FALSE + safety = FALSE /obj/item/gun/ballistic/rocketlauncher/oneshot/Initialize() diff --git a/code/modules/projectiles/projectile/special/rocket.dm b/code/modules/projectiles/projectile/special/rocket.dm index ede0e69b3ea9..536cfdf0be32 100644 --- a/code/modules/projectiles/projectile/special/rocket.dm +++ b/code/modules/projectiles/projectile/special/rocket.dm @@ -13,13 +13,13 @@ desc = "USE A WEEL GUN" icon_state= "84mm-hedp" damage = 80 - var/anti_armour_damage = 200 + var/anti_armour_damage = 120 armour_penetration = 100 - dismemberment = 100 + dismemberment = 30 /obj/projectile/bullet/a84mm/on_hit(atom/target, blocked = FALSE) ..() - explosion(target, 1, 1, 2, 1, 0, flame_range = 4) + explosion(target, 0, 1, 2, 1, 0, flame_range = 4) if(ismecha(target)) var/obj/mecha/M = target