-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
11 changed files
with
244 additions
and
327 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,41 +1,39 @@ | ||
name: Build | ||
|
||
name: CI Build | ||
on: | ||
push: | ||
branches: | ||
- master | ||
pull_request: | ||
branches: | ||
- master | ||
- dev | ||
workflow_dispatch: | ||
|
||
env: | ||
REFERENCES_URL: https://misaka-zerotwo.github.io/SL-References/Dev.zip | ||
REFERENCES_PATH: ${{ github.workspace }}/References | ||
jobs: | ||
|
||
build: | ||
|
||
runs-on: windows-latest | ||
|
||
steps: | ||
|
||
- name: Setup .NET | ||
uses: actions/[email protected] | ||
|
||
- name: Checkout | ||
uses: actions/[email protected] | ||
|
||
- name: Restore projects | ||
run: dotnet restore CustomUnit | ||
|
||
- name: Build | ||
env: | ||
EXILED_REFERENCES: D:\a\CustomUnit\CustomUnit\.github\workflows\Refs | ||
shell: pwsh | ||
run: dotnet build CustomUnit -c release | ||
|
||
- name: Upload artifacts | ||
uses: actions/upload-artifact@v2 | ||
with: | ||
name: Build Results | ||
path: bin/Release | ||
|
||
- name: Setup .NET Core SDK | ||
uses: actions/setup-dotnet@v3 | ||
|
||
- uses: actions/[email protected] | ||
|
||
- name: Restore Packages | ||
run: nuget restore | ||
|
||
- name: Get Build References | ||
shell: pwsh | ||
run: | | ||
Invoke-WebRequest -Uri ${{ env.REFERENCES_URL }} -OutFile ${{ github.workspace }}/Dev.zip | ||
Expand-Archive -Path Dev.zip -DestinationPath ${{ env.REFERENCES_PATH }} | ||
- name: Setup MSBuild.exe | ||
uses: microsoft/Setup-MSBuild@v1 | ||
env: | ||
ACTIONS_ALLOW_UNSECURE_COMMANDS: 'true' | ||
|
||
- name: Build | ||
run: | | ||
msbuild CustomUnit\CustomUnit.csproj -t:rebuild -property:Configuration=Release -property:ReferencePath="${{ env.REFERENCES_PATH }}" | ||
- name: Upload artifacts | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: Build Result | ||
path: "CustomUnit/bin/Release/CustomUnit.dll" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,20 @@ | ||
using System.ComponentModel; | ||
using MapGeneration; | ||
|
||
namespace CustomUnit.Additions; | ||
|
||
public struct RoomSpawnPoint | ||
namespace CustomUnit.Additions | ||
{ | ||
public RoomSpawnPoint(RoomName roomName, int chance) | ||
public struct RoomSpawnPoint | ||
{ | ||
RoomName = roomName; | ||
Chance = chance; | ||
} | ||
public RoomSpawnPoint(RoomName roomName, int chance) | ||
{ | ||
RoomName = roomName; | ||
Chance = chance; | ||
} | ||
|
||
[Description("The room name")] | ||
public RoomName RoomName { get; } | ||
[Description("The room name")] | ||
public RoomName RoomName { get; } | ||
|
||
[Description("The chance to spawn unit there")] | ||
public float Chance { get; } | ||
[Description("The chance to spawn unit there")] | ||
public float Chance { get; } | ||
} | ||
} |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,17 @@ | ||
using UnityEngine; | ||
|
||
namespace CustomUnit.Additions; | ||
|
||
public struct SpawnPosition | ||
namespace CustomUnit.Additions | ||
{ | ||
public SpawnPosition(Vector3 position, float chance) | ||
public struct SpawnPosition | ||
{ | ||
Position = position; | ||
Chance = chance; | ||
} | ||
public SpawnPosition(Vector3 position, float chance) | ||
{ | ||
Position = position; | ||
Chance = chance; | ||
} | ||
|
||
public Vector3 Position { get; } | ||
public Vector3 Position { get; } | ||
|
||
public float Chance { get; } | ||
public float Chance { get; } | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.