mirror of
https://github.com/wesnoth/wesnoth
synced 2025-04-25 19:10:26 +00:00
update the addon manager for "simple WML"
This commit is contained in:
parent
7cdec04c7f
commit
4de5cdc7d3
@ -111,6 +111,16 @@ class CampaignClient:
|
||||
|
||||
|
||||
def make_packet(self, doc):
|
||||
|
||||
# The Wesnoth campaign server only accepts "simple WML", which
|
||||
# requires all attributes to be sorted alphabetically.
|
||||
def sorter(tag):
|
||||
if isinstance(tag, wmlparser.TagNode):
|
||||
tag.data.sort(key = lambda node: node.name)
|
||||
for tag2 in tag.data:
|
||||
sorter(tag2)
|
||||
sorter(doc)
|
||||
|
||||
return doc.wml()
|
||||
|
||||
def send_packet(self, packet):
|
||||
|
Loading…
x
Reference in New Issue
Block a user