diff --git a/code/game/objects/items/toys.dm b/code/game/objects/items/toys.dm index a73a5f942e6..8d303919b41 100644 --- a/code/game/objects/items/toys.dm +++ b/code/game/objects/items/toys.dm @@ -1490,10 +1490,10 @@ icon = 'icons/obj/library.dmi' icon_state = "demonomicon" w_class = WEIGHT_CLASS_SMALL - var/cooldown = FALSE + COOLDOWN_DECLARE(cooldown) /obj/item/toy/codex_gigas/attack_self(mob/user) - if(cooldown) + if(!COOLDOWN_FINISHED(cooldown)) return user.visible_message( @@ -1511,15 +1511,12 @@ LAZYADD(messages, GLOB.lawlorify[LAW][devil.banish]) playsound(loc, 'sound/machines/click.ogg', 20, 1) - cooldown = TRUE + COOLDOWN_START(src, cooldown, 2 SECONDS) for(var/message in messages) - user.loc.visible_message("[bicon(src)] [message]") - sleep(10) + user.loc.visible_message(span_danger("[bicon(src)] [message]")) + sleep(1 SECONDS) - spawn(20) - cooldown = FALSE - return /obj/item/toy/owl diff --git a/code/modules/antagonists/devil/devil.dm b/code/modules/antagonists/devil/devil.dm index 9543d3e87da..fbd3efd5fd5 100644 --- a/code/modules/antagonists/devil/devil.dm +++ b/code/modules/antagonists/devil/devil.dm @@ -22,10 +22,11 @@ /obj/effect/proc_holder/spell/sintouch )) -/datum/antagonist/devil/can_be_owned(datum/mind/new_owner) - . = ..() - if(!ishuman(owner.current)) - return FALSE +/datum/antagonist/devil/Destroy(force) + rank = null + QDEL_NULL(soulsOwned) + + return ..() /datum/antagonist/devil/proc/add_soul(datum/mind/soul) if(soulsOwned.Find(soul)) @@ -86,8 +87,11 @@ /datum/antagonist/devil/proc/update_hud() var/mob/living/living = owner.current - if(living.hud_used?.devilsouldisplay) - living.hud_used.devilsouldisplay.update_counter(SOULVALUE) + + if(!living.hud_used?.devilsouldisplay) + living.hud_used.devilsouldisplay = new /atom/movable/screen/devil/soul_counter(null, living.hud_used.devilsouldisplay) + + living.hud_used?.devilsouldisplay.update_counter(SOULVALUE) /datum/antagonist/devil/proc/remove_hud() var/mob/living = owner.current @@ -117,7 +121,6 @@ if(!.) return FALSE - owner.current.hud_used = new /datum/hud/devil(owner.current, ui_style2icon(owner.current.client.prefs.UI_style)) truename = randomDevilName() ban = randomdevilban() bane = randomdevilbane() @@ -127,6 +130,7 @@ var/mob/living/carbon/human/human = owner.current human.store_memory("Your devilic true name is [truename]
[GLOB.lawlorify[LAW][ban]]
You may not use violence to coerce someone into selling their soul.
You may not directly and knowingly physically harm a devil, other than yourself.
[GLOB.lawlorify[LAW][bane]]
[GLOB.lawlorify[LAW][obligation]]
[GLOB.lawlorify[LAW][banish]]
") + update_hud() /datum/antagonist/devil/give_objectives() add_objective(/datum/objective/devil/ascend)