diff --git a/HEADS b/HEADS index cdcfdb97..64253530 100644 --- a/HEADS +++ b/HEADS @@ -1 +1 @@ -{"engine": {"3.2": "60609ff0ed357a38b58126791f7372c8aa3e446e", "master": "8c73e813134001e575b6f59e3b0100471c007410"}, "world_generator": {"master": "97f10512f8832394389e1109154b8af34a2ef2c6"}, "entity_spell_system": {"master": "bebab39f344cfbd9f0222b8ff51a487d950b74f0"}, "ui_extensions": {"master": "6fe4f69fea8d71043b08d959b8085404c9c4fe47"}, "voxelman": {"master": "19f3c1f8ff34331a2f1bedf260637e415b3df7d0"}, "texture_packer": {"master": "b29b499adf570aa7f85af69ef080ff0d5e04afae"}, "fastnoise": {"master": "d0e3f1c759332cf0d9a5d7e0e71d0b0278310651"}, "mesh_data_resource": {"master": "4ee946963a16bbfdb4dbb5df52134d22aa168041"}, "procedural_animations": {"master": "9ae56c17230ba9c6160777650b2b89eecdc8df9e"}, "ess_data": {"master": "3bd637fdd3304b64a18287a49a6b7387acf2f5de"}, "fast_quadratic_mesh_simplifier": {"master": "f6d3d65cc6ce4dddfc68054164feec1f612ecd1f"}, "props": {"master": "b2bcb5ea6469b19298cd849c1232ddb5ad26f71c"}} \ No newline at end of file +{"engine": {"3.2": "60609ff0ed357a38b58126791f7372c8aa3e446e", "master": "8c73e813134001e575b6f59e3b0100471c007410"}, "world_generator": {"master": "97f10512f8832394389e1109154b8af34a2ef2c6"}, "entity_spell_system": {"master": "38d61814699176708e668c95089ebbf920749b87"}, "ui_extensions": {"master": "6fe4f69fea8d71043b08d959b8085404c9c4fe47"}, "voxelman": {"master": "19f3c1f8ff34331a2f1bedf260637e415b3df7d0"}, "texture_packer": {"master": "b29b499adf570aa7f85af69ef080ff0d5e04afae"}, "fastnoise": {"master": "d0e3f1c759332cf0d9a5d7e0e71d0b0278310651"}, "mesh_data_resource": {"master": "4ee946963a16bbfdb4dbb5df52134d22aa168041"}, "procedural_animations": {"master": "9ae56c17230ba9c6160777650b2b89eecdc8df9e"}, "ess_data": {"master": "3bd637fdd3304b64a18287a49a6b7387acf2f5de"}, "fast_quadratic_mesh_simplifier": {"master": "f6d3d65cc6ce4dddfc68054164feec1f612ecd1f"}, "props": {"master": "b2bcb5ea6469b19298cd849c1232ddb5ad26f71c"}} \ No newline at end of file diff --git a/game/modules/core/entity_resources/2_health_resource.tres b/game/modules/core/entity_resources/2_health_resource.tres deleted file mode 100644 index f6645f55..00000000 --- a/game/modules/core/entity_resources/2_health_resource.tres +++ /dev/null @@ -1,7 +0,0 @@ -[gd_resource type="EntityResourceData" load_steps=2 format=2] - -[ext_resource path="res://scripts/resources/HealthResourceData.gd" type="Script" id=1] - -[resource] -id = 1 -script = ExtResource( 1 ) diff --git a/game/modules/core/entity_resources/3_speed_resource.tres b/game/modules/core/entity_resources/3_speed_resource.tres deleted file mode 100644 index d58e24f5..00000000 --- a/game/modules/core/entity_resources/3_speed_resource.tres +++ /dev/null @@ -1,7 +0,0 @@ -[gd_resource type="EntityResourceData" load_steps=2 format=2] - -[ext_resource path="res://scripts/resources/SpeedResourceData.gd" type="Script" id=1] - -[resource] -id = 1 -script = ExtResource( 1 ) diff --git a/game/modules/core/resource_db.tres b/game/modules/core/resource_db.tres index f6c6855e..4d384761 100644 --- a/game/modules/core/resource_db.tres +++ b/game/modules/core/resource_db.tres @@ -1,4 +1,4 @@ -[gd_resource type="ESSResourceDBStatic" load_steps=11 format=2] +[gd_resource type="ESSResourceDBStatic" load_steps=9 format=2] [ext_resource path="res://modules/core/item_templates/2_test.tres" type="ItemTemplate" id=1] [ext_resource path="res://modules/core/item_templates/3_chest_of_the_infinite_wisdom.tres" type="ItemTemplate" id=2] @@ -8,12 +8,10 @@ [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/xp/xp_data.tres" type="XPData" id=8] -[ext_resource path="res://modules/core/entity_resources/3_speed_resource.tres" type="EntityResourceData" id=9] -[ext_resource path="res://modules/core/entity_resources/2_health_resource.tres" type="EntityResourceData" id=10] [resource] xp_data = ExtResource( 8 ) -entity_resources = [ ExtResource( 7 ), ExtResource( 10 ), ExtResource( 9 ) ] +entity_resources = [ ExtResource( 7 ) ] entity_skills = [ ExtResource( 4 ) ] craft_recipes = [ ExtResource( 6 ), ExtResource( 3 ) ] item_templates = [ ExtResource( 5 ), ExtResource( 1 ), ExtResource( 2 ) ] diff --git a/game/modules/entity_classes/elementalist/2_elementalist.tres b/game/modules/entity_classes/elementalist/2_elementalist.tres index 6fc30382..81965638 100644 --- a/game/modules/entity_classes/elementalist/2_elementalist.tres +++ b/game/modules/entity_classes/elementalist/2_elementalist.tres @@ -1,4 +1,4 @@ -[gd_resource type="EntityClassData" load_steps=50 format=2] +[gd_resource type="EntityClassData" load_steps=51 format=2] [ext_resource path="res://scripts/entities/EntityClassDataGD.gd" type="Script" id=1] [ext_resource path="res://modules/entity_classes/elementalist/character_specs/2_elementalist_fire.tres" type="CharacterSpec" id=2] @@ -75,120 +75,124 @@ base = 5.0 stat_id = 33 [sub_resource type="StatDataEntry" id=21] -stat_id = 15 +stat_id = 6 [sub_resource type="StatDataEntry" id=22] -stat_id = 16 +stat_id = 15 [sub_resource type="StatDataEntry" id=23] -stat_id = 26 +stat_id = 16 [sub_resource type="StatDataEntry" id=24] -stat_id = 22 +stat_id = 26 [sub_resource type="StatDataEntry" id=25] -stat_id = 30 +stat_id = 22 [sub_resource type="StatDataEntry" id=26] -stat_id = 20 +stat_id = 30 [sub_resource type="StatDataEntry" id=27] -stat_id = 39 +stat_id = 20 [sub_resource type="StatDataEntry" id=28] -stat_id = 11 +stat_id = 39 [sub_resource type="StatDataEntry" id=29] -stat_id = 29 +stat_id = 11 [sub_resource type="StatDataEntry" id=30] -stat_id = 35 +stat_id = 29 [sub_resource type="StatDataEntry" id=31] +stat_id = 35 + +[sub_resource type="StatDataEntry" id=32] stat_id = 6 base = 4.2 -[sub_resource type="StatDataEntry" id=32] +[sub_resource type="StatDataEntry" id=33] stat_id = 17 -[sub_resource type="StatDataEntry" id=33] +[sub_resource type="StatDataEntry" id=34] stat_id = 18 -[sub_resource type="StatDataEntry" id=34] +[sub_resource type="StatDataEntry" id=35] stat_id = 27 -[sub_resource type="StatDataEntry" id=35] +[sub_resource type="StatDataEntry" id=36] stat_id = 23 -[sub_resource type="StatDataEntry" id=36] +[sub_resource type="StatDataEntry" id=37] stat_id = 14 -[sub_resource type="StatDataEntry" id=37] +[sub_resource type="StatDataEntry" id=38] stat_id = 4 base = 4.0 -[sub_resource type="StatDataEntry" id=38] +[sub_resource type="StatDataEntry" id=39] stat_id = 2 base = 6.0 -[sub_resource type="StatDataEntry" id=39] +[sub_resource type="StatDataEntry" id=40] stat_id = 1 base = 5.0 -[sub_resource type="StatDataEntry" id=40] +[sub_resource type="StatDataEntry" id=41] stat_id = 37 -[sub_resource type="StatDataEntry" id=41] +[sub_resource type="StatDataEntry" id=42] stat_id = 40 -[sub_resource type="StatData" id=42] +[sub_resource type="StatData" id=43] level_stat_data = SubResource( 1 ) stat/agility = SubResource( 2 ) -stat/strength = SubResource( 39 ) -stat/stamina = SubResource( 38 ) +stat/strength = SubResource( 40 ) +stat/stamina = SubResource( 39 ) stat/intellect = SubResource( 19 ) -stat/spirit = SubResource( 37 ) +stat/spirit = SubResource( 38 ) stat/health = SubResource( 17 ) -stat/speed = SubResource( 31 ) +stat/mana = SubResource( 21 ) +stat/speed = SubResource( 32 ) stat/global_cooldown = SubResource( 13 ) stat/haste = SubResource( 14 ) stat/haste_rating = SubResource( 15 ) -stat/resilience = SubResource( 28 ) +stat/resilience = SubResource( 29 ) stat/armor = SubResource( 3 ) stat/attack_power = SubResource( 4 ) -stat/spell_power = SubResource( 36 ) -stat/melee_crit = SubResource( 21 ) -stat/melee_crit_bonus = SubResource( 22 ) -stat/spell_crit = SubResource( 32 ) -stat/spell_crit_bonus = SubResource( 33 ) +stat/spell_power = SubResource( 37 ) +stat/melee_crit = SubResource( 22 ) +stat/melee_crit_bonus = SubResource( 23 ) +stat/spell_crit = SubResource( 33 ) +stat/spell_crit_bonus = SubResource( 34 ) stat/block = SubResource( 5 ) -stat/parry = SubResource( 26 ) +stat/parry = SubResource( 27 ) stat/damage_reduction = SubResource( 7 ) -stat/melee_damage_reduction = SubResource( 24 ) -stat/spell_damage_reduction = SubResource( 35 ) +stat/melee_damage_reduction = SubResource( 25 ) +stat/spell_damage_reduction = SubResource( 36 ) stat/damage_taken = SubResource( 8 ) stat/heal_taken = SubResource( 16 ) -stat/melee_damage = SubResource( 23 ) -stat/spell_damage = SubResource( 34 ) +stat/melee_damage = SubResource( 24 ) +stat/spell_damage = SubResource( 35 ) stat/holy_resist = SubResource( 18 ) -stat/shadow_resist = SubResource( 29 ) -stat/nature_resist = SubResource( 25 ) +stat/shadow_resist = SubResource( 30 ) +stat/nature_resist = SubResource( 26 ) stat/fire_resist = SubResource( 11 ) stat/frost_resist = SubResource( 12 ) stat/lightning_resist = SubResource( 20 ) stat/chaos_resist = SubResource( 6 ) -stat/silence_resist = SubResource( 30 ) +stat/silence_resist = SubResource( 31 ) stat/fear_resist = SubResource( 10 ) -stat/stun_resist = SubResource( 40 ) +stat/stun_resist = SubResource( 41 ) stat/energy = SubResource( 9 ) -stat/rage = SubResource( 27 ) -stat/xp_rate = SubResource( 41 ) +stat/rage = SubResource( 28 ) +stat/xp_rate = SubResource( 42 ) [resource] resource_name = "Elementalist" id = 2 text_name = "Elementalist" -stat_data = SubResource( 42 ) +stat_data = SubResource( 43 ) playstyle_type = 2 specs = [ ExtResource( 2 ), ExtResource( 3 ), ExtResource( 4 ) ] spells = [ ExtResource( 6 ), ExtResource( 7 ), ExtResource( 5 ) ] diff --git a/game/modules/entity_classes/naturalist/1_naturalist.tres b/game/modules/entity_classes/naturalist/1_naturalist.tres index c038809f..f29d4cc5 100644 --- a/game/modules/entity_classes/naturalist/1_naturalist.tres +++ b/game/modules/entity_classes/naturalist/1_naturalist.tres @@ -1,4 +1,4 @@ -[gd_resource type="EntityClassData" load_steps=74 format=2] +[gd_resource type="EntityClassData" load_steps=72 format=2] [ext_resource path="res://modules/entity_classes/naturalist/spells/16_close_wounds_rank_1.tres" type="Spell" id=1] [ext_resource path="res://modules/entity_classes/naturalist/spells/19_uproot_rank_1.tres" type="Spell" id=2] @@ -24,8 +24,6 @@ [ext_resource path="res://modules/entity_classes/naturalist/spells/25_inner_will.tres" type="Spell" id=22] [ext_resource path="res://modules/entity_classes/naturalist/spells/15_rejuvenation_rank_1.tres" type="Spell" id=23] [ext_resource path="res://modules/entity_classes/naturalist/spells/18_natures_swiftness_rank_1.tres" type="Spell" id=24] -[ext_resource path="res://modules/core/entity_resources/3_speed_resource.tres" type="EntityResourceData" id=25] -[ext_resource path="res://modules/core/entity_resources/2_health_resource.tres" type="EntityResourceData" id=26] [sub_resource type="EntityAI" id=1] script = ExtResource( 9 ) @@ -224,7 +222,7 @@ resource_name = "Naturalist" id = 1 text_name = "Naturalist" stat_data = SubResource( 47 ) -entity_resources = [ ExtResource( 26 ), ExtResource( 25 ), ExtResource( 8 ) ] +entity_resources = [ ExtResource( 8 ) ] specs = [ SubResource( 4 ) ] 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 ) ] diff --git a/game/modules/entity_classes/naturalist/spells/10_aspect_of_scorpions_rank_1.tres b/game/modules/entity_classes/naturalist/spells/10_aspect_of_scorpions_rank_1.tres index 14523018..e244aacb 100644 --- a/game/modules/entity_classes/naturalist/spells/10_aspect_of_scorpions_rank_1.tres +++ b/game/modules/entity_classes/naturalist/spells/10_aspect_of_scorpions_rank_1.tres @@ -7,8 +7,8 @@ [ext_resource path="res://modules/entity_classes/naturalist/icons/aspect_of_scorpions.tres" type="Texture" id=5] [sub_resource type="EntityResourceCostDataResource" id=1] -entity_resource_data = ExtResource( 1 ) cost = 100 +entity_resource_data = ExtResource( 1 ) [resource] resource_name = "Aspect of Scorpions" diff --git a/game/modules/entity_classes/naturalist/spells/36_regrow.tres b/game/modules/entity_classes/naturalist/spells/36_regrow.tres index 8d38b6ed..45dc009d 100644 --- a/game/modules/entity_classes/naturalist/spells/36_regrow.tres +++ b/game/modules/entity_classes/naturalist/spells/36_regrow.tres @@ -5,8 +5,8 @@ [ext_resource path="res://modules/entity_classes/naturalist/icons/root.tres" type="Texture" id=3] [sub_resource type="EntityResourceCostDataResource" id=1] -entity_resource_data = ExtResource( 1 ) cost = 100 +entity_resource_data = ExtResource( 1 ) [resource] resource_name = "Regrow" diff --git a/game/player/Body.gd b/game/player/Body.gd index 75d49c7f..e8802676 100644 --- a/game/player/Body.gd +++ b/game/player/Body.gd @@ -255,7 +255,7 @@ func process_movement_player(delta : float) -> void: hvel.y = 0 var target : Vector3 = dir - target *= entity.resource_getc_index(EntityEnums.ENTITY_RESOURCE_INDEX_SPEED).current_value / 100.0 * 4.2 + target *= entity.getc_speed().current_value / 100.0 * 4.2 var accel if dir.dot(hvel) > 0: @@ -329,7 +329,7 @@ func process_movement_mob(delta : float) -> void: hvel.y = 0 var target : Vector3 = dir - target *= entity.resource_getc_index(EntityEnums.ENTITY_RESOURCE_INDEX_SPEED).current_value / 100.0 * 4.2 + target *= entity.getc_speed().current_value / 100.0 * 4.2 var accel if dir.dot(hvel) > 0: diff --git a/game/player/NamePlate.gd b/game/player/NamePlate.gd index 8e21dded..f733affa 100644 --- a/game/player/NamePlate.gd +++ b/game/player/NamePlate.gd @@ -171,5 +171,5 @@ func on_centity_resource_added(resorce) -> void: if health != null: return - health = entity.resource_getc_index(EntityEnums.ENTITY_RESOURCE_INDEX_HEALTH) + health = entity.getc_health() health.connect("changed", self, "c_health_changed") diff --git a/game/scripts/resources/HealthResourceData.gd b/game/scripts/resources/HealthResourceData.gd deleted file mode 100644 index f8434b9d..00000000 --- a/game/scripts/resources/HealthResourceData.gd +++ /dev/null @@ -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 = EntityResourceHealth.new() - mr.data_path = resource_path - - return mr - diff --git a/game/scripts/resources/SpeedResourceData.gd b/game/scripts/resources/SpeedResourceData.gd deleted file mode 100644 index dfc108e8..00000000 --- a/game/scripts/resources/SpeedResourceData.gd +++ /dev/null @@ -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 = EntityResourceSpeed.new() - mr.data_path = resource_path - - return mr - diff --git a/game/ui/unitframes/TargetUnitframe.gd b/game/ui/unitframes/TargetUnitframe.gd index f94a2dea..e81bf078 100644 --- a/game/ui/unitframes/TargetUnitframe.gd +++ b/game/ui/unitframes/TargetUnitframe.gd @@ -50,7 +50,7 @@ func _ready() -> void: func set_player(p_player : Entity) -> void: if not _player == null and is_instance_valid(_player): - _player.resource_getc_index(EntityEnums.ENTITY_RESOURCE_INDEX_HEALTH).disconnect("changed", self, "_on_player_health_changed") + _player.getc_health().disconnect("changed", self, "_on_player_health_changed") _player.disconnect("notification_caura", self, "on_notification_caura") _player.disconnect("diecd", self, "diecd") _player.disconnect("centity_resource_added", self, "centity_resource_added") @@ -84,7 +84,7 @@ 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.resource_getc_index(EntityEnums.ENTITY_RESOURCE_INDEX_HEALTH) + var health = _player.getc_health() _on_player_health_changed(health) health.connect("changed", self, "_on_player_health_changed") diff --git a/game/ui/unitframes/UnitframeBase.gd b/game/ui/unitframes/UnitframeBase.gd index 93594562..8eccae4a 100644 --- a/game/ui/unitframes/UnitframeBase.gd +++ b/game/ui/unitframes/UnitframeBase.gd @@ -51,12 +51,11 @@ func _ready() -> void: func set_player(p_player: Entity) -> void: if not _player == null: - _player.resource_getc_index(EntityEnums.ENTITY_RESOURCE_INDEX_HEALTH).disconnect("changed", self, "_on_player_health_changed") + _player.getc_health().disconnect("changed", self, "_on_player_health_changed") _player.disconnect("cname_changed", self, "cname_changed") _player.disconnect("con_level_up", self, "clevel_changed") _player.disconnect("con_level_changed", self, "clevel_changed") _player.disconnect("notification_cxp_gained", self, "notification_cxp_gained") - _player.disconnect("centity_data_changed", self, "centity_data_changed") _player.disconnect("centity_resource_added", self, "centity_resource_added") if _mana != null: @@ -74,13 +73,12 @@ func set_player(p_player: Entity) -> void: _player.connect("notification_ccharacter_level_up", self, "clevel_changed") _player.connect("con_character_level_changed", self, "clevel_changed") _player.connect("notification_cxp_gained", self, "notification_cxp_gained") - _player.connect("centity_data_changed", self, "centity_data_changed") _player.connect("centity_resource_added", self, "centity_resource_added") for i in range(_player.resource_getc_count()): centity_resource_added(_player.resource_getc_index(i)) - var health = _player.resource_getc_index(EntityEnums.ENTITY_RESOURCE_INDEX_HEALTH) + var health = _player.getc_health() _on_player_health_changed(health) health.connect("changed", self, "_on_player_health_changed") @@ -141,6 +139,3 @@ func clevel_changed(entity: Entity, value : int) -> void: func notification_cxp_gained(entity: Entity, val: int) -> void: _xp_range.value = _player.ccharacter_xp -func centity_data_changed(data: EntityData) -> void: - var health = _player.resource_getc_index(EntityEnums.ENTITY_RESOURCE_INDEX_HEALTH) - _on_player_health_changed(health)