mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-22 12:41:09 +01:00
[MIRROR] Spirit holding component won't let you awaken another spirit until it's done [MDB IGNORE] (#9270)
* Spirit holding component won't let you awaken another spirit until it's done (#62340) * Spirit holding component won't let you awaken another spirit until it's done Co-authored-by: John Willard <53777086+JohnFulpWillard@users.noreply.github.com>
This commit is contained in:
co-authored by
John Willard
parent
eaae39ae1c
commit
ebf08178ac
@@ -57,12 +57,15 @@
|
||||
attempting_awakening = TRUE
|
||||
to_chat(awakener, span_notice("You attempt to wake the spirit of [parent]..."))
|
||||
|
||||
var/list/candidates = poll_ghost_candidates("Do you want to play as the spirit of [awakener.real_name]'s blade?", ROLE_PAI, FALSE, 100, POLL_IGNORE_POSSESSED_BLADE)
|
||||
var/mob/dead/observer/candidates = poll_ghost_candidates("Do you want to play as the spirit of [awakener.real_name]'s blade?", ROLE_PAI, FALSE, 100, POLL_IGNORE_POSSESSED_BLADE)
|
||||
if(!LAZYLEN(candidates))
|
||||
to_chat(awakener, span_warning("[parent] is dormant. Maybe you can try again later."))
|
||||
attempting_awakening = FALSE
|
||||
return
|
||||
|
||||
//Immediately unregister to prevent making a new spirit
|
||||
UnregisterSignal(parent, COMSIG_ITEM_ATTACK_SELF)
|
||||
|
||||
var/mob/dead/observer/chosen_spirit = pick(candidates)
|
||||
bound_spirit = new(parent)
|
||||
bound_spirit.ckey = chosen_spirit.ckey
|
||||
@@ -76,11 +79,10 @@
|
||||
parent = input
|
||||
bound_spirit.fully_replace_character_name(null, "The spirit of [input]")
|
||||
|
||||
//prevents awakening it again + new signals for a now-possessed item
|
||||
attempting_awakening = FALSE
|
||||
UnregisterSignal(parent, COMSIG_ITEM_ATTACK_SELF)
|
||||
//Add new signals for parent and stop attempting to awaken
|
||||
RegisterSignal(parent, COMSIG_ATOM_RELAYMOVE, .proc/block_buckle_message)
|
||||
RegisterSignal(parent, COMSIG_BIBLE_SMACKED, .proc/on_bible_smacked)
|
||||
attempting_awakening = FALSE
|
||||
|
||||
///signal fired from a mob moving inside the parent
|
||||
/datum/component/spirit_holding/proc/block_buckle_message(datum/source, mob/living/user, direction)
|
||||
|
||||
Reference in New Issue
Block a user