mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-27 23:27:34 +01:00
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:
@@ -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))
|
||||
|
||||
|
||||
Reference in New Issue
Block a user