Skip to content

Commit

Permalink
Fix for dummy rotation in character setup. (#3699)
Browse files Browse the repository at this point in the history
# About the pull request

Followup to #3516. That PR changed the general click behaviour from `if
(click(A, mods) | A.clicked(src, mods, location, params))` to use `||`
instead. And in Byond, that means quick resolution: if left side is
true, then right side is not evaluated - thus not executed - at all. ~~I
am not sure what exactly was that meant to address (or whether it was
intentional at all, for that matter),~~ but as it happens,
`/mob/new_player/click()` is set to always simply return true while all
the code for those arrows is in their `clicked()`. Solution is obvious
then.

P.S. On second thought, reading the PR does explain the PR. But quick
resolution is not exactly intuitive, and even though it is probably
highly unlikely to ever change, there is probably no need to rely on it
so implicitly. While I have the file open anyway, might as well make
returning after the left half alone explicit.

# Explain why it's good for the game

Is fix.

# Changelog
:cl:
fix: Preview dummy in character setup once again can be rotated.
/:cl:
  • Loading branch information
Segrain authored Jun 24, 2023
1 parent 76533de commit 71455d4
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 3 additions & 1 deletion code/_onclick/click.dm
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,9 @@
return

// Click handled elsewhere. (These clicks are not affected by the next_move cooldown)
if (click(A, mods) || A.clicked(src, mods, location, params))
if(click(A, mods))
return
if(A.clicked(src, mods, location, params))
return

// Default click functions from here on.
Expand Down
2 changes: 1 addition & 1 deletion code/_onclick/other_mobs.dm
Original file line number Diff line number Diff line change
Expand Up @@ -34,4 +34,4 @@
Have no reason to click on anything at all.
*/
/mob/new_player/click()
return 1
return

0 comments on commit 71455d4

Please sign in to comment.