SuperFactoryManager
SuperFactoryManager copied to clipboard
SIDE revamp
Current behaviours
INPUT FROM chest TOP, SOUTH SIDE -- multiple sides can be specified
INPUT FROM chest -- implies null side
INPUT FROM chest NULL SIDE -- not currently supported, must use implicit syntax above
INPUT FROM chest LEFT SIDE -- not currently supported, no rotation derivation right now
INPUT FROM chest EACH SIDE -- currently an alias for TOP,BOTTOM,NORTH,WEST,EAST,SOUTH (might be diff order idk)
Modification to current behaviour: EACH SIDE
Breaking change (would be lol if SFM 5.0 for this)
EACH SIDE would create a new tracker for each direction, instead of one tracker being shared as it is now.
INPUT 5 stone FROM chest EACH SIDE
Current behaviour: 5 stone is available for movement.
Proposed: (6 ordinals + 1 null side) * 5 stone is available for movement.
Proposal: NULL SIDE
Allow explicitly specifying the null side.
INPUT FROM chest NULL SIDE
Proposal: EVERY SIDE
INPUT 5 stone FROM machine EVERY SIDE -- would be alias for
INPUT 5 stone FROM machine TOP,BOTTOM,NORTH,SOUTH,EAST,WEST,NULL SIDE
Proposal: ANY SIDE
INPUT 5 stone FROM machine ANY SIDE
The first side with a successful non-simulated transaction will be memoized in the program object, avoiding extra work on future iterations.
Currently users are using EACH SIDE because they don't know what side is working. This would replace that use case, instead of having SFM do work for 6 sides it would just find the one that works and keep using it.
If a machine's side config is changed, it would be good for this memoized result to be invalidated.
Added relative sides (LEFT, RIGHT, FRONT, BACK) but haven't done the EACH revamp.
This still needs game tests. The only blocks that care about directions that this can be easily tested with are mekanism (not present on all SFM-supported MC versions) and the tunnelled manager block
Tunnelled manager block doesn't have a facing property. Manually tested for now, works with a mekanism energized smelter. The fix-sides logic works when using relative sides and stuff now.
Will skip the tests for now.
This is available in the new release of SFM 4.27.0