Update build process and disable debug mode

This commit is contained in:
Guus Waals 2025-01-10 20:46:18 +08:00
parent 73f4e4b0f5
commit cdc4336ed5
6 changed files with 17 additions and 12 deletions

View File

@ -1,3 +1,4 @@
ln -s "C:\Users\Guus\AppData\LocalLow\Klei\Oxygen Not Included" Logs
ln -s "C:\Program Files (x86)\Steam\steamapps\common\OxygenNotIncluded" OxygenNotIncluded
ln -s "C:\Users\Guus\Documents\Klei\OxygenNotIncluded" OxygenNotIncludedData
ln -s "C:\Users\Guus\Documents\Klei\OxygenNotIncluded" OxygenNotIncludedData
ln -s "C:\Program Files (x86)\Steam\steamapps\common\OxygenNotIncluded\OxygenNotIncluded_Data\Managed" Libs

View File

@ -20,11 +20,11 @@ namespace PriorityUX {
public override void OnLoad(Harmony harmony) {
Debug.Log("UX Mod Load");
Harmony.DEBUG = true;
// Harmony.DEBUG = true;
base.OnLoad(harmony);
Debug.Log("UX Mod PostLoad base");
// Debug.Log("UX Mod PostLoad base");
PUtil.InitLibrary();
LocString.CreateLocStringKeys(typeof(Strings.PRIORITYUX));

View File

@ -37,11 +37,11 @@ namespace PeterHan.PLib.Buildings {
private static void ApplyAlwaysOperational(GameObject go) {
// Remove default components that could make a building non-operational
if (go.TryGetComponent(out BuildingEnabledButton enabled))
Object.DestroyImmediate(enabled);
UnityEngine.Object.DestroyImmediate(enabled);
if (go.TryGetComponent(out Operational op))
Object.DestroyImmediate(op);
UnityEngine.Object.DestroyImmediate(op);
if (go.TryGetComponent(out LogicPorts lp))
Object.DestroyImmediate(lp);
UnityEngine.Object.DestroyImmediate(lp);
}
/// <summary>

View File

@ -1,13 +1,13 @@
#/bin/bash
msbuild=/Library/Frameworks/Mono.framework/Versions/6.12.0/bin/msbuild
msbuild=${msbuild:-/Library/Frameworks/Mono.framework/Versions/6.12.0/bin/msbuild}
ROOT=$( cd "$(dirname "$0")" ; pwd -P )
pushd $ROOT
# Do the build (need to use mono)
# $msbuild
$msbuild -p:Configuration=Release
"$msbuild" -p:Configuration=Release
set -x
rm -rf dist
@ -15,3 +15,8 @@ mkdir dist
# cp bin/Debug/net48/oni-prio.dll dist/
cp bin/Release/net48/oni-prio.dll dist/
cp -r meta/* dist/
MODPATH=../OxygenNotIncludedData/mods/Local/PriorityUX
rm -rf $MODPATH
mkdir -p $MODPATH
cp dist/* $MODPATH

View File

@ -1,11 +1,10 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net48</TargetFramework>
<RootNamespace>oni_prio</RootNamespace>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<LangVersion>8.0</LangVersion>
<LangVersion>10.0</LangVersion>
</PropertyGroup>
<ItemGroup>
<Reference Include="Assembly-CSharp-firstpass">

View File

@ -5,9 +5,9 @@ VisualStudioVersion = 17.0.31903.59
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "oni-prio", "mod\oni-prio.csproj", "{B5C0FB18-102D-434C-B8D7-2DDAE54367D6}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Assembly-CSharp", "reference\Assembly-CSharp.csproj", "{501D90AF-582D-4F90-9FE6-1479FBA92A4B}"
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Assembly-CSharp", "reference\Assembly-CSharp\Assembly-CSharp.csproj", "{501D90AF-582D-4F90-9FE6-1479FBA92A4B}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Assembly-CSharp-firstpass", "reference-firstpass\Assembly-CSharp-firstpass.csproj", "{F0AD7234-F5CE-4A5E-8E8A-F621F0B7C0A0}"
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Assembly-CSharp-firstpass", "reference\Assembly-CSharp-firstpass\Assembly-CSharp-firstpass.csproj", "{F0AD7234-F5CE-4A5E-8E8A-F621F0B7C0A0}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution