Use a dict to store the dolls
the existing variable was a set, all the existing use cases still work (contains tests, iteration, turning into lists...)
This commit is contained in:
parent
878cec8c76
commit
1e8f1ebfb8
@ -1,3 +1,5 @@
|
|||||||
|
define renpy.store.states.dolls = {}
|
||||||
|
|
||||||
init python:
|
init python:
|
||||||
class Doll(DollMethods):
|
class Doll(DollMethods):
|
||||||
# 0 - 50 = Skin/Body Layers
|
# 0 - 50 = Skin/Body Layers
|
||||||
@ -77,11 +79,7 @@ init python:
|
|||||||
|
|
||||||
self.build_image()
|
self.build_image()
|
||||||
|
|
||||||
# Add doll name to global doll states store
|
renpy.store.states.dolls[name] = self
|
||||||
try:
|
|
||||||
renpy.store.states.dolls.add(name)
|
|
||||||
except AttributeError:
|
|
||||||
renpy.store.states.dolls = {name}
|
|
||||||
|
|
||||||
def generate_hash(self):
|
def generate_hash(self):
|
||||||
clothes_hash = str([x[0]._hash for x in self.states.values() if istype(x[0], (DollCloth, DollClothDynamic, DollMakeup)) and x[2]])
|
clothes_hash = str([x[0]._hash for x in self.states.values() if istype(x[0], (DollCloth, DollClothDynamic, DollMakeup)) and x[2]])
|
||||||
|
Loading…
Reference in New Issue
Block a user