#801 closed enhancement (fixed)
[PATCH] Templates sorting utility
Reported by: | fcxSanya | Owned by: | historic_bruno |
---|---|---|---|
Priority: | Nice to Have | Milestone: | Alpha 7 |
Component: | UI & Simulation | Keywords: | |
Cc: | Patch: |
Description
Currently second-level elements (which represent components) in simulation templates ordered chaotically, and this is better to have any order than don't have order at all, so I proposed to use the alphabetical order.
Attached patch add to svn small utility, which consists from shell script and xsl template.
Attachments (5)
Change History (19)
by , 13 years ago
Attachment: | templates_sorter.diff added |
---|
comment:1 by , 13 years ago
Summary: | Templates sorting utility → [PATCH] Templates sorting utility |
---|
comment:2 by , 13 years ago
Milestone: | Backlog → Alpha 6 |
---|
follow-up: 4 comment:3 by , 13 years ago
by , 13 years ago
Attachment: | templates_sorter_2011_07_05.diff added |
---|
comment:4 by , 13 years ago
Replying to historic_bruno:
One question though, could it be made case insensitive?
Thanks for note, I added function to translate lower-case letters to upper-case when sorting, so now it should be case insensitive. (I checked out only source/tools directory, so created new patch from it; it should be applied from it too as far as I understand)
comment:5 by , 13 years ago
Milestone: | Alpha 6 → Alpha 7 |
---|
comment:6 by , 13 years ago
Owner: | changed from | to
---|
by , 13 years ago
Attachment: | templates_sorter_2011_07_29.diff added |
---|
comment:7 by , 13 years ago
After checking templates I found that xsltproc remove encoding attribute from xml header when encoding is not specified explicitly in the xslt file, so in new version I added encoding attribute.
comment:8 by , 13 years ago
I posted warning on forum about upcoming templates changes. I will wait few days and then will commit both utility and updated templates.
follow-up: 10 comment:9 by , 13 years ago
This breaks promotions:
diff -r f17a58f7c9b7 binaries/data/mods/public/simulation/templates/units/cart_cavalry_javelinist_a.xml --- a/binaries/data/mods/public/simulation/templates/units/cart_cavalry_javelinist_a.xml Sat Jul 30 17:19:54 2011 +0100 +++ b/binaries/data/mods/public/simulation/templates/units/cart_cavalry_javelinist_a.xml Sat Jul 30 17:21:52 2011 +0100 @@ -4,7 +4,7 @@ <Rank>Advanced</Rank> </Identity> <Promotion> - <Entity>units/cart_cavalry_javelinist_e</Entity> + <Entity/> </Promotion> <VisualActor> <Actor>units/carthaginians/cavalry_javelinist_a.xml</Actor>
In special/formation.xml
it removes the commented-out VisualActor
; might be nice to add that back in manually afterwards, since it's handy when debugging formation movement.
by , 13 years ago
Attachment: | templates_sorter_2011_07_30.diff added |
---|
by , 13 years ago
Attachment: | sorted_templates_2011_07_30.diff added |
---|
comment:10 by , 13 years ago
Replying to Philip:
This breaks promotions:
Fixed.
In
special/formation.xml
it removes the commented-outVisualActor
; might be nice to add that back in manually afterwards, since it's handy when debugging formation movement.
Now it copy all comments to the start of content of "Entity" element.
comment:13 by , 13 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
comment:14 by , 8 years ago
Keywords: | review removed |
---|
Thanks, the disorder of these tags has bothered me for a while. Looks like the sorter works well. One question though, could it be made case insensitive? Like with "template_structure.xml" I think <BuildingAI> should come before <BuildRestrictions>.