Update ESS. (Removed WorldSpell, because the same thing can be implemented into spells a lot simpler.)

This commit is contained in:
Relintai 2020-04-07 02:13:10 +02:00
parent a1123d69f8
commit 26e20ee516
6 changed files with 13 additions and 97 deletions

2
HEADS
View File

@ -1 +1 @@
{"engine": {"3.2": "da4eb7101d986af0ba6a15efaaed3dee77370d80", "master": "8c73e813134001e575b6f59e3b0100471c007410"}, "world_generator": {"master": "ccd54e340bd28a8bc221bc31f27ad30d5a258aa4"}, "entity_spell_system": {"master": "dc0c6d224b7ee3683267596efedde8184ac335e4"}, "ui_extensions": {"master": "38acc650db260a831dc26ca96fe9d9a087230bdc"}, "voxelman": {"master": "40535bfb59458ab4a263b985131a01e00a55a375"}, "texture_packer": {"master": "b17c174906f84de93d84aa60d010ffe603efaa28"}, "fastnoise": {"master": "ea3b34d972fb5f76474daabd7c1e192419811348"}, "mesh_data_resource": {"master": "4bda19b12be2c2a79a6121de6d22e48f3934e726"}, "procedural_animations": {"master": "45efc21f3e8af941d96b53d54f82572a6644fef7"}, "ess_data": {"master": "3bd637fdd3304b64a18287a49a6b7387acf2f5de"}, "fast_quadratic_mesh_simplifier": {"master": "dc598c59322185032835f964db069964244e58bc"}, "props": {"master": "152be1328bcf7953de5139f44a26bda0b13afef4"}} {"engine": {"3.2": "da4eb7101d986af0ba6a15efaaed3dee77370d80", "master": "8c73e813134001e575b6f59e3b0100471c007410"}, "world_generator": {"master": "ccd54e340bd28a8bc221bc31f27ad30d5a258aa4"}, "entity_spell_system": {"master": "bfd7bdcf42215714e761a3bb102a8e366e30f86c"}, "ui_extensions": {"master": "38acc650db260a831dc26ca96fe9d9a087230bdc"}, "voxelman": {"master": "40535bfb59458ab4a263b985131a01e00a55a375"}, "texture_packer": {"master": "b17c174906f84de93d84aa60d010ffe603efaa28"}, "fastnoise": {"master": "ea3b34d972fb5f76474daabd7c1e192419811348"}, "mesh_data_resource": {"master": "4bda19b12be2c2a79a6121de6d22e48f3934e726"}, "procedural_animations": {"master": "45efc21f3e8af941d96b53d54f82572a6644fef7"}, "ess_data": {"master": "3bd637fdd3304b64a18287a49a6b7387acf2f5de"}, "fast_quadratic_mesh_simplifier": {"master": "dc598c59322185032835f964db069964244e58bc"}, "props": {"master": "152be1328bcf7953de5139f44a26bda0b13afef4"}}

View File

@ -1,6 +0,0 @@
[gd_resource type="WorldSpellData" format=2]
[resource]
resource_name = "Test"
id = 1
text_name = "Test"

View File

@ -67,11 +67,6 @@
"name": "Effect Datas", "name": "Effect Datas",
"type": "SpellEffectVisual" "type": "SpellEffectVisual"
}, },
{
"folder": "res://data/world_spells/",
"name": "World Spells",
"type": "WorldSpellData"
},
{ {
"folder": "res://data/item_templates/", "folder": "res://data/item_templates/",
"header": "Items", "header": "Items",

View File

@ -258,11 +258,6 @@ _global_script_classes=[ {
"class": "TestVoxelMesher", "class": "TestVoxelMesher",
"language": "GDScript", "language": "GDScript",
"path": "res://voxelman/world/TestVoxelMesher.gd" "path": "res://voxelman/world/TestVoxelMesher.gd"
}, {
"base": "WorldSpell",
"class": "WorldSpellGD",
"language": "GDScript",
"path": "res://scripts/projectiles/WorldSpellGD.gd"
} ] } ]
_global_script_class_icons={ _global_script_class_icons={
"AuraGD": "", "AuraGD": "",
@ -314,8 +309,7 @@ _global_script_class_icons={
"SpellGD": "", "SpellGD": "",
"TVVoxelChunk": "", "TVVoxelChunk": "",
"TVVoxelMesher": "", "TVVoxelMesher": "",
"TestVoxelMesher": "", "TestVoxelMesher": ""
"WorldSpellGD": ""
} }
Node="input/actionbar_5_11" Node="input/actionbar_5_11"
@ -369,13 +363,13 @@ data/entity_skills_folder="res://data/entity_skills"
data/entity_datas_folder="res://data/entities" data/entity_datas_folder="res://data/entities"
data/spells_folder="res://data/spells" data/spells_folder="res://data/spells"
data/auras_folder="res://data/auras" data/auras_folder="res://data/auras"
data/world_spell_datas_folder="res://data/world_spells"
data/craft_data_folder="res://data/crafting" data/craft_data_folder="res://data/crafting"
data/item_template_folder="res://data/item_templates" data/item_template_folder="res://data/item_templates"
data/mob_data_folder="res://data/mob_data" data/mob_data_folder="res://data/mob_data"
data/player_character_data_folder="res://data/player_character_data" data/player_character_data_folder="res://data/player_character_data"
data/entity_species_data_folder="res://data/species" data/entity_species_data_folder="res://data/species"
profiles/automatic_save=true profiles/automatic_save=true
data/world_spell_datas_folder="res://data/world_spells"
[importer_defaults] [importer_defaults]

View File

@ -1,67 +0,0 @@
extends WorldSpell
class_name WorldSpellGD
# 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.
var _target : Spatial
var _info : SpellCastInfo
var _speed : float
func _ready() -> void:
if _info == null:
set_process(false)
func launch(info : SpellCastInfo, effect : PackedScene, speed : float) -> void:
if not is_instance_valid(info.target):
return
_info = info
_target = info.target.get_character_skeleton().torso_attach_point
_speed = speed
# translation = info.caster.translation
get_body().translation = info.caster.get_character_skeleton().right_hand_attach_point.global_transform.origin
var eff : Node = effect.instance()
eff.owner = self
add_child(eff)
set_process(true)
func _process(delta : float) -> void:
if not is_instance_valid(_target):
# set_process(false)
queue_free()
return
var l : Vector3 = _target.global_transform.origin - get_body().translation
if l.length() < 1:
_info.spell.son_spell_hit(_info)
queue_free()
return
var dir : Vector3 = l.normalized()
get_body().global_transform.origin += dir * _speed * delta
get_body().global_transform = get_body().transform.looking_at(_target.global_transform.origin, Vector3(0, 1, 0))

View File

@ -87,9 +87,9 @@ func _sstart_casting(info : SpellCastInfo) -> void:
handle_cooldown(info) handle_cooldown(info)
if projectile != null: # if projectile != null:
handle_projectile(info) # handle_projectile(info)
else: # else:
handle_effect(info) handle_effect(info)
handle_gcd(info) handle_gcd(info)
@ -109,10 +109,10 @@ func _sfinish_cast(info : SpellCastInfo) -> void:
if is_instance_valid(info.target): if is_instance_valid(info.target):
info.target.son_cast_finished_target(info) info.target.son_cast_finished_target(info)
#
if projectile != null: # if projectile != null:
handle_projectile(info) # handle_projectile(info)
else: # else:
handle_effect(info) handle_effect(info)
handle_cooldown(info) handle_cooldown(info)