Skip to content

Commit

Permalink
[CycleActors] idx and idx and idx (0.1.3)
Browse files Browse the repository at this point in the history
  • Loading branch information
petzku committed Sep 6, 2024
1 parent 81d8a57 commit 8b503ad
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions macros/petzku.CycleActors.moon
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

export script_name = "Cycle actor field"
export script_namespace = "petzku.CycleActors"
export script_version = "0.1.2"
export script_version = "0.1.3"



Expand Down Expand Up @@ -34,7 +34,7 @@ cycle_back = (sub, sel) ->
actors, index = collect_actors sub, sel[1]-1
firstline = sub[sel[1]]
idx = index[firstline.actor]
idx = idx > 1 and idx or #actors+1
idx = idx and idx > 1 and idx or #actors+1
newact = actors[idx - 1]
set_actors newact, sub, sel

Expand Down

0 comments on commit 8b503ad

Please sign in to comment.