Golem Rework (#74197)

This PR implements this design document:
https://hackmd.io/@Y6uzGFDGSXKRaWDNicSiEg/BkRr176st
Put briefly, this will remove every existing golem subtype and
consolidate golems into a single species with cool new sprites.
NOT implemented from that PR is the ability to eat Telecrystals, I
couldn't come up with an appropriate visual that can stack with the
existing ones, but that should be a reasonably trivial add for a future
artist & developer.

New Golems have a food-based mechanic where their hunger decays pretty
quickly and can only be replenished by eating minerals. They start
moving slower as they get hungrier, until eventually they become
completely immobilised and need to be rescued.
Eating different kinds of minerals will visually change your sprite and
give you a special effect in a similar way to old golems, but temporary.
While transformed, you can't eat any other kind of mineral which would
transform you (but can still consume glass).
To see the full list of effects, look at the hackmd above.

In service of these sprites working I have refactored the
`species/offset_features` feature by killing it and delegating that
responsibility to limbs instead. Rather than applying an offset to items
due to your species, it is due to your weird head or arms. This makes
overall more sense to me, but it inflates the code changes in this PR
somewhat.
It doesn't make a lot of sense to atomise unfortunately because that
code also seemed to be entirely unused until I tried to use it in this
PR, so you wouldn't be able to tell if my changes broke anything. I
might make a downstream sad by doing this.

All of the actual numbers in this PR are made up and only loosely
tested, it will need some testmerges to gather feedback about whether it
sucks or not.

Other relevant changes:
I reworked how bioscrambling works based off bodypart bodytypes, to
automatically exclude golem limbs in either direction. There's really no
way to have those work on humans or vice versa. Organs still fly though.
This commit is contained in:
Jacquerel
2023-05-07 22:45:20 +00:00
committed by GitHub
parent 4d8ed76abb
commit 1a918a2e14
111 changed files with 2608 additions and 2950 deletions
@@ -32,57 +32,33 @@
/obj/item/golem_shell
name = "incomplete free golem shell"
icon = 'icons/obj/wizard.dmi'
icon_state = "construct"
desc = "The incomplete body of a golem. Add ten sheets of any mineral to finish."
icon_state = "shell_unfinished"
desc = "The incomplete body of a golem. Add ten sheets of certain minerals to finish."
w_class = WEIGHT_CLASS_BULKY
/// Amount of minerals you need to feed the shell to wake it up
var/required_stacks = 10
/// Type of shell to create
var/shell_type = /obj/effect/mob_spawn/ghost_role/human/golem
/obj/item/golem_shell/attackby(obj/item/I, mob/user, params)
/obj/item/golem_shell/attackby(obj/item/potential_food, mob/user, params)
. = ..()
var/static/list/golem_shell_species_types = list(
/obj/item/stack/sheet/iron = /datum/species/golem,
/obj/item/stack/sheet/glass = /datum/species/golem/glass,
/obj/item/stack/sheet/plasteel = /datum/species/golem/plasteel,
/obj/item/stack/sheet/mineral/sandstone = /datum/species/golem/sand,
/obj/item/stack/sheet/mineral/plasma = /datum/species/golem/plasma,
/obj/item/stack/sheet/mineral/diamond = /datum/species/golem/diamond,
/obj/item/stack/sheet/mineral/gold = /datum/species/golem/gold,
/obj/item/stack/sheet/mineral/silver = /datum/species/golem/silver,
/obj/item/stack/sheet/mineral/uranium = /datum/species/golem/uranium,
/obj/item/stack/sheet/mineral/bananium = /datum/species/golem/bananium,
/obj/item/stack/sheet/mineral/titanium = /datum/species/golem/titanium,
/obj/item/stack/sheet/mineral/plastitanium = /datum/species/golem/plastitanium,
/obj/item/stack/sheet/mineral/abductor = /datum/species/golem/alloy,
/obj/item/stack/sheet/mineral/wood = /datum/species/golem/wood,
/obj/item/stack/sheet/bluespace_crystal = /datum/species/golem/bluespace,
/obj/item/stack/sheet/runed_metal = /datum/species/golem/runic,
/obj/item/stack/medical/gauze = /datum/species/golem/cloth,
/obj/item/stack/sheet/cloth = /datum/species/golem/cloth,
/obj/item/stack/sheet/mineral/adamantine = /datum/species/golem/adamantine,
/obj/item/stack/sheet/plastic = /datum/species/golem/plastic,
/obj/item/stack/sheet/bronze = /datum/species/golem/bronze,
/obj/item/stack/sheet/cardboard = /datum/species/golem/cardboard,
/obj/item/stack/sheet/leather = /datum/species/golem/leather,
/obj/item/stack/sheet/bone = /datum/species/golem/bone,
/obj/item/stack/sheet/durathread = /datum/species/golem/durathread,
/obj/item/stack/sheet/cotton/durathread = /datum/species/golem/durathread,
/obj/item/stack/sheet/mineral/snow = /datum/species/golem/snow,
/obj/item/stack/sheet/mineral/metal_hydrogen= /datum/species/golem/mhydrogen,
)
if(!isstack(I))
if(!isstack(potential_food))
balloon_alert(user, "not a mineral!")
return
var/obj/item/stack/stuff_stack = I
var/species = golem_shell_species_types[stuff_stack.merge_type]
if(!species)
to_chat(user, span_warning("You can't build a golem out of this kind of material!"))
var/obj/item/stack/stack_food = potential_food
var/stack_type = stack_food.merge_type
if (!is_path_in_list(stack_type, GLOB.golem_stack_food_directory))
balloon_alert(user, "incompatible mineral!")
return
if(!stuff_stack.use(10))
to_chat(user, span_warning("You need at least ten sheets to finish a golem!"))
if(stack_food.amount < required_stacks)
balloon_alert(user, "not enough minerals!")
return
to_chat(user, span_notice("You finish up the golem shell with ten sheets of [stuff_stack]."))
new shell_type(get_turf(src), species, user)
if(!do_after(user, delay = 4 SECONDS, target = src))
return
if(!stack_food.use(required_stacks))
balloon_alert(user, "not enough minerals!")
return
new shell_type(get_turf(src), /* creator = */ user, /* made_of = */ stack_type)
qdel(src)
///made with xenobiology, the golem obeys its creator