Exemple #1
0
        private void Process(ClientStoryGoal msg)
        {
            using (new MessageBlocker()) {
                if (msg.key == "AuroraRadiationFixed")
                {
                    var radiation = LeakingRadiation.main;
                    radiation.ReflectionCall("OnConsoleCommand_fixleaks");
                    radiation.ReflectionCall("OnConsoleCommand_decontaminate");
                }

                if (msg.key == "Infection_Progress5")
                {
                    Player.main.infectedMixin.RemoveInfection();
                }

                // Story.StoryGoalManager.main.completedGoals.Add(msg.key);
                Story.StoryGoalManager.main.OnGoalComplete(msg.key);

                if (msg.goal == Story.GoalType.PDA)
                {
                    var entries = PDALog.Serialize();
                    if (!entries.ContainsKey(msg.key))
                    {
                        PDALog.EntryData data;
                        if (PDALog.GetEntryData(msg.key, out data))
                        {
                            PDALog.Entry entry = new PDALog.Entry();
                            entry.data      = data;
                            entry.timestamp = (float)msg.timestamp;
                            entries.Add(data.key, entry);
                        }
                    }
                }
            }
        }
Exemple #2
0
        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);
        }