diff --git a/LICENSE b/LICENSE
new file mode 100644
index 0000000..b91b584
--- /dev/null
+++ b/LICENSE
@@ -0,0 +1,22 @@
+The MIT License (MIT)
+
+Copyright (c) 2015 ParkitectNexus
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.
+
diff --git a/ModSparkLoader.csproj b/ModSparkLoader.csproj
new file mode 100644
index 0000000..a92a99a
--- /dev/null
+++ b/ModSparkLoader.csproj
@@ -0,0 +1,70 @@
+
+
+
+ Debug
+ AnyCPU
+ {FA17F423-2365-4230-88E5-BD736956F809}
+ Library
+ false
+ ClassLibrary
+ v4.0
+ 512
+
+
+ true
+ full
+ false
+ bin\Debug\
+ DEBUG;TRACE
+ prompt
+ 4
+
+
+ pdbonly
+ true
+ bin\Release\
+ TRACE
+ prompt
+ 4
+
+
+ Custom_Scenery
+
+
+
+ ..\..\..\..\..\..\Program Files (x86)\Steam\steamapps\common\Parkitect\Parkitect_Data\Managed\Assembly-CSharp.dll
+
+
+ ..\Depender\bin\Depender.dll
+
+
+
+
+
+
+
+
+ ..\..\..\..\..\..\Program Files (x86)\Steam\steamapps\common\Parkitect\Parkitect_Data\Managed\UnityEngine.dll
+
+
+ ..\..\..\..\..\..\Program Files (x86)\Steam\steamapps\common\Parkitect\Parkitect_Data\Managed\UnityEngine.UI.dll
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/ModSparkLoader.sln b/ModSparkLoader.sln
new file mode 100644
index 0000000..678b184
--- /dev/null
+++ b/ModSparkLoader.sln
@@ -0,0 +1,22 @@
+
+Microsoft Visual Studio Solution File, Format Version 12.00
+# Visual Studio 14
+VisualStudioVersion = 14.0.23107.0
+MinimumVisualStudioVersion = 10.0.40219.1
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ModSparkLoader", "ModSparkLoader.csproj", "{FA17F423-2365-4230-88E5-BD736956F809}"
+EndProject
+Global
+ GlobalSection(SolutionConfigurationPlatforms) = preSolution
+ Debug|Any CPU = Debug|Any CPU
+ Release|Any CPU = Release|Any CPU
+ EndGlobalSection
+ GlobalSection(ProjectConfigurationPlatforms) = postSolution
+ {FA17F423-2365-4230-88E5-BD736956F809}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {FA17F423-2365-4230-88E5-BD736956F809}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {FA17F423-2365-4230-88E5-BD736956F809}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {FA17F423-2365-4230-88E5-BD736956F809}.Release|Any CPU.Build.0 = Release|Any CPU
+ EndGlobalSection
+ GlobalSection(SolutionProperties) = preSolution
+ HideSolutionNode = FALSE
+ EndGlobalSection
+EndGlobal
diff --git a/ModSparkLoader/FlatRideLoader.cs b/ModSparkLoader/FlatRideLoader.cs
new file mode 100644
index 0000000..85f7092
--- /dev/null
+++ b/ModSparkLoader/FlatRideLoader.cs
@@ -0,0 +1,173 @@
+using System;
+using System.Collections.Generic;
+using UnityEngine;
+using System.Linq;
+using System.Text;
+using System.Xml;
+using System.Xml.Linq;
+using Depender.Types.FlatRides;
+using Depender.AnimationMotors;
+using Depender.AnimationEvents;
+
+public class FlatRideLoader
+{
+ public static List LoadMotors(XmlNode ObjNode, GameObject GO)
+ {
+ List motors = new List();
+
+ foreach (XmlNode motorN in ObjNode.SelectSingleNode("Animation/motors").ChildNodes)
+ {
+ switch (motorN.Name)
+ {
+
+ case "Rotator":
+ RotatorHP R = GO.AddComponent();
+ R.Identifier = motorN["Identifier"].InnerText;
+ R.axisPath = motorN["axis"].InnerText;
+ R.axis = GO.transform.FindChild(motorN["axis"].InnerText);
+ R.maxSpeed = float.Parse(motorN["maxSpeed"].InnerText);
+ R.accelerationSpeed = float.Parse(motorN["accelerationSpeed"].InnerText);
+ R.rotationAxis = getVector3(motorN["rotationAxis"].InnerText);
+ motors.Add(R);
+ break;
+ case "RotateBetween":
+ RotateBetweenHP RB = GO.AddComponent();
+ RB.Identifier = motorN["Identifier"].InnerText;
+ RB.axisPath = motorN["axis"].InnerText;
+ RB.axis = GO.transform.FindChild(motorN["axis"].InnerText);
+ RB.rotationAxis = getVector3(motorN["rotationAxis"].InnerText);
+ RB.duration = float.Parse(motorN["duration"].InnerText);
+ motors.Add(RB);
+ break;
+ case "Mover":
+ MoverHP M = GO.AddComponent();
+ M.Identifier = motorN["Identifier"].InnerText;
+ M.axisPath = motorN["axis"].InnerText;
+ M.axis = GO.transform.FindChild(motorN["axis"].InnerText);
+ M.toPosition = getVector3(motorN["toPosition"].InnerText);
+ M.duration = float.Parse(motorN["duration"].InnerText);
+ motors.Add(M);
+ break;
+ case "MultipleRotations":
+ MultipleRotationsHP MR = GO.AddComponent();
+ MR.Identifier = motorN["Identifier"].InnerText;
+ MR.axisPath = motorN["MainAxis"].InnerText;
+ XmlNodeList axisNs = motorN.SelectNodes("axis");
+ foreach (XmlNode axisN in axisNs)
+ {
+ MR.AxissPath.Add(axisN.InnerText);
+ }
+ motors.Add(MR);
+ break;
+ case "PendulumRotator":
+ PendulumRotatorHP PR = GO.AddComponent();
+ PR.Identifier = motorN["Identifier"].InnerText;
+ PR.axisPath = motorN["axis"].InnerText;
+ PR.axis = GO.transform.FindChild(motorN["axis"].InnerText);
+ PR.maxSpeed = float.Parse(motorN["maxSpeed"].InnerText);
+ PR.accelerationSpeed = float.Parse(motorN["accelerationSpeed"].InnerText);
+ PR.rotationAxis = getVector3(motorN["rotationAxis"].InnerText);
+ PR.angularFriction = float.Parse(motorN["angularFriction"].InnerText);
+ PR.gravity = float.Parse(motorN["gravity"].InnerText);
+ PR.pendulum = Boolean.Parse(motorN["pendulum"].InnerText);
+ PR.armLength = float.Parse(motorN["armLength"].InnerText);
+ motors.Add(PR);
+ break;
+
+ }
+ }
+
+ return motors;
+ throw new NotImplementedException();
+ }
+ public static List LoadPhases(XmlNode ObjNode, GameObject GO)
+ {
+ List Phases = new List();
+
+ foreach (XmlNode PhaseN in ObjNode.SelectSingleNode("Animation/phases").ChildNodes)
+ {
+
+ Phase phase = GO.AddComponent();
+ foreach (XmlNode EventN in PhaseN.SelectSingleNode("events").ChildNodes)
+ {
+ switch (EventN.Name)
+ {
+ case "Wait":
+ Wait W = GO.AddComponent();
+ W.seconds = float.Parse(EventN["Seconds"].InnerText);
+ phase.Events.Add(W);
+ break;
+ case "StartRotator":
+ StartRotator SR = GO.AddComponent();
+ SR.identifierMotor = EventN["Identifier"].InnerText;
+ phase.Events.Add(SR);
+ break;
+ case "SpinRotator":
+ SpinRotater SpR = GO.AddComponent();
+ SpR.identifierMotor = EventN["Identifier"].InnerText;
+ SpR.spin = Boolean.Parse(EventN["spin"].InnerText);
+ SpR.spins = float.Parse(EventN["spins"].InnerText);
+ phase.Events.Add(SpR);
+ break;
+ case "StopRotator":
+ StopRotator StR = GO.AddComponent();
+ StR.identifierMotor = EventN["Identifier"].InnerText;
+ phase.Events.Add(StR);
+ break;
+ case "FromToRot":
+ FromToRot FTR = GO.AddComponent();
+ FTR.identifierMotor = EventN["Identifier"].InnerText;
+ phase.Events.Add(FTR);
+ break;
+ case "ToFromRot":
+ ToFromRot TFR = GO.AddComponent();
+ TFR.identifierMotor = EventN["Identifier"].InnerText;
+ phase.Events.Add(TFR);
+ break;
+ case "FromToMove":
+ FromToMove FTM = GO.AddComponent();
+ FTM.identifierMotor = EventN["Identifier"].InnerText;
+ phase.Events.Add(FTM);
+ break;
+ case "ToFromMove":
+ ToFromMove TFM = GO.AddComponent();
+ TFM.identifierMotor = EventN["Identifier"].InnerText;
+ phase.Events.Add(TFM);
+ break;
+ case "ApplyRotation":
+ ApplyRotation AR = GO.AddComponent();
+ AR.identifierMotor = EventN["Identifier"].InnerText;
+ phase.Events.Add(AR);
+ break;
+ case "ChangePendulum":
+ ChangePendulum CP = GO.AddComponent();
+ CP.identifierMotor = EventN["Identifier"].InnerText;
+ CP.Friction = float.Parse(EventN["Friction"].InnerText);
+ CP.Pendulum = Boolean.Parse(EventN["Pendulum"].InnerText);
+ phase.Events.Add(CP);
+ break;
+ default:
+ Debug.Log("Couln't detect the right event called: " + EventN.Name);
+ break;
+
+ }
+ }
+
+ Phases.Add(phase);
+ }
+ return Phases;
+
+ throw new NotImplementedException();
+ }
+
+ public static Vector3 getVector3(string rString)
+ {
+ string[] temp = rString.Substring(1, rString.Length - 2).Split(',');
+ float x = float.Parse(temp[0]);
+ float y = float.Parse(temp[1]);
+ float z = float.Parse(temp[2]);
+ Vector3 rValue = new Vector3(x, y, z);
+ return rValue;
+ }
+}
+
diff --git a/ModSparkLoader/Main.cs b/ModSparkLoader/Main.cs
new file mode 100644
index 0000000..36b0b54
--- /dev/null
+++ b/ModSparkLoader/Main.cs
@@ -0,0 +1,39 @@
+using Depender;
+using UnityEngine;
+
+namespace Custom_Scenery
+{
+ public class Main : IMod
+ {
+ private GameObject _go;
+ string name = "Could not load name";
+ string description = "Could not load description";
+ public void onEnabled()
+ {
+ _go = new GameObject();
+
+ _go.AddComponent();
+
+ _go.GetComponent().Path = Path;
+
+ _go.GetComponent().Identifier = Identifier;
+
+ _go.GetComponent().LoadScenery();
+
+ name = _go.GetComponent().modName;
+
+ description = _go.GetComponent().modDiscription;
+ }
+
+ public void onDisabled()
+ {
+ Registar.UnRegister();
+ Object.Destroy(_go);
+ }
+
+ public string Name { get { return name; } }
+ public string Description { get { return description; } }
+ public string Path { get; set; }
+ public string Identifier { get; set; }
+ }
+}
diff --git a/ModSparkLoader/ModLoader.cs b/ModSparkLoader/ModLoader.cs
new file mode 100644
index 0000000..ff63220
--- /dev/null
+++ b/ModSparkLoader/ModLoader.cs
@@ -0,0 +1,303 @@
+using System;
+using System.Collections.Generic;
+using System.IO;
+using UnityEngine;
+using System.Xml;
+using System.Linq;
+using Depender.Types.Shops;
+using Depender;
+using Depender.Types;
+using Depender.Types.FlatRides;
+
+public class ModLoader : MonoBehaviour
+{
+ public string Path;
+
+ public string Identifier;
+ public string modName = "";
+ public string modDiscription = "";
+
+ private void LogException(Exception e)
+ {
+ StreamWriter sw = File.AppendText(Path + @"/mod.log");
+
+ sw.WriteLine(e);
+
+ sw.Flush();
+
+ sw.Close();
+ }
+ public void LoadScenery()
+ {
+ try
+ {
+ GameObject hider = new GameObject();
+ char dsc = System.IO.Path.DirectorySeparatorChar;
+
+ using (WWW www = new WWW("file://" + Path + dsc + "assetbundle" + dsc + "mod"))
+ {
+ if (www.error != null)
+ throw new Exception("Loading had an error:" + www.error);
+
+ AssetBundle bundle = www.assetBundle;
+ try
+ {
+
+
+ XmlDocument doc = new XmlDocument();
+ string[] files = System.IO.Directory.GetFiles(Path, "*.xml");
+ doc.Load(files[0]);
+ XmlElement xelRoot = doc.DocumentElement;
+ XmlNodeList ModNodes = xelRoot.SelectNodes("/Mod");
+
+ foreach (XmlNode Mod in ModNodes)
+ {
+
+ modName = Mod["ModName"].InnerText;
+ modDiscription = Mod["ModDiscription"].InnerText;
+ }
+ XmlNodeList ObjectNodes = xelRoot.SelectNodes("/Mod/Objects/Object");
+
+ foreach (XmlNode ParkOBJ in ObjectNodes)
+ {
+ try
+ {
+
+ ModdedObject MO = null;
+ GameObject asset = Instantiate(bundle.LoadAsset(ParkOBJ["OBJName"].InnerText)) as GameObject;
+ asset.name = Identifier + "@" + ParkOBJ["OBJName"].InnerText;
+ switch (ParkOBJ["Type"].InnerText)
+ {
+ case "deco":
+ DecoMod DM = new DecoMod();
+ DM.HeightDelta = float.Parse(ParkOBJ["heightDelta"].InnerText);
+ DM.GridSubdivision = 1f;
+ DM.SnapCenter = Convert.ToBoolean(ParkOBJ["snapCenter"].InnerText);
+ DM.category = ParkOBJ["category"].InnerText;
+ DM.BuildOnGrid = Convert.ToBoolean(ParkOBJ["grid"].InnerText);
+ DM.gridSubdivision = float.Parse(ParkOBJ["gridSubdivision"].InnerText);
+ MO = DM;
+ break;
+ case "trashbin":
+ MO = new TrashBinMod();
+ break;
+ case "seating":
+ SeatingMod SM = new SeatingMod();
+ SM.hasBackRest = false;
+ MO = SM;
+ break;
+ case "seatingAuto":
+ SeatingAutoMod SMA = new SeatingAutoMod();
+ SMA.hasBackRest = false;
+ SMA.seatCount = 2;
+ MO = SMA;
+ break;
+ case "lamp":
+ MO = new LampMod();
+ break;
+ case "fence":
+ FenceMod FM = new FenceMod();
+ FM.FenceFlat = null;
+ FM.FencePost = null;
+ MO = FM;
+ break;
+ case "FlatRide":
+ FlatRideMod FR = new FlatRideMod();
+ FR.XSize = (int)float.Parse(ParkOBJ["X"].InnerText);
+ FR.ZSize = (int)float.Parse(ParkOBJ["Z"].InnerText);
+ FR.Excitement = float.Parse(ParkOBJ["Excitement"].InnerText);
+ FR.Intensity = float.Parse(ParkOBJ["Intensity"].InnerText);
+ FR.Nausea = float.Parse(ParkOBJ["Nausea"].InnerText);
+ FR.closedAngleRetraints = getVector3(ParkOBJ["RestraintAngle"].InnerText);
+ RideAnimationMod RA = new RideAnimationMod();
+ RA.motors = FlatRideLoader.LoadMotors(ParkOBJ, asset);
+ RA.phases = FlatRideLoader.LoadPhases(ParkOBJ, asset);
+ FR.Animation = RA;
+ XmlNodeList WaypointsNodes = ParkOBJ.SelectNodes("Waypoints/Waypoint");
+ foreach (XmlNode xndNode in WaypointsNodes)
+ {
+
+ Waypoint w = new Waypoint();
+ w.isOuter = Convert.ToBoolean(xndNode["isOuter"].InnerText);
+ w.isRabbitHoleGoal = Convert.ToBoolean(xndNode["isRabbitHoleGoal"].InnerText);
+ if (xndNode["connectedTo"].InnerText != "")
+ {
+ w.connectedTo = xndNode["connectedTo"].InnerText.Split(',').ToList().ConvertAll(s => Int32.Parse(s));
+ }
+ w.localPosition = getVector3(xndNode["localPosition"].InnerText);
+ FR.waypoints.Add(w);
+
+ }
+ MO = FR;
+ break;
+ case "Shop":
+ ShopMod S = new ShopMod();
+
+ asset.SetActive(false);
+ XmlNodeList ProductNodes = ParkOBJ.SelectNodes("Shop/Product");
+ foreach (XmlNode ProductNode in ProductNodes)
+ {
+ ProductMod PM = new ProductMod();
+ switch (ProductNode["Type"].InnerText)
+ {
+ case "consumable":
+ consumable C = new consumable();
+ C.ConsumeAnimation = (consumable.consumeanimation)Enum.Parse(typeof(consumable.consumeanimation), ProductNode["ConsumeAnimation"].InnerText);
+ C.Temprature = (consumable.temprature)Enum.Parse(typeof(consumable.temprature), ProductNode["Temprature"].InnerText);
+ C.portions = Int32.Parse(ProductNode["Portions"].InnerText);
+ PM = C;
+ break;
+ case "wearable":
+ wearable W = new wearable();
+ W.BodyLocation = (wearable.bodylocation)Enum.Parse(typeof(wearable.bodylocation), ProductNode["BodyLocation"].InnerText);
+ PM = W;
+ break;
+ case "ongoing":
+ ongoing O = new ongoing();
+ O.duration = Int32.Parse(ProductNode["Duration"].InnerText);
+ PM = O;
+ break;
+ default:
+ break;
+ }
+ PM.Name = ProductNode["Name"].InnerText;
+ PM.GO = Instantiate(bundle.LoadAsset(ProductNode["Model"].InnerText)) as GameObject;
+ PM.GO.SetActive(false);
+ PM.Hand = (ProductMod.hand)Enum.Parse(typeof(ProductMod.hand), ProductNode["Hand"].InnerText);
+ PM.price = float.Parse(ProductNode["Price"].InnerText);
+ XmlNodeList IngredientNodes = ProductNode.SelectNodes("Ingredients/Ingredient");
+ foreach (XmlNode IngredientNode in IngredientNodes)
+ {
+ ingredient I = new ingredient();
+ I.Name = IngredientNode["Name"].InnerText;
+ I.price = float.Parse(IngredientNode["Price"].InnerText);
+ I.amount = float.Parse(IngredientNode["Amount"].InnerText);
+ I.tweakable = Boolean.Parse(IngredientNode["tweakable"].InnerText);
+ XmlNodeList EffectNodes = IngredientNode.SelectNodes("Effects/effect");
+ foreach (XmlNode EffectNode in EffectNodes)
+ {
+ effect E = new effect();
+ E.Type = (effect.Types)Enum.Parse(typeof(effect.Types), EffectNode["Type"].InnerText);
+ E.amount = float.Parse(EffectNode["Amount"].InnerText);
+ I.effects.Add(E);
+
+ }
+ PM.ingredients.Add(I);
+ }
+ S.products.Add(PM);
+ }
+ MO = S;
+ break;
+ case "PathStyle":
+ Registar.RegisterPath(asset.GetComponent().material.mainTexture, ParkOBJ["inGameName"].InnerText, (Registar.PathType) Enum.Parse(typeof(Registar.PathType), ParkOBJ["PathStyle"].InnerText) );
+ break;
+ case "CoasterCar":
+ Debug.Log("Test CoasterCar");
+ CoasterCarMod CC = new CoasterCarMod();
+ CC.CoasterName = ParkOBJ["CoasterName"].InnerText;
+ CC.Name = ParkOBJ["inGameName"].InnerText;
+
+ try
+ {
+ CC.closedAngleRetraints = getVector3(ParkOBJ["RestraintAngle"].InnerText);
+ CC.FrontCarGO = Instantiate(bundle.LoadAsset(ParkOBJ["FrontCarGO"].InnerText)) as GameObject;
+ }
+ catch
+ { }
+ MO = CC;
+ MO.Name = ParkOBJ["inGameName"].InnerText;
+ MO.Object = asset;
+
+ break;
+ default:
+ break;
+ }
+ if (MO != null)
+ {
+ MO.Name = ParkOBJ["inGameName"].InnerText;
+ MO.Object = asset;
+ MO.Price = float.Parse(ParkOBJ["price"].InnerText);
+ MO.Shader = ParkOBJ["shader"].InnerText;
+ if (ParkOBJ["BoudingBoxes"] != null)
+ {
+
+ XmlNodeList BoudingBoxNodes = ParkOBJ.SelectNodes("BoudingBoxes/BoudingBox");
+ foreach (XmlNode Box in BoudingBoxNodes)
+ {
+ BoundingBox BB = MO.Object.AddComponent();
+ BB.isStatic = false;
+ BB.bounds.min = getVector3(Box["min"].InnerText);
+ BB.bounds.max = getVector3(Box["max"].InnerText);
+ BB.layers = BoundingVolume.Layers.Buildvolume;
+ BB.isStatic = true;
+ }
+ }
+ MO.Recolorable = Convert.ToBoolean(ParkOBJ["recolorable"].InnerText);
+ if (MO.Recolorable)
+ {
+
+ List colors = new List();
+ if (HexToColor(ParkOBJ["Color1"].InnerText) != new Color(0.95f, 0, 0))
+ colors.Add(HexToColor(ParkOBJ["Color1"].InnerText));
+ if (HexToColor(ParkOBJ["Color2"].InnerText) != new Color(0.32f, 1, 0))
+ colors.Add(HexToColor(ParkOBJ["Color2"].InnerText));
+ Debug.Log("Color 3" + HexToColor(ParkOBJ["Color3"].InnerText));
+ if (ParkOBJ["Color3"].InnerText != "1C0FFF")
+ colors.Add(HexToColor(ParkOBJ["Color3"].InnerText));
+ if (HexToColor(ParkOBJ["Color4"].InnerText) != new Color(1, 0, 1))
+ colors.Add(HexToColor(ParkOBJ["Color4"].InnerText));
+
+ MO.Colors = colors.ToArray();
+ }
+ Registar.Register(MO).GetComponent();
+ }
+ }
+ catch (Exception e)
+ {
+ LogException(e);
+ }
+ }
+ }
+ catch (Exception e)
+ {
+ LogException(e);
+ }
+ bundle.Unload(false);
+ Debug.Log("Bundle Unloaded");
+
+
+ }
+ }
+ catch (Exception e)
+ {
+ LogException(e);
+ }
+ }
+ public void UnloadScenery()
+ {
+ Registar.UnRegister();
+ }
+ public static Vector3 getVector3(string rString)
+ {
+ string[] temp = rString.Substring(1, rString.Length - 2).Split(',');
+ float x = float.Parse(temp[0]);
+ float y = float.Parse(temp[1]);
+ float z = float.Parse(temp[2]);
+ Vector3 rValue = new Vector3(x, y, z);
+ return rValue;
+ }
+ string ColorToHex(Color32 color)
+ {
+ string hex = color.r.ToString("X2") + color.g.ToString("X2") + color.b.ToString("X2");
+ return hex;
+ }
+
+ Color HexToColor(string hex)
+ {
+ byte r = byte.Parse(hex.Substring(0, 2), System.Globalization.NumberStyles.HexNumber);
+ byte g = byte.Parse(hex.Substring(2, 2), System.Globalization.NumberStyles.HexNumber);
+ byte b = byte.Parse(hex.Substring(4, 2), System.Globalization.NumberStyles.HexNumber);
+ return new Color32(r, g, b, 255);
+ }
+}
+
diff --git a/README.md b/README.md
index 296bd83..75bf960 100644
--- a/README.md
+++ b/README.md
@@ -1 +1,4 @@
-# Road-Pieces
\ No newline at end of file
+# CustomSceneryModTemplate
+Mod template for custom scenery
+
+See https://parkitectnexus.com/modding-wiki for documentation
diff --git a/Road Pieces.xml b/Road Pieces.xml
new file mode 100644
index 0000000..07edf5c
--- /dev/null
+++ b/Road Pieces.xml
@@ -0,0 +1,110 @@
+
+
+ Road Pieces
+ Road Pieces to make roads!
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/assetbundle/mod b/assetbundle/mod
new file mode 100644
index 0000000..6c71fbb
Binary files /dev/null and b/assetbundle/mod differ
diff --git a/assetbundle/mod.manifest b/assetbundle/mod.manifest
new file mode 100644
index 0000000..98bb944
--- /dev/null
+++ b/assetbundle/mod.manifest
@@ -0,0 +1,33 @@
+ManifestFileVersion: 0
+CRC: 1708371200
+Hashes:
+ AssetFileHash:
+ serializedVersion: 2
+ Hash: 1690eb6d08f1ac6a26e5e795a5025dc0
+ TypeTreeHash:
+ serializedVersion: 2
+ Hash: f47e5080155a0c3ac2e9ffbbc14e366d
+HashAppended: 0
+ClassTypes:
+- Class: 1
+ Script: {instanceID: 0}
+- Class: 4
+ Script: {instanceID: 0}
+- Class: 21
+ Script: {instanceID: 0}
+- Class: 23
+ Script: {instanceID: 0}
+- Class: 33
+ Script: {instanceID: 0}
+- Class: 43
+ Script: {instanceID: 0}
+- Class: 48
+ Script: {instanceID: 0}
+Assets:
+- Assets/Mods/Road Pieces/Road Pieces@Road Middle.prefab
+- Assets/Mods/Road Pieces/Road Pieces@Road Side.prefab
+- Assets/Mods/Road Pieces/Road Pieces@Parking End.prefab
+- Assets/Mods/Road Pieces/Road Pieces@Road Flat.prefab
+- Assets/Mods/Road Pieces/Road Pieces@Road Corner.prefab
+- Assets/Mods/Road Pieces/Road Pieces@Parking Straight.prefab
+Dependencies: []
diff --git a/bin/Road Pieces.dll b/bin/Road Pieces.dll
new file mode 100644
index 0000000..3618d65
Binary files /dev/null and b/bin/Road Pieces.dll differ
diff --git a/bin/build-160610133351064.dll b/bin/build-160610133351064.dll
new file mode 100644
index 0000000..3618d65
Binary files /dev/null and b/bin/build-160610133351064.dll differ
diff --git a/bin/build.dat b/bin/build.dat
new file mode 100644
index 0000000..edc9e21
--- /dev/null
+++ b/bin/build.dat
@@ -0,0 +1 @@
+bin/build-160610133351064.dll
\ No newline at end of file
diff --git a/mod.json b/mod.json
new file mode 100644
index 0000000..c61cc7f
--- /dev/null
+++ b/mod.json
@@ -0,0 +1,9 @@
+{
+"BaseDir":"",
+"CompilerVersion":"v3.5",
+"IsDevelopment":true,
+"IsEnabled":true,
+"Name":"Road Pieces",
+"Project":"ModSparkLoader.csproj",
+"Dependencies":["ParkitectNexus/Depender"]
+}
\ No newline at end of file
diff --git a/mod.log b/mod.log
new file mode 100644
index 0000000..2df5932
--- /dev/null
+++ b/mod.log
@@ -0,0 +1,16 @@
+[16-06-10 13:33:51] Info: Compiling Road Pieces to bin/build-160610133351064.dll...
+[16-06-10 13:33:51] Info: Compiling from `ModSparkLoader.csproj`.
+[16-06-10 13:33:51] Info: Resolved assembly reference `Assembly-CSharp` to `c:/program files (x86)/steam\SteamApps\common\Parkitect\Parkitect_Data\Managed\Assembly-CSharp.dll`
+[16-06-10 13:33:51] Info: IGNORING assembly reference `Depender`
+[16-06-10 13:33:51] Info: Resolved assembly reference `System` to `System.dll`
+[16-06-10 13:33:51] Info: Resolved assembly reference `System.Core` to `System.Core.dll`
+[16-06-10 13:33:51] Info: Resolved assembly reference `System.Data` to `System.Data.dll`
+[16-06-10 13:33:51] Info: Resolved assembly reference `System.Data.DataSetExtensions` to `System.Data.DataSetExtensions.dll`
+[16-06-10 13:33:51] Info: Resolved assembly reference `System.Xml` to `System.Xml.dll`
+[16-06-10 13:33:51] Info: Resolved assembly reference `System.Xml.Linq` to `System.Xml.Linq.dll`
+[16-06-10 13:33:51] Info: Resolved assembly reference `UnityEngine` to `c:/program files (x86)/steam\SteamApps\common\Parkitect\Parkitect_Data\Managed\UnityEngine.dll`
+[16-06-10 13:33:51] Info: Resolved assembly reference `UnityEngine.UI` to `c:/program files (x86)/steam\SteamApps\common\Parkitect\Parkitect_Data\Managed\UnityEngine.UI.dll`
+[16-06-10 13:33:51] Info: Source files: ModSparkLoader\FlatRideLoader.cs, ModSparkLoader\Main.cs, ModSparkLoader\ModLoader.cs from `C:\Users\karni\Documents\Parkitect\pnmods\Road Pieces`.
+[16-06-10 13:33:51] Info: Compile using compiler version v3.5.
+[16-06-10 13:34:02] Info: Loaded build-160610133351064, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null.
+[16-06-10 13:34:02] Info: Sucessfully registered Custom_Scenery.Main to the mod manager.
diff --git a/moddata.cache b/moddata.cache
new file mode 100644
index 0000000..92eefdf
--- /dev/null
+++ b/moddata.cache
@@ -0,0 +1 @@
+{"ImageBase64":null,"Name":null}
\ No newline at end of file
diff --git a/modinfo.meta b/modinfo.meta
new file mode 100644
index 0000000..33496f1
--- /dev/null
+++ b/modinfo.meta
@@ -0,0 +1 @@
+{"Tag":null,"Repository":null,"Id":null,"InstalledVersion":"2016-06-10T13:33:34.1531292-05:00"}
\ No newline at end of file
diff --git a/objects.json b/objects.json
new file mode 100644
index 0000000..20ca393
--- /dev/null
+++ b/objects.json
@@ -0,0 +1,3 @@
+{
+objects : ["Road Pieces@Parking End","Road Pieces@Parking Straight","Road Pieces@Road Corner","Road Pieces@Road Flat","Road Pieces@Road Middle","Road Pieces@Road Side"]
+ }
\ No newline at end of file