[Bots] Cleanup and remove preprocessors. (#2757)

* [Bots] Cleanup and remove preprocessors.

- Removes every `#ifdef BOTS` we have and locks bots behind `Bots:AllowBots` rule.
- Bot updates are now done by default similar to regular database updates.
- Modify `CMakeLists.txt`, `.drone.yml`, and `BUILD.md` to match the removal of `EQEMU_ENABLE_BOTS`.

* Cleanup

- Add SQL for enabling bots for servers with bots.
- Add message that tells players/operators bots are disabled.

* Suggested changes.

* Bot injection stuff

* Change SQL to bot SQL.

* Tweaks

* Remove `is_bot`

* Update version.h

* Update main.cpp

* Update database.cpp

* Fix name availability crash

* Remove bots from update script

Co-authored-by: Akkadius <akkadius1@gmail.com>
This commit is contained in:
Alex King
2023-01-20 13:35:33 -05:00
committed by GitHub
parent 1f0b2a8991
commit 3335cacac1
91 changed files with 263 additions and 1150 deletions
-9
View File
@@ -7,9 +7,7 @@
class EntityList;
class Lua_Mob;
class Lua_Client;
#ifdef BOTS
class Lua_Bot;
#endif
class Lua_NPC;
class Lua_Door;
class Lua_Corpse;
@@ -19,9 +17,7 @@ class Lua_Raid;
class Lua_Spawn;
struct Lua_Mob_List;
struct Lua_Client_List;
#ifdef BOTS
struct Lua_Bot_List;
#endif
struct Lua_NPC_List;
struct Lua_Corpse_List;
struct Lua_Object_List;
@@ -40,10 +36,7 @@ luabind::scope lua_register_corpse_list();
luabind::scope lua_register_object_list();
luabind::scope lua_register_door_list();
luabind::scope lua_register_spawn_list();
#ifdef BOTS
luabind::scope lua_register_bot_list();
#endif
class Lua_EntityList : public Lua_Ptr<EntityList>
{
@@ -130,7 +123,6 @@ public:
Lua_Spawn_List GetSpawnList();
void SignalAllClients(int signal_id);
void ChannelMessage(Lua_Mob from, int channel_num, int language, const char *message);
#ifdef BOTS
Lua_Bot GetBotByID(uint32 bot_id);
Lua_Bot GetBotByName(std::string bot_name);
Lua_Client GetBotOwnerByBotEntityID(uint32 entity_id);
@@ -147,7 +139,6 @@ public:
void SignalAllBotsByOwnerName(std::string owner_name, int signal_id);
void SignalBotByBotID(uint32 bot_id, int signal_id);
void SignalBotByBotName(std::string bot_name, int signal_id);
#endif
};
#endif