diff options
author | Jesusaves <cpntb1@ymail.com> | 2018-06-05 18:06:46 -0300 |
---|---|---|
committer | Jesusaves <cpntb1@ymail.com> | 2018-06-05 18:06:46 -0300 |
commit | 316faf1f7abeb8584e7aa55412aadaf9fbda7818 (patch) | |
tree | 8ad8d1e0d03f12efd0f61c50da821830f29249a0 /wiki | |
parent | 3582c25388dedd49c3836262c3334ee3c2ae63dd (diff) | |
download | tools-316faf1f7abeb8584e7aa55412aadaf9fbda7818.tar.gz tools-316faf1f7abeb8584e7aa55412aadaf9fbda7818.tar.bz2 tools-316faf1f7abeb8584e7aa55412aadaf9fbda7818.tar.xz tools-316faf1f7abeb8584e7aa55412aadaf9fbda7818.zip |
Update wikigen
Diffstat (limited to 'wiki')
-rwxr-xr-x | wiki/wikigen.py | 20 |
1 files changed, 18 insertions, 2 deletions
diff --git a/wiki/wikigen.py b/wiki/wikigen.py index c045c6e..44f2e7d 100755 --- a/wiki/wikigen.py +++ b/wiki/wikigen.py @@ -10,6 +10,7 @@ import datetime wikia=open("Items.md", "w") wikib=open("Monsters.md", "w") +wikic=open("../../client-data/x.diff", "w") # the TYPEs we use to determine where to pack things IT_HEALING=[] @@ -288,12 +289,23 @@ class It: self.rare=False # DropAnnounce self.script=False + # Visual + self.sl="0" # Slots + self.ac=False # Allow Cards + # Script settings self.minheal="0" self.maxheal="0" self.delheal="0" def ItAlloc(it): + if (it.sl == "0" and it.ac) or (it.sl in ["1","2","3","4"] and not it.ac): + print("WARNING, item id "+it.id+" invalid dye/card setting!") + if (len(it.sl) > 1): + print("WARNING, item id "+it.id+" bad slots length: %d (%s)" % (len(it.sl), it.sl)) + if it.ac: + wikic.write(it.id + ": " + it.name + "\n") + a=it.type if "IT_HEALING" in a: IT_HEALING.append(it) @@ -375,6 +387,10 @@ def newItemDB(): x.defs=sti(a) elif " EquipLv:" in a: x.lvl=sti(a) + elif " Slots:" in a: + x.sl=sti(a) + elif " AllowCards:" in a: + x.ac=True # Write booleans elif "DropAnnounce: true" in a: x.rare=True @@ -403,7 +419,7 @@ def newItemDB(): src.close() def sti(x): - return x.replace('\n', '').replace('|', '').replace(')', '').replace('Id: ', '').replace('"','').replace(" ","").replace("\t","").replace('AegisName: ', '').replace('Name: ','').replace('Sell: ', '').replace('Weight: ', '').replace('Type: ', '').replace('Loc: ', '').replace('Atk: ', '').replace('Matk: ', '').replace('Range: ', '').replace('Def: ', '').replace('EquipLv: ', '').replace(" ", "").replace('@min=','').replace('@max=','').replace('@delay=','').replace(';','') + return x.replace('\n', '').replace('|', '').replace(')', '').replace('Id: ', '').replace('"','').replace(" ","").replace("\t","").replace('AegisName: ', '').replace('Name: ','').replace('Sell: ', '').replace('Weight: ', '').replace('Type: ', '').replace('Loc: ', '').replace('Atk: ', '').replace('Matk: ', '').replace('Range: ', '').replace('Def: ', '').replace('EquipLv: ', '').replace('Slots: ','').replace(" ", "").replace('@min=','').replace('@max=','').replace('@delay=','').replace(';','') def stin(x): return x.replace('\n', '').replace('|', '').replace(')', '').replace('Id: ', '').replace('"','').replace(" ","").replace("\t","").replace('Name: ','').replace(';','') @@ -601,7 +617,7 @@ newItemDB() wikia.close() wikib.close() -wikia.close() +wikic.close() #print(str(SysDrops)) showFooter() |