Skip to content

Commit

Permalink
Cleanup PathfinderHooks.cs
Browse files Browse the repository at this point in the history
  • Loading branch information
Fayti1703 committed Apr 15, 2020
1 parent 8bd15a4 commit e90477c
Showing 1 changed file with 0 additions and 38 deletions.
38 changes: 0 additions & 38 deletions Pathfinder/PathfinderHooks.cs
Original file line number Diff line number Diff line change
Expand Up @@ -753,44 +753,6 @@ public static bool onSCOnConnectCheck(SCOnConnect self, out bool retVal, ref Com

return true;
}
/* TODO : Fix this to use the new XML system
[Patch("Hacknet.RunnableConditionalActions.Deserialize", flags: InjectFlags.PassParametersRef | InjectFlags.ModifyReturn)]
public static bool onDeserializeRunnableConditionalActions(out RunnableConditionalActions result, ref XmlReader reader)
{
var runnable = new RunnableConditionalActions();
var processor = new SaxProcessor();
processor.AddActionForTag("ConditionalActions", info =>
{
foreach (var serialInfo in info.Elements)
{
var actionSet = new SerializableConditionalActionSet
{
Condition = Serializable.Handler.LoadCondition(serialInfo)
};
foreach (var actionInfo in serialInfo.Elements)
actionSet.Actions.Add(Serializable.Handler.LoadAction(actionInfo));
runnable.Actions.Add(actionSet);
}
});
processor.Process(reader.ToStream(reader.BaseURI));
result = runnable;
return true;
}*/

/*public static void onAddSerializableConditions(ref Dictionary<string, Func<XmlReader, SerializableCondition>> dict)
{
// HACKNET BUG FIX : DoesNotHaveFlags not in dictionary
dict.Add("DoesNotHaveFlags", info => new SCDoesNotHaveFlags { Flags = info.Attributes.GetValue("Flags") });
foreach (var pair in SC.Handler.Deserializers)
dict.Add(pair.Key, pair.Value);
}
public static void onAddSerializableActions(ref Dictionary<string, Func<XmlReader, SerializableAction>> dict)
{
foreach (var pair in SA.Handler.Deserializers)
dict.Add(pair.Key, pair.Value);
}*/

[Patch("Hacknet.ComputerLoader.filter", flags: InjectFlags.PassParametersRef | InjectFlags.ModifyReturn)]
public static bool onFilterString(out string result, ref string input)
Expand Down

0 comments on commit e90477c

Please sign in to comment.