Exemple #1
0
        //--------------------------------------------------------------------------------------------------------

        public static void IncidentWorker_RaidFriendly_TryExecuteWorker_Patch(ref IncidentParms parms)
        {
            if (parms.faction == null || parms.points <= 35)
            {
                return;
            }
            if (Utilities.FactionsWar().GetByFaction(parms.faction) == null)
            {
                return;
            }

            parms.points *= 1 + Utilities.FactionsWar().GetByFaction(parms.faction).disposition * 0.01f;
            parms.points += Investments.InvestmentReourceWorth(Utilities.FactionsWar().GetByFaction(parms.faction));
        }
        public float MaxResourcesForFaction(Faction faction)
        {
            LE_FactionInfo info = GetByFaction(faction);

            return((Find.WorldObjects.Settlements.Count(x => x.Faction == info.faction) * SETTLEMENT_RESOURCE_VALUE) + ((int)info.faction.def.techLevel * TECHLEVEL_RESOURCE_VALUE) + (info.disposition * 200) + Investments.InvestmentReourceWorth(info));
        }