Update ESS to get the EntityResourceData removal update. Also update the Engine.

This commit is contained in:
Relintai 2020-06-20 16:15:24 +02:00
parent c707736c78
commit 153b15eb4d
14 changed files with 48 additions and 95 deletions

View File

@ -1,6 +1,6 @@
[gd_resource type="EntityResourceData" load_steps=2 format=2]
[gd_resource type="EntityResource" load_steps=2 format=2]
[ext_resource path="res://scripts/resources/ManaResourceData.gd" type="Script" id=1]
[ext_resource path="res://scripts/resources/ManaResource.gd" type="Script" id=1]
[resource]
id = 1

View File

@ -6,7 +6,7 @@
[ext_resource path="res://modules/core/entity_skills/1_test.tres" type="EntitySkillData" id=4]
[ext_resource path="res://modules/core/item_templates/1_gold.tres" type="ItemTemplate" id=5]
[ext_resource path="res://modules/core/crafting/1_test_craft.tres" type="CraftRecipe" id=6]
[ext_resource path="res://modules/core/entity_resources/1_mana_resource.tres" type="EntityResourceData" id=7]
[ext_resource path="res://modules/core/entity_resources/1_mana_resource.tres" type="EntityResource" id=7]
[ext_resource path="res://modules/core/xp/xp_data.tres" type="XPData" id=8]
[resource]

View File

@ -5,7 +5,6 @@
[ext_resource path="res://modules/entity_classes/naturalist/spells/11_aspect_of_wasps_rank_1.tres" type="Spell" id=3]
[ext_resource path="res://modules/entity_classes/naturalist/spells/13_aspect_of_bees_rank_1.tres" type="Spell" id=5]
[ext_resource path="res://modules/entity_classes/naturalist/spells/10_aspect_of_scorpions_rank_1.tres" type="Spell" id=7]
[ext_resource path="res://modules/core/entity_resources/1_mana_resource.tres" type="EntityResourceData" id=8]
[ext_resource path="res://scripts/ai/EntityAIGD.gd" type="Script" id=9]
[ext_resource path="res://modules/entity_classes/naturalist/spells/17_ironbark_rank_1.tres" type="Spell" id=10]
[ext_resource path="res://modules/entity_classes/naturalist/spells/24_attunement_rank_1.tres" type="Spell" id=11]
@ -26,6 +25,8 @@
[sub_resource type="EntityAI" id=1]
script = ExtResource( 9 )
[sub_resource type="EntityResource" id=3]
[sub_resource type="CharacterSpec" id=2]
id = 1
@ -33,7 +34,7 @@ id = 1
resource_name = "Naturalist"
id = 1
text_name = "Naturalist"
entity_resources = [ ExtResource( 8 ) ]
entity_resources = [ SubResource( 3 ) ]
specs = [ SubResource( 2 ) ]
spells = [ ExtResource( 7 ), ExtResource( 3 ), ExtResource( 15 ), ExtResource( 5 ), ExtResource( 12 ), ExtResource( 23 ), ExtResource( 1 ), ExtResource( 10 ), ExtResource( 24 ), ExtResource( 2 ), ExtResource( 19 ), ExtResource( 18 ), ExtResource( 17 ), ExtResource( 20 ), ExtResource( 11 ), ExtResource( 22 ), ExtResource( 16 ), ExtResource( 21 ), ExtResource( 14 ) ]
start_spells = [ ExtResource( 7 ), ExtResource( 21 ), ExtResource( 14 ) ]

View File

@ -19,9 +19,4 @@ damage_enabled = true
damage_type = 8
damage_min = 4
damage_max = 5
attribute_count = 1
StatModAttribute_0/stat = 24
StatModAttribute_0/base_mod = 0.0
StatModAttribute_0/bonus_mod = 0.0
StatModAttribute_0/percent_mod = 10.0
script = ExtResource( 1 )

View File

@ -20,13 +20,4 @@ damage_enabled = true
damage_type = 16
damage_min = 280
damage_max = 330
attribute_count = 2
StatModAttribute_0/stat = 26
StatModAttribute_0/base_mod = 0.0
StatModAttribute_0/bonus_mod = 0.0
StatModAttribute_0/percent_mod = -10.0
StatModAttribute_1/stat = 27
StatModAttribute_1/base_mod = 0.0
StatModAttribute_1/bonus_mod = 0.0
StatModAttribute_1/percent_mod = -10.0
script = ExtResource( 1 )

View File

