summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
Diffstat (limited to 'scripts')
-rw-r--r--scripts/toy.groovy3
-rw-r--r--scripts/toy/imagery.groovy18
2 files changed, 11 insertions, 10 deletions
diff --git a/scripts/toy.groovy b/scripts/toy.groovy
index 85988c7..507501c 100644
--- a/scripts/toy.groovy
+++ b/scripts/toy.groovy
@@ -58,7 +58,8 @@ return new Object() {
"$DATAFOLDER/images/toy/$domme/person.groovy",
"$DATAFOLDER/images/toy/$domme/$set/set.groovy" ]
.collect { readDomme(it) }
- .sum()
+ .sum();
+ DOMME.id = domme;
};
final loadModules = { toy ->
new File("$DATAFOLDER/scripts/toy")
diff --git a/scripts/toy/imagery.groovy b/scripts/toy/imagery.groovy
index 0a2c3a6..5dc79c3 100644
--- a/scripts/toy/imagery.groovy
+++ b/scripts/toy/imagery.groovy
@@ -44,9 +44,9 @@
toy.metaClass.showImage { spec ->
def outfit = loadString("toy.owner.outfit");
- def image = selectImage(OWNER, outfit, spec);
+ def image = selectImage(DOMME.id, outfit, spec);
if (image) {
- setImage("toy/$OWNER/$outfit/${image.image}.jpg");
+ setImage("toy/${DOMME.id}/$outfit/${image.image}.jpg");
return image.tags;
}
else {
@@ -112,27 +112,27 @@
def outfit = loadString("toy.owner.outfit");
def outfitTime = loadInteger("toy.owner.outfitTime");
if (outfitTime > getTime() - 7200) { // Recent, check
- def prev = IMAGEDATA[OWNER];
+ def prev = IMAGEDATA[DOMME.id];
if (prev) {
prev = prev.sets[outfit];
- if (prev && specs.every({ spec -> selectImage(OWNER, prev.set, spec)})) {
- loadDomme(OWNER, outfit);
+ if (prev && specs.every({ spec -> selectImage(DOMME.id, prev.set, spec)})) {
+ loadDomme(DOMME.id, outfit);
return outfit;
}
}
}
onChange();
- outfit = selectImageSet(OWNER, specs);
+ outfit = selectImageSet(DOMME.id, specs);
if (!outfit) {
- showPopup("No outfit for $OWNER : $specs");
+ showPopup("No outfit for ${DOMME.id} : $specs");
save("toy.owner.outfit", null);
save("toy.owner.outfitTime", null);
- loadDomme(OWNER, outfit);
+ loadDomme(DOMME.id, outfit);
return null;
}
save("toy.owner.outfit", outfit.set);
save("toy.owner.outfitTime", getTime());
- loadDomme(OWNER, outfit.set);
+ loadDomme(DOMME.id, outfit.set);
executeTrigger("ownerOutfitChange", outfit.set);
return outfit.set;
};