From 2576fb91017a514e586fdbecda4b1e196c06a4c5 Mon Sep 17 00:00:00 2001 From: Erika Fox <94164348+Bjarl@users.noreply.github.com> Date: Sat, 5 Oct 2024 18:14:51 -0400 Subject: [PATCH 1/5] rpg balance --- .../guns/manufacturer/frontier_import/ballistics.dm | 1 + code/modules/projectiles/projectile/special/rocket.dm | 6 +++--- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/code/modules/projectiles/guns/manufacturer/frontier_import/ballistics.dm b/code/modules/projectiles/guns/manufacturer/frontier_import/ballistics.dm index 224712438b90..9e0a8bf42342 100644 --- a/code/modules/projectiles/guns/manufacturer/frontier_import/ballistics.dm +++ b/code/modules/projectiles/guns/manufacturer/frontier_import/ballistics.dm @@ -252,6 +252,7 @@ sealed_magazine = TRUE manufacturer = MANUFACTURER_IMPORT slot_flags = ITEM_SLOT_BACK + has_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 From 9a8e2dfa0f354bf02f035fcbbd1e77c66053f2d4 Mon Sep 17 00:00:00 2001 From: Erika Fox <94164348+Bjarl@users.noreply.github.com> Date: Sat, 5 Oct 2024 18:17:53 -0400 Subject: [PATCH 2/5] no bolt fix --- code/modules/projectiles/guns/ballistic.dm | 52 ++++++++++++---------- 1 file changed, 29 insertions(+), 23 deletions(-) diff --git a/code/modules/projectiles/guns/ballistic.dm b/code/modules/projectiles/guns/ballistic.dm index f64586871ccf..0ceb1c8b369f 100644 --- a/code/modules/projectiles/guns/ballistic.dm +++ b/code/modules/projectiles/guns/ballistic.dm @@ -206,7 +206,7 @@ if (.) 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 @@ -270,30 +270,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 - 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) + chambered = null + var/num_unloaded = 0 + for(var/obj/item/ammo_casing/CB in get_ammo_list(FALSE, TRUE)) + CB.forceMove(drop_location()) -/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) - 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(!internal_magazine && magazine) + eject_magazine(user) + return + return ..() + return ..() - 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 +/obj/item/gun/ballistic/unique_action(mob/living/user) if((bolt_type == BOLT_TYPE_LOCKING || bolt_type == BOLT_TYPE_CLIP) && bolt_locked) drop_bolt(user) return @@ -318,7 +323,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) From 0b620b77566a483ba991f3df56201018fb2f5cfa Mon Sep 17 00:00:00 2001 From: Erika Fox <94164348+Bjarl@users.noreply.github.com> Date: Fri, 11 Oct 2024 15:01:51 -0400 Subject: [PATCH 3/5] wjoops --- code/modules/projectiles/guns/ballistic.dm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/modules/projectiles/guns/ballistic.dm b/code/modules/projectiles/guns/ballistic.dm index 0ceb1c8b369f..4c885c9c75ca 100644 --- a/code/modules/projectiles/guns/ballistic.dm +++ b/code/modules/projectiles/guns/ballistic.dm @@ -274,7 +274,7 @@ 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) + 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)) From 6016e7bce58ac61672d12a25b6a434c0a56782d4 Mon Sep 17 00:00:00 2001 From: Erika Fox <94164348+Bjarl@users.noreply.github.com> Date: Sat, 12 Oct 2024 18:10:33 -0400 Subject: [PATCH 4/5] fix the safety + misfiring --- code/modules/projectiles/gun.dm | 2 +- .../projectiles/guns/manufacturer/frontier_import/ballistics.dm | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/code/modules/projectiles/gun.dm b/code/modules/projectiles/gun.dm index f848018a6115..4d7099518208 100644 --- a/code/modules/projectiles/gun.dm +++ b/code/modules/projectiles/gun.dm @@ -963,7 +963,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/manufacturer/frontier_import/ballistics.dm b/code/modules/projectiles/guns/manufacturer/frontier_import/ballistics.dm index 9e0a8bf42342..a110dcec8a6d 100644 --- a/code/modules/projectiles/guns/manufacturer/frontier_import/ballistics.dm +++ b/code/modules/projectiles/guns/manufacturer/frontier_import/ballistics.dm @@ -253,6 +253,7 @@ manufacturer = MANUFACTURER_IMPORT slot_flags = ITEM_SLOT_BACK has_safety = FALSE + safety = FALSE /obj/item/gun/ballistic/rocketlauncher/oneshot/Initialize() From 9c8ac18e0df8ec0cd42e9de975897a5b61db4c8c Mon Sep 17 00:00:00 2001 From: Erika Fox <94164348+Erikafox@users.noreply.github.com> Date: Wed, 23 Oct 2024 14:30:34 -0400 Subject: [PATCH 5/5] Apply suggestions from code review Co-authored-by: Theos Signed-off-by: Erika Fox <94164348+Erikafox@users.noreply.github.com> --- code/modules/projectiles/guns/ballistic.dm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/code/modules/projectiles/guns/ballistic.dm b/code/modules/projectiles/guns/ballistic.dm index 4c885c9c75ca..33d3ac0a3491 100644 --- a/code/modules/projectiles/guns/ballistic.dm +++ b/code/modules/projectiles/guns/ballistic.dm @@ -286,11 +286,11 @@ 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].") + 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, "[src] is empty!") + to_chat(user, span_warning("[src] is empty!")) return if(!internal_magazine && magazine) eject_magazine(user)