Skip to content

Commit

Permalink
red squiglies, update project
Browse files Browse the repository at this point in the history
  • Loading branch information
FluffierThanThou committed Jul 31, 2021
1 parent 15d661c commit 1fce8fc
Show file tree
Hide file tree
Showing 19 changed files with 488 additions and 625 deletions.
50 changes: 21 additions & 29 deletions About/About.xml
Original file line number Diff line number Diff line change
@@ -1,40 +1,32 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<ModMetaData>
<name>Backup Power</name>
<author>Fluffy</author>
<supportedVersions>
<li>1.2</li>
</supportedVersions>
<description>add control units to generators to automatically switch them on and off when needed

&lt;size=24&gt;Features&lt;/size&gt;
Adds generator control boxes, which will automatically turn the generators they are attached to on and off depending on current power levels.

Control boxes can be built after researching &lt;i&gt;Backup Power&lt;/i&gt;, a follow-up to &lt;i&gt;Microelectronics&lt;/i&gt;. Once researched, build a power control box on top of any generator to have it automatically toggled on/off depending on the electrical grid’s supply and demand.
<name>Backup Power</name>
<author>Fluffy</author>
<packageId>Fluffy.BackupPower</packageId>
<description>add control units to generators to automatically switch them on and off when needed

Should work on any power generator that has the ‘flickable’ tag, so any vanilla or modded power producer that can be toggled on and off.

Control boxes have an indicator light that can take three colours:
&lt;size=28&gt;Features&lt;/size&gt;

Adds generator control boxes, which will automatically turn the generators they are attached to on and off depending on current power levels.

blue: control box is in standby, the generator is not currently needed.
green: control box is active, the generator is running.
red: control box error, the generator can not run.
Control boxes can be built after researching &lt;i&gt;Backup Power&lt;/i&gt;, a follow-up to &lt;i&gt;Microelectronics&lt;/i&gt;. Once researched, build a power control box on top of any generator to have it automatically toggled on/off depending on the electrical grid's supply and demand.

&lt;size=24&gt;Known Issues&lt;/size&gt;
None (yet).
Should work on any power generator that has the 'flickable' tag, so any vanilla or modded power producer that can be toggled on and off.

&lt;size=24&gt;Contributors&lt;/size&gt;
Control boxes have an indicator light that can take three colours:

Cenbes: Control box texture
- blue: control box is in standby, the generator is not currently needed.
- green: control box is active, the generator is running.
- red: control box error, the generator can not run.

&lt;size=24&gt;Version&lt;/size&gt;
This is version 1.10.180, for RimWorld 1.2.2753.
&lt;size=28&gt;Known Issues&lt;/size&gt;

</description>
<url>https://ludeon.com/forums/index.php?topic=16120</url>
<packageId>fluffy.backuppower</packageId>
<loadAfter>
<li>Ludeon.RimWorld</li>
</loadAfter>
None (yet).</description>
<url>https://github.com/fluffy-mods/BackupPower</url>
<supportedVersions>
<li>1.3</li>
</supportedVersions>
<loadAfter>
<li>Ludeon.RimWorld</li>
</loadAfter>
</ModMetaData>
Binary file modified About/Preview.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
5 changes: 0 additions & 5 deletions About/dependencies.json

This file was deleted.

