Skip to content

Commit

Permalink
RPG Fixes (#3480)
Browse files Browse the repository at this point in the history
<!-- Write **BELOW** The Headers and **ABOVE** The comments else it may
not be viewable. -->
<!-- You can view Contributing.MD for a detailed description of the pull
request process. -->

## 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

<!-- Describe The Pull Request. Please be sure every change is
documented or this can delay review and even discourage maintainers from
merging your PR! -->

## 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:

<!-- Both :cl:'s are required for the changelog to work! You can put
your name to the right of the first :cl: if you want to overwrite your
GitHub username as author ingame. -->
<!-- You can use multiple of the same prefix (they're only used for the
icon ingame) and delete the unneeded ones. Despite some of the tags,
changelogs should generally represent how a player might be affected by
the changes rather than a summary of the PR's contents. -->

---------

Signed-off-by: Erika Fox <[email protected]>
Co-authored-by: Erika Fox <[email protected]>
Co-authored-by: Theos <[email protected]>
  • Loading branch information
3 people authored Oct 26, 2024
1 parent a80f684 commit bb7995f
Show file tree
Hide file tree
Showing 4 changed files with 35 additions and 27 deletions.
2 changes: 1 addition & 1 deletion code/modules/projectiles/gun.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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)))
Expand Down
52 changes: 29 additions & 23 deletions code/modules/projectiles/guns/ballistic.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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, "<span class='notice'>You unload [num_unloaded] [cartridge_wording]\s from [src].</span>")
playsound(user, eject_sound, eject_sound_volume, eject_sound_vary)
update_appearance()
else
to_chat(user, "<span class='warning'>[src] is empty!</span>")
return
if((bolt_type == BOLT_TYPE_LOCKING || bolt_type == BOLT_TYPE_CLIP) && bolt_locked)
drop_bolt(user)
return
Expand All @@ -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 <b>unique action</b> key. By default, this is <b>space</b>"
if(bolt_type != BOLT_TYPE_NO_BOLT)
. += "You can [bolt_wording] [src] by pressing the <b>unique action</b> key. By default, this is <b>space</b>"

///Gets the number of bullets in the gun
/obj/item/gun/ballistic/proc/get_ammo(countchambered = TRUE)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down
6 changes: 3 additions & 3 deletions code/modules/projectiles/projectile/special/rocket.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit bb7995f

Please sign in to comment.