mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-07-13 17:14:47 +01:00
0b0c5ea91e
## About The Pull Request Extends the part of the crafting unit test that ensures consistency between the total mats of the components of a recipe (or rather, the result of said recipe) and a generic instance of the same type as its result, previously only implemented on food recipes. ## Why It's Good For The Game This ensures a degree of consistency with the material composition of various objects in the game. I couldn't do it in the original PR as that one was too big already and it took months to get it merged, and have the relative bugs fixed. Currently a WIP as I slowly deal with the unit test reports. ## Changelog 🆑 refactor: Follow-up to the crafting/material refactor from months ago. All objects crafted with stacks now inherit their mat composition (not necessarily the effects and color) by default, while previously only a few things like chair, sinks and toilets did. Report any object looking or behaving weirdly as a result. fix: The material composition of ammo boxes is no longer a 1/10 of what it's supposed to be. It was a shitty hack to make it harder to recycle empty ammo boxes. Instead, they lose materials as they're emptied now. /🆑
78 lines
2.9 KiB
Plaintext
78 lines
2.9 KiB
Plaintext
/obj/item/stack/cannonball
|
|
name = "cannonballs"
|
|
desc = "A stack of heavy plasteel cannonballs. Gunnery for the space age!"
|
|
icon_state = "cannonballs"
|
|
base_icon_state = "cannonballs"
|
|
max_amount = 14
|
|
singular_name = "cannonball"
|
|
merge_type = /obj/item/stack/cannonball
|
|
throwforce = 10
|
|
obj_flags = CONDUCTS_ELECTRICITY
|
|
custom_materials = list(/datum/material/alloy/plasteel=SHEET_MATERIAL_AMOUNT)
|
|
resistance_flags = FIRE_PROOF
|
|
throw_speed = 5
|
|
throw_range = 3
|
|
///the type of projectile this type of cannonball item turns into.
|
|
var/obj/projectile/projectile_type = /obj/projectile/bullet/cannonball
|
|
|
|
/obj/item/stack/cannonball/update_icon_state()
|
|
. = ..()
|
|
icon_state = (amount == 1) ? "[base_icon_state]" : "[base_icon_state]_[min(amount, 14)]"
|
|
|
|
/obj/item/stack/cannonball/fourteen
|
|
amount = 14
|
|
|
|
/obj/item/stack/cannonball/four
|
|
amount = 4
|
|
|
|
/obj/item/stack/cannonball/shellball
|
|
name = "explosive shellballs"
|
|
singular_name = "explosive shellball"
|
|
desc = "An explosive anti-materiel and counter-battery projectile cannonball. Makes great work out of any wall, for easy entrances."
|
|
color = COLOR_RED
|
|
merge_type = /obj/item/stack/cannonball/shellball
|
|
projectile_type = /obj/projectile/bullet/cannonball/explosive
|
|
|
|
/obj/item/stack/cannonball/shellball/seven
|
|
amount = 7
|
|
|
|
/obj/item/stack/cannonball/shellball/fourteen
|
|
amount = 14
|
|
|
|
/obj/item/stack/cannonball/emp
|
|
name = "malfunction shots"
|
|
singular_name = "malfunction shot"
|
|
icon_state = "emp_cannonballs"
|
|
base_icon_state = "emp_cannonballs"
|
|
desc = "A shot filled with two chambers that combine on impact, creating a chemical EMP. What does any of that mean? Who knows. Modern piracy really lost its soul with these newfangled things."
|
|
max_amount = 4
|
|
merge_type = /obj/item/stack/cannonball/emp
|
|
projectile_type = /obj/projectile/bullet/cannonball/emp
|
|
|
|
/obj/item/stack/cannonball/the_big_one
|
|
name = "\"The Biggest Ones\""
|
|
singular_name = "\"The Biggest One\""
|
|
desc = "An insane amount of explosives jammed into a massive cannonball. The last cannonball you'll ever fire in a fight, mostly because there'll be nothing left to shoot at afterwards."
|
|
max_amount = 5
|
|
icon_state = "biggest_cannonballs"
|
|
base_icon_state = "biggest_cannonballs"
|
|
merge_type = /obj/item/stack/cannonball/the_big_one
|
|
projectile_type = /obj/projectile/bullet/cannonball/biggest_one
|
|
|
|
/obj/item/stack/cannonball/the_big_one/five
|
|
amount = 5
|
|
|
|
/obj/item/stack/cannonball/trashball
|
|
name = "trashballs"
|
|
singular_name = "trashball"
|
|
desc = "A clump of tightly packed garbage. It'll work as a cannonball, but it may be unhealthy to actually put this in a real cannon."
|
|
max_amount = 4
|
|
icon_state = "trashballs"
|
|
base_icon_state = "trashballs"
|
|
merge_type = /obj/item/stack/cannonball/trashball
|
|
projectile_type = /obj/projectile/bullet/cannonball/trashball
|
|
custom_materials = list(/datum/material/alloy/plasteel = SHEET_MATERIAL_AMOUNT)
|
|
|
|
/obj/item/stack/cannonball/trashball/four
|
|
amount = 4
|