Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update mod to release-20231010. #208

Merged
merged 3 commits into from
Oct 12, 2023
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
843 changes: 774 additions & 69 deletions .editorconfig

Large diffs are not rendered by default.

10 changes: 7 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ on:
push:
pull_request:

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

jobs:
linux:
name: Linux (.NET 6.0)
Expand Down Expand Up @@ -32,7 +35,7 @@ jobs:
run: |
sudo apt-get install lua5.1
make check-scripts
make test
make TREAT_WARNINGS_AS_ERRORS=true test

linux-mono:
name: Linux (mono)
Expand All @@ -56,7 +59,7 @@ jobs:
- name: Check Mod
run: |
# check-scripts does not depend on .net/mono, so is not needed here
make RUNTIME=mono test
make RUNTIME=mono TREAT_WARNINGS_AS_ERRORS=true test

windows:
name: Windows (.NET 6.0)
Expand All @@ -80,7 +83,8 @@ jobs:

- name: Check Mods
run: |
chocolatey install lua --version 5.1.5.52
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
3 changes: 3 additions & 0 deletions .github/workflows/packaging.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@ on:
tags:
- '*'

permissions:
contents: write # for release creation (svenstaro/upload-release-action)

jobs:
linux:
name: Linux AppImages
Expand Down
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"
},
]
}
13 changes: 6 additions & 7 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# to compile, run:
# make
#
# to compile using Mono (version 6.4 or greater) instead of .NET 6, run:
# to compile using Mono (version 6.12 or greater) instead of .NET 6, run:
# make RUNTIME=mono
#
# to compile using system libraries for native dependencies, run:
Expand All @@ -22,7 +22,7 @@
# make [RUNTIME=net6] check
#
# to check your mod yaml for errors, run:
# make [RUNTIME=net6] test
# make [RUNTIME=net6] [TREAT_WARNINGS_AS_ERRORS=false] test
#
# the following are internal sdk helpers that are not intended to be run directly:
# make check-variables
Expand Down Expand Up @@ -145,7 +145,7 @@ engine: check-variables check-sdk-scripts

all: engine
ifeq ($(RUNTIME), mono)
@command -v $(MSBUILD) >/dev/null || (echo "OpenRA requires the '$(MSBUILD)' tool provided by Mono >= 6.4."; exit 1)
@command -v $(MSBUILD) >/dev/null || (echo "OpenRA requires the '$(MSBUILD)' tool provided by Mono >= 6.12."; exit 1)
ifneq ("$(MOD_SOLUTION_FILES)","")
@find . -maxdepth 1 -name '*.sln' -exec $(MSBUILD) -t:Build -restore -p:Configuration=${CONFIGURATION} -p:TargetPlatform=$(TARGETPLATFORM) -p:Mono=true \;
endif
Expand Down Expand Up @@ -181,11 +181,10 @@ check: engine
ifneq ("$(MOD_SOLUTION_FILES)","")
@echo "Compiling in Debug mode..."
ifeq ($(RUNTIME), mono)
# Enabling EnforceCodeStyleInBuild and GenerateDocumentationFile as a workaround for some code style rules (in particular IDE0005) being bugged and not reporting warnings/errors otherwise.
@$(MSBUILD) -t:build -restore -p:Configuration=Debug -warnaserror -p:TargetPlatform=$(TARGETPLATFORM) -p:Mono=true -p:EnforceCodeStyleInBuild=true -p:GenerateDocumentationFile=true
@$(MSBUILD) -t:clean\;build -restore -p:Configuration=Debug -warnaserror -p:TargetPlatform=$(TARGETPLATFORM)
else
# Enabling EnforceCodeStyleInBuild and GenerateDocumentationFile as a workaround for some code style rules (in particular IDE0005) being bugged and not reporting warnings/errors otherwise.
@$(DOTNET) build -c Debug -nologo -warnaserror -p:TargetPlatform=$(TARGETPLATFORM) -p:EnforceCodeStyleInBuild=true -p:GenerateDocumentationFile=true
@$(DOTNET) clean -c Debug --nologo --verbosity minimal
@$(DOTNET) build -c Debug -nologo -warnaserror -p:TargetPlatform=$(TARGETPLATFORM)
endif
endif
@echo "Checking for explicit interface violations..."
Expand Down
5 changes: 3 additions & 2 deletions launch-dedicated.cmd
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
@echo on

