private static bool CheckLocationChange(Farmer player, NetString currentLocation, NetLong playerId) { if (currentLocation != LastActions[playerId].LocationName) { LastActions[playerId] = new PlayerLastActivity { Activity = "warped", LocationName = currentLocation, When = Game1.timeOfDay, Hidden = false }; return(true); } return(false); }
private bool CheckCutscene(Farmer player, NetLong playerId, NetString currentLocation) { if (player.hidden != LastActions[playerId].Hidden && currentLocation == LastActions[playerId].LocationName && !(player.isRidingHorse())) { LastActions[playerId] = new PlayerLastActivity { Activity = player.hidden ? "startevent" : "endevent", When = Game1.timeOfDay, LocationName = currentLocation, Hidden = player.hidden?.Value ?? false }; return(true); } return(false); }
private static bool CheckUsingTool(Farmer player, NetLong playerId, NetString currentLocation) { if (player.UsingTool) { LastActions[playerId] = new PlayerLastActivity { Activity = player.CurrentTool?.Name.ToLower() ?? "N/A", When = Game1.timeOfDay, LocationName = currentLocation, Hidden = player.hidden.Value }; return(true); } return(false); }
private bool CheckCutscene(Farmer player, NetLong playerId, NetString currentLocation) { if (player.hidden != LastActions[playerId].Hidden && !(player.isRidingHorse())) { if (ConfigHelper.GetOptions().ShowCutsceneInfoInChatBox) { var verbed = player.hidden ? "entered a" : "finished the"; _helper.SelfInfoMessage($"{player.Name} has {verbed} cutscene."); } LastActions[playerId] = new PlayerLastActivity { Activity = "event", When = Game1.timeOfDay, LocationName = currentLocation, Hidden = player.hidden?.Value ?? false }; return(true); } return(false); }