Files
eebb8b971c Materials Repath (#22388)
Soft-ish port of https://github.com/NebulaSS13/Nebula/pull/540. Except
we call them singletons.

Repaths all materials as singletons instead of datums, and replaces
material defines from strings to paths so that we can just run
GET_SINGLETON instead of needing to use SSMaterials. This is Step One.

This PR has no player-facing changes.

changes:
  - refactor: "Repaths /material to /singleton/material."
- refactor: "Replaces all material string defines to path defines,
replacing SSmaterials procs w/ GET_SINGLETON instead."
- refactor: "Removes all material var edited objects from all maps,
adding new presets where necessary."
- refactor: "Updates recipes unit test to run all recipes against all
material singletons."

---------

Signed-off-by: Batrachophreno <Batrochophreno@gmail.com>
Co-authored-by: kano-dot <bhutanlikanoxy@gmail.com>
2026-07-10 18:45:58 +00:00

30 lines
1.1 KiB
Plaintext

/obj/item/material/twohanded/baseballbat
name = "bat"
desc = "HOME RUN!"
icon_state = "metalbat0"
base_icon = "metalbat"
item_state = "metalbat"
throwforce = 7
attack_verb = list("smashed", "beaten", "slammed", "smacked", "struck", "battered", "bonked")
default_material = MATERIAL_WOOD
force_divisor = 1.1 // 22 when wielded with weight 20 (steel)
unwielded_force_divisor = 0.7 // 15 when unwielded based on above.
slot_flags = SLOT_BACK
equip_sound = null
//Predefined materials go here.
/obj/item/material/twohanded/baseballbat/metal/Initialize(newloc, material_key)
. = ..(newloc, MATERIAL_STEEL)
/obj/item/material/twohanded/baseballbat/uranium/Initialize(newloc, material_key)
. = ..(newloc, MATERIAL_URANIUM)
/obj/item/material/twohanded/baseballbat/gold/Initialize(newloc, material_key)
. = ..(newloc, MATERIAL_GOLD)
/obj/item/material/twohanded/baseballbat/platinum/Initialize(newloc, material_key)
. = ..(newloc, MATERIAL_PLATINUM)
/obj/item/material/twohanded/baseballbat/diamond/Initialize(newloc, material_key)
. = ..(newloc, MATERIAL_DIAMOND)