FallingColors / HexMod

Minecraft mod about drawing spells
MIT License
133 stars 88 forks source link

Timer pattern #762

Open TinyDeskEngineer06 opened 2 months ago

TinyDeskEngineer06 commented 2 months ago

Describe the feature

A pattern that takes in a pattern or list of patterns and a number, and evaluates the first argument after the amount of seconds stored in the number argument has passed since the pattern was executed. The name could be "Timekeeper's Gambit"

Additional context

An example use case could be a smiting spell which automatically summons rain shortly before summoning lightning, for people who like being dramatic in combat.

object-Object commented 2 months ago

we've had a few discussions about this on Discord. I don't remember exactly what's blocking it; probably infrastructure or something. @Alwinfy might know. see also: #267

Alwinfy commented 2 months ago

yeah so the big thing is writing a scheduler - i think all components (continuation, castcontext, pats) are serializable, so it's a matter of picking out a way to report a paused cast and a way to decant a paused cast on tick

walksanatora commented 2 months ago

casting environment is currently not serializable. currently a single system can implement a "todo later" eg: wisp but there is no global system for delayed cast. meaning each environment is left to fend for it's self the way this will/can be rectified is just to make another registry of CastingEnvironments (or well CastingEnvConstructors)