No description
- Lua 100%
Unvanquished Server Scripts
These are the Lua scripts used on the Unvanquished Map&Bot Testing Server.
Directory Layout
This repository's content is in a directory game/lua.
When the game loads a map with a given layout, it first executes the file <mapname>/any.lua, if it exists.
Then, the file <mapname>/<layout>.lua is executed, if it exists.
The following Lua code does that:
local function tryRequire(path)
if Trap.fileExists(path) then require(path) end
end
local mapname = Cvar.get("mapname")
local layout = Cvar.get("layout")
tryRequire(string.format("lua/%s/any.lua", mapname))
tryRequire(string.format("lua/%s/%s.lua", mapname, layout))