rockyjvec / EasyAPI

EasyAPI is an in-game script library for Space Engineers that aims to make the programmable blocks easier to use.
http://steamcommunity.com/sharedfiles/filedetails/?id=379297410
19 stars 10 forks source link

Fixed On(string, Action) to work reliably. #10

Closed jkeywo closed 9 years ago

jkeywo commented 9 years ago

The argument was being discarded when the tick was discarded, so On(string, Action) was very unreliable if you called tick often. This change simply moves the processing of the argument actions to before we decide if we should discard the tick.

rockyjvec commented 9 years ago

Thanks, @jkeywo! You are awesome! That explains why my menus worked unreliably when they were triggered from both On events and updated with ticks. I'll merge it later today.

jkeywo commented 9 years ago

No problem... thanks for the API, it makes programming in space engineers 100% faster/easier :)