mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2025-12-15 20:22:07 +00:00
## About The Pull Request moves all implementations (im aware of) for "Im a parent type dont spawn me please" to the datum layer to standardized behavior adds a standerized proc for filtering out "bad" items that we dont want spawning. applies to it the subtype vendor, gifts, and a new spawner and mystery box for a random gun (neither playerfacing) "port" of https://github.com/shiptest-ss13/Shiptest/pull/4621 https://github.com/user-attachments/assets/22f6f0b2-b44e-411a-b3dc-6b97dc0287aa small warning: I dont have EVERY abstract type defined right now but, ive done a good enough job for now. Im tired of data entry rn ## Why It's Good For The Game standardizing behavior. Might be a micro hit to performance however having this lets us not rely on icon state to determine whether something is a parent type and makes it much easier to tell something is a parent type (could be applied further to things like admin spawning menus and things like that). need feedback on if this is actually good for the game. ## Changelog 🆑 add: Soda cans show up in the silver slime drink table. add: Examine tag for items that are not mean to show up ingame. refactor: Standardizes how gifts rule out abstract types. fix: gifts no longer check if something has an inhand, massively expanding the list of potential items. /🆑
74 lines
2.3 KiB
Plaintext
74 lines
2.3 KiB
Plaintext
/obj/item/ammo_box/magazine/toy
|
|
name = "foam force META magazine"
|
|
desc = "A magazine specifically designed for foam force \"firearms\". Probably not great for actually killing your fellow spaceman."
|
|
abstract_type = /obj/item/ammo_box/magazine/toy
|
|
ammo_type = /obj/item/ammo_casing/foam_dart
|
|
caliber = CALIBER_FOAM
|
|
|
|
/obj/item/ammo_box/magazine/toy/smg
|
|
name = "foam force SMG magazine"
|
|
icon_state = "smg9mm"
|
|
base_icon_state = "smg9mm"
|
|
ammo_type = /obj/item/ammo_casing/foam_dart
|
|
max_ammo = 20
|
|
|
|
/obj/item/ammo_box/magazine/toy/smg/update_icon_state()
|
|
. = ..()
|
|
icon_state = "[base_icon_state]-[LAZYLEN(stored_ammo) ? "full" : "empty"]"
|
|
|
|
/obj/item/ammo_box/magazine/toy/smg/riot
|
|
ammo_type = /obj/item/ammo_casing/foam_dart/riot
|
|
|
|
/obj/item/ammo_box/magazine/toy/pistol
|
|
name = "foam force pistol magazine"
|
|
icon_state = "9x19p"
|
|
max_ammo = 12
|
|
multiple_sprites = AMMO_BOX_FULL_EMPTY
|
|
|
|
/obj/item/ammo_box/magazine/toy/pistol/riot
|
|
ammo_type = /obj/item/ammo_casing/foam_dart/riot
|
|
|
|
/obj/item/ammo_box/magazine/toy/smgm45
|
|
name = "donksoft SMG magazine"
|
|
icon_state = "c20r45-toy"
|
|
base_icon_state = "c20r45-toy"
|
|
caliber = CALIBER_FOAM
|
|
ammo_type = /obj/item/ammo_casing/foam_dart
|
|
max_ammo = 20
|
|
|
|
/obj/item/ammo_box/magazine/toy/smgm45/update_icon_state()
|
|
. = ..()
|
|
icon_state = "[base_icon_state]-base"
|
|
|
|
/obj/item/ammo_box/magazine/toy/smgm45/update_overlays()
|
|
. = ..()
|
|
if(!LAZYLEN(stored_ammo))
|
|
return
|
|
for(var/i in 1 to stored_ammo.len)
|
|
var/round_number = round(i, 2) //i meant the number of the round in the magazine, but i guess it's a round number too lol.
|
|
if(round_number == i) //only count odd numbers.
|
|
continue
|
|
var/obj/item/ammo_casing/foam_dart/boolet = stored_ammo[i]
|
|
. += "c20r45-foam-[boolet::tip_color]-[round_number]"
|
|
|
|
|
|
/obj/item/ammo_box/magazine/toy/smgm45/riot
|
|
icon_state = "c20r45-riot"
|
|
base_icon_state = "c20r45-riot"
|
|
ammo_type = /obj/item/ammo_casing/foam_dart/riot
|
|
|
|
/obj/item/ammo_box/magazine/toy/m762
|
|
name = "donksoft box magazine"
|
|
icon_state = "a7mm-toy"
|
|
base_icon_state = "a7mm"
|
|
ammo_type = /obj/item/ammo_casing/foam_dart
|
|
max_ammo = 50
|
|
|
|
/obj/item/ammo_box/magazine/toy/m762/update_icon_state()
|
|
. = ..()
|
|
icon_state = "[base_icon_state]-[round(ammo_count(), 10)]"
|
|
|
|
/obj/item/ammo_box/magazine/toy/m762/riot
|
|
icon_state = "a7mm-riot"
|
|
ammo_type = /obj/item/ammo_casing/foam_dart/riot
|