forked from notfood/RimWorld-ResearchPal
-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Recompile for rimworld 2xth Oct. update
- Loading branch information
Showing
6 changed files
with
74 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
<?xml version="1.0" encoding="UTF-8" standalone="yes"?> | ||
<Manifest> | ||
<version>1.2.0.1</version> | ||
<version>1.3.0.1</version> | ||
<manifestUri>https://raw.githubusercontent.com/VinaLx/RimWorld-ResearchPal/master/About/Manifest.xml</manifestUri> | ||
<downloadUri>https://github.com/VinaLx/RimWorld-ResearchPal</downloadUri> | ||
</Manifest> |
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Linq; | ||
using System.Text; | ||
using System.Threading.Tasks; | ||
using RimWorld; | ||
using Verse; | ||
|
||
namespace ResearchPal | ||
{ | ||
/* Currently Does not work */ | ||
|
||
// This static class contains hooks that supported altered behavior of | ||
// researchpal for the convenience of other awesome modders that try to | ||
// make their mods compatible. These methods are assumed to be patched | ||
// with harmony. The patch should perform incrementally, e.g. the postfix | ||
// patch of `IsHidden` should never returns `true`, but `true || __result` | ||
// (well I guess in this case you just returns `__result` XD) | ||
// | ||
// I'm not a professional C# user, but I assume harmony is a powerful enough | ||
// tool to patch the method to serve appropriate purposes. So if you have | ||
// suggestions on how to accomplish certain goal more properly, feel free to | ||
// lecture me on the steam workshop page. | ||
// | ||
// If you don't find the method you need here, and you believe it would be | ||
// way simpler for your compatibility patch if I provide one, also feel free | ||
// put your suggestion in the "Mod Compatibility" discussion. | ||
public static class CompatibilityHooks { | ||
// Returns true if a research node shouldn't be drawn on the research | ||
// tab. | ||
// if `IsHidden(research) == true`, then all the children node of | ||
// `research` will be hidden. | ||
public static bool IsHidden(ResearchProjectDef r) { | ||
return false; | ||
} | ||
|
||
// If there are additional unlock requirements for your modded research | ||
// other than the vanilla special requirements (research bench, | ||
// research facility and techprints). | ||
// The research node will be grayed out (just like lacking techprints) | ||
// if this function returns false on the according research. | ||
public static bool PassCustomUnlockRequirements( | ||
ResearchProjectDef p) { | ||
return true; | ||
} | ||
|
||
// Returns a list of prompts that tell the player what should be done if | ||
// the tech is locked behind a modded requirement. | ||
// A tooltip will be displayed when hovering the locked techs | ||
// (and only the locked techs) | ||
public static List<string> CustomUnlockRequirementPrompts( | ||
ResearchProjectDef p) { | ||
return new List<string>(); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters