void Awake() { Debug.Log("Begin mod init: BasicRoads"); // If splatmapping mod is enabled, paint thicker dirt tracks as thin diagonal ones look awful. Mod splatMod = ModManager.Instance.GetModFromGUID("21a4ed84-12c3-4979-b1ef-8b9169d03922"); bool splatModEnabled = splatMod != null && splatMod.Enabled; ModSettings settings = mod.GetSettings(); bool smoothRoads = settings.GetBool("Settings", "SmoothRoads"); bool riversStreams = settings.GetBool("Settings", "RiversAndStreams"); bool pathEditingEnabled = settings.GetBool("Editing", "PathEditingEnabled"); bool waterEditingEnabled = settings.GetBool("Editing", "WaterEditingEnabled"); string editingEnabled = pathEditingEnabled ? "path" : (waterEditingEnabled ? "water" : null); roadTexturing = new BasicRoadsTexturing(smoothRoads, riversStreams, editingEnabled, splatModEnabled); DaggerfallUnity.Instance.TerrainTexturing = roadTexturing; if (editingEnabled != null) { BasicRoadsPathEditor.waterEditing = waterEditingEnabled; BasicRoadsPathEditor editor = BasicRoadsPathEditor.Instance; } mod.MessageReceiver = MessageReceiver; mod.IsReady = true; Debug.Log("Finished mod init: BasicRoads"); }
public BasicRoadsPathEditor(IUserInterfaceManager uiManager) : base(uiManager) { // Register console commands try { RoadPathEditorCommands.RegisterCommands(); } catch (Exception ex) { Debug.LogError(string.Format("Error Registering Travelmap Console commands: {0}", ex.Message)); } roadsTexturing = (BasicRoadsTexturing)DaggerfallUnity.Instance.TerrainTexturing; pathsData[BasicRoadsTexturing.roads] = roadsTexturing.GetPathData(BasicRoadsTexturing.roads); pathsData[BasicRoadsTexturing.tracks] = roadsTexturing.GetPathData(BasicRoadsTexturing.tracks); if (waterEditing) { showPaths[BasicRoadsTexturing.rivers] = true; showPaths[BasicRoadsTexturing.streams] = true; pathsData[BasicRoadsTexturing.rivers] = roadsTexturing.GetPathData(BasicRoadsTexturing.rivers); pathsData[BasicRoadsTexturing.streams] = roadsTexturing.GetPathData(BasicRoadsTexturing.streams); ReadEditedPathData(BasicRoadsTexturing.rivers, RiverDataFilename); ReadEditedPathData(BasicRoadsTexturing.streams, StreamDataFilename); } else { ReadEditedPathData(BasicRoadsTexturing.roads, RoadDataFilename); ReadEditedPathData(BasicRoadsTexturing.tracks, TrackDataFilename); } }
public BasicRoadsPathEditor(IUserInterfaceManager uiManager) : base(uiManager) { // Register console commands try { RoadPathEditorCommands.RegisterCommands(); } catch (Exception ex) { Debug.LogError(string.Format("Error Registering Travelmap Console commands: {0}", ex.Message)); } roadTexturing = (BasicRoadsTexturing)DaggerfallUnity.Instance.TerrainTexturing; }