set Name="Dedicated Server"
set Map=""
set ListenPort=1234
set AdvertiseOnline=True
set Password=""
Expand All @@ -18,7 +19,7 @@ set EnableGeoIP=True
set EnableLintChecks=True
set ShareAnonymizedIPs=True

set JoinChatDelay=5000
set FloodLimitJoinCooldown=5000

@echo off
setlocal EnableDelayedExpansion
Expand All @@ -37,7 +38,7 @@ if not exist %ENGINE_DIRECTORY%\bin\OpenRA.exe goto noengine
cd %ENGINE_DIRECTORY%

:loop
bin\OpenRA.Server.exe Game.Mod=%MOD_ID% Engine.EngineDir=".." Server.Name=%Name% Server.ListenPort=%ListenPort% Server.AdvertiseOnline=%AdvertiseOnline% Server.EnableSingleplayer=%EnableSingleplayer% Server.Password=%Password% Server.RequireAuthentication=%RequireAuthentication% Server.RecordReplays=%RecordReplays% Server.ProfileIDBlacklist=%ProfileIDBlacklist% Server.ProfileIDWhitelist=%ProfileIDWhitelist% Server.EnableSyncReports=%EnableSyncReports% Server.EnableGeoIP=%EnableGeoIP% Server.ShareAnonymizedIPs=%ShareAnonymizedIPs% Server.EnableLintChecks=%EnableLintChecks% Engine.SupportDir=%SupportDir% Server.JoinChatDelay=%JoinChatDelay%
bin\OpenRA.Server.exe Game.Mod=%MOD_ID% Engine.EngineDir=".." Server.Name=%Name% Server.Map=%Map% Server.ListenPort=%ListenPort% Server.AdvertiseOnline=%AdvertiseOnline% Server.EnableSingleplayer=%EnableSingleplayer% Server.Password=%Password% Server.RequireAuthentication=%RequireAuthentication% Server.RecordReplays=%RecordReplays% Server.ProfileIDBlacklist=%ProfileIDBlacklist% Server.ProfileIDWhitelist=%ProfileIDWhitelist% Server.EnableSyncReports=%EnableSyncReports% Server.EnableGeoIP=%EnableGeoIP% Server.ShareAnonymizedIPs=%ShareAnonymizedIPs% Server.EnableLintChecks=%EnableLintChecks% Engine.SupportDir=%SupportDir% Server.FloodLimitJoinCooldown=%FloodLimitJoinCooldown%
goto loop

:noengine
Expand Down
38 changes: 20 additions & 18 deletions launch-dedicated.sh
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ fi

NAME="${Name:-"Dedicated Server"}"
LAUNCH_MOD="${Mod:-"${MOD_ID}"}"
MAP="${Map:-""}"
LISTEN_PORT="${ListenPort:-"1234"}"
ADVERTISE_ONLINE="${AdvertiseOnline:-"True"}"
PASSWORD="${Password:-""}"
Expand All @@ -65,7 +66,7 @@ ENABLE_GEOIP="${EnableGeoIP:-"True"}"
ENABLE_LINT_CHECKS="${EnableLintChecks:-"True"}"
SHARE_ANONYMISED_IPS="${ShareAnonymizedIPs:-"True"}"

JOIN_CHAT_DELAY="${JoinChatDelay:-"5000"}"
FLOOD_LIMIT_JOIN_COOLDOWN="${FloodLimitJoinCooldown:-"5000"}"

SUPPORT_DIR="${SupportDir:-""}"

Expand All @@ -79,21 +80,22 @@ fi
cd "${ENGINE_DIRECTORY}"

