this mod is good for one thing, and one thing only. humor while reading the code. otherwise just dont use this as its a joke since its based on top of globalsteps at the core
I can't disagree with this review, pointing to the only thing this mod is supposed to be providing. (But it shouldn't be thrown away)
I'm not 100% sure what you think is funny/humorous in my code, but let me clarify some of why this is different than a globalstep
A: A globalstep runs continuously, even when no players are online
B: A globalstep runs at about 0.1 seconds (This is about 10x that, slower, but for some cases, that's still decent, and that extra 0.9 isn't needed)
C: This mod uses core.after in it's calls (Unless this simply uses a mega globalstep under the hood, not a globalstep)
A globalstep, like used in one of the infamous protection mods areas, specifically in it's hud.lua:6 can be refactored
And suprise, even protector in it's hud.lua:16 can refactor some of it's code
It's config value hud_refresh and tick can be removed (Instead of tracking it's own time since it last updated huds, it can just update them at a decent rate)
It would gain some extra savings on not running any code when no players are online (Saving some resources by updating huds of players when players are on)
This mod isn't to remove the globalstep, just help reduce some mods use when all they are using it for is 1.0 second timers (Or as I put it, a "lighter" alternative to globalstep)
Thank you for reviewing my mod, and hope this clarifies this isn't just some joke mod that is completely worthless
this mod is good for one thing, and one thing only. humor while reading the code. otherwise just dont use this as its a joke since its based on top of globalsteps at the core
I can't disagree with this review, pointing to the only thing this mod is supposed to be providing. (But it shouldn't be thrown away)
A: A globalstep runs continuously, even when no players are online
B: A globalstep runs at about 0.1 seconds (This is about 10x that, slower, but for some cases, that's still decent, and that extra 0.9 isn't needed)
C: This mod uses
core.after
in it's calls (Unless this simply uses a mega globalstep under the hood, not a globalstep)A globalstep, like used in one of the infamous protection mods areas, specifically in it's hud.lua:6 can be refactored
hud_refresh
andtick
can be removed (Instead of tracking it's own time since it last updated huds, it can just update them at a decent rate)This mod isn't to remove the globalstep, just help reduce some mods use when all they are using it for is 1.0 second timers (Or as I put it, a "lighter" alternative to globalstep)
It's a shame no one points out
core.after
as defined in builtin/common/after.lua:156 uses a globalstepHere I was thinking
core.after
was using something like a async Promise or some other async C++ features, rather than a loopAs such, I guess this mod is completely worthless... removing in a few days