Example #1
0
        public ModSaveData GetDataFor(IMod mod)
        {
            ModSaveData result;

            if (modSaveData.TryGetValue(mod, out result))
            {
                return(result);
            }
            var textKey = mod.GetType().FullName;

            if (unloadedSaveData.TryGetValue(textKey, out result))
            {
                throw new Exception("This should never happen!");

                /*
                 #warning this should actually never happen anymore, since we look up existing mods while loading anyway.
                 * unloadedSaveData.Remove(textKey);
                 * modSaveData.Add(mod, result);
                 * return result;
                 */
            }
            result = new ModSaveData(mod);
            modSaveData.Add(mod, result);
            allSaveData.Add(result);
            return(result);
        }
Example #2
0
 public virtual void PreGameSaved(ModSaveData data)
 {
 }
Example #3
0
 public virtual void AfterGameSaved(ModSaveData data)
 {
 }
Example #4
0
 public virtual void PostWorldCreation(ModSaveData data, Game.Map map, Game.CreateWorldOptions options)
 {
 }