while true; do
MOD_SEARCH_PATHS="${MOD_SEARCH_PATHS}"
${RUNTIME_LAUNCHER} bin/OpenRA.Server.dll Engine.EngineDir=".." Game.Mod="${LAUNCH_MOD}" \
Server.Name="${NAME}" \
Server.ListenPort="${LISTEN_PORT}" \
Server.AdvertiseOnline="${ADVERTISE_ONLINE}" \
Server.Password="${PASSWORD}" \
Server.RecordReplays="${RECORD_REPLAYS}" \
Server.RequireAuthentication="${REQUIRE_AUTHENTICATION}" \
Server.ProfileIDBlacklist="${PROFILE_ID_BLACKLIST}" \
Server.ProfileIDWhitelist="${PROFILE_ID_WHITELIST}" \
Server.EnableSingleplayer="${ENABLE_SINGLE_PLAYER}" \
Server.EnableSyncReports="${ENABLE_SYNC_REPORTS}" \
Server.EnableGeoIP="${ENABLE_GEOIP}" \
Server.EnableLintChecks="${ENABLE_LINT_CHECKS}" \
Server.ShareAnonymizedIPs="${SHARE_ANONYMISED_IPS}" \
Server.JoinChatDelay="${JOIN_CHAT_DELAY}" \
Engine.SupportDir="${SUPPORT_DIR}"
MOD_SEARCH_PATHS="${MOD_SEARCH_PATHS}" \
${RUNTIME_LAUNCHER} bin/OpenRA.Server.dll Engine.EngineDir=".." Game.Mod="${LAUNCH_MOD}" \
Server.Name="${NAME}" \
Server.Map="${MAP}" \
Server.ListenPort="${LISTEN_PORT}" \
Server.AdvertiseOnline="${ADVERTISE_ONLINE}" \
Server.Password="${PASSWORD}" \
Server.RecordReplays="${RECORD_REPLAYS}" \
Server.RequireAuthentication="${REQUIRE_AUTHENTICATION}" \
Server.ProfileIDBlacklist="${PROFILE_ID_BLACKLIST}" \
Server.ProfileIDWhitelist="${PROFILE_ID_WHITELIST}" \
Server.EnableSingleplayer="${ENABLE_SINGLE_PLAYER}" \
Server.EnableSyncReports="${ENABLE_SYNC_REPORTS}" \
Server.EnableGeoIP="${ENABLE_GEOIP}" \
Server.EnableLintChecks="${ENABLE_LINT_CHECKS}" \
Server.ShareAnonymizedIPs="${SHARE_ANONYMISED_IPS}" \
Server.FloodLimitJoinCooldown="${FLOOD_LIMIT_JOIN_COOLDOWN}" \
Engine.SupportDir="${SUPPORT_DIR}"
done
5 changes: 3 additions & 2 deletions make.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -118,8 +118,9 @@ function Check-Command

Write-Host "Compiling $modID in Debug configuration..." -ForegroundColor Cyan

# Enabling EnforceCodeStyleInBuild and GenerateDocumentationFile as a workaround for some code style rules (in particular IDE0005) being bugged and not reporting warnings/errors otherwise.
dotnet build -c Debug --nologo -warnaserror -p:TargetPlatform=win-x64 -p:EnforceCodeStyleInBuild=true -p:GenerateDocumentationFile=true
dotnet clean -c Debug --nologo --verbosity minimal
dotnet build -c Debug --nologo -warnaserror -p:TargetPlatform=win-x64

if ($lastexitcode -ne 0)
{
Write-Host "Build failed." -ForegroundColor Red
Expand Down
4 changes: 2 additions & 2 deletions mod.config
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
MOD_ID="raclassic"

# The OpenRA engine version to use for this project.
ENGINE_VERSION="release-20230225"
ENGINE_VERSION="release-20231010"

##############################################################################
# Packaging
Expand Down Expand Up @@ -89,7 +89,7 @@ PACKAGING_WINDOWS_LICENSE_FILE="./COPYING"

# Space delimited list of additional files/directories to copy from the engine directory
# when packaging your mod. e.g. "./mods/modcontent"
PACKAGING_COPY_ENGINE_FILES="./mods/modcontent"
PACKAGING_COPY_ENGINE_FILES="./mods/modcontent ./mods/common ./mods/ra/chrome ./mods/ra/installer"

# Overwrite the version in mod.yaml with the tag used for the SDK release
# Accepts values "True" or "False".
Expand Down
37 changes: 0 additions & 37 deletions mods/raclassic/chrome/gamesave-loading.yaml

This file was deleted.

Loading