diff options
Diffstat (limited to 'pkgs')
-rw-r--r-- | pkgs/games/itch/invisigun-heroes.nix | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/pkgs/games/itch/invisigun-heroes.nix b/pkgs/games/itch/invisigun-heroes.nix index df531d09..9b3683fb 100644 --- a/pkgs/games/itch/invisigun-heroes.nix +++ b/pkgs/games/itch/invisigun-heroes.nix @@ -18,12 +18,22 @@ buildUnity rec { buildPhase = '' cat > nix-support.cs <<EOF + using System; using UnityEngine; public class NixSupport { public static string GetFullPathStub(string _ignore) { return Application.persistentDataPath; } + + public static string GetNickName(string _ignore) { + string envar; + envar = Environment.GetEnvironmentVariable("INVISIGUN_NICKNAME"); + if (envar != null) return envar; + envar = Environment.GetEnvironmentVariable("USER"); + if (envar != null) return envar; + return ""; + } } EOF @@ -37,6 +47,13 @@ buildUnity rec { 'System.String System.IO.Path::GetFullPath(System.String)' \ 'System.String NixSupport::GetFullPathStub(System.String)' \ FileManagerAdapter_Desktop::ApplicationPath + + monogame-patcher replace-call \ + -i Invisigun_Data/Managed/Assembly-CSharp.dll \ + -a Invisigun_Data/Managed/NixSupport.dll \ + 'System.String Tools::FilterText(System.String)' \ + 'System.String NixSupport::GetNickName(System.String)' \ + Tools::GetNickname ''; sandbox.paths.required = [ "$XDG_DATA_HOME/Invisigun Reloaded" ]; |