2019-01-10 18:31:23 +08:00
|
|
|
using System;
|
2018-12-21 05:34:08 +08:00
|
|
|
using System.Collections.Generic;
|
2018-12-25 04:00:58 +08:00
|
|
|
using System.IO;
|
2018-12-30 18:00:05 +08:00
|
|
|
using Microsoft.Xna.Framework;
|
|
|
|
using PyTK.Extensions;
|
|
|
|
using PyTK.Types;
|
2019-01-10 10:05:03 +08:00
|
|
|
using Revitalize.Framework;
|
2018-12-25 14:02:25 +08:00
|
|
|
using Revitalize.Framework.Crafting;
|
2018-12-30 18:00:05 +08:00
|
|
|
using Revitalize.Framework.Environment;
|
2019-05-16 03:42:48 +08:00
|
|
|
using Revitalize.Framework.Factories.Objects;
|
2018-12-26 11:48:45 +08:00
|
|
|
using Revitalize.Framework.Illuminate;
|
2018-12-30 18:00:05 +08:00
|
|
|
using Revitalize.Framework.Objects;
|
2019-05-17 04:00:43 +08:00
|
|
|
using Revitalize.Framework.Objects.Furniture;
|
2018-12-29 15:28:21 +08:00
|
|
|
using Revitalize.Framework.Player;
|
2019-01-10 18:31:23 +08:00
|
|
|
using Revitalize.Framework.Utilities;
|
2018-12-30 18:00:05 +08:00
|
|
|
using StardewModdingAPI;
|
|
|
|
using StardewValley;
|
|
|
|
using StardewValley.Objects;
|
2019-07-16 17:09:42 +08:00
|
|
|
using StardustCore.UIUtilities;
|
2019-07-18 01:18:51 +08:00
|
|
|
using StardustCore.Animations;
|
2019-07-24 23:44:55 +08:00
|
|
|
using StardewValley.Menus;
|
2018-12-21 05:34:08 +08:00
|
|
|
|
|
|
|
namespace Revitalize
|
|
|
|
{
|
2019-05-16 13:27:38 +08:00
|
|
|
|
|
|
|
//Bugs:
|
|
|
|
// -Chair tops cut off objects
|
2019-05-17 04:00:43 +08:00
|
|
|
// -load content MUST be enabled for the table to be placed?????? WTF
|
2018-12-30 18:00:05 +08:00
|
|
|
// TODO:
|
2019-07-16 17:09:42 +08:00
|
|
|
/*
|
|
|
|
*
|
|
|
|
*Menus:
|
|
|
|
* -Simple Item Grab Menu (to transfer items from one inventory to another)
|
|
|
|
* -Need to make this.
|
|
|
|
*
|
2019-05-24 07:53:44 +08:00
|
|
|
// -Add in object pool class to handle the multitudes of objects I'll be making. (WIP)
|
2019-05-18 02:04:16 +08:00
|
|
|
// -Make this mod able to load content packs for easier future modding
|
2019-05-16 13:27:38 +08:00
|
|
|
//
|
2018-12-30 18:00:05 +08:00
|
|
|
// -Multiple Lights On Object
|
|
|
|
// -Illumination Colors
|
|
|
|
// Furniture:
|
2019-05-18 00:43:50 +08:00
|
|
|
// -rugs (done, needs factory info/sprite)
|
|
|
|
// -tables (done)
|
2019-05-22 03:10:57 +08:00
|
|
|
// -lamps (done)
|
2019-01-15 04:26:36 +08:00
|
|
|
// -chairs (done)
|
2019-05-16 05:27:33 +08:00
|
|
|
// -benches (done but needs factory info/sprite)
|
2018-12-30 18:00:05 +08:00
|
|
|
// -dressers/other storage containers
|
|
|
|
// -fun interactables
|
|
|
|
// -More crafting tables
|
|
|
|
// -Machines
|
|
|
|
// !=Energy
|
2019-07-16 17:09:42 +08:00
|
|
|
// -solar
|
2018-12-30 18:00:05 +08:00
|
|
|
// -Furnace
|
|
|
|
// -Seed Maker
|
|
|
|
// -Stone Quarry
|
2019-05-16 03:42:48 +08:00
|
|
|
// -Mayo Maker
|
|
|
|
// -Cheese Maker
|
|
|
|
// -Auto fisher
|
|
|
|
// -Auto Preserves
|
|
|
|
// -Auto Keg
|
|
|
|
// -Auto Cask
|
2019-07-16 17:09:42 +08:00
|
|
|
// -Calcinator (oil+stone)
|
2018-12-30 18:00:05 +08:00
|
|
|
// -Materials
|
|
|
|
// -Tin/Bronze/Alluminum/Silver?Platinum/Etc
|
2019-07-16 17:09:42 +08:00
|
|
|
-titanium
|
|
|
|
-Alloys!
|
|
|
|
-Brass
|
|
|
|
-Electrum
|
|
|
|
-Liquids
|
|
|
|
-oil
|
|
|
|
-water
|
|
|
|
-coal
|
|
|
|
-juice???
|
2018-12-30 18:00:05 +08:00
|
|
|
// -Crafting Menu
|
|
|
|
// -Item Grab Menu (Extendable)
|
2019-05-24 07:53:44 +08:00
|
|
|
// -Yes/No Dialogue Box
|
|
|
|
// -Multi Choice dialogue box
|
2018-12-30 18:00:05 +08:00
|
|
|
// -Gift Boxes
|
|
|
|
// Magic!
|
|
|
|
// -Alchemy Bags
|
|
|
|
// -Transmutation
|
|
|
|
// -Effect Crystals
|
|
|
|
// -Spell books
|
|
|
|
// -Potions!
|
|
|
|
// -Magic Meter
|
2019-01-06 14:25:22 +08:00
|
|
|
// -Connected chests much like Project EE2 from MC
|
|
|
|
//
|
|
|
|
//
|
2019-07-16 17:09:42 +08:00
|
|
|
// -Food?
|
|
|
|
-multi flavored sodas
|
2019-01-06 14:25:22 +08:00
|
|
|
// -Bigger chests
|
|
|
|
//
|
2018-12-30 18:00:05 +08:00
|
|
|
// Festivals
|
|
|
|
// -Firework festival?
|
|
|
|
// Stargazing???
|
|
|
|
// -Moon Phases+DarkerNight
|
|
|
|
// Bigger/Better Museum?
|
|
|
|
// More Crops?
|
|
|
|
// More Food?
|
|
|
|
//
|
|
|
|
// Equippables!
|
|
|
|
// -accessories that provide buffs/regen/friendship
|
2019-01-06 14:25:22 +08:00
|
|
|
// -braclets/rings/broaches....more crafting for these???
|
2018-12-30 18:00:05 +08:00
|
|
|
//
|
|
|
|
// Music???
|
|
|
|
// -IDK maybe add in instruments???
|
|
|
|
//
|
|
|
|
// More buildings????
|
|
|
|
//
|
|
|
|
// More Animals???
|
|
|
|
//
|
|
|
|
// Readable Books?
|
|
|
|
//
|
|
|
|
// Custom NPCs for shops???
|
|
|
|
//
|
|
|
|
// Frisbee Minigame?
|
|
|
|
//
|
|
|
|
// HorseRace Minigame/Betting?
|
|
|
|
//
|
|
|
|
// Locations:
|
|
|
|
// -Small Island Home?
|
|
|
|
//
|
|
|
|
// More crops
|
2019-01-06 14:25:22 +08:00
|
|
|
//
|
|
|
|
// More monsters
|
|
|
|
// -boss fights
|
|
|
|
//
|
|
|
|
// More dungeons??
|
2019-07-16 17:09:42 +08:00
|
|
|
*/
|
2018-12-25 15:34:38 +08:00
|
|
|
|
2018-12-21 05:34:08 +08:00
|
|
|
public class ModCore : Mod
|
|
|
|
{
|
|
|
|
public static IModHelper ModHelper;
|
|
|
|
public static IMonitor ModMonitor;
|
2019-05-22 03:10:57 +08:00
|
|
|
public static IManifest Manifest;
|
2018-12-21 05:34:08 +08:00
|
|
|
|
|
|
|
public static Dictionary<string, CustomObject> customObjects;
|
|
|
|
|
2019-01-10 18:31:23 +08:00
|
|
|
public static Dictionary<string, MultiTiledObject>ObjectGroups;
|
|
|
|
|
2018-12-29 15:28:21 +08:00
|
|
|
public static PlayerInfo playerInfo;
|
2018-12-21 05:34:08 +08:00
|
|
|
|
2019-01-10 18:31:23 +08:00
|
|
|
public static Serializer Serializer;
|
|
|
|
|
2019-01-21 15:34:11 +08:00
|
|
|
public static Dictionary<GameLocation,MultiTiledObject> ObjectsToDraw;
|
|
|
|
|
2018-12-21 05:34:08 +08:00
|
|
|
public override void Entry(IModHelper helper)
|
|
|
|
{
|
|
|
|
ModHelper = helper;
|
2018-12-30 18:00:05 +08:00
|
|
|
ModMonitor = this.Monitor;
|
2019-05-22 03:10:57 +08:00
|
|
|
Manifest = this.ModManifest;
|
2018-12-25 04:00:58 +08:00
|
|
|
|
2018-12-30 18:00:05 +08:00
|
|
|
this.createDirectories();
|
|
|
|
this.initailizeComponents();
|
2018-12-25 04:00:58 +08:00
|
|
|
|
2018-12-30 18:00:05 +08:00
|
|
|
ModHelper.Events.GameLoop.SaveLoaded += this.GameLoop_SaveLoaded;
|
|
|
|
ModHelper.Events.GameLoop.TimeChanged += this.GameLoop_TimeChanged;
|
|
|
|
ModHelper.Events.GameLoop.UpdateTicked += this.GameLoop_UpdateTicked;
|
2019-01-13 03:25:45 +08:00
|
|
|
ModHelper.Events.GameLoop.ReturnedToTitle += this.GameLoop_ReturnedToTitle;
|
2019-07-18 01:18:51 +08:00
|
|
|
ModHelper.Events.Input.ButtonPressed += this.Input_ButtonPressed;
|
2018-12-29 15:28:21 +08:00
|
|
|
playerInfo = new PlayerInfo();
|
2019-01-09 14:15:58 +08:00
|
|
|
|
2019-07-16 17:09:42 +08:00
|
|
|
TextureManager.AddTextureManager(Manifest,"Furniture");
|
|
|
|
TextureManager.GetTextureManager(Manifest,"Furniture").searchForTextures(ModHelper,this.ModManifest,Path.Combine("Content", "Graphics", "Furniture"));
|
2019-07-24 23:44:55 +08:00
|
|
|
TextureManager.AddTextureManager(Manifest, "InventoryMenu");
|
|
|
|
TextureManager.GetTextureManager(Manifest, "InventoryMenu").searchForTextures(ModHelper, this.ModManifest, Path.Combine("Content", "Graphics", "Menus","InventoryMenu"));
|
2019-05-22 03:10:57 +08:00
|
|
|
|
|
|
|
//TextureManager.addTexture("Furniture","Oak Chair", new Texture2DExtended(this.Helper, this.ModManifest, Path.Combine("Content","Graphics","Furniture", "Chairs", "Oak Chair.png")));
|
2019-05-22 03:19:29 +08:00
|
|
|
|
2019-05-20 18:05:11 +08:00
|
|
|
//Framework.Graphics.TextureManager.TextureManagers.Add("Furniture", new TextureManager(this.Helper.DirectoryPath, Path.Combine("Content", "Graphics", "Furniture")));
|
|
|
|
//Rename graphic files tohave spaces and comment out below lines
|
|
|
|
|
|
|
|
//TextureManager.addTexture("Furniture","Oak Chair", new Texture2DExtended(this.Helper, this.ModManifest, Path.Combine("Content","Graphics","Furniture", "Chairs", "Oak Chair.png")));
|
|
|
|
//
|
2019-05-22 03:19:29 +08:00
|
|
|
|
2019-05-22 03:10:57 +08:00
|
|
|
//TextureManager.addTexture("Furniture", "Oak Table", new Texture2DExtended(this.Helper, this.ModManifest, Path.Combine("Content", "Graphics", "Furniture", "Tables", "Oak Table.png")));
|
|
|
|
//TextureManager.addTexture("Furniture", "Oak Lamp", new Texture2DExtended(this.Helper, this.ModManifest, Path.Combine("Content", "Graphics", "Furniture", "Lamps", "Oak Lamp.png")));
|
2019-01-10 18:31:23 +08:00
|
|
|
customObjects = new Dictionary<string, CustomObject>();
|
|
|
|
ObjectGroups = new Dictionary<string, MultiTiledObject>();
|
2018-12-25 04:36:03 +08:00
|
|
|
|
2019-05-16 03:42:48 +08:00
|
|
|
|
2019-01-10 18:31:23 +08:00
|
|
|
Serializer = new Serializer();
|
2019-01-21 15:34:11 +08:00
|
|
|
ObjectsToDraw = new Dictionary<GameLocation, MultiTiledObject>();
|
2019-05-18 02:04:16 +08:00
|
|
|
|
2019-05-16 03:42:48 +08:00
|
|
|
|
|
|
|
|
2018-12-21 05:34:08 +08:00
|
|
|
}
|
|
|
|
|
2019-07-18 01:18:51 +08:00
|
|
|
private void Input_ButtonPressed(object sender, StardewModdingAPI.Events.ButtonPressedEventArgs e)
|
|
|
|
{
|
|
|
|
if(e.Button== SButton.U)
|
|
|
|
{
|
|
|
|
Game1.currentMinigame = new Revitalize.Framework.Minigame.SeasideScrambleMinigame.SeasideScramble();
|
|
|
|
}
|
2019-07-24 23:44:55 +08:00
|
|
|
else if(e.Button== SButton.Y)
|
|
|
|
{
|
|
|
|
//Game1.activeClickableMenu = new ItemGrabMenu(Game1.player.Items,false,true, new InventoryMenu.highlightThisItem(InventoryMenu.highlightAllItems),);
|
2019-07-25 05:16:04 +08:00
|
|
|
Game1.activeClickableMenu = new Revitalize.Framework.Menus.InventoryMenu(100, 100, 500, 500,3,4,false, Game1.player.Items,15);
|
2019-07-24 23:44:55 +08:00
|
|
|
}
|
2019-07-18 01:18:51 +08:00
|
|
|
}
|
|
|
|
|
2019-01-13 03:25:45 +08:00
|
|
|
private void GameLoop_ReturnedToTitle(object sender, StardewModdingAPI.Events.ReturnedToTitleEventArgs e)
|
|
|
|
{
|
|
|
|
Serializer.returnToTitle();
|
|
|
|
}
|
2019-05-17 04:00:43 +08:00
|
|
|
/// <summary>
|
|
|
|
/// Must be enabled for the tabled to be placed????
|
|
|
|
/// </summary>
|
2019-01-10 18:31:23 +08:00
|
|
|
private void loadContent()
|
2018-12-21 05:34:08 +08:00
|
|
|
{
|
2019-07-16 17:09:42 +08:00
|
|
|
|
|
|
|
MultiTiledComponent obj = new MultiTiledComponent(PyTKHelper.CreateOBJData("Omegasis.Revitalize.MultiTiledComponent.Test", TextureManager.GetTexture(Manifest,"Furniture","Oak Chair"),typeof(MultiTiledComponent),Color.White), new BasicItemInformation("CoreObjectTest", "Omegasis.TEST1", "YAY FUN!", "Omegasis.Revitalize.MultiTiledComponent.Test", Color.White, -300, 0, false, 300, Vector2.Zero, true, true, TextureManager.GetTexture(Manifest, "Furniture", "Oak Chair"), new AnimationManager(TextureManager.GetExtendedTexture(Manifest, "Furniture", "Oak Chair"), new Animation(new Rectangle(0, 0, 16, 16))), Color.White, false, null, null));
|
|
|
|
MultiTiledComponent obj2 = new MultiTiledComponent(PyTKHelper.CreateOBJData("Omegasis.Revitalize.MultiTiledComponent.Test", TextureManager.GetTexture(Manifest, "Furniture", "Oak Chair"), typeof(MultiTiledComponent), Color.White), new BasicItemInformation("CoreObjectTest2", "Omegasis.TEST2", "Some fun!", "Omegasis.Revitalize.MultiTiledComponent.Test", Color.White, -300, 0, false, 300, Vector2.Zero, true, true, TextureManager.GetTexture(Manifest, "Furniture", "Oak Chair"), new AnimationManager(TextureManager.GetExtendedTexture(Manifest, "Furniture", "Oak Chair"), new Animation(new Rectangle(0, 16, 16, 16))), Color.White, false, null, null));
|
|
|
|
MultiTiledComponent obj3 = new MultiTiledComponent(PyTKHelper.CreateOBJData("Omegasis.Revitalize.MultiTiledComponent.Test", TextureManager.GetTexture(Manifest, "Furniture", "Oak Chair"), typeof(MultiTiledComponent), Color.White), new BasicItemInformation("CoreObjectTest3", "Omegasis.TEST3", "NoFun", "Omegasis.Revitalize.MultiTiledComponent.Test", Color.White, -300, 0, false, 100, Vector2.Zero, true, true, TextureManager.GetTexture(Manifest,"Furniture","Oak Chair"), new AnimationManager(TextureManager.GetExtendedTexture(Manifest, "Furniture", "Oak Chair"), new Animation(new Rectangle(0, 32, 16, 16))), Color.Red, false, null, null));
|
2018-12-21 05:34:08 +08:00
|
|
|
|
2018-12-26 11:48:45 +08:00
|
|
|
|
2019-05-18 02:04:16 +08:00
|
|
|
obj3.info.lightManager.addLight(new Vector2(Game1.tileSize), new LightSource(4, new Vector2(0, 0), 2.5f, Color.Orange.Invert()), obj3);
|
2019-05-17 04:00:43 +08:00
|
|
|
|
2019-07-16 17:09:42 +08:00
|
|
|
MultiTiledObject bigObject = new MultiTiledObject(PyTKHelper.CreateOBJData("Omegasis.Revitalize.MultiTiledComponent.Test", TextureManager.GetTexture(Manifest, "Furniture", "Oak Chair"), typeof(MultiTiledObject), Color.White), new BasicItemInformation("MultiTest", "Omegasis.BigTiledTest", "A really big object", "Omegasis.Revitalize.MultiTiledObject", Color.Blue, -300, 0, false, 500, Vector2.Zero, true, true, TextureManager.GetTexture(Manifest, "Furniture", "Oak Chair"), new AnimationManager(), Color.White, false, null, null));
|
|
|
|
|
2019-05-18 00:43:50 +08:00
|
|
|
bigObject.addComponent(new Vector2(0, 0), obj);
|
|
|
|
bigObject.addComponent(new Vector2(1, 0), obj2);
|
|
|
|
bigObject.addComponent(new Vector2(2, 0), obj3);
|
2019-05-17 04:00:43 +08:00
|
|
|
|
2018-12-25 14:02:25 +08:00
|
|
|
Recipe pie = new Recipe(new Dictionary<Item, int>()
|
|
|
|
{
|
|
|
|
[bigObject] = 1
|
2019-01-10 10:05:03 +08:00
|
|
|
}, new KeyValuePair<Item, int>(new Furniture(3, Vector2.Zero), 1), new StatCost(100, 50, 0, 0));
|
2018-12-25 14:02:25 +08:00
|
|
|
|
2019-01-10 18:31:23 +08:00
|
|
|
customObjects.Add("Omegasis.BigTiledTest", bigObject);
|
2019-05-16 03:42:48 +08:00
|
|
|
|
2019-05-17 04:00:43 +08:00
|
|
|
|
2019-07-16 17:09:42 +08:00
|
|
|
Framework.Objects.Furniture.RugTileComponent rug1 = new RugTileComponent(PyTKHelper.CreateOBJData("Omegasis.Revitalize.Furniture.Basic.Rugs.TestRug", TextureManager.GetTexture(Manifest, "Furniture", "Oak Chair"), typeof(RugTileComponent), Color.White), new BasicItemInformation("Rug Tile", "Omegasis.Revitalize.Furniture.Basic.Rugs.TestRug", "A rug tile", "Rug", Color.Brown, -300, 0, false, 100, Vector2.Zero, true, true, TextureManager.GetTexture(Manifest, "Furniture", "Oak Chair"), new AnimationManager(TextureManager.GetExtendedTexture(Manifest, "Furniture", "Oak Chair"), new Animation(new Rectangle(0, 0, 16, 16))), Color.White, true, null, null));
|
|
|
|
|
|
|
|
Framework.Objects.Furniture.RugMultiTiledObject rug=new RugMultiTiledObject( PyTKHelper.CreateOBJData("Omegasis.Revitalize.Furniture.Basic.Rugs.TestRug", TextureManager.GetTexture(Manifest, "Furniture", "Oak Chair"),typeof(RugMultiTiledObject),Color.White,false),new BasicItemInformation("Simple Rug Test", "Omegasis.Revitalize.Furniture.Basic.Rugs.TestRug","A simple rug for testing","Rugs",Color.Brown,-300,0,false,500,Vector2.Zero,true,true,TextureManager.GetTexture(Manifest,"Furniture","Oak Chair"),new AnimationManager(),Color.White,true,null,null));
|
|
|
|
|
2019-01-21 16:01:07 +08:00
|
|
|
rug.addComponent(new Vector2(0, 0), rug1);
|
|
|
|
|
|
|
|
customObjects.Add("Omegasis.Revitalize.Furniture.Rugs.RugTest", rug);
|
2019-05-16 04:43:09 +08:00
|
|
|
|
2019-05-16 03:42:48 +08:00
|
|
|
|
2019-05-16 04:43:09 +08:00
|
|
|
|
|
|
|
FurnitureFactory.LoadFurnitureFiles();
|
2019-01-10 18:31:23 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
private void createDirectories()
|
|
|
|
{
|
|
|
|
Directory.CreateDirectory(Path.Combine(this.Helper.DirectoryPath, "Configs"));
|
|
|
|
|
|
|
|
Directory.CreateDirectory(Path.Combine(this.Helper.DirectoryPath, "Content"));
|
|
|
|
Directory.CreateDirectory(Path.Combine(this.Helper.DirectoryPath,"Content" ,"Graphics"));
|
2019-05-24 07:53:44 +08:00
|
|
|
//Directory.CreateDirectory(Path.Combine(this.Helper.DirectoryPath, "Content", "Graphics","Furniture"));
|
2019-01-10 18:31:23 +08:00
|
|
|
Directory.CreateDirectory(Path.Combine(this.Helper.DirectoryPath, "Content", "Graphics", "Furniture","Chairs"));
|
2019-05-24 07:53:44 +08:00
|
|
|
Directory.CreateDirectory(Path.Combine(this.Helper.DirectoryPath, "Content", "Graphics", "Furniture", "Lamps"));
|
|
|
|
Directory.CreateDirectory(Path.Combine(this.Helper.DirectoryPath, "Content", "Graphics", "Furniture", "Tables"));
|
2019-01-10 18:31:23 +08:00
|
|
|
}
|
2019-01-09 14:15:58 +08:00
|
|
|
|
2019-07-24 23:44:55 +08:00
|
|
|
/// <summary>
|
|
|
|
/// Initialize all modular components for this mod.
|
|
|
|
/// </summary>
|
2019-01-10 18:31:23 +08:00
|
|
|
private void initailizeComponents()
|
|
|
|
{
|
|
|
|
DarkerNight.InitializeConfig();
|
|
|
|
}
|
2018-12-30 18:00:05 +08:00
|
|
|
|
2019-01-10 18:31:23 +08:00
|
|
|
private void GameLoop_UpdateTicked(object sender, StardewModdingAPI.Events.UpdateTickedEventArgs e)
|
|
|
|
{
|
|
|
|
DarkerNight.SetDarkerColor();
|
|
|
|
playerInfo.update();
|
|
|
|
}
|
|
|
|
|
|
|
|
private void GameLoop_TimeChanged(object sender, StardewModdingAPI.Events.TimeChangedEventArgs e)
|
|
|
|
{
|
|
|
|
DarkerNight.CalculateDarkerNightColor();
|
|
|
|
}
|
|
|
|
|
|
|
|
private void GameLoop_SaveLoaded(object sender, StardewModdingAPI.Events.SaveLoadedEventArgs e)
|
|
|
|
{
|
2019-05-18 02:04:16 +08:00
|
|
|
this.loadContent();
|
2019-05-16 03:42:48 +08:00
|
|
|
|
|
|
|
|
2019-01-13 02:40:47 +08:00
|
|
|
Serializer.afterLoad();
|
2019-01-11 10:15:31 +08:00
|
|
|
|
2019-01-11 05:37:35 +08:00
|
|
|
if (Game1.IsServer || Game1.IsMultiplayer || Game1.IsClient)
|
|
|
|
{
|
2019-01-13 02:40:47 +08:00
|
|
|
throw new Exception("Can't run Revitalize in multiplayer due to lack of current support!");
|
2019-01-11 05:37:35 +08:00
|
|
|
}
|
2019-05-18 00:43:50 +08:00
|
|
|
Game1.player.addItemToInventory(GetObjectFromPool("Omegasis.BigTiledTest"));
|
2019-05-17 04:00:43 +08:00
|
|
|
//Game1.player.addItemToInventory(GetObjectFromPool("Omegasis.Revitalize.Furniture.Chairs.OakChair"));
|
|
|
|
//Game1.player.addItemToInventory(GetObjectFromPool("Omegasis.Revitalize.Furniture.Rugs.RugTest"));
|
2019-05-16 04:43:09 +08:00
|
|
|
Game1.player.addItemToInventory(GetObjectFromPool("Omegasis.Revitalize.Furniture.Tables.OakTable"));
|
2019-05-18 02:04:16 +08:00
|
|
|
Game1.player.addItemToInventory(GetObjectFromPool("Omegasis.Revitalize.Furniture.Lamps.OakLamp"));
|
2019-01-13 02:40:47 +08:00
|
|
|
/*
|
2019-01-11 10:32:35 +08:00
|
|
|
StardewValley.Tools.Axe axe = new StardewValley.Tools.Axe();
|
|
|
|
Serializer.Serialize(Path.Combine(this.Helper.DirectoryPath, "AXE.json"), axe);
|
|
|
|
axe =(StardewValley.Tools.Axe)Serializer.Deserialize(Path.Combine(this.Helper.DirectoryPath, "AXE.json"),typeof(StardewValley.Tools.Axe));
|
2019-01-13 02:40:47 +08:00
|
|
|
//Game1.player.addItemToInventory(axe);
|
|
|
|
*/
|
2019-01-10 18:31:23 +08:00
|
|
|
|
2018-12-21 05:34:08 +08:00
|
|
|
}
|
|
|
|
|
2019-05-16 03:42:48 +08:00
|
|
|
public static Item GetObjectFromPool(string objName)
|
2019-01-13 10:12:14 +08:00
|
|
|
{
|
|
|
|
if (customObjects.ContainsKey(objName))
|
|
|
|
{
|
2019-05-18 00:43:50 +08:00
|
|
|
CustomObject i =(CustomObject)customObjects[objName].getOne();
|
2019-05-17 04:00:43 +08:00
|
|
|
return i;
|
2019-01-13 10:12:14 +08:00
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
throw new Exception("Object Key name not found: " + objName);
|
|
|
|
}
|
|
|
|
}
|
2019-01-10 10:05:03 +08:00
|
|
|
|
|
|
|
|
2018-12-21 05:34:08 +08:00
|
|
|
public static void log(object message)
|
|
|
|
{
|
|
|
|
ModMonitor.Log(message.ToString());
|
|
|
|
}
|
2019-01-10 10:05:03 +08:00
|
|
|
|
|
|
|
public static string generatePlaceholderString()
|
|
|
|
{
|
|
|
|
return "2048/0/-300/Crafting -9/Play '2048 by Platonymous' at home!/true/true/0/2048";
|
|
|
|
}
|
2018-12-21 05:34:08 +08:00
|
|
|
}
|
|
|
|
}
|