From d4ddb4b1079d3b58e93142184b9bcf57bb596ead Mon Sep 17 00:00:00 2001 From: aszlig Date: Sun, 29 Mar 2020 18:12:10 +0200 Subject: invisigun-heroes: Get nick name from environment Since the player's nick name is retrieved via Steam we don't get any nick name via the DRM-free version. To cope with this, the nick name is now determined by looking at the INVISIGUN_NICKNAME and USER if the former is not defined. If people don't want their local user name to be displayed to others, there is a setting in the options menu to disable this behaviour. The reason why I patched the call to Tools::FilterText (which is used sanitise the nick name) instead of a more specific one is because the more specific one is optimized out in the build: IL_0000: ldarg.0 IL_0001: call string class Tools::'?????????'(valuetype '?????????') IL_0006: call string class Tools::FilterText(string) IL_000b: ret So the only way to patch out the call in IL_0001 would be to use addresses/offsets, which is bound to break in the next upstream version. However, since the output is essentially wrapped in Tools::FilterText, I decided to patch that one instead and we simply throw away the argument. Signed-off-by: aszlig --- pkgs/games/itch/invisigun-heroes.nix | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'pkgs/games/itch/invisigun-heroes.nix') 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 <