minity-script / minity

Minity is a scripting language for Vanilla Minecraft
https://minity-script.github.io
GNU General Public License v3.0
23 stars 0 forks source link

Feature request: Allow use of constants for defining `every` period #13

Open AgainPsychoX opened 2 years ago

AgainPsychoX commented 2 years ago

Feature request: Allow use of constants (and variables?) for defining every period, substitute with and without the time unit.

Motivation example

every {?fuel_per_coal}s {   
    say doing something
}

Note

Following compiles, but result in invalid mcfunction generation:

every ?fuel_per_coal {
    say doing something
}

(generated mcfunction)

say doing something
schedule function zzz_minity:minecarts_nowadays/_b_8 180null

despite how the constant was defined, both:

?fuel_per_coal = 180
?fuel_per_coal = 180s