Added in sand as a resource and made the sandbox generate sand.
This commit is contained in:
parent
877e40ae39
commit
0f5eb5b60b
Binary file not shown.
After Width: | Height: | Size: 259 B |
|
@ -107,7 +107,7 @@ namespace Revitalize.Framework.Objects
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public void loadInItems()
|
public void loadInItems()
|
||||||
{
|
{
|
||||||
this.resources.loadInItems();
|
this.resources.loadInItems(); //Must be first.
|
||||||
this.loadInCraftingTables();
|
this.loadInCraftingTables();
|
||||||
this.loadInMachines();
|
this.loadInMachines();
|
||||||
this.loadInTools();
|
this.loadInTools();
|
||||||
|
@ -154,22 +154,22 @@ namespace Revitalize.Framework.Objects
|
||||||
MultiTiledObject sandBox = new MultiTiledObject(PyTKHelper.CreateOBJData("Omegasis.Revitalize.Objects.Machines.Sandbox", TextureManager.GetTexture(ModCore.Manifest, "Machines", "Sandbox"), typeof(MultiTiledObject), Color.White, true), new BasicItemInformation("Sandbox", "Omegasis.Revitalize.Objects.Machines.Sandbox", "A sandbox which slowly produces sand. Unfortunately you can't sit in this one.", "Machine", Color.SteelBlue, -300, 0, false, 750, true, true, TextureManager.GetTexture(ModCore.Manifest, "Machines", "Sandbox"), new AnimationManager(), Color.White, true, new InventoryManager(36), null, null));
|
MultiTiledObject sandBox = new MultiTiledObject(PyTKHelper.CreateOBJData("Omegasis.Revitalize.Objects.Machines.Sandbox", TextureManager.GetTexture(ModCore.Manifest, "Machines", "Sandbox"), typeof(MultiTiledObject), Color.White, true), new BasicItemInformation("Sandbox", "Omegasis.Revitalize.Objects.Machines.Sandbox", "A sandbox which slowly produces sand. Unfortunately you can't sit in this one.", "Machine", Color.SteelBlue, -300, 0, false, 750, true, true, TextureManager.GetTexture(ModCore.Manifest, "Machines", "Sandbox"), new AnimationManager(), Color.White, true, new InventoryManager(36), null, null));
|
||||||
Machine sandBox_0_0 = new Machine(PyTKHelper.CreateOBJData("Omegasis.Revitalize.Objects.Machines.Sandbox", TextureManager.GetTexture(ModCore.Manifest, "Machines", "Sandbox"), typeof(Machine), Color.White, true), new BasicItemInformation("Sandbox", "Omegasis.Revitalize.Objects.Machines.Sandbox", "A sandbox which slowly produces sand. Unfortunately you can't sit in this one.", "Machine", Color.SteelBlue, -300, 0, false, 750, true, true, TextureManager.GetTexture(ModCore.Manifest, "Machines", "Sandbox"), new AnimationManager(TextureManager.GetExtendedTexture(ModCore.Manifest, "Machines", "Sandbox"),new Animation(0,0,16,16)), Color.White, false, new InventoryManager(36), null, null), new List<InformationFiles.ResourceInformation>()
|
Machine sandBox_0_0 = new Machine(PyTKHelper.CreateOBJData("Omegasis.Revitalize.Objects.Machines.Sandbox", TextureManager.GetTexture(ModCore.Manifest, "Machines", "Sandbox"), typeof(Machine), Color.White, true), new BasicItemInformation("Sandbox", "Omegasis.Revitalize.Objects.Machines.Sandbox", "A sandbox which slowly produces sand. Unfortunately you can't sit in this one.", "Machine", Color.SteelBlue, -300, 0, false, 750, true, true, TextureManager.GetTexture(ModCore.Manifest, "Machines", "Sandbox"), new AnimationManager(TextureManager.GetExtendedTexture(ModCore.Manifest, "Machines", "Sandbox"),new Animation(0,0,16,16)), Color.White, false, new InventoryManager(36), null, null), new List<InformationFiles.ResourceInformation>()
|
||||||
{
|
{
|
||||||
new InformationFiles.ResourceInformation(new StardewValley.Object((int)Enums.SDVObject.Clay,1),1,1,1,1,1,1,0,0,0,0)
|
new InformationFiles.ResourceInformation(this.resources.getResource("Sand",1),1,1,1,1,1,1,0,0,0,0)
|
||||||
|
|
||||||
}, 0, 10, true);
|
}, 0, 10, true);
|
||||||
Machine sandBox_1_0 = new Machine(PyTKHelper.CreateOBJData("Omegasis.Revitalize.Objects.Machines.Sandbox", TextureManager.GetTexture(ModCore.Manifest, "Machines", "Sandbox"), typeof(Machine), Color.White, true), new BasicItemInformation("Sandbox", "Omegasis.Revitalize.Objects.Machines.Sandbox", "A sandbox which slowly produces sand. Unfortunately you can't sit in this one.", "Machine", Color.SteelBlue, -300, 0, false, 750, true, true, TextureManager.GetTexture(ModCore.Manifest, "Machines", "Sandbox"), new AnimationManager(TextureManager.GetExtendedTexture(ModCore.Manifest, "Machines", "Sandbox"), new Animation(16, 0, 16, 16)), Color.White, false, new InventoryManager(36), null, null), new List<InformationFiles.ResourceInformation>()
|
Machine sandBox_1_0 = new Machine(PyTKHelper.CreateOBJData("Omegasis.Revitalize.Objects.Machines.Sandbox", TextureManager.GetTexture(ModCore.Manifest, "Machines", "Sandbox"), typeof(Machine), Color.White, true), new BasicItemInformation("Sandbox", "Omegasis.Revitalize.Objects.Machines.Sandbox", "A sandbox which slowly produces sand. Unfortunately you can't sit in this one.", "Machine", Color.SteelBlue, -300, 0, false, 750, true, true, TextureManager.GetTexture(ModCore.Manifest, "Machines", "Sandbox"), new AnimationManager(TextureManager.GetExtendedTexture(ModCore.Manifest, "Machines", "Sandbox"), new Animation(16, 0, 16, 16)), Color.White, false, new InventoryManager(36), null, null), new List<InformationFiles.ResourceInformation>()
|
||||||
{
|
{
|
||||||
new InformationFiles.ResourceInformation(new StardewValley.Object((int)Enums.SDVObject.Clay,1),1,1,1,1,1,1,0,0,0,0)
|
new InformationFiles.ResourceInformation(this.resources.getResource("Sand",1),1,1,1,1,1,1,0,0,0,0)
|
||||||
|
|
||||||
}, 0, 10, false);
|
}, 0, 10, false);
|
||||||
Machine sandBox_0_1 = new Machine(PyTKHelper.CreateOBJData("Omegasis.Revitalize.Objects.Machines.Sandbox", TextureManager.GetTexture(ModCore.Manifest, "Machines", "Sandbox"), typeof(Machine), Color.White, true), new BasicItemInformation("Sandbox", "Omegasis.Revitalize.Objects.Machines.Sandbox", "A sandbox which slowly produces sand. Unfortunately you can't sit in this one.", "Machine", Color.SteelBlue, -300, 0, false, 750, true, true, TextureManager.GetTexture(ModCore.Manifest, "Machines", "Sandbox"), new AnimationManager(TextureManager.GetExtendedTexture(ModCore.Manifest, "Machines", "Sandbox"), new Animation(0, 16, 16, 16)), Color.White, false, new InventoryManager(36), null, null), new List<InformationFiles.ResourceInformation>()
|
Machine sandBox_0_1 = new Machine(PyTKHelper.CreateOBJData("Omegasis.Revitalize.Objects.Machines.Sandbox", TextureManager.GetTexture(ModCore.Manifest, "Machines", "Sandbox"), typeof(Machine), Color.White, true), new BasicItemInformation("Sandbox", "Omegasis.Revitalize.Objects.Machines.Sandbox", "A sandbox which slowly produces sand. Unfortunately you can't sit in this one.", "Machine", Color.SteelBlue, -300, 0, false, 750, true, true, TextureManager.GetTexture(ModCore.Manifest, "Machines", "Sandbox"), new AnimationManager(TextureManager.GetExtendedTexture(ModCore.Manifest, "Machines", "Sandbox"), new Animation(0, 16, 16, 16)), Color.White, false, new InventoryManager(36), null, null), new List<InformationFiles.ResourceInformation>()
|
||||||
{
|
{
|
||||||
new InformationFiles.ResourceInformation(new StardewValley.Object((int)Enums.SDVObject.Clay,1),1,1,1,1,1,1,0,0,0,0)
|
new InformationFiles.ResourceInformation(this.resources.getResource("Sand",1),1,1,1,1,1,1,0,0,0,0)
|
||||||
|
|
||||||
}, 0, 10, false);
|
}, 0, 10, false);
|
||||||
Machine sandBox_1_1 = new Machine(PyTKHelper.CreateOBJData("Omegasis.Revitalize.Objects.Machines.Sandbox", TextureManager.GetTexture(ModCore.Manifest, "Machines", "Sandbox"), typeof(Machine), Color.White, true), new BasicItemInformation("Sandbox", "Omegasis.Revitalize.Objects.Machines.Sandbox", "A sandbox which slowly produces sand. Unfortunately you can't sit in this one.", "Machine", Color.SteelBlue, -300, 0, false, 750, true, true, TextureManager.GetTexture(ModCore.Manifest, "Machines", "Sandbox"), new AnimationManager(TextureManager.GetExtendedTexture(ModCore.Manifest, "Machines", "Sandbox"), new Animation(16, 16, 16, 16)), Color.White, false, new InventoryManager(36), null, null), new List<InformationFiles.ResourceInformation>()
|
Machine sandBox_1_1 = new Machine(PyTKHelper.CreateOBJData("Omegasis.Revitalize.Objects.Machines.Sandbox", TextureManager.GetTexture(ModCore.Manifest, "Machines", "Sandbox"), typeof(Machine), Color.White, true), new BasicItemInformation("Sandbox", "Omegasis.Revitalize.Objects.Machines.Sandbox", "A sandbox which slowly produces sand. Unfortunately you can't sit in this one.", "Machine", Color.SteelBlue, -300, 0, false, 750, true, true, TextureManager.GetTexture(ModCore.Manifest, "Machines", "Sandbox"), new AnimationManager(TextureManager.GetExtendedTexture(ModCore.Manifest, "Machines", "Sandbox"), new Animation(16, 16, 16, 16)), Color.White, false, new InventoryManager(36), null, null), new List<InformationFiles.ResourceInformation>()
|
||||||
{
|
{
|
||||||
new InformationFiles.ResourceInformation(new StardewValley.Object((int)Enums.SDVObject.Clay,1),1,1,1,1,1,1,0,0,0,0)
|
new InformationFiles.ResourceInformation(this.resources.getResource("Sand",1),1,1,1,1,1,1,0,0,0,0)
|
||||||
|
|
||||||
}, 0, 10, false);
|
}, 0, 10, false);
|
||||||
|
|
||||||
|
|
|
@ -30,6 +30,7 @@ namespace Revitalize.Framework.Objects
|
||||||
public Dictionary<string, OreVeinObj> oreVeins;
|
public Dictionary<string, OreVeinObj> oreVeins;
|
||||||
public Dictionary<string, OreResourceInformation> oreResourceInformationTable;
|
public Dictionary<string, OreResourceInformation> oreResourceInformationTable;
|
||||||
public Dictionary<string, Ore> ores;
|
public Dictionary<string, Ore> ores;
|
||||||
|
public Dictionary<string, CustomObject> resources;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// A list of all visited floors on the current visit to the mines.
|
/// A list of all visited floors on the current visit to the mines.
|
||||||
|
@ -46,6 +47,7 @@ namespace Revitalize.Framework.Objects
|
||||||
this.oreResourceInformationTable = new Dictionary<string, OreResourceInformation>();
|
this.oreResourceInformationTable = new Dictionary<string, OreResourceInformation>();
|
||||||
this.ores = new Dictionary<string, Ore>();
|
this.ores = new Dictionary<string, Ore>();
|
||||||
this.visitedFloors = new List<int>();
|
this.visitedFloors = new List<int>();
|
||||||
|
this.resources = new Dictionary<string, CustomObject>();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -54,6 +56,7 @@ namespace Revitalize.Framework.Objects
|
||||||
public void loadInItems()
|
public void loadInItems()
|
||||||
{
|
{
|
||||||
this.loadInOreItems();
|
this.loadInOreItems();
|
||||||
|
this.loadInResourceItems();
|
||||||
this.serializeOreVeins();
|
this.serializeOreVeins();
|
||||||
this.loadOreVeins();
|
this.loadOreVeins();
|
||||||
}
|
}
|
||||||
|
@ -304,6 +307,12 @@ namespace Revitalize.Framework.Objects
|
||||||
ModCore.ObjectManager.AddItem("SteelIngot", steelIngot);
|
ModCore.ObjectManager.AddItem("SteelIngot", steelIngot);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void loadInResourceItems()
|
||||||
|
{
|
||||||
|
CustomObject sand=new CustomObject(PyTKHelper.CreateOBJData("Omegasis.Revitalize.Items.Resources.Misc.Sand", TextureManager.GetTexture(ModCore.Manifest, "Items.Resources.Misc", "Sand"), typeof(CustomObject), Color.White, true), new BasicItemInformation("Sand", "Omegasis.Revitalize.Items.Resources.Misc.Sand", "Sand which is made from tiny rocks and can be used for smelting. Also unfun to have inside of swimwear.", "Resource", Color.Brown, -300, 0, false, 2, false, false, TextureManager.GetTexture(ModCore.Manifest, "Items.Resources.Misc", "Sand"), new AnimationManager(), Color.White, true, null, null));
|
||||||
|
this.resources.Add("Sand", sand);
|
||||||
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets an ore from the list of stored ores in this mod.
|
/// Gets an ore from the list of stored ores in this mod.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
@ -324,6 +333,29 @@ namespace Revitalize.Framework.Objects
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Get a resource from the resource maanger.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="name"></param>
|
||||||
|
/// <param name="Stack"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
public CustomObject getResource(string name, int Stack=1)
|
||||||
|
{
|
||||||
|
Ore o = this.getOre(name, Stack);
|
||||||
|
if (o != null) return o;
|
||||||
|
|
||||||
|
if (this.resources.ContainsKey(name))
|
||||||
|
{
|
||||||
|
CustomObject obj = (CustomObject)this.resources[name].getOne();
|
||||||
|
obj.Stack = Stack;
|
||||||
|
return obj;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public OreResourceInformation getOreResourceInfo(string id)
|
public OreResourceInformation getOreResourceInfo(string id)
|
||||||
{
|
{
|
||||||
if (this.oreVeins.ContainsKey(id))
|
if (this.oreVeins.ContainsKey(id))
|
||||||
|
|
|
@ -300,6 +300,8 @@ namespace Revitalize
|
||||||
TextureManager.GetTextureManager(Manifest, "InventoryMenu").searchForTextures(ModHelper, this.ModManifest, Path.Combine("Content", "Graphics", "Menus", "InventoryMenu"));
|
TextureManager.GetTextureManager(Manifest, "InventoryMenu").searchForTextures(ModHelper, this.ModManifest, Path.Combine("Content", "Graphics", "Menus", "InventoryMenu"));
|
||||||
TextureManager.AddTextureManager(Manifest, "Resources.Ore");
|
TextureManager.AddTextureManager(Manifest, "Resources.Ore");
|
||||||
TextureManager.GetTextureManager(Manifest, "Resources.Ore").searchForTextures(ModHelper, this.ModManifest, Path.Combine("Content", "Graphics", "Objects", "Resources", "Ore"));
|
TextureManager.GetTextureManager(Manifest, "Resources.Ore").searchForTextures(ModHelper, this.ModManifest, Path.Combine("Content", "Graphics", "Objects", "Resources", "Ore"));
|
||||||
|
TextureManager.AddTextureManager(Manifest, "Items.Resources.Misc");
|
||||||
|
TextureManager.GetTextureManager(Manifest, "Items.Resources.Misc").searchForTextures(ModHelper, this.ModManifest, Path.Combine("Content", "Graphics", "Items", "Resources", "Misc"));
|
||||||
TextureManager.AddTextureManager(Manifest, "Items.Resources.Ore");
|
TextureManager.AddTextureManager(Manifest, "Items.Resources.Ore");
|
||||||
TextureManager.GetTextureManager(Manifest, "Items.Resources.Ore").searchForTextures(ModHelper, this.ModManifest, Path.Combine("Content", "Graphics", "Items", "Resources", "Ore"));
|
TextureManager.GetTextureManager(Manifest, "Items.Resources.Ore").searchForTextures(ModHelper, this.ModManifest, Path.Combine("Content", "Graphics", "Items", "Resources", "Ore"));
|
||||||
TextureManager.AddTextureManager(Manifest, "Tools");
|
TextureManager.AddTextureManager(Manifest, "Tools");
|
||||||
|
|
|
@ -201,6 +201,9 @@
|
||||||
<None Include="manifest.json" />
|
<None Include="manifest.json" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
<Content Include="Content\Graphics\Items\Resources\Misc\Sand.png">
|
||||||
|
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||||
|
</Content>
|
||||||
<Content Include="Content\Graphics\Items\Resources\Ore\AluminumIngot.png">
|
<Content Include="Content\Graphics\Items\Resources\Ore\AluminumIngot.png">
|
||||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||||
</Content>
|
</Content>
|
||||||
|
|
Loading…
Reference in New Issue