public float Evaluate(Colony colony)
        {
            var cs = ColonyState.GetColonyState(colony);

            if (cs.Difficulty.Name != GameDifficulty.Normal.Name && DieCount.TryGetValue(colony, out var count))
            {
                return((float)(count.Count * cs.Difficulty.GetorDefault("UnhappinessPerColonistDeath", 1)) * -1f);
            }

            return(0);
        }
Beispiel #2
0
        public float Evaluate(Colony colony)
        {
            var cs = ColonyState.GetColonyState(colony);

            if (DieCount.TryGetValue(colony, out var count))
            {
                return((float)(count.Count * cs.Difficulty.UnhappinessPerColonistDeath) * -1f);
            }

            return(0);
        }
Beispiel #3
0
        public static void OnNPCDied(NPC.NPCBase nPC)
        {
            var cs = ColonyState.GetColonyState(nPC.Colony);

            if (!DieCount.ContainsKey(nPC.Colony))
            {
                DieCount.Add(nPC.Colony, new List <double>());
            }

            DieCount[nPC.Colony].Add(TimeCycle.TotalTime.Value.TotalSeconds + cs.Difficulty.TimeUnhappyAfterColonistDeathSeconds);
        }
        public static void OnNPCDied(NPC.NPCBase nPC)
        {
            var cs = ColonyState.GetColonyState(nPC.Colony);

            if (cs.Difficulty.Name == GameDifficulty.Normal.Name)
            {
                return;
            }

            if (!DieCount.ContainsKey(nPC.Colony))
            {
                DieCount.Add(nPC.Colony, new List <double>());
            }

            DieCount[nPC.Colony].Add(TimeCycle.TotalHours + 24);
        }