@ -11,9 +11,4 @@ time = 6.0
aura_type = 1
text_name = "Ironbark"
text_description = "Reduces damage taken by 70%. This spell is not on the global cooldown."
attribute_count = 1
StatModAttribute_0/stat = 24
StatModAttribute_0/base_mod = 0.0
StatModAttribute_0/bonus_mod = 0.0
StatModAttribute_0/percent_mod = -70.0
script = ExtResource( 1 )

View File

@ -6,8 +6,6 @@
[ext_resource path="res://scripts/entities/EntityDataGD.gd" type="Script" id=4]
[ext_resource path="res://modules/core/crafting/1_test_craft.tres" type="CraftRecipe" id=5]
[sub_resource type="SimpleLevelStatData" id=1]
agility = 4
strength = 3

View File

@ -4,8 +4,6 @@
[ext_resource path="res://modules/entity_classes/naturalist/1_naturalist.tres" type="EntityClassData" id=2]
[ext_resource path="res://scripts/entities/EntityDataGD.gd" type="Script" id=3]
[sub_resource type="LootDataBase" id=1]
[sub_resource type="SimpleLevelStatData" id=2]

View File

@ -1,6 +1,6 @@
[gd_resource type="Spell" load_steps=7 format=2]
[ext_resource path="res://modules/core/entity_resources/1_mana_resource.tres" type="EntityResourceData" id=1]
[ext_resource path="res://modules/core/entity_resources/1_mana_resource.tres" type="EntityResource" id=1]
[ext_resource path="res://modules/entity_classes/naturalist/auras/10_aspect_of_scorpions_rank_1.tres" type="Aura" id=2]
[ext_resource path="res://modules/entity_classes/naturalist/effect_data/aspect_of_scorpions.tres" type="SpellEffectVisual" id=3]
[ext_resource path="res://scripts/spells/gd_spell_script.gd" type="Script" id=4]

View File

@ -1,6 +1,6 @@
[gd_resource type="Spell" load_steps=5 format=2]
[ext_resource path="res://modules/core/entity_resources/1_mana_resource.tres" type="EntityResourceData" id=1]
[ext_resource path="res://modules/core/entity_resources/1_mana_resource.tres" type="EntityResource" id=1]
[ext_resource path="res://scripts/spells/gd_spell_script.gd" type="Script" id=2]
[ext_resource path="res://modules/entity_classes/naturalist/icons/root.tres" type="Texture" id=3]

View File

@ -46,6 +46,8 @@ var health_bar_label : Label = null
var entity : Entity = null
var health : EntityResource = null
var _health : EntityResource
func _enter_tree():
name_label = get_node(name_label_path) as Label
health_bar = get_node(health_bar_path) as TextureProgress
@ -122,14 +124,14 @@ func set_max_distance(var value : float) -> void:
max_distance = value
func c_health_changed(stat : EntityResource) -> void:
if stat.max_value == 0:
func c_health_changed() -> void:
if _health.max_value == 0:
health_bar.max_value = 1
health_bar.value = 0
return
health_bar.max_value = stat.max_value
health_bar.value = stat.current_value
health_bar.max_value = _health.max_value
health_bar.value = _health.current_value
# if stat.cmax != 0:
@ -172,6 +174,6 @@ func on_centity_resource_added(resorce) -> void:
if health != null:
return
health = entity.getc_health()
health.connect("changed", self, "c_health_changed")
c_health_changed(health)
_health = entity.getc_health()
_health.connect("changed", self, "c_health_changed")
c_health_changed()

View File

@ -1,28 +0,0 @@
extends EntityResourceData
# Copyright (c) 2019-2020 Péter Magyar
#
# 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.
func _get_entity_resource_instance() -> EntityResource:
var mr = ManaResource.new()
mr.data_path = resource_path
return mr

View File

