Skip to content
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
36 changes: 36 additions & 0 deletions .github/workflows/verify-build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: Verify Successful Build

on:
pull_request:
types:
- opened
- reopened
- synchronize
branches:
- bleeding-edge
- stable

jobs:
build:
name: Verify Successful Build
runs-on: ubuntu-latest

steps:
- name: Checkout Repo
uses: actions/checkout@v4

- name: Clone Game Assemblies
run: |
git clone https://x-access-token:${{ secrets.GH_PAT }}@github.com/KaBooMa/ScheduleOneAssemblies.git ./ScheduleOneAssemblies

- name: Setup .NET
uses: actions/setup-dotnet@v4

- name: Restore .NET Dependencies
run: dotnet restore

- name: Run .NET Build for Mono
run: dotnet build ./S1API/S1API.csproj -c Mono -f netstandard2.1

- name: Run .NET Build for Il2Cpp
run: dotnet build ./S1API/S1API.csproj -c Il2Cpp -f netstandard2.1
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,6 @@
obj/
bin/
*.user
*Assemblies/

# Local assembly references
ScheduleOneAssemblies/
3 changes: 2 additions & 1 deletion S1API/PhoneApp/PhoneApp.cs
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,12 @@
/// <summary>
/// Reference to the player object in the scene.
/// </summary>
protected GameObject Player;

Check warning on line 28 in S1API/PhoneApp/PhoneApp.cs

View workflow job for this annotation

GitHub Actions / Verify Successful Build

Non-nullable field 'Player' must contain a non-null value when exiting constructor. Consider declaring the field as nullable.

Check warning on line 28 in S1API/PhoneApp/PhoneApp.cs

View workflow job for this annotation

GitHub Actions / Verify Successful Build

Non-nullable field 'Player' must contain a non-null value when exiting constructor. Consider declaring the field as nullable.

/// <summary>
/// The actual app panel instance in the phone UI.
/// </summary>
protected GameObject AppPanel;

Check warning on line 33 in S1API/PhoneApp/PhoneApp.cs

View workflow job for this annotation

GitHub Actions / Verify Successful Build

Non-nullable field 'AppPanel' must contain a non-null value when exiting constructor. Consider declaring the field as nullable.

Check warning on line 33 in S1API/PhoneApp/PhoneApp.cs

View workflow job for this annotation

GitHub Actions / Verify Successful Build

Non-nullable field 'AppPanel' must contain a non-null value when exiting constructor. Consider declaring the field as nullable.

/// <summary>
/// Whether the app panel was created by this instance.
Expand Down Expand Up @@ -160,7 +160,8 @@
if (container.transform.childCount < 2)
{
ClearContainer(container);
BuildUI(container);
// TODO: (@omar-akermi) Looks like a method got relabeled. Need to resolve :(
// BuildUI(container);
}
}

Expand Down Expand Up @@ -188,7 +189,7 @@
return false;
}

Transform lastIcon = parent.transform.childCount > 0 ? parent.transform.GetChild(parent.transform.childCount - 1) : null;

Check warning on line 192 in S1API/PhoneApp/PhoneApp.cs

View workflow job for this annotation

GitHub Actions / Verify Successful Build

Converting null literal or possible null value to non-nullable type.

Check warning on line 192 in S1API/PhoneApp/PhoneApp.cs

View workflow job for this annotation

GitHub Actions / Verify Successful Build

Converting null literal or possible null value to non-nullable type.

Check warning on line 192 in S1API/PhoneApp/PhoneApp.cs

View workflow job for this annotation

GitHub Actions / Verify Successful Build

Converting null literal or possible null value to non-nullable type.

Check warning on line 192 in S1API/PhoneApp/PhoneApp.cs

View workflow job for this annotation

GitHub Actions / Verify Successful Build

