mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-22 04:30:44 +01:00
## About The Pull Request As the title might imply: AMMO_BOX_FULL_EMPTY will now look for sprites with -full and -empty, rather than -[whatever the max ammo was] and -0 ## Why It's Good For The Game If a magazine is only going to have two states, that being having ammo and not having ammo, why do I have to fuck with finding the capacity of the magazine? On the other hand, why should anyone trying to change the ammo count of a magazine have to fuck with the sprite naming for what should otherwise just be a change of a var. ## Changelog 🆑 code: AMMO_BOX_FULL_EMPTY now looks for -full and -empty for sprites, rather than -[max ammo of that magazine] and -0 /🆑
24 lines
715 B
Plaintext
24 lines
715 B
Plaintext
/obj/item/ammo_box/magazine/m10mm/rifle
|
|
name = "rifle magazine (10mm)"
|
|
desc = "A well-worn magazine fitted for the surplus rifle."
|
|
icon_state = "75-full"
|
|
base_icon_state = "75"
|
|
ammo_type = /obj/item/ammo_casing/c10mm
|
|
max_ammo = 10
|
|
|
|
/obj/item/ammo_box/magazine/m10mm/rifle/update_icon_state()
|
|
. = ..()
|
|
icon_state = "[base_icon_state]-[ammo_count() ? "8" : "0"]"
|
|
|
|
/obj/item/ammo_box/magazine/m556
|
|
name = "toploader magazine (5.56mm)"
|
|
icon_state = "5.56m"
|
|
ammo_type = /obj/item/ammo_casing/a556
|
|
caliber = CALIBER_A556
|
|
max_ammo = 30
|
|
multiple_sprites = AMMO_BOX_FULL_EMPTY
|
|
|
|
/obj/item/ammo_box/magazine/m556/phasic
|
|
name = "toploader magazine (5.56mm Phasic)"
|
|
ammo_type = /obj/item/ammo_casing/a556/phasic
|