Resprites shotgun shell boxes (with fancy storage!) (#27006)

* Idk what I'm gonna do with this

* This needs a lot of cleaning up

* Absolute hell

* Fixes and reverts

* Shhhhh

* SHHHHHHH

* Accepting my least atomic PR of the year award

* Fix rubbershot name

* Update code/game/objects/effects/spawners/lootdrop.dm

Co-authored-by: Contrabang <91113370+Contrabang@users.noreply.github.com>
Signed-off-by: DGamerL <108773801+DGamerL@users.noreply.github.com>

* Contra review

* Contra review

---------

Signed-off-by: DGamerL <108773801+DGamerL@users.noreply.github.com>
Co-authored-by: Contrabang <91113370+Contrabang@users.noreply.github.com>
This commit is contained in:
DGamerL
2024-10-22 10:41:35 +00:00
committed by GitHub
co-authored by Contrabang
parent edfe42a14a
commit f5a4bd0e4b
12 changed files with 128 additions and 123 deletions
@@ -272,7 +272,7 @@
/obj/item/melee/baseball_bat/homerun = 50,
/obj/item/rcd/combat = 50,
/obj/item/weaponcrafting/gunkit/universal_gun_kit/sol_gov = 50,
/obj/item/storage/box/buck = 30, //Only seven shots, make them count
/obj/item/storage/fancy/shell/buck = 30, //Only eight shots, make them count
/obj/item/mod/module/noslip = 40,
/obj/item/clothing/mask/holo_cigar = 50
)
@@ -389,7 +389,7 @@
/obj/item/mod/construction/plating/research = 30,
/obj/item/assembly/signaler/anomaly/random = 20,
/obj/item/gun/energy/gun = 50,
/obj/item/storage/box/dragonsbreath = 30,
/obj/item/storage/fancy/shell/dragonsbreath = 30,
/obj/item/storage/box/turbine_kit = 20,
/obj/item/mod/module/firefighting_tank = 40,
/obj/item/mod/module/jetpack/advanced = 40
@@ -703,77 +703,83 @@
////////////////
/* Ammo Boxes */
////////////////
/obj/item/storage/box/slug
name = "ammunition box (Slug)"
desc = "A small box capable of holding seven shotgun shells."
icon_state = "slug_box"
/obj/item/storage/box/slug/populate_contents()
for(var/I in 1 to 7)
new /obj/item/ammo_casing/shotgun(src)
/obj/item/storage/fancy/shell
icon = 'icons/obj/shell_boxes.dmi'
storage_slots = 8
appearance_flags = parent_type::appearance_flags | KEEP_TOGETHER
can_hold = list(/obj/item/ammo_casing/shotgun)
/// What shell do we fill the box with
var/shell_type
/obj/item/storage/box/buck
name = "ammunition box (Buckshot)"
desc = "A small box capable of holding seven shotgun shells."
icon_state = "buckshot_box"
/obj/item/storage/fancy/shell/update_icon_state()
icon_state = "open"
/obj/item/storage/box/buck/populate_contents()
for(var/I in 1 to 7)
new /obj/item/ammo_casing/shotgun/buckshot(src)
/obj/item/storage/fancy/shell/populate_contents()
if(!shell_type)
return
for(var/i in 1 to storage_slots)
new shell_type(src)
/obj/item/storage/box/dragonsbreath
name = "ammunition box (Dragonsbreath)"
desc = "A small box capable of holding seven shotgun shells."
icon_state = "dragonsbreath_box"
/obj/item/storage/fancy/shell/update_overlays()
. = ..()
var/list/cached_contents = contents
for(var/index in 1 to length(cached_contents))
var/obj/shell = cached_contents[index]
var/image/I = image(icon, src, initial(shell.icon_state))
I.pixel_x = 3 * (round((index - 1) / 2))
I.pixel_y = -4 * ((index + 1) % 2)
. += I
/obj/item/storage/box/dragonsbreath/populate_contents()
for(var/I in 1 to 7)
new /obj/item/ammo_casing/shotgun/incendiary/dragonsbreath(src)
. += "shell_box_front" // need to add another overlay to prevent from other overlays from showing on top
/obj/item/storage/box/stun
name = "ammunition box (Stun shells)"
desc = "A small box capable of holding seven shotgun shells."
icon_state = "stun_box"
/obj/item/storage/box/stun/populate_contents()
for(var/I in 1 to 7)
new /obj/item/ammo_casing/shotgun/stunslug(src)
/obj/item/storage/box/beanbag
name = "ammunition box (Beanbag shells)"
desc = "A small box capable of holding seven shotgun shells."
icon_state = "beanbag_box"
/obj/item/storage/box/beanbag/populate_contents()
for(var/I in 1 to 7)
new /obj/item/ammo_casing/shotgun/beanbag(src)
/obj/item/storage/box/rubbershot
name = "ammunition box (Rubbershot shells)"
desc = "A small box capable of holding seven shotgun shells."
icon_state = "rubbershot_box"
/obj/item/storage/box/rubbershot/populate_contents()
for(var/I in 1 to 7)
new /obj/item/ammo_casing/shotgun/rubbershot(src)
/obj/item/storage/box/tranquilizer
/obj/item/storage/fancy/shell/tranquilizer
name = "ammunition box (Tranquilizer darts)"
desc = "A small box capable of holding seven shotgun shells."
icon_state = "tranq_box"
icon_state = "tranqbox"
shell_type = /obj/item/ammo_casing/shotgun/tranquilizer
/obj/item/storage/box/tranquilizer/populate_contents()
for(var/I in 1 to 7)
new /obj/item/ammo_casing/shotgun/tranquilizer(src)
/obj/item/storage/fancy/shell/slug
name = "ammunition box (Slug)"
desc = "A small box capable of holding seven shotgun shells."
icon_state = "slugbox"
shell_type = /obj/item/ammo_casing/shotgun
/obj/item/storage/box/holy
/obj/item/storage/fancy/shell/buck
name = "ammunition box (Buckshot)"
desc = "A small box capable of holding seven shotgun shells."
icon_state = "buckbox"
shell_type = /obj/item/ammo_casing/shotgun/buckshot
/obj/item/storage/fancy/shell/dragonsbreath
name = "ammunition box (Dragonsbreath)"
desc = "A small box capable of holding seven shotgun shells."
icon_state = "dragonsbox"
shell_type = /obj/item/ammo_casing/shotgun/incendiary/dragonsbreath
/obj/item/storage/fancy/shell/stun
name = "ammunition box (Stun shells)"
desc = "A small box capable of holding seven shotgun shells."
icon_state = "stunbox"
shell_type = /obj/item/ammo_casing/shotgun/stunslug
/obj/item/storage/fancy/shell/beanbag
name = "ammunition box (Beanbag shells)"
desc = "A small box capable of holding seven shotgun shells."
icon_state = "beanbox"
shell_type = /obj/item/ammo_casing/shotgun/beanbag
/obj/item/storage/fancy/shell/rubbershot
name = "ammunition box (Rubbershot shells)"
desc = "A small box capable of holding seven shotgun shells."
icon_state = "rubberbox"
shell_type = /obj/item/ammo_casing/shotgun/rubbershot
/obj/item/storage/fancy/shell/holy
name = "ammunition box (Holy Water darts)"
desc = "A small box capable of holding seven shotgun shells."
icon_state = "hshell_box"
/obj/item/storage/box/holy/populate_contents()
for(var/I in 1 to 7)
new /obj/item/ammo_casing/shotgun/holy(src)
shell_type = /obj/item/ammo_casing/shotgun/holy
////////////////
/* Donk Boxes */