forked from expo/troggle
fix crash when people put a list of cave ids in a wallet
This commit is contained in:
parent
4a34986598
commit
1f70b77735
@ -104,10 +104,15 @@ def fillblankothers(w):
|
|||||||
wcaveid = w.cave()
|
wcaveid = w.cave()
|
||||||
if not wcaveid or wcaveid == "":
|
if not wcaveid or wcaveid == "":
|
||||||
caveifywallet(w)
|
caveifywallet(w)
|
||||||
|
else:
|
||||||
|
if type(wcaveid) == list:
|
||||||
|
for i in wcaveid:
|
||||||
|
if i in Gcavelookup:
|
||||||
|
w.caveobj = Gcavelookup[i] # just sets it to the last one found. nasty. bug waiting to happen
|
||||||
|
#print(f' - Found cave object from id {wcaveid}')
|
||||||
else:
|
else:
|
||||||
if wcaveid in Gcavelookup:
|
if wcaveid in Gcavelookup:
|
||||||
w.caveobj = Gcavelookup[wcaveid]
|
w.caveobj = Gcavelookup[wcaveid]
|
||||||
# print(f' - Found cave object from id {wcaveid}')
|
|
||||||
else:
|
else:
|
||||||
print(f' - Failed to find cave object from id {wcaveid}')
|
print(f' - Failed to find cave object from id {wcaveid}')
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user