Example #1
0
        public static int[] GetContractDifficultyVariances(SimGameState.SimGameType gameMode, TagSet companyTags)
        {
            //Logger.Info("[Utilities.GetMaxAllowedContractDifficultyVariance] companyTags: " + companyTags);

            // For CAREER mode ContractDifficulty is based on starsystem difficulty atm...
            if (gameMode == SimGameState.SimGameType.CAREER)
            {
                return(new int[] { 1, 1 });
            }

            // To be able to play low difficulty contracts during/after KAMEA_CAMPAIGN the lower variance value slowly rises...
            if (companyTags.Contains("story_complete"))
            {
                return(new int[] { 5, 2 });
            }
            else if (companyTags.Contains("oc09_post_damage_report"))
            {
                return(new int[] { 3, 1 });
            }
            else if (companyTags.Contains("oc04_post_argo"))
            {
                return(new int[] { 2, 1 });
            }
            else
            {
                return(new int[] { 1, 1 });
            }
        }
            private static RGBColor <float> GetDifficultyColor(StarmapRenderer starmapRenderer, StarSystemNode starSystemNode)
            {
                SimGameState.SimGameType gameType = starmapRenderer.GetSimGameState().SimGameMode;
                int difficulty = starSystemNode.System.Def.GetDifficulty(gameType);

                return(GetDifficultyColor(difficulty));
            }
 static void Postfix(SimGameState __instance, SimGameState.SimGameType gameType, bool allowDebug) //we're doing a new campaign, so we need to sync the json with the new addition
 {
     try
     {
         Holder.SyncNewCampaign();
     }
     catch
     {
         // TODO:  should do something here if the holder reports an error
         return;
     }
 }
Example #4
0
            static bool Prefix(StarSystemDef __instance, SimGameState.SimGameType type)
            {
                try
                {
                    if (__instance.DifficultyList is null ||
                        __instance.DifficultyModes is null)
                    {
                        Logger.LogDebug(null);
                    }
                }
                catch (Exception ex)
                {
                    Logger.LogDebug(ex);
                }

                if (__instance.DifficultyList?.Count == 0)
                {
                    Logger.LogDebug($"{__instance.Description?.Name} has nooooooooooooooo Difficulties");
                }

                return(__instance.DifficultyList?.Count > 0);
            }