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