public static void SendStoryGoal(string key, Story.GoalType goal) { var res = new ClientStoryGoal(); res.timestamp = DayNightCycle.main.timePassedAsDouble; res.key = key; res.goal = goal; Multiplayer.main.Send(res); }
public static StoryEventSend.EventType ToDto(this Story.GoalType goalType) { return(goalType switch { Story.GoalType.PDA => StoryEventSend.EventType.PDA, Story.GoalType.Radio => StoryEventSend.EventType.RADIO, Story.GoalType.Encyclopedia => StoryEventSend.EventType.ENCYCLOPEDIA, Story.GoalType.Story => StoryEventSend.EventType.STORY, _ => throw new ArgumentException("The provided Story.GoalType doesn't correspond to a StoryEventSend.EventType"), });