Showing with 21 additions and 11 deletions.
  1. +3 −9 .github/actions/init/action.yml
  2. +7 −0 CHANGELOG.md
  3. +2 −0 README.md
  4. +9 −2 Template/Template.csproj
12 changes: 3 additions & 9 deletions .github/actions/init/action.yml
Expand Up @@ -18,15 +18,9 @@ runs:
shell: bash
run: dotnet restore

- name: Setup Netcode Patcher
id: setup-netcode-patcher
uses: Lordfirespeed/setup-netcode-patcher@v0
with:
netcode-patcher-version: 2.4.0
# https://www.nuget.org/packages/LethalCompany.GameLibs.Steam
# Must be the same version as the one used in the project
deps-packages: '[{"id": "UnityEngine.Modules", "version": "2022.3.9"}, {"id": "LethalCompany.GameLibs.Steam", "version": "49.0.0-alpha.1"}]'
target-framework: "netstandard2.1"
- name: Install NetcodePatcher
shell: bash
run: dotnet tool install -g evaisa.netcodepatcher.cli

- name: Install Thunderstore client
if: ${{ inputs.thunderstore-client == 'true' }}
Expand Down
7 changes: 7 additions & 0 deletions CHANGELOG.md
@@ -1,5 +1,12 @@
# Changelog

## [1.0.2](https://github.com/Distractic/LethalCompanyTemplate/compare/v1.0.1...v1.0.2) (2024-01-21)


### Bug Fixes

* Replace NetcodePatcher action with MSBuild ([#17](https://github.com/Distractic/LethalCompanyTemplate/issues/17)) ([e156fde](https://github.com/Distractic/LethalCompanyTemplate/commit/e156fde522acc1fdd21dd255511caec639a4e557))

## [1.0.1](https://github.com/Distractic/LethalCompanyTemplate/compare/v1.0.0...v1.0.1) (2024-01-20)


Expand Down
2 changes: 2 additions & 0 deletions README.md
@@ -1,5 +1,7 @@
# LethalCompanyTemplate

[![](https://img.shields.io/badge/YourThunderstoreTeam-Template-blue?logo=thunderstore)](https://thunderstore.io/c/lethal-company/p/YourThunderstoreTeam/Template/)

Template to create Lethal Company plugins.

If you want to create your own plugin with this template, check the [wiki](https://github.com/Distractic/LethalCompanyTemplate/wiki).
11 changes: 9 additions & 2 deletions Template/Template.csproj
Expand Up @@ -32,6 +32,13 @@
<PackageReference Include="UnityEngine.Modules" Version="2022.3.9" IncludeAssets="compile"/>
</ItemGroup>

<!-- https://github.com/EvaisaDev/UnityNetcodePatcher#usage-as-a-post-build-event -->
<!-- Syntax to use the tool installed globally -->
<!-- Allows to patch elements like networked behaviours, RPCs, etc. -->
<Target Name="NetcodePatch" AfterTargets="PostBuildEvent">
<Exec Command="netcode-patch &quot;$(TargetPath)&quot; @(ReferencePathWithRefAssemblies->'&quot;%(Identity)&quot;', ' ')"/>
</Target>

<!-- Avoid that the game's assemblies are copied to the plugin's target directory -->
<Target Name="ClearReferenceCopyLocalPaths" AfterTargets="ResolveAssemblyReferences">
<ItemGroup>
Expand All @@ -58,11 +65,11 @@

<!-- Build the plugin for Thunderstore publication -->
<!-- The command will create a zip file in the target directory using the thunderstore.toml file -->
<Target Condition="'$(BuildThunderstorePackage)' == 'true'" Name="ThunderstoreBuild" AfterTargets="PostBuildEvent" DependsOnTargets="MinVer">
<Target Condition="'$(BuildThunderstorePackage)' == 'true'" Name="ThunderstoreBuild" AfterTargets="PostBuildEvent" DependsOnTargets="MinVer;NetcodePatch">
<PropertyGroup>
<PluginVersion>$(MinVerMajor).$(MinVerMinor).$(MinVerPatch)</PluginVersion>
</PropertyGroup>
<!-- https://github.com/thunderstore-io/thunderstore-cli/wiki -->
<Exec Command="tcli build --config-path $(SolutionDir)thunderstore.toml --package-version $(PluginVersion)" />
<Exec Command="tcli build --config-path $(SolutionDir)thunderstore.toml --package-version $(PluginVersion)"/>
</Target>
</Project>