Deprecated the following and replaced with a new method. This is so that an Object arg
can be passed into sortFunc
.
Deprecated: extend public MhEngineEntry[] sortedChildren(MhEngine engine, function(MhEngineEntry, MhEngineEntry, Object):int sortFunc) : deprecated { New: extend public MhEngineEntry[] sortedChildren(MhEngine engine, function(MhEngineEntry, MhEngineEntry, Object):int sortFunc, Object arg=null) {
Now MhEngineConstructionEntry
has a field assortmentClassification
, determining which assortment this entry comes from and belongs to.
Added: public LayerSet assortmentClassification : copy=reference; Added: extend public LayerSet assortmentClassification() { Added: extend public LayerSet assortmentClassification=(LayerSet a) {
Thus, exporting entry now at MhRowExportFunction
will check for the entry assortmentClassification
, to get the correct spawner selector and assortment.
Old: s = entry.spawnSnapper(engine.MhEngine, getSpawnerSelector()); New: LayerSet assortClassi = entry.assortmentClassification; if (assortClassi) s = entry.spawnSnapper(engine.MhEngine, assortment.spawnerSelector(assortClassi)); else s = entry.spawnSnapper(engine.MhEngine, configuration.spawnerSelector);
Add assortmentClassification
as an argument on the constructors.
Old: public constructor(box b, Transform t, LayerSet classification=null) : deprecated { Old: public constructor(box b, LayerSet classification) : deprecated { New: public constructor(box b, Transform t, LayerSet classification=null, LayerSet assortClassification=null) { New: public constructor(box b, LayerSet classification, LayerSet assortClassification=null) {
Therefore, all MhEngineConstructionEntry
instantiations now pass in the assortment's classification as an argument.
MhBayEntryLayout
now takes a list of level entries instead of a single level entry to accomodate of having different level construction entries in the bay layout, such as different unit load.
Old: public MhEngineConstructionEntry levelEntry : deprecated; New: public MhEngineEntry[] levelsEntries;
We have deprecated getLevelEntry(bool first, bool last)
and added a new method getLevelEntry(bool first, bool last, int idx=-1)
with a different return type. As a result of both these changes together, calling getLevelEntry(first, last)
will now call the newly added method.
We recommend searching for any calls or overrides of getLevelEntry(bool first, bool last)
in your extension and updating them to the new interface and return type.
Old: /** * Get level entry based on symbol. */ extend public MhEngineConstructionEntry getLevelEntry(bool first, bool last) { MhEngineConstructionEntry entry; if (last) { entry = topLevelEntry; } else if (first) { entry = botLevelEntry; } else { entry = levelEntry; } return entry; } New: /** * Get level entry based on symbol. */ extend public MhEngineConstructionEntry getLevelEntry(bool first, bool last) : deprecated { return getLevelEntry(.., idx=-1).MhEngineConstructionEntry; } /** * Get level entry based on symbol. */ extend public MhEngineEntry getLevelEntry(bool first, bool last, int idx=-1) { if (last) return topLevelEntry; else if (first) return botLevelEntry; else if (levelEntry) return levelEntry; else if (levelsEntries.count > idx and idx >= 0) return levelsEntries[idx]; else return levelsEntries.last; return null; }
- Deprecated: public <double, int, double> mhCalculatedBayHeight(MhSystemConfigurationItem this, MhSnapper bay, int stepCount, bool loadWithinLimit=false, SnapperFilter filter=mhBayChildrenFilter, double maxBayHeight=maxDouble, bool xtrace=false) { double maxBayHeight=maxDouble, bool xtrace=false) : deprecated {
This function is no longer needed. It has grown so huge, and very patchy. All instances that call this function should be replaced.
Old: return mhCalculatedBayHeight(bay, stepCount=stepCount, loadWithinLimit=loadWithinBayLimit(), maxBayHeight=maxBayHeight, xtrace=xtrace); new: double h = mhCalculatedBayHeight(bay, stepCount, loadWithinLimit=loadWithinBayLimit()); return <h, stepCount, 0d>;
Instead of using the mhCalculatedBayHeight()
to calculate new bay height at the function calculatedBayHeight()
, we replace it with a similar method, mhCalculatedBayHeight(MhSystemConfigurationItem this, MhSnapper bay, int stepCount, bool loadWithinLimit=false)
, which uses bruteforce to calculate bay height.
Old: max = mhCalculatedBayHeight(getBay(), max, maxBayHeight=maxBayH).v1; New: max = mhCalculatedMaxLevelCount(bay);
Instead of using mhCalculatedBayHeight()
to calculate number of levels domain at the function numLevelsDomain()
, we use mhCalculatedMaxLevelCount()
.
Deprecated the following and replaced with a new method. The deprecated method would loop through and gather all Snappers
in mainWorld that use a unit load. This was too broad for the intention of the method and would gather significantly more snappers than required. The new method will gather all Snappers
in mainWorld that use one of the unit load objects passed in as an argument.
Deprecated: extend public CoreObject{} getAffectedObjects() : deprecated { New: extend public CoreObject{} getAffectedObjects(UnitLoad[] unitLoads) {
Similarly, we have deprecated and replaced the following method as well for the same reason.
Deprecated: extend public bool hasLoad(CoreObject obj) : deprecated { New: extend public bool usesLoad(CoreObject obj, UnitLoad[] unitLoads) {
The method applyAllCallback(UnitLoad[] applyUnitLoads)
has been updated to use the new method getAffectedObjects(UnitLoad[] unitLoads)
so if you have overridden it, check if you need to update your method call as well.