Compile Time Changes

Package Stream Renamer

Two renamer classes AbstractUnitLoadCollabG1Renamer from the collabG1 folder and AbstractUnitLoadCollabG3Renamer from the collabG3 folder have been removed. The reason for their removal is because they both were registered to be the package stream renamer of the #"cm.abstract.unitLoad" package, but each package should only have one renamer. By having two renamers registered for the same package, only one renamer is used and the other is not. It is also random as to which renamer is chosen.

To resolve this issue, both the classes mentioned above have been combined into a new class UnitLoadStreamRenamer. So, any existing class that extends from those removed classes can extend from this new class without the loss of functionality.

UnitLoadStackableTote Renamed

The class UnitLoadStackableTote has been renamed to UnitLoadCaseTote.

The reason for the change is because UnitLoadStackableTote is actually a Case Tote, and there is another type of unit load called Stackable Tote from MhStackableTote class, which made it really confusing.

Unit Load Repository

Unit load cache has been remove and this is replaced with a unit load repository instead. Unit load will still be accessible through function unitLoad(UnitLoad m) but used unit loads will be put into repository map and unused objects will be cleaned up by gc later on as by default it'll be added into a weak collection. With repository it's possible to manually control the lifetime of a unit load object and can be done by calling public void use(UnitLoad this) { which will promote unit load objects to not be collected by the garbage collector.

The following functions have been remove and replaced.

Old: public class UnitLoadCache {
New: public class UnitLoadRepository : unstreamable {
New: public UnitLoadRepository unitLoadRepository() {
Removed: public UnitLoadCache unitLoadCache() { 
// Lifetime will be handle by gc or manually remove if necessary.
Removed: public void mhPreLoadClearUnitLoadCacheHook(WorldFileHeader header) {
Removed: public void mhClearUnitLoadCacheHook(World world) {
Removed: public bool usingUnitLoad(UnitLoad ul) {

Unit load function registration is now split into two in order to have better control of default and temporary objects to populate unit load domain.

Old: public void registerUnitLoad(UnitLoad ul, World w=null) {
// Register it to container to populate unit load domain.
New: public void registerUnitLoadToContainer(UnitLoad ul, World w=null) {
// Will register unit load to be use as default.
New: public void registerUnitLoadToDefault(UnitLoad ul) {

// Include world to be more specific when looking for unitload container.
Old: public UnitLoad unitLoad(guid unitGuid) {
New: public UnitLoad unitLoad(guid unitGuid, World w=null) {

Old: public UnitLoad unitLoadFromName(str name) {
New: public UnitLoad unitLoadFromName(str name, World w=null) {

// Better variable name.
Old: public UnitLoad unitLoad(str unitKey, World w=null) {
New: public UnitLoad unitLoad(str gidHex, World w=null) {