DonBruce64 / MinecraftTransportSimulator

A Minecraft mod that adds planes and automobiles with realistic physics!
Other
106 stars 59 forks source link

[Feature request] Rounding variables. #1767

Closed DrprofLuigi closed 5 months ago

DrprofLuigi commented 5 months ago

Add some way to round variables. Maybe _floor, _ceiling, and _round suffixes for variable names.

i.e. engine_hours_1_floor would make 174.7 hours into 174. I'm not sure whether having it after or before the part index number would be best.

I can likely do this myself, I just wanted input particularly on specific implementation.

DrprofLuigi commented 5 months ago

Actually adding an argument to the animation may be more consistent, similar to absolute and offset.

"roundingType": "round", "roundingType": "floor", and "roundingType": "ceiling"

DonBruce64 commented 5 months ago

The only time I can see this being useful is for the text display functions, and those let you round variables by displaying the desired number of decimal points. Is there a spot for the feature where such rounding would be desired?

DrprofLuigi commented 5 months ago

Is there a spot for the feature where such rounding would be desired?

I had something specific in mind, but after some thought I realized I can do it just fine with VMs.