Rework event pipeline
Objectives:
- Allow sequenced and linked events to either fail or succeed together
Target features:
- Every Action comes from a source Actor Entity and generates an Effect
- An Effect is a sequence of Events tied to its source, the Actor Entity
- Effects are processed by Rules before being decomposed and queued as final Events
- Remove Act Events since they prevent linked Events
Problems:
- How to apply energy costs? Remember delayed acts!
- Whose Rules apply to an Effect's Events?
- When are Effects processed by Rules? Upon Action compilation or right before Event queuing?
- Are there Effects and Events that do not come from Actions?
Brainstorm steps:
-
Add a source to Effects and make them a list of simple Events -
Actions have a source, which they add to the Effects they produce -
process_effectapplies rules then queues the event -
Change Events to work as Commands -
Change Rules so they only filter Events (possibly add new) -
Remove "Self performs X at Y speed" -
Use rules to add energy costs to effects
Edited by Wilson Kazuo Mizutani