mirror of
https://github.com/Xevion/RimWorld_ResearchWhatever.git
synced 2025-12-06 23:16:11 -06:00
1.0.6
This commit is contained in:
Binary file not shown.
@@ -43,7 +43,19 @@ namespace ResearchWhatever.Patches
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void Prefix(Pawn pawn, Thing t, bool forced)
|
private static bool CanBePicked(this ResearchProjectDef research, Building_ResearchBench bench)
|
||||||
|
{
|
||||||
|
return Find.Storyteller.difficulty.AllowedBy(research.hideWhen)
|
||||||
|
&& !research.IsFinished
|
||||||
|
&& research.PrerequisitesCompleted
|
||||||
|
&& research.TechprintRequirementMet
|
||||||
|
&& research.PlayerMechanitorRequirementMet
|
||||||
|
&& research.StudiedThingsRequirementsMet
|
||||||
|
&& (research.requiredResearchBuilding == null || research.requiredResearchBuilding == bench.def && bench.hasFacilities(research.requiredResearchFacilities))
|
||||||
|
&& research.GetModExtension<ResearchWhateverExtansion>()?.ignore != true;
|
||||||
|
}
|
||||||
|
|
||||||
|
internal static void Prefix(Pawn pawn, Thing t, bool forced)
|
||||||
{
|
{
|
||||||
ResearchProjectDef currentProj = Find.ResearchManager.currentProj;
|
ResearchProjectDef currentProj = Find.ResearchManager.currentProj;
|
||||||
if (currentProj != null) return;
|
if (currentProj != null) return;
|
||||||
@@ -56,12 +68,7 @@ namespace ResearchWhatever.Patches
|
|||||||
|
|
||||||
List<ResearchProjectDef> projects = new List<ResearchProjectDef>(
|
List<ResearchProjectDef> projects = new List<ResearchProjectDef>(
|
||||||
from x in DefDatabase<ResearchProjectDef>.AllDefsListForReading
|
from x in DefDatabase<ResearchProjectDef>.AllDefsListForReading
|
||||||
where Find.Storyteller.difficulty.AllowedBy(x.hideWhen)
|
where x.CanBePicked(bench)
|
||||||
&& !x.IsFinished
|
|
||||||
&& x.TechprintRequirementMet
|
|
||||||
&& x.PrerequisitesCompleted
|
|
||||||
&& (x.requiredResearchBuilding == null || x.requiredResearchBuilding == bench.def && bench.hasFacilities(x.requiredResearchFacilities))
|
|
||||||
&& x.GetModExtension<ResearchWhateverExtansion>()?.ignore != true
|
|
||||||
select x);
|
select x);
|
||||||
|
|
||||||
if (projects.NullOrEmpty())
|
if (projects.NullOrEmpty())
|
||||||
|
|||||||
@@ -1,4 +1,7 @@
|
|||||||
1.0.5
|
1.0.6
|
||||||
|
- added checking for new prerequisites;
|
||||||
|
|
||||||
|
1.0.5
|
||||||
- 1.4 aye;
|
- 1.4 aye;
|
||||||
|
|
||||||
1.0.4
|
1.0.4
|
||||||
|
|||||||
Reference in New Issue
Block a user