Skip to content

Commit

Permalink
bugfixes + rewrite toy gigas
Browse files Browse the repository at this point in the history
  • Loading branch information
Antoonij authored Sep 27, 2024
1 parent fc370ce commit 806c3f2
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 15 deletions.
13 changes: 5 additions & 8 deletions code/game/objects/items/toys.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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))

Check failure on line 1496 in code/game/objects/items/toys.dm

View workflow job for this annotation

GitHub Actions / Run Linters

wrong number of arguments to macro call

Check failure on line 1496 in code/game/objects/items/toys.dm

View workflow job for this annotation

GitHub Actions / Run Linters

got ')', expected one of: operator, term
return

user.visible_message(
Expand All @@ -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("<span class='danger'>[bicon(src)] [message]</span>")
sleep(10)
user.loc.visible_message(span_danger("[bicon(src)] [message]"))
sleep(1 SECONDS)

spawn(20)
cooldown = FALSE

return

/obj/item/toy/owl
Expand Down
18 changes: 11 additions & 7 deletions code/modules/antagonists/devil/devil.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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()
Expand All @@ -127,6 +130,7 @@

var/mob/living/carbon/human/human = owner.current
human.store_memory("Your devilic true name is [truename]<br>[GLOB.lawlorify[LAW][ban]]<br>You may not use violence to coerce someone into selling their soul.<br>You may not directly and knowingly physically harm a devil, other than yourself.<br>[GLOB.lawlorify[LAW][bane]]<br>[GLOB.lawlorify[LAW][obligation]]<br>[GLOB.lawlorify[LAW][banish]]<br>")
update_hud()

/datum/antagonist/devil/give_objectives()
add_objective(/datum/objective/devil/ascend)
Expand Down

0 comments on commit 806c3f2

Please sign in to comment.