Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
60 commits
Select commit Hold shift + click to select a range
d8cbbe0
Merge pull request #34 from KaBooMa/bleeding-edge
KaBooMa Apr 24, 2025
ac880f3
feat: Added documentation generation
KaBooMa Apr 25, 2025
c7800b4
feat: Initial npc adjustments to support base NPCs and additional fun…
KaBooMa Apr 25, 2025
5773f76
fix: Refactored namespaces globally
KaBooMa Apr 26, 2025
879ed46
feat: Added initial classes for all base game NPCs. (as of current ve…
KaBooMa Apr 26, 2025
2d6ae96
fix: Fixed harmony and reflection referencing for il2cpp build
KaBooMa Apr 26, 2025
c63fd44
feat: Implement BepInEx modloader support
MaxtorCoder Apr 26, 2025
c7933e4
Improve logging code and documentation
MaxtorCoder Apr 26, 2025
0517550
Add Harmony patching to main Plugin file
MaxtorCoder Apr 26, 2025
46af489
feat: finished timemanager and gamedatetime
omar-akermi Apr 26, 2025
9955a77
feat: moneymanager
omar-akermi Apr 27, 2025
88850bb
feat: Building for net6.0 for Il2Cpp per melon recommendation (and wa…
KaBooMa Apr 27, 2025
856f265
Merge pull request #44 from KaBooMa/GameTime
KaBooMa Apr 27, 2025
8196467
Refactor: Replace MoneyManager with static Money API
omar-akermi Apr 27, 2025
0ecb4e7
fix: Fixed the ID for officers
KaBooMa Apr 27, 2025
e3b82b0
fix: Corrected reference to net6.0 for local deployment Il2Cpp
KaBooMa Apr 27, 2025
0e4ba01
fix: Corrected reference to net6.0 for local deployment Il2Cpp
KaBooMa Apr 27, 2025
fc8c1b2
fix: Corrected Il2Cpp list vs System list;
KaBooMa Apr 27, 2025
6a464ea
fix: Using new NPC list in NPC vs NPCPatches for tracking all NPCs
KaBooMa Apr 27, 2025
fa029b2
fix: Remove only destroyed NPC instead of all when OnDestroy is called
KaBooMa Apr 27, 2025
0867899
fix: Split the interfaces, as they weren't functioning as I originall…
KaBooMa Apr 27, 2025
2559d9a
fix: Added the start of the player implementation.
KaBooMa Apr 27, 2025
8c298a1
Merge branch 'bleeding-edge' into bepinex
KaBooMa Apr 27, 2025
76df88f
Merge pull request #40 from MaxtorCoder/bepinex
KaBooMa Apr 27, 2025
ea5f9e9
Merge pull request #46 from KaBooMa/pr-verification
KaBooMa Apr 27, 2025
3346997
Merge pull request #45 from KaBooMa/Money
KaBooMa Apr 27, 2025
fb5d3c5
Merge branch 'bleeding-edge' into npc-expansion
KaBooMa Apr 27, 2025
1a11aa6
Merge pull request #47 from KaBooMa/npc-expansion
KaBooMa Apr 27, 2025
6dc0bbc
fix: Resolved merge issues; Adjusted workflows for BepInEx
KaBooMa Apr 27, 2025
f82cda1
fix: Added BepInEx assembly path for private repo
KaBooMa Apr 27, 2025
69a1cc5
fix: Removed stale code
KaBooMa Apr 27, 2025
3f70c4e
Merge pull request #48 from KaBooMa/fixes
KaBooMa Apr 27, 2025
3cd18ff
Refactor: Replace PhoneApp.InitApp coroutine with HomeScreen.Start in…
omar-akermi Apr 27, 2025
abdb0f5
refactor: dynamic finding
omar-akermi Apr 27, 2025
6ac6b81
move PhoneAppPatches.cs into HomeScreen.Start.cs
omar-akermi Apr 27, 2025
5cfb6d8
fix references ?
omar-akermi Apr 27, 2025
c0fc1ad
pls work
omar-akermi Apr 27, 2025
63f41e3
last one
omar-akermi Apr 27, 2025
fdd37d8
fix: Resolved issue with missing ' in references
KaBooMa Apr 27, 2025
5fc4262
Merge pull request #52 from KaBooMa/build-fixes
KaBooMa Apr 27, 2025
3b88fbc
Merge pull request #53 from KaBooMa/bleeding-edge
KaBooMa Apr 27, 2025
ea40e0d
fix: Allowed net6.0 build for S1API (possible hacky solution to allow…
KaBooMa Apr 27, 2025
5952eb6
Merge pull request #54 from KaBooMa/build-fixes
KaBooMa Apr 27, 2025
c2832fd
Merge pull request #55 from KaBooMa/bleeding-edge
KaBooMa Apr 27, 2025
e28a85c
refactor homescreen
omar-akermi Apr 27, 2025
f3ba4f2
fix S1API.cs
omar-akermi Apr 27, 2025
1704425
Merge remote-tracking branch 'origin/PhoneAppRegister' into PhoneAppR…
omar-akermi Apr 27, 2025
b0800ad
should work
omar-akermi Apr 27, 2025
475b0fb
fix: Resolved missing BepInEx reference
KaBooMa Apr 27, 2025
139408b
fix: Resolved missing BepInEx reference
KaBooMa Apr 27, 2025
413b925
fix: Resolved BepInEx Il2Cpp/Mono differences
KaBooMa Apr 27, 2025
6a8b190
fix: Disabling BepInEx building until it can be properly built locally
KaBooMa Apr 27, 2025
5ad7498
Merge pull request #50 from KaBooMa/PhoneAppRegister
KaBooMa Apr 27, 2025
908e101
fix: Updated .csprojs to use new build configs
KaBooMa Apr 28, 2025
696f482
fix: Switched to renames to satisfy TSMM
KaBooMa Apr 28, 2025
5a96706
Merge branch 'refs/heads/bleeding-edge' into s1apiloader-fixes
KaBooMa Apr 28, 2025
43ec5c5
fix: Updated deployment to Mods/ folder
KaBooMa Apr 28, 2025
282ed8d
fix: Added MelonLoader to filename for future BepInEx support
KaBooMa Apr 28, 2025
aa29a7a
Merge pull request #60 from KaBooMa/s1apiloader-fixes
KaBooMa Apr 28, 2025
5547194
Merge branch 'UIFactory' into bleeding-edge
KaBooMa Apr 28, 2025
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
24 changes: 17 additions & 7 deletions .github/workflows/deploy-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,18 +56,28 @@ jobs:
sed -i "s/{VERSION_NUMBER}/${{ steps.semantic-release.outputs.new_release_version }}/" ./S1API/S1API.cs
sed -i "s/{VERSION_NUMBER}/${{ steps.semantic-release.outputs.new_release_version }}/" ./S1APILoader/S1APILoader.cs

- name: Run .NET build for Mono
run: dotnet build ./S1API.sln -c Mono -f netstandard2.1
# TODO (@MaxtorCoder): Temporarily disabling until BepInEx is building properly locally.
# - name: Run .NET build for MonoBepInEx
# run: dotnet build ./S1API.sln -c MonoBepInEx -f netstandard2.1
#
# - name: Run .NET build for Il2CppBepInEx
# run: dotnet build ./S1API.sln -c Il2CppBepInEx -f net6.0

- name: Run .NET build for Il2Cpp
run: dotnet build ./S1API.sln -c Il2Cpp -f netstandard2.1
- name: Run .NET build for MonoMelon
run: dotnet build ./S1API.sln -c MonoMelon -f netstandard2.1

- name: Run .NET build for Il2CppMelon
run: dotnet build ./S1API.sln -c Il2CppMelon -f net6.0

- name: Build artifact zip for Thunderstore
run: |
mkdir -p ./artifacts/thunderstore/Plugins/S1API
cp ./S1APILoader/bin/Mono/netstandard2.1/S1APILoader.dll ./artifacts/thunderstore/Plugins/S1APILoader.dll
cp ./S1API/bin/Il2Cpp/netstandard2.1/S1API.dll ./artifacts/thunderstore/Plugins/S1API/S1API.Il2Cpp.dll
cp ./S1API/bin/Mono/netstandard2.1/S1API.dll ./artifacts/thunderstore/Plugins/S1API/S1API.Mono.dll
cp ./S1APILoader/bin/MonoMelon/netstandard2.1/S1APILoader.dll ./artifacts/thunderstore/Plugins/S1APILoader.dll
# cp ./S1APILoader/bin/MonoBepInEx/netstandard2.1/S1APILoader.dll ./artifacts/thunderstore/Plugins/S1APILoader.BepInEx.dll
cp ./S1API/bin/Il2CppMelon/net6.0/S1API.dll ./artifacts/thunderstore/Mods/S1API.Il2Cpp.MelonLoader.dll
cp ./S1API/bin/MonoMelon/netstandard2.1/S1API.dll ./artifacts/thunderstore/Mods/S1API.Mono.MelonLoader.dll
# cp ./S1API/bin/Il2CppMelon/net6.0/S1API.dll ./artifacts/thunderstore/Plugins/S1API/S1API.Il2Cpp.BepInEx.dll
# cp ./S1API/bin/MonoMelon/netstandard2.1/S1API.dll ./artifacts/thunderstore/Plugins/S1API/S1API.Mono.BepInEx.dll

- name: Publish artifact to Thunderstore
uses: GreenTF/upload-thunderstore-package@v4.3
Expand Down
19 changes: 13 additions & 6 deletions .github/workflows/verify-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,16 @@ jobs:

- name: Restore .NET Dependencies
run: dotnet restore

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

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

# TODO (@MaxtorCoder): Temporarily disabling until BepInEx is building properly locally.
# - name: Run .NET build for MonoBepInEx
# run: dotnet build ./S1API.sln -c MonoBepInEx -f netstandard2.1
#
# - name: Run .NET build for Il2CppBepInEx
# run: dotnet build ./S1API.sln -c Il2CppBepInEx -f net6.0

- name: Run .NET build for MonoMelon
run: dotnet build ./S1API.sln -c MonoMelon -f netstandard2.1

- name: Run .NET build for Il2CppMelon
run: dotnet build ./S1API.sln -c Il2CppMelon -f net6.0
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
obj/
bin/
*.user
.vs/

# Build props
local.*
Expand Down
30 changes: 20 additions & 10 deletions S1API.sln
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,27 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "S1APILoader", "S1APILoader\
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Mono|Any CPU = Mono|Any CPU
Il2Cpp|Any CPU = Il2Cpp|Any CPU
MonoBepInEx|Any CPU = MonoBepInEx|Any CPU
Il2CppMelon|Any CPU = Il2CppMelon|Any CPU
MonoMelon|Any CPU = MonoMelon|Any CPU
Il2CppBepInEx|Any CPU = Il2CppBepInEx|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{D2C9A6B1-B9E0-4E6D-AE65-B5264C2A4E04}.Mono|Any CPU.ActiveCfg = Mono|Any CPU
{D2C9A6B1-B9E0-4E6D-AE65-B5264C2A4E04}.Mono|Any CPU.Build.0 = Mono|Any CPU
{D2C9A6B1-B9E0-4E6D-AE65-B5264C2A4E04}.Il2Cpp|Any CPU.ActiveCfg = Il2Cpp|Any CPU
{D2C9A6B1-B9E0-4E6D-AE65-B5264C2A4E04}.Il2Cpp|Any CPU.Build.0 = Il2Cpp|Any CPU
{B97277C2-27FE-4BB9-AB5A-D479C8DF6827}.Mono|Any CPU.ActiveCfg = Mono|Any CPU
{B97277C2-27FE-4BB9-AB5A-D479C8DF6827}.Mono|Any CPU.Build.0 = Mono|Any CPU
{B97277C2-27FE-4BB9-AB5A-D479C8DF6827}.Il2Cpp|Any CPU.ActiveCfg = Il2Cpp|Any CPU
{B97277C2-27FE-4BB9-AB5A-D479C8DF6827}.Il2Cpp|Any CPU.Build.0 = Il2Cpp|Any CPU
{D2C9A6B1-B9E0-4E6D-AE65-B5264C2A4E04}.MonoBepInEx|Any CPU.ActiveCfg = MonoBepInEx|Any CPU
{D2C9A6B1-B9E0-4E6D-AE65-B5264C2A4E04}.MonoBepInEx|Any CPU.Build.0 = MonoBepInEx|Any CPU
{D2C9A6B1-B9E0-4E6D-AE65-B5264C2A4E04}.Il2CppMelon|Any CPU.ActiveCfg = Il2CppMelon|Any CPU
{D2C9A6B1-B9E0-4E6D-AE65-B5264C2A4E04}.Il2CppMelon|Any CPU.Build.0 = Il2CppMelon|Any CPU
{D2C9A6B1-B9E0-4E6D-AE65-B5264C2A4E04}.MonoMelon|Any CPU.ActiveCfg = MonoMelon|Any CPU
{D2C9A6B1-B9E0-4E6D-AE65-B5264C2A4E04}.MonoMelon|Any CPU.Build.0 = MonoMelon|Any CPU
{D2C9A6B1-B9E0-4E6D-AE65-B5264C2A4E04}.Il2CppBepInEx|Any CPU.ActiveCfg = Il2CppBepInEx|Any CPU
{D2C9A6B1-B9E0-4E6D-AE65-B5264C2A4E04}.Il2CppBepInEx|Any CPU.Build.0 = Il2CppBepInEx|Any CPU
{B97277C2-27FE-4BB9-AB5A-D479C8DF6827}.MonoBepInEx|Any CPU.ActiveCfg = MonoBepInEx|Any CPU
{B97277C2-27FE-4BB9-AB5A-D479C8DF6827}.MonoBepInEx|Any CPU.Build.0 = MonoBepInEx|Any CPU
{B97277C2-27FE-4BB9-AB5A-D479C8DF6827}.Il2CppMelon|Any CPU.ActiveCfg = Il2CppMelon|Any CPU
{B97277C2-27FE-4BB9-AB5A-D479C8DF6827}.Il2CppMelon|Any CPU.Build.0 = Il2CppMelon|Any CPU
{B97277C2-27FE-4BB9-AB5A-D479C8DF6827}.MonoMelon|Any CPU.ActiveCfg = MonoMelon|Any CPU
{B97277C2-27FE-4BB9-AB5A-D479C8DF6827}.MonoMelon|Any CPU.Build.0 = MonoMelon|Any CPU
{B97277C2-27FE-4BB9-AB5A-D479C8DF6827}.Il2CppBepInEx|Any CPU.ActiveCfg = Il2CppBepInEx|Any CPU
{B97277C2-27FE-4BB9-AB5A-D479C8DF6827}.Il2CppBepInEx|Any CPU.Build.0 = Il2CppBepInEx|Any CPU
EndGlobalSection
EndGlobal
13 changes: 7 additions & 6 deletions S1API/Console/ConsoleHelper.cs
Original file line number Diff line number Diff line change
@@ -1,15 +1,16 @@
using System.Collections.Generic;

#if IL2CPP
#if (IL2CPPMELON || IL2CPPBEPINEX)
using Il2CppSystem.Collections.Generic;
using static Il2CppScheduleOne.Console;

#else
using static ScheduleOne.Console;
using System.Collections.Generic;
#endif

namespace S1API.Utils
namespace S1API.Console
{
/// <summary>
/// This class provides easy access to the in-game console system.
/// </summary>
public static class ConsoleHelper
{
/// <summary>
Expand All @@ -19,7 +20,7 @@ public static class ConsoleHelper
/// <param name="amount">The cash amount to add or remove.</param>
public static void RunCashCommand(int amount)
{
#if IL2CPP
#if (IL2CPPMELON || IL2CPPBEPINEX)
var command = new ChangeCashCommand();
var args = new Il2CppSystem.Collections.Generic.List<string>();
#else
Expand Down
6 changes: 3 additions & 3 deletions S1API/DeadDrops/DeadDropInstance.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#if (IL2CPP)
#if (IL2CPPMELON || IL2CPPBEPINEX)
using S1Economy = Il2CppScheduleOne.Economy;
#elif (MONO)
#elif (MONOMELON || MONOBEPINEX)
using S1Economy = ScheduleOne.Economy;
#endif

Expand Down Expand Up @@ -59,4 +59,4 @@ internal DeadDropInstance(S1Economy.DeadDrop deadDrop) =>
public Vector3 Position =>
S1DeadDrop.transform.position;
}
}
}
6 changes: 3 additions & 3 deletions S1API/DeadDrops/DeadDropManager.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#if (IL2CPP)
#if (IL2CPPMELON || IL2CPPBEPINEX)
using S1Economy = Il2CppScheduleOne.Economy;
#elif (MONO)
#elif (MONOMELON || MONOBEPINEX)
using S1Economy = ScheduleOne.Economy;
#endif

Expand All @@ -19,4 +19,4 @@ public class DeadDropManager
public static DeadDropInstance[] All =>
S1Economy.DeadDrop.DeadDrops.ToArray()
.Select(deadDrop => new DeadDropInstance(deadDrop)).ToArray(); }
}
}
25 changes: 25 additions & 0 deletions S1API/Entities/Interfaces/IEntity.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
using UnityEngine;

