Skip to content

Commit

Permalink
Merge branch 'fixservercrashonstarttmatch' into feature/ReadyTag
Browse files Browse the repository at this point in the history
  • Loading branch information
TheR00st3r committed Jan 7, 2025
2 parents 7e1584c + ee8ed27 commit aa161ed
Show file tree
Hide file tree
Showing 21 changed files with 62 additions and 63 deletions.
38 changes: 19 additions & 19 deletions Docs/source/admin/quickstart.rst

Large diffs are not rendered by default.

8 changes: 4 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ install-counterstrikesharp:
install-counterstrikesharp-docker:
docker run --rm --interactive \
-v $(currentDir):/app \
mcr.microsoft.com/dotnet/sdk:7.0 /bin/sh -c " \
mcr.microsoft.com/dotnet/sdk:8.0 /bin/sh -c " \
apt-get update && apt-get install jq unzip -y; \
mkdir -p /app/cs2/game/csgo/addons/; \
wget -q -O /app/counterstrikesharp.zip $(shell curl -s -L -H "Accept: application/vnd.github+json" https://api.github.com/repos/roflmuffin/CounterStrikeSharp/releases/tags/$(shell dotnet list PugSharp/PugSharp.csproj package --format json | jq -r '.projects[].frameworks[].topLevelPackages[] | select(.id == "CounterStrikeSharp.API") | .resolvedVersion' | sed 's|1.0.|v|g') | jq -r '.assets.[] | select(.browser_download_url | test("with-runtime.*linux")) | .browser_download_url'); \
Expand Down Expand Up @@ -109,18 +109,18 @@ build-release:
build-debug-docker:
docker run --rm --interactive \
-v $(currentDir):/app \
mcr.microsoft.com/dotnet/sdk:7.0 /bin/sh -c " \
mcr.microsoft.com/dotnet/sdk:8.0 /bin/sh -c " \
cd /app && dotnet publish -c debug; chown -R $(user) /app"

build-release-docker:
docker run --rm --interactive \
-v $(currentDir):/app \
mcr.microsoft.com/dotnet/sdk:7.0 /bin/sh -c " \
mcr.microsoft.com/dotnet/sdk:8.0 /bin/sh -c " \
cd /app && dotnet publish -c release; chown -R $(user) /app"

copy-pugsharp:
mkdir -p $(currentDir)/cs2/game/csgo/addons/counterstrikesharp/plugins/PugSharp
cp -rf $(currentDir)/PugSharp/bin/Debug/net7.0/publish/* $(currentDir)/cs2/game/csgo/addons/counterstrikesharp/plugins/PugSharp
cp -rf $(currentDir)/PugSharp/bin/Debug/net8.0/publish/* $(currentDir)/cs2/game/csgo/addons/counterstrikesharp/plugins/PugSharp

copy-pugsharp-sample-configs:
mkdir -p $(currentDir)/cs2/game/csgo/cfg
Expand Down
2 changes: 1 addition & 1 deletion PugSharp.Api.Contract/PugSharp.Api.Contract.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
</ItemGroup>

<ItemGroup>
<PackageReference Update="Meziantou.Analyzer" Version="2.0.177">
<PackageReference Update="Meziantou.Analyzer" Version="2.0.182">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
</PackageReference>
Expand Down
2 changes: 1 addition & 1 deletion PugSharp.Api.G5Api.Tests/PugSharp.Api.G5Api.Tests.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
</ItemGroup>

<ItemGroup>
<PackageReference Update="Meziantou.Analyzer" Version="2.0.177">
<PackageReference Update="Meziantou.Analyzer" Version="2.0.182">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
</PackageReference>
Expand Down
2 changes: 1 addition & 1 deletion PugSharp.Api.G5Api/PugSharp.Api.G5Api.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
</ItemGroup>

<ItemGroup>
<PackageReference Update="Meziantou.Analyzer" Version="2.0.177">
<PackageReference Update="Meziantou.Analyzer" Version="2.0.182">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
</PackageReference>
Expand Down
2 changes: 1 addition & 1 deletion PugSharp.Api.Json/PugSharp.Api.Json.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
</ItemGroup>

<ItemGroup>
<PackageReference Update="Meziantou.Analyzer" Version="2.0.177">
<PackageReference Update="Meziantou.Analyzer" Version="2.0.182">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
</PackageReference>
Expand Down
2 changes: 1 addition & 1 deletion PugSharp.ApiStats/PugSharp.ApiStats.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
</ItemGroup>

<ItemGroup>
<PackageReference Update="Meziantou.Analyzer" Version="2.0.177">
<PackageReference Update="Meziantou.Analyzer" Version="2.0.182">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
</PackageReference>
Expand Down
2 changes: 1 addition & 1 deletion PugSharp.Config/PugSharp.Config.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
</ItemGroup>

<ItemGroup>
<PackageReference Update="Meziantou.Analyzer" Version="2.0.177">
<PackageReference Update="Meziantou.Analyzer" Version="2.0.182">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
</PackageReference>
Expand Down
4 changes: 2 additions & 2 deletions PugSharp.Config/Team.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@ namespace PugSharp.Config;
public class Team
{
[JsonPropertyName("id")]
public required string Id { get; set; } = Ulid.NewUlid().ToString();
public string Id { get; set; } = Ulid.NewUlid().ToString();

[JsonPropertyName("name")]
public required string Name { get; set; } = string.Empty;
public string Name { get; set; } = string.Empty;

[JsonPropertyName("tag")]
public string Tag { get; init; } = string.Empty;
Expand Down
2 changes: 1 addition & 1 deletion PugSharp.DebugDummy/PugSharp.DebugDummy.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
</ItemGroup>

<ItemGroup>
<PackageReference Update="Meziantou.Analyzer" Version="2.0.177">
<PackageReference Update="Meziantou.Analyzer" Version="2.0.182">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
</PackageReference>
Expand Down
2 changes: 1 addition & 1 deletion PugSharp.Match.Contract/PugSharp.Match.Contract.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
</ItemGroup>

<ItemGroup>
<PackageReference Update="Meziantou.Analyzer" Version="2.0.177">
<PackageReference Update="Meziantou.Analyzer" Version="2.0.182">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
</PackageReference>
Expand Down
2 changes: 1 addition & 1 deletion PugSharp.Match.Tests/PugSharp.Match.Tests.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
</ItemGroup>

<ItemGroup>
<PackageReference Update="Meziantou.Analyzer" Version="2.0.177">
<PackageReference Update="Meziantou.Analyzer" Version="2.0.182">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
</PackageReference>
Expand Down
2 changes: 1 addition & 1 deletion PugSharp.Match/PugSharp.Match.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
</ItemGroup>

<ItemGroup>
<PackageReference Update="Meziantou.Analyzer" Version="2.0.177">
<PackageReference Update="Meziantou.Analyzer" Version="2.0.182">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
</PackageReference>
Expand Down
2 changes: 1 addition & 1 deletion PugSharp.Server.Contract/PugSharp.Server.Contract.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
</ItemGroup>

<ItemGroup>
<PackageReference Update="Meziantou.Analyzer" Version="2.0.177">
<PackageReference Update="Meziantou.Analyzer" Version="2.0.182">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
</PackageReference>
Expand Down
2 changes: 1 addition & 1 deletion PugSharp.Shared/PugSharp.Shared.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
</ItemGroup>

<ItemGroup>
<PackageReference Update="Meziantou.Analyzer" Version="2.0.177">
<PackageReference Update="Meziantou.Analyzer" Version="2.0.182">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
</PackageReference>
Expand Down
4 changes: 2 additions & 2 deletions PugSharp.Tests/PugSharp.Tests.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="CounterStrikeSharp.API" Version="1.0.286" />
<PackageReference Include="CounterStrikeSharp.API" Version="1.0.296" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.11.1" />
<PackageReference Include="NSubstitute" Version="5.3.0" />
<PackageReference Include="xunit" Version="2.9.2" />
Expand Down Expand Up @@ -37,7 +37,7 @@
</ItemGroup>

<ItemGroup>
<PackageReference Update="Meziantou.Analyzer" Version="2.0.177">
<PackageReference Update="Meziantou.Analyzer" Version="2.0.182">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
</PackageReference>
Expand Down
2 changes: 1 addition & 1 deletion PugSharp.Translation/PugSharp.Translation.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
</ItemGroup>

<ItemGroup>
<PackageReference Update="Meziantou.Analyzer" Version="2.0.177">
<PackageReference Update="Meziantou.Analyzer" Version="2.0.182">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
</PackageReference>
Expand Down
4 changes: 2 additions & 2 deletions PugSharp/PugSharp.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="CounterStrikeSharp.API" Version="1.0.286">
<PackageReference Include="CounterStrikeSharp.API" Version="1.0.296">
<PrivateAssets>none</PrivateAssets>
<ExcludeAssets>runtime</ExcludeAssets>
<IncludeAssets>compile; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
Expand All @@ -29,7 +29,7 @@
</ItemGroup>

<ItemGroup>
<PackageReference Update="Meziantou.Analyzer" Version="2.0.177">
<PackageReference Update="Meziantou.Analyzer" Version="2.0.182">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
</PackageReference>
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,6 @@ If you want to know how to use PugSharp, hop over to our [Documentation](https:/
- Plugin Framework: [CounterStrikeSharp by roflmuffin](https://github.com/roflmuffin/CounterStrikeSharp)
- Docker test setup: [joedwards32/cs2](https://github.com/joedwards32/CS2)
- Metamod fix script: [ghostcap-gaming/cs2-metamod-re-enable-script](https://github.com/ghostcap-gaming/cs2-metamod-re-enable-script)
- Metamod: https://www.sourcemm.net/
- Metamod: https://www.metamodsource.net/
- Version detection stolen (and modified) with permission from [CS2-AutoUpdater](https://github.com/dran1x/CS2-AutoUpdater)

38 changes: 19 additions & 19 deletions install-windows.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -34,26 +34,26 @@ Invoke-WebRequest "https://mms.alliedmods.net/mmsdrop/2.0/$latestMM" -OutFile "$
Write-Output "Extract MetaMod Version $latestMM"
Expand-Archive "$TARGET_DIR\latestMM.zip" -DestinationPath $TARGET_DIR -Force

Write-Output "Fix GameInfo"
if (Test-Path $GAMEINFO_FILE) {
$NEW_ENTRY = " Game csgo/addons/metamod"
$SEL = Select-String -Path $GAMEINFO_FILE -Pattern $NEW_ENTRY
if ($SEL -ne $null) {
Write-Output "The entry '$NEW_ENTRY' already exists in $GAMEINFO_FILE. No changes were made."
}
else {
(Get-Content $GAMEINFO_FILE) |
Foreach-Object {
$_ # send the current line to output
if ($_ -match "Game_LowViolence") {
#Add Lines after the selected pattern
$NEW_ENTRY
}
} | Set-Content $GAMEINFO_FILE
# Write-Output "Fix GameInfo"
# if (Test-Path $GAMEINFO_FILE) {
# $NEW_ENTRY = " Game csgo/addons/metamod"
# $SEL = Select-String -Path $GAMEINFO_FILE -Pattern $NEW_ENTRY
# if ($SEL -ne $null) {
# Write-Output "The entry '$NEW_ENTRY' already exists in $GAMEINFO_FILE. No changes were made."
# }
# else {
# (Get-Content $GAMEINFO_FILE) |
# Foreach-Object {
# $_ # send the current line to output
# if ($_ -match "Game_LowViolence") {
# #Add Lines after the selected pattern
# $NEW_ENTRY
# }
# } | Set-Content $GAMEINFO_FILE

Write-Output "The file $GAMEINFO_FILE has been modified successfully. '$NEW_ENTRY' has been added."
}
}
# Write-Output "The file $GAMEINFO_FILE has been modified successfully. '$NEW_ENTRY' has been added."
# }
# }

Write-Output "Install CounterStrikeSharp"

Expand Down
1 change: 0 additions & 1 deletion resources/cfg/PugSharp/live.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,6 @@ spec_freeze_time_lock 2
spec_replay_enable 0
sv_allow_votes 0
sv_auto_full_alltalk_during_warmup_half_end 0
sv_coaching_enabled 1
sv_competitive_official_5v5 1
sv_damage_print_enable 0
sv_deadtalk 1
Expand Down

0 comments on commit aa161ed

Please sign in to comment.