diff --git a/include/API/FLServer/Solar.hpp b/include/API/FLServer/Solar.hpp index c9f619204..667bf8837 100644 --- a/include/API/FLServer/Solar.hpp +++ b/include/API/FLServer/Solar.hpp @@ -10,4 +10,5 @@ namespace Hk::Solar DLL Action GetBaseByWildcard(std::wstring_view targetBaseName); DLL Action GetAffiliation(BaseId solarId); DLL Action GetCommodityPrice(BaseId baseId, GoodId goodId); + DLL Action ExistsAndAlive(uint id); } // namespace Hk::Solar diff --git a/source/API/FLServer/Solar.cpp b/source/API/FLServer/Solar.cpp index f56d0f658..5e28c00dd 100644 --- a/source/API/FLServer/Solar.cpp +++ b/source/API/FLServer/Solar.cpp @@ -151,4 +151,17 @@ namespace Hk::Solar } return { price }; } + + Action ExistsAndAlive(uint id) + { + int isAlive = pub::SpaceObj::ExistsAndAlive(id); + if (isAlive == 0) + { + return { true }; + } + else + { + return { false }; + } + } } // namespace Hk::Solar