Converting null literal or possible null value to non-nullable type.
if (lastIcon == null)
{
logger?.Error("No icon found to clone.");
Expand All @@ -199,7 +200,7 @@
iconObj.name = AppName;

Transform labelTransform = iconObj.transform.Find("Label");
Text label = labelTransform?.GetComponent<Text>();

Check warning on line 203 in S1API/PhoneApp/PhoneApp.cs

View workflow job for this annotation

GitHub Actions / Verify Successful Build

Converting null literal or possible null value to non-nullable type.

Check warning on line 203 in S1API/PhoneApp/PhoneApp.cs

View workflow job for this annotation

GitHub Actions / Verify Successful Build

Converting null literal or possible null value to non-nullable type.

Check warning on line 203 in S1API/PhoneApp/PhoneApp.cs

View workflow job for this annotation

GitHub Actions / Verify Successful Build

Converting null literal or possible null value to non-nullable type.

Check warning on line 203 in S1API/PhoneApp/PhoneApp.cs

View workflow job for this annotation

GitHub Actions / Verify Successful Build

Converting null literal or possible null value to non-nullable type.
if (label != null) label.text = labelText;

return ChangeAppIconImage(iconObj, fileName, logger);
Expand All @@ -211,7 +212,7 @@
private bool ChangeAppIconImage(GameObject iconObj, string filename, MelonLogger.Instance logger)
{
Transform imageTransform = iconObj.transform.Find("Mask/Image");
Image image = imageTransform?.GetComponent<Image>();

Check warning on line 215 in S1API/PhoneApp/PhoneApp.cs

View workflow job for this annotation

GitHub Actions / Verify Successful Build

Converting null literal or possible null value to non-nullable type.

Check warning on line 215 in S1API/PhoneApp/PhoneApp.cs

View workflow job for this annotation

GitHub Actions / Verify Successful Build

Converting null literal or possible null value to non-nullable type.
if (image == null)
{
logger?.Error("Image component not found in icon.");
Expand Down
64 changes: 34 additions & 30 deletions S1API/S1API.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -11,84 +11,88 @@
<!-- IL2CPP Specific Deps -->
<ItemGroup Condition="'$(Configuration)' == 'Il2Cpp'">
<Reference Include="Assembly-CSharp">
<HintPath>..\Il2CppAssemblies\Assembly-CSharp.dll</HintPath>
<HintPath>..\ScheduleOneAssemblies\Il2CppAssemblies\Assembly-CSharp.dll</HintPath>
</Reference>
<Reference Include="Il2CppInterop.Runtime">
<HintPath>..\..\..\..\..\Program Files (x86)\Steam\steamapps\common\Schedule I\MelonLoader\net6\Il2CppInterop.Runtime.dll</HintPath>
<HintPath>..\ScheduleOneAssemblies\MelonLoader\Il2CppInterop.Runtime.dll</HintPath>
</Reference>
<Reference Include="Il2CppInterop.Common">
<HintPath>..\..\..\..\..\Program Files (x86)\Steam\steamapps\common\Schedule I\MelonLoader\net6\Il2CppInterop.Common.dll</HintPath>
<HintPath>..\ScheduleOneAssemblies\MelonLoader\Il2CppInterop.Common.dll</HintPath>
</Reference>
<Reference Include="Il2CppInterop.HarmonySupport">
<HintPath>..\..\..\..\..\Program Files (x86)\Steam\steamapps\common\Schedule I\MelonLoader\net6\Il2CppInterop.HarmonySupport.dll</HintPath>
<HintPath>..\ScheduleOneAssemblies\MelonLoader\Il2CppInterop.HarmonySupport.dll</HintPath>
</Reference>
<Reference Include="Il2CppInterop.Generator">
<HintPath>..\..\..\..\..\Program Files (x86)\Steam\steamapps\common\Schedule I\MelonLoader\net6\Il2CppInterop.Generator.dll</HintPath>
<HintPath>..\ScheduleOneAssemblies\MelonLoader\Il2CppInterop.Generator.dll</HintPath>
</Reference>
<Reference Include="Il2CppFishNet.Runtime">
<HintPath>..\Il2CppAssemblies\Il2CppFishNet.Runtime.dll</HintPath>
<HintPath>..\ScheduleOneAssemblies\Il2CppAssemblies\Il2CppFishNet.Runtime.dll</HintPath>
</Reference>
<Reference Include="Il2Cppmscorlib">
<HintPath>..\Il2CppAssemblies\Il2Cppmscorlib.dll</HintPath>
<HintPath>..\ScheduleOneAssemblies\Il2CppAssemblies\Il2Cppmscorlib.dll</HintPath>
</Reference>
<Reference Include="UnityEngine">
<HintPath>..\IL2CppAssemblies\UnityEngine.dll</HintPath>
<HintPath>..\ScheduleOneAssemblies\Il2CppAssemblies\UnityEngine.dll</HintPath>
</Reference>
<Reference Include="UnityEngine.CoreModule">
<HintPath>..\IL2CppAssemblies\UnityEngine.CoreModule.dll</HintPath>
<HintPath>..\ScheduleOneAssemblies\Il2CppAssemblies\UnityEngine.CoreModule.dll</HintPath>
</Reference>
<Reference Include="UnityEngine.UI">
<HintPath>..\IL2CppAssemblies\UnityEngine.UI.dll</HintPath>
<HintPath>..\ScheduleOneAssemblies\Il2CppAssemblies\UnityEngine.UI.dll</HintPath>
</Reference>
<Reference Include="UnityEngine.UIModule">
<HintPath>..\IL2CppAssemblies\UnityEngine.UIModule.dll</HintPath>
<HintPath>..\ScheduleOneAssemblies\Il2CppAssemblies\UnityEngine.UIModule.dll</HintPath>
</Reference>
<Reference Include="UnityEngine.JSONSerializeModule">
<HintPath>..\Il2CppAssemblies\UnityEngine.JSONSerializeModule.dll</HintPath>
<HintPath>..\ScheduleOneAssemblies\Il2CppAssemblies\UnityEngine.JSONSerializeModule.dll</HintPath>
</Reference>
<Reference Include="UnityEngine.TextRenderingModule">
<HintPath>..\ScheduleOneAssemblies\Il2CppAssemblies\UnityEngine.TextRenderingModule.dll</HintPath>
</Reference>
<Reference Include="UnityEngine.ImageConversionModule">
<HintPath>..\ScheduleOneAssemblies\Il2CppAssemblies\UnityEngine.ImageConversionModule.dll</HintPath>
</Reference>
</ItemGroup>

<!-- Mono Specific Deps -->
<ItemGroup Condition="'$(Configuration)' == 'Mono'">
<Reference Include="Assembly-CSharp">
<HintPath>..\MonoAssemblies\Assembly-CSharp.dll</HintPath>
<HintPath>..\ScheduleOneAssemblies\Managed\Assembly-CSharp.dll</HintPath>
</Reference>
<Reference Include="UnityEngine">
<HintPath>..\MonoAssemblies\UnityEngine.dll</HintPath>
<HintPath>..\ScheduleOneAssemblies\Managed\UnityEngine.dll</HintPath>
</Reference>
<Reference Include="UnityEngine.CoreModule">
<HintPath>..\MonoAssemblies\UnityEngine.CoreModule.dll</HintPath>
<HintPath>..\ScheduleOneAssemblies\Managed\UnityEngine.CoreModule.dll</HintPath>
</Reference>
<Reference Include="FishNet.Runtime">
<HintPath>..\MonoAssemblies\FishNet.Runtime.dll</HintPath>
<HintPath>..\ScheduleOneAssemblies\Managed\FishNet.Runtime.dll</HintPath>
</Reference>
<Reference Include="UnityEngine.UI">
<HintPath>..\MonoAssemblies\UnityEngine.UI.dll</HintPath>
<HintPath>..\ScheduleOneAssemblies\Managed\UnityEngine.UI.dll</HintPath>
</Reference>
<Reference Include="UnityEngine.UIModule">
<HintPath>..\MonoAssemblies\UnityEngine.UIModule.dll</HintPath>
<HintPath>..\ScheduleOneAssemblies\Managed\UnityEngine.UIModule.dll</HintPath>
</Reference>
<Reference Include="UnityEngine.JSONSerializeModule">
<HintPath>..\MonoAssemblies\UnityEngine.JSONSerializeModule.dll</HintPath>
<HintPath>..\ScheduleOneAssemblies\Managed\UnityEngine.JSONSerializeModule.dll</HintPath>
</Reference>
<Reference Include="UnityEngine.TextRenderingModule">
<HintPath>..\ScheduleOneAssemblies\Managed\UnityEngine.TextRenderingModule.dll</HintPath>
</Reference>
<Reference Include="UnityEngine.ImageConversionModule">
<HintPath>..\ScheduleOneAssemblies\Managed\UnityEngine.ImageConversionModule.dll</HintPath>
</Reference>
</ItemGroup>

<!-- Shared Deps -->
<ItemGroup>
<Reference Include="0Harmony">
<HintPath>..\..\..\..\..\Program Files (x86)\Steam\steamapps\common\Schedule I\MelonLoader\net6\0Harmony.dll</HintPath>
<HintPath>..\ScheduleOneAssemblies\MelonLoader\0Harmony.dll</HintPath>
</Reference>
<Reference Include="Newtonsoft.Json">
<HintPath>..\MonoAssemblies\Newtonsoft.Json.dll</HintPath>
<HintPath>..\ScheduleOneAssemblies\Managed\Newtonsoft.Json.dll</HintPath>
</Reference>
<PackageReference Include="LavaGang.MelonLoader" Version="0.7.0" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="LavaGang.MelonLoader" Version="0.7.0" />
</ItemGroup>
<Target Name="PostBuildIl2Cpp" AfterTargets="PostBuildEvent" Condition="'$(Configuration)' == 'Il2Cpp'">
<Exec Command="copy &quot;.\bin\Il2Cpp\netstandard2.1\S1API.dll&quot; &quot;C:\Program Files (x86)\Steam\steamapps\common\Schedule I\Mods\S1API.dll&quot;" />
</Target>
<Target Name="PostBuildMono" AfterTargets="PostBuildEvent" Condition="'$(Configuration)' == 'Mono'">
<Exec Command="copy &quot;.\bin\Mono\netstandard2.1\S1API.dll&quot; &quot;C:\Program Files (x86)\Steam\steamapps\common\Schedule I - Copy\Mods\S1API.dll&quot;" />
</Target>
</Project>
Loading