When applying Turn(45) to a generator, I would expect it to rotate 45 degrees. Instead it appears to set the system's initial velocity to 0
Numbered Steps to Reproduce Problem:
Code Snippet (if applicable) to Reproduce Problem:
/*
These are simple defaults for your project.
*/
world
fps = 25 // 25 frames per second
icon_size = 32 // 32x32 icon size by default
maxx = 4
maxy = 4
view = 6 // show up to 6 tiles outward from center (13x13 view)
obj
step_size = 8
particles = new/particles/test
obj/mathtester
particles = new/particles/test/modified
obj/mathtester/proc/make_adjustments() //Rotate the system 90 degreees, apply a leftward drift to the system, and turn it red.
var/generator/number = generator("vector", list(1,6,0), list(-1,6,0), UNIFORM_RAND) //No change regardless of if a new instance is made, or if the original generator is referenced.
particles.velocity = number.Turn(45) //appears to null the velocity?
particles.color = "red"//to show that we're accessing the right thing and properly.
turf
icon = 'test.dmi'
New()
if(x==2 && y==2) // Spawn a reference system at 2,2
new /obj(src) //Reference system.
if(x==1 && y==1) //Spawn our modified system at 1,1 and make it visually clear.
var/obj/mathtester/M = new(src)
M.make_adjustments()
icon_state = "green"
/particles/test //all numbers are arbitrarily chosen.
width = 128
height = 128
count = 600
spawning = 1
lifespan = generator("num", 5, 15)
fade = 3
color_change = 0.1
position = generator("circle" ,0, -0, rand = LINEAR_RAND)
velocity = generator("vector", list(1,6,0), list(-1,6,0), UNIFORM_RAND) //Except this one.
/particles/test/modified
color = "black"
Expected Results:
I expected the system to rotate 45 degrees.
Actual Results:
The system does not impart initial velocity at all.
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.)
Workarounds:
None so far as I can tell, appears to be an engine issue.
I was able to produce runtimes at one point with this but I cannot seem to any longer, unsure why.
It is as such in stddef.dm
proc/operator_turn(a) return new/generator(turn(_binobj, a))
proc/Turn(a)
_binobj = turn(_binobj, a)
return src
Here is a link to my test case.
https://cdn.discordapp.com/attachments/973161106254200872/ 1132580710021091428/bug_report.zip