| summaryrefslogtreecommitdiff |
diff options
| author | Nathanael Sensfelder <SpamShield0@MultiAgentSystems.org> | 2021-01-24 22:08:56 +0100 |
|---|---|---|
| committer | Nathanael Sensfelder <SpamShield0@MultiAgentSystems.org> | 2021-01-24 22:08:56 +0100 |
| commit | 73cc70358020538b13f2d5cf4e81426b13bbb85a (patch) | |
| tree | 2fbc4a2c2be48f8ded80933dffe1445758b63c66 /content/fate_v1/declarations/files/_index.md | |
| parent | 23d8224704b76737e746c5add47aa4cd96a7fd01 (diff) | |
...
Diffstat (limited to 'content/fate_v1/declarations/files/_index.md')
| -rw-r--r-- | content/fate_v1/declarations/files/_index.md | 48 |
1 files changed, 0 insertions, 48 deletions
diff --git a/content/fate_v1/declarations/files/_index.md b/content/fate_v1/declarations/files/_index.md deleted file mode 100644 index 05c6836..0000000 --- a/content/fate_v1/declarations/files/_index.md +++ /dev/null @@ -1,48 +0,0 @@ ---- -title: File Management ---- -Fate narratives have one main file, but this file can use the contents of other -files, and these files in turn can also use the contents of other files. Three -issues arise then: some things must be declared before they are used, nothing -should be declared multiple times, and where are the files? - -The absolute path to each file is computed in order to detect whether it has -already been loaded. The given paths are expected to be relative. They are then -resolved by attempting access from the following, in order: the current file's -directory; the include directories passed as parameter to the executable; the -calling executable's directory. - -Dependency cycles will raise compiling errors. - -The first "instruction" on each file must be `(fate_version 1)`. Values cannot -be placed before either, obviously. - -{{< fatecode >}}(require {string}){{< /fatecode >}} - -**Effect:** If the file at `{string}` has not yet been loaded, load it. - -{{< fatecode >}}(include {string}){{< /fatecode >}} - -**Effect:** Load the `{string}`, even if it has already been loaded. - -#### Examples -* `(require bonus_sequence.fate)` -* `(include types/plant.fate)` -* `(require ../guild/merchants.fate)` -* `(include ../what/../are/../you/../doing/../there.fate)` -* `(require oh/../oh/../oh/../this_is_fine.fate)` - -Example of Fate file: -{{< fatecode >}};;; A story of great importance -(fate_version 1) - -(require include/events.fate) -(require include/text_effects.fate) - -(require scenes/the_holiday_forest.fate) - -`Twas a long time ago... Longer now that it seems... In a place that can't be -referenced here because I'm pretty sure the transcript is copyrighted. - -(jump_to not_the_tree_door_i_would_have_chosen) -{{< /fatecode >}} |


