Skip to content

Commit

Permalink
Getting things working again
Browse files Browse the repository at this point in the history
  • Loading branch information
drogoganor committed Feb 2, 2024
1 parent e4b9a73 commit 59d7177
Show file tree
Hide file tree
Showing 43 changed files with 4,871 additions and 1,747 deletions.
90 changes: 90 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,90 @@
name: Continuous Integration

on:
push:
pull_request:

permissions:
contents: read # to fetch code (actions/checkout)

jobs:
linux:
name: Linux (.NET 6.0)
runs-on: ubuntu-22.04

steps:
- name: Clone Repository
uses: actions/checkout@v3

- name: Install .NET 6.0
uses: actions/setup-dotnet@v3
with:
dotnet-version: '6.0.x'

- name: Prepare Environment
run: |
. mod.config;
awk '/\r$$/ { exit(1); }' mod.config || (printf "Invalid mod.config format. File must be saved using unix-style (LF, not CRLF or CR) line endings.\n"; exit 1);
- name: Check Code
run: |
make check
make check-packaging-scripts
- name: Check Mod
run: |
sudo apt-get install lua5.1
make check-scripts
make TREAT_WARNINGS_AS_ERRORS=true test
linux-mono:
name: Linux (mono)
runs-on: ubuntu-22.04

steps:
- name: Clone Repository
uses: actions/checkout@v3

- name: Prepare Environment
run: |
. mod.config;
awk '/\r$$/ { exit(1); }' mod.config || (printf "Invalid mod.config format. File must be saved using unix-style (LF, not CRLF or CR) line endings.\n"; exit 1);
- name: Check Code
run: |
# check-packaging-scripts does not depend on .net/mono, so is not needed here
mono --version
make RUNTIME=mono check
- name: Check Mod
run: |
# check-scripts does not depend on .net/mono, so is not needed here
make RUNTIME=mono TREAT_WARNINGS_AS_ERRORS=true test
windows:
name: Windows (.NET 6.0)
runs-on: windows-2019

steps:
- name: Clone Repository
uses: actions/checkout@v3

- name: Install .NET 6.0
uses: actions/setup-dotnet@v3
with:
dotnet-version: '6.0.x'

- name: Check Code
shell: powershell
run: |
# Work around runtime failures on the GH Actions runner
dotnet nuget add source https://api.nuget.org/v3/index.json -n nuget.org
.\make.ps1 check
- name: Check Mods
run: |
choco install lua --version 5.1.5.52
$ENV:Path = $ENV:Path + ";C:\Program Files (x86)\Lua\5.1\"
$ENV:TREAT_WARNINGS_AS_ERRORS = "true"
.\make.ps1 check-scripts
.\make.ps1 test
9 changes: 9 additions & 0 deletions .vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"recommendations": [
"EditorConfig.EditorConfig",
"ms-dotnettools.csharp",
"openra.oraide-vscode",
"openra.vscode-openra-lua",
"macabeus.vscode-fluent",
]
}
30 changes: 30 additions & 0 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
{
"version": "0.2.0",
"configurations": [
{
"name": "Launch (Example)",
"type": "coreclr",
"request": "launch",
"program": "${workspaceRoot}/engine/bin/OpenRA.dll",
"args": [
"Game.Mod=example",
"Engine.EngineDir=${workspaceRoot}/engine",
"Engine.ModSearchPaths=${workspaceRoot}/mods, ${workspaceRoot}/engine/mods",
"Debug.DisplayDeveloperSettings=true",
],
"preLaunchTask": "build",
},
{
"name": "Launch Utility",
"type": "coreclr",
"request": "launch",
"program": "${workspaceRoot}/engine/bin/OpenRA.Utility.dll",
"args": ["example", "--check-yaml"],
"env": {
"ENGINE_DIR": "${workspaceRoot}/engine",
"MOD_SEARCH_PATHS": "${workspaceRoot}/mods, ${workspaceRoot}/engine/mods"
},
"preLaunchTask": "build",
},
],
}
37 changes: 37 additions & 0 deletions .vscode/tasks.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
{
"version": "2.0.0",
"tasks": [
{
"label": "build",
"command": "make",
"args": ["all", "CONFIGURATION=Debug"],
"windows": {
"command": "make.cmd"
}
},
{
"label": "Run Utility",
"command": "dotnet ${workspaceRoot}/engine/bin/OpenRA.Utility.dll ${input:modId} ${input:command}",
"type": "shell",
"options": {
"env": {
"ENGINE_DIR": "${workspaceRoot}/engine",
"MOD_SEARCH_PATHS": "${workspaceRoot}/mods,${workspaceRoot}/engine/mods"
}
}
}
],
"inputs": [
{
"id": "modId",
"description": "ID of the mod to run",
"default": "all",
"type": "promptString"
}, {
"id": "command",
"description": "Name of the command + parameters",
"default": "",
"type": "promptString"
},
]
}
4 changes: 2 additions & 2 deletions OpenRA.Mods.Dr/Graphics/DrSpriteSequence.cs
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,8 @@ public DrSpriteSequence(ModData modData, string tileSet, SpriteCache cache, ISpr

public override Sprite GetSprite(int frame, WAngle facing)
{
if (facing.Facing >= 245 && facing.Facing <= 250) // receiving a facing of 320 when unloading an APC
facing = WAngle.Zero;
//if (facing.Facing >= 245 && facing.Facing <= 250) // receiving a facing of 320 when unloading an APC
// facing = WAngle.Zero;

Check failure on line 61 in OpenRA.Mods.Dr/Graphics/DrSpriteSequence.cs

View workflow job for this annotation

GitHub Actions / Windows (.NET 6.0)

Single-line comments should not be followed by blank line (https://github.com/DotNetAnalyzers/StyleCopAnalyzers/blob/master/documentation/SA1512.md)

return base.GetSprite(frame, facing);
}
Expand Down
3 changes: 2 additions & 1 deletion OpenRA.Mods.Dr/Traits/Render/SeaTileSplashesOverlay.cs
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,8 @@ void UpdateSpriteLayers(CPos cell, ISpriteSequence sequence, int frame, PaletteR

void IRenderOverlay.Render(WorldRenderer wr)
{
spriteLayer.Draw(wr.Viewport);
// TODO: Fix
//spriteLayer.Draw(wr.Viewport);
}
}
}
17 changes: 17 additions & 0 deletions mods/common/chrome/ingame-debug-hpf.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
Container@HPF_OVERLAY:
Logic: HierarchicalPathFinderOverlayLogic
Width: PARENT_RIGHT
Height: 60
Children:
DropDownButton@HPF_OVERLAY_LOCOMOTOR:
Y: PARENT_TOP
Width: PARENT_RIGHT
Height: 25
Text: Select Locomotor
Font: Regular
DropDownButton@HPF_OVERLAY_CHECK:
Y: PARENT_TOP + 35
Width: PARENT_RIGHT
Height: 25
Text: Select BlockedByActor
Font: Regular
Loading

0 comments on commit 59d7177

Please sign in to comment.