Skip to content

Commit

Permalink
Guncrate fixes (shiptest-ss13#3158)
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

The beacon now has a proper subtype for not being loaded with ammo
rather than having that be its default state
The WT-550 no longer starts full in its guncase
SKM magazines no longer start full in their guncases either
Energy weapons which are meant to start empty now actually start empty
The brimstone, hellfire, and scout now come with their respective
guncases when ordered via cargo

## Why It's Good For The Game

jjjjjjjjjjjjjjjjjjjjjj

## Changelog

:cl:
fix: gun cargo packs now act more as they would be expected to
/: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. -->
  • Loading branch information
SomeguyManperson authored and MysticalFaceLesS committed Jul 20, 2024
1 parent 3a0105d commit 21ee369
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 9 deletions.
4 changes: 2 additions & 2 deletions code/game/objects/items/storage/guncases.dm
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@

/obj/item/storage/guncase/beacon
/obj/item/storage/guncase/beacon/PopulateContents()
new /obj/item/gun/ballistic/shotgun/doublebarrel/beacon(src)
new /obj/item/gun/ballistic/shotgun/doublebarrel/beacon/no_mag(src)

/obj/item/storage/guncase/scout
/obj/item/storage/guncase/scout/PopulateContents()
Expand Down Expand Up @@ -79,7 +79,7 @@

/obj/item/storage/guncase/wt550
/obj/item/storage/guncase/wt550/PopulateContents()
new /obj/item/gun/ballistic/automatic/smg/wt550(src)
new /obj/item/gun/ballistic/automatic/smg/wt550/no_mag(src)
new /obj/item/ammo_box/magazine/wt550m9/empty(src)
new /obj/item/ammo_box/magazine/wt550m9/empty(src)

Expand Down
6 changes: 3 additions & 3 deletions code/modules/cargo/packs/gun.dm
Original file line number Diff line number Diff line change
Expand Up @@ -120,14 +120,14 @@
name = "Hellfire Shotgun Crate"
desc = "For when you need to deal with 8 hooligans. Contains a pump shotgun, with a 8-round capacity."
cost = 2000
contains = list(/obj/item/gun/ballistic/shotgun/hellfire)
contains = list(/obj/item/storage/guncase/hellfire)
crate_name = "shotgun crate"

/datum/supply_pack/gun/brimstone_shotgun
name = "Brimstone Shotgun Crate"
desc = "For when you need to deal with 5 hooligans, and QUICKLY. Contains a slamfire shotgun, with a 5-round capacity. Warranty voided if sawed off."
cost = 2000
contains = list(/obj/item/gun/ballistic/shotgun/brimstone)
contains = list(/obj/item/storage/guncase/brimstone)
crate_name = "shotgun crate"

/*
Expand Down Expand Up @@ -159,7 +159,7 @@
name = "Scout Sniper Rifle Crate"
desc = "Contains a traditional scoped rifle to hunt wildlife and big game from a respectful distance. Chambered in powerful .300 Magnum."
cost = 5500
contains = list(/obj/item/gun/ballistic/rifle/scout)
contains = list(/obj/item/storage/guncase/scout)
crate_name = "rifle crate"

/datum/supply_pack/gun/cobra20
Expand Down
2 changes: 1 addition & 1 deletion code/modules/projectiles/boxes_magazines/external/rifle.dm
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@
multiple_sprites = AMMO_BOX_FULL_EMPTY

/obj/item/ammo_box/magazine/skm_762_40/empty
start_empty = FALSE
start_empty = TRUE

/obj/item/ammo_box/magazine/skm_762_40/extended
name = "extended assault rifle magazine (7.62x40mm CLIP)"
Expand Down
2 changes: 1 addition & 1 deletion code/modules/projectiles/guns/ballistic/shotgun.dm
Original file line number Diff line number Diff line change
Expand Up @@ -797,7 +797,7 @@ EMPTY_GUN_HELPER(shotgun/bulldog/inteq)
recoil = 2
recoil_unwielded = 4

/obj/item/gun/ballistic/shotgun/doublebarrel/beacon
/obj/item/gun/ballistic/shotgun/doublebarrel/beacon/no_mag
spawnwithmagazine = FALSE

/obj/item/gun/ballistic/shotgun/doublebarrel/beacon/factory
Expand Down
4 changes: 2 additions & 2 deletions code/modules/projectiles/guns/energy.dm
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,8 @@
cell = new cell_type(src)
else
cell = new(src)
if(!dead_cell)
cell.give(cell.maxcharge)
if(dead_cell)
cell.use(cell.maxcharge)
update_ammo_types()
recharge_newshot(TRUE)
if(selfcharge)
Expand Down

0 comments on commit 21ee369

Please sign in to comment.