@ -38,6 +38,7 @@ var _aura_grid : GridContainer
var _player : Entity
var _mana : ManaResource
var _health : EntityResourceHealth
# Called when the node enters the scene tree for the first time.
func _ready() -> void:
@ -84,9 +85,9 @@ func set_player(p_player : Entity) -> void:
for i in range(_player.resource_getc_count()):
centity_resource_added(_player.resource_getc_index(i))
var health = _player.getc_health()
_on_player_health_changed(health)
health.connect("changed", self, "_on_player_health_changed")
_health = _player.getc_health()
_on_player_health_changed()
_health.connect("changed", self, "_on_player_health_changed")
_name_text.text = _player.centity_name
@ -95,13 +96,12 @@ func set_player(p_player : Entity) -> void:
func centity_resource_added(res : EntityResource):
if res is ManaResource:
_mana= res as ManaResource
_mana = res as ManaResource
_mana.connect("changed", self, "_on_mana_changed")
_on_mana_changed(_mana)
_on_mana_changed()
func _on_mana_changed(resource: EntityResource) -> void:
if resource.max_value == 0:
func _on_mana_changed() -> void:
if _mana.max_value == 0:
_resource_range.min_value = 0
_resource_range.max_value = 1
_resource_range.value = 0
@ -111,10 +111,10 @@ func _on_mana_changed(resource: EntityResource) -> void:
return
_resource_range.min_value = 0
_resource_range.max_value = resource.max_value
_resource_range.value = resource.current_value
_resource_range.max_value = _mana.max_value
_resource_range.value = _mana.current_value
_resource_text.text = str(resource.current_value) + "/" + str(resource.max_value)
_resource_text.text = str(_mana.current_value) + "/" + str(_mana.max_value)
func on_notification_caura(what : int, aura_data : AuraData) -> void:
if what == SpellEnums.NOTIFICATION_AURA_ADDED:
@ -131,8 +131,8 @@ func on_notification_caura(what : int, aura_data : AuraData) -> void:
bn.queue_free()
return
func _on_player_health_changed(health : EntityResource) -> void:
if health.max_value == 0:
func _on_player_health_changed() -> void:
if _health.max_value == 0:
_health_range.min_value = 0
_health_range.max_value = 1
_health_range.value = 0
@ -142,10 +142,10 @@ func _on_player_health_changed(health : EntityResource) -> void:
return
_health_range.min_value = 0
_health_range.max_value = health.max_value
_health_range.value = health.current_value
_health_range.max_value = _health.max_value
_health_range.value = _health.current_value
_health_text.text = str(health.current_value) + "/" + str(health.max_value)
_health_text.text = str(_health.current_value) + "/" + str(_health.max_value)
func diecd(entity : Entity) -> void:
set_player(null)

View File

@ -39,6 +39,7 @@ var _xp_range : Range
var _player : Entity
var _mana : ManaResource
var _health : EntityResourceHealth
func _ready() -> void:
_name_text = get_node(name_text_path)
@ -78,9 +79,9 @@ func set_player(p_player: Entity) -> void:
for i in range(_player.resource_getc_count()):
centity_resource_added(_player.resource_getc_index(i))
var health = _player.getc_health()
_on_player_health_changed(health)
health.connect("changed", self, "_on_player_health_changed")
_health = _player.getc_health()
_on_player_health_changed()
_health.connect("changed", self, "_on_player_health_changed")
_name_text.text = _player.centity_name
_level_text.text = str(_player.ccharacter_level)
@ -93,10 +94,10 @@ func centity_resource_added(res : EntityResource):
_mana = res as ManaResource
_mana.connect("changed", self, "_on_mana_changed")
_on_mana_changed(_mana)
_on_mana_changed()
func _on_player_health_changed(health: EntityResource) -> void:
if health.max_value == 0:
func _on_player_health_changed() -> void:
if _health.max_value == 0:
_health_range.min_value = 0
_health_range.max_value = 1
_health_range.value = 0
@ -106,13 +107,13 @@ func _on_player_health_changed(health: EntityResource) -> void:
return
_health_range.min_value = 0
_health_range.max_value = health.max_value
_health_range.value = health.current_value
_health_range.max_value = _health.max_value
_health_range.value = _health.current_value
_health_text.text = str(health.current_value) + "/" + str(health.max_value)
_health_text.text = str(_health.current_value) + "/" + str(_health.max_value)
func _on_mana_changed(resource: EntityResource) -> void:
if resource.max_value == 0:
func _on_mana_changed() -> void:
if _mana.max_value == 0:
_resource_range.min_value = 0
_resource_range.max_value = 1
_resource_range.value = 0
@ -122,10 +123,10 @@ func _on_mana_changed(resource: EntityResource) -> void:
return
_resource_range.min_value = 0
_resource_range.max_value = resource.max_value
_resource_range.value = resource.current_value
_resource_range.max_value = _mana.max_value
_resource_range.value = _mana.current_value
_resource_text.text = str(resource.current_value) + "/" + str(resource.max_value)
_resource_text.text = str(_mana.current_value) + "/" + str(_mana.max_value)
func cname_changed(entity: Entity) -> void:
_name_text.text = _player.centity_name