>>545974614
UI code is all in its own shitty bucket, its by far the worse quality code in the whole thing
but it doesn't touch any of the complicated block mechanics
making the reader work consistently was just giving it the right spot on the update priority que. It needed 2 slots, one for the togglers, and one to push the punchcard to the next punchcard
here's a tricky bug I did fix:
>player is on a separate thread from blocks (player left screen, blocks right screen)
>there's a block in the game called the "pilot seat" so you can build vehicles and stuff
>player position is only synced once every block update (around 4 times a second)
>there was a thread message called "enter_chair"
>if the 2 thread player positions were off:
>(you were standing on the border of 2 blocks, where in player thread you were standing in front of chair, in block thread player is standing in front of non-chair)
>chair gets all fucked up
fix was adding chair position to the "enter_chair" thread message, instead of assuming the block behind player position was a chair