Closed ToasterBiome closed 1 year ago
This is unfortunately a strongdmm issue- I chose to include the spaces because that's what Dream Maker does. It's unfortunate that strongdmm decided to forgo doing tests to see what Dream Maker actually does.
Keep in mind, I took the time to match the behavior of Dream Maker in how it outputs a lot of things- Here you can see how it formats numbers:
thing = Math.fround(thing);
if(thing == Infinity) return "1.#INF";
else if(thing == -Infinity) return "-1.#INF";
else if(thing != thing) return "1.#IND";
//return ""+thing;
// Replicate BYOND's shitty float behavior
let abs_thing = Math.abs(thing);
if(abs_thing != 0 && (abs_thing < 0.0001 || abs_thing >= 1000000)) {
let as_scientific = thing.toExponential(5);
let parts = /^([\d\.]*)e([+-])?(\d+)$/.exec(as_scientific);
if(!parts) return as_scientific;
return `${+parts[1]}e${parts[2] || "+"}${parts[3].padStart(3, 0)}`;
} else {
return `${+thing.toPrecision(6)}`;
}
If StrongDMM wants to pull an Apple and forgo following established standards to do their own thing that's their problem
Is your feature request related to a problem? Please describe. fastdmm2 exports varedited lists in a slightly more readable format with leading spaces and spaces between the equals signs, but strongdmm doesn't do this. this makes it very annoying when a codebase mixes the two programs and you have 1 tile change PRs that change 25 lines each.
Describe the solution you'd like make it less readable for humans by removing all the extra spaces so that they don't count as lines changed in mapping PRs.
Describe alternatives you've considered Asking the makers of strongdmm to match fastdmm's superior formatting
Additional context Saving from fastdmm2 to strongdmm