-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path!config.js
More file actions
42 lines (29 loc) · 1.77 KB
/
!config.js
File metadata and controls
42 lines (29 loc) · 1.77 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
// These should all be treated as const's
console.log("Loading _config.js");
State.variables.proj_config = {
debug: false,
showSidebar: false,
// To disable the sidebar, see init.twee
dumpFinalDataTo: "resources/sendData.php",
knownExperiments: [ "c", "r" ], // All the ids we accept for experiments. Each of these should be accounted for in dialogue trees via: $ current_experiment eq "???" -- Keep them to single letters to make them more obscure.
tickExperimentOn: [ "Landing", "MidLanding" ], // Where should the experiments be automatically swapped. i.e, transition to 'repair' when MidLanding is hit so the next dialogue tree shows repair dialogue options.
safeRestartPoints: [ "ResearchConsentForm" ], // Where can the initial experiment be set via URL from? Allows people to restart without messing up our dataset. Generally, don't touch this unless you're changing the entrypoint of the app. This should always be the starting point.
skipConsentForm: false,
skipQuestionnaire: false,
dialogueCharacterLimit: 200,
experimentTag: "Test3Dec"
};
// ^^^^^^^^^^^^^^^^^^^ only this needs modifying ^^^^^^^^^^^^^^^^
// the rest of this is just trying to stop twine from nuking it.
// Cool! Weird storage bug! If you define stuff in this javascript, the program can just choose to nuke your config.
window.backup_proj_config = State.variables.proj_config;
function restoreConfigToState(e) {
if(State.variables.proj_config == null) {
console.log("Project config was null! Loading from backup config.");
State.variables.proj_config = window.backup_proj_config;
}
}
$(document).on(':storyready', restoreConfigToState);
$(document).on(':enginerestart', restoreConfigToState);
$(document).on(':passagestart', restoreConfigToState);
// abc