Fixes human skeleton pirates, Refactors ghost spawns (#94138)

## About The Pull Request

`create_from_ghost` can be called from stuff like... dynamic executing a
ruleset, so putting a sleep/user input within it causes problems

So I refactored ghost spawns a fair bit, creating a clear delineation
between where you can and can't put user input

## Changelog

🆑 Melbert
fix: Pirates will no longer randomly spawn as human
fix: Servant Golems have numbered names again
refactor: Refactored ghost spawns (like spider eggs or pirate spawners),
report any oddities
/🆑
This commit is contained in:
MrMelbert
2025-11-25 19:52:19 -07:00
committed by GitHub
parent b27cd12a06
commit 5765f259ef
23 changed files with 177 additions and 152 deletions
+12 -2
View File
@@ -503,13 +503,23 @@ GLOBAL_LIST_EMPTY(preferences_datums)
apply_character_randomization_prefs(is_antag)
apply_prefs_to(character, icon_updates)
/// Applies the given preferences to a human mob.
/datum/preferences/proc/apply_prefs_to(mob/living/carbon/human/character, icon_updates = TRUE)
/**
* Applies the given preferences to a human mob.
*
* Arguments:
* * character - The human mob to apply the preferences to
* * icon_updates - Whether to update the mob's icons after applying preferences.
* Is often skipped to save processing when an update will happen later anyway.
* * do_not_apply - A list of preference types to skip when applying preferences.
*/
/datum/preferences/proc/apply_prefs_to(mob/living/carbon/human/character, icon_updates = TRUE, list/do_not_apply)
character.dna.features = list()
for (var/datum/preference/preference as anything in get_preferences_in_priority_order())
if (preference.savefile_identifier != PREFERENCE_CHARACTER)
continue
if (preference.type in do_not_apply)
continue
preference.apply_to_human(character, read_preference(preference.type))