[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
-6
View File
@@ -12,9 +12,7 @@
#include "lua_object.h"
#include "lua_door.h"
#ifdef BOTS
#include "lua_bot.h"
#endif
bool Lua_Entity::IsClient() {
Lua_Safe_Call_Bool();
@@ -122,22 +120,18 @@ Lua_Door Lua_Entity::CastToDoor() {
return Lua_Door(m);
}
#ifdef BOTS
Lua_Bot Lua_Entity::CastToBot() {
void *d = GetLuaPtrData();
Bot *b = reinterpret_cast<Bot*>(d);
return Lua_Bot(b);
}
#endif
luabind::scope lua_register_entity() {
return luabind::class_<Lua_Entity>("Entity")
.def(luabind::constructor<>())
.property("null", &Lua_Entity::Null)
.property("valid", &Lua_Entity::Valid)
#ifdef BOTS
.def("CastToBot", &Lua_Entity::CastToBot)
#endif
.def("CastToClient", &Lua_Entity::CastToClient)
.def("CastToCorpse", &Lua_Entity::CastToCorpse)
.def("CastToDoor", &Lua_Entity::CastToDoor)