hooks: Removing "incapable of" mechanics from the game completely (somewhat)

Started by RawCode, August 13, 2016, 11:12:37 PM

Previous topic - Next topic

RawCode

subjtldr
static RWL ()
{
SetHookFromToABS64(
typeof(Pawn_StoryTracker).GetMethod("WorkTagIsDisabled"),
typeof(RWL).GetMethod("hook_WorkTagIsDisabled"));

SetHookFromToABS64(typeof(Pawn_StoryTracker).GetProperty("CombinedDisabledWorkTags",
(BindingFlags)0x3F3C).GetGetMethod(),
typeof(RWL).GetMethod("hook_CombinedDisabledWorkTags"));
}


hooks are

static public WorkTags hook_CombinedDisabledWorkTags(object ignored_this)
{
//Log.Warning ("Echo:hook_get_CombinedDisabledWorkTags");
return WorkTags.None;
}

static public bool hook_WorkTagIsDisabled(object ignored_this,object ignored_tag)
{
return false;
}


answer to
https://ludeon.com/forums/index.php?topic=24130.0

[attachment deleted by admin - too old]