Compare commits
6 Commits
v0.2.86
...
release/po
| Author | SHA1 | Date | |
|---|---|---|---|
| d8f0833de5 | |||
| 3cdb7e85c3 | |||
| 7746a40542 | |||
| 33c0088ff8 | |||
| b2ab80c54c | |||
| 06ef5d892b |
@@ -156,6 +156,11 @@ jobs:
|
|||||||
- name: Checkout with LFS
|
- name: Checkout with LFS
|
||||||
uses: https://git.game-dev.space/minimata/checkout-with-lfs.git@main
|
uses: https://git.game-dev.space/minimata/checkout-with-lfs.git@main
|
||||||
|
|
||||||
|
- name: Remove problematic addons
|
||||||
|
run: |
|
||||||
|
rm -rf ${{ gitea.workspace }}/addons/gdUnit4
|
||||||
|
rm -rf ${{ gitea.workspace }}/addons/rider-plugin
|
||||||
|
|
||||||
- name: Setup Godot
|
- name: Setup Godot
|
||||||
id: setup-godot
|
id: setup-godot
|
||||||
uses: https://git.game-dev.space/minimata/setup-godot.git@main
|
uses: https://git.game-dev.space/minimata/setup-godot.git@main
|
||||||
@@ -163,10 +168,6 @@ jobs:
|
|||||||
godot-version: ${GODOT_VERSION}
|
godot-version: ${GODOT_VERSION}
|
||||||
dotnet-version: ${DOTNET_VERSION}
|
dotnet-version: ${DOTNET_VERSION}
|
||||||
|
|
||||||
- name: Remove GDUnit addon
|
|
||||||
run: |
|
|
||||||
rm -rf ${{ gitea.workspace }}/addons/gdUnit4
|
|
||||||
|
|
||||||
- name: Build Windows
|
- name: Build Windows
|
||||||
run: |
|
run: |
|
||||||
mkdir -v -p build/windows
|
mkdir -v -p build/windows
|
||||||
@@ -178,7 +179,7 @@ jobs:
|
|||||||
uses: actions/upload-artifact@v3-node20
|
uses: actions/upload-artifact@v3-node20
|
||||||
with:
|
with:
|
||||||
name: Windows build
|
name: Windows build
|
||||||
path: ${{ github.workspace }}/Windows.zip
|
path: ${{ github.workspace }}/build/windows
|
||||||
# - name: Setup Butler
|
# - name: Setup Butler
|
||||||
# shell: bash
|
# shell: bash
|
||||||
# env:
|
# env:
|
||||||
|
|||||||
@@ -29,6 +29,8 @@ public partial class ForgeEntityNode : Node3D, IForgeEntity
|
|||||||
[Export]
|
[Export]
|
||||||
public ForgeTagContainer? BaseTags { get; set; }
|
public ForgeTagContainer? BaseTags { get; set; }
|
||||||
[Export]
|
[Export]
|
||||||
|
public Godot.Collections.Array<ForgeUtils.AttributeSetType> AttributeSets { get; set; } = [];
|
||||||
|
[Export]
|
||||||
public ForgeSharedVariableSet? SharedVariableDefinitions { get; set; }
|
public ForgeSharedVariableSet? SharedVariableDefinitions { get; set; }
|
||||||
|
|
||||||
public required EntityAttributes Attributes { get; set; }
|
public required EntityAttributes Attributes { get; set; }
|
||||||
@@ -51,7 +53,7 @@ public partial class ForgeEntityNode : Node3D, IForgeEntity
|
|||||||
{
|
{
|
||||||
BaseTags ??= new ForgeTagContainer();
|
BaseTags ??= new ForgeTagContainer();
|
||||||
Tags = new EntityTags(BaseTags.GetTagContainer());
|
Tags = new EntityTags(BaseTags.GetTagContainer());
|
||||||
Attributes = new EntityAttributes([.. ForgeUtils.CollectAttributeList(this)]);
|
Attributes = new EntityAttributes([.. ForgeUtils.CollectAttributeList(AttributeSets)]);
|
||||||
Abilities = new EntityAbilities(this);
|
Abilities = new EntityAbilities(this);
|
||||||
Events = new EventManager();
|
Events = new EventManager();
|
||||||
|
|
||||||
|
|||||||
1
forge/abilities/ForgeUiAbilityBehaviour.cs.uid
Normal file
1
forge/abilities/ForgeUiAbilityBehaviour.cs.uid
Normal file
@@ -0,0 +1 @@
|
|||||||
|
uid://c411ne7juqsnv
|
||||||
@@ -30,7 +30,6 @@ public class DamageExecution : CustomExecution
|
|||||||
|
|
||||||
public DamageExecution(DamageType damageType, ForgeTagContainer? damageDealerEventTags, ForgeTagContainer? damageReceiverEventTags)
|
public DamageExecution(DamageType damageType, ForgeTagContainer? damageDealerEventTags, ForgeTagContainer? damageReceiverEventTags)
|
||||||
{
|
{
|
||||||
|
|
||||||
// Capture target mana and magic resistance
|
// Capture target mana and magic resistance
|
||||||
TargetHealth = new AttributeCaptureDefinition(
|
TargetHealth = new AttributeCaptureDefinition(
|
||||||
"CharacterAttributeSet.Health",
|
"CharacterAttributeSet.Health",
|
||||||
@@ -60,8 +59,6 @@ public class DamageExecution : CustomExecution
|
|||||||
effect,
|
effect,
|
||||||
target,
|
target,
|
||||||
effectEvaluatedData);
|
effectEvaluatedData);
|
||||||
|
|
||||||
GD.Print(targetIncomingDamage);
|
|
||||||
|
|
||||||
if (targetIncomingDamage <= 0)
|
if (targetIncomingDamage <= 0)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -103,6 +103,7 @@ RMovement = ExtResource("4_dejyg")
|
|||||||
[node name="ForgeEntityNode" type="Node3D" parent="." unique_id=1255429192]
|
[node name="ForgeEntityNode" type="Node3D" parent="." unique_id=1255429192]
|
||||||
script = ExtResource("7_46wn3")
|
script = ExtResource("7_46wn3")
|
||||||
BaseTags = ExtResource("8_oj1ws")
|
BaseTags = ExtResource("8_oj1ws")
|
||||||
|
AttributeSets = Array[int]([0, 4, 2])
|
||||||
metadata/_custom_type_script = "uid://rpcbb54q4atx"
|
metadata/_custom_type_script = "uid://rpcbb54q4atx"
|
||||||
|
|
||||||
[node name="CharacterAttributeSet" type="Node" parent="ForgeEntityNode" unique_id=418635308]
|
[node name="CharacterAttributeSet" type="Node" parent="ForgeEntityNode" unique_id=418635308]
|
||||||
|
|||||||
@@ -56,15 +56,15 @@ BaseValue = 1
|
|||||||
[sub_resource type="Resource" id="Resource_5eesh"]
|
[sub_resource type="Resource" id="Resource_5eesh"]
|
||||||
script = ExtResource("13_jryek")
|
script = ExtResource("13_jryek")
|
||||||
Name = "Grant abilities"
|
Name = "Grant abilities"
|
||||||
Modifiers = null
|
Modifiers = []
|
||||||
Components = Array[Object]([SubResource("Resource_3gkmr")])
|
Components = Array[Object]([SubResource("Resource_3gkmr")])
|
||||||
Executions = null
|
Executions = []
|
||||||
StackLimit = SubResource("Resource_q86ag")
|
StackLimit = SubResource("Resource_q86ag")
|
||||||
InitialStack = SubResource("Resource_oo2a1")
|
InitialStack = SubResource("Resource_oo2a1")
|
||||||
Cues = null
|
Cues = []
|
||||||
metadata/_custom_type_script = "uid://b83hf13nj37k3"
|
metadata/_custom_type_script = "uid://b83hf13nj37k3"
|
||||||
|
|
||||||
[sub_resource type="ViewportTexture" id="ViewportTexture_5lf6m"]
|
[sub_resource type="ViewportTexture" id="ViewportTexture_4jf2q"]
|
||||||
viewport_path = NodePath("SubViewport")
|
viewport_path = NodePath("SubViewport")
|
||||||
|
|
||||||
[sub_resource type="Resource" id="Resource_6d4gl"]
|
[sub_resource type="Resource" id="Resource_6d4gl"]
|
||||||
@@ -95,7 +95,6 @@ radius = 2.0
|
|||||||
collision_layer = 16
|
collision_layer = 16
|
||||||
collision_mask = 273
|
collision_mask = 273
|
||||||
script = ExtResource("1_r6506")
|
script = ExtResource("1_r6506")
|
||||||
HitAbility = ExtResource("6_4jf2q")
|
|
||||||
EnemyHeight = 2.0
|
EnemyHeight = 2.0
|
||||||
RKnockback = ExtResource("11_8k3xb")
|
RKnockback = ExtResource("11_8k3xb")
|
||||||
RMovement = ExtResource("4_na24f")
|
RMovement = ExtResource("4_na24f")
|
||||||
@@ -103,6 +102,7 @@ RMovement = ExtResource("4_na24f")
|
|||||||
[node name="ForgeEntityNode" type="Node3D" parent="." unique_id=289553407]
|
[node name="ForgeEntityNode" type="Node3D" parent="." unique_id=289553407]
|
||||||
script = ExtResource("7_f22p3")
|
script = ExtResource("7_f22p3")
|
||||||
BaseTags = ExtResource("8_4jf2q")
|
BaseTags = ExtResource("8_4jf2q")
|
||||||
|
AttributeSets = Array[int]([0, 4, 2])
|
||||||
metadata/_custom_type_script = "uid://rpcbb54q4atx"
|
metadata/_custom_type_script = "uid://rpcbb54q4atx"
|
||||||
|
|
||||||
[node name="CharacterAttributeSet" type="Node" parent="ForgeEntityNode" unique_id=1699781551]
|
[node name="CharacterAttributeSet" type="Node" parent="ForgeEntityNode" unique_id=1699781551]
|
||||||
@@ -141,7 +141,7 @@ metadata/_custom_type_script = "uid://dps0oef50noil"
|
|||||||
|
|
||||||
[node name="CHealthBar" parent="." unique_id=1278247727 instance=ExtResource("7_18xwy")]
|
[node name="CHealthBar" parent="." unique_id=1278247727 instance=ExtResource("7_18xwy")]
|
||||||
transform = Transform3D(0.4, 0, 0, 0, 1, 0, 0, 0, 1, 0, 2.2, 0)
|
transform = Transform3D(0.4, 0, 0, 0, 1, 0, 0, 0, 1, 0, 2.2, 0)
|
||||||
texture = SubResource("ViewportTexture_5lf6m")
|
texture = SubResource("ViewportTexture_4jf2q")
|
||||||
|
|
||||||
[node name="CMovement" parent="." unique_id=1080640834 node_paths=PackedStringArray("WallInFrontRayCast") instance=ExtResource("7_qyswd")]
|
[node name="CMovement" parent="." unique_id=1080640834 node_paths=PackedStringArray("WallInFrontRayCast") instance=ExtResource("7_qyswd")]
|
||||||
RMovement = SubResource("Resource_6d4gl")
|
RMovement = SubResource("Resource_6d4gl")
|
||||||
|
|||||||
@@ -183,6 +183,7 @@ RMovement = ExtResource("4_0f52b")
|
|||||||
[node name="ForgeEntityNode" type="Node3D" parent="." unique_id=289553407]
|
[node name="ForgeEntityNode" type="Node3D" parent="." unique_id=289553407]
|
||||||
script = ExtResource("5_ya0fp")
|
script = ExtResource("5_ya0fp")
|
||||||
BaseTags = ExtResource("6_ttkdf")
|
BaseTags = ExtResource("6_ttkdf")
|
||||||
|
AttributeSets = Array[int]([0, 4, 2])
|
||||||
metadata/_custom_type_script = "uid://rpcbb54q4atx"
|
metadata/_custom_type_script = "uid://rpcbb54q4atx"
|
||||||
|
|
||||||
[node name="CharacterAttributeSet" type="Node" parent="ForgeEntityNode" unique_id=1699781551]
|
[node name="CharacterAttributeSet" type="Node" parent="ForgeEntityNode" unique_id=1699781551]
|
||||||
|
|||||||
@@ -78,6 +78,7 @@ surface_material_override/0 = SubResource("StandardMaterial3D_hys74")
|
|||||||
[node name="ForgeEntityNode" type="Node3D" parent="." unique_id=806020391]
|
[node name="ForgeEntityNode" type="Node3D" parent="." unique_id=806020391]
|
||||||
script = ExtResource("3_wikc1")
|
script = ExtResource("3_wikc1")
|
||||||
BaseTags = SubResource("Resource_nqbbv")
|
BaseTags = SubResource("Resource_nqbbv")
|
||||||
|
AttributeSets = Array[int]([0])
|
||||||
metadata/_custom_type_script = "uid://rpcbb54q4atx"
|
metadata/_custom_type_script = "uid://rpcbb54q4atx"
|
||||||
|
|
||||||
[node name="ForgeEffect" type="Node" parent="ForgeEntityNode" unique_id=2068515708]
|
[node name="ForgeEffect" type="Node" parent="ForgeEntityNode" unique_id=2068515708]
|
||||||
|
|||||||
@@ -130,6 +130,7 @@ PlantedTickAbility = ExtResource("3_7bruw")
|
|||||||
[node name="ForgeEntityNode" type="Node3D" parent="." unique_id=1798885192]
|
[node name="ForgeEntityNode" type="Node3D" parent="." unique_id=1798885192]
|
||||||
script = ExtResource("5_7bruw")
|
script = ExtResource("5_7bruw")
|
||||||
BaseTags = SubResource("Resource_rgbou")
|
BaseTags = SubResource("Resource_rgbou")
|
||||||
|
AttributeSets = Array[int]([3])
|
||||||
metadata/_custom_type_script = "uid://rpcbb54q4atx"
|
metadata/_custom_type_script = "uid://rpcbb54q4atx"
|
||||||
|
|
||||||
[node name="WeaponAttributeSet" type="Node" parent="ForgeEntityNode" unique_id=14845649]
|
[node name="WeaponAttributeSet" type="Node" parent="ForgeEntityNode" unique_id=14845649]
|
||||||
|
|||||||
@@ -1,7 +0,0 @@
|
|||||||
[gd_resource type="Resource" script_class="RHealth" format=3 uid="uid://bjyd801wvverk"]
|
|
||||||
|
|
||||||
[ext_resource type="Script" uid="uid://baiapod3csndf" path="res://scenes/components/health/RHealth.cs" id="1_tv6ah"]
|
|
||||||
|
|
||||||
[resource]
|
|
||||||
script = ExtResource("1_tv6ah")
|
|
||||||
metadata/_custom_type_script = "uid://baiapod3csndf"
|
|
||||||
@@ -1,7 +0,0 @@
|
|||||||
[gd_resource type="Resource" script_class="RDamageModifier" format=3 uid="uid://dyru7mxo121w6"]
|
|
||||||
|
|
||||||
[ext_resource type="Script" uid="uid://b6y3ugfydvch0" path="res://scenes/components/damage/RDamageModifier.cs" id="1_7i47t"]
|
|
||||||
|
|
||||||
[resource]
|
|
||||||
script = ExtResource("1_7i47t")
|
|
||||||
metadata/_custom_type_script = "uid://b6y3ugfydvch0"
|
|
||||||
@@ -24,11 +24,14 @@ using GodotStateCharts;
|
|||||||
|
|
||||||
using Movementtests.addons.godot_state_charts.csharp;
|
using Movementtests.addons.godot_state_charts.csharp;
|
||||||
using Movementtests.forge.abilities;
|
using Movementtests.forge.abilities;
|
||||||
|
using Movementtests.forge.attribute_sets;
|
||||||
using Movementtests.interfaces;
|
using Movementtests.interfaces;
|
||||||
using Movementtests.systems;
|
using Movementtests.systems;
|
||||||
using Movementtests.player_controller.Scripts;
|
using Movementtests.player_controller.Scripts;
|
||||||
using Movementtests.managers;
|
using Movementtests.managers;
|
||||||
using Movementtests.scenes.components.knockback;
|
using Movementtests.scenes.components.knockback;
|
||||||
|
using Movementtests.scenes.enemies;
|
||||||
|
using Movementtests.scenes.player_controller.scripts;
|
||||||
using Movementtests.tools;
|
using Movementtests.tools;
|
||||||
using Movementtests.tools.calculators;
|
using Movementtests.tools.calculators;
|
||||||
using RustyOptions;
|
using RustyOptions;
|
||||||
@@ -476,7 +479,8 @@ public partial class PlayerController : CharacterBody3D, IForgeEntity, ICueHandl
|
|||||||
LoadSettings();
|
LoadSettings();
|
||||||
|
|
||||||
// General use stuff
|
// General use stuff
|
||||||
Attributes = new EntityAttributes([.. ForgeUtils.CollectAttributeList(this)]);
|
// Attributes = new EntityAttributes([.. ForgeUtils.CollectAttributeList(this)]);
|
||||||
|
Attributes = new EntityAttributes([new CharacterAttributeSet(), new PlayerAttributeSet(), new MetaAttributeSet()]);
|
||||||
HealthAttribute = Attributes["CharacterAttributeSet.Health"];
|
HealthAttribute = Attributes["CharacterAttributeSet.Health"];
|
||||||
ManaAttribute = Attributes["PlayerAttributeSet.Mana"];
|
ManaAttribute = Attributes["PlayerAttributeSet.Mana"];
|
||||||
|
|
||||||
|
|||||||
@@ -206,6 +206,7 @@ HomingFactor = 0.8
|
|||||||
|
|
||||||
[node name="ForgeEntityNode" type="Node3D" parent="." unique_id=1961065393]
|
[node name="ForgeEntityNode" type="Node3D" parent="." unique_id=1961065393]
|
||||||
script = ExtResource("3_0m0gv")
|
script = ExtResource("3_0m0gv")
|
||||||
|
AttributeSets = Array[int]([0])
|
||||||
metadata/_custom_type_script = "uid://rpcbb54q4atx"
|
metadata/_custom_type_script = "uid://rpcbb54q4atx"
|
||||||
|
|
||||||
[node name="ForgeAttributeSet" type="Node" parent="ForgeEntityNode" unique_id=100377985]
|
[node name="ForgeAttributeSet" type="Node" parent="ForgeEntityNode" unique_id=100377985]
|
||||||
|
|||||||
@@ -1,12 +1,37 @@
|
|||||||
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
using Gamesmiths.Forge.Attributes;
|
using Gamesmiths.Forge.Attributes;
|
||||||
using Gamesmiths.Forge.Godot.Nodes;
|
using Gamesmiths.Forge.Godot.Nodes;
|
||||||
using Godot;
|
using Godot;
|
||||||
|
using Godot.Collections;
|
||||||
|
using Movementtests.forge.attribute_sets;
|
||||||
|
using Movementtests.scenes.enemies;
|
||||||
|
using Movementtests.scenes.player_controller.components.weapon;
|
||||||
|
using Movementtests.scenes.player_controller.scripts;
|
||||||
|
|
||||||
namespace Movementtests.tools;
|
namespace Movementtests.tools;
|
||||||
|
|
||||||
public static class ForgeUtils
|
public static class ForgeUtils
|
||||||
{
|
{
|
||||||
|
public enum AttributeSetType
|
||||||
|
{
|
||||||
|
Meta,
|
||||||
|
Player,
|
||||||
|
Enemy,
|
||||||
|
Weapon,
|
||||||
|
Character
|
||||||
|
}
|
||||||
|
|
||||||
|
public static System.Collections.Generic.Dictionary<AttributeSetType, Func<AttributeSet>> AttributeSetMap { get; } = new()
|
||||||
|
{
|
||||||
|
{ AttributeSetType.Meta, () => new MetaAttributeSet() },
|
||||||
|
{ AttributeSetType.Player, () => new PlayerAttributeSet() },
|
||||||
|
{ AttributeSetType.Enemy, () => new EnemyAttributeSet() },
|
||||||
|
{ AttributeSetType.Weapon, () => new WeaponAttributeSet() },
|
||||||
|
{ AttributeSetType.Character, () => new CharacterAttributeSet() },
|
||||||
|
};
|
||||||
|
|
||||||
public static List<AttributeSet> CollectAttributeList(Node node)
|
public static List<AttributeSet> CollectAttributeList(Node node)
|
||||||
{
|
{
|
||||||
List<AttributeSet> attributeSetList = [];
|
List<AttributeSet> attributeSetList = [];
|
||||||
@@ -19,4 +44,9 @@ public static class ForgeUtils
|
|||||||
}
|
}
|
||||||
return attributeSetList;
|
return attributeSetList;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static List<AttributeSet> CollectAttributeList(Array<AttributeSetType> types)
|
||||||
|
{
|
||||||
|
return types.Select(type => AttributeSetMap[type]()).ToList();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user