Skip to content

Commit

Permalink
Attempt at fixing unidentified error on SettingsChanged.
Browse files Browse the repository at this point in the history
  • Loading branch information
João Pedro Torres committed Feb 11, 2020
1 parent 2810699 commit 95fbfb7
Show file tree
Hide file tree
Showing 10 changed files with 14 additions and 102 deletions.
2 changes: 1 addition & 1 deletion About/Manifest.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<Manifest>
<identifier>BurnItForFuel</identifier>
<version>2.1</version>
<version>2.1.2</version>
<dependencies>
<li>HugsLib</li>
</dependencies>
Expand Down
2 changes: 1 addition & 1 deletion About/Version.xml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<VersionData>
<overrideVersion>2.0.0</overrideVersion>
<overrideVersion>2.1.2</overrideVersion>
</VersionData>
Binary file modified Assemblies/BurnItForFuel.dll
Binary file not shown.
5 changes: 2 additions & 3 deletions Languages/English/Keyed/BurnItForFuel_keys.xml
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
<?xml version="1.0" encoding="utf-8" ?>
<LanguageData>
<TabFuel>Fuel</TabFuel>
<FuelSettingsNote>&lt;size=20&gt;&lt;b&gt;Fuel List:&lt;/b&gt;&lt;/size&gt;
&lt;size=16&gt;Select what should be considered fuel.&lt;/size&gt;
<FuelSettingsNote>Select what should be considered fuel. Items selected here will appear on the fuel tab of every relevant building. From there you can decide what your colonists will actually bring to be burned in.

&lt;b&gt;Notes:&lt;/b&gt;
&lt;b&gt;1.&lt;/b&gt; Please reload your game for the changes to have full effect
&lt;b&gt;1.&lt;/b&gt; Please reload your game for the changes to have full effect.
&lt;b&gt;2.&lt;/b&gt; Deselecting any resource normally used by a building (&lt;i&gt;e.g.&lt;/i&gt; wood logs for the campfire) will disable that building's fuel tab, and it will revert to using only their original fuel.
&lt;b&gt;3.&lt;/b&gt; The Pod Laucher and any other building that allows for fuel level adjustment are also excluded.
&lt;b&gt;4.&lt;/b&gt; Fuel units are always the same for any resource: 1 unit = 1 fuel.
Expand Down
3 changes: 1 addition & 2 deletions Languages/Portuguese/Keyed/BurnItForFuel_keys.xml
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
<?xml version="1.0" encoding="utf-8" ?>
<LanguageData>
<TabFuel>Combustível</TabFuel>
<FuelSettingsNote>&lt;size=20&gt;&lt;b&gt;Lista de Combustíveis:&lt;/b&gt;&lt;/size&gt;
&lt;size=16&gt;Escolha o que deve ser considerado combustível.&lt;/size&gt;
<FuelSettingsNote>Escolha o que deve ser considerado combustível. Os itens aqui selecionados vão aparecer na guia de combustível de cada construção onde isto for relevante. Ali poderás decidir o quê seus colonos vão queimar afinal naquele sítio.

&lt;b&gt;Notas:&lt;/b&gt;
&lt;b&gt;1.&lt;/b&gt; Desmarcar um recurso que é normalmente utilizado por uma construção (ex.: madeira para a fogueira) desativa o painel de combustível para aquela construção e ela vai voltar a usar apenas seu combustível original.
Expand Down
3 changes: 1 addition & 2 deletions Languages/PortugueseBrazilian/Keyed/BurnItForFuel_keys.xml
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
<?xml version="1.0" encoding="utf-8" ?>
<LanguageData>
<TabFuel>Combustível</TabFuel>
<FuelSettingsNote>&lt;size=20&gt;&lt;b&gt;Lista de Combustíveis:&lt;/b&gt;&lt;/size&gt;
&lt;size=16&gt;Escolha o que deve ser considerado combustível.&lt;/size&gt;
<FuelSettingsNote>Escolha o que deve ser considerado combustível. Os itens selecionados aqui vão aparecer na guia de combustível de cada construção onde isto for relevante. Alí você poderá decidir o quê seus colonos vão de fato queimar naquele local.

&lt;b&gt;Notas:&lt;/b&gt;
&lt;b&gt;1.&lt;/b&gt; Desmarcar um recurso que é normalmente utilizado por uma construção (ex.: madeira para a fogueira) desativa o painel de combustível para aquela construção e ela vai voltar a usar apenas seu combustível original.
Expand Down
2 changes: 1 addition & 1 deletion Source/BurnItForFuel.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
<OutputPath>..\Assemblies\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<WarningLevel>3</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
Expand Down
88 changes: 0 additions & 88 deletions Source/JobDriver_MakeBed.cs

This file was deleted.

9 changes: 6 additions & 3 deletions Source/ModBaseBurnItForFuel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -83,10 +83,13 @@ public override void SettingsChanged()
foreach (Thing t in affected)
{
Building b = t as Building;
CompSelectFuel comp = b.GetComp<CompSelectFuel>();
if (comp != null)
if (b != null)
{
comp.ValidateFuelSettings();
CompSelectFuel comp = b.GetComp<CompSelectFuel>();
if (comp != null)
{
comp.ValidateFuelSettings();
}
}
}
});
Expand Down
2 changes: 1 addition & 1 deletion Source/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -33,4 +33,4 @@
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0")]
[assembly: AssemblyFileVersion("2.1")]
[assembly: AssemblyFileVersion("2.1.2")]

0 comments on commit 95fbfb7

Please sign in to comment.