Compare commits

..

276 Commits

Author SHA1 Message Date
c6e768f18e version bump 2024-11-14 23:43:23 +01:00
9fd73fe5e3 velocidad del texto 2024-11-14 23:41:58 +01:00
e269ff97a0 Añade Eneko no quiere mechero sin gas, closes #87 2024-11-13 20:54:48 +01:00
e9aee74c2b Añade accion al bol con la fregadera, closes #869 2024-11-13 20:42:42 +01:00
b619a4c126 feat(intro): force 3,4,5,6 options in dialog 2024-11-13 19:24:03 +01:00
d80e3d4b36 Debug shortcuts: loadgame, new game without intro 2024-11-13 01:28:04 +01:00
7905433217 Cocina fantasma, closes #91 2024-11-13 00:40:00 +01:00
53f730960b Despensa salida más grande, closes #92 2024-11-13 00:06:21 +01:00
64c28e0387 feat(credits): add music 2024-11-12 23:06:24 +01:00
36457cf3f9 fix(cuerno): si la comida está lista no dejar tocar el cuerno hasta que eneko la cate 2024-11-12 22:54:37 +01:00
c7079bfc08 feat(credits): enable music volume, closes #89 2024-11-12 19:36:05 +01:00
bde4587c76 fix: resolve git conflict in cebolla_izq 2024-11-12 19:10:10 +01:00
8d9c3523d2 builds 2024-11-12 00:23:34 +01:00
aa6fc435c5 fixes & refixes 2024-11-09 01:08:46 +01:00
d0ea96d261 fixed Frontal infinito 2024-11-03 18:44:48 +01:00
d958a2934d Ni pan ni agua en el tutorial 2024-11-03 18:39:47 +01:00
5f4914d30e ebru camera credits closes #62 2024-11-03 01:19:18 +01:00
4be604b1d4 Habla solo cuando te toca 2024-11-03 01:14:12 +01:00
a4050ad8c1 fix(credits): typo 2024-11-03 01:10:01 +01:00
1b2c65086d remove dialog tip 2024-11-03 01:07:37 +01:00
7846dd082f feat(credits): changes 2024-11-03 01:05:47 +01:00
047fe53533 now we speak 2024-11-03 00:44:42 +01:00
b83a46b820 remove unused script 2024-11-03 00:26:04 +01:00
94d44153a6 uli productions 2024-11-03 00:26:04 +01:00
27badc4b67 feat(cocina_detras): parece que veo a Mikel, closes #83 2024-11-03 00:21:22 +01:00
2bf4e069c3 Closes #84 2024-11-02 23:35:34 +01:00
a0ba8c827c Amenazas hasta el infinito 2024-11-02 23:30:32 +01:00
3aa4661781 fixes #33 2024-11-02 23:29:11 +01:00
963ca95f59 enable savegame 2024-11-02 22:59:07 +01:00
7db2491c7d hide dialogs 2024-11-02 22:58:42 +01:00
b5d57bd2e3 Disable hover stack 2024-11-02 22:58:42 +01:00
bcf185231d fix(patata): added object-manager override. Solves #82 2024-11-02 22:45:24 +01:00
d4f9cdb48f Savegame disable buttons setting 2024-11-02 22:24:41 +01:00
220c390597 Dancing animations, some glitch fixed 2024-11-02 21:39:16 +01:00
6cfa1d1a05 feat(intro): added Uliwood presents 2024-11-02 18:31:14 +01:00
416d208ab5 fix: underscore before unused argument 2024-11-02 18:10:52 +01:00
b2673e71ac feat(story): el pan que habla 2024-11-02 17:44:05 +01:00
d4506ab174 Video export readme 2024-11-02 14:03:09 +01:00
346472df17 issue/42-oier-amenaza-con-el-cuchillo-a-eneko (#73)
Oier amenaza con cuchillo
Co-authored-by: oier <oierbravo@gmail.com>
Co-committed-by: oier <oierbravo@gmail.com>
2024-11-02 13:59:54 +01:00
39d0d2f1e9 vscode settings ignore 2024-11-02 01:00:58 +01:00
f142ea1b5d adds game over credits (#74)
## Changes
- Adds game over credits

Reviewed-on: #74
Reviewed-by: Eneko Nieto <eneko@eneko.ovh>
Co-authored-by: oier <oierbravo@gmail.com>
Co-committed-by: oier <oierbravo@gmail.com>
2024-11-02 00:59:37 +01:00
62e07c83fe feat(dialog): show tip to speed up dialogs 2024-11-01 22:59:08 +01:00
dc3fb56053 Disable actions workflow 2024-10-30 22:47:01 +01:00
1241cf9c09 fix(video player): hide inventory when playing videos, closes #72
Some checks failed
Gymkhana release / Linux Export (push) Failing after 14s
Gymkhana release / Web Export (push) Failing after 8s
2024-10-29 22:15:53 +01:00
267d7fd569 more workflow
Some checks failed
Gymkhana release / Linux Export (push) Failing after 17s
Gymkhana release / Web Export (push) Failing after 8s
2024-10-27 08:08:33 +01:00
05fd08acc3 more workflow
Some checks failed
Gymkhana release / Linux Export (push) Failing after 8s
Gymkhana release / Web Export (push) Failing after 7s
2024-10-27 08:03:00 +01:00
8ec9c4c4f2 more workflow
Some checks failed
Gymkhana release / Linux Export (push) Failing after 11s
Gymkhana release / Web Export (push) Failing after 9s
2024-10-27 08:02:04 +01:00
531731a5fd workflow things
Some checks failed
Gymkhana release / Linux Export (push) Failing after 9s
2024-10-27 06:40:47 +01:00
0eb91db3a5 release things
Some checks failed
Gymkhana release / Linux Export (push) Failing after 8s
Gymkhana release / Web Export (push) Failing after 7s
2024-10-27 05:12:02 +01:00
d29e128afe change branch
Some checks failed
Gymkhana release / Linux Export (push) Failing after 6m40s
Gymkhana release / Web Export (push) Failing after 7s
2024-10-27 04:59:29 +01:00
a866a6b7cf add build action workflow 2024-10-27 04:58:12 +01:00
068c4c982c feat: take sticker if Eneko is away 2024-10-25 23:24:07 +02:00
6255c6cef2 feat(eneko): new dialog options 2024-10-25 19:09:35 +02:00
f6d5e50811 more dialogue cleanup 2024-08-29 13:22:55 +02:00
3304b5ead4 fix: bombona and caja_herramientas cleanup 2024-08-29 12:55:02 +02:00
18529f8e29 fix(export): closes #57 2024-08-26 00:36:02 +02:00
b42adccace fix(inventory): show/hide inventory on hide/show menu 2024-08-25 17:54:24 +02:00
80c6ba277b fix(cocina_delante): move position 1 pixel 2024-08-25 17:19:46 +02:00
c58ff4a06b fix(cocina_delante): fix camera limits 2024-08-25 13:10:34 +02:00
26328155df fix(godot3.6): fixed inventory background 2024-08-25 12:28:35 +02:00
3d3e7220ec Added credits 2024-08-24 19:54:46 +02:00
bd48e7a619 feat: add some dialogs 2024-08-23 20:15:38 +02:00
8c6b360dea fix: misspells 2024-08-23 19:43:39 +02:00
f1e612f602 feat: guardar el bol y el peso después de echar las lentejas 2024-08-23 16:48:23 +02:00
5c7d3e7f3f fix: created turno_cocina_peso_usado, fixes #58 2024-08-23 16:19:13 +02:00
4a27efa9a8 fix(save): outdated save files deleted 2024-08-22 18:59:30 +02:00
eb2c2a6977 fix: replace turno_cocina_bol_inventario with turno_cocina_bol in saved games 2024-04-09 23:14:15 +02:00
15f88c8203 feat: speed up dialogs 2024-04-09 22:57:59 +02:00
073431e11e gas interactions 2024-04-09 22:28:19 +02:00
b0ff374dc1 fix disabled economica, removed wood > olla interaction 2024-04-09 22:28:19 +02:00
33e04e13e5 fix: delete unused turno_cocina_bol_inventario item 2024-04-09 22:16:28 +02:00
b6801b811f fix inventory after videos 2024-04-09 22:14:08 +02:00
f1ee9c5ed7 feat: block exits while Eneko is tasting the lentils 2024-03-23 22:59:23 +01:00
f73091268c feat: ya se puede tocar el cuerno 2024-03-22 22:47:31 +01:00
5125428b1f fix: merge duplicated custom_data in patata items 2024-03-21 22:39:48 +01:00
47161be549 Hide items for dialog chooser. Fixes #59 2024-03-20 23:43:20 +01:00
4bfea61e3d hide dialog chooser & floating when paused. Fixes #53 2024-03-19 00:33:00 +01:00
89fa3a28d6 skip button tooltip 2024-03-19 00:13:15 +01:00
34131da469 Tooltips bottom position. Closes #37 2024-03-17 23:40:21 +01:00
a123b5446f simplemouse to rtmi-ui 2024-03-17 21:21:58 +01:00
d2ba565140 some fixes 2024-03-17 21:18:51 +01:00
d7a65133f7 fix: esclocation for ajo 2024-03-17 20:10:33 +01:00
9f9cebeda9 Merge branch 'custom-data-components' 2024-03-17 20:03:34 +01:00
e56b3149c8 outline fix 2024-03-17 20:02:52 +01:00
19ef4704d4 Custom data tooltip, Tooltip manager, Gymkhana autoload 2024-03-17 19:48:58 +01:00
ffd09bf308 fix: replace mp4 with ogv in video paths 2024-03-17 19:44:30 +01:00
68ff21c0f2 fix: fix savegame 05 2024-03-17 19:18:26 +01:00
48e4f693d7 feat: deleted game folder 2024-03-17 18:42:58 +01:00
e341aadc66 feat: commented New game without intro menu option 2024-03-17 18:14:38 +01:00
559cb294f2 fix: fixed save games 2024-03-17 17:40:24 +01:00
eed5e64a53 feat: save game system is working! 2024-03-03 19:32:30 +01:00
96ff7ea842 fix: use '_COUNT_' as prefix for count manager globals instead of 'count/' 2024-02-14 23:25:57 +01:00
55a473d40c fix: project.godot for savegame branch 2024-02-13 22:54:19 +01:00
4809a22c71 logo update 2024-02-13 00:13:40 +01:00
5a86567a97 fix merge 2024-02-13 00:12:22 +01:00
30d3f0bc69 Merge branch 'main' of git.fosil.eu:gymkhana/gymkhana 2024-02-13 00:11:09 +01:00
277dc9e10a clean up 2024-02-13 00:07:11 +01:00
a0225e9c4f relocate addons 2024-02-12 23:40:14 +01:00
b65b5806f5 relocate addons 2024-02-12 23:38:18 +01:00
f678fb7d5f Merge branch 'main' of git.fosil.eu:gymkhana/gymkhana 2024-02-12 23:24:59 +01:00
4b39b6e26f gymkhana logo menu 2024-02-12 23:23:33 +01:00
a8569b96f4 gymkhana logo menu 2024-02-12 23:22:33 +01:00
e262edb7ff merge gymkhana main 2024-02-12 23:09:32 +01:00
438270455f fix: intro dialog typo 2024-02-12 22:53:10 +01:00
6030adc6db Merge branch 'gymkhana/main' of git.fosil.eu:gymkhana/gymkhana into gymkhana/main 2024-02-12 22:27:56 +01:00
b26823bbeb fix: remove saves from gitignore 2024-02-12 21:30:48 +01:00
803d5ff71d fix cuerno en intro 2024-02-11 22:29:32 +01:00
f3d067054c Now with SubtitleVision 2024-02-11 19:35:40 +01:00
20940e566c Menu con batido de regalo 2024-02-11 18:29:46 +01:00
e33601f081 eneko speak animation mini clean up 2024-02-11 18:15:40 +01:00
bcc9a97205 eneko animation mini clean up 2024-02-10 23:20:55 +01:00
51d062e734 the sound of silence, closes #43 2024-02-10 22:58:33 +01:00
c36ad18989 The sound of water 2024-02-10 22:25:27 +01:00
815df6a67a Tooltip margin. Fixes #37 2024-02-10 20:44:26 +01:00
396db338cf Smoke on the water. Closes #38 2024-02-10 20:23:51 +01:00
8f9e8680b3 more missing carton 2024-02-10 17:34:23 +01:00
cd285d24f4 Rearranged init video. Fixes #47 2024-02-10 17:23:07 +01:00
0d6c98f852 fix missing carton 2024-02-10 17:21:45 +01:00
1e2eb6bd98 cocina depth fix 2024-02-10 17:00:35 +01:00
089c19d95f trampa y carton 2024-02-10 16:42:21 +01:00
5957f1db64 horn of cenarius 2024-02-10 01:51:48 +01:00
fdcf425425 🎉Zorionak eneko!🎉 2024-02-08 23:45:43 +01:00
83d7aac5ee feat: delete addons folder and use link to external folder 2024-02-08 00:12:27 +01:00
1bb1fd9b5a feat: cuerno cutremente puesto en la cocina 2024-02-07 00:01:44 +01:00
4389701319 fix: small fixes 2024-02-05 23:12:45 +01:00
03d78da002 el pan que habla 2024-02-05 22:38:46 +01:00
30dbbf437d video intro estabilizado 2024-02-05 20:29:54 +01:00
bcc43712cf feat: intro scene finished 2024-02-04 23:53:35 +01:00
3d6545ad79 Disable items in cocina intro. PENDING RE-ENABLING THEM! 2024-01-28 14:17:59 +01:00
d7d97d1440 Merge branch 'gymkhana/hide-toolips-when-dialog-choose' into gymkhana/main 2024-01-28 14:08:46 +01:00
e4d58dbd1c tooltips only when interactive 2024-01-28 14:08:10 +01:00
d07b3fc4b2 tooltip cleanup 2024-01-28 13:49:48 +01:00
83c8b2e6be Intro cocina 2024-01-28 13:11:36 +01:00
ca87c01104 fix scroll 2024-01-28 13:01:29 +01:00
d388616668 Skip videos 2024-01-28 12:57:22 +01:00
bf639419d1 intro 2024-01-28 12:13:17 +01:00
f69a7d071b jersey verde 2024-01-28 11:51:38 +01:00
356ddde0a4 feat: videos! 2024-01-27 19:47:48 +01:00
7eefcba2f4 imagen carton 2024-01-27 01:14:44 +01:00
8ca06c0345 Merge branch 'gymkhana/main' of git.fosil.eu:gymkhana/gymkhana into gymkhana/main 2024-01-27 01:13:24 +01:00
2e10ae13da Merge branch 'gymkhana/main' of git.fosil.eu:gymkhana/gymkhana into gymkhana/main 2024-01-27 01:12:31 +01:00
854cba768c fix: eneko leña dialog 2024-01-27 00:51:39 +01:00
393afb4a83 animacion gas 2024-01-27 00:38:26 +01:00
f0c61093e3 feat: encender la economica 2024-01-27 00:37:50 +01:00
8ea9b4602a dialog chooser size 2024-01-27 00:01:55 +01:00
6806956a73 apaño economica 2024-01-26 23:52:25 +01:00
cc398f2ae8 Merge branch 'gymkhana/main' of git.fosil.eu:gymkhana/gymkhana into gymkhana/main 2024-01-26 23:35:22 +01:00
04272190f5 ajo y eneko catador 2024-01-26 23:35:03 +01:00
a938b5d38c feat: encender cocina de gas 2024-01-26 23:15:20 +01:00
c62f42f4f6 feat: mechero en silla 2024-01-26 22:40:42 +01:00
09269a28d6 Leñeros lejanos 2024-01-26 22:00:41 +01:00
5e47ade5ba feat: character dialog colors 2023-11-14 23:26:48 +01:00
edac94e5b0 fix: outline de la económica 2023-11-14 23:16:13 +01:00
ea0a232732 fix: adjust inventory size 2023-11-14 00:05:04 +01:00
33895e8ec0 feat:leña en la económica 2023-11-13 23:37:05 +01:00
8396487246 feat:leña en la económica 2023-11-13 23:32:27 +01:00
b6761cc828 fix:texts 2023-11-11 00:13:09 +01:00
a2f26f7306 feat: eneko sabe kung fu 2023-11-11 00:05:02 +01:00
b752b1aef4 feat: la fruntal de mi abuelo 2023-11-10 23:35:57 +01:00
220a180a0a Smaller logo 2023-11-01 00:00:48 +01:00
6a358943e2 logo 2023-10-31 23:38:29 +01:00
9ee8daccdd fixes 2023-10-31 23:04:22 +01:00
05cf4407ee Merge branch 'gymkhana/main' of git.fosil.eu:gymkhana/gymkhana into gymkhana/main 2023-10-31 22:18:06 +01:00
923a40c8f1 Big patata, little patata 2023-10-31 00:17:24 +01:00
72dd717df1 basic recipe, missing ingredients, bigger collisions and.... The secret **********. 2023-10-31 00:10:21 +01:00
f0347fa6d8 Highlitght only when actions are present. 2023-10-29 23:50:29 +01:00
68f68357a6 feat: potatoes! 2023-10-26 23:43:36 +02:00
8138d3055b bugfix: ItemOutline crashing 2023-10-26 22:54:30 +02:00
9c0af41ddd feat: turno_cocina_madera 2023-10-25 00:10:04 +02:00
bc0894573f feat: more intro dialog! 2023-10-23 00:13:15 +02:00
7a03853106 fix: enable first dialog again 2023-10-22 23:17:39 +02:00
11984b506d feat: move intro song beginning to end 2023-10-22 23:16:50 +02:00
8379e71713 bugfix: option dialog scrollbar 2023-10-22 22:56:14 +02:00
fd3a648161 fix(dialogs): use default text for dialog options if text is untranslated 2023-10-20 21:34:34 +02:00
876a19b932 feat: intro dialog 2023-10-18 00:06:57 +02:00
0c734c6998 bugfix: delete report_errors calls 2023-10-16 22:11:51 +02:00
aeacaa09cd bugfix: delete report_errors calls 2023-10-16 22:11:22 +02:00
ca1a0fd73b bugfix: cut big potato out of kitchen 2023-10-16 21:30:24 +02:00
cacdc03ab0 fregaderos Location fix 2023-10-14 16:03:19 +02:00
38fb731c87 Smaller item cursor 2023-10-14 16:02:11 +02:00
d649a7f4a8 Se nos viene la olla 2023-10-13 03:14:34 +02:00
d12028a24c feat: dialog for first alfa preview 2023-10-13 02:48:12 +02:00
3e0d68cb5c Merge branch 'gymkhana/main' of git.fosil.eu:gymkhana/gymkhana into gymkhana/main 2023-10-13 02:41:53 +02:00
275458a8a4 feat: say_last_dialog_option command 2023-10-13 02:41:43 +02:00
Urtzi Arostegui
ea5ad7dd8d imagenes olla 2023-10-12 18:47:25 +02:00
937e0fd8d3 Item cleanup 2023-10-10 23:28:06 +02:00
fd77e04cba tooltip cleanup 2023-10-08 05:11:29 +02:00
574fa5941b Tooltip offset for action3 & action4. #17 2023-10-08 04:44:40 +02:00
5d50f3e188 Auto set_active(false) for inventory items component 2023-10-08 03:44:21 +02:00
cdf85cd1c5 Outline item component 2023-10-08 03:26:31 +02:00
e6de1f1323 Fix: tried to fix compiling errors in esc_item_with_tooltip.gd 2023-10-07 23:38:56 +02:00
d4643568c4 Merge branch 'gymkhana/main' of git.fosil.eu:gymkhana/gymkhana into gymkhana/main 2023-10-06 00:11:39 +02:00
d1fc5995d4 feat: Oier does not speak to Eneko at startup, now the game has no story and is very boring
fix: remember picked items to avoid appering in scene again
fix: counting potatoes
2023-10-06 00:08:33 +02:00
2787adb648 one component to rule them all 2023-10-05 22:41:54 +02:00
dffda5cce3 mini audio loop fix 2023-10-05 22:40:53 +02:00
a857d326ce Do you hear it? 2023-10-05 00:43:17 +02:00
ef05793d1d Dialog position & darker background 2023-10-05 00:02:37 +02:00
824980ab0f Cuchillo & Romero 2023-10-04 23:56:11 +02:00
157f20b0e8 feat: now oier talks to eneko on init, making the developing experience more frustating!
bugfix: initial location in cocina and cocina_delante
2023-10-03 23:55:51 +02:00
c25cfd0061 bugfix: avoid replaying cutscene 2023-10-03 23:25:11 +02:00
0294394542 Deleted *.translation files 2023-09-28 00:18:54 +02:00
f04736e943 padding 2023-09-27 23:59:55 +02:00
c0a52682d8 Merge branch 'gymkhana/main' of git.fosil.eu:gymkhana/gymkhana into gymkhana/main 2023-09-26 23:40:55 +02:00
3c623156bc room clean up 2023-09-26 03:17:22 +02:00
72fa2931bf room clean up 2023-09-26 03:03:30 +02:00
6e1fe599f2 first background music 2023-09-26 02:41:52 +02:00
a776252bb7 sequences, random & global variables 2023-09-26 02:18:24 +02:00
9c4df0d4d7 Merge branch 'gymkhana/main' of git.fosil.eu:gymkhana/gymkhana into gymkhana/main 2023-09-26 00:48:44 +02:00
401de66a9f cursor fix 2023-09-26 00:48:27 +02:00
2d32f4b312 Localization (#15)
## Changes (escoria-core)
> Pending to do a PR to the core.
- Added `es` langcode with the corresponding flag image.
- Translated literals for `es`

## Changes (gymkhana)
-  Added `turno_cocina` localization csv.
- Proof of concept for tooltips & dialogs.

## Notes
- For tooltips just use the literals. Godot will automatically search for a translation key first.
- For ESC just use `translation_key:"Default text"`

## How to test
- In the option menu ES should be selectable.
- The `frontal` item in the inventory should have the tooltips and the `say` command translated in `en`,`fr` and `es`.

Reviewed-on: #15
Co-authored-by: oier <oierbravo@gmail.com>
Co-committed-by: oier <oierbravo@gmail.com>
2023-09-26 00:13:55 +02:00
6cbd466f76 me corte con el cuchillo, XD 2023-09-25 23:49:48 +02:00
c307f2e5c6 Merge branch 'gymkhana/main' of git.fosil.eu:gymkhana/gymkhana into gymkhana/main 2023-09-25 23:07:20 +02:00
fec381dd1f Oier knows how to count potatoes! 2023-09-23 23:57:21 +02:00
c633ad511d Cutting the big potato 2023-09-22 23:49:22 +02:00
9705ca14a4 Center cursor on item combination 2023-09-22 22:39:06 +02:00
38dece6947 WIP 2023-09-22 00:50:03 +02:00
0b21813e77 gymkhana/item_count (#16)
Item can now be countable objects, like money, bullets or even potatoes!

Reviewed-on: #16
2023-09-22 00:10:02 +02:00
92bfd3bbc2 added sound library settings & command (#12)
## Changes
- Added file base simple sound library
- Added base UI settings and sound library settings
- Added `play_lib_snd` command

## Notes
- The command accepts a namespace so we can leave common sound in the root folder and chapter specific sounds in its own folder

## How to test
- Run the game
- All the door sounds should play as normal.

Reviewed-on: #12
Co-authored-by: oier <oierbravo@gmail.com>
Co-committed-by: oier <oierbravo@gmail.com>
2023-09-21 00:38:12 +02:00
ebbaec2abf Merge pull request 'video player feature' (#11) from gymkhana/video-player into gymkhana/main
Reviewed-on: #11
2023-09-18 22:47:47 +02:00
d309c9fb88 video player feature 2023-09-17 02:10:20 +02:00
5f15bca474 menu icon, F3 key to show room selector 2023-09-16 21:09:06 +02:00
8674ffffa4 menu to the top right position 2023-09-16 19:13:02 +02:00
1394861ee7 missing tooltip update 2023-09-16 19:12:46 +02:00
34d8747643 cocina -> cocina_delante spawn point fix 2023-09-16 16:45:10 +02:00
1727cbe63e Merge branch 'gymkhana/main' of git.fosil.eu:gymkhana/gymkhana into gymkhana/main 2023-09-16 16:43:12 +02:00
2fdbdaaa6a unified tooltips as dictionary (#8)
## Changes
- From one variable for each tooltip to dictionary
- Should not break the game.

## How to test
- Run game
- In `cocina_delante` every tooltip yould appear as always.
- The rest of the rooms/items appear without tooltip.

## Side effects
- `set_tooltip` ESC command doesn't work untill `tooltip` is set to the in the new way. It changes the tooltip to every object without the new tooltip.
- Should be gone when we update every object.

Reviewed-on: #8
Co-authored-by: oier <oierbravo@gmail.com>
Co-committed-by: oier <oierbravo@gmail.com>
2023-09-16 15:56:20 +02:00
344408f23c replaced inventory bg with colored polygon 2023-09-16 14:45:49 +02:00
ef82e45e10 Avoid name collision between highlight variable and function 2023-09-14 22:54:31 +02:00
81dbb521b7 Walking in the start 2023-09-04 23:19:01 +02:00
fc4f4ed8d5 inventory ui texture 2023-09-04 22:42:35 +02:00
36651bf490 pull request template 2023-09-04 19:58:17 +02:00
0d5c490a9f more changes to the dialog manager 2023-08-28 22:29:35 +02:00
049d18327f Death to the Godot editor! long life to *VSX* 2023-08-28 18:19:17 +02:00
2618b52008 Item Highlight with shift key 2023-08-28 17:22:51 +02:00
59384da8ac simple dialog plugin naming changed to avoid collision with the core 2023-08-28 16:57:21 +02:00
5949f0713b Merge branch 'gymkhana/main' of git.fosil.eu:gymkhana/gymkhana into gymkhana/main 2023-08-28 16:44:47 +02:00
c4e732701f dialog simple plugin updated & enabled 2023-08-28 16:38:02 +02:00
7900f2a464 Remove not unicode char 2023-08-28 00:12:33 +02:00
0ad2605b65 Remove not unicode char 2023-08-28 00:11:01 +02:00
0a1e8e4d7c Merge pull request 'Command: set_tooltip' (#6) from gymkhana/command-set-tooltip into gymkhana/main
Reviewed-on: #6
2023-08-27 19:39:10 +02:00
2cc01f0326 fix highlight 2023-08-27 18:02:59 +02:00
9015186b5a item highlight, cambio de estrategia. 2023-08-27 17:17:10 +02:00
c20964a17c set_tooltip esc command 2023-08-27 16:37:43 +02:00
bc2ce9dbf6 bugfix frontal 2023-08-27 04:28:32 +02:00
494af4dd0e soniditos 2023-08-27 04:26:22 +02:00
0a748b63d0 Merge branch 'gymkhana/main' of git.fosil.eu:gymkhana/gymkhana into gymkhana/main 2023-08-27 04:09:06 +02:00
d1e467651e eneko fuma 2023-08-27 04:09:02 +02:00
ceb6dd1244 Merge branch 'gymkhana/main' of git.fosil.eu:gymkhana/gymkhana into gymkhana/main 2023-08-27 04:02:26 +02:00
42e504f5b2 eneko fuma 2023-08-27 04:02:16 +02:00
50ccb0f25b Merge branch 'gymkhana/main' of git.fosil.eu:gymkhana/gymkhana into gymkhana/main 2023-08-27 03:31:27 +02:00
beb244a01e cocina frontal-patata 2023-08-27 03:31:18 +02:00
1a159efa20 eneko 2023-08-27 03:08:32 +02:00
e6f4beeab6 bol sin peso + lentejas 2023-08-27 02:42:59 +02:00
a6408ffc1a Merge branch 'gymkhana/main' of git.fosil.eu:gymkhana/gymkhana into gymkhana/main 2023-08-27 02:19:18 +02:00
73b2a8be5d bol+lentejas 2023-08-27 02:19:04 +02:00
c83015309a non interactive player, despensa item locations 2023-08-27 02:17:15 +02:00
1ee9c339db peso+bol 2023-08-27 01:35:14 +02:00
fa08453e65 Merge branch 'gymkhana/main' of git.fosil.eu:gymkhana/gymkhana into gymkhana/main 2023-08-27 01:34:56 +02:00
85062ea912 Item Outline, despensa 2023-08-27 01:34:50 +02:00
b30dcbc29d cocina_peso 2023-08-27 00:47:13 +02:00
3cbc77f308 Merge branch 'gymkhana/main' of git.fosil.eu:gymkhana/gymkhana into gymkhana/main 2023-08-26 20:49:41 +02:00
4a5db47371 bg sin peso 2023-08-26 20:48:27 +02:00
19d38e5e1c start with frontal 2023-08-26 20:00:57 +02:00
b8bf76241f cocina camera limits 2023-08-26 19:41:08 +02:00
982ca1812c columna cocina detras 2023-08-26 19:38:35 +02:00
ad4f4fdc94 disabled workflow 2023-08-26 19:15:56 +02:00
552affc1d7 hay speed en la cocina
All checks were successful
Gymkhana release / Linux Export (push) Has been cancelled
2023-08-26 19:14:23 +02:00
8f5627d41e cocina depth
All checks were successful
Gymkhana release / Linux Export (push) Has been cancelled
2023-08-26 19:07:21 +02:00
6e7a5e82a7 cocina delante depth
All checks were successful
Gymkhana release / Linux Export (push) Has been cancelled
2023-08-26 18:02:31 +02:00
64a362f384 connect rooms
All checks were successful
Gymkhana release / Linux Export (push) Has been cancelled
2023-08-26 17:01:55 +02:00
916c4003be max 128 inventory images
All checks were successful
Gymkhana release / Linux Export (push) Has been cancelled
2023-08-26 16:56:57 +02:00
a3cb90b96b workflows
All checks were successful
Gymkhana release / Linux Export (push) Has been cancelled
2023-08-26 16:34:06 +02:00
a3633ddd3b release workflow
All checks were successful
Gymkhana release / Linux Export (push) Has been cancelled
2023-08-26 16:26:16 +02:00
17911fa1b5 release workflow
All checks were successful
Gymkhana release / Linux Export (push) Has been cancelled
2023-08-26 16:08:52 +02:00
f80d717388 release workflow
Some checks failed
Gymkhana release / Linux Export (push) Failing after 22s
2023-08-26 16:06:20 +02:00
4ef6ac6d6e release workflow 2023-08-26 15:53:12 +02:00
1314 changed files with 7128 additions and 44535 deletions

View File

@@ -0,0 +1,9 @@
## Changes
## Notes
## How to test

View File

@@ -1,6 +1,6 @@
name: Gitea Actions Demo
run-name: ${{ gitea.actor }} is testing out Gitea Actions 🚀
on: [push]
on: [release]
jobs:
Explore-Gitea-Actions:

View File

@@ -0,0 +1,64 @@
name: Gymkhana release
run-name: ${{ gitea.actor }} is releasing out Gymkhanikas de Uli 🚀
on:
push:
branches: [ main ]
env:
GODOT_VERSION: 3.6
EXPORT_NAME: gymkhana
jobs:
export-linux:
name: Linux Export
runs-on: act-latest
container:
image: barichello/godot-ci:3.6
steps:
- name: Checkout
uses: actions/checkout@v4
with:
lfs: true
- name: Setup
run: |
echo $PATH
mkdir -v -p ~/.local/share/godot/templates
- name: Linux Build
run: |
mkdir -v -p build/linux
git clone https://github.com/godot-escoria/escoria-demo-game.git
cd addons
ln -sf ../escoria-demo-game/addons/escoria-core escoria-core
cd ..
godot -v --export "Linux/X11" build/linux/Gymkhana.x86_64 --no-window
- name: Upload Artifact
uses: actions/upload-artifact@v1
with:
name: linux
path: build/linux
export-web:
name: Web Export
runs-on: act-latest
container:
image: barichello/godot-ci:3.6
steps:
- name: Checkout
uses: actions/checkout@v4
with:
lfs: true
- name: Setup
run: |
echo $PATH
mkdir -v -p ~/.local/share/godot/templates
- name: HTML5 Build
run: |
mkdir -v -p build/web
git clone https://github.com/godot-escoria/escoria-demo-game.git
cd addons
ln -sf ../escoria-demo-game/addons/escoria-core escoria-core
cd ..
godot -v --export "HTML5" build/web/index.html --no-window
- name: Upload Artifact
uses: actions/upload-artifact@v1
with:
name: web
path: build/web

4
.gitignore vendored
View File

@@ -3,7 +3,6 @@ bin
.import
*.translation
.godot
saves/
# Local overrides to project.godot go in override.cfg.
/override.cfg
@@ -11,3 +10,6 @@ saves/
# Disable accidental changes to the default bus layout. If a change to this
# file is required, use git add --force
addons/escoria-core/default_bus_layout.tres
.idea/
.vscode/settings.json

9
AUTHORS.md Normal file
View File

@@ -0,0 +1,9 @@
## Development
- Oier
- Eneko
## Collaborations
- Pico
- Miette
- Niko
- Urtzi

16
GYMKHANA.md Normal file
View File

@@ -0,0 +1,16 @@
# Gymkhana
> Las gymkhanikas de Uli
## ESC Commands
- `item_count_add item_id value`
- `play_lib_snd filename namespace`
- `play_video "res://file"`
- `set_tooltip object action text`
- `say_random player list_id lenght`
- Generates a global variable `{list_id}_count`
- `say_sequence player list_id lenght [loop]`
- Generates a global variable `{list_id}_current_index`
- Generates a global variable `{list_id}_count`
## Sounds
- ZOOM0046-1239-24s-loop.ogg -> music_loop

View File

@@ -1,63 +1,20 @@
# Escoria Demo Game
# Las Gymkhanikas de Uli
![](https://raw.githubusercontent.com/godot-escoria/.github/main/design/escoria-logo-small.png)
Point-and-click adventure game developed using Escoria framework and Godot engine.
[![Join our Discord](https://img.shields.io/discord/884336424780984330.svg?label=Join%20our%20Discord&logo=Discord&colorB=7289da&style=for-the-badge)](https://discord.com/invite/jMxJjuBY5Z)
## Building from source
Libre framework for the creation of point-and-click adventure games with the multi-platform game engine [Godot Engine](https://godotengine.org).
1) Clone `gymkhana` repo
2) Clone `escoria-demo-game` repo (develop branch)
3) Create `gymkhana/addons/escoria-core` symlink pointing to `escoria-demo-game/addons/escoria-core`
Check out the [Escoria documentation](https://docs.escoria-framework.org), especially the Getting Started Guide for further details.
If you want to contribute to the development of Escoria, please read our [Contribution guidelines](https://github.com/godot-escoria/.github/blob/main/CONTRIBUTING.md).
## Video export.
- 1280 x 720 | 25fps
- Export to MP4
- Convert to ogv `ffmpeg -i input.mp4 -c:v libtheora -q:v 6 -c:a libvorbis -q:a 4 output.ogv`
This is the demo game that acts as a testing ground for future Escoria development and a general showcase of its features.
## Art credits
### Characters
- Mark spritesheet by Marco Giorgini - marcogiorgini.com
Licence : CC0 Licence
https://opengameart.org/content/mark-2d-adventure-game-sprite
with some additions (talk animations) by Julian Murgia
- Worker spritesheet based on Mark spritesheet by Marco Giorgini - marcogiorgini.com
Licence: CC0 Licence
edited by Julian Murgia
### Items
* Generic items by Kenney
* Animal pack redux by Kenney
Licence: CC0 Licence
https://www.kenney.nl/assets/generic-items
## Sound credits
* Concrete footstep
Licence: CC0 Licence
https://www.kenney.nl/
* “Game Menu Looping” (Licence CC-BY 4.0)
* “Mystical Ocean Puzzle Game” (Licence CC-BY 4.0)
by Eric Matyas
www.soundimage.org
## Cursors
* Pointers part 4 by "yd"
Licence: CC0 Licence
https://opengameart.org/content/pointers-part-4x
edited by Julian Murgia
## Font
These fonts are provided as an example. Please mind checking the licence before redistributing with your game.
- Caslon Antique
https://www.1001fonts.com/caslon-antique-font.html#license
Licence: Free for personal use - Free for commercial use
This is the font used in LucasArt's game Curse of Monkey Island.
- Onesize
https://www.whatfontis.com/Onesize.font
Licence: Free for personal use
This is the font used in LucasArt's games The Secret of Monkey Island and Monkey Island 2: Lechuck's Revenge.
## Export
- Web: `godot -v --export "HTML5" ../gymkhana-export-html/index.html`
- Linux: `godot -v --export "Linux/X11" ../LasGymkhanikasDeUli-1.0-RC1.appimage`
- ~~Windows: godot -v --export "Windows Desktop x64" ../LasGymkhanikasDeUli-1.0-RC1.exe~~

1
addons/escoria-core Symbolic link
View File

@@ -0,0 +1 @@
../../escoria-demo-game/addons/escoria-core

View File

@@ -1,300 +0,0 @@
extends Control
func _test_basic() -> bool:
var esc = """
:test
# first group
>
say player "Test"
# Second group
> [test]
say player "Test2 BLANK"
say player "Test3" [test2]
# Third group
>
say player "Test4"
# Fourth group
>
say player "Test5"
say player "Test 6"
say player TEST:"Test 7"
"""
var script = escoria.esc_compiler.compile(esc.split("\n"))
var subject = script
assert(subject is ESCScript)
subject = script.events.keys()
assert(subject.size() == 1)
assert(subject[0] == "test")
subject = script.events["test"].statements
assert(subject.size() == 2)
subject = script.events["test"].statements[0]
assert(subject is ESCGroup)
assert(subject.statements.size() == 4)
subject = script.events["test"].statements[0].statements[0]
assert(subject is ESCCommand)
assert(subject.name == "say")
assert(subject.parameters.size() == 2)
assert(subject.parameters[0] == "player")
assert(subject.parameters[1] == '"Test"')
subject = script.events["test"].statements[0].statements[1]
assert(subject is ESCGroup)
assert(subject.conditions.size() == 1)
assert(subject.conditions[0] is ESCCondition)
assert(subject.conditions[0].flag == "test")
subject = script.events["test"].statements[0].statements[1].statements[0]
assert(subject is ESCCommand)
assert(subject.name == "say")
assert(subject.parameters.size() == 2)
assert(subject.parameters[0] == "player")
assert(subject.parameters[1] == '"Test2 BLANK"')
subject = script.events["test"].statements[0].statements[2]
assert(subject is ESCCommand)
assert(subject.name == "say")
assert(subject.parameters.size() == 2)
assert(subject.parameters[0] == "player")
assert(subject.parameters[1] == '"Test3"')
assert(subject.conditions.size() == 1)
assert(subject.conditions[0].flag == "test2")
subject = script.events["test"].statements[0].statements[3]
assert(subject is ESCGroup)
assert(subject.statements.size() == 1)
subject = script.events["test"].statements[1]
assert(subject is ESCGroup)
assert(subject.statements.size() == 3)
subject = script.events["test"].statements[1].statements[1]
assert(subject is ESCCommand)
assert(subject.name == "say")
assert(subject.parameters[1] == '"Test 6"')
subject = script.events["test"].statements[1].statements[2]
assert(subject is ESCCommand)
assert(subject.name == "say")
assert(subject.parameters[1] == "TEST:\"Test 7\"")
return true
func _test_conditions() -> bool:
var esc = """
:test
say player "Test" [flag]
say player "Test" [flag1,flag2]
say player "Test" [!flag]
say player "Test" [i/flag]
say player "Test" [i/flag,flag]
say player "Test" [i/flag,flag,!flag2]
say player "Test" [eq flag 3]
say player "Test" [eq flag 3,gt flag 5]
say player "Test" [!eq flag 3]
"""
var script = escoria.esc_compiler.compile(esc.split("\n"))
var subject = script.events["test"].statements[0]
assert(subject is ESCCommand)
assert(subject.conditions.size() == 1)
subject = script.events["test"].statements[0].conditions[0]
assert(subject.flag == "flag")
assert(not subject.negated)
assert(not subject.inventory)
assert(subject.comparison == ESCCondition.COMPARISON_NONE)
subject = script.events["test"].statements[1].conditions
assert(subject.size() == 2)
assert(subject[0].flag == "flag1")
assert(subject[1].flag == "flag2")
subject = script.events["test"].statements[2].conditions
assert(subject.size() == 1)
assert(subject[0].flag == "flag")
assert(subject[0].negated)
subject = script.events["test"].statements[3].conditions
assert(subject.size() == 1)
assert(subject[0].flag == "flag")
assert(subject[0].inventory)
subject = script.events["test"].statements[4].conditions
assert(subject.size() == 2)
assert(subject[0].flag == "flag")
assert(subject[0].inventory)
assert(subject[1].flag == "flag")
assert(not subject[1].inventory)
subject = script.events["test"].statements[5].conditions
assert(subject.size() == 3)
assert(subject[0].flag == "flag")
assert(subject[0].inventory)
assert(subject[1].flag == "flag")
assert(not subject[1].inventory)
assert(subject[2].flag == "flag2")
assert(not subject[2].inventory)
assert(subject[2].negated)
subject = script.events["test"].statements[6].conditions
assert(subject.size() == 1)
assert(subject[0].flag == "flag")
assert(subject[0].comparison == ESCCondition.COMPARISON_EQ)
assert(subject[0].comparison_value == 3)
subject = script.events["test"].statements[7].conditions
assert(subject.size() == 2)
assert(subject[0].flag == "flag")
assert(subject[0].comparison == ESCCondition.COMPARISON_EQ)
assert(subject[0].comparison_value == 3)
assert(subject[1].flag == "flag")
assert(subject[1].comparison == ESCCondition.COMPARISON_GT)
assert(subject[1].comparison_value == 5)
subject = script.events["test"].statements[8].conditions
assert(subject.size() == 1)
assert(subject[0].flag == "flag")
assert(subject[0].comparison == ESCCondition.COMPARISON_EQ)
assert(subject[0].comparison_value == 3)
assert(subject[0].negated)
return true
func _test_event_flags() -> bool:
var esc = """
:test | TK
:test2 | TK NO_TT
:test3 | TK NO_TT NO_UI
"""
var script = escoria.esc_compiler.compile(esc.split("\n"))
var subject = script.events
assert(subject.keys().size() == 3)
assert("test" in subject.keys())
assert("test2" in subject.keys())
assert("test3" in subject.keys())
subject = script.events["test"]
assert(subject.name == "test")
assert(subject.flags & ESCEvent.FLAG_TK != 0)
assert(subject.flags & ESCEvent.FLAG_NO_TT == 0)
subject = script.events["test2"]
assert(subject.name == "test2")
assert(subject.flags & ESCEvent.FLAG_TK != 0)
assert(subject.flags & ESCEvent.FLAG_NO_TT != 0)
subject = script.events["test3"]
assert(subject.name == "test3")
assert(subject.flags & ESCEvent.FLAG_TK != 0)
assert(subject.flags & ESCEvent.FLAG_NO_TT != 0)
assert(subject.flags & ESCEvent.FLAG_NO_UI != 0)
return true
func _test_dialog() -> bool:
var esc = """
:test
?
- "Option 1"
say player "test"
say player "testb"
say player "testb?"
- "Option 2" [flag]
say player "test2"
?
- "Suboption 1"
say player "test21"
- "Suboption 2"
say player "test22"
!
- "Option 3"
>
say player "test3"
- TEST:"Option 4"
say player "test4"
!
"""
var script = escoria.esc_compiler.compile(esc.split("\n"))
var subject = script.events["test"].statements
assert(subject.size() == 1)
assert(subject[0] is ESCDialog)
assert(subject[0].options.size() == 4)
subject = script.events["test"].statements[0].options[0]
assert(subject is ESCDialogOption)
assert(subject.option == "Option 1")
subject = script.events["test"].statements[0].options[0].statements
assert(subject.size() == 3)
assert(subject[0] is ESCCommand)
assert(subject[0].name == "say")
assert(subject[0].parameters.size() == 2)
assert(subject[1] is ESCCommand)
assert(subject[1].name == "say")
assert(subject[1].parameters.size() == 2)
assert(subject[1].parameters[1] == '"testb"')
assert(subject[2] is ESCCommand)
assert(subject[2].name == "say")
assert(subject[2].parameters.size() == 2)
assert(subject[2].parameters[1] == '"testb?"')
subject = script.events["test"].statements[0].options[1]
assert(subject is ESCDialogOption)
assert(subject.option == "Option 2")
assert(subject.conditions.size() == 1)
assert(subject.conditions[0].flag == "flag")
subject = script.events["test"].statements[0].options[1].statements
assert(subject.size() == 2)
assert(subject[0] is ESCCommand)
assert(subject[0].name == "say")
assert(subject[0].parameters.size() == 2)
assert(subject[1] is ESCDialog)
assert(subject[1].options.size() == 2)
subject = script.events["test"].statements[0].options[2]
assert(subject is ESCDialogOption)
assert(subject.option == "Option 3")
subject = script.events["test"].statements[0].options[2].statements
assert(subject.size() == 1)
assert(subject[0] is ESCGroup)
assert(subject[0].statements.size() == 1)
assert(subject[0].statements[0] is ESCCommand)
assert(subject[0].statements[0].parameters.size() == 2)
subject = script.events["test"].statements[0].options[3]
assert(subject is ESCDialogOption)
assert(subject.option == "TEST")
return true
func _on_BasicFunctionality_pressed():
$VBoxContainer/VBoxContainer/BasicFunctionality.pressed = self._test_basic()
func _on_Conditions_pressed():
$VBoxContainer/VBoxContainer/Conditions.pressed = self._test_conditions()
func _on_EventFlags_pressed():
$VBoxContainer/VBoxContainer/EventFlags.pressed = self._test_event_flags()
func _on_Dialog_pressed():
$VBoxContainer/VBoxContainer/Dialog.pressed = self._test_dialog()

View File

@@ -1,58 +0,0 @@
[gd_scene load_steps=2 format=2]
[ext_resource path="res://addons/escoria-core/_test/test_esc_compiler.gd" type="Script" id=1]
[node name="Testsuite" type="Control"]
anchor_right = 1.0
anchor_bottom = 1.0
script = ExtResource( 1 )
__meta__ = {
"_edit_use_anchors_": false
}
[node name="VBoxContainer" type="VBoxContainer" parent="."]
anchor_right = 1.0
anchor_bottom = 1.0
margin_right = 1.0
margin_bottom = 1.0
size_flags_horizontal = 3
size_flags_vertical = 3
__meta__ = {
"_edit_use_anchors_": false
}
[node name="VBoxContainer" type="VBoxContainer" parent="VBoxContainer"]
margin_right = 1281.0
margin_bottom = 172.0
[node name="BasicFunctionality" type="CheckButton" parent="VBoxContainer/VBoxContainer"]
margin_right = 1281.0
margin_bottom = 40.0
text = "Basic Functionality"
align = 1
[node name="Conditions" type="CheckButton" parent="VBoxContainer/VBoxContainer"]
margin_top = 44.0
margin_right = 1281.0
margin_bottom = 84.0
text = "Check conditions"
align = 1
[node name="EventFlags" type="CheckButton" parent="VBoxContainer/VBoxContainer"]
margin_top = 88.0
margin_right = 1281.0
margin_bottom = 128.0
text = "Check event flags"
align = 1
[node name="Dialog" type="CheckButton" parent="VBoxContainer/VBoxContainer"]
margin_top = 132.0
margin_right = 1281.0
margin_bottom = 172.0
text = "Check dialogs"
align = 1
[connection signal="pressed" from="VBoxContainer/VBoxContainer/BasicFunctionality" to="." method="_on_BasicFunctionality_pressed"]
[connection signal="pressed" from="VBoxContainer/VBoxContainer/Conditions" to="." method="_on_Conditions_pressed"]
[connection signal="pressed" from="VBoxContainer/VBoxContainer/EventFlags" to="." method="_on_EventFlags_pressed"]
[connection signal="pressed" from="VBoxContainer/VBoxContainer/Dialog" to="." method="_on_Dialog_pressed"]

View File

@@ -1,20 +0,0 @@
extends Control
func _on_CheckESCMigrationManager_pressed() -> bool:
var savegame: ESCSaveGame = ESCSaveGame.new()
savegame.globals["test"] = "testa"
var migration_manager: ESCMigrationManager = ESCMigrationManager.new()
savegame = migration_manager.migrate(
savegame,
"1.0.0",
"2.0.0",
"res://addons/escoria-core/_test/testversions"
)
assert(savegame.globals["test"] == "testc")
return true

View File

@@ -1,25 +0,0 @@
[gd_scene load_steps=2 format=2]
[ext_resource path="res://addons/escoria-core/_test/test_migrations.gd" type="Script" id=1]
[node name="Control" type="Control"]
anchor_right = 1.0
anchor_bottom = 1.0
script = ExtResource( 1 )
__meta__ = {
"_edit_use_anchors_": false
}
[node name="VBoxContainer" type="VBoxContainer" parent="."]
anchor_right = 1.0
anchor_bottom = 1.0
__meta__ = {
"_edit_use_anchors_": false
}
[node name="CheckESCMigrationManager" type="CheckButton" parent="VBoxContainer"]
margin_right = 1280.0
margin_bottom = 40.0
text = "Check ESCMigrationManager"
[connection signal="pressed" from="VBoxContainer/CheckESCMigrationManager" to="." method="_on_CheckESCMigrationManager_pressed"]

View File

@@ -1,5 +0,0 @@
extends ESCMigration
func migrate():
self._savegame.globals["test"] = "testb"

View File

@@ -1,5 +0,0 @@
extends ESCMigration
func migrate():
self._savegame.globals["test"] = "testc"

View File

@@ -1,21 +0,0 @@
[gd_resource type="AudioBusLayout" format=2]
[resource]
bus/1/name = "SFX"
bus/1/solo = false
bus/1/mute = false
bus/1/bypass_fx = false
bus/1/volume_db = 0.0
bus/1/send = "Master"
bus/2/name = "Music"
bus/2/solo = false
bus/2/mute = false
bus/2/bypass_fx = false
bus/2/volume_db = 0.0
bus/2/send = "Master"
bus/3/name = "Speech"
bus/3/solo = false
bus/3/mute = false
bus/3/bypass_fx = false
bus/3/volume_db = 0.0
bus/3/send = "Master"

View File

@@ -1,17 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<svg width="16px" height="16px" viewBox="0 0 16 16" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<title>esc_background</title>
<defs>
<linearGradient x1="0%" y1="78.125%" x2="100%" y2="21.875%" id="linearGradient-1">
<stop stop-color="#D4FF2A" offset="0%"></stop>
<stop stop-color="#81D135" offset="100%"></stop>
</linearGradient>
</defs>
<g id="esc_background" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
<rect id="Rectangle" stroke="#1B2F0D" fill="url(#linearGradient-1)" transform="translate(7.500000, 4.835358) scale(1, -1) translate(-7.500000, -4.835358) " x="3.5" y="1.83535782" width="8" height="6" rx="1"></rect>
<line x1="3.5" y1="8.5" x2="11.5" y2="8.5" id="Line-3" stroke="#1B2F0D" stroke-linecap="round" stroke-linejoin="round"></line>
<line x1="7.5" y1="8.5" x2="7.5" y2="14.5" id="Line-2" stroke="#1B2F0D" stroke-linecap="round"></line>
<line x1="6.5" y1="8.5" x2="3.5" y2="14.5" id="Line" stroke="#1B2F0D" stroke-linecap="round" stroke-linejoin="bevel"></line>
<line x1="12.1583333" y1="8.5" x2="9.15833333" y2="14.5" id="Line-Copy" stroke="#1B2F0D" stroke-linecap="round" stroke-linejoin="bevel" transform="translate(10.329167, 11.500000) scale(-1, 1) translate(-10.329167, -11.500000) "></line>
</g>
</svg>

Before

Width:  |  Height:  |  Size: 1.4 KiB

View File

@@ -1,24 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<svg width="16px" height="16px" viewBox="0 0 16 16" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<title>esc_exit</title>
<defs>
<linearGradient x1="32%" y1="0%" x2="68%" y2="100%" id="linearGradient-1">
<stop stop-color="#D4FF2A" offset="0%"></stop>
<stop stop-color="#81D135" offset="100%"></stop>
</linearGradient>
<linearGradient x1="36.7305357%" y1="0%" x2="63.2694643%" y2="100%" id="linearGradient-2">
<stop stop-color="#D4FF2A" offset="0%"></stop>
<stop stop-color="#81D135" offset="100%"></stop>
</linearGradient>
</defs>
<g id="esc_exit" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
<g id="Group" transform="translate(4.000000, 2.000000)" fill-rule="nonzero">
<polygon id="Rectangle-Copy" fill="url(#linearGradient-1)" points="6 10 0 10 0 0 6 0"></polygon>
<path d="M7,0 L7,10 L0,10 L0,0 L7,0 Z M6,1 L1,1 L1,9 L6,9 L6,1 Z" id="Rectangle" fill="#1B2F0D"></path>
</g>
<g id="Group-Copy" transform="translate(4.000000, 2.000000)" fill-rule="nonzero">
<polygon id="Rectangle-Copy" fill="url(#linearGradient-2)" points="6 11.6468788 0 10 0 0 6 1.64687882"></polygon>
<path d="M7,1.92135862 L7,11.9213586 L0,10 L0,0 L7,1.92135862 Z M6,2.64687882 L1,1.2744798 L1,9.2744798 L6,10.6468788 L6,2.64687882 Z" id="Rectangle" fill="#1B2F0D"></path>
</g>
</g>
</svg>

Before

Width:  |  Height:  |  Size: 1.5 KiB

View File

@@ -1,14 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<svg width="16px" height="16px" viewBox="0 0 16 16" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<title>esc_item</title>
<defs>
<linearGradient x1="0%" y1="0%" x2="100%" y2="100%" id="linearGradient-1">
<stop stop-color="#D4FF2A" offset="0%"></stop>
<stop stop-color="#81D135" offset="100%"></stop>
</linearGradient>
</defs>
<g id="esc_item" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
<path d="M13,3 L13,13 L3,13 L3,3 L13,3 Z" id="Rectangle-Copy" fill="url(#linearGradient-1)" fill-rule="nonzero"></path>
<path d="M13,3 L13,13 L3,13 L3,3 L13,3 Z M12,4 L4,4 L4,12 L12,12 L12,4 Z" id="Rectangle" fill="#1B2F0D" fill-rule="nonzero"></path>
</g>
</svg>

Before

Width:  |  Height:  |  Size: 832 B

View File

@@ -1,15 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<svg width="16px" height="16px" viewBox="0 0 16 16" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<title>esc_location</title>
<defs>
<linearGradient x1="30.5473974%" y1="11.0848793%" x2="65.1733111%" y2="67.1344559%" id="linearGradient-1">
<stop stop-color="#D4FF2A" offset="0%"></stop>
<stop stop-color="#81D135" offset="100%"></stop>
</linearGradient>
</defs>
<g id="esc_location" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
<path d="M8,1 C10.7614237,1 13,3.23857625 13,6 C13,7.03229916 12.6871639,7.99153151 12.1511242,8.78806444 L12,9 L8,15 L4,9 C3.37230087,8.16533354 3,7.12614453 3,6 C3,3.3112453 5.12230671,1.11818189 7.78311038,1.00461951 L8,1 Z M8,2 C5.790861,2 4,3.790861 4,6 C4,6.79127405 4.22941289,7.54564844 4.67538853,8.22257987 L4.83205029,8.4452998 L8,13.196 L11.1857974,8.41941917 L11.3214939,8.22975135 C11.7616659,7.57567374 12,6.80688718 12,6 C12,3.790861 10.209139,2 8,2 Z" id="Oval-2" fill="#1B2F0D" fill-rule="nonzero"></path>
<path d="M8,2 C10.209139,2 12,3.790861 12,6 C12,6.80688718 11.7616659,7.57567374 11.3214939,8.22975135 L11.3214939,8.22975135 L11.1857974,8.41941917 L8,13.196 L4.83205029,8.4452998 L4.67538853,8.22257987 C4.22941289,7.54564844 4,6.79127405 4,6 C4,3.790861 5.790861,2 8,2 Z M8,5 C7.44771525,5 7,5.44771525 7,6 C7,6.55228475 7.44771525,7 8,7 C8.55228475,7 9,6.55228475 9,6 C9,5.44771525 8.55228475,5 8,5 Z" id="Path-2" fill="url(#linearGradient-1)" fill-rule="nonzero"></path>
<path d="M8,4 C9.1045695,4 10,4.8954305 10,6 C10,7.1045695 9.1045695,8 8,8 C6.8954305,8 6,7.1045695 6,6 C6,4.8954305 6.8954305,4 8,4 Z M8,5 C7.44771525,5 7,5.44771525 7,6 C7,6.55228475 7.44771525,7 8,7 C8.55228475,7 9,6.55228475 9,6 C9,5.44771525 8.55228475,5 8,5 Z" id="Oval" fill="#1B2F0D" fill-rule="nonzero"></path>
</g>
</svg>

Before

Width:  |  Height:  |  Size: 1.9 KiB

View File

@@ -1,14 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<svg width="16px" height="16px" viewBox="0 0 16 16" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<title>esc_player</title>
<defs>
<linearGradient x1="0%" y1="9.5%" x2="100%" y2="90.5%" id="linearGradient-1">
<stop stop-color="#D4FF2A" offset="0%"></stop>
<stop stop-color="#81D135" offset="100%"></stop>
</linearGradient>
</defs>
<g id="esc_player" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
<path d="M8.48310297,6.50090902 C9.93623249,6.52397585 10.9918184,6.58559799 11.6732841,7.31692964 C12.2190722,7.90265542 12.5,8.89312953 12.5000018,10.4986497 C12.4997458,10.5934498 12.499603,10.6858861 12.4995224,10.7760225 L12.4990955,11.5268775 C12.4959135,12.9882048 12.4598451,13.6884582 12.0405176,14.0658529 C11.531509,14.5239607 10.5323938,14.4945664 8.73719674,14.4993779 C8.52323835,14.4990469 8.31890122,14.4989282 8.12369826,14.4988553 L7.30529662,14.498275 C5.19409137,14.4944003 4.39593747,14.4586625 3.95948237,14.0658529 C3.4625018,13.6185704 3.50584875,12.7218979 3.50069164,11.1622589 L3.50069164,11.1622589 L3.5,10.5 C3.5,8.89312953 3.78092784,7.90265542 4.32671587,7.31692964 C5.0007391,6.59358511 6.0388866,6.52417866 7.1903288,6.50449816 L7.1903288,6.50449816 Z" id="Oval-Copy" stroke="#1B2F0D" fill="url(#linearGradient-1)"></path>
<ellipse id="Oval" stroke="#1B2F0D" fill="url(#linearGradient-1)" cx="8" cy="5.5" rx="4.5" ry="4"></ellipse>
</g>
</svg>

Before

Width:  |  Height:  |  Size: 1.5 KiB

View File

@@ -1,18 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<svg width="16px" height="16px" viewBox="0 0 16 16" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<title>esc_room</title>
<defs>
<linearGradient x1="0%" y1="14.2011834%" x2="100%" y2="85.7988166%" id="linearGradient-1">
<stop stop-color="#D4FF2A" offset="0%"></stop>
<stop stop-color="#81D135" offset="100%"></stop>
</linearGradient>
</defs>
<g id="esc_room" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
<path d="M14.5,2.84069305 L14.5,5.54514386 L14.5,10.8358258 L14.5,13.840693 L1.5,13.840693 L1.5,10.3358258 L2,10.3358258 C4.04857623,10.3358258 5.11403175,9.3925116 5.30106353,7.35966319 L5.315,7.16769305 L1.5,7.16854556 L1.5,2.84069305 L14.5,2.84069305 Z" id="Path-Copy" fill="url(#linearGradient-1)" fill-rule="nonzero"></path>
<g id="Group" transform="translate(1.500000, 2.840693)" fill="#1B2F0D" fill-rule="nonzero">
<path d="M13,0 L13,2.70445081 L12,2.70445081 L12,1 L1,1 L1,3.327 L4.83105783,3.32785252 L4.83105783,3.82785252 C4.83105783,6.6121956 3.58466403,8.20663376 1.2004667,8.45950961 L1,8.477 L1,10 L12,10 L12,7.99513276 L13,7.99513276 L13,11 L0,11 L0,7.49513276 L0.5,7.49513276 C2.54857623,7.49513276 3.61403175,6.55181855 3.80106353,4.51897014 L3.815,4.327 L0,4.32785252 L0,0 L13,0 Z" id="Rectangle"></path>
<polygon id="Line-3" points="13.5 2.20445081 13.5 3.20445081 11.5 3.20445081 11.5 2.20445081"></polygon>
<polygon id="Line" points="13.5 7.49513276 13.5 8.49513276 11.5 8.49513276 11.5 7.49513276"></polygon>
</g>
</g>
</svg>

Before

Width:  |  Height:  |  Size: 1.6 KiB

View File

@@ -1,14 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<svg width="16px" height="16px" viewBox="0 0 16 16" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<title>esc_terrain</title>
<defs>
<linearGradient x1="23.0422805%" y1="44.7555583%" x2="96.9021896%" y2="75.5102041%" id="linearGradient-1">
<stop stop-color="#D4FF2A" offset="0%"></stop>
<stop stop-color="#81D135" offset="100%"></stop>
</linearGradient>
</defs>
<g id="esc_terrain" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
<path d="M10.5986658,2.5 L15,12.5 L1,12.5 L5.77792486,5.1574418 L7.54781394,7.5 L10.5986658,2.5 Z" id="Rectangle-Copy" fill="url(#linearGradient-1)" fill-rule="nonzero"></path>
<path d="M10.5986658,2.5 L15,12.5 L1,12.5 L5.77792486,5.1574418 L7.54781394,7.5 L10.5986658,2.5 Z M13.467,11.499 L10.454,4.655 L7.63592431,9.27547964 L5.839,6.897 L2.844,11.499 L13.467,11.499 Z" id="Rectangle" fill="#1B2F0D" fill-rule="nonzero"></path>
</g>
</svg>

Before

Width:  |  Height:  |  Size: 1.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 32 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 110 KiB

View File

@@ -1,594 +0,0 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
<svg
width="210mm"
height="297mm"
viewBox="0 0 210 297"
version="1.1"
id="svg3926"
inkscape:version="1.1.1 (3bf5ae0d25, 2021-09-20)"
sodipodi:docname="escoria-logo.svg"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:xlink="http://www.w3.org/1999/xlink"
xmlns="http://www.w3.org/2000/svg"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:dc="http://purl.org/dc/elements/1.1/">
<defs
id="defs3920">
<inkscape:perspective
sodipodi:type="inkscape:persp3d"
inkscape:vp_x="0 : 148.5 : 1"
inkscape:vp_y="0 : 1000 : 0"
inkscape:vp_z="210 : 148.5 : 1"
inkscape:persp3d-origin="105 : 99 : 1"
id="perspective4883" />
<linearGradient
inkscape:collect="always"
id="linearGradient4283">
<stop
style="stop-color:#71c837;stop-opacity:1;"
offset="0"
id="stop4279" />
<stop
style="stop-color:#d4ff2a;stop-opacity:1"
offset="1"
id="stop4281" />
</linearGradient>
<linearGradient
inkscape:collect="always"
xlink:href="#linearGradient4283"
id="linearGradient6342"
gradientUnits="userSpaceOnUse"
x1="-313.79291"
y1="4263.0801"
x2="-313.79291"
y2="4156.5371" />
<linearGradient
inkscape:collect="always"
xlink:href="#linearGradient4283"
id="linearGradient6344"
gradientUnits="userSpaceOnUse"
x1="-313.79291"
y1="4263.0801"
x2="-313.79291"
y2="4156.5371" />
<linearGradient
inkscape:collect="always"
xlink:href="#linearGradient4283"
id="linearGradient6346"
gradientUnits="userSpaceOnUse"
x1="-313.79291"
y1="4263.0801"
x2="-313.79291"
y2="4156.5371" />
<linearGradient
inkscape:collect="always"
xlink:href="#linearGradient4283"
id="linearGradient6348"
gradientUnits="userSpaceOnUse"
x1="-313.79291"
y1="4263.0801"
x2="-313.79291"
y2="4156.5371" />
<linearGradient
inkscape:collect="always"
xlink:href="#linearGradient4283"
id="linearGradient6350"
gradientUnits="userSpaceOnUse"
x1="-310.535"
y1="4116.6665"
x2="-607.86578"
y2="4116.6665" />
<linearGradient
inkscape:collect="always"
xlink:href="#linearGradient4283"
id="linearGradient6352"
gradientUnits="userSpaceOnUse"
x1="-6179.8599"
y1="6275.8198"
x2="-6179.8599"
y2="6166.0386" />
<linearGradient
inkscape:collect="always"
xlink:href="#linearGradient4283"
id="linearGradient6354"
gradientUnits="userSpaceOnUse"
x1="-6179.8599"
y1="6275.8198"
x2="-6179.8599"
y2="6166.0386" />
<linearGradient
inkscape:collect="always"
xlink:href="#linearGradient4283"
id="linearGradient6356"
gradientUnits="userSpaceOnUse"
x1="-6179.8599"
y1="6275.8198"
x2="-6179.8599"
y2="6166.0386" />
<linearGradient
inkscape:collect="always"
xlink:href="#linearGradient4283"
id="linearGradient6358"
gradientUnits="userSpaceOnUse"
x1="-6179.8599"
y1="6275.8198"
x2="-6179.8599"
y2="6166.0386" />
<linearGradient
inkscape:collect="always"
xlink:href="#linearGradient4283"
id="linearGradient1300"
gradientUnits="userSpaceOnUse"
x1="-310.535"
y1="4116.6665"
x2="-607.86578"
y2="4116.6665" />
<linearGradient
inkscape:collect="always"
xlink:href="#linearGradient4283"
id="linearGradient1370"
gradientUnits="userSpaceOnUse"
x1="-310.535"
y1="4116.6665"
x2="-607.86578"
y2="4116.6665" />
<linearGradient
inkscape:collect="always"
xlink:href="#linearGradient4283"
id="linearGradient283"
gradientUnits="userSpaceOnUse"
x1="-310.535"
y1="4116.6665"
x2="-607.86578"
y2="4116.6665" />
<linearGradient
inkscape:collect="always"
xlink:href="#linearGradient4283"
id="linearGradient7072"
gradientUnits="userSpaceOnUse"
x1="-310.535"
y1="4116.6665"
x2="-607.86578"
y2="4116.6665" />
<linearGradient
inkscape:collect="always"
xlink:href="#linearGradient4283"
id="linearGradient12122"
gradientUnits="userSpaceOnUse"
gradientTransform="matrix(0.26458333,0,0,0.26458333,109.17355,-80.073949)"
x1="-313.79291"
y1="4263.0801"
x2="-313.79291"
y2="4156.5371" />
<linearGradient
inkscape:collect="always"
xlink:href="#linearGradient4283"
id="linearGradient12124"
gradientUnits="userSpaceOnUse"
gradientTransform="matrix(0.26458333,0,0,0.26458333,109.17355,-80.073949)"
x1="-313.79291"
y1="4263.0801"
x2="-313.79291"
y2="4156.5371" />
<linearGradient
inkscape:collect="always"
xlink:href="#linearGradient4283"
id="linearGradient12126"
gradientUnits="userSpaceOnUse"
gradientTransform="matrix(0.26458333,0,0,0.26458333,109.17355,-80.073949)"
x1="-313.79291"
y1="4263.0801"
x2="-313.79291"
y2="4156.5371" />
<linearGradient
inkscape:collect="always"
xlink:href="#linearGradient4283"
id="linearGradient12128"
gradientUnits="userSpaceOnUse"
gradientTransform="matrix(0.03706806,0.06833511,-0.06833511,0.03706806,265.09351,916.52134)"
x1="-310.535"
y1="4116.6665"
x2="-607.86578"
y2="4116.6665" />
<linearGradient
inkscape:collect="always"
xlink:href="#linearGradient4283"
id="linearGradient12130"
gradientUnits="userSpaceOnUse"
gradientTransform="matrix(0.26458333,0,0,0.26458333,1519.0252,-611.8713)"
x1="-6179.8599"
y1="6275.8198"
x2="-6179.8599"
y2="6166.0386" />
<linearGradient
inkscape:collect="always"
xlink:href="#linearGradient4283"
id="linearGradient12132"
gradientUnits="userSpaceOnUse"
gradientTransform="matrix(0.26458333,0,0,0.26458333,1519.0252,-611.8713)"
x1="-6179.8599"
y1="6275.8198"
x2="-6179.8599"
y2="6166.0386" />
<linearGradient
inkscape:collect="always"
xlink:href="#linearGradient4283"
id="linearGradient12134"
gradientUnits="userSpaceOnUse"
gradientTransform="matrix(0.26458333,0,0,0.26458333,1519.0252,-611.8713)"
x1="-6179.8599"
y1="6275.8198"
x2="-6179.8599"
y2="6166.0386" />
</defs>
<sodipodi:namedview
id="base"
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1.0"
inkscape:pageopacity="0.0"
inkscape:pageshadow="2"
inkscape:zoom="0.37763633"
inkscape:cx="-974.48251"
inkscape:cy="1469.6679"
inkscape:document-units="mm"
inkscape:current-layer="layer1"
showgrid="false"
showborder="false"
inkscape:window-width="1920"
inkscape:window-height="1011"
inkscape:window-x="0"
inkscape:window-y="32"
inkscape:window-maximized="1"
inkscape:lockguides="false"
inkscape:pagecheckerboard="0" />
<metadata
id="metadata3923">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
<dc:title />
</cc:Work>
</rdf:RDF>
</metadata>
<g
inkscape:label="Layer 1"
inkscape:groupmode="layer"
id="layer1">
<rect
style="opacity:0.509;fill:none;fill-opacity:1;fill-rule:nonzero;stroke:#ff0000;stroke-width:3.05878;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
id="rect4471"
width="690.93744"
height="290.39264"
x="-492.16605"
y="-105.54419" />
<g
id="g1885"
transform="matrix(0.58267536,0,0,0.58267536,15.656304,-914.40014)" />
<g
transform="matrix(1.9244583,0,0,1.9244583,-58.446902,-1925.0775)"
id="g2198">
<flowRoot
xml:space="preserve"
id="flowRoot1729"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:40px;line-height:1;font-family:Jellee;-inkscape-font-specification:Jellee;letter-spacing:0px;word-spacing:0px;fill:#d4ff2a;fill-opacity:1;stroke:#1b2f0d;stroke-width:56.6929;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
transform="matrix(0.26458333,0,0,0.26458333,1519.0252,-612.12873)"><flowRegion
style="fill:#d4ff2a;fill-opacity:1;stroke:#1b2f0d;stroke-width:56.6929;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
id="flowRegion1725"><rect
style="fill:#d4ff2a;fill-opacity:1;stroke:#1b2f0d;stroke-width:56.69291306;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
id="rect1723"
width="2296.6829"
height="605.28339"
x="-6363.9609"
y="6123.1787" /></flowRegion><flowPara
id="flowPara1727"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:192px;font-family:Jellee;-inkscape-font-specification:Jellee;fill:#d4ff2a;fill-opacity:1;stroke:#1b2f0d;stroke-width:56.6929;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1">ESC</flowPara></flowRoot>
<flowRoot
xml:space="preserve"
id="flowRoot1737"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:40px;line-height:1;font-family:Jellee;-inkscape-font-specification:Jellee;letter-spacing:0px;word-spacing:0px;fill:#d4ff2a;fill-opacity:1;stroke:#1b2f0d;stroke-width:56.6929;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
transform="matrix(0.26458333,0,0,0.26458333,109.17355,-80.073949)"><flowRegion
id="flowRegion1733"
style="fill:#d4ff2a;fill-opacity:1;stroke:#1b2f0d;stroke-width:56.6929;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"><rect
id="rect1731"
width="548.71484"
height="203.64674"
x="-478.00418"
y="4112.167"
style="fill:#d4ff2a;fill-opacity:1;stroke:#1b2f0d;stroke-width:56.69291306;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" /></flowRegion><flowPara
id="flowPara1735"
style="font-size:192px;stroke:#1b2f0d;stroke-width:56.6929;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1">RIA</flowPara></flowRoot>
<g
aria-label="RIA"
transform="matrix(0.26458333,0,0,0.26458333,109.17355,-80.073949)"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:40px;line-height:1;font-family:Jellee;-inkscape-font-specification:Jellee;letter-spacing:0px;word-spacing:0px;fill:url(#linearGradient6348);fill-opacity:1;stroke:#1b2f0d;stroke-opacity:1"
id="flowRoot1715">
<path
inkscape:connector-curvature="0"
d="m -447.47591,4263.08 q -7.68,0 -13.056,-5.376 -5.376,-5.376 -5.376,-13.056 v -111.744 q 0,-7.872 4.224,-12.096 4.224,-4.224 12.096,-4.224 h 47.04 q 24.96,0 39.168,11.712 14.4,11.52 14.4,32.64 0,14.016 -6.72,24.576 -6.72,10.56 -19.008,16.512 v 0.384 l 18.048,34.752 q 2.112,3.648 2.112,8.256 0,7.296 -5.184,12.48 -5.184,5.184 -12.672,5.184 -4.992,0 -9.408,-2.496 -4.224,-2.688 -6.336,-7.104 l -21.504,-41.472 h -19.392 v 32.64 q 0,7.68 -5.376,13.056 -5.376,5.376 -13.056,5.376 z m 37.056,-80.256 q 10.752,0 17.088,-4.224 6.528,-4.224 6.528,-15.168 0,-11.328 -6.336,-15.552 -6.336,-4.224 -17.28,-4.224 h -18.624 v 39.168 z"
style="font-size:192px;fill:url(#linearGradient6342);fill-opacity:1;stroke:#1b2f0d;stroke-opacity:1"
id="path2076" />
<path
inkscape:connector-curvature="0"
d="m -313.79291,4263.08 q -7.68,0 -13.056,-5.376 -5.376,-5.376 -5.376,-13.056 V 4133.48 q 0,-7.68 5.376,-13.056 5.376,-5.376 13.056,-5.376 7.68,0 13.056,5.376 5.376,5.376 5.376,13.056 v 111.168 q 0,7.68 -5.376,13.056 -5.376,5.376 -13.056,5.376 z"
style="font-size:192px;fill:url(#linearGradient6344);fill-opacity:1;stroke:#1b2f0d;stroke-opacity:1"
id="path2078" />
<path
inkscape:connector-curvature="0"
d="m -263.79491,4263.08 q -6.912,0 -11.904,-4.8 -4.8,-4.992 -4.8,-11.904 0,-2.496 0.96,-5.376 l 36.48,-105.6 q 3.072,-9.024 10.944,-14.592 7.872,-5.76 17.856,-5.76 9.792,0 17.664,5.76 7.872,5.568 10.944,14.592 l 36.096,104.448 q 0.96,3.264 0.96,5.76 0,7.104 -5.184,12.288 -4.992,5.184 -12.288,5.184 -5.76,0 -10.368,-3.264 -4.608,-3.456 -6.336,-8.832 l -6.336,-20.16 h -52.224 l -6.336,20.544 q -1.536,5.184 -5.952,8.448 -4.416,3.264 -10.176,3.264 z m 65.664,-60.672 -9.216,-29.376 q -2.88,-9.216 -4.8,-16.896 l -1.92,-7.488 h -2.304 l -1.92,7.488 q -1.92,7.68 -4.8,16.896 l -9.216,29.376 z"
style="font-size:192px;fill:url(#linearGradient6346);fill-opacity:1;stroke:#1b2f0d;stroke-opacity:1"
id="path2080" />
</g>
<g
id="g1908"
transform="matrix(0.59424771,1.0292672,-1.0292672,0.59424771,1156.6208,812.41899)">
<path
id="path1869"
transform="matrix(0.0674036,0,0,0.0674036,-306.71149,683.99286)"
d="m -548.03711,3773.5391 a 344.24474,337.98426 0 0 1 17.03125,0.8359 c -0.31189,-0.024 -0.6226,-0.052 -0.93555,-0.072 -1.76454,-0.116 -3.53934,-0.1977 -5.31054,-0.2929 -1.53249,-0.082 -3.06037,-0.1812 -4.59766,-0.2481 -0.0227,0 -0.0338,-6e-4 -0.0527,0 -2.04041,-0.089 -4.08551,-0.1589 -6.13477,-0.2207 z"
style="opacity:1;fill:#c83737;fill-opacity:1;stroke:none;stroke-width:6.79609;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
inkscape:connector-curvature="0" />
<path
id="path1871"
transform="matrix(0.0674036,0,0,0.0674036,-306.71149,683.99286)"
d="m -499.00391,4444.8438 a 344.24474,337.98426 0 0 1 -19.28906,2.2988 c 0.0599,-0.01 0.11976,-0.012 0.17969,-0.018 1.83269,-0.1776 3.66935,-0.3446 5.49414,-0.5449 1.81478,-0.2003 3.61714,-0.4336 5.42383,-0.6543 1.37782,-0.1701 2.7599,-0.3236 4.13281,-0.5039 1.35772,-0.1788 2.7072,-0.3817 4.05859,-0.5781 z"
style="opacity:1;fill:#c83737;fill-opacity:1;stroke:none;stroke-width:6.79609;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
inkscape:connector-curvature="0" />
<path
style="opacity:1;fill:#c83737;fill-opacity:1;stroke:none;stroke-width:6.79609;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
d="m -548.03711,3773.5391 a 344.24474,337.98426 0 0 1 17.03125,0.8359 c -0.31189,-0.024 -0.6226,-0.052 -0.93555,-0.072 -1.76454,-0.116 -3.53934,-0.1977 -5.31054,-0.2929 -1.53249,-0.082 -3.06037,-0.1812 -4.59766,-0.2481 -0.0227,0 -0.0338,-6e-4 -0.0527,0 -2.04041,-0.089 -4.08551,-0.1589 -6.13477,-0.2207 z"
transform="matrix(0.0674036,0,0,0.0674036,-306.71149,683.99286)"
id="path1875"
inkscape:connector-curvature="0" />
<path
style="opacity:1;fill:#c83737;fill-opacity:1;stroke:none;stroke-width:6.79609;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
d="m -499.00391,4444.8438 a 344.24474,337.98426 0 0 1 -19.28906,2.2988 c 0.0599,-0.01 0.11976,-0.012 0.17969,-0.018 1.83269,-0.1776 3.66935,-0.3446 5.49414,-0.5449 1.81478,-0.2003 3.61714,-0.4336 5.42383,-0.6543 1.37782,-0.1701 2.7599,-0.3236 4.13281,-0.5039 1.35772,-0.1788 2.7072,-0.3817 4.05859,-0.5781 z"
transform="matrix(0.0674036,0,0,0.0674036,-306.71149,683.99286)"
id="path1877"
inkscape:connector-curvature="0" />
<path
inkscape:connector-curvature="0"
id="path1881"
transform="matrix(0.25475377,0,0,0.25475377,-306.71149,683.99286)"
style="opacity:1;fill:#1b2f0d;fill-opacity:1;stroke:none;stroke-width:1.79813;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
d="m -342.56353,1151.6482 c -7.0772,0 -12.7748,5.6975 -12.7748,12.7748 0,7.0772 5.6976,12.7747 12.7748,12.7747 h 13.2842 c 7.0773,0 12.7748,-5.6975 12.7748,-12.7748 0,-7.0772 -5.6975,-12.7747 -12.7748,-12.7747 z m 0,-153.30048 c -7.0772,-2e-5 -12.7748,5.69758 -12.7748,12.77478 0,7.0772 5.6976,12.7748 12.7748,12.7748 h 13.2843 c 7.0772,0 12.7747,-5.6976 12.7747,-12.7748 0,-7.0772 -5.6975,-12.77478 -12.7747,-12.7748 z m 64.35054,10e-5 -8.85836,0.003 c -8.72831,0 -15.75512,5.69718 -15.75512,12.77438 0,7.0772 7.02681,12.775 15.75512,12.775 h 8.85836 14.96602 c 8.72832,0 15.75511,5.6976 15.75511,12.7749 -2e-5,7.0772 -7.02682,12.7744 -15.75511,12.7744 h -78.04123 -7.32203 c -8.72831,0 -15.75512,5.6977 -15.75512,12.7749 0,7.0772 7.02681,12.7749 15.75512,12.7749 h 7.32203 6.89364 c 8.72828,0 15.75511,5.6978 15.75511,12.775 0,7.0772 -7.02683,12.7745 -15.75511,12.7744 h -6.77686 -7.32202 c -8.72831,0 -15.75512,5.6977 -15.75512,12.7749 0,7.0773 7.02681,12.775 15.75512,12.775 h 7.32202 92.99861 c 8.72831,0 15.75511,5.6972 15.75512,12.7744 0,7.0772 -7.02681,12.7749 -15.75512,12.7749 h -8.92193 -10.81898 c -8.7282,0 -15.75511,5.6976 -15.75511,12.7749 0,7.0772 7.02691,12.7744 15.75511,12.7744 h 10.81898 40.33604 68.16829 c 0.62444,0 1.24701,-0.01 1.86862,-0.016 0.1154,0.01 0.23081,0.012 0.34623,0.017 50.302833,0 91.081283,-40.037 91.081262,-89.425 2.1e-5,-49.388 -40.778429,-89.42493 -91.081262,-89.42501 -0.22706,0.007 -0.45409,0.0151 -0.68109,0.0238 -8e-4,0 -0.002,3e-5 -0.003,0 -0.50883,-0.007 -1.0184,-0.0109 -1.52911,-0.0109 h -83.24395 z m 40.75566,89.42508 c 0.003,2.0372 0.0763,4.0737 0.22065,6.106 -0.14437,-2.0323 -0.21796,-4.0688 -0.22065,-6.106 z m 0.8108,11.036 c 0.13325,1.3242 0.29658,2.6454 0.48989,3.9625 -0.19331,-1.3171 -0.35664,-2.6383 -0.48989,-3.9625 z m 1.67741,9.2495 c 0.23768,1.1446 0.49819,2.2844 0.78135,3.419 -0.28316,-1.1346 -0.54367,-2.2744 -0.78135,-3.419 z m 2.61793,8.9153 c 0.31876,1.0001 15.72957,1.9947 16.08393,2.9832 -0.35436,-0.9885 -15.76517,-1.9831 -16.08393,-2.9832 z m 18.64036,8.6485 c 0.36472,0.8342 0.74234,1.6628 1.13275,2.4856 -0.39041,-0.8228 -0.76803,-1.6514 -1.13275,-2.4856 z m 4.50361,8.3054 c 0.36769,0.6478 0.74358,1.2911 1.12757,1.9297 -0.38399,-0.6386 -0.75988,-1.2819 -1.12757,-1.9297 z m -9.82333,7.6368 c 0.37594,0.5279 0.75768,1.0517 1.14515,1.5715 -0.38747,-0.5198 -0.76921,-1.0436 -1.14515,-1.5715 z m 6.0849,7.1339 c 0.34214,0.3892 0.6877,0.7754 1.03662,1.1586 -0.34892,-0.3832 -0.69448,-0.7694 -1.03662,-1.1586 z m 6.69313,6.3723 c 0.32401,0.3008 0.65027,0.5993 0.97875,0.8955 -0.32848,-0.2962 -0.65474,-0.5947 -0.97875,-0.8955 z m 7.34684,5.6859 c 0.28312,0.2137 0.56751,0.4257 0.85317,0.6361 -0.28566,-0.2104 -0.57005,-0.4224 -0.85317,-0.6361 z m 8.00933,4.9801 c 0.19145,0.1163 0.38334,0.2318 0.57567,0.3467 -0.19233,-0.1149 -0.38422,-0.2304 -0.57567,-0.3467 z m 8.25944,4.0261 c 0.16529,0.079 0.33083,0.1576 0.49661,0.2356 -0.16578,-0.078 -0.33132,-0.1566 -0.49661,-0.2356 z m 8.78138,3.2391 c 0.0818,0.03 0.1636,0.059 0.24546,0.088 -0.0819,-0.029 -0.16369,-0.059 -0.24546,-0.088 z m 8.79843,2.2665 c 0.0868,0.022 0.17359,0.043 0.26044,0.065 -0.0868,-0.022 -0.17366,-0.043 -0.26044,-0.065 z m 9.09866,1.4097 0.154,0.023 z" />
<path
transform="matrix(0.0674036,0,0,0.0674036,-306.71149,683.99286)"
id="path1883"
d="m -548.98438,3869.0234 c -6.41901,0.032 -12.83422,0.3183 -19.23046,0.8594 -0.4722,-0.014 -0.94238,-0.035 -1.41797,-0.035 h -204.81765 c -26.74885,0 -48.28321,21.5347 -48.28321,48.2832 0,26.7484 21.53436,48.2832 48.28321,48.2832 h 15.24218 -22.51475 33.61133 c 26.74885,0 48.2832,21.5327 48.2832,48.2812 0,26.7489 -21.53435,48.2832 -48.2832,48.2832 h -5.55166 l -0.002,0.012 h -136.92063 c -26.74885,0 -48.2832,21.5348 -48.2832,48.2832 0,26.7485 21.53435,48.2832 48.2832,48.2832 h 147.23808 12.12305 3.3027 c 26.74885,0 48.28321,21.5328 48.28321,48.2813 0,26.7488 -21.53436,48.2832 -48.28321,48.2832 h -15.42575 -8.91601 c -26.74885,0 -48.28321,21.5347 -48.28321,48.2832 0,26.7485 21.53436,48.2812 48.28321,48.2812 h 182.63106 c 0.88706,0 1.76758,-0.027 2.64258,-0.074 5.9887,0.5234 11.99481,0.8238 18.00585,0.9004 133.7876,-3e-4 242.2438,-108.4565 242.24415,-242.2441 -2.9e-4,-133.7876 -108.45651,-242.2439 -242.24415,-242.2442 z m -535.34762,193.9668 c -26.7489,0 -48.2832,21.5348 -48.2832,48.2832 0,26.7485 21.5343,48.2832 48.2832,48.2832 h 45.1797 c 26.7484,0 48.28323,-21.5347 48.28316,-48.2832 7e-5,-26.7484 -21.53476,-48.2832 -48.28316,-48.2832 z"
style="opacity:1;fill:url(#linearGradient6350);fill-opacity:1;stroke:none;stroke-width:2.81481;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
inkscape:connector-curvature="0"
sodipodi:nodetypes="ccssssccsssccsssccssccsssscccccsssscss" />
</g>
<g
aria-label="ESC"
transform="matrix(0.26458333,0,0,0.26458333,1519.0252,-612.12873)"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:40px;line-height:1;font-family:Jellee;-inkscape-font-specification:Jellee;letter-spacing:0px;word-spacing:0px;fill:url(#linearGradient6358);fill-opacity:1;stroke:none"
id="flowRoot1713">
<path
inkscape:connector-curvature="0"
d="m -6335.5449,6272.5557 q -7.872,0 -12.096,-4.224 -4.224,-4.224 -4.224,-12.096 v -112.32 q 0,-7.872 4.224,-12.096 4.224,-4.224 12.096,-4.224 h 70.656 q 6.144,0 10.368,4.416 4.416,4.416 4.416,10.56 0,5.952 -4.416,10.368 -4.224,4.416 -10.368,4.416 h -50.496 v 28.224 h 41.664 q 5.952,0 10.176,4.224 4.224,4.224 4.224,10.176 0,5.952 -4.224,10.368 -4.224,4.224 -10.176,4.224 h -41.664 v 28.224 h 54.336 q 6.144,0 10.368,4.416 4.416,4.224 4.416,10.368 0,6.144 -4.416,10.56 -4.224,4.416 -10.368,4.416 z"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:192px;font-family:Jellee;-inkscape-font-specification:Jellee;fill:url(#linearGradient6352);fill-opacity:1"
id="path2069" />
<path
inkscape:connector-curvature="0"
d="m -6179.8599,6275.8197 q -15.936,0 -28.8,-4.608 -12.864,-4.608 -21.504,-12.672 -2.304,-2.304 -3.648,-5.76 -1.344,-3.648 -1.344,-7.488 0,-7.296 5.184,-12.288 5.184,-5.184 12.288,-5.184 4.608,0 8.448,2.304 3.84,2.112 6.144,5.76 3.84,5.76 9.984,8.832 6.144,2.88 14.016,2.88 11.52,0 17.28,-4.224 5.76,-4.224 5.76,-11.52 0,-5.568 -3.84,-9.216 -3.84,-3.84 -13.632,-5.952 l -23.616,-4.992 q -20.352,-4.416 -30.336,-14.784 -9.792,-10.56 -9.792,-28.224 0,-12.672 6.72,-22.848 6.912,-10.176 19.968,-15.936 13.056,-5.76 31.104,-5.76 29.376,0 45.696,15.36 4.8,4.608 4.8,12.672 0,6.912 -4.992,11.904 -4.8,4.992 -11.712,4.992 -4.416,0 -8.256,-2.112 -3.648,-2.304 -5.952,-5.76 -5.952,-9.6 -19.776,-9.6 -10.56,0 -15.552,3.84 -4.992,3.84 -4.992,9.408 0,5.76 3.84,9.6 4.032,3.84 14.4,5.952 l 23.424,4.992 q 21.504,4.608 31.296,15.36 9.792,10.752 9.792,27.648 0,13.056 -6.336,23.808 -6.144,10.56 -20.16,17.088 -14.016,6.528 -35.904,6.528 z"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:192px;font-family:Jellee;-inkscape-font-specification:Jellee;fill:url(#linearGradient6354);fill-opacity:1"
id="path2071" />
<path
inkscape:connector-curvature="0"
d="m -6036.6609,6275.8197 q -34.56,0 -52.8,-19.584 -18.24,-19.776 -18.24,-54.912 0,-22.656 8.64,-39.936 8.832,-17.472 24.768,-27.072 16.128,-9.792 37.632,-9.792 17.664,0 31.104,5.76 13.44,5.568 21.888,15.936 3.456,4.032 3.456,11.328 0,7.296 -5.184,12.48 -4.992,4.992 -12.288,4.992 -4.608,0 -8.832,-2.304 -4.032,-2.304 -6.336,-6.144 -7.68,-13.056 -23.808,-13.056 -14.592,0 -23.424,11.52 -8.832,11.328 -8.832,34.56 0,23.808 9.024,35.52 9.024,11.712 23.232,11.712 16.896,0 24.96,-14.592 2.304,-4.224 6.528,-6.72 4.224,-2.688 9.216,-2.688 7.296,0 12.48,5.376 5.376,5.184 5.376,12.672 0,5.76 -3.456,10.752 -17.664,24.192 -55.104,24.192 z"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:192px;font-family:Jellee;-inkscape-font-specification:Jellee;fill:url(#linearGradient6356);fill-opacity:1"
id="path2073" />
</g>
</g>
<g
id="g7164"
transform="matrix(0.34566325,-0.59870631,0.59870631,0.34566325,46.553206,-1019.4322)" />
<g
transform="matrix(1.5594927,2.7011205,-2.7011205,1.5594927,2467.9041,-478.22072)"
id="g1335">
<path
inkscape:connector-curvature="0"
id="path1276"
style="opacity:1;fill:#1b2f0d;fill-opacity:1;stroke:none;stroke-width:1.79813;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
d="m -342.56353,1151.6482 c -7.0772,0 -12.7748,5.6975 -12.7748,12.7748 0,7.0772 5.6976,12.7747 12.7748,12.7747 h 13.2842 c 7.0773,0 12.7748,-5.6975 12.7748,-12.7748 0,-7.0772 -5.6975,-12.7747 -12.7748,-12.7747 z m 0,-153.30048 c -7.0772,-2e-5 -12.7748,5.69758 -12.7748,12.77478 0,7.0772 5.6976,12.7748 12.7748,12.7748 h 13.2843 c 7.0772,0 12.7747,-5.6976 12.7747,-12.7748 0,-7.0772 -5.6975,-12.77478 -12.7747,-12.7748 z m 64.35054,10e-5 -8.85836,0.003 c -8.72831,0 -15.75512,5.69718 -15.75512,12.77438 0,7.0772 7.02681,12.775 15.75512,12.775 h 8.85836 14.96602 c 8.72832,0 15.75511,5.6976 15.75511,12.7749 -2e-5,7.0772 -7.02682,12.7744 -15.75511,12.7744 h -78.04123 -7.32203 c -8.72831,0 -15.75512,5.6977 -15.75512,12.7749 0,7.0772 7.02681,12.7749 15.75512,12.7749 h 7.32203 6.89364 c 8.72828,0 15.75511,5.6978 15.75511,12.775 0,7.0772 -7.02683,12.7745 -15.75511,12.7744 h -6.77686 -7.32202 c -8.72831,0 -15.75512,5.6977 -15.75512,12.7749 0,7.0773 7.02681,12.775 15.75512,12.775 h 7.32202 92.99861 c 8.72831,0 15.75511,5.6972 15.75512,12.7744 0,7.0772 -7.02681,12.7749 -15.75512,12.7749 h -8.92193 -10.81898 c -8.7282,0 -15.75511,5.6976 -15.75511,12.7749 0,7.0772 7.02691,12.7744 15.75511,12.7744 h 10.81898 40.33604 68.16829 c 0.62444,0 1.24701,-0.01 1.86862,-0.016 0.1154,0.01 0.23081,0.012 0.34623,0.017 50.302833,0 91.081283,-40.037 91.081262,-89.425 2.1e-5,-49.388 -40.778429,-89.42493 -91.081262,-89.42501 -0.22706,0.007 -0.45409,0.0151 -0.68109,0.0238 -8e-4,0 -0.002,3e-5 -0.003,0 -0.50883,-0.007 -1.0184,-0.0109 -1.52911,-0.0109 h -83.24395 z m 40.75566,89.42508 c 0.003,2.0372 0.0763,4.0737 0.22065,6.106 -0.14437,-2.0323 -0.21796,-4.0688 -0.22065,-6.106 z m 0.8108,11.036 c 0.13325,1.3242 0.29658,2.6454 0.48989,3.9625 -0.19331,-1.3171 -0.35664,-2.6383 -0.48989,-3.9625 z m 1.67741,9.2495 c 0.23768,1.1446 0.49819,2.2844 0.78135,3.419 -0.28316,-1.1346 -0.54367,-2.2744 -0.78135,-3.419 z m 2.61793,8.9153 c 0.31876,1.0001 15.72957,1.9947 16.08393,2.9832 -0.35436,-0.9885 -15.76517,-1.9831 -16.08393,-2.9832 z m 18.64036,8.6485 c 0.36472,0.8342 0.74234,1.6628 1.13275,2.4856 -0.39041,-0.8228 -0.76803,-1.6514 -1.13275,-2.4856 z m 4.50361,8.3054 c 0.36769,0.6478 0.74358,1.2911 1.12757,1.9297 -0.38399,-0.6386 -0.75988,-1.2819 -1.12757,-1.9297 z m -9.82333,7.6368 c 0.37594,0.5279 0.75768,1.0517 1.14515,1.5715 -0.38747,-0.5198 -0.76921,-1.0436 -1.14515,-1.5715 z m 6.0849,7.1339 c 0.34214,0.3892 0.6877,0.7754 1.03662,1.1586 -0.34892,-0.3832 -0.69448,-0.7694 -1.03662,-1.1586 z m 6.69313,6.3723 c 0.32401,0.3008 0.65027,0.5993 0.97875,0.8955 -0.32848,-0.2962 -0.65474,-0.5947 -0.97875,-0.8955 z m 7.34684,5.6859 c 0.28312,0.2137 0.56751,0.4257 0.85317,0.6361 -0.28566,-0.2104 -0.57005,-0.4224 -0.85317,-0.6361 z m 8.00933,4.9801 c 0.19145,0.1163 0.38334,0.2318 0.57567,0.3467 -0.19233,-0.1149 -0.38422,-0.2304 -0.57567,-0.3467 z m 8.25944,4.0261 c 0.16529,0.079 0.33083,0.1576 0.49661,0.2356 -0.16578,-0.078 -0.33132,-0.1566 -0.49661,-0.2356 z m 8.78138,3.2391 c 0.0818,0.03 0.1636,0.059 0.24546,0.088 -0.0819,-0.029 -0.16369,-0.059 -0.24546,-0.088 z m 8.79843,2.2665 c 0.0868,0.022 0.17359,0.043 0.26044,0.065 -0.0868,-0.022 -0.17366,-0.043 -0.26044,-0.065 z m 9.09866,1.4097 0.154,0.023 z"
transform="matrix(0.25475377,0,0,0.25475377,-306.71149,683.99286)" />
<path
id="path1278"
d="m -548.98438,3869.0234 c -6.41901,0.032 -12.83422,0.3183 -19.23046,0.8594 -0.4722,-0.014 -0.94238,-0.035 -1.41797,-0.035 h -204.81765 c -26.74885,0 -48.28321,21.5347 -48.28321,48.2832 0,26.7484 21.53436,48.2832 48.28321,48.2832 h 15.24218 -22.51475 33.61133 c 26.74885,0 48.2832,21.5327 48.2832,48.2812 0,26.7489 -21.53435,48.2832 -48.2832,48.2832 h -5.55166 l -0.002,0.012 h -136.92063 c -26.74885,0 -48.2832,21.5348 -48.2832,48.2832 0,26.7485 21.53435,48.2832 48.2832,48.2832 h 147.23808 12.12305 3.3027 c 26.74885,0 48.28321,21.5328 48.28321,48.2813 0,26.7488 -21.53436,48.2832 -48.28321,48.2832 h -15.42575 -8.91601 c -26.74885,0 -48.28321,21.5347 -48.28321,48.2832 0,26.7485 21.53436,48.2812 48.28321,48.2812 h 182.63106 c 0.88706,0 1.76758,-0.027 2.64258,-0.074 5.9887,0.5234 11.99481,0.8238 18.00585,0.9004 133.7876,-3e-4 242.2438,-108.4565 242.24415,-242.2441 -2.9e-4,-133.7876 -108.45651,-242.2439 -242.24415,-242.2442 z m -535.34762,193.9668 c -26.7489,0 -48.2832,21.5348 -48.2832,48.2832 0,26.7485 21.5343,48.2832 48.2832,48.2832 h 45.1797 c 26.7484,0 48.28323,-21.5347 48.28316,-48.2832 7e-5,-26.7484 -21.53476,-48.2832 -48.28316,-48.2832 z"
style="opacity:1;fill:url(#linearGradient1300);fill-opacity:1;stroke:none;stroke-width:2.81481;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
inkscape:connector-curvature="0"
sodipodi:nodetypes="ccssssccsssccsssccssccsssscccccsssscss"
transform="matrix(0.0674036,0,0,0.0674036,-306.71149,683.99286)" />
</g>
<rect
y="-105.54419"
x="-838.6853"
height="290.39264"
width="290.39264"
id="rect1346"
style="opacity:0.509;fill:#000000;fill-opacity:0;fill-rule:nonzero;stroke:#ff0000;stroke-width:2.34519;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1" />
<g
id="g1376"
transform="translate(-334.8262,324.11459)">
<g
transform="matrix(3.1189853,-4.1386156e-8,4.1386156e-8,3.1189853,429.86477,-3282.1415)"
id="g1366">
<path
inkscape:connector-curvature="0"
id="path1362"
transform="matrix(0.25475377,0,0,0.25475377,-306.71149,683.99286)"
style="opacity:1;fill:#1b2f0d;fill-opacity:1;stroke:none;stroke-width:1.79813;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
d="m -342.56353,1151.6482 c -7.0772,0 -12.7748,5.6975 -12.7748,12.7748 0,7.0772 5.6976,12.7747 12.7748,12.7747 h 13.2842 c 7.0773,0 12.7748,-5.6975 12.7748,-12.7748 0,-7.0772 -5.6975,-12.7747 -12.7748,-12.7747 z m 0,-153.30048 c -7.0772,-2e-5 -12.7748,5.69758 -12.7748,12.77478 0,7.0772 5.6976,12.7748 12.7748,12.7748 h 13.2843 c 7.0772,0 12.7747,-5.6976 12.7747,-12.7748 0,-7.0772 -5.6975,-12.77478 -12.7747,-12.7748 z m 64.35054,10e-5 -8.85836,0.003 c -8.72831,0 -15.75512,5.69718 -15.75512,12.77438 0,7.0772 7.02681,12.775 15.75512,12.775 h 8.85836 14.96602 c 8.72832,0 15.75511,5.6976 15.75511,12.7749 -2e-5,7.0772 -7.02682,12.7744 -15.75511,12.7744 h -78.04123 -7.32203 c -8.72831,0 -15.75512,5.6977 -15.75512,12.7749 0,7.0772 7.02681,12.7749 15.75512,12.7749 h 7.32203 6.89364 c 8.72828,0 15.75511,5.6978 15.75511,12.775 0,7.0772 -7.02683,12.7745 -15.75511,12.7744 h -6.77686 -7.32202 c -8.72831,0 -15.75512,5.6977 -15.75512,12.7749 0,7.0773 7.02681,12.775 15.75512,12.775 h 7.32202 92.99861 c 8.72831,0 15.75511,5.6972 15.75512,12.7744 0,7.0772 -7.02681,12.7749 -15.75512,12.7749 h -8.92193 -10.81898 c -8.7282,0 -15.75511,5.6976 -15.75511,12.7749 0,7.0772 7.02691,12.7744 15.75511,12.7744 h 10.81898 40.33604 68.16829 c 0.62444,0 1.24701,-0.01 1.86862,-0.016 0.1154,0.01 0.23081,0.012 0.34623,0.017 50.302833,0 91.081283,-40.037 91.081262,-89.425 2.1e-5,-49.388 -40.778429,-89.42493 -91.081262,-89.42501 -0.22706,0.007 -0.45409,0.0151 -0.68109,0.0238 -8e-4,0 -0.002,3e-5 -0.003,0 -0.50883,-0.007 -1.0184,-0.0109 -1.52911,-0.0109 h -83.24395 z m 40.75566,89.42508 c 0.003,2.0372 0.0763,4.0737 0.22065,6.106 -0.14437,-2.0323 -0.21796,-4.0688 -0.22065,-6.106 z m 0.8108,11.036 c 0.13325,1.3242 0.29658,2.6454 0.48989,3.9625 -0.19331,-1.3171 -0.35664,-2.6383 -0.48989,-3.9625 z m 1.67741,9.2495 c 0.23768,1.1446 0.49819,2.2844 0.78135,3.419 -0.28316,-1.1346 -0.54367,-2.2744 -0.78135,-3.419 z m 2.61793,8.9153 c 0.31876,1.0001 15.72957,1.9947 16.08393,2.9832 -0.35436,-0.9885 -15.76517,-1.9831 -16.08393,-2.9832 z m 18.64036,8.6485 c 0.36472,0.8342 0.74234,1.6628 1.13275,2.4856 -0.39041,-0.8228 -0.76803,-1.6514 -1.13275,-2.4856 z m 4.50361,8.3054 c 0.36769,0.6478 0.74358,1.2911 1.12757,1.9297 -0.38399,-0.6386 -0.75988,-1.2819 -1.12757,-1.9297 z m -9.82333,7.6368 c 0.37594,0.5279 0.75768,1.0517 1.14515,1.5715 -0.38747,-0.5198 -0.76921,-1.0436 -1.14515,-1.5715 z m 6.0849,7.1339 c 0.34214,0.3892 0.6877,0.7754 1.03662,1.1586 -0.34892,-0.3832 -0.69448,-0.7694 -1.03662,-1.1586 z m 6.69313,6.3723 c 0.32401,0.3008 0.65027,0.5993 0.97875,0.8955 -0.32848,-0.2962 -0.65474,-0.5947 -0.97875,-0.8955 z m 7.34684,5.6859 c 0.28312,0.2137 0.56751,0.4257 0.85317,0.6361 -0.28566,-0.2104 -0.57005,-0.4224 -0.85317,-0.6361 z m 8.00933,4.9801 c 0.19145,0.1163 0.38334,0.2318 0.57567,0.3467 -0.19233,-0.1149 -0.38422,-0.2304 -0.57567,-0.3467 z m 8.25944,4.0261 c 0.16529,0.079 0.33083,0.1576 0.49661,0.2356 -0.16578,-0.078 -0.33132,-0.1566 -0.49661,-0.2356 z m 8.78138,3.2391 c 0.0818,0.03 0.1636,0.059 0.24546,0.088 -0.0819,-0.029 -0.16369,-0.059 -0.24546,-0.088 z m 8.79843,2.2665 c 0.0868,0.022 0.17359,0.043 0.26044,0.065 -0.0868,-0.022 -0.17366,-0.043 -0.26044,-0.065 z m 9.09866,1.4097 0.154,0.023 z" />
<path
id="path1364"
d="m -548.98438,3869.0234 c -6.41901,0.032 -12.83422,0.3183 -19.23046,0.8594 -0.4722,-0.014 -0.94238,-0.035 -1.41797,-0.035 h -204.81765 c -26.74885,0 -48.28321,21.5347 -48.28321,48.2832 0,26.7484 21.53436,48.2832 48.28321,48.2832 h 15.24218 -22.51475 33.61133 c 26.74885,0 48.2832,21.5327 48.2832,48.2812 0,26.7489 -21.53435,48.2832 -48.2832,48.2832 h -5.55166 l -0.002,0.012 h -136.92063 c -26.74885,0 -48.2832,21.5348 -48.2832,48.2832 0,26.7485 21.53435,48.2832 48.2832,48.2832 h 147.23808 12.12305 3.3027 c 26.74885,0 48.28321,21.5328 48.28321,48.2813 0,26.7488 -21.53436,48.2832 -48.28321,48.2832 h -15.42575 -8.91601 c -26.74885,0 -48.28321,21.5347 -48.28321,48.2832 0,26.7485 21.53436,48.2812 48.28321,48.2812 h 182.63106 c 0.88706,0 1.76758,-0.027 2.64258,-0.074 5.9887,0.5234 11.99481,0.8238 18.00585,0.9004 133.7876,-3e-4 242.2438,-108.4565 242.24415,-242.2441 -2.9e-4,-133.7876 -108.45651,-242.2439 -242.24415,-242.2442 z m -535.34762,193.9668 c -26.7489,0 -48.2832,21.5348 -48.2832,48.2832 0,26.7485 21.5343,48.2832 48.2832,48.2832 h 45.1797 c 26.7484,0 48.28323,-21.5347 48.28316,-48.2832 7e-5,-26.7484 -21.53476,-48.2832 -48.28316,-48.2832 z"
style="opacity:1;fill:url(#linearGradient1370);fill-opacity:1;stroke:none;stroke-width:2.81481;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
inkscape:connector-curvature="0"
sodipodi:nodetypes="ccssssccsssccsssccssccsssscccccsssscss"
transform="matrix(0.0674036,0,0,0.0674036,-306.71149,683.99286)" />
</g>
<rect
y="-429.65878"
x="-838.6853"
height="290.39264"
width="290.39264"
id="rect1368"
style="opacity:0.509;fill:#000000;fill-opacity:0;fill-rule:nonzero;stroke:#ff0000;stroke-width:2.34519;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1" />
</g>
<g
id="g1376-3"
transform="translate(-330.14387,684.56317)">
<g
transform="matrix(3.1189853,-4.1386156e-8,4.1386156e-8,3.1189853,429.86477,-3282.1415)"
id="g1366-7">
<path
inkscape:connector-curvature="0"
id="path1362-5"
style="opacity:1;fill:#1b2f0d;fill-opacity:1;stroke:none;stroke-width:1.79813;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
d="m -324.23855,1151.6482 c -7.0772,0 -12.7748,5.6975 -12.7748,12.7748 0,7.0772 5.6976,12.7747 12.7748,12.7747 h 13.2842 c 7.0773,0 12.7748,-5.6975 12.7748,-12.7748 0,-7.0772 -5.6975,-12.7747 -12.7748,-12.7747 z m -18.32498,-153.30048 c -7.0772,-2e-5 -12.7748,5.69758 -12.7748,12.77478 0,7.0772 5.6976,12.7748 12.7748,12.7748 h 13.2843 c 7.0772,0 12.7747,-5.6976 12.7747,-12.7748 0,-7.0772 -5.6975,-12.77478 -12.7747,-12.7748 z m 64.35054,10e-5 -8.85836,0.003 c -8.72831,0 -15.75512,5.69718 -15.75512,12.77438 0,7.0772 7.02681,12.775 15.75512,12.775 h 11.67507 c 8.72832,0 15.75511,5.6976 15.75511,12.7749 -2e-5,7.0772 -7.02682,12.7744 -15.75511,12.7744 h -39.12391 -7.32203 c -8.72831,0 -15.75512,5.6977 -15.75512,12.7749 0,7.0772 7.02681,12.7749 15.75512,12.7749 h 7.32203 6.89364 c 8.72828,0 15.75511,5.6978 15.75511,12.775 0,7.0772 -7.02683,12.7744 -15.75511,12.7744 h -2.64639 c -8.72831,0 -15.75512,5.6977 -15.75512,12.7749 0,7.0773 7.02681,12.775 15.75512,12.775 h 28.0398 34.06033 c 8.72831,0 15.75511,5.6972 15.75512,12.7744 0,7.0772 -7.02681,12.7749 -15.75512,12.7749 h -8.92193 -10.81898 c -8.7282,0 -15.75511,5.6976 -15.75511,12.7749 0,7.0772 7.02691,12.7744 15.75511,12.7744 h 10.81898 40.33604 68.16829 c 0.62444,0 1.24701,-0.01 1.86862,-0.016 0.1154,0.01 0.23081,0.012 0.34623,0.017 50.302833,0 91.081283,-40.037 91.081262,-89.425 2.1e-5,-49.388 -40.778429,-89.42493 -91.081262,-89.42501 -0.22706,0.007 -0.45409,0.0151 -0.68109,0.0238 -8e-4,0 -0.002,3e-5 -0.003,0 -0.50883,-0.007 -1.0184,-0.0109 -1.52911,-0.0109 h -83.24395 z m 64.50216,127.27438 c 0.36472,0.8342 0.74234,1.6628 1.13275,2.4856 -0.39041,-0.8228 -0.76803,-1.6514 -1.13275,-2.4856 z m 4.50361,8.3054 c 0.36769,0.6478 0.74358,1.2911 1.12757,1.9297 -0.38399,-0.6386 -0.75988,-1.2819 -1.12757,-1.9297 z m -9.82333,7.6368 c 0.37594,0.5279 0.75768,1.0517 1.14515,1.5715 -0.38747,-0.5198 -0.76921,-1.0436 -1.14515,-1.5715 z m 6.0849,7.1339 c 0.34214,0.3892 0.6877,0.7754 1.03662,1.1586 -0.34892,-0.3832 -0.69448,-0.7694 -1.03662,-1.1586 z m 6.69313,6.3723 c 0.32401,0.3008 0.65027,0.5993 0.97875,0.8955 -0.32848,-0.2962 -0.65474,-0.5947 -0.97875,-0.8955 z m 7.34684,5.6859 c 0.28312,0.2137 0.56751,0.4257 0.85317,0.6361 -0.28566,-0.2104 -0.57005,-0.4224 -0.85317,-0.6361 z m 8.00933,4.9801 c 0.19145,0.1163 0.38334,0.2318 0.57567,0.3467 -0.19233,-0.1149 -0.38422,-0.2304 -0.57567,-0.3467 z m 8.25944,4.0261 c 0.16529,0.079 0.33083,0.1576 0.49661,0.2356 -0.16578,-0.078 -0.33132,-0.1566 -0.49661,-0.2356 z m 8.78138,3.2391 c 0.0818,0.03 0.1636,0.059 0.24546,0.088 -0.0819,-0.029 -0.16369,-0.059 -0.24546,-0.088 z m 8.79843,2.2665 c 0.0868,0.022 0.17359,0.043 0.26044,0.065 -0.0868,-0.022 -0.17366,-0.043 -0.26044,-0.065 z m 9.09866,1.4097 0.154,0.023 z"
sodipodi:nodetypes="ssssssssssssssccsccsscssscssccsscssscsssccsccscscsccccccccccccccccccccccccccccccccccc"
transform="matrix(0.25475377,0,0,0.25475377,-306.71149,683.99286)" />
<path
id="path1364-4"
d="m -548.98438,3869.0234 c -6.41901,0.032 -12.83422,0.3183 -19.23046,0.8594 -0.4722,-0.014 -0.94238,-0.035 -1.41797,-0.035 h -300.17467 c -26.74885,0 -48.28321,21.5347 -48.28321,48.2832 0,26.7484 21.53436,48.2832 48.28321,48.2832 h 110.5992 -117.87177 128.96835 c 26.74885,0 48.2832,21.5327 48.2832,48.2812 0,26.7489 -21.53435,48.2832 -48.2832,48.2832 h -5.55166 l -0.002,0.012 h -57.97188 c -26.74885,0 -48.2832,21.5348 -48.2832,48.2832 0,26.7485 21.53435,48.2832 48.2832,48.2832 h 68.28933 12.12305 3.3027 c 26.74885,0 48.28321,21.5328 48.28321,48.2813 0,26.7488 -21.53436,48.2832 -48.28321,48.2832 h -15.42575 -8.91601 c -26.74885,0 -48.28321,21.5347 -48.28321,48.2832 0,26.7485 21.53436,48.2812 48.28321,48.2812 h 182.63106 c 0.88706,0 1.76758,-0.027 2.64258,-0.074 5.9887,0.5234 11.99481,0.8238 18.00585,0.9004 133.7876,-3e-4 242.2438,-108.4565 242.24415,-242.2441 -2.9e-4,-133.7876 -108.45651,-242.2439 -242.24415,-242.2442 z m -461.21452,193.9668 c -26.7489,0 -48.2832,21.5348 -48.2832,48.2832 0,26.7485 21.5343,48.2832 48.2832,48.2832 h 45.17973 c 26.7484,0 48.28323,-21.5347 48.28316,-48.2832 7e-5,-26.7484 -21.53476,-48.2832 -48.28316,-48.2832 z"
style="opacity:1;fill:url(#linearGradient283);fill-opacity:1;stroke:none;stroke-width:2.81481;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
inkscape:connector-curvature="0"
sodipodi:nodetypes="ccssssccsssccsssccssccsssscccccsssscss"
transform="matrix(0.0674036,0,0,0.0674036,-306.71149,683.99286)" />
</g>
<rect
y="-429.65878"
x="-838.6853"
height="290.39264"
width="290.39264"
id="rect1368-8"
style="opacity:0.509;fill:#000000;fill-opacity:0;fill-rule:nonzero;stroke:#ff0000;stroke-width:2.34519;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1" />
</g>
<g
id="g1376-3-3"
transform="translate(-0.7510756,683.02321)"
inkscape:export-filename="/home/julianmurgia/Programming/godot/escoria-reloaded/icon.png"
inkscape:export-xdpi="5.5979385"
inkscape:export-ydpi="5.5979385">
<g
transform="matrix(1.5729749,2.6932915,-2.6932915,1.5729749,2467.4248,-814.62747)"
id="g1366-7-8">
<path
inkscape:connector-curvature="0"
id="path1362-5-8"
style="opacity:1;fill:#1b2f0d;fill-opacity:1;stroke:none;stroke-width:1.79813;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
d="m -324.23855,1151.6482 c -7.0772,0 -12.7748,5.6975 -12.7748,12.7748 0,7.0772 5.6976,12.7747 12.7748,12.7747 h 13.2842 c 7.0773,0 12.7748,-5.6975 12.7748,-12.7748 0,-7.0772 -5.6975,-12.7747 -12.7748,-12.7747 z m -18.32498,-153.30048 c -7.0772,-2e-5 -12.7748,5.69758 -12.7748,12.77478 0,7.0772 5.6976,12.7748 12.7748,12.7748 h 13.2843 c 7.0772,0 12.7747,-5.6976 12.7747,-12.7748 0,-7.0772 -5.6975,-12.77478 -12.7747,-12.7748 z m 64.35054,10e-5 -8.85836,0.003 c -8.72831,0 -15.75512,5.69718 -15.75512,12.77438 0,7.0772 7.02681,12.775 15.75512,12.775 h 11.67507 c 8.72832,0 15.75511,5.6976 15.75511,12.7749 -2e-5,7.0772 -7.02682,12.7744 -15.75511,12.7744 h -39.12391 -7.32203 c -8.72831,0 -15.75512,5.6977 -15.75512,12.7749 0,7.0772 7.02681,12.7749 15.75512,12.7749 h 7.32203 6.89364 c 8.72828,0 15.75511,5.6978 15.75511,12.775 0,7.0772 -7.02683,12.7744 -15.75511,12.7744 h -2.64639 c -8.72831,0 -15.75512,5.6977 -15.75512,12.7749 0,7.0773 7.02681,12.775 15.75512,12.775 h 28.0398 34.06033 c 8.72831,0 15.75511,5.6972 15.75512,12.7744 0,7.0772 -7.02681,12.7749 -15.75512,12.7749 h -8.92193 -10.81898 c -8.7282,0 -15.75511,5.6976 -15.75511,12.7749 0,7.0772 7.02691,12.7744 15.75511,12.7744 h 10.81898 40.33604 68.16829 c 0.62444,0 1.24701,-0.01 1.86862,-0.016 0.1154,0.01 0.23081,0.012 0.34623,0.017 50.302833,0 91.081283,-40.037 91.081262,-89.425 2.1e-5,-49.388 -40.778429,-89.42493 -91.081262,-89.42501 -0.22706,0.007 -0.45409,0.0151 -0.68109,0.0238 -8e-4,0 -0.002,3e-5 -0.003,0 -0.50883,-0.007 -1.0184,-0.0109 -1.52911,-0.0109 h -83.24395 z m 64.50216,127.27438 c 0.36472,0.8342 0.74234,1.6628 1.13275,2.4856 -0.39041,-0.8228 -0.76803,-1.6514 -1.13275,-2.4856 z m 4.50361,8.3054 c 0.36769,0.6478 0.74358,1.2911 1.12757,1.9297 -0.38399,-0.6386 -0.75988,-1.2819 -1.12757,-1.9297 z m -9.82333,7.6368 c 0.37594,0.5279 0.75768,1.0517 1.14515,1.5715 -0.38747,-0.5198 -0.76921,-1.0436 -1.14515,-1.5715 z m 6.0849,7.1339 c 0.34214,0.3892 0.6877,0.7754 1.03662,1.1586 -0.34892,-0.3832 -0.69448,-0.7694 -1.03662,-1.1586 z m 6.69313,6.3723 c 0.32401,0.3008 0.65027,0.5993 0.97875,0.8955 -0.32848,-0.2962 -0.65474,-0.5947 -0.97875,-0.8955 z m 7.34684,5.6859 c 0.28312,0.2137 0.56751,0.4257 0.85317,0.6361 -0.28566,-0.2104 -0.57005,-0.4224 -0.85317,-0.6361 z m 8.00933,4.9801 c 0.19145,0.1163 0.38334,0.2318 0.57567,0.3467 -0.19233,-0.1149 -0.38422,-0.2304 -0.57567,-0.3467 z m 8.25944,4.0261 c 0.16529,0.079 0.33083,0.1576 0.49661,0.2356 -0.16578,-0.078 -0.33132,-0.1566 -0.49661,-0.2356 z m 8.78138,3.2391 c 0.0818,0.03 0.1636,0.059 0.24546,0.088 -0.0819,-0.029 -0.16369,-0.059 -0.24546,-0.088 z m 8.79843,2.2665 c 0.0868,0.022 0.17359,0.043 0.26044,0.065 -0.0868,-0.022 -0.17366,-0.043 -0.26044,-0.065 z m 9.09866,1.4097 0.154,0.023 z"
sodipodi:nodetypes="ssssssssssssssccsccsscssscssccsscssscsssccsccscscsccccccccccccccccccccccccccccccccccc"
transform="matrix(0.25475377,0,0,0.25475377,-306.71149,683.99286)" />
<path
id="path1364-4-0"
d="m -548.98438,3869.0234 c -6.41901,0.032 -12.83422,0.3183 -19.23046,0.8594 -0.4722,-0.014 -0.94238,-0.035 -1.41797,-0.035 h -300.17467 c -26.74885,0 -48.28321,21.5347 -48.28321,48.2832 0,26.7484 21.53436,48.2832 48.28321,48.2832 h 110.5992 -117.87177 128.96835 c 26.74885,0 48.2832,21.5327 48.2832,48.2812 0,26.7489 -21.53435,48.2832 -48.2832,48.2832 h -5.55166 l -0.002,0.012 h -57.97188 c -26.74885,0 -48.2832,21.5348 -48.2832,48.2832 0,26.7485 21.53435,48.2832 48.2832,48.2832 h 68.28933 12.12305 3.3027 c 26.74885,0 48.28321,21.5328 48.28321,48.2813 0,26.7488 -21.53436,48.2832 -48.28321,48.2832 h -15.42575 -8.91601 c -26.74885,0 -48.28321,21.5347 -48.28321,48.2832 0,26.7485 21.53436,48.2812 48.28321,48.2812 h 182.63106 c 0.88706,0 1.76758,-0.027 2.64258,-0.074 5.9887,0.5234 11.99481,0.8238 18.00585,0.9004 133.7876,-3e-4 242.2438,-108.4565 242.24415,-242.2441 -2.9e-4,-133.7876 -108.45651,-242.2439 -242.24415,-242.2442 z m -461.21452,193.9668 c -26.7489,0 -48.2832,21.5348 -48.2832,48.2832 0,26.7485 21.5343,48.2832 48.2832,48.2832 h 45.17973 c 26.7484,0 48.28323,-21.5347 48.28316,-48.2832 7e-5,-26.7484 -21.53476,-48.2832 -48.28316,-48.2832 z"
style="opacity:1;fill:url(#linearGradient7072);fill-opacity:1;stroke:none;stroke-width:2.81481;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
inkscape:connector-curvature="0"
sodipodi:nodetypes="ccssssccsssccsssccssccsssscccccsssscss"
transform="matrix(0.0674036,0,0,0.0674036,-306.71149,683.99286)" />
</g>
<rect
y="-429.65878"
x="-838.6853"
height="290.39264"
width="290.39264"
id="rect1368-8-9"
style="opacity:0.509;fill:#000000;fill-opacity:0;fill-rule:nonzero;stroke:none;stroke-width:2.34519;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1" />
</g>
<rect
style="opacity:0.509;fill:none;fill-opacity:1;fill-rule:nonzero;stroke:#ff0000;stroke-width:3.05878;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
id="rect4471-0"
width="690.93744"
height="290.39264"
x="-486.20316"
y="244.59445" />
<g
transform="matrix(1.9244583,0,0,1.9244583,-29.774328,-1551.8082)"
id="g2198-8-6-5"
inkscape:export-filename="/home/julianmurgia/Programming/godot/escoria-reloaded/addons/escoria-core/design/escoria-logo-small.png"
inkscape:export-xdpi="32.48"
inkscape:export-ydpi="32.48">
<g
id="g12164">
<g
id="g12315">
<g
id="g9982-9-9"
transform="translate(4.6744763)">
<path
style="color:#000000;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:40px;line-height:1;font-family:Jellee;-inkscape-font-specification:Jellee;letter-spacing:0px;word-spacing:0px;fill:#1b2f0d;fill-opacity:1;stroke:none;stroke-width:0.264583;stroke-linejoin:round;stroke-opacity:1;-inkscape-stroke:none"
d="m -9.7799111,1001.8305 c -2.6897089,0 -6.0013589,0.9056 -8.3441939,3.2484 -2.342835,2.3428 -3.248379,5.655 -3.248379,8.3447 v 29.5657 c 0,3.0521 1.379717,6.4254 3.552753,8.5984 2.173036,2.173 5.546331,3.5533 8.5984427,3.5533 3.0521115,0 6.4254035,-1.3803 8.5984396,-3.5533 0.50127958,-0.5013 0.94889636,-1.0795 1.35857455,-1.6898 0.92771915,1.3773 2.15923805,2.5851 3.51089645,3.4452 a 7.2755018,7.2755018 0 0 0 0.3260778,0.1954 c 1.801188,1.0181 3.9758884,1.6025 6.0688799,1.6025 2.999592,0 6.344378,-1.3499 8.497157,-3.5026 2.121025,-2.1211 3.502113,-5.4361 3.502113,-8.446 0,-1.9243 -0.499896,-4.0362 -1.537891,-5.8291 l 0.160195,0.2919 -2.025716,-3.901 c 0.717642,-0.7836 1.389618,-1.6078 1.96112,-2.5058 1.967995,-3.0926 2.915587,-6.7733 2.915587,-10.4082 -3e-6,-5.3629 -2.295306,-10.8949 -6.50503,-14.2844 -4.113141,-3.3681 -9.4233602,-4.7253 -14.9432749,-4.7253 z m 18.9197745,29.7362 -0.083198,0.055 c 0.015055,-0.01 0.026863,-0.023 0.041857,-0.033 0.013441,-0.01 0.027924,-0.013 0.041341,-0.022 z"
id="path8479-0-0" />
<path
style="color:#000000;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:40px;line-height:1;font-family:Jellee;-inkscape-font-specification:Jellee;letter-spacing:0px;word-spacing:0px;fill:#1b2f0d;fill-opacity:1;stroke:none;stroke-width:0.264583;stroke-opacity:1;-inkscape-stroke:none"
d="m 26.149161,1001.4244 c -3.052112,0 -6.425403,1.3802 -8.598442,3.5532 -2.173036,2.1731 -3.55327,5.5464 -3.55327,8.5985 v 29.4132 c 0,3.0521 1.380234,6.4254 3.55327,8.5984 2.173039,2.173 5.54633,3.5533 8.598442,3.5533 3.052112,0 6.425406,-1.3803 8.598442,-3.5533 2.173036,-2.173 3.553272,-5.5463 3.553272,-8.5984 v -29.4132 c 0,-3.0521 -1.380236,-6.4254 -3.553272,-8.5985 -2.173036,-2.173 -5.54633,-3.5532 -8.598442,-3.5532 z"
id="path8375-4-1" />
<path
style="color:#000000;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:40px;line-height:1;font-family:Jellee;-inkscape-font-specification:Jellee;letter-spacing:0px;word-spacing:0px;fill:url(#linearGradient12122);fill-opacity:1;stroke:none;stroke-width:14.5495;stroke-linejoin:round;stroke-opacity:1;-inkscape-stroke:none"
d="m -9.2211164,1047.866 q -2.0319996,0 -3.4543996,-1.4224 -1.4224,-1.4224 -1.4224,-3.4544 v -29.5656 q 0,-2.0828 1.1176,-3.2004 1.1176,-1.1176 3.2003996,-1.1176 H 2.6660835 q 6.6039999,0 10.3631995,3.0988 3.81,3.048 3.81,8.636 0,3.7084 -1.778,6.5024 -1.778,2.794 -5.0292,4.3688 v 0.1016 l 4.7752,9.1948 q 0.5588,0.9652 0.5588,2.1844 0,1.9304 -1.3716,3.302 -1.3716,1.3716 -3.3528,1.3716 -1.3207996,0 -2.4891996,-0.6604 -1.1176,-0.7112 -1.6764,-1.8796 L 0.78648351,1034.3532 H -4.3443164 v 8.636 q 0,2.032 -1.4224,3.4544 -1.4224,1.4224 -3.4544,1.4224 z m 9.80439991,-21.2344 q 2.84479999,0 4.52119999,-1.1176 1.7271999,-1.1176 1.7271999,-4.0132 0,-2.9972 -1.6763999,-4.1148 -1.6764,-1.1176 -4.57199999,-1.1176 H -4.3443164 v 10.3632 z"
id="path8477-6-3" />
<path
style="color:#000000;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:40px;line-height:1;font-family:Jellee;-inkscape-font-specification:Jellee;letter-spacing:0px;word-spacing:0px;fill:#1b2f0d;fill-opacity:1;stroke:none;stroke-width:0.264583;stroke-opacity:1;-inkscape-stroke:none"
d="m 52.483987,1001.4244 c -3.140761,0 -6.405653,1.0376 -8.969994,2.8975 -2.514471,1.7942 -4.536528,4.4809 -5.536097,7.416 -1.72e-4,0 -2.65e-4,0 -5.29e-4,0 l -9.654191,27.9466 -0.01241,0.037 c -0.368707,1.1061 -0.627351,2.3504 -0.627351,3.7233 0,2.9032 1.291733,6.102 3.30109,8.1917 l 0.0987,0.1029 0.102836,0.099 c 2.089732,2.0093 5.288576,3.3011 8.191748,3.3011 2.390122,0 5.021882,-0.8139 7.016626,-2.2883 1.935144,-1.4303 3.53332,-3.6823 4.225581,-6.0187 l -0.02326,0.077 0.09405,-0.3049 h 3.108854 l 0.08268,0.263 0.0072,0.023 c 0.742309,2.3094 2.32537,4.4963 4.237468,5.9304 l 0.07907,0.059 0.08062,0.057 c 1.979488,1.4021 4.558289,2.2024 6.94841,2.2024 2.987972,0 6.327617,-1.3942 8.43928,-3.5569 2.06288,-2.0913 3.458186,-5.3417 3.458186,-8.3411 0,-1.3729 -0.238863,-2.5192 -0.549836,-3.5765 l -0.04754,-0.1628 -9.595281,-27.7642 c -0.999231,-2.9352 -3.0207,-5.6221 -5.535062,-7.4166 -2.541918,-1.8442 -5.78607,-2.8985 -8.920903,-2.8985 z"
id="path9877-6-5" />
<path
style="color:#000000;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:40px;line-height:1;font-family:Jellee;-inkscape-font-specification:Jellee;letter-spacing:0px;word-spacing:0px;fill:url(#linearGradient12124);fill-opacity:1;stroke:none;stroke-width:14.5495;stroke-opacity:1;-inkscape-stroke:none"
d="m 26.149177,1047.866 q -2.032,0 -3.4544,-1.4224 -1.4224,-1.4224 -1.4224,-3.4544 v -29.4132 q 0,-2.032 1.4224,-3.4544 1.4224,-1.4224 3.4544,-1.4224 2.032,0 3.4544,1.4224 1.4224,1.4224 1.4224,3.4544 v 29.4132 q 0,2.032 -1.4224,3.4544 -1.4224,1.4224 -3.4544,1.4224 z"
id="path8373-2-5" />
<path
style="color:#000000;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:40px;line-height:1;font-family:Jellee;-inkscape-font-specification:Jellee;letter-spacing:0px;word-spacing:0px;fill:url(#linearGradient12126);fill-opacity:1;stroke:none;stroke-width:14.5495;stroke-opacity:1;-inkscape-stroke:none"
d="m 39.377814,1047.866 q -1.8288,0 -3.1496,-1.27 -1.27,-1.3208 -1.27,-3.1496 0,-0.6604 0.254,-1.4224 l 9.652,-27.94 q 0.8128,-2.3876 2.8956,-3.8608 2.0828,-1.524 4.7244,-1.524 2.5908,0 4.6736,1.524 2.0828,1.4732 2.8956,3.8608 l 9.5504,27.6352 q 0.254,0.8636 0.254,1.524 0,1.8796 -1.3716,3.2512 -1.3208,1.3716 -3.2512,1.3716 -1.524,0 -2.7432,-0.8636 -1.2192,-0.9144 -1.6764,-2.3368 l -1.6764,-5.334 h -13.8176 l -1.6764,5.4356 q -0.4064,1.3716 -1.5748,2.2352 -1.1684,0.8636 -2.6924,0.8636 z m 17.3736,-16.0528 -2.4384,-7.7724 q -0.762,-2.4384 -1.27,-4.4704 l -0.508,-1.9812 h -0.6096 l -0.508,1.9812 q -0.508,2.032 -1.27,4.4704 l -2.4384,7.7724 z"
id="path9875-5-2" />
</g>
<path
style="color:#000000;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:40px;line-height:1;font-family:Jellee;-inkscape-font-specification:Jellee;letter-spacing:0px;word-spacing:0px;fill:#1b2f0d;fill-opacity:1;stroke:none;stroke-width:21.4086;stroke-linecap:square;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;-inkscape-stroke:none;paint-order:markers stroke fill"
d="m -157.25437,1002.4513 c -2.62929,0 -5.83681,0.8811 -8.10545,3.1497 -2.26865,2.2687 -3.14968,5.4762 -3.14968,8.1055 v 29.718 c 0,2.6293 0.88103,5.8368 3.14968,8.1055 2.26864,2.2686 5.47616,3.1491 8.10545,3.1491 h 19.71043 c 2.72209,0 5.78951,-1.2996 7.69977,-3.2638 1.88518,-1.9192 3.14865,-4.9165 3.14865,-7.6352 0,-2.6964 -1.27963,-5.725 -3.21273,-7.6388 -0.6019,-0.6075 -1.32689,-1.1228 -2.10579,-1.5803 1.14652,-1.7736 1.86446,-3.9669 1.86446,-6.0208 0,-2.1835 -0.85053,-4.5456 -2.17506,-6.3841 0.53398,-0.3686 1.03005,-0.7742 1.46246,-1.2186 1.852,-1.8839 3.15071,-4.8477 3.15071,-7.5866 0,-2.7199 -1.26465,-5.7192 -3.15124,-7.6383 -1.91045,-1.9628 -4.97628,-3.2613 -7.6972,-3.2613 z"
id="path7896-2-9" />
<path
style="color:#000000;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:40px;line-height:1;font-family:Jellee;-inkscape-font-specification:Jellee;letter-spacing:0px;word-spacing:0px;fill:#1b2f0d;fill-opacity:1;stroke:none;stroke-width:21.4086;stroke-linecap:square;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;-inkscape-stroke:none;paint-order:markers stroke fill"
d="m -78.174458,1001.301 c -4.890981,0 -9.649063,1.1729 -13.716476,3.638 -3.970258,2.3934 -7.176743,5.9353 -9.286236,10.1085 a 7.2755018,7.2755018 0 0 0 -0.0146,0.028 c -2.09274,4.1855 -3.05355,8.8988 -3.05355,13.8198 0,7.4564 2.07999,14.3942 6.753064,19.4609 a 7.2755018,7.2755018 0 0 0 0.02381,0.026 c 4.779089,5.1312 11.823779,7.4982 19.293892,7.4982 8.170889,0 15.895373,-3.1413 20.454567,-9.3854 a 7.2755018,7.2755018 0 0 0 0.105939,-0.1494 c 1.354958,-1.9571 2.208133,-4.5147 2.208133,-6.9856 0,-3.0184 -1.406789,-6.3526 -3.562059,-8.4868 -1.129982,-1.1416 -2.607151,-2.0591 -4.204387,-2.6857 1.3893,-0.5921 2.686155,-1.4092 3.705198,-2.4282 2.121032,-2.1211 3.502634,-5.4366 3.502634,-8.4465 0,-2.4182 -0.643097,-5.3294 -2.6298,-7.6781 -2.262426,-2.7436 -5.231791,-4.8645 -8.52715,-6.2368 -3.420243,-1.4582 -7.162112,-2.0971 -11.053075,-2.0971 z m -11.934666,13.5201 c -0.0061,0.01 -0.01085,0.016 -0.01693,0.024 -0.0061,0.01 -0.01349,0.015 -0.01958,0.023 z m 24.433662,1.0899 c 0.01032,0.016 0.02868,0.031 0.03823,0.047 l 0.03204,0.054 c -0.02064,-0.035 -0.04916,-0.066 -0.07027,-0.1013 z m -12.815755,7.5235 c -0.02408,0.012 -0.01296,0.087 0.316759,0.087 0.06379,0 0.05524,-0.017 0.09975,-0.022 1.039257,1.7076 2.580878,3.1797 4.266406,4.1429 a 7.2755018,7.2755018 0 0 0 0.125572,0.07 c 0.451246,0.2462 0.928634,0.462 1.421103,0.6527 -0.484478,0.2153 -0.946362,0.4654 -1.386469,0.739 -1.741673,1.0559 -3.298296,2.651 -4.291727,4.4596 -0.04175,0.077 -0.02355,0.095 -0.0336,0.1417 -0.05802,-0.018 -0.07636,-0.045 -0.201031,-0.045 -0.507206,0 0.08065,0.3396 -0.384466,-0.2641 -0.13716,-0.178 -0.8754,-1.6775 -0.8754,-4.9578 0,-3.176 0.724323,-4.5747 0.799438,-4.6711 a 7.2755018,7.2755018 0 0 0 0.03617,-0.046 c 0.19042,-0.2483 0.131471,-0.2985 0.1075,-0.2863 z"
id="path7920-8-2" />
<path
style="color:#000000;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:40px;line-height:1;font-family:Jellee;-inkscape-font-specification:Jellee;letter-spacing:0px;word-spacing:0px;fill:#1b2f0d;fill-opacity:1;stroke:none;stroke-width:21.4086;stroke-linecap:square;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;-inkscape-stroke:none;paint-order:markers stroke fill"
d="m -115.9613,1001.1992 c -3.95737,0 -7.7302,0.6274 -11.1657,2.143 -3.31666,1.4632 -6.30791,3.7563 -8.36489,6.7846 a 7.2755018,7.2755018 0 0 0 -0.0527,0.079 c -1.95054,2.9536 -2.98225,6.533 -2.98225,10.0541 0,4.2252 1.30162,8.5702 4.07418,11.8618 l 0.0853,-0.084 c -0.0156,0.015 -0.0269,0.036 -0.0424,0.051 -0.0124,0.012 -0.0294,0.022 -0.0418,0.034 0.003,0 0.004,0.01 0.007,0.01 -2.14122,2.1136 -3.52279,5.4268 -3.52279,8.3974 0,1.5261 0.28077,3.076 0.80409,4.4964 a 7.2755018,7.2755018 0 0 0 0.046,0.122 c 0.54811,1.4094 1.40909,2.8389 2.60138,4.0312 a 7.2755018,7.2755018 0 0 0 0.18037,0.1742 c 2.33526,2.1796 5.1494,3.7901 8.20002,4.8829 3.16687,1.1344 6.56116,1.6454 10.07327,1.6454 4.58401,0 8.78472,-0.6437 12.5708,-2.4071 3.45744,-1.6103 6.571508,-4.0704 8.537468,-7.4378 1.765935,-3.0029 2.67634,-6.503 2.67634,-9.9772 0,-4.3856 -1.482566,-8.9146 -4.487069,-12.2137 -0.309007,-0.3393 -0.636958,-0.6494 -0.966364,-0.9576 1.458568,-2.0019 2.405539,-4.5763 2.405539,-6.9964 0,-2.8658 -1.130724,-6.3201 -3.506761,-8.601 a 7.2755018,7.2755018 0 0 0 -0.05218,-0.049 c -4.465003,-4.2023 -10.626963,-6.0414 -17.076493,-6.0414 z m 11.16005,12.9692 c 0.0236,0.031 0.0544,0.044 0.0749,0.074 l 0.12972,0.202 c -0.0605,-0.098 -0.14089,-0.181 -0.20465,-0.2765 z m 6.123674,9.9142 -0.09975,0.1018 c 0.01693,-0.017 0.02918,-0.04 0.04598,-0.057 0.01588,-0.016 0.03802,-0.028 0.05376,-0.044 z m -7.091574,5.1774 0.13385,0.1303 c -0.0274,-0.027 -0.0548,-0.041 -0.0822,-0.068 -0.0191,-0.018 -0.0326,-0.044 -0.0517,-0.062 z m -14.56034,0.8811 0.2372,0.1364 c -0.0358,-0.021 -0.0766,-0.036 -0.11266,-0.057 -0.0425,-0.024 -0.0819,-0.056 -0.12454,-0.08 z"
id="path7540-7-5" />
<path
style="color:#000000;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:40px;line-height:1;font-family:Jellee;-inkscape-font-specification:Jellee;letter-spacing:0px;word-spacing:0px;fill:url(#linearGradient12130);fill-opacity:1;stroke:none;stroke-width:13.874;stroke-linecap:square;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;-inkscape-stroke:none;paint-order:markers stroke fill"
d="m -157.25437,1047.7424 q -2.0828,0 -3.2004,-1.1176 -1.1176,-1.1176 -1.1176,-3.2004 v -29.718 q 0,-2.0828 1.1176,-3.2004 1.1176,-1.1176 3.2004,-1.1176 h 18.6944 q 1.6256,0 2.7432,1.1684 1.1684,1.1684 1.1684,2.794 0,1.5748 -1.1684,2.7432 -1.1176,1.1684 -2.7432,1.1684 h -13.3604 v 7.4676 h 11.0236 q 1.5748,0 2.6924,1.1176 1.1176,1.1176 1.1176,2.6924 0,1.5748 -1.1176,2.7432 -1.1176,1.1176 -2.6924,1.1176 h -11.0236 v 7.4676 h 14.3764 q 1.6256,0 2.7432,1.1684 1.1684,1.1176 1.1684,2.7432 0,1.6256 -1.1684,2.794 -1.1176,1.1684 -2.7432,1.1684 z"
id="path7898-0-1" />
<path
style="color:#000000;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:40px;line-height:1;font-family:Jellee;-inkscape-font-specification:Jellee;letter-spacing:0px;word-spacing:0px;fill:url(#linearGradient12132);fill-opacity:1;stroke:none;stroke-width:14.5495;stroke-linecap:square;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;-inkscape-stroke:none;paint-order:markers stroke fill"
d="m -116.06271,1048.606 q -4.2164,0 -7.62,-1.2192 -3.4036,-1.2192 -5.6896,-3.3528 -0.6096,-0.6096 -0.9652,-1.524 -0.3556,-0.9652 -0.3556,-1.9812 0,-1.9304 1.3716,-3.2512 1.3716,-1.3716 3.2512,-1.3716 1.2192,0 2.2352,0.6096 1.016,0.5588 1.6256,1.524 1.016,1.524 2.6416,2.3368 1.6256,0.762 3.7084,0.762 3.048,0 4.572,-1.1176 1.524,-1.1176 1.524,-3.048 0,-1.4732 -1.016,-2.4384 -1.016,-1.016 -3.6068,-1.5748 l -6.2484,-1.3208 q -5.3848,-1.1684 -8.0264,-3.9116 -2.5908,-2.794 -2.5908,-7.4676 0,-3.3528 1.778,-6.0452 1.8288,-2.6924 5.2832,-4.2164 3.4544,-1.524 8.2296,-1.524 7.7724,0 12.0904,4.064 1.27,1.2192 1.27,3.3528 0,1.8288 -1.3208,3.1496 -1.27,1.3208 -3.0988,1.3208 -1.1684,0 -2.1844,-0.5588 -0.9652,-0.6096 -1.5748,-1.524 -1.5748,-2.54 -5.2324,-2.54 -2.794,0 -4.1148,1.016 -1.3208,1.016 -1.3208,2.4892 0,1.524 1.016,2.54 1.0668,1.016 3.81,1.5748 l 6.1976,1.3208 q 5.6896,1.2192 8.2804,4.064 2.590799,2.8448 2.590799,7.3152 0,3.4544 -1.676399,6.2992 -1.6256,2.794 -5.334,4.5212 -3.7084,1.7272 -9.4996,1.7272 z"
id="path7542-2-7" />
<path
inkscape:connector-curvature="0"
id="path1362-5-8-1-3-3"
style="fill:#1b2f0d;fill-opacity:1;stroke:none;stroke-width:0.528336;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
d="m -77.773509,994.12445 c -0.991513,-1.82785 -3.261269,-2.50118 -5.089148,-1.50965 -1.827858,0.99151 -2.501148,3.26127 -1.509635,5.08913 l 1.861116,3.43097 c 0.991531,1.8279 3.261269,2.5012 5.089159,1.5097 1.827847,-0.9915 2.501155,-3.26128 1.509625,-5.08917 z m 37.02627,-26.21023 c -0.991513,-1.82786 -3.261279,-2.50118 -5.089148,-1.50966 -1.827858,0.99151 -2.501159,3.26128 -1.509646,5.08914 l 1.861128,3.431 c 0.991513,1.82786 3.261268,2.50115 5.089126,1.50964 1.827868,-0.99152 2.501181,-3.26127 1.509668,-5.08913 z m 9.015465,16.62012 -1.241825,-2.28748 c -1.222835,-2.2543 -3.678724,-3.27097 -5.506582,-2.27945 -1.827858,0.99151 -2.315005,3.60461 -1.092169,5.85891 l 1.635675,3.01537 c 1.222835,2.25431 0.735742,4.86738 -1.092148,5.85891 -1.827858,0.99151 -4.283747,-0.0252 -5.506582,-2.27945 l -5.481248,-10.1047 -1.025815,-1.8911 c -1.222835,-2.2543 -3.678852,-3.27089 -5.50672,-2.27938 -1.827858,0.99152 -2.314973,3.6046 -1.092138,5.8589 l 1.025816,1.8911 0.965795,1.78044 c 1.222829,2.25429 0.735688,4.8674 -1.09217,5.85892 -1.827857,0.99151 -4.283763,-0.0252 -5.506592,-2.27945 l -0.370759,-0.6835 c -1.222835,-2.2543 -3.678858,-3.2709 -5.506715,-2.27939 -1.82789,0.99153 -2.314999,3.60463 -1.092164,5.85893 l 3.92837,7.24198 4.771844,8.7969 c 1.222835,2.2543 0.735854,4.8673 -1.092014,5.8588 -1.827858,0.9915 -4.283881,-0.025 -5.506716,-2.2794 l -1.249959,-2.3043 -1.515734,-2.7942 c -1.222818,-2.2543 -3.678842,-3.2709 -5.506721,-2.2794 -1.827858,0.9915 -2.314827,3.6046 -1.092009,5.8588 l 1.515734,2.7943 5.651068,10.4178 9.550363,17.6061 c 0.08749,0.1613 0.177907,0.3203 0.26606,0.4803 0.01295,0.032 0.02916,0.061 0.04424,0.092 7.04741,12.9919 23.100994,17.9148 35.85665,10.9956 12.755667,-6.9193 17.3831278,-23.0605 10.335739,-36.0524 -0.03391,-0.058 -0.0679,-0.115 -0.101831,-0.1725 -1.1e-4,-2e-4 -2.82e-4,-5e-4 -4.16e-4,-7e-4 -0.06916,-0.1326 -0.139477,-0.2648 -0.211028,-0.3967 l -11.662459,-21.4998 z m -23.834978,34.49036 c -0.164334,0.2111 -0.325446,0.4247 -0.483263,0.6408 0.157869,-0.216 0.318923,-0.4297 0.483263,-0.6408 z m -1.514113,2.3268 c -0.115793,0.1857 -0.229283,0.3729 -0.340426,0.5615 0.111166,-0.1886 0.224627,-0.3758 0.340426,-0.5615 z m -3.348636,-1.4673 c -0.08368,0.1711 -0.165476,0.3431 -0.245443,0.516 0.07996,-0.1729 0.161758,-0.3449 0.245443,-0.516 z m -0.990016,2.5711 c -0.05264,0.143 -0.103919,0.2862 -0.153998,0.43 0.05001,-0.1438 0.101417,-0.2871 0.153998,-0.43 z m -0.708091,2.6214 c -0.0323,0.1258 -0.06368,0.2519 -0.09416,0.3782 0.03049,-0.1263 0.06186,-0.2524 0.09416,-0.3782 z m -0.439237,2.6941 c -0.01552,0.103 -0.03043,0.2062 -0.04475,0.3095 0.01426,-0.1033 0.02922,-0.2064 0.04475,-0.3095 z m -0.164122,2.7663 c -0.0031,0.066 -0.0062,0.1314 -0.0089,0.1973 0.0027,-0.066 0.0057,-0.1316 0.0089,-0.1973 z m 0.117313,2.6973 c 0.0028,0.054 0.0056,0.1076 0.0087,0.1612 -0.003,-0.054 -0.006,-0.1075 -0.0087,-0.1612 z m 0.393687,2.7218 c 0.0029,0.026 0.0078,0.05 0.01165,0.076 -0.0041,-0.025 -0.0078,-0.051 -0.01165,-0.076 z m 0.647271,2.5899 c 0.0058,0.026 0.01321,0.051 0.01961,0.076 -0.0058,-0.026 -0.01321,-0.051 -0.01961,-0.076 z m 0.91064,2.5475 0.01513,0.043 z"
sodipodi:nodetypes="ssssssssssssssccsccsscssscssccsscssscsssccsccscscsccccccccccccccccccccccccccccccccccc" />
<path
style="color:#000000;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:40px;line-height:1;font-family:Jellee;-inkscape-font-specification:Jellee;letter-spacing:0px;word-spacing:0px;fill:url(#linearGradient12134);fill-opacity:1;stroke:none;stroke-width:14.5495;stroke-linecap:square;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;paint-order:markers stroke fill"
d="m -78.174643,1048.606 q -9.144,0 -13.97,-5.1816 -4.826,-5.2324 -4.826,-14.5288 0,-5.9944 2.286,-10.5664 2.3368,-4.6228 6.5532,-7.1628 4.2672,-2.5908 9.9568,-2.5908 4.6736,0 8.2296,1.524 3.556,1.4732 5.7912,4.2164 0.9144,1.0668 0.9144,2.9972 0,1.9304 -1.3716,3.302 -1.3208,1.3208 -3.2512,1.3208 -1.2192,0 -2.3368,-0.6096 -1.0668,-0.6096 -1.6764,-1.6256 -2.032,-3.4544 -6.2992,-3.4544 -3.8608,0 -6.1976,3.048 -2.3368,2.9972 -2.3368,9.144 0,6.2992 2.3876,9.398 2.3876,3.0988 6.1468,3.0988 4.4704,0 6.604,-3.8608 0.6096,-1.1176 1.7272,-1.778 1.1176,-0.7112 2.4384,-0.7112 1.9304,0 3.302,1.4224 1.4224,1.3716 1.4224,3.3528 0,1.524 -0.9144,2.8448 -4.6736,6.4008 -14.5796,6.4008 z"
id="path7922-5-4" />
<path
id="path1364-4-0-4-3-4"
d="m -19.646414,1022.4236 c -0.240073,-0.4374 -0.497506,-0.8652 -0.771527,-1.2822 -0.01652,-0.033 -0.03277,-0.065 -0.05042,-0.098 l -11.126893,-20.5125 c -0.991524,-1.82783 -3.261339,-2.50114 -5.089197,-1.50962 -1.827858,0.99152 -2.501206,3.26132 -1.509682,5.08922 l 4.099701,7.5578 -4.369278,-8.0548 4.780608,8.8131 c 0.991524,1.8279 0.318325,4.0976 -1.509533,5.0891 -1.82789,0.9915 -4.097672,0.3182 -5.089197,-1.5097 l -0.205789,-0.3793 -8.97e-4,3e-4 -2.148905,-3.9615 c -0.99153,-1.8279 -3.261355,-2.5012 -5.089213,-1.5097 -1.827858,0.9915 -2.501196,3.2613 -1.509666,5.0892 l 2.53135,4.6665 0.449377,0.8285 0.122425,0.2257 c 0.99153,1.8278 0.31832,4.0976 -1.509538,5.0891 -1.827879,0.9915 -4.097672,0.3182 -5.089203,-1.5097 l -0.571801,-1.0541 -0.330501,-0.6093 c -0.991524,-1.8279 -3.261339,-2.5012 -5.089207,-1.5097 -1.827858,0.9916 -2.501058,3.2613 -1.509533,5.0892 l 6.769781,12.4801 c 0.03288,0.061 0.06765,0.1196 0.103293,0.1777 0.186243,0.4286 0.388282,0.8502 0.605872,1.2638 4.959265,9.1424 16.390891,12.5335 25.533292,7.5743 9.142383,-4.9593 12.533492,-16.3909 7.574269,-25.5333 z m -30.35107,-24.32713 c -0.99153,-1.82789 -3.261345,-2.50119 -5.089203,-1.50968 -1.827858,0.99151 -2.501196,3.26132 -1.509665,5.08921 l 1.674724,3.0874 c 0.991513,1.8278 3.261339,2.5011 5.089197,1.5096 1.827858,-0.9915 2.501184,-3.2613 1.509671,-5.0892 z"
style="fill:url(#linearGradient12128);fill-opacity:1;stroke:none;stroke-width:0.218827;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
inkscape:connector-curvature="0"
sodipodi:nodetypes="ccssssccsssccsssccssccsssscccccsssscss" />
</g>
</g>
</g>
</g>
</svg>

Before

Width:  |  Height:  |  Size: 68 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 KiB

View File

@@ -1,34 +0,0 @@
[remap]
importer="texture"
type="StreamTexture"
path="res://.import/no_image.png-7e4632ad2d21010b279ddaa4725bacb7.stex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://addons/escoria-core/game/assets/images/no_image.png"
dest_files=[ "res://.import/no_image.png-7e4632ad2d21010b279ddaa4725bacb7.stex" ]
[params]
compress/mode=0
compress/lossy_quality=0.7
compress/hdr_mode=0
compress/bptc_ldr=0
compress/normal_map=0
flags/repeat=0
flags/filter=false
flags/mipmaps=false
flags/anisotropic=false
flags/srgb=2
process/fix_alpha_border=true
process/premult_alpha=false
process/HDR_as_SRGB=false
process/invert_color=false
stream=false
size_limit=0
detect_3d=true
svg/scale=1.0

Binary file not shown.

Before

Width:  |  Height:  |  Size: 174 B

View File

@@ -1,517 +0,0 @@
# Node that performs the moving (walk, teleport, terrain scaling...) actions on
# its parent node.
extends Node
class_name ESCMovable
# Tasks carried out by this walkable node
# NONE - The node is inactive
# WALK - The node walks the parent somewhere
# SLIDE - The node slides the parent somewhere
enum MovableTask {
NONE,
WALK,
SLIDE
}
# Character path through the scene as calculated by the Pathfinder
var walk_path: Array = []
# Current active walk path entry
var path_ofs: int
# The destination where the character should be moving to
var walk_destination: Vector2
# The walk context currently carried out by this movable node
var walk_context: ESCWalkContext = null
# Whether the character was moved at all
var moved: bool
# Player Direction used to reflect the movement to the new position
var last_dir: int
# The last scaling applied to the parent
var last_scale: Vector2
# Whether the current direction animation is flipped
var is_mirrored: bool
var _orig_speed: float = 0.0
# Shortcut variable that references the node's parent
onready var parent = get_parent()
# Currenly running task
onready var task = MovableTask.NONE
# Add the signal "arrived" to the parent node, which is emitted when
# the destination position was reached
func _ready() -> void:
if not parent.has_user_signal("arrived"):
parent.add_user_signal("arrived")
# Main processing loop
#
# #### Parameters
#
# - delta: Time that has passed since the last call to this function
func _process(delta: float) -> void:
if Engine.is_editor_hint():
return
if task == MovableTask.WALK or task == MovableTask.SLIDE:
var old_pos = parent.get_position()
var new_pos = _calculate_movement(delta)
if new_pos == null:
return
if task == MovableTask.WALK:
# Get the angle of the object to face the position to reach.
var angle: float = (old_pos.angle_to_point(new_pos))
_perform_walk_orientation(angle)
update_terrain()
else:
moved = false
set_process(false)
# Calculates the next position of the object.
#
# #### Parameters
#
# - delta: the time elapsed from last frame
#
# *Returns*
# The new Vector2 position of the object, or null if stop walking.
func _calculate_movement(delta: float):
# Initialize the current pos and previous pos variables
var pos: Vector2 = parent.get_position()
var old_pos: Vector2 = pos
# Get next waypoint from the walkpath array.
var next: Vector2
if walk_path.size() > 1:
next = walk_path[path_ofs + 1]
else:
next = walk_path[path_ofs]
# Movement speed calculation
var movement_speed: float = parent.speed * delta * pow(last_scale.x, 2) * \
parent.terrain.player_speed_multiplier
if walk_context.fast:
movement_speed *= parent.terrain.player_doubleclick_speed_multiplier
# Calculate the direction vector from current position and next waypoint
var dir: Vector2 = (next - pos).normalized()
# If we're close to the next waypoint (ie. distance < necessary movement
# speed to get to this waypoint, we consider the waypoint reached
# and pass to the next one.
# Else, calculate the new position.
var new_pos: Vector2
if pos.distance_to(next) < movement_speed:
new_pos = next
path_ofs += 1
else:
new_pos = pos + dir * movement_speed * parent.v_speed_damp
# If current waypoint id is >= the number of waypoints, were're at the
# end of the walk: stop walking.
if path_ofs >= walk_path.size() - 1:
walk_stop(walk_destination)
return
# Update current position variable
pos = new_pos
parent.set_position(pos)
return pos
# Calculates the orientation of the object while walking, to play the right
# animation according to this orientation.
#
# #### Parameters
#
# - angle: the angle X axis and object's facing direction.
func _perform_walk_orientation(angle: float):
last_dir = _get_dir_deg(ESCUtils.get_deg_from_rad(angle),
parent.animations)
var animation_player: ESCAnimationPlayer = \
parent.get_animation_player()
var current_animation = animation_player.get_animation()
var animation_to_play = \
parent.animations.directions[last_dir].animation
if current_animation != animation_to_play and \
animation_player.has_animation(animation_to_play):
animation_player.play(animation_to_play)
elif current_animation != animation_to_play and \
not animation_player.has_animation(animation_to_play):
current_animation = animation_to_play
escoria.logger.warn(
self,
"Character %s has no animation %s\nBypassing the missing animation and movement command."
% [parent.global_id, animation_to_play]
)
is_mirrored = parent.animations.directions[last_dir].mirrored
# Teleports this item to the target position.
#
# #### Parameters
#
# - target: Position2d or ESCItem to teleport to
func teleport(target: Node) -> void:
if target.has_method("get_interact_position"):
parent.global_position = target.get_interact_position()
escoria.logger.info(
self,
"Object %s is teleported to position %s."
% [target.name, parent.global_position]
)
elif "position" in target:
escoria.logger.info(
self,
"Object %s teleported to position %s."
% [parent.global_id, str(target.global_position)]
)
parent.global_position = target.global_position
else:
escoria.logger.error(
self,
"Target %s could not be teleported. Please configure the interact position parameter or create a child ESCLocation node." % target
)
# Teleports this item to the target position.
#
# #### Parameters
#
# - target: Vector2 target position to teleport to
func teleport_to(target: Vector2) -> void:
escoria.logger.info(
self,
"Object %s teleported to position %s."
% [parent.global_id, str(target)]
)
parent.global_position = target
# Walk to a given position
#
# #### Parameters
#
# - pos: Position to walk to
# - p_walk_context: Walk context to use
func walk_to(pos: Vector2, p_walk_context: ESCWalkContext = null) -> void:
if not parent.terrain:
walk_stop(parent.get_position())
return
if task == MovableTask.WALK:
if walk_context.target_object == p_walk_context.target_object \
or walk_context.target_position \
== p_walk_context.target_position:
walk_context.fast = p_walk_context.fast
walk_context = p_walk_context
if task == MovableTask.NONE:
task = MovableTask.WALK
walk_path = parent.terrain.get_simple_path(parent.get_position(), pos, true)
if walk_path.size() == 0:
task = MovableTask.NONE
walk_stop(parent.get_position())
set_process(false)
return
moved = true
walk_destination = walk_path[walk_path.size()-1]
path_ofs = 0
task = MovableTask.WALK
set_process(true)
# We have finished walking. Set the idle pose and complete
#
# #### Parameters
#
# - pos: Final target position
func walk_stop(pos: Vector2) -> void:
parent.global_position = pos
# parent.interact_status = parent.INTERACT_STATES.INTERACT_NONE
walk_path = []
if _orig_speed > 0:
parent.speed = _orig_speed
_orig_speed = 0.0
task = MovableTask.NONE
moved = false
set_process(false)
# If we're heading to an object and reached its interaction position,
# orient towards the defined interaction direction set on the object
# (if any), can be ESCItem or ESCLocation
if walk_context.target_object and \
walk_context.target_object.node.player_orients_on_arrival:
var orientation = walk_context.target_object.node.interaction_direction
last_dir = orientation
parent.get_animation_player().play(
parent.animations.idles[orientation].animation
)
is_mirrored = parent.animations.idles[orientation].mirrored
else:
parent.get_animation_player().play(
parent.animations.idles[last_dir].animation
)
is_mirrored = parent.animations.idles[last_dir].mirrored
update_terrain()
if walk_context.target_object:
escoria.logger.debug(
self,
"%s arrived at %s." % [
parent.global_id,
walk_context.target_object.global_id
]
)
else:
escoria.logger.debug(
self,
"%s arrived at %s." % [
parent.global_id,
walk_context.target_position
]
)
parent.emit_signal("arrived", walk_context)
# Update the sprite scale and lighting
#
# #### Parameters
#
# - on_event_finished_name: Used if this function is called from an ESC event
func update_terrain(on_event_finished_name = null) -> void:
if !parent.terrain or parent.terrain == null \
or !is_instance_valid(parent.terrain):
return
if on_event_finished_name != null \
and on_event_finished_name != ESCEventManager.EVENT_SETUP:
return
if parent.get("is_exit"):
return
if parent.get("dont_apply_terrain_scaling"):
return
if not parent.is_inside_tree():
return
var pos = parent.global_position
if pos.y <= VisualServer.CANVAS_ITEM_Z_MAX:
parent.z_index = pos.y
else:
parent.z_index = VisualServer.CANVAS_ITEM_Z_MAX
var factor = parent.terrain.get_terrain(pos)
var scal = parent.terrain.get_scale_range(factor)
if scal != parent.get_scale():
last_scale = scal
parent.scale = last_scale
var color = parent.terrain.get_light(pos)
parent.modulate = color
var sprite: Node = parent.get_sprite()
# Do not flip the entire character, because that would conflict
# with shadows that expect to be siblings of $texture
#
# - Current sprite scale is >0, meaning it's currently heading to right
# - but calculated is_mirrored is <0, meaning it's going to head to left
# Or, on the contrary:
# - current sprite scale is <0, meaning it's currently heading to left
# - but calculated is_mirrored is >0, meaning it's going to head to right
# We're operating a 180° turn (from right to left, or from left to right)
# So we just inverse the sprite scale.
if is_mirrored and sprite.scale.x > 0 \
or not is_mirrored and sprite.scale.x < 0:
sprite.scale.x *= -1
parent.collision.scale.x *= -1
# Get the player direction index based on degrees
#
# #### Parameters
#
# - deg: Degrees
# - animations: Player animations script
func _get_dir_deg(deg: int, animations: ESCAnimationResource) -> int:
# We turn the angle by -90° because angle_to_point gives the angle
# against X axis, not Y
deg = wrapi(deg - 90, 0, 360)
var dir = -1
var i = 0
for direction_angle in animations.dir_angles:
if _is_angle_in_interval(deg, direction_angle):
dir = i
break
else:
i += 1
continue
# It's an error to have the animations misconfigured
if dir == -1:
escoria.logger.error(
self,
"No animation has been configured for angle %s." % str(deg)
)
return dir
# Returns true if given angle is inside the interval given by a starting_angle
# and the size.
#
# #### Parameters
#
# - angle: Angle to test
# - direction_angle: ESCDirectionAngle resource, containing the starting angle,
# and the size of interval
# eg: angle_start=90, angle_size=40 corresponds to angle between 90° and 130°
func _is_angle_in_interval(
angle: float,
direction_angle: ESCDirectionAngle
) -> bool:
var start_angle = direction_angle.angle_start
var end_angle = direction_angle.angle_start + direction_angle.angle_size
if end_angle > 360 and angle < start_angle:
angle += 360
return (start_angle <= angle and angle <= end_angle)
# Sets character's angle and plays according animation.
#
# #### Parameters
#
# - deg int angle to set the character
# - wait float Wait this amount of seconds until continuing with turning around
func set_angle(deg: int, wait: float = 0.0) -> void:
if deg < 0 or deg > 360:
escoria.logger.error(
self,
"Invalid degree to turn to : %s. Valid angles are between 0 and 360." % str(deg)
)
moved = true
var current_dir = last_dir
var target_dir = _get_dir_deg(deg, parent.animations)
var way_to_turn = get_shortest_way_to_dir(current_dir, target_dir)
var dir = current_dir
while dir != target_dir:
dir += way_to_turn
if dir >= parent.animations.dir_angles.size():
dir = 0
if dir < 0:
dir = parent.animations.dir_angles.size() - 1
parent.get_animation_player().play(
parent.animations.idles[dir].animation
)
if wait > 0.0:
yield(get_tree().create_timer(wait), "timeout")
is_mirrored = parent.animations.idles[dir].mirrored
last_dir = _get_dir_deg(deg, parent.animations)
# The character may have a state animation from before, which would be
# resumed, so we immediately force the correct idle animation
if parent.get_animation_player().get_animation() != \
parent.animations.idles[last_dir].animation:
parent.get_animation_player().play(
parent.animations.idles[last_dir].animation
)
update_terrain()
# Turns the character to face another item or character.
#
# #### Parameters
#
# - item_id id of the object to face.
# - float Wait this amount of seconds until continuing with turning around
func turn_to(item: Node, wait: float = 0.0) -> void:
set_angle(
wrapi(
rad2deg(parent.get_position().angle_to_point(item.get_position())),
0,
360
),
wait
)
# Returns the angle that corresponds to the current direction of the object.
func _get_angle() -> int:
return parent.animations.dir_angles[last_dir].angle_start
# Return the shortest way to turn from a direction to another. Returned way is
# either:
# -1 (shortest way is to turn anti-clockwise)
# 0 (already at the right direction)
# 1 (clockwise).
#
# ####Parameters
# - current_dir: integer corresponding to the starting direction as defined in
# the attached ESCAnimationResource.directions.
# - target_dir: integer corresponding to the target direction as defined in
# the attached ESCAnimationResource.directions.
#
# *Returns*
# Integer: -1 (anti-clockwise), 1 (clockwise) or 0 (no movement needed).
func get_shortest_way_to_dir(current_dir: int, target_dir: int) -> int:
if current_dir < 0 or current_dir > parent.animations.dir_angles.size() - 1:
escoria.logger.error(
self,
"Invalid direction (current_dir) %s" % str(current_dir)
)
if target_dir < 0 or target_dir > parent.animations.dir_angles.size() - 1:
escoria.logger.error(
self,
"Invalid direction (target_dir) %s " % str(target_dir)
)
if current_dir == target_dir:
return 0
var internal = false
if max(current_dir, target_dir) - min(current_dir, target_dir) \
< parent.animations.dir_angles.size() / 2:
internal = true
else:
internal = false
if internal and current_dir < target_dir or \
(not internal and current_dir > target_dir):
return 1
else:
return -1

View File

@@ -1,74 +0,0 @@
# `accept_input [type]`
#
# Sets how much input the game is to accept. This allows for cut scenes
# in which dialogue can be skipped (if [type] is set to SKIP), and ones where
# it can't (if [type] is set to NONE).
#
# **Parameters**
#
# - *type*: Type of inputs to accept (ALL)
# `ALL`: Accept all types of user input
# `SKIP`: Accept skipping dialogues but nothing else
# `NONE`: Deny all inputs (including opening menus)
#
# **Warning**: `SKIP` and `NONE` also disable autosaves.
#
# **Warning**: The type of user input accepted will persist even after the
# current event has ended. Remember to reset the input type at the end of
# cut-scenes!
#
# @ESC
extends ESCBaseCommand
class_name AcceptInputCommand
# The list of supported input types
const SUPPORTED_INPUT_TYPES = ["ALL", "NONE", "SKIP"]
# Return the descriptor of the arguments of this command
func configure() -> ESCCommandArgumentDescriptor:
return ESCCommandArgumentDescriptor.new(
1,
[TYPE_STRING],
["ALL"]
)
# Validate whether the given arguments match the command descriptor
func validate(arguments: Array):
if not .validate(arguments):
return false
if not arguments[0] in SUPPORTED_INPUT_TYPES:
escoria.logger.error(
self,
"[%s]: invalid parameter. %s is not a valid parameter value." +
"Should be one of %s"
% [
get_command_name(),
arguments[0],
str(SUPPORTED_INPUT_TYPES)
]
)
return false
return true
# Run the command
func run(command_params: Array) -> int:
var mode = escoria.inputs_manager.INPUT_ALL
match command_params[0]:
"NONE":
mode = escoria.inputs_manager.INPUT_NONE
"SKIP":
mode = escoria.inputs_manager.INPUT_SKIP
escoria.inputs_manager.input_mode = mode
return ESCExecution.RC_OK
# Function called when the command is interrupted.
func interrupt():
# Do nothing
pass

View File

@@ -1,61 +0,0 @@
# `anim object name [reverse]`
#
# Executes the animation specified in "name" on "object" without blocking.
# The next command in the event will be executed immediately after the
# animation is started.
#
# **Parameters**
#
# * *object*: Global ID of the object with the animation
# * *name*: Name of the animation to play
# * *reverse*: Plays the animation in reverse when true
#
# @ESC
extends ESCBaseCommand
class_name AnimCommand
# Return the descriptor of the arguments of this command
func configure() -> ESCCommandArgumentDescriptor:
return ESCCommandArgumentDescriptor.new(
2,
[TYPE_STRING, TYPE_STRING, TYPE_BOOL],
[null, null, false]
)
# Validate whether the given arguments match the command descriptor
func validate(arguments: Array):
if not .validate(arguments):
return false
if not escoria.object_manager.has(arguments[0]):
escoria.logger.error(
self,
"[%s]: invalid object. Object with global id %s not found."
% [get_command_name(), arguments[0]]
)
return false
return true
# Run the command
func run(command_params: Array) -> int:
var obj = escoria.object_manager.get_object(command_params[0])
var anim_id = command_params[1]
var reverse = command_params[2]
var animator: ESCAnimationPlayer = \
(obj.node as ESCItem).get_animation_player()
if reverse:
animator.play_backwards(anim_id)
else:
animator.play(anim_id)
return ESCExecution.RC_OK
# Function called when the command is interrupted.
func interrupt():
escoria.logger.debug(
self,
"[%s] interrupt() function not implemented." % get_command_name()
)

View File

@@ -1,67 +0,0 @@
# `anim_block object name [reverse]`
#
# Executes the animation specified in "name" on "object" while blocking other
# events from starting.
# The next command in the event will be executed when the animation is
# finished playing.
#
# **Parameters**
#
# * *object*: Global ID of the object with the animation
# * *name*: Name of the animation to play
# * *reverse*: Plays the animation in reverse when true
#
# @ESC
extends ESCBaseCommand
class_name AnimBlockCommand
# Return the descriptor of the arguments of this command
func configure() -> ESCCommandArgumentDescriptor:
return ESCCommandArgumentDescriptor.new(
2,
[TYPE_STRING, TYPE_STRING, TYPE_BOOL],
[null, null, false]
)
# Validate whether the given arguments match the command descriptor
func validate(arguments: Array):
if not .validate(arguments):
return false
if not escoria.object_manager.has(arguments[0]):
escoria.logger.error(
self,
"[%s]: Object with global id %s not found."
% [get_command_name(), arguments[0]]
)
return false
return true
# Run the command
func run(command_params: Array) -> int:
var obj = escoria.object_manager.get_object(command_params[0])
var anim_id = command_params[1]
var reverse = command_params[2]
var animator: ESCAnimationPlayer = \
(obj.node as ESCItem).get_animation_player()
if reverse:
animator.play_backwards(anim_id)
else:
animator.play(anim_id)
if animator.get_length(anim_id) < 1.0:
return ESCExecution.RC_OK
var animation_finished = yield(animator, "animation_finished")
while animation_finished != anim_id:
animation_finished = yield(animator, "animation_finished")
return ESCExecution.RC_OK
# Function called when the command is interrupted.
func interrupt():
escoria.logger.debug(
self,
"[%s] interrupt() function not implemented." % get_command_name()
)

View File

@@ -1,62 +0,0 @@
# `block_say`
#
# `say` commands called subsequent to using the `block_say` command will reuse the
# dialog box type of the previous `say` command if both dialog box types between the two `say`
# commands match.
#
# Different dialog box types can be used across multiple `say` commands, with the latest one
# used being preserved for reuse by the next `say` command should the dialog box type specified by
# both `say` commands match.
#
# This reuse will continue until a call to `end_block_say` is made.
#
# Using `block_say` more than once prior to calling `end_block_say` is idempotent and has the
# following behaviour:
#
# - If no `say` command has yet been encountered since the first use of `block_say`,
# the result of using this command will be as described above.
# - If a `say` command has been encountered since the previous use of `block_say`,
# the dialog box used with that `say` command will continue to be reused for subsequent
# `say` commands should the dialog box type requested match. Note that the dialog box used with
# the next `say` command may be different than the one currently being reused.
#
# Example:
# `block say`
# `say player "Picture's looking good."`
# `say player "And so am I."`
# `end_block_say`
#
# This example will reuse the same dialog box type since they are the same between both `say` calls.
#
# @ESC
extends ESCBaseCommand
class_name BlockSayCommand
# Constructor
func _init() -> void:
pass
# Return the descriptor of the arguments of this command
func configure() -> ESCCommandArgumentDescriptor:
return ESCCommandArgumentDescriptor.new(0)
# Validate whether the given arguments match the command descriptor
func validate(arguments: Array):
return true
# Run the command
func run(command_params: Array) -> int:
escoria.dialog_player.enable_preserve_dialog_box()
return ESCExecution.RC_OK
# Function called when the command is interrupted.
func interrupt():
escoria.logger.debug(
self,
"[%s] interrupt() function not implemented." % get_command_name()
)

View File

@@ -1,112 +0,0 @@
# `camera_push target [time] [type]`
#
# Pushes (moves) the camera so it points at a specific `target`. If the camera
# was following a target (like the player) previously, it will no longer follow
# this target.
#
# Make sure the target is reachable if camera limits have been configured.
#
# **Parameters**
#
# - *target*: Global ID of the `ESCItem` to push the camera to. `ESCItem`s have
# a "camera_node" property that can be set to point to a node (usually an
# `ESCLocation` node). If the "camera_node" property is empty, `camera_push`
# will point the camera at the `ESCItem`s location. If however, the `ESCItem`
# has its "camera_node" property set, the command will instead point the
# camera at the node referenced by the `ESCItem`s "camera_node" property.
# - *time*: Number of seconds the transition should take (default: `1`)
# - *type*: Transition type to use (default: `QUAD`)
#
# Supported transitions include the names of the values used
# in the "TransitionType" enum of the "Tween" type (without the "TRANS_" prefix):
#
# See https://docs.godotengine.org/en/stable/classes/class_tween.html?highlight=tween#enumerations
#
# For more details see: https://docs.escoria-framework.org/camera
#
# @ESC
extends ESCCameraBaseCommand
class_name CameraPushCommand
# The list of supported transitions as per the link mentioned above
const SUPPORTED_TRANSITIONS = ["LINEAR","SINE","QUINT","QUART","QUAD" ,"EXPO","ELASTIC","CUBIC",
"CIRC","BOUNCE","BACK"]
# Return the descriptor of the arguments of this command
func configure() -> ESCCommandArgumentDescriptor:
return ESCCommandArgumentDescriptor.new(
1,
[TYPE_STRING, [TYPE_REAL, TYPE_INT], TYPE_STRING],
[null, 1, "QUAD"]
)
# Validate whether the given arguments match the command descriptor
func validate(arguments: Array):
if not .validate(arguments):
return false
if not escoria.object_manager.has(arguments[0]):
escoria.logger.error(
self,
"[%s]: invalid object. Object global id %s not found."
% [get_command_name(), arguments[0]]
)
return false
var target_pos = _get_target_pos(arguments[0])
var camera: ESCCamera = escoria.object_manager.get_object(escoria.object_manager.CAMERA).node as ESCCamera
if not camera.check_point_is_inside_viewport_limits(target_pos):
generate_viewport_warning(target_pos, camera)
return false
if not arguments[2] in SUPPORTED_TRANSITIONS:
escoria.logger.error(
self,
(
"[{command_name}]: invalid transition type. Transition type {t_type} " +
"is not one of the accepted types : {allowed_types}"
).format(
{
"command_name":get_command_name(),
"t_type":arguments[2],
"allowed_types":SUPPORTED_TRANSITIONS
}
)
)
return false
return true
# Run the command
func run(command_params: Array) -> int:
(escoria.object_manager.get_object(escoria.object_manager.CAMERA).node as ESCCamera)\
.push(
escoria.object_manager.get_object(command_params[0]).node,
command_params[1],
ClassDB.class_get_integer_constant("Tween", "TRANS_%s" % command_params[2])
)
return ESCExecution.RC_OK
# Function called when the command is interrupted.
func interrupt():
escoria.logger.debug(
self,
"[%s] interrupt() function not implemented." % get_command_name()
)
# Gets the appropriate target position from the `ESCItem`, as used by the camera.
#
# #### Parameters
#
# - target_global_id: The `global_id` of the `ESCItem` to check.
#
# **Returns** the item's position based on its camera node.
func _get_target_pos(target_global_id: String) -> Vector2:
var target = escoria.object_manager.get_object(target_global_id).node as ESCItem
return target.get_camera_node().global_position

View File

@@ -1,127 +0,0 @@
# `camera_push_block target [time] [type]`
#
# Pushes (moves) the camera so it points at a specific `target`. If the camera
# was following a target (like the player) previously, it will no longer follow
# this target. Blocks until the command completes.
#
# Make sure the target is reachable if camera limits have been configured.
#
# **Parameters**
#
# - *target*: Global ID of the `ESCItem` to push the camera to. `ESCItem`s have
# a "camera_node" property that can be set to point to a node (usually an
# `ESCLocation` node). If the "camera_node" property is empty, `camera_push_block`
# will point the camera at the `ESCItem`s location. If however, the `ESCItem`
# has its "camera_node" property set, the command will instead point the
# camera at the node referenced by the `ESCItem`s "camera_node" property.
# - *time*: Number of seconds the transition should take (default: `1`)
# - *type*: Transition type to use (default: `QUAD`)
#
# Supported transitions include the names of the values used
# in the "TransitionType" enum of the "Tween" type (without the "TRANS_" prefix).
#
# See https://docs.godotengine.org/en/stable/classes/class_tween.html?highlight=tween#enumerations
#
# For more details see: https://docs.escoria-framework.org/camera
#
# @ESC
extends ESCCameraBaseCommand
class_name CameraPushBlockCommand
# The list of supported transitions as per the link mentioned above
const SUPPORTED_TRANSITIONS = ["LINEAR","SINE","QUINT","QUART","QUAD" ,"EXPO","ELASTIC","CUBIC",
"CIRC","BOUNCE","BACK"]
# Tween for blocking
var _camera_tween: Tween
# Return the descriptor of the arguments of this command
func configure() -> ESCCommandArgumentDescriptor:
return ESCCommandArgumentDescriptor.new(
1,
[TYPE_STRING, [TYPE_REAL, TYPE_INT], TYPE_STRING],
[null, 1, "QUAD"]
)
# Validate whether the given arguments match the command descriptor
func validate(arguments: Array):
if not .validate(arguments):
return false
if not escoria.object_manager.has(arguments[0]):
escoria.logger.error(
self,
"[%s]: invalid object. Object global id %s not found."
% [get_command_name(), arguments[0]]
)
return false
var target_pos = _get_target_pos(arguments[0])
var camera: ESCCamera = escoria.object_manager.get_object(escoria.object_manager.CAMERA).node as ESCCamera
if not camera.check_point_is_inside_viewport_limits(target_pos):
generate_viewport_warning(target_pos, camera)
return false
if not arguments[2] in SUPPORTED_TRANSITIONS:
escoria.logger.error(
self,
(
"[{command_name}]: invalid transition type. Transition type {t_type} " +
"is not one of the accepted types : {allowed_types}"
).format(
{
"command_name":get_command_name(),
"t_type":arguments[2],
"allowed_types":SUPPORTED_TRANSITIONS
}
)
)
return false
_camera_tween = camera.get_tween()
return true
# Run the command
func run(command_params: Array) -> int:
(escoria.object_manager.get_object(escoria.object_manager.CAMERA).node as ESCCamera)\
.push(
escoria.object_manager.get_object(command_params[0]).node,
command_params[1],
ClassDB.class_get_integer_constant("Tween", "TRANS_%s" % command_params[2])
)
if command_params[1] > 0.0:
yield(_camera_tween, "tween_completed")
escoria.logger.debug(
self,
"camera_push_block tween complete."
)
return ESCExecution.RC_OK
# Function called when the command is interrupted.
func interrupt():
escoria.logger.debug(
self,
"[%s] interrupt() function not implemented." % get_command_name()
)
# Gets the appropriate target position from the `ESCItem`, as used by the camera.
#
# #### Parameters
#
# - target_global_id: The `global_id` of the `ESCItem` to check.
#
# **Returns** the ESCitem's position based on its camera node.
func _get_target_pos(target_global_id: String) -> Vector2:
var target = escoria.object_manager.get_object(target_global_id).node as ESCItem
return target.get_camera_node().global_position

View File

@@ -1,64 +0,0 @@
# `camera_set_limits camlimits_id`
#
# Limits the current camera's movement to a limit defined in the `ESCRoom`'s
# definition. A limit is defined as an upper-left (x, y) coordinate, a width
# and a height that the camera must stay within. Multiple limits can be
# defined for a room, allowing for new areas to be seen once they have
# been 'unlocked'.
#
# **Parameters**
#
# - *camlimits_id*: Index of the camera limit defined in the `camera limits`
# list of the current `ESCRoom`
#
# For more details see: https://docs.escoria-framework.org/camera
#
# @ESC
extends ESCCameraBaseCommand
class_name CameraSetLimitsCommand
# Return the descriptor of the arguments of this command
func configure() -> ESCCommandArgumentDescriptor:
return ESCCommandArgumentDescriptor.new(
1,
[TYPE_INT],
[null]
)
# Validate whether the given arguments match the command descriptor
func validate(arguments: Array):
if not .validate(arguments):
return false
if escoria.main.current_scene.camera_limits.size() < arguments[0]:
escoria.logger.error(
self,
"[%s]: invalid limits id. Camera limit id (%d) is larger than the number of limits defined in this scene (%d)."
% [
get_command_name(),
arguments[0],
escoria.main.current_scene.camera_limits.size()
]
)
return false
return true
# Run the command
func run(command_params: Array) -> int:
var camera: ESCCamera = escoria.object_manager.get_object(escoria.object_manager.CAMERA).node as ESCCamera
camera.clamp_to_viewport_limits()
escoria.main.set_camera_limits(command_params[0])
return ESCExecution.RC_OK
# Function called when the command is interrupted.
func interrupt():
escoria.logger.debug(
self,
"[%s] interrupt() function not implemented." % get_command_name()
)

View File

@@ -1,57 +0,0 @@
# `camera_set_pos time x y`
#
# Moves the camera to the given absolute position over a time period.
#
# **Parameters**
#
# - *time*: Number of seconds the transition should take
# - *x*: Target X coordinate
# - "y*: Target Y coordinate
#
# For more details see: https://docs.escoria-framework.org/camera
#
# @ESC
extends ESCCameraBaseCommand
class_name CameraSetPosCommand
# Return the descriptor of the arguments of this command
func configure() -> ESCCommandArgumentDescriptor:
return ESCCommandArgumentDescriptor.new(
3,
[[TYPE_REAL, TYPE_INT], TYPE_INT, TYPE_INT],
[null, null, null]
)
# Validate whether the given arguments match the command descriptor
func validate(arguments: Array):
if not .validate(arguments):
return false
var new_pos: Vector2 = Vector2(arguments[1], arguments[2])
var camera: ESCCamera = escoria.object_manager.get_object(escoria.object_manager.CAMERA).node as ESCCamera
if not camera.check_point_is_inside_viewport_limits(new_pos):
generate_viewport_warning(new_pos, camera)
return false
return true
# Run the command
func run(command_params: Array) -> int:
(escoria.object_manager.get_object(escoria.object_manager.CAMERA).node as ESCCamera)\
.set_target(
Vector2(command_params[1], command_params[2]),
command_params[0]
)
return ESCExecution.RC_OK
# Function called when the command is interrupted.
func interrupt():
escoria.logger.debug(
self,
"[%s] interrupt() function not implemented." % get_command_name()
)

View File

@@ -1,73 +0,0 @@
# `camera_set_pos_block time x y`
#
# Moves the camera to the given absolute position over a time period. Blocks
# until the command completes.
#
# Make sure the coordinates are reachable if camera limits have been configured.
#
# **Parameters**
#
# - *time*: Number of seconds the transition should take
# - *x*: Target X coordinate
# - "y*: Target Y coordinate
#
# For more details see: https://docs.escoria-framework.org/camera
#
# @ESC
extends ESCCameraBaseCommand
class_name CameraSetPosBlockCommand
# Tween for blocking
var _camera_tween: Tween
# Return the descriptor of the arguments of this command
func configure() -> ESCCommandArgumentDescriptor:
return ESCCommandArgumentDescriptor.new(
3,
[[TYPE_REAL, TYPE_INT], TYPE_INT, TYPE_INT],
[null, null, null]
)
# Validate whether the given arguments match the command descriptor
func validate(arguments: Array):
if not .validate(arguments):
return false
var new_pos: Vector2 = Vector2(arguments[1], arguments[2])
var camera: ESCCamera = escoria.object_manager.get_object(escoria.object_manager.CAMERA).node as ESCCamera
if not camera.check_point_is_inside_viewport_limits(new_pos):
generate_viewport_warning(new_pos, camera)
return false
_camera_tween = camera.get_tween()
return true
# Run the command
func run(command_params: Array) -> int:
(escoria.object_manager.get_object(escoria.object_manager.CAMERA).node as ESCCamera)\
.set_target(
Vector2(command_params[1], command_params[2]),
command_params[0]
)
if command_params[0] > 0.0:
yield(_camera_tween, "tween_completed")
escoria.logger.debug(
self,
"camera_set_pos_block tween complete."
)
return ESCExecution.RC_OK
# Function called when the command is interrupted.
func interrupt():
escoria.logger.debug(
self,
"[%s] interrupt() function not implemented." % get_command_name()
)

View File

@@ -1,60 +0,0 @@
# `camera_set_target time object`
#
# Configures the camera to follow the specified target `object` as it moves
# around the current room. The transition to focus on the `object` will happen
# over a time period.
#
# **Parameters**
#
# - *time*: Number of seconds the transition should take to move the camera
# to follow `object`
# - *object*: Global ID of the target object
#
# For more details see: https://docs.escoria-framework.org/camera
#
# @ESC
extends ESCCameraBaseCommand
class_name CameraSetTargetCommand
# Return the descriptor of the arguments of this command
func configure() -> ESCCommandArgumentDescriptor:
return ESCCommandArgumentDescriptor.new(
2,
[[TYPE_REAL, TYPE_INT], TYPE_STRING],
[null, null]
)
# Validate whether the given arguments match the command descriptor
func validate(arguments: Array):
if not .validate(arguments):
return false
if not escoria.object_manager.has(arguments[1]):
escoria.logger.error(
self,
"[%s]: Invalid object: Object with global id %s not found."
% [get_command_name(), arguments[1]]
)
return false
return true
# Run the command
func run(command_params: Array) -> int:
(escoria.object_manager.get_object(escoria.object_manager.CAMERA).node as ESCCamera)\
.set_target(
escoria.object_manager.get_object(command_params[1]).node,
command_params[0]
)
return ESCExecution.RC_OK
# Function called when the command is interrupted.
func interrupt():
escoria.logger.debug(
self,
"[%s] interrupt() function not implemented." % get_command_name()
)

View File

@@ -1,77 +0,0 @@
# `camera_set_target_block time object`
#
# Configures the camera to follow the specified target `object` (ESCItem) as it moves
# around the current room. The transition to focus on the `object` will happen
# over a time period. Blocks until the command completes.
#
# The camera will move as close as it can if camera limits have been configured
# and the `object` is at coordinates that are not reachable.
#
# **Parameters**
#
# - *time*: Number of seconds the transition should take to move the camera
# to follow `object`
# - *object*: Global ID of the target object
#
# For more details see: https://docs.escoria-framework.org/camera
#
# @ESC
extends ESCCameraBaseCommand
class_name CameraSetTargetBlockCommand
# Tween for blocking
var _camera_tween: Tween
# Return the descriptor of the arguments of this command
func configure() -> ESCCommandArgumentDescriptor:
return ESCCommandArgumentDescriptor.new(
2,
[[TYPE_REAL, TYPE_INT], TYPE_STRING],
[null, null]
)
# Validate whether the given arguments match the command descriptor
func validate(arguments: Array):
if not .validate(arguments):
return false
if not escoria.object_manager.has(arguments[1]):
escoria.logger.error(
self,
"[%s]: Invalid object: Object with global id %s not found."
% [get_command_name(), arguments[1]]
)
return false
var camera: ESCCamera = escoria.object_manager.get_object(escoria.object_manager.CAMERA).node as ESCCamera
_camera_tween = camera.get_tween()
return true
# Run the command
func run(command_params: Array) -> int:
(escoria.object_manager.get_object(escoria.object_manager.CAMERA).node as ESCCamera)\
.set_target(
escoria.object_manager.get_object(command_params[1]).node,
command_params[0]
)
if command_params[0] > 0.0:
yield(_camera_tween, "tween_completed")
escoria.logger.debug(
self,
"camera_set_target_block tween complete."
)
return ESCExecution.RC_OK
# Function called when the command is interrupted.
func interrupt():
escoria.logger.debug(
self,
"[%s] interrupt() function not implemented." % get_command_name()
)

View File

@@ -1,46 +0,0 @@
# `camera_set_zoom magnitude [time]`
#
# Zooms the camera in/out to the desired `magnitude`. Values larger than '1' zoom
# the camera out while smaller values zoom in. These values are relative to the
# default zoom value of '1', not the current value. As such, while using a value
# of '0.5' would double the size of the graphics, running the same command again
# would result in no change. The zoom will happen over the given time period.
#
# **Parameters**
#
# - *magnitude*: Magnitude of zoom
# - *time*: Number of seconds the transition should take, with a value of `0`
# meaning the zoom should happen instantly (default: `0`)
#
# For more details see: https://docs.escoria-framework.org/camera
#
# @ESC
extends ESCCameraBaseCommand
class_name CameraSetZoomCommand
# Return the descriptor of the arguments of this command
func configure() -> ESCCommandArgumentDescriptor:
return ESCCommandArgumentDescriptor.new(
1,
[[TYPE_REAL, TYPE_INT], [TYPE_REAL, TYPE_INT]],
[null, 0.0]
)
# Run the command
func run(command_params: Array) -> int:
(escoria.object_manager.get_object(escoria.object_manager.CAMERA).node as ESCCamera)\
.set_camera_zoom(
command_params[0],
command_params[1]
)
return ESCExecution.RC_OK
# Function called when the command is interrupted.
func interrupt():
escoria.logger.debug(
self,
"[%s] interrupt() function not implemented." % get_command_name()
)

View File

@@ -1,73 +0,0 @@
# `camera_set_zoom_block magnitude [time]`
#
# Zooms the camera in/out to the desired `magnitude`. Values larger than '1' zoom
# the camera out while smaller values zoom in. These values are relative to the
# default zoom value of '1', not the current value. As such, while using a value
# of '0.5' would double the size of the graphics, running the same command again
# would result in no change. The zoom will happen over the given time period.
# Blocks until the command completes.
#
# Zoom operations might not be as smooth as desired if the requested zoom
# level results in an edge of the camera meeting any defined camera limits.
#
# **Parameters**
#
# - *magnitude*: Magnitude of zoom
# - *time*: Number of seconds the transition should take, with a value of `0`
# meaning the zoom should happen instantly (default: `0`)
#
# For more details see: https://docs.escoria-framework.org/camera
#
# @ESC
extends ESCCameraBaseCommand
class_name CameraSetZoomBlockCommand
var _camera_tween: Tween
# Return the descriptor of the arguments of this command
func configure() -> ESCCommandArgumentDescriptor:
return ESCCommandArgumentDescriptor.new(
1,
[[TYPE_REAL, TYPE_INT], [TYPE_REAL, TYPE_INT]],
[null, 0.0]
)
# Validate whether the given arguments match the command descriptor
func validate(arguments: Array):
if not .validate(arguments):
return false
var camera: ESCCamera = escoria.object_manager.get_object(escoria.object_manager.CAMERA).node as ESCCamera
_camera_tween = camera.get_tween()
return true
# Run the command
func run(command_params: Array) -> int:
var camera: ESCCamera = escoria.object_manager.get_object(escoria.object_manager.CAMERA).node as ESCCamera
camera\
.set_camera_zoom(
command_params[0],
command_params[1]
)
if command_params[1] > 0.0:
yield(_camera_tween, "tween_completed")
escoria.logger.debug(
self,
"camera_set_zoom_block tween complete."
)
return ESCExecution.RC_OK
# Function called when the command is interrupted.
func interrupt():
escoria.logger.debug(
self,
"[%s] interrupt() function not implemented." % get_command_name()
)

View File

@@ -1,58 +0,0 @@
# `camera_set_zoom_height pixels [time]`
#
# Zooms the camera in/out so it occupies the given height in pixels.
#
# **Parameters**
#
# - *pixels*: Target height in pixels
# - *time*: Number of seconds the transition should take, with a value of `0`
# meaning the zoom should happen instantly (default: `0`)
#
# For more details see: https://docs.escoria-framework.org/camera
#
# @ESC
extends ESCBaseCommand
class_name CameraSetZoomHeightCommand
# Return the descriptor of the arguments of this command
func configure() -> ESCCommandArgumentDescriptor:
return ESCCommandArgumentDescriptor.new(
1,
[TYPE_INT, [TYPE_INT, TYPE_REAL]],
[null, 0.0]
)
# Validate whether the given arguments match the command descriptor
func validate(arguments: Array):
if not .validate(arguments):
return false
if arguments[0] < 0:
escoria.logger.error(
self,
"[%s]: invalid height. Can't zoom to a negative height (%d)."
% [get_command_name(), arguments[0]]
)
return false
return true
# Run the command
func run(command_params: Array) -> int:
(escoria.object_manager.get_object(escoria.object_manager.CAMERA).node as ESCCamera)\
.set_camera_zoom(
command_params[0] / escoria.game_size.y,
command_params[1]
)
return ESCExecution.RC_OK
# Function called when the command is interrupted.
func interrupt():
escoria.logger.debug(
self,
"[%s] interrupt() function not implemented." % get_command_name()
)

View File

@@ -1,73 +0,0 @@
# `camera_set_zoom_height_block pixels [time]`
#
# Zooms the camera in/out so it occupies the given height in pixels.
# Blocks until the command completes.
#
# **Parameters**
#
# - *pixels*: Target height in pixels (integer values only)
# - *time*: Number of seconds the transition should take, with a value of `0`
# meaning the zoom should happen instantly (default: `0`)
#
# For more details see: https://docs.escoria-framework.org/camera
#
# @ESC
extends ESCBaseCommand
class_name CameraSetZoomHeightBlockCommand
# Tween for blocking
var _camera_tween: Tween
# Return the descriptor of the arguments of this command
func configure() -> ESCCommandArgumentDescriptor:
return ESCCommandArgumentDescriptor.new(
1,
[TYPE_INT, [TYPE_INT, TYPE_REAL]],
[null, 0.0]
)
# Validate whether the given arguments match the command descriptor
func validate(arguments: Array):
if not .validate(arguments):
return false
if arguments[0] <= 0:
escoria.logger.error(
self,
"[%s]: invalid height. Can't zoom to a negative height (%d)."
% [get_command_name(), arguments[0]]
)
return false
var camera: ESCCamera = escoria.object_manager.get_object(escoria.object_manager.CAMERA).node as ESCCamera
_camera_tween = camera.get_tween()
return true
# Run the command
func run(command_params: Array) -> int:
(escoria.object_manager.get_object(escoria.object_manager.CAMERA).node as ESCCamera)\
.set_camera_zoom(
command_params[0] / escoria.game_size.y,
command_params[1]
)
if command_params[1] > 0.0:
yield(_camera_tween, "tween_completed")
escoria.logger.debug(
self,
"camera_set_zoom_height_block tween complete."
)
return ESCExecution.RC_OK
# Function called when the command is interrupted.
func interrupt():
escoria.logger.debug(
self,
"[%s] interrupt() function not implemented." % get_command_name()
)

View File

@@ -1,94 +0,0 @@
# `camera_shift x y [time] [type]`
#
# Shifts the camera by the given horizontal and vertical amounts relative to the
# current location.
#
# **Parameters**
#
# - *x*: Shift by x pixels along the x-axis
# - *y*: Shift by y pixels along the y-axis
# - *time*: Number of seconds the transition should take, with a value of `0`
# meaning the zoom should happen instantly (default: `1`)
# - *type*: Transition type to use (default: `QUAD`)
#
# Supported transitions include the names of the values used
# in the "TransitionType" enum of the "Tween" type (without the "TRANS_" prefix):
#
# https://docs.godotengine.org/en/stable/classes/class_tween.html?highlight=tween#enumerations
#
# For more details see: https://docs.escoria-framework.org/camera
#
# @ESC
extends ESCCameraBaseCommand
class_name CameraShiftCommand
# The list of supported transitions as per the link mentioned above
const SUPPORTED_TRANSITIONS = ["LINEAR","SINE","QUINT","QUART","QUAD" ,"EXPO","ELASTIC","CUBIC",
"CIRC","BOUNCE","BACK"]
# Return the descriptor of the arguments of this command
func configure() -> ESCCommandArgumentDescriptor:
return ESCCommandArgumentDescriptor.new(
2,
[
[TYPE_INT, TYPE_REAL],
[TYPE_INT, TYPE_REAL],
[TYPE_INT, TYPE_REAL],
TYPE_STRING
],
[null, null, 1, "QUAD"]
)
# Run the command
func run(command_params: Array) -> int:
(escoria.object_manager.get_object(escoria.object_manager.CAMERA).node as ESCCamera)\
.shift(
Vector2(
command_params[0],
command_params[1]
),
command_params[2],
ClassDB.class_get_integer_constant("Tween", "TRANS_%s" % command_params[3])
)
return ESCExecution.RC_OK
# Validate whether the given arguments match the command descriptor
func validate(arguments: Array):
if not .validate(arguments):
return false
if not arguments[3] in SUPPORTED_TRANSITIONS:
escoria.logger.error(
self,
(
"[{command_name}]: invalid transition type" +
"Transition type {t_type} is not one of the accepted types : {allowed_types}"
).format(
{
"command_name": get_command_name(),
"t_type":arguments[3],
"allowed_types":SUPPORTED_TRANSITIONS
}
)
)
return false
var camera: ESCCamera = escoria.object_manager.get_object(escoria.object_manager.CAMERA).node as ESCCamera
var shift_by: Vector2 = Vector2(arguments[0], arguments[1])
var new_pos: Vector2 = Vector2(camera.position.x + shift_by.x, camera.position.y + shift_by.y)
if not camera.check_point_is_inside_viewport_limits(new_pos):
generate_viewport_warning(new_pos, camera)
return false
return true
# Function called when the command is interrupted.
func interrupt():
escoria.logger.debug(
self,
"[%s] interrupt() function not implemented." % get_command_name()
)

View File

@@ -1,112 +0,0 @@
# `camera_shift_block x y [time] [type]`
#
# Shifts the camera by the given horizontal and vertical amounts relative to the
# current location. Blocks until the command completes.
#
# Make sure the destination coordinates are reachable if
# camera limits have been configured.
#
# **Parameters**
#
# - *x*: Shift by x pixels along the x-axis
# - *y*: Shift by y pixels along the y-axis
# - *time*: Number of seconds the transition should take, with a value of `0`
# meaning the zoom should happen instantly (default: `1`)
# - *type*: Transition type to use (default: `QUAD`)
#
# Supported transitions include the names of the values used
# in the "TransitionType" enum of the "Tween" type (without the "TRANS_" prefix).
#
# See https://docs.godotengine.org/en/stable/classes/class_tween.html?highlight=tween#enumerations
#
# For more details see: https://docs.escoria-framework.org/camera
#
# @ESC
extends ESCCameraBaseCommand
class_name CameraShiftBlockCommand
# The list of supported transitions as per the link mentioned above
const SUPPORTED_TRANSITIONS = ["LINEAR","SINE","QUINT","QUART","QUAD" ,"EXPO","ELASTIC","CUBIC",
"CIRC","BOUNCE","BACK"]
# Tween for blocking
var _camera_tween: Tween
# Return the descriptor of the arguments of this command
func configure() -> ESCCommandArgumentDescriptor:
return ESCCommandArgumentDescriptor.new(
2,
[
[TYPE_INT, TYPE_REAL],
[TYPE_INT, TYPE_REAL],
[TYPE_INT, TYPE_REAL],
TYPE_STRING
],
[null, null, 1, "QUAD"]
)
# Run the command
func run(command_params: Array) -> int:
(escoria.object_manager.get_object(escoria.object_manager.CAMERA).node as ESCCamera)\
.shift(
Vector2(
command_params[0],
command_params[1]
),
command_params[2],
ClassDB.class_get_integer_constant("Tween", "TRANS_%s" % command_params[3])
)
if command_params[2] > 0.0:
yield(_camera_tween, "tween_completed")
escoria.logger.debug(
self,
"camera_shift_block tween complete."
)
return ESCExecution.RC_OK
# Validate whether the given arguments match the command descriptor
func validate(arguments: Array):
if not .validate(arguments):
return false
if not arguments[3] in SUPPORTED_TRANSITIONS:
escoria.logger.error(
self,
(
"[{command_name}]: invalid transition type" +
"Transition type {t_type} is not one of the accepted types : {allowed_types}"
).format(
{
"command_name": get_command_name(),
"t_type":arguments[3],
"allowed_types":SUPPORTED_TRANSITIONS
}
)
)
return false
var camera: ESCCamera = escoria.object_manager.get_object(escoria.object_manager.CAMERA).node as ESCCamera
var shift_by: Vector2 = Vector2(arguments[0], arguments[1])
var new_pos: Vector2 = Vector2(camera.position.x + shift_by.x, camera.position.y + shift_by.y)
if not camera.check_point_is_inside_viewport_limits(new_pos):
generate_viewport_warning(new_pos, camera)
return false
_camera_tween = camera.get_tween()
return true
# Function called when the command is interrupted.
func interrupt():
escoria.logger.debug(
self,
"[%s] interrupt() function not implemented." % get_command_name()
)

View File

@@ -1,80 +0,0 @@
# `change_scene path [enable_automatic_transition] [run_events]`
#
# Switches the game from the current scene to another scene. Use this to move
# the player to a new room when they walk through an unlocked door, for
# example.
#
# **Parameters**
#
# - *path*: Path of the new scene
# - *enable_automatic_transition*: Automatically transition to the new scene
# (default: `true`)
# - *run_events*: Run the standard ESC events of the new scene (default: `true`)
#
# @ESC
extends ESCBaseCommand
class_name ChangeSceneCommand
# Return the descriptor of the arguments of this command
func configure() -> ESCCommandArgumentDescriptor:
return ESCCommandArgumentDescriptor.new(
1,
[TYPE_STRING, TYPE_BOOL, TYPE_BOOL],
[null, true, true]
)
# Validate whether the given arguments match the command descriptor
func validate(arguments: Array) -> bool:
if not .validate(arguments):
return false
if not ResourceLoader.exists(arguments[0]):
escoria.logger.error(
self,
"[%s]: Invalid scene. Scene %s was not found."
% [get_command_name(), arguments[0]]
)
return false
if not ResourceLoader.exists(
ESCProjectSettingsManager.get_setting(ESCProjectSettingsManager.GAME_SCENE)
):
escoria.logger.error(
self,
"[%s]: Game scene not found. The path set in 'ui/game_scene' was not found: %s."
% [
get_command_name(),
ESCProjectSettingsManager.get_setting(
ESCProjectSettingsManager.GAME_SCENE
)
]
)
return false
return true
# Run the command
func run(command_params: Array) -> int:
escoria.logger.info(
self,
"[%s] Changing scene to %s (enable_automatic_transition = %s)."
% [
get_command_name(),
command_params[0], # scene file
command_params[1] # enable_automatic_transition
]
)
escoria.room_manager.change_scene(command_params[0], command_params[1])
return ESCExecution.RC_OK
# Function called when the command is interrupted.
func interrupt():
escoria.logger.debug(
self,
"[%s] interrupt() function not implemented." % get_command_name()
)

View File

@@ -1,100 +0,0 @@
# `custom object node func_name [params...]`
#
#
# Executes the specified Godot function. This function must be in a script
# attached to a child node of a registered `ESCItem`.
#
# **Parameters**
#
# - *object*: Global ID of the target `ESCItem`
# - *node*: Name of the child node of the target `ESCItem`
# - *func_name*: Name of the function to be called
# - params: Any arguments to be passed to the function (array and object parameters are not supported).
# Multiple parameters can be passed by simply passing them in as additional arguments separated by
# spaces, e.g. `custom the_object the_node the_function arg1 arg2 arg3`
#
# @ESC
extends ESCBaseCommand
class_name CustomCommand
# Return the descriptor of the arguments of this command
func configure() -> ESCCommandArgumentDescriptor:
return ESCCommandArgumentDescriptor.new(
3,
[TYPE_STRING, TYPE_STRING, TYPE_STRING, TYPE_ARRAY],
[null, null, null, []],
[true],
true
)
# Validate whether the given arguments match the command descriptor
func validate(arguments: Array):
if not .validate(arguments):
return false
if not escoria.object_manager.has(arguments[0]):
escoria.logger.error(
self,
"[%s]: invalid object. Object with global id %s not found."
% [get_command_name(), arguments[0]]
)
return false
elif not escoria.object_manager.get_object(arguments[0]).node.has_node(
arguments[1]
):
escoria.logger.error(
self,
"[%s]: invalid node. Object with global id %s has no child node called %s."
% [
get_command_name(),
arguments[0],
arguments[1],
]
)
return false
elif not escoria.object_manager.get_object(arguments[0]).node\
.get_node(
arguments[1]
)\
.has_method(
arguments[2]
):
escoria.logger.error(
self,
"[%s]: invalid function. Object with global id %s and node %s has no function called %s."
% [
get_command_name(),
arguments[0],
arguments[1],
arguments[2],
]
)
return false
return true
# Run the command
func run(command_params: Array) -> int:
var object = escoria.object_manager.get_object(
command_params[0]
)
# Global variables can be substituted into the command arguments by wrapping the global
# name in braces.
for loop in command_params[3].size():
command_params[3][loop] = escoria.globals_manager.replace_globals(command_params[3][loop])
object.node.get_node(command_params[1]).call(
command_params[2],
command_params[3]
)
return ESCExecution.RC_OK
# Function called when the command is interrupted.
func interrupt():
escoria.logger.debug(
self,
"[%s] interrupt() function not implemented." % get_command_name()
)

View File

@@ -1,52 +0,0 @@
# `dec_global name value`
#
# Subtract the given value from the specified global.
#
# **Parameters**
#
# - *name*: Name of the global to be changed
# - *value*: Value to be subtracted (default: 1)
#
# @ESC
extends ESCBaseCommand
class_name DecGlobalCommand
# Return the descriptor of the arguments of this command
func configure() -> ESCCommandArgumentDescriptor:
return ESCCommandArgumentDescriptor.new(
1,
[TYPE_STRING, TYPE_INT],
[null, 1]
)
# Validate whether the given arguments match the command descriptor
func validate(arguments: Array):
if not .validate(arguments):
return false
if not escoria.globals_manager.get_global(arguments[0]) is int:
escoria.logger.error(
self,
"[%s]: invalid global. Global %s isn't an integer value."
% [get_command_name(), arguments[0]]
)
return false
return true
# Run the command
func run(command_params: Array) -> int:
escoria.globals_manager.set_global(
command_params[0],
escoria.globals_manager.get_global(command_params[0]) - \
command_params[1]
)
return ESCExecution.RC_OK
# Function called when the command is interrupted.
func interrupt():
# Do nothing
pass

View File

@@ -1,50 +0,0 @@
# `enable_terrain node_name`
#
# Enables the `ESCTerrain`'s `NavigationPolygonInstance` specified by the given
# node name. It will also disable the previously-activated
# `NavigationPolygonInstance`.
# Use this to change where the player can walk, allowing them to walk into the
# next room once a door has been opened, for example.
#
# **Parameters**
#
# - *node_name*: Name of the `NavigationPolygonInstance` node to activate
#
# @ESC
extends ESCBaseCommand
class_name EnableTerrainCommand
# Return the descriptor of the arguments of this command
func configure() -> ESCCommandArgumentDescriptor:
return ESCCommandArgumentDescriptor.new(
1,
[TYPE_STRING],
[null]
)
# Run the command
func run(command_params: Array) -> int:
var name: String = command_params[0]
if escoria.room_terrain.has_node(name):
var new_active_navigation_instance = \
escoria.room_terrain.get_node(name)
escoria.room_terrain.current_active_navigation_instance.enabled = false
escoria.room_terrain.current_active_navigation_instance = \
new_active_navigation_instance
escoria.room_terrain.current_active_navigation_instance.enabled = true
return ESCExecution.RC_OK
else:
escoria.logger.error(
self,
"[%s]: Can not find terrain node. Terrain node %s could not be found."
% [get_command_name(), name]
)
return ESCExecution.RC_ERROR
# Function called when the command is interrupted.
func interrupt():
# Do nothing
pass

View File

@@ -1,47 +0,0 @@
# `end_block_say`
#
# `say` commands used subsequent to using the `end_block_say` command will no longer
# reuse the dialog box type used by the previous `say` command(s) encountered.
#
# Using `end_block_say` more than once is safe and idempotent.
#
# Example:
# `block say`
# `say player "Picture's looking good."`
# `say player "And so am I."`
# `end_block_say`
#
# This example will reuse the same dialog box type since they are the same between both `say` calls.
#
# @ESC
extends ESCBaseCommand
class_name EndBlockSayCommand
# Constructor
func _init() -> void:
pass
# Return the descriptor of the arguments of this command
func configure() -> ESCCommandArgumentDescriptor:
return ESCCommandArgumentDescriptor.new(0)
# Validate whether the given arguments match the command descriptor
func validate(arguments: Array):
return true
# Run the command
func run(command_params: Array) -> int:
escoria.dialog_player.disable_preserve_dialog_box()
return ESCExecution.RC_OK
# Function called when the command is interrupted.
func interrupt():
escoria.logger.debug(
self,
"[%s] interrupt() function not implemented." % get_command_name()
)

View File

@@ -1,76 +0,0 @@
# `hide_menu menu_type`
#
# Hides either the main menu or the pause menu. Transitions from the menu using
# the default transition type (set in the Escoria project settings).
#
# **Parameters**
#
# - *menu_type*: Which menu to hide. Can be either `main` or `pause` (default: `main`)
#
# @ESC
extends ESCBaseCommand
class_name HideMenuCommand
# Return the descriptor of the arguments of this command
func configure() -> ESCCommandArgumentDescriptor:
return ESCCommandArgumentDescriptor.new(
0,
[TYPE_STRING],
["main"]
)
# Validate whether the given arguments match the command descriptor
func validate(arguments: Array):
if not .validate(arguments):
return false
if not arguments[0] in ["main", "pause"]:
escoria.logger.error(
self,
"[%s]: menu %s is invalid." % [get_command_name(), arguments[0]]
)
return false
return true
# Run the command
func run(command_params: Array) -> int:
var transition_id: int
# Transition out from menu
transition_id = escoria.main.scene_transition.transition(
"",
ESCTransitionPlayer.TRANSITION_MODE.OUT
)
if transition_id != ESCTransitionPlayer.TRANSITION_ID_INSTANT:
while yield(
escoria.main.scene_transition,
"transition_done"
) != transition_id:
pass
if command_params[0] == "main":
escoria.game_scene.hide_main_menu()
elif command_params[0] == "pause":
escoria.game_scene.unpause_game()
if escoria.main.current_scene != null:
transition_id = escoria.main.scene_transition.transition()
if transition_id != ESCTransitionPlayer.TRANSITION_ID_INSTANT:
while yield(
escoria.main.scene_transition,
"transition_done"
) != transition_id:
pass
return ESCExecution.RC_OK
# Function called when the command is interrupted.
func interrupt():
# Do nothing
pass

View File

@@ -1,59 +0,0 @@
# `inc_global name value`
#
# Adds the given value to the specified global.
#
# **Parameters**
#
# - *name*: Name of the global to be changed
# - *value*: Value to be added (default: 1)
#
# @ESC
extends ESCBaseCommand
class_name IncGlobalCommand
# Return the descriptor of the arguments of this command
func configure() -> ESCCommandArgumentDescriptor:
return ESCCommandArgumentDescriptor.new(
1,
[TYPE_STRING, TYPE_INT],
[null, 1]
)
# Validate whether the given arguments match the command descriptor
func validate(arguments: Array):
if not .validate(arguments):
return false
if not escoria.globals_manager.has(arguments[0]):
escoria.logger.error(
self,
"[%s]: invalid global. Global %s does not exist."
% [get_command_name(), arguments[0]]
)
return false
if not escoria.globals_manager.get_global(arguments[0]) is int:
escoria.logger.error(
self,
"[%s]: invalid global. Global %s isn't an integer value."
% [get_command_name(), arguments[0]]
)
return false
return true
# Run the command
func run(command_params: Array) -> int:
escoria.globals_manager.set_global(
command_params[0],
escoria.globals_manager.get_global(command_params[0]) +\
command_params[1]
)
return ESCExecution.RC_OK
# Function called when the command is interrupted.
func interrupt():
# Do nothing
pass

View File

@@ -1,54 +0,0 @@
# `inventory_add item`
#
# Adds an item to the inventory. If the player is picking up an object, you may
# want to use this command in conjunction with the `set_active` command so that
# the object 'disappears' from the scene as it's added to the inventory.
#
# **Parameters**
#
# - *item*: Global ID of the `ESCItem` to add to the inventory
#
# @ESC
extends ESCBaseCommand
class_name InventoryAddCommand
const ILLEGAL_STRINGS = ["/"]
# Return the descriptor of the arguments of this command
func configure() -> ESCCommandArgumentDescriptor:
return ESCCommandArgumentDescriptor.new(
1,
[TYPE_STRING],
[null]
)
# Validate whether the given arguments match the command descriptor
func validate(arguments: Array):
if not .validate(arguments):
return false
for s in ILLEGAL_STRINGS:
if s in arguments[0]:
escoria.logger.error(
self,
"[%s]: invalid item name. Item name %s cannot contain the string '%s'."
% [get_command_name(), arguments[0], s]
)
return false
return true
# Run the command
func run(command_params: Array) -> int:
escoria.inventory_manager.add_item(command_params[0])
return ESCExecution.RC_OK
# Function called when the command is interrupted.
func interrupt():
# Do nothing
pass

View File

@@ -1,54 +0,0 @@
# `inventory_remove item`
#
# Removes an item from the inventory. You may wish to use this command in
# conjuction with the `set_active` command to show an item in the scene,
# simulating placing the item somewhere, for example.
#
# **Parameters**
#
# - *item*: Global ID of the `ESCItem` to remove from the inventory
#
# @ESC
extends ESCBaseCommand
class_name InventoryRemoveCommand
const ILLEGAL_STRINGS = ["/"]
# Return the descriptor of the arguments of this command
func configure() -> ESCCommandArgumentDescriptor:
return ESCCommandArgumentDescriptor.new(
1,
[TYPE_STRING],
[null]
)
# Validate whether the given arguments match the command descriptor
func validate(arguments: Array):
if not .validate(arguments):
return false
for s in ILLEGAL_STRINGS:
if s in arguments[0]:
escoria.logger.error(
self,
"[%s]: invalid item name. Item name %s cannot contain the string '%s'."
% [get_command_name(), arguments[0], s]
)
return false
return true
# Run the command
func run(command_params: Array) -> int:
escoria.inventory_manager.remove_item(command_params[0])
return ESCExecution.RC_OK
# Function called when the command is interrupted.
func interrupt():
# Do nothing
pass

View File

@@ -1,58 +0,0 @@
# `play_snd file [player]`
#
# Plays the specified sound without blocking the currently running event.
#
# **Parameters**
#
# - *file*: Sound file to play
# - *player*: Sound player to use. Can either be `_sound`, which is used to play non-
# looping sound effects; `_music`, which plays looping music; or `_speech`, which
# plays non-looping voice files (default: `_sound`)
#
# @ESC
extends ESCBaseCommand
class_name PlaySndCommand
# The specified sound player
var _snd_player: String
# Return the descriptor of the arguments of this command
func configure() -> ESCCommandArgumentDescriptor:
return ESCCommandArgumentDescriptor.new(
1,
[TYPE_STRING, TYPE_STRING],
[null, "_sound"]
)
# Validate whether the given arguments match the command descriptor
func validate(arguments: Array):
if not .validate(arguments):
return false
if not escoria.object_manager.has(arguments[1]):
escoria.logger.error(
self,
"[%s]: invalid sound player. Sound player %s not registered."
% [get_command_name(), arguments[1]]
)
return false
if not ResourceLoader.exists(arguments[0]):
escoria.logger.error(
self,
"[%s]: invalid parameter. File %s not found."
% [get_command_name(), arguments[0]]
)
return false
_snd_player = arguments[1]
return true
# Run the command
func run(command_params: Array) -> int:
escoria.object_manager.get_object(command_params[1]).node.set_state(
command_params[0]
)
return ESCExecution.RC_OK

View File

@@ -1,34 +0,0 @@
# `print string`
#
# Prints a message to the Godot debug window.
# Use this for debugging game state.
#
# **Parameters**
#
# - *string*: The string to log
#
# @ESC
extends ESCBaseCommand
class_name PrintCommand
# Return the descriptor of the arguments of this command
func configure() -> ESCCommandArgumentDescriptor:
return ESCCommandArgumentDescriptor.new(
1,
[TYPE_STRING],
[""]
)
# Run the command
func run(command_params: Array) -> int:
# Replace the names of any globals in "{ }" with their value
print(escoria.globals_manager.replace_globals(command_params[0]))
return ESCExecution.RC_OK
# Function called when the command is interrupted.
func interrupt():
# Do nothing
pass

View File

@@ -1,89 +0,0 @@
# `queue_event object event [channel] [block]`
#
# Queue an event to run.
#
# If you queue multiple events on a channel and none of them are blocking
# events, all events will effectively run at the same time. As the events are
# placed on the channel's queue, if one event contains a blocking command, the
# next event on that channel's queue won't be processed until the blocking
# command finishes.
#
# **Parameters**
#
# - object: Object that holds the ESC script with the event
# - event: Name of the event to queue
# - channel: Channel to run the event on (default: `_front`). Using a
# previously unused channel name will create a new channel.
# - block: Whether to wait for the queue to finish. This is only possible, if
# the queued event is not to be run on the same event as this command
# (default: `false`)
#
# @ESC
extends ESCBaseCommand
class_name QueueEventCommand
# Return the descriptor of the arguments of this command
func configure() -> ESCCommandArgumentDescriptor:
return ESCCommandArgumentDescriptor.new(
2,
[TYPE_STRING, TYPE_STRING, TYPE_STRING, TYPE_BOOL],
[null, null, "_front", false]
)
# Validate whether the given arguments match the command descriptor
func validate(arguments: Array):
if not .validate(arguments):
return false
if not escoria.object_manager.has(arguments[0]):
escoria.logger.error(
self,
"Object with global id %s not found." % arguments[0]
)
return false
var node = escoria.object_manager.get_object(
arguments[0]
).node
if not "esc_script" in node or node.esc_script == "":
escoria.logger.error(
self,
"Object with global id %s has no ESC script." % arguments[0]
)
return false
var esc_script = escoria.esc_compiler.load_esc_file(node.esc_script)
if not arguments[1] in esc_script.events:
escoria.logger.error(
self,
"Event with name %s not found." % arguments[1]
)
return false
if arguments[3] and not escoria.event_manager.is_channel_free(arguments[2]):
escoria.logger.error(
self,
"The queue %s doesn't accept a new event." % arguments[2]
)
return false
return true
# Run the command
func run(arguments: Array) -> int:
var node = escoria.object_manager.get_object(
arguments[0]
).node
var esc_script = escoria.esc_compiler.load_esc_file(node.esc_script)
return escoria.event_manager.queue_event_from_esc(
esc_script,
arguments[1], # event name
arguments[2], # channel name
arguments[3] # whether to block
)
# Function called when the command is interrupted.
func interrupt():
# Do nothing
pass

View File

@@ -1,52 +0,0 @@
# `queue_resource path [front_of_queue]`
#
# Queues the loading of the given resource into the resource cache.
#
# **Parameters**
#
# - *path*: Path of the resource to cache
# - *front_of_queue*: Whether to put the resource at the front of the
# queue in order to load it as soon as possible (default: `false`)
#
# @ESC
extends ESCBaseCommand
class_name QueueResourceCommand
# Return the descriptor of the arguments of this command
func configure() -> ESCCommandArgumentDescriptor:
return ESCCommandArgumentDescriptor.new(
1,
[],
[null, false]
)
# Validate whether the given arguments match the command descriptor
func validate(arguments: Array) -> bool:
if not .validate(arguments):
return false
if not ResourceLoader.exists(arguments[0]):
escoria.logger.error(
self,
"[%s]: Invalid resource. Resource %s was not found."
% [get_command_name(), arguments[0]]
)
return false
return true
# Run the command
func run(command_params: Array) -> int:
escoria.resource_cache.queue_resource(
command_params[0],
command_params[1]
)
return ESCExecution.RC_OK
# Function called when the command is interrupted.
func interrupt():
# Do nothing
pass

View File

@@ -1,40 +0,0 @@
# `rand_global name max_value`
#
# Sets the given global to a random integer between 0 and `max_value`
# (inclusive). e.g. Setting `max_value` to 2 could result in '0', '1' or '2'
# being returned.
#
# **Parameters**
#
# - *name*: Name of the global to set
# - *max_value*: Maximum possible integer value (inclusive) (default: 1)
#
# @ESC
extends ESCBaseCommand
class_name RandGlobalCommand
# Return the descriptor of the arguments of this command
func configure() -> ESCCommandArgumentDescriptor:
return ESCCommandArgumentDescriptor.new(
1,
[TYPE_STRING, TYPE_INT],
[null, 1]
)
# Run the command
func run(command_params: Array) -> int:
randomize()
var rnd = randi() % (command_params[1] + 1)
escoria.globals_manager.set_global(
command_params[0],
rnd
)
return ESCExecution.RC_OK
# Function called when the command is interrupted.
func interrupt():
# Do nothing
pass

View File

@@ -1,29 +0,0 @@
# `repeat`
#
# Makes the current script loop back to the start. Currently the only way to
# exit the loop is via the `stop` command which will stop the script
# completely.
#
# @ESC
extends ESCBaseCommand
class_name RepeatCommand
# Return the descriptor of the arguments of this command
func configure() -> ESCCommandArgumentDescriptor:
return ESCCommandArgumentDescriptor.new(
0,
[],
[]
)
# Run the command
func run(command_params: Array) -> int:
return ESCExecution.RC_CANCEL
# Function called when the command is interrupted.
func interrupt():
# Do nothing
pass

View File

@@ -1,69 +0,0 @@
# `sched_event time object event`
#
# Schedules an event to run at a later time.
#
# If another event is already running when the scheduled
# event is supposed to start, execution of the scheduled event
# begins when the already-running event ends.
#
# **Parameters**
#
# - *time*: Time in seconds until the scheduled event starts
# - *object*: Global ID of the ESCItem that holds the ESC script
# - *event*: Name of the event to schedule
#
# @ESC
extends ESCBaseCommand
class_name SchedEventCommand
# Return the descriptor of the arguments of this command
func configure() -> ESCCommandArgumentDescriptor:
return ESCCommandArgumentDescriptor.new(
3,
[TYPE_INT, TYPE_STRING, TYPE_STRING],
[null, null, null]
)
# Validate whether the given arguments match the command descriptor
func validate(arguments: Array):
if not .validate(arguments):
return false
if not escoria.object_manager.has(arguments[1]):
escoria.logger.error(
self,
"[%s]: invalid object. Object with global id %s not found."
% [get_command_name(), arguments[1]]
)
return false
elif not escoria.object_manager.get_object(arguments[1]).events\
.has(arguments[2]):
escoria.logger.error(
self,
"[%s]: invalid object event. Object with global id %s has no event %s."
% [
get_command_name(),
arguments[1],
arguments[2],
]
)
return false
return true
# Run the command
func run(command_params: Array) -> int:
escoria.event_manager.schedule_event(
escoria.object_manager.get_object(command_params[1])\
.events[command_params[2]],
command_params[0]
)
return ESCExecution.RC_OK
# Function called when the command is interrupted.
func interrupt():
# Do nothing
pass

View File

@@ -1,41 +0,0 @@
# `set_active_if_exists object active`
#
# *** FOR INTERNAL USE ONLY ***
#
# Changes the "active" state of the object in the current room if it currently
# exists in the object manager. If it doesn't, then, unlike set_active, we don't
# fail and we just carry on.
#
# Inactive objects are invisible in the room.
#
# **Parameters**
#
# - *object* Global ID of the object
# - *active* Whether `object` should be active. `active` can be `true` or `false`.
#
# @ESC
extends ESCBaseCommand
class_name SetActiveIfExistsCommand
# Return the descriptor of the arguments of this command
func configure() -> ESCCommandArgumentDescriptor:
return ESCCommandArgumentDescriptor.new(
2,
[TYPE_STRING, TYPE_BOOL],
[null, null]
)
# Run the command
func run(command_params: Array) -> int:
if escoria.object_manager.has(command_params[0]):
escoria.object_manager.get_object(command_params[0]).active = \
command_params[1]
return ESCExecution.RC_OK
# Function called when the command is interrupted.
func interrupt():
# Do nothing
pass

View File

@@ -1,79 +0,0 @@
# `set_angle object target_degrees [wait]`
#
# Turns a movable `ESCItem` or `ESCPlayer` to face a given target direction.
#
# Angles 0 and 360 are the same and correspond to UP/NORTH,
# 90 is RIGHT/EAST, 180 is DOWN/SOUTH, 270 is LEFT/WEST etc.
# The rotation direction will be determined by the shortest path - e.g.
# rotating from facing up (0 degrees) to left (270) will be a 90 degree turn
# anti-clockwise rather than a 270 degree clockwise turn.
#
# The final animation used is determined by the directions which have
# been configured for the object. If the item has a direction configured which
# has been drawn to show it facing to the right, and this direction has been
# defined to cover the angle from 45 to 135 degrees, setting the target angle
# to 120 degrees will result in the right-facing animation being used.
#
# The number of intermediate animations shown while turning the
# item will depend on the directions specified in the item's definition. A 16
# direction character will turn through 8 different directions to turn 180
# degrees, a 4 direction character only 2. The wait time will determine how
# long the idle animation for each direction is played before using the next
# direction's animation. As such, if wait was set to 1 second, a 16 direction
# character would take 8 seconds to turn 180 degrees, a 4 direction character
# would take 2 seconds.
#
# **Parameters**
#
# - *object*: Global ID of the object to turn
# - *target_degrees*: Number of degrees by which `object` is to be turned
# - *wait*: Number of seconds to wait for while playing each animation occurring
# between the current angle of `object` and the target angle. A value of
# `0` will complete the turn immediately (default: `0`)
#
# @ESC
extends ESCBaseCommand
class_name SetAngleCommand
# Return the descriptor of the arguments of this command
func configure() -> ESCCommandArgumentDescriptor:
return ESCCommandArgumentDescriptor.new(
2,
[TYPE_STRING, [TYPE_REAL, TYPE_INT], [TYPE_REAL, TYPE_INT]],
[null, null, 0.0]
)
# Validate whether the given arguments match the command descriptor
func validate(arguments: Array):
if not .validate(arguments):
return false
if not escoria.object_manager.has(arguments[0]):
escoria.logger.error(
self,
"[%s]: invalid object. Object with global id %s not found."
% [get_command_name(), arguments[0]]
)
return false
return true
# Run the command
func run(command_params: Array) -> int:
# HACK Countering the fact that angle_to_point() function gives
# angle against X axis not Y, we need to check direction using (angle-90°).
# Since the ESC command already gives the right angle, we add 90.
escoria.object_manager.get_object(command_params[0]).node\
.set_angle(
wrapi(int(command_params[1]) + 90, 0, 360),
command_params[2]
)
return ESCExecution.RC_OK
# Function called when the command is interrupted.
func interrupt():
# Do nothing
pass

View File

@@ -1,77 +0,0 @@
# `set_animations object animations`
#
# Sets the animation resource for the given `ESCPlayer` or movable `ESCItem`.
#
# **Parameters**
#
# - *object*: Global ID of the object whose animation resource is to be updated
# - *animations*: The path of the animation resource to use
#
# @ESC
extends ESCBaseCommand
class_name SetAnimationsCommand
# Return the descriptor of the arguments of this command
func configure() -> ESCCommandArgumentDescriptor:
return ESCCommandArgumentDescriptor.new(
2,
[TYPE_STRING, TYPE_STRING],
[null, null]
)
# Validate whether the given arguments match the command descriptor
func validate(arguments: Array):
if not .validate(arguments):
return false
if not escoria.object_manager.has(arguments[0]):
escoria.logger.error(
self,
"[%s]: invalid object. Object with global id %s not found."
% [get_command_name(), arguments[0]]
)
return false
if not ResourceLoader.exists(arguments[1]):
escoria.logger.error(
self,
"[%s]: invalid animation resource. The animation resource %s was not found."
% [get_command_name(), arguments[1]]
)
return false
(escoria.object_manager.get_object(arguments[0]).node as ESCPlayer).validate_animations(load(arguments[1]))
return true
# Run the command
func run(command_params: Array) -> int:
(escoria.object_manager.get_object(command_params[0]).node as ESCPlayer)\
.animations = load(command_params[1])
if not escoria.globals_manager.has(
escoria.room_manager.GLOBAL_ANIMATION_RESOURCES
):
escoria.globals_manager.set_global(
escoria.room_manager.GLOBAL_ANIMATION_RESOURCES,
{},
true
)
var animations = escoria.globals_manager.get_global(
escoria.room_manager.GLOBAL_ANIMATION_RESOURCES
)
animations[command_params[0]] = command_params[1]
escoria.globals_manager.set_global(
escoria.room_manager.GLOBAL_ANIMATION_RESOURCES,
animations,
true
)
return ESCExecution.RC_OK
# Function called when the command is interrupted.
func interrupt():
# Do nothing
pass

View File

@@ -1,61 +0,0 @@
# `set_global name value [force=false]`
#
# Changes the value of a global.
#
# **Parameters**
#
# - *name*: Name of the global
# - *value*: Value to set the global to (can be of type string, boolean, integer
# or float)
# - *force*: if false, setting a global whose name is reserved will
# trigger an error. Defaults to false. Reserved globals are: ESC_LAST_SCENE,
# FORCE_LAST_SCENE_NULL, ANIMATION_RESOURCES, ESC_CURRENT_SCENE
#
# @ESC
extends ESCBaseCommand
class_name SetGlobalCommand
const ILLEGAL_STRINGS = ["/"]
# Return the descriptor of the arguments of this command
func configure() -> ESCCommandArgumentDescriptor:
return ESCCommandArgumentDescriptor.new(
2,
[TYPE_STRING, [TYPE_INT, TYPE_BOOL, TYPE_STRING], TYPE_BOOL],
[null, null, false]
)
# Validate whether the given arguments match the command descriptor
func validate(arguments: Array):
if not .validate(arguments):
return false
for s in ILLEGAL_STRINGS:
if s in arguments[0]:
escoria.logger.error(
self,
"[%s]: invalid global variable. Global variable %s cannot contain the string '%s'."
% [get_command_name(), arguments[0], s]
)
return false
return true
# Run the command
func run(command_params: Array) -> int:
escoria.globals_manager.set_global(
command_params[0],
command_params[1],
command_params[2]
)
return ESCExecution.RC_OK
# Function called when the command is interrupted.
func interrupt():
# Do nothing
pass

View File

@@ -1,38 +0,0 @@
# `set_globals pattern value`
#
# Changes the value of multiple globals using a wildcard pattern, where `*`
# matches zero or more arbitrary characters and `?` matches any single
# character except a period (".").
#
# **Parameters**
#
# - *pattern*: Pattern to use to match the names of the globals to change
# - *value*: Value to set (can be of type string, boolean, integer or float)
#
# @ESC
extends ESCBaseCommand
class_name SetGlobalsCommand
# Return the descriptor of the arguments of this command
func configure() -> ESCCommandArgumentDescriptor:
return ESCCommandArgumentDescriptor.new(
2,
[TYPE_STRING, [TYPE_BOOL, TYPE_STRING, TYPE_INT]],
[null, null]
)
# Run the command
func run(command_params: Array) -> int:
escoria.globals_manager.set_global_wildcard(
command_params[0],
command_params[1]
)
return ESCExecution.RC_OK
# Function called when the command is interrupted.
func interrupt():
# Do nothing
pass

View File

@@ -1,35 +0,0 @@
# `set_gui_visible visible`
#
# Show or hide the GUI.
#
# **Parameters**
#
# - *visible*: Whether the GUI should be visible (`true` or `false`)
#
# @ESC
extends ESCBaseCommand
class_name SetGuiVisibleCommand
# Return the descriptor of the arguments of this command
func configure() -> ESCCommandArgumentDescriptor:
return ESCCommandArgumentDescriptor.new(
1,
[TYPE_BOOL],
[null]
)
# Run the command
func run(command_params: Array) -> int:
if command_params[0]:
escoria.main.current_scene.game.show_ui()
else:
escoria.main.current_scene.game.hide_ui()
return ESCExecution.RC_OK
# Function called when the command is interrupted.
func interrupt():
# Do nothing
pass

View File

@@ -1,49 +0,0 @@
# `set_interactive object interactive`
#
# Sets whether an object is interactive.
#
# **Parameters**
#
# - *object*: Global ID of the object to change
# - *interactive*: Whether the object should be interactive
#
# @ESC
extends ESCBaseCommand
class_name SetInteractiveCommand
# Return the descriptor of the arguments of this command
func configure() -> ESCCommandArgumentDescriptor:
return ESCCommandArgumentDescriptor.new(
2,
[TYPE_STRING, TYPE_BOOL],
[null, null]
)
# Validate whether the given arguments match the command descriptor
func validate(arguments: Array):
if not .validate(arguments):
return false
if not escoria.object_manager.has(arguments[0]):
escoria.logger.error(
self,
"[%s]: invalid object. Object with global id %s not found."
% [get_command_name(), arguments[0]]
)
return false
return true
# Run the command
func run(command_params: Array) -> int:
escoria.object_manager.get_object(command_params[0]).interactive = \
command_params[1]
return ESCExecution.RC_OK
# Function called when the command is interrupted.
func interrupt():
# Do nothing
pass

View File

@@ -1,47 +0,0 @@
# `set_speed object speed`
#
# Sets the speed of a `ESCPlayer` or movable `ESCItem`.
#
# **Parameters**
#
# - *object*: Global ID of the `ESCPlayer` or movable `ESCItem`
# - *speed*: Speed value for `object` in pixels per second.
#
# @ESC
extends ESCBaseCommand
class_name SetSpeedCommand
# Return the descriptor of the arguments of this command
func configure() -> ESCCommandArgumentDescriptor:
return ESCCommandArgumentDescriptor.new(
2,
[TYPE_STRING, TYPE_INT],
[null, null]
)
# Validate whether the given arguments match the command descriptor
func validate(arguments: Array):
if not .validate(arguments):
return false
if not escoria.object_manager.has(arguments[0]):
escoria.logger.error(
self,
"[%s]: invalid object. Object with global id %s not found."
% [get_command_name(), arguments[0]]
)
return false
return true
# Run the command
func run(command_params: Array) -> int:
(escoria.object_manager.get_object(command_params[0]).node as ESCItem).\
set_speed(command_params[1])
return ESCExecution.RC_OK
# Function called when the command is interrupted.
func interrupt():
# Do nothing
pass

View File

@@ -1,62 +0,0 @@
# `set_state object state [immediate]`
#
# Changes the state of `object` to the one specified.
# This command is primarily used to play animations.
#
# If the specified object's associated animation player has an animation
# with the same name, that animation is also played.
#
# When the "state" of the object is set - for example, a door may be set
# to a "closed" state - this plays the matching "close" animation if one exists
# (to show the door closing in the game). When you re-enter the room (via a
# different entry), or restore a saved game, the state of the door object
# will be restored - showing the door as a closed door.
#
# **Parameters**
#
# - *object*: Global ID of the object whose state is to be changed
# - *immediate*: If an animation for the state exists, specifies
# whether it is to skip to the last frame. Can be `true` or `false`.
#
# @ESC
extends ESCBaseCommand
class_name SetStateCommand
# Return the descriptor of the arguments of this command
func configure() -> ESCCommandArgumentDescriptor:
return ESCCommandArgumentDescriptor.new(
2,
[TYPE_STRING, TYPE_STRING, TYPE_BOOL],
[null, null, false]
)
# Validate whether the given arguments match the command descriptor
func validate(arguments: Array):
if not .validate(arguments):
return false
if not escoria.object_manager.has(arguments[0]):
escoria.logger.error(
self,
"[%s]: invalid object. Object %s not found."
% [get_command_name(), arguments[0]]
)
return false
return true
# Run the command
func run(command_params: Array) -> int:
(escoria.object_manager.get_object(command_params[0]) as ESCObject).set_state(
command_params[1],
command_params[2]
)
return ESCExecution.RC_OK
# Function called when the command is interrupted.
func interrupt():
# Do nothing
pass

View File

@@ -1,77 +0,0 @@
# `show_menu menu_type`
#
# Shows either the main menu or the pause menu. Transitions to the menu using
# the default transition type (set in the Escoria project settings).
#
# **Parameters**
#
# - *menu_type*: Which menu to show. Can be either `main` or `pause` (default: `main`)
#
# @ESC
extends ESCBaseCommand
class_name ShowMenuCommand
# Return the descriptor of the arguments of this command
func configure() -> ESCCommandArgumentDescriptor:
return ESCCommandArgumentDescriptor.new(
0,
[TYPE_STRING],
["main"]
)
# Validate whether the given arguments match the command descriptor
func validate(arguments: Array):
if not .validate(arguments):
return false
if not arguments[0] in ["main", "pause"]:
escoria.logger.error(
self,
"[%s]: menu %s is invalid." % [get_command_name(), arguments[0]]
)
return false
return true
# Run the command
func run(command_params: Array) -> int:
if not escoria.game_scene.is_inside_tree():
escoria.add_child(escoria.game_scene)
# Transition out from current scene
var transition_id = escoria.main.scene_transition.transition(
"",
ESCTransitionPlayer.TRANSITION_MODE.OUT
)
if transition_id != ESCTransitionPlayer.TRANSITION_ID_INSTANT:
while yield(
escoria.main.scene_transition,
"transition_done"
) != transition_id:
pass
if command_params[0] == "main":
escoria.game_scene.show_main_menu()
elif command_params[0] == "pause":
escoria.game_scene.pause_game()
# Transition in to menu
transition_id = escoria.main.scene_transition.transition()
if transition_id != ESCTransitionPlayer.TRANSITION_ID_INSTANT:
while yield(
escoria.main.scene_transition,
"transition_done"
) != transition_id:
pass
return ESCExecution.RC_OK
# Function called when the command is interrupted.
func interrupt():
# Do nothing
pass

View File

@@ -1,122 +0,0 @@
# `slide object target [speed]`
#
# Moves `object` towards the position of `target`. This command is
# non-blocking.
#
# - *object*: Global ID of the object to move
# - *target*: Global ID of the target object
# - *speed*: The speed at which to slide in pixels per second (will default to
# the speed configured on the `object`)
#
# **Warning** This command does not respect the room's navigation polygons, so
# `object` can be moved even when outside walkable areas.
#
# @ESC
extends ESCBaseCommand
class_name SlideCommand
# A hash of tweens currently active for animated items
var _tweens: Dictionary
# Return the descriptor of the arguments of this command
func configure() -> ESCCommandArgumentDescriptor:
return ESCCommandArgumentDescriptor.new(
2,
[TYPE_STRING, TYPE_STRING, TYPE_INT],
[null, null, -1]
)
# Validate whether the given arguments match the command descriptor
func validate(arguments: Array):
if not .validate(arguments):
return false
if not escoria.object_manager.has(arguments[0]):
escoria.logger.error(
self,
"[%s]: invalid first object. Object with global id %s not found."
% [get_command_name(), arguments[0]]
)
return false
if not escoria.object_manager.has(arguments[1]):
escoria.logger.error(
self,
"[%s]: invalid second object. Object with global id %s not found."
% [get_command_name(), arguments[1]]
)
return false
return true
# Slide the object by generating a tween
#
# #### Parameters
#
# - *source*: The item to slide
# - *destination*: The destination item to slide to
# - *speed*: The speed at which to slide in pixels per second (will default to
# the speed configured on the `object`)
#
#
# **Returns** The generated (and started) tween
func _slide_object(
source: ESCObject,
destination: ESCObject,
speed: int = -1
) -> Tween:
if speed == -1:
speed = source.node.speed
if _tweens.has(source.global_id):
var tween = (_tweens.get(source.global_id) as Tween)
tween.stop_all()
if (escoria.main as Node).has_node(tween.name):
(escoria.main as Node).remove_child(tween)
var tween = Tween.new()
(escoria.main as Node).add_child(tween)
tween.connect("tween_completed", self, "_on_tween_completed")
var duration = source.node.position.distance_to(
destination.node.position
) / speed
tween.interpolate_property(
source.node,
"global_position",
source.node.global_position,
destination.node.global_position,
duration
)
tween.start()
_tweens[source.global_id] = tween
return tween
# Run the command
func run(command_params: Array) -> int:
_slide_object(
escoria.object_manager.get_object(command_params[0]),
escoria.object_manager.get_object(command_params[1]),
command_params[2]
)
return ESCExecution.RC_OK
# Function called when the command is interrupted.
func interrupt():
for tween in _tweens:
tween.stop_all()
func _on_tween_completed(tween: Tween, _key: NodePath):
if tween:
tween.queue_free()

View File

@@ -1,32 +0,0 @@
# `slide_block object target [speed]`
#
# Moves `object` towards the position of `target`. This command is
# blocking.
#
# - *object*: Global ID of the object to move
# - *target*: Global ID of the target object
# - *speed*: The speed at which to slide in pixels per second (will default to
# the speed configured on the `object`)
#
# **Warning** This command does not respect the room's navigation polygons, so
# `object` can be moved even when outside walkable areas.
#
# @ESC
extends SlideCommand
class_name SlideBlockCommand
# Run the command
func run(command_params: Array) -> int:
var tween = _slide_object(
escoria.object_manager.get_object(command_params[0]),
escoria.object_manager.get_object(command_params[1]),
command_params[2]
)
yield(tween, "tween_all_completed")
return ESCExecution.RC_OK
# Function called when the command is interrupted.
func interrupt():
.interrupt()

View File

@@ -1,95 +0,0 @@
# `spawn identifier path [is_active] [position_target]`
#
# Programmatically adds a new item to the scene.
#
# **Parameters**
#
# - *identifier*: Global ID to use for the new object
# - *path*: Path to the scene file of the object
# - *is_active*: Whether the new object should be set to active (default: `true`)
# - *position_target*: Global ID of another object that will be used to
# position the new object (when omitted, the new object's position is not specified)
#
# @ESC
extends ESCBaseCommand
class_name SpawnCommand
# Return the descriptor of the arguments of this command
func configure() -> ESCCommandArgumentDescriptor:
return ESCCommandArgumentDescriptor.new(
2,
[TYPE_STRING, TYPE_STRING, TYPE_BOOL, TYPE_STRING],
[null, null, true, null]
)
# Validate whether the given arguments match the command descriptor
func validate(arguments: Array):
if not .validate(arguments):
return false
if arguments[0].empty() \
or arguments[0] in escoria.object_manager.RESERVED_OBJECTS:
escoria.logger.error(
self,
"[%s]: global_id (%s) is invalid. The global_id was either empty or is reserved."
% [get_command_name(), arguments[0]]
)
return false
if not ResourceLoader.exists(arguments[1]):
escoria.logger.error(
self,
"[%s]: Invalid scene path: %s not found."
% [get_command_name(), arguments[1]]
)
return false
if arguments[3] and not escoria.object_manager.has(arguments[3]):
escoria.logger.error(
self,
"[%s]: invalid object: Object with global id %s not found."
% [get_command_name(), arguments[3]]
)
return false
return true
# Run the command
func run(command_params: Array) -> int:
var res_scene = escoria.resource_cache.get_resource(command_params[1])
# Load room scene
var scene = res_scene.instance()
if scene:
escoria.main.get_node("/root").add_child(scene)
if command_params[3]:
var obj = escoria.object_manager.get_object(command_params[3])
scene.set_position(obj.get_global_position())
escoria.inputs_manager.hotspot_focused = ""
escoria.object_manager.register_object(
ESCObject.new(
command_params[0],
scene
),
null,
true
)
escoria.object_manager.get_object(command_params[0]).active = \
command_params[2]
else:
escoria.logger.error(
self,
"[%s]: Invalid scene. Failed to load scene %s."
% [get_command_name(), command_params[1]]
)
return ESCExecution.RC_OK
# Function called when the command is interrupted.
func interrupt():
# Do nothing
pass

View File

@@ -1,29 +0,0 @@
# `stop`
#
# Stops the current event's execution. Note that this will stop the current
# script entirely - if you're within a conditional block, the code after the
# conditional block will not be executed.
#
# @ESC
extends ESCBaseCommand
class_name StopCommand
# Return the descriptor of the arguments of this command
func configure() -> ESCCommandArgumentDescriptor:
return ESCCommandArgumentDescriptor.new(
0,
[],
[]
)
# Run the command
func run(command_params: Array) -> int:
return ESCExecution.RC_CANCEL
# Function called when the command is interrupted.
func interrupt():
# Do nothing
pass

View File

@@ -1,68 +0,0 @@
# `stop_snd [audio_bus]`
#
# Stops the given audio bus's stream.
#
# By default there are 3 audio buses set up by Escoria : `_sound`, which is
# used to play non-looping sound effects; `_music`, which plays looping music;
# and `_speech`, which plays non-looping voice files (default: `_music`).
#
# Each simultaneous sound (e.g. multiple game sound effects) will require its
# own bus. To create additional buses, see the Godot sound documentation :
# [Audio buses](https://docs.godotengine.org/en/stable/tutorials/audio/audio_buses.html#doc-audio-buses)
#
# **Parameters**
#
# - *audio_bus*: Bus to stop ("_sound", "_music", "_speech", or a custom
# audio bus you have created.)
#
# @ESC
extends ESCBaseCommand
class_name StopSndCommand
# The specified sound player
var _snd_player: String
# The previous sound state, saved for interrupting
var previous_snd_state: String
# Return the descriptor of the arguments of this command
func configure() -> ESCCommandArgumentDescriptor:
return ESCCommandArgumentDescriptor.new(
0,
[TYPE_STRING],
["_music"]
)
# Validate whether the given arguments match the command descriptor
func validate(arguments: Array):
if not .validate(arguments):
return false
if not escoria.object_manager.has(arguments[0]):
escoria.logger.error(
self,
"[%s]: invalid sound player. Sound player %s not registered."
% [get_command_name(), arguments[0]]
)
return false
_snd_player = arguments[0]
return true
# Run the command
func run(command_params: Array) -> int:
previous_snd_state = escoria.object_manager.get_object(command_params[0]).node.state
escoria.object_manager.get_object(command_params[0]).node.set_state(
"off"
)
return ESCExecution.RC_OK
# Function called when the command is interrupted.
func interrupt():
escoria.object_manager.get_object(_snd_player).node.set_state(
previous_snd_state
)

View File

@@ -1,68 +0,0 @@
# `teleport object target`
#
# Instantly moves an object to a new position.
#
# **Parameters**
#
# - *object*: Global ID of the object to move
# - *target*: Global ID of the object to use as the destination coordinates
# for `object`
#
# @ESC
extends ESCBaseCommand
class_name TeleportCommand
# Return the descriptor of the arguments of this command
func configure() -> ESCCommandArgumentDescriptor:
return ESCCommandArgumentDescriptor.new(
2,
[TYPE_STRING, TYPE_STRING],
[null, null]
)
# Validate whether the given arguments match the command descriptor
func validate(arguments: Array):
if not .validate(arguments):
return false
if not escoria.object_manager.has(arguments[0]):
escoria.logger.error(
self,
"[%s]: invalid first object. Object to teleport with global id %s not found."
% [get_command_name(), arguments[0]]
)
return false
if not (escoria.object_manager.get_object(arguments[0]).node as ESCItem):
escoria.logger.error(
self,
"[%s]: invalid first object. Object to teleport with global id %s must be of or derived from type ESCItem."
% [get_command_name(), arguments[0]]
)
return false
if not escoria.object_manager.has(arguments[1]):
escoria.logger.error(
self,
"[%s]: invalid second object. Destination location to teleport to with global id %s not found."
% [get_command_name(), arguments[1]]
)
return false
return true
# Run the command
func run(command_params: Array) -> int:
(escoria.object_manager.get_object(command_params[0]).node as ESCItem) \
.teleport(
escoria.object_manager.get_object(command_params[1]).node
)
return ESCExecution.RC_OK
# Function called when the command is interrupted.
func interrupt():
# Do nothing
pass

View File

@@ -1,62 +0,0 @@
# `teleport_pos object x y`
#
# Instantly moves an object to the specified (absolute) coordinates.
#
# **Parameters**
#
# - *object*: Global ID of the object to move
# - *x*: X-coordinate of destination position
# - *y*: Y-coordinate of destination position
#
# @ESC
extends ESCBaseCommand
class_name TeleportPosCommand
# Return the descriptor of the arguments of this command
func configure() -> ESCCommandArgumentDescriptor:
return ESCCommandArgumentDescriptor.new(
3,
[TYPE_STRING, TYPE_INT, TYPE_INT],
[null, null, null]
)
# Validate whether the given arguments match the command descriptor
func validate(arguments: Array):
if not .validate(arguments):
return false
if not escoria.object_manager.has(arguments[0]):
escoria.logger.error(
self,
"[%s]: invalid first object. Object to teleport with global id %s not found."
% [get_command_name(), arguments[0]]
)
return false
if not (escoria.object_manager.get_object(arguments[0]).node as ESCItem):
escoria.logger.error(
self,
"[%s]: invalid first object. Object to teleport with global id %s must be of or derived from type ESCItem."
% [get_command_name(), arguments[0]]
)
return false
return true
# Run the command
func run(command_params: Array) -> int:
(escoria.object_manager.get_object(command_params[0]).node as ESCItem) \
.teleport_to(
Vector2(int(command_params[1]), int(command_params[2])
)
)
return ESCExecution.RC_OK
# Function called when the command is interrupted.
func interrupt():
# Do nothing
pass

View File

@@ -1,90 +0,0 @@
# `transition transition_name mode [delay]`
#
# Runs a transition effect - generally used when entering or leaving a room.
# Transitions are implemented as Godot shaders. Custom transitions can be made
# by creating a shader in the `game/scenes/transitions/shaders/` folder within
# the escoria-core plugin folder.
#
# **Parameters**
#
# - *transition_name*: Name of the transition shader from one of the transition
# directories
# - *mode*: Set to `in` to transition into or `out` to transition out of the room
# - *delay*: Delay in seconds before starting the transition (default: `1.0`)
#
# @ESC
extends ESCBaseCommand
class_name TransitionCommand
# Return the descriptor of the arguments of this command
func configure() -> ESCCommandArgumentDescriptor:
return ESCCommandArgumentDescriptor.new(
2,
[TYPE_STRING, TYPE_STRING, TYPE_REAL],
[null, null, 1.0]
)
# Validate whether the given arguments match the command descriptor
func validate(arguments: Array):
if not .validate(arguments):
return false
if not escoria.main.scene_transition.has_transition(arguments[0]) \
and not arguments[0].empty():
escoria.logger.error(
self,
"[%s]: argument invalid. Transition with name '%s' doesn't exist."
% [get_command_name(), arguments[0]]
)
return false
if not arguments[1] in ["in", "out"]:
escoria.logger.error(
self,
"[%s]: argument invalid" +
"Transition type 'in' or 'out' expected, but '%s' was provided."
% [get_command_name(), arguments[1]]
)
return false
return true
# Run the command
func run(command_params: Array) -> int:
var transition_id = escoria.main.scene_transition.transition(
command_params[0],
ESCTransitionPlayer.TRANSITION_MODE.OUT if command_params[1] == "out" \
else ESCTransitionPlayer.TRANSITION_MODE.IN,
command_params[2]
)
if transition_id == ESCTransitionPlayer.TRANSITION_ID_INSTANT:
escoria.logger.debug(
self,
"Performing instant transition."
)
escoria.main.scene_transition.reset_shader_cutoff()
return ESCExecution.RC_OK
escoria.logger.debug(
self,
"Starting transition #%s [%s, %s]."
% [transition_id, command_params[0], command_params[1]]
)
while yield(
escoria.main.scene_transition,
"transition_done"
) != transition_id:
pass
escoria.logger.debug(
self,
"Ending transition #%s [%s, %s]."
% [transition_id, command_params[0], command_params[1]])
return ESCExecution.RC_OK
# Function called when the command is interrupted.
func interrupt():
# Do nothing
pass

View File

@@ -1,79 +0,0 @@
# `turn_to object object_to_face [wait]`
#
# Turns `object` to face another object.
#
# Unlike movement commands, `turn_to` will not automatically reference an
# `ESCLocation` that is a child of an `ESCItem.`
# To turn towards an `ESCLocation` that is a child of an `ESCItem`, give the
# `ESCLocation` a `Global ID` and use this value as the `object_to_face`
# parameter.
#
# While turning, the number of directions the item faces will depend on
# the number of `directions` defined for the object. A 16 direction character
# for example will display 8 directions of animation while turning to face an
# object that is 180 degrees away, a 4 direction character would only face 2
# directions to make the same turn. As the idle animation will be played for
# `wait` seconds for each direction the object faces, a 16 direction character
# would take 8 seconds to rotate 180 degrees with a 1 second `wait` time,
# whereas a 4 direction character would only take 2 seconds to make the same
# rotation.
#
# **Parameters**
#
# - *object*: Global ID of the object to be turned
# - *object_to_face*: Global ID of the object to turn towards
# - *wait*: Length of time to wait in seconds for each intermediate angle.
# If set to 0, the turnaround is immediate (default: `0`)
#
# @ESC
extends ESCBaseCommand
class_name TurnToCommand
# Return the descriptor of the arguments of this command
func configure() -> ESCCommandArgumentDescriptor:
return ESCCommandArgumentDescriptor.new(
2,
[TYPE_STRING, TYPE_STRING, TYPE_REAL],
[null, null, 0.0]
)
# Validate whether the given arguments match the command descriptor
func validate(arguments: Array):
if not .validate(arguments):
return false
if not escoria.object_manager.has(arguments[0]):
escoria.logger.error(
self,
"[%s]: Cannot turn \"%s\". Object not found."
% [get_command_name(), arguments[0]]
)
return false
if not escoria.object_manager.has(arguments[1]):
escoria.logger.error(
self,
"[%s]: Cannot turn \"%s\" towards \"%s\". \"%s\" was not found."
% [get_command_name(), arguments[0], arguments[1] , arguments[1]]
)
return false
return true
# Run the command
func run(command_params: Array) -> int:
(escoria.object_manager.get_object(command_params[0]).node as ESCItem)\
.turn_to(
escoria.object_manager.get_object(command_params[1]).node,
command_params[2]
)
return ESCExecution.RC_OK
# Function called when the command is interrupted.
func interrupt():
escoria.logger.debug(
self,
"[%s] interrupt() function not implemented." % get_command_name()
)

View File

@@ -1,58 +0,0 @@
# `wait seconds`
#
# Blocks execution of the current event.
#
# **Parameters**
#
# - *seconds*: Number of seconds to block
#
# @ESC
extends ESCBaseCommand
class_name WaitCommand
# Timer to wait for
var timer: Timer
# Return the descriptor of the arguments of this command
func configure() -> ESCCommandArgumentDescriptor:
return ESCCommandArgumentDescriptor.new(
1,
[[TYPE_INT, TYPE_REAL]],
[null]
)
# Validate whether the given arguments match the command descriptor
func validate(arguments: Array):
if not .validate(arguments):
return false
# We can't wait for 0 or fewer seconds, now, can we?
if arguments[0] <= 0.0:
escoria.logger.error(
self,
"[%s]: argument invalid. %s is an invalid amount of time to wait (must be positive)."
% [get_command_name(), arguments[0]]
)
return false
return true
# Run the command
func run(command_params: Array) -> int:
timer = Timer.new()
timer.wait_time = float(command_params[0])
escoria.add_child(timer)
timer.start()
yield(timer, "timeout")
escoria.remove_child(timer)
return ESCExecution.RC_OK
# Function called when the command is interrupted.
func interrupt():
if timer == null:
return
timer.emit_signal("timeout")

View File

@@ -1,77 +0,0 @@
# `walk object target [walk_fast]`
#
# Moves the specified `ESCPlayer` or movable `ESCItem` to the `target`
# ESCItem's location while playing `object`'s walking animation. This command
# is non-blocking.
# This command will use the normal walk speed by default.
# If the `target` ESCItem has a child ESCLocation node, the walk destination
# will be the position of the ESCLocation.
#
# **Parameters**
#
# - *object*: Global ID of the object to move
# - *target*: Global ID of the target object
# - *walk_fast*: Whether to walk fast (`true`) or normal speed (`false`)
# (default: false)
#
# @ESC
extends ESCBaseCommand
class_name WalkCommand
# Walking object
var walking_object_node: ESCItem
# Target object
var target_object_node: ESCObject
# Return the descriptor of the arguments of this command
func configure() -> ESCCommandArgumentDescriptor:
return ESCCommandArgumentDescriptor.new(
2,
[TYPE_STRING, TYPE_STRING, TYPE_BOOL],
[null, null, false]
)
# Validate whether the given arguments match the command descriptor
func validate(arguments: Array):
if not .validate(arguments):
return false
if not escoria.object_manager.has(arguments[0]):
escoria.logger.error(
self,
"[%s]: invalid first object. The object with global id %s to make walk was not found."
% [get_command_name(), arguments[0]]
)
return false
if not escoria.object_manager.has(arguments[1]):
escoria.logger.error(
self,
"[%s]: invalid second object. The object to walk to with global id %s was not found."
% [get_command_name(), arguments[1]]
)
return false
walking_object_node = (escoria.object_manager.get_object(
arguments[0]).node as ESCItem
)
target_object_node = escoria.object_manager.get_object(arguments[1])
return true
# Run the command
func run(command_params: Array) -> int:
escoria.action_manager.do(
escoria.action_manager.ACTION.BACKGROUND_CLICK,
command_params
)
return ESCExecution.RC_OK
# Function called when the command is interrupted.
func interrupt():
if walking_object_node != null:
walking_object_node.stop_walking_now()

View File

@@ -1,79 +0,0 @@
# `walk_block object target [walk_fast]`
#
# Moves the specified `ESCPlayer` or movable `ESCItem` to the `target`
# ESCItem's location while playing `object`'s walking animation. This command
# is blocking.
# This command will use the normal walk speed by default.
# If the `target` ESCItem has a child ESCLocation node, the walk destination
# will be the position of the ESCLocation.
#
# **Parameters**
#
# - *object*: Global ID of the object to move
# - *target*: Global ID of the target object
# - *walk_fast*: Whether to walk fast (`true`) or normal speed (`false`).
# (default: false)
#
# @ESC
extends ESCBaseCommand
class_name WalkBlockCommand
# Walking object
var walking_object_node: ESCItem
# Target object
var target_object_node: ESCObject
# Return the descriptor of the arguments of this command
func configure() -> ESCCommandArgumentDescriptor:
return ESCCommandArgumentDescriptor.new(
2,
[TYPE_STRING, TYPE_STRING, TYPE_BOOL],
[null, null, false]
)
# Validate whether the given arguments match the command descriptor
func validate(arguments: Array):
if not .validate(arguments):
return false
if not escoria.object_manager.has(arguments[0]):
escoria.logger.error(
self,
"[%s]: invalid first object. The object to make walk with global id %s was not found."
% [get_command_name(), arguments[0]]
)
return false
if not escoria.object_manager.has(arguments[1]):
escoria.logger.error(
self,
"[%s]: invalid second object. The object to walk to with global id %s was not found."
% [get_command_name(), arguments[1]]
)
return false
walking_object_node = (escoria.object_manager.get_object(
arguments[0]).node as ESCItem
)
target_object_node = escoria.object_manager.get_object(arguments[1])
return true
# Run the command
func run(command_params: Array) -> int:
escoria.action_manager.do(
escoria.action_manager.ACTION.BACKGROUND_CLICK,
command_params
)
yield(walking_object_node, "arrived")
return ESCExecution.RC_OK
# Function called when the command is interrupted.
func interrupt():
if walking_object_node != null and is_instance_valid(walking_object_node) \
and not walking_object_node is ESCPlayer:
walking_object_node.stop_walking_now()

View File

@@ -1,65 +0,0 @@
# `walk_to_pos object x y [walk_fast]`
#
# Moves the specified `ESCPlayer` or movable `ESCItem` to the absolute
# coordinates provided while playing the `object`'s walking animation.
# This command is non-blocking.
# This command will use the normal walk speed by default.
#
# **Parameters**
#
# - *object*: Global ID of the object to move
# - *x*: X-coordinate of target position
# - *y*: Y-coordinate of target position
# - *walk_fast*: Whether to walk fast (`true`) or normal speed (`false`).
# (default: false)
#
# @ESC
extends ESCBaseCommand
class_name WalkToPosCommand
# Walking object
var walking_object_node: ESCItem
# Return the descriptor of the arguments of this command
func configure() -> ESCCommandArgumentDescriptor:
return ESCCommandArgumentDescriptor.new(
3,
[TYPE_STRING, TYPE_INT, TYPE_INT, TYPE_BOOL],
[null, null, null, false]
)
# Validate whether the given arguments match the command descriptor
func validate(arguments: Array):
if not .validate(arguments):
return false
if not escoria.object_manager.has(arguments[0]):
escoria.logger.error(
self,
"[%s]: invalid first object. The object to make walk with global id %s was not found."
% [get_command_name(), arguments[0]]
)
return false
walking_object_node = (escoria.object_manager.get_object(
arguments[0]).node as ESCItem
)
return true
# Run the command
func run(command_params: Array) -> int:
escoria.action_manager.do(escoria.action_manager.ACTION.BACKGROUND_CLICK, [
command_params[0],
Vector2(command_params[1], command_params[2]), command_params[3]
])
return ESCExecution.RC_OK
# Function called when the command is interrupted.
func interrupt():
if walking_object_node != null and not walking_object_node is ESCPlayer:
walking_object_node.stop_walking_now()

View File

@@ -1,69 +0,0 @@
# `walk_to_pos_block object x y [walk_fast]`
#
# Moves the specified `ESCPlayer` or movable `ESCItem` to the absolute
# coordinates provided while playing the `object`'s walking animation.
# This command is blocking.
# This command will use the normal walk speed by default.
#
# **Parameters**
#
# - *object*: Global ID of the object to move
# - *x*: X-coordinate of target position
# - *y*: Y-coordinate of target position
# - *walk_fast*: Whether to walk fast (`true`) or normal speed (`false`).
# (default: false)
#
# @ESC
extends ESCBaseCommand
class_name WalkToPosBlockCommand
# Walking object
var walking_object_node: ESCItem
# Return the descriptor of the arguments of this command
func configure() -> ESCCommandArgumentDescriptor:
return ESCCommandArgumentDescriptor.new(
3,
[TYPE_STRING, TYPE_INT, TYPE_INT, TYPE_BOOL],
[null, null, null, false]
)
# Validate whether the given arguments match the command descriptor
func validate(arguments: Array):
if not .validate(arguments):
return false
if not escoria.object_manager.has(arguments[0]):
escoria.logger.error(
self,
"[%s]: invalid first object. The object to make walk with global id %s was not found."
% [get_command_name(), arguments[0]]
)
return false
walking_object_node = (escoria.object_manager.get_object(
arguments[0]).node as ESCItem
)
return true
# Run the command
func run(command_params: Array) -> int:
escoria.action_manager.do(escoria.action_manager.ACTION.BACKGROUND_CLICK, [
command_params[0],
Vector2(command_params[1], command_params[2]), command_params[3]
])
yield(
(escoria.object_manager.get_object(command_params[0]).node as ESCItem),
"arrived"
)
return ESCExecution.RC_OK
# Function called when the command is interrupted.
func interrupt():
if walking_object_node != null and not walking_object_node is ESCPlayer:
walking_object_node.stop_walking_now()

View File

@@ -1,764 +0,0 @@
# Manages currently carried out actions
extends Resource
class_name ESCActionManager
# The current action verb was changed
signal action_changed
# Emitted, when an action has been completed
signal action_finished
# Emitted when the action input state has changed
signal action_input_state_changed
# States of the action input (verb, item, target)
# (I) -> AWAITING_VERB_OR_ITEM -> AWAITING_ITEM -> COMPLETED -> (E)
# or
# (I) -> AWAITING_VERB_OR_ITEM -> AWAITING_ITEM -> AWAITING_TARGET_ITEM -> COMPLETED -> (E)
# or
# (I) -> AWAITING_VERB_OR_ITEM -> AWAITING_VERB -> AWAITING_VERB_CONFIRMATION -> COMPLETED -> (E)
enum ACTION_INPUT_STATE {
# Initial state
AWAITING_VERB_OR_ITEM,
# After initial state, verb is defined
AWAITING_ITEM,
# Item defined requires combine, waiting for  target
AWAITING_TARGET_ITEM
# After initial state, item is defined
AWAITING_VERB,
# Item was defined first, next verb, need verb confirmation
AWAITING_VERB_CONFIRMATION,
# Final state
COMPLETED
}
# Actions understood by the do(...) method
# * BACKGROUND_CLICK: Object is to move from its current position
# * ITEM_LEFT_CLICK: Item has been clicked on with LMB.
# * ITEM_RIGHT_CLICK: Item has been clicked on with RMB.
# * TRIGGER_IN: Character has moved into a trigger area.
# * TRIGGER_OUT: Character has moved out of a trigger area.
enum ACTION {
BACKGROUND_CLICK,
ITEM_LEFT_CLICK,
ITEM_RIGHT_CLICK,
TRIGGER_IN,
TRIGGER_OUT
}
# Basic required internal actions
const ACTION_ARRIVED = "arrived"
const ACTION_EXIT_SCENE = "exit_scene"
const ACTION_WALK = "walk"
# Current verb used
var current_action: String = "" setget set_current_action
# Current tool (ESCItem/ESCInventoryItem) used
var current_tool: ESCObject
# Current target where the tool is being used on/with (if any)
var current_target: ESCObject
# Current action input state
var action_state = ACTION_INPUT_STATE.AWAITING_VERB_OR_ITEM \
setget set_action_input_state
# Run a generic action
#
# #### Parameters
#
# - action: type of the action to run
# - params: Parameters for the action
# - can_interrupt: if true, this command will interrupt any ongoing event
# before it is finished
func do(action: int, params: Array = [], can_interrupt: bool = false) -> void:
if escoria.current_state == escoria.GAME_STATE.DEFAULT:
match action:
ACTION.BACKGROUND_CLICK:
if can_interrupt:
escoria.event_manager.interrupt()
var walk_fast = false
if params.size() > 2:
walk_fast = true if params[2] else false
# Check moving object.
if not escoria.object_manager.has(params[0]):
escoria.logger.error(
self,
"Walk action requested for nonexisting object: %s."
% params[0]
)
return
var moving_obj = escoria.object_manager.get_object(params[0])
var target
if params[1] is String:
if not escoria.object_manager.has(params[1]):
escoria.logger.error(
self,
"Walk action requested to nonexisting destination object: %s."
% params[1]
)
return
target = escoria.object_manager.get_object(params[1])
elif params[1] is Vector2:
target = params[1]
self.perform_walk(moving_obj, target, walk_fast)
ACTION.ITEM_LEFT_CLICK:
if params[0] is String:
escoria.logger.info(
self,
"item_left_click on item %s." % params[0]
)
if can_interrupt:
escoria.event_manager.interrupt()
var item = escoria.object_manager.get_object(params[0])
self.perform_inputevent_on_object(item, params[1])
ACTION.ITEM_RIGHT_CLICK:
if params[0] is String:
escoria.logger.info(
self,
"item_right_click on item %s." % params[0]
)
if can_interrupt:
escoria.event_manager.interrupt()
var item = escoria.object_manager.get_object(params[0])
self.perform_inputevent_on_object(item, params[1], true)
ACTION.TRIGGER_IN:
var trigger_id = params[0]
var object_id = params[1]
var trigger_in_verb = params[2]
escoria.logger.info(
self,
"trigger_in on trigger %s activated by %s." % [
trigger_id,
object_id
]
)
escoria.event_manager.queue_event(
escoria.object_manager.get_object(trigger_id).events[
trigger_in_verb
]
)
ACTION.TRIGGER_OUT:
var trigger_id = params[0]
var object_id = params[1]
var trigger_out_verb = params[2]
escoria.logger.info(
self,
"trigger_out on trigger %s activated by %s." % [
trigger_id,
object_id
]
)
escoria.event_manager.queue_event(
escoria.object_manager.get_object(trigger_id).events[
trigger_out_verb
]
)
_:
escoria.logger.warn(
self,
"Action received: %s with params %s.", [action, params]
)
elif escoria.current_state == escoria.GAME_STATE.WAIT:
pass
# Sets the current state of action input.
#
# ## Parameters
# - p_state: the action input state to set
func set_action_input_state(p_state):
action_state = p_state
emit_signal("action_input_state_changed")
# Set the current action verb
#
# ## Parameters
# - action: The action verb to set
func set_current_action(action: String):
if action != current_action:
clear_current_tool()
current_action = action
if action_state == ACTION_INPUT_STATE.AWAITING_VERB_OR_ITEM:
set_action_input_state(ACTION_INPUT_STATE.AWAITING_ITEM)
elif action_state == ACTION_INPUT_STATE.AWAITING_VERB:
set_action_input_state(ACTION_INPUT_STATE.AWAITING_VERB_CONFIRM)
emit_signal("action_changed")
# Clear the current action
func clear_current_action():
set_current_action("")
set_action_input_state(ACTION_INPUT_STATE.AWAITING_VERB_OR_ITEM)
emit_signal("action_changed")
# Clear the current tool
func clear_current_tool():
current_tool = null
current_target = null
if action_state == ACTION_INPUT_STATE.AWAITING_VERB:
set_action_input_state(ACTION_INPUT_STATE.AWAITING_VERB_OR_ITEM)
elif action_state == ACTION_INPUT_STATE.AWAITING_TARGET_ITEM:
set_action_input_state(ACTION_INPUT_STATE.AWAITING_ITEM)
# Checks if the specified action is valid and returns the associated event;
# otherwise, we see if there's a "fallback" event and use that if necessary and,
# if not, we return no event as there's nothing to do.
#
# #### Parameters
#
# - action: Action to execute (defined in attached ESC file and in
# action verbs UI) eg: arrived, use, look, pickup...
# - target: Target ESC object
# - combine_with: ESC object to combine with
#
# *Returns* the appropriate ESCEvent to queue/run, or null if none can be found
# or there's a reason not to run an event.
func _get_event_to_queue(
action: String,
target: ESCObject,
combine_with: ESCObject = null
) -> ESCEvent:
escoria.logger.info(
self,
"Checking if action '%s' on '%s' is valid..." % [action, target]
)
var event_to_return: ESCEvent = null
# If we're using an action which item requires to combine
if target.node is ESCItem \
and action in target.node.combine_when_selected_action_is_in:
# Check if object must be in inventory to be used
if target.node.use_from_inventory_only:
if escoria.inventory_manager.inventory_has(target.global_id):
# Player has item in inventory, we check the element to use on
if combine_with:
var do_combine = true
if combine_with.node is ESCItem \
and combine_with.node.use_from_inventory_only\
and not escoria.inventory_manager.inventory_has(
combine_with.global_id
):
do_combine = false
if do_combine:
var target_event = "%s %s" % [
action,
combine_with.global_id
]
var combine_with_event = "%s %s" % [
action,
target.global_id
]
if target.events.has(target_event):
event_to_return = target.events[target_event]
elif combine_with.events.has(combine_with_event)\
and not combine_with.node.combine_is_one_way:
event_to_return = combine_with.events[combine_with_event]
else:
# Check to see if there isn't a "fallback" action to
# run before we declare this a failure.
if escoria.action_default_script \
and escoria.action_default_script.events.has(action):
event_to_return = escoria.action_default_script.events[action]
else:
var errors = [
"Attempted to execute action %s between item %s and item %s" % [
action,
target.global_id,
combine_with.global_id
]
]
if combine_with.node.combine_is_one_way:
errors.append(
("Reason: %s's item interaction " + \
"is one-way.") % combine_with.global_id
)
escoria.logger.warn(
self,
"Invalid action: " + str(errors)
)
else:
escoria.logger.warn(
self,
"Invalid action on item: " +
(
"Trying to combine object %s with %s, "+
"but %s is not in inventory."
) % [
target.global_id,
combine_with.global_id,
combine_with.global_id
]
)
else:
escoria.logger.warn(
self,
"Invalid action on item: " +
"Trying to run action %s on object %s, " %
[
action,
target.node.global_id
]
+ "but item must be in inventory."
)
else:
if target.events.has(action):
event_to_return = target.events[action]
elif escoria.action_default_script \
and escoria.action_default_script.events.has(action):
# If there's a "fallback" action to run, return it
event_to_return = escoria.action_default_script.events[action]
else:
escoria.logger.warn(
self,
"Invalid action: " +
"Event for action %s on object %s not found." % [
action,
target.global_id
]
)
return event_to_return
# Runs the specified event.
#
# #### Parameters
#
# - event: the event to be run
#
# *Returns* the return code of the event once executed
func _run_event(event: ESCEvent) -> int:
escoria.event_manager.queue_event(event)
var event_returned = yield(
escoria.event_manager,
"event_finished"
)
while event_returned[1] != event.name:
event_returned = yield(
escoria.event_manager,
"event_finished"
)
clear_current_action()
emit_signal("action_finished")
return event_returned[0]
# Makes an object walk to a destination. This can be either a 2D position or
# another object.
#
# #### Parameters
#
# - moving_obj_id: global id of the object that needs to move
# - destination: Position2D or ESCObject holding the moving object to head to
# - is_fast: if true, the walk is performed at fast speed (defined in the moving
# object.
func perform_walk(
moving_obj: ESCObject,
destination,
is_fast: bool = false
):
# Walk to Position2D.
if destination is Vector2:
var walk_context = ESCWalkContext.new(
null,
destination,
is_fast,
true
)
moving_obj.node.walk_to(destination, walk_context)
# Walk to object
elif destination is ESCObject:
if destination.node:
var target_position: Vector2
if destination.node is ESCLocation:
target_position = destination.node.global_position
else:
target_position = destination.node.get_interact_position()
var walk_context = ESCWalkContext.new(
destination,
target_position,
is_fast,
true
)
moving_obj.node.walk_to(target_position, walk_context)
else:
escoria.logger.error(
self,
"Function expected either a Vector2 or ESCObject type " + \
"for destination parameter. Destination provided was: %s." % destination
)
return
# Event handler when an object/item was clicked
#
# #### Parameters
#
# - obj: Object that was left clicked
# - event: Input event that was received
# - default_action: if true, run the inventory default action
func perform_inputevent_on_object(
obj: ESCObject,
event: InputEvent,
default_action: bool = false
):
"""
This algorithm:
- validates the requested action
- grabs the corresponding event for the action, if available
- makes the player move to the clicked object location, if needed
(if it is located in the room for example) and wait for reaching.
- when reached, performs an action depending on current defined action
* no current action defined: do nothing else
* current action defined:
* item requires no combination: perform the current action
on the item
* item requires combination: check the status of the combination
A combination requires 3 elements to fulfill:
1/ a verb action
2/ a first "tool" (item to use)
3/ a second "tool" (item to use ON)
Whatever the user inputs to fulfill the combination (this is
determined by gamedev in his game.gd script)
- combination not fulfilled: no not perform until fulfilled
- combination fulfilled: perform the combination.
* else do nothing, except if default_action is requested.
In this case, perform the default_action on the item.
"""
escoria.logger.info(
self,
"%s to perform event %s." % [obj.global_id, event]
)
# Don't interact after player movement towards object
# (because object is inactive for example)
var dont_interact = false
# We need to have the new action input state BEFORE initiating the player
# move so we determine now if the object clicked will require a combination
# depending on the used action verb.
var tool_just_set = _set_tool_and_action(obj, default_action)
var need_combine = _check_item_needs_combine()
# If the current tool was not set, this is our first item, make it the tool
if not current_tool or (current_tool and not need_combine):
current_tool = obj
# Else, if we have a tool and combination required, this is our second item,
# make it the target.
elif need_combine and not tool_just_set:
current_target = obj
# Update the action input state
if action_state == ACTION_INPUT_STATE.AWAITING_TARGET_ITEM and current_target:
set_action_input_state(ACTION_INPUT_STATE.COMPLETED)
elif action_state == ACTION_INPUT_STATE.AWAITING_ITEM and \
not need_combine:
set_action_input_state(ACTION_INPUT_STATE.COMPLETED)
elif action_state == ACTION_INPUT_STATE.AWAITING_ITEM and need_combine and not tool_just_set:
set_action_input_state(ACTION_INPUT_STATE.AWAITING_TARGET_ITEM)
var event_to_queue: ESCEvent = null
# Manage exits
if obj.node.is_exit and current_action in ["", ACTION_WALK]:
event_to_queue = _get_event_to_queue(ACTION_EXIT_SCENE, obj)
else:
# Manage movements towards object before activating it
if current_action in ["", ACTION_WALK] and \
not escoria.inventory_manager.inventory_has(obj.global_id):
event_to_queue = _get_event_to_queue(ACTION_ARRIVED, obj)
# Manage action on object
elif not current_action in ["", ACTION_WALK]:
if need_combine and current_target:
event_to_queue = _get_event_to_queue(
current_action,
current_tool,
current_target
)
else:
# Check if object must be in inventory to be used and update
# action state if necessary
if obj.node.use_from_inventory_only and \
escoria.inventory_manager.inventory_has(obj.global_id) and \
need_combine:
# We're missing a target here for our tool to be used on
current_tool = obj
set_action_input_state(
ACTION_INPUT_STATE.AWAITING_TARGET_ITEM
)
# We need to wait for that target
return
else:
event_to_queue = _get_event_to_queue(
current_action,
obj
)
# Get out of here if there's a specified action but an event couldn't be found.
# Note that `event_to_queue` may still be null, but we do need to start the
# player walking towards the destination.
if current_action and not event_to_queue:
clear_current_action()
emit_signal("action_finished")
return
var event_flags = event_to_queue.flags if event_to_queue else 0
if escoria.main.current_scene.player:
var destination_position: Vector2 = escoria.main.current_scene.player \
.global_position
# If clicked object not in inventory, player walks towards it
if not obj.node is ESCPlayer and \
not escoria.inventory_manager.inventory_has(obj.global_id) and \
not event_flags & ESCEvent.FLAG_TK:
var context = _walk_towards_object(
obj,
event.position,
event.doubleclick
)
if context is GDScriptFunctionState:
context = yield(context, "completed")
# In case of an interrupted walk, we don't want to proceed.
if context == null:
return
destination_position = context.target_position
dont_interact = context.dont_interact_on_arrival
var player_global_pos = escoria.main.current_scene.player.global_position
var clicked_position = event.position
# Using this instead of is_equal_approx due to
# https://github.com/godotengine/godot/issues/65257
if (player_global_pos - destination_position).length() > 1:
dont_interact = true
escoria.logger.info(
self,
"Player could not reach destination coordinates %s. " % str(destination_position) \
+ "Any requested action for %s will not fire." % obj.global_id
)
if escoria.event_manager.EVENT_CANT_REACH in obj.events:
escoria.event_manager.queue_event(obj.events[escoria.event_manager.EVENT_CANT_REACH])
else:
escoria.logger.info(
self,
"%s event not found for object %s so nothing to do." % \
[escoria.event_manager.EVENT_CANT_REACH, obj.global_id]
)
# If no interaction should happen after player has arrived, leave
# immediately.
if not dont_interact and event_to_queue:
_run_event(event_to_queue)
# Determines whether the object in question can be acted upon.
#
# #### Parameters
#
# - global_id: the global ID of the item to examine
#
# *Returns* True iff the item represented by global_id can be acted upon.
func is_object_actionable(global_id: String) -> bool:
var obj: ESCObject = escoria.object_manager.get_object(global_id) as ESCObject
return _is_object_actionable(obj)
# Prepare the "obj" object for current_action: if required, set the object as
# current tool.
#
# #### Parameters
#
# - obj: the ESCObject to prepare
# - default_action: if true, the default action set on the item is used
#
# *Returns* True if the tool was set in this function
func _set_tool_and_action(obj: ESCObject, default_action: bool):
var tool_just_set: bool = false
# Check if current_action and current_tool are already set
if current_action and current_tool:
if not current_action in escoria.action_manager\
.current_tool.node.combine_when_selected_action_is_in:
current_tool = obj
tool_just_set = true
elif default_action:
if escoria.inventory_manager.inventory_has(obj.global_id):
current_action = obj.node.default_action_inventory
else:
current_action = obj.node.default_action
elif current_action in obj.node.combine_when_selected_action_is_in:
current_tool = obj
tool_just_set = true
return tool_just_set
# Checks if object requires a combination with another, according to
# currently selected action verb (or check with default action of the item).
#
# *Returns* True if current action on "obj" requires a combination
func _check_item_needs_combine() -> bool:
return current_action \
and current_tool \
and current_action in current_tool.node.combine_when_selected_action_is_in
# Makes the player character walk towards the clicked item.
# Returns the resulting walk context.
#
# #### Parameters
#
# - obj: the object that was clicked
# - clicked_position: the Position2D of the input click
# - walk_fast: if true, the player will walk fast to the object
func _walk_towards_object(
obj: ESCObject,
clicked_position: Vector2,
walk_fast: bool
) -> ESCWalkContext:
var destination_position: Vector2
var dont_interact: bool = false
if obj == null || obj.node == null:
escoria.logger.error(
self,
"walk_towards_object error. obj or obj.node not populated."
)
var interact_position = obj.node.get_interact_position()
# If clicked object is interactive, get destination position from it.
if escoria.object_manager.get_object(obj.global_id).interactive:
if interact_position != null:
destination_position = interact_position
else:
destination_position = obj.node.position
else:
destination_position = clicked_position
dont_interact = true
# Create walk context
var walk_context = ESCWalkContext.new(
obj,
destination_position,
walk_fast,
dont_interact
)
# Walk towards the clicked object
escoria.main.current_scene.player.walk_to(destination_position,
walk_context)
escoria.logger.debug(
self,
"Player walking to destination. Yielding."
)
# Wait for the player to arrive before continuing with action.
var context: ESCWalkContext = yield(
escoria.main.current_scene.player,
"arrived"
)
if context.target_object != obj:
escoria.logger.debug(
self,
"Original walk context target does not match " \
+ "yielded walk context. Likely interrutped walk.")
return
escoria.logger.info(
self,
"Context arrived: %s." % context
)
# Confirm that reached item was the one user clicked in the first place.
# Don't interact if that is not the case.
if (context.target_object and context.target_object.\
global_id != walk_context.\
target_object.global_id) or \
(context.target_position != walk_context.target_position):
walk_context.dont_interact_on_arrival = true
return context
# Determines whether the object in question can be acted upon.
#
# #### Parameters
#
# - obj: the ESCObject to examine
#
# *Returns* True iff 'obj' can be acted upon.
func _is_object_actionable(obj: ESCObject) -> bool:
var object_is_actionable: bool = true
if not obj:
return false
if not obj.active:
escoria.logger.trace(
self,
"Item %s is not active." % obj.global_id
)
object_is_actionable = false
elif not obj.interactive:
escoria.logger.trace(
self,
"Item %s is not interactive." % obj.global_id
)
object_is_actionable = false
return object_is_actionable

View File

@@ -1,48 +0,0 @@
# A registry of ESC command objects
extends Reference
class_name ESCCommandRegistry
# The registry of registered commands
var registry: Dictionary = {}
# Load a command by its name
#
# #### Parameters
#
# - command_name: Name of command to load
# **Returns** The command object
func load_command(command_name: String) -> ESCBaseCommand:
for command_directory in ESCProjectSettingsManager.get_setting(
ESCProjectSettingsManager.COMMAND_DIRECTORIES
):
if ResourceLoader.exists("%s/%s.gd" % [command_directory, command_name]):
registry[command_name] = load(
"%s/%s.gd" % [
command_directory.trim_suffix("/"),
command_name
]
).new()
return registry[command_name]
escoria.logger.error(
self,
"No command class could be found for command %s."
% command_name
)
return null
# Retrieve a command from the command registry
#
# #### Parameters
#
# - command_name: The name of the command
# **Returns** The command object
func get_command(command_name: String) -> ESCBaseCommand:
if self.registry.has(command_name):
return self.registry[command_name]
else:
return self.load_command(command_name)

View File

@@ -1,291 +0,0 @@
# Compiler of the ESC language
extends Resource
class_name ESCCompiler
# A RegEx for comment lines
const COMMENT_REGEX = '^\\s*#.*$'
# A RegEx for empty lines
const EMPTY_REGEX = '^\\s*$'
# A RegEx for finding out the indent of a line
const INDENT_REGEX_GROUP = "indent"
const INDENT_REGEX = '^(?<%s>\\s*)' % INDENT_REGEX_GROUP
# This must match ESCProjectSettingsManager.COMMAND_DIRECTORIES.
# We do not reference it directly to avoid circular dependencies.
const COMMAND_DIRECTORIES = "escoria/main/command_directories"
# RegEx objects for use by the ESC compiler
var _comment_regex
var _empty_regex
var _indent_regex
var _event_regex
var _command_regex
var _dialog_regex
var _dialog_end_regex
var _dialog_option_regex
var _group_regex
# Regex to match globals in debug strings
var _globals_regex: RegEx
# The currently compiled event
var _current_event = null
# A stack of groups currently compiling
var _groups_stack = []
# A stack of dialogs currently compiling
var _dialogs_stack = []
# A stack of dialog options currently compiling
var _dialogs_option_stack = []
# A pointer to the current container (group, dialog option)
# that should get the current command
var _command_container = []
# The currently identified indent
var _current_indent = 0
func _init():
# Assure command list preference
# (we use ProjectSettings instead of ESCProjectSettingsManager
# here because this is called from escoria._init())
if not ProjectSettings.has_setting(COMMAND_DIRECTORIES):
ProjectSettings.set_setting(COMMAND_DIRECTORIES, [
"res://addons/escoria-core/game/core-scripts/esc/commands"
])
var property_info = {
"name": COMMAND_DIRECTORIES,
"type": TYPE_STRING_ARRAY
}
ProjectSettings.add_property_info(property_info)
# Compile all regex objects just once
_comment_regex = RegEx.new()
_comment_regex.compile(COMMENT_REGEX)
_empty_regex = RegEx.new()
_empty_regex.compile(EMPTY_REGEX)
_indent_regex = RegEx.new()
_indent_regex.compile(INDENT_REGEX)
_event_regex = RegEx.new()
_event_regex.compile(ESCEvent.REGEX)
_command_regex = RegEx.new()
_command_regex.compile(ESCCommand.REGEX)
_dialog_regex = RegEx.new()
_dialog_regex.compile(ESCDialog.REGEX)
_dialog_end_regex = RegEx.new()
_dialog_end_regex.compile(ESCDialog.END_REGEX)
_dialog_option_regex = RegEx.new()
_dialog_option_regex.compile(ESCDialogOption.REGEX)
_group_regex = RegEx.new()
_group_regex.compile(ESCGroup.REGEX)
# Use look-ahead/behind to capture the term in braces
_globals_regex = RegEx.new()
_globals_regex.compile("(?<=\\{)(.*)(?=\\})")
# Load an ESC file from a file resource
func load_esc_file(path: String) -> ESCScript:
escoria.logger.debug(self, "Parsing file %s." % path)
if File.new().file_exists(path):
var file = File.new()
file.open(path, File.READ)
var lines = []
while not file.eof_reached():
lines.append(file.get_line())
return self.compile(lines, path)
else:
escoria.logger.error(
self,
"Can not find ESC file: file %s could not be found." % path
)
return null
# Compiles an array of ESC script strings to an ESCScript
func compile(lines: Array, path: String = "") -> ESCScript:
var script = ESCScript.new()
if lines.size() > 0:
var events = self._compile(lines, path)
for event in events:
event.source = path
script.events[event.name] = event
return script
# Compile an array of ESC script lines into an array of ESC objects
func _compile(lines: Array, path: String = "") -> Array:
var returned = []
while lines.size() > 0:
var line = lines.pop_front().strip_edges(false, true)
escoria.logger.trace(
self,
"Parsing line %s." % line
)
if _comment_regex.search(line) or _empty_regex.search(line):
# Ignore comments and empty lines
escoria.logger.trace(
self,
"Line is empty or a comment. Skipping."
)
continue
var indent = \
ESCUtils.get_re_group(
_indent_regex.search(line),
INDENT_REGEX_GROUP
).length()
if _event_regex.search(line):
var event = ESCEvent.new(line)
escoria.logger.trace(
self,
"Line is the event %s." % event.name
)
var event_lines = []
while lines.size() > 0:
var next_line = lines.pop_front()
if not _event_regex.search(next_line):
event_lines.append(next_line)
else:
lines.push_front(next_line)
break
if event_lines.size() > 0:
escoria.logger.trace(
self,
"Compiling the next %d lines into the event." % \
event_lines.size()
)
event.statements = self._compile(event_lines, path)
returned.append(event)
elif _group_regex.search(line):
var group = ESCGroup.new(line)
escoria.logger.trace(
self,
"Line is a group."
)
var group_lines = []
while lines.size() > 0:
var next_line = lines.pop_front()
if _comment_regex.search(next_line) or \
_empty_regex.search(next_line):
continue
var next_line_indent = \
ESCUtils.get_re_group(
_indent_regex.search(next_line),
INDENT_REGEX_GROUP
).length()
if next_line_indent > indent:
group_lines.append(next_line)
else:
lines.push_front(next_line)
break
if group_lines.size() > 0:
escoria.logger.trace(
self,
"Compiling the next %d lines into the group." % \
group_lines.size()
)
group.statements = self._compile(group_lines, path)
returned.append(group)
elif _dialog_regex.search(line):
var dialog = ESCDialog.new()
dialog.load_string(line)
escoria.logger.trace(
self,
"Line is a dialog."
)
var dialog_lines = []
while lines.size() > 0:
var next_line = lines.pop_front()
if _comment_regex.search(next_line) or \
_empty_regex.search(next_line):
continue
var end_line = _dialog_end_regex.search(next_line)
if end_line and \
ESCUtils.get_re_group(
end_line,
INDENT_REGEX_GROUP
).length() == indent:
break
else:
dialog_lines.append(next_line)
if dialog_lines.size() > 0:
escoria.logger.trace(
self,
"Compiling the next %d lines into the dialog." % \
dialog_lines.size()
)
dialog.options = self._compile(dialog_lines, path)
# Remove the end line from the stack
lines.pop_front()
returned.append(dialog)
elif _dialog_option_regex.search(line):
var dialog_option = ESCDialogOption.new()
dialog_option.load_string(line)
escoria.logger.trace(
self,
"Line is the dialog option %s." % \
dialog_option.option
)
var dialog_option_lines = []
while lines.size() > 0:
var next_line = lines.pop_front()
if _comment_regex.search(next_line) or \
_empty_regex.search(next_line):
continue
var next_line_indent = \
ESCUtils.get_re_group(
_indent_regex.search(next_line),
INDENT_REGEX_GROUP
).length()
if next_line_indent > indent:
dialog_option_lines.append(next_line)
else:
if _dialog_end_regex.search(next_line) or \
_dialog_option_regex.search(next_line):
lines.push_front(next_line)
break
# There MUST be AT LEAST ONE statement/line for a dialog
# option's block that's properly indented
escoria.logger.error(
self,
"Dialog option '%s' has at least one line in its block that is not indented sufficiently." \
% line
)
if dialog_option_lines.size() > 0:
escoria.logger.trace(
self,
"Compiling the next %d lines into the event."
% dialog_option_lines.size()
)
dialog_option.statements = self._compile(dialog_option_lines, path)
returned.append(dialog_option)
elif _command_regex.search(line):
var command = ESCCommand.new(line)
if command.command_exists():
returned.append(command)
else:
escoria.logger.error(
self,
"Command \"%s\" cannot be found under folder %s.\nPlease confirm setting \"%s\" is set to the folder where ESC commands are stored."
% [
command.name,
ProjectSettings.get_setting(COMMAND_DIRECTORIES),
ESCProjectSettingsManager.COMMAND_DIRECTORIES
]
)
else:
escoria.logger.error(
self,
"Invalid ESC line detected.\nLine couldn't be compiled: %s."
% line
)
return returned

View File

@@ -1,478 +0,0 @@
# A manager for running events
# There are different "channels" an event can run on.
# The usual events happen in the foreground channel _front, but
# additional event queues can be added as required.
# Additionally, events can be scheduled to be queued in the future
extends Node
class_name ESCEventManager
# Emitted when the event started execution
signal event_started(event_name)
# Emitted when an event is started in a channel of the background queue
signal background_event_started(channel_name, event_name)
# Emitted when the event did finish running
signal event_finished(return_code, event_name)
# Emitted when a background event was finished
signal background_event_finished(return_code, event_name, channel_name)
# Pre-defined ESC events
const EVENT_PRINT = "print"
const EVENT_EXIT_SCENE = "exit_scene"
const EVENT_INIT = "init"
const EVENT_LOAD = "load"
const EVENT_NEW_GAME = "newgame"
const EVENT_READY = "ready"
const EVENT_ROOM_SELECTOR = "room_selector"
const EVENT_SETUP = "setup"
const EVENT_TRANSITION_IN = "transition_in"
const EVENT_TRANSITION_OUT = "transition_out"
const EVENT_CANT_REACH = "cant_reach"
# Event channel names
const CHANNEL_FRONT = "_front"
# A list of currently scheduled events
var scheduled_events: Array = []
# A list of constantly running events in multiple background channels
var events_queue: Dictionary = {
CHANNEL_FRONT: []
}
# Currently running event in background channels
var _running_events: Dictionary = {}
# Whether an event can be played on a specific channel
var _channels_state: Dictionary = {}
# Whether we're currently waiting for an async event to complete, per channel
var _yielding: Dictionary = {}
# Whether we're currently changing the scene.
var _changing_scene: bool = false setget set_changing_scene
# ESC "change_scene" command.
var _change_scene: ChangeSceneCommand
# Constructor
func _init():
_change_scene = ChangeSceneCommand.new()
# Make sure to stop when pausing the game
func _ready():
self.pause_mode = Node.PAUSE_MODE_STOP
# Handle the events queue and scheduled events
#
# #### Parameters
# - delta: Time passed since the last process call
func _process(delta: float) -> void:
var channel_yielding: bool
for channel_name in events_queue.keys():
channel_yielding = _yielding.get(channel_name, false)
if events_queue[channel_name].size() == 0 or channel_yielding:
continue
if is_channel_free(channel_name):
_channels_state[channel_name] = false
_running_events[channel_name] = \
events_queue[channel_name].pop_front()
escoria.logger.debug(
self,
"Popping event '%s' from background queue %s " % [
_running_events[channel_name].name,
channel_name,
] +
"to source %s." % _running_events[channel_name].source \
if not _running_events[channel_name].source.empty()
else "(unknown)"
)
if not _running_events[channel_name].is_connected(
"finished", self, "_on_event_finished"
):
_running_events[channel_name].connect(
"finished",
self,
"_on_event_finished",
[channel_name],
CONNECT_ONESHOT
)
if not _running_events[channel_name].is_connected(
"interrupted", self, "_on_event_finished"
):
_running_events[channel_name].connect(
"interrupted",
self,
"_on_event_finished",
[channel_name],
CONNECT_ONESHOT
)
if channel_name == CHANNEL_FRONT:
emit_signal(
"event_started",
_running_events[channel_name].name
)
else:
emit_signal(
"background_event_started",
channel_name,
_running_events[channel_name].name
)
var event_flags = _running_events[channel_name].flags
if event_flags & ESCEvent.FLAG_NO_TT:
escoria.main.current_scene.game.tooltip_node.hide()
if event_flags & ESCEvent.FLAG_NO_UI:
escoria.main.current_scene.game.hide_ui()
if event_flags & ESCEvent.FLAG_NO_SAVE:
escoria.save_manager.save_enabled = false
var rc = _running_events[channel_name].run()
if rc is GDScriptFunctionState:
_yielding[channel_name] = true
rc = yield(rc, "completed")
_yielding[channel_name] = false
for event in self.scheduled_events:
(event as ESCScheduledEvent).timeout -= delta
if (event as ESCScheduledEvent).timeout <= 0:
self.scheduled_events.erase(event)
self.events_queue[CHANNEL_FRONT].append(event.event)
# Queue a new event based on input from an ESC command, most likely "queue_event"
#
# #### Parameters
# - script_object: Compiled script object, i.e. the one with the event to queue
# - event: Name of the event to queue
# - channel: Channel to run the event on (default: `_front`)
# - block: Whether to wait for the queue to finish. This is only possible, if
# the queued event is not to be run on the same event as this command
# (default: `false`)
#
# **Returns** indicator of success/status
func queue_event_from_esc(script_object: ESCScript, event: String,
channel: String, block: bool) -> int:
if _changing_scene:
return ESCExecution.RC_WONT_QUEUE
if channel == CHANNEL_FRONT:
queue_event(script_object.events[event])
else:
queue_background_event(
channel,
script_object.events[event]
)
if block:
if channel == CHANNEL_FRONT:
var rc = yield(self, "event_finished")
while rc[1] != event:
rc = yield(self, "event_finished")
return rc[0]
else:
var rc = yield(self, "background_event_finished")
while rc[1] != event and rc[2] != channel:
rc = yield(self, "background_event_finished")
return rc[0]
return ESCExecution.RC_OK
# Queue a new event to run in the foreground
#
# #### Parameters
# - event: Event to run
func queue_event(event: ESCEvent, force: bool = false) -> void:
if _changing_scene and not force:
escoria.logger.info(
self,
"Changing scenes. Won't queue event '%s'." % event.name
)
return
# Don't queue the same event more than once in a row.
var last_event = _get_last_event_queued(CHANNEL_FRONT)
# Check the queue first to see if appending the event will result in
# consecutive occurrences of the event. If not, be sure to check if the same
# event is currently running.
if last_event != null and last_event.name == event.name:
var message = "Event '%s' is already the most-recently queued event in channel '%s'." + \
" Won't be queued again."
escoria.logger.debug(self, message % [event.name, CHANNEL_FRONT])
return
elif _is_event_running(event, CHANNEL_FRONT):
# Don't queue the same event if it's already running.
escoria.logger.debug(
self,
"Event %s already running in channel '%s'. Won't be queued."
% [event.name, CHANNEL_FRONT]
)
return
escoria.logger.debug(
self,
"Queueing event %s in channel %s." % [event.name, CHANNEL_FRONT]
)
self.events_queue[CHANNEL_FRONT].append(event)
# Schedule an event to run after a timeout
#
# #### Parameters
# - event: Event to run
# - timeout: Number of seconds to wait before adding the event to the
# front queue
func schedule_event(event: ESCEvent, timeout: float) -> void:
scheduled_events.append(ESCScheduledEvent.new(event, timeout))
# Queue the run of an event in a background channel
#
# #### Parameters
# - channel_name: Name of the channel to use
# - event: Event to run
func queue_background_event(channel_name: String, event: ESCEvent) -> void:
if not channel_name in events_queue:
events_queue[channel_name] = []
# Don't queue the same event more than once in a row.
var last_event = _get_last_event_queued(channel_name)
# Check the queue first to see if appending the event will result in
# consecutive occurrences of the event. If not, be sure to check if the same
# event is currently running.
if last_event != null and last_event.name == event.name:
var message = "Event '%s' is already the most-recently queued event in channel '%s'." + \
" Won't be queued again."
escoria.logger.debug(self, message % [event.name, channel_name])
return
elif _is_event_running(event, CHANNEL_FRONT):
# Don't queue the same event if it's already running.
escoria.logger.debug(
self,
"Event %s already running in channel '%s'. Won't be queued."
% [event.name, channel_name]
)
return
events_queue[channel_name].append(event)
# Interrupt the events currently running and any that are pending.
#
# #### Parameters
# - exceptions: an optional list of events which should be left running or queued
func interrupt(exceptions: PoolStringArray = []) -> void:
if escoria.main.current_scene != null \
and escoria.main.current_scene.player != null \
and escoria.main.current_scene.player.is_moving():
escoria.main.current_scene.player.stop_walking_now()
for channel_name in _running_events.keys():
if _running_events[channel_name] != null and not _running_events[channel_name].name in exceptions:
escoria.logger.debug(
self,
"Interrupting running event %s in channel %s..."
% [_running_events[channel_name].name, channel_name])
_running_events[channel_name].interrupt()
_channels_state[channel_name] = true
var events_to_clear: Array = []
for channel_name in events_queue.keys():
if events_queue[channel_name] != null:
var found_exception: bool = false
for event in events_queue[channel_name]:
if event.name in exceptions:
found_exception = true
continue
escoria.logger.debug(
self,
"Interrupting queued event %s in channel %s..."
% [event.name, channel_name])
event.interrupt()
events_to_clear.append(event)
# If we found an exception, we can't just clear out the entire
# channel's queue and so we remove everything but the exceptions in
# the channel. Otherwise, we're safe to just clear it out.
if found_exception:
for event in events_to_clear:
if events_queue[channel_name].has(event):
events_queue[channel_name].erase(event)
else:
events_queue[channel_name].clear()
# Clears the event queues.
func clear_event_queue():
for channel_name in events_queue.keys():
events_queue[channel_name].clear()
# Check whether a channel is free to run more events
#
# #### Parameters
# - name: Name of the channel to test
# **Returns** Whether the channel can currently accept a new event
func is_channel_free(name: String) -> bool:
return _channels_state[name] if name in _channels_state else true
# Get the currently running event in a channel
#
# #### Parameters
# - name: Name of the channel
# **Returns** The currently running event or null
func get_running_event(name: String) -> ESCEvent:
return _running_events[name] if name in _running_events else null
# Setter for _changing_scene.
#
# #### Parameterse
# - value: boolean value to set _changing_scene to
func set_changing_scene(p_is_changing_scene: bool) -> void:
escoria.logger.trace(
self,
"Setting _changing_scene to %s." % p_is_changing_scene
)
_changing_scene = p_is_changing_scene
# If we're changing scenes, interrupt any (other) running events and purge
# all event queues.
if _changing_scene:
interrupt([EVENT_INIT, EVENT_EXIT_SCENE, _change_scene.get_command_name()])
# The event finished running
#
# #### Parameters
# - finished_event: statement object representing the event that finished
# - finished_statement: statement object representing the "deepest" statement (most likely a command)
# that just completed; this is useful for interrupted or failed statements especially
# - return_code: Return code of the finished event
# - channel_name: Name of the channel that the event came from
func _on_event_finished(finished_event: ESCStatement, finished_statement: ESCStatement, return_code: int, channel_name: String) -> void:
var event = _running_events[channel_name]
if not event:
escoria.logger.warn(
self,
"Event '%s' finished without being in _running_events[%s]."
% [finished_event.name, channel_name]
)
return
escoria.logger.debug(
self,
"Event '%s' ended with return code %d." % [event.name, return_code]
)
var event_flags = event.flags
if event_flags & ESCEvent.FLAG_NO_TT:
escoria.main.current_scene.game.tooltip_node.show()
if event_flags & ESCEvent.FLAG_NO_UI:
escoria.main.current_scene.game.show_ui()
if event_flags & ESCEvent.FLAG_NO_SAVE:
escoria.save_manager.save_enabled = true
# If the return code was RC_CANCEL due to an event finishing with "stop" command for example
# we convert it to RC_OK so that other processed waiting for RC_OK can carry on.
#
# We also make sure that a failed command/event doesn't leave the game in a state where it
# isn't accepting inputs, e.g. if a previous command in the event was `accept_input NONE`.
if return_code == ESCExecution.RC_CANCEL:
return_code = ESCExecution.RC_OK
elif return_code == ESCExecution.RC_ERROR:
_generate_statement_error_warning(finished_statement, event.name)
escoria.inputs_manager.input_mode = escoria.inputs_manager.INPUT_ALL
_running_events[channel_name] = null
_channels_state[channel_name] = true
if channel_name == CHANNEL_FRONT:
emit_signal(
"event_finished",
return_code,
event.name
)
else:
emit_signal(
"background_event_finished",
return_code,
event.name,
channel_name
)
# Gets the event at the tail of the specified channel's event queue, if one
# exists.
#
# #### Parameters
# - channel_name: The name of the channel to check.
#
# *Returns* the last ESCEvent queued for the given channel, or null if the
# channel's queue is empty.
func _get_last_event_queued(channel_name: String) -> ESCEvent:
if self.events_queue[channel_name].size() > 0:
return self.events_queue[channel_name].back()
return null
# Checks to see if the specified event is already running in the given channel.
#
# #### Parameters
# - event: The event to check to see if it's already running.
# - channel_name: The name of the channel to check.
#
# *Returns* true iff event is currently running in the specified channel.
func _is_event_running(event: ESCEvent, channel_name: String) -> bool:
var running_event: ESCEvent = get_running_event(channel_name)
return running_event != null and running_event.name == event.name
# Generates a logger warning concerning an errored-out statement.
func _generate_statement_error_warning(statement: ESCStatement, event_name: String) -> void:
var warning_string: String = "Statement '%s' returned an error in event '%s'" \
% [statement.name, event_name]
if statement is ESCCommand and statement.parameters.size() > 0:
var statement_params: String = "[" + PoolStringArray(statement.parameters).join(", ") + "]"
warning_string += " with parameters: %s" % statement_params
warning_string += ". Resetting input mode to 'ALL'."
escoria.logger.warn(
self,
warning_string
)

View File

@@ -1,149 +0,0 @@
# A resource that manages the ESC global states
# The ESC global state is basically simply a dictionary of keys with
# values. Values can be bool, integer or strings
extends Resource
class_name ESCGlobalsManager
# Emitted when a global is changed
signal global_changed(global, old_value, new_value)
# The globals registry
export(Dictionary) var _globals = {}
# Registry of globals that are to be reserved for internal use only.
var _reserved_globals: Dictionary = {}
# Use look-ahead/behind to capture the term in braces
var globals_regex: RegEx = RegEx.new()
# Constructor
func _init():
globals_regex.compile("(?<=\\{)(.*)(?=\\})")
# Check if a global was registered
#
# #### Parameters
#
# - key: The global key to check
# **Returns** Whether the global was registered
func has(key: String) -> bool:
return _globals.has(key)
# Registers a global as being reserved and initializes it.
#
# #### Parameters
#
# - key: The key of the global to register
# - value: The initial value (optional)
func register_reserved_global(key: String, value = null) -> void:
if key in _reserved_globals:
escoria.logger.error(
self,
"Can not override reserved global: Global key %s is already " +
"registered as reserved."
% key
)
var old_value = _globals[key] if _globals.has(key) else ""
_reserved_globals[key] = value
_globals[key] = value
if value != null:
emit_signal("global_changed", key, old_value, _globals[key])
# Get the current value of a global
#
# #### Parameters
#
# - key: The key of the global to return the value
# **Returns** The value of the global
func get_global(key: String):
if _globals.has(key):
return _globals[key]
return null
# Filter the globals and return all matching keys and their values as
# a dictionary
# Check out [the Godot docs](https://docs.godotengine.org/en/stable/classes/class_string.html#class-string-method-match)
# for the pattern format
#
# #### Parameters
#
# - pattern: The pattern that the keys have to match
# **Returns** A dictionary of matching keys and their values
func filter(pattern: String) -> Dictionary:
var ret = {}
for global_key in _globals.keys():
if global_key.match(pattern):
ret[global_key] = _globals[global_key]
return ret
# Set the value of a global
#
# #### Parameters
#
# - key: The key of the global to modify
# - value: The new value
func set_global(key: String, value, ignore_reserved: bool = false) -> void:
if key in _reserved_globals and not ignore_reserved:
escoria.logger.error(
self,
"Global key %s is reserved and can not be overridden." % key
)
emit_signal(
"global_changed",
key,
_globals[key] if _globals.has(key) else null,
value
)
_globals[key] = value
# Set all globals that match the pattern to the value
# Check out [the Godot docs](https://docs.godotengine.org/en/stable/classes/class_string.html#class-string-method-match)
# for the pattern format
#
# #### Parameters
#
# - pattern: The wildcard pattern to match
# - value: The new value
func set_global_wildcard(pattern: String, value) -> void:
for global_key in _globals.keys:
if global_key.match(pattern):
self.set_global(global_key, value)
# Look to see if any globals (names in braces) should be interpreted
#
# #### Parameters
#
# * string: Text in which to replace globals
#
# *Returns* the provided string with globals variables replaced with their values
func replace_globals(string: String) -> String:
for result in globals_regex.search_all(string):
var globresult = escoria.globals_manager.get_global(
str(result.get_string())
)
string = string.replace(
"{" + result.get_string() + "}", str(globresult)
)
return string
# Save the state of globals in the savegame.
#
# #### Parameters
# - p_savegame: ESCSaveGame resource that holds all data of the save
func save_game(p_savegame: ESCSaveGame) -> void:
p_savegame.globals = {}
for g in _globals:
p_savegame.globals[g] = _globals[g]

View File

@@ -1,49 +0,0 @@
# A manager for inventory objects
extends Resource
class_name ESCInventoryManager
# Check if the player has an inventory item
#
# #### Parameters
#
# - item: Inventory item id
# **Returns** Whether the player has the inventory
func inventory_has(item: String) -> bool:
return escoria.globals_manager.has("i/%s" % item)
# Get all inventory items
# **Returns** The items in the inventory
func items_in_inventory() -> Array:
var items = []
var filtered = escoria.globals_manager.filter("i/*")
for glob in filtered.keys():
if filtered[glob]:
items.append(glob.rsplit("i/", false)[0])
return items
# Remove an item from the inventory
#
# #### Parameters
#
# - item: Inventory item id
func remove_item(item: String):
if not inventory_has(item):
escoria.logger.error(
self,
"Error removing inventory item: " +
"Trying to remove non-existent item %s." % item
)
else:
escoria.globals_manager.set_global("i/%s" % item, false)
# Add an item to the inventory
#
# #### Parameters
#
# - item: Inventory item id
func add_item(item: String):
escoria.globals_manager.set_global("i/%s" % item, true)

View File

@@ -1,448 +0,0 @@
extends Resource
class_name ESCRoomManager
# Reserved globals which can not be overridden; prefixed with "GLOBAL_"
#
# Contains the global_id of previous room
const GLOBAL_LAST_SCENE = "ESC_LAST_SCENE"
# If true, ESC_LAST_SCENE is not considered for automatic transitions
const GLOBAL_FORCE_LAST_SCENE_NULL = "FORCE_LAST_SCENE_NULL"
const GLOBAL_ANIMATION_RESOURCES = "ANIMATION_RESOURCES"
# Contains the global_id of the current room
const GLOBAL_CURRENT_SCENE = "ESC_CURRENT_SCENE"
# Dict of the reserved globals to register and their initial values.
const RESERVED_GLOBALS = {
GLOBAL_LAST_SCENE: "",
GLOBAL_FORCE_LAST_SCENE_NULL: false,
GLOBAL_ANIMATION_RESOURCES: {},
GLOBAL_CURRENT_SCENE: ""
}
# ESC commands kept around for references to their command names.
var _transition: TransitionCommand
var _wait: WaitCommand
var _accept_input: AcceptInputCommand
func _init() -> void:
_transition = TransitionCommand.new()
_wait = WaitCommand.new()
_accept_input = AcceptInputCommand.new()
# Registers all reserved global flags for use.
func register_reserved_globals() -> void:
for key in RESERVED_GLOBALS:
escoria.globals_manager.register_reserved_global( \
key,
RESERVED_GLOBALS[key])
# Performs the actions needed in order to change the current scene to the one
# specified by room_path.
#
# #### Parameters
#
# - room_path: Node path to the room that is to become the new current room.
# - enable_automatic_transitions: Whether to play the transition between rooms
# automatically or to leave the responsibility to the developer.
func change_scene(room_path: String, enable_automatic_transitions: bool) -> void:
if escoria.main and escoria.main.current_scene and escoria.main.current_scene.filename == room_path:
escoria.logger.info(
self,
"Attempting to change scene to same scene as the current scene. Aborting."
)
return
# We're changing scenes, so users shouldn't be able to do stuff during.
escoria.inputs_manager.input_mode = escoria.inputs_manager.INPUT_NONE
# Clear the event queue to remove other events (there could be duplicate
# events in there so we avoid running these multiple times). Also sets a
# flag indicating a changing scene and interrupts any other currently-running
# events.
escoria.event_manager.set_changing_scene(true)
# If FORCE_LAST_SCENE_NULL is true, force ESC_LAST_SCENE to empty
if escoria.globals_manager.get_global( \
GLOBAL_FORCE_LAST_SCENE_NULL):
escoria.globals_manager.set_global(
GLOBAL_LAST_SCENE,
null,
true
)
elif escoria.main.current_scene:
# If FORCE_LAST_SCENE_NULL is false, set ESC_LAST_SCENE = current roomid
escoria.globals_manager.set_global(
GLOBAL_LAST_SCENE,
escoria.main.current_scene.global_id,
true
)
if escoria.dialog_player:
escoria.dialog_player.interrupt()
escoria.inputs_manager.hover_stack.clear()
# Check if game scene was loaded
if not escoria.game_scene:
escoria.logger.error(
self,
"Failed loading game scene %s." % \
ESCProjectSettingsManager.get_setting(
ESCProjectSettingsManager.GAME_SCENE
)
)
if escoria.main.current_scene \
and escoria.game_scene.get_parent() == escoria.main.current_scene:
escoria.main.current_scene.remove_child(escoria.game_scene)
# Load room scene
var res_room = escoria.resource_cache.get_resource(room_path)
var room_scene = res_room.instance()
if room_scene:
if enable_automatic_transitions \
and escoria.event_manager.get_running_event(
escoria.event_manager.CHANNEL_FRONT
) != null \
and escoria.event_manager.get_running_event(
escoria.event_manager.CHANNEL_FRONT
).name == escoria.event_manager.EVENT_ROOM_SELECTOR:
room_scene.enabled_automatic_transitions = true
else:
room_scene.enabled_automatic_transitions = enable_automatic_transitions
# If the game scene is already in the tree but not a child of the room
# we remove it
if escoria.game_scene.is_inside_tree() \
and escoria.game_scene.get_parent() != room_scene:
var game_parent = escoria.game_scene.get_parent()
game_parent.remove_child(escoria.game_scene)
room_scene.add_child(escoria.game_scene)
room_scene.move_child(escoria.game_scene, 0)
room_scene.game = escoria.game_scene
escoria.main.set_scene(room_scene)
# We know the scene has been loaded. Make its global ID available for
# use by ESC script.
escoria.globals_manager.set_global(
escoria.room_manager.GLOBAL_CURRENT_SCENE,
room_scene.global_id,
true
)
# Clear queued resources
escoria.resource_cache.clear()
escoria.inputs_manager.hotspot_focused = ""
else:
escoria.logger.error(
self,
"Failed loading room scene %s." % room_path
)
# Sanitize camera limits, add player node and set the global id to the
# name of this node if it's not set manually
#
# #### Parameters
#
# - room: The ESCRoom to be initialized for use.
func init_room(room: ESCRoom) -> void:
if not is_instance_valid(room) || room == null:
escoria.logger.error(
self,
"No valid room was specified for initialization."
)
if room.camera_limits.empty():
room.camera_limits.push_back(Rect2())
if room.camera_limits.size() == 1 and room.camera_limits[0].has_no_area():
for child in room.get_children():
if child is ESCBackground:
room.camera_limits[0] = \
Rect2(0, 0, child.rect_size.x, child.rect_size.y)
if Engine.is_editor_hint():
return
if room.has_node("game"):
room.game = room.get_node("game")
if room.game == null:
room.game = escoria.game_scene
room.add_child(room.game)
room.move_child(room.game, 0)
if room.is_run_directly:
if escoria.main.current_scene == null:
escoria.main.set_scene(room)
# If the room node isn't at (0,0), the walk_stop function will offset the
# player by the same number of pixels when they're at the terrain edge and
# move them when it shouldn't.
if room.position != Vector2(0,0):
escoria.logger.error(
self,
"The room node's coordinates must be (0,0) instead of %s."
% room.position
)
_perform_script_events(room)
# Performs the ESC script events "setup" and "ready", in this order, if they are
# present. Also manages automatic transitions.
#
# #### Parameters
#
# - room: The ESCRoom to be initialized for use.
func _perform_script_events(room: ESCRoom) -> void:
# Used to track whether any yields have been executed before the call to
# set_scene_finish.
var yielded: bool = false
if room.enabled_automatic_transitions \
and not room.is_run_directly:
var script_transition_out = escoria.esc_compiler.compile([
"%s%s" % [ESCEvent.PREFIX, escoria.event_manager.EVENT_TRANSITION_OUT],
"%s %s out" %
[
_transition.get_command_name(),
ESCProjectSettingsManager.get_setting(
ESCProjectSettingsManager.DEFAULT_TRANSITION
)
],
"%s 0.1" % _wait.get_command_name()
],
get_class()
)
escoria.event_manager.queue_event(
script_transition_out.events[escoria.event_manager.EVENT_TRANSITION_OUT],
true
)
# Unpause the game if it was
escoria.set_game_paused(false)
# Wait for transition_out event to be done
var rc = yield(escoria.event_manager, "event_finished")
while rc[1] != escoria.event_manager.EVENT_TRANSITION_OUT:
rc = yield(escoria.event_manager, "event_finished")
if rc[0] != ESCExecution.RC_OK:
return rc[0]
yielded = true
# With the room transitioned out, finish any room prep and run :setup if
# it exists.
if room.player_scene:
room.player = room.player_scene.instance()
room.add_child(room.player)
escoria.object_manager.register_object(
ESCObject.new(
room.player.global_id,
room.player
),
room,
true
)
if escoria.globals_manager.has(
escoria.room_manager.GLOBAL_ANIMATION_RESOURCES
):
var animations = escoria.globals_manager.get_global(
escoria.room_manager.GLOBAL_ANIMATION_RESOURCES
)
if room.player.global_id in animations and \
ResourceLoader.exists(animations[room.player.global_id]):
room.player.animations = ResourceLoader.load(
animations[room.player.global_id]
)
room.player.update_idle()
#escoria.object_manager.get_object(escoria.object_manager.CAMERA).node.set_target(room.player)
if room.global_id.empty():
room.global_id = room.name
# Manage player location at room start
if room.player != null \
and escoria.object_manager.get_start_location() != null:
room.player.teleport(escoria.object_manager.get_start_location().node)
# We make sure 'room' is set as the new current_scene, but without making
# it visible/the current scene tree.
if not yielded:
escoria.main.finish_current_scene_init(room)
# Add new camera to scene being prepared.
var new_player_camera: ESCCamera = escoria.resource_cache.get_resource(
escoria.CAMERA_SCENE_PATH
).instance()
new_player_camera.register()
room.player_camera = new_player_camera
# We must first set the camera limits, and then worry about subsequent
# player setup since it relies on this.
escoria.main.set_camera_limits(0, room)
# Add the camera in to the scene tree but don't make it active just yet.
new_player_camera.current = false
room.add_child(new_player_camera)
room.move_child(new_player_camera, 0)
var setup_event_added: bool = false
# Run the setup event, if there is one.
setup_event_added = _run_script_event(escoria.event_manager.EVENT_SETUP, room)
if setup_event_added:
# Wait for setup event to be done
var rc = yield(escoria.event_manager, "event_finished")
while rc[1] != escoria.event_manager.EVENT_SETUP:
rc = yield(escoria.event_manager, "event_finished")
if rc[0] != ESCExecution.RC_OK:
return rc[0]
yielded = true
# As far as the event manager is concerned, we're done changing scenes and
# so should resume allowing events to be queued and processed.
escoria.event_manager.set_changing_scene(false)
if room.player:
escoria.object_manager.get_object(escoria.object_manager.CAMERA).node.set_target(room.player)
# Conclude the call to set_scene (thankyouverymuch, coroutines), including
# making the new room visible.
escoria.main.set_scene_finish()
# Hide main and pause menus
escoria.game_scene.hide_main_menu()
escoria.game_scene.unpause_game()
# Maybe this is ok to put in set_scene_finish() above? But it might be a bit
# confusing to not see the matching camera.current updates.
new_player_camera.make_current()
# We know the scene has been loaded. Make its global ID available for
# use by ESC script.
escoria.globals_manager.set_global(
escoria.room_manager.GLOBAL_CURRENT_SCENE,
room.global_id,
true
)
# Clear queued resources
escoria.resource_cache.clear()
escoria.inputs_manager.hotspot_focused = ""
var command_strings: PoolStringArray = []
command_strings.append("%s%s" % [ESCEvent.PREFIX, escoria.event_manager.EVENT_TRANSITION_IN])
if room.enabled_automatic_transitions \
or (
not room.enabled_automatic_transitions \
and escoria.globals_manager.get_global( \
escoria.room_manager.GLOBAL_FORCE_LAST_SCENE_NULL)
):
command_strings.append("%s %s in" %
[
_transition.get_command_name(),
ESCProjectSettingsManager.get_setting(
ESCProjectSettingsManager.DEFAULT_TRANSITION
)
]
)
command_strings.append("%s 0.1" % _wait.get_command_name())
command_strings.append("%s ALL" % _accept_input.get_command_name())
var script_transition_in = escoria.esc_compiler.compile(command_strings, get_class())
escoria.event_manager.queue_event(
script_transition_in.events[escoria.event_manager.EVENT_TRANSITION_IN]
)
var ready_event_added: bool = false
# Run the ready event, if there is one.
ready_event_added = _run_script_event(escoria.event_manager.EVENT_READY, room)
if ready_event_added:
# Wait for ready event to be done
var rc = yield(escoria.event_manager, "event_finished")
while rc[1] != escoria.event_manager.EVENT_READY:
rc = yield(escoria.event_manager, "event_finished")
if rc[0] != ESCExecution.RC_OK:
return rc[0]
# Now that :ready is finished, if FORCE_LAST_SCENE_NULL was true, reset it
# to false
if escoria.globals_manager.get_global( \
escoria.room_manager.GLOBAL_FORCE_LAST_SCENE_NULL):
escoria.globals_manager.set_global(
escoria.room_manager.GLOBAL_FORCE_LAST_SCENE_NULL,
false,
true
)
escoria.globals_manager.set_global(
escoria.room_manager.GLOBAL_LAST_SCENE,
escoria.main.current_scene.global_id \
if escoria.main.current_scene != null else "",
true
)
# Make the room's global ID available for use in ESC script.
escoria.globals_manager.set_global(
escoria.room_manager.GLOBAL_CURRENT_SCENE,
escoria.main.current_scene.global_id \
if escoria.main.current_scene != null else "",
true
)
# Runs the script event from the script attached, if any.
#
# #### Parameters
#
# - event_name: the name of the event to run
# - room: The ESCRoom to be initialized for use.
#
# *Returns* true if the event was correctly added. Will be false if the event
# does not exist in the script.
func _run_script_event(event_name: String, room: ESCRoom):
if not room.esc_script:
return false
if room.compiled_script == null:
room.compiled_script = \
escoria.esc_compiler.load_esc_file(room.esc_script)
if room.compiled_script.events.has(event_name):
escoria.logger.debug(
self,
"Queuing room script event %s " % event_name +
"composed of %s statements."
% room.compiled_script.events[event_name].statements.size()
)
escoria.event_manager.queue_event(room.compiled_script.events[event_name], true)
return true
else:
return false

View File

@@ -1,56 +0,0 @@
# A base class for every ESC command.
# Extending classes have to override the configure and run function
extends Resource
class_name ESCBaseCommand
# Regex for creating command name based on the script's filename, including
# named groups
const PATH_REGEX_GROUP = "path"
const FILE_REGEX_GROUP = "file"
const EXTENSION_REGEX_GROUP = "extension"
const COMMAND_NAME_REGEX = "(?<%s>.+)\/(?<%s>[^.]+)(?<%s>\\.[^.]*$|$)" % \
[PATH_REGEX_GROUP, FILE_REGEX_GROUP, EXTENSION_REGEX_GROUP]
# Regex matcher for command names
var command_name_regex: RegEx = RegEx.new()
func _init() -> void:
command_name_regex.compile(COMMAND_NAME_REGEX)
# Return the descriptor of the arguments of this command
func configure() -> ESCCommandArgumentDescriptor:
escoria.logger.error(
self,
"Command %s did not override configure. Please implement a configure() function." % get_command_name()
)
return ESCCommandArgumentDescriptor.new()
# Validate whether the given arguments match the command descriptor
func validate(arguments: Array) -> bool:
return self.configure().validate(get_command_name(), arguments)
# Run the command
func run(command_params: Array) -> int:
escoria.logger.error(
self,
"Command %s did not override run. Please implement a run() function." % get_command_name()
)
return 0
# Return the name of the command based on the script's filename
func get_command_name() -> String:
return command_name_regex.search(get_script().get_path()).get_string(FILE_REGEX_GROUP)
# Function called when the command is interrupted.
func interrupt():
escoria.logger.debug(
self,
"Command %s did not override interrupt. Please implement an interrupt() function." % get_command_name()
)

View File

@@ -1,29 +0,0 @@
extends ESCBaseCommand
class_name ESCCameraBaseCommand
# Generaters a log entry when attempting to move the camera to an invalid position.
#
# #### Parameters
#
# - pos: The offending position.
# - camera: The camera object that `pos` was checked against.
func generate_viewport_warning(pos: Vector2, camera: ESCCamera) -> void:
var camera_limit: Rect2 = camera.get_camera_limit_rect()
var message: String = \
"""
[%s]: Invalid camera position. Camera cannot be moved to %s as this is outside the viewport with current camera limit %s.
Current valid ranges for positions are: x = %s inclusive; y = %s inclusive.
"""
escoria.logger.warn(
self,
message
% [
get_command_name(),
pos.floor(),
camera_limit,
camera.get_current_valid_viewport_values_x(),
camera.get_current_valid_viewport_values_y()
]
)

View File

@@ -1,159 +0,0 @@
# An ESC command
extends ESCStatement
class_name ESCCommand
# Regex matching command lines
const REGEX = \
'^(\\s*)(?<name>[^\\s]+)(\\s(?<parameters>([^\\[]|$)+))?' +\
'(\\[(?<conditions>[^\\]]+)\\])?'
# The name of this command
var name: String
# Parameters of this command
var parameters: Array = []
# A list of ESCConditions to run this command.
# Conditions are combined using logical AND
var conditions: Array = []
# Create a command from a command string
func _init(command_string):
var command_regex = RegEx.new()
command_regex.compile(REGEX)
if command_regex.search(command_string):
for result in command_regex.search_all(command_string):
if "name" in result.names:
self.name = ESCUtils.get_re_group(result, "name")
if "parameters" in result.names:
# Split parameters by whitespace but allow quoted
# parameters
var quote_open = false
var parameter_values = PoolStringArray([])
var parsed_parameters = \
ESCUtils.sanitize_whitespace(
ESCUtils.get_re_group(
result,
"parameters"
).strip_edges()
)
for parameter in parsed_parameters.split(" "):
if len(parameter) > 1 and parameter.begins_with('"') and parameter.ends_with('"'):
parameters.append(
parameter
)
elif not quote_open \
and parameter.count(":") == 1 \
and ':"' in parameter \
and (parameter.ends_with(':"') or not parameter.ends_with('"')):
# The second clause in this helps to handle dialogue that starts with a space
# and also allowing single-word dialogue to be handled in a separate elif.
quote_open = true
parameter_values.append(parameter)
elif not quote_open and parameter.begins_with('"'):
quote_open = true
parameter_values.append(parameter)
elif parameter.ends_with('"'):
quote_open = false
parameter_values.append(
parameter.substr(0, len(parameter))
)
parameters.append(parameter_values.join(" "))
parameter_values.resize(0)
elif quote_open:
parameter_values.append(parameter)
else:
parameters.append(parameter)
if "conditions" in result.names:
for condition in ESCUtils.get_re_group(
result,
"conditions"
).split(","):
self.conditions.append(
ESCCondition.new(condition.strip_edges())
)
else:
escoria.logger.error(
self,
"Invalid command detected: %s\nCommand regexp didn't match."
% command_string
)
# Check, if conditions match
func is_valid() -> bool:
if not command_exists():
escoria.logger.error(
self,
"Invalid command detected: %s" % self.name +
"Command implementation not found in any command directory."
)
return false
return .is_valid()
# Checks that the command exists
#
# *Returns* True if the command exists, else false.
func command_exists() -> bool:
for base_path in ESCProjectSettingsManager.get_setting(
ESCProjectSettingsManager.COMMAND_DIRECTORIES
):
var command_path = "%s/%s.gd" % [
base_path.trim_suffix("/"),
self.name
]
if ResourceLoader.exists(command_path):
return true
return false
# Run this command
func run() -> int:
var command_object = escoria.command_registry.get_command(self.name)
if command_object == null:
return ESCExecution.RC_ERROR
else:
var argument_descriptor = command_object.configure()
var prepared_arguments = argument_descriptor.prepare_arguments(
self.parameters
)
if command_object.validate(prepared_arguments):
escoria.logger.debug(
self,
"Running command %s with parameters %s."
% [self.name, prepared_arguments]
)
var rc = command_object.run(prepared_arguments)
if rc is GDScriptFunctionState:
rc = yield(rc, "completed")
escoria.logger.debug(
self,
"[%s] Return code: %d." % [self.name, rc]
)
return rc
else:
return ESCExecution.RC_ERROR
# This function interrupts the command. If it was not started, it will not run.
# If it had already started, the execution will be considered as finished
# immediately and finish. If it was already finished, nothing will happen.
func interrupt():
_is_interrupted = true
var command = escoria.command_registry.get_command(self.name)
if command.has_method("interrupt"):
command.interrupt()
# Override of built-in _to_string function to display the statement.
func _to_string() -> String:
return "Command %s with parameters: %s" % [name, str(parameters)]

View File

@@ -1,187 +0,0 @@
# The descriptor of the arguments of an ESC command
extends Reference
class_name ESCCommandArgumentDescriptor
# As the get_type command was deprecated with Godot 2.x w we need a way to determine
# variable types. Ideally these wouldn't be hardcoded but there's no GDScript 3.x command to
# turn a type back to its name.
const GODOT_TYPE_LIST = ["nil", "bool", "int", "real", "string", \
"vector2", "rect2", "vector3", "matrix32", "plane", "quat", \
"aabb", "matrix3", "transform", "color", "image", "node_path", \
"rid", "object", "input_event", "dictionary", "array", \
"raw_array", "int_array", "real_array", "string_array", \
"vector2_array", "vector3_array", "color_array", "max"]
# Maximum number of total arugments the command can handle
var max_args: int = 0
# Number of required arguments the command expects
var min_args: int = 0
# The types the arguments as TYPE_ constants. If the command is called with
# more arguments than there are entries in the types array, the additional
# arguments will be checked against the last entry of the types array.
var types: Array = []
# The default values for the arguments
var defaults: Array = []
# Whether to strip quotes on specific arguments
var strip_quotes: Array = []
# Whether the final argument is a series of varargs
var has_varargs: bool = false
# Initialize the descriptor
func _init(
p_min_args: int = 0,
p_types: Array = [],
p_defaults: Array = [],
p_strip_quotes: Array = [true],
p_has_varargs: bool = false
):
max_args = p_types.size()
min_args = p_min_args
types = p_types
defaults = p_defaults
strip_quotes = p_strip_quotes
has_varargs = p_has_varargs
# Combine the default argument values with the given arguments
func prepare_arguments(arguments: Array) -> Array:
var complete_arguments = defaults
var varargs = []
for index in range(arguments.size()):
# If we have too many arguments passed in, complete_arguments won't
# be able to match 1:1. This condition will be validated later but so
# to avoid duplicating validation code, just grow complete_arguments
# since the arguments won't be used anyway.
if index >= complete_arguments.size():
if has_varargs:
varargs.append(arguments[index])
else:
complete_arguments.append(arguments[index])
elif index == complete_arguments.size() - 1 and has_varargs:
# Varargs are a special case and need to be gathered and added at
# the end as an array, untyped and unchecked. They should also only
# appear at the very end of a command's argument list.
varargs.append(arguments[index])
else:
complete_arguments[index] = ESCUtils.get_typed_value(
arguments[index],
types[index]
)
var strip = strip_quotes[0]
if strip_quotes.size() == complete_arguments.size():
strip = strip_quotes[index]
if strip and typeof(complete_arguments[index]) == TYPE_STRING:
complete_arguments[index] = complete_arguments[index].replace(
'"',
''
)
if has_varargs:
complete_arguments[complete_arguments.size() - 1] = varargs
return complete_arguments
# Validate whether the given arguments match the command descriptor
func validate(command: String, arguments: Array) -> bool:
var required_args_count: int = _count_leading_non_null_values(arguments, min_args)
if required_args_count < min_args:
var verb = "was" if required_args_count == 1 else "were"
escoria.logger.error(
self,
"Invalid arguments for command %s. " % command +
"Arguments didn't match minimum size {num}: Only {args} {verb} found." \
.format({"num":self.min_args,"args":required_args_count,"verb":verb})
)
if arguments.size() > self.max_args and not has_varargs:
escoria.logger.error(
self,
"Invalid arguments for command %s" % command +
"Maximum number of arguments ({num}) exceeded: {args}.".format(
{"num":self.max_args,"args":arguments}
)
)
for index in range(arguments.size()):
if arguments[index] == null:
# No type checking for null values
continue
if has_varargs and index == arguments.size() - 1:
# If we have varargs at the end, do not validate them.
continue
var correct = false
var types_index = index
if types_index > types.size():
types_index = types.size() - 1
if not self.types[types_index] is Array:
self.types[types_index] = [self.types[index]]
for type in self.types[types_index]:
if not correct:
correct = self._is_type(arguments[index], type)
if not correct:
var allowed_types = "[ "
for type in self.types[types_index]:
allowed_types += GODOT_TYPE_LIST[type] + " or "
allowed_types = allowed_types.substr(0, allowed_types.length() - 3) + "]"
escoria.logger.error(
self,
"Argument type did not match descriptor for command \"%s\"\n"
% command +
"Argument %d (\"%s\") is of type %s. Expected %s."
% [
index,
arguments[index],
GODOT_TYPE_LIST[typeof(arguments[index])],
allowed_types
]
)
return true
# Check whether the given argument is of the given type
#
# #### Parameters
#
# - argument: Argument to test
# - type: Type to check
# *Returns* Whether the argument is of the given type
func _is_type(argument, type: int) -> bool:
return typeof(argument) == type
# Counts the number of non-null values that exist at the beginning of the array up
# to a specified index.
#
# #### Parameters
#
# - array_to_check: Array to check for leading non-null values
# - max_index: Maximum (inclusive) index to check in array_to_check
#
# *Returns* the total number of entries at the start of
# array_to_check that are not null
func _count_leading_non_null_values(array_to_check: Array, max_index: int) -> int:
if array_to_check == null or max_index < 0:
return 0
var leading_non_nulls_count: int = 0
for i in range(max_index):
if array_to_check[i] != null:
leading_non_nulls_count += 1
return leading_non_nulls_count

View File

@@ -1,145 +0,0 @@
# A condition to run a command
extends Reference
class_name ESCCondition
# Valid comparison types
enum {
COMPARISON_NONE,
COMPARISON_EQ,
COMPARISON_GT,
COMPARISON_LT,
COMPARISON_ACTIVITY
}
# Regex that matches condition lines
const REGEX = \
'^(?<is_negated>!)?(?<comparison>eq|gt|lt)? ?(?<is_inventory>i\/)?' + \
'(?<is_activity>a\/)?(?<flag>[^ ]+)( (?<comparison_value>.+))?$'
const COMPARISON_DESCRIPTION = [
"Checking if %s %s %s true%s",
"Checking if %s %s %s equals %s",
"Checking if %s %s %s greater than %s",
"Checking if %s %s %s less than %s",
"Checking if %s %s %s active%s"
]
# Name of the flag compared
var flag: String
# Whether this condition is negated
var negated: bool = false
# Whether this condition is regarding an inventory item ("i/...")
var inventory: bool = false
# An optional comparison type. Use the COMPARISON-Enum
var comparison: int = COMPARISON_NONE
# The value used together with the comparison type
var comparison_value
# Create a new condition from an ESC condition string
func _init(comparison_string: String):
var comparison_regex = RegEx.new()
comparison_regex.compile(
REGEX
)
if comparison_regex.search(comparison_string):
for result in comparison_regex.search_all(comparison_string):
if "is_negated" in result.names:
self.negated = true
if "comparison" in result.names:
match ESCUtils.get_re_group(result, "comparison"):
"eq": self.comparison = COMPARISON_EQ
"gt": self.comparison = COMPARISON_GT
"lt": self.comparison = COMPARISON_LT
_:
escoria.logger.error(
self,
"Invalid comparison type detected: %s" %
comparison_string +
"Comparison type %s unknown" %
ESCUtils.get_re_group(
result,
"comparison"
)
)
if "comparison_value" in result.names:
self.comparison_value = ESCUtils.get_typed_value(
ESCUtils.get_re_group(
result,
"comparison_value"
)
)
if "is_inventory" in result.names:
self.inventory = true
if "is_activity" in result.names:
self.comparison = COMPARISON_ACTIVITY
if "flag" in result.names:
self.flag = ESCUtils.get_re_group(result, "flag")
else:
escoria.logger.error(
self,
"Invalid comparison detected: %s\nComparison regexp didn't match."
% comparison_string
)
# Run this comparison against the globals
func run() -> bool:
var global_name = self.flag
escoria.logger.debug(
self,
COMPARISON_DESCRIPTION[self.comparison] % [
"inventory item" if self.inventory else "global value",
self.flag,
"is not" if self.negated else "is",
"" if self.comparison in [COMPARISON_NONE, COMPARISON_ACTIVITY] \
else self.comparison_value
]
)
if self.inventory:
global_name = "i/%s" % flag
var return_value = false
if self.comparison == COMPARISON_NONE and \
escoria.globals_manager.has(global_name) and \
escoria.globals_manager.get_global(global_name) is bool and \
escoria.globals_manager.get_global(global_name):
return_value = true
elif self.comparison == COMPARISON_EQ and \
escoria.globals_manager.get_global(global_name) == \
self.comparison_value:
return_value = true
elif self.comparison == COMPARISON_GT and \
escoria.globals_manager.get_global(global_name) > \
self.comparison_value:
return_value = true
elif self.comparison == COMPARISON_LT and \
escoria.globals_manager.get_global(global_name) < \
self.comparison_value:
return_value = true
elif self.comparison == COMPARISON_ACTIVITY and \
escoria.object_manager.has(global_name) and \
escoria.object_manager.get_object(global_name).active:
return_value = true
if self.negated:
return_value = not return_value
escoria.logger.debug(
self,
"It is" if return_value else "It isn't"
)
return return_value

Some files were not shown because too many files have changed in this diff Show More