mirror of
https://github.com/hyper-neptune/yuuki.git
synced 2024-11-10 08:26:06 +08:00
Update
This commit is contained in:
parent
6ca98f1fe0
commit
00f5a4cdff
1 changed files with 12 additions and 3 deletions
15
libs/data.py
15
libs/data.py
|
@ -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"
|
||||
|
|
Loading…
Reference in a new issue