Newer
Older
// clear errors from previous save and reset imageError cache so (possibly) save-specific errors might be logged again
Errors.Reporter.hide(true);
Renderer.ImageErrors = {};
// decompression should be the FIRST save modification
DoLSave.decompressIfNeeded(save);
if (h.prng && Array.isArray(h.prng.S)) {
h.prng.S.forEach((i, index, array) => {
if (i < 0 || i > 255) array[index] %= 256;
});
}
h.variables.saveDetails = defaultSaveDetails(h.variables.saveDetails);
}
window.onLoad = onLoad;
Save.onLoad.add(onLoad);
save.state.history.forEach(h => {
h.variables.saveDetails = defaultSaveDetails(h.variables.saveDetails);
h.variables.saveDetails.playTime += h.variables.saveDetails.loadTime ? new Date() - h.variables.saveDetails.loadTime : 0;
// don't run legacy code when idb is active
if (!(window.idb && window.idb.active)) {
// eslint-disable-next-line no-undef
prepareSaveDetails(); // defined in save.js
// compression should be the LAST save modification
DoLSave.compressIfNeeded(save);
}
}
window.onSave = onSave;
Save.onSave.add(onSave);
/* LinkNumberify and images will enable or disable the feature completely */
/* debug will enable or disable the feature only for new games */
/* sneaky will enable the Sneaky notice banner on the opening screen and save display */
/* versionName will be displayed in the top right of the screen, leave as "" to not display anything */
/* convert version string to numeric value */
const tmpver = StartConfig.version.replace(/[^0-9.]+/g, "").split(".");
window.StartConfig.version_numeric = tmpver[0] * 1000000 + tmpver[1] * 10000 + tmpver[2] * 100 + tmpver[3] * 1;
$(document).on(":passagestart", function (ev) {
if (ev.passage.title === "Start2") {
type: ":start2",
content: ev.content,
passage: ev.passage,
console.log("Game Version:", StartConfig.version);
// delete parser that adds unneeded line breaks -ng
Wikifier.Parser.delete("lineBreak");
/* ToDo: implement the dolls system, uncomment during and when its setup
"img/dolls/NameValueMaps.js",
"img/dolls/dollUpdater.js",
"img/dolls/dollLoader.js",
"img/dolls/DollHouse.js",
"img/dolls/FDoll.js",
console.log("Dolls scripts running");
let saveDetails = input;
if (!saveDetails) {
// In the rare case the variable doesnt exist
days: clone(variables.days),
frequency: 15,
count: 0,
dayCount: 0,
},
count: 0,
dayCount: 0,
saveDetails.playTime = 0;
saveDetails.loadCount = 0;
}
saveDetails.f = 1;
saveDetails.playTime = 0;
}
saveDetails.playTime = 0;
saveDetails.f = 3;
}
return saveDetails;
}
// Runs before a passage load, returning a string redirects to the new passage name.
Config.navigation.override = function (dest) {
const lastVersion = DoLSave.Utils.parseVer(V.saveVersions.last());
const currVersion = DoLSave.Utils.parseVer(StartConfig.version);
if (lastVersion > currVersion) {
V.bypassHeader = true;
if (dest.includes("Playground")) {
return dest.replace("Playground", "Courtyard");
/* Try not to include "Playground" in any passage names after this. */
}
switch (dest) {
case "Downgrade Waiting Room":
return V.passage;
case "Forest Shop Outfit":
case "Forest Shop Upper":
case "Forest Shop Lower":
case "Forest Shop Under Outfit":
case "Forest Shop Under Upper":
case "Forest Shop Under Lower":
case "Forest Shop Head":
case "Forest Shop Face":
case "Forest Shop Neck":
case "Forest Shop Legs":
case "Forest Shop Feet":
return "Forest Shop";
case "Over Outfit Shop":
case "Outfit Shop":
case "Top Shop":
case "Bottom Shop":
case "Under Outfit Shop":
case "Under Top Shop":
case "Under Bottom Shop":
case "Head Shop":
case "Face Shop":
case "Neck Shop":
case "Hands Shop":
case "Legs Shop":
case "Shoe Shop":
return "Clothing Shop";
case "Danube Oak":
return "Danube Challenge";
case "Danube Oak Strip":
return "Danube Challenge";
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
case "Penis Inspection Flaunt Crossdress":
return "Penis Inspection Flaunt No Penis";
case "Pussy Inspection2":
return "Pussy Inspection 2";
case "Pussy Inspection Penis":
return "Pussy Inspection Flaunt No Pussy";
case "Forest Plant Sex No Tentacles":
return "Forest Plant Sex";
case "Forest Plant Sex No Tentacles Finish":
return "Forest Plant Sex Finish";
case "Forest Plant Passout No Tentacles":
return "Forest";
case "Moor Plant Sex No Tentacles":
return "Moor Plant Sex";
case "Moor Plant Sex No Tentacles Finish":
return "Moor Plant Sex Finish";
case "Underground Plant Molestation No Tentacles":
return "Underground Plant Molestation";
case "Underground Plant Molestation No Tentacles Finish":
return "Underground Plant Molestation Finish";
case "Evens Swimming Endure":
return "Events Swimming Swim Endure";
case "Domus House Work":
return "Domus Gutters Intro";
case "Trash Boys":
return "Trash Compare";
case "Trash Boys Spy":
return "Trash Compare Spy";
case "Trash Boys Greet":
return "Trash Compare Greet";
case "Trash Boys Refuse":
return "Trash Compare Refuse";
case "Trash Boys Compare":
return "Trash Compare Others";
case "Trash Boys Back Out":
return "Trash Compare Back Out";
case "Trash Boys Show":
return "Trash Compare Show";
case "Trash Boys Offer Secret":
return "Trash Compare Penis Secret";
case "Trash Boys Wrap It Up":
return "Trash Compare Wrap It Up";
case "Trash Boys Crossdressing Refuse":
return "Trash Compare Breast Refuse";
case "Trash Boys Crossdressing Show All":
return "Trash Compare Breast Show All";
case "Trash Boys Forced Strip":
return "Trash Compare Forced Strip";
case "Trash Boys Combat Win":
return "Trash Compare Combat Win";
case "Trash Boys Combat Loss":
return "Trash Compare Combat Loss";
case "Lake Underwater Tentacles Finish Figure":
return "Lake Underwater Tentacles Finish";
case "Sextoys Inventory Home":
case "Sextoys Inventory Brothel":
case "Sextoys Inventory Cottage":
case "Sextoys Inventory Cabin":
return "Sextoys Inventory";
case "Kylar Abduction Angry":
case "Kylar Abduction Apologise":
case "Kylar Abduction Silent":
case "Kylar Abduction Eden":
case "Kylar Abduction Robin":
case "Kylar Abduction Whitney":
case "Kylar Abduction Sydney":
case "Kylar Abduction Wolf":
case "Kylar Abduction Hawk":
return "Kylar Abduction Event Response";
case "Robin's Chocolate Help":
return "Robin Chocolate Help";
case "Robin Chocolate Cover 2":
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
case "School Boy's Escape":
case "School Girl's Escape":
return "School Changing Room Escape";
case "School Boy's Flirt":
case "School Girl's Flirt":
return "School Changing Room Flirt";
case "School Boy's Apologise":
case "School Girl's Apologise":
return "School Changing Room Apologise";
case "School Boy's Strip":
case "School Girl's Strip":
return "School Changing Room Strip";
case "School Boy's Refuse Molestation":
case "School Girl's Refuse Molestation":
return "School Changing Room Refuse Molestation";
case "School Boy's Seduce":
case "School Girl's Seduce":
return "School Changing Room Seduce";
case "School Boy's Seduce Sex":
case "School Girl's Seduce Sex":
return "School Changing Room Seduce Sex";
case "School Boy's Seduce Sex Finish":
case "School Girl's Seduce Sex Finish":
return "School Changing Room Seduce Sex Finish";
case "School Boy's Knees":
case "School Girl's Knees":
return "School Changing Room Knees";
case "School Boy's Knees 2":
case "School Girl's Knees 2":
return "School Changing Room Knees 2";
case "School Boy's Bend":
case "School Girl's Bend":
return "School Changing Room Bend";
case "School Boy's Naked Refuse":
case "School Girl's Naked Refuse":
return "School Changing Room Naked Refuse";
case "School Boy's Crossdress Seduce":
case "School Girl's Crossdress Seduce":
return "School Changing Room Crossdress Seduce";
case "School Boy's Crossdress Sex":
case "School Girl's Crossdress Sex":
return "School Changing Room Crossdress Sex";
case "School Boy's Crossdress Sex Finish":
case "School Girl's Crossdress Sex Finish":
return "School Changing Room Crossdress Sex Finish";
case "School Boy's Crossdress Honest":
case "School Girl's Crossdress Honest":
return "School Changing Room Crossdress Honest";
case "School Boy's Crossdress Forced":
case "School Girl's Crossdress Forced":
return "School Changing Room Crossdress Forced";
case "School Boy's Herm Explain":
case "School Girl's Herm Explain":
return "School Changing Room Herm Explain";
case "School Boy's Watch":
case "School Girl's Watch":
return "School Changing Room Watch";
case "School Boy's Exhibitionism":
case "School Girl's Exhibitionism":
return "School Changing Room Exhibitionism";
case "School Boy's Flaunt":
case "School Girl's Flaunt":
return "School Changing Room Flaunt";
case "School Boy's Goad":
case "School Girl's Goad":
return "School Changing Room Goad";
case "School Boy's Goad Finish":
case "School Girl's Goad Finish":
return "School Changing Room Goad Finish";
case "School Boy's Run":
case "School Girl's Run":
return "School Changing Room Run";
case "School Boy's Masturbation":
case "School Girl's Masturbation":
return "School Changing Room Masturbation";
case "School Boy's Masturbation Finish":
case "School Girl's Masturbation Finish":
return "School Changing Room Masturbation Finish";
case "School Boy's Masturbation Caught":
case "School Girl's Masturbation Caught":
return "School Changing Room Masturbation Caught";
case "School Boy Locker":
case "School Girl Locker":
return "School Changing Room Locker";
case "School Boy Wardrobe":
case "School Girl Wardrobe":
return "School Pool Wardrobe";
case "Robin Forest Vampire":
case "Robin Forest Vampire Tease":
case "Robin Forest Vampire Compliment":
case "Robin Forest Vampire Buy":
case "Robin Forest Witch":
case "Robin Forest Witch Tease":
case "Robin Forest Witch Compliment":
case "Robin Forest Witch Buy":
return "Robin Forest Costume Intro"; /* Send the player back to the start, they won't mind. */
case "Trash Compare Breasts Refuse":
case "Trash Compare Penis Refuse":
return "Trash Compare Show Refuse";
case "Trash Compare Penis Secret":
case "Trash Compare Breast Secret":
return "Trash Compare Secret";
/* Check for passage rerouting using events */
const passageArgs = { name: dest };
$.event.trigger(":passageoverride", passageArgs);
if (passageArgs.name !== dest) {
/* Return new passage dest. Will divert the processed passage to this. */
return passageArgs.name;
}
if (pageLoading) {
pageLoading = false;
const passageOverride = checkPassages(dest);
if (passageOverride) V.passageOverride = passageOverride;
return passageOverride;
}