mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-30 16:47:13 +01:00
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:
@@ -201,16 +201,7 @@
|
||||
|
||||
/datum/outfit/consumed_golem/pre_equip(mob/living/carbon/human/golem, visualsOnly = FALSE)
|
||||
if(!visualsOnly)
|
||||
golem.set_species(pick(
|
||||
/datum/species/golem/adamantine,
|
||||
/datum/species/golem/diamond,
|
||||
/datum/species/golem/gold,
|
||||
/datum/species/golem/plasma,
|
||||
/datum/species/golem/plasteel,
|
||||
/datum/species/golem/plastitanium,
|
||||
/datum/species/golem/silver,
|
||||
/datum/species/golem/titanium,
|
||||
))
|
||||
golem.set_species(/datum/species/golem)
|
||||
if(prob(30))
|
||||
glasses = pick_weight(list(
|
||||
/obj/item/clothing/glasses/hud/diagnostic = 2,
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
name = "inert free golem shell"
|
||||
desc = "A humanoid shape, empty, lifeless, and full of potential."
|
||||
icon = 'icons/obj/wizard.dmi'
|
||||
icon_state = "construct"
|
||||
icon_state = "shell_complete"
|
||||
mob_species = /datum/species/golem
|
||||
anchored = FALSE
|
||||
move_resist = MOVE_FORCE_NORMAL
|
||||
@@ -15,22 +15,20 @@
|
||||
you_are_text = "You are a Free Golem. Your family worships The Liberator."
|
||||
flavour_text = "In his infinite and divine wisdom, he set your clan free to travel the stars with a single declaration: \"Yeah go do whatever.\""
|
||||
spawner_job_path = /datum/job/free_golem
|
||||
/// If TRUE, other golems can touch us to swap into this shell.
|
||||
var/can_transfer = TRUE
|
||||
/// Weakref to the creator of this golem shell.
|
||||
var/datum/weakref/owner_ref
|
||||
/// Typepath to a material to feed to the golem as soon as it is built
|
||||
var/initial_type
|
||||
|
||||
/obj/effect/mob_spawn/ghost_role/human/golem/Initialize(mapload, datum/species/golem/species, mob/creator)
|
||||
/obj/effect/mob_spawn/ghost_role/human/golem/Initialize(mapload, mob/creator, made_of)
|
||||
if(creator)
|
||||
name = "inert servant golem shell"
|
||||
prompt_name = "servant golem"
|
||||
if(species) //spawners list uses object name to register so this goes before ..()
|
||||
name += " ([initial(species.prefix)])"
|
||||
mob_species = species
|
||||
initial_type = made_of
|
||||
. = ..()
|
||||
var/area/init_area = get_area(src)
|
||||
if(!mapload && init_area)
|
||||
notify_ghosts("\A [initial(species.prefix)] golem shell has been completed in \the [init_area.name].", source = src, action=NOTIFY_ATTACK, flashwindow = FALSE, ignore_key = POLL_IGNORE_GOLEM)
|
||||
notify_ghosts("\A golem shell has been completed in \the [init_area.name].", source = src, action=NOTIFY_ATTACK, flashwindow = FALSE, ignore_key = POLL_IGNORE_GOLEM)
|
||||
if(creator)
|
||||
you_are_text = "You are a golem."
|
||||
flavour_text = "You move slowly, but are highly resistant to heat and cold as well as blunt trauma. You are unable to wear clothes, but can still use most tools."
|
||||
@@ -40,31 +38,35 @@
|
||||
|
||||
|
||||
/obj/effect/mob_spawn/ghost_role/human/golem/name_mob(mob/living/spawned_mob, forced_name)
|
||||
if(!forced_name)
|
||||
var/datum/species/golem/golem_species = mob_species
|
||||
if(owner_ref?.resolve())
|
||||
forced_name = "[initial(golem_species.prefix)] Golem ([rand(1,999)])"
|
||||
else
|
||||
golem_species = new mob_species
|
||||
forced_name = golem_species.random_name()
|
||||
if(forced_name || !iscarbon(spawned_mob))
|
||||
return ..()
|
||||
|
||||
if(owner_ref?.resolve())
|
||||
forced_name = "Golem ([rand(1,999)])"
|
||||
return ..()
|
||||
|
||||
var/datum/species/golem/golem_species = new()
|
||||
forced_name = golem_species.random_name()
|
||||
return ..()
|
||||
|
||||
/obj/effect/mob_spawn/ghost_role/human/golem/special(mob/living/new_spawn, mob/mob_possessor)
|
||||
. = ..()
|
||||
if(is_path_in_list(initial_type, GLOB.golem_stack_food_directory))
|
||||
var/datum/golem_food_buff/initial_buff = GLOB.golem_stack_food_directory[initial_type]
|
||||
initial_buff.apply_effects(new_spawn)
|
||||
|
||||
var/mob/living/real_owner = owner_ref?.resolve()
|
||||
var/datum/species/golem/golem_species = mob_species
|
||||
to_chat(new_spawn, "[initial(golem_species.info_text)]")
|
||||
if(isnull(real_owner))
|
||||
if(!is_station_level(new_spawn.z))
|
||||
to_chat(new_spawn, "Build golem shells in the autolathe, and feed refined mineral sheets to the shells to bring them to life! \
|
||||
You are generally a peaceful group unless provoked.")
|
||||
try_keep_home(new_spawn)
|
||||
|
||||
new_spawn.log_message("possessed a free golem shell.", LOG_GAME)
|
||||
log_admin("[key_name(new_spawn)] possessed a free golem shell.")
|
||||
|
||||
else if(new_spawn.mind)
|
||||
new_spawn.mind.enslave_mind_to_creator(real_owner)
|
||||
|
||||
else
|
||||
stack_trace("[type] created a golem without a mind.")
|
||||
|
||||
@@ -78,32 +80,6 @@
|
||||
ADD_TRAIT(new_spawn, TRAIT_FORBID_MINING_SHUTTLE_CONSOLE_OUTSIDE_STATION, INNATE_TRAIT)
|
||||
new_spawn.AddComponent(/datum/component/hazard_area, area_whitelist = allowed_areas)
|
||||
|
||||
/obj/effect/mob_spawn/ghost_role/human/golem/attack_hand(mob/user, list/modifiers)
|
||||
. = ..()
|
||||
if(.)
|
||||
return
|
||||
if(!isgolem(user) || !can_transfer)
|
||||
return
|
||||
|
||||
var/mob/living/carbon/human/golem = user
|
||||
var/transfer_choice = tgui_alert(usr, "Transfer your soul to [src]? (Warning, your old body will die!)",,list("Yes","No"))
|
||||
if(transfer_choice != "Yes")
|
||||
return
|
||||
if(QDELETED(src) || uses <= 0)
|
||||
return
|
||||
uses -= 1
|
||||
golem.log_message("golem-swapped into [src].", LOG_GAME)
|
||||
golem.visible_message(
|
||||
span_notice("A faint light leaves [golem], moving to [src] and animating it!"),
|
||||
span_notice("You leave your old body behind, and transfer into [src]!"),
|
||||
)
|
||||
show_flavor = FALSE
|
||||
var/mob/living/carbon/human/newgolem = create(user, golem.real_name)
|
||||
golem.transfer_quirk_datums(newgolem)
|
||||
golem.death()
|
||||
check_uses()
|
||||
return TRUE
|
||||
|
||||
/obj/effect/mob_spawn/ghost_role/human/golem/servant
|
||||
name = "inert servant golem shell"
|
||||
prompt_name = "servant golem"
|
||||
@@ -112,5 +88,11 @@
|
||||
name = "dust-caked free golem shell"
|
||||
desc = "A humanoid shape, empty, lifeless, and full of potential."
|
||||
prompt_name = "free golem"
|
||||
can_transfer = FALSE
|
||||
mob_species = /datum/species/golem/adamantine
|
||||
|
||||
/obj/effect/mob_spawn/ghost_role/human/golem/adamantine/special(mob/living/new_spawn, mob/mob_possessor)
|
||||
. = ..()
|
||||
if(!ishuman(new_spawn))
|
||||
return
|
||||
var/mob/living/carbon/human/new_golem = new_spawn
|
||||
var/obj/item/organ/internal/vocal_cords/adamantine/free_golem_radio = new()
|
||||
free_golem_radio.Insert(new_golem)
|
||||
|
||||
Reference in New Issue
Block a user