Skip to content

Commit

Permalink
bugfix: ash walker rituals fix (#6138)
Browse files Browse the repository at this point in the history
  • Loading branch information
Antoonij authored Nov 6, 2024
1 parent c610731 commit 700cf3f
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 9 deletions.
16 changes: 8 additions & 8 deletions code/datums/rituals.dm
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@
if(charges == 0)
return NONE

if(allowed_special_role && !is_type_in_list(invoker.mind?.special_role, allowed_special_role))
if(allowed_special_role && !LAZYIN(allowed_special_role, invoker.mind?.special_role))
return RITUAL_FAILED_INVALID_SPECIAL_ROLE

if(allowed_species && !is_type_in_list(invoker.dna.species, allowed_species)) // double check to avoid funny situations
Expand All @@ -151,14 +151,14 @@

/datum/ritual/proc/cast(mob/living/carbon/human/invoker)
. = TRUE
LAZYADD(invokers, invoker)

for(var/mob/living/carbon/human/human as anything in invokers)
var/list/invokers_list = invokers.Copy() // create temp list to avoid funny situations
LAZYADD(invokers_list, invoker)

for(var/mob/living/carbon/human/human as anything in invokers_list)
if(!do_after(human, cast_time, ritual_object, extra_checks = CALLBACK(src, PROC_REF(action_check_contents))))
. = FALSE

LAZYREMOVE(invokers, invoker)

return .

/datum/ritual/proc/check_invokers(mob/living/carbon/human/invoker)
Expand All @@ -172,7 +172,7 @@
if(require_allowed_species && !is_type_in_list(human.dna.species, allowed_species))
continue

if(require_allowed_special_role && !is_type_in_list(human.mind?.special_role, allowed_special_role))
if(require_allowed_special_role && !LAZYIN(allowed_special_role, human.mind?.special_role))
continue

LAZYADD(invokers, human)
Expand Down Expand Up @@ -204,7 +204,7 @@
if(obj == ritual_object)
continue

if(locate(obj) in invokers)
if(LAZYIN(invokers, obj))
continue

LAZYADD(atoms, obj)
Expand All @@ -222,7 +222,7 @@

if(isstack(atom))
var/obj/item/stack/picked_stack = atom
LAZYREMOVE(requirements[req_type], picked_stack.amount)
requirements[req_type] -= picked_stack.amount
else
requirements[req_type]--

Expand Down
13 changes: 12 additions & 1 deletion code/game/objects/effects/decals/Cleanable/misc.dm
Original file line number Diff line number Diff line change
Expand Up @@ -262,11 +262,22 @@
name = "Ash rune"
desc = "A rune drawn in ash."
icon = 'icons/effects/ashwalker_rune.dmi'
icon_state = "AshRuneFilled"
icon_state = "AshRuneSmall"
anchored = TRUE
mergeable_decal = FALSE
mouse_opacity = MOUSE_OPACITY_ICON

/obj/effect/decal/cleanable/ashrune/Initialize(mapload)
. = ..()

update_icon(UPDATE_ICON_STATE)

pixel_x = -32
pixel_y = -32

/obj/effect/decal/cleanable/ashrune/update_icon_state()
icon_state = "AshRuneFilled"

/obj/effect/decal/cleanable/ashrune/ComponentInitialize()
AddComponent( \
/datum/component/ritual_object, \
Expand Down
Binary file modified icons/effects/ashwalker_rune.dmi
Binary file not shown.

0 comments on commit 700cf3f

Please sign in to comment.