public IEnumerator GetInstanceCreator(ApiWorldInstance instance) { string creator = instance.ownerId; if (creator != null) { if (creator == APIUser.CurrentUser? .id) { if (LocalPlayerEntry.emmNameSpoofEnabled) { textComponent.text = OriginalText.Replace("{instancecreator}", LocalPlayerEntry.emmSpoofedName); } else { textComponent.text = OriginalText.Replace("{instancecreator}", APIUser.CurrentUser.displayName); } yield break; } textComponent.text = OriginalText.Replace("{instancecreator}", "Loading..."); yield return(new WaitForSeconds(4)); APIUser.FetchUser(creator, new Action <APIUser>(OnIdReceived), null); yield break; } else { textComponent.text = OriginalText.Replace("{instancecreator}", "No Instance Creator"); } }
public override void OnInstanceChange(ApiWorld world, ApiWorldInstance instance) { if (APIUser.CurrentUser != null && world.authorId == APIUser.CurrentUser.id && LocalPlayerEntry.emmNameSpoofEnabled) { textComponent.text = OriginalText.Replace("{worldauthor}", LocalPlayerEntry.emmSpoofedName); } else { textComponent.text = OriginalText.Replace("{worldauthor}", world.authorName); } }
protected override void ProcessText(object[] parameters = null) { string timeString = DateTime.Now.ToString(@"HH\:mm\:ss"); if (lastTime == timeString) { return; } lastTime = timeString; textComponent.text = OriginalText.Replace("{systemtime24hr}", timeString); }
protected override void ProcessText(object[] parameters = null) { TimeSpan time = TimeSpan.FromSeconds(RoomManager.prop_Single_0); string timeString = time.ToString(@"hh\:mm\:ss"); if (lastTime == timeString) { return; } lastTime = timeString; textComponent.text = OriginalText.Replace("{roomtime}", timeString); }
public void OnPlayerJoined(VRC.Player player) { // This will handle getting the master on instance join if (player.prop_VRCPlayerApi_0 != null && player.prop_VRCPlayerApi_0.isMaster) { if (APIUser.CurrentUser != null && player.prop_APIUser_0.id == APIUser.CurrentUser.id && LocalPlayerEntry.emmNameSpoofEnabled) { textComponent.text = OriginalText.Replace("{instancemaster}", LocalPlayerEntry.emmSpoofedName); } else { textComponent.text = OriginalText.Replace("{instancemaster}", player.prop_APIUser_0.displayName); } } }
private IEnumerator GetOnMasterChanged(Player player) { while (player.field_Public_Player_0 == null) { yield return(null); } if (APIUser.CurrentUser != null && player.field_Public_Player_0.prop_APIUser_0.id == APIUser.CurrentUser.id && LocalPlayerEntry.emmNameSpoofEnabled) { textComponent.text = OriginalText.Replace("{instancemaster}", LocalPlayerEntry.emmSpoofedName); } else { textComponent.text = OriginalText.Replace("{instancemaster}", player.field_Public_Player_0.prop_APIUser_0.displayName); } yield break; }
public override void Init(object[] parameters = null) { Il2CppArrayBase <MonoBehaviour> components = GameObject.Find("_Application/ApplicationSetup").GetComponents <MonoBehaviour>(); foreach (MonoBehaviour component in components) { if (component.TryCast <Transform>() != null || component.TryCast <ApiCache>() != null) { continue; } foreach (FieldInfo field in component.GetIl2CppType().GetFields()) { if (field.FieldType == UnhollowerRuntimeLib.Il2CppType.Of <int>()) { textComponent.text = OriginalText.Replace("{gameversion}", field.GetValue(component).Unbox <int>().ToString()); return; } } } }
public void OnIdReceived(APIUser user) { textComponent.text = OriginalText.Replace("{instancecreator}", user.displayName); }
public void OnEmmWorldCheckCompleted(bool areRiskyFuncsAllowed) { textComponent.text = OriginalText.Replace("{riskyfuncallowed}", areRiskyFuncsAllowed.ToString()); }
private void OnPlayerCountChanged(Player player) { textComponent.text = OriginalText.Replace("{playercount}", PlayerManager.field_Private_Static_PlayerManager_0.field_Private_List_1_Player_0.Count.ToString()); }
public override void OnInstanceChange(ApiWorld world, ApiWorldInstance instance) { textComponent.text = OriginalText.Replace("{worldname}", world.name); }