-
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
14 changed files
with
365 additions
and
0 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
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 |
---|---|---|
@@ -0,0 +1,16 @@ | ||
|
||
Microsoft Visual Studio Solution File, Format Version 12.00 | ||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ArenaFix", "ArenaFix\ArenaFix.csproj", "{D44131C8-BFF0-4CA1-A2F1-DBE378CD6E4E}" | ||
EndProject | ||
Global | ||
GlobalSection(SolutionConfigurationPlatforms) = preSolution | ||
Debug|Any CPU = Debug|Any CPU | ||
Release|Any CPU = Release|Any CPU | ||
EndGlobalSection | ||
GlobalSection(ProjectConfigurationPlatforms) = postSolution | ||
{D44131C8-BFF0-4CA1-A2F1-DBE378CD6E4E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU | ||
{D44131C8-BFF0-4CA1-A2F1-DBE378CD6E4E}.Debug|Any CPU.Build.0 = Debug|Any CPU | ||
{D44131C8-BFF0-4CA1-A2F1-DBE378CD6E4E}.Release|Any CPU.ActiveCfg = Release|Any CPU | ||
{D44131C8-BFF0-4CA1-A2F1-DBE378CD6E4E}.Release|Any CPU.Build.0 = Release|Any CPU | ||
EndGlobalSection | ||
EndGlobal |
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 |
---|---|---|
@@ -0,0 +1,99 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | ||
|
||
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" /> | ||
<PropertyGroup> | ||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> | ||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> | ||
<ProjectGuid>{D44131C8-BFF0-4CA1-A2F1-DBE378CD6E4E}</ProjectGuid> | ||
<OutputType>Library</OutputType> | ||
<AppDesignerFolder>Properties</AppDesignerFolder> | ||
<RootNamespace>ArenaFix</RootNamespace> | ||
<AssemblyName>ArenaFix</AssemblyName> | ||
<TargetFrameworkVersion>v4.7.2</TargetFrameworkVersion> | ||
<FileAlignment>512</FileAlignment> | ||
<LangVersion>11</LangVersion> | ||
<Nullable>enable</Nullable> | ||
</PropertyGroup> | ||
|
||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> | ||
<PlatformTarget>AnyCPU</PlatformTarget> | ||
<DebugSymbols>true</DebugSymbols> | ||
<DebugType>full</DebugType> | ||
<Optimize>false</Optimize> | ||
<OutputPath>bin\Debug\</OutputPath> | ||
<DefineConstants>DEBUG;TRACE</DefineConstants> | ||
<ErrorReport>prompt</ErrorReport> | ||
<WarningLevel>4</WarningLevel> | ||
</PropertyGroup> | ||
|
||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> | ||
<PlatformTarget>AnyCPU</PlatformTarget> | ||
<DebugType>pdbonly</DebugType> | ||
<Optimize>true</Optimize> | ||
<OutputPath>bin\Release\</OutputPath> | ||
<DefineConstants>TRACE</DefineConstants> | ||
<ErrorReport>prompt</ErrorReport> | ||
<WarningLevel>4</WarningLevel> | ||
</PropertyGroup> | ||
|
||
<ItemGroup> | ||
<Reference Include="0Harmony"> | ||
<HintPath>$(GameDir)\MelonLoader\0Harmony.dll</HintPath> | ||
</Reference> | ||
<Reference Include="Assembly-CSharp"> | ||
<HintPath>$(GameDir)\MelonLoader\Managed\Assembly-CSharp.dll</HintPath> | ||
</Reference> | ||
<Reference Include="Assembly-CSharp-firstpass"> | ||
<HintPath>$(GameDir)\MelonLoader\Managed\Assembly-CSharp-firstpass.dll</HintPath> | ||
</Reference> | ||
<Reference Include="Il2Cppmscorlib"> | ||
<HintPath>$(GameDir)\MelonLoader\Managed\Il2Cppmscorlib.dll</HintPath> | ||
</Reference> | ||
<Reference Include="Il2CppSystem"> | ||
<HintPath>$(GameDir)\MelonLoader\Managed\Il2CppSystem.dll</HintPath> | ||
</Reference> | ||
<Reference Include="MelonLoader"> | ||
<HintPath>$(GameDir)\MelonLoader\MelonLoader.dll</HintPath> | ||
</Reference> | ||
<Reference Include="SLZ.Marrow"> | ||
<HintPath>$(GameDir)\MelonLoader\Managed\SLZ.Marrow.dll</HintPath> | ||
</Reference> | ||
<Reference Include="UnhollowerBaseLib"> | ||
<HintPath>$(GameDir)\MelonLoader\Managed\UnhollowerBaseLib.dll</HintPath> | ||
</Reference> | ||
<Reference Include="UnhollowerRuntimeLib"> | ||
<HintPath>$(GameDir)\MelonLoader\Managed\UnhollowerRuntimeLib.dll</HintPath> | ||
</Reference> | ||
<Reference Include="UnityEngine"> | ||
<HintPath>$(GameDir)\MelonLoader\Managed\UnityEngine.dll</HintPath> | ||
</Reference> | ||
<Reference Include="UnityEngine.CoreModule"> | ||
<HintPath>$(GameDir)\MelonLoader\Managed\UnityEngine.CoreModule.dll</HintPath> | ||
</Reference> | ||
</ItemGroup> | ||
|
||
<ItemGroup> | ||
<Reference Include="System" /> | ||
<Reference Include="System.Core" /> | ||
<Reference Include="System.Data" /> | ||
<Reference Include="System.Xml" /> | ||
</ItemGroup> | ||
|
||
<ItemGroup> | ||
<Compile Include="HarmonyPatches\Arena_GameController_NPC_Registration.cs" /> | ||
<Compile Include="HarmonyPatches\Arena_GameController_Start.cs" /> | ||
<Compile Include="Mod.cs" /> | ||
<Compile Include="Properties\AssemblyInfo.cs" /> | ||
</ItemGroup> | ||
|
||
<ItemGroup> | ||
<None Include="ArenaFix.csproj.user" /> | ||
</ItemGroup> | ||
|
||
<Import Project="$(SolutionDir)\Mod.props" /> | ||
|
||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> | ||
|
||
<Import Project="$(SolutionDir)\Mod.targets" /> | ||
</Project> |
23 changes: 23 additions & 0 deletions
23
ArenaFix/HarmonyPatches/Arena_GameController_NPC_Registration.cs
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 |
---|---|---|
@@ -0,0 +1,23 @@ | ||
using HarmonyLib; | ||
using SLZ.Bonelab; | ||
using SLZ.Data; | ||
|
||
namespace ArenaFix.HarmonyPatches | ||
{ | ||
[HarmonyPatch(typeof(Arena_GameController))] | ||
[HarmonyPatch(nameof(Arena_GameController.NPC_Registration))] | ||
// ReSharper disable once InconsistentNaming | ||
public static class Arena_GameController_NPC_Registration | ||
{ | ||
[HarmonyPrefix] | ||
// ReSharper disable once UnusedMember.Local | ||
private static void Prefix(NPC_Data data) | ||
{ | ||
// Spawns sometimes get stuck and are unable to enter the arena, the game kills them after 2 | ||
// minutes anyway if they dont enter the arena, this just reduces that timer. | ||
EnemyProfile profile = data.enemyProfile; | ||
if (profile.enemyTitle != "OMNI PROJECTOR HAZMAT") // Omni projectors hang about up top sometimes | ||
profile.entranceTimeVal = 45f; // Original is 120f, which is way too long imo | ||
} | ||
} | ||
} |
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 |
---|---|---|
@@ -0,0 +1,27 @@ | ||
using System; | ||
using HarmonyLib; | ||
using SLZ.AI; | ||
using SLZ.Bonelab; | ||
|
||
namespace ArenaFix.HarmonyPatches | ||
{ | ||
[HarmonyPatch(typeof(Arena_GameController))] | ||
[HarmonyPatch(nameof(Arena_GameController.Start))] | ||
// ReSharper disable once InconsistentNaming | ||
public static class Arena_GameController_Start | ||
{ | ||
[HarmonyPostfix] | ||
// ReSharper disable once InconsistentNaming | ||
// ReSharper disable once UnusedMember.Local | ||
private static void Postfix(Arena_GameController __instance) | ||
{ | ||
// If an NPC gets thrown out of the arena, it just kinda sits there | ||
GenGameControl_Trigger arenaBounds = __instance.NPCEntranceTrigger; | ||
arenaBounds.OnNPC_ProxyExit += (Action<TriggerRefProxy>)(triggerRefProxy => | ||
{ | ||
// if an npc leaves the arena and doesnt get back in, then kill it | ||
triggerRefProxy._aiManager.StartArenaEntranceTimer(45f); | ||
}); | ||
} | ||
} | ||
} |
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 |
---|---|---|
@@ -0,0 +1,8 @@ | ||
using MelonLoader; | ||
|
||
namespace ArenaFix | ||
{ | ||
public class Mod : MelonMod | ||
{ | ||
} | ||
} |
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 |
---|---|---|
@@ -0,0 +1,26 @@ | ||
using System.Reflection; | ||
using System.Resources; | ||
using System.Runtime.InteropServices; | ||
using ArenaFix; | ||
using MelonLoader; | ||
using BuildInfo = ArenaFix.BuildInfo; | ||
|
||
[assembly: AssemblyTitle(BuildInfo.Name)] | ||
[assembly: AssemblyDescription("")] | ||
[assembly: AssemblyConfiguration("")] | ||
[assembly: AssemblyCompany(null!)] | ||
[assembly: AssemblyProduct(BuildInfo.Name)] | ||
[assembly: AssemblyCopyright("Copyright (c) 2023 Frederick (Millzy) Mills")] | ||
[assembly: AssemblyTrademark(null)] | ||
[assembly: AssemblyCulture("")] | ||
[assembly: ComVisible(false)] | ||
[assembly: AssemblyVersion(BuildInfo.Version + ".*")] | ||
[assembly: AssemblyFileVersion(BuildInfo.Version)] | ||
[assembly: NeutralResourcesLanguage("en")] | ||
|
||
[assembly: MelonInfo(typeof(Mod), BuildInfo.Name, BuildInfo.Version, BuildInfo.Author)] | ||
|
||
[assembly: MelonGame("Stress Level Zero", "BONELAB")] | ||
[assembly: MelonID(BuildInfo.Id)] | ||
|
||
[assembly: VerifyLoaderVersion("0.5.7")] |
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 |
---|---|---|
@@ -0,0 +1,14 @@ | ||
<Project> | ||
<PropertyGroup> | ||
<ModName>$(RootNamespace)</ModName> | ||
<ModAuthor>Millzy</ModAuthor> | ||
<ModVersion>0.1.0</ModVersion> | ||
<ModDescription>Some minor fixes to prevent softlocks in Fantasy Arena.</ModDescription> | ||
<ModId>dev.millzy.$(ModName)</ModId> | ||
<ModWebsiteUrl>https://github.com/MillzyDev/BonelabRandomizer</ModWebsiteUrl> | ||
</PropertyGroup> | ||
|
||
<ItemGroup> | ||
<ModDependencies Include="LavaGang-MelonLoader-0.5.7" /> | ||
</ItemGroup> | ||
</Project> |
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 |
---|---|---|
@@ -0,0 +1,84 @@ | ||
<Project> | ||
<Target Name="BuildInfo" BeforeTargets="BeforeCompile"> | ||
<PropertyGroup> | ||
<BuildInfo><![CDATA[ | ||
namespace $(RootNamespace) | ||
{ | ||
internal static class BuildInfo | ||
{ | ||
public const string Name = "$(ModName)"%3B | ||
public const string Author = "$(ModAuthor)"%3B | ||
public const string Version = "$(ModVersion)"%3B | ||
public const string Description = "$(ModDescription)"%3B | ||
public const string Id = "$(ModId)"%3B | ||
} | ||
} | ||
]]></BuildInfo> | ||
|
||
<BuildInfoFilePath>$(IntermediateOutputPath)BuildInfo.g.cs</BuildInfoFilePath> | ||
</PropertyGroup> | ||
|
||
<ItemGroup> | ||
<Compile Include="$(BuildInfoFilePath)" /> | ||
<FileWrites Include="$(BuildInfoFilePath)" /> | ||
</ItemGroup> | ||
|
||
<WriteLinesToFile File="$(BuildInfoFilePath)" | ||
Lines="$(BuildInfo)" | ||
WriteOnlyWhenDifferent="true" | ||
Overwrite="true" /> | ||
|
||
<Message Text="Generated BuildInfo.cs." | ||
Importance="high" /> | ||
</Target> | ||
|
||
<Target Name="AutoInstall" AfterTargets="PostBuildEvent"> | ||
<Copy SourceFiles="$(OutputPath)\$(AssemblyName).dll;$(OutputPath)\$(AssemblyName).pdb" | ||
DestinationFolder="$(GameDir)\Mods" /> | ||
|
||
<Copy SourceFiles="$(OutputPath)\$(AssemblyName).xml" | ||
DestinationFolder="$(GameDir)\Mods" | ||
Condition="Exists('$(OutputPath)\$(AssemblyName).xml')" /> | ||
|
||
<Message Text="Finished copying files to $(GameDir)\Mods\" | ||
Importance="high" /> | ||
</Target> | ||
|
||
<Target Name="ThunderstorePackage" | ||
AfterTargets="PostBuildEvent" | ||
Condition="'$(Configuration)' == 'Release'"> | ||
|
||
<ItemGroup> | ||
<ThunderStoreFiles Include="$(SolutionDir)\README.md;$(SolutionDir)\icon.png" /> | ||
<ThunderStoreFiles Include="$(SolutionDir)\CHANGELOG.md" Condition="Exists('$(SolutionDir)\CHANGELOG.md')" /> | ||
</ItemGroup> | ||
|
||
<MakeDir Directories="$(OutputDir)\StagingArea\" /> | ||
|
||
<Exec Command="powershell $(SolutionDir)\generate-manifest.ps1 -modName '$(ModName)' -modVersion '$(ModVersion)' -modWebsiteUrl '$(ModWebsiteUrl)' -modDescription '$(ModDescription)' -dependencies '@(ModDependencies, '%27,%27')' -outPath '$(OutputPath)\StagingArea'" /> | ||
|
||
<Message Text="Generated manifest.json" | ||
Importance="high" /> | ||
|
||
<Copy SourceFiles="@(ThunderStoreFiles)" | ||
DestinationFolder="$(OutputPath)\StagingArea\" /> | ||
|
||
<Message Text="Finised copying Thunderstore recognised files." | ||
Importance="high" /> | ||
|
||
<Copy SourceFiles="$(OutputPath)\$(AssemblyName).dll" | ||
DestinationFolder="$(OutputPath)\StagingArea\Mods\" /> | ||
|
||
<Message Text="Finished staging mod files." | ||
Importance="high" /> | ||
|
||
<MakeDir Directories="$(OutputPath)\Thunderstore" /> | ||
|
||
<ZipDirectory DestinationFile="$(OutputPath)\Thunderstore\$(AssemblyName).zip" | ||
SourceDirectory="$(OutputPath)\StagingArea\" /> | ||
|
||
<Message Text="Created thunderstore package ($(AssemblyName).zip) at $(OutputPath)\Thunderstore\" | ||
Importance="high" /> | ||
|
||
</Target> | ||
</Project> |
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 |
---|---|---|
@@ -0,0 +1,30 @@ | ||
Param( | ||
[Parameter(Mandatory=$true)] | ||
[String] $modName="", | ||
|
||
[Parameter(Mandatory=$true)] | ||
[String] $modVersion="", | ||
|
||
[Parameter(Mandatory=$true)] | ||
[String] $modWebsiteUrl="", | ||
|
||
[Parameter(Mandatory=$true)] | ||
[String] $modDescription="", | ||
|
||
[Parameter(Mandatory=$false)] | ||
[String[]] $dependencies=@(), | ||
|
||
[Parameter(Mandatory=$true)] | ||
[String] $outPath="" | ||
) | ||
|
||
$manifest = @{ | ||
"name" = $modName | ||
"version_number" = $modVersion | ||
"website_url" = $modWebsiteUrl | ||
"description" = $modDescription | ||
"dependencies" = $dependencies | ||
} | ||
|
||
$json = $manifest | ConvertTo-Json | ||
$json | Set-Content -Path "$outPath/manifest.json" -Force |