namespace S1API.Entities.Interfaces
{
/// <summary>
/// Represents an entity within the game world.
/// </summary>
public interface IEntity
{
/// <summary>
/// INTERNAL: Tracking of the GameObject associated with this entity.
/// </summary>
GameObject gameObject { get; }

/// <summary>
/// The world position of the entity.
/// </summary>
public Vector3 Position { get; set; }

/// <summary>
/// The scale of the entity.
/// </summary>
public float Scale { get; set; }
}
}
57 changes: 57 additions & 0 deletions S1API/Entities/Interfaces/IHealth.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
using System;

namespace S1API.Entities.Interfaces
{
/// <summary>
/// Represents an entity that has health associated.
/// </summary>
public interface IHealth
{
/// <summary>
/// The current health of the entity.
/// </summary>
public float CurrentHealth { get; }

/// <summary>
/// The max health of the entity.
/// </summary>
public float MaxHealth { get; set; }

/// <summary>
/// Whether the entity is dead or not.
/// </summary>
public bool IsDead { get; }

/// <summary>
/// Whether the entity is invincible.
/// </summary>
public bool IsInvincible { get; set; }

/// <summary>
/// Revives the entity.
/// </summary>
public void Revive();

/// <summary>
/// Deals damage to the entity.
/// </summary>
/// <param name="amount">Amount of damage to deal.</param>
public void Damage(int amount);

/// <summary>
/// Heals the entity.
/// </summary>
/// <param name="amount">Amount of health to heal.</param>
public void Heal(int amount);

/// <summary>
/// Kills the entity.
/// </summary>
public void Kill();

/// <summary>
/// Called when entity's health is less than or equal to 0.
/// </summary>
public event Action OnDeath;
}
}
Loading