public static void AddJoinRequest(UserJoinToServerRequest request) { if (Main.netMode != 2) { _notifications.Add(new InGamePopups.PlayerWantsToJoinGamePopup(request)); } }
public PlayerWantsToJoinGamePopup(UserJoinToServerRequest request) { _request = request; CreationObject = request; _timeLeft = 1800; switch (Main.rand.Next(5)) { default: _displayTextWithoutTime = "This Bloke Wants to Join you"; break; case 1: _displayTextWithoutTime = "This F****r Wants to Join you"; break; case 2: _displayTextWithoutTime = "This Weirdo Wants to Join you"; break; case 3: _displayTextWithoutTime = "This Great Gal Wants to Join you"; break; case 4: _displayTextWithoutTime = "The one guy who beat you up 30 years ago Wants to Join you"; break; } }
public static void AddJoinRequest(UserJoinToServerRequest request) { if (Main.netMode == 2) { return; } InGameNotificationsTracker._notifications.Add((IInGameNotification) new InGamePopups.PlayerWantsToJoinGamePopup(request)); }
private static void JoinRequests_OnRequestRemoved(UserJoinToServerRequest request) { for (int index = InGameNotificationsTracker._notifications.Count - 1; index >= 0; --index) { if (InGameNotificationsTracker._notifications[index].CreationObject == request) { InGameNotificationsTracker._notifications.RemoveAt(index); } } }
private static void JoinRequests_OnRequestRemoved(UserJoinToServerRequest request) { for (int num = _notifications.Count - 1; num >= 0; num--) { if (_notifications[num].CreationObject == request) { _notifications.RemoveAt(num); } } }
private static void JoinRequests_OnRequestAdded(UserJoinToServerRequest request) { InGameNotificationsTracker.AddJoinRequest(request); }
private static void JoinRequests_OnRequestAdded(UserJoinToServerRequest request) { AddJoinRequest(request); }