Skip to content

Commit

Permalink
mag-fed shotgun + lever action syntax changes (#2302)
Browse files Browse the repository at this point in the history
## About The Pull Request

Very small pull request I could quickly do before work

Adjusts some shotgun descriptions to not only be more accurate, but
better organized syntactically. Does the same for lever-actions and also
makes it so lever-action vocabulary respects my immersion

Fixes a bug where the bulldog drum magazine would disappear because its
update_icon was calling a null value. Also standardizes shotgun magazine
checks (though I would like to refactor it at some point so we don't
need a unique update_icon for every hecking magazine that has the two
sprite states of "has bullets" and "doesn't")

Final thing; ammo_boxes were not properly updating their sprites and
descriptions when initialized. Now, every ammo box should have the
proper sprite and description (including starting number of bullets)
before they're interacted with. This technically makes load time a bit
longer, but it shouldn't be noticeable. Also fixed spent shotgun shells
being invisible and deleted an unused sprite in ammo_bullets.dmi

## Why It's Good For The Game

Lever-action rifles have bullets and a lever, rather than shells and a
pump. That's just an inherit moment being fixed.

Shotgun changes make straight-mags actually not just worse drum
magazines (fitting into webbings is super awesome!), and also better
clarify what the items are.

Also having to pop out a 9mm bullet out of a pistol magazine to slot one
back in to make it look full is really, really annoying and misleading.
Not being able to know how many bullets a magazine or ammo box has until
its contents are interacted with is also bad for readability

## Changelog

:cl:
balance: Standard 12g box magazines are now small-sized, rather than
normal
spellcheck: Adjusts mag-based shotguns, lever-actions, and shotgun mag
descriptions to be more efficient/accurate
code: Changes how bulldog/mastiff magazines check for their icon to be
standardized with the CM-15
code: All ammo_boxes now update_appearance upon being initialized
fix: Bulldog drum magazines should no longer go invisible while checking
for a base_icon_sprite that doesn't exist
fix: Spent shotgun shells now have proper sprite pathing
/:cl:
  • Loading branch information
Skrem7 authored Sep 1, 2023
1 parent 5141298 commit 856b21e
Show file tree
Hide file tree
Showing 6 changed files with 16 additions and 13 deletions.
1 change: 1 addition & 0 deletions code/modules/projectiles/boxes_magazines/_box_magazine.dm
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@
if(!start_empty)
for(var/i = 1, i <= max_ammo, i++)
stored_ammo += new ammo_type(src)
update_appearance()

///gets a round from the magazine, if keep is TRUE the round will stay in the gun
/obj/item/ammo_box/proc/get_round(keep = FALSE)
Expand Down
12 changes: 6 additions & 6 deletions code/modules/projectiles/boxes_magazines/external/shotgun.dm
Original file line number Diff line number Diff line change
@@ -1,16 +1,15 @@
/obj/item/ammo_box/magazine/m12g
name = "shotgun drum magazine (12g buckshot)"
desc = "A bulky drum magazine for shotguns."
desc = "A bulky 8-round drum designed for Scarborough family shotguns."
icon_state = "m12gb"
base_icon_state = "m12gb"
ammo_type = /obj/item/ammo_casing/shotgun/buckshot
caliber = "12ga"
max_ammo = 8
w_class = WEIGHT_CLASS_NORMAL

/obj/item/ammo_box/magazine/m12g/update_icon_state()
. = ..()
icon_state = "[base_icon_state]-[CEILING(ammo_count(FALSE)/8, 1)*8]"
icon_state = "m12gb-[!!ammo_count()]"

/obj/item/ammo_box/magazine/m12g/stun
name = "shotgun drum magazine (12g taser slugs)"
Expand All @@ -34,17 +33,18 @@

/obj/item/ammo_box/magazine/m12g/small
name = "shotgun box magazine (12g buckshot)"
desc = "A single-stack box magazine for a shotgun."
desc = "A single-stack, 6-round box magazine for Scarborough family shotguns."
icon_state = "m12gsmall"
base_icon_state = "m12gsmall"
max_ammo = 6
w_class = WEIGHT_CLASS_SMALL //Smaller, holds less

/obj/item/ammo_box/magazine/m12g/small/update_icon_state()
. = ..()
icon_state = "[base_icon_state]-[CEILING(ammo_count(FALSE)/6, 1)*6]"
icon_state = "m12gsmall-[!!ammo_count()]"

/obj/item/ammo_box/magazine/cm15_mag
name = "CM-15 magazine (12g buckshot)"
desc = "A curved, 8-round magazine designed for Minutemen shotguns."
icon_state = "cm15_mag"
ammo_type = /obj/item/ammo_casing/shotgun/buckshot
caliber = "12ga"
Expand Down
16 changes: 9 additions & 7 deletions code/modules/projectiles/guns/ballistic/shotgun.dm
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@

/obj/item/gun/ballistic/shotgun/bulldog
name = "\improper Bulldog Shotgun"
desc = "A semi-automatic magazine-fed shotgun designed for combat in tight quarters, manufactured by Scarborough Arms. A historical favorite of various Syndicate factions, especially the Gorlex Marauders."
desc = "A semi-automatic, magazine-fed shotgun designed for combat in tight quarters, manufactured by Scarborough Arms. A historical favorite of various Syndicate factions, especially the Gorlex Marauders."
icon = 'icons/obj/guns/48x32guns.dmi'
icon_state = "bulldog"
item_state = "bulldog"
Expand All @@ -146,21 +146,20 @@
tac_reloads = TRUE
pickup_sound = 'sound/items/handling/rifle_pickup.ogg'


/obj/item/gun/ballistic/shotgun/bulldog/unrestricted
pin = /obj/item/firing_pin

/obj/item/gun/ballistic/shotgun/bulldog/inteq
name = "\improper Mastiff Shotgun"
desc = "A semi-auto, mag-fed shotgun, seized from Syndicate armories by deserting troopers and modified to IRMG's standards. Only compatible with specialized 8-round drum magazines."
desc = "A variation of the Bulldog, seized from Syndicate armories by deserting troopers then modified to IRMG's standards."
icon_state = "bulldog-inteq"
item_state = "bulldog-inteq"
mag_type = /obj/item/ammo_box/magazine/m12g
pin = /obj/item/firing_pin

/obj/item/gun/ballistic/shotgun/bulldog/minutemen
name = "\improper CM-15"
desc = "Standard issue shotgun of the Colonial Minutemen. Most often used by boarding crews. Only compatible with specialized 8-round magazines."
desc = "A standard-issue shotgun of the Colonial Minutemen, most often used by boarding crews. Only compatible with specialized 8-round magazines."
icon = 'icons/obj/guns/48x32guns.dmi'
mag_type = /obj/item/ammo_box/magazine/cm15_mag
icon_state = "cm15"
Expand Down Expand Up @@ -407,9 +406,10 @@
fire_sound_volume = 100
mag_type = /obj/item/ammo_box/magazine/internal/shot/hundred

//Lever-Action Rifles
/obj/item/gun/ballistic/shotgun/winchester
name = "Winchester MK.2"
desc = "A sturdy lever action rifle with hand-stamped Hunter's Pride marks on the receiver. This one is a newer reproduction."
desc = "A sturdy lever-action rifle with hand-stamped Hunter's Pride marks on the receiver. Modern and sleek."
icon_state = "winchester"
item_state = "winchester"
icon = 'icons/obj/guns/48x32guns.dmi'
Expand All @@ -421,14 +421,16 @@
mag_type = /obj/item/ammo_box/magazine/internal/shot/winchester
fire_sound = 'sound/weapons/gun/rifle/shot.ogg'
rack_sound = 'sound/weapons/gun/rifle/winchester_cocked.ogg'
bolt_wording = "lever"
cartridge_wording = "bullet"

/obj/item/gun/ballistic/shotgun/winchester/mk1
name = "Winchester MK.1"
desc = "A sturdy lever action rifle. This older pattern appears to be an antique, in excellent condition despite its age."
desc = "A sturdy lever-action rifle. This antique pattern appears to be in excellent condition despite its age."
icon_state = "winchestermk1"
item_state = "winchestermk1"


//Elephant Gun
/obj/item/gun/ballistic/shotgun/doublebarrel/twobore
name = "two-bore rifle"
desc = "Take this, elephant! If you want an intact trophy, don't aim for the head. Chambered in two-bore."
Expand Down
Binary file modified icons/obj/ammo.dmi
Binary file not shown.
Binary file modified icons/obj/ammo_bullets.dmi
Binary file not shown.
Binary file modified icons/obj/ammo_shotshells.dmi
Binary file not shown.

0 comments on commit 856b21e

Please sign in to comment.