Ejemplo n.º 1
0
        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);
        }
Ejemplo n.º 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);
        }
Ejemplo n.º 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);
        }
Ejemplo n.º 4
0
        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);
        }