Binary file modified Assemblies/BackupPower.dll
Binary file not shown.
28 changes: 16 additions & 12 deletions Readme.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
[![RimWorld 1.2](https://img.shields.io/badge/RimWorld-1.2-brightgreen.svg)](http://rimworldgame.com/)

add control units to generators to automatically switch them on and off when needed

![Features](https://banners.karel-kroeze.nl/title/Features.png)
Adds generator control boxes, which will automatically turn the generators they are attached to on and off depending on current power levels.
![Power Control Box](https://i.imgur.com/kQtPswV.gif)
![Power Control Box](https://i.imgur.com/kQtPswV.gif)

Control boxes can be built after researching _Backup Power_, a follow-up to _Microelectronics_. Once researched, build a power control box on top of any generator to have it automatically toggled on/off depending on the electrical grid's supply and demand.

Should work on any power generator that has the 'flickable' tag, so any vanilla or modded power producer that can be toggled on and off.
Expand All @@ -17,32 +16,37 @@ Control boxes have an indicator light that can take three colours:
![Known Issues](https://banners.karel-kroeze.nl/title/Known%20Issues.png)
None (yet).

![Contributors](https://banners.karel-kroeze.nl/title/Contributors.png)
Juijote: [Simplified Chinese translation](https://github.com/fluffy-mods/BackupPower/commit/15d661c)

![Contributors](https://banners.karel-kroeze.nl/title/Contributors.png)
- Cenbes: Control box texture

![Think you found a bug?](https://banners.karel-kroeze.nl/title/Think%20you%20found%20a%20bug%3F.png)

Please read [this guide](http://steamcommunity.com/sharedfiles/filedetails/?id=725234314) before creating a bug report,
and then create a bug report [here](https://github.com/fluffy-mods/BackupPower/issues)

![Older versions](https://banners.karel-kroeze.nl/title/Older%20versions.png)

All current and past versions of this mod can be downloaded from [GitHub](https://github.com/fluffy-mods/BackupPower/releases).

![License](https://banners.karel-kroeze.nl/title/License.png)

All original code in this mod is licensed under the [MIT license](https://opensource.org/licenses/MIT). Do what you want, but give me credit.
All original content (e.g. text, imagery, sounds) in this mod is licensed under the [CC-BY-SA 4.0 license](http://creativecommons.org/licenses/by-sa/4.0/).

Parts of the code in this mod, and some content may be licensed by their original authors. If this is the case, the original author & license will either be given in the source code, or be in a LICENSE file next to the content. Please do not decompile my mods, but use the original source code available on [GitHub](https://github.com/fluffy-mods/BackupPower/), so license information in the source code is preserved.
Parts of the code in this mod, and some of the content may be licensed by their original authors. If this is the case, the original author & license will either be given in the source code, or be in a LICENSE file next to the content. Please do not decompile my mods, but use the original source code available on [GitHub](https://github.com/fluffy-mods/BackupPower/), so license information in the source code is preserved.

Parts of this mod were created by, or derived from works created by;
- Freepik: power button preview icon ([BY-NC](https://www.freepik.com/))
- Pixel Perfect: thunder preview icon ([BY-NC](https://icon54.com/))

[![Supporters](https://banners.karel-kroeze.nl/donations.png)](https://ko-fi.com/fluffymods)

![Are you enjoying my mods?](https://banners.karel-kroeze.nl/title/Are%20you%20enjoying%20my%20mods%3F.png)
Become a supporter and show your appreciation by buying me a coffee (or contribute towards a nice single malt).

[![Buy Me a Coffee](http://i.imgur.com/EjWiUwx.gif)](https://ko-fi.com/fluffymods)
Become a supporter and show your appreciation by buying me a coffee (or contribute towards a nice single malt).

[![I Have a Black Dog](https://i.ibb.co/ss59Rwy/New-Project-2.png)](https://www.youtube.com/watch?v=XiCrniLQGYc)
[![Supporters](https://banners.karel-kroeze.nl/donations.png)](https://ko-fi.com/fluffymods)

[![Buy Me a Coffee](https://i.imgur.com/6P7Ap79.gif)](https://ko-fi.com/fluffymods)

![Version](https://banners.karel-kroeze.nl/title/Version.png)
This is version 1.10.180, for RimWorld 1.2.2753.
[![I Have a Black Dog](https://i.ibb.co/ss59Rwy/New-Project-2.png)](https://www.youtube.com/watch?v=XiCrniLQGYc)
23 changes: 9 additions & 14 deletions Source/BackupPower.cs
Original file line number Diff line number Diff line change
@@ -1,30 +1,25 @@
// BackupPower.cs
// BackupPower.cs
// Copyright Karel Kroeze, 2020-2020

using UnityEngine;
using Verse;

namespace BackupPower
{
public class BackupPower : Mod
{
public BackupPower( ModContentPack content ) : base( content )
{
namespace BackupPower {
public class BackupPower: Mod {
public BackupPower(ModContentPack content) : base(content) {
// initialize settings
Settings = GetSettings<Settings>();
}

public static Settings Settings { get; private set; }

public override void DoSettingsWindowContents( Rect inRect )
{
base.DoSettingsWindowContents( inRect );
GetSettings<Settings>().DoWindowContents( inRect );
public override void DoSettingsWindowContents(Rect inRect) {
base.DoSettingsWindowContents(inRect);
GetSettings<Settings>().DoWindowContents(inRect);
}

public override string SettingsCategory()
{
public override string SettingsCategory() {
return I18n.BackupPower;
}
}
}
}
103 changes: 16 additions & 87 deletions Source/BackupPower.csproj
Original file line number Diff line number Diff line change
@@ -1,87 +1,16 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProjectGuid>{D7D21B4A-1DA7-41D8-B202-C58CA8FA62AA}</ProjectGuid>
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>BackupPower</RootNamespace>
<AssemblyName>BackupPower</AssemblyName>
<TargetFrameworkVersion>v4.7.2</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<Deterministic>true</Deterministic>
<AllowedReferenceRelatedFileExtensions>None</AllowedReferenceRelatedFileExtensions>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>true</Optimize>
<OutputPath>..\Assemblies\</OutputPath>
<DefineConstants>DEBUG</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
<Prefer32Bit>false</Prefer32Bit>
<LangVersion>8</LangVersion>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>..\Assemblies\</OutputPath>
<DefineConstants>
</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
<Prefer32Bit>false</Prefer32Bit>
<LangVersion>8</LangVersion>
</PropertyGroup>
<ItemGroup>
<Reference Include="Assembly-CSharp">
<HintPath>C:\Program Files (x86)\Steam\steamapps\common\RimWorld\RimWorldWin64_Data\Managed\Assembly-CSharp.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="System.Runtime.InteropServices.RuntimeInformation" />
<Reference Include="UnityEngine.CoreModule">
<HintPath>C:\Program Files (x86)\Steam\steamapps\common\RimWorld\RimWorldWin64_Data\Managed\UnityEngine.CoreModule.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="UnityEngine.IMGUIModule">
<HintPath>C:\Program Files (x86)\Steam\steamapps\common\RimWorld\RimWorldWin64_Data\Managed\UnityEngine.IMGUIModule.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="UnityEngine.InputLegacyModule">
<HintPath>C:\Program Files (x86)\Steam\steamapps\common\RimWorld\RimWorldWin64_Data\Managed\UnityEngine.InputLegacyModule.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="UnityEngine.TextRenderingModule">
<HintPath>C:\Program Files (x86)\Steam\steamapps\common\RimWorld\RimWorldWin64_Data\Managed\UnityEngine.TextRenderingModule.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="System" />
<Reference Include="System.Core" />
<Reference Include="System.Xml.Linq" />
<Reference Include="System.Data.DataSetExtensions" />
<Reference Include="System.Data" />
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
<Compile Include="BackupPower.cs" />
<Compile Include="Building_BackupPowerAttachment.cs" />
<Compile Include="Command_BatteryRange.cs" />
<Compile Include="DebugLog.cs" />
<Compile Include="I18n.cs" />
<Compile Include="MapComponent_PowerBroker.cs" />
<Compile Include="PlaceWorker_OnFlickablePowerPlant.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="Resources.cs" />
<Compile Include="Settings.cs" />
<Compile Include="Utilities.cs" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<PropertyGroup>
<PostBuildEvent>mod update -x</PostBuildEvent>
</PropertyGroup>
</Project>
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net472</TargetFramework>
<AssemblyTitle>BackupPower</AssemblyTitle>
<Product>BackupPower</Product>
<Copyright>Copyright © 2020-2021</Copyright>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
<OutputPath>..\Assemblies\</OutputPath>
<LangVersion>8</LangVersion>
<PostBuildEvent>mod update</PostBuildEvent>
<AppendTargetFrameworkToOutputPath>false</AppendTargetFrameworkToOutputPath>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Krafs.Rimworld.Ref" Version="1.3.3076" />
</ItemGroup>
</Project>
Loading

0 comments on commit 1fce8fc

Please sign in to comment.