Compare commits
4 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| cc7cb90041 | |||
| 7a787a36d6 | |||
| bfa1f251dd | |||
| 673368a200 |
1
.gitignore
vendored
1
.gitignore
vendored
@@ -19,6 +19,7 @@
|
|||||||
|
|
||||||
*.suo
|
*.suo
|
||||||
*.user
|
*.user
|
||||||
|
*.csproj.old*
|
||||||
_ReSharper.*
|
_ReSharper.*
|
||||||
*.DotSettings.user
|
*.DotSettings.user
|
||||||
bin
|
bin
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
<Project Sdk="Godot.NET.Sdk/4.6.0">
|
<Project Sdk="Godot.NET.Sdk/4.6.2">
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<TargetFramework>net9.0</TargetFramework>
|
<TargetFramework>net9.0</TargetFramework>
|
||||||
<EnableDynamicLoading>true</EnableDynamicLoading>
|
<EnableDynamicLoading>true</EnableDynamicLoading>
|
||||||
|
|||||||
@@ -4,4 +4,4 @@
|
|||||||
|
|
||||||
[resource]
|
[resource]
|
||||||
script = ExtResource("1_x0pne")
|
script = ExtResource("1_x0pne")
|
||||||
RegisteredTags = Array[String](["character.player", "character.enemy", "weapon", "status.stunned", "status.burning", "status.frozen", "abilities.weapon.land", "abilities.weapon.flying", "abilities.weapon.left", "events.combat.damage", "events.combat.hit", "events.weapon.flyingTick", "events.weapon.startedFlying", "events.weapon.stoppedFlying", "events.weapon.handToFlying", "events.weapon.flyingToHand", "events.weapon.plantedToHand", "events.weapon.plantedToFlying", "events.weapon.planted", "cooldown.empoweredAction", "cooldown.empoweredSwordThrow", "cues.resources.mana"])
|
RegisteredTags = Array[String](["character.player", "character.enemy", "weapon", "status.stunned", "status.burning", "status.frozen", "abilities.weapon.land", "abilities.weapon.flying", "abilities.weapon.left", "events.combat.damage", "events.combat.hit", "events.weapon.flyingTick", "events.weapon.startedFlying", "events.weapon.stoppedFlying", "events.weapon.handToFlying", "events.weapon.flyingToHand", "events.weapon.plantedToHand", "events.weapon.plantedToFlying", "events.weapon.planted", "cooldown.empoweredAction", "cooldown.empoweredSwordThrow", "cues.resources.mana", "events.player.empowered_action_used", "character.player.mana", "character.player.mana.regen", "character.player.mana.regen.inhibited"])
|
||||||
|
|||||||
33
addons/rider-plugin/CONTRIBUTING.md
Normal file
33
addons/rider-plugin/CONTRIBUTING.md
Normal file
@@ -0,0 +1,33 @@
|
|||||||
|
# Contribution
|
||||||
|
|
||||||
|
Hello, thanks for taking time and helping out with the addon!
|
||||||
|
|
||||||
|
Most contributions require you to agree to a Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us the rights to use your contribution. Please sign the CLA before sending the PR: https://www.jetbrains.com/agreements/cla/.
|
||||||
|
|
||||||
|
#### Local setup
|
||||||
|
|
||||||
|
Open the `godot-editor-plugin/CMakeLists.txt` in Rider 2026.1+, select `rider-gdextension` target in the run configuration selector.
|
||||||
|
There are some more fixes coming in 2026.2, which will allow working on gdscript and cpp files within the same workspace.
|
||||||
|
|
||||||
|
#### Signing the binaries
|
||||||
|
|
||||||
|
Plugin binaries need to be signed to comply with modern operating system security requirements. Unsigned dynamic libraries may fail to load or trigger security warnings:
|
||||||
|
|
||||||
|
- **macOS**: Requires code signing (and often notarization) for `.dylib` files. Unsigned libraries may simply fail to load.
|
||||||
|
- **Windows**: SmartScreen may block unsigned binaries, and corporate environments often enforce signed code only.
|
||||||
|
- **Linux**: Generally allows unsigned `.so` files, but some sandboxed environments (Flatpak, Snap) impose restrictions.
|
||||||
|
|
||||||
|
**How signing is implemented:**
|
||||||
|
|
||||||
|
1. **TeamCity Configuration**: [ijplatform_master_Net_Deploy_Plugins_Public_Godot](https://buildserver.labs.intellij.net/buildConfiguration/ijplatform_master_Net_Deploy_Plugins_Public_Godot) (internal JetBrains link)
|
||||||
|
- Note: The automatic trigger on new tags is currently not working, so manual triggering is required.
|
||||||
|
|
||||||
|
2. **Release Process**:
|
||||||
|
- First, use your GitHub Action to prepare a **pre-release** with a tag
|
||||||
|
- Manually trigger the TeamCity configuration on the necessary branch/tag
|
||||||
|
- The configuration will download assets, sign them, and upload them back (removing the pre-release flag)
|
||||||
|
- The pre-release flag is required at the start; otherwise, the signing configuration will skip the release (protection against double signing)
|
||||||
|
|
||||||
|
3. **Signing existing releases**:
|
||||||
|
- You can run signing on already existing old releases/tags
|
||||||
|
- Mark them as pre-release first, then run the configuration on the necessary tag
|
||||||
21
addons/rider-plugin/LICENCE
Normal file
21
addons/rider-plugin/LICENCE
Normal file
@@ -0,0 +1,21 @@
|
|||||||
|
MIT License
|
||||||
|
|
||||||
|
Copyright (c) 2025 JetBrains
|
||||||
|
|
||||||
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
|
of this software and associated documentation files (the "Software"), to deal
|
||||||
|
in the Software without restriction, including without limitation the rights
|
||||||
|
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||||
|
copies of the Software, and to permit persons to whom the Software is
|
||||||
|
furnished to do so, subject to the following conditions:
|
||||||
|
|
||||||
|
The above copyright notice and this permission notice shall be included in all
|
||||||
|
copies or substantial portions of the Software.
|
||||||
|
|
||||||
|
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||||
|
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||||
|
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||||
|
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||||
|
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||||
|
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||||
|
SOFTWARE.
|
||||||
51
addons/rider-plugin/README.md
Normal file
51
addons/rider-plugin/README.md
Normal file
@@ -0,0 +1,51 @@
|
|||||||
|
# JetBrains Rider Integration – Godot addon
|
||||||
|
|
||||||
|
This addon currently provides two features:
|
||||||
|
1. Finds all Rider installations in the system and provides a selector on the `Text Editor` -> `External` tab in the settings to select one.
|
||||||
|
2. Provides the "Use Rider" toggle in the Godot toolbar and, when enabled, applies a set of editor settings recommended for working with JetBrains Rider. The goal is to make it trivial to switch between Rider‑optimized settings and stock Godot settings with a single click.
|
||||||
|
|
||||||
|
## Quick start
|
||||||
|
|
||||||
|
Requirements:
|
||||||
|
- Godot 4.2.2+
|
||||||
|
|
||||||
|
Install:
|
||||||
|
1. Inside the Godot editor, it can be installed from the AssetLib view or [downloaded](https://godotengine.org/asset-library/asset/4576)
|
||||||
|
2. [Optional] Change the initial value of `active` in the plugin.cfg
|
||||||
|
3. [Optional] Change the initial values in the presets.json file.
|
||||||
|
4. Enable "JetBrains Rider External Editor" plugin in the Project → Project Settings… → Plugins tab.
|
||||||
|
|
||||||
|
Use:
|
||||||
|
- A toolbar toggle named "Use Rider" will appear. Click it to turn the preset On/Off.
|
||||||
|
|
||||||
|
Screenshot:
|
||||||
|

|
||||||
|
|
||||||
|
## What the toggle changes
|
||||||
|
|
||||||
|
The preset values live in `presets.json`.
|
||||||
|
|
||||||
|
When ON:
|
||||||
|
- Write the values from the "on" preset into the Editor Settings.
|
||||||
|
|
||||||
|
When OFF:
|
||||||
|
- Write the values from the "off" preset into the Editor Settings.
|
||||||
|
|
||||||
|
Note: The plugin does not currently auto‑set Rider’s executable path or flags. See Plans below.
|
||||||
|
|
||||||
|
## Setting Rider to be the external editor
|
||||||
|
|
||||||
|
The plugin automatically detects installed Rider versions on your system and provides a convenient dropdown menu to
|
||||||
|
select which installation to use as your external editor.
|
||||||
|
|
||||||
|
- The plugin scans common installation locations for Rider on Windows, macOS, and Linux.
|
||||||
|
- Detected installations appear in the "Select Rider" dropdown in the toolbar.
|
||||||
|
- When you select a Rider installation, the plugin automatically updates the `dotnet/editor/external_editor_path` editor
|
||||||
|
setting.
|
||||||
|
|
||||||
|
## License
|
||||||
|
See `addons/rider-plugin/LICENCE`.
|
||||||
|
|
||||||
|
## Acknowledgements
|
||||||
|
Created by JetBrains to streamline using Rider with Godot.
|
||||||
|
Initial idea https://github.com/sszigeti/toggle_external_editor
|
||||||
144
addons/rider-plugin/icons/icon.svg
Normal file
144
addons/rider-plugin/icons/icon.svg
Normal file
@@ -0,0 +1,144 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||||
|
<!-- Generator: Adobe Illustrator 25.4.1, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
|
||||||
|
|
||||||
|
<svg
|
||||||
|
version="1.0"
|
||||||
|
id="katman_1"
|
||||||
|
x="0px"
|
||||||
|
y="0px"
|
||||||
|
viewBox="0 0 512 512"
|
||||||
|
xml:space="preserve"
|
||||||
|
sodipodi:docname="JetBrains Rider Icon.svg"
|
||||||
|
width="512"
|
||||||
|
height="512"
|
||||||
|
inkscape:version="1.1.1 (3bf5ae0d25, 2021-09-20)"
|
||||||
|
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"><defs
|
||||||
|
id="defs43" /><sodipodi:namedview
|
||||||
|
id="namedview41"
|
||||||
|
pagecolor="#505050"
|
||||||
|
bordercolor="#ffffff"
|
||||||
|
borderopacity="1"
|
||||||
|
inkscape:pageshadow="0"
|
||||||
|
inkscape:pageopacity="0"
|
||||||
|
inkscape:pagecheckerboard="1"
|
||||||
|
showgrid="false"
|
||||||
|
inkscape:zoom="1.0980553"
|
||||||
|
inkscape:cx="256.36233"
|
||||||
|
inkscape:cy="212.19333"
|
||||||
|
inkscape:window-width="1920"
|
||||||
|
inkscape:window-height="1027"
|
||||||
|
inkscape:window-x="-8"
|
||||||
|
inkscape:window-y="22"
|
||||||
|
inkscape:window-maximized="1"
|
||||||
|
inkscape:current-layer="katman_1" />
|
||||||
|
<style
|
||||||
|
type="text/css"
|
||||||
|
id="style2">
|
||||||
|
.st0{fill:url(#SVGID_1_);}
|
||||||
|
.st1{fill:url(#SVGID_00000130622934180993703410000017420799098261276343_);}
|
||||||
|
.st2{fill:url(#SVGID_00000060739771362873723200000017991140373209755022_);}
|
||||||
|
.st3{fill:#FFFFFF;}
|
||||||
|
</style>
|
||||||
|
<symbol
|
||||||
|
id="rider"
|
||||||
|
viewBox="-35 -35 70 70">
|
||||||
|
<linearGradient
|
||||||
|
id="SVGID_1_"
|
||||||
|
gradientUnits="userSpaceOnUse"
|
||||||
|
x1="30.4897"
|
||||||
|
y1="5.1188998"
|
||||||
|
x2="-23.4683"
|
||||||
|
y2="-25.8451">
|
||||||
|
<stop
|
||||||
|
offset="0"
|
||||||
|
style="stop-color:#DD1265"
|
||||||
|
id="stop4" />
|
||||||
|
<stop
|
||||||
|
offset="0.483"
|
||||||
|
style="stop-color:#DD1265"
|
||||||
|
id="stop6" />
|
||||||
|
<stop
|
||||||
|
offset="0.942"
|
||||||
|
style="stop-color:#FDB60D"
|
||||||
|
id="stop8" />
|
||||||
|
</linearGradient>
|
||||||
|
<path
|
||||||
|
class="st0"
|
||||||
|
d="M 35,-7.7 -14.1,-35 18.8,13.9 25.5,9.5 Z"
|
||||||
|
id="path11" />
|
||||||
|
|
||||||
|
<linearGradient
|
||||||
|
id="SVGID_00000169517474296634577950000016895268102491994795_"
|
||||||
|
gradientUnits="userSpaceOnUse"
|
||||||
|
x1="-1.5839"
|
||||||
|
y1="-28.888"
|
||||||
|
x2="19.805099"
|
||||||
|
y2="30.174999">
|
||||||
|
<stop
|
||||||
|
offset="0.139"
|
||||||
|
style="stop-color:#087CFA"
|
||||||
|
id="stop13" />
|
||||||
|
<stop
|
||||||
|
offset="0.476"
|
||||||
|
style="stop-color:#DD1265"
|
||||||
|
id="stop15" />
|
||||||
|
<stop
|
||||||
|
offset="0.958"
|
||||||
|
style="stop-color:#087CFA"
|
||||||
|
id="stop17" />
|
||||||
|
</linearGradient>
|
||||||
|
<path
|
||||||
|
style="fill:url(#SVGID_00000169517474296634577950000016895268102491994795_)"
|
||||||
|
d="M 15.5,-18.9 9.3,-33.9 -4.3,-20.5 1.2,28.1 14.4,35 35,23 Z"
|
||||||
|
id="path20" />
|
||||||
|
|
||||||
|
<linearGradient
|
||||||
|
id="SVGID_00000135668350575375336630000014638141720088491653_"
|
||||||
|
gradientUnits="userSpaceOnUse"
|
||||||
|
x1="-17.5865"
|
||||||
|
y1="-27.071199"
|
||||||
|
x2="-1.7875"
|
||||||
|
y2="29.073799">
|
||||||
|
<stop
|
||||||
|
offset="0.278"
|
||||||
|
style="stop-color:#DD1265"
|
||||||
|
id="stop22" />
|
||||||
|
<stop
|
||||||
|
offset="0.968"
|
||||||
|
style="stop-color:#FDB60D"
|
||||||
|
id="stop24" />
|
||||||
|
</linearGradient>
|
||||||
|
<path
|
||||||
|
style="fill:url(#SVGID_00000135668350575375336630000014638141720088491653_)"
|
||||||
|
d="m -14.1,-35 -20.9,14.1 7.8,48.1 20.1,7.7 26,-21 z"
|
||||||
|
id="path27" />
|
||||||
|
<path
|
||||||
|
d="M 21,-21 H -21 V 21 H 21 Z"
|
||||||
|
id="path29" />
|
||||||
|
<path
|
||||||
|
class="st3"
|
||||||
|
d="m -0.6,13.6 h -15.8 v 2.7 h 15.8 z"
|
||||||
|
id="path31" />
|
||||||
|
<path
|
||||||
|
class="st3"
|
||||||
|
d="m 0.5,-15.8 h 6.2 c 5,0 8.4,3.4 8.4,7.7 0,4.4 -3.4,7.9 -8.4,7.9 L 0.5,0 Z m 3.5,3.2 v 9.5 h 2.7 c 2.8,0 4.8,-1.9 4.8,-4.6 0,-2.8 -1.9,-4.7 -4.8,-4.7 z"
|
||||||
|
id="path33" />
|
||||||
|
<path
|
||||||
|
class="st3"
|
||||||
|
d="m -15.7,-15.8 h 7.2 c 2,0 3.5,0.6 4.6,1.6 0.9,0.9 1.3,2.1 1.3,3.6 v 0.1 c 0,1.3 -0.3,2.3 -0.9,3.1 -0.6,0.8 -1.4,1.4 -2.4,1.8 L -2,0 h -4.1 l -3.3,-4.8 h -2.9 V 0 h -3.5 z m 7,7.7 c 0.8,0 1.5,-0.2 2,-0.6 0.5,-0.4 0.7,-1 0.7,-1.6 v -0.1 c 0,-0.8 -0.2,-1.3 -0.7,-1.7 -0.5,-0.3 -1.1,-0.6 -2,-0.6 h -3.4 v 4.5 h 3.4 z"
|
||||||
|
id="path35" />
|
||||||
|
</symbol>
|
||||||
|
<use
|
||||||
|
xlink:href="#rider"
|
||||||
|
width="70"
|
||||||
|
height="70"
|
||||||
|
x="-35"
|
||||||
|
y="-35"
|
||||||
|
transform="matrix(7.0682519,0,0,7.2481031,256,256)"
|
||||||
|
style="overflow:visible"
|
||||||
|
id="use38" />
|
||||||
|
</svg>
|
||||||
|
After Width: | Height: | Size: 3.9 KiB |
43
addons/rider-plugin/icons/icon.svg.import
Normal file
43
addons/rider-plugin/icons/icon.svg.import
Normal file
@@ -0,0 +1,43 @@
|
|||||||
|
[remap]
|
||||||
|
|
||||||
|
importer="texture"
|
||||||
|
type="CompressedTexture2D"
|
||||||
|
uid="uid://wrdrj6wednn8"
|
||||||
|
path="res://.godot/imported/icon.svg-45c914cff7482ba9564963fe65b548e4.ctex"
|
||||||
|
metadata={
|
||||||
|
"vram_texture": false
|
||||||
|
}
|
||||||
|
|
||||||
|
[deps]
|
||||||
|
|
||||||
|
source_file="res://addons/rider-plugin/icons/icon.svg"
|
||||||
|
dest_files=["res://.godot/imported/icon.svg-45c914cff7482ba9564963fe65b548e4.ctex"]
|
||||||
|
|
||||||
|
[params]
|
||||||
|
|
||||||
|
compress/mode=0
|
||||||
|
compress/high_quality=false
|
||||||
|
compress/lossy_quality=0.7
|
||||||
|
compress/uastc_level=0
|
||||||
|
compress/rdo_quality_loss=0.0
|
||||||
|
compress/hdr_compression=1
|
||||||
|
compress/normal_map=0
|
||||||
|
compress/channel_pack=0
|
||||||
|
mipmaps/generate=false
|
||||||
|
mipmaps/limit=-1
|
||||||
|
roughness/mode=0
|
||||||
|
roughness/src_normal=""
|
||||||
|
process/channel_remap/red=0
|
||||||
|
process/channel_remap/green=1
|
||||||
|
process/channel_remap/blue=2
|
||||||
|
process/channel_remap/alpha=3
|
||||||
|
process/fix_alpha_border=true
|
||||||
|
process/premult_alpha=false
|
||||||
|
process/normal_map_invert_y=false
|
||||||
|
process/hdr_as_srgb=false
|
||||||
|
process/hdr_clamp_exposure=false
|
||||||
|
process/size_limit=0
|
||||||
|
detect_3d/compress_to=1
|
||||||
|
svg/scale=1.0
|
||||||
|
editor/scale_with_editor_scale=false
|
||||||
|
editor/convert_colors_with_editor_theme=false
|
||||||
12
addons/rider-plugin/plugin.cfg
Normal file
12
addons/rider-plugin/plugin.cfg
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
[plugin]
|
||||||
|
|
||||||
|
name="JetBrains Rider External Editor"
|
||||||
|
description="Provides a toolbar toggle, to switch a set of settings on and off. Default set of settings helps to enable/disable the following settings recommended by the Rider documentation https://www.jetbrains.com/help/rider/Godot.html#optimize-godot-editor-for-rider"
|
||||||
|
author="JetBrains"
|
||||||
|
version="1.0.0"
|
||||||
|
script="rider-plugin.gd"
|
||||||
|
|
||||||
|
[presets]
|
||||||
|
|
||||||
|
active="on"
|
||||||
|
presets="presets.json"
|
||||||
15
addons/rider-plugin/presets.json
Normal file
15
addons/rider-plugin/presets.json
Normal file
@@ -0,0 +1,15 @@
|
|||||||
|
{
|
||||||
|
"on": {
|
||||||
|
"text_editor/external/use_external_editor": true,
|
||||||
|
"interface/editor/import_resources_when_unfocused": true,
|
||||||
|
"interface/editor/save_on_focus_loss": true,
|
||||||
|
"text_editor/behavior/files/auto_reload_scripts_on_external_change": true,
|
||||||
|
"run/window_placement/game_embed_mode": -1
|
||||||
|
},
|
||||||
|
"off": {
|
||||||
|
"text_editor/external/use_external_editor": false,
|
||||||
|
"interface/editor/import_resources_when_unfocused": false,
|
||||||
|
"interface/editor/save_on_focus_loss": false,
|
||||||
|
"text_editor/behavior/files/auto_reload_scripts_on_external_change": false
|
||||||
|
}
|
||||||
|
}
|
||||||
66
addons/rider-plugin/rider-plugin.gd
Normal file
66
addons/rider-plugin/rider-plugin.gd
Normal file
@@ -0,0 +1,66 @@
|
|||||||
|
@tool
|
||||||
|
extends EditorPlugin
|
||||||
|
|
||||||
|
var editor_settings: EditorSettings
|
||||||
|
var checkbutton: CheckButton
|
||||||
|
var _preset_applier: PresetApplier
|
||||||
|
var _settings_service: EditorSettingsService
|
||||||
|
var _locator_service: RiderLocatorService
|
||||||
|
var _plugin_cfg_path: String
|
||||||
|
var _presets_json_path: String
|
||||||
|
|
||||||
|
func _enter_tree() -> void:
|
||||||
|
editor_settings = EditorInterface.get_editor_settings()
|
||||||
|
var script_path := (get_script() as Script).resource_path
|
||||||
|
var plugin_dir := script_path.get_base_dir()
|
||||||
|
_plugin_cfg_path = plugin_dir + "/plugin.cfg"
|
||||||
|
var cfg := ConfigFile.new()
|
||||||
|
var err := cfg.load(_plugin_cfg_path)
|
||||||
|
if err != OK:
|
||||||
|
push_warning("Failed to load plugin.cfg: %s" % [err])
|
||||||
|
return
|
||||||
|
var active_str := str(cfg.get_value("presets", "active", "on"))
|
||||||
|
var is_active := active_str == "on"
|
||||||
|
var presets_rel_path := str(cfg.get_value("presets", "presets", "presets.json"))
|
||||||
|
_presets_json_path = plugin_dir + "/" + presets_rel_path
|
||||||
|
|
||||||
|
# Build UI
|
||||||
|
checkbutton = CheckButton.new()
|
||||||
|
checkbutton.text = "Use Rider"
|
||||||
|
checkbutton.tooltip_text = "Shortcut for setting recommended settings"
|
||||||
|
checkbutton.button_pressed = is_active
|
||||||
|
checkbutton.pressed.connect(_on_checkbutton_pressed)
|
||||||
|
add_control_to_container(EditorPlugin.CONTAINER_TOOLBAR, checkbutton)
|
||||||
|
|
||||||
|
# Initialize services and panel
|
||||||
|
_settings_service = EditorSettingsService.new()
|
||||||
|
_locator_service = RiderLocatorService.new()
|
||||||
|
_preset_applier = PresetApplier.new(_presets_json_path)
|
||||||
|
|
||||||
|
_locator_service.add_selector_in_editor_interface(_settings_service)
|
||||||
|
|
||||||
|
# Ensure settings reflect current state on startup
|
||||||
|
_preset_applier.apply_preset(editor_settings, is_active)
|
||||||
|
|
||||||
|
func _on_checkbutton_pressed() -> void:
|
||||||
|
var cfg := ConfigFile.new()
|
||||||
|
if cfg.load(_plugin_cfg_path) != OK:
|
||||||
|
push_warning("Failed to load plugin.cfg to update state")
|
||||||
|
return
|
||||||
|
var is_active := checkbutton.button_pressed
|
||||||
|
var key := _preset_applier.get_preset_key(is_active)
|
||||||
|
cfg.set_value("presets", "active", key)
|
||||||
|
var save_err := cfg.save(_plugin_cfg_path)
|
||||||
|
if save_err != OK:
|
||||||
|
push_warning("Failed to save plugin.cfg: %s" % [save_err])
|
||||||
|
# Apply selected preset to editor settings
|
||||||
|
_preset_applier.apply_preset(editor_settings, is_active)
|
||||||
|
|
||||||
|
func _exit_tree() -> void:
|
||||||
|
if checkbutton != null:
|
||||||
|
remove_control_from_container(EditorPlugin.CONTAINER_TOOLBAR, checkbutton)
|
||||||
|
checkbutton.queue_free()
|
||||||
|
|
||||||
|
var args = OS.get_cmdline_args()
|
||||||
|
if "--rider-addon-tests" in args:
|
||||||
|
print("==== rider-addon-tests finished ====")
|
||||||
1
addons/rider-plugin/rider-plugin.gd.uid
Normal file
1
addons/rider-plugin/rider-plugin.gd.uid
Normal file
@@ -0,0 +1 @@
|
|||||||
|
uid://c1x58xm2w1n20
|
||||||
BIN
addons/rider-plugin/screenshots/Toolbar.png
(Stored with Git LFS)
Normal file
BIN
addons/rider-plugin/screenshots/Toolbar.png
(Stored with Git LFS)
Normal file
Binary file not shown.
40
addons/rider-plugin/screenshots/Toolbar.png.import
Normal file
40
addons/rider-plugin/screenshots/Toolbar.png.import
Normal file
@@ -0,0 +1,40 @@
|
|||||||
|
[remap]
|
||||||
|
|
||||||
|
importer="texture"
|
||||||
|
type="CompressedTexture2D"
|
||||||
|
uid="uid://cypcl8lffxy6r"
|
||||||
|
path="res://.godot/imported/Toolbar.png-a521e2493bd3c08a829245b3129bb58f.ctex"
|
||||||
|
metadata={
|
||||||
|
"vram_texture": false
|
||||||
|
}
|
||||||
|
|
||||||
|
[deps]
|
||||||
|
|
||||||
|
source_file="res://addons/rider-plugin/screenshots/Toolbar.png"
|
||||||
|
dest_files=["res://.godot/imported/Toolbar.png-a521e2493bd3c08a829245b3129bb58f.ctex"]
|
||||||
|
|
||||||
|
[params]
|
||||||
|
|
||||||
|
compress/mode=0
|
||||||
|
compress/high_quality=false
|
||||||
|
compress/lossy_quality=0.7
|
||||||
|
compress/uastc_level=0
|
||||||
|
compress/rdo_quality_loss=0.0
|
||||||
|
compress/hdr_compression=1
|
||||||
|
compress/normal_map=0
|
||||||
|
compress/channel_pack=0
|
||||||
|
mipmaps/generate=false
|
||||||
|
mipmaps/limit=-1
|
||||||
|
roughness/mode=0
|
||||||
|
roughness/src_normal=""
|
||||||
|
process/channel_remap/red=0
|
||||||
|
process/channel_remap/green=1
|
||||||
|
process/channel_remap/blue=2
|
||||||
|
process/channel_remap/alpha=3
|
||||||
|
process/fix_alpha_border=true
|
||||||
|
process/premult_alpha=false
|
||||||
|
process/normal_map_invert_y=false
|
||||||
|
process/hdr_as_srgb=false
|
||||||
|
process/hdr_clamp_exposure=false
|
||||||
|
process/size_limit=0
|
||||||
|
detect_3d/compress_to=1
|
||||||
23
addons/rider-plugin/scripts/json_utils.gd
Normal file
23
addons/rider-plugin/scripts/json_utils.gd
Normal file
@@ -0,0 +1,23 @@
|
|||||||
|
@tool
|
||||||
|
## Simple JSON helpers for editor/runtime use.
|
||||||
|
## Keeps file and JSON parsing concerns out of feature code.
|
||||||
|
class_name JsonUtils
|
||||||
|
|
||||||
|
static func load_from_file(path: String) -> Variant:
|
||||||
|
# Returns parsed JSON value (Dictionary/Array/etc.) or null on error.
|
||||||
|
var file := FileAccess.open(path, FileAccess.READ)
|
||||||
|
if file == null:
|
||||||
|
push_warning("JsonUtils: Failed to open file: %s" % path)
|
||||||
|
return null
|
||||||
|
var text := file.get_as_text()
|
||||||
|
file.close()
|
||||||
|
var data: Variant = JSON.parse_string(text)
|
||||||
|
if data == null:
|
||||||
|
push_warning("JsonUtils: Invalid JSON in file: %s" % path)
|
||||||
|
return null
|
||||||
|
return data
|
||||||
|
|
||||||
|
static func load_dict_from_file(path: String) -> Dictionary:
|
||||||
|
# Returns Dictionary or empty {} on error.
|
||||||
|
var data := load_from_file(path) as Dictionary
|
||||||
|
return data
|
||||||
1
addons/rider-plugin/scripts/json_utils.gd.uid
Normal file
1
addons/rider-plugin/scripts/json_utils.gd.uid
Normal file
@@ -0,0 +1 @@
|
|||||||
|
uid://bci4kmk7h4j6a
|
||||||
112
addons/rider-plugin/scripts/locator/rider_locator_service.gd
Normal file
112
addons/rider-plugin/scripts/locator/rider_locator_service.gd
Normal file
@@ -0,0 +1,112 @@
|
|||||||
|
@tool
|
||||||
|
extends RefCounted
|
||||||
|
class_name RiderLocatorService
|
||||||
|
|
||||||
|
var _installations_found: Array = []
|
||||||
|
var _thread: Thread = null
|
||||||
|
|
||||||
|
func get_installations() -> Array:
|
||||||
|
var result: Array = RiderLocator.new().get_installations() # from the gdextension
|
||||||
|
return result
|
||||||
|
|
||||||
|
# todo
|
||||||
|
func fix_external_editor_if_supplied_in_commandline(_settings_service: EditorSettingsService, editor_settings: EditorSettings) -> bool:
|
||||||
|
# When Godot is started from Rider (or vice versa), we may receive the Rider path
|
||||||
|
# via command-line so we can keep Godot's external editor setting in sync.
|
||||||
|
# Supported form (only this one):
|
||||||
|
# --my_rider_path="/absolute/path/to/rider with possible spaces"
|
||||||
|
var args : Array = OS.get_cmdline_args()
|
||||||
|
var provided_rider_path := ""
|
||||||
|
for a_raw in args:
|
||||||
|
var a: String = str(a_raw)
|
||||||
|
if a.begins_with("--my_rider_path="):
|
||||||
|
provided_rider_path = a.substr("--my_rider_path=".length())
|
||||||
|
break
|
||||||
|
|
||||||
|
if provided_rider_path.is_empty():
|
||||||
|
return false
|
||||||
|
|
||||||
|
provided_rider_path = trim_quotes(provided_rider_path)
|
||||||
|
|
||||||
|
# Validate existence (file or dir)
|
||||||
|
var looks_existing := FileAccess.file_exists(provided_rider_path) || DirAccess.dir_exists_absolute(provided_rider_path)
|
||||||
|
if looks_existing:
|
||||||
|
_settings_service.set_external_editor_path(editor_settings, provided_rider_path)
|
||||||
|
print("Rider path provided via CLI (my_rider_path): ", provided_rider_path)
|
||||||
|
return true
|
||||||
|
else:
|
||||||
|
push_warning("my_rider_path was provided but does not exist: %s" % [provided_rider_path])
|
||||||
|
return false
|
||||||
|
|
||||||
|
func trim_quotes(s: String) -> String:
|
||||||
|
if s.begins_with('"') and s.ends_with('"') and s.length() >= 2:
|
||||||
|
return s.substr(1, s.length() - 2)
|
||||||
|
return s
|
||||||
|
|
||||||
|
|
||||||
|
func add_selector_in_editor_interface(_settings_service: EditorSettingsService):
|
||||||
|
_update_selector(_installations_found)
|
||||||
|
|
||||||
|
if _installations_found.is_empty() and _thread == null:
|
||||||
|
_thread = Thread.new()
|
||||||
|
_thread.start(_load_installations)
|
||||||
|
|
||||||
|
func _load_installations() -> void:
|
||||||
|
var array: Array = get_installations()
|
||||||
|
call_deferred("_on_installations_loaded", array)
|
||||||
|
|
||||||
|
func _on_installations_loaded(array: Array):
|
||||||
|
_installations_found = array
|
||||||
|
if _thread:
|
||||||
|
_thread.wait_to_finish()
|
||||||
|
_thread = null
|
||||||
|
_update_selector(_installations_found)
|
||||||
|
|
||||||
|
func _notification(what: int) -> void:
|
||||||
|
if what == NOTIFICATION_PREDELETE and _thread != null:
|
||||||
|
_thread.wait_to_finish()
|
||||||
|
|
||||||
|
func _update_selector(array: Array):
|
||||||
|
var name := "text_editor/external/editor"
|
||||||
|
var settings := EditorInterface.get_editor_settings()
|
||||||
|
|
||||||
|
if !(settings.has_setting(name)):
|
||||||
|
settings.set(name, 0)
|
||||||
|
|
||||||
|
var installations: Array = ["Custom"]
|
||||||
|
for element in array:
|
||||||
|
var display_name: String = element.get("display", "")
|
||||||
|
# Replace special characters that break PROPERTY_HINT_ENUM format
|
||||||
|
# Comma is the enum delimiter, colon is used for explicit value assignment
|
||||||
|
display_name = display_name.replace(",", " •").replace(":", " -")
|
||||||
|
installations.append(display_name)
|
||||||
|
var options :String = ",".join(installations)
|
||||||
|
|
||||||
|
settings.add_property_info({
|
||||||
|
"name": name,
|
||||||
|
"type":TYPE_INT,
|
||||||
|
"hint":PROPERTY_HINT_ENUM,
|
||||||
|
"hint_string": options
|
||||||
|
})
|
||||||
|
|
||||||
|
# Connect to settings changes to update external editor path when selection changes
|
||||||
|
if not settings.settings_changed.is_connected(_on_selection_changed):
|
||||||
|
settings.settings_changed.connect(_on_selection_changed.bind())
|
||||||
|
|
||||||
|
func _on_selection_changed() -> void:
|
||||||
|
var name := "text_editor/external/editor"
|
||||||
|
var settings := EditorInterface.get_editor_settings()
|
||||||
|
var selected_index: int = settings.get_setting(name)
|
||||||
|
|
||||||
|
# Index 0 is "Custom", so user manages the path manually
|
||||||
|
if selected_index == 0:
|
||||||
|
return
|
||||||
|
|
||||||
|
# Map to actual installation (offset by 1 because of "Custom" at index 0)
|
||||||
|
var installation_index := selected_index - 1
|
||||||
|
var installations_array = _installations_found
|
||||||
|
if installation_index >= 0 and installation_index < installations_array.size():
|
||||||
|
var installation = installations_array[installation_index]
|
||||||
|
var new_path: String = installation.get("path", "")
|
||||||
|
if not new_path.is_empty():
|
||||||
|
EditorSettingsService.new().set_external_editor_path(settings, new_path)
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
uid://cfsu1rbg0ypem
|
||||||
35
addons/rider-plugin/scripts/presets/preset_applier.gd
Normal file
35
addons/rider-plugin/scripts/presets/preset_applier.gd
Normal file
@@ -0,0 +1,35 @@
|
|||||||
|
@tool
|
||||||
|
extends RefCounted
|
||||||
|
class_name PresetApplier
|
||||||
|
|
||||||
|
var presets_path: String
|
||||||
|
|
||||||
|
func _init(p_path: String) -> void:
|
||||||
|
presets_path = p_path
|
||||||
|
|
||||||
|
func get_preset_key(is_active: bool) -> String:
|
||||||
|
return "on" if is_active else "off"
|
||||||
|
|
||||||
|
func apply_preset(editor_settings: EditorSettings, is_active: bool) -> void:
|
||||||
|
var data: Dictionary = JsonUtils.load_dict_from_file(presets_path)
|
||||||
|
if data.is_empty():
|
||||||
|
push_warning("Failed to load presets: %s" % presets_path)
|
||||||
|
return
|
||||||
|
|
||||||
|
var new_preset_key := get_preset_key(is_active)
|
||||||
|
var previous_preset_key := get_preset_key(not is_active)
|
||||||
|
|
||||||
|
if not data.has(new_preset_key):
|
||||||
|
push_warning("Preset '%s' not found in presets.json" % new_preset_key)
|
||||||
|
return
|
||||||
|
|
||||||
|
var new_preset := data[new_preset_key] as Dictionary
|
||||||
|
# Reset keys from previous preset that are missing in the new preset
|
||||||
|
if data.has(previous_preset_key):
|
||||||
|
var previous_preset := data[previous_preset_key] as Dictionary
|
||||||
|
for key in previous_preset:
|
||||||
|
if not new_preset.has(key):
|
||||||
|
editor_settings.set_setting(str(key), editor_settings.property_get_revert(str(key)))
|
||||||
|
# Apply the new preset
|
||||||
|
for key in new_preset:
|
||||||
|
editor_settings.set_setting(str(key), new_preset[key])
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
uid://bjiaycxso8h8u
|
||||||
@@ -0,0 +1,17 @@
|
|||||||
|
@tool
|
||||||
|
extends RefCounted
|
||||||
|
class_name EditorSettingsService
|
||||||
|
|
||||||
|
func set_external_editor_path(editor_settings: EditorSettings, path: String) -> void:
|
||||||
|
editor_settings.set_setting("text_editor/external/exec_path", path)
|
||||||
|
|
||||||
|
func has_valid_external_editor_path(editor_settings: EditorSettings) -> bool:
|
||||||
|
var has_setting: bool = editor_settings.has_setting("text_editor/external/exec_path")
|
||||||
|
if not has_setting:
|
||||||
|
return false
|
||||||
|
var path : String = editor_settings.get_setting("text_editor/external/exec_path")
|
||||||
|
var exists := not path.is_empty() && (FileAccess.file_exists(path) || DirAccess.dir_exists_absolute(path))
|
||||||
|
return exists
|
||||||
|
|
||||||
|
func set_use_external_editor(editor_settings: EditorSettings, enabled: bool) -> void:
|
||||||
|
editor_settings.set_setting("text_editor/external/use_external_editor", enabled)
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
uid://bdiu78ot0rrkc
|
||||||
42
forge/abilities/ForgeEffectApplicationBehavior.cs
Normal file
42
forge/abilities/ForgeEffectApplicationBehavior.cs
Normal file
@@ -0,0 +1,42 @@
|
|||||||
|
using Gamesmiths.Forge.Abilities;
|
||||||
|
using Gamesmiths.Forge.Core;
|
||||||
|
using Gamesmiths.Forge.Effects;
|
||||||
|
using Gamesmiths.Forge.Godot.Resources;
|
||||||
|
using Gamesmiths.Forge.Godot.Resources.Abilities;
|
||||||
|
using Godot;
|
||||||
|
|
||||||
|
namespace Movementtests.forge.abilities;
|
||||||
|
|
||||||
|
|
||||||
|
public class EffectApplicationBehavior(EffectData effectData) : IAbilityBehavior
|
||||||
|
{
|
||||||
|
private ActiveEffectHandle? _effectHandle;
|
||||||
|
public void OnStarted(AbilityBehaviorContext context)
|
||||||
|
{
|
||||||
|
GD.Print("This is applying the periodic effect to the flying weapon");
|
||||||
|
_effectHandle = context.Owner.EffectsManager.ApplyEffect(new Effect(effectData, new EffectOwnership(context.Owner, context.Owner)));
|
||||||
|
context.AbilityHandle.CommitAbility();
|
||||||
|
}
|
||||||
|
|
||||||
|
public void OnEnded(AbilityBehaviorContext context)
|
||||||
|
{
|
||||||
|
GD.Print("This is removing the periodic effect from the flying weapon");
|
||||||
|
if (_effectHandle is not null)
|
||||||
|
context.Owner.EffectsManager.RemoveEffect(_effectHandle);
|
||||||
|
context.InstanceHandle.End();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
[Tool]
|
||||||
|
[GlobalClass]
|
||||||
|
public partial class ForgeEffectApplicationBehavior : ForgeAbilityBehavior
|
||||||
|
{
|
||||||
|
[Export] public ForgeEffectData? EffectData { get; set; }
|
||||||
|
|
||||||
|
public override IAbilityBehavior GetBehavior()
|
||||||
|
{
|
||||||
|
if (EffectData == null)
|
||||||
|
throw new System.ArgumentException("EffectData is null");
|
||||||
|
return new EffectApplicationBehavior(EffectData.GetEffectData());
|
||||||
|
}
|
||||||
|
}
|
||||||
1
forge/abilities/ForgeEffectApplicationBehavior.cs.uid
Normal file
1
forge/abilities/ForgeEffectApplicationBehavior.cs.uid
Normal file
@@ -0,0 +1 @@
|
|||||||
|
uid://cl5hudinl1rex
|
||||||
59
forge/abilities/ForgeExplodingSwordBehavior.cs
Normal file
59
forge/abilities/ForgeExplodingSwordBehavior.cs
Normal file
@@ -0,0 +1,59 @@
|
|||||||
|
using Gamesmiths.Forge.Abilities;
|
||||||
|
using Gamesmiths.Forge.Core;
|
||||||
|
using Gamesmiths.Forge.Godot.Nodes;
|
||||||
|
using Gamesmiths.Forge.Godot.Resources.Abilities;
|
||||||
|
using Godot;
|
||||||
|
|
||||||
|
namespace Movementtests.forge.abilities;
|
||||||
|
|
||||||
|
public class ExplodingSwordBehavior(PackedScene explosion) : IAbilityBehavior
|
||||||
|
{
|
||||||
|
public void OnStarted(AbilityBehaviorContext context)
|
||||||
|
{
|
||||||
|
if (context.Owner is not Node3D owner)
|
||||||
|
{
|
||||||
|
context.InstanceHandle.End();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (explosion.Instantiate() is not Explosion explosion1)
|
||||||
|
{
|
||||||
|
GD.Print("Cannot instantiate");
|
||||||
|
context.InstanceHandle.End();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if (!owner.IsInsideTree())
|
||||||
|
{
|
||||||
|
GD.Print("Not inside tree");
|
||||||
|
context.InstanceHandle.End();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
GD.Print("EXPLOSION");
|
||||||
|
|
||||||
|
explosion1.Radius = 6f;
|
||||||
|
|
||||||
|
owner.GetTree().GetRoot().CallDeferred(Node.MethodName.AddChild, explosion1);
|
||||||
|
explosion1.CallDeferred(Node3D.MethodName.SetGlobalPosition, owner.GlobalPosition);
|
||||||
|
|
||||||
|
context.AbilityHandle.CommitAbility();
|
||||||
|
context.InstanceHandle.End();
|
||||||
|
}
|
||||||
|
|
||||||
|
public void OnEnded(AbilityBehaviorContext context)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
[Tool]
|
||||||
|
[GlobalClass]
|
||||||
|
public partial class ForgeExplodingSwordBehavior : ForgeAbilityBehavior
|
||||||
|
{
|
||||||
|
[Export] public PackedScene? Explosion { get; set; }
|
||||||
|
public override IAbilityBehavior GetBehavior()
|
||||||
|
{
|
||||||
|
if (Explosion == null)
|
||||||
|
throw new System.ArgumentException("Explosion is null");
|
||||||
|
return new ExplodingSwordBehavior(Explosion);
|
||||||
|
}
|
||||||
|
}
|
||||||
1
forge/abilities/ForgeExplodingSwordBehavior.cs.uid
Normal file
1
forge/abilities/ForgeExplodingSwordBehavior.cs.uid
Normal file
@@ -0,0 +1 @@
|
|||||||
|
uid://bnee6amtc2bhj
|
||||||
23
forge/abilities/ForgeInstantEndBehavior.cs
Normal file
23
forge/abilities/ForgeInstantEndBehavior.cs
Normal file
@@ -0,0 +1,23 @@
|
|||||||
|
using Gamesmiths.Forge.Abilities;
|
||||||
|
using Gamesmiths.Forge.Godot.Resources.Abilities;
|
||||||
|
using Godot;
|
||||||
|
|
||||||
|
namespace Movementtests.forge.abilities;
|
||||||
|
|
||||||
|
public class InstantEndBehavior : IAbilityBehavior
|
||||||
|
{
|
||||||
|
public void OnStarted(AbilityBehaviorContext context)
|
||||||
|
{
|
||||||
|
context.AbilityHandle.CommitAbility();
|
||||||
|
context.InstanceHandle.End();
|
||||||
|
}
|
||||||
|
|
||||||
|
public void OnEnded(AbilityBehaviorContext context) {}
|
||||||
|
}
|
||||||
|
|
||||||
|
[Tool]
|
||||||
|
[GlobalClass]
|
||||||
|
public partial class ForgeInstantEndBehavior : ForgeAbilityBehavior
|
||||||
|
{
|
||||||
|
public override IAbilityBehavior GetBehavior() => new InstantEndBehavior();
|
||||||
|
}
|
||||||
1
forge/abilities/ForgeInstantEndBehavior.cs.uid
Normal file
1
forge/abilities/ForgeInstantEndBehavior.cs.uid
Normal file
@@ -0,0 +1 @@
|
|||||||
|
uid://c7s5v7ii4nujg
|
||||||
@@ -1,26 +0,0 @@
|
|||||||
using System;
|
|
||||||
using Gamesmiths.Forge.Abilities;
|
|
||||||
using Gamesmiths.Forge.Cues;
|
|
||||||
using Gamesmiths.Forge.Effects;
|
|
||||||
using Gamesmiths.Forge.Effects.Components;
|
|
||||||
using Gamesmiths.Forge.Effects.Duration;
|
|
||||||
using Gamesmiths.Forge.Effects.Magnitudes;
|
|
||||||
using Gamesmiths.Forge.Effects.Modifiers;
|
|
||||||
using Gamesmiths.Forge.Tags;
|
|
||||||
using Godot;
|
|
||||||
using Movementtests.interfaces;
|
|
||||||
|
|
||||||
namespace Movementtests.forge.abilities;
|
|
||||||
|
|
||||||
[GlobalClass]
|
|
||||||
public partial class RAbilityBase : Resource
|
|
||||||
{
|
|
||||||
public RAbilityBase()
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
public virtual AbilityData Ability(TagContainer? tags, Node3D owner)
|
|
||||||
{
|
|
||||||
throw new NotImplementedException();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
uid://4eosgwb3h528
|
|
||||||
@@ -1,99 +0,0 @@
|
|||||||
using Gamesmiths.Forge.Abilities;
|
|
||||||
using Gamesmiths.Forge.Cues;
|
|
||||||
using Gamesmiths.Forge.Effects;
|
|
||||||
using Gamesmiths.Forge.Effects.Components;
|
|
||||||
using Gamesmiths.Forge.Effects.Duration;
|
|
||||||
using Gamesmiths.Forge.Effects.Magnitudes;
|
|
||||||
using Gamesmiths.Forge.Effects.Modifiers;
|
|
||||||
using Gamesmiths.Forge.Tags;
|
|
||||||
using Godot;
|
|
||||||
|
|
||||||
namespace Movementtests.forge.abilities;
|
|
||||||
|
|
||||||
[GlobalClass, Icon("res://assets/ui/IconGodotNode/white/icon_animation.png")]
|
|
||||||
public partial class REmpoweredAction(float cost, float cooldown, float manaRegenPause) : Resource
|
|
||||||
{
|
|
||||||
[Export(PropertyHint.Range, "0,100,1,or_greater")]
|
|
||||||
public float Cost { get; set; } = cost;
|
|
||||||
|
|
||||||
[Export(PropertyHint.Range, "0,10,0.1,or_greater")]
|
|
||||||
public float Cooldown { get; set; } = cooldown;
|
|
||||||
|
|
||||||
[Export(PropertyHint.Range, "0,10,0.1,or_greater")]
|
|
||||||
public float ManaRegenPause { get; set; } = manaRegenPause;
|
|
||||||
|
|
||||||
public REmpoweredAction() : this(20.0f, 1.0f, 3.0f)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
public AbilityData Ability(TagsManager tagsManager)
|
|
||||||
{
|
|
||||||
return new AbilityData(
|
|
||||||
name: "Empowered Action",
|
|
||||||
costEffect: CostEffect(tagsManager),
|
|
||||||
cooldownEffects: [CooldownEffect(tagsManager)],
|
|
||||||
instancingPolicy: AbilityInstancingPolicy.PerEntity,
|
|
||||||
behaviorFactory: () => new EmpoweredActionBehavior());
|
|
||||||
}
|
|
||||||
|
|
||||||
public EffectData CostEffect(TagsManager tagsManager)
|
|
||||||
{
|
|
||||||
return new(
|
|
||||||
"Empowered Action Mana Cost",
|
|
||||||
new DurationData(DurationType.Instant),
|
|
||||||
new[]
|
|
||||||
{
|
|
||||||
new Modifier(
|
|
||||||
"PlayerAttributeSet.Mana",
|
|
||||||
ModifierOperation.FlatBonus,
|
|
||||||
new ModifierMagnitude(
|
|
||||||
MagnitudeCalculationType.ScalableFloat,
|
|
||||||
new ScalableFloat(-Cost)
|
|
||||||
)
|
|
||||||
)
|
|
||||||
},
|
|
||||||
cues: new []
|
|
||||||
{
|
|
||||||
new CueData(
|
|
||||||
CueTags: Tag.RequestTag(tagsManager, "cues.resources.mana").GetSingleTagContainer(),
|
|
||||||
MinValue: 0,
|
|
||||||
MaxValue: 100,
|
|
||||||
MagnitudeType: CueMagnitudeType.AttributeValueChange,
|
|
||||||
MagnitudeAttribute: "PlayerAttributeSet.Mana"
|
|
||||||
)
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
public EffectData CooldownEffect(TagsManager tagsManager)
|
|
||||||
{
|
|
||||||
return new(
|
|
||||||
"Empowered Action Cooldown",
|
|
||||||
new DurationData(
|
|
||||||
DurationType.HasDuration,
|
|
||||||
new ModifierMagnitude(
|
|
||||||
MagnitudeCalculationType.ScalableFloat,
|
|
||||||
new ScalableFloat(Cooldown))),
|
|
||||||
effectComponents: new[]
|
|
||||||
{
|
|
||||||
new ModifierTagsEffectComponent(
|
|
||||||
tagsManager.RequestTagContainer(new[] { "cooldown.empoweredAction" })
|
|
||||||
)
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
public class EmpoweredActionBehavior : IAbilityBehavior
|
|
||||||
{
|
|
||||||
public void OnStarted(AbilityBehaviorContext context)
|
|
||||||
{
|
|
||||||
// Apply costs and cooldowns
|
|
||||||
context.AbilityHandle.CommitAbility();
|
|
||||||
context.InstanceHandle.End();
|
|
||||||
}
|
|
||||||
|
|
||||||
public void OnEnded(AbilityBehaviorContext context)
|
|
||||||
{
|
|
||||||
// Do any necessary cleanups
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
uid://d0l07gcx1ef18
|
|
||||||
@@ -1,95 +0,0 @@
|
|||||||
using System;
|
|
||||||
using Gamesmiths.Forge.Abilities;
|
|
||||||
using Gamesmiths.Forge.Core;
|
|
||||||
using Gamesmiths.Forge.Cues;
|
|
||||||
using Gamesmiths.Forge.Effects;
|
|
||||||
using Gamesmiths.Forge.Effects.Components;
|
|
||||||
using Gamesmiths.Forge.Effects.Duration;
|
|
||||||
using Gamesmiths.Forge.Effects.Magnitudes;
|
|
||||||
using Gamesmiths.Forge.Effects.Modifiers;
|
|
||||||
using Gamesmiths.Forge.Tags;
|
|
||||||
using Godot;
|
|
||||||
using Movementtests.interfaces;
|
|
||||||
using Movementtests.systems;
|
|
||||||
|
|
||||||
namespace Movementtests.forge.abilities;
|
|
||||||
|
|
||||||
public record struct ExplodingSwordCreation(Node3D Owner);
|
|
||||||
|
|
||||||
[GlobalClass, Icon("res://assets/ui/IconGodotNode/white/icon_projectile.png")]
|
|
||||||
public partial class RExplodingSword(PackedScene? explosion) : Resource, IAbilityBase<ExplodingSwordCreation, WeaponEventPayload>
|
|
||||||
{
|
|
||||||
[Export] public PackedScene? Explosion { get; set; } = explosion;
|
|
||||||
|
|
||||||
public RExplodingSword() : this(null) {}
|
|
||||||
|
|
||||||
public AbilityData Ability(ExplodingSwordCreation creationData, TagContainer? tags)
|
|
||||||
{
|
|
||||||
return new AbilityData(
|
|
||||||
name: "Exploding Sword Throw",
|
|
||||||
abilityTags: tags,
|
|
||||||
instancingPolicy: AbilityInstancingPolicy.PerEntity,
|
|
||||||
behaviorFactory: () => new ExplodingSwordThrowBehavior<WeaponEventPayload>(creationData.Owner, Explosion));
|
|
||||||
}
|
|
||||||
|
|
||||||
public IAbilityBehavior<WeaponEventPayload> Behavior(ExplodingSwordCreation creationData)
|
|
||||||
{
|
|
||||||
return new ExplodingSwordThrowBehavior<WeaponEventPayload>(creationData.Owner, Explosion);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public class ExplodingSwordThrowBehavior<TPayload>(Node3D owner, PackedScene? explosion) : IAbilityBehavior<TPayload>
|
|
||||||
{
|
|
||||||
private Node3D _owner = owner;
|
|
||||||
private PackedScene? _explosion = explosion;
|
|
||||||
public void OnStarted(AbilityBehaviorContext context, TPayload payload)
|
|
||||||
{
|
|
||||||
if (_explosion?.Instantiate() is not Explosion explosion)
|
|
||||||
{
|
|
||||||
GD.Print("Cannot instantiate");
|
|
||||||
context.InstanceHandle.End();
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
if (!_owner.IsInsideTree())
|
|
||||||
{
|
|
||||||
GD.Print("Not inside tree");
|
|
||||||
context.InstanceHandle.End();
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
GD.Print("EXPLOSION");
|
|
||||||
|
|
||||||
explosion.Radius = 6f;
|
|
||||||
|
|
||||||
_owner.GetTree().GetRoot().CallDeferred(Node.MethodName.AddChild, explosion);
|
|
||||||
explosion.CallDeferred(Node3D.MethodName.SetGlobalPosition, _owner.GlobalPosition);
|
|
||||||
|
|
||||||
context.AbilityHandle.CommitAbility();
|
|
||||||
context.InstanceHandle.End();
|
|
||||||
}
|
|
||||||
|
|
||||||
public void OnEnded(AbilityBehaviorContext context)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
public class FlyingSwordBehavior(IForgeEntity owner, EffectData effectData) : IAbilityBehavior
|
|
||||||
{
|
|
||||||
private ActiveEffectHandle? _effectHandle;
|
|
||||||
public void OnStarted(AbilityBehaviorContext context)
|
|
||||||
{
|
|
||||||
GD.Print("This is applying the periodic effect to the flying weapon");
|
|
||||||
_effectHandle = owner.EffectsManager.ApplyEffect(new Effect(effectData, new EffectOwnership(owner, owner)));
|
|
||||||
context.AbilityHandle.CommitAbility();
|
|
||||||
}
|
|
||||||
|
|
||||||
public void OnEnded(AbilityBehaviorContext context)
|
|
||||||
{
|
|
||||||
GD.Print("This is removing the periodic effect from the flying weapon");
|
|
||||||
if (_effectHandle is not null)
|
|
||||||
owner.EffectsManager.RemoveEffect(_effectHandle);
|
|
||||||
context.InstanceHandle.End();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
uid://rux15j7q78e8
|
|
||||||
@@ -1,30 +0,0 @@
|
|||||||
using System.Collections.Generic;
|
|
||||||
using Gamesmiths.Forge.Attributes;
|
|
||||||
using Gamesmiths.Forge.Core;
|
|
||||||
using Gamesmiths.Forge.Effects;
|
|
||||||
using Gamesmiths.Forge.Effects.Calculator;
|
|
||||||
using Gamesmiths.Forge.Effects.Magnitudes;
|
|
||||||
using Gamesmiths.Forge.Effects.Modifiers;
|
|
||||||
using Gamesmiths.Forge.Events;
|
|
||||||
using Godot;
|
|
||||||
using Movementtests.systems;
|
|
||||||
|
|
||||||
namespace Movementtests.tools.calculators;
|
|
||||||
|
|
||||||
|
|
||||||
public class FlyingWeaponExecution(WeaponSystem weaponSystem) : CustomExecution
|
|
||||||
{
|
|
||||||
public override ModifierEvaluatedData[] EvaluateExecution(Effect effect, IForgeEntity target, EffectEvaluatedData? effectEvaluatedData)
|
|
||||||
{
|
|
||||||
GD.Print("Custom execution executed");
|
|
||||||
weaponSystem.Events.Raise(new EventData<WeaponEventPayload>
|
|
||||||
{
|
|
||||||
EventTags = weaponSystem.WeaponFlyingTickEventTag.GetSingleTagContainer()!,
|
|
||||||
Source = weaponSystem,
|
|
||||||
EventMagnitude = 12f,
|
|
||||||
Payload = new WeaponEventPayload(Message: "flying")
|
|
||||||
});
|
|
||||||
|
|
||||||
return [];
|
|
||||||
}
|
|
||||||
}
|
|
||||||
48
forge/calculators/ForgeRaiseEventTagExecution.cs
Normal file
48
forge/calculators/ForgeRaiseEventTagExecution.cs
Normal file
@@ -0,0 +1,48 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using Gamesmiths.Forge.Attributes;
|
||||||
|
using Gamesmiths.Forge.Core;
|
||||||
|
using Gamesmiths.Forge.Effects;
|
||||||
|
using Gamesmiths.Forge.Effects.Calculator;
|
||||||
|
using Gamesmiths.Forge.Effects.Magnitudes;
|
||||||
|
using Gamesmiths.Forge.Effects.Modifiers;
|
||||||
|
using Gamesmiths.Forge.Events;
|
||||||
|
using Gamesmiths.Forge.Godot.Resources;
|
||||||
|
using Gamesmiths.Forge.Godot.Resources.Calculators;
|
||||||
|
using Gamesmiths.Forge.Tags;
|
||||||
|
using Godot;
|
||||||
|
using Movementtests.systems;
|
||||||
|
|
||||||
|
namespace Movementtests.tools.calculators;
|
||||||
|
|
||||||
|
|
||||||
|
public class FlyingWeaponExecution(TagContainer eventTags) : CustomExecution
|
||||||
|
{
|
||||||
|
public override ModifierEvaluatedData[] EvaluateExecution(Effect effect, IForgeEntity target, EffectEvaluatedData? effectEvaluatedData)
|
||||||
|
{
|
||||||
|
GD.Print("Custom execution executed");
|
||||||
|
var owner = effect.Ownership.Owner;
|
||||||
|
if (owner == null) return [];
|
||||||
|
|
||||||
|
owner.Events.Raise(new EventData
|
||||||
|
{
|
||||||
|
EventTags = eventTags,
|
||||||
|
Source = owner,
|
||||||
|
EventMagnitude = 12f
|
||||||
|
});
|
||||||
|
|
||||||
|
return [];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
[GlobalClass]
|
||||||
|
public partial class ForgeRaiseEventTagExecution : ForgeCustomExecution
|
||||||
|
{
|
||||||
|
[Export] ForgeTagContainer EventTags { get; set; } = new();
|
||||||
|
|
||||||
|
public override CustomExecution GetExecutionClass()
|
||||||
|
{
|
||||||
|
return new FlyingWeaponExecution(EventTags.GetTagContainer());
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -1,58 +0,0 @@
|
|||||||
using Gamesmiths.Forge.Cues;
|
|
||||||
using Gamesmiths.Forge.Effects;
|
|
||||||
using Gamesmiths.Forge.Effects.Duration;
|
|
||||||
using Gamesmiths.Forge.Effects.Magnitudes;
|
|
||||||
using Gamesmiths.Forge.Effects.Modifiers;
|
|
||||||
using Gamesmiths.Forge.Effects.Periodic;
|
|
||||||
using Gamesmiths.Forge.Tags;
|
|
||||||
using Godot;
|
|
||||||
|
|
||||||
namespace Movementtests.tools.effects;
|
|
||||||
|
|
||||||
[GlobalClass, Icon("res://assets/ui/IconGodotNode/white/icon_liquid.png")]
|
|
||||||
public partial class RManaRegen(float manaRegenRate, float frequency) : Resource
|
|
||||||
{
|
|
||||||
[Export(PropertyHint.Range, "0,100,0.1,or_greater")]
|
|
||||||
public float ManaRegenRate { get; set; } = manaRegenRate;
|
|
||||||
|
|
||||||
[Export(PropertyHint.Range, "0.01,1,0.01,or_greater")]
|
|
||||||
public float Frequency { get; set; } = frequency;
|
|
||||||
|
|
||||||
public RManaRegen() : this(1.0f, 0.1f)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
public EffectData ManaRegen(TagsManager tagsManager)
|
|
||||||
{
|
|
||||||
return new EffectData(
|
|
||||||
"Mana Regen",
|
|
||||||
durationData: new DurationData(
|
|
||||||
DurationType.Infinite
|
|
||||||
),
|
|
||||||
modifiers: [
|
|
||||||
new Modifier(
|
|
||||||
"PlayerAttributeSet.Mana",
|
|
||||||
ModifierOperation.FlatBonus,
|
|
||||||
new ModifierMagnitude(
|
|
||||||
MagnitudeCalculationType.ScalableFloat,
|
|
||||||
new ScalableFloat(ManaRegenRate * Frequency))
|
|
||||||
)
|
|
||||||
],
|
|
||||||
cues: new []
|
|
||||||
{
|
|
||||||
new CueData(
|
|
||||||
CueTags: Tag.RequestTag(tagsManager, "cues.resources.mana").GetSingleTagContainer(),
|
|
||||||
MinValue: 0,
|
|
||||||
MaxValue: 100,
|
|
||||||
MagnitudeType: CueMagnitudeType.AttributeValueChange,
|
|
||||||
MagnitudeAttribute: "PlayerAttributeSet.Mana"
|
|
||||||
)
|
|
||||||
},
|
|
||||||
periodicData: new PeriodicData(
|
|
||||||
Period: new ScalableFloat(Frequency),
|
|
||||||
ExecuteOnApplication: true,
|
|
||||||
PeriodInhibitionRemovedPolicy: PeriodInhibitionRemovedPolicy.ResetPeriod
|
|
||||||
)
|
|
||||||
);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
uid://di04jvuqp0h7m
|
|
||||||
@@ -4,4 +4,4 @@
|
|||||||
|
|
||||||
[resource]
|
[resource]
|
||||||
script = ExtResource("1_l686n")
|
script = ExtResource("1_l686n")
|
||||||
RegisteredTags = Array[String](["effect.fire", "effect.wet", "cue.floating.text", "cue.vfx.fire", "cue.vfx.wet", "cue.vfx.regen", "cooldown.enemy.attack", "set_by_caller.damage", "event.damage", "cooldown", "cooldown.skill.projectile", "cooldown.skill.shield", "cooldown.skill.dash", "movement.block", "immunity.damage", "effect.mana_shield", "cue.vfx.shield", "event.damage.taken", "event.damage.dealt", "event", "set_by_caller", "trait.flammable", "trait.healable", "trait.damageable", "trait.wettable", "cue.vfx.reflect", "cue.vfx", "cooldown.skill", "cooldown.skill.reflect"])
|
RegisteredTags = Array[String](["effect.fire", "effect.wet", "cue.floating.text", "cue.vfx.fire", "cue.vfx.wet", "cue.vfx.regen", "cooldown.enemy.attack", "set_by_caller.damage", "event.damage", "cooldown", "cooldown.skill.projectile", "cooldown.skill.shield", "cooldown.skill.dash", "movement.block", "immunity.damage", "effect.mana_shield", "cue.vfx.shield", "event", "event.player.empowered_action_used", "event.damage.taken", "event.damage.dealt", "set_by_caller", "trait.flammable", "trait.healable", "trait.damageable", "trait.wettable", "cue.vfx.reflect", "cue.vfx", "cooldown.skill", "cooldown.skill.reflect"])
|
||||||
|
|||||||
@@ -46,7 +46,7 @@ movie_writer/movie_file="D:/Godot/Projects/movement-tests/communication/movie.av
|
|||||||
|
|
||||||
[editor_plugins]
|
[editor_plugins]
|
||||||
|
|
||||||
enabled=PackedStringArray("res://addons/csg_toolkit/plugin.cfg", "res://addons/forge/plugin.cfg", "res://addons/gdUnit4/plugin.cfg", "res://addons/godot_state_charts/plugin.cfg", "res://addons/guide/plugin.cfg", "res://addons/maaacks_game_template/plugin.cfg", "res://addons/shaker/plugin.cfg")
|
enabled=PackedStringArray("res://addons/csg_toolkit/plugin.cfg", "res://addons/forge/plugin.cfg", "res://addons/gdUnit4/plugin.cfg", "res://addons/godot_state_charts/plugin.cfg", "res://addons/guide/plugin.cfg", "res://addons/maaacks_game_template/plugin.cfg", "res://addons/rider-plugin/plugin.cfg", "res://addons/shaker/plugin.cfg")
|
||||||
|
|
||||||
[gui]
|
[gui]
|
||||||
|
|
||||||
|
|||||||
@@ -5,21 +5,20 @@
|
|||||||
[ext_resource type="Script" uid="uid://jitubgv6judn" path="res://scenes/components/damage/RDamage.cs" id="2_x835q"]
|
[ext_resource type="Script" uid="uid://jitubgv6judn" path="res://scenes/components/damage/RDamage.cs" id="2_x835q"]
|
||||||
[ext_resource type="Script" uid="uid://b44cse62qru7j" path="res://scenes/components/knockback/RKnockback.cs" id="3_cb2lu"]
|
[ext_resource type="Script" uid="uid://b44cse62qru7j" path="res://scenes/components/knockback/RKnockback.cs" id="3_cb2lu"]
|
||||||
[ext_resource type="Resource" uid="uid://bl5crtu1gkrtr" path="res://inputs/base_mode/base_mode.tres" id="3_cresl"]
|
[ext_resource type="Resource" uid="uid://bl5crtu1gkrtr" path="res://inputs/base_mode/base_mode.tres" id="3_cresl"]
|
||||||
[ext_resource type="Resource" uid="uid://dtmhtlix2amme" path="res://scenes/player_controller/resources/player_mana_regen.tres" id="3_n24vh"]
|
|
||||||
[ext_resource type="PackedScene" uid="uid://c4ikbhojckpnc" path="res://scenes/components/health/CHealth.tscn" id="3_q7bng"]
|
[ext_resource type="PackedScene" uid="uid://c4ikbhojckpnc" path="res://scenes/components/health/CHealth.tscn" id="3_q7bng"]
|
||||||
[ext_resource type="Resource" uid="uid://cdxbwirfiaipi" path="res://scenes/player_controller/resources/forge/exploding_sword_throw.tres" id="4_11013"]
|
|
||||||
[ext_resource type="Script" uid="uid://baiapod3csndf" path="res://scenes/components/health/RHealth.cs" id="4_abfq8"]
|
[ext_resource type="Script" uid="uid://baiapod3csndf" path="res://scenes/components/health/RHealth.cs" id="4_abfq8"]
|
||||||
[ext_resource type="Resource" uid="uid://bjyd801wvverk" path="res://scenes/player_controller/resources/player_health.tres" id="4_m8gvy"]
|
[ext_resource type="Resource" uid="uid://bjyd801wvverk" path="res://scenes/player_controller/resources/player_health.tres" id="4_m8gvy"]
|
||||||
[ext_resource type="Resource" uid="uid://cpdaw41ah5gic" path="res://inputs/base_mode/rotate_y.tres" id="4_rxwoh"]
|
[ext_resource type="Resource" uid="uid://cpdaw41ah5gic" path="res://inputs/base_mode/rotate_y.tres" id="4_rxwoh"]
|
||||||
|
[ext_resource type="Resource" uid="uid://dh437cuxgjv6b" path="res://scenes/player_controller/resources/forge/mana_regeneration.tres" id="5_2rkt1"]
|
||||||
[ext_resource type="Resource" uid="uid://ccrb5xsnphc8" path="res://inputs/base_mode/rotate_floorplane.tres" id="5_4u7i3"]
|
[ext_resource type="Resource" uid="uid://ccrb5xsnphc8" path="res://inputs/base_mode/rotate_floorplane.tres" id="5_4u7i3"]
|
||||||
[ext_resource type="PackedScene" uid="uid://hpsg4fqwrx1u" path="res://scenes/components/damage/CDamageable.tscn" id="5_jb43f"]
|
[ext_resource type="PackedScene" uid="uid://hpsg4fqwrx1u" path="res://scenes/components/damage/CDamageable.tscn" id="5_jb43f"]
|
||||||
[ext_resource type="Resource" uid="uid://f3vs6l4m623s" path="res://inputs/base_mode/move_left.tres" id="5_q14ux"]
|
[ext_resource type="Resource" uid="uid://f3vs6l4m623s" path="res://inputs/base_mode/move_left.tres" id="5_q14ux"]
|
||||||
[ext_resource type="PackedScene" uid="uid://duju3atqgltkg" path="res://scenes/explosion/explosion.tscn" id="5_ue7xq"]
|
[ext_resource type="PackedScene" uid="uid://duju3atqgltkg" path="res://scenes/explosion/explosion.tscn" id="5_ue7xq"]
|
||||||
[ext_resource type="Resource" uid="uid://dyru7mxo121w6" path="res://scenes/player_controller/resources/player_normal_damage_mod.tres" id="6_cmijs"]
|
[ext_resource type="Resource" uid="uid://dyru7mxo121w6" path="res://scenes/player_controller/resources/player_normal_damage_mod.tres" id="6_cmijs"]
|
||||||
[ext_resource type="Resource" uid="uid://t612lts1wi1s" path="res://inputs/base_mode/move_right.tres" id="6_q7bng"]
|
[ext_resource type="Resource" uid="uid://t612lts1wi1s" path="res://inputs/base_mode/move_right.tres" id="6_q7bng"]
|
||||||
|
[ext_resource type="Resource" uid="uid://cffil4tic3ysg" path="res://scenes/player_controller/resources/forge/inhibit_mana_regen_temporarily.tres" id="6_u8yay"]
|
||||||
[ext_resource type="Script" uid="uid://cwbvxlfvmocc1" path="res://scenes/player_controller/scripts/StairsSystem.cs" id="7_bmt5a"]
|
[ext_resource type="Script" uid="uid://cwbvxlfvmocc1" path="res://scenes/player_controller/scripts/StairsSystem.cs" id="7_bmt5a"]
|
||||||
[ext_resource type="Resource" uid="uid://brswsknpgwal2" path="res://inputs/base_mode/move_front.tres" id="7_m8gvy"]
|
[ext_resource type="Resource" uid="uid://brswsknpgwal2" path="res://inputs/base_mode/move_front.tres" id="7_m8gvy"]
|
||||||
[ext_resource type="Resource" uid="uid://7dpkk5rk3di5" path="res://scenes/player_controller/resources/forge/empowered_action.tres" id="7_qheee"]
|
|
||||||
[ext_resource type="PackedScene" uid="uid://bctpe34ddamg5" path="res://scenes/components/knockback/CKnockback.tscn" id="7_x835q"]
|
[ext_resource type="PackedScene" uid="uid://bctpe34ddamg5" path="res://scenes/components/knockback/CKnockback.tscn" id="7_x835q"]
|
||||||
[ext_resource type="Resource" uid="uid://s1l0n1iitc6m" path="res://inputs/base_mode/move_back.tres" id="8_jb43f"]
|
[ext_resource type="Resource" uid="uid://s1l0n1iitc6m" path="res://inputs/base_mode/move_back.tres" id="8_jb43f"]
|
||||||
[ext_resource type="Resource" uid="uid://j1o5ud0plk4" path="res://inputs/base_mode/aim_release.tres" id="8_lhb11"]
|
[ext_resource type="Resource" uid="uid://j1o5ud0plk4" path="res://inputs/base_mode/aim_release.tres" id="8_lhb11"]
|
||||||
@@ -28,11 +27,13 @@
|
|||||||
[ext_resource type="PackedScene" uid="uid://wq1okogkhc5l" path="res://scenes/player_controller/components/mantle/mantle_system.tscn" id="8_qu4wy"]
|
[ext_resource type="PackedScene" uid="uid://wq1okogkhc5l" path="res://scenes/player_controller/components/mantle/mantle_system.tscn" id="8_qu4wy"]
|
||||||
[ext_resource type="AudioStream" uid="uid://clfggn87oeg1s" path="res://scenes/player_controller/audio/InteractiveSFX.tres" id="9_jb43f"]
|
[ext_resource type="AudioStream" uid="uid://clfggn87oeg1s" path="res://scenes/player_controller/audio/InteractiveSFX.tres" id="9_jb43f"]
|
||||||
[ext_resource type="Resource" uid="uid://bebstkm608wxx" path="res://inputs/base_mode/aim_pressed.tres" id="9_nob5r"]
|
[ext_resource type="Resource" uid="uid://bebstkm608wxx" path="res://inputs/base_mode/aim_pressed.tres" id="9_nob5r"]
|
||||||
|
[ext_resource type="Resource" uid="uid://dccuj66egxfwh" path="res://scenes/player_controller/resources/forge/empowered_action.tres" id="10_2rkt1"]
|
||||||
[ext_resource type="Resource" uid="uid://bdit2jy5gbpts" path="res://inputs/base_mode/jump.tres" id="10_4u7i3"]
|
[ext_resource type="Resource" uid="uid://bdit2jy5gbpts" path="res://inputs/base_mode/jump.tres" id="10_4u7i3"]
|
||||||
[ext_resource type="Script" uid="uid://cxihb42t2mfqi" path="res://addons/forge/nodes/ForgeAttributeSet.cs" id="10_pw5r7"]
|
[ext_resource type="Script" uid="uid://cxihb42t2mfqi" path="res://addons/forge/nodes/ForgeAttributeSet.cs" id="10_pw5r7"]
|
||||||
[ext_resource type="Script" uid="uid://ccovd5i0wr3kk" path="res://addons/forge/editor/attributes/AttributeValues.cs" id="11_2rkt1"]
|
[ext_resource type="Script" uid="uid://ccovd5i0wr3kk" path="res://addons/forge/editor/attributes/AttributeValues.cs" id="11_2rkt1"]
|
||||||
[ext_resource type="Resource" uid="uid://b5gx3q8nvu72e" path="res://inputs/base_mode/hit.tres" id="11_cresl"]
|
[ext_resource type="Resource" uid="uid://b5gx3q8nvu72e" path="res://inputs/base_mode/hit.tres" id="11_cresl"]
|
||||||
[ext_resource type="PackedScene" uid="uid://0ysqmqphq6mq" path="res://scenes/player_controller/components/head/head_system.tscn" id="11_rxwoh"]
|
[ext_resource type="PackedScene" uid="uid://0ysqmqphq6mq" path="res://scenes/player_controller/components/head/head_system.tscn" id="11_rxwoh"]
|
||||||
|
[ext_resource type="Script" uid="uid://dpakv7agvir6y" path="res://addons/forge/resources/ForgeTag.cs" id="11_u8yay"]
|
||||||
[ext_resource type="Resource" uid="uid://d2r0ur8k3cuu3" path="res://inputs/base_mode/dash.tres" id="12_34snm"]
|
[ext_resource type="Resource" uid="uid://d2r0ur8k3cuu3" path="res://inputs/base_mode/dash.tres" id="12_34snm"]
|
||||||
[ext_resource type="Resource" uid="uid://55b0dsvioj08" path="res://inputs/base_mode/jump_pressed.tres" id="13_nob5r"]
|
[ext_resource type="Resource" uid="uid://55b0dsvioj08" path="res://inputs/base_mode/jump_pressed.tres" id="13_nob5r"]
|
||||||
[ext_resource type="Shape3D" uid="uid://keseacdcooot" path="res://scenes/player_controller/resources/PlayerShape.tres" id="13_r7i3q"]
|
[ext_resource type="Shape3D" uid="uid://keseacdcooot" path="res://scenes/player_controller/resources/PlayerShape.tres" id="13_r7i3q"]
|
||||||
@@ -58,6 +59,11 @@
|
|||||||
[ext_resource type="Texture2D" uid="uid://c40orhfdgsim" path="res://assets/ui/IconGodotNode/white/icon_circle.png" id="45_u8rdp"]
|
[ext_resource type="Texture2D" uid="uid://c40orhfdgsim" path="res://assets/ui/IconGodotNode/white/icon_circle.png" id="45_u8rdp"]
|
||||||
[ext_resource type="PackedScene" uid="uid://cyw8p0p6a78tl" path="res://scenes/ui/healthbar/healthbar.tscn" id="47_76kmc"]
|
[ext_resource type="PackedScene" uid="uid://cyw8p0p6a78tl" path="res://scenes/ui/healthbar/healthbar.tscn" id="47_76kmc"]
|
||||||
|
|
||||||
|
[sub_resource type="Resource" id="Resource_5gbhg"]
|
||||||
|
script = ExtResource("11_u8yay")
|
||||||
|
Tag = "events.player.empowered_action_used"
|
||||||
|
metadata/_custom_type_script = "uid://dpakv7agvir6y"
|
||||||
|
|
||||||
[sub_resource type="Resource" id="Resource_cb2lu"]
|
[sub_resource type="Resource" id="Resource_cb2lu"]
|
||||||
script = ExtResource("2_x835q")
|
script = ExtResource("2_x835q")
|
||||||
DamageDealt = 10.0
|
DamageDealt = 10.0
|
||||||
@@ -142,9 +148,10 @@ bg_color = Color(0.15869555, 0.64034444, 0.906125, 1)
|
|||||||
[node name="Player" type="CharacterBody3D" unique_id=709076448]
|
[node name="Player" type="CharacterBody3D" unique_id=709076448]
|
||||||
collision_mask = 272
|
collision_mask = 272
|
||||||
script = ExtResource("1_poq2x")
|
script = ExtResource("1_poq2x")
|
||||||
EmpoweredAction = ExtResource("7_qheee")
|
EmpoweredActionUsed = SubResource("Resource_5gbhg")
|
||||||
ManaRegen = ExtResource("3_n24vh")
|
EmpoweredActionAbility = ExtResource("10_2rkt1")
|
||||||
AbilityLoadout = [ExtResource("4_11013")]
|
DefaultPermanentEffects = [ExtResource("5_2rkt1")]
|
||||||
|
EmpoweredActionEffects = [ExtResource("6_u8yay")]
|
||||||
AimAssistStrength = 0.3
|
AimAssistStrength = 0.3
|
||||||
AimAssistReductionWhenCloseToTarget = 0.1
|
AimAssistReductionWhenCloseToTarget = 0.1
|
||||||
AimAssistReductionStartDistance = 8.0
|
AimAssistReductionStartDistance = 8.0
|
||||||
|
|||||||
@@ -13,6 +13,7 @@ using Gamesmiths.Forge.Events;
|
|||||||
using Gamesmiths.Forge.Godot.Core;
|
using Gamesmiths.Forge.Godot.Core;
|
||||||
using Gamesmiths.Forge.Godot.Nodes;
|
using Gamesmiths.Forge.Godot.Nodes;
|
||||||
using Gamesmiths.Forge.Godot.Resources;
|
using Gamesmiths.Forge.Godot.Resources;
|
||||||
|
using Gamesmiths.Forge.Godot.Resources.Abilities;
|
||||||
using Gamesmiths.Forge.Tags;
|
using Gamesmiths.Forge.Tags;
|
||||||
using Godot;
|
using Godot;
|
||||||
using GodotStateCharts;
|
using GodotStateCharts;
|
||||||
@@ -26,20 +27,6 @@ using Movementtests.tools.calculators;
|
|||||||
|
|
||||||
namespace Movementtests.systems;
|
namespace Movementtests.systems;
|
||||||
|
|
||||||
public record struct WeaponEventPayload(String Message);
|
|
||||||
|
|
||||||
|
|
||||||
public class ClosureBehavior<TPayload>(
|
|
||||||
Action<AbilityBehaviorContext, TPayload> callback) : IAbilityBehavior<TPayload>
|
|
||||||
{
|
|
||||||
public void OnStarted(AbilityBehaviorContext context, TPayload data)
|
|
||||||
{
|
|
||||||
callback(context, data);
|
|
||||||
context.InstanceHandle.End();
|
|
||||||
}
|
|
||||||
|
|
||||||
public void OnEnded(AbilityBehaviorContext context){}
|
|
||||||
}
|
|
||||||
|
|
||||||
[GlobalClass, Icon("res://assets/ui/IconGodotNode/node_3D/icon_sword.png")]
|
[GlobalClass, Icon("res://assets/ui/IconGodotNode/node_3D/icon_sword.png")]
|
||||||
public partial class WeaponSystem : RigidBody3D, IDamageDealer, IForgeEntity
|
public partial class WeaponSystem : RigidBody3D, IDamageDealer, IForgeEntity
|
||||||
@@ -50,9 +37,10 @@ public partial class WeaponSystem : RigidBody3D, IDamageDealer, IForgeEntity
|
|||||||
[Signal]
|
[Signal]
|
||||||
public delegate void WeaponRetrievedEventHandler();
|
public delegate void WeaponRetrievedEventHandler();
|
||||||
|
|
||||||
|
|
||||||
[Export]
|
[Export]
|
||||||
public ForgeTagContainer BaseTags { get; set; } = new();
|
public ForgeTagContainer BaseTags { get; set; } = new();
|
||||||
|
[Export] public ForgeAbilityData[] WeaponAbilities { get; set; } = Array.Empty<ForgeAbilityData>();
|
||||||
|
[Export] public ForgeAbilityData FlyingTickAbility { get; set; } = new();
|
||||||
|
|
||||||
[Export]
|
[Export]
|
||||||
public RDamage RDamage { get; set; }
|
public RDamage RDamage { get; set; }
|
||||||
@@ -107,8 +95,7 @@ public partial class WeaponSystem : RigidBody3D, IDamageDealer, IForgeEntity
|
|||||||
|
|
||||||
public Tag WeaponFlyingAbilityTag;
|
public Tag WeaponFlyingAbilityTag;
|
||||||
|
|
||||||
private RAbilityBase? _flyingAbility;
|
private AbilityHandle? _weaponFlyingAbility;
|
||||||
public List<RAbilityBase> AbilityLoadout { get; } = [];
|
|
||||||
|
|
||||||
public void Init()
|
public void Init()
|
||||||
{
|
{
|
||||||
@@ -174,7 +161,27 @@ public partial class WeaponSystem : RigidBody3D, IDamageDealer, IForgeEntity
|
|||||||
Abilities = new(this);
|
Abilities = new(this);
|
||||||
Events = new();
|
Events = new();
|
||||||
|
|
||||||
CreateFlyingAbility();
|
// TODO: Waiting on bug resolve
|
||||||
|
// _weaponFlyingAbility = Abilities.GrantAbilityPermanently(FlyingTickAbility.GetAbilityData(), 1, LevelComparison.None, this);
|
||||||
|
|
||||||
|
foreach (var ability in WeaponAbilities)
|
||||||
|
{
|
||||||
|
var leftGrantAbilityConfig = new GrantAbilityConfig(
|
||||||
|
ability.GetAbilityData(),
|
||||||
|
ScalableLevel: new ScalableInt(1),
|
||||||
|
RemovalPolicy: AbilityDeactivationPolicy.CancelImmediately,
|
||||||
|
InhibitionPolicy: AbilityDeactivationPolicy.CancelImmediately,
|
||||||
|
TryActivateOnGrant: false,
|
||||||
|
TryActivateOnEnable: false,
|
||||||
|
LevelOverridePolicy: LevelComparison.Higher);
|
||||||
|
|
||||||
|
var leftGrantComponent = new GrantAbilityEffectComponent([leftGrantAbilityConfig]);
|
||||||
|
var leftGrantEffect = new EffectData(
|
||||||
|
"Grant Weapon Ability",
|
||||||
|
new DurationData(DurationType.Infinite),
|
||||||
|
effectComponents: [leftGrantComponent]);
|
||||||
|
EffectsManager.ApplyEffect(new Effect(leftGrantEffect, new EffectOwnership(this, this)));
|
||||||
|
}
|
||||||
|
|
||||||
BodyEntered += OnThrownWeaponReachesGround;
|
BodyEntered += OnThrownWeaponReachesGround;
|
||||||
|
|
||||||
@@ -183,136 +190,76 @@ public partial class WeaponSystem : RigidBody3D, IDamageDealer, IForgeEntity
|
|||||||
|
|
||||||
_handToFlying.Taken += () =>
|
_handToFlying.Taken += () =>
|
||||||
{
|
{
|
||||||
Events.Raise(new EventData<WeaponEventPayload>
|
Events.Raise(new EventData
|
||||||
{
|
{
|
||||||
EventTags = WeaponHandToFlyingEventTag.GetSingleTagContainer()!,
|
EventTags = WeaponHandToFlyingEventTag.GetSingleTagContainer()!,
|
||||||
Source = this,
|
Source = this
|
||||||
Payload = new WeaponEventPayload(Message: "handToFlying")
|
|
||||||
});
|
});
|
||||||
Events.Raise(new EventData<WeaponEventPayload>
|
Events.Raise(new EventData
|
||||||
{
|
{
|
||||||
EventTags = WeaponStartedFlyingEventTag.GetSingleTagContainer()!,
|
EventTags = WeaponStartedFlyingEventTag.GetSingleTagContainer()!,
|
||||||
Source = this,
|
Source = this
|
||||||
Payload = new WeaponEventPayload(Message: "startedFlying")
|
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
_flyingToHand.Taken += () =>
|
_flyingToHand.Taken += () =>
|
||||||
{
|
{
|
||||||
Events.Raise(new EventData<WeaponEventPayload>
|
Events.Raise(new EventData
|
||||||
{
|
{
|
||||||
EventTags = WeaponFlyingToHandEventTag.GetSingleTagContainer()!,
|
EventTags = WeaponFlyingToHandEventTag.GetSingleTagContainer()!,
|
||||||
Source = this,
|
Source = this
|
||||||
Payload = new WeaponEventPayload(Message: "flyingToHand")
|
|
||||||
});
|
});
|
||||||
Events.Raise(new EventData<WeaponEventPayload>
|
Events.Raise(new EventData
|
||||||
{
|
{
|
||||||
EventTags = WeaponStoppedFlyingEventTag.GetSingleTagContainer()!,
|
EventTags = WeaponStoppedFlyingEventTag.GetSingleTagContainer()!,
|
||||||
Source = this,
|
Source = this
|
||||||
Payload = new WeaponEventPayload(Message: "stoppedFlying")
|
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
_plantedToHand.Taken += () =>
|
_plantedToHand.Taken += () =>
|
||||||
{
|
{
|
||||||
Events.Raise(new EventData<WeaponEventPayload>
|
Events.Raise(new EventData
|
||||||
{
|
{
|
||||||
EventTags = WeaponPlantedToHandEventTag.GetSingleTagContainer()!,
|
EventTags = WeaponPlantedToHandEventTag.GetSingleTagContainer()!,
|
||||||
Source = this,
|
Source = this
|
||||||
Payload = new WeaponEventPayload(Message: "plantedToHand")
|
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
_plantedToFlying.Taken += () =>
|
_plantedToFlying.Taken += () =>
|
||||||
{
|
{
|
||||||
Events.Raise(new EventData<WeaponEventPayload>
|
Events.Raise(new EventData
|
||||||
{
|
{
|
||||||
EventTags = WeaponPlantedToFlyingEventTag.GetSingleTagContainer()!,
|
EventTags = WeaponPlantedToFlyingEventTag.GetSingleTagContainer()!,
|
||||||
Source = this,
|
Source = this
|
||||||
Payload = new WeaponEventPayload(Message: "plantedToFlying")
|
|
||||||
});
|
});
|
||||||
Events.Raise(new EventData<WeaponEventPayload>
|
Events.Raise(new EventData
|
||||||
{
|
{
|
||||||
EventTags = WeaponStartedFlyingEventTag.GetSingleTagContainer()!,
|
EventTags = WeaponStartedFlyingEventTag.GetSingleTagContainer()!,
|
||||||
Source = this,
|
Source = this
|
||||||
Payload = new WeaponEventPayload(Message: "startedFlying")
|
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
_toPlanted.Taken += () =>
|
_toPlanted.Taken += () =>
|
||||||
{
|
{
|
||||||
Events.Raise(new EventData<WeaponEventPayload>
|
Events.Raise(new EventData
|
||||||
{
|
{
|
||||||
EventTags = WeaponPlantedEventTag.GetSingleTagContainer()!,
|
EventTags = WeaponPlantedEventTag.GetSingleTagContainer()!,
|
||||||
Source = this,
|
Source = this,
|
||||||
Target = _plantedEntity,
|
Target = _plantedEntity
|
||||||
Payload = new WeaponEventPayload(Message: "planted")
|
|
||||||
});
|
});
|
||||||
Events.Raise(new EventData<WeaponEventPayload>
|
Events.Raise(new EventData
|
||||||
{
|
{
|
||||||
EventTags = WeaponStoppedFlyingEventTag.GetSingleTagContainer()!,
|
EventTags = WeaponStoppedFlyingEventTag.GetSingleTagContainer()!,
|
||||||
Source = this,
|
Source = this
|
||||||
Payload = new WeaponEventPayload(Message: "stoppedFlying")
|
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
Events.Subscribe<WeaponEventPayload>(WeaponStoppedFlyingEventTag, data =>
|
Events.Subscribe(WeaponStoppedFlyingEventTag, data =>
|
||||||
{
|
{
|
||||||
_weaponFlyingAbility.Cancel();
|
// TODO: Waiting on bug resolve
|
||||||
|
// _weaponFlyingAbility.Cancel();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
private ActiveEffectHandle? _flyingWeaponEffectHandle;
|
|
||||||
|
|
||||||
public void CreateFlyingAbility()
|
|
||||||
{
|
|
||||||
var flyingWeaponEffectData = new EffectData(
|
|
||||||
"Flying Weapon Effect Data",
|
|
||||||
new DurationData(DurationType.Infinite),
|
|
||||||
customExecutions:
|
|
||||||
[
|
|
||||||
new FlyingWeaponExecution(this)
|
|
||||||
],
|
|
||||||
periodicData: new PeriodicData(new ScalableFloat(0.2f), false, PeriodInhibitionRemovedPolicy.ResetPeriod)
|
|
||||||
);
|
|
||||||
|
|
||||||
var weaponHandToFlyingAbilityData = new AbilityData(
|
|
||||||
name: "WeaponHandToFlyingSword",
|
|
||||||
abilityTags: WeaponFlyingAbilityTag.GetSingleTagContainer(),
|
|
||||||
instancingPolicy: AbilityInstancingPolicy.PerEntity,
|
|
||||||
abilityTriggerData: AbilityTriggerData.ForEvent<WeaponEventPayload>(WeaponStartedFlyingEventTag),
|
|
||||||
behaviorFactory: () => new FlyingSwordBehavior(this, flyingWeaponEffectData));
|
|
||||||
_weaponFlyingAbility = Abilities.GrantAbilityPermanently(weaponHandToFlyingAbilityData, 1, LevelComparison.None, this);
|
|
||||||
}
|
|
||||||
|
|
||||||
private AbilityHandle _weaponFlyingAbility;
|
|
||||||
|
|
||||||
public void GrantNewAbilityForWeaponFly(RExplodingSword ability)
|
|
||||||
{
|
|
||||||
var weaponFlyingAbilityData = new AbilityData(
|
|
||||||
name: "WeaponFlyingSwordAbility",
|
|
||||||
abilityTags: WeaponFlyingAbilityTag.GetSingleTagContainer(),
|
|
||||||
instancingPolicy: AbilityInstancingPolicy.PerEntity,
|
|
||||||
abilityTriggerData: AbilityTriggerData.ForEvent<WeaponEventPayload>(WeaponFlyingTickEventTag),
|
|
||||||
behaviorFactory: () => ability.Behavior(new ExplodingSwordCreation(this)));
|
|
||||||
|
|
||||||
var weaponFlyGrantAbilityConfig = new GrantAbilityConfig(
|
|
||||||
weaponFlyingAbilityData,
|
|
||||||
ScalableLevel: new ScalableInt(1),
|
|
||||||
RemovalPolicy: AbilityDeactivationPolicy.CancelImmediately,
|
|
||||||
InhibitionPolicy: AbilityDeactivationPolicy.CancelImmediately,
|
|
||||||
TryActivateOnGrant: false,
|
|
||||||
TryActivateOnEnable: false,
|
|
||||||
LevelOverridePolicy: LevelComparison.Higher);
|
|
||||||
|
|
||||||
var weaponFlyGrantComponent = new GrantAbilityEffectComponent([weaponFlyGrantAbilityConfig]);
|
|
||||||
var weaponFlyGrantEffect = new EffectData(
|
|
||||||
"Grant Weapon Fly Ability",
|
|
||||||
new DurationData(DurationType.Infinite),
|
|
||||||
effectComponents: [weaponFlyGrantComponent]);
|
|
||||||
EffectsManager.ApplyEffect(new Effect(weaponFlyGrantEffect, new EffectOwnership(this, this)));
|
|
||||||
|
|
||||||
GD.Print("New weapon flight ability granted");
|
|
||||||
}
|
|
||||||
|
|
||||||
public void WeaponLeft()
|
public void WeaponLeft()
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -2,9 +2,12 @@
|
|||||||
|
|
||||||
[ext_resource type="Script" uid="uid://iii3wfto4t5b" path="res://scenes/player_controller/components/weapon/WeaponSystem.cs" id="1_csqwk"]
|
[ext_resource type="Script" uid="uid://iii3wfto4t5b" path="res://scenes/player_controller/components/weapon/WeaponSystem.cs" id="1_csqwk"]
|
||||||
[ext_resource type="Script" uid="uid://jitubgv6judn" path="res://scenes/components/damage/RDamage.cs" id="2_m0v1h"]
|
[ext_resource type="Script" uid="uid://jitubgv6judn" path="res://scenes/components/damage/RDamage.cs" id="2_m0v1h"]
|
||||||
|
[ext_resource type="Resource" uid="uid://cu0685gspk2fk" path="res://scenes/player_controller/resources/forge/exploding_sword_weapon_land.tres" id="2_pgbtr"]
|
||||||
[ext_resource type="Script" uid="uid://cxihb42t2mfqi" path="res://addons/forge/nodes/ForgeAttributeSet.cs" id="3_3xjpi"]
|
[ext_resource type="Script" uid="uid://cxihb42t2mfqi" path="res://addons/forge/nodes/ForgeAttributeSet.cs" id="3_3xjpi"]
|
||||||
[ext_resource type="Script" uid="uid://couw105c3bde4" path="res://addons/godot_state_charts/state_chart.gd" id="3_5owyf"]
|
[ext_resource type="Script" uid="uid://couw105c3bde4" path="res://addons/godot_state_charts/state_chart.gd" id="3_5owyf"]
|
||||||
|
[ext_resource type="Resource" uid="uid://busdbvfi3jiic" path="res://scenes/player_controller/resources/forge/exploding_sword_weapon_left.tres" id="3_7bruw"]
|
||||||
[ext_resource type="ArrayMesh" uid="uid://cho5fixitrbds" path="res://assets/meshes/swords/resources/sword23.tres" id="3_svc06"]
|
[ext_resource type="ArrayMesh" uid="uid://cho5fixitrbds" path="res://assets/meshes/swords/resources/sword23.tres" id="3_svc06"]
|
||||||
|
[ext_resource type="Resource" uid="uid://btnnpqann3ktp" path="res://scenes/player_controller/resources/forge/weapon_flying_tick_ability.tres" id="4_7bruw"]
|
||||||
[ext_resource type="Script" uid="uid://ccovd5i0wr3kk" path="res://addons/forge/editor/attributes/AttributeValues.cs" id="4_q6xv7"]
|
[ext_resource type="Script" uid="uid://ccovd5i0wr3kk" path="res://addons/forge/editor/attributes/AttributeValues.cs" id="4_q6xv7"]
|
||||||
[ext_resource type="Script" uid="uid://jk2jm1g6q853" path="res://addons/godot_state_charts/compound_state.gd" id="4_svc06"]
|
[ext_resource type="Script" uid="uid://jk2jm1g6q853" path="res://addons/godot_state_charts/compound_state.gd" id="4_svc06"]
|
||||||
[ext_resource type="Script" uid="uid://cytafq8i1y8qm" path="res://addons/godot_state_charts/atomic_state.gd" id="5_m0v1h"]
|
[ext_resource type="Script" uid="uid://cytafq8i1y8qm" path="res://addons/godot_state_charts/atomic_state.gd" id="5_m0v1h"]
|
||||||
@@ -56,6 +59,8 @@ continuous_cd = true
|
|||||||
contact_monitor = true
|
contact_monitor = true
|
||||||
max_contacts_reported = 1
|
max_contacts_reported = 1
|
||||||
script = ExtResource("1_csqwk")
|
script = ExtResource("1_csqwk")
|
||||||
|
WeaponAbilities = [ExtResource("2_pgbtr"), ExtResource("3_7bruw")]
|
||||||
|
FlyingTickAbility = ExtResource("4_7bruw")
|
||||||
RDamage = SubResource("Resource_jpdh0")
|
RDamage = SubResource("Resource_jpdh0")
|
||||||
|
|
||||||
[node name="WeaponAttributeSet" type="Node" parent="." unique_id=14845649]
|
[node name="WeaponAttributeSet" type="Node" parent="." unique_id=14845649]
|
||||||
|
|||||||
@@ -1,10 +1,143 @@
|
|||||||
[gd_resource type="Resource" script_class="REmpoweredAction" format=3 uid="uid://7dpkk5rk3di5"]
|
[gd_resource type="Resource" script_class="ForgeAbilityData" format=3 uid="uid://dccuj66egxfwh"]
|
||||||
|
|
||||||
[ext_resource type="Script" uid="uid://d0l07gcx1ef18" path="res://forge/abilities/REmpoweredAction.cs" id="1_1rxoq"]
|
[ext_resource type="Resource" uid="uid://crgwob8t8yysq" path="res://scenes/player_controller/resources/forge/instant_end_behavior.tres" id="1_x7d0c"]
|
||||||
|
[ext_resource type="Script" uid="uid://cw525n4mjqgw0" path="res://addons/forge/resources/ForgeTagContainer.cs" id="2_prg0a"]
|
||||||
|
[ext_resource type="Script" uid="uid://dngf30hxy5go4" path="res://addons/forge/resources/components/ModifierTags.cs" id="3_k72m0"]
|
||||||
|
[ext_resource type="Script" uid="uid://cn3b4ya15fg7e" path="res://addons/forge/resources/magnitudes/ForgeScalableFloat.cs" id="4_5fdax"]
|
||||||
|
[ext_resource type="Script" uid="uid://2gm1hdhi8u08" path="res://addons/forge/resources/magnitudes/ForgeModifierMagnitude.cs" id="5_5qmmj"]
|
||||||
|
[ext_resource type="Script" uid="uid://1hgogislo1l6" path="res://addons/forge/resources/magnitudes/ForgeScalableInt.cs" id="6_yi0bg"]
|
||||||
|
[ext_resource type="Script" uid="uid://b83hf13nj37k3" path="res://addons/forge/resources/ForgeEffectData.cs" id="7_0rp6y"]
|
||||||
|
[ext_resource type="Resource" uid="uid://dn7b8frkoxpxr" path="res://scenes/player_controller/resources/forge/player_mana_changed_cue.tres" id="8_0olwd"]
|
||||||
|
[ext_resource type="Script" uid="uid://bdfcavbjyhxxa" path="res://addons/forge/resources/ForgeModifier.cs" id="9_wluo0"]
|
||||||
|
[ext_resource type="Script" uid="uid://dhxfbxh54pyxp" path="res://addons/forge/resources/abilities/ForgeAbilityData.cs" id="10_2sq4o"]
|
||||||
|
|
||||||
|
[sub_resource type="Resource" id="Resource_h116a"]
|
||||||
|
script = ExtResource("2_prg0a")
|
||||||
|
ContainerTags = Array[String](["cooldown.empoweredaction"])
|
||||||
|
metadata/_custom_type_script = "uid://cw525n4mjqgw0"
|
||||||
|
|
||||||
|
[sub_resource type="Resource" id="Resource_mgrka"]
|
||||||
|
script = ExtResource("3_k72m0")
|
||||||
|
TagsToAdd = SubResource("Resource_h116a")
|
||||||
|
metadata/_custom_type_script = "uid://dngf30hxy5go4"
|
||||||
|
|
||||||
|
[sub_resource type="Resource" id="Resource_ekcln"]
|
||||||
|
script = ExtResource("4_5fdax")
|
||||||
|
BaseValue = 1.0
|
||||||
|
|
||||||
|
[sub_resource type="Resource" id="Resource_odwcb"]
|
||||||
|
script = ExtResource("4_5fdax")
|
||||||
|
|
||||||
|
[sub_resource type="Resource" id="Resource_psy6a"]
|
||||||
|
script = ExtResource("4_5fdax")
|
||||||
|
|
||||||
|
[sub_resource type="Resource" id="Resource_j4bwy"]
|
||||||
|
script = ExtResource("4_5fdax")
|
||||||
|
BaseValue = 1.0
|
||||||
|
|
||||||
|
[sub_resource type="Resource" id="Resource_s60jg"]
|
||||||
|
script = ExtResource("4_5fdax")
|
||||||
|
|
||||||
|
[sub_resource type="Resource" id="Resource_wdif6"]
|
||||||
|
script = ExtResource("4_5fdax")
|
||||||
|
|
||||||
|
[sub_resource type="Resource" id="Resource_inx6r"]
|
||||||
|
script = ExtResource("4_5fdax")
|
||||||
|
BaseValue = 0.5
|
||||||
|
metadata/_custom_type_script = "uid://cn3b4ya15fg7e"
|
||||||
|
|
||||||
|
[sub_resource type="Resource" id="Resource_4jm88"]
|
||||||
|
script = ExtResource("5_5qmmj")
|
||||||
|
ScalableFloat = SubResource("Resource_inx6r")
|
||||||
|
Coefficient = SubResource("Resource_j4bwy")
|
||||||
|
PreMultiplyAdditiveValue = SubResource("Resource_wdif6")
|
||||||
|
PostMultiplyAdditiveValue = SubResource("Resource_s60jg")
|
||||||
|
CalculatorCoefficient = SubResource("Resource_ekcln")
|
||||||
|
CalculatorPreMultiplyAdditiveValue = SubResource("Resource_psy6a")
|
||||||
|
CalculatorPostMultiplyAdditiveValue = SubResource("Resource_odwcb")
|
||||||
|
metadata/_custom_type_script = "uid://2gm1hdhi8u08"
|
||||||
|
|
||||||
|
[sub_resource type="Resource" id="Resource_lmnuh"]
|
||||||
|
script = ExtResource("6_yi0bg")
|
||||||
|
BaseValue = 1
|
||||||
|
|
||||||
|
[sub_resource type="Resource" id="Resource_xp6fe"]
|
||||||
|
script = ExtResource("6_yi0bg")
|
||||||
|
BaseValue = 1
|
||||||
|
|
||||||
|
[sub_resource type="Resource" id="Resource_egh2b"]
|
||||||
|
script = ExtResource("7_0rp6y")
|
||||||
|
Name = "Empowered Action Cooldown"
|
||||||
|
Modifiers = []
|
||||||
|
Components = Array[Object]([SubResource("Resource_mgrka")])
|
||||||
|
Executions = []
|
||||||
|
DurationType = 2
|
||||||
|
Duration = SubResource("Resource_4jm88")
|
||||||
|
StackLimit = SubResource("Resource_xp6fe")
|
||||||
|
InitialStack = SubResource("Resource_lmnuh")
|
||||||
|
Cues = []
|
||||||
|
metadata/_custom_type_script = "uid://b83hf13nj37k3"
|
||||||
|
|
||||||
|
[sub_resource type="Resource" id="Resource_8dsdw"]
|
||||||
|
script = ExtResource("6_yi0bg")
|
||||||
|
BaseValue = 1
|
||||||
|
|
||||||
|
[sub_resource type="Resource" id="Resource_clulf"]
|
||||||
|
script = ExtResource("4_5fdax")
|
||||||
|
BaseValue = 1.0
|
||||||
|
|
||||||
|
[sub_resource type="Resource" id="Resource_4kkx2"]
|
||||||
|
script = ExtResource("4_5fdax")
|
||||||
|
|
||||||
|
[sub_resource type="Resource" id="Resource_5vdhj"]
|
||||||
|
script = ExtResource("4_5fdax")
|
||||||
|
|
||||||
|
[sub_resource type="Resource" id="Resource_nx5he"]
|
||||||
|
script = ExtResource("4_5fdax")
|
||||||
|
BaseValue = 1.0
|
||||||
|
|
||||||
|
[sub_resource type="Resource" id="Resource_st5kh"]
|
||||||
|
script = ExtResource("4_5fdax")
|
||||||
|
|
||||||
|
[sub_resource type="Resource" id="Resource_wl5ql"]
|
||||||
|
script = ExtResource("4_5fdax")
|
||||||
|
|
||||||
|
[sub_resource type="Resource" id="Resource_uv4a1"]
|
||||||
|
script = ExtResource("4_5fdax")
|
||||||
|
BaseValue = -30.0
|
||||||
|
metadata/_custom_type_script = "uid://cn3b4ya15fg7e"
|
||||||
|
|
||||||
|
[sub_resource type="Resource" id="Resource_dhni4"]
|
||||||
|
script = ExtResource("9_wluo0")
|
||||||
|
Attribute = "PlayerAttributeSet.Mana"
|
||||||
|
ScalableFloat = SubResource("Resource_uv4a1")
|
||||||
|
Coefficient = SubResource("Resource_nx5he")
|
||||||
|
PreMultiplyAdditiveValue = SubResource("Resource_wl5ql")
|
||||||
|
PostMultiplyAdditiveValue = SubResource("Resource_st5kh")
|
||||||
|
CalculatorCoefficient = SubResource("Resource_clulf")
|
||||||
|
CalculatorPreMultiplyAdditiveValue = SubResource("Resource_5vdhj")
|
||||||
|
CalculatorPostMultiplyAdditiveValue = SubResource("Resource_4kkx2")
|
||||||
|
metadata/_custom_type_script = "uid://bdfcavbjyhxxa"
|
||||||
|
|
||||||
|
[sub_resource type="Resource" id="Resource_w5rmc"]
|
||||||
|
script = ExtResource("6_yi0bg")
|
||||||
|
BaseValue = 1
|
||||||
|
|
||||||
|
[sub_resource type="Resource" id="Resource_mtef8"]
|
||||||
|
script = ExtResource("7_0rp6y")
|
||||||
|
Name = "Empowered Action Cost"
|
||||||
|
Modifiers = Array[Object]([SubResource("Resource_dhni4")])
|
||||||
|
Components = []
|
||||||
|
Executions = []
|
||||||
|
StackLimit = SubResource("Resource_w5rmc")
|
||||||
|
InitialStack = SubResource("Resource_8dsdw")
|
||||||
|
Cues = Array[Object]([ExtResource("8_0olwd")])
|
||||||
|
metadata/_custom_type_script = "uid://b83hf13nj37k3"
|
||||||
|
|
||||||
[resource]
|
[resource]
|
||||||
script = ExtResource("1_1rxoq")
|
script = ExtResource("10_2sq4o")
|
||||||
Cost = 30.0
|
Name = "Empowered Action"
|
||||||
Cooldown = 0.5
|
CooldownEffects = [SubResource("Resource_egh2b")]
|
||||||
ManaRegenPause = 2.0
|
CostEffect = SubResource("Resource_mtef8")
|
||||||
metadata/_custom_type_script = "uid://d0l07gcx1ef18"
|
AbilityBehavior = ExtResource("1_x7d0c")
|
||||||
|
metadata/_custom_type_script = "uid://dhxfbxh54pyxp"
|
||||||
|
|||||||
@@ -0,0 +1,8 @@
|
|||||||
|
[gd_resource type="Resource" script_class="ForgeExplodingSwordBehavior" format=3 uid="uid://ifeavnlps7hy"]
|
||||||
|
|
||||||
|
[ext_resource type="PackedScene" uid="uid://duju3atqgltkg" path="res://scenes/explosion/explosion.tscn" id="1_mnals"]
|
||||||
|
[ext_resource type="Script" uid="uid://bnee6amtc2bhj" path="res://forge/abilities/ForgeExplodingSwordBehavior.cs" id="1_ot53g"]
|
||||||
|
|
||||||
|
[resource]
|
||||||
|
script = ExtResource("1_ot53g")
|
||||||
|
Explosion = ExtResource("1_mnals")
|
||||||
@@ -1,10 +0,0 @@
|
|||||||
[gd_resource type="Resource" script_class="RExplodingSword" format=3 uid="uid://cdxbwirfiaipi"]
|
|
||||||
|
|
||||||
[ext_resource type="PackedScene" uid="uid://duju3atqgltkg" path="res://scenes/explosion/explosion.tscn" id="1_aru71"]
|
|
||||||
[ext_resource type="Script" path="res://forge/abilities/RExplodingSword.cs" id="2_syk3q"]
|
|
||||||
|
|
||||||
[resource]
|
|
||||||
script = ExtResource("2_syk3q")
|
|
||||||
Explosion = ExtResource("1_aru71")
|
|
||||||
Cost = 10.0
|
|
||||||
metadata/_custom_type_script = "uid://rux15j7q78e8"
|
|
||||||
@@ -0,0 +1,26 @@
|
|||||||
|
[gd_resource type="Resource" script_class="ForgeAbilityData" format=3 uid="uid://bl0mng4kl1xy8"]
|
||||||
|
|
||||||
|
[ext_resource type="Resource" uid="uid://ifeavnlps7hy" path="res://scenes/player_controller/resources/forge/exploding_sword.tres" id="1_postf"]
|
||||||
|
[ext_resource type="Script" uid="uid://cw525n4mjqgw0" path="res://addons/forge/resources/ForgeTagContainer.cs" id="2_km5rh"]
|
||||||
|
[ext_resource type="Script" uid="uid://dpakv7agvir6y" path="res://addons/forge/resources/ForgeTag.cs" id="3_spdwn"]
|
||||||
|
[ext_resource type="Script" uid="uid://dhxfbxh54pyxp" path="res://addons/forge/resources/abilities/ForgeAbilityData.cs" id="4_cm86c"]
|
||||||
|
|
||||||
|
[sub_resource type="Resource" id="Resource_ixeut"]
|
||||||
|
script = ExtResource("2_km5rh")
|
||||||
|
ContainerTags = Array[String](["abilities.weapon.land"])
|
||||||
|
metadata/_custom_type_script = "uid://cw525n4mjqgw0"
|
||||||
|
|
||||||
|
[sub_resource type="Resource" id="Resource_6c3kr"]
|
||||||
|
script = ExtResource("3_spdwn")
|
||||||
|
Tag = "events.weapon.flyingtick"
|
||||||
|
metadata/_custom_type_script = "uid://dpakv7agvir6y"
|
||||||
|
|
||||||
|
[resource]
|
||||||
|
script = ExtResource("4_cm86c")
|
||||||
|
Name = "Exploding Sword on Weapon Flight"
|
||||||
|
CooldownEffects = []
|
||||||
|
AbilityBehavior = ExtResource("1_postf")
|
||||||
|
TriggerSource = 1
|
||||||
|
TriggerTag = SubResource("Resource_6c3kr")
|
||||||
|
AbilityTags = SubResource("Resource_ixeut")
|
||||||
|
metadata/_custom_type_script = "uid://dhxfbxh54pyxp"
|
||||||
@@ -0,0 +1,26 @@
|
|||||||
|
[gd_resource type="Resource" script_class="ForgeAbilityData" format=3 uid="uid://cu0685gspk2fk"]
|
||||||
|
|
||||||
|
[ext_resource type="Resource" uid="uid://ifeavnlps7hy" path="res://scenes/player_controller/resources/forge/exploding_sword.tres" id="1_l4v7e"]
|
||||||
|
[ext_resource type="Script" uid="uid://cw525n4mjqgw0" path="res://addons/forge/resources/ForgeTagContainer.cs" id="2_6c3kr"]
|
||||||
|
[ext_resource type="Script" uid="uid://dpakv7agvir6y" path="res://addons/forge/resources/ForgeTag.cs" id="2_l4v7e"]
|
||||||
|
[ext_resource type="Script" uid="uid://dhxfbxh54pyxp" path="res://addons/forge/resources/abilities/ForgeAbilityData.cs" id="3_ixeut"]
|
||||||
|
|
||||||
|
[sub_resource type="Resource" id="Resource_ixeut"]
|
||||||
|
script = ExtResource("2_6c3kr")
|
||||||
|
ContainerTags = Array[String](["abilities.weapon.land"])
|
||||||
|
metadata/_custom_type_script = "uid://cw525n4mjqgw0"
|
||||||
|
|
||||||
|
[sub_resource type="Resource" id="Resource_6c3kr"]
|
||||||
|
script = ExtResource("2_l4v7e")
|
||||||
|
Tag = "events.weapon.stoppedflying"
|
||||||
|
metadata/_custom_type_script = "uid://dpakv7agvir6y"
|
||||||
|
|
||||||
|
[resource]
|
||||||
|
script = ExtResource("3_ixeut")
|
||||||
|
Name = "Exploding Sword on Weapon Land"
|
||||||
|
CooldownEffects = []
|
||||||
|
AbilityBehavior = ExtResource("1_l4v7e")
|
||||||
|
TriggerSource = 1
|
||||||
|
TriggerTag = SubResource("Resource_6c3kr")
|
||||||
|
AbilityTags = SubResource("Resource_ixeut")
|
||||||
|
metadata/_custom_type_script = "uid://dhxfbxh54pyxp"
|
||||||
@@ -0,0 +1,26 @@
|
|||||||
|
[gd_resource type="Resource" script_class="ForgeAbilityData" format=3 uid="uid://busdbvfi3jiic"]
|
||||||
|
|
||||||
|
[ext_resource type="Script" uid="uid://dhxfbxh54pyxp" path="res://addons/forge/resources/abilities/ForgeAbilityData.cs" id="1_85dnt"]
|
||||||
|
[ext_resource type="Resource" uid="uid://ifeavnlps7hy" path="res://scenes/player_controller/resources/forge/exploding_sword.tres" id="1_m0rkb"]
|
||||||
|
[ext_resource type="Script" uid="uid://cw525n4mjqgw0" path="res://addons/forge/resources/ForgeTagContainer.cs" id="2_u5iw7"]
|
||||||
|
[ext_resource type="Script" uid="uid://dpakv7agvir6y" path="res://addons/forge/resources/ForgeTag.cs" id="3_u5iw7"]
|
||||||
|
|
||||||
|
[sub_resource type="Resource" id="Resource_cjh4j"]
|
||||||
|
script = ExtResource("2_u5iw7")
|
||||||
|
ContainerTags = Array[String](["abilities.weapon.left"])
|
||||||
|
metadata/_custom_type_script = "uid://cw525n4mjqgw0"
|
||||||
|
|
||||||
|
[sub_resource type="Resource" id="Resource_mtsda"]
|
||||||
|
script = ExtResource("3_u5iw7")
|
||||||
|
Tag = "events.weapon.startedflying"
|
||||||
|
metadata/_custom_type_script = "uid://dpakv7agvir6y"
|
||||||
|
|
||||||
|
[resource]
|
||||||
|
script = ExtResource("1_85dnt")
|
||||||
|
Name = "Exploding Sword on Weapon Left"
|
||||||
|
CooldownEffects = []
|
||||||
|
AbilityBehavior = ExtResource("1_m0rkb")
|
||||||
|
TriggerSource = 1
|
||||||
|
TriggerTag = SubResource("Resource_mtsda")
|
||||||
|
AbilityTags = SubResource("Resource_cjh4j")
|
||||||
|
metadata/_custom_type_script = "uid://dhxfbxh54pyxp"
|
||||||
@@ -0,0 +1,75 @@
|
|||||||
|
[gd_resource type="Resource" script_class="ForgeEffectData" format=3 uid="uid://cffil4tic3ysg"]
|
||||||
|
|
||||||
|
[ext_resource type="Script" uid="uid://cw525n4mjqgw0" path="res://addons/forge/resources/ForgeTagContainer.cs" id="1_bi1d8"]
|
||||||
|
[ext_resource type="Script" uid="uid://1hgogislo1l6" path="res://addons/forge/resources/magnitudes/ForgeScalableInt.cs" id="1_qae83"]
|
||||||
|
[ext_resource type="Script" uid="uid://dngf30hxy5go4" path="res://addons/forge/resources/components/ModifierTags.cs" id="1_scapu"]
|
||||||
|
[ext_resource type="Script" uid="uid://b83hf13nj37k3" path="res://addons/forge/resources/ForgeEffectData.cs" id="2_scapu"]
|
||||||
|
[ext_resource type="Script" uid="uid://cn3b4ya15fg7e" path="res://addons/forge/resources/magnitudes/ForgeScalableFloat.cs" id="3_fp8ou"]
|
||||||
|
[ext_resource type="Script" uid="uid://2gm1hdhi8u08" path="res://addons/forge/resources/magnitudes/ForgeModifierMagnitude.cs" id="4_xxxse"]
|
||||||
|
|
||||||
|
[sub_resource type="Resource" id="Resource_gi65x"]
|
||||||
|
script = ExtResource("1_bi1d8")
|
||||||
|
ContainerTags = Array[String](["character.player.mana.regen.inhibited"])
|
||||||
|
metadata/_custom_type_script = "uid://cw525n4mjqgw0"
|
||||||
|
|
||||||
|
[sub_resource type="Resource" id="Resource_bi1d8"]
|
||||||
|
script = ExtResource("1_scapu")
|
||||||
|
TagsToAdd = SubResource("Resource_gi65x")
|
||||||
|
metadata/_custom_type_script = "uid://dngf30hxy5go4"
|
||||||
|
|
||||||
|
[sub_resource type="Resource" id="Resource_pqllu"]
|
||||||
|
script = ExtResource("3_fp8ou")
|
||||||
|
BaseValue = 1.0
|
||||||
|
|
||||||
|
[sub_resource type="Resource" id="Resource_1inmd"]
|
||||||
|
script = ExtResource("3_fp8ou")
|
||||||
|
|
||||||
|
[sub_resource type="Resource" id="Resource_cv55m"]
|
||||||
|
script = ExtResource("3_fp8ou")
|
||||||
|
|
||||||
|
[sub_resource type="Resource" id="Resource_68n87"]
|
||||||
|
script = ExtResource("3_fp8ou")
|
||||||
|
BaseValue = 1.0
|
||||||
|
|
||||||
|
[sub_resource type="Resource" id="Resource_og1rv"]
|
||||||
|
script = ExtResource("3_fp8ou")
|
||||||
|
|
||||||
|
[sub_resource type="Resource" id="Resource_cqegr"]
|
||||||
|
script = ExtResource("3_fp8ou")
|
||||||
|
|
||||||
|
[sub_resource type="Resource" id="Resource_mbpss"]
|
||||||
|
script = ExtResource("3_fp8ou")
|
||||||
|
BaseValue = 1.0
|
||||||
|
metadata/_custom_type_script = "uid://cn3b4ya15fg7e"
|
||||||
|
|
||||||
|
[sub_resource type="Resource" id="Resource_exi3e"]
|
||||||
|
script = ExtResource("4_xxxse")
|
||||||
|
ScalableFloat = SubResource("Resource_mbpss")
|
||||||
|
Coefficient = SubResource("Resource_68n87")
|
||||||
|
PreMultiplyAdditiveValue = SubResource("Resource_cqegr")
|
||||||
|
PostMultiplyAdditiveValue = SubResource("Resource_og1rv")
|
||||||
|
CalculatorCoefficient = SubResource("Resource_pqllu")
|
||||||
|
CalculatorPreMultiplyAdditiveValue = SubResource("Resource_cv55m")
|
||||||
|
CalculatorPostMultiplyAdditiveValue = SubResource("Resource_1inmd")
|
||||||
|
metadata/_custom_type_script = "uid://2gm1hdhi8u08"
|
||||||
|
|
||||||
|
[sub_resource type="Resource" id="Resource_1go02"]
|
||||||
|
script = ExtResource("1_qae83")
|
||||||
|
BaseValue = 1
|
||||||
|
|
||||||
|
[sub_resource type="Resource" id="Resource_ijayu"]
|
||||||
|
script = ExtResource("1_qae83")
|
||||||
|
BaseValue = 1
|
||||||
|
|
||||||
|
[resource]
|
||||||
|
script = ExtResource("2_scapu")
|
||||||
|
Name = "Inhibit Player Mana Regen Temp"
|
||||||
|
Modifiers = []
|
||||||
|
Components = Array[Object]([SubResource("Resource_bi1d8")])
|
||||||
|
Executions = []
|
||||||
|
DurationType = 2
|
||||||
|
Duration = SubResource("Resource_exi3e")
|
||||||
|
StackLimit = SubResource("Resource_ijayu")
|
||||||
|
InitialStack = SubResource("Resource_1go02")
|
||||||
|
Cues = []
|
||||||
|
metadata/_custom_type_script = "uid://b83hf13nj37k3"
|
||||||
@@ -0,0 +1,7 @@
|
|||||||
|
[gd_resource type="Resource" script_class="ForgeInstantEndBehavior" format=3 uid="uid://crgwob8t8yysq"]
|
||||||
|
|
||||||
|
[ext_resource type="Script" uid="uid://c7s5v7ii4nujg" path="res://forge/abilities/ForgeInstantEndBehavior.cs" id="1_hly5b"]
|
||||||
|
|
||||||
|
[resource]
|
||||||
|
script = ExtResource("1_hly5b")
|
||||||
|
metadata/_custom_type_script = "uid://c7s5v7ii4nujg"
|
||||||
@@ -0,0 +1,83 @@
|
|||||||
|
[gd_resource type="Resource" script_class="ForgeEffectData" format=3 uid="uid://dh437cuxgjv6b"]
|
||||||
|
|
||||||
|
[ext_resource type="Script" uid="uid://1hgogislo1l6" path="res://addons/forge/resources/magnitudes/ForgeScalableInt.cs" id="1_mlifq"]
|
||||||
|
[ext_resource type="Resource" uid="uid://dn7b8frkoxpxr" path="res://scenes/player_controller/resources/forge/player_mana_changed_cue.tres" id="1_nsr3v"]
|
||||||
|
[ext_resource type="Script" uid="uid://cw525n4mjqgw0" path="res://addons/forge/resources/ForgeTagContainer.cs" id="1_q8tml"]
|
||||||
|
[ext_resource type="Script" uid="uid://b83hf13nj37k3" path="res://addons/forge/resources/ForgeEffectData.cs" id="2_5tp50"]
|
||||||
|
[ext_resource type="Script" uid="uid://cn3b4ya15fg7e" path="res://addons/forge/resources/magnitudes/ForgeScalableFloat.cs" id="2_pm3n3"]
|
||||||
|
[ext_resource type="Script" uid="uid://b0eq12mjqfage" path="res://addons/forge/resources/components/TargetTagRequirements.cs" id="2_xbgy2"]
|
||||||
|
[ext_resource type="Script" uid="uid://bdfcavbjyhxxa" path="res://addons/forge/resources/ForgeModifier.cs" id="3_nsr3v"]
|
||||||
|
|
||||||
|
[sub_resource type="Resource" id="Resource_5yygy"]
|
||||||
|
script = ExtResource("1_q8tml")
|
||||||
|
ContainerTags = Array[String](["character.player.mana.regen.inhibited"])
|
||||||
|
metadata/_custom_type_script = "uid://cw525n4mjqgw0"
|
||||||
|
|
||||||
|
[sub_resource type="Resource" id="Resource_ncjx6"]
|
||||||
|
script = ExtResource("2_xbgy2")
|
||||||
|
OngoingIgnoredTags = SubResource("Resource_5yygy")
|
||||||
|
metadata/_custom_type_script = "uid://b0eq12mjqfage"
|
||||||
|
|
||||||
|
[sub_resource type="Resource" id="Resource_pm3n3"]
|
||||||
|
script = ExtResource("1_mlifq")
|
||||||
|
BaseValue = 1
|
||||||
|
|
||||||
|
[sub_resource type="Resource" id="Resource_q8tml"]
|
||||||
|
script = ExtResource("2_pm3n3")
|
||||||
|
BaseValue = 1.0
|
||||||
|
|
||||||
|
[sub_resource type="Resource" id="Resource_xbgy2"]
|
||||||
|
script = ExtResource("2_pm3n3")
|
||||||
|
|
||||||
|
[sub_resource type="Resource" id="Resource_rhldn"]
|
||||||
|
script = ExtResource("2_pm3n3")
|
||||||
|
|
||||||
|
[sub_resource type="Resource" id="Resource_p6h8c"]
|
||||||
|
script = ExtResource("2_pm3n3")
|
||||||
|
BaseValue = 1.0
|
||||||
|
|
||||||
|
[sub_resource type="Resource" id="Resource_yqxv4"]
|
||||||
|
script = ExtResource("2_pm3n3")
|
||||||
|
|
||||||
|
[sub_resource type="Resource" id="Resource_b6opn"]
|
||||||
|
script = ExtResource("2_pm3n3")
|
||||||
|
|
||||||
|
[sub_resource type="Resource" id="Resource_5frso"]
|
||||||
|
script = ExtResource("2_pm3n3")
|
||||||
|
BaseValue = 2.0
|
||||||
|
metadata/_custom_type_script = "uid://cn3b4ya15fg7e"
|
||||||
|
|
||||||
|
[sub_resource type="Resource" id="Resource_okenf"]
|
||||||
|
script = ExtResource("3_nsr3v")
|
||||||
|
Attribute = "PlayerAttributeSet.Mana"
|
||||||
|
ScalableFloat = SubResource("Resource_5frso")
|
||||||
|
Coefficient = SubResource("Resource_p6h8c")
|
||||||
|
PreMultiplyAdditiveValue = SubResource("Resource_b6opn")
|
||||||
|
PostMultiplyAdditiveValue = SubResource("Resource_yqxv4")
|
||||||
|
CalculatorCoefficient = SubResource("Resource_q8tml")
|
||||||
|
CalculatorPreMultiplyAdditiveValue = SubResource("Resource_rhldn")
|
||||||
|
CalculatorPostMultiplyAdditiveValue = SubResource("Resource_xbgy2")
|
||||||
|
metadata/_custom_type_script = "uid://bdfcavbjyhxxa"
|
||||||
|
|
||||||
|
[sub_resource type="Resource" id="Resource_w35mq"]
|
||||||
|
script = ExtResource("2_pm3n3")
|
||||||
|
BaseValue = 0.1
|
||||||
|
metadata/_custom_type_script = "uid://cn3b4ya15fg7e"
|
||||||
|
|
||||||
|
[sub_resource type="Resource" id="Resource_nsr3v"]
|
||||||
|
script = ExtResource("1_mlifq")
|
||||||
|
BaseValue = 1
|
||||||
|
|
||||||
|
[resource]
|
||||||
|
script = ExtResource("2_5tp50")
|
||||||
|
Name = "Mana Regeneration"
|
||||||
|
Modifiers = Array[Object]([SubResource("Resource_okenf")])
|
||||||
|
Components = [SubResource("Resource_ncjx6")]
|
||||||
|
Executions = []
|
||||||
|
DurationType = 1
|
||||||
|
HasPeriodicApplication = true
|
||||||
|
Period = SubResource("Resource_w35mq")
|
||||||
|
StackLimit = SubResource("Resource_nsr3v")
|
||||||
|
InitialStack = SubResource("Resource_pm3n3")
|
||||||
|
Cues = Array[Object]([ExtResource("1_nsr3v")])
|
||||||
|
metadata/_custom_type_script = "uid://b83hf13nj37k3"
|
||||||
@@ -0,0 +1,17 @@
|
|||||||
|
[gd_resource type="Resource" script_class="ForgeCue" format=3 uid="uid://dn7b8frkoxpxr"]
|
||||||
|
|
||||||
|
[ext_resource type="Script" uid="uid://cw525n4mjqgw0" path="res://addons/forge/resources/ForgeTagContainer.cs" id="1_lbula"]
|
||||||
|
[ext_resource type="Script" uid="uid://cmrsxccn0ei4j" path="res://addons/forge/resources/ForgeCue.cs" id="2_jijlk"]
|
||||||
|
|
||||||
|
[sub_resource type="Resource" id="Resource_4mhqs"]
|
||||||
|
script = ExtResource("1_lbula")
|
||||||
|
ContainerTags = Array[String](["cues.resources.mana"])
|
||||||
|
metadata/_custom_type_script = "uid://cw525n4mjqgw0"
|
||||||
|
|
||||||
|
[resource]
|
||||||
|
script = ExtResource("2_jijlk")
|
||||||
|
CueKeys = SubResource("Resource_4mhqs")
|
||||||
|
MaxValue = 100
|
||||||
|
MagnitudeType = 2
|
||||||
|
MagnitudeAttribute = "PlayerAttributeSet.Mana"
|
||||||
|
metadata/_custom_type_script = "uid://cmrsxccn0ei4j"
|
||||||
@@ -0,0 +1,12 @@
|
|||||||
|
[gd_resource type="Resource" script_class="ForgeRaiseEventTagExecution" format=3 uid="uid://oe2suroa1klj"]
|
||||||
|
|
||||||
|
[ext_resource type="Script" uid="uid://cw525n4mjqgw0" path="res://addons/forge/resources/ForgeTagContainer.cs" id="1_iqjlm"]
|
||||||
|
[ext_resource type="Script" path="res://forge/calculators/ForgeRaiseEventTagExecution.cs" id="2_am2ak"]
|
||||||
|
|
||||||
|
[sub_resource type="Resource" id="Resource_sxbq4"]
|
||||||
|
script = ExtResource("1_iqjlm")
|
||||||
|
ContainerTags = Array[String](["events.weapon.flyingtick"])
|
||||||
|
|
||||||
|
[resource]
|
||||||
|
script = ExtResource("2_am2ak")
|
||||||
|
metadata/_custom_type_script = "uid://br7ut4lbau66w"
|
||||||
@@ -0,0 +1,55 @@
|
|||||||
|
[gd_resource type="Resource" script_class="ForgeAbilityData" format=3 uid="uid://btnnpqann3ktp"]
|
||||||
|
|
||||||
|
[ext_resource type="Resource" uid="uid://oe2suroa1klj" path="res://scenes/player_controller/resources/forge/raise_flying_tick_event.tres" id="1_pdt6v"]
|
||||||
|
[ext_resource type="Script" uid="uid://dhxfbxh54pyxp" path="res://addons/forge/resources/abilities/ForgeAbilityData.cs" id="1_vh0wp"]
|
||||||
|
[ext_resource type="Script" uid="uid://1hgogislo1l6" path="res://addons/forge/resources/magnitudes/ForgeScalableInt.cs" id="2_xkoyb"]
|
||||||
|
[ext_resource type="Script" uid="uid://cn3b4ya15fg7e" path="res://addons/forge/resources/magnitudes/ForgeScalableFloat.cs" id="3_j2gem"]
|
||||||
|
[ext_resource type="Script" uid="uid://b83hf13nj37k3" path="res://addons/forge/resources/ForgeEffectData.cs" id="4_e2sm2"]
|
||||||
|
[ext_resource type="Script" uid="uid://cl5hudinl1rex" path="res://forge/abilities/ForgeEffectApplicationBehavior.cs" id="5_trglf"]
|
||||||
|
[ext_resource type="Script" uid="uid://dpakv7agvir6y" path="res://addons/forge/resources/ForgeTag.cs" id="6_napws"]
|
||||||
|
|
||||||
|
[sub_resource type="Resource" id="Resource_dgkld"]
|
||||||
|
script = ExtResource("2_xkoyb")
|
||||||
|
BaseValue = 1
|
||||||
|
|
||||||
|
[sub_resource type="Resource" id="Resource_1ften"]
|
||||||
|
script = ExtResource("3_j2gem")
|
||||||
|
BaseValue = 0.2
|
||||||
|
metadata/_custom_type_script = "uid://cn3b4ya15fg7e"
|
||||||
|
|
||||||
|
[sub_resource type="Resource" id="Resource_l278c"]
|
||||||
|
script = ExtResource("2_xkoyb")
|
||||||
|
BaseValue = 1
|
||||||
|
|
||||||
|
[sub_resource type="Resource" id="Resource_esyoj"]
|
||||||
|
script = ExtResource("4_e2sm2")
|
||||||
|
Modifiers = []
|
||||||
|
Components = []
|
||||||
|
Executions = Array[Object]([ExtResource("1_pdt6v")])
|
||||||
|
DurationType = 1
|
||||||
|
HasPeriodicApplication = true
|
||||||
|
Period = SubResource("Resource_1ften")
|
||||||
|
ExecuteOnApplication = true
|
||||||
|
StackLimit = SubResource("Resource_l278c")
|
||||||
|
InitialStack = SubResource("Resource_dgkld")
|
||||||
|
Cues = []
|
||||||
|
metadata/_custom_type_script = "uid://b83hf13nj37k3"
|
||||||
|
|
||||||
|
[sub_resource type="Resource" id="Resource_0xegy"]
|
||||||
|
script = ExtResource("5_trglf")
|
||||||
|
EffectData = SubResource("Resource_esyoj")
|
||||||
|
metadata/_custom_type_script = "uid://cl5hudinl1rex"
|
||||||
|
|
||||||
|
[sub_resource type="Resource" id="Resource_4aw8y"]
|
||||||
|
script = ExtResource("6_napws")
|
||||||
|
Tag = "events.weapon.startedflying"
|
||||||
|
metadata/_custom_type_script = "uid://dpakv7agvir6y"
|
||||||
|
|
||||||
|
[resource]
|
||||||
|
script = ExtResource("1_vh0wp")
|
||||||
|
Name = "Weapon Flying Tick"
|
||||||
|
CooldownEffects = []
|
||||||
|
AbilityBehavior = SubResource("Resource_0xegy")
|
||||||
|
TriggerSource = 1
|
||||||
|
TriggerTag = SubResource("Resource_4aw8y")
|
||||||
|
metadata/_custom_type_script = "uid://dhxfbxh54pyxp"
|
||||||
@@ -1,9 +0,0 @@
|
|||||||
[gd_resource type="Resource" script_class="RManaRegen" format=3 uid="uid://dtmhtlix2amme"]
|
|
||||||
|
|
||||||
[ext_resource type="Script" uid="uid://di04jvuqp0h7m" path="res://forge/effects/RManaRegen.cs" id="1_ecb1p"]
|
|
||||||
|
|
||||||
[resource]
|
|
||||||
script = ExtResource("1_ecb1p")
|
|
||||||
ManaRegenRate = 20.0
|
|
||||||
Frequency = 0.05
|
|
||||||
metadata/_custom_type_script = "uid://di04jvuqp0h7m"
|
|
||||||
@@ -28,9 +28,10 @@ using Movementtests.scenes.player_controller.scripts;
|
|||||||
using Movementtests.tools;
|
using Movementtests.tools;
|
||||||
using Movementtests.forge.abilities;
|
using Movementtests.forge.abilities;
|
||||||
using Movementtests.tools.calculators;
|
using Movementtests.tools.calculators;
|
||||||
using Movementtests.tools.effects;
|
|
||||||
using RustyOptions;
|
using RustyOptions;
|
||||||
|
|
||||||
|
public record struct EmpoweredActionPayload;
|
||||||
|
|
||||||
[GlobalClass, Icon("res://assets/ui/IconGodotNode/node_3D/icon_character.png")]
|
[GlobalClass, Icon("res://assets/ui/IconGodotNode/node_3D/icon_character.png")]
|
||||||
public partial class PlayerController : CharacterBody3D,
|
public partial class PlayerController : CharacterBody3D,
|
||||||
IDamageable,
|
IDamageable,
|
||||||
@@ -114,12 +115,20 @@ public partial class PlayerController : CharacterBody3D,
|
|||||||
[ExportGroup("General")]
|
[ExportGroup("General")]
|
||||||
[Export]
|
[Export]
|
||||||
public ForgeTagContainer BaseTags { get; set; } = new();
|
public ForgeTagContainer BaseTags { get; set; } = new();
|
||||||
[Export] public REmpoweredAction EmpoweredAction = null!;
|
[Export] public ForgeTag EmpoweredActionUsed;
|
||||||
[Export] public RManaRegen ManaRegen = null!;
|
|
||||||
|
|
||||||
[ExportGroup("Abilities")]
|
[ExportGroup("Abilities")]
|
||||||
|
[ExportSubgroup("Common and defaults")]
|
||||||
|
[Export] public ForgeAbilityData EmpoweredActionAbility = null!;
|
||||||
|
[Export] public ForgeAbilityData[] DefaultPermanentAbilities = [];
|
||||||
[ExportSubgroup("WeaponThrow")]
|
[ExportSubgroup("WeaponThrow")]
|
||||||
[Export] public RExplodingSword[] AbilityLoadout = [];
|
[Export] public ForgeAbilityData[] AbilityLoadout = [];
|
||||||
|
|
||||||
|
[ExportGroup("Effects")]
|
||||||
|
[ExportSubgroup("Common and defaults")]
|
||||||
|
[Export] public ForgeEffectData[] DefaultPermanentEffects = [];
|
||||||
|
[ExportSubgroup("Applied on Empowered Action used")]
|
||||||
|
[Export] public ForgeEffectData[] EmpoweredActionEffects = [];
|
||||||
|
|
||||||
// Combat stuff
|
// Combat stuff
|
||||||
[ExportCategory("Combat")]
|
[ExportCategory("Combat")]
|
||||||
@@ -429,7 +438,6 @@ public partial class PlayerController : CharacterBody3D,
|
|||||||
private Camera3D _camera = null!;
|
private Camera3D _camera = null!;
|
||||||
|
|
||||||
private AbilityHandle? _empoweredActionHandle;
|
private AbilityHandle? _empoweredActionHandle;
|
||||||
private ActiveEffectHandle? _manaRegenEffectHandle;
|
|
||||||
|
|
||||||
public override void _Ready()
|
public override void _Ready()
|
||||||
{
|
{
|
||||||
@@ -469,16 +477,34 @@ public partial class PlayerController : CharacterBody3D,
|
|||||||
Abilities = new(this);
|
Abilities = new(this);
|
||||||
Events = new();
|
Events = new();
|
||||||
|
|
||||||
var empoweredActionData = EmpoweredAction.Ability(tagsManager);
|
|
||||||
// Grant permanently
|
|
||||||
_empoweredActionHandle = Abilities.GrantAbilityPermanently(
|
_empoweredActionHandle = Abilities.GrantAbilityPermanently(
|
||||||
empoweredActionData,
|
EmpoweredActionAbility.GetAbilityData(),
|
||||||
abilityLevel: 1,
|
abilityLevel: 1,
|
||||||
levelOverridePolicy: LevelComparison.None,
|
levelOverridePolicy: LevelComparison.None,
|
||||||
sourceEntity: this);
|
sourceEntity: this);
|
||||||
|
foreach (var ability in DefaultPermanentAbilities)
|
||||||
var manaRegenEffect = new Effect(ManaRegen.ManaRegen(tagsManager), new EffectOwnership(this, this));
|
{
|
||||||
_manaRegenEffectHandle = EffectsManager.ApplyEffect(manaRegenEffect);
|
Abilities.GrantAbilityPermanently(
|
||||||
|
ability.GetAbilityData(),
|
||||||
|
abilityLevel: 1,
|
||||||
|
levelOverridePolicy: LevelComparison.None,
|
||||||
|
sourceEntity: this);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Apply all default effects
|
||||||
|
foreach (var effect in DefaultPermanentEffects)
|
||||||
|
{
|
||||||
|
EffectsManager.ApplyEffect(new Effect(effect.GetEffectData(), new EffectOwnership(this, this)));
|
||||||
|
}
|
||||||
|
|
||||||
|
// Subscribe default empowered actions effects to the Empowered Action Used event
|
||||||
|
foreach (var effect in EmpoweredActionEffects)
|
||||||
|
{
|
||||||
|
Events.Subscribe<EmpoweredActionPayload>(EmpoweredActionUsed.GetTag(), data =>
|
||||||
|
{
|
||||||
|
EffectsManager.ApplyEffect(new Effect(effect.GetEffectData(), new EffectOwnership(this, this)));
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
// DashIndicator = GetNode<TextureRect>("%DashIndicator");
|
// DashIndicator = GetNode<TextureRect>("%DashIndicator");
|
||||||
PowerCooldownIndicator = GetNode<ColorRect>("%DashCooldownIndicator");
|
PowerCooldownIndicator = GetNode<ColorRect>("%DashCooldownIndicator");
|
||||||
@@ -721,9 +747,8 @@ public partial class PlayerController : CharacterBody3D,
|
|||||||
|
|
||||||
foreach (var weaponLandAbility in AbilityLoadout)
|
foreach (var weaponLandAbility in AbilityLoadout)
|
||||||
{
|
{
|
||||||
var weaponLeftTag = Tag.RequestTag(tagsManager,"abilities.weapon.left").GetSingleTagContainer();
|
|
||||||
var leftGrantAbilityConfig = new GrantAbilityConfig(
|
var leftGrantAbilityConfig = new GrantAbilityConfig(
|
||||||
weaponLandAbility.Ability(new ExplodingSwordCreation(WeaponSystem), weaponLeftTag),
|
weaponLandAbility.GetAbilityData(),
|
||||||
ScalableLevel: new ScalableInt(1),
|
ScalableLevel: new ScalableInt(1),
|
||||||
RemovalPolicy: AbilityDeactivationPolicy.CancelImmediately,
|
RemovalPolicy: AbilityDeactivationPolicy.CancelImmediately,
|
||||||
InhibitionPolicy: AbilityDeactivationPolicy.CancelImmediately,
|
InhibitionPolicy: AbilityDeactivationPolicy.CancelImmediately,
|
||||||
@@ -737,32 +762,14 @@ public partial class PlayerController : CharacterBody3D,
|
|||||||
new DurationData(DurationType.Infinite),
|
new DurationData(DurationType.Infinite),
|
||||||
effectComponents: [leftGrantComponent]);
|
effectComponents: [leftGrantComponent]);
|
||||||
EffectsManager.ApplyEffect(new Effect(leftGrantEffect, new EffectOwnership(this, this)));
|
EffectsManager.ApplyEffect(new Effect(leftGrantEffect, new EffectOwnership(this, this)));
|
||||||
|
|
||||||
var weaponLandedTag = Tag.RequestTag(tagsManager, "abilities.weapon.land").GetSingleTagContainer();
|
|
||||||
var landGrantAbilityConfig = new GrantAbilityConfig(
|
|
||||||
weaponLandAbility.Ability(new ExplodingSwordCreation(WeaponSystem), weaponLandedTag),
|
|
||||||
ScalableLevel: new ScalableInt(1),
|
|
||||||
RemovalPolicy: AbilityDeactivationPolicy.CancelImmediately,
|
|
||||||
InhibitionPolicy: AbilityDeactivationPolicy.CancelImmediately,
|
|
||||||
TryActivateOnGrant: false,
|
|
||||||
TryActivateOnEnable: false,
|
|
||||||
LevelOverridePolicy: LevelComparison.Higher);
|
|
||||||
|
|
||||||
var landGrantComponent = new GrantAbilityEffectComponent([landGrantAbilityConfig]);
|
|
||||||
var landGrantEffect = new EffectData(
|
|
||||||
"Grant Weapon Land Ability",
|
|
||||||
new DurationData(DurationType.Infinite),
|
|
||||||
effectComponents: [landGrantComponent]);
|
|
||||||
EffectsManager.ApplyEffect(new Effect(landGrantEffect, new EffectOwnership(this, this)));
|
|
||||||
|
|
||||||
GetTree().CreateTimer(5).Timeout += () => WeaponSystem.GrantNewAbilityForWeaponFly(weaponLandAbility);
|
|
||||||
}
|
}
|
||||||
|
// GetTree().CreateTimer(5).Timeout += () => WeaponSystem.GrantNewAbilityForWeaponFly(weaponLandAbility);
|
||||||
// Forge events
|
// Forge events
|
||||||
var weaponLeftToken = WeaponSystem.Events.Subscribe<WeaponEventPayload>(WeaponSystem.WeaponStartedFlyingEventTag, OnWeaponLeft);
|
var weaponLeftToken = WeaponSystem.Events.Subscribe(WeaponSystem.WeaponStartedFlyingEventTag, OnWeaponLeft);
|
||||||
var weaponLandedToken = WeaponSystem.Events.Subscribe<WeaponEventPayload>(WeaponSystem.WeaponStoppedFlyingEventTag, OnWeaponLanded);
|
var weaponLandedToken = WeaponSystem.Events.Subscribe(WeaponSystem.WeaponStoppedFlyingEventTag, OnWeaponLanded);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void OnWeaponLeft(EventData<WeaponEventPayload> data)
|
public void OnWeaponLeft(EventData data)
|
||||||
{
|
{
|
||||||
var target = data.Target;
|
var target = data.Target;
|
||||||
|
|
||||||
@@ -772,7 +779,7 @@ public partial class PlayerController : CharacterBody3D,
|
|||||||
Abilities.TryActivateAbilitiesByTag(weaponLeftTag, target, out var landedFailures);
|
Abilities.TryActivateAbilitiesByTag(weaponLeftTag, target, out var landedFailures);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void OnWeaponLanded(EventData<WeaponEventPayload> data)
|
public void OnWeaponLanded(EventData data)
|
||||||
{
|
{
|
||||||
var source = data.Source;
|
var source = data.Source;
|
||||||
var target = data.Target;
|
var target = data.Target;
|
||||||
@@ -2068,13 +2075,20 @@ public partial class PlayerController : CharacterBody3D,
|
|||||||
|
|
||||||
// Inhibit Mana Regeneration for a while after using an empowered action
|
// Inhibit Mana Regeneration for a while after using an empowered action
|
||||||
// TODO: Use Forge events instead of relying on direct referencing
|
// TODO: Use Forge events instead of relying on direct referencing
|
||||||
_manaRegenEffectHandle!.SetInhibit(true);
|
// _manaRegenEffectHandle!.SetInhibit(true);
|
||||||
GetTree().CreateTimer(EmpoweredAction.ManaRegenPause).Timeout += () => {_manaRegenEffectHandle!.SetInhibit(false);};
|
// GetTree().CreateTimer(EmpoweredAction.ManaRegenPause).Timeout += () => {_manaRegenEffectHandle!.SetInhibit(false);};
|
||||||
|
|
||||||
_isWallJumpAvailable = true;
|
_isWallJumpAvailable = true;
|
||||||
_canDashAirborne = true;
|
_canDashAirborne = true;
|
||||||
EmpoweredActionsLeft--;
|
EmpoweredActionsLeft--;
|
||||||
_playerState.SendEvent(EmpoweredActionsLeft <= 0 ? "expired" : "power_used");
|
_playerState.SendEvent(EmpoweredActionsLeft <= 0 ? "expired" : "power_used");
|
||||||
|
|
||||||
|
Events.Raise(new EventData<EmpoweredActionPayload>
|
||||||
|
{
|
||||||
|
EventTags = EmpoweredActionUsed.GetTag().GetSingleTagContainer()!,
|
||||||
|
Source = this,
|
||||||
|
Payload = new EmpoweredActionPayload()
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
///////////////////////////
|
///////////////////////////
|
||||||
|
|||||||
Reference in New Issue
Block a user