├── src ├── ChainedDeconstruction │ ├── Chainables.json │ ├── mod_info.yaml │ ├── State.cs │ ├── Properties │ │ └── AssemblyInfo.cs │ ├── ChainedDeconstruction.csproj │ └── Patches │ │ └── ChainedDeconstruction.cs ├── DoorIcons │ ├── Sprites │ │ ├── open.png │ │ ├── locked.png │ │ ├── automation.png │ │ ├── access_custom.png │ │ ├── access_left.png │ │ ├── access_right.png │ │ └── access_restricted.png │ ├── mod_info.yaml │ ├── ExtendedDoorState.cs │ ├── Properties │ │ └── AssemblyInfo.cs │ ├── State.cs │ ├── Patches │ │ └── DoorPatches.cs │ └── DoorIcons.csproj ├── DraggableUI │ ├── mod_info.yaml │ ├── SerializeableVector2.cs │ ├── State.cs │ ├── DraggablePanelMod.cs │ ├── Properties │ │ └── AssemblyInfo.cs │ ├── Data │ │ └── DraggableUIState.cs │ ├── DraggableUI.csproj │ └── DraggablePanel.cs ├── FreeCamera │ ├── mod_info.yaml │ ├── Config.cs │ ├── Properties │ │ └── AssemblyInfo.cs │ ├── Patches │ │ ├── RemoveConstraint.cs │ │ └── IncreaseMaxZoom.cs │ └── FreeCamera.csproj ├── GasOverlay │ ├── mod_info.yaml │ ├── State.cs │ ├── Properties │ │ └── AssemblyInfo.cs │ ├── Config.cs │ ├── Config.json │ ├── GasOverlay.csproj │ └── GasOverlayMod.cs ├── MaterialColor │ ├── mod_info.yaml │ ├── Sprites │ │ └── overlay_materialColor.png │ ├── IDs.cs │ ├── Config │ │ ├── Config.json │ │ └── ElementColors.json │ ├── Helpers │ │ ├── MaterialHelper.cs │ │ └── ColorHelper.cs │ ├── PeriodicRefresher.cs │ ├── Data │ │ ├── Config.cs │ │ ├── FilterInfo.cs │ │ └── ElementColor.cs │ ├── Properties │ │ └── AssemblyInfo.cs │ ├── Extensions │ │ └── ColorExtensions.cs │ ├── State.cs │ ├── TextFilter.cs │ ├── Patches │ │ ├── WatchConfig.cs │ │ └── ApplyColors.cs │ ├── MaterialColor.csproj │ └── Painter.cs ├── LiquefiableSculptures │ ├── mod_info.yaml │ ├── LiquefiableSculptures.cs │ ├── Properties │ │ └── AssemblyInfo.cs │ └── LiquefiableSculptures.csproj ├── SaveNoDailyReports │ ├── mod_info.yaml │ ├── Patches │ │ └── ClearOldReports.cs │ ├── Properties │ │ └── AssemblyInfo.cs │ └── RemoveDailyReports.csproj ├── CustomTemperatureOverlay │ ├── mod_info.yaml │ ├── Data │ │ └── TemperatureStep.cs │ ├── Properties │ │ └── AssemblyInfo.cs │ ├── State.cs │ ├── Config.json │ ├── Patches.cs │ ├── CustomTemperatureOverlay.csproj │ └── Mod.cs ├── DisplayAllTemps │ ├── mod_info.yaml │ ├── TemperatureUnitMultiple.cs │ ├── State.cs │ ├── Patches │ │ ├── WatchConfig.cs │ │ ├── DisplayAllTemps.cs │ │ └── Settings.cs │ ├── Properties │ │ └── AssemblyInfo.cs │ └── DisplayAllTemps.csproj ├── Tools │ ├── Common │ │ ├── ConfigHelper.cs │ │ ├── Properties │ │ │ └── AssemblyInfo.cs │ │ ├── Logger.cs │ │ ├── ConfigWatcher.cs │ │ ├── Pathfinder.cs │ │ ├── Core.cs │ │ └── Common.csproj │ ├── ClearRegolith │ │ ├── Patches │ │ │ └── ClearRegolith.cs │ │ ├── Properties │ │ │ └── AssemblyInfo.cs │ │ └── ClearRegolith.csproj │ └── BenchmarkGasOverlay │ │ ├── Properties │ │ └── AssemblyInfo.cs │ │ ├── BenchmarkGasOverlay.cs │ │ └── BenchmarkGasOverlay.csproj ├── .gitignore └── Etiam-ONI-Modpack.sln ├── Mods ├── ChainedDeconstruction │ ├── Chainables.json │ ├── Common.dll │ ├── mod_info.yaml │ └── ChainedDeconstruction.dll ├── DoorIcons │ ├── Common.dll │ ├── DoorIcons.dll │ ├── Sprites │ │ ├── open.png │ │ ├── locked.png │ │ ├── access_left.png │ │ ├── access_right.png │ │ ├── automation.png │ │ ├── access_custom.png │ │ └── access_restricted.png │ └── mod_info.yaml ├── GasOverlay │ ├── Common.dll │ ├── GasOverlay.dll │ ├── mod_info.yaml │ └── Config.json ├── DraggableUI │ ├── Common.dll │ ├── DraggableUI.dll │ └── mod_info.yaml ├── MaterialColor │ ├── Common.dll │ ├── mod_info.yaml │ ├── MaterialColor.dll │ ├── Sprites │ │ └── overlay_materialColor.png │ └── Config │ │ ├── Config.json │ │ └── ElementColors.json ├── DisplayAllTemps │ ├── Common.dll │ ├── DisplayAllTemps.dll │ └── mod_info.yaml ├── FreeCamera │ ├── FreeCamera.dll │ └── mod_info.yaml ├── RemoveDailyReports │ ├── mod_info.yaml │ └── RemoveDailyReports.dll ├── CustomTemperatureOverlay │ ├── mod_info.yaml │ ├── Common.dll │ ├── CustomTemperatureOverlay.dll │ └── Config.json └── LiquefiableSculptures │ ├── mod_info.yaml │ └── LiquefiableSculptures.dll ├── Tools ├── Common │ └── Common.dll ├── ClearRegolith │ └── ClearRegolith.dll └── BenchmarkGasOverlay │ └── BenchmarkGasOverlay.dll └── .gitattributes /src/ChainedDeconstruction/Chainables.json: -------------------------------------------------------------------------------- 1 | [ 2 | "*" 3 | ] 4 | -------------------------------------------------------------------------------- /Mods/ChainedDeconstruction/Chainables.json: -------------------------------------------------------------------------------- 1 | [ 2 | "*" 3 | ] 4 | -------------------------------------------------------------------------------- /Tools/Common/Common.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EtiamNullam/Etiam-ONI-Modpack/HEAD/Tools/Common/Common.dll -------------------------------------------------------------------------------- /Mods/DoorIcons/Common.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EtiamNullam/Etiam-ONI-Modpack/HEAD/Mods/DoorIcons/Common.dll -------------------------------------------------------------------------------- /Mods/GasOverlay/Common.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EtiamNullam/Etiam-ONI-Modpack/HEAD/Mods/GasOverlay/Common.dll -------------------------------------------------------------------------------- /Mods/DoorIcons/DoorIcons.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EtiamNullam/Etiam-ONI-Modpack/HEAD/Mods/DoorIcons/DoorIcons.dll -------------------------------------------------------------------------------- /Mods/DraggableUI/Common.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EtiamNullam/Etiam-ONI-Modpack/HEAD/Mods/DraggableUI/Common.dll -------------------------------------------------------------------------------- /Mods/MaterialColor/Common.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EtiamNullam/Etiam-ONI-Modpack/HEAD/Mods/MaterialColor/Common.dll -------------------------------------------------------------------------------- /Mods/DisplayAllTemps/Common.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EtiamNullam/Etiam-ONI-Modpack/HEAD/Mods/DisplayAllTemps/Common.dll -------------------------------------------------------------------------------- /Mods/DoorIcons/Sprites/open.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EtiamNullam/Etiam-ONI-Modpack/HEAD/Mods/DoorIcons/Sprites/open.png -------------------------------------------------------------------------------- /Mods/DoorIcons/mod_info.yaml: -------------------------------------------------------------------------------- 1 | supportedContent: ALL 2 | minimumSupportedBuild: 469369 3 | APIVersion: 2 4 | version: "3.1.0" 5 | -------------------------------------------------------------------------------- /Mods/FreeCamera/FreeCamera.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EtiamNullam/Etiam-ONI-Modpack/HEAD/Mods/FreeCamera/FreeCamera.dll -------------------------------------------------------------------------------- /Mods/FreeCamera/mod_info.yaml: -------------------------------------------------------------------------------- 1 | supportedContent: ALL 2 | minimumSupportedBuild: 651155 3 | APIVersion: 2 4 | version: "3.0.1" 5 | -------------------------------------------------------------------------------- /Mods/GasOverlay/GasOverlay.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EtiamNullam/Etiam-ONI-Modpack/HEAD/Mods/GasOverlay/GasOverlay.dll -------------------------------------------------------------------------------- /Mods/GasOverlay/mod_info.yaml: -------------------------------------------------------------------------------- 1 | supportedContent: ALL 2 | minimumSupportedBuild: 469369 3 | APIVersion: 2 4 | version: "4.2.0" 5 | -------------------------------------------------------------------------------- /src/DoorIcons/Sprites/open.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EtiamNullam/Etiam-ONI-Modpack/HEAD/src/DoorIcons/Sprites/open.png -------------------------------------------------------------------------------- /src/DoorIcons/mod_info.yaml: -------------------------------------------------------------------------------- 1 | supportedContent: ALL 2 | minimumSupportedBuild: 469369 3 | APIVersion: 2 4 | version: "3.1.0" 5 | -------------------------------------------------------------------------------- /src/DraggableUI/mod_info.yaml: -------------------------------------------------------------------------------- 1 | supportedContent: ALL 2 | minimumSupportedBuild: 651155 3 | APIVersion: 2 4 | version: "5.0.1" 5 | -------------------------------------------------------------------------------- /src/FreeCamera/mod_info.yaml: -------------------------------------------------------------------------------- 1 | supportedContent: ALL 2 | minimumSupportedBuild: 651155 3 | APIVersion: 2 4 | version: "3.0.1" 5 | -------------------------------------------------------------------------------- /src/GasOverlay/mod_info.yaml: -------------------------------------------------------------------------------- 1 | supportedContent: ALL 2 | minimumSupportedBuild: 469369 3 | APIVersion: 2 4 | version: "4.2.0" 5 | -------------------------------------------------------------------------------- /Mods/DoorIcons/Sprites/locked.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EtiamNullam/Etiam-ONI-Modpack/HEAD/Mods/DoorIcons/Sprites/locked.png -------------------------------------------------------------------------------- /Mods/DraggableUI/DraggableUI.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EtiamNullam/Etiam-ONI-Modpack/HEAD/Mods/DraggableUI/DraggableUI.dll -------------------------------------------------------------------------------- /Mods/DraggableUI/mod_info.yaml: -------------------------------------------------------------------------------- 1 | supportedContent: ALL 2 | minimumSupportedBuild: 651155 3 | APIVersion: 2 4 | version: "5.0.1" 5 | -------------------------------------------------------------------------------- /Mods/MaterialColor/mod_info.yaml: -------------------------------------------------------------------------------- 1 | supportedContent: ALL 2 | minimumSupportedBuild: 651155 3 | APIVersion: 2 4 | version: "5.1.1" 5 | -------------------------------------------------------------------------------- /src/DoorIcons/Sprites/locked.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EtiamNullam/Etiam-ONI-Modpack/HEAD/src/DoorIcons/Sprites/locked.png -------------------------------------------------------------------------------- /src/MaterialColor/mod_info.yaml: -------------------------------------------------------------------------------- 1 | supportedContent: ALL 2 | minimumSupportedBuild: 651155 3 | APIVersion: 2 4 | version: "5.1.1" 5 | -------------------------------------------------------------------------------- /Mods/MaterialColor/MaterialColor.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EtiamNullam/Etiam-ONI-Modpack/HEAD/Mods/MaterialColor/MaterialColor.dll -------------------------------------------------------------------------------- /Mods/RemoveDailyReports/mod_info.yaml: -------------------------------------------------------------------------------- 1 | supportedContent: ALL 2 | minimumSupportedBuild: 651155 3 | APIVersion: 2 4 | version: "4.0.1" 5 | -------------------------------------------------------------------------------- /src/ChainedDeconstruction/mod_info.yaml: -------------------------------------------------------------------------------- 1 | supportedContent: ALL 2 | minimumSupportedBuild: 644960 3 | APIVersion: 2 4 | version: "3.0.3" 5 | -------------------------------------------------------------------------------- /src/DoorIcons/Sprites/automation.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EtiamNullam/Etiam-ONI-Modpack/HEAD/src/DoorIcons/Sprites/automation.png -------------------------------------------------------------------------------- /src/LiquefiableSculptures/mod_info.yaml: -------------------------------------------------------------------------------- 1 | supportedContent: ALL 2 | minimumSupportedBuild: 651155 3 | APIVersion: 2 4 | version: "3.0.1" 5 | -------------------------------------------------------------------------------- /src/SaveNoDailyReports/mod_info.yaml: -------------------------------------------------------------------------------- 1 | supportedContent: ALL 2 | minimumSupportedBuild: 651155 3 | APIVersion: 2 4 | version: "4.0.1" 5 | -------------------------------------------------------------------------------- /Mods/ChainedDeconstruction/Common.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EtiamNullam/Etiam-ONI-Modpack/HEAD/Mods/ChainedDeconstruction/Common.dll -------------------------------------------------------------------------------- /Mods/ChainedDeconstruction/mod_info.yaml: -------------------------------------------------------------------------------- 1 | supportedContent: ALL 2 | minimumSupportedBuild: 644960 3 | APIVersion: 2 4 | version: "3.0.3" 5 | -------------------------------------------------------------------------------- /Mods/CustomTemperatureOverlay/mod_info.yaml: -------------------------------------------------------------------------------- 1 | supportedContent: ALL 2 | minimumSupportedBuild: 651155 3 | APIVersion: 2 4 | version: "5.1.0" 5 | -------------------------------------------------------------------------------- /Mods/DoorIcons/Sprites/access_left.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EtiamNullam/Etiam-ONI-Modpack/HEAD/Mods/DoorIcons/Sprites/access_left.png -------------------------------------------------------------------------------- /Mods/DoorIcons/Sprites/access_right.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EtiamNullam/Etiam-ONI-Modpack/HEAD/Mods/DoorIcons/Sprites/access_right.png -------------------------------------------------------------------------------- /Mods/DoorIcons/Sprites/automation.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EtiamNullam/Etiam-ONI-Modpack/HEAD/Mods/DoorIcons/Sprites/automation.png -------------------------------------------------------------------------------- /Mods/LiquefiableSculptures/mod_info.yaml: -------------------------------------------------------------------------------- 1 | supportedContent: ALL 2 | minimumSupportedBuild: 651155 3 | APIVersion: 2 4 | version: "3.0.1" 5 | -------------------------------------------------------------------------------- /Tools/ClearRegolith/ClearRegolith.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EtiamNullam/Etiam-ONI-Modpack/HEAD/Tools/ClearRegolith/ClearRegolith.dll -------------------------------------------------------------------------------- /src/CustomTemperatureOverlay/mod_info.yaml: -------------------------------------------------------------------------------- 1 | supportedContent: ALL 2 | minimumSupportedBuild: 651155 3 | APIVersion: 2 4 | version: "5.1.0" 5 | -------------------------------------------------------------------------------- /src/DoorIcons/Sprites/access_custom.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EtiamNullam/Etiam-ONI-Modpack/HEAD/src/DoorIcons/Sprites/access_custom.png -------------------------------------------------------------------------------- /src/DoorIcons/Sprites/access_left.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EtiamNullam/Etiam-ONI-Modpack/HEAD/src/DoorIcons/Sprites/access_left.png -------------------------------------------------------------------------------- /src/DoorIcons/Sprites/access_right.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EtiamNullam/Etiam-ONI-Modpack/HEAD/src/DoorIcons/Sprites/access_right.png -------------------------------------------------------------------------------- /Mods/CustomTemperatureOverlay/Common.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EtiamNullam/Etiam-ONI-Modpack/HEAD/Mods/CustomTemperatureOverlay/Common.dll -------------------------------------------------------------------------------- /Mods/DisplayAllTemps/DisplayAllTemps.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EtiamNullam/Etiam-ONI-Modpack/HEAD/Mods/DisplayAllTemps/DisplayAllTemps.dll -------------------------------------------------------------------------------- /Mods/DoorIcons/Sprites/access_custom.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EtiamNullam/Etiam-ONI-Modpack/HEAD/Mods/DoorIcons/Sprites/access_custom.png -------------------------------------------------------------------------------- /Mods/DisplayAllTemps/mod_info.yaml: -------------------------------------------------------------------------------- 1 | supportedContent: ALL 2 | minimumSupportedBuild: 469369 3 | APIVersion: 2 4 | version: "2 Harmony | The Big Merge" 5 | -------------------------------------------------------------------------------- /Mods/DoorIcons/Sprites/access_restricted.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EtiamNullam/Etiam-ONI-Modpack/HEAD/Mods/DoorIcons/Sprites/access_restricted.png -------------------------------------------------------------------------------- /src/DisplayAllTemps/mod_info.yaml: -------------------------------------------------------------------------------- 1 | supportedContent: ALL 2 | minimumSupportedBuild: 469369 3 | APIVersion: 2 4 | version: "2 Harmony | The Big Merge" 5 | -------------------------------------------------------------------------------- /src/DoorIcons/Sprites/access_restricted.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EtiamNullam/Etiam-ONI-Modpack/HEAD/src/DoorIcons/Sprites/access_restricted.png -------------------------------------------------------------------------------- /Mods/RemoveDailyReports/RemoveDailyReports.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EtiamNullam/Etiam-ONI-Modpack/HEAD/Mods/RemoveDailyReports/RemoveDailyReports.dll -------------------------------------------------------------------------------- /Tools/BenchmarkGasOverlay/BenchmarkGasOverlay.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EtiamNullam/Etiam-ONI-Modpack/HEAD/Tools/BenchmarkGasOverlay/BenchmarkGasOverlay.dll -------------------------------------------------------------------------------- /src/MaterialColor/Sprites/overlay_materialColor.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EtiamNullam/Etiam-ONI-Modpack/HEAD/src/MaterialColor/Sprites/overlay_materialColor.png -------------------------------------------------------------------------------- /Mods/ChainedDeconstruction/ChainedDeconstruction.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EtiamNullam/Etiam-ONI-Modpack/HEAD/Mods/ChainedDeconstruction/ChainedDeconstruction.dll -------------------------------------------------------------------------------- /Mods/LiquefiableSculptures/LiquefiableSculptures.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EtiamNullam/Etiam-ONI-Modpack/HEAD/Mods/LiquefiableSculptures/LiquefiableSculptures.dll -------------------------------------------------------------------------------- /Mods/MaterialColor/Sprites/overlay_materialColor.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EtiamNullam/Etiam-ONI-Modpack/HEAD/Mods/MaterialColor/Sprites/overlay_materialColor.png -------------------------------------------------------------------------------- /Mods/CustomTemperatureOverlay/CustomTemperatureOverlay.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EtiamNullam/Etiam-ONI-Modpack/HEAD/Mods/CustomTemperatureOverlay/CustomTemperatureOverlay.dll -------------------------------------------------------------------------------- /src/FreeCamera/Config.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | 6 | namespace FreeCamera 7 | { 8 | public static class Config 9 | { 10 | public const float MaxZoom = 350f; 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /src/GasOverlay/State.cs: -------------------------------------------------------------------------------- 1 | using Common; 2 | 3 | namespace GasOverlay 4 | { 5 | public static class State 6 | { 7 | public static Core Common = new Core("GasOverlay", "1737859934", null, false); 8 | 9 | public static Config Config = new Config(); 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /src/MaterialColor/IDs.cs: -------------------------------------------------------------------------------- 1 | namespace MaterialColor 2 | { 3 | // TODO: rename 4 | public static class IDs 5 | { 6 | public const int ToggleMaterialColorOverlayAction = 999; 7 | 8 | public static HashedString MaterialColorOverlayHS = new HashedString("MaterialColorOverlay"); 9 | } 10 | } -------------------------------------------------------------------------------- /src/DisplayAllTemps/TemperatureUnitMultiple.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | 6 | namespace DisplayAllTemps 7 | { 8 | [Flags] 9 | public enum TemperatureUnitMultiple 10 | { 11 | None = 0, 12 | 13 | Celsius = 1, 14 | Fahrenheit = 2, 15 | Kelvin = 4, 16 | 17 | All = Celsius | Fahrenheit | Kelvin 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /Mods/MaterialColor/Config/Config.json: -------------------------------------------------------------------------------- 1 | { 2 | "Enabled": true, 3 | "Debug": false, 4 | "TileColorFactor": 2.5, 5 | "TileColorShift": 0.275, 6 | "LogElementsData": false, 7 | "ShowMissingElementColors": false, 8 | "TypeFilterInfo": { 9 | "Inclusive": false, // false to exclude buildings 10 | "ExactMatch": false, // true to match to exact bulding id 11 | "Rules": [ 12 | // "Battery" 13 | ] 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /src/MaterialColor/Config/Config.json: -------------------------------------------------------------------------------- 1 | { 2 | "Enabled": true, 3 | "Debug": false, 4 | "TileColorFactor": 2.5, 5 | "TileColorShift": 0.275, 6 | "LogElementsData": false, 7 | "ShowMissingElementColors": false, 8 | "TypeFilterInfo": { 9 | "Inclusive": false, // false to exclude buildings 10 | "ExactMatch": false, // true to match to exact bulding id 11 | "Rules": [ 12 | // "Battery" 13 | ] 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /src/Tools/Common/ConfigHelper.cs: -------------------------------------------------------------------------------- 1 | using Newtonsoft.Json; 2 | using System; 3 | using System.Collections.Generic; 4 | using System.IO; 5 | using System.Linq; 6 | using System.Text; 7 | 8 | namespace Common 9 | { 10 | public static class ConfigHelper 11 | { 12 | public static T Load(string path) 13 | { 14 | return JsonConvert.DeserializeObject(File.ReadAllText(path)); 15 | } 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /src/DoorIcons/ExtendedDoorState.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | 6 | namespace DoorIcons 7 | { 8 | public enum ExtendedDoorState 9 | { 10 | Invalid, 11 | Auto, 12 | Open, 13 | Locked, 14 | Automation, 15 | AccessLeft, 16 | AccessRight, 17 | AccessRestricted, 18 | AccessCustom, 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /src/DraggableUI/SerializeableVector2.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | 3 | namespace DraggablePanelMod 4 | { 5 | public struct SerializeableVector2 6 | { 7 | public SerializeableVector2(float x, float y) 8 | { 9 | this.x = x; 10 | this.y = y; 11 | } 12 | 13 | public float x; 14 | public float y; 15 | 16 | public Vector2 ToVector2() 17 | { 18 | return new Vector2(this.x, this.y); 19 | } 20 | } 21 | } -------------------------------------------------------------------------------- /src/DraggableUI/State.cs: -------------------------------------------------------------------------------- 1 | using Common; 2 | using DraggablePanelMod.Data; 3 | 4 | namespace DraggablePanelMod 5 | { 6 | public static class State 7 | { 8 | public static Core Common = new Core("DraggableUI", "1870540864", null, false); 9 | 10 | public static string StateFileName = "State.json"; 11 | 12 | private static DraggableUIState _uiState; 13 | 14 | public static DraggableUIState UIState => _uiState ?? (_uiState = new DraggableUIState()); 15 | } 16 | } -------------------------------------------------------------------------------- /src/MaterialColor/Helpers/MaterialHelper.cs: -------------------------------------------------------------------------------- 1 | namespace MaterialColor.Helpers 2 | { 3 | using System; 4 | 5 | using UnityEngine; 6 | 7 | public static class MaterialHelper 8 | { 9 | public static bool CellIndexToElement(int cellIndex, out Element element) 10 | { 11 | ushort cellElementIndex = Grid.ElementIdx[cellIndex]; 12 | 13 | element = ElementLoader.elements?[cellElementIndex]; 14 | 15 | return element != null; 16 | } 17 | } 18 | } -------------------------------------------------------------------------------- /src/CustomTemperatureOverlay/Data/TemperatureStep.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using UnityEngine; 6 | 7 | namespace CustomTemperatureOverlay.Data 8 | { 9 | public class TemperatureStep 10 | { 11 | public TemperatureStep(Color color, float value) 12 | { 13 | this.color = color; 14 | this.value = value; 15 | } 16 | 17 | public Color color { get; set; } 18 | 19 | public float value { get; set; } 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /src/MaterialColor/PeriodicRefresher.cs: -------------------------------------------------------------------------------- 1 | using MaterialColor.Data; 2 | using System; 3 | using System.Collections.Generic; 4 | using System.IO; 5 | using System.Linq; 6 | using System.Text; 7 | 8 | namespace MaterialColor.IO 9 | { 10 | public class PeriodicRefresher : IRender1000ms 11 | { 12 | void IRender1000ms.Render1000ms(float dt) 13 | { 14 | if (State.ConfigChanged) 15 | { 16 | Painter.Refresh(); 17 | State.ConfigChanged = false; 18 | } 19 | } 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /src/DisplayAllTemps/State.cs: -------------------------------------------------------------------------------- 1 | using Common; 2 | using System; 3 | using System.Collections.Generic; 4 | using System.Linq; 5 | using System.Text; 6 | 7 | namespace DisplayAllTemps 8 | { 9 | public static class State 10 | { 11 | public static Core Common = new Core("DisplayAllTemps", "1737903327", null, false); 12 | 13 | public static TemperatureUnitMultiple Unit = TemperatureUnitMultiple.All; 14 | 15 | public static GameUtil.TemperatureUnit LastMainUnit = GameUtil.temperatureUnit; 16 | 17 | public static readonly string ConfigFileName = "Unit.json"; 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /src/MaterialColor/Data/Config.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | 3 | namespace MaterialColor.Data 4 | { 5 | public class Config 6 | { 7 | public bool Enabled { get; set; } = true; 8 | 9 | public bool Debug { get; set; } = true; 10 | 11 | public bool LogElementsData { get; set; } = false; 12 | 13 | public bool ShowMissingElements { get; set; } 14 | 15 | public FilterInfo TypeFilterInfo { get; set; } = new FilterInfo(); 16 | 17 | public float TileColorFactor { get; set; } = 2.5f; 18 | 19 | public float TileColorShift { get; set; } = 0.275f; 20 | } 21 | } -------------------------------------------------------------------------------- /src/FreeCamera/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.InteropServices; 3 | 4 | [assembly: AssemblyTitle("FreeCamera")] 5 | [assembly: AssemblyDescription("")] 6 | [assembly: AssemblyConfiguration("")] 7 | [assembly: AssemblyCompany("")] 8 | [assembly: AssemblyProduct("FreeCamera")] 9 | [assembly: AssemblyCopyright("Copyright © 2018")] 10 | [assembly: AssemblyTrademark("")] 11 | [assembly: AssemblyCulture("")] 12 | 13 | [assembly: ComVisible(false)] 14 | 15 | [assembly: Guid("3e4c5f26-692b-4fcd-b683-6d5faaeff7d9")] 16 | 17 | [assembly: AssemblyVersion("3.0.1.0")] 18 | [assembly: AssemblyFileVersion("3.0.1.0")] 19 | -------------------------------------------------------------------------------- /src/GasOverlay/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.InteropServices; 3 | 4 | [assembly: AssemblyTitle("GasOverlay")] 5 | [assembly: AssemblyDescription("")] 6 | [assembly: AssemblyConfiguration("")] 7 | [assembly: AssemblyCompany("")] 8 | [assembly: AssemblyProduct("GasOverlay")] 9 | [assembly: AssemblyCopyright("Copyright © 2018")] 10 | [assembly: AssemblyTrademark("")] 11 | [assembly: AssemblyCulture("")] 12 | 13 | [assembly: ComVisible(false)] 14 | 15 | [assembly: Guid("4475e088-4830-4bb4-bc97-fc8acc18afcb")] 16 | 17 | [assembly: AssemblyVersion("4.2.0.0")] 18 | [assembly: AssemblyFileVersion("4.2.0.0")] 19 | -------------------------------------------------------------------------------- /src/MaterialColor/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.InteropServices; 3 | 4 | [assembly: AssemblyTitle("MaterialColor")] 5 | [assembly: AssemblyDescription("")] 6 | [assembly: AssemblyConfiguration("")] 7 | [assembly: AssemblyCompany("")] 8 | [assembly: AssemblyProduct("MaterialColor")] 9 | [assembly: AssemblyCopyright("Copyright © 2018")] 10 | [assembly: AssemblyTrademark("")] 11 | [assembly: AssemblyCulture("")] 12 | 13 | [assembly: ComVisible(false)] 14 | 15 | [assembly: Guid("faab5987-0b05-4114-808e-6c95d9eea378")] 16 | 17 | [assembly: AssemblyVersion("5.1.1.0")] 18 | [assembly: AssemblyFileVersion("5.1.1.0")] -------------------------------------------------------------------------------- /src/ChainedDeconstruction/State.cs: -------------------------------------------------------------------------------- 1 | using Common; 2 | using System; 3 | using System.Collections.Generic; 4 | using System.Linq; 5 | using System.Text; 6 | 7 | namespace ChainedDeconstruction 8 | { 9 | public static class State 10 | { 11 | public static string[] Chainables = new string[] 12 | { 13 | "Ladder", 14 | "LadderFast", 15 | "SteelLadder", 16 | "TravelTube", 17 | "FirePole" 18 | }; 19 | 20 | public static Core Common = new Core("ChainedDeconstruction", "1737893485", null, false); 21 | 22 | public static bool ChainAll = false; 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /src/DraggableUI/DraggablePanelMod.cs: -------------------------------------------------------------------------------- 1 | using HarmonyLib; 2 | using System; 3 | 4 | namespace DraggablePanelMod 5 | { 6 | [HarmonyPatch(typeof(KScreen), "OnPrefabInit")] 7 | public static class DraggablePanelModInit 8 | { 9 | public static void Prefix(KScreen __instance) 10 | { 11 | DraggablePanel.Attach(__instance); 12 | } 13 | } 14 | 15 | [HarmonyPatch(typeof(KScreen), "OnSpawn")] 16 | public static class DraggablePanelModSpawn 17 | { 18 | public static void Postfix(KScreen __instance) 19 | { 20 | DraggablePanel.SetPositionFromFile(__instance); 21 | } 22 | } 23 | } 24 | 25 | -------------------------------------------------------------------------------- /src/LiquefiableSculptures/LiquefiableSculptures.cs: -------------------------------------------------------------------------------- 1 | using HarmonyLib; 2 | 3 | namespace LiquefiableSculptures 4 | { 5 | [HarmonyPatch(typeof(BuildingTemplates))] 6 | [HarmonyPatch(nameof(BuildingTemplates.CreateBuildingDef))] 7 | public static class LiquefiableSculptures 8 | { 9 | public static void Prefix(string id, ref string[] construction_materials) 10 | { 11 | if (id == IceSculptureConfig.ID) 12 | { 13 | construction_materials = new string[] 14 | { 15 | nameof(STRINGS.MISC.TAGS.LIQUIFIABLE) 16 | }; 17 | } 18 | } 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /src/FreeCamera/Patches/RemoveConstraint.cs: -------------------------------------------------------------------------------- 1 | using HarmonyLib; 2 | using System; 3 | using System.Collections.Generic; 4 | using System.Linq; 5 | using System.Text; 6 | 7 | namespace FreeCamera.Patches 8 | { 9 | public static class RemoveConstraint 10 | { 11 | /// 12 | /// Stop constraining camera to the world. 13 | /// 14 | [HarmonyPatch(typeof(CameraController))] 15 | [HarmonyPatch("ConstrainToWorld")] 16 | public static class FreeTheCamera 17 | { 18 | public static bool Prefix() 19 | { 20 | return false; 21 | } 22 | } 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /src/GasOverlay/Config.cs: -------------------------------------------------------------------------------- 1 | using Newtonsoft.Json; 2 | using UnityEngine; 3 | 4 | namespace GasOverlay 5 | { 6 | public class Config 7 | { 8 | public Color NotGasColor = new Color(0.25f, 0.25f, 0.3f); 9 | public float MaxMass = 2.5f; 10 | public float MinimumIntensity = 0.15f; 11 | public bool ShowEarDrumPopMarker = true; 12 | public float EarPopMass = 5; 13 | public float EarPopChange = 0.2f; 14 | public double ExponentRootOf = 0.65f; 15 | 16 | /// 17 | /// 0-1, where 1 means instant and 0 means no change. 18 | /// 19 | public float InterpFactor = 0.05f; 20 | } 21 | } -------------------------------------------------------------------------------- /src/Tools/ClearRegolith/Patches/ClearRegolith.cs: -------------------------------------------------------------------------------- 1 | using Harmony; 2 | using System; 3 | using System.Collections.Generic; 4 | using System.Linq; 5 | using System.Text; 6 | using UnityEngine; 7 | 8 | namespace ClearRegolith 9 | { 10 | [HarmonyPatch(typeof(Storage))] 11 | [HarmonyPatch("OnSpawn")] 12 | public static class ClearRegolith 13 | { 14 | public static void Postfix(Storage __instance) 15 | { 16 | foreach (GameObject gameObject in __instance.items) 17 | { 18 | PrimaryElement element = gameObject.GetComponent(); 19 | 20 | if (element != null && element.ElementID == SimHashes.Regolith) 21 | { 22 | element.Units /= 10; 23 | } 24 | } 25 | } 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /Mods/GasOverlay/Config.json: -------------------------------------------------------------------------------- 1 | { 2 | "NotGasColor": { // Color applied to the cells without gas 3 | "r": 0.25, 4 | "g": 0.25, 5 | "b": 0.3, 6 | "a": 1 7 | }, 8 | "MaxMass": 2.5, // Mass (in kg) at which gas will reach max intensity 9 | "InterpFactor": 0.05, // 0 - 1, where 1 means instant change, and 0 - no change 10 | "MinimumIntensity": 0.15, // 0 - 1, intensity for low pressure gases 11 | "ExponentRootOf": 0.8, // Defines value for mathematical function across intensity range. Values below 1 will make gases easier to distinguish at lower pressure, values above 1 make it easier for high intensity (0 to infinity). (https://en.wikipedia.org/wiki/File:Mplwp_roots_01.svg) 12 | "ShowEarDrumPopMarker": true, // Whether to highlight very high pressure gas 13 | "EarPopMass": 5.0, // Mass (in kg) at which cell gas tile should highlight 14 | "EarPopChange": 0.2 // How much color will change while highlighting 15 | } 16 | -------------------------------------------------------------------------------- /src/GasOverlay/Config.json: -------------------------------------------------------------------------------- 1 | { 2 | "NotGasColor": { // Color applied to the cells without gas 3 | "r": 0.25, 4 | "g": 0.25, 5 | "b": 0.3, 6 | "a": 1 7 | }, 8 | "MaxMass": 2.5, // Mass (in kg) at which gas will reach max intensity 9 | "InterpFactor": 0.05, // 0 - 1, where 1 means instant change, and 0 - no change 10 | "MinimumIntensity": 0.15, // 0 - 1, intensity for low pressure gases 11 | "ExponentRootOf": 0.8, // Defines value for mathematical function across intensity range. Values below 1 will make gases easier to distinguish at lower pressure, values above 1 make it easier for high intensity (0 to infinity). (https://en.wikipedia.org/wiki/File:Mplwp_roots_01.svg) 12 | "ShowEarDrumPopMarker": true, // Whether to highlight very high pressure gas 13 | "EarPopMass": 5.0, // Mass (in kg) at which cell gas tile should highlight 14 | "EarPopChange": 0.2 // How much color will change while highlighting 15 | } 16 | -------------------------------------------------------------------------------- /src/MaterialColor/Data/FilterInfo.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Text.RegularExpressions; 6 | 7 | namespace MaterialColor.Data 8 | { 9 | /// 10 | /// Provides filtering method and rules. Used to find matching types to apply color to in TextFilter. 11 | /// 12 | public class FilterInfo 13 | { 14 | /// Rules to check against 15 | /// True: check if there is rule for it, False: check if there is no rule for it 16 | public FilterInfo(IEnumerable rules = null) 17 | { 18 | this.Rules = new List(); 19 | 20 | if (rules != null) 21 | { 22 | this.Rules.AddRange(rules); 23 | } 24 | } 25 | 26 | public bool Inclusive { get; set; } = false; 27 | public bool ExactMatch { get; set; } = false; 28 | public List Rules { get; private set; } 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /src/MaterialColor/Extensions/ColorExtensions.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using UnityEngine; 6 | 7 | namespace MaterialColor.Extensions 8 | { 9 | public static class ColorExtensions 10 | { 11 | public static Color ToTileColor(this Color color) 12 | { 13 | if (color.a == 0) 14 | { 15 | color = new Color 16 | ( 17 | ProcessTileColorCompponent(color.r), 18 | ProcessTileColorCompponent(color.g), 19 | ProcessTileColorCompponent(color.b), 20 | 1 21 | ); 22 | } 23 | else 24 | { 25 | color.a = 1; 26 | } 27 | 28 | return color; 29 | } 30 | 31 | private static float ProcessTileColorCompponent(float colorComponent) 32 | { 33 | return (colorComponent + State.Config.TileColorShift) * State.Config.TileColorFactor; 34 | } 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /src/SaveNoDailyReports/Patches/ClearOldReports.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using HarmonyLib; 6 | 7 | namespace RemoveDailyReports.Patches 8 | { 9 | [HarmonyPatch(typeof(ReportManager))] 10 | [HarmonyPatch("OnNightTime")] 11 | public static class ClearOldReports_AtNight 12 | { 13 | private static readonly int ToSpare = 10; 14 | 15 | public static void Postfix(ref List ___dailyReports) 16 | { 17 | try 18 | { 19 | int reportsCount = ___dailyReports.Count; 20 | 21 | if (reportsCount > ToSpare) 22 | { 23 | ___dailyReports 24 | .Take(reportsCount - ToSpare) 25 | .Do(report => report.reportEntries.Clear()); 26 | } 27 | } 28 | catch (Exception e) 29 | { 30 | Debug.Log("RDR: Error while clearing old reports at night: " + e); 31 | } 32 | } 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /src/MaterialColor/Data/ElementColor.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using UnityEngine; 6 | 7 | namespace MaterialColor.Data 8 | { 9 | public class ElementColor 10 | { 11 | public float Red { get; set; } = 0; 12 | public float Green { get; set; } = 0; 13 | public float Blue { get; set; } = 0; 14 | 15 | public bool DarkMode { get; set; } = false; 16 | 17 | public ElementColor ForEachColorValue(Func action) 18 | { 19 | return new ElementColor 20 | { 21 | Red = action.Invoke(this.Red), 22 | Green = action.Invoke(this.Green), 23 | Blue = action.Invoke(this.Blue) 24 | }; 25 | } 26 | 27 | public Color ToColor() 28 | { 29 | return new Color 30 | { 31 | r = this.Red, 32 | g = this.Green, 33 | b = this.Blue, 34 | a = this.DarkMode ? 1 : 0 35 | }; 36 | } 37 | 38 | public override string ToString() 39 | { 40 | return $"ElementColor({this.Red}, {this.Green}, {this.Blue}, DarkMode: {this.DarkMode})"; 41 | } 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /src/DisplayAllTemps/Patches/WatchConfig.cs: -------------------------------------------------------------------------------- 1 | using HarmonyLib; 2 | using Newtonsoft.Json; 3 | using System; 4 | using System.Collections.Generic; 5 | using System.IO; 6 | using System.Linq; 7 | using System.Text; 8 | 9 | namespace DisplayAllTemps.Patches 10 | { 11 | public class GameLaunch : KMod.UserMod2 12 | { 13 | public override void OnLoad(Harmony harmony) 14 | { 15 | base.OnLoad(harmony); 16 | 17 | try 18 | { 19 | if (State.Common.ConfigPath == null) 20 | { 21 | return; 22 | } 23 | 24 | if (State.Common.ConfigExists(State.ConfigFileName)) 25 | { 26 | State.Unit = State.Common.LoadConfig(State.ConfigFileName); 27 | } 28 | else 29 | { 30 | State.Common.SaveConfig(State.ConfigFileName, TemperatureUnitMultiple.All); 31 | } 32 | 33 | State.Common.WatchConfig(State.ConfigFileName, (unit) => { State.Unit = unit; }); 34 | } 35 | catch (Exception e) 36 | { 37 | State.Common.Logger.Log("Failed to start config watch.", e); 38 | } 39 | } 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /src/DraggableUI/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.InteropServices; 3 | 4 | // General Information about an assembly is controlled through the following 5 | // set of attributes. Change these attribute values to modify the information 6 | // associated with an assembly. 7 | [assembly: AssemblyTitle("DraggableUI")] 8 | [assembly: AssemblyDescription("")] 9 | [assembly: AssemblyConfiguration("")] 10 | [assembly: AssemblyCompany("")] 11 | [assembly: AssemblyProduct("DraggableUI")] 12 | [assembly: AssemblyCopyright("Copyright © 2018")] 13 | [assembly: AssemblyTrademark("")] 14 | [assembly: AssemblyCulture("")] 15 | 16 | // Setting ComVisible to false makes the types in this assembly not visible 17 | // to COM components. If you need to access a type in this assembly from 18 | // COM, set the ComVisible attribute to true on that type. 19 | [assembly: ComVisible(false)] 20 | 21 | // The following GUID is for the ID of the typelib if this project is exposed to COM 22 | [assembly: Guid("93cde770-6e29-4b01-b0dd-a3b586fbb111")] 23 | 24 | // Version information for an assembly consists of the following four values: 25 | // 26 | // Major Version 27 | // Minor Version 28 | // Build Number 29 | // Revision 30 | // 31 | // You can specify all the values or you can default the Build and Revision Numbers 32 | // by using the '*' as shown below: 33 | // [assembly: AssemblyVersion("1.0.*")] 34 | [assembly: AssemblyVersion("5.0.1.0")] 35 | [assembly: AssemblyFileVersion("5.0.1.0")] 36 | -------------------------------------------------------------------------------- /src/MaterialColor/State.cs: -------------------------------------------------------------------------------- 1 | namespace MaterialColor 2 | { 3 | using JetBrains.Annotations; 4 | using MaterialColor.Data; 5 | using MaterialColor.IO; 6 | using Newtonsoft.Json; 7 | using System; 8 | using System.Collections.Generic; 9 | using System.IO; 10 | using UnityEngine; 11 | using System.Linq; 12 | using Common; 13 | 14 | public static class State 15 | { 16 | public static Color?[] TileColors; 17 | 18 | public static bool ConfigChanged; 19 | 20 | public static Core Common = new Core("MaterialColor", "1739635014", "Config", false); 21 | 22 | private static Config _config = new Config(); 23 | 24 | [NotNull] 25 | public static Config Config 26 | { 27 | get 28 | { 29 | return _config; 30 | } 31 | set 32 | { 33 | _config = value; 34 | 35 | try 36 | { 37 | TypeFilter = new TextFilter(_config.TypeFilterInfo); 38 | } 39 | catch (Exception e) 40 | { 41 | Common.Logger.LogOnce("Error while creating new TextFilter object", e); 42 | } 43 | } 44 | } 45 | 46 | public static TextFilter TypeFilter { get; private set; } 47 | 48 | [NotNull] 49 | public static Dictionary ElementColors { get; set; } = new Dictionary(); 50 | } 51 | } -------------------------------------------------------------------------------- /src/Tools/Common/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | using System.Runtime.InteropServices; 4 | 5 | // General Information about an assembly is controlled through the following 6 | // set of attributes. Change these attribute values to modify the information 7 | // associated with an assembly. 8 | [assembly: AssemblyTitle("Common")] 9 | [assembly: AssemblyDescription("")] 10 | [assembly: AssemblyConfiguration("")] 11 | [assembly: AssemblyCompany("")] 12 | [assembly: AssemblyProduct("Common")] 13 | [assembly: AssemblyCopyright("Copyright © 2019")] 14 | [assembly: AssemblyTrademark("")] 15 | [assembly: AssemblyCulture("")] 16 | 17 | // Setting ComVisible to false makes the types in this assembly not visible 18 | // to COM components. If you need to access a type in this assembly from 19 | // COM, set the ComVisible attribute to true on that type. 20 | [assembly: ComVisible(false)] 21 | 22 | // The following GUID is for the ID of the typelib if this project is exposed to COM 23 | [assembly: Guid("b0fe7a0a-c62d-41ae-94b3-da3429806a29")] 24 | 25 | // Version information for an assembly consists of the following four values: 26 | // 27 | // Major Version 28 | // Minor Version 29 | // Build Number 30 | // Revision 31 | // 32 | // You can specify all the values or you can default the Build and Revision Numbers 33 | // by using the '*' as shown below: 34 | // [assembly: AssemblyVersion("1.0.*")] 35 | [assembly: AssemblyVersion("3.2.1.0")] 36 | [assembly: AssemblyFileVersion("3.2.1.0")] 37 | -------------------------------------------------------------------------------- /src/DoorIcons/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | using System.Runtime.InteropServices; 4 | 5 | // General Information about an assembly is controlled through the following 6 | // set of attributes. Change these attribute values to modify the information 7 | // associated with an assembly. 8 | [assembly: AssemblyTitle("DoorIcons")] 9 | [assembly: AssemblyDescription("")] 10 | [assembly: AssemblyConfiguration("")] 11 | [assembly: AssemblyCompany("")] 12 | [assembly: AssemblyProduct("DoorIcons")] 13 | [assembly: AssemblyCopyright("Copyright © 2019")] 14 | [assembly: AssemblyTrademark("")] 15 | [assembly: AssemblyCulture("")] 16 | 17 | // Setting ComVisible to false makes the types in this assembly not visible 18 | // to COM components. If you need to access a type in this assembly from 19 | // COM, set the ComVisible attribute to true on that type. 20 | [assembly: ComVisible(false)] 21 | 22 | // The following GUID is for the ID of the typelib if this project is exposed to COM 23 | [assembly: Guid("1efda498-d0b3-417c-957d-066d46a4ec02")] 24 | 25 | // Version information for an assembly consists of the following four values: 26 | // 27 | // Major Version 28 | // Minor Version 29 | // Build Number 30 | // Revision 31 | // 32 | // You can specify all the values or you can default the Build and Revision Numbers 33 | // by using the '*' as shown below: 34 | // [assembly: AssemblyVersion("1.0.*")] 35 | [assembly: AssemblyVersion("3.1.0.0")] 36 | [assembly: AssemblyFileVersion("3.1.0.0")] 37 | -------------------------------------------------------------------------------- /src/DisplayAllTemps/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | using System.Runtime.InteropServices; 4 | 5 | // General Information about an assembly is controlled through the following 6 | // set of attributes. Change these attribute values to modify the information 7 | // associated with an assembly. 8 | [assembly: AssemblyTitle("DisplayAllTemps")] 9 | [assembly: AssemblyDescription("")] 10 | [assembly: AssemblyConfiguration("")] 11 | [assembly: AssemblyCompany("")] 12 | [assembly: AssemblyProduct("DisplayAllTemps")] 13 | [assembly: AssemblyCopyright("Copyright © 2019")] 14 | [assembly: AssemblyTrademark("")] 15 | [assembly: AssemblyCulture("")] 16 | 17 | // Setting ComVisible to false makes the types in this assembly not visible 18 | // to COM components. If you need to access a type in this assembly from 19 | // COM, set the ComVisible attribute to true on that type. 20 | [assembly: ComVisible(false)] 21 | 22 | // The following GUID is for the ID of the typelib if this project is exposed to COM 23 | [assembly: Guid("f90017d3-dac2-4971-b0b2-e96b2adb6a9f")] 24 | 25 | // Version information for an assembly consists of the following four values: 26 | // 27 | // Major Version 28 | // Minor Version 29 | // Build Number 30 | // Revision 31 | // 32 | // You can specify all the values or you can default the Build and Revision Numbers 33 | // by using the '*' as shown below: 34 | // [assembly: AssemblyVersion("1.0.*")] 35 | [assembly: AssemblyVersion("4.0.0.0")] 36 | [assembly: AssemblyFileVersion("4.0.0.0")] 37 | -------------------------------------------------------------------------------- /src/Tools/ClearRegolith/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | using System.Runtime.InteropServices; 4 | 5 | // General Information about an assembly is controlled through the following 6 | // set of attributes. Change these attribute values to modify the information 7 | // associated with an assembly. 8 | [assembly: AssemblyTitle("ClearRegolith")] 9 | [assembly: AssemblyDescription("")] 10 | [assembly: AssemblyConfiguration("")] 11 | [assembly: AssemblyCompany("")] 12 | [assembly: AssemblyProduct("ClearRegolith")] 13 | [assembly: AssemblyCopyright("Copyright © 2019")] 14 | [assembly: AssemblyTrademark("")] 15 | [assembly: AssemblyCulture("")] 16 | 17 | // Setting ComVisible to false makes the types in this assembly not visible 18 | // to COM components. If you need to access a type in this assembly from 19 | // COM, set the ComVisible attribute to true on that type. 20 | [assembly: ComVisible(false)] 21 | 22 | // The following GUID is for the ID of the typelib if this project is exposed to COM 23 | [assembly: Guid("886d1096-5d6b-4f42-a793-1cdf6f73e96b")] 24 | 25 | // Version information for an assembly consists of the following four values: 26 | // 27 | // Major Version 28 | // Minor Version 29 | // Build Number 30 | // Revision 31 | // 32 | // You can specify all the values or you can default the Build and Revision Numbers 33 | // by using the '*' as shown below: 34 | // [assembly: AssemblyVersion("1.0.*")] 35 | [assembly: AssemblyVersion("1.0.0.0")] 36 | [assembly: AssemblyFileVersion("1.0.0.0")] 37 | -------------------------------------------------------------------------------- /src/FreeCamera/Patches/IncreaseMaxZoom.cs: -------------------------------------------------------------------------------- 1 | using HarmonyLib; 2 | using System; 3 | 4 | namespace FreeCamera.Patches 5 | { 6 | [HarmonyPatch(typeof(CameraController))] 7 | [HarmonyPatch("OnPrefabInit")] 8 | public static class CameraController_OnPrefabInit_SetMaxZoom 9 | { 10 | public static void Postfix() 11 | { 12 | CameraController.Instance.SetMaxOrthographicSize(Config.MaxZoom); 13 | } 14 | } 15 | 16 | [HarmonyPatch(typeof(NewBaseScreen))] 17 | [HarmonyPatch(nameof(NewBaseScreen.SetInitialCamera))] 18 | public static class NewBaseScreen_SetInitialCamera_SetMaxZoom 19 | { 20 | public static void Postfix() 21 | { 22 | CameraController.Instance.SetMaxOrthographicSize(Config.MaxZoom); 23 | } 24 | } 25 | 26 | [HarmonyPatch(typeof(WattsonMessage))] 27 | [HarmonyPatch("OnDeactivate")] 28 | public static class WattsonMessage_OnDeactivate_SetMaxZoom_AfterDelay 29 | { 30 | public static void Postfix() 31 | { 32 | try 33 | { 34 | UIScheduler.Instance.Schedule 35 | ( 36 | "setZoomAfter_fadeInUI", 37 | 3, 38 | data => CameraController.Instance.SetMaxOrthographicSize(Config.MaxZoom) 39 | ); 40 | } 41 | catch (Exception e) 42 | { 43 | Debug.Log("FreeCamera: Failed to schedule a change of max camera zoom after world start." + e); 44 | } 45 | } 46 | } 47 | } 48 | -------------------------------------------------------------------------------- /src/SaveNoDailyReports/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | using System.Runtime.InteropServices; 4 | 5 | // General Information about an assembly is controlled through the following 6 | // set of attributes. Change these attribute values to modify the information 7 | // associated with an assembly. 8 | [assembly: AssemblyTitle("RemoveDailyReports")] 9 | [assembly: AssemblyDescription("")] 10 | [assembly: AssemblyConfiguration("")] 11 | [assembly: AssemblyCompany("")] 12 | [assembly: AssemblyProduct("RemoveDailyReports")] 13 | [assembly: AssemblyCopyright("Copyright © 2019")] 14 | [assembly: AssemblyTrademark("")] 15 | [assembly: AssemblyCulture("")] 16 | 17 | // Setting ComVisible to false makes the types in this assembly not visible 18 | // to COM components. If you need to access a type in this assembly from 19 | // COM, set the ComVisible attribute to true on that type. 20 | [assembly: ComVisible(false)] 21 | 22 | // The following GUID is for the ID of the typelib if this project is exposed to COM 23 | [assembly: Guid("d45b80b8-8950-4ed4-8ed8-3a044ff4d9c9")] 24 | 25 | // Version information for an assembly consists of the following four values: 26 | // 27 | // Major Version 28 | // Minor Version 29 | // Build Number 30 | // Revision 31 | // 32 | // You can specify all the values or you can default the Build and Revision Numbers 33 | // by using the '*' as shown below: 34 | // [assembly: AssemblyVersion("1.0.*")] 35 | [assembly: AssemblyVersion("4.0.1.0")] 36 | [assembly: AssemblyFileVersion("4.0.1.0")] 37 | -------------------------------------------------------------------------------- /src/ChainedDeconstruction/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | using System.Runtime.InteropServices; 4 | 5 | // General Information about an assembly is controlled through the following 6 | // set of attributes. Change these attribute values to modify the information 7 | // associated with an assembly. 8 | [assembly: AssemblyTitle("ChainedDeconstruction")] 9 | [assembly: AssemblyDescription("")] 10 | [assembly: AssemblyConfiguration("")] 11 | [assembly: AssemblyCompany("")] 12 | [assembly: AssemblyProduct("ChainedDeconstruction")] 13 | [assembly: AssemblyCopyright("Copyright © 2019")] 14 | [assembly: AssemblyTrademark("")] 15 | [assembly: AssemblyCulture("")] 16 | 17 | // Setting ComVisible to false makes the types in this assembly not visible 18 | // to COM components. If you need to access a type in this assembly from 19 | // COM, set the ComVisible attribute to true on that type. 20 | [assembly: ComVisible(false)] 21 | 22 | // The following GUID is for the ID of the typelib if this project is exposed to COM 23 | [assembly: Guid("20dea568-f78f-4891-9c9e-ea79d1403758")] 24 | 25 | // Version information for an assembly consists of the following four values: 26 | // 27 | // Major Version 28 | // Minor Version 29 | // Build Number 30 | // Revision 31 | // 32 | // You can specify all the values or you can default the Build and Revision Numbers 33 | // by using the '*' as shown below: 34 | // [assembly: AssemblyVersion("1.0.*")] 35 | [assembly: AssemblyVersion("3.0.3.0")] 36 | [assembly: AssemblyFileVersion("3.0.3.0")] 37 | -------------------------------------------------------------------------------- /src/LiquefiableSculptures/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | using System.Runtime.InteropServices; 4 | 5 | // General Information about an assembly is controlled through the following 6 | // set of attributes. Change these attribute values to modify the information 7 | // associated with an assembly. 8 | [assembly: AssemblyTitle("LiquefiableSculptures")] 9 | [assembly: AssemblyDescription("")] 10 | [assembly: AssemblyConfiguration("")] 11 | [assembly: AssemblyCompany("")] 12 | [assembly: AssemblyProduct("LiquefiableSculptures")] 13 | [assembly: AssemblyCopyright("Copyright © 2019")] 14 | [assembly: AssemblyTrademark("")] 15 | [assembly: AssemblyCulture("")] 16 | 17 | // Setting ComVisible to false makes the types in this assembly not visible 18 | // to COM components. If you need to access a type in this assembly from 19 | // COM, set the ComVisible attribute to true on that type. 20 | [assembly: ComVisible(false)] 21 | 22 | // The following GUID is for the ID of the typelib if this project is exposed to COM 23 | [assembly: Guid("bcb946c1-3237-4163-967d-4dc0f491683c")] 24 | 25 | // Version information for an assembly consists of the following four values: 26 | // 27 | // Major Version 28 | // Minor Version 29 | // Build Number 30 | // Revision 31 | // 32 | // You can specify all the values or you can default the Build and Revision Numbers 33 | // by using the '*' as shown below: 34 | // [assembly: AssemblyVersion("1.0.*")] 35 | [assembly: AssemblyVersion("3.0.1.0")] 36 | [assembly: AssemblyFileVersion("3.0.1.0")] 37 | -------------------------------------------------------------------------------- /src/Tools/BenchmarkGasOverlay/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | using System.Runtime.InteropServices; 4 | 5 | // General Information about an assembly is controlled through the following 6 | // set of attributes. Change these attribute values to modify the information 7 | // associated with an assembly. 8 | [assembly: AssemblyTitle("BenchmarkGasOverlay")] 9 | [assembly: AssemblyDescription("")] 10 | [assembly: AssemblyConfiguration("")] 11 | [assembly: AssemblyCompany("")] 12 | [assembly: AssemblyProduct("BenchmarkGasOverlay")] 13 | [assembly: AssemblyCopyright("Copyright © 2019")] 14 | [assembly: AssemblyTrademark("")] 15 | [assembly: AssemblyCulture("")] 16 | 17 | // Setting ComVisible to false makes the types in this assembly not visible 18 | // to COM components. If you need to access a type in this assembly from 19 | // COM, set the ComVisible attribute to true on that type. 20 | [assembly: ComVisible(false)] 21 | 22 | // The following GUID is for the ID of the typelib if this project is exposed to COM 23 | [assembly: Guid("f10b8ee2-8869-46e1-a0f3-8bc189dfa55e")] 24 | 25 | // Version information for an assembly consists of the following four values: 26 | // 27 | // Major Version 28 | // Minor Version 29 | // Build Number 30 | // Revision 31 | // 32 | // You can specify all the values or you can default the Build and Revision Numbers 33 | // by using the '*' as shown below: 34 | // [assembly: AssemblyVersion("1.0.*")] 35 | [assembly: AssemblyVersion("1.0.0.0")] 36 | [assembly: AssemblyFileVersion("1.0.0.0")] 37 | -------------------------------------------------------------------------------- /src/CustomTemperatureOverlay/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | using System.Runtime.InteropServices; 4 | 5 | // General Information about an assembly is controlled through the following 6 | // set of attributes. Change these attribute values to modify the information 7 | // associated with an assembly. 8 | [assembly: AssemblyTitle("CustomTemperatureOverlay")] 9 | [assembly: AssemblyDescription("")] 10 | [assembly: AssemblyConfiguration("")] 11 | [assembly: AssemblyCompany("")] 12 | [assembly: AssemblyProduct("CustomTemperatureOverlay")] 13 | [assembly: AssemblyCopyright("Copyright © 2019")] 14 | [assembly: AssemblyTrademark("")] 15 | [assembly: AssemblyCulture("")] 16 | 17 | // Setting ComVisible to false makes the types in this assembly not visible 18 | // to COM components. If you need to access a type in this assembly from 19 | // COM, set the ComVisible attribute to true on that type. 20 | [assembly: ComVisible(false)] 21 | 22 | // The following GUID is for the ID of the typelib if this project is exposed to COM 23 | [assembly: Guid("92e021fe-3ccc-43b1-984d-9c48ca427610")] 24 | 25 | // Version information for an assembly consists of the following four values: 26 | // 27 | // Major Version 28 | // Minor Version 29 | // Build Number 30 | // Revision 31 | // 32 | // You can specify all the values or you can default the Build and Revision Numbers 33 | // by using the '*' as shown below: 34 | // [assembly: AssemblyVersion("1.0.*")] 35 | [assembly: AssemblyVersion("5.1.0.0")] 36 | [assembly: AssemblyFileVersion("5.1.0.0")] 37 | -------------------------------------------------------------------------------- /src/MaterialColor/Helpers/ColorHelper.cs: -------------------------------------------------------------------------------- 1 | namespace MaterialColor.Helpers 2 | { 3 | using Extensions; 4 | using MaterialColor.Data; 5 | using System; 6 | using UnityEngine; 7 | 8 | public static class ColorHelper 9 | { 10 | public static readonly Color DefaultColor = new Color(1, 1, 1, 1); 11 | public static readonly Color InvalidColor = new Color(1, 0, 1, 1); 12 | 13 | /// 14 | /// Tries to get material color for given component, if not possible extracts substance.conduitColour, then uses white color as last fallback. 15 | /// 16 | public static Color GetComponentMaterialColor(Component component) 17 | { 18 | if (State.Config.Enabled) 19 | { 20 | PrimaryElement primaryElement = component.GetComponent(); 21 | 22 | if (primaryElement != null) 23 | { 24 | SimHashes material = primaryElement.ElementID; 25 | 26 | return State.ElementColors.TryGetValue(material, out ElementColor elementColor) 27 | ? elementColor.ToColor() 28 | : ExtractGameColor(primaryElement); 29 | } 30 | } 31 | 32 | return ColorHelper.DefaultColor; 33 | } 34 | 35 | private static Color ExtractGameColor(PrimaryElement primaryElement) 36 | { 37 | Color resultColor = primaryElement.Element.substance.colour; 38 | resultColor.a = 1; 39 | 40 | return resultColor; 41 | } 42 | } 43 | } -------------------------------------------------------------------------------- /src/CustomTemperatureOverlay/State.cs: -------------------------------------------------------------------------------- 1 | using Common; 2 | using CustomTemperatureOverlay.Data; 3 | using System; 4 | using System.Collections.Generic; 5 | using System.Linq; 6 | using System.Text; 7 | using UnityEngine; 8 | 9 | namespace CustomTemperatureOverlay 10 | { 11 | public static class State 12 | { 13 | public static Core Common = new Core("CustomTemperatureOverlay", "1878592057", null, true); 14 | 15 | public const string ConfigFileName = "Config.json"; 16 | 17 | public static TemperatureStep[] Steps = new[] 18 | { 19 | new TemperatureStep // Exact Absolute Zero 20 | ( 21 | new Color(1, 1, 1, 1), 22 | 0 23 | ), 24 | new TemperatureStep // Near Absolute Zero 25 | ( 26 | new Color(0.35f, 0, 1, 1), 27 | 5 28 | ), 29 | new TemperatureStep // Coldest Ice Biome 30 | ( 31 | new Color(0.1f, 0.1f, 1, 1), 32 | 273-60 33 | ), 34 | new TemperatureStep // Temperate 35 | ( 36 | new Color(0, 1, 0, 1), 37 | 273+20 38 | ), 39 | new TemperatureStep // Warm 40 | ( 41 | new Color(1, 1, 0, 1), 42 | 273+35 43 | ), 44 | new TemperatureStep // Hot 45 | ( 46 | new Color(1, 0.5f, 0, 1), 47 | 273+60 48 | ), 49 | new TemperatureStep // Hot Steam 50 | ( 51 | new Color(0.9f, 0, 0, 1), 52 | 273+125 53 | ), 54 | new TemperatureStep // Hot Magma 55 | ( 56 | new Color(1, 0.1f, 0.45f, 1), 57 | 273+2000 58 | ), 59 | }; 60 | } 61 | } 62 | 63 | -------------------------------------------------------------------------------- /Mods/CustomTemperatureOverlay/Config.json: -------------------------------------------------------------------------------- 1 | [ 2 | // You can configure the mod here, make sure to backup your changes in a different place though as currently any changes will be overwritten when I release version of this mod. 3 | 4 | // Color elements range from 0 - 1, for example "color": {"r": 1","g": 1,"b": 0,"a": 1} will be yellow. 5 | 6 | // "value" represents Kelvin (0 or more) at which the color should apply, any temperature in between is interpolated 7 | 8 | // It's best to keep the game running in the background when you modify the config, as you can see the effect immediately when you save this file. 9 | 10 | // You can set up to 8 values here. 11 | 12 | { // Exact Absolute Zero 13 | "color": { 14 | "r": 1, 15 | "g": 1, 16 | "b": 1, 17 | "a": 1 18 | }, 19 | "value": 0 20 | }, 21 | { // Near Absolute Zero 22 | "color": { 23 | "r": 0.35, 24 | "g": 0, 25 | "b": 1, 26 | "a": 1 27 | }, 28 | "value": 5 29 | }, 30 | { // Coldest Ice Biome 31 | "color": { 32 | "r": 0.1, 33 | "g": 0.1, 34 | "b": 1, 35 | "a": 1 36 | }, 37 | "value": 213 38 | }, 39 | { // Temperate 40 | "color": { 41 | "r": 0, 42 | "g": 1, 43 | "b": 0, 44 | "a": 1 45 | }, 46 | "value": 293 47 | }, 48 | { // Warm 49 | "color": { 50 | "r": 1, 51 | "g": 1, 52 | "b": 0, 53 | "a": 1 54 | }, 55 | "value": 308 56 | }, 57 | { // Hot 58 | "color": { 59 | "r": 1, 60 | "g": 0.5, 61 | "b": 0, 62 | "a": 1 63 | }, 64 | "value": 333 65 | }, 66 | { // Hot Steam 67 | "color": { 68 | "r": 0.9, 69 | "g": 0, 70 | "b": 0, 71 | "a": 1 72 | }, 73 | "value": 398 74 | }, 75 | { // Hot Magma 76 | "color": { 77 | "r": 1, 78 | "g": 0.1, 79 | "b": 0.45, 80 | "a": 1 81 | }, 82 | "value": 2273 83 | } 84 | ] 85 | -------------------------------------------------------------------------------- /src/CustomTemperatureOverlay/Config.json: -------------------------------------------------------------------------------- 1 | [ 2 | // You can configure the mod here, make sure to backup your changes in a different place though as currently any changes will be overwritten when I release version of this mod. 3 | 4 | // Color elements range from 0 - 1, for example "color": {"r": 1","g": 1,"b": 0,"a": 1} will be yellow. 5 | 6 | // "value" represents Kelvin (0 or more) at which the color should apply, any temperature in between is interpolated 7 | 8 | // It's best to keep the game running in the background when you modify the config, as you can see the effect immediately when you save this file. 9 | 10 | // You can set up to 8 values here. 11 | 12 | { // Exact Absolute Zero 13 | "color": { 14 | "r": 1, 15 | "g": 1, 16 | "b": 1, 17 | "a": 1 18 | }, 19 | "value": 0 20 | }, 21 | { // Near Absolute Zero 22 | "color": { 23 | "r": 0.35, 24 | "g": 0, 25 | "b": 1, 26 | "a": 1 27 | }, 28 | "value": 5 29 | }, 30 | { // Coldest Ice Biome 31 | "color": { 32 | "r": 0.1, 33 | "g": 0.1, 34 | "b": 1, 35 | "a": 1 36 | }, 37 | "value": 213 38 | }, 39 | { // Temperate 40 | "color": { 41 | "r": 0, 42 | "g": 1, 43 | "b": 0, 44 | "a": 1 45 | }, 46 | "value": 293 47 | }, 48 | { // Warm 49 | "color": { 50 | "r": 1, 51 | "g": 1, 52 | "b": 0, 53 | "a": 1 54 | }, 55 | "value": 308 56 | }, 57 | { // Hot 58 | "color": { 59 | "r": 1, 60 | "g": 0.5, 61 | "b": 0, 62 | "a": 1 63 | }, 64 | "value": 333 65 | }, 66 | { // Hot Steam 67 | "color": { 68 | "r": 0.9, 69 | "g": 0, 70 | "b": 0, 71 | "a": 1 72 | }, 73 | "value": 398 74 | }, 75 | { // Hot Magma 76 | "color": { 77 | "r": 1, 78 | "g": 0.1, 79 | "b": 0.45, 80 | "a": 1 81 | }, 82 | "value": 2273 83 | } 84 | ] 85 | -------------------------------------------------------------------------------- /src/CustomTemperatureOverlay/Patches.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using HarmonyLib; 4 | using UnityEngine; 5 | 6 | namespace CustomTemperatureOverlay 7 | { 8 | public class Patches : KMod.UserMod2 9 | { 10 | public override void OnLoad(Harmony harmony) 11 | { 12 | base.OnLoad(harmony); 13 | 14 | Mod.Config.Load(); 15 | Mod.Config.Watch(); 16 | } 17 | 18 | [HarmonyPatch(typeof(SimDebugView))] 19 | [HarmonyPatch("NormalizedTemperature")] 20 | public static class SimDebugView_NormalizedTemperature 21 | { 22 | public static bool Prefix(float actualTemperature, ref Color __result) 23 | { 24 | try 25 | { 26 | if (Game.Instance.temperatureOverlayMode != Game.TemperatureOverlayModes.AbsoluteTemperature) 27 | { 28 | return true; 29 | } 30 | 31 | __result = Mod.GetTemperatureColor(actualTemperature); 32 | 33 | return false; 34 | } 35 | catch (Exception e) 36 | { 37 | State.Common.Logger.LogOnce("Failed to calculate normalized temperature", e); 38 | } 39 | 40 | return true; 41 | } 42 | } 43 | 44 | [HarmonyPatch(typeof(OverlayModes.Temperature))] 45 | [HarmonyPatch("RefreshLegendValues")] 46 | public static class OverlayModes_RefreshLegendValues 47 | { 48 | public static void Postfix(List ___temperatureLegend) 49 | { 50 | try 51 | { 52 | Mod.UpdateTemperatureLegend(ref ___temperatureLegend); 53 | } 54 | catch (Exception e) 55 | { 56 | State.Common.Logger.LogOnce("Failed to update temperature legend", e); 57 | } 58 | } 59 | } 60 | } 61 | } 62 | -------------------------------------------------------------------------------- /src/MaterialColor/TextFilter.cs: -------------------------------------------------------------------------------- 1 | using MaterialColor.Data; 2 | using System; 3 | using System.Collections.Generic; 4 | using System.Linq; 5 | using System.Text; 6 | 7 | namespace MaterialColor 8 | { 9 | /// 10 | /// Filters text based on method and rules supplied. 11 | /// Designed for filtering building for coloring in HarmonyPatches.UpdateBuildingColor. 12 | /// 13 | public class TextFilter 14 | { 15 | /// 16 | /// Chooses strategy for filtering based on info supplied. 17 | /// 18 | public TextFilter(FilterInfo info) 19 | { 20 | this.Rules = info.Rules; 21 | 22 | if (info.Inclusive) 23 | { 24 | if (info.ExactMatch) 25 | { 26 | this.Check = this.InclusiveExactCheck; 27 | } 28 | else 29 | { 30 | this.Check = this.InclusiveContainsCheck; 31 | } 32 | } 33 | else 34 | { 35 | if (info.ExactMatch) 36 | { 37 | this.Check = this.ExclusiveExactCheck; 38 | } 39 | else 40 | { 41 | this.Check = this.ExclusiveContainsCheck; 42 | } 43 | } 44 | } 45 | 46 | /// 47 | /// Checks if value passes through the filter's ruleset. 48 | /// 49 | public Func Check { get; private set; } 50 | 51 | private readonly List Rules; 52 | 53 | private bool InclusiveExactCheck(string value) 54 | => this.Rules.Any(rule => value.Equals(rule)); 55 | 56 | private bool ExclusiveExactCheck(string value) 57 | => !this.Rules.Any(rule => value.Equals(rule)); 58 | 59 | private bool InclusiveContainsCheck(string value) 60 | => this.Rules.Any(rule => value.Contains(rule)); 61 | 62 | private bool ExclusiveContainsCheck(string value) 63 | => !this.Rules.Any(rule => value.Contains(rule)); 64 | } 65 | } 66 | -------------------------------------------------------------------------------- /src/Tools/Common/Logger.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | 6 | namespace Common 7 | { 8 | public class Logger 9 | { 10 | // TODO: move logDebugMessages to config 11 | public Logger(string modName, bool logDebugMessages) 12 | { 13 | this._modName = modName; 14 | this._debug = logDebugMessages; 15 | } 16 | 17 | public static Logger Default = new Logger("Common", true); 18 | 19 | private readonly string _modName; 20 | private readonly bool _debug; 21 | 22 | public static readonly HashSet Messages = new HashSet(); 23 | 24 | public void LogOnce(string message, object data) 25 | { 26 | if (!Messages.Contains(message)) 27 | { 28 | this.Log(message + Environment.NewLine + data); 29 | Messages.Add(message); 30 | } 31 | else 32 | { 33 | this.LogDebug(message, data); 34 | } 35 | } 36 | 37 | public void LogOnce(object data) 38 | { 39 | var message = data.ToString(); 40 | if (!Messages.Contains(message)) 41 | { 42 | this.Log(data); 43 | Messages.Add(message); 44 | } 45 | else 46 | { 47 | this.LogDebug(data); 48 | } 49 | } 50 | 51 | public void LogDebug(string message, object data) 52 | { 53 | if (this._debug) 54 | { 55 | this.Log(message + Environment.NewLine + data); 56 | } 57 | } 58 | 59 | public void LogDebug(object data) 60 | { 61 | if (this._debug) 62 | { 63 | this.Log(data); 64 | } 65 | } 66 | 67 | public void Log(string message, object data) 68 | { 69 | Debug.Log(this._modName + ": " + message + Environment.NewLine + data); 70 | } 71 | 72 | public void Log(object data) 73 | { 74 | Debug.Log(this._modName + ": " + data); 75 | } 76 | } 77 | } 78 | -------------------------------------------------------------------------------- /src/Tools/Common/ConfigWatcher.cs: -------------------------------------------------------------------------------- 1 | using Newtonsoft.Json; 2 | using System; 3 | using System.Collections.Generic; 4 | using System.IO; 5 | using System.Linq; 6 | using System.Text; 7 | 8 | namespace Common 9 | { 10 | public class ConfigWatcher : IDisposable 11 | { 12 | public ConfigWatcher(string path, string pattern, Action callback) 13 | { 14 | this._callback += callback; 15 | this.InitWatcher(path, pattern); 16 | } 17 | 18 | private Action _callback; 19 | private FileSystemWatcher _watcher; 20 | 21 | private void InitWatcher(string path, string pattern) 22 | { 23 | try 24 | { 25 | if (Directory.Exists(path)) 26 | { 27 | var watcher = new FileSystemWatcher(path, pattern); 28 | 29 | watcher.Changed += this.OnChanged; 30 | watcher.Created += this.OnChanged; 31 | watcher.Renamed += this.OnChanged; 32 | watcher.Deleted += this.OnChanged; 33 | 34 | watcher.EnableRaisingEvents = true; 35 | 36 | Logger.Default.LogDebug($"Set FileWatcher on {path}{Path.DirectorySeparatorChar}{pattern}"); 37 | } 38 | else 39 | { 40 | Logger.Default.Log("Config parent directory doesn't exist:" + path); 41 | } 42 | } 43 | catch (Exception e) 44 | { 45 | Logger.Default.Log("Failed to initialize watcher at " + path, e); 46 | } 47 | } 48 | 49 | private void OnChanged(object sender, FileSystemEventArgs ev) 50 | { 51 | try 52 | { 53 | this._callback(ConfigHelper.Load(ev.FullPath)); 54 | } 55 | catch (Exception ex) 56 | { 57 | Logger.Default.Log("Error while loading from path: " + ev.FullPath, ex); 58 | } 59 | } 60 | 61 | public void Dispose() 62 | { 63 | this._callback = null; 64 | this._watcher?.Dispose(); 65 | this._watcher = null; 66 | } 67 | } 68 | } 69 | -------------------------------------------------------------------------------- /src/DoorIcons/State.cs: -------------------------------------------------------------------------------- 1 | using Common; 2 | using System; 3 | using System.Collections.Generic; 4 | using System.IO; 5 | using System.Linq; 6 | using System.Text; 7 | using UnityEngine; 8 | 9 | namespace DoorIcons 10 | { 11 | public static class State 12 | { 13 | public static Core Common = new Core("DoorIcons", "1741162790", null, true); 14 | 15 | public static Dictionary DoorIcons = new Dictionary(); 16 | 17 | public static Dictionary DoorSprites = new Dictionary 18 | { 19 | {ExtendedDoorState.Open, CreateSprite("open.png")}, 20 | {ExtendedDoorState.Locked, CreateSprite("locked.png")}, 21 | {ExtendedDoorState.Automation, CreateSprite("automation.png")}, 22 | {ExtendedDoorState.AccessLeft, CreateSprite("access_left.png")}, 23 | {ExtendedDoorState.AccessRight, CreateSprite("access_right.png")}, 24 | {ExtendedDoorState.AccessRestricted, CreateSprite("access_restricted.png")}, 25 | {ExtendedDoorState.AccessCustom, CreateSprite("access_custom.png")}, 26 | }; 27 | 28 | private static Sprite CreateSprite(string spriteFilename) 29 | { 30 | if (State.Common.RootPath == null) 31 | { 32 | return null; 33 | } 34 | 35 | var width = 256; 36 | var height = 256; 37 | 38 | var path = Pathfinder.MergePath(State.Common.RootPath, "Sprites", spriteFilename); 39 | 40 | if (File.Exists(path)) 41 | { 42 | byte[] bytes = File.ReadAllBytes(path); 43 | 44 | Texture2D texture = new Texture2D(width, height, TextureFormat.RGB24, true) 45 | { 46 | filterMode = FilterMode.Trilinear 47 | }; 48 | 49 | texture.LoadImage(bytes); 50 | 51 | return Sprite.Create(texture, new Rect(0, 0, width, height), new Vector2(0.5f, 0.5f), 1.0f); 52 | } 53 | else 54 | { 55 | State.Common.Logger.Log("File doesn't exist at path: " + path); 56 | return null; 57 | } 58 | } 59 | } 60 | } 61 | -------------------------------------------------------------------------------- /src/Tools/Common/Pathfinder.cs: -------------------------------------------------------------------------------- 1 | using KMod; 2 | using System; 3 | using System.Collections.Generic; 4 | using System.IO; 5 | using System.Linq; 6 | using System.Text; 7 | 8 | namespace Common 9 | { 10 | public static class Pathfinder 11 | { 12 | public static bool FindModRootPath(string modName, string workshopID, out string rootPath) 13 | { 14 | try 15 | { 16 | string modsPath = Manager.GetDirectory().TrimEnd('/', '\\'); 17 | 18 | var possibleLocations = new string[] 19 | { 20 | MergePath(modsPath, "Steam"), 21 | MergePath(modsPath, "Local"), 22 | MergePath(modsPath, "Dev"), 23 | "Mods" 24 | }; 25 | 26 | var possibleNames = new string[] 27 | { 28 | workshopID, 29 | modName 30 | }; 31 | 32 | foreach (var location in possibleLocations) 33 | { 34 | if (!Directory.Exists(location)) 35 | { 36 | continue; 37 | } 38 | 39 | foreach (var name in possibleNames) 40 | { 41 | string[] directories = Directory.GetDirectories( 42 | location, 43 | name, 44 | SearchOption.TopDirectoryOnly 45 | ); 46 | 47 | rootPath = directories.FirstOrDefault(); 48 | 49 | if (rootPath != null) 50 | { 51 | return true; 52 | } 53 | } 54 | } 55 | 56 | Logger.Default.Log("Couldn't find mod root path."); 57 | rootPath = null; 58 | return false; 59 | } 60 | catch (Exception e) 61 | { 62 | Logger.Default.Log("Error while searching for mod root path.", e); 63 | } 64 | 65 | rootPath = string.Empty; 66 | return false; 67 | } 68 | 69 | public static string MergePath(params string[] pathSegments) 70 | { 71 | var builder = new StringBuilder(pathSegments[0]); 72 | 73 | for (int i = 1; i < pathSegments.Length; i++) 74 | { 75 | builder.Append(Path.DirectorySeparatorChar + pathSegments[i]); 76 | } 77 | 78 | return builder.ToString(); 79 | } 80 | } 81 | } 82 | -------------------------------------------------------------------------------- /src/Tools/Common/Core.cs: -------------------------------------------------------------------------------- 1 | using Newtonsoft.Json; 2 | using System; 3 | using System.Collections.Generic; 4 | using System.IO; 5 | using System.Linq; 6 | using System.Reflection; 7 | using System.Text; 8 | 9 | namespace Common 10 | { 11 | // TODO: this class does a lot of routing maybe rename it accordingly 12 | public class Core 13 | { 14 | public Core(string modName, string workshopID, string configDirectoryPath, bool logDebugMessages) 15 | { 16 | this.Logger = new Logger(modName, logDebugMessages); 17 | 18 | this.ModName = modName; 19 | 20 | if (Pathfinder.FindModRootPath(modName, workshopID, out var path)) 21 | { 22 | this.RootPath = this.ConfigPath = path; 23 | } 24 | 25 | if (configDirectoryPath != null) 26 | { 27 | this.ConfigPath = Pathfinder.MergePath(this.ConfigPath, configDirectoryPath); 28 | } 29 | 30 | this.Logger.Log($"Initialized successfully. Version: {Assembly.GetCallingAssembly().GetName().Version}, Path: {this.RootPath}, Config root: {this.ConfigPath}"); 31 | } 32 | 33 | public string ModName { get; private set; } 34 | public string RootPath { get; private set; } 35 | public string ConfigPath { get; private set; } 36 | 37 | public Logger Logger; 38 | 39 | public ConfigWatcher WatchConfig(string path, Action callback) 40 | { 41 | if (path == null) 42 | { 43 | throw new ArgumentNullException("path"); 44 | } 45 | 46 | return new ConfigWatcher(this.ConfigPath, path, callback); 47 | } 48 | 49 | public T LoadConfig(string path) 50 | { 51 | if (path == null) 52 | { 53 | throw new ArgumentNullException("path"); 54 | } 55 | 56 | return ConfigHelper.Load(Pathfinder.MergePath(this.ConfigPath, path)); 57 | } 58 | 59 | public void SaveConfig(string path, object data) 60 | { 61 | if (path == null) 62 | { 63 | throw new ArgumentNullException("path"); 64 | } 65 | 66 | File.WriteAllText(Pathfinder.MergePath(this.ConfigPath, path), JsonConvert.SerializeObject(data, Formatting.Indented)); 67 | } 68 | 69 | public bool ConfigExists(string path) 70 | { 71 | if (path == null) 72 | { 73 | throw new ArgumentNullException("path"); 74 | } 75 | 76 | return File.Exists(Pathfinder.MergePath(this.ConfigPath, path)); 77 | } 78 | } 79 | } 80 | -------------------------------------------------------------------------------- /src/DraggableUI/Data/DraggableUIState.cs: -------------------------------------------------------------------------------- 1 | using Newtonsoft.Json; 2 | using System; 3 | using System.Collections.Generic; 4 | using System.IO; 5 | using UnityEngine; 6 | 7 | namespace DraggablePanelMod.Data 8 | { 9 | 10 | public class DraggableUIState 11 | { 12 | private Dictionary _windowPositions; 13 | 14 | private Dictionary WindowPositions 15 | => this._windowPositions ?? (this._windowPositions = this.LoadFile()); 16 | 17 | public bool LoadWindowPosition(GameObject window, out Vector2 position) 18 | { 19 | if (window == null) 20 | { 21 | position = Vector2.zero; 22 | return false; 23 | } 24 | 25 | string key = this.ExtractKey(window); 26 | 27 | bool result = this.WindowPositions.TryGetValue(key, out SerializeableVector2 sVector2); 28 | 29 | position = sVector2.ToVector2(); 30 | 31 | return result; 32 | } 33 | 34 | public void SaveWindowPosition(GameObject window, Vector2 position) 35 | { 36 | string key = this.ExtractKey(window); 37 | 38 | this.WindowPositions[key] = this.VectorToTuple(position); 39 | 40 | this.UpdateFile(); 41 | } 42 | 43 | private string ExtractKey(GameObject window) => window.name; 44 | 45 | private Dictionary LoadFile() 46 | { 47 | try 48 | { 49 | return State.Common.LoadConfig>(State.StateFileName) 50 | ?? new Dictionary(); 51 | } 52 | catch (FileNotFoundException e) 53 | { 54 | State.Common.Logger.LogOnce("State file not found (This error is most likely harmless, unless this file really exists).", e); 55 | } 56 | catch (Exception e) 57 | { 58 | State.Common.Logger.LogOnce("State load failed.", e); 59 | } 60 | 61 | return new Dictionary(); 62 | } 63 | 64 | private void UpdateFile() 65 | { 66 | try 67 | { 68 | State.Common.SaveConfig(State.StateFileName, this.WindowPositions); 69 | } 70 | catch (Exception e) 71 | { 72 | State.Common.Logger.LogOnce("State save failed.", e); 73 | } 74 | } 75 | 76 | private SerializeableVector2 VectorToTuple(Vector2 vector) => new SerializeableVector2(vector.x, vector.y); 77 | } 78 | } -------------------------------------------------------------------------------- /.gitattributes: -------------------------------------------------------------------------------- 1 | ############################################################################### 2 | # Set default behavior to automatically normalize line endings. 3 | ############################################################################### 4 | * text=auto 5 | 6 | ############################################################################### 7 | # Set default behavior for command prompt diff. 8 | # 9 | # This is need for earlier builds of msysgit that does not have it on by 10 | # default for csharp files. 11 | # Note: This is only used by command line 12 | ############################################################################### 13 | #*.cs diff=csharp 14 | 15 | ############################################################################### 16 | # Set the merge driver for project and solution files 17 | # 18 | # Merging from the command prompt will add diff markers to the files if there 19 | # are conflicts (Merging from VS is not affected by the settings below, in VS 20 | # the diff markers are never inserted). Diff markers may cause the following 21 | # file extensions to fail to load in VS. An alternative would be to treat 22 | # these files as binary and thus will always conflict and require user 23 | # intervention with every merge. To do so, just uncomment the entries below 24 | ############################################################################### 25 | #*.sln merge=binary 26 | #*.csproj merge=binary 27 | #*.vbproj merge=binary 28 | #*.vcxproj merge=binary 29 | #*.vcproj merge=binary 30 | #*.dbproj merge=binary 31 | #*.fsproj merge=binary 32 | #*.lsproj merge=binary 33 | #*.wixproj merge=binary 34 | #*.modelproj merge=binary 35 | #*.sqlproj merge=binary 36 | #*.wwaproj merge=binary 37 | 38 | ############################################################################### 39 | # behavior for image files 40 | # 41 | # image files are treated as binary by default. 42 | ############################################################################### 43 | #*.jpg binary 44 | #*.png binary 45 | #*.gif binary 46 | 47 | ############################################################################### 48 | # diff behavior for common document formats 49 | # 50 | # Convert binary document formats to text before diffing them. This feature 51 | # is only available from the command line. Turn it on by uncommenting the 52 | # entries below. 53 | ############################################################################### 54 | #*.doc diff=astextplain 55 | #*.DOC diff=astextplain 56 | #*.docx diff=astextplain 57 | #*.DOCX diff=astextplain 58 | #*.dot diff=astextplain 59 | #*.DOT diff=astextplain 60 | #*.pdf diff=astextplain 61 | #*.PDF diff=astextplain 62 | #*.rtf diff=astextplain 63 | #*.RTF diff=astextplain 64 | -------------------------------------------------------------------------------- /src/DisplayAllTemps/Patches/DisplayAllTemps.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using HarmonyLib; 6 | using Newtonsoft.Json; 7 | using UnityEngine; 8 | 9 | namespace DisplayAllTemps.Patches 10 | { 11 | [HarmonyPatch(typeof(GameUtil))] 12 | [HarmonyPatch(nameof(GameUtil.GetFormattedTemperature))] 13 | public static class DisplayAllTemps 14 | { 15 | public static void Postfix(float temp, bool displayUnits, ref string __result, GameUtil.TemperatureInterpretation interpretation, GameUtil.TimeSlice timeSlice) 16 | { 17 | try 18 | { 19 | if (interpretation != GameUtil.TemperatureInterpretation.Absolute || timeSlice != GameUtil.TimeSlice.None || !displayUnits) 20 | { 21 | return; 22 | } 23 | 24 | string formatString = "##0.#"; 25 | 26 | float kelvin = GameUtil.GetTemperatureConvertedToKelvin(temp); 27 | 28 | var temperatures = new List(); 29 | 30 | if (GameUtil.temperatureUnit != GameUtil.TemperatureUnit.Celsius && (TemperatureUnitMultiple.Celsius & State.Unit) != 0) 31 | { 32 | string celsiusString = GameUtil.GetTemperatureConvertedFromKelvin(kelvin, GameUtil.TemperatureUnit.Celsius).ToString(formatString) + STRINGS.UI.UNITSUFFIXES.TEMPERATURE.CELSIUS; 33 | 34 | temperatures.Add(celsiusString); 35 | } 36 | 37 | if (GameUtil.temperatureUnit != GameUtil.TemperatureUnit.Fahrenheit && (TemperatureUnitMultiple.Fahrenheit & State.Unit) != 0) 38 | { 39 | string fahrenheitString = GameUtil.GetTemperatureConvertedFromKelvin(kelvin, GameUtil.TemperatureUnit.Fahrenheit).ToString(formatString) + STRINGS.UI.UNITSUFFIXES.TEMPERATURE.FAHRENHEIT; 40 | 41 | temperatures.Add(fahrenheitString); 42 | } 43 | 44 | if (GameUtil.temperatureUnit != GameUtil.TemperatureUnit.Kelvin && (TemperatureUnitMultiple.Kelvin & State.Unit) != 0) 45 | { 46 | string kelvinString = kelvin.ToString(formatString) + STRINGS.UI.UNITSUFFIXES.TEMPERATURE.KELVIN; 47 | 48 | temperatures.Add(kelvinString); 49 | } 50 | 51 | if (temperatures.Count <= 0) 52 | { 53 | return; 54 | } 55 | 56 | var builder = new StringBuilder(__result); 57 | 58 | foreach (var temperature in temperatures) 59 | { 60 | builder.Append(", "); 61 | builder.Append(temperature); 62 | } 63 | 64 | __result = builder.ToString(); 65 | } 66 | catch (Exception e) 67 | { 68 | State.Common.Logger.LogOnce("DisplayAllTemps failed.", e); 69 | } 70 | } 71 | } 72 | } 73 | -------------------------------------------------------------------------------- /src/MaterialColor/Patches/WatchConfig.cs: -------------------------------------------------------------------------------- 1 | using Common; 2 | using HarmonyLib; 3 | using MaterialColor.Data; 4 | using MaterialColor.IO; 5 | using System; 6 | using System.Collections.Generic; 7 | using System.IO; 8 | using System.Linq; 9 | using System.Text; 10 | 11 | namespace MaterialColor.Patches 12 | { 13 | public class WatchConfig : KMod.UserMod2 14 | { 15 | private static PeriodicRefresher Refresher; 16 | 17 | private static readonly string MainConfigFilename = "Config.json"; 18 | private static readonly string ElementColorsFilename = "ElementColors.json"; 19 | 20 | public override void OnLoad(Harmony harmony) 21 | { 22 | base.OnLoad(harmony); 23 | 24 | if (State.Common.ConfigPath == null) 25 | { 26 | return; 27 | } 28 | 29 | State.Common.WatchConfig(MainConfigFilename, LoadMainConfig); 30 | State.Common.WatchConfig>(ElementColorsFilename, LoadElementColors); 31 | 32 | try 33 | { 34 | LoadMainConfig(State.Common.LoadConfig(MainConfigFilename)); 35 | } 36 | catch (Exception e) 37 | { 38 | State.Common.Logger.Log("Error while loading config.", e); 39 | } 40 | 41 | try 42 | { 43 | LoadElementColors(State.Common.LoadConfig>(ElementColorsFilename)); 44 | } 45 | catch (Exception e) 46 | { 47 | State.Common.Logger.Log("Error while loading config.", e); 48 | } 49 | } 50 | 51 | private static void LoadMainConfig(Config newConfig) 52 | { 53 | State.Config = newConfig; 54 | State.ConfigChanged = true; 55 | } 56 | 57 | private static void LoadElementColors(Dictionary newElementColors) 58 | { 59 | State.ElementColors = newElementColors; 60 | State.ConfigChanged = true; 61 | } 62 | 63 | [HarmonyPatch(typeof(Game), "OnSpawn")] 64 | public static class Game_OnSpawn 65 | { 66 | public static void Postfix() 67 | { 68 | Refresher = new PeriodicRefresher(); 69 | SimAndRenderScheduler.instance.render1000ms.Add(Refresher); 70 | } 71 | } 72 | 73 | [HarmonyPatch(typeof(Game), "DestroyInstances")] 74 | public static class Game_DestroyInstances 75 | { 76 | public static void Postfix() 77 | { 78 | try 79 | { 80 | SimAndRenderScheduler.instance.render1000ms.Remove(Refresher); 81 | Refresher = null; 82 | } 83 | catch (Exception e) 84 | { 85 | State.Common.Logger.LogOnce("Game_DestroyInstances.Postfix failed", e); 86 | } 87 | } 88 | } 89 | } 90 | } 91 | -------------------------------------------------------------------------------- /Mods/MaterialColor/Config/ElementColors.json: -------------------------------------------------------------------------------- 1 | { 2 | // Refined Metal 3 | "Copper": { 4 | "Red": 0.3, 5 | "Green": 0.1, 6 | "Blue": 0 7 | }, 8 | "Iron": { 9 | "Red": 0.1, 10 | "Green": 0.1, 11 | "Blue": 0.2 12 | }, 13 | "Steel": { 14 | "Red": 0.2, 15 | "Green": 0.2, 16 | "Blue": 0.2 17 | }, 18 | "Gold": { 19 | "Red": 0.2, 20 | "Green": 0.15, 21 | "Blue": 0 22 | }, 23 | "Niobium": { 24 | "Red": 0, 25 | "Green": 0.2, 26 | "Blue": 0.1 27 | }, 28 | "TempConductorSolid": { 29 | "Red": 0.3, 30 | "Green": 0, 31 | "Blue": 0 32 | }, 33 | "Tungsten": { 34 | "Red": 0.15, 35 | "Green": 0.3, 36 | "Blue": 0.5 37 | }, 38 | "Cobalt": { 39 | "Red": 0, 40 | "Green": 0.3, 41 | "Blue": 0.5 42 | }, 43 | "FoolsGold": { 44 | "Red": 0.175, 45 | "Green": 0.1, 46 | "Blue": 0 47 | }, 48 | // Raw Mineral 49 | "Sandstone": { 50 | "Red": 1, 51 | "Green": 0.9, 52 | "Blue": 0.5, 53 | "DarkMode": true 54 | }, 55 | "IgneousRock": { 56 | "Red": 1, 57 | "Green": 0.4, 58 | "Blue": 0.4, 59 | "DarkMode": true 60 | }, 61 | "Granite": { 62 | "Red": 0.05, 63 | "Green": 0.05, 64 | "Blue": 0 65 | }, 66 | "SedimentaryRock": { 67 | "Red": 0.6, 68 | "Green": 1, 69 | "Blue": 0.8, 70 | "DarkMode": true 71 | }, 72 | "Obsidian": { 73 | "Red": 0.3, 74 | "Green": 0.3, 75 | "Blue": 0.4, 76 | "DarkMode": true 77 | }, 78 | "MaficRock": { 79 | "Red": 0.6, 80 | "Green": 0.6, 81 | "Blue": 0.6, 82 | "DarkMode": true 83 | }, 84 | // Metal Ore 85 | "Cuprite": { 86 | "Red": 0.2, 87 | "Green": 0.05, 88 | "Blue": 0 89 | }, 90 | "IronOre": { 91 | "Red": 0.7, 92 | "Green": 0.7, 93 | "Blue": 0.9, 94 | "DarkMode": true 95 | }, 96 | "GoldAmalgam": { 97 | "Red": 0.075, 98 | "Green": 0.1, 99 | "Blue": 0.0 100 | }, 101 | "AluminumOre": { 102 | "Red": 1, 103 | "Green": 0.75, 104 | "Blue": 0.7, 105 | "DarkMode": true 106 | }, 107 | "Cobaltite": { 108 | "Red": 0.4, 109 | "Green": 0.85, 110 | "Blue": 1, 111 | "DarkMode": true 112 | }, 113 | "Wolframite": { 114 | "Red": 0.1, 115 | "Green": 0.1, 116 | "Blue": 0.25 117 | }, 118 | "Cinnabar": { 119 | "Red": 0.25, 120 | "Green": 0.25, 121 | "Blue": 0.25 122 | }, 123 | // Soil 124 | "Dirt": { 125 | "Red": 0.05, 126 | "Green": 0, 127 | "Blue": 0 128 | }, 129 | "Clay": { 130 | "Red": 0, 131 | "Green": 0.1, 132 | "Blue": 0.05 133 | }, 134 | // Other 135 | "Unobtanium": { 136 | "Red": 0.2, 137 | "Green": 0, 138 | "Blue": 0.2 139 | }, 140 | "SuperInsulator": { 141 | "Red": 1.0, 142 | "Green": 0.5, 143 | "Blue": 1.0, 144 | "DarkMode": true 145 | }, 146 | "Glass": { 147 | "Red": 0.0, 148 | "Green": 0.3, 149 | "Blue": 0.7 150 | }, 151 | "Diamond": { 152 | "Red": 0.4, 153 | "Green": 0.0, 154 | "Blue": 0.5 155 | }, 156 | "Ceramic": { 157 | "Red": 0.15, 158 | "Green": 0.15, 159 | "Blue": 0 160 | } 161 | } 162 | -------------------------------------------------------------------------------- /src/MaterialColor/Config/ElementColors.json: -------------------------------------------------------------------------------- 1 | { 2 | // Refined Metal 3 | "Copper": { 4 | "Red": 0.3, 5 | "Green": 0.1, 6 | "Blue": 0 7 | }, 8 | "Iron": { 9 | "Red": 0.1, 10 | "Green": 0.1, 11 | "Blue": 0.2 12 | }, 13 | "Steel": { 14 | "Red": 0.2, 15 | "Green": 0.2, 16 | "Blue": 0.2 17 | }, 18 | "Gold": { 19 | "Red": 0.2, 20 | "Green": 0.15, 21 | "Blue": 0 22 | }, 23 | "Niobium": { 24 | "Red": 0, 25 | "Green": 0.2, 26 | "Blue": 0.1 27 | }, 28 | "TempConductorSolid": { 29 | "Red": 0.3, 30 | "Green": 0, 31 | "Blue": 0 32 | }, 33 | "Tungsten": { 34 | "Red": 0.15, 35 | "Green": 0.3, 36 | "Blue": 0.5 37 | }, 38 | "Cobalt": { 39 | "Red": 0, 40 | "Green": 0.3, 41 | "Blue": 0.5 42 | }, 43 | "FoolsGold": { 44 | "Red": 0.175, 45 | "Green": 0.1, 46 | "Blue": 0 47 | }, 48 | // Raw Mineral 49 | "Sandstone": { 50 | "Red": 1, 51 | "Green": 0.9, 52 | "Blue": 0.5, 53 | "DarkMode": true 54 | }, 55 | "IgneousRock": { 56 | "Red": 1, 57 | "Green": 0.4, 58 | "Blue": 0.4, 59 | "DarkMode": true 60 | }, 61 | "Granite": { 62 | "Red": 0.05, 63 | "Green": 0.05, 64 | "Blue": 0 65 | }, 66 | "SedimentaryRock": { 67 | "Red": 0.6, 68 | "Green": 1, 69 | "Blue": 0.8, 70 | "DarkMode": true 71 | }, 72 | "Obsidian": { 73 | "Red": 0.3, 74 | "Green": 0.3, 75 | "Blue": 0.4, 76 | "DarkMode": true 77 | }, 78 | "MaficRock": { 79 | "Red": 0.6, 80 | "Green": 0.6, 81 | "Blue": 0.6, 82 | "DarkMode": true 83 | }, 84 | // Metal Ore 85 | "Cuprite": { 86 | "Red": 0.2, 87 | "Green": 0.05, 88 | "Blue": 0 89 | }, 90 | "IronOre": { 91 | "Red": 0.7, 92 | "Green": 0.7, 93 | "Blue": 0.9, 94 | "DarkMode": true 95 | }, 96 | "GoldAmalgam": { 97 | "Red": 0.075, 98 | "Green": 0.1, 99 | "Blue": 0.0 100 | }, 101 | "AluminumOre": { 102 | "Red": 1, 103 | "Green": 0.75, 104 | "Blue": 0.7, 105 | "DarkMode": true 106 | }, 107 | "Cobaltite": { 108 | "Red": 0.4, 109 | "Green": 0.85, 110 | "Blue": 1, 111 | "DarkMode": true 112 | }, 113 | "Wolframite": { 114 | "Red": 0.1, 115 | "Green": 0.1, 116 | "Blue": 0.25 117 | }, 118 | "Cinnabar": { 119 | "Red": 0.25, 120 | "Green": 0.25, 121 | "Blue": 0.25 122 | }, 123 | // Soil 124 | "Dirt": { 125 | "Red": 0.05, 126 | "Green": 0, 127 | "Blue": 0 128 | }, 129 | "Clay": { 130 | "Red": 0, 131 | "Green": 0.1, 132 | "Blue": 0.05 133 | }, 134 | // Other 135 | "Unobtanium": { 136 | "Red": 0.2, 137 | "Green": 0, 138 | "Blue": 0.2 139 | }, 140 | "SuperInsulator": { 141 | "Red": 1.0, 142 | "Green": 0.5, 143 | "Blue": 1.0, 144 | "DarkMode": true 145 | }, 146 | "Glass": { 147 | "Red": 0.0, 148 | "Green": 0.3, 149 | "Blue": 0.7 150 | }, 151 | "Diamond": { 152 | "Red": 0.4, 153 | "Green": 0.0, 154 | "Blue": 0.5 155 | }, 156 | "Ceramic": { 157 | "Red": 0.15, 158 | "Green": 0.15, 159 | "Blue": 0 160 | } 161 | } 162 | -------------------------------------------------------------------------------- /src/Tools/ClearRegolith/ClearRegolith.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Debug 6 | AnyCPU 7 | {886D1096-5D6B-4F42-A793-1CDF6F73E96B} 8 | Library 9 | Properties 10 | ClearRegolith 11 | ClearRegolith 12 | v3.5 13 | 512 14 | true 15 | 16 | 17 | true 18 | full 19 | false 20 | bin\Debug\ 21 | DEBUG;TRACE 22 | prompt 23 | 4 24 | 25 | 26 | none 27 | true 28 | bin\Release\ 29 | TRACE 30 | prompt 31 | 4 32 | 33 | 34 | 35 | ..\..\Dependencies\0Harmony.dll 36 | False 37 | 38 | 39 | ..\..\Dependencies\Assembly-CSharp.dll 40 | False 41 | 42 | 43 | ..\..\Dependencies\Assembly-CSharp-firstpass.dll 44 | False 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | ..\..\Dependencies\UnityEngine.dll 54 | False 55 | 56 | 57 | ..\..\Dependencies\UnityEngine.CoreModule.dll 58 | False 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | robocopy /E "$(TargetDir)..\$(ConfigurationName)" "$(SolutionDir)..\Tools\$(ProjectName)" 68 | if %25errorlevel%25 equ 1 exit 0 else exit %25errorlevel%25 69 | 70 | -------------------------------------------------------------------------------- /src/Tools/BenchmarkGasOverlay/BenchmarkGasOverlay.cs: -------------------------------------------------------------------------------- 1 | using Harmony; 2 | using Newtonsoft.Json; 3 | using System; 4 | using System.Collections.Generic; 5 | using System.Diagnostics; 6 | using System.Linq; 7 | using System.Text; 8 | 9 | namespace BenchmarkGasOverlay 10 | { 11 | [HarmonyPatch(typeof(AttackTool))] 12 | [HarmonyPatch("OnActivateTool")] 13 | public static class BenchmarkGasOverlay 14 | { 15 | public static void Prefix() 16 | { 17 | BenchmarkCell(FindCell(SimHashes.CarbonDioxide, 1, 3), "CO2 no-pop"); 18 | BenchmarkCell(FindCell(SimHashes.CarbonDioxide, 6, 50), "CO2 pop"); 19 | BenchmarkCell(FindCell(SimHashes.Oxygen, 1, 3), "O2 no-pop"); 20 | BenchmarkCell(FindCell(SimHashes.SourGas, 6, 50), "SourGass pop"); 21 | BenchmarkCell(FindCell(SimHashes.SandStone), "Solid(Sandstone)"); 22 | } 23 | 24 | private static int FindCell(SimHashes material, float minMass = -1, float maxMass = -1) 25 | { 26 | int resultCell = -1; 27 | for (int i = 0; i < Grid.CellCount; i++) 28 | { 29 | var element = Grid.Element[i]; 30 | var mass = Grid.Mass[i]; 31 | 32 | var validMinMass = minMass < 0 || mass > minMass; 33 | var validMaxMass = maxMass < 0 || mass < maxMass; 34 | 35 | if 36 | ( 37 | element.id == material 38 | && validMinMass 39 | && validMaxMass 40 | ) 41 | { 42 | resultCell = i; 43 | break; 44 | } 45 | } 46 | 47 | if (resultCell == -1) 48 | { 49 | Debug.Log($"BenchmarkGasOverlay: Can't find gas cell on the map: {Enum.GetName(typeof(SimHashes), material)}, in mass range: {minMass}-{maxMass}"); 50 | } 51 | 52 | return resultCell; 53 | } 54 | 55 | private static void BenchmarkCell(int cell, string message) 56 | { 57 | 58 | var instance = SimDebugView.Instance; 59 | int sample = 100000; 60 | int tries = 20; 61 | var traverseMethod = Traverse.Create(instance).Method("GetOxygenMapColour", instance, cell); 62 | var results = new long[tries]; 63 | var stopWatch = new Stopwatch(); 64 | 65 | for (int j = 0; j < tries; j++) 66 | { 67 | stopWatch.Start(); 68 | for (int i = 0; i < sample; i++) 69 | { 70 | traverseMethod.GetValue(); 71 | } 72 | var elapsed = stopWatch.ElapsedMilliseconds; 73 | results[j] = elapsed; 74 | stopWatch.Reset(); 75 | } 76 | 77 | var result = new 78 | { 79 | time_ms = new 80 | { 81 | min = results.Min(), 82 | max = results.Max(), 83 | average_ms = results.Average(), 84 | total = results.Sum() 85 | }, 86 | tries, 87 | sample, 88 | message 89 | }; 90 | 91 | Debug.Log("BenchmarkGasOverlay: result: " + JsonConvert.SerializeObject(result)); 92 | } 93 | } 94 | } 95 | -------------------------------------------------------------------------------- /src/Tools/Common/Common.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Debug 6 | AnyCPU 7 | {B0FE7A0A-C62D-41AE-94B3-DA3429806A29} 8 | Library 9 | Properties 10 | Common 11 | Common 12 | v4.7.1 13 | 512 14 | true 15 | 16 | 17 | true 18 | full 19 | false 20 | bin\Debug\ 21 | DEBUG;TRACE 22 | prompt 23 | 4 24 | 25 | 26 | none 27 | true 28 | bin\Release\ 29 | TRACE 30 | prompt 31 | 4 32 | 33 | 34 | 35 | ..\..\Dependencies\Assembly-CSharp.dll 36 | False 37 | 38 | 39 | ..\..\Dependencies\Assembly-CSharp-firstpass.dll 40 | False 41 | 42 | 43 | False 44 | ..\..\Dependencies\Newtonsoft.Json.dll 45 | False 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | ..\..\Dependencies\UnityEngine.dll 55 | False 56 | 57 | 58 | ..\..\Dependencies\UnityEngine.CoreModule.dll 59 | False 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | robocopy /E "$(TargetDir)..\$(ConfigurationName)" "$(SolutionDir)..\Tools\$(ProjectName)" 73 | if %25errorlevel%25 equ 1 exit 0 else exit %25errorlevel%25 74 | 75 | 76 | -------------------------------------------------------------------------------- /src/Tools/BenchmarkGasOverlay/BenchmarkGasOverlay.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Debug 6 | AnyCPU 7 | {F10B8EE2-8869-46E1-A0F3-8BC189DFA55E} 8 | Library 9 | Properties 10 | BenchmarkGasOverlay 11 | BenchmarkGasOverlay 12 | v3.5 13 | 512 14 | true 15 | 16 | 17 | true 18 | full 19 | false 20 | bin\Debug\ 21 | DEBUG;TRACE 22 | prompt 23 | 4 24 | 25 | 26 | none 27 | true 28 | bin\Release\ 29 | TRACE 30 | prompt 31 | 4 32 | 33 | 34 | 35 | ..\..\Dependencies\0Harmony.dll 36 | 37 | 38 | ..\..\Dependencies\Assembly-CSharp.dll 39 | False 40 | 41 | 42 | ..\..\Dependencies\Assembly-CSharp-firstpass.dll 43 | False 44 | 45 | 46 | False 47 | ..\..\Dependencies\Newtonsoft.Json.dll 48 | False 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | ..\..\Dependencies\UnityEngine.dll 58 | False 59 | 60 | 61 | ..\..\Dependencies\UnityEngine.CoreModule.dll 62 | False 63 | 64 | 65 | ..\..\Dependencies\UnityEngine.ImageConversionModule.dll 66 | False 67 | 68 | 69 | ..\..\Dependencies\UnityEngine.UI.dll 70 | False 71 | 72 | 73 | ..\..\Dependencies\UnityEngine.UIElementsModule.dll 74 | False 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | robocopy /E "$(TargetDir)..\$(ConfigurationName)" "$(SolutionDir)..\Tools\$(ProjectName)" 84 | if %25errorlevel%25 equ 1 exit 0 else exit %25errorlevel%25 85 | 86 | -------------------------------------------------------------------------------- /src/FreeCamera/FreeCamera.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Debug 6 | AnyCPU 7 | {3E4C5F26-692B-4FCD-B683-6D5FAAEFF7D9} 8 | Library 9 | Properties 10 | FreeCamera 11 | FreeCamera 12 | v4.7.1 13 | 512 14 | 15 | 16 | 17 | true 18 | full 19 | false 20 | bin\Debug\ 21 | DEBUG;TRACE 22 | prompt 23 | 4 24 | false 25 | 26 | 27 | none 28 | true 29 | bin\Release\ 30 | TRACE 31 | prompt 32 | 4 33 | false 34 | 35 | 36 | 37 | ..\Dependencies\0Harmony.dll 38 | False 39 | 40 | 41 | ..\Dependencies\Assembly-CSharp.dll 42 | False 43 | 44 | 45 | ..\Dependencies\Assembly-CSharp-firstpass.dll 46 | False 47 | 48 | 49 | False 50 | ..\Dependencies\Newtonsoft.Json.dll 51 | False 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | ..\Dependencies\UnityEngine.dll 61 | False 62 | 63 | 64 | ..\Dependencies\UnityEngine.CoreModule.dll 65 | False 66 | 67 | 68 | ..\Dependencies\UnityEngine.ImageConversionModule.dll 69 | False 70 | 71 | 72 | ..\Dependencies\UnityEngine.UI.dll 73 | False 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | Always 85 | 86 | 87 | 88 | 89 | robocopy /E "$(TargetDir)..\$(ConfigurationName)" "$(SolutionDir)..\Mods\$(ProjectName)" 90 | if %25errorlevel%25 equ 1 exit 0 else exit %25errorlevel%25 91 | 92 | -------------------------------------------------------------------------------- /src/SaveNoDailyReports/RemoveDailyReports.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Debug 6 | AnyCPU 7 | {D45B80B8-8950-4ED4-8ED8-3A044FF4D9C9} 8 | Library 9 | Properties 10 | RemoveDailyReports 11 | RemoveDailyReports 12 | v4.7.1 13 | 512 14 | true 15 | 16 | 17 | 18 | true 19 | full 20 | false 21 | bin\Debug\ 22 | DEBUG;TRACE 23 | prompt 24 | 4 25 | false 26 | 27 | 28 | none 29 | true 30 | bin\Release\ 31 | TRACE 32 | prompt 33 | 4 34 | false 35 | 36 | 37 | 38 | ..\Dependencies\0Harmony.dll 39 | False 40 | 41 | 42 | ..\Dependencies\Assembly-CSharp.dll 43 | False 44 | 45 | 46 | ..\Dependencies\Assembly-CSharp-firstpass.dll 47 | False 48 | 49 | 50 | False 51 | ..\Dependencies\Newtonsoft.Json.dll 52 | False 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | ..\Dependencies\UnityEngine.dll 62 | False 63 | 64 | 65 | ..\Dependencies\UnityEngine.CoreModule.dll 66 | False 67 | 68 | 69 | ..\Dependencies\UnityEngine.ImageConversionModule.dll 70 | False 71 | 72 | 73 | ..\Dependencies\UnityEngine.UI.dll 74 | False 75 | 76 | 77 | ..\Dependencies\UnityEngine.UIElementsModule.dll 78 | False 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | Always 88 | 89 | 90 | 91 | 92 | robocopy /E "$(TargetDir)..\$(ConfigurationName)" "$(SolutionDir)..\Mods\$(ProjectName)" 93 | if %25errorlevel%25 equ 1 exit 0 else exit %25errorlevel%25 94 | 95 | -------------------------------------------------------------------------------- /src/MaterialColor/Patches/ApplyColors.cs: -------------------------------------------------------------------------------- 1 | using HarmonyLib; 2 | using MaterialColor.Extensions; 3 | using MaterialColor.Helpers; 4 | using Rendering; 5 | using System; 6 | using System.Collections.Generic; 7 | using System.IO; 8 | using System.Linq; 9 | 10 | using UnityEngine; 11 | using MaterialColor.IO; 12 | 13 | namespace MaterialColor.Patches 14 | { 15 | public static class ApplyColors 16 | { 17 | [HarmonyPatch(typeof(Game), "OnSpawn")] 18 | public static class GameStart 19 | { 20 | public static void Postfix() 21 | { 22 | TryInitMod(); 23 | } 24 | 25 | private static void TryInitMod() 26 | { 27 | try 28 | { 29 | State.TileColors = new Color?[Grid.CellCount]; 30 | Components.BuildingCompletes.OnAdd += Painter.UpdateBuildingColor; 31 | Painter.Refresh(); 32 | } 33 | catch (Exception e) 34 | { 35 | State.Common.Logger.Log(e); 36 | } 37 | } 38 | } 39 | 40 | [HarmonyPatch(typeof(Ownable), "UpdateTint")] 41 | public static class Ownable_UpdateTint 42 | { 43 | public static void Postfix(Ownable __instance) 44 | { 45 | try 46 | { 47 | if (IsOwned(__instance)) 48 | { 49 | Painter.ApplyColorToKAnimControllerBase(__instance); 50 | } 51 | } 52 | catch (Exception e) 53 | { 54 | State.Common.Logger.LogOnce("Ownable_UpdateTint.Postfix", e); 55 | } 56 | } 57 | 58 | private static bool IsOwned(Ownable ownable) => ownable.assignee != null; 59 | } 60 | 61 | [HarmonyPatch(typeof(FilteredStorage), "OnFilterChanged")] 62 | public static class FilteredStorage_OnFilterChanged 63 | { 64 | public static void Postfix(KMonoBehaviour ___root, Tag[] tags) 65 | { 66 | try 67 | { 68 | if (IsActive(tags)) 69 | { 70 | Painter.ApplyColorToKAnimControllerBase(___root); 71 | } 72 | } 73 | catch (Exception e) 74 | { 75 | State.Common.Logger.LogOnce("FilteredStorage_OnFilterChanged.Postfix", e); 76 | } 77 | } 78 | 79 | private static bool IsActive(Tag[] tags) 80 | => tags != null && tags.Length != 0; 81 | } 82 | 83 | [HarmonyPatch(typeof(BlockTileRenderer), nameof(BlockTileRenderer.GetCellColour))] 84 | public static class BlockTileRenderer_GetCellColour 85 | { 86 | public static void Postfix(int cell, SimHashes element, BlockTileRenderer __instance, ref Color __result) 87 | { 88 | try 89 | { 90 | var cellColor = State.TileColors[cell]; 91 | if 92 | ( 93 | State.Config.Enabled && 94 | cellColor.HasValue 95 | ) 96 | { 97 | __result *= cellColor.Value; 98 | } 99 | } 100 | catch (Exception e) 101 | { 102 | State.Common.Logger.LogOnce("EnterCell failed.", e); 103 | } 104 | } 105 | } 106 | 107 | [HarmonyPatch(typeof(Deconstructable), "OnCompleteWork")] 108 | public static class Deconstructable_OnCompleteWork_MatCol 109 | { 110 | public static void Prefix(Deconstructable __instance) 111 | { 112 | try 113 | { 114 | var isTile = __instance.TryGetComponent(out _); 115 | 116 | if (isTile) 117 | { 118 | State.TileColors[__instance.GetCell()] = null; 119 | } 120 | } 121 | catch (Exception e) 122 | { 123 | State.Common.Logger.LogOnce(e); 124 | } 125 | } 126 | } 127 | } 128 | } -------------------------------------------------------------------------------- /src/LiquefiableSculptures/LiquefiableSculptures.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Debug 6 | AnyCPU 7 | {BCB946C1-3237-4163-967D-4DC0F491683C} 8 | Library 9 | Properties 10 | LiquefiableSculptures 11 | LiquefiableSculptures 12 | v4.7.1 13 | 512 14 | true 15 | 16 | 17 | 18 | true 19 | full 20 | false 21 | bin\Debug\ 22 | DEBUG;TRACE 23 | prompt 24 | 4 25 | false 26 | 27 | 28 | none 29 | true 30 | bin\Release\ 31 | TRACE 32 | prompt 33 | 4 34 | false 35 | 36 | 37 | 38 | ..\Dependencies\0Harmony.dll 39 | False 40 | 41 | 42 | ..\Dependencies\Assembly-CSharp.dll 43 | False 44 | 45 | 46 | ..\Dependencies\Assembly-CSharp-firstpass.dll 47 | False 48 | 49 | 50 | False 51 | ..\Dependencies\Newtonsoft.Json.dll 52 | False 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | ..\Dependencies\UnityEngine.dll 62 | False 63 | 64 | 65 | ..\Dependencies\UnityEngine.CoreModule.dll 66 | False 67 | 68 | 69 | ..\Dependencies\UnityEngine.ImageConversionModule.dll 70 | False 71 | 72 | 73 | ..\Dependencies\UnityEngine.UI.dll 74 | False 75 | 76 | 77 | ..\Dependencies\UnityEngine.UIElementsModule.dll 78 | False 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | Always 88 | 89 | 90 | 91 | 92 | robocopy /E "$(TargetDir)..\$(ConfigurationName)" "$(SolutionDir)..\Mods\$(ProjectName)" 93 | if %25errorlevel%25 equ 1 exit 0 else exit %25errorlevel%25 94 | 95 | -------------------------------------------------------------------------------- /src/DraggableUI/DraggableUI.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Debug 6 | AnyCPU 7 | {93CDE770-6E29-4B01-B0DD-A3B586FBB111} 8 | Library 9 | Properties 10 | DraggableUI 11 | DraggableUI 12 | v4.7.1 13 | 512 14 | 15 | 16 | 17 | true 18 | full 19 | false 20 | bin\Debug\ 21 | DEBUG;TRACE 22 | prompt 23 | 4 24 | false 25 | 26 | 27 | none 28 | true 29 | bin\Release\ 30 | TRACE 31 | prompt 32 | 4 33 | false 34 | 35 | 36 | 37 | ..\Dependencies\0Harmony.dll 38 | False 39 | 40 | 41 | ..\Dependencies\Assembly-CSharp.dll 42 | False 43 | 44 | 45 | ..\Dependencies\Assembly-CSharp-firstpass.dll 46 | False 47 | 48 | 49 | ..\..\Tools\Common\Common.dll 50 | 51 | 52 | False 53 | ..\Dependencies\Newtonsoft.Json.dll 54 | False 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | ..\Dependencies\UnityEngine.dll 64 | False 65 | 66 | 67 | ..\Dependencies\UnityEngine.CoreModule.dll 68 | False 69 | 70 | 71 | ..\Dependencies\UnityEngine.InputLegacyModule.dll 72 | False 73 | 74 | 75 | ..\Dependencies\UnityEngine.UI.dll 76 | False 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | Always 90 | 91 | 92 | 93 | 94 | robocopy /E "$(TargetDir)..\$(ConfigurationName)" "$(SolutionDir)..\Mods\$(ProjectName)" 95 | if %25errorlevel%25 equ 1 exit 0 else exit %25errorlevel%25 96 | 97 | -------------------------------------------------------------------------------- /src/DoorIcons/Patches/DoorPatches.cs: -------------------------------------------------------------------------------- 1 | using HarmonyLib; 2 | using Klei; 3 | using Newtonsoft.Json; 4 | using System; 5 | using System.Collections.Generic; 6 | using System.IO; 7 | using System.Linq; 8 | using System.Text; 9 | using UnityEngine; 10 | using Common; 11 | 12 | namespace DoorIcons.Patches 13 | { 14 | // TODO: allow disabling of all icons with some button and/or hotkey 15 | public static class DoorPatches 16 | { 17 | private static readonly AccessTools.FieldRef 18 | < 19 | AccessControlSideScreen, 20 | Door 21 | > GetAccessSideScreenDoorTarget = AccessTools.FieldRefAccess 22 | < 23 | AccessControlSideScreen, 24 | Door 25 | >("doorTarget"); 26 | 27 | [HarmonyPatch(typeof(Workable))] 28 | [HarmonyPatch("OnSpawn")] 29 | public static class Door_OnSpawn 30 | { 31 | public static void Postfix(Workable __instance) 32 | { 33 | try 34 | { 35 | if (Game.Instance == null) 36 | { 37 | return; 38 | } 39 | 40 | var door = __instance.GetComponent(); 41 | 42 | if (door != null && !State.DoorIcons.ContainsKey(door)) 43 | { 44 | var icon = IconManager.CreateIcon(door); 45 | 46 | State.DoorIcons.Add 47 | ( 48 | door, 49 | icon 50 | ); 51 | 52 | __instance.gameObject.Subscribe((int)GameHashes.LogicEvent, data => IconManager.UpdateIcon(door)); 53 | __instance.gameObject.Subscribe((int)GameHashes.DoorStateChanged, data => IconManager.UpdateIcon(door)); 54 | __instance.gameObject.Subscribe((int)GameHashes.CopySettings, data => IconManager.UpdateIcon(door)); 55 | __instance.gameObject.Subscribe((int)GameHashes.DoorControlStateChanged, data => IconManager.UpdateIcon(door)); 56 | __instance.gameObject.Subscribe((int)GameHashes.ObjectDestroyed, data => IconManager.RemoveIcon(door)); 57 | } 58 | } 59 | catch (Exception e) 60 | { 61 | State.Common.Logger.LogOnce("Error while trying to create door icon", e); 62 | } 63 | } 64 | } 65 | 66 | [HarmonyPatch(typeof(AccessControlSideScreen))] 67 | [HarmonyPatch("OnPermissionChanged")] 68 | public static class Door_Update_OnMinionPermissionChange 69 | { 70 | public static void Postfix(AccessControlSideScreen __instance) 71 | { 72 | var door = GetAccessSideScreenDoorTarget(__instance); 73 | 74 | if (door != null) 75 | { 76 | IconManager.UpdateIcon(door); 77 | } 78 | } 79 | } 80 | 81 | [HarmonyPatch(typeof(AccessControlSideScreen))] 82 | [HarmonyPatch("RefreshOnline")] 83 | public static class Door_Update_OnDefaultPermissionChange 84 | { 85 | public static void Postfix(AccessControlSideScreen __instance) 86 | { 87 | var door = GetAccessSideScreenDoorTarget(__instance); 88 | 89 | if (door != null) 90 | { 91 | IconManager.UpdateIcon(door); 92 | } 93 | } 94 | } 95 | 96 | [HarmonyPatch(typeof(Deconstructable))] 97 | [HarmonyPatch("OnCompleteWork")] 98 | public static class Door_Remove_OnDeconstruct 99 | { 100 | public static void Postfix(Deconstructable __instance) 101 | { 102 | var door = __instance.GetComponent(); 103 | 104 | if (door != null) 105 | { 106 | IconManager.RemoveIcon(door); 107 | } 108 | } 109 | } 110 | 111 | [HarmonyPatch(typeof(StructureTemperatureComponents))] 112 | [HarmonyPatch(nameof(StructureTemperatureComponents.DoMelt))] 113 | public static class Door_Remove_OnMelt 114 | { 115 | public static void Postfix(PrimaryElement primary_element) 116 | { 117 | var door = primary_element.gameObject.GetComponent(); 118 | 119 | if (door != null) 120 | { 121 | IconManager.RemoveIcon(door); 122 | } 123 | } 124 | } 125 | } 126 | } 127 | -------------------------------------------------------------------------------- /src/GasOverlay/GasOverlay.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Debug 6 | AnyCPU 7 | {4475E088-4830-4BB4-BC97-FC8ACC18AFCB} 8 | Library 9 | Properties 10 | GasOverlay 11 | GasOverlay 12 | v4.7.1 13 | 512 14 | 15 | 16 | 17 | true 18 | full 19 | false 20 | bin\Debug\ 21 | DEBUG;TRACE 22 | prompt 23 | 4 24 | false 25 | 26 | 27 | none 28 | true 29 | bin\Release\ 30 | TRACE 31 | prompt 32 | 4 33 | false 34 | 35 | 36 | 37 | ..\Dependencies\0Harmony.dll 38 | False 39 | 40 | 41 | ..\Dependencies\Assembly-CSharp.dll 42 | False 43 | 44 | 45 | ..\Dependencies\Assembly-CSharp-firstpass.dll 46 | False 47 | 48 | 49 | False 50 | ..\..\Tools\Common\Common.dll 51 | 52 | 53 | False 54 | ..\Dependencies\Newtonsoft.Json.dll 55 | False 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | ..\Dependencies\UnityEngine.dll 65 | False 66 | 67 | 68 | False 69 | ..\Dependencies\UnityEngine.CoreModule.dll 70 | False 71 | 72 | 73 | ..\Dependencies\UnityEngine.UI.dll 74 | False 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | Always 86 | 87 | 88 | Always 89 | 90 | 91 | 92 | 93 | robocopy /E "$(TargetDir)..\$(ConfigurationName)" "$(SolutionDir)..\Mods\$(ProjectName)" 94 | if %25errorlevel%25 equ 1 exit 0 else exit %25errorlevel%25 95 | 96 | 97 | 98 | 99 | 100 | 101 | -------------------------------------------------------------------------------- /src/DraggableUI/DraggablePanel.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | using UnityEngine; 3 | using System.Linq; 4 | 5 | namespace DraggablePanelMod 6 | { 7 | public class DraggablePanel : MonoBehaviour 8 | { 9 | public Vector2 Offset; 10 | 11 | private static readonly List DragStartKeyCodes = new List 12 | { 13 | KeyCode.LeftAlt, 14 | KeyCode.RightAlt, 15 | }; 16 | 17 | // Use GetComponent() instead? 18 | public KScreen Screen; 19 | 20 | public Vector2 DefaultPosition = new Vector2(); 21 | 22 | private bool _isDragging; 23 | 24 | public static void Attach(KScreen screen) 25 | { 26 | if (screen == null || screen.name == "SimpleInfoScreen") 27 | { 28 | return; 29 | } 30 | 31 | DraggablePanel panel = screen.FindOrAddUnityComponent(); 32 | 33 | if (panel == null) 34 | { 35 | return; 36 | } 37 | 38 | panel.Screen = screen; 39 | 40 | var rect = panel.GetComponentInParent(); 41 | 42 | if (rect == null) 43 | { 44 | return; 45 | } 46 | 47 | panel.DefaultPosition = rect.anchoredPosition; 48 | 49 | State.Common.Logger.LogDebug("Attached to KScreen", screen.displayName); 50 | } 51 | 52 | // TODO: call when position is set by game 53 | public static void SetPositionFromFile(KScreen screen) 54 | { 55 | DraggablePanel panel = screen.FindOrAddUnityComponent(); 56 | 57 | if (panel == null) 58 | { 59 | State.Common.Logger.LogDebug("Can't FindOrAddUnityComponent"); 60 | 61 | return; 62 | } 63 | 64 | if (panel.LoadPosition(out Vector2 newPosition)) 65 | { 66 | panel.SetPosition(newPosition); 67 | 68 | State.Common.Logger.Log($"Loaded position: {newPosition} for {screen.name}"); 69 | } 70 | } 71 | 72 | public void Update() 73 | { 74 | if (this.Screen == null) 75 | { 76 | return; 77 | } 78 | 79 | Vector2 mousePos = Input.mousePosition; 80 | 81 | if (this._isDragging) 82 | { 83 | Vector2 newPosition = mousePos - this.Offset; 84 | 85 | if (Input.GetMouseButtonUp(0)) 86 | { 87 | this._isDragging = false; 88 | 89 | this.SavePosition(newPosition); 90 | 91 | State.Common.Logger.LogDebug("Saved new panel position: ", newPosition); 92 | } 93 | 94 | this.SetPosition(newPosition); 95 | } 96 | else if (this.ShouldStartDrag()) 97 | { 98 | // TODO: cache RectTransform component 99 | this.Offset = mousePos - this.Screen.GetComponentInParent().anchoredPosition; 100 | 101 | this._isDragging = true; 102 | } 103 | else if (this.ShouldResetPanel()) 104 | { 105 | this.ResetPanel(); 106 | } 107 | } 108 | 109 | private void ResetPanel() 110 | { 111 | this.SavePosition(this.DefaultPosition); 112 | this.SetPosition(this.DefaultPosition); 113 | } 114 | 115 | private bool ShouldStartDrag() 116 | { 117 | return this.Screen.GetMouseOver 118 | && Input.GetMouseButtonDown(0) 119 | && DragStartKeyCodes.Any(code => Input.GetKey(code)); 120 | } 121 | 122 | private bool ShouldResetPanel() 123 | { 124 | return this.Screen.GetMouseOver 125 | && Input.GetMouseButtonUp(1) 126 | && DragStartKeyCodes.Any(code => Input.GetKey(code)); 127 | } 128 | 129 | private bool LoadPosition(out Vector2 position) 130 | { 131 | return State.UIState.LoadWindowPosition(this.gameObject, out position); 132 | } 133 | 134 | private void SavePosition(Vector2 position) 135 | { 136 | State.UIState.SaveWindowPosition(this.gameObject, position); 137 | } 138 | 139 | // use offset? 140 | private void SetPosition(Vector3 newPosition) 141 | { 142 | var rect = this.Screen?.GetComponentInParent(); 143 | 144 | if (rect == null) 145 | { 146 | return; 147 | } 148 | 149 | rect.anchoredPosition = newPosition; 150 | } 151 | } 152 | } -------------------------------------------------------------------------------- /src/ChainedDeconstruction/ChainedDeconstruction.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Debug 6 | AnyCPU 7 | {20DEA568-F78F-4891-9C9E-EA79D1403758} 8 | Library 9 | Properties 10 | ChainedDeconstruction 11 | ChainedDeconstruction 12 | v4.7.1 13 | 512 14 | true 15 | 16 | 17 | 18 | true 19 | full 20 | false 21 | bin\Debug\ 22 | DEBUG;TRACE 23 | prompt 24 | 4 25 | false 26 | 27 | 28 | none 29 | true 30 | bin\Release\ 31 | TRACE 32 | prompt 33 | 4 34 | false 35 | 36 | 37 | 38 | ..\Dependencies\0Harmony.dll 39 | False 40 | 41 | 42 | ..\Dependencies\Assembly-CSharp.dll 43 | False 44 | 45 | 46 | ..\Dependencies\Assembly-CSharp-firstpass.dll 47 | False 48 | 49 | 50 | ..\..\Tools\Common\Common.dll 51 | 52 | 53 | False 54 | ..\Dependencies\Newtonsoft.Json.dll 55 | False 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | ..\Dependencies\UnityEngine.dll 65 | False 66 | 67 | 68 | ..\Dependencies\UnityEngine.CoreModule.dll 69 | False 70 | 71 | 72 | ..\Dependencies\UnityEngine.ImageConversionModule.dll 73 | False 74 | 75 | 76 | ..\Dependencies\UnityEngine.UI.dll 77 | False 78 | 79 | 80 | ..\Dependencies\UnityEngine.UIElementsModule.dll 81 | False 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | Always 92 | 93 | 94 | Always 95 | 96 | 97 | 98 | 99 | robocopy /E "$(TargetDir)..\$(ConfigurationName)" "$(SolutionDir)..\Mods\$(ProjectName)" 100 | if %25errorlevel%25 equ 1 exit 0 else exit %25errorlevel%25 101 | 102 | -------------------------------------------------------------------------------- /src/DisplayAllTemps/DisplayAllTemps.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Debug 6 | AnyCPU 7 | {F90017D3-DAC2-4971-B0B2-E96B2ADB6A9F} 8 | Library 9 | Properties 10 | DisplayAllTemps 11 | DisplayAllTemps 12 | v4.7.1 13 | 512 14 | true 15 | 16 | 17 | 18 | true 19 | full 20 | false 21 | bin\Debug\ 22 | DEBUG;TRACE 23 | prompt 24 | 4 25 | false 26 | 27 | 28 | none 29 | true 30 | bin\Release\ 31 | TRACE 32 | prompt 33 | 4 34 | false 35 | 36 | 37 | 38 | ..\Dependencies\0Harmony.dll 39 | False 40 | 41 | 42 | ..\Dependencies\Assembly-CSharp.dll 43 | False 44 | 45 | 46 | ..\Dependencies\Assembly-CSharp-firstpass.dll 47 | False 48 | 49 | 50 | ..\..\Tools\Common\Common.dll 51 | 52 | 53 | False 54 | ..\Dependencies\Newtonsoft.Json.dll 55 | False 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | ..\Dependencies\UnityEngine.dll 65 | False 66 | 67 | 68 | ..\Dependencies\UnityEngine.CoreModule.dll 69 | False 70 | 71 | 72 | ..\Dependencies\UnityEngine.ImageConversionModule.dll 73 | False 74 | 75 | 76 | ..\Dependencies\UnityEngine.UI.dll 77 | False 78 | 79 | 80 | ..\Dependencies\UnityEngine.UIElementsModule.dll 81 | False 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | Always 95 | 96 | 97 | 98 | 99 | robocopy /E "$(TargetDir)..\$(ConfigurationName)" "$(SolutionDir)..\Mods\$(ProjectName)" 100 | if %25errorlevel%25 equ 1 exit 0 else exit %25errorlevel%25 101 | 102 | -------------------------------------------------------------------------------- /src/CustomTemperatureOverlay/CustomTemperatureOverlay.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Debug 6 | AnyCPU 7 | {92E021FE-3CCC-43B1-984D-9C48CA427610} 8 | Library 9 | Properties 10 | CustomTemperatureOverlay 11 | CustomTemperatureOverlay 12 | v4.7.1 13 | 512 14 | true 15 | 16 | 17 | 18 | true 19 | full 20 | false 21 | bin\Debug\ 22 | DEBUG;TRACE 23 | prompt 24 | 4 25 | false 26 | 27 | 28 | none 29 | true 30 | bin\Release\ 31 | TRACE 32 | prompt 33 | 4 34 | false 35 | 36 | 37 | 38 | ..\Dependencies\0Harmony.dll 39 | False 40 | 41 | 42 | ..\Dependencies\Assembly-CSharp.dll 43 | False 44 | 45 | 46 | ..\Dependencies\Assembly-CSharp-firstpass.dll 47 | False 48 | 49 | 50 | False 51 | ..\..\Tools\Common\Common.dll 52 | 53 | 54 | False 55 | ..\Dependencies\Newtonsoft.Json.dll 56 | False 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | ..\Dependencies\UnityEngine.dll 66 | False 67 | 68 | 69 | ..\Dependencies\UnityEngine.CoreModule.dll 70 | False 71 | 72 | 73 | ..\Dependencies\UnityEngine.ImageConversionModule.dll 74 | False 75 | 76 | 77 | ..\Dependencies\UnityEngine.UI.dll 78 | False 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | Always 91 | 92 | 93 | Always 94 | 95 | 96 | 97 | 98 | robocopy /E "$(TargetDir)..\$(ConfigurationName)" "$(SolutionDir)..\Mods\$(ProjectName)" 99 | if %25errorlevel%25 equ 1 exit 0 else exit %25errorlevel%25 100 | 101 | 102 | 103 | 104 | 105 | -------------------------------------------------------------------------------- /src/.gitignore: -------------------------------------------------------------------------------- 1 | ## Ignore Visual Studio temporary files, build results, and 2 | ## files generated by popular Visual Studio add-ons. 3 | 4 | # User-specific files 5 | *.suo 6 | *.user 7 | *.userosscache 8 | *.sln.docstates 9 | 10 | # User-specific files (MonoDevelop/Xamarin Studio) 11 | *.userprefs 12 | 13 | # Build results 14 | [Dd]ebug/ 15 | [Dd]ebugPublic/ 16 | [Rr]elease/ 17 | [Rr]eleases/ 18 | x64/ 19 | x86/ 20 | bld/ 21 | [Bb]in/ 22 | [Oo]bj/ 23 | [Ll]og/ 24 | 25 | # Visual Studio 2015 cache/options directory 26 | .vs/ 27 | # Uncomment if you have tasks that create the project's static files in wwwroot 28 | #wwwroot/ 29 | 30 | # MSTest test Results 31 | [Tt]est[Rr]esult*/ 32 | [Bb]uild[Ll]og.* 33 | 34 | # NUNIT 35 | *.VisualState.xml 36 | TestResult.xml 37 | 38 | # Build Results of an ATL Project 39 | [Dd]ebugPS/ 40 | [Rr]eleasePS/ 41 | dlldata.c 42 | 43 | # DNX 44 | project.lock.json 45 | project.fragment.lock.json 46 | artifacts/ 47 | 48 | *_i.c 49 | *_p.c 50 | *_i.h 51 | *.ilk 52 | *.meta 53 | *.obj 54 | *.pch 55 | *.pdb 56 | *.pgc 57 | *.pgd 58 | *.rsp 59 | *.sbr 60 | *.tlb 61 | *.tli 62 | *.tlh 63 | *.tmp 64 | *.tmp_proj 65 | *.log 66 | *.vspscc 67 | *.vssscc 68 | .builds 69 | *.pidb 70 | *.svclog 71 | *.scc 72 | 73 | # Chutzpah Test files 74 | _Chutzpah* 75 | 76 | # Visual C++ cache files 77 | ipch/ 78 | *.aps 79 | *.ncb 80 | *.opendb 81 | *.opensdf 82 | *.sdf 83 | *.cachefile 84 | *.VC.db 85 | *.VC.VC.opendb 86 | 87 | # Visual Studio profiler 88 | *.psess 89 | *.vsp 90 | *.vspx 91 | *.sap 92 | 93 | # TFS 2012 Local Workspace 94 | $tf/ 95 | 96 | # Guidance Automation Toolkit 97 | *.gpState 98 | 99 | # ReSharper is a .NET coding add-in 100 | _ReSharper*/ 101 | *.[Rr]e[Ss]harper 102 | *.DotSettings.user 103 | 104 | # JustCode is a .NET coding add-in 105 | .JustCode 106 | 107 | # TeamCity is a build add-in 108 | _TeamCity* 109 | 110 | # DotCover is a Code Coverage Tool 111 | *.dotCover 112 | 113 | # NCrunch 114 | _NCrunch_* 115 | .*crunch*.local.xml 116 | nCrunchTemp_* 117 | 118 | # MightyMoose 119 | *.mm.* 120 | AutoTest.Net/ 121 | 122 | # Web workbench (sass) 123 | .sass-cache/ 124 | 125 | # Installshield output folder 126 | [Ee]xpress/ 127 | 128 | # DocProject is a documentation generator add-in 129 | DocProject/buildhelp/ 130 | DocProject/Help/*.HxT 131 | DocProject/Help/*.HxC 132 | DocProject/Help/*.hhc 133 | DocProject/Help/*.hhk 134 | DocProject/Help/*.hhp 135 | DocProject/Help/Html2 136 | DocProject/Help/html 137 | 138 | # Click-Once directory 139 | publish/ 140 | 141 | # Publish Web Output 142 | *.[Pp]ublish.xml 143 | *.azurePubxml 144 | # TODO: Comment the next line if you want to checkin your web deploy settings 145 | # but database connection strings (with potential passwords) will be unencrypted 146 | #*.pubxml 147 | *.publishproj 148 | 149 | # Microsoft Azure Web App publish settings. Comment the next line if you want to 150 | # checkin your Azure Web App publish settings, but sensitive information contained 151 | # in these scripts will be unencrypted 152 | PublishScripts/ 153 | 154 | # NuGet Packages 155 | *.nupkg 156 | # The packages folder can be ignored because of Package Restore 157 | **/packages/* 158 | # except build/, which is used as an MSBuild target. 159 | !**/packages/build/ 160 | # Uncomment if necessary however generally it will be regenerated when needed 161 | #!**/packages/repositories.config 162 | # NuGet v3's project.json files produces more ignoreable files 163 | *.nuget.props 164 | *.nuget.targets 165 | 166 | # Microsoft Azure Build Output 167 | csx/ 168 | *.build.csdef 169 | 170 | # Microsoft Azure Emulator 171 | ecf/ 172 | rcf/ 173 | 174 | # Windows Store app package directories and files 175 | AppPackages/ 176 | BundleArtifacts/ 177 | Package.StoreAssociation.xml 178 | _pkginfo.txt 179 | 180 | # Visual Studio cache files 181 | # files ending in .cache can be ignored 182 | *.[Cc]ache 183 | # but keep track of directories ending in .cache 184 | !*.[Cc]ache/ 185 | 186 | # Others 187 | ClientBin/ 188 | ~$* 189 | *~ 190 | *.dbmdl 191 | *.dbproj.schemaview 192 | *.jfm 193 | *.pfx 194 | *.publishsettings 195 | node_modules/ 196 | orleans.codegen.cs 197 | 198 | # Since there are multiple workflows, uncomment next line to ignore bower_components 199 | # (https://github.com/github/gitignore/pull/1529#issuecomment-104372622) 200 | #bower_components/ 201 | 202 | # RIA/Silverlight projects 203 | Generated_Code/ 204 | 205 | # Backup & report files from converting an old project file 206 | # to a newer Visual Studio version. Backup files are not needed, 207 | # because we have git ;-) 208 | _UpgradeReport_Files/ 209 | Backup*/ 210 | UpgradeLog*.XML 211 | UpgradeLog*.htm 212 | 213 | # SQL Server files 214 | *.mdf 215 | *.ldf 216 | 217 | # Business Intelligence projects 218 | *.rdl.data 219 | *.bim.layout 220 | *.bim_*.settings 221 | 222 | # Microsoft Fakes 223 | FakesAssemblies/ 224 | 225 | # GhostDoc plugin setting file 226 | *.GhostDoc.xml 227 | 228 | # Node.js Tools for Visual Studio 229 | .ntvs_analysis.dat 230 | 231 | # Visual Studio 6 build log 232 | *.plg 233 | 234 | # Visual Studio 6 workspace options file 235 | *.opt 236 | 237 | # Visual Studio LightSwitch build output 238 | **/*.HTMLClient/GeneratedArtifacts 239 | **/*.DesktopClient/GeneratedArtifacts 240 | **/*.DesktopClient/ModelManifest.xml 241 | **/*.Server/GeneratedArtifacts 242 | **/*.Server/ModelManifest.xml 243 | _Pvt_Extensions 244 | 245 | # Paket dependency manager 246 | .paket/paket.exe 247 | paket-files/ 248 | 249 | # FAKE - F# Make 250 | .fake/ 251 | 252 | # JetBrains Rider 253 | .idea/ 254 | *.sln.iml 255 | 256 | # CodeRush 257 | .cr/ 258 | 259 | # Python Tools for Visual Studio (PTVS) 260 | __pycache__/ 261 | *.pyc 262 | 263 | Dependencies/ 264 | -------------------------------------------------------------------------------- /src/CustomTemperatureOverlay/Mod.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using CustomTemperatureOverlay.Data; 4 | using UnityEngine; 5 | 6 | namespace CustomTemperatureOverlay 7 | { 8 | public static class Mod 9 | { 10 | public static Color GetTemperatureColor(float temperature) 11 | { 12 | var firstStep = State.Steps[0]; 13 | 14 | if (temperature <= firstStep.value) 15 | { 16 | return firstStep.color; 17 | } 18 | 19 | var lastStep = State.Steps[State.Steps.Length - 1]; 20 | 21 | if (temperature >= lastStep.value) 22 | { 23 | return lastStep.color; 24 | } 25 | 26 | FindStepsAround(temperature, out var previousStep, out var nextStep); 27 | 28 | var previousToActualTemperatureDelta = temperature - previousStep.value; 29 | var previousToNextDelta = nextStep.value - previousStep.value; 30 | 31 | var factor = previousToActualTemperatureDelta / previousToNextDelta; 32 | 33 | var temperatureColor = Color.Lerp 34 | ( 35 | previousStep.color, 36 | nextStep.color, 37 | factor 38 | ); 39 | 40 | return temperatureColor; 41 | } 42 | 43 | public static void UpdateTemperatureLegend(ref List temperatureLegendEntries) 44 | { 45 | var stepsCount = State.Steps.Length; 46 | var entriesCountToModify = 8; 47 | 48 | for (int i = 0; i < entriesCountToModify; i++) 49 | { 50 | var step = stepsCount > i 51 | ? State.Steps[i] 52 | : State.Steps[stepsCount - 1]; 53 | 54 | var formattedTemperature = GameUtil.GetFormattedTemperature 55 | ( 56 | step.value, 57 | GameUtil.TimeSlice.None, 58 | GameUtil.TemperatureInterpretation.Absolute, 59 | true, 60 | false 61 | ); 62 | 63 | var entry = temperatureLegendEntries[entriesCountToModify - i - 1]; 64 | 65 | entry.colour = step.color; 66 | entry.desc_arg = formattedTemperature; 67 | } 68 | } 69 | 70 | private static void FindStepsAround(float temperature, out TemperatureStep previousStep, out TemperatureStep nextStep) 71 | { 72 | var stepsCount = State.Steps.Length; 73 | var firstStep = State.Steps[0]; 74 | previousStep = firstStep; 75 | 76 | var currentStep = 1; 77 | 78 | while (currentStep < stepsCount - 1) 79 | { 80 | var currentTemperatureStep = State.Steps[currentStep]; 81 | 82 | if (currentTemperatureStep.value > temperature) 83 | { 84 | break; 85 | } 86 | 87 | previousStep = currentTemperatureStep; 88 | currentStep++; 89 | } 90 | 91 | nextStep = State.Steps[currentStep]; 92 | } 93 | 94 | public static class Config 95 | { 96 | public static void Watch() 97 | { 98 | try 99 | { 100 | State.Common.WatchConfig(State.ConfigFileName, Reload); 101 | } 102 | catch (Exception e) 103 | { 104 | State.Common.Logger.Log("Failed to start config watch", e); 105 | } 106 | } 107 | 108 | public static void Reload(TemperatureStep[] steps) 109 | { 110 | try 111 | { 112 | Config.Load(steps); 113 | 114 | State.Common.Logger.Log("Config changed and reloaded"); 115 | } 116 | catch (Exception e) 117 | { 118 | State.Common.Logger.Log("Failed to reload config", e); 119 | } 120 | } 121 | 122 | public static bool Load(TemperatureStep[] steps = null) 123 | { 124 | try 125 | { 126 | if (steps == null) 127 | { 128 | steps = State.Common.LoadConfig(State.ConfigFileName); 129 | } 130 | 131 | if (!IsValid(steps)) 132 | { 133 | return false; 134 | } 135 | 136 | Config.SortByTemperature(steps); 137 | State.Steps = steps; 138 | 139 | return true; 140 | } 141 | catch (Exception e) 142 | { 143 | State.Common.Logger.Log("Failed to load config", e); 144 | 145 | return false; 146 | } 147 | } 148 | 149 | private static bool IsValid(TemperatureStep[] steps) 150 | { 151 | if (steps == null || steps.Length == 0) 152 | { 153 | State.Common.Logger.Log("Config is invalid"); 154 | 155 | return false; 156 | } 157 | 158 | return true; 159 | } 160 | 161 | private static void SortByTemperature(TemperatureStep[] steps) 162 | { 163 | Array.Sort 164 | ( 165 | steps, 166 | (step1, step2) => step1.value.CompareTo(step2.value) 167 | ); 168 | } 169 | } 170 | } 171 | } 172 | -------------------------------------------------------------------------------- /src/DisplayAllTemps/Patches/Settings.cs: -------------------------------------------------------------------------------- 1 | using Common; 2 | using HarmonyLib; 3 | using Newtonsoft.Json; 4 | using System; 5 | using System.Collections.Generic; 6 | using System.Linq; 7 | using System.Text; 8 | using UnityEngine; 9 | 10 | namespace DisplayAllTemps.Patches 11 | { 12 | public static class Settings 13 | { 14 | [HarmonyPatch(typeof(UnitConfigurationScreen))] 15 | [HarmonyPatch("DisplayCurrentUnit")] 16 | public static class UnitConfigurationScreen_DisplayCurrentUnit 17 | { 18 | public static bool Prefix(GameObject ___celsiusToggle, GameObject ___kelvinToggle, GameObject ___fahrenheitToggle) 19 | { 20 | ___celsiusToggle.GetComponent().GetReference("Checkmark").gameObject.SetActive((State.Unit & TemperatureUnitMultiple.Celsius) != 0); 21 | ___kelvinToggle.GetComponent().GetReference("Checkmark").gameObject.SetActive((State.Unit & TemperatureUnitMultiple.Kelvin) != 0); 22 | ___fahrenheitToggle.GetComponent().GetReference("Checkmark").gameObject.SetActive((State.Unit & TemperatureUnitMultiple.Fahrenheit) != 0); 23 | 24 | return false; 25 | } 26 | } 27 | 28 | [HarmonyPatch(typeof(UnitConfigurationScreen))] 29 | [HarmonyPatch("OnCelsiusClicked")] 30 | public static class UnitConfigurationScreen_OnCelsiusClicked 31 | { 32 | public static void Prefix() 33 | { 34 | OnClicked_Prefix(GameUtil.TemperatureUnit.Celsius); 35 | } 36 | 37 | public static void Postfix() 38 | { 39 | OnClicked_Postfix(GameUtil.TemperatureUnit.Celsius); 40 | } 41 | } 42 | 43 | [HarmonyPatch(typeof(UnitConfigurationScreen))] 44 | [HarmonyPatch("OnFahrenheitClicked")] 45 | public static class UnitConfigurationScreen_OnFahrenheitClicked 46 | { 47 | public static void Prefix() 48 | { 49 | OnClicked_Prefix(GameUtil.TemperatureUnit.Fahrenheit); 50 | } 51 | 52 | public static void Postfix() 53 | { 54 | OnClicked_Postfix(GameUtil.TemperatureUnit.Fahrenheit); 55 | } 56 | } 57 | 58 | [HarmonyPatch(typeof(UnitConfigurationScreen))] 59 | [HarmonyPatch("OnKelvinClicked")] 60 | public static class UnitConfigurationScreen_OnKelvinClicked 61 | { 62 | public static void Prefix() 63 | { 64 | OnClicked_Prefix(GameUtil.TemperatureUnit.Kelvin); 65 | } 66 | 67 | public static void Postfix() 68 | { 69 | OnClicked_Postfix(GameUtil.TemperatureUnit.Kelvin); 70 | } 71 | } 72 | 73 | private static void OnClicked_Prefix(GameUtil.TemperatureUnit unit) 74 | { 75 | var multipleUnit = VanillaToMultiple(unit); 76 | 77 | if ((State.Unit ^ multipleUnit) != 0) 78 | { 79 | FlipUnit(multipleUnit); 80 | } 81 | 82 | Save(); 83 | } 84 | 85 | private static void OnClicked_Postfix(GameUtil.TemperatureUnit unit) 86 | { 87 | var multipleUnit = VanillaToMultiple(unit); 88 | 89 | if ((State.Unit & multipleUnit) == 0) 90 | { 91 | GameUtil.temperatureUnit = State.LastMainUnit; 92 | } 93 | else 94 | { 95 | State.LastMainUnit = unit; 96 | } 97 | } 98 | 99 | private static void FlipUnit(TemperatureUnitMultiple unit) 100 | { 101 | try 102 | { 103 | if (State.Unit == unit) 104 | { 105 | return; 106 | } 107 | 108 | State.Unit ^= unit; 109 | } 110 | catch (Exception e) 111 | { 112 | State.Common.Logger.Log("Flip unit failed.", e); 113 | } 114 | 115 | return; 116 | } 117 | 118 | private static GameUtil.TemperatureUnit MultipleToVanilla(TemperatureUnitMultiple multiple) 119 | { 120 | return (State.Unit & TemperatureUnitMultiple.Celsius) != 0 121 | ? GameUtil.TemperatureUnit.Celsius 122 | : (State.Unit & TemperatureUnitMultiple.Fahrenheit) != 0 123 | ? GameUtil.TemperatureUnit.Fahrenheit 124 | : GameUtil.TemperatureUnit.Kelvin; 125 | } 126 | 127 | private static TemperatureUnitMultiple VanillaToMultiple(GameUtil.TemperatureUnit vanilla) 128 | { 129 | switch(vanilla) 130 | { 131 | case GameUtil.TemperatureUnit.Celsius: 132 | return TemperatureUnitMultiple.Celsius; 133 | case GameUtil.TemperatureUnit.Kelvin: 134 | return TemperatureUnitMultiple.Kelvin; 135 | case GameUtil.TemperatureUnit.Fahrenheit: 136 | return TemperatureUnitMultiple.Fahrenheit; 137 | default: 138 | State.Common.Logger.LogOnce("VanillaToMultiple: invalid unit"); 139 | return TemperatureUnitMultiple.All; 140 | } 141 | } 142 | 143 | private static void Save() 144 | { 145 | try 146 | { 147 | if (State.Common.ConfigPath == null) 148 | { 149 | return; 150 | } 151 | 152 | State.Common.SaveConfig(State.ConfigFileName, State.Unit); 153 | } 154 | catch (Exception e) 155 | { 156 | State.Common.Logger.Log("Failed to save unit to file.", e); 157 | } 158 | } 159 | } 160 | } 161 | -------------------------------------------------------------------------------- /src/DoorIcons/DoorIcons.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Debug 6 | AnyCPU 7 | {1EFDA498-D0B3-417C-957D-066D46A4EC02} 8 | Library 9 | Properties 10 | DoorIcons 11 | DoorIcons 12 | v4.7.1 13 | 512 14 | true 15 | 16 | 17 | 18 | true 19 | full 20 | false 21 | bin\Debug\ 22 | DEBUG;TRACE 23 | prompt 24 | 4 25 | false 26 | 27 | 28 | none 29 | true 30 | bin\Release\ 31 | TRACE 32 | prompt 33 | 4 34 | false 35 | 36 | 37 | 38 | ..\Dependencies\0Harmony.dll 39 | False 40 | 41 | 42 | ..\Dependencies\Assembly-CSharp.dll 43 | False 44 | 45 | 46 | ..\Dependencies\Assembly-CSharp-firstpass.dll 47 | False 48 | 49 | 50 | ..\..\Tools\Common\Common.dll 51 | 52 | 53 | False 54 | ..\Dependencies\Newtonsoft.Json.dll 55 | False 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | ..\Dependencies\UnityEngine.dll 65 | False 66 | 67 | 68 | ..\Dependencies\UnityEngine.CoreModule.dll 69 | False 70 | 71 | 72 | ..\Dependencies\UnityEngine.ImageConversionModule.dll 73 | False 74 | 75 | 76 | ..\Dependencies\UnityEngine.UI.dll 77 | False 78 | 79 | 80 | ..\Dependencies\UnityEngine.UIElementsModule.dll 81 | False 82 | 83 | 84 | ..\Dependencies\UnityEngine.UIModule.dll 85 | False 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | Always 98 | 99 | 100 | Always 101 | 102 | 103 | Always 104 | 105 | 106 | Always 107 | 108 | 109 | Always 110 | 111 | 112 | Always 113 | 114 | 115 | Always 116 | 117 | 118 | 119 | 120 | Always 121 | 122 | 123 | 124 | 125 | robocopy /E "$(TargetDir)..\$(ConfigurationName)" "$(SolutionDir)..\Mods\$(ProjectName)" 126 | if %25errorlevel%25 equ 1 exit 0 else exit %25errorlevel%25 127 | 128 | -------------------------------------------------------------------------------- /src/MaterialColor/MaterialColor.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Debug 6 | AnyCPU 7 | {FAAB5987-0B05-4114-808E-6C95D9EEA378} 8 | Library 9 | Properties 10 | MaterialColor 11 | MaterialColor 12 | v4.7.1 13 | 512 14 | 15 | 16 | 17 | false 18 | none 19 | false 20 | bin\Debug\ 21 | DEBUG;TRACE 22 | prompt 23 | 4 24 | false 25 | 26 | 27 | none 28 | true 29 | bin\Release\ 30 | TRACE 31 | prompt 32 | 4 33 | false 34 | 35 | 36 | 37 | False 38 | ..\Dependencies\0Harmony.dll 39 | False 40 | 41 | 42 | False 43 | ..\Dependencies\Assembly-CSharp.dll 44 | False 45 | 46 | 47 | False 48 | ..\Dependencies\Assembly-CSharp-firstpass.dll 49 | False 50 | 51 | 52 | False 53 | ..\..\Tools\Common\Common.dll 54 | 55 | 56 | False 57 | ..\Dependencies\Newtonsoft.Json.dll 58 | False 59 | 60 | 61 | 62 | 63 | False 64 | ..\Dependencies\UnityEngine.dll 65 | False 66 | 67 | 68 | False 69 | ..\Dependencies\UnityEngine.CoreModule.dll 70 | False 71 | 72 | 73 | ..\Dependencies\UnityEngine.ImageConversionModule.dll 74 | False 75 | 76 | 77 | False 78 | ..\Dependencies\UnityEngine.UI.dll 79 | False 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | Always 100 | 101 | 102 | Always 103 | 104 | 105 | Always 106 | 107 | 108 | 109 | 110 | 111 | Always 112 | 113 | 114 | 115 | 116 | robocopy /E "$(TargetDir)..\$(ConfigurationName)" "$(SolutionDir)..\Mods\$(ProjectName)" 117 | if %25errorlevel%25 equ 1 exit 0 else exit %25errorlevel%25 118 | 119 | 120 | 121 | 122 | 123 | -------------------------------------------------------------------------------- /src/ChainedDeconstruction/Patches/ChainedDeconstruction.cs: -------------------------------------------------------------------------------- 1 | using HarmonyLib; 2 | using Newtonsoft.Json; 3 | using System; 4 | using System.Collections.Generic; 5 | using System.Linq; 6 | using System.Reflection; 7 | using System.Text; 8 | using UnityEngine; 9 | 10 | namespace ChainedDeconstruction 11 | { 12 | [HarmonyPatch(typeof(Deconstructable))] 13 | [HarmonyPatch( 14 | "TriggerDestroy", 15 | new Type[] { 16 | typeof(float), 17 | typeof(byte), 18 | typeof(int), 19 | typeof(StandardWorker), 20 | } 21 | )] 22 | public class ChainedDeconstruction : KMod.UserMod2 23 | { 24 | private static readonly MethodInfo ForceDeconstruct = AccessTools.Method(typeof(Deconstructable), "OnCompleteWork"); 25 | private static readonly object[] NullWorkerParameter = new[] { (StandardWorker)null }; 26 | private static readonly AccessTools.FieldRef DestroyedGetter = AccessTools.FieldRefAccess("destroyed"); 27 | 28 | private static readonly string ConfigFileName = "Chainables.json"; 29 | 30 | private static bool Busy = false; 31 | 32 | private static readonly List CellsDeconstructed = new List(); 33 | 34 | public override void OnLoad(Harmony harmony) 35 | { 36 | 37 | base.OnLoad(harmony); 38 | 39 | if (State.Common.ConfigPath == null) 40 | { 41 | return; 42 | } 43 | 44 | State.Common.WatchConfig(ConfigFileName, SetChainables); 45 | 46 | try 47 | { 48 | SetChainables(State.Common.LoadConfig(ConfigFileName)); 49 | } 50 | catch (Exception e) 51 | { 52 | State.Common.Logger.Log("Error while loading config.", e); 53 | } 54 | } 55 | 56 | private static void SetChainables(string[] chainables) 57 | { 58 | if (chainables.Any(c => c == "*")) 59 | { 60 | State.ChainAll = true; 61 | 62 | State.Common.Logger.Log("Set chainables:", "all"); 63 | } 64 | else 65 | { 66 | State.Chainables = chainables 67 | .Select(c => c + "Complete") 68 | .ToArray(); 69 | 70 | State.ChainAll = false; 71 | 72 | State.Common.Logger.Log("Set chainables:", String.Join(", ", State.Chainables)); 73 | } 74 | } 75 | 76 | [HarmonyPrefix] 77 | [HarmonyPriority(Priority.HigherThanNormal)] 78 | public static bool StopExecutionIfInstanceIsNull(Deconstructable __instance) 79 | { 80 | var shouldContinue = __instance != null; 81 | 82 | return shouldContinue; 83 | } 84 | 85 | public static void Postfix(Deconstructable __instance) 86 | { 87 | if (Busy) 88 | { 89 | return; 90 | } 91 | 92 | Busy = true; 93 | 94 | try 95 | { 96 | if (__instance == null) 97 | { 98 | State.Common.Logger.LogOnce("__instance is null at Deconstructable.TriggerDestroy.Postfix"); 99 | 100 | return; 101 | } 102 | 103 | var name = __instance.name; 104 | 105 | if (DestroyedGetter(__instance) == false) 106 | { 107 | State.Common.Logger.LogOnce("DestroyedGetter is null:", name); 108 | 109 | return; 110 | } 111 | 112 | if (State.ChainAll == false) 113 | { 114 | if (State.Chainables.Contains(name) == false) 115 | { 116 | return; 117 | } 118 | } 119 | 120 | var layer = GetLayerForDeconstructable(__instance); 121 | 122 | CellsDeconstructed.Clear(); 123 | 124 | DeconstructAdjacent(__instance, name, layer); 125 | } 126 | catch (Exception e) 127 | { 128 | State.Common.Logger.Log("Deconstructable.TriggerDestroy.Postfix", e); 129 | } 130 | finally 131 | { 132 | Busy = false; 133 | } 134 | } 135 | 136 | private static void DeconstructAdjacent(Deconstructable rootDeconstructable, string name, int layer) 137 | { 138 | GetAdjacentCells(rootDeconstructable.GetCell()) 139 | .Select(cell => Grid.Objects[cell, layer]) 140 | .Where(gameObject => gameObject != null) 141 | .Select(gameObject => gameObject.GetComponent()) 142 | .Where(deconstructable => 143 | deconstructable != null 144 | && deconstructable.IsMarkedForDeconstruction() 145 | && deconstructable.name == name 146 | && false == DestroyedGetter(deconstructable) 147 | ) 148 | .Do(deconstructable => 149 | { 150 | var cell = deconstructable.GetCell(); 151 | 152 | if (CellsDeconstructed.Contains(cell)) 153 | { 154 | return; 155 | } 156 | 157 | var primaryElement = deconstructable.GetComponent(); 158 | 159 | if (primaryElement) 160 | { 161 | if (primaryElement.Temperature > 0) 162 | { 163 | ForceDeconstruct.Invoke(deconstructable, NullWorkerParameter); 164 | } 165 | else 166 | { 167 | State.Common.Logger.LogOnce($"Temperature of {deconstructable.name} is {primaryElement.Temperature}, this is most likely an error. Skipping deconstruct to prevent crash."); 168 | } 169 | } 170 | else 171 | { 172 | State.Common.Logger.LogOnce($"PrimaryElement component of {deconstructable.name} is null, this is most likely an error. Skipping deconstruct to prevent possible crash."); 173 | } 174 | 175 | CellsDeconstructed.Add(cell); 176 | DeconstructAdjacent(deconstructable, name, layer); 177 | }); 178 | } 179 | 180 | private static int GetLayerForDeconstructable(Deconstructable deconstructable) 181 | { 182 | var cell = deconstructable.GetCell(); 183 | 184 | for (int layer = 1; layer <= 27; layer++) 185 | { 186 | var obj = Grid.Objects[cell, layer]; 187 | 188 | if (obj != null && obj.GetComponent() == deconstructable) 189 | { 190 | return layer; 191 | } 192 | } 193 | 194 | return (int)ObjectLayer.Building; 195 | } 196 | 197 | private static IEnumerable GetAdjacentCells(int cell) 198 | { 199 | yield return Grid.CellAbove(cell); 200 | yield return Grid.CellBelow(cell); 201 | yield return Grid.CellLeft(cell); 202 | yield return Grid.CellRight(cell); 203 | } 204 | } 205 | } 206 | -------------------------------------------------------------------------------- /src/MaterialColor/Painter.cs: -------------------------------------------------------------------------------- 1 | using HarmonyLib; 2 | using MaterialColor.Extensions; 3 | using MaterialColor.Helpers; 4 | using MaterialColor.Patches; 5 | using System; 6 | using System.Collections.Generic; 7 | using System.Linq; 8 | using System.Text; 9 | using UnityEngine; 10 | 11 | namespace MaterialColor 12 | { 13 | /// 14 | /// Provides main mod functionality - applying colors to buildings and tiles. 15 | /// 16 | public static class Painter 17 | { 18 | private static readonly string ExcludeKeyword = "NoPaint"; 19 | private static readonly Tag ExcludedTag = new Tag("NoPaint"); 20 | 21 | public static void Refresh() 22 | { 23 | UpdateBuildingsColors(); 24 | RebuildAllTiles(); 25 | } 26 | 27 | public static void UpdateBuildingColor(Component component) 28 | { 29 | var buildingComplete = component.GetComponent(); 30 | 31 | if (buildingComplete != null) 32 | { 33 | UpdateBuildingColor(buildingComplete); 34 | } 35 | else 36 | { 37 | State.Common.Logger.LogOnce("Couldn't find BuildingComplete on component", component.name); 38 | } 39 | } 40 | 41 | public static void UpdateBuildingColor(BuildingComplete building) 42 | { 43 | try 44 | { 45 | var isExcluded = building.name == "PixelPackComplete" 46 | || building.name == "WallpaperComplete" 47 | || building.name.Contains(ExcludeKeyword) 48 | || building.HasTag(ExcludedTag); 49 | 50 | if (isExcluded) 51 | { 52 | return; 53 | } 54 | 55 | Color color = ColorHelper.GetComponentMaterialColor(building); 56 | 57 | Filter(building.name, ref color); 58 | 59 | var isTile = building.TryGetComponent(out _); 60 | 61 | if (isTile) 62 | { 63 | ApplyColorToTile(building, color); 64 | } 65 | else 66 | { 67 | ApplyColorToBuilding(building, color); 68 | } 69 | } 70 | catch (Exception e) 71 | { 72 | State.Common.Logger.LogOnce("Failed to update material building color", e); 73 | } 74 | } 75 | 76 | private static void ApplyColorToBuilding(BuildingComplete building, Color color) 77 | { 78 | TreeFilterable treeFilterable; 79 | Ownable ownable; 80 | KAnimControllerBase kAnimBase; 81 | 82 | if ((ownable = building.GetComponent()) != null) 83 | { 84 | TryApplyTintViaOwnable(ownable, color); 85 | } 86 | else if ((treeFilterable = building.GetComponent()) != null) 87 | { 88 | TryApplyTintViaTreeFilterable(treeFilterable, color); 89 | } 90 | else if ((kAnimBase = building.GetComponent()) != null) 91 | { 92 | kAnimBase.TintColour = color; 93 | } 94 | else 95 | { 96 | State.Common.Logger.LogOnce($"Invalid building <{building}> and its not a registered tile."); 97 | } 98 | } 99 | 100 | private static bool TryApplyTintViaOwnable(Ownable ownable, Color targetColor) 101 | { 102 | try 103 | { 104 | Traverse.Create(ownable).Field("ownedTint").SetValue(targetColor); 105 | Traverse.Create(ownable).Method("UpdateTint").GetValue(); 106 | 107 | return true; 108 | } 109 | catch (Exception e) 110 | { 111 | State.Common.Logger.Log("Failed to apply tint via ownable", e); 112 | } 113 | 114 | return false; 115 | } 116 | 117 | private static bool TryApplyTintViaTreeFilterable(TreeFilterable treeFilterable, Color32 targetColor) 118 | { 119 | try 120 | { 121 | treeFilterable.filterTint = targetColor; 122 | 123 | return true; 124 | } 125 | catch (Exception e) 126 | { 127 | State.Common.Logger.LogOnce("Failed to apply tint via TreeFilterable", e); 128 | } 129 | 130 | return false; 131 | } 132 | 133 | private static void ApplyColorToTile(BuildingComplete building, Color color) 134 | { 135 | try 136 | { 137 | State.TileColors[Grid.PosToCell(building)] = color.ToTileColor(); 138 | } 139 | catch (Exception e) 140 | { 141 | State.Common.Logger.LogOnce("Error while getting cell color", e); 142 | } 143 | } 144 | 145 | public static void ApplyColorToKAnimControllerBase(Component component) 146 | { 147 | KAnimControllerBase animBase = component.GetComponent(); 148 | 149 | if (animBase != null) 150 | { 151 | Color color = ColorHelper.GetComponentMaterialColor(component); 152 | 153 | Painter.Filter(animBase.name, ref color); 154 | 155 | animBase.TintColour = color; 156 | } 157 | else 158 | { 159 | State.Common.Logger.LogOnce("Failed to find KAnimControllerBase", component.name); 160 | } 161 | } 162 | 163 | private static void RebuildAllTiles() 164 | { 165 | for (int i = 0; i < Grid.CellCount; i++) 166 | { 167 | World.Instance.blockTileRenderer.Rebuild(ObjectLayer.FoundationTile, i); 168 | } 169 | 170 | State.Common.Logger.LogDebug("All tiles rebuilt."); 171 | } 172 | 173 | private static void UpdateBuildingsColors() 174 | { 175 | try 176 | { 177 | foreach (BuildingComplete building in Components.BuildingCompletes.Items) 178 | { 179 | UpdateBuildingColor(building); 180 | } 181 | 182 | State.Common.Logger.Log(Components.BuildingCompletes.Count + " buildings updated successfully."); 183 | } 184 | catch (Exception e) 185 | { 186 | State.Common.Logger.Log("Buildings colors update failed.", e); 187 | } 188 | } 189 | 190 | public static void Filter(string buildingName, ref Color color) 191 | { 192 | try 193 | { 194 | buildingName = buildingName.Replace("Complete", string.Empty); 195 | 196 | if (State.TypeFilter != null) 197 | { 198 | if (!State.TypeFilter.Check(buildingName)) 199 | { 200 | color = ColorHelper.DefaultColor; 201 | } 202 | } 203 | else 204 | { 205 | State.Common.Logger.LogOnce("State.TypeFilter is null"); 206 | } 207 | } 208 | catch (Exception e) 209 | { 210 | State.Common.Logger.LogOnce("Error while filtering for: " + buildingName, e); 211 | } 212 | } 213 | } 214 | } 215 | -------------------------------------------------------------------------------- /src/GasOverlay/GasOverlayMod.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using HarmonyLib; 5 | using UnityEngine; 6 | 7 | namespace GasOverlay 8 | { 9 | public static class GasOverlayMod 10 | { 11 | private const string ConfigFileName = "Config.json"; 12 | private const string OverlayTitle = "Gas Overlay"; 13 | 14 | private static Color[] LastColors; 15 | 16 | private static void ResetLastColors() 17 | { 18 | LastColors = Enumerable 19 | .Repeat(State.Config.NotGasColor, Grid.CellCount) 20 | .ToArray(); 21 | } 22 | 23 | public static void OnLoad() 24 | { 25 | if (State.Common.ConfigPath == null) 26 | { 27 | return; 28 | } 29 | 30 | State.Common.WatchConfig(ConfigFileName, LoadConfig); 31 | 32 | try 33 | { 34 | LoadConfig(State.Common.LoadConfig(ConfigFileName)); 35 | } 36 | catch (Exception e) 37 | { 38 | State.Common.Logger.Log("Error while loading config." + e); 39 | } 40 | } 41 | 42 | private static void LoadConfig(Config config) 43 | { 44 | State.Config = config; 45 | 46 | State.Config.InterpFactor = Mathf.Clamp(State.Config.InterpFactor, float.Epsilon, 1); 47 | State.Config.MinimumIntensity = Mathf.Clamp01(State.Config.MinimumIntensity); 48 | 49 | ResetLastColors(); 50 | 51 | State.Common.Logger.Log("Config loaded."); 52 | } 53 | 54 | private static Color32 GetSubstanceColor(Element element) 55 | { 56 | var color = element.substance.colour; 57 | 58 | return new Color32 59 | ( 60 | color.r, 61 | color.g, 62 | color.b, 63 | byte.MaxValue 64 | ); 65 | } 66 | 67 | [HarmonyPatch(typeof(SimDebugView), "GetOxygenMapColour")] 68 | public static class SimDebugView_GetOxygenMapColour 69 | { 70 | // TODO: add error handling 71 | public static bool Prefix(int cell, ref Color __result) 72 | { 73 | var element = Grid.Element[cell]; 74 | 75 | if (LastColors == null || cell >= LastColors.Length) 76 | { 77 | ResetLastColors(); 78 | } 79 | 80 | var color = element.IsGas 81 | ? GetGasColor(element, cell) 82 | : State.Config.NotGasColor; 83 | 84 | var lastColor = LastColors[cell]; 85 | 86 | if (lastColor != color) 87 | { 88 | TransitColor(ref color, lastColor); 89 | LastColors[cell] = color; 90 | } 91 | 92 | __result = color; 93 | 94 | return false; 95 | } 96 | 97 | private static Color GetGasColor(Element element, int cellIndex) 98 | { 99 | float mass = Grid.Mass[cellIndex]; 100 | float maxMass = State.Config.MaxMass; 101 | 102 | float pressure = GetPressureFraction(mass, maxMass); 103 | 104 | Color color = GetSubstanceColor(element); 105 | 106 | ScaleToPressure(ref color, pressure); 107 | 108 | if (State.Config.ShowEarDrumPopMarker && mass > State.Config.EarPopMass) 109 | { 110 | MarkEarDrumPop(ref color, element.id); 111 | } 112 | 113 | return color; 114 | } 115 | 116 | private static float GetPressureFraction(float mass, float maxMass) 117 | { 118 | float minFraction = State.Config.MinimumIntensity; 119 | float fraction = mass / maxMass; 120 | 121 | float lerped = Mathf.Lerp(minFraction, 1, fraction); 122 | 123 | float exponentRootOf = (float)Math.Pow(lerped, State.Config.ExponentRootOf); 124 | 125 | return exponentRootOf; 126 | } 127 | 128 | private static void ScaleToPressure(ref Color color, float fraction) 129 | { 130 | color = Color.LerpUnclamped(Color.white, color, fraction); 131 | } 132 | 133 | private static void MarkEarDrumPop(ref Color color, SimHashes elementID) 134 | { 135 | switch (elementID) 136 | { 137 | case SimHashes.CarbonDioxide: 138 | case SimHashes.SourGas: 139 | color.r = Mathf.Clamp01(color.r + State.Config.EarPopChange); 140 | break; 141 | case SimHashes.Methane: 142 | case SimHashes.ContaminatedOxygen: 143 | color.g = Mathf.Clamp01(color.g + State.Config.EarPopChange); 144 | break; 145 | default: 146 | color.g = Mathf.Clamp01(color.g - State.Config.EarPopChange); 147 | break; 148 | } 149 | } 150 | 151 | private static void TransitColor(ref Color newColor, Color lastColor) 152 | { 153 | newColor = Color.LerpUnclamped(lastColor, newColor, State.Config.InterpFactor); 154 | } 155 | } 156 | 157 | [HarmonyPatch(typeof(OverlayLegend), "OnSpawn")] 158 | public static class OverlayLegend_OnSpawn 159 | { 160 | public static void Postfix(List ___overlayInfoList) 161 | { 162 | var oxygenOverlay = ___overlayInfoList 163 | .Find(info => info.mode == OverlayModes.Oxygen.ID); 164 | 165 | var icon = oxygenOverlay.infoUnits[0].icon; 166 | 167 | oxygenOverlay.name = OverlayTitle.ToUpper(); 168 | oxygenOverlay.infoUnits = ElementLoader.elements 169 | .Where(ShouldBeListedInOverlayLegend) 170 | .OrderBy(element => element.molarMass) 171 | .Select(element => new OverlayLegend.OverlayInfoUnit( 172 | icon, 173 | Util.StripTextFormatting(element.name), 174 | GetSubstanceColor(element), 175 | Color.white)) 176 | .ToList(); 177 | } 178 | 179 | private static bool ShouldBeListedInOverlayLegend(Element element) 180 | => element.disabled == false 181 | && element.IsGas 182 | && element.lowTemp < 1000; 183 | } 184 | 185 | [HarmonyPatch(typeof(OverlayMenu), "InitializeToggles")] 186 | public static class OverlayMenu_InitializeToggles 187 | { 188 | public static void Postfix(List ___overlayToggleInfos) 189 | { 190 | var toggle = ___overlayToggleInfos 191 | .Find(info => Traverse 192 | .Create(info) 193 | .Field("simView") 194 | .GetValue() == OverlayModes.Oxygen.ID); 195 | 196 | toggle.text = OverlayTitle; 197 | toggle.tooltipHeader = OverlayTitle; 198 | toggle.tooltip = GameUtil.ReplaceHotkeyString( 199 | "Displays gasses {Hotkey}", 200 | toggle.hotKey 201 | ); 202 | } 203 | } 204 | } 205 | } 206 | -------------------------------------------------------------------------------- /src/Etiam-ONI-Modpack.sln: -------------------------------------------------------------------------------- 1 | 2 | Microsoft Visual Studio Solution File, Format Version 12.00 3 | # Visual Studio Version 16 4 | VisualStudioVersion = 16.0.30517.126 5 | MinimumVisualStudioVersion = 10.0.40219.1 6 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "GasOverlay", "GasOverlay\GasOverlay.csproj", "{4475E088-4830-4BB4-BC97-FC8ACC18AFCB}" 7 | ProjectSection(ProjectDependencies) = postProject 8 | {B0FE7A0A-C62D-41AE-94B3-DA3429806A29} = {B0FE7A0A-C62D-41AE-94B3-DA3429806A29} 9 | EndProjectSection 10 | EndProject 11 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MaterialColor", "MaterialColor\MaterialColor.csproj", "{FAAB5987-0B05-4114-808E-6C95D9EEA378}" 12 | ProjectSection(ProjectDependencies) = postProject 13 | {B0FE7A0A-C62D-41AE-94B3-DA3429806A29} = {B0FE7A0A-C62D-41AE-94B3-DA3429806A29} 14 | EndProjectSection 15 | EndProject 16 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FreeCamera", "FreeCamera\FreeCamera.csproj", "{3E4C5F26-692B-4FCD-B683-6D5FAAEFF7D9}" 17 | EndProject 18 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "RemoveDailyReports", "SaveNoDailyReports\RemoveDailyReports.csproj", "{D45B80B8-8950-4ED4-8ED8-3A044FF4D9C9}" 19 | EndProject 20 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CustomTemperatureOverlay", "CustomTemperatureOverlay\CustomTemperatureOverlay.csproj", "{92E021FE-3CCC-43B1-984D-9C48CA427610}" 21 | ProjectSection(ProjectDependencies) = postProject 22 | {B0FE7A0A-C62D-41AE-94B3-DA3429806A29} = {B0FE7A0A-C62D-41AE-94B3-DA3429806A29} 23 | EndProjectSection 24 | EndProject 25 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Common", "Tools\Common\Common.csproj", "{B0FE7A0A-C62D-41AE-94B3-DA3429806A29}" 26 | EndProject 27 | Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Tools", "Tools", "{CBB8B5C1-6C7D-461A-A013-8470A8417C46}" 28 | EndProject 29 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ClearRegolith", "Tools\ClearRegolith\ClearRegolith.csproj", "{886D1096-5D6B-4F42-A793-1CDF6F73E96B}" 30 | EndProject 31 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "BenchmarkGasOverlay", "Tools\BenchmarkGasOverlay\BenchmarkGasOverlay.csproj", "{F10B8EE2-8869-46E1-A0F3-8BC189DFA55E}" 32 | EndProject 33 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ChainedDeconstruction", "ChainedDeconstruction\ChainedDeconstruction.csproj", "{20DEA568-F78F-4891-9C9E-EA79D1403758}" 34 | EndProject 35 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "LiquefiableSculptures", "LiquefiableSculptures\LiquefiableSculptures.csproj", "{BCB946C1-3237-4163-967D-4DC0F491683C}" 36 | EndProject 37 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DoorIcons", "DoorIcons\DoorIcons.csproj", "{1EFDA498-D0B3-417C-957D-066D46A4EC02}" 38 | EndProject 39 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DisplayAllTemps", "DisplayAllTemps\DisplayAllTemps.csproj", "{F90017D3-DAC2-4971-B0B2-E96B2ADB6A9F}" 40 | EndProject 41 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DraggableUI", "DraggableUI\DraggableUI.csproj", "{93CDE770-6E29-4B01-B0DD-A3B586FBB111}" 42 | EndProject 43 | Global 44 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 45 | Debug|Any CPU = Debug|Any CPU 46 | Release|Any CPU = Release|Any CPU 47 | EndGlobalSection 48 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 49 | {4475E088-4830-4BB4-BC97-FC8ACC18AFCB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 50 | {4475E088-4830-4BB4-BC97-FC8ACC18AFCB}.Debug|Any CPU.Build.0 = Debug|Any CPU 51 | {4475E088-4830-4BB4-BC97-FC8ACC18AFCB}.Release|Any CPU.ActiveCfg = Release|Any CPU 52 | {4475E088-4830-4BB4-BC97-FC8ACC18AFCB}.Release|Any CPU.Build.0 = Release|Any CPU 53 | {FAAB5987-0B05-4114-808E-6C95D9EEA378}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 54 | {FAAB5987-0B05-4114-808E-6C95D9EEA378}.Debug|Any CPU.Build.0 = Debug|Any CPU 55 | {FAAB5987-0B05-4114-808E-6C95D9EEA378}.Release|Any CPU.ActiveCfg = Release|Any CPU 56 | {FAAB5987-0B05-4114-808E-6C95D9EEA378}.Release|Any CPU.Build.0 = Release|Any CPU 57 | {3E4C5F26-692B-4FCD-B683-6D5FAAEFF7D9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 58 | {3E4C5F26-692B-4FCD-B683-6D5FAAEFF7D9}.Debug|Any CPU.Build.0 = Debug|Any CPU 59 | {3E4C5F26-692B-4FCD-B683-6D5FAAEFF7D9}.Release|Any CPU.ActiveCfg = Release|Any CPU 60 | {3E4C5F26-692B-4FCD-B683-6D5FAAEFF7D9}.Release|Any CPU.Build.0 = Release|Any CPU 61 | {D45B80B8-8950-4ED4-8ED8-3A044FF4D9C9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 62 | {D45B80B8-8950-4ED4-8ED8-3A044FF4D9C9}.Debug|Any CPU.Build.0 = Debug|Any CPU 63 | {D45B80B8-8950-4ED4-8ED8-3A044FF4D9C9}.Release|Any CPU.ActiveCfg = Release|Any CPU 64 | {D45B80B8-8950-4ED4-8ED8-3A044FF4D9C9}.Release|Any CPU.Build.0 = Release|Any CPU 65 | {92E021FE-3CCC-43B1-984D-9C48CA427610}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 66 | {92E021FE-3CCC-43B1-984D-9C48CA427610}.Debug|Any CPU.Build.0 = Debug|Any CPU 67 | {92E021FE-3CCC-43B1-984D-9C48CA427610}.Release|Any CPU.ActiveCfg = Release|Any CPU 68 | {92E021FE-3CCC-43B1-984D-9C48CA427610}.Release|Any CPU.Build.0 = Release|Any CPU 69 | {B0FE7A0A-C62D-41AE-94B3-DA3429806A29}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 70 | {B0FE7A0A-C62D-41AE-94B3-DA3429806A29}.Debug|Any CPU.Build.0 = Debug|Any CPU 71 | {B0FE7A0A-C62D-41AE-94B3-DA3429806A29}.Release|Any CPU.ActiveCfg = Release|Any CPU 72 | {B0FE7A0A-C62D-41AE-94B3-DA3429806A29}.Release|Any CPU.Build.0 = Release|Any CPU 73 | {886D1096-5D6B-4F42-A793-1CDF6F73E96B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 74 | {886D1096-5D6B-4F42-A793-1CDF6F73E96B}.Debug|Any CPU.Build.0 = Debug|Any CPU 75 | {886D1096-5D6B-4F42-A793-1CDF6F73E96B}.Release|Any CPU.ActiveCfg = Release|Any CPU 76 | {886D1096-5D6B-4F42-A793-1CDF6F73E96B}.Release|Any CPU.Build.0 = Release|Any CPU 77 | {F10B8EE2-8869-46E1-A0F3-8BC189DFA55E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 78 | {F10B8EE2-8869-46E1-A0F3-8BC189DFA55E}.Debug|Any CPU.Build.0 = Debug|Any CPU 79 | {F10B8EE2-8869-46E1-A0F3-8BC189DFA55E}.Release|Any CPU.ActiveCfg = Release|Any CPU 80 | {F10B8EE2-8869-46E1-A0F3-8BC189DFA55E}.Release|Any CPU.Build.0 = Release|Any CPU 81 | {20DEA568-F78F-4891-9C9E-EA79D1403758}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 82 | {20DEA568-F78F-4891-9C9E-EA79D1403758}.Debug|Any CPU.Build.0 = Debug|Any CPU 83 | {20DEA568-F78F-4891-9C9E-EA79D1403758}.Release|Any CPU.ActiveCfg = Release|Any CPU 84 | {20DEA568-F78F-4891-9C9E-EA79D1403758}.Release|Any CPU.Build.0 = Release|Any CPU 85 | {BCB946C1-3237-4163-967D-4DC0F491683C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 86 | {BCB946C1-3237-4163-967D-4DC0F491683C}.Debug|Any CPU.Build.0 = Debug|Any CPU 87 | {BCB946C1-3237-4163-967D-4DC0F491683C}.Release|Any CPU.ActiveCfg = Release|Any CPU 88 | {BCB946C1-3237-4163-967D-4DC0F491683C}.Release|Any CPU.Build.0 = Release|Any CPU 89 | {1EFDA498-D0B3-417C-957D-066D46A4EC02}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 90 | {1EFDA498-D0B3-417C-957D-066D46A4EC02}.Debug|Any CPU.Build.0 = Debug|Any CPU 91 | {1EFDA498-D0B3-417C-957D-066D46A4EC02}.Release|Any CPU.ActiveCfg = Release|Any CPU 92 | {1EFDA498-D0B3-417C-957D-066D46A4EC02}.Release|Any CPU.Build.0 = Release|Any CPU 93 | {F90017D3-DAC2-4971-B0B2-E96B2ADB6A9F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 94 | {F90017D3-DAC2-4971-B0B2-E96B2ADB6A9F}.Debug|Any CPU.Build.0 = Debug|Any CPU 95 | {F90017D3-DAC2-4971-B0B2-E96B2ADB6A9F}.Release|Any CPU.ActiveCfg = Release|Any CPU 96 | {F90017D3-DAC2-4971-B0B2-E96B2ADB6A9F}.Release|Any CPU.Build.0 = Release|Any CPU 97 | {93CDE770-6E29-4B01-B0DD-A3B586FBB111}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 98 | {93CDE770-6E29-4B01-B0DD-A3B586FBB111}.Debug|Any CPU.Build.0 = Debug|Any CPU 99 | {93CDE770-6E29-4B01-B0DD-A3B586FBB111}.Release|Any CPU.ActiveCfg = Release|Any CPU 100 | {93CDE770-6E29-4B01-B0DD-A3B586FBB111}.Release|Any CPU.Build.0 = Release|Any CPU 101 | EndGlobalSection 102 | GlobalSection(SolutionProperties) = preSolution 103 | HideSolutionNode = FALSE 104 | EndGlobalSection 105 | GlobalSection(NestedProjects) = preSolution 106 | {B0FE7A0A-C62D-41AE-94B3-DA3429806A29} = {CBB8B5C1-6C7D-461A-A013-8470A8417C46} 107 | {886D1096-5D6B-4F42-A793-1CDF6F73E96B} = {CBB8B5C1-6C7D-461A-A013-8470A8417C46} 108 | {F10B8EE2-8869-46E1-A0F3-8BC189DFA55E} = {CBB8B5C1-6C7D-461A-A013-8470A8417C46} 109 | EndGlobalSection 110 | GlobalSection(ExtensibilityGlobals) = postSolution 111 | SolutionGuid = {04275AE4-9475-4B12-9048-311A0F8E22A7} 112 | EndGlobalSection 113 | EndGlobal 114 | --------------------------------------------------------------------------------