ID:2449484
 
Resolved
Setting an atom's mouse pointer vars to one of the built-in values did not work at runtime.
BYOND Version:512
Operating System:Windows 7 Ultimate 64-bit
Web Browser:Firefox 66.0
Applies to:Dream Daemon
Status: Resolved (512.1467)

This issue has been resolved.
Descriptive Problem Summary:

The mouse_drag_pointer variable cannot be set to MOUSE_ACTIVE_POINTER at runtime, only at compile time.

Code Snippet (if applicable) to Reproduce Problem:
/mob/verb/Pointer()
var/desired = prob(50) ? MOUSE_INACTIVE_POINTER : MOUSE_ACTIVE_POINTER
mouse_drag_pointer = desired
src << "desired = [desired], pointer = [json_encode(mouse_drag_pointer)]"


Expected Results:

The pointer actually changes, and output is as follows:
desired = 1, pointer = 1
desired = 0, pointer = 0
desired = 0, pointer = 0
desired = 0, pointer = 0
desired = 1, pointer = 1
desired = 1, pointer = 1
desired = 1, pointer = 1

Actual Results:

The pointer is always the default, and output is as follows:
desired = 1, pointer = null
desired = 0, pointer = null
desired = 0, pointer = null
desired = 0, pointer = null
desired = 1, pointer = null
desired = 1, pointer = null
desired = 1, pointer = null


Does the problem occur:
Every time? Or how often? Yes, every time.
In other games? Yes, in a test project.
In other user accounts? Unknown.
On other computers? Unknown.

When does the problem NOT occur?

Works fine if the variable is set at compile time.

Did the problem NOT occur in any earlier versions? If so, what was the last version that worked? (Visit http://www.byond.com/download/build to download old versions for testing.)

Unknown.

Workarounds:
None known.
Good find. This bug appears to be ancient.
Lummox JR resolved issue with message:
Setting an atom's mouse pointer vars to one of the built-in values did not work at runtime.