This commit is contained in:
SuperSonic 2019-08-27 15:29:12 +08:00
parent 6ca98f1fe0
commit 00f5a4cdff

View file

@ -134,13 +134,22 @@ class Yuuki_Data:
if type(Query) == list:
if len(Query) == 1:
if Query not in self.Data[Type]:
self.Data[Type][Query] = self.initType[Type]
if Type in self.initType:
self.Data[Type][Query] = self.initType[Type]
else:
self.Data[Type][Query] = {}
return self.Data[Type][Query]
elif len(Query) == 2:
if Query[0] not in self.Data[Type]:
self.Data[Type][Query[0]] = self.initType[Type]
if Type in self.initType:
self.Data[Type][Query[0]] = self.initType[Type]
else:
self.Data[Type][Query[0]] = self.initType[Query]
if Query[1] not in self.Data[Type][Query]:
self.Data[Type][Query[0]][Query[1]] = self.initType[Query[0]]
if Type in self.initType:
self.Data[Type][Query[0]][Query[1]] = self.initType[Query[0]]
else:
self.Data[Type][Query[0]][Query[1]] = {}
return self.Data[Type][Query[0]][Query[1]]
else:
assert "Error Query Level"