Open sjpinizzotto opened 6 years ago
I was converting "SFGPUCI----K---"
So there's a few things.
1) when the renderer just has 'm' in from of the dash, we're assuming the need is only for multipoints. UnitDefTable is not loaded in m-b.js so getBasicSymbolID() failed because it can't do a check against the UnitDefTable 2) we do a check against the UnitDefTable because there are a handful of symbols where an Installation or mobility modifier is a part of the basic symbol code and removing it changes the symbol. If you're not concerned with that check, call getBasicSymbolIDStrict() and it will replace affiliation, status and any modifiers with '*'.
To resolve this 1) use getBasicSymbolIDStrict() as mentioned above or 2) use a different output version of the renderer. "sm-b.js" perhaps. or 3) load UnitConstantsB.js and/or UnitConstantsC.js along with UnitDefTable manually so that they're available. Then call UnitDefTable.init(); I've not tested that but I think it would work. UnitDefTable will automatically feed off of whichever UnitContants files you've loaded when you call init.
When trying to use utility method armyc2.c2sd.renderer.utilities.SymbolUtilities.getBasicSymbolID, I get the following error:
This does not occur in the savm-bc.js