Skip to content

Commit

Permalink
Fix random stuff
Browse files Browse the repository at this point in the history
  • Loading branch information
Windows10CE committed Oct 15, 2023
1 parent ccbd2ca commit ed19e4a
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 3 deletions.
4 changes: 2 additions & 2 deletions Linux/StartPathfinder.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
cd "$(dirname "$0")"

if [ "$(uname -m)" == "x86_64" ]; then
LD_PRELOAD="$(pwd)/lib64/libcef.so $(pwd)/intercept.so /usr/lib/libmono-2.0.so" MONO_DEBUG=explicit-null-checks ./HacknetPathfinder.bin.x86_64 "$@"
LD_PRELOAD="$(pwd)/intercept.so /usr/lib/libmono-2.0.so" MONO_DEBUG=explicit-null-checks ./HacknetPathfinder.bin.x86_64 "$@"
else
LD_PRELOAD="$(pwd)/lib/libcef.so $(pwd)/intercept.so /usr/lib/libmono-2.0.so" MONO_DEBUG=explicit-null-checks ./HacknetPathfinder.bin.x86 "$@"
LD_PRELOAD="$(pwd)/intercept.so /usr/lib/libmono-2.0.so" MONO_DEBUG=explicit-null-checks ./HacknetPathfinder.bin.x86 "$@"
fi
2 changes: 2 additions & 0 deletions PathfinderAPI/PathfinderAPIPlugin.cs
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@ public override bool Load()
PathfinderAPIPlugin.HarmonyInstance = base.HarmonyInstance;
Logger.LogSource = base.Log;
PathfinderAPIPlugin.Config = base.Config;

Environment.SetEnvironmentVariable("LD_PRELOAD", $"./lib{(Environment.Is64BitProcess ? "64" : "")}/libcef.so");

foreach (var initMethod in typeof(PathfinderAPIPlugin).Assembly.GetTypes().SelectMany(AccessTools.GetDeclaredMethods))
{
Expand Down
2 changes: 1 addition & 1 deletion PathfinderAPI/Replacements/ActionsLoader.cs
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@ public static SerializableAction ReadAction(ElementInfo actionInfo)
case "AddIRCMessage":
return new SAAddIRCMessage()
{
Author = ComputerLoader.filter(actionInfo.Attributes.GetOrThrow("Author", "Invalid author for AddIRCMessage", StringExtensions.HasContent)),
Author = ComputerLoader.filter(actionInfo.Attributes.GetString("Author")),
Message = ComputerLoader.filter(string.IsNullOrEmpty(actionInfo.Content) ? throw new FormatException("Invalid message for AddIRCMessage") : actionInfo.Content),
Delay = actionInfo.Attributes.GetFloat("Delay"),
TargetComp = actionInfo.Attributes.GetOrThrow("TargetComp", "Invalid target computer for AddIRCMessage", StringExtensions.HasContent)
Expand Down
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

An extensive modding API and loader for Hacknet that enables practically limitless programable extensions to the game.

Docs: https://arkhist.github.io/Hacknet-Pathfinder/

## Installation

There are several options available to choose to install Pathfinder, the installer .exe, the installer .py, or the manually with the .zip.
Expand Down

0 comments on commit ed19e4a

Please sign in to comment.