diff --git a/SCsub b/SCsub index bc42811..9ce2061 100644 --- a/SCsub +++ b/SCsub @@ -62,13 +62,13 @@ module_env.add_source_files(env.modules_sources,"entities/stats/level_stat_data. module_env.add_source_files(env.modules_sources,"entities/stats/simple_level_stat_data.cpp") module_env.add_source_files(env.modules_sources,"entities/stats/complex_level_stat_data.cpp") -module_env.add_source_files(env.modules_sources,"spells/spell_projectile.cpp") -module_env.add_source_files(env.modules_sources,"spells/world_spell_effect.cpp") - module_env.add_source_files(env.modules_sources,"data/spell_effect_visual.cpp") module_env.add_source_files(env.modules_sources,"data/spell_effect_visual_simple.cpp") -module_env.add_source_files(env.modules_sources,"data/spell_projectile_data.cpp") -module_env.add_source_files(env.modules_sources,"data/world_effect_data.cpp") + +module_env.add_source_files(env.modules_sources,"world_spells/spell_projectile_data.cpp") +module_env.add_source_files(env.modules_sources,"world_spells/world_effect_data.cpp") +module_env.add_source_files(env.modules_sources,"world_spells/spell_projectile.cpp") +module_env.add_source_files(env.modules_sources,"world_spells/world_spell_effect.cpp") module_env.add_source_files(env.modules_sources,"entities/player_talent.cpp") module_env.add_source_files(env.modules_sources,"inventory/bag.cpp") diff --git a/data/aura.h b/data/aura.h index 51eabdd..41b0e1a 100644 --- a/data/aura.h +++ b/data/aura.h @@ -26,8 +26,8 @@ #include "../utility/category_cooldown.h" #include "spell_effect_visual.h" -#include "spell_projectile_data.h" -#include "world_effect_data.h" +#include "../world_spells/spell_projectile_data.h" +#include "../world_spells/world_effect_data.h" class AuraApplyInfo; class AuraScript; diff --git a/data/spell.h b/data/spell.h index 32bc05b..a04dde9 100644 --- a/data/spell.h +++ b/data/spell.h @@ -16,8 +16,8 @@ #include "../infos/aura_infos.h" #include "spell_effect_visual.h" -#include "spell_projectile_data.h" -#include "world_effect_data.h" +#include "../world_spells/spell_projectile_data.h" +#include "../world_spells/world_effect_data.h" class Entity; class Aura; diff --git a/entities/entity.h b/entities/entity.h index d3509e7..d7e251f 100644 --- a/entities/entity.h +++ b/entities/entity.h @@ -173,12 +173,9 @@ enum PlayerSendFlags { #ifdef ENTITIES_2D class Entity : public KinematicBody2D { GDCLASS(Entity, KinematicBody2D); - #else - class Entity : public KinematicBody { GDCLASS(Entity, KinematicBody); - #endif public: diff --git a/register_types.cpp b/register_types.cpp index f800f55..2d019ef 100644 --- a/register_types.cpp +++ b/register_types.cpp @@ -95,11 +95,11 @@ #include "data/spell_effect_visual.h" #include "data/spell_effect_visual_simple.h" -#include "data/spell_projectile_data.h" -#include "data/world_effect_data.h" -#include "spells/spell_projectile.h" -#include "spells/world_spell_effect.h" +#include "world_spells/spell_projectile_data.h" +#include "world_spells/world_effect_data.h" +#include "world_spells/spell_projectile.h" +#include "world_spells/world_spell_effect.h" #include "entities/ai/entity_ai.h" @@ -224,13 +224,12 @@ void register_entity_spell_system_types() { ClassDB::register_class(); ClassDB::register_class(); ClassDB::register_class(); - ClassDB::register_class(); ClassDB::register_class(); + ClassDB::register_class(); ClassDB::register_class(); - ClassDB::register_class(); ClassDB::register_class(); diff --git a/spells/world_spell_effect.h b/spells/world_spell_effect.h deleted file mode 100644 index 04523a4..0000000 --- a/spells/world_spell_effect.h +++ /dev/null @@ -1,19 +0,0 @@ -#ifndef WORLD_SPELL_EFFECT_H -#define WORLD_SPELL_EFFECT_H - -#include "../entities/entity.h" - -class WorldSpellEffect : public Entity { - GDCLASS(WorldSpellEffect, Entity); - -public: - WorldSpellEffect(); - ~WorldSpellEffect(); - -protected: - static void _bind_methods(); - - //private: -}; - -#endif diff --git a/spells/spell_projectile.cpp b/world_spells/spell_projectile.cpp similarity index 100% rename from spells/spell_projectile.cpp rename to world_spells/spell_projectile.cpp diff --git a/spells/spell_projectile.h b/world_spells/spell_projectile.h similarity index 99% rename from spells/spell_projectile.h rename to world_spells/spell_projectile.h index 566e853..8aba28d 100644 --- a/spells/spell_projectile.h +++ b/world_spells/spell_projectile.h @@ -22,6 +22,7 @@ public: protected: static void _bind_methods(); + //private: }; diff --git a/data/spell_projectile_data.cpp b/world_spells/spell_projectile_data.cpp similarity index 100% rename from data/spell_projectile_data.cpp rename to world_spells/spell_projectile_data.cpp diff --git a/data/spell_projectile_data.h b/world_spells/spell_projectile_data.h similarity index 100% rename from data/spell_projectile_data.h rename to world_spells/spell_projectile_data.h diff --git a/data/world_effect_data.cpp b/world_spells/world_effect_data.cpp similarity index 100% rename from data/world_effect_data.cpp rename to world_spells/world_effect_data.cpp diff --git a/data/world_effect_data.h b/world_spells/world_effect_data.h similarity index 100% rename from data/world_effect_data.h rename to world_spells/world_effect_data.h diff --git a/spells/world_spell_effect.cpp b/world_spells/world_spell_effect.cpp similarity index 100% rename from spells/world_spell_effect.cpp rename to world_spells/world_spell_effect.cpp diff --git a/world_spells/world_spell_effect.h b/world_spells/world_spell_effect.h new file mode 100644 index 0000000..bdb9e51 --- /dev/null +++ b/world_spells/world_spell_effect.h @@ -0,0 +1,30 @@ +#ifndef WORLD_SPELL_EFFECT_H +#define WORLD_SPELL_EFFECT_H + +#ifdef ENTITIES_2D +#include "scene/2d/node_2d.h" +#else +#include "scene/3d/spatial.h" +#endif + +//#include "../entities/entity.h" + +#ifdef ENTITIES_2D +class WorldSpellEffect : public Node2D { + GDCLASS(WorldSpellEffect, Node2D); +#else +class WorldSpellEffect : public Spatial { + GDCLASS(WorldSpellEffect, Spatial); +#endif + +public: + WorldSpellEffect(); + ~WorldSpellEffect(); + +protected: + static void _bind_methods(); + +private: +}; + +#endif