Entity step() callback — Python-side turn handler #299
Labels
No labels
Alpha Release Requirement
Bugfix
Demo Target
Documentation
Major Feature
Minor Feature
priority:tier1-active
priority:tier2-foundation
priority:tier3-future
priority:tier4-deferred
Refactoring & Cleanup
system:animation
system:documentation
system:grid
system:input
system:performance
system:procgen
system:python-binding
system:rendering
system:ui-hierarchy
Tiny Feature
workflow:blocked
workflow:needs-benchmark
workflow:needs-documentation
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Blocks
Depends on
#300 Behavior data struct and primitive implementations
john/McRogueFace
#298
mcrfpy.Trigger enum — behavior trigger type identifiers
john/McRogueFace
Reference
john/McRogueFace#299
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
Add a
stepcallback to entities, called by the turn system when a behavior triggers or when usingcustombehavior. Supports both callback assignment and subclass method override, following existing patterns (on_click,on_key, etc.).Signature
Usage patterns
Callback assignment
Subclass method
Implementation notes
entity.step = funcand subclassdef step()patterns must workon_click,on_keystep()is called and returns without setting a new behavior, the entity reverts todefault_behavior(default:idle)stepcallback is set and no subclass override exists, the trigger is silently ignored and the entity reverts todefault_behaviorRelated properties
Dependencies
mcrfpy.Triggerenum)Files likely affected
src/UIEntity.h/cpp— addstepcallback storage,default_behaviorpropertysrc/UIEntityPyMethods.h— Python getter/setter forstepgrid.step()— turn manager for entity behaviors #301mcrfpy.Triggerenum — behavior trigger type identifiersmcrfpy.Triggerenum — behavior trigger type identifiers #298Roadmap context
Part of the Grid & Entity Overhaul Roadmap (
docs/GRID_ENTITY_OVERHAUL_ROADMAP.md), Phase 2 (Entity Data Model Extensions).Must respect Python subclass identity (#266 pattern). Both
entity.step = funcand subclassdef step(self, trigger, data)patterns must work — follow the existingon_click/on_keycallback patterns.