mirror of
https://github.com/Xevion/RimWorld_ResearchWhatever.git
synced 2025-12-06 03:16:19 -06:00
1.0.2
This commit is contained in:
Binary file not shown.
@@ -1,6 +1,7 @@
|
|||||||
using HarmonyLib;
|
using HarmonyLib;
|
||||||
using System.Reflection;
|
using System.Reflection;
|
||||||
using Verse;
|
using Verse;
|
||||||
|
using RimWorld;
|
||||||
|
|
||||||
namespace ResearchWhatever
|
namespace ResearchWhatever
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -61,6 +61,7 @@
|
|||||||
</Reference>
|
</Reference>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
<Compile Include="Patches\ResearchManagerPatch.cs" />
|
||||||
<Compile Include="Patches\StaticConstructorOnStartupUtilityPatch.cs" />
|
<Compile Include="Patches\StaticConstructorOnStartupUtilityPatch.cs" />
|
||||||
<Compile Include="Patches\WorkGiver_ResearcherPatch.cs" />
|
<Compile Include="Patches\WorkGiver_ResearcherPatch.cs" />
|
||||||
<Compile Include="ResearchWhatever.cs" />
|
<Compile Include="ResearchWhatever.cs" />
|
||||||
|
|||||||
@@ -8,18 +8,8 @@ namespace ResearchWhatever
|
|||||||
{
|
{
|
||||||
public bool Active
|
public bool Active
|
||||||
{
|
{
|
||||||
get
|
get { return parent?.Faction == Faction.OfPlayer && active; }
|
||||||
{
|
set { if (value == active) return; active = value; }
|
||||||
return active;
|
|
||||||
}
|
|
||||||
set
|
|
||||||
{
|
|
||||||
if (value == active)
|
|
||||||
{
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
this.active = value;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public override void PostExposeData()
|
public override void PostExposeData()
|
||||||
@@ -29,16 +19,19 @@ namespace ResearchWhatever
|
|||||||
|
|
||||||
public override IEnumerable<Gizmo> CompGetGizmosExtra()
|
public override IEnumerable<Gizmo> CompGetGizmosExtra()
|
||||||
{
|
{
|
||||||
|
if (parent?.Faction != Faction.OfPlayer)
|
||||||
|
yield break;
|
||||||
|
//
|
||||||
Command_Toggle command_Toggle = new Command_Toggle();
|
Command_Toggle command_Toggle = new Command_Toggle();
|
||||||
command_Toggle.hotKey = KeyBindingDefOf.Command_TogglePower;
|
command_Toggle.hotKey = KeyBindingDefOf.Command_TogglePower;
|
||||||
command_Toggle.defaultLabel = "CommandResearchWhateverToggleLabel".Translate();
|
command_Toggle.defaultLabel = "CommandResearchWhateverToggleLabel".Translate();
|
||||||
command_Toggle.icon = TexCommand.OpenLinkedQuestTex;
|
command_Toggle.icon = TexCommand.OpenLinkedQuestTex;
|
||||||
command_Toggle.isActive = (() => this.Active);
|
command_Toggle.isActive = (() => active);
|
||||||
command_Toggle.toggleAction = delegate ()
|
command_Toggle.toggleAction = delegate ()
|
||||||
{
|
{
|
||||||
this.Active = !this.Active;
|
Active = !active;
|
||||||
};
|
};
|
||||||
if (this.Active)
|
if (Active)
|
||||||
{
|
{
|
||||||
command_Toggle.defaultDesc = "CommandResearchWhateverToggleDescActive".Translate();
|
command_Toggle.defaultDesc = "CommandResearchWhateverToggleDescActive".Translate();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,5 +1,8 @@
|
|||||||
1.0.1
|
1.0.2
|
||||||
- did stuff that maybe could help somebody;
|
- option gets disabled if building is not of player faction;
|
||||||
|
|
||||||
|
1.0.1
|
||||||
|
- did stuff that maybe could help somebody... to not have error messages;
|
||||||
|
|
||||||
1.0.0.1
|
1.0.0.1
|
||||||
- grammar;
|
- grammar;
|
||||||
|
|||||||
Reference in New Issue
Block a user