Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion doc/site/content/changelogs/_index.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ This is the bleeding-edge changelog since version 2025.06, for **pre-release 202
- add `Spring.GetClosestEnemyUnit(x, y, z, range = inf, allyTeamID, bool useLoS = true, bool spherical = false, bool requireEnemyToSeePos = false) → unitID?` to LuaRules.
- large QTPFS perf improvements.
- always output logs to stdout.
- add `Engine.isHeadless`, available in unsynced only.
- add boolean `Platform.isHeadless`.
- archive cache version 20 → 21.

## Fixes
Expand Down
3 changes: 0 additions & 3 deletions rts/Lua/LuaConstEngine.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -59,9 +59,6 @@ bool LuaConstEngine::PushEntries(lua_State* L)
LuaPushNamedString(L, "buildFlags" , SpringVersion::GetAdditional());
LuaPushNamedNumber(L, "wordSize", (!CLuaHandle::GetHandleSynced(L))? Platform::NativeWordSize() * 8: 0);

if (!CLuaHandle::GetHandleSynced(L))
LuaPushNamedBool(L, "isHeadless", SpringVersion::IsHeadless());

LuaPushNamedNumber(L, "gameSpeed", GAME_SPEED);
LuaPushNamedNumber(L, "maxCustomPaletteID", MAX_CUSTOM_COLORS - 1);

Expand Down
4 changes: 4 additions & 0 deletions rts/Lua/LuaConstPlatform.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

#include "LuaConstPlatform.h"
#include "LuaUtils.h"
#include "Game/GameVersion.h"
#include "System/Platform/Hardware.h"
#include "System/Platform/Misc.h"
#include "Rendering/GlobalRendering.h"
Expand Down Expand Up @@ -147,5 +148,8 @@ bool LuaConstPlatform::PushEntries(lua_State* L)
/*** @field Platform.macAddrHash string */
LuaPushNamedString(L, "macAddrHash", Platform::GetMacAddrHash());

/*** @field Platform.isHeadless boolean Is this a headless build which only simulates and doesnt offer interactive IO? */
LuaPushNamedBool(L, "isHeadless", SpringVersion::IsHeadless());

return true;
}
Loading