WTS/game/scripts/doll/cum.rpy

46 lines
1.6 KiB
Plaintext
Raw Normal View History

2022-05-16 23:48:22 +00:00
init python:
class DollCum(DollMethods):
zorder_cum = 100
def __init__(self, obj):
self.char = obj
self.name = self.char.name
self.imagepath = "characters/{}/cum/".format(self.name)
self.cum = dict((k, None) for k in {"hair", "face", "breasts", "body", "crotch", "pussy", "legs"})
def build_image(self):
2022-09-21 20:57:04 +00:00
sprites = tuple("{}{}/{}.webp".format(self.imagepath, k, v) for k, v in self.cum.items() if v != None)
2022-05-16 23:48:22 +00:00
return sprites
def get_skin(self):
2022-09-21 20:57:04 +00:00
return ["{}{}/{}_skin.webp".format(self.imagepath, k, v) for k, v in self.cum.items() if renpy.loadable("{}{}/{}_skin.webp".format(self.imagepath, k, v))]
2022-05-16 23:48:22 +00:00
def set_cum(self, *args, **kwargs):
"""Takes keyword argument(s) containing string name(s) of cum layers to apply or None. Returns True if image is changed."""
changed = False
if args:
2022-09-21 20:57:04 +00:00
for k, v in self.cum.items():
2022-05-16 23:48:22 +00:00
if v != args[0]:
self.cum[k] = args[0]
changed = True
2022-09-21 20:57:04 +00:00
for arg, value in kwargs.items():
2022-05-16 23:48:22 +00:00
if str(arg) != value:
self.cum[str(arg)] = value
changed = True
if changed:
self.rebuild_image()
return changed
def set_pose(self, pose):
if pose is None:
self.imagepath = "characters/{}/cum/".format(self.name)
else:
self.imagepath = "characters/{}/poses/{}/cum/".format(self.name, pose)
self.rebuild_image()
return