Our code has handled binary ops like +, *, and -, but not the various other mindustry functional ops , like abs() and sin().
My current version allows all of them (at least all ones you can select via the in-game editor), though it simple-mindedly converts whatever given args there are via as_value and passes them to the function, with no checking for type or even number of arguments. Let's pretend that that's my firm commitment to Pythonic duck typing, and not just laziness...
It may be good to add these all to the .pyi at some point (though doing so would overwrite many Python functions, so maybe we shouldn't, except maybe in cases where the mindustry one behaves differently, or doesn't have a pure Python analog).
Our code has handled binary ops like +, *, and -, but not the various other mindustry functional ops , like abs() and sin().
My current version allows all of them (at least all ones you can select via the in-game editor), though it simple-mindedly converts whatever given args there are via
as_value
and passes them to the function, with no checking for type or even number of arguments. Let's pretend that that's my firm commitment to Pythonic duck typing, and not just laziness...It may be good to add these all to the .pyi at some point (though doing so would overwrite many Python functions, so maybe we shouldn't, except maybe in cases where the mindustry one behaves differently, or doesn't have a pure Python analog).