mirror of
https://github.com/Relintai/entity_spell_system.git
synced 2025-02-20 17:14:44 +01:00
Fix compile for 4.0.
This commit is contained in:
parent
9621a6dda5
commit
aa7e605d65
@ -8,7 +8,7 @@ The module supports networking. It is designed to be authoritative, so players s
|
||||
|
||||
It is a c++ engine module, which means you will need to compile it into godot. (See compiling)
|
||||
|
||||
It supports both godot 3.2 and 4.0 (master). Note that since 4.0 is still in very early stages I only
|
||||
It supports both godot 3.2 and 4.0 (master [last tested commit](https://github.com/godotengine/godot/commit/b7e10141197fdd9b0dbc4cfa7890329510d36540)). Note that since 4.0 is still in very early stages I only
|
||||
check whether it works from time to time.
|
||||
|
||||
## Project setup tl;dr
|
||||
|
@ -23,7 +23,13 @@ SOFTWARE.
|
||||
#ifndef CHARACTER_ATLAS_H
|
||||
#define CHARACTER_ATLAS_H
|
||||
|
||||
#include "core/version.h"
|
||||
|
||||
#if VERSION_MAJOR > 3
|
||||
#include "core/io/resource.h"
|
||||
#else
|
||||
#include "core/resource.h"
|
||||
#endif
|
||||
|
||||
class CharacterAtlas : public Resource {
|
||||
GDCLASS(CharacterAtlas, Resource);
|
||||
|
@ -23,7 +23,13 @@ SOFTWARE.
|
||||
#ifndef CHARACTER_ATLAS_ENTRY_H
|
||||
#define CHARACTER_ATLAS_ENTRY_H
|
||||
|
||||
#include "core/version.h"
|
||||
|
||||
#if VERSION_MAJOR > 3
|
||||
#include "core/io/resource.h"
|
||||
#else
|
||||
#include "core/resource.h"
|
||||
#endif
|
||||
|
||||
class CharacterAtlasEntry : public Resource {
|
||||
GDCLASS(CharacterAtlasEntry, Resource);
|
||||
|
@ -23,7 +23,14 @@ SOFTWARE.
|
||||
#ifndef AURA_H
|
||||
#define AURA_H
|
||||
|
||||
#include "core/version.h"
|
||||
|
||||
#if VERSION_MAJOR > 3
|
||||
#include "core/io/resource.h"
|
||||
#else
|
||||
#include "core/resource.h"
|
||||
#endif
|
||||
|
||||
#include "scene/resources/curve.h"
|
||||
#include "scene/resources/texture.h"
|
||||
|
||||
|
@ -23,7 +23,13 @@ SOFTWARE.
|
||||
#ifndef AURA_GROUP_H
|
||||
#define AURA_GROUP_H
|
||||
|
||||
#include "core/version.h"
|
||||
|
||||
#if VERSION_MAJOR > 3
|
||||
#include "core/io/resource.h"
|
||||
#else
|
||||
#include "core/resource.h"
|
||||
#endif
|
||||
|
||||
class AuraGroup : public Resource {
|
||||
GDCLASS(AuraGroup, Resource);
|
||||
|
@ -23,9 +23,17 @@ SOFTWARE.
|
||||
#ifndef CRAFT_RECIPE_H
|
||||
#define CRAFT_RECIPE_H
|
||||
|
||||
#include "core/version.h"
|
||||
|
||||
#if VERSION_MAJOR > 3
|
||||
#include "core/io/resource.h"
|
||||
#include "core/templates/vector.h"
|
||||
#include "core/string/ustring.h"
|
||||
#else
|
||||
#include "core/resource.h"
|
||||
#include "core/ustring.h"
|
||||
#include "core/vector.h"
|
||||
#include "core/ustring.h"
|
||||
#endif
|
||||
|
||||
#include "item_template.h"
|
||||
|
||||
|
@ -23,7 +23,14 @@ SOFTWARE.
|
||||
#ifndef CRAFT_RECIPE_HELPER_H
|
||||
#define CRAFT_RECIPE_HELPER_H
|
||||
|
||||
#include "core/version.h"
|
||||
|
||||
#if VERSION_MAJOR > 3
|
||||
#include "core/io/resource.h"
|
||||
#else
|
||||
#include "core/resource.h"
|
||||
#endif
|
||||
|
||||
#include "item_template.h"
|
||||
|
||||
class CraftRecipeHelper : public Resource {
|
||||
|
@ -23,7 +23,13 @@ SOFTWARE.
|
||||
#ifndef EQUIPMENT_DATA_H
|
||||
#define EQUIPMENT_DATA_H
|
||||
|
||||
#include "core/version.h"
|
||||
|
||||
#if VERSION_MAJOR > 3
|
||||
#include "core/io/resource.h"
|
||||
#else
|
||||
#include "core/resource.h"
|
||||
#endif
|
||||
|
||||
class ItemInstance;
|
||||
class ItemTemplate;
|
||||
|
@ -27,6 +27,8 @@ SOFTWARE.
|
||||
#include "../../database/ess_resource_db.h"
|
||||
#include "../../singletons/ess.h"
|
||||
|
||||
#include "core/version.h"
|
||||
|
||||
Ref<ItemTemplate> ItemInstance::get_item_template() {
|
||||
return _item_template;
|
||||
}
|
||||
@ -179,7 +181,6 @@ Dictionary ItemInstance::_to_dict() {
|
||||
Array mods;
|
||||
|
||||
for (int i = 0; i < _modifiers.size(); ++i) {
|
||||
|
||||
Dictionary mdict;
|
||||
|
||||
mdict["stat_id"] = _modifiers[i].stat_id;
|
||||
@ -196,7 +197,11 @@ Dictionary ItemInstance::_to_dict() {
|
||||
return dict;
|
||||
}
|
||||
void ItemInstance::_from_dict(const Dictionary &dict) {
|
||||
#if VERSION_MAJOR > 3
|
||||
ERR_FAIL_COND(dict.is_empty());
|
||||
#else
|
||||
ERR_FAIL_COND(dict.empty());
|
||||
#endif
|
||||
|
||||
_item_template_path = dict.get("item_path", 0);
|
||||
|
||||
|
@ -23,8 +23,15 @@ SOFTWARE.
|
||||
#ifndef ITEM_INSTANCE_H
|
||||
#define ITEM_INSTANCE_H
|
||||
|
||||
#include "core/version.h"
|
||||
|
||||
#if VERSION_MAJOR > 3
|
||||
#include "core/io/resource.h"
|
||||
#include "core/templates/vector.h"
|
||||
#else
|
||||
#include "core/resource.h"
|
||||
#include "core/vector.h"
|
||||
#endif
|
||||
|
||||
#include "../../item_enums.h"
|
||||
|
||||
|
@ -23,8 +23,16 @@ SOFTWARE.
|
||||
#ifndef ITEM_TEMPLATE_H
|
||||
#define ITEM_TEMPLATE_H
|
||||
|
||||
#include "core/version.h"
|
||||
|
||||
#if VERSION_MAJOR > 3
|
||||
#include "core/io/resource.h"
|
||||
#include "core/templates/vector.h"
|
||||
#else
|
||||
#include "core/resource.h"
|
||||
#include "core/vector.h"
|
||||
#endif
|
||||
|
||||
#include "scene/resources/texture.h"
|
||||
|
||||
#include "../../item_enums.h"
|
||||
|
@ -23,7 +23,13 @@ SOFTWARE.
|
||||
#ifndef MODEL_VISUAL_H
|
||||
#define MODEL_VISUAL_H
|
||||
|
||||
#include "core/version.h"
|
||||
|
||||
#if VERSION_MAJOR > 3
|
||||
#include "core/io/resource.h"
|
||||
#else
|
||||
#include "core/resource.h"
|
||||
#endif
|
||||
|
||||
#include "../../item_enums.h"
|
||||
#include "model_visual_entry.h"
|
||||
|
@ -23,9 +23,18 @@ SOFTWARE.
|
||||
#ifndef MODEL_VISUAL_ENTRY_H
|
||||
#define MODEL_VISUAL_ENTRY_H
|
||||
|
||||
#include "core/color.h"
|
||||
#include "core/version.h"
|
||||
|
||||
#if VERSION_MAJOR > 3
|
||||
#include "core/io/resource.h"
|
||||
#include "core/string/ustring.h"
|
||||
#include "core/math/color.h"
|
||||
#else
|
||||
#include "core/resource.h"
|
||||
#include "core/ustring.h"
|
||||
#include "core/color.h"
|
||||
#endif
|
||||
|
||||
#include "scene/resources/texture.h"
|
||||
|
||||
#include "../../entity_enums.h"
|
||||
|
@ -23,9 +23,15 @@ SOFTWARE.
|
||||
#ifndef LOOT_DATA_BASE_H
|
||||
#define LOOT_DATA_BASE_H
|
||||
|
||||
#include "core/array.h"
|
||||
#include "core/version.h"
|
||||
|
||||
#if VERSION_MAJOR > 3
|
||||
#include "core/templates/vector.h"
|
||||
#include "core/variant/array.h"
|
||||
#else
|
||||
#include "core/vector.h"
|
||||
#include "core/array.h"
|
||||
#endif
|
||||
|
||||
#include "../items/item_template.h"
|
||||
|
||||
|
@ -23,9 +23,17 @@ SOFTWARE.
|
||||
#ifndef ENTITY_SPECIES_DATA_H
|
||||
#define ENTITY_SPECIES_DATA_H
|
||||
|
||||
#include "core/version.h"
|
||||
|
||||
#if VERSION_MAJOR > 3
|
||||
#include "core/io/resource.h"
|
||||
#include "core/templates/vector.h"
|
||||
#include "core/string/ustring.h"
|
||||
#else
|
||||
#include "core/resource.h"
|
||||
#include "core/ustring.h"
|
||||
#include "core/vector.h"
|
||||
#include "core/ustring.h"
|
||||
#endif
|
||||
|
||||
#include "../../entity_enums.h"
|
||||
|
||||
|
@ -22,6 +22,8 @@ SOFTWARE.
|
||||
|
||||
#include "species_instance.h"
|
||||
|
||||
#include "core/version.h"
|
||||
|
||||
#include "../../database/ess_resource_db.h"
|
||||
#include "../../singletons/ess.h"
|
||||
|
||||
@ -113,7 +115,11 @@ Dictionary SpeciesInstance::_to_dict() {
|
||||
return dict;
|
||||
}
|
||||
void SpeciesInstance::_from_dict(const Dictionary &dict) {
|
||||
#if VERSION_MAJOR > 3
|
||||
ERR_FAIL_COND(dict.is_empty());
|
||||
#else
|
||||
ERR_FAIL_COND(dict.empty());
|
||||
#endif
|
||||
|
||||
_id = dict.get("id", 0);
|
||||
set_species_path(dict.get("species_path", ""));
|
||||
|
@ -23,7 +23,13 @@ SOFTWARE.
|
||||
#ifndef SPECIES_INSTANCE_H
|
||||
#define SPECIES_INSTANCE_H
|
||||
|
||||
#include "core/version.h"
|
||||
|
||||
#if VERSION_MAJOR > 3
|
||||
#include "core/io/resource.h"
|
||||
#else
|
||||
#include "core/resource.h"
|
||||
#endif
|
||||
|
||||
#include "../items/model_visual_entry.h"
|
||||
|
||||
|
@ -26,7 +26,13 @@ SOFTWARE.
|
||||
|
||||
#include "../../defines.h"
|
||||
#include "../../singletons/ess.h"
|
||||
|
||||
#if VERSION_MAJOR > 3
|
||||
#include "core/string/ustring.h"
|
||||
#else
|
||||
#include "core/ustring.h"
|
||||
#endif
|
||||
|
||||
|
||||
int SpeciesModelData::get_id() {
|
||||
return _id;
|
||||
|
@ -23,11 +23,20 @@ SOFTWARE.
|
||||
#ifndef SPECIES_MODEL_DATA_H
|
||||
#define SPECIES_MODEL_DATA_H
|
||||
|
||||
#include "core/resource.h"
|
||||
#include "core/version.h"
|
||||
|
||||
#include "core/color.h"
|
||||
#include "core/ustring.h"
|
||||
#if VERSION_MAJOR > 3
|
||||
#include "core/io/resource.h"
|
||||
#include "core/templates/vector.h"
|
||||
#include "core/string/ustring.h"
|
||||
#include "core/math/color.h"
|
||||
#else
|
||||
#include "core/resource.h"
|
||||
#include "core/vector.h"
|
||||
#include "core/ustring.h"
|
||||
#include "core/color.h"
|
||||
#endif
|
||||
|
||||
#include "scene/resources/packed_scene.h"
|
||||
|
||||
#include "../items/model_visual_entry.h"
|
||||
|
@ -23,16 +23,20 @@ SOFTWARE.
|
||||
#ifndef SPELL_H
|
||||
#define SPELL_H
|
||||
|
||||
#include "core/version.h"
|
||||
|
||||
#if VERSION_MAJOR > 3
|
||||
#include "core/io/resource.h"
|
||||
#else
|
||||
#include "core/resource.h"
|
||||
#endif
|
||||
|
||||
#include "scene/resources/texture.h"
|
||||
|
||||
#include "../../entity_enums.h"
|
||||
#include "../../spell_enums.h"
|
||||
|
||||
#include "../../infos/spell_cast_info.h"
|
||||
|
||||
#include "../../entities/entity.h"
|
||||
|
||||
#include "../../infos/aura_infos.h"
|
||||
|
||||
#include "spell_effect_visual.h"
|
||||
|
@ -23,7 +23,13 @@ SOFTWARE.
|
||||
#ifndef SPELL_COOLDOWN_MANIPULATION_DATA_H
|
||||
#define SPELL_COOLDOWN_MANIPULATION_DATA_H
|
||||
|
||||
#include "core/reference.h"
|
||||
#include "core/version.h"
|
||||
|
||||
#if VERSION_MAJOR > 3
|
||||
#include "core/io/resource.h"
|
||||
#else
|
||||
#include "core/resource.h"
|
||||
#endif
|
||||
|
||||
class SpellCooldownManipulationData : public Reference {
|
||||
GDCLASS(SpellCooldownManipulationData, Reference);
|
||||
|
@ -23,7 +23,13 @@ SOFTWARE.
|
||||
#ifndef SPELL_EFFECT_VISUAL_H
|
||||
#define SPELL_EFFECT_VISUAL_H
|
||||
|
||||
#include "core/version.h"
|
||||
|
||||
#if VERSION_MAJOR > 3
|
||||
#include "core/io/resource.h"
|
||||
#else
|
||||
#include "core/resource.h"
|
||||
#endif
|
||||
|
||||
class SpellEffectVisual : public Resource {
|
||||
GDCLASS(SpellEffectVisual, Resource);
|
||||
|
@ -23,19 +23,26 @@ SOFTWARE.
|
||||
#ifndef ESS_RESOURCE_DB_H
|
||||
#define ESS_RESOURCE_DB_H
|
||||
|
||||
#include "core/version.h"
|
||||
|
||||
#if VERSION_MAJOR > 3
|
||||
#include "core/io/resource.h"
|
||||
#include "core/templates/vector.h"
|
||||
#include "core/templates/hash_map.h"
|
||||
#include "core/string/ustring.h"
|
||||
#include "core/core_bind.h"
|
||||
#include "core/variant/variant.h"
|
||||
#else
|
||||
#include "core/resource.h"
|
||||
|
||||
#include "core/variant.h"
|
||||
#include "core/vector.h"
|
||||
|
||||
#include "core/hash_map.h"
|
||||
#include "core/ustring.h"
|
||||
|
||||
#include "core/bind/core_bind.h"
|
||||
#include "core/variant.h"
|
||||
#endif
|
||||
|
||||
#include "../item_enums.h"
|
||||
|
||||
#include "core/hash_map.h"
|
||||
|
||||
class Aura;
|
||||
class Spell;
|
||||
class EntityData;
|
||||
|
@ -23,19 +23,29 @@ SOFTWARE.
|
||||
#ifndef ESS_RESOURCE_DB_FOLDERS_H
|
||||
#define ESS_RESOURCE_DB_FOLDERS_H
|
||||
|
||||
#include "ess_resource_db_map.h"
|
||||
|
||||
#include "core/array.h"
|
||||
#include "core/engine.h"
|
||||
#include "core/hash_map.h"
|
||||
#include "core/version.h"
|
||||
|
||||
#if VERSION_MAJOR > 3
|
||||
#include "core/variant/variant.h"
|
||||
#include "core/templates/vector.h"
|
||||
#include "core/templates/hash_map.h"
|
||||
#include "core/string/ustring.h"
|
||||
#include "core/config/engine.h"
|
||||
#include "core/variant/array.h"
|
||||
#include "core/core_bind.h"
|
||||
#else
|
||||
#include "core/variant.h"
|
||||
#include "core/vector.h"
|
||||
|
||||
#include "core/hash_map.h"
|
||||
#include "core/ustring.h"
|
||||
#include "scene/main/node.h"
|
||||
|
||||
#include "core/engine.h"
|
||||
#include "core/array.h"
|
||||
#include "core/bind/core_bind.h"
|
||||
#endif
|
||||
|
||||
#include "ess_resource_db_map.h"
|
||||
|
||||
#include "scene/main/node.h"
|
||||
|
||||
#include "../item_enums.h"
|
||||
|
||||
|
@ -25,17 +25,27 @@ SOFTWARE.
|
||||
|
||||
#include "ess_resource_db.h"
|
||||
|
||||
#include "core/array.h"
|
||||
#include "core/engine.h"
|
||||
#include "core/hash_map.h"
|
||||
#include "core/version.h"
|
||||
|
||||
#if VERSION_MAJOR > 3
|
||||
#include "core/variant/variant.h"
|
||||
#include "core/templates/vector.h"
|
||||
#include "core/templates/hash_map.h"
|
||||
#include "core/string/ustring.h"
|
||||
#include "core/config/engine.h"
|
||||
#include "core/variant/array.h"
|
||||
#include "core/core_bind.h"
|
||||
#else
|
||||
#include "core/variant.h"
|
||||
#include "core/vector.h"
|
||||
|
||||
#include "core/hash_map.h"
|
||||
#include "core/ustring.h"
|
||||
#include "scene/main/node.h"
|
||||
|
||||
#include "core/engine.h"
|
||||
#include "core/array.h"
|
||||
#include "core/bind/core_bind.h"
|
||||
#endif
|
||||
|
||||
#include "scene/main/node.h"
|
||||
|
||||
#include "../item_enums.h"
|
||||
|
||||
|
@ -23,9 +23,15 @@ SOFTWARE.
|
||||
#ifndef ESS_RESOURCE_DB_STATIC_H
|
||||
#define ESS_RESOURCE_DB_STATIC_H
|
||||
|
||||
#include "ess_resource_db.h"
|
||||
#include "core/version.h"
|
||||
|
||||
#if VERSION_MAJOR > 3
|
||||
#include "core/templates/hash_map.h"
|
||||
#else
|
||||
#include "core/hash_map.h"
|
||||
#endif
|
||||
|
||||
#include "ess_resource_db.h"
|
||||
|
||||
#include "../item_enums.h"
|
||||
|
||||
|
@ -23,8 +23,16 @@ SOFTWARE.
|
||||
#ifndef ES_DRAG_AND_DROP_H
|
||||
#define ES_DRAG_AND_DROP_H
|
||||
|
||||
#include "core/version.h"
|
||||
|
||||
#if VERSION_MAJOR > 3
|
||||
#include "core/object/reference.h"
|
||||
#include "core/string/ustring.h"
|
||||
#else
|
||||
#include "core/reference.h"
|
||||
#include "core/ustring.h"
|
||||
#endif
|
||||
|
||||
#include "scene/main/node.h"
|
||||
|
||||
class ESDragAndDrop : public Reference {
|
||||
|
@ -22,14 +22,19 @@ SOFTWARE.
|
||||
|
||||
#include "ess_editor_plugin.h"
|
||||
|
||||
#include "core/version.h"
|
||||
|
||||
void ESSEditorPlugin::fix_ids(Variant param) {
|
||||
}
|
||||
|
||||
ESSEditorPlugin::ESSEditorPlugin(EditorNode *p_node) {
|
||||
|
||||
editor = p_node;
|
||||
|
||||
#if VERSION_MAJOR > 3
|
||||
//editor->add_tool_menu_item("ESS: make ids unique", this, "fix_ids");
|
||||
#else
|
||||
editor->add_tool_menu_item("ESS: make ids unique", this, "fix_ids");
|
||||
#endif
|
||||
}
|
||||
|
||||
ESSEditorPlugin::~ESSEditorPlugin() {
|
||||
|
@ -23,7 +23,14 @@ SOFTWARE.
|
||||
#ifndef ENTITY_AI_H
|
||||
#define ENTITY_AI_H
|
||||
|
||||
#include "core/version.h"
|
||||
|
||||
#if VERSION_MAJOR > 3
|
||||
#include "core/io/resource.h"
|
||||
#else
|
||||
#include "core/resource.h"
|
||||
#endif
|
||||
|
||||
#include "scene/main/node.h"
|
||||
|
||||
#include "../../entity_enums.h"
|
||||
|
@ -22,6 +22,8 @@ SOFTWARE.
|
||||
|
||||
#include "aura_data.h"
|
||||
|
||||
#include "core/version.h"
|
||||
|
||||
#include "../../data/auras/aura.h"
|
||||
#include "../../database/ess_resource_db.h"
|
||||
#include "../../singletons/ess.h"
|
||||
@ -306,7 +308,11 @@ Dictionary AuraData::_to_dict() {
|
||||
return dict;
|
||||
}
|
||||
void AuraData::_from_dict(const Dictionary &dict) {
|
||||
#if VERSION_MAJOR > 3
|
||||
ERR_FAIL_COND(dict.is_empty());
|
||||
#else
|
||||
ERR_FAIL_COND(dict.empty());
|
||||
#endif
|
||||
ERR_FAIL_COND(!ESS::get_singleton()->get_resource_db().is_valid());
|
||||
|
||||
_aura_id = dict.get("aura_id", 0);
|
||||
|
@ -23,9 +23,17 @@ SOFTWARE.
|
||||
#ifndef AURA_DATA_H
|
||||
#define AURA_DATA_H
|
||||
|
||||
#include "core/version.h"
|
||||
|
||||
#if VERSION_MAJOR > 3
|
||||
#include "core/io/resource.h"
|
||||
#include "core/variant/array.h"
|
||||
#include "core/variant/dictionary.h"
|
||||
#else
|
||||
#include "core/resource.h"
|
||||
#include "core/array.h"
|
||||
#include "core/dictionary.h"
|
||||
#include "core/resource.h"
|
||||
#endif
|
||||
|
||||
#include "../../spell_enums.h"
|
||||
|
||||
|
@ -23,9 +23,17 @@ SOFTWARE.
|
||||
#ifndef CHARACTER_SPEC_H
|
||||
#define CHARACTER_SPEC_H
|
||||
|
||||
#include "core/version.h"
|
||||
|
||||
#if VERSION_MAJOR > 3
|
||||
#include "core/io/resource.h"
|
||||
#include "core/templates/vector.h"
|
||||
#include "core/string/ustring.h"
|
||||
#else
|
||||
#include "core/resource.h"
|
||||
#include "core/ustring.h"
|
||||
#include "core/vector.h"
|
||||
#include "core/ustring.h"
|
||||
#endif
|
||||
|
||||
class Aura;
|
||||
|
||||
|
@ -23,10 +23,19 @@ SOFTWARE.
|
||||
#ifndef ENTITY_CLASS_DATA_H
|
||||
#define ENTITY_CLASS_DATA_H
|
||||
|
||||
#include "core/math/math_funcs.h"
|
||||
#include "core/version.h"
|
||||
|
||||
#if VERSION_MAJOR > 3
|
||||
#include "core/io/resource.h"
|
||||
#include "core/templates/vector.h"
|
||||
#include "core/string/ustring.h"
|
||||
#else
|
||||
#include "core/resource.h"
|
||||
#include "core/ustring.h"
|
||||
#include "core/vector.h"
|
||||
#include "core/ustring.h"
|
||||
#endif
|
||||
|
||||
#include "core/math/math_funcs.h"
|
||||
#include "scene/resources/texture.h"
|
||||
|
||||
#include "../../entities/stats/stat_data.h"
|
||||
|
@ -23,9 +23,18 @@ SOFTWARE.
|
||||
#ifndef ENTITY_DATA_H
|
||||
#define ENTITY_DATA_H
|
||||
|
||||
#include "core/version.h"
|
||||
|
||||
#if VERSION_MAJOR > 3
|
||||
#include "core/io/resource.h"
|
||||
#include "core/templates/vector.h"
|
||||
#include "core/string/ustring.h"
|
||||
#else
|
||||
#include "core/resource.h"
|
||||
#include "core/ustring.h"
|
||||
#include "core/vector.h"
|
||||
#include "core/ustring.h"
|
||||
#endif
|
||||
|
||||
#include "scene/resources/texture.h"
|
||||
|
||||
#include "../../entity_enums.h"
|
||||
|
@ -22,6 +22,8 @@ SOFTWARE.
|
||||
|
||||
#include "entity_data_container.h"
|
||||
|
||||
#include "core/version.h"
|
||||
|
||||
Dictionary EntityDataContainer::to_dict() {
|
||||
return call("_to_dict");
|
||||
}
|
||||
@ -37,7 +39,11 @@ Dictionary EntityDataContainer::_to_dict() {
|
||||
return dict;
|
||||
}
|
||||
void EntityDataContainer::_from_dict(const Dictionary &dict) {
|
||||
#if VERSION_MAJOR > 3
|
||||
ERR_FAIL_COND(dict.is_empty());
|
||||
#else
|
||||
ERR_FAIL_COND(dict.empty());
|
||||
#endif
|
||||
}
|
||||
|
||||
EntityDataContainer::EntityDataContainer() {
|
||||
|
@ -23,8 +23,15 @@ SOFTWARE.
|
||||
#ifndef ENTITY_DATA_CONTAINER_H
|
||||
#define ENTITY_DATA_CONTAINER_H
|
||||
|
||||
#include "core/dictionary.h"
|
||||
#include "core/version.h"
|
||||
|
||||
#if VERSION_MAJOR > 3
|
||||
#include "core/io/resource.h"
|
||||
#include "core/variant/dictionary.h"
|
||||
#else
|
||||
#include "core/resource.h"
|
||||
#include "core/dictionary.h"
|
||||
#endif
|
||||
|
||||
class EntityDataContainer : public Resource {
|
||||
GDCLASS(EntityDataContainer, Resource);
|
||||
|
@ -23,7 +23,13 @@ SOFTWARE.
|
||||
#ifndef ITEM_CONTAINER_DATA_H
|
||||
#define ITEM_CONTAINER_DATA_H
|
||||
|
||||
#include "core/version.h"
|
||||
|
||||
#if VERSION_MAJOR > 3
|
||||
#include "core/io/resource.h"
|
||||
#else
|
||||
#include "core/resource.h"
|
||||
#endif
|
||||
|
||||
#include "item_container_data_entry.h"
|
||||
|
||||
|
@ -23,7 +23,13 @@ SOFTWARE.
|
||||
#ifndef CONTAINER_ITEM_DATA_H
|
||||
#define CONTAINER_ITEM_DATA_H
|
||||
|
||||
#include "core/version.h"
|
||||
|
||||
#if VERSION_MAJOR > 3
|
||||
#include "core/io/resource.h"
|
||||
#else
|
||||
#include "core/resource.h"
|
||||
#endif
|
||||
|
||||
class ItemTemplate;
|
||||
|
||||
|
@ -23,7 +23,13 @@ SOFTWARE.
|
||||
#ifndef VENDOR_ITEM_DATA_H
|
||||
#define VENDOR_ITEM_DATA_H
|
||||
|
||||
#include "core/version.h"
|
||||
|
||||
#if VERSION_MAJOR > 3
|
||||
#include "core/io/resource.h"
|
||||
#else
|
||||
#include "core/resource.h"
|
||||
#endif
|
||||
|
||||
#include "vendor_item_data_entry.h"
|
||||
|
||||
|
@ -23,7 +23,13 @@ SOFTWARE.
|
||||
#ifndef VENDOR_ITEM_DATA_ENTRY_H
|
||||
#define VENDOR_ITEM_DATA_ENTRY_H
|
||||
|
||||
#include "core/version.h"
|
||||
|
||||
#if VERSION_MAJOR > 3
|
||||
#include "core/io/resource.h"
|
||||
#else
|
||||
#include "core/resource.h"
|
||||
#endif
|
||||
|
||||
class ItemTemplate;
|
||||
class Spell;
|
||||
|
@ -44,7 +44,11 @@ SOFTWARE.
|
||||
#include "./skills/entity_skill.h"
|
||||
#include "scene/2d/node_2d.h"
|
||||
|
||||
#if VERSION_MAJOR > 3
|
||||
#include "core/object/script_language.h"
|
||||
#else
|
||||
#include "core/script_language.h"
|
||||
#endif
|
||||
|
||||
#include "core/version.h"
|
||||
|
||||
@ -631,7 +635,11 @@ void Entity::setup(Ref<EntityCreateInfo> info) {
|
||||
|
||||
sets_entity_name(info->get_entity_name());
|
||||
|
||||
#if VERSION_MAJOR > 3
|
||||
if (!info->get_serialized_data().is_empty()) {
|
||||
#else
|
||||
if (!info->get_serialized_data().empty()) {
|
||||
#endif
|
||||
from_dict(info->get_serialized_data());
|
||||
} else {
|
||||
sets_entity_data(info->get_entity_data());
|
||||
@ -1319,7 +1327,11 @@ Dictionary Entity::_to_dict() {
|
||||
return dict;
|
||||
}
|
||||
void Entity::_from_dict(const Dictionary &dict) {
|
||||
#if VERSION_MAJOR > 3
|
||||
ERR_FAIL_COND(dict.is_empty());
|
||||
#else
|
||||
ERR_FAIL_COND(dict.empty());
|
||||
#endif
|
||||
|
||||
//// Transforms ////
|
||||
|
||||
@ -1613,7 +1625,11 @@ void Entity::_from_dict(const Dictionary &dict) {
|
||||
|
||||
Dictionary bagd = dict.get("bag", Dictionary());
|
||||
|
||||
#if VERSION_MAJOR > 3
|
||||
if (!bagd.is_empty()) {
|
||||
#else
|
||||
if (!bagd.empty()) {
|
||||
#endif
|
||||
if (!_s_bag.is_valid()) {
|
||||
Ref<Bag> bag;
|
||||
bag.instance();
|
||||
@ -1631,7 +1647,6 @@ void Entity::_from_dict(const Dictionary &dict) {
|
||||
_actionbar_locked = dict.get("actionbar_locked", false);
|
||||
|
||||
if (dict.has("actionbar_profile")) {
|
||||
|
||||
if (!_action_bar_profile.is_valid())
|
||||
_action_bar_profile.instance();
|
||||
|
||||
|
@ -23,6 +23,19 @@ SOFTWARE.
|
||||
#ifndef ENTITY_H
|
||||
#define ENTITY_H
|
||||
|
||||
#include "core/version.h"
|
||||
|
||||
#if VERSION_MAJOR > 3
|
||||
#include "core/object/object.h"
|
||||
#include "core/templates/vector.h"
|
||||
#include "core/string/ustring.h"
|
||||
#else
|
||||
#include "core/object.h"
|
||||
#include "core/vector.h"
|
||||
#include "core/ustring.h"
|
||||
#endif
|
||||
|
||||
|
||||
#include "core/io/networked_multiplayer_peer.h"
|
||||
|
||||
#include "scene/main/node.h"
|
||||
@ -30,13 +43,10 @@ SOFTWARE.
|
||||
#include "../data/items/craft_recipe.h"
|
||||
#include "../data/items/item_instance.h"
|
||||
#include "../data/spells/spell.h"
|
||||
#include "core/hash_map.h"
|
||||
|
||||
#include "core/io/json.h"
|
||||
#include "core/math/transform.h"
|
||||
#include "core/math/transform_2d.h"
|
||||
#include "core/object.h"
|
||||
#include "core/ustring.h"
|
||||
#include "core/vector.h"
|
||||
|
||||
#include "../data/spells/spell.h"
|
||||
#include "./resources/entity_resource.h"
|
||||
|
@ -22,6 +22,8 @@ SOFTWARE.
|
||||
|
||||
#include "entity_resource.h"
|
||||
|
||||
#include "core/version.h"
|
||||
|
||||
#include "../../database/ess_resource_db.h"
|
||||
#include "../../singletons/ess.h"
|
||||
#include "../entity.h"
|
||||
@ -284,7 +286,11 @@ Dictionary EntityResource::_to_dict() {
|
||||
return dict;
|
||||
}
|
||||
void EntityResource::_from_dict(const Dictionary &dict) {
|
||||
#if VERSION_MAJOR > 3
|
||||
ERR_FAIL_COND(dict.is_empty());
|
||||
#else
|
||||
ERR_FAIL_COND(dict.empty());
|
||||
#endif
|
||||
|
||||
_dirty = dict.get("dirty", false);
|
||||
_should_process = dict.get("should_process", false);
|
||||
|
@ -23,7 +23,13 @@ SOFTWARE.
|
||||
#ifndef ENTITY_RESOURCE_H
|
||||
#define ENTITY_RESOURCE_H
|
||||
|
||||
#include "core/version.h"
|
||||
|
||||
#if VERSION_MAJOR > 3
|
||||
#include "core/io/resource.h"
|
||||
#else
|
||||
#include "core/resource.h"
|
||||
#endif
|
||||
|
||||
#include "../../defines.h"
|
||||
|
||||
|
@ -23,7 +23,13 @@ SOFTWARE.
|
||||
#ifndef ENTITY_RESOURCE_COST_DATA_H
|
||||
#define ENTITY_RESOURCE_COST_DATA_H
|
||||
|
||||
#include "core/version.h"
|
||||
|
||||
#if VERSION_MAJOR > 3
|
||||
#include "core/io/resource.h"
|
||||
#else
|
||||
#include "core/resource.h"
|
||||
#endif
|
||||
|
||||
#include "entity_resource.h"
|
||||
#include "entity_resource_cost_data.h"
|
||||
|
@ -23,7 +23,13 @@ SOFTWARE.
|
||||
#ifndef ENTITY_RESOURCE_COST_DATA_HEALTH_H
|
||||
#define ENTITY_RESOURCE_COST_DATA_HEALTH_H
|
||||
|
||||
#include "core/version.h"
|
||||
|
||||
#if VERSION_MAJOR > 3
|
||||
#include "core/io/resource.h"
|
||||
#else
|
||||
#include "core/resource.h"
|
||||
#endif
|
||||
|
||||
#include "entity_resource.h"
|
||||
#include "entity_resource_cost_data.h"
|
||||
|
@ -23,7 +23,13 @@ SOFTWARE.
|
||||
#ifndef ENTITY_RESOURCE_COST_DATA_RESOURCE_H
|
||||
#define ENTITY_RESOURCE_COST_DATA_RESOURCE_H
|
||||
|
||||
#include "core/version.h"
|
||||
|
||||
#if VERSION_MAJOR > 3
|
||||
#include "core/io/resource.h"
|
||||
#else
|
||||
#include "core/resource.h"
|
||||
#endif
|
||||
|
||||
#include "entity_resource.h"
|
||||
#include "entity_resource_cost_data.h"
|
||||
|
@ -22,6 +22,8 @@ SOFTWARE.
|
||||
|
||||
#include "entity_skill.h"
|
||||
|
||||
#include "core/version.h"
|
||||
|
||||
#include "../../database/ess_resource_db.h"
|
||||
#include "../../singletons/ess.h"
|
||||
|
||||
@ -101,7 +103,11 @@ Dictionary EntitySkill::_to_dict() {
|
||||
return dict;
|
||||
}
|
||||
void EntitySkill::_from_dict(const Dictionary &dict) {
|
||||
#if VERSION_MAJOR > 3
|
||||
ERR_FAIL_COND(dict.is_empty());
|
||||
#else
|
||||
ERR_FAIL_COND(dict.empty());
|
||||
#endif
|
||||
|
||||
_skill_id = dict.get("skill_id", 0);
|
||||
_skill_path = dict.get("skill_path", "");
|
||||
|
@ -23,7 +23,14 @@ SOFTWARE.
|
||||
#ifndef ENTITY_SKILL_H
|
||||
#define ENTITY_SKILL_H
|
||||
|
||||
#include "core/version.h"
|
||||
|
||||
#if VERSION_MAJOR > 3
|
||||
#include "core/io/resource.h"
|
||||
#else
|
||||
#include "core/resource.h"
|
||||
#endif
|
||||
|
||||
#include "entity_skill_data.h"
|
||||
|
||||
class EntitySkill : public Resource {
|
||||
|
@ -23,8 +23,15 @@ SOFTWARE.
|
||||
#ifndef ENTITY_SKILL_DATA_H
|
||||
#define ENTITY_SKILL_DATA_H
|
||||
|
||||
#include "core/version.h"
|
||||
|
||||
#if VERSION_MAJOR > 3
|
||||
#include "core/io/resource.h"
|
||||
#include "core/string/ustring.h"
|
||||
#else
|
||||
#include "core/resource.h"
|
||||
#include "core/ustring.h"
|
||||
#endif
|
||||
|
||||
class EntitySkillData : public Resource {
|
||||
GDCLASS(EntitySkillData, Resource);
|
||||
|
@ -23,7 +23,13 @@ SOFTWARE.
|
||||
#ifndef COMPLEX_LEVEL_STAT_DATA_H
|
||||
#define COMPLEX_LEVEL_STAT_DATA_H
|
||||
|
||||
#include "core/version.h"
|
||||
|
||||
#if VERSION_MAJOR > 3
|
||||
#include "core/io/resource.h"
|
||||
#else
|
||||
#include "core/resource.h"
|
||||
#endif
|
||||
|
||||
#include "../../entity_enums.h"
|
||||
#include "level_stat_data.h"
|
||||
|
@ -23,7 +23,13 @@ SOFTWARE.
|
||||
#ifndef LEVEL_STAT_DATA_H
|
||||
#define LEVEL_STAT_DATA_H
|
||||
|
||||
#include "core/version.h"
|
||||
|
||||
#if VERSION_MAJOR > 3
|
||||
#include "core/io/resource.h"
|
||||
#else
|
||||
#include "core/resource.h"
|
||||
#endif
|
||||
|
||||
class LevelStatData : public Resource {
|
||||
GDCLASS(LevelStatData, Resource);
|
||||
|
@ -23,7 +23,13 @@ SOFTWARE.
|
||||
#ifndef SIMPLE_LEVEL_STAT_DATA_H
|
||||
#define SIMPLE_LEVEL_STAT_DATA_H
|
||||
|
||||
#include "core/version.h"
|
||||
|
||||
#if VERSION_MAJOR > 3
|
||||
#include "core/io/resource.h"
|
||||
#else
|
||||
#include "core/resource.h"
|
||||
#endif
|
||||
|
||||
#include "level_stat_data.h"
|
||||
|
||||
|
@ -23,7 +23,14 @@ SOFTWARE.
|
||||
#ifndef STAT_DATA_H
|
||||
#define STAT_DATA_H
|
||||
|
||||
#include "core/version.h"
|
||||
|
||||
#if VERSION_MAJOR > 3
|
||||
#include "core/io/resource.h"
|
||||
#else
|
||||
#include "core/resource.h"
|
||||
#endif
|
||||
|
||||
#include "scene/resources/curve.h"
|
||||
|
||||
#include "level_stat_data.h"
|
||||
|
@ -23,8 +23,16 @@ SOFTWARE.
|
||||
#ifndef ENTITY_ENUMS_H
|
||||
#define ENTITY_ENUMS_H
|
||||
|
||||
#include "core/version.h"
|
||||
|
||||
#if VERSION_MAJOR > 3
|
||||
#include "core/object/object.h"
|
||||
#include "core/string/ustring.h"
|
||||
#include "core/object/class_db.h"
|
||||
#else
|
||||
#include "core/object.h"
|
||||
#include "core/ustring.h"
|
||||
#endif
|
||||
|
||||
class EntityEnums : public Object {
|
||||
GDCLASS(EntityEnums, Object);
|
||||
|
@ -23,7 +23,14 @@ SOFTWARE.
|
||||
#ifndef AI_FORMATION_H
|
||||
#define AI_FORMATION_H
|
||||
|
||||
#include "core/version.h"
|
||||
|
||||
#if VERSION_MAJOR > 3
|
||||
#include "core/io/resource.h"
|
||||
#else
|
||||
#include "core/resource.h"
|
||||
#endif
|
||||
|
||||
#include "scene/main/node.h"
|
||||
|
||||
class Entity;
|
||||
|
@ -23,8 +23,15 @@ SOFTWARE.
|
||||
#ifndef AURA_INFOS_H
|
||||
#define AURA_INFOS_H
|
||||
|
||||
#include "../entities/entity.h"
|
||||
#include "core/version.h"
|
||||
|
||||
#if VERSION_MAJOR > 3
|
||||
#include "core/object/reference.h"
|
||||
#else
|
||||
#include "core/reference.h"
|
||||
#endif
|
||||
|
||||
#include "../entities/entity.h"
|
||||
|
||||
class Entity;
|
||||
class Aura;
|
||||
|
@ -22,6 +22,8 @@ SOFTWARE.
|
||||
|
||||
#include "spell_cast_info.h"
|
||||
|
||||
#include "core/version.h"
|
||||
|
||||
#include "../data/items/item_instance.h"
|
||||
#include "../data/items/item_template.h"
|
||||
#include "../data/spells/spell.h"
|
||||
@ -203,7 +205,11 @@ Dictionary SpellCastInfo::to_dict() {
|
||||
return dict;
|
||||
}
|
||||
void SpellCastInfo::from_dict(const Dictionary &dict) {
|
||||
#if VERSION_MAJOR > 3
|
||||
ERR_FAIL_COND(dict.is_empty());
|
||||
#else
|
||||
ERR_FAIL_COND(dict.empty());
|
||||
#endif
|
||||
|
||||
_has_cast_time = dict.get("has_cast_time", true);
|
||||
_cast_time = dict.get("cast_time", 0);
|
||||
|
@ -23,7 +23,13 @@ SOFTWARE.
|
||||
#ifndef SPELL_INFOS_H
|
||||
#define SPELL_INFOS_H
|
||||
|
||||
#include "core/version.h"
|
||||
|
||||
#if VERSION_MAJOR > 3
|
||||
#include "core/io/resource.h"
|
||||
#else
|
||||
#include "core/resource.h"
|
||||
#endif
|
||||
|
||||
class Spell;
|
||||
class Entity;
|
||||
|
@ -23,8 +23,15 @@ SOFTWARE.
|
||||
#ifndef BAG_H
|
||||
#define BAG_H
|
||||
|
||||
#include "core/version.h"
|
||||
|
||||
#if VERSION_MAJOR > 3
|
||||
#include "core/io/resource.h"
|
||||
#include "core/templates/vector.h"
|
||||
#else
|
||||
#include "core/resource.h"
|
||||
#include "core/vector.h"
|
||||
#endif
|
||||
|
||||
#include "../item_enums.h"
|
||||
|
||||
|
@ -23,8 +23,15 @@ SOFTWARE.
|
||||
#ifndef GRID_BAG_H
|
||||
#define GRID_BAG_H
|
||||
|
||||
#include "core/reference.h"
|
||||
#include "core/version.h"
|
||||
|
||||
#if VERSION_MAJOR > 3
|
||||
#include "core/io/resource.h"
|
||||
#include "core/templates/vector.h"
|
||||
#else
|
||||
#include "core/resource.h"
|
||||
#include "core/vector.h"
|
||||
#endif
|
||||
|
||||
#include "../item_enums.h"
|
||||
|
||||
|
@ -23,8 +23,15 @@ SOFTWARE.
|
||||
#ifndef INVENTORY_H
|
||||
#define INVENTORY_H
|
||||
|
||||
#include "core/reference.h"
|
||||
#include "core/version.h"
|
||||
|
||||
#if VERSION_MAJOR > 3
|
||||
#include "core/io/resource.h"
|
||||
#include "core/templates/vector.h"
|
||||
#else
|
||||
#include "core/resource.h"
|
||||
#include "core/vector.h"
|
||||
#endif
|
||||
|
||||
#include "../item_enums.h"
|
||||
|
||||
|
@ -23,8 +23,15 @@ SOFTWARE.
|
||||
#ifndef BAG_H
|
||||
#define BAG_H
|
||||
|
||||
#include "core/reference.h"
|
||||
#include "core/version.h"
|
||||
|
||||
#if VERSION_MAJOR > 3
|
||||
#include "core/io/resource.h"
|
||||
#include "core/templates/vector.h"
|
||||
#else
|
||||
#include "core/resource.h"
|
||||
#include "core/vector.h"
|
||||
#endif
|
||||
|
||||
#include "../item_enums.h"
|
||||
|
||||
|
@ -23,8 +23,16 @@ SOFTWARE.
|
||||
#ifndef ITEM_ENUMS_H
|
||||
#define ITEM_ENUMS_H
|
||||
|
||||
#include "core/version.h"
|
||||
|
||||
#if VERSION_MAJOR > 3
|
||||
#include "core/object/object.h"
|
||||
#include "core/string/ustring.h"
|
||||
#include "core/object/class_db.h"
|
||||
#else
|
||||
#include "core/object.h"
|
||||
#include "core/ustring.h"
|
||||
#endif
|
||||
|
||||
class ItemEnums : public Object {
|
||||
GDCLASS(ItemEnums, Object);
|
||||
|
@ -22,6 +22,8 @@ SOFTWARE.
|
||||
|
||||
#include "spell_damage_info.h"
|
||||
|
||||
#include "core/version.h"
|
||||
|
||||
#include "../data/auras/aura.h"
|
||||
#include "../data/spells/spell.h"
|
||||
#include "../database/ess_resource_db.h"
|
||||
@ -200,7 +202,11 @@ Dictionary SpellDamageInfo::to_dict() {
|
||||
return dict;
|
||||
}
|
||||
void SpellDamageInfo::from_dict(const Dictionary &dict) {
|
||||
#if VERSION_MAJOR > 3
|
||||
ERR_FAIL_COND(dict.is_empty());
|
||||
#else
|
||||
ERR_FAIL_COND(dict.empty());
|
||||
#endif
|
||||
|
||||
_immune = dict.get("immune", true);
|
||||
_damage = dict.get("damage", 0);
|
||||
|
@ -23,8 +23,15 @@ SOFTWARE.
|
||||
#ifndef SPELL_DAMAGE_INFO_H
|
||||
#define SPELL_DAMAGE_INFO_H
|
||||
|
||||
#include "../spell_enums.h"
|
||||
#include "core/version.h"
|
||||
|
||||
#if VERSION_MAJOR > 3
|
||||
#include "core/object/reference.h"
|
||||
#else
|
||||
#include "core/reference.h"
|
||||
#endif
|
||||
|
||||
#include "../spell_enums.h"
|
||||
#include "scene/main/node.h"
|
||||
|
||||
class Entity;
|
||||
|
@ -22,6 +22,8 @@ SOFTWARE.
|
||||
|
||||
#include "spell_heal_info.h"
|
||||
|
||||
#include "core/version.h"
|
||||
|
||||
#include "../data/auras/aura.h"
|
||||
#include "../data/spells/spell.h"
|
||||
#include "../database/ess_resource_db.h"
|
||||
@ -201,7 +203,11 @@ Dictionary SpellHealInfo::to_dict() {
|
||||
return dict;
|
||||
}
|
||||
void SpellHealInfo::from_dict(const Dictionary &dict) {
|
||||
#if VERSION_MAJOR > 3
|
||||
ERR_FAIL_COND(dict.is_empty());
|
||||
#else
|
||||
ERR_FAIL_COND(dict.empty());
|
||||
#endif
|
||||
|
||||
_immune = dict.get("immune", true);
|
||||
_heal = dict.get("heal", 0);
|
||||
|
@ -23,8 +23,15 @@ SOFTWARE.
|
||||
#ifndef SPELL_HEAL_INFO_H
|
||||
#define SPELL_HEAL_INFO_H
|
||||
|
||||
#include "../spell_enums.h"
|
||||
#include "core/version.h"
|
||||
|
||||
#if VERSION_MAJOR > 3
|
||||
#include "core/object/reference.h"
|
||||
#else
|
||||
#include "core/reference.h"
|
||||
#endif
|
||||
|
||||
#include "../spell_enums.h"
|
||||
#include "scene/main/node.h"
|
||||
|
||||
class Entity;
|
||||
|
@ -22,6 +22,8 @@ SOFTWARE.
|
||||
|
||||
#include "action_bar_button_entry.h"
|
||||
|
||||
#include "core/version.h"
|
||||
|
||||
#include "action_bar_entry.h"
|
||||
|
||||
const String ActionBarButtonEntry::BINDING_STRING_ACTIONBAR_BUTTON_ENTRY_TYPE = "None,Spell,Item";
|
||||
@ -91,7 +93,11 @@ Dictionary ActionBarButtonEntry::to_dict() const {
|
||||
return dict;
|
||||
}
|
||||
void ActionBarButtonEntry::from_dict(const Dictionary &dict) {
|
||||
#if VERSION_MAJOR > 3
|
||||
ERR_FAIL_COND(dict.is_empty());
|
||||
#else
|
||||
ERR_FAIL_COND(dict.empty());
|
||||
#endif
|
||||
|
||||
_action_bar_id = dict.get("action_bar_id", 0);
|
||||
_slot_id = dict.get("slot_id", 0);
|
||||
|
@ -23,8 +23,15 @@ SOFTWARE.
|
||||
#ifndef ACTION_BAR_BUTTON_ENTRY_H
|
||||
#define ACTION_BAR_BUTTON_ENTRY_H
|
||||
|
||||
#include "core/dictionary.h"
|
||||
#include "core/version.h"
|
||||
|
||||
#if VERSION_MAJOR > 3
|
||||
#include "core/object/reference.h"
|
||||
#include "core/variant/dictionary.h"
|
||||
#else
|
||||
#include "core/reference.h"
|
||||
#include "core/dictionary.h"
|
||||
#endif
|
||||
|
||||
class ActionBarEntry;
|
||||
|
||||
|
@ -22,6 +22,8 @@ SOFTWARE.
|
||||
|
||||
#include "action_bar_entry.h"
|
||||
|
||||
#include "core/version.h"
|
||||
|
||||
#include "action_bar_profile.h"
|
||||
|
||||
#include "../../defines.h"
|
||||
@ -115,7 +117,11 @@ Dictionary ActionBarEntry::to_dict() const {
|
||||
return dict;
|
||||
}
|
||||
void ActionBarEntry::from_dict(const Dictionary &dict) {
|
||||
#if VERSION_MAJOR > 3
|
||||
ERR_FAIL_COND(dict.is_empty());
|
||||
#else
|
||||
ERR_FAIL_COND(dict.empty());
|
||||
#endif
|
||||
|
||||
for (int i = 0; i < _button_entries.size(); ++i) {
|
||||
_button_entries.get(i)->set_owner(NULL);
|
||||
|
@ -23,10 +23,19 @@ SOFTWARE.
|
||||
#ifndef ACTION_BAR_ENTRY_H
|
||||
#define ACTION_BAR_ENTRY_H
|
||||
|
||||
#include "core/array.h"
|
||||
#include "core/dictionary.h"
|
||||
#include "core/version.h"
|
||||
|
||||
#if VERSION_MAJOR > 3
|
||||
#include "core/object/reference.h"
|
||||
#include "core/templates/vector.h"
|
||||
#include "core/variant/array.h"
|
||||
#include "core/variant/dictionary.h"
|
||||
#else
|
||||
#include "core/reference.h"
|
||||
#include "core/vector.h"
|
||||
#include "core/array.h"
|
||||
#include "core/dictionary.h"
|
||||
#endif
|
||||
|
||||
#include "action_bar_button_entry.h"
|
||||
|
||||
|
@ -22,6 +22,8 @@ SOFTWARE.
|
||||
|
||||
#include "action_bar_profile.h"
|
||||
|
||||
#include "core/version.h"
|
||||
|
||||
#include "../class_profile.h"
|
||||
|
||||
Ref<ClassProfile> ActionBarProfile::get_owner() {
|
||||
@ -41,7 +43,7 @@ void ActionBarProfile::set_action_bar_profile_name(const String &value) {
|
||||
emit_change();
|
||||
}
|
||||
|
||||
Vector<Ref<ActionBarEntry> > &ActionBarProfile::get_action_bars() {
|
||||
Vector<Ref<ActionBarEntry>> &ActionBarProfile::get_action_bars() {
|
||||
return _action_bars;
|
||||
}
|
||||
|
||||
@ -130,8 +132,13 @@ Dictionary ActionBarProfile::to_dict() const {
|
||||
return dict;
|
||||
}
|
||||
void ActionBarProfile::from_dict(const Dictionary &dict) {
|
||||
#if VERSION_MAJOR > 3
|
||||
if (dict.is_empty())
|
||||
return;
|
||||
#else
|
||||
if (dict.empty())
|
||||
return;
|
||||
#endif
|
||||
|
||||
for (int i = 0; i < _action_bars.size(); ++i) {
|
||||
_action_bars.get(i)->set_owner(NULL);
|
||||
|
@ -23,11 +23,21 @@ SOFTWARE.
|
||||
#ifndef ACTION_BAR_PROFILE_H
|
||||
#define ACTION_BAR_PROFILE_H
|
||||
|
||||
#include "core/version.h"
|
||||
|
||||
#if VERSION_MAJOR > 3
|
||||
#include "core/object/reference.h"
|
||||
#include "core/templates/vector.h"
|
||||
#include "core/string/ustring.h"
|
||||
#include "core/variant/array.h"
|
||||
#include "core/variant/dictionary.h"
|
||||
#else
|
||||
#include "core/reference.h"
|
||||
#include "core/vector.h"
|
||||
#include "core/ustring.h"
|
||||
#include "core/array.h"
|
||||
#include "core/dictionary.h"
|
||||
#include "core/reference.h"
|
||||
#include "core/ustring.h"
|
||||
#include "core/vector.h"
|
||||
#endif
|
||||
|
||||
#include "action_bar_entry.h"
|
||||
|
||||
|
@ -22,6 +22,8 @@ SOFTWARE.
|
||||
|
||||
#include "class_profile.h"
|
||||
|
||||
#include "core/version.h"
|
||||
|
||||
StringName ClassProfile::get_class_path() const {
|
||||
return _class_path;
|
||||
}
|
||||
@ -125,7 +127,11 @@ Dictionary ClassProfile::to_dict() const {
|
||||
return dict;
|
||||
}
|
||||
void ClassProfile::from_dict(const Dictionary &dict) {
|
||||
#if VERSION_MAJOR > 3
|
||||
ERR_FAIL_COND(dict.is_empty());
|
||||
#else
|
||||
ERR_FAIL_COND(dict.empty());
|
||||
#endif
|
||||
|
||||
_character_class_name = dict.get("character_class_name", "");
|
||||
_class_path = dict.get("class_path", "");
|
||||
|
@ -23,9 +23,17 @@ SOFTWARE.
|
||||
#ifndef CLASS_PROFILE_H
|
||||
#define CLASS_PROFILE_H
|
||||
|
||||
#include "core/dictionary.h"
|
||||
#include "core/version.h"
|
||||
|
||||
#if VERSION_MAJOR > 3
|
||||
#include "core/object/reference.h"
|
||||
#include "core/string/ustring.h"
|
||||
#include "core/variant/dictionary.h"
|
||||
#else
|
||||
#include "core/reference.h"
|
||||
#include "core/ustring.h"
|
||||
#include "core/dictionary.h"
|
||||
#endif
|
||||
|
||||
#include "actionbar/action_bar_profile.h"
|
||||
#include "input/input_profile.h"
|
||||
|
@ -22,8 +22,15 @@ SOFTWARE.
|
||||
|
||||
#include "input_profile.h"
|
||||
|
||||
#include "core/project_settings.h"
|
||||
#include "core/version.h"
|
||||
|
||||
#if VERSION_MAJOR > 3
|
||||
#include "core/string/ustring.h"
|
||||
#include "core/config/project_settings.h"
|
||||
#else
|
||||
#include "core/ustring.h"
|
||||
#include "core/project_settings.h"
|
||||
#endif
|
||||
|
||||
#include "../class_profile.h"
|
||||
|
||||
|
@ -23,8 +23,15 @@ SOFTWARE.
|
||||
#ifndef INPUT_PROFILE_H
|
||||
#define INPUT_PROFILE_H
|
||||
|
||||
#include "core/version.h"
|
||||
|
||||
#if VERSION_MAJOR > 3
|
||||
#include "core/object/reference.h"
|
||||
#include "core/string/ustring.h"
|
||||
#else
|
||||
#include "core/reference.h"
|
||||
#include "core/ustring.h"
|
||||
#endif
|
||||
|
||||
class ClassProfile;
|
||||
|
||||
|
@ -23,9 +23,17 @@ SOFTWARE.
|
||||
#ifndef INPUT_PROFILE_MODIFIER_H
|
||||
#define INPUT_PROFILE_MODIFIER_H
|
||||
|
||||
#include "core/version.h"
|
||||
|
||||
#if VERSION_MAJOR > 3
|
||||
#include "core/object/reference.h"
|
||||
#include "core/templates/vector.h"
|
||||
#include "core/string/ustring.h"
|
||||
#else
|
||||
#include "core/reference.h"
|
||||
#include "core/ustring.h"
|
||||
#include "core/vector.h"
|
||||
#include "core/ustring.h"
|
||||
#endif
|
||||
|
||||
#include "input_profile_modifier_entry.h"
|
||||
|
||||
|
@ -23,8 +23,15 @@ SOFTWARE.
|
||||
#ifndef INPUT_PROFILE_MODIFIER_ENTRY_H
|
||||
#define INPUT_PROFILE_MODIFIER_ENTRY_H
|
||||
|
||||
#include "core/version.h"
|
||||
|
||||
#if VERSION_MAJOR > 3
|
||||
#include "core/object/reference.h"
|
||||
#include "core/string/ustring.h"
|
||||
#else
|
||||
#include "core/reference.h"
|
||||
#include "core/ustring.h"
|
||||
#endif
|
||||
|
||||
class InputProfileModifierEntry : public Reference {
|
||||
GDCLASS(InputProfileModifierEntry, Reference);
|
||||
|
@ -22,6 +22,8 @@ SOFTWARE.
|
||||
|
||||
#include "player_profile.h"
|
||||
|
||||
#include "core/version.h"
|
||||
|
||||
#include "../defines.h"
|
||||
|
||||
const String PlayerProfile::DEFAULT_PROFILE_FILE_NAME = "default.profile";
|
||||
@ -144,7 +146,11 @@ Dictionary PlayerProfile::to_dict() const {
|
||||
return dict;
|
||||
}
|
||||
void PlayerProfile::from_dict(const Dictionary &dict) {
|
||||
#if VERSION_MAJOR > 3
|
||||
ERR_FAIL_COND(dict.is_empty());
|
||||
#else
|
||||
ERR_FAIL_COND(dict.empty());
|
||||
#endif
|
||||
|
||||
clear_class_profiles();
|
||||
|
||||
|
@ -23,9 +23,17 @@ SOFTWARE.
|
||||
#ifndef PLAYER_PROFILE_H
|
||||
#define PLAYER_PROFILE_H
|
||||
|
||||
#include "core/dictionary.h"
|
||||
#include "core/version.h"
|
||||
|
||||
#if VERSION_MAJOR > 3
|
||||
#include "core/object/reference.h"
|
||||
#include "core/string/ustring.h"
|
||||
#include "core/variant/dictionary.h"
|
||||
#else
|
||||
#include "core/reference.h"
|
||||
#include "core/ustring.h"
|
||||
#include "core/dictionary.h"
|
||||
#endif
|
||||
|
||||
#include "class_profile.h"
|
||||
|
||||
|
@ -23,15 +23,23 @@ SOFTWARE.
|
||||
#ifndef ESS_H
|
||||
#define ESS_H
|
||||
|
||||
#include "core/version.h"
|
||||
|
||||
#if VERSION_MAJOR > 3
|
||||
#include "core/object/object.h"
|
||||
#include "core/io/resource.h"
|
||||
#include "core/string/ustring.h"
|
||||
#include "core/config/engine.h"
|
||||
#include "core/core_bind.h"
|
||||
#else
|
||||
#include "core/object.h"
|
||||
|
||||
#include "core/engine.h"
|
||||
|
||||
#include "core/resource.h"
|
||||
#include "core/ustring.h"
|
||||
#include "scene/main/node.h"
|
||||
|
||||
#include "core/engine.h"
|
||||
#include "core/bind/core_bind.h"
|
||||
#endif
|
||||
|
||||
#include "scene/main/node.h"
|
||||
|
||||
#include "../defines.h"
|
||||
|
||||
|
@ -23,9 +23,16 @@ SOFTWARE.
|
||||
#include "profile_manager.h"
|
||||
#include "core/io/json.h"
|
||||
#include "core/os/file_access.h"
|
||||
#include "core/project_settings.h"
|
||||
|
||||
#include "core/version.h"
|
||||
|
||||
#if VERSION_MAJOR > 3
|
||||
#include "core/config/engine.h"
|
||||
#include "core/config/project_settings.h"
|
||||
#else
|
||||
#include "core/engine.h"
|
||||
#include "core/project_settings.h"
|
||||
#endif
|
||||
|
||||
#include "../defines.h"
|
||||
|
||||
@ -163,7 +170,11 @@ Dictionary ProfileManager::to_dict() const {
|
||||
return dict;
|
||||
}
|
||||
void ProfileManager::from_dict(const Dictionary &dict) {
|
||||
#if VERSION_MAJOR > 3
|
||||
ERR_FAIL_COND(dict.is_empty());
|
||||
#else
|
||||
ERR_FAIL_COND(dict.empty());
|
||||
#endif
|
||||
|
||||
clears_player_profiles();
|
||||
|
||||
|
@ -23,9 +23,15 @@ SOFTWARE.
|
||||
#ifndef PROFILE_MANAGER_H
|
||||
#define PROFILE_MANAGER_H
|
||||
|
||||
#include "core/object.h"
|
||||
#include "core/version.h"
|
||||
|
||||
#if VERSION_MAJOR > 3
|
||||
#include "core/object/object.h"
|
||||
#include "core/templates/vector.h"
|
||||
#else
|
||||
#include "core/object.h"
|
||||
#include "core/vector.h"
|
||||
#endif
|
||||
|
||||
#include "../profiles/player_profile.h"
|
||||
|
||||
|
@ -23,14 +23,22 @@ SOFTWARE.
|
||||
#ifndef CHARACTER_SKELETON_2D_H
|
||||
#define CHARACTER_SKELETON_2D_H
|
||||
|
||||
#include "core/version.h"
|
||||
|
||||
#if VERSION_MAJOR > 3
|
||||
#include "core/templates/vector.h"
|
||||
#include "core/string/ustring.h"
|
||||
#include "core/string/node_path.h"
|
||||
#else
|
||||
#include "core/vector.h"
|
||||
#include "core/ustring.h"
|
||||
#include "core/node_path.h"
|
||||
#endif
|
||||
|
||||
#include "scene/2d/node_2d.h"
|
||||
|
||||
#include "scene/main/node.h"
|
||||
|
||||
#include "core/vector.h"
|
||||
|
||||
#include "core/node_path.h"
|
||||
#include "core/ustring.h"
|
||||
#include "scene/animation/animation_player.h"
|
||||
#include "scene/animation/animation_tree.h"
|
||||
|
||||
|
@ -23,12 +23,20 @@ SOFTWARE.
|
||||
#ifndef CHARACTER_SKELETON_3D_H
|
||||
#define CHARACTER_SKELETON_3D_H
|
||||
|
||||
#include "core/version.h"
|
||||
|
||||
#if VERSION_MAJOR > 3
|
||||
#include "core/templates/vector.h"
|
||||
#include "core/string/ustring.h"
|
||||
#include "core/string/node_path.h"
|
||||
#else
|
||||
#include "core/vector.h"
|
||||
#include "core/ustring.h"
|
||||
#include "core/node_path.h"
|
||||
#endif
|
||||
|
||||
#include "scene/main/node.h"
|
||||
|
||||
#include "core/vector.h"
|
||||
|
||||
#include "core/node_path.h"
|
||||
#include "core/ustring.h"
|
||||
#include "scene/animation/animation_player.h"
|
||||
#include "scene/animation/animation_tree.h"
|
||||
|
||||
|
@ -23,8 +23,15 @@ SOFTWARE.
|
||||
#ifndef ENTITY_SKELETON_DATA_H
|
||||
#define ENTITY_SKELETON_DATA_H
|
||||
|
||||
#include "core/version.h"
|
||||
|
||||
#if VERSION_MAJOR > 3
|
||||
#include "core/io/resource.h"
|
||||
#include "core/string/ustring.h"
|
||||
#else
|
||||
#include "core/resource.h"
|
||||
#include "core/ustring.h"
|
||||
#endif
|
||||
|
||||
class EntitySkeletonData : public Resource {
|
||||
GDCLASS(EntitySkeletonData, Resource);
|
||||
|
@ -23,8 +23,15 @@ SOFTWARE.
|
||||
#ifndef SKELETON_MODEL_ENTRY_H
|
||||
#define SKELETON_MODEL_ENTRY_H
|
||||
|
||||
#include "../data/items/model_visual_entry.h"
|
||||
#include "core/version.h"
|
||||
|
||||
#if VERSION_MAJOR > 3
|
||||
#include "core/object/reference.h"
|
||||
#else
|
||||
#include "core/reference.h"
|
||||
#endif
|
||||
|
||||
#include "../data/items/model_visual_entry.h"
|
||||
|
||||
class SkeletonModelEntry : public Reference {
|
||||
GDCLASS(SkeletonModelEntry, Reference);
|
||||
|
@ -23,7 +23,14 @@ SOFTWARE.
|
||||
#ifndef SPELL_ENUMS_H
|
||||
#define SPELL_ENUMS_H
|
||||
|
||||
#include "core/version.h"
|
||||
|
||||
#if VERSION_MAJOR > 3
|
||||
#include "core/object/object.h"
|
||||
#include "core/object/class_db.h"
|
||||
#else
|
||||
#include "core/object.h"
|
||||
#endif
|
||||
|
||||
class SpellEnums : public Object {
|
||||
GDCLASS(SpellEnums, Object);
|
||||
|
@ -22,6 +22,8 @@ SOFTWARE.
|
||||
|
||||
#include "entity_create_info.h"
|
||||
|
||||
#include "core/version.h"
|
||||
|
||||
#include "../data/species/species_instance.h"
|
||||
#include "../entities/data/entity_data.h"
|
||||
#include "../entities/entity.h"
|
||||
@ -181,7 +183,11 @@ Dictionary EntityCreateInfo::_to_dict() {
|
||||
return dict;
|
||||
}
|
||||
void EntityCreateInfo::_from_dict(const Dictionary &dict) {
|
||||
#if VERSION_MAJOR > 3
|
||||
ERR_FAIL_COND(dict.is_empty());
|
||||
#else
|
||||
ERR_FAIL_COND(dict.empty());
|
||||
#endif
|
||||
|
||||
_guid = dict.get("guid", 0);
|
||||
_networked = dict.get("networked", false);
|
||||
|
@ -23,9 +23,17 @@ SOFTWARE.
|
||||
#ifndef ENTITY_CREATE_INFO_H
|
||||
#define ENTITY_CREATE_INFO_H
|
||||
|
||||
#include "../entity_enums.h"
|
||||
#include "core/version.h"
|
||||
|
||||
#if VERSION_MAJOR > 3
|
||||
#include "core/object/reference.h"
|
||||
#include "core/string/ustring.h"
|
||||
#else
|
||||
#include "core/reference.h"
|
||||
#include "core/ustring.h"
|
||||
#endif
|
||||
|
||||
#include "../entity_enums.h"
|
||||
|
||||
class EntityData;
|
||||
class SpeciesInstance;
|
||||
|
Loading…
Reference in New Issue
Block a user