-
-
Notifications
You must be signed in to change notification settings - Fork 45
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
added a few new experimental features, fixed villager house being inc…
…orrect the next day
- Loading branch information
Showing
9 changed files
with
1,779 additions
and
141 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
using NHSE.Core; | ||
using NHSE.Injection; | ||
using System.Collections; | ||
using System.Collections.Generic; | ||
using UnityEngine; | ||
using UnityEngine.UI; | ||
|
||
public class UI_Player : MonoBehaviour | ||
{ | ||
|
||
|
||
public Text PlayerName; | ||
public RawImage PlayerText; | ||
|
||
// Start is called before the first frame update | ||
void Start() | ||
{ | ||
|
||
} | ||
|
||
// Update is called once per frame | ||
void Update() | ||
{ | ||
|
||
} | ||
|
||
public static string[] FetchPlayerNames(IRAMReadWriter rw) | ||
{ | ||
List<string> toRet = new List<string>(); | ||
for (int i = 0; i < 8; ++i) | ||
{ | ||
ulong address = OffsetHelper.getPlayerIdAddress(SysBotController.CurrentOffsetFirstPlayerUInt) - 0xB8 + 0x20 + (OffsetHelper.PlayerSize*(ulong)i); | ||
byte[] pName = rw.ReadBytes((uint)address, 20); | ||
string name = string.Empty; | ||
if (!isZeroArray(pName)) | ||
name = StringUtil.GetString(pName, 0, 10); | ||
toRet.Add(name == string.Empty ? string.Format("No one ({0})", (char)((uint)'A' + i)) : name); | ||
} | ||
|
||
return toRet.ToArray(); | ||
} | ||
|
||
private static bool isZeroArray(byte[] bytes) | ||
{ | ||
for (int i = 0; i < bytes.Length; ++i) | ||
if (bytes[i] != 0) | ||
return false; | ||
return true; | ||
} | ||
} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters