Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
1344d7c
test(builders): rename Spring* builders to Engine*, own Engine/BAR wi…
keithharvey Jul 7, 2026
e8407c5
gen(stylua): initial formatting of entire codebase
keithharvey Jul 17, 2026
3aeb475
env: expose detached BAR modules to widget/gadget sandbox
keithharvey Jul 7, 2026
0004245
gen(hand): integration tests return-table shape
keithharvey Apr 14, 2026
03654fa
gen(hand): inline luassert and busted LuaCATS types
keithharvey Apr 14, 2026
31e15d7
gen(bar_codemod): bracket-to-dot
keithharvey Jul 17, 2026
cc3e404
gen(bar_codemod): rename-aliases
keithharvey Jul 17, 2026
3dafd0c
gen(bar_codemod): detach-bar-modules
keithharvey Jul 17, 2026
e6f4e70
env(llm): type-check env layer — .emmyrc config, type stubs, manual f…
keithharvey Jul 15, 2026
4bac533
fix(upstream): forward-declare utilities in springFunctions.lua
keithharvey Jul 16, 2026
7f7d3ed
ci: emmylua_check 0.22.0 -> 0.24.0 (lockstep with dev.Containerfile)
keithharvey Jul 16, 2026
93e696b
fix(upstream): two dangling globals surfaced by emmylua 0.24
keithharvey Jul 16, 2026
f715c4d
gen(llm): type-error triage (49 → 0 errors)
keithharvey Jul 17, 2026
016e1e5
git-blame-ignore-revs: add transform commits
keithharvey Jul 17, 2026
22dc1bd
Sharing 1/7: Transfer library (enums, comms, serialization, test infra)
keithharvey Jul 17, 2026
ebd086d
Sharing 2/7: Modes & economy boundary (presets, waterfill, share ledger)
keithharvey Jul 17, 2026
537d2a8
Sharing 3/7: Policies (context -> policy -> policy_result -> action)
keithharvey Jul 17, 2026
226fe6c
Sharing 4/7: Transfer runtime (controllers, economy boundary, gadget …
keithharvey Jul 17, 2026
51b807c
Sharing 5/7: Tech Core / Keystone
keithharvey Jul 17, 2026
7008cab
Sharing 6/7: Sharing Tab UI
keithharvey Jul 17, 2026
a75c0ba
Sharing 7/7: Game modes export (export widget, headless startscript, …
keithharvey Jul 17, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
3 changes: 2 additions & 1 deletion .busted
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@ return {
"luarules/?.lua", "luarules/?/init.lua",
"luaui/?.lua", "luaui/?/init.lua",
"spec/?.lua", "spec/?/init.lua",
}, ";")
}, ";"),
helper = "spec/spec_helper.lua",
},
-- Default configuration
verbose = true,
Expand Down
11 changes: 11 additions & 0 deletions .emmyrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,13 @@
"duplicate-set-field"
],
"globals": [
"BAR",
"Utilities",
"Debug",
"Lava",
"GetModOptionsCopy",
"I18N",
"I18N_PATH",
"Turn",
"Move",
"Spin",
Expand All @@ -33,11 +40,14 @@
"SIG_WALK",
"UNITSCRIPT_DIR",
"widgetHandler",
"actionHandler",
"gadgetHandler",
"CALLIN_MAP",
"fontHandler",
"LUAUI_DIRNAME",
"socket",
"pairsByKeys",
"ipairs_reverse",
"SendToUnsynced",
"CallAsTeam",
"handler",
Expand Down Expand Up @@ -77,6 +87,7 @@
},
"workspace": {
"ignoreDir": [
"modules/i18n/i18nlib/spec",
".vscode",
".lux"
],
Expand Down
18 changes: 18 additions & 0 deletions .git-blame-ignore-revs
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# gen(stylua): initial formatting of entire codebase
03654fa6de7be8a3ac904fc4345c83bd363678bf

# gen(bar_codemod): bracket-to-dot
31e15d77d67a216efa9fb253744bb09409fa2807

# gen(bar_codemod): rename-aliases
cc3e404b4b7a4a89004081d69d19e7802635f7e5

# gen(bar_codemod): detach-bar-modules
3dafd0cebe46c6fd9b2fb4f4b7aa6d54b7eed256

# gen(hand): integration tests return-table shape
3dafd0cebe46c6fd9b2fb4f4b7aa6d54b7eed256

# gen(hand): inline luassert and busted LuaCATS types
3dafd0cebe46c6fd9b2fb4f4b7aa6d54b7eed256

143 changes: 143 additions & 0 deletions .github/workflows/export_game_modes.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,143 @@
name: Export Game Modes JSON

on:
push:
branches:
- stable
- master
workflow_dispatch:

env:
EXPORT_DIR: /tmp/bar-export
MAP_NAME: quicksilver_remake_1.24.sd7
MAP_URL: https://springfiles.springrts.com/files/maps/quicksilver_remake_1.24.sd7

jobs:
export:
name: Export Game Modes
runs-on: ubuntu-latest
permissions:
contents: write
if: github.repository == 'beyond-all-reason/Beyond-All-Reason'
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Resolve engine version
id: engine
run: |
CONFIG=$(curl -fsSL https://launcher-config.beyondallreason.dev/config.json)
ENGINE_URL=$(echo "$CONFIG" | jq -r '
.setups[]
| select(.package.id == "manual-linux-test-engine")
| .downloads.resources[]
| select(.destination | contains("engine"))
| .url
')
ENGINE_DEST=$(echo "$CONFIG" | jq -r '
.setups[]
| select(.package.id == "manual-linux-test-engine")
| .downloads.resources[]
| select(.destination | contains("engine"))
| .destination
')
ENGINE_VERSION=$(basename "$ENGINE_DEST")
echo "url=$ENGINE_URL" >> "$GITHUB_OUTPUT"
echo "dest=$ENGINE_DEST" >> "$GITHUB_OUTPUT"
echo "version=$ENGINE_VERSION" >> "$GITHUB_OUTPUT"
echo "Resolved engine: $ENGINE_VERSION"

- name: Cache engine and map
id: cache
uses: actions/cache@v4
with:
path: |
${{ env.EXPORT_DIR }}/engine
${{ env.EXPORT_DIR }}/maps
key: modes-export-${{ steps.engine.outputs.version }}-quicksilver-1.24

- name: Download engine
if: steps.cache.outputs.cache-hit != 'true'
run: |
mkdir -p "$EXPORT_DIR/${{ steps.engine.outputs.dest }}"
curl -fsSL "${{ steps.engine.outputs.url }}" -o /tmp/engine.7z
7z x /tmp/engine.7z -o"$EXPORT_DIR/${{ steps.engine.outputs.dest }}"
rm /tmp/engine.7z

- name: Download map
if: steps.cache.outputs.cache-hit != 'true'
run: |
mkdir -p "$EXPORT_DIR/maps"
curl -fsSL "$MAP_URL" -o "$EXPORT_DIR/maps/$MAP_NAME"

- name: Set up workspace
run: |
mkdir -p "$EXPORT_DIR/games"
ln -sf "$GITHUB_WORKSPACE" "$EXPORT_DIR/games/BAR.sdd"
cp tools/headless_testing/springsettings.cfg "$EXPORT_DIR/"
cp tools/headless_testing/startscript_modes_export.txt "$EXPORT_DIR/"

- name: Run headless export
run: |
cd "$EXPORT_DIR"
rm -rf LuaUI/Config
engine/*/spring-headless \
--isolation \
--write-dir "$(pwd)" \
startscript_modes_export.txt
timeout-minutes: 15

- name: Validate export
run: |
OUT="$EXPORT_DIR/game_modes.json"
if [ ! -f "$OUT" ]; then
echo "::error::Export produced no game_modes.json"
exit 1
fi
# Must be valid JSON with the expected schema and at least one category.
CATEGORIES=$(jq -e '.schemaVersion as $v
| if $v != 1 then error("unexpected schemaVersion \($v)") else . end
| .categories | length' "$OUT")
echo "Exported $CATEGORIES mode categories (schemaVersion 1)"
if [ "$CATEGORIES" -lt 1 ]; then
echo "::error::Export has no mode categories"
exit 1
fi

- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: game-modes-${{ github.sha }}
path: ${{ env.EXPORT_DIR }}/game_modes.json

# push -> rolling per-channel asset (stable/test); workflow_dispatch -> commit-pinned
# asset only (off-master test builds), pruned to newest 50. Both feed the SPADS plugin.
- name: Publish to release
env:
GH_TOKEN: ${{ github.token }}
run: |
gh release view game-modes >/dev/null 2>&1 \
|| gh release create game-modes \
--prerelease \
--title "Game Modes Export" \
--notes "Game mode presets, regenerated by export_game_modes.yml and self-fetched by the SPADS ModeCommand plugin. Not a code release." \
--target "${{ github.sha }}" \
|| true
if [ "${{ github.event_name }}" = "workflow_dispatch" ]; then
ASSET="game_modes-${GITHUB_SHA:0:7}.json"
cp "$EXPORT_DIR/game_modes.json" "$EXPORT_DIR/$ASSET"
gh release upload game-modes "$EXPORT_DIR/$ASSET" --clobber
echo "Published commit-pinned $ASSET"
gh release view game-modes --json assets \
-q '.assets[] | select(.name | test("^game_modes-[0-9a-f]{7}\\.json$")) | [.createdAt, .name] | @tsv' \
| sort -r | tail -n +51 | cut -f2 | while read -r OLD; do
gh release delete-asset game-modes "$OLD" -y && echo "Pruned $OLD"
done
else
CHANNEL=stable
[ "${{ github.ref_name }}" = "stable" ] || CHANNEL=test
ASSET="game_modes-${CHANNEL}.json"
cp "$EXPORT_DIR/game_modes.json" "$EXPORT_DIR/$ASSET"
gh release upload game-modes "$EXPORT_DIR/$ASSET" --clobber
echo "Published channel $ASSET"
fi
39 changes: 39 additions & 0 deletions .github/workflows/type_check.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: Type Check

on:
push:
branches: ['*']
pull_request:
branches: ['*']
workflow_dispatch:

jobs:
emmylua_check:
name: emmylua_check
runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@v5
with:
submodules: recursive

- name: Install emmylua_check
env:
# keep in lockstep with BAR-Devtools docker/dev.Containerfile EMMYLUA_VERSION
EMMYLUA_VERSION: 0.24.0
run: |
set -euo pipefail
ARCH=$(uname -m)
case "$ARCH" in
x86_64) ASSET=emmylua_check-linux-x64.tar.gz ;;
aarch64) ASSET=emmylua_check-linux-aarch64-glibc.2.17.tar.gz ;;
*) echo "unsupported arch for emmylua_check: $ARCH" >&2; exit 1 ;;
esac
URL="https://github.com/EmmyLuaLs/emmylua-analyzer-rust/releases/download/${EMMYLUA_VERSION}/${ASSET}"
curl -fsSL "$URL" | sudo tar xz -C /usr/local/bin
sudo chmod +x /usr/local/bin/emmylua_check
/usr/local/bin/emmylua_check --version

- name: Run emmylua_check
run: emmylua_check -c .emmyrc.json .
29 changes: 14 additions & 15 deletions EngineOptions.lua
Original file line number Diff line number Diff line change
Expand Up @@ -25,24 +25,23 @@
-- Example EngineOptions.lua
--

local options =
{
local options = {
{
key="engineoptions",
name="Engine Options",
desc="Engine Options",
type="section",
key = "engineoptions",
name = "Engine Options",
desc = "Engine Options",
type = "section",
},
{
key = 'maxunits',
name = 'Max units',
desc = 'Maximum number of units (including buildings) for each team allowed at the same time',
type = 'number',
section= 'engineoptions',
def = 2000,
min = 1,
max = 10000, --- engine caps at lower limit if more than 3 team are ingame
step = 1,
key = "maxunits",
name = "Max units",
desc = "Maximum number of units (including buildings) for each team allowed at the same time",
type = "number",
section = "engineoptions",
def = 2000,
min = 1,
max = 10000, --- engine caps at lower limit if more than 3 team are ingame
step = 1,
},
}

Expand Down
Loading
Loading