Currently we have "LandEnergyPod" and "PRPLCORE". Could the case become consistent?
Also, could CreateUnit become case-insensitive?
You can also use "CommonUnit" instead of "PRPLCORE". Everything else uses camel case. The code looks at exact string matches currently and I'd rather not change it. There's a really good chance I'd miss something somewhere and it would create a bug that would be hard to find in the future.
Quote from: virgilw on January 06, 2017, 12:48:14 PM
You can also use "CommonUnit" instead of "PRPLCORE". Everything else uses camel case. The code looks at exact string matches currently and I'd rather not change it. There's a really good chance I'd miss something somewhere and it would create a bug that would be hard to find in the future.
You *could* double up on the case statements for those Unit types that are inconsistent... :)
That would be compatible, but provide another layer of inconsistency where some units can be recognized as PRPLCORE and PRPLCore (or is that PrplCore?) ...
We do need a list of the unit types... but maybe it's there already and I'm blind 8)
Quote from: Sorrontis on January 06, 2017, 05:36:22 PM
We do need a list of the unit types... but maybe it's there already and I'm blind 8)
Wiki Link (http://knucklecracker.com/wiki/doku.php?id=prpl:unittypelist) - is that what you seek?
Quote from: Stickman on January 06, 2017, 05:38:36 PM
Quote from: Sorrontis on January 06, 2017, 05:36:22 PM
We do need a list of the unit types... but maybe it's there already and I'm blind 8)
Wiki Link (http://knucklecracker.com/wiki/doku.php?id=prpl:unittypelist) - is that what you seek?
Apparently I'm very blind.... very very blind.
I was thinking of wrapping GetStringFromStack() in String.ToLowerCase() before doing the comparison in CreateUnit. Just a suggestion, and only made because I thought it was approximately a one-line change.
Talking about this. Is there a list of the scriptvariables for each unit? For example, so I can change the damage a ticon gun does over time?
Not yet, that will have to wait for V's personal attention, as he is the one with the source code.