diff --git a/.github/workflows/apidoc.yml b/.github/workflows/apidoc.yml index e23a32e4..9f24edaf 100644 --- a/.github/workflows/apidoc.yml +++ b/.github/workflows/apidoc.yml @@ -8,32 +8,46 @@ on: concurrency: api-${{ github.ref }} jobs: - update: - if: "${{ github.event.head_commit.message != 'docs: Automatic update of API docs' }}" - name: Update + apidoc: +# if: "${{ github.event.head_commit.message != 'docs: Automatic update of API docs' }}" + name: Update API docs runs-on: ubuntu-latest steps: - name: Checkout uses: actions/checkout@v2 with: token: ${{ secrets.DEPLOYMENT_TOKEN }} + repository: godot-escoria/escoria-demo-game + ref: "develop" + path: game + - name: "Checkout docs repo" + uses: actions/checkout@v2 + with: + token: ${{ secrets.DEPLOYMENT_TOKEN }} + repository: godot-escoria/escoria-docs + ref: "devel" + fetch-depth: 0 + path: docs - name: Remove existing docs run: | - rm -rf docs/api + rm -rf docs/api/* - name: "Update docs" uses: docker://gdquest/gdscript-docs-maker:1 with: entrypoint: "bash" - args: "-c \"cd /app && ./generate_reference /github/workspace -o /github/workspace/docs/api -d addons/escoria-core\"" + args: "-c \"BASEDIR=$(pwd) && cd /app && ./generate_reference $BASEDIR/game -o $BASEDIR/docs/api -d addons/escoria-core\"" - name: "Update ESC reference" run: | apt update && apt install -y python3 + cd docs python3 extractesc.py - - name: "Commit" - uses: EndBug/add-and-commit@v7.2.1 - with: - add: "docs" - message: 'docs: Automatic update of API docs' - push: true + git status +# - name: "Commit" +# uses: EndBug/add-and-commit@v7.2.1 +# with: +# add: "api" +# message: 'docs: Automatic update of API docs' +# push: true +# cwd: "docs" diff --git a/README.md b/README.md index 10ba446d..e8ae1820 100644 --- a/README.md +++ b/README.md @@ -1,67 +1,20 @@ -# Escoria +# Escoria Demo Game -![Escoria Logo](https://raw.githubusercontent.com/godot-escoria/escoria-demo-game/main/addons/escoria-core/design/escoria-logo-small.png) - -Libre framework for the creation of point-and-click adventure games with the MIT-licensed multi-platform game engine [Godot Engine](https://godotengine.org). - -It is designed so that you can claim it for yourself and modify it to match the needs of your specific game and team. - -This repository is big rewrite of the original [Escoria framework](https://github.com/godotengine/escoria/tree/master). Its purpose is to make Escoria work as a plugin for the Godot Engine editor, instead of being a collection of scripts and scenes. It is intended to be easier to use and easier to maintain. - -If you're encountering issues or incompatibilities, please raise an issue on [Escoria's Github repository](https://github.com/godotengine/escoria/issues). - -## History - -This framework was initially developed for the adventure game -[The Interactive Adventures of Dog Mendonça and Pizzaboy®](http://store.steampowered.com/app/330420) -and later streamlined for broader usages and open sourced as promised to the backers of the Dog Mendonça Kickstarter campaign. - -Because of maintainability issues and to make the framework easier for new developers and bring it closer to Godot's standards, the framework was completely rewritten and optimized. - -## Authors - -In alphabetical order: - -* ArturM -* Sylvain Beucler - beuc -* Fleskevor -* Ariel Manzur - punto (original author) -* Julian Murgia - @StraToN -* Dennis Ploeger - @dploeger -* Markus Törnqvist - mjtorn - -## Documentation - -* [Getting started](docs/getting_started.md) -* [Architecture](docs/architecture.md) -* [Configuration](docs/configuration.md) -* [ESC language documentation](docs/esc.md) -* [API reference](docs/api) - -## Issues & support - -Escoria's development is organized using Github issues. -If you encounter an issue, a bug or a question to developers, please submit a ticket in our [issues page](https://github.com/godot-escoria/escoria-issues/issues). -You can also find support on our official Discord server. +![](https://raw.githubusercontent.com/godot-escoria/.github/main/design/escoria-logo-small.png) [![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) -## Roadmap +Libre framework for the creation of point-and-click adventure games with the multi-platform game engine [Godot Engine](https://godotengine.org). -Take a look, what's planned for the next version in our [projects boards](https://github.com/orgs/godot-escoria/projects). +Check out the [Escoria documentation](https://docs.escoria-framework.org), especially the Getting Started Guide for further details. -## Licensing +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). -This framework (scripts, scenes) is distributed under the [MIT license](LICENCE). +This is the demo game that acts as a testing ground for future Escoria development and a general showcase of its features. -### Art credits +## Art credits -#### Logo - -Escoria Logo created by Livio Fania (https://liviofania.com/) -Licence: CC-BY - -#### Characters +### Characters - Mark spritesheet by Marco Giorgini - marcogiorgini.com Licence : CC0 Licence @@ -71,13 +24,13 @@ Licence: CC-BY Licence: CC0 Licence edited by Julian Murgia -#### Items +### Items * Generic items by Kenney Licence: CC0 Licence https://www.kenney.nl/assets/generic-items -### Sound credits +## Sound credits * Concrete footstep Licence: CC0 Licence @@ -87,13 +40,14 @@ Licence: CC-BY by Eric Matyas www.soundimage.org -### Cursors +## Cursors + * Pointers part 4 by "yd" Licence: CC0 Licence https://opengameart.org/content/pointers-part-4x edited by Julian Murgia -### Font +## Font These fonts are provided as an example. Please mind checking the licence before redistributing with your game. @@ -106,27 +60,3 @@ These fonts are provided as an example. Please mind checking the licence before 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. - -## Development - -Requirements: - -* git -* Current Godot version -* Docker (for updating the API docs) -* Python (>=3) (for updating the ESC reference) - -After pushing something to the repository, the API docs will be updated. If you want to update them during -development, run the following from the game directory: - -``` -rm -rf docs/api -docker run --rm -v $(pwd):/game -v $(pwd)/docs/api:/export gdquest/gdscript-docs-maker:1 /game -o /export -d addons/escoria-core -``` - -If you changed ESC commands, update the command reference by running - -``` -python3 extractesc.py -``` - diff --git a/docs/api/AcceptInputCommand.md b/docs/api/AcceptInputCommand.md deleted file mode 100644 index 716c6505..00000000 --- a/docs/api/AcceptInputCommand.md +++ /dev/null @@ -1,46 +0,0 @@ - - -# AcceptInputCommand - -**Extends:** [ESCBaseCommand](../ESCBaseCommand) < [Node](../Node) - -## Description - -`accept_input [ALL|NONE|SKIP]` - -What type of input does the game accept. ALL is the default, SKIP allows -skipping of dialog but nothing else, NONE denies all input. Including opening -the menu etc. SKIP and NONE also disable autosaves. - -*Note* that SKIP gets reset to ALL when the event is done, but NONE persists. -This allows you to create cut scenes with SKIP where the dialog can be -skipped, but also initiate locked#### down cutscenes with accept_input -NONE in :setup and accept_input ALL later in :ready. - -@ESC - -## Method Descriptions - -### configure - -```gdscript -func configure() -> ESCCommandArgumentDescriptor -``` - -Return the descriptor of the arguments of this command - -### validate - -```gdscript -func validate(arguments: Array) -``` - -Validate wether the given arguments match the command descriptor - -### run - -```gdscript -func run(command_params: Array) -> int -``` - -Run the command \ No newline at end of file diff --git a/docs/api/AnimCommand.md b/docs/api/AnimCommand.md deleted file mode 100644 index 7ab48297..00000000 --- a/docs/api/AnimCommand.md +++ /dev/null @@ -1,43 +0,0 @@ - - -# AnimCommand - -**Extends:** [ESCBaseCommand](../ESCBaseCommand) < [Node](../Node) - -## Description - -`anim object name [reverse]` - -Executes the animation specificed with the "name" parameter on the object, -without blocking. The next command in the event will be executed immediately -after. Optional parameters: - -* reverse: plays the animation in reverse when true - -@ESC - -## Method Descriptions - -### configure - -```gdscript -func configure() -> ESCCommandArgumentDescriptor -``` - -Return the descriptor of the arguments of this command - -### validate - -```gdscript -func validate(arguments: Array) -``` - -Validate wether the given arguments match the command descriptor - -### run - -```gdscript -func run(command_params: Array) -> int -``` - -Run the command \ No newline at end of file diff --git a/docs/api/CameraPushCommand.md b/docs/api/CameraPushCommand.md deleted file mode 100644 index efd4d451..00000000 --- a/docs/api/CameraPushCommand.md +++ /dev/null @@ -1,42 +0,0 @@ - - -# CameraPushCommand - -**Extends:** [ESCBaseCommand](../ESCBaseCommand) < [Node](../Node) - -## Description - -`camera_push target [time] [type]` - -Push camera to `target`. Target must have camera_pos set. If it's of type -Camera2D, its zoom will be used as well as position. `type` is any of the -Tween.TransitionType values without the prefix, eg. LINEAR, QUART or CIRC; -defaults to QUART. A `time` value of 0 will set the camera immediately. - -@ESC - -## Method Descriptions - -### configure - -```gdscript -func configure() -> ESCCommandArgumentDescriptor -``` - -Return the descriptor of the arguments of this command - -### validate - -```gdscript -func validate(arguments: Array) -``` - -Validate wether the given arguments match the command descriptor - -### run - -```gdscript -func run(command_params: Array) -> int -``` - -Run the command \ No newline at end of file diff --git a/docs/api/CameraSetLimitsCommand.md b/docs/api/CameraSetLimitsCommand.md deleted file mode 100644 index 54d13640..00000000 --- a/docs/api/CameraSetLimitsCommand.md +++ /dev/null @@ -1,42 +0,0 @@ - - -# CameraSetLimitsCommand - -**Extends:** [ESCBaseCommand](../ESCBaseCommand) < [Node](../Node) - -## Description - -`camera_set_limits camlimits_id` - -Sets the camera limits to the one defined under `camlimits_id` in ESCRoom's -camera_limits array. -- camlimits_id: int: id of the camera limits to apply (defined in ESCRoom's - camera_limits array) - -@ESC - -## Method Descriptions - -### configure - -```gdscript -func configure() -> ESCCommandArgumentDescriptor -``` - -Return the descriptor of the arguments of this command - -### validate - -```gdscript -func validate(arguments: Array) -``` - -Validate wether the given arguments match the command descriptor - -### run - -```gdscript -func run(command_params: Array) -> int -``` - -Run the command \ No newline at end of file diff --git a/docs/api/CameraSetPosCommand.md b/docs/api/CameraSetPosCommand.md deleted file mode 100644 index b555578e..00000000 --- a/docs/api/CameraSetPosCommand.md +++ /dev/null @@ -1,33 +0,0 @@ - - -# CameraSetPosCommand - -**Extends:** [ESCBaseCommand](../ESCBaseCommand) < [Node](../Node) - -## Description - -`camera_set_pos speed x y` - -Moves the camera to a position defined by "x" and "y", at the speed defined -by "speed" in pixels per second. If speed is 0, camera is teleported to the -position. - -@ESC - -## Method Descriptions - -### configure - -```gdscript -func configure() -> ESCCommandArgumentDescriptor -``` - -Return the descriptor of the arguments of this command - -### run - -```gdscript -func run(command_params: Array) -> int -``` - -Run the command \ No newline at end of file diff --git a/docs/api/CameraSetTargetCommand.md b/docs/api/CameraSetTargetCommand.md deleted file mode 100644 index c0092e41..00000000 --- a/docs/api/CameraSetTargetCommand.md +++ /dev/null @@ -1,41 +0,0 @@ - - -# CameraSetTargetCommand - -**Extends:** [ESCBaseCommand](../ESCBaseCommand) < [Node](../Node) - -## Description - -`camera_set_target speed object` - -Configures the camera to set the target to the given `object`using `speed` -as speed limit. -This is the default behavior (default follow object is "player"). - -@ESC - -## Method Descriptions - -### configure - -```gdscript -func configure() -> ESCCommandArgumentDescriptor -``` - -Return the descriptor of the arguments of this command - -### validate - -```gdscript -func validate(arguments: Array) -``` - -Validate wether the given arguments match the command descriptor - -### run - -```gdscript -func run(command_params: Array) -> int -``` - -Run the command \ No newline at end of file diff --git a/docs/api/CameraSetZoomCommand.md b/docs/api/CameraSetZoomCommand.md deleted file mode 100644 index fde3ea7c..00000000 --- a/docs/api/CameraSetZoomCommand.md +++ /dev/null @@ -1,34 +0,0 @@ - - -# CameraSetZoomCommand - -**Extends:** [ESCBaseCommand](../ESCBaseCommand) < [Node](../Node) - -## Description - -`camera_set_zoom magnitude [time]` - -Zooms the camera in/out to the desired `magnitude`. Values larger than 1 zooms -the camera out, and smaller values zooms in, relative to the default value -of 1. An optional `time` in seconds controls how long it takes for the camera -to zoom into position. - -@ESC - -## Method Descriptions - -### configure - -```gdscript -func configure() -> ESCCommandArgumentDescriptor -``` - -Return the descriptor of the arguments of this command - -### run - -```gdscript -func run(command_params: Array) -> int -``` - -Run the command \ No newline at end of file diff --git a/docs/api/CameraSetZoomHeightCommand.md b/docs/api/CameraSetZoomHeightCommand.md deleted file mode 100644 index 889dae12..00000000 --- a/docs/api/CameraSetZoomHeightCommand.md +++ /dev/null @@ -1,41 +0,0 @@ - - -# CameraSetZoomHeightCommand - -**Extends:** [ESCBaseCommand](../ESCBaseCommand) < [Node](../Node) - -## Description - -`camera_set_zoom_height pixels [time]` - -Zooms the camera in/out to the desired `pixels` height. -An optional `time` in seconds controls how long it takes for the camera -to zoom into position. - -@ESC - -## Method Descriptions - -### configure - -```gdscript -func configure() -> ESCCommandArgumentDescriptor -``` - -Return the descriptor of the arguments of this command - -### validate - -```gdscript -func validate(arguments: Array) -``` - -Validate wether the given arguments match the command descriptor - -### run - -```gdscript -func run(command_params: Array) -> int -``` - -Run the command \ No newline at end of file diff --git a/docs/api/CameraShiftCommand.md b/docs/api/CameraShiftCommand.md deleted file mode 100644 index 3c905586..00000000 --- a/docs/api/CameraShiftCommand.md +++ /dev/null @@ -1,33 +0,0 @@ - - -# CameraShiftCommand - -**Extends:** [ESCBaseCommand](../ESCBaseCommand) < [Node](../Node) - -## Description - -`camera_shift x y [time] [type]` - -Shift camera by `x` and `y` pixels over `time` seconds. `type` is any of the -Tween.TransitionType values without the prefix, eg. LINEAR, QUART or CIRC; -defaults to QUART. - -@ESC - -## Method Descriptions - -### configure - -```gdscript -func configure() -> ESCCommandArgumentDescriptor -``` - -Return the descriptor of the arguments of this command - -### run - -```gdscript -func run(command_params: Array) -> int -``` - -Run the command \ No newline at end of file diff --git a/docs/api/ChangeSceneCommand.md b/docs/api/ChangeSceneCommand.md deleted file mode 100644 index 90630e49..00000000 --- a/docs/api/ChangeSceneCommand.md +++ /dev/null @@ -1,45 +0,0 @@ - - -# ChangeSceneCommand - -**Extends:** [ESCBaseCommand](../ESCBaseCommand) < [Node](../Node) - -## Description - -`change_scene path [disable_automatic_transition] [run_events]` - -Loads a new scene, specified by "path". - The `disable_automatic_transition` is a boolean (default false) can be set -to true to disable automatic transitions between scenes, to allow you -to control your transitions manually using the `transition` command. -The `run_events` variable is a boolean (default true) which you never want -to set manually! It's there only to benefit save games, so they don't -conflict with the scene's events. - -@ESC - -## Method Descriptions - -### configure - -```gdscript -func configure() -> ESCCommandArgumentDescriptor -``` - -Return the descriptor of the arguments of this command - -### validate - -```gdscript -func validate(arguments: Array) -> bool -``` - -Validate wether the given arguments match the command descriptor - -### run - -```gdscript -func run(command_params: Array) -> var -``` - -Run the command \ No newline at end of file diff --git a/docs/api/CustomCommand.md b/docs/api/CustomCommand.md deleted file mode 100644 index 86f50dc2..00000000 --- a/docs/api/CustomCommand.md +++ /dev/null @@ -1,40 +0,0 @@ - - -# CustomCommand - -**Extends:** [ESCBaseCommand](../ESCBaseCommand) < [Node](../Node) - -## Description - -`custom object node func_name [params]` - -Calls the function `func_name` of the node `node` of object `object` with -the optional `params`. This is a blocking function - -@ESC - -## Method Descriptions - -### configure - -```gdscript -func configure() -> ESCCommandArgumentDescriptor -``` - -Return the descriptor of the arguments of this command - -### validate - -```gdscript -func validate(arguments: Array) -``` - -Validate wether the given arguments match the command descriptor - -### run - -```gdscript -func run(command_params: Array) -> int -``` - -Run the command \ No newline at end of file diff --git a/docs/api/CutSceneCommand.md b/docs/api/CutSceneCommand.md deleted file mode 100644 index fa928295..00000000 --- a/docs/api/CutSceneCommand.md +++ /dev/null @@ -1,43 +0,0 @@ - - -# CutSceneCommand - -**Extends:** [ESCBaseCommand](../ESCBaseCommand) < [Node](../Node) - -## Description - -`cut_scene object name [reverse]` - -Executes the animation specificed with the "name" parameter on the object, -blocking. The next command in the event will be executed when the animation -is finished playing. Optional parameters: - -* reverse plays the animation in reverse when true - -@ESC - -## Method Descriptions - -### configure - -```gdscript -func configure() -> ESCCommandArgumentDescriptor -``` - -Return the descriptor of the arguments of this command - -### validate - -```gdscript -func validate(arguments: Array) -``` - -Validate wether the given arguments match the command descriptor - -### run - -```gdscript -func run(command_params: Array) -> var -``` - -Run the command \ No newline at end of file diff --git a/docs/api/DebugCommand.md b/docs/api/DebugCommand.md deleted file mode 100644 index 9121ab80..00000000 --- a/docs/api/DebugCommand.md +++ /dev/null @@ -1,31 +0,0 @@ - - -# DebugCommand - -**Extends:** [ESCBaseCommand](../ESCBaseCommand) < [Node](../Node) - -## Description - -`debug string [string2 ...]` - -Takes 1 or more strings, prints them to the console. - -@ESC - -## Method Descriptions - -### configure - -```gdscript -func configure() -> ESCCommandArgumentDescriptor -``` - -Return the descriptor of the arguments of this command - -### run - -```gdscript -func run(command_params: Array) -> int -``` - -Run the command \ No newline at end of file diff --git a/docs/api/DecGlobalCommand.md b/docs/api/DecGlobalCommand.md deleted file mode 100644 index 8452d842..00000000 --- a/docs/api/DecGlobalCommand.md +++ /dev/null @@ -1,40 +0,0 @@ - - -# DecGlobalCommand - -**Extends:** [ESCBaseCommand](../ESCBaseCommand) < [Node](../Node) - -## Description - -`dec_global name value` - -Subtracts the value from global with given "name". Value and global must -both be integers. - -@ESC - -## Method Descriptions - -### configure - -```gdscript -func configure() -> ESCCommandArgumentDescriptor -``` - -Return the descriptor of the arguments of this command - -### validate - -```gdscript -func validate(arguments: Array) -``` - -Validate wether the given arguments match the command descriptor - -### run - -```gdscript -func run(command_params: Array) -> int -``` - -Run the command \ No newline at end of file diff --git a/docs/api/ESCActionManager.md b/docs/api/ESCActionManager.md deleted file mode 100644 index 2329c37d..00000000 --- a/docs/api/ESCActionManager.md +++ /dev/null @@ -1,66 +0,0 @@ - - -# ESCActionManager - -**Extends:** [Object](../Object) - -## Description - -Manages currently carried out actions - -## Property Descriptions - -### current\_action - -```gdscript -var current_action: String = "" -``` - -- **Setter**: `set_current_action` - -Current verb used - -### current\_tool - -```gdscript -var current_tool: ESCObject -``` - -Current tool (ESCItem/ESCInventoryItem) used - -## Method Descriptions - -### set\_current\_action - -```gdscript -func set_current_action(action: String) -``` - -Set the current action - -### clear\_current\_action - -```gdscript -func clear_current_action() -``` - -Clear the current action - -### clear\_current\_tool - -```gdscript -func clear_current_tool() -``` - -Clear the current tool - -### activate - -```gdscript -func activate(action: String, target: ESCObject, combine_with: ESCObject = null) -> var -``` - -## Signals - -- signal action_changed(): The current action was changed -- signal action_finished(): Emitted, when an action has been completed diff --git a/docs/api/ESCAnimationName.md b/docs/api/ESCAnimationName.md deleted file mode 100644 index 4778ade2..00000000 --- a/docs/api/ESCAnimationName.md +++ /dev/null @@ -1,27 +0,0 @@ - - -# ESCAnimationName - -**Extends:** [Resource](../Resource) - -## Description - -Class defining an animation to use for an angle. - -## Property Descriptions - -### animation - -```gdscript -export var animation: String = "" -``` - -Name of the animation - -### mirrored - -```gdscript -export var mirrored: bool = false -``` - -Animation mirror (false is no mirror, true is mirrored) \ No newline at end of file diff --git a/docs/api/ESCAnimationPlayer.md b/docs/api/ESCAnimationPlayer.md deleted file mode 100644 index 1c3a47d9..00000000 --- a/docs/api/ESCAnimationPlayer.md +++ /dev/null @@ -1,124 +0,0 @@ - - -# ESCAnimationPlayer - -**Extends:** [Node](../Node) - -## Description - -An abstraction class to expose the same animation methods for noth -AnimatedSprite and AnimationPlayer - -## Method Descriptions - -### \_init - -```gdscript -func _init(node: Node) -``` - -Create a new animation player - -#### Parameters - -- node: The actual player node - -### get\_animation - -```gdscript -func get_animation() -> String -``` - -Return the currently playing animation -**Returns** the currently playing animation name - -### get\_animations - -```gdscript -func get_animations() -> PoolStringArray -``` - -Returns a list of all animation names -**Returns** A list of all animation names - -### is\_playing - -```gdscript -func is_playing() -> bool -``` - -Wether the animation is playing -**Returns: Wether the animation is playing** - -### stop - -```gdscript -func stop() -``` - -Stop the animation - -### play - -```gdscript -func play(name: String, backwards: bool = false) -``` - -Play the animation - -#### Parameters - -- name: The animation name to play -- backwards: Play backwards - -### play\_backwards - -```gdscript -func play_backwards(name: String) -``` - -Play the given animation backwards - -#### Parameters - -- name: Animation to play - -### has\_animation - -```gdscript -func has_animation(name: String) -> bool -``` - -Check if the given animation exists - -#### Parameters - -- name: Name of the animation to check -**Returns** Wether the animation player has the animation - -### seek\_end - -```gdscript -func seek_end(name: String) -``` - -Play an animation and directly skip to the end - -#### Parameters - -- name: Name of the animation to play - -### is\_valid - -```gdscript -func is_valid() -> bool -``` - -Return true if the ESCAnimationPlayer node is valid, ie. it has a valid player -node. -**Returns: true if the ESCAnimationPlayer has a valid player node, -else false** - -## Signals - -- signal animation_finished(name): diff --git a/docs/api/ESCAnimationResource.md b/docs/api/ESCAnimationResource.md deleted file mode 100644 index a94a2445..00000000 --- a/docs/api/ESCAnimationResource.md +++ /dev/null @@ -1,54 +0,0 @@ - - -# ESCAnimationResource - -**Extends:** [Resource](../Resource) - -## Description - -Resource containing all defined animations and angles for -characters movement. - -## Property Descriptions - -### dir\_angles - -```gdscript -var dir_angles: Array -``` - -Array containing the different angles available for animations. -Each angle is defined by an array [start_angle, angle_size]. -start_angle must be between 0 and 360. -Angle 0 and 360 are the same and correspond to UP/NORTH -90 is RIGHT/EAST, 180 is DOWN/SOUTH, etc - -### directions - -```gdscript -var directions: Array -``` - -Array of animations for each direction, from UP to RIGHT_UP clockwise -[animation_name, scale]: scale parameter can be set to -1 to mirror -the animation - -### idles - -```gdscript -var idles: Array -``` - -Array containing the idle animations for each direction (in the -order defined by dir_angles): scale parameter can be set to -1 to mirror -the animation - -### speaks - -```gdscript -var speaks: Array -``` - -Array containing the speak animations for each direction (in the -order defined by dir_angles): scale parameter can be set to -1 to mirror -the animation \ No newline at end of file diff --git a/docs/api/ESCBackground.md b/docs/api/ESCBackground.md deleted file mode 100644 index 99b71a12..00000000 --- a/docs/api/ESCBackground.md +++ /dev/null @@ -1,60 +0,0 @@ - - -# ESCBackground - -**Extends:** [TextureRect](../TextureRect) - -## Description - -ESCBackground's purpose is to display a background image and receive input -events on the background. More precisely, the TextureRect under ESCBackground -does not receive events itself - if it did, it would also eat all events like -hotspot focusing and such. Instead, we set the TextureRect mouse filter to -MOUSE_FILTER_IGNORE, and we use an Area2D node to receive the input events. - -If ESCBackground doesn't contain a texture, it is important that its rect_size -is set over the whole scene, because its rect_size is then used to create the -Area2D node under it. If the rect_size is wrongly set, the background may -receive no input. - -## Property Descriptions - -### esc\_script - -```gdscript -export var esc_script = "" -``` - -The ESC script connected to this background - -## Method Descriptions - -### get\_full\_area\_rect2 - -```gdscript -func get_full_area_rect2() -> Rect2 -``` - -Calculate the actual area taken by this background depending on its -Texture or set size -**Returns** The correct area size - -## Signals - -- signal double_left_click_on_bg(position): The background was double clicked - -#### Parameters - -- position: The position where the player clicked -- signal left_click_on_bg(position): The background was left clicked - -#### Parameters - -- position: The position where the player clicked -- signal right_click_on_bg(position): The background was right clicked - -#### Parameters - -- position: The position where the player clicked -- signal mouse_wheel_up(): Emitted when the mouse wheel was turned up -- signal mouse_wheel_down(): Emitted when the mouse wheel was turned down diff --git a/docs/api/ESCBaseCommand.md b/docs/api/ESCBaseCommand.md deleted file mode 100644 index f31eb2e5..00000000 --- a/docs/api/ESCBaseCommand.md +++ /dev/null @@ -1,36 +0,0 @@ - - -# ESCBaseCommand - -**Extends:** [Node](../Node) - -## Description - -A base class for every ESC command. -Extending classes have to override the configure and run function - -## Method Descriptions - -### configure - -```gdscript -func configure() -> ESCCommandArgumentDescriptor -``` - -Return the descriptor of the arguments of this command - -### validate - -```gdscript -func validate(arguments: Array) -> bool -``` - -Validate wether the given arguments match the command descriptor - -### run - -```gdscript -func run(command_params: Array) -> int -``` - -Run the command \ No newline at end of file diff --git a/docs/api/ESCCamera.md b/docs/api/ESCCamera.md deleted file mode 100644 index 54ba0ef8..00000000 --- a/docs/api/ESCCamera.md +++ /dev/null @@ -1,110 +0,0 @@ - - -# ESCCamera - -**Extends:** [Camera2D](../Camera2D) - -## Description - -Camera handling - -## Property Descriptions - -### tween - -```gdscript -var tween -``` - -Reference to the tween node for animating camera movements - -### target - -```gdscript -var target: Vector2 = "(0, 0)" -``` - -Target position of the camera - -### follow\_target - -```gdscript -var follow_target: Node -``` - -The object to follow - -### zoom\_target - -```gdscript -var zoom_target: Vector2 -``` - -Target zoom of the camera - -### zoom\_time - -```gdscript -var zoom_time -``` - -Time of zoom - -### zoom\_transform - -```gdscript -var zoom_transform -``` - -This is needed to adjust dialog positions and such, see dialog_instance.gd - -## Method Descriptions - -### set\_limits - -```gdscript -func set_limits(limits: ESCCameraLimits) -``` - -Sets camera limits so it doesn't go out of the scene - -#### Parameters - -- limits: The limits to set - -### set\_drag\_margin\_enabled - -```gdscript -func set_drag_margin_enabled(p_dm_h_enabled, p_dm_v_enabled) -``` - -### set\_target - -```gdscript -func set_target(p_target, p_speed: float = 0) -``` - -### set\_camera\_zoom - -```gdscript -func set_camera_zoom(p_zoom_level, p_time) -``` - -### push - -```gdscript -func push(p_target, p_time, p_type) -``` - -### shift - -```gdscript -func shift(p_x, p_y, p_time, p_type) -``` - -### target\_reached - -```gdscript -func target_reached() -``` - diff --git a/docs/api/ESCCameraLimits.md b/docs/api/ESCCameraLimits.md deleted file mode 100644 index f51cba57..00000000 --- a/docs/api/ESCCameraLimits.md +++ /dev/null @@ -1,52 +0,0 @@ - - -# ESCCameraLimits - -**Extends:** [Object](../Object) - -## Description - -Describes a bounding box that limits the camera movement in the scene - -## Property Descriptions - -### limit\_left - -```gdscript -var limit_left: int = -10000 -``` - -The left side of the bounding box - -### limit\_right - -```gdscript -var limit_right: int = 10000 -``` - -The right side of the bounding box - -### limit\_top - -```gdscript -var limit_top: int = -10000 -``` - -The top side of the bounding box - -### limit\_bottom - -```gdscript -var limit_bottom: int = 10000 -``` - -The bottom side of the bounding box - -## Method Descriptions - -### \_init - -```gdscript -func _init(left: int, right: int, top: int, bottom: int) -``` - diff --git a/docs/api/ESCCommand.md b/docs/api/ESCCommand.md deleted file mode 100644 index 8efd6457..00000000 --- a/docs/api/ESCCommand.md +++ /dev/null @@ -1,72 +0,0 @@ - - -# ESCCommand - -**Extends:** [ESCStatement](../ESCStatement) < [Object](../Object) - -## Description - -An ESC command - -## Constants Descriptions - -### REGEX - -```gdscript -const REGEX: String = "^(\\s*)(?[^\\s]+)(\\s(?([^\\[]|$)+))?(\\[(?[^\\]]+)\\])?" -``` - -Regex matching command lines - -## Property Descriptions - -### name - -```gdscript -var name: String -``` - -The name of this command - -### parameters - -```gdscript -var parameters: Array -``` - -Parameters of this command - -### conditions - -```gdscript -var conditions: Array -``` - -A list of ESCConditions to run this command. -Conditions are combined using logical AND - -## Method Descriptions - -### \_init - -```gdscript -func _init(command_string) -``` - -Create a command from a command string - -### is\_valid - -```gdscript -func is_valid() -> bool -``` - -Check, if conditions match - -### run - -```gdscript -func run() -> var -``` - -Run this command \ No newline at end of file diff --git a/docs/api/ESCCommandArgumentDescriptor.md b/docs/api/ESCCommandArgumentDescriptor.md deleted file mode 100644 index e1238ff0..00000000 --- a/docs/api/ESCCommandArgumentDescriptor.md +++ /dev/null @@ -1,63 +0,0 @@ - - -# ESCCommandArgumentDescriptor - -**Extends:** [Object](../Object) - -## Description - -The descriptor of the arguments of an ESC command - -## Property Descriptions - -### min\_args - -```gdscript -var min_args: int = 0 -``` - -Number of arguments the command expects - -### types - -```gdscript -var types: Array -``` - -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. - -### defaults - -```gdscript -var defaults: Array -``` - -The default values for the arguments - -## Method Descriptions - -### \_init - -```gdscript -func _init(p_min_args: int = 0, p_types: Array, p_defaults: Array) -``` - -Initialize the descriptor - -### prepare\_arguments - -```gdscript -func prepare_arguments(arguments: Array) -> Array -``` - -Combine the default argument values with the given arguments - -### validate - -```gdscript -func validate(command: String, arguments: Array) -> bool -``` - -Validate wether the given arguments match the command descriptor \ No newline at end of file diff --git a/docs/api/ESCCommandRegistry.md b/docs/api/ESCCommandRegistry.md deleted file mode 100644 index 29100228..00000000 --- a/docs/api/ESCCommandRegistry.md +++ /dev/null @@ -1,47 +0,0 @@ - - -# ESCCommandRegistry - -**Extends:** [Object](../Object) - -## Description - -A registry of ESC command objects - -## Property Descriptions - -### registry - -```gdscript -var registry: Dictionary -``` - -The registry of registered commands - -## Method Descriptions - -### load\_command - -```gdscript -func load_command(command_name: String) -> ESCBaseCommand -``` - -Load a command by its name - -#### Parameters - -- command_name: Name of command to load -**Returns** The command object - -### get\_command - -```gdscript -func get_command(command_name: String) -> ESCBaseCommand -``` - -Retrieve a command from the command registry - -#### Parameters - -- command_name: The name of the command -**Returns** The command object \ No newline at end of file diff --git a/docs/api/ESCCompiler.md b/docs/api/ESCCompiler.md deleted file mode 100644 index a0d496ed..00000000 --- a/docs/api/ESCCompiler.md +++ /dev/null @@ -1,54 +0,0 @@ - - -# ESCCompiler - -**Extends:** [Object](../Object) - -## Description - -Compiler of the ESC language - -## Constants Descriptions - -### COMMENT\_REGEX - -```gdscript -const COMMENT_REGEX: String = "^\\s*#.*$" -``` - -A RegEx for comment lines -.*$' - -### EMPTY\_REGEX - -```gdscript -const EMPTY_REGEX: String = "^\\s*$" -``` - -A RegEx for empty lines - -### INDENT\_REGEX - -```gdscript -const INDENT_REGEX: String = "^(?\\s*)" -``` - -A RegEx for finding out the indent of a line - -## Method Descriptions - -### load\_esc\_file - -```gdscript -func load_esc_file(path: String) -> ESCScript -``` - -Load an ESC file from a file resource - -### compile - -```gdscript -func compile(lines: Array) -> ESCScript -``` - -Compiles an array of ESC script strings to an ESCScript \ No newline at end of file diff --git a/docs/api/ESCCondition.md b/docs/api/ESCCondition.md deleted file mode 100644 index e4509dd5..00000000 --- a/docs/api/ESCCondition.md +++ /dev/null @@ -1,115 +0,0 @@ - - -# ESCCondition - -**Extends:** [Object](../Object) - -## Description - -A condition to run a command - -## Constants Descriptions - -### COMPARISON\_ACTIVITY - -```gdscript -const COMPARISON_ACTIVITY: int = 4 -``` - -### COMPARISON\_DESCRIPTION - -```gdscript -const COMPARISON_DESCRIPTION: Array = ["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 is %s active%s"] -``` - -### COMPARISON\_EQ - -```gdscript -const COMPARISON_EQ: int = 1 -``` - -### COMPARISON\_GT - -```gdscript -const COMPARISON_GT: int = 2 -``` - -### COMPARISON\_LT - -```gdscript -const COMPARISON_LT: int = 3 -``` - -### COMPARISON\_NONE - -```gdscript -const COMPARISON_NONE: int = 0 -``` - -### REGEX - -```gdscript -const REGEX: String = "^(?!)?(?eq|gt|lt)? ?(?i/)?(?a/)?(?[^ ]+)( (?.+))?$" -``` - -Regex that matches condition lines - -## Property Descriptions - -### flag - -```gdscript -var flag: String -``` - -Name of the flag compared - -### negated - -```gdscript -var negated: bool = false -``` - -Wether this condition is negated - -### inventory - -```gdscript -var inventory: bool = false -``` - -Wether this condition is regarding an inventory item ("i/...") - -### comparison - -```gdscript -var comparison: int -``` - -An optional comparison type. Use the COMPARISON-Enum - -### comparison\_value - -```gdscript -var comparison_value -``` - -The value used together with the comparison type - -## Method Descriptions - -### \_init - -```gdscript -func _init(comparison_string: String) -``` - -Create a new condition from an ESC condition string - -### run - -```gdscript -func run() -> bool -``` - -Run this comparison against the globals \ No newline at end of file diff --git a/docs/api/ESCController.md b/docs/api/ESCController.md deleted file mode 100644 index c3a1031d..00000000 --- a/docs/api/ESCController.md +++ /dev/null @@ -1,18 +0,0 @@ - - -# ESCController - -## Method Descriptions - -### perform\_walk - -```gdscript -func perform_walk(moving_obj: ESCObject, destination, is_fast: bool = false) -``` - -### perform\_inputevent\_on\_object - -```gdscript -func perform_inputevent_on_object(obj: ESCObject, event: InputEvent, default_action: bool = false) -``` - diff --git a/docs/api/ESCDialog.md b/docs/api/ESCDialog.md deleted file mode 100644 index 471026ce..00000000 --- a/docs/api/ESCDialog.md +++ /dev/null @@ -1,87 +0,0 @@ - - -# ESCDialog - -**Extends:** [ESCStatement](../ESCStatement) < [Object](../Object) - -## Description - -An ESC dialog - -## Constants Descriptions - -### END\_REGEX - -```gdscript -const END_REGEX: String = "^(?\\s*)!.*$" -``` - -A Regex that matches the end of a dialog - -### REGEX - -```gdscript -const REGEX: String = "^(\\s*)\\?( (?[^ ]+))?( (?[^ ]+))?( (?.+))?$" -``` - -Regex that matches dialog lines - -## Property Descriptions - -### avatar - -```gdscript -var avatar: String = "-" -``` - -Avatar used in the dialog - -### timeout - -```gdscript -var timeout: int = 0 -``` - -Timeout until the timeout_option option is selected. Use 0 for no timeout - -### timeout\_option - -```gdscript -var timeout_option: int = 0 -``` - -The dialog option to select when timeout is reached - -### options - -```gdscript -var options: Array -``` - -A list of ESCDialogOptions - -## Method Descriptions - -### \_init - -```gdscript -func _init(dialog_string: String) -``` - -Construct a dialog from a dialog string - -### is\_valid - -```gdscript -func is_valid() -> bool -``` - -Check if dialog is valid - -### run - -```gdscript -func run() -``` - -Run this dialog \ No newline at end of file diff --git a/docs/api/ESCDialogManager.md b/docs/api/ESCDialogManager.md deleted file mode 100644 index 371bff91..00000000 --- a/docs/api/ESCDialogManager.md +++ /dev/null @@ -1,87 +0,0 @@ - - -# ESCDialogManager - -**Extends:** [Control](../Control) - -## Description - -A base class for dialog plugins to work with Escoria - -## Method Descriptions - -### has\_type - -```gdscript -func has_type(type: String) -> bool -``` - -Check wether a specific type is supported by the -dialog plugin - -#### Parameters -- type: required type -*Returns* Wether the type is supported or not - -### has\_chooser\_type - -```gdscript -func has_chooser_type(type: String) -> bool -``` - -Check wether a specific chooser type is supported by the -dialog plugin - -#### Parameters -- type: required chooser type -*Returns* Wether the type is supported or not - -### say - -```gdscript -func say(dialog_player: Node, global_id: String, text: String, type: String) -``` - -Output a text said by the item specified by the global id. Emit -`say_finished` after finishing displaying the text. - -#### Parameters -- dialog_player: Node of the dialog player in the UI -- global_id: Global id of the item that is speaking -- text: Text to say, optional prefixed by a translation key separated - by a ":" -- type: Type of dialog box to use - -### choose - -```gdscript -func choose(dialog_player: Node, dialog: ESCDialog) -``` - -Present an option chooser to the player and sends the signal -`option_chosen` with the chosen dialog option - -#### Parameters -- dialog_player: Node of the dialog player in the UI -- dialog: Information about the dialog to display - -### speedup - -```gdscript -func speedup() -``` - -Trigger running the dialog faster - -### interrupt - -```gdscript -func interrupt() -``` - -The say command has been interrupted, cancel the dialog display - -## Signals - -- signal say_finished(): Emitted when the say function has completed showing the text -- signal option_chosen(option): Emitted when the player has chosen an option diff --git a/docs/api/ESCDialogOption.md b/docs/api/ESCDialogOption.md deleted file mode 100644 index f7e9f38d..00000000 --- a/docs/api/ESCDialogOption.md +++ /dev/null @@ -1,63 +0,0 @@ - - -# ESCDialogOption - -**Extends:** [ESCStatement](../ESCStatement) < [Object](../Object) - -## Description - -An option of an ESC dialog - -## Constants Descriptions - -### REGEX - -```gdscript -const REGEX: String = "^[^-]*- (?[^:]+)?:?\"(?