When starting Skylines it fails to compile my mod complaining that it couldn't find the ColossalFramework namespace. I've seen the framework used in other mods, so I wonder what I am doing wrong. I assume that the source file is all I need to add to the Source directory, right?
Any ideas?
Thanks.
PS. Here's my code (don't laugh :~)
Any ideas?
Thanks.
PS. Here's my code (don't laugh :~)
Code:
//mods/InfographMod/Source/InfographMod.cs:
using System;
using ColossalFramework;
using ICities;
namespace InfographMod
{
public class Mod : IUserMod {
const string MOD_NAME = "Graphs, I guess";
const string MOD_DESCRIPTION = "Provides historical graphs documenting your cities' development.";
public string Name { get { return MOD_NAME; } }
public string Description { get { return MOD_DESCRIPTION; } }
}
public class LoadingHook : ILoadingExtension {
public void OnCreated(ILoading loading) {}
public void OnLevelLoaded(LoadMode mode) {
if (mode != LoadMode.LoadGame || mode != LoadMode.NewGame) return;
if (!Singleton<StatisticsManager>.exists) return;
StatisticsManager statistics = Singleton<StatisticsManager>.instance;
var crimestats = statistics.Get(StatisticType.CrimeRate);
CODebug.Log(LogChannel.Modding, "Crime Rate: " + crimestats.GetLatestFloat().ToString());
}
public void OnLevelUnloading() {}
public void OnReleased() {}
}
}