From 3536f01bacf5f54cefb32b768cd020a1f94d0ade Mon Sep 17 00:00:00 2001 From: Relintai Date: Mon, 21 Feb 2022 01:36:40 +0100 Subject: [PATCH] Revert "Added additional build time arguments ess_entity_base_class and ess_entity_base_class_include. It does not work too well, it is going to be reverted, but I want to save the code in case it's needed later." This reverts commit c26a47273bd6aa5c8541a6f49c406f1ab03abd5c. --- SCsub | 4 ---- config.py | 9 +-------- entities/entity.h | 22 ++++------------------ 3 files changed, 5 insertions(+), 30 deletions(-) diff --git a/SCsub b/SCsub index af521d0..ae92896 100644 --- a/SCsub +++ b/SCsub @@ -4,10 +4,6 @@ Import('env') module_env = env.Clone() -if "ess_entity_base_class" in module_env: - module_env.Append(CPPDEFINES=[('ESS_ENTITY_BASE_CLASS', module_env["ess_entity_base_class"])]) - module_env.Append(CPPDEFINES=[('ESS_ENTITY_BASE_CLASS_INCLUDE', module_env["ess_entity_base_class_include"])]) - if os.path.isdir('../mesh_data_resource'): module_env.Append(CPPDEFINES=['MESH_DATA_RESOURCE_PRESENT']) diff --git a/config.py b/config.py index 297241e..7d83031 100644 --- a/config.py +++ b/config.py @@ -5,14 +5,7 @@ def can_build(env, platform): def configure(env): - from SCons.Script import Variables, Help - - envvars = Variables() - envvars.Add("ess_entity_base_class", "What class Entity should inherit from. Default is Node.") - envvars.Add("ess_entity_base_class_include", "What The include for that class. Default is scene/main/node.h") - - envvars.Update(env) - Help(envvars.GenerateHelpText(env)) + pass def get_doc_classes(): diff --git a/entities/entity.h b/entities/entity.h index d584cf0..f996ace 100644 --- a/entities/entity.h +++ b/entities/entity.h @@ -37,6 +37,8 @@ SOFTWARE. #include "core/io/networked_multiplayer_peer.h" +#include "scene/main/node.h" + #include "../data/items/craft_recipe.h" #include "../data/items/item_instance.h" #include "../data/spells/spell.h" @@ -67,22 +69,6 @@ SOFTWARE. #include spatial_h_path -#ifndef ESS_ENTITY_BASE_CLASS -// By default Entity inherits from Node -#define ENTITY_BASE_CLASS Node -#include "scene/main/node.h" -#else -// We turn the ESS_ENTITY_BASE_CLASS define into a text replace macro -#define ENTITY_BASE_CLASS ESS_ENTITY_BASE_CLASS - -// Abuse pre-processor macros to quote what's inside the ESS_ENTITY_BASE_CLASS_INCLUDE define -#define _ENTITY_BASE_CLASS_QUOTE(x) #x -#define _ENTITY_BASE_CLASS_QUOTE_H(x) _ENTITY_BASE_CLASS_QUOTE(x) - -#include _ENTITY_BASE_CLASS_QUOTE_H(ESS_ENTITY_BASE_CLASS_INCLUDE) -#endif - - class EntityData; class AuraData; class Spell; @@ -250,8 +236,8 @@ struct EntityStat { } \ variable = value; -class Entity : public ENTITY_BASE_CLASS { - GDCLASS(Entity, ENTITY_BASE_CLASS); +class Entity : public Node { + GDCLASS(Entity, Node); public: //// Base ////