Updated MuseumRearranger to 1.1. Also added a config option to toggle showing the menu when rearranging the museum.

This commit is contained in:
Joshua Navarro 2016-10-13 00:22:50 -07:00
parent e8147a7b5b
commit 38d05115ea
30 changed files with 23972 additions and 23414 deletions

View File

@ -1,9 +1,9 @@
Config: Museum_Rearranger. Feel free to mess with these settings.
Config: Save_Anywhere Info. Feel free to mess with these settings.
====================================================================================
Key binding for rearranging the museum.
R
Key binding for showing the menu when rearranging the museum.
T

View File

@ -7,6 +7,8 @@ namespace Museum_Rearranger
public class Class1 : Mod
{
string key_binding = "R";
string key_binding2 = "T";
public static bool showMenu;
bool game_loaded = false;
public override void Entry(params object[] objects)
@ -25,14 +27,21 @@ namespace Museum_Rearranger
if (e.KeyPressed.ToString() == key_binding) //if the key is pressed, load my cusom save function
{
if (Game1.activeClickableMenu != null) return;
if (StardewValley.Game1.player.currentLocation.name == "ArchaeologyHouse") Game1.activeClickableMenu = new StardewValley.Menus.MuseumMenu();
if (StardewValley.Game1.player.currentLocation.name == "ArchaeologyHouse") Game1.activeClickableMenu = new StardewValley.Menus.NewMuseumMenu();
else Log.Info("You can't rearrange the museum here!");
}
if (e.KeyPressed.ToString() == key_binding2) //if the key is pressed, load my cusom save function
{
if (showMenu == true) showMenu = false;
else showMenu = true;
// Log.AsyncC(showMenu);
}
}
public void PlayerEvents_LoadedGame(object sender, StardewModdingAPI.Events.EventArgsLoadedGameChanged e)
{
game_loaded = true;
showMenu = true;
DataLoader_Settings();
MyWritter_Settings();
}
@ -47,12 +56,14 @@ namespace Museum_Rearranger
if (!File.Exists(mylocation3)) //if not data.json exists, initialize the data variables to the ModConfig data. I.E. starting out.
{
key_binding = "R";
key_binding2 = "T";
}
else
{
string[] readtext = File.ReadAllLines(mylocation3);
key_binding = Convert.ToString(readtext[3]);
key_binding2 = Convert.ToString(readtext[5]);
}
}
@ -72,6 +83,8 @@ namespace Museum_Rearranger
mystring3[1] = "====================================================================================";
mystring3[2] = "Key binding for rearranging the museum.";
mystring3[3] = key_binding.ToString();
mystring3[4] = "Key binding for showing the menu when rearranging the museum.";
mystring3[5] = key_binding2.ToString();
File.WriteAllLines(mylocation3, mystring3);
}
else
@ -81,6 +94,8 @@ namespace Museum_Rearranger
mystring3[1] = "====================================================================================";
mystring3[2] = "Key binding for rearranging the museum.";
mystring3[3] = key_binding.ToString();
mystring3[4] = "Key binding for showing the menu when rearranging the museum.";
mystring3[5] = key_binding2.ToString();
File.WriteAllLines(mylocation3, mystring3);
}
}

View File

@ -11,6 +11,7 @@
<AssemblyName>Museum_Rearranger</AssemblyName>
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<TargetFrameworkProfile />
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
@ -20,6 +21,7 @@
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<Prefer32Bit>false</Prefer32Bit>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
@ -28,14 +30,21 @@
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<Prefer32Bit>false</Prefer32Bit>
</PropertyGroup>
<ItemGroup>
<Reference Include="Microsoft.Xna.Framework, Version=4.0.0.0, Culture=neutral, PublicKeyToken=842cf8be1de50553" />
<Reference Include="Stardew Valley">
<HintPath>..\..\..\..\..\..\..\Program Files (x86)\Steam\steamapps\common\Stardew Valley\Stardew Valley.exe</HintPath>
<Reference Include="Microsoft.Xna.Framework.Game, Version=4.0.0.0, Culture=neutral, PublicKeyToken=842cf8be1de50553" />
<Reference Include="Microsoft.Xna.Framework.Graphics, Version=4.0.0.0, Culture=neutral, PublicKeyToken=842cf8be1de50553, processorArchitecture=x86">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\..\..\..\..\..\..\..\..\..\Program Files (x86)\Microsoft XNA\XNA Game Studio\v4.0\References\Windows\x86\Microsoft.Xna.Framework.Graphics.dll</HintPath>
</Reference>
<Reference Include="StardewModdingAPI">
<HintPath>..\..\..\..\..\..\..\Program Files (x86)\Steam\steamapps\common\Stardew Valley\StardewModdingAPI.exe</HintPath>
<Reference Include="Stardew Valley">
<HintPath>..\..\..\..\..\..\..\..\..\..\..\Program Files (x86)\Steam\steamapps\common\Stardew Valley\Stardew Valley.exe</HintPath>
</Reference>
<Reference Include="StardewModdingAPI, Version=1.0.0.0, Culture=neutral, processorArchitecture=x86">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\..\..\..\..\..\..\..\..\..\Program Files (x86)\Steam\steamapps\common\Stardew Valley\StardewModdingAPI.exe</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.Core" />
@ -45,9 +54,14 @@
<Reference Include="System.Data" />
<Reference Include="System.Net.Http" />
<Reference Include="System.Xml" />
<Reference Include="xTile">
<HintPath>..\..\..\..\..\..\..\..\..\..\..\Program Files (x86)\Steam\steamapps\common\Stardew Valley\xTile.dll</HintPath>
</Reference>
</ItemGroup>
<ItemGroup>
<Compile Include="Class1.cs" />
<Compile Include="NewMenuWithInventory.cs" />
<Compile Include="NewMuseumMenu.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />

View File

@ -0,0 +1,228 @@
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;
using System;
namespace StardewValley.Menus
{
public class NewMenuWithInventory : IClickableMenu
{
public string descriptionText = "";
public string hoverText = "";
public string descriptionTitle = "";
public InventoryMenu inventory;
public Item heldItem;
public Item hoveredItem;
public int wiggleWordsTimer;
public ClickableTextureComponent okButton;
public ClickableTextureComponent trashCan;
public float trashCanLidRotation;
public NewMenuWithInventory(InventoryMenu.highlightThisItem highlighterMethod = null, bool okButton = false, bool trashCan = false, int inventoryXOffset = 0, int inventoryYOffset = 0) : base(Game1.viewport.Width / 2 - (800 + IClickableMenu.borderWidth * 2) / 2, Game1.viewport.Height / 2 - (600 + IClickableMenu.borderWidth * 2) / 2 + Game1.tileSize, 800 + IClickableMenu.borderWidth * 2, 600 + IClickableMenu.borderWidth * 2, false)
{
if (this.yPositionOnScreen < IClickableMenu.borderWidth + IClickableMenu.spaceToClearTopBorder)
{
this.yPositionOnScreen = IClickableMenu.borderWidth + IClickableMenu.spaceToClearTopBorder;
}
if (this.xPositionOnScreen < 0)
{
this.xPositionOnScreen = 0;
}
int yPosition = this.yPositionOnScreen + IClickableMenu.spaceToClearTopBorder + IClickableMenu.borderWidth + Game1.tileSize * 3 - Game1.tileSize / 4 + inventoryYOffset;
this.inventory = new InventoryMenu(this.xPositionOnScreen + IClickableMenu.spaceToClearSideBorder + IClickableMenu.borderWidth / 2 + inventoryXOffset, yPosition, false, null, highlighterMethod, -1, 3, 0, 0, true);
if (okButton)
{
this.okButton = new ClickableTextureComponent(new Rectangle(this.xPositionOnScreen + this.width + 4, this.yPositionOnScreen + this.height - Game1.tileSize * 3 - IClickableMenu.borderWidth, Game1.tileSize, Game1.tileSize), Game1.mouseCursors, Game1.getSourceRectForStandardTileSheet(Game1.mouseCursors, 46, -1, -1), 1f, false);
}
if (trashCan)
{
this.trashCan = new ClickableTextureComponent(new Rectangle(this.xPositionOnScreen + this.width + 4, this.yPositionOnScreen + this.height - Game1.tileSize * 3 - Game1.tileSize / 2 - IClickableMenu.borderWidth - 104, Game1.tileSize, 104), Game1.mouseCursors, new Rectangle(669, 261, 16, 26), (float)Game1.pixelZoom, false);
}
}
public void movePosition(int dx, int dy)
{
this.xPositionOnScreen += dx;
this.yPositionOnScreen += dy;
this.inventory.movePosition(dx, dy);
if (this.okButton != null)
{
ClickableTextureComponent expr_41_cp_0_cp_0 = this.okButton;
expr_41_cp_0_cp_0.bounds.X = expr_41_cp_0_cp_0.bounds.X + dx;
ClickableTextureComponent expr_56_cp_0_cp_0 = this.okButton;
expr_56_cp_0_cp_0.bounds.Y = expr_56_cp_0_cp_0.bounds.Y + dy;
}
if (this.trashCan != null)
{
ClickableTextureComponent expr_73_cp_0_cp_0 = this.trashCan;
expr_73_cp_0_cp_0.bounds.X = expr_73_cp_0_cp_0.bounds.X + dx;
ClickableTextureComponent expr_88_cp_0_cp_0 = this.trashCan;
expr_88_cp_0_cp_0.bounds.Y = expr_88_cp_0_cp_0.bounds.Y + dy;
}
}
public override bool readyToClose()
{
return this.heldItem == null;
}
public override bool isWithinBounds(int x, int y)
{
return base.isWithinBounds(x, y);
}
public override void receiveLeftClick(int x, int y, bool playSound = true)
{
this.heldItem = this.inventory.leftClick(x, y, this.heldItem, playSound);
if (!this.isWithinBounds(x, y) && this.readyToClose() && this.trashCan != null)
{
this.trashCan.containsPoint(x, y);
}
if (this.okButton != null && this.okButton.containsPoint(x, y) && this.readyToClose())
{
base.exitThisMenu(true);
if (Game1.currentLocation.currentEvent != null)
{
Event expr_7E = Game1.currentLocation.currentEvent;
int currentCommand = expr_7E.CurrentCommand;
expr_7E.CurrentCommand = currentCommand + 1;
}
Game1.playSound("bigDeSelect");
}
if (this.trashCan != null && this.trashCan.containsPoint(x, y) && this.heldItem != null && this.heldItem.canBeTrashed())
{
if (this.heldItem is StardewValley.Object && Game1.player.specialItems.Contains((this.heldItem as StardewValley.Object).parentSheetIndex))
{
Game1.player.specialItems.Remove((this.heldItem as StardewValley.Object).parentSheetIndex);
}
this.heldItem = null;
Game1.playSound("trashcan");
}
}
public override void receiveRightClick(int x, int y, bool playSound = true)
{
this.heldItem = this.inventory.rightClick(x, y, this.heldItem, playSound);
}
public override void performHoverAction(int x, int y)
{
this.descriptionText = "";
this.descriptionTitle = "";
this.hoveredItem = this.inventory.hover(x, y, this.heldItem);
this.hoverText = this.inventory.hoverText;
if (this.okButton != null)
{
if (this.okButton.containsPoint(x, y))
{
this.okButton.scale = Math.Min(1.1f, this.okButton.scale + 0.05f);
}
else
{
this.okButton.scale = Math.Max(1f, this.okButton.scale - 0.05f);
}
}
if (this.trashCan != null)
{
if (this.trashCan.containsPoint(x, y))
{
if (this.trashCanLidRotation <= 0f)
{
Game1.playSound("trashcanlid");
}
this.trashCanLidRotation = Math.Min(this.trashCanLidRotation + 0.06544985f, 1.57079637f);
return;
}
this.trashCanLidRotation = Math.Max(this.trashCanLidRotation - 0.06544985f, 0f);
}
}
public override void update(GameTime time)
{
if (this.wiggleWordsTimer > 0)
{
this.wiggleWordsTimer -= time.ElapsedGameTime.Milliseconds;
}
}
public virtual void draw(SpriteBatch b, bool drawUpperPortion = true, bool drawDescriptionArea = true)
{
if (this.trashCan != null)
{
this.trashCan.draw(b);
b.Draw(Game1.mouseCursors, new Vector2((float)(this.trashCan.bounds.X + 60), (float)(this.trashCan.bounds.Y + 40)), new Rectangle?(new Rectangle(686, 256, 18, 10)), Color.White, this.trashCanLidRotation, new Vector2(16f, 10f), (float)Game1.pixelZoom, SpriteEffects.None, 0.86f);
}
if (Museum_Rearranger.Class1.showMenu == true)
{
if (drawUpperPortion)
{
Game1.drawDialogueBox(this.xPositionOnScreen, this.yPositionOnScreen, this.width, this.height, false, true, null, false);
base.drawHorizontalPartition(b, this.yPositionOnScreen + IClickableMenu.borderWidth + IClickableMenu.spaceToClearTopBorder + 4 * Game1.tileSize, false);
if (drawDescriptionArea)
{
base.drawVerticalUpperIntersectingPartition(b, this.xPositionOnScreen + Game1.tileSize * 9, 5 * Game1.tileSize + Game1.tileSize / 8);
if (!this.descriptionText.Equals(""))
{
int num = this.xPositionOnScreen + Game1.tileSize * 9 + Game1.tileSize * 2 / 3 + ((this.wiggleWordsTimer > 0) ? Game1.random.Next(-2, 3) : 0);
int num2 = this.yPositionOnScreen + IClickableMenu.borderWidth + IClickableMenu.spaceToClearTopBorder - Game1.tileSize / 2 + ((this.wiggleWordsTimer > 0) ? Game1.random.Next(-2, 3) : 0);
b.DrawString(Game1.smallFont, Game1.parseText(this.descriptionText, Game1.smallFont, Game1.tileSize * 3 + Game1.tileSize / 2), new Vector2((float)num, (float)num2), Game1.textColor * 0.75f);
}
}
}
else
{
Game1.drawDialogueBox(this.xPositionOnScreen - IClickableMenu.borderWidth / 2, this.yPositionOnScreen + IClickableMenu.borderWidth + IClickableMenu.spaceToClearTopBorder + Game1.tileSize, this.width, this.height - (IClickableMenu.borderWidth + IClickableMenu.spaceToClearTopBorder + 3 * Game1.tileSize), false, true, null, false);
}
if (this.okButton != null)
{
this.okButton.draw(b);
}
this.inventory.draw(b);
}
else
{
if (this.okButton != null)
{
this.okButton.draw(b);
}
}
}
public override void gameWindowSizeChanged(Rectangle oldBounds, Rectangle newBounds)
{
base.gameWindowSizeChanged(oldBounds, newBounds);
if (this.yPositionOnScreen < IClickableMenu.borderWidth + IClickableMenu.spaceToClearTopBorder)
{
this.yPositionOnScreen = IClickableMenu.borderWidth + IClickableMenu.spaceToClearTopBorder;
}
if (this.xPositionOnScreen < 0)
{
this.xPositionOnScreen = 0;
}
int yPosition = this.yPositionOnScreen + IClickableMenu.spaceToClearTopBorder + IClickableMenu.borderWidth + Game1.tileSize * 3 - Game1.tileSize / 4;
this.inventory = new InventoryMenu(this.xPositionOnScreen + IClickableMenu.spaceToClearSideBorder + IClickableMenu.borderWidth / 2, yPosition, false, null, this.inventory.highlightMethod, -1, 3, 0, 0, true);
if (this.okButton != null)
{
this.okButton = new ClickableTextureComponent(new Rectangle(this.xPositionOnScreen + this.width + 4, this.yPositionOnScreen + this.height - Game1.tileSize * 3 - IClickableMenu.borderWidth, Game1.tileSize, Game1.tileSize), Game1.mouseCursors, Game1.getSourceRectForStandardTileSheet(Game1.mouseCursors, 46, -1, -1), 1f, false);
}
if (this.trashCan != null)
{
this.trashCan = new ClickableTextureComponent(new Rectangle(this.xPositionOnScreen + this.width + 4, this.yPositionOnScreen + this.height - Game1.tileSize * 3 - Game1.tileSize / 2 - IClickableMenu.borderWidth - 104, Game1.tileSize, 104), Game1.mouseCursors, new Rectangle(669, 261, 16, 26), (float)Game1.pixelZoom, false);
}
}
public override void draw(SpriteBatch b)
{
throw new NotImplementedException();
}
}
}

View File

@ -0,0 +1,292 @@
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;
using Microsoft.Xna.Framework.Input;
using StardewValley.BellsAndWhistles;
using StardewValley.Locations;
using System;
using xTile.Dimensions;
namespace StardewValley.Menus
{
public class NewMuseumMenu : NewMenuWithInventory
{
public const int startingState = 0;
public const int placingInMuseumState = 1;
public const int exitingState = 2;
public int fadeTimer;
public int state;
public int menuPositionOffset;
public bool fadeIntoBlack;
public bool menuMovingDown;
public float blackFadeAlpha;
public SparklingText sparkleText;
public Vector2 globalLocationOfSparklingArtifact;
private bool holdingMuseumPiece;
public NewMuseumMenu() : base(new InventoryMenu.highlightThisItem((Game1.currentLocation as LibraryMuseum).isItemSuitableForDonation), true, false, 0, 0)
{
this.fadeTimer = 800;
this.fadeIntoBlack = true;
base.movePosition(0, Game1.viewport.Height - this.yPositionOnScreen - this.height);
Game1.player.forceCanMove();
}
public override void receiveKeyPress(Keys key)
{
if (this.fadeTimer <= 0)
{
if (Game1.options.doesInputListContain(Game1.options.menuButton, key) && this.readyToClose())
{
this.state = 2;
this.fadeTimer = 500;
this.fadeIntoBlack = true;
}
if (Game1.options.doesInputListContain(Game1.options.moveDownButton, key))
{
Game1.panScreen(0, 4);
return;
}
if (Game1.options.doesInputListContain(Game1.options.moveRightButton, key))
{
Game1.panScreen(4, 0);
return;
}
if (Game1.options.doesInputListContain(Game1.options.moveUpButton, key))
{
Game1.panScreen(0, -4);
return;
}
if (Game1.options.doesInputListContain(Game1.options.moveLeftButton, key))
{
Game1.panScreen(-4, 0);
}
}
}
public override void receiveLeftClick(int x, int y, bool playSound = true)
{
if (this.fadeTimer <= 0)
{
Item heldItem = this.heldItem;
if (!this.holdingMuseumPiece)
{
this.heldItem = this.inventory.leftClick(x, y, this.heldItem, true);
}
if (heldItem != null && this.heldItem != null && (y < Game1.viewport.Height - (this.height - (IClickableMenu.borderWidth + IClickableMenu.spaceToClearTopBorder + 3 * Game1.tileSize)) || this.menuMovingDown))
{
int num = (x + Game1.viewport.X) / Game1.tileSize;
int num2 = (y + Game1.viewport.Y) / Game1.tileSize;
if ((Game1.currentLocation as LibraryMuseum).isTileSuitableForMuseumPiece(num, num2) && (Game1.currentLocation as LibraryMuseum).isItemSuitableForDonation(this.heldItem))
{
int count = (Game1.currentLocation as LibraryMuseum).getRewardsForPlayer(Game1.player).Count;
(Game1.currentLocation as LibraryMuseum).museumPieces.Add(new Vector2((float)num, (float)num2), (this.heldItem as StardewValley.Object).parentSheetIndex);
Game1.playSound("stoneStep");
this.holdingMuseumPiece = false;
if ((Game1.currentLocation as LibraryMuseum).getRewardsForPlayer(Game1.player).Count > count)
{
this.sparkleText = new SparklingText(Game1.dialogueFont, "New Reward!", Color.MediumSpringGreen, Color.White, false, 0.1, 2500, -1, 500);
Game1.playSound("reward");
this.globalLocationOfSparklingArtifact = new Vector2((float)(num * Game1.tileSize + Game1.tileSize / 2) - this.sparkleText.textWidth / 2f, (float)(num2 * Game1.tileSize - Game1.tileSize * 3 / 4));
}
else
{
Game1.playSound("newArtifact");
}
Game1.player.completeQuest(24);
Item expr_1DE = this.heldItem;
int stack = expr_1DE.Stack;
expr_1DE.Stack = stack - 1;
if (this.heldItem.Stack <= 0)
{
this.heldItem = null;
}
this.menuMovingDown = false;
int count2 = (Game1.currentLocation as LibraryMuseum).museumPieces.Count;
if (count2 >= 95)
{
Game1.getAchievement(5);
}
else if (count2 >= 40)
{
Game1.getAchievement(28);
}
}
}
else if (this.heldItem == null)
{
int num3 = (x + Game1.viewport.X) / Game1.tileSize;
int num4 = (y + Game1.viewport.Y) / Game1.tileSize;
Vector2 key = new Vector2((float)num3, (float)num4);
if ((Game1.currentLocation as LibraryMuseum).museumPieces.ContainsKey(key))
{
this.heldItem = new StardewValley.Object((Game1.currentLocation as LibraryMuseum).museumPieces[key], 1, false, -1, 0);
(Game1.currentLocation as LibraryMuseum).museumPieces.Remove(key);
this.holdingMuseumPiece = true;
}
}
if (this.heldItem != null && heldItem == null)
{
this.menuMovingDown = true;
}
if (this.okButton != null && this.okButton.containsPoint(x, y) && this.readyToClose())
{
this.state = 2;
this.fadeTimer = 800;
this.fadeIntoBlack = true;
Game1.playSound("bigDeSelect");
}
}
}
public override void receiveRightClick(int x, int y, bool playSound = true)
{
Item heldItem = this.heldItem;
if (this.fadeTimer <= 0)
{
base.receiveRightClick(x, y, true);
}
if (this.heldItem != null && heldItem == null)
{
this.menuMovingDown = true;
}
}
public override void update(GameTime time)
{
base.update(time);
if (this.sparkleText != null && this.sparkleText.update(time))
{
this.sparkleText = null;
}
if (this.fadeTimer > 0)
{
this.fadeTimer -= time.ElapsedGameTime.Milliseconds;
if (this.fadeIntoBlack)
{
this.blackFadeAlpha = 0f + (1500f - (float)this.fadeTimer) / 1500f;
}
else
{
this.blackFadeAlpha = 1f - (1500f - (float)this.fadeTimer) / 1500f;
}
if (this.fadeTimer <= 0)
{
switch (this.state)
{
case 0:
this.state = 1;
Game1.viewportFreeze = true;
Game1.viewport.Location = new Location(18 * Game1.tileSize, 2 * Game1.tileSize);
Game1.clampViewportToGameMap();
this.fadeTimer = 800;
this.fadeIntoBlack = false;
break;
case 2:
Game1.viewportFreeze = false;
this.fadeIntoBlack = false;
this.fadeTimer = 800;
this.state = 3;
break;
case 3:
Game1.exitActiveMenu();
break;
}
}
}
if (this.menuMovingDown && this.menuPositionOffset < this.height / 3)
{
this.menuPositionOffset += 8;
base.movePosition(0, 8);
}
else if (!this.menuMovingDown && this.menuPositionOffset > 0)
{
this.menuPositionOffset -= 8;
base.movePosition(0, -8);
}
int num = Game1.getOldMouseX() + Game1.viewport.X;
int num2 = Game1.getOldMouseY() + Game1.viewport.Y;
if (num - Game1.viewport.X < Game1.tileSize)
{
Game1.panScreen(-4, 0);
}
else if (num - (Game1.viewport.X + Game1.viewport.Width) >= -Game1.tileSize)
{
Game1.panScreen(4, 0);
}
if (num2 - Game1.viewport.Y < Game1.tileSize)
{
Game1.panScreen(0, -4);
}
else if (num2 - (Game1.viewport.Y + Game1.viewport.Height) >= -Game1.tileSize)
{
Game1.panScreen(0, 4);
if (this.menuMovingDown)
{
this.menuMovingDown = false;
}
}
Keys[] pressedKeys = Game1.oldKBState.GetPressedKeys();
for (int i = 0; i < pressedKeys.Length; i++)
{
Keys key = pressedKeys[i];
this.receiveKeyPress(key);
}
}
public override void gameWindowSizeChanged(Microsoft.Xna.Framework.Rectangle oldBounds, Microsoft.Xna.Framework.Rectangle newBounds)
{
base.gameWindowSizeChanged(oldBounds, newBounds);
base.movePosition(0, Game1.viewport.Height - this.yPositionOnScreen - this.height);
Game1.player.forceCanMove();
}
public override void draw(SpriteBatch b)
{
if ((this.fadeTimer <= 0 || !this.fadeIntoBlack) && this.state != 3)
{
if (this.heldItem != null)
{
for (int i = Game1.viewport.Y / Game1.tileSize - 1; i < (Game1.viewport.Y + Game1.viewport.Height) / Game1.tileSize + 2; i++)
{
for (int j = Game1.viewport.X / Game1.tileSize - 1; j < (Game1.viewport.X + Game1.viewport.Width) / Game1.tileSize + 1; j++)
{
if ((Game1.currentLocation as LibraryMuseum).isTileSuitableForMuseumPiece(j, i))
{
b.Draw(Game1.mouseCursors, Game1.GlobalToLocal(Game1.viewport, new Vector2((float)j, (float)i) * (float)Game1.tileSize), new Microsoft.Xna.Framework.Rectangle?(Game1.getSourceRectForStandardTileSheet(Game1.mouseCursors, 29, -1, -1)), Color.LightGreen);
}
}
}
}
if (!this.holdingMuseumPiece)
{
base.draw(b, false, false);
}
if (!this.hoverText.Equals(""))
{
IClickableMenu.drawHoverText(b, this.hoverText, Game1.smallFont, 0, 0, -1, null, -1, null, null, 0, -1, -1, -1, -1, 1f, null);
}
if (this.heldItem != null)
{
this.heldItem.drawInMenu(b, new Vector2((float)(Game1.getOldMouseX() + 8), (float)(Game1.getOldMouseY() + 8)), 1f);
}
base.drawMouse(b);
if (this.sparkleText != null)
{
this.sparkleText.draw(b, Game1.GlobalToLocal(Game1.viewport, this.globalLocationOfSparklingArtifact));
}
}
b.Draw(Game1.fadeToBlackRect, new Microsoft.Xna.Framework.Rectangle(0, 0, Game1.viewport.Width, Game1.viewport.Height), Color.Black * this.blackFadeAlpha);
}
}
}

View File

@ -1,25 +1,25 @@
C:\Users\owner\Documents\Visual Studio 2015\Projects\Museum_Rearranger\Museum_Rearranger\bin\Debug\Museum_Rearranger.dll
C:\Users\owner\Documents\Visual Studio 2015\Projects\Museum_Rearranger\Museum_Rearranger\bin\Debug\Museum_Rearranger.pdb
C:\Users\owner\Documents\Visual Studio 2015\Projects\Museum_Rearranger\Museum_Rearranger\bin\Debug\Microsoft.Xna.Framework.dll
C:\Users\owner\Documents\Visual Studio 2015\Projects\Museum_Rearranger\Museum_Rearranger\bin\Debug\Stardew Valley.exe
C:\Users\owner\Documents\Visual Studio 2015\Projects\Museum_Rearranger\Museum_Rearranger\bin\Debug\StardewModdingAPI.exe
C:\Users\owner\Documents\Visual Studio 2015\Projects\Museum_Rearranger\Museum_Rearranger\bin\Debug\Microsoft.Xna.Framework.Game.dll
C:\Users\owner\Documents\Visual Studio 2015\Projects\Museum_Rearranger\Museum_Rearranger\bin\Debug\Microsoft.Xna.Framework.Graphics.dll
C:\Users\owner\Documents\Visual Studio 2015\Projects\Museum_Rearranger\Museum_Rearranger\bin\Debug\xTile.dll
C:\Users\owner\Documents\Visual Studio 2015\Projects\Museum_Rearranger\Museum_Rearranger\bin\Debug\Microsoft.Xna.Framework.Xact.dll
C:\Users\owner\Documents\Visual Studio 2015\Projects\Museum_Rearranger\Museum_Rearranger\bin\Debug\Steamworks.NET.dll
C:\Users\owner\Documents\Visual Studio 2015\Projects\Museum_Rearranger\Museum_Rearranger\bin\Debug\Newtonsoft.Json.dll
C:\Users\owner\Documents\Visual Studio 2015\Projects\Museum_Rearranger\Museum_Rearranger\bin\Debug\Microsoft.Xna.Framework.GamerServices.dll
C:\Users\owner\Documents\Visual Studio 2015\Projects\Museum_Rearranger\Museum_Rearranger\bin\Debug\Microsoft.Xna.Framework.Input.Touch.dll
C:\Users\owner\Documents\Visual Studio 2015\Projects\Museum_Rearranger\Museum_Rearranger\bin\Debug\Microsoft.Xna.Framework.xml
C:\Users\owner\Documents\Visual Studio 2015\Projects\Museum_Rearranger\Museum_Rearranger\bin\Debug\StardewModdingAPI.pdb
C:\Users\owner\Documents\Visual Studio 2015\Projects\Museum_Rearranger\Museum_Rearranger\bin\Debug\StardewModdingAPI.xml
C:\Users\owner\Documents\Visual Studio 2015\Projects\Museum_Rearranger\Museum_Rearranger\bin\Debug\Microsoft.Xna.Framework.Game.xml
C:\Users\owner\Documents\Visual Studio 2015\Projects\Museum_Rearranger\Museum_Rearranger\bin\Debug\Microsoft.Xna.Framework.Graphics.xml
C:\Users\owner\Documents\Visual Studio 2015\Projects\Museum_Rearranger\Museum_Rearranger\bin\Debug\Microsoft.Xna.Framework.Xact.xml
C:\Users\owner\Documents\Visual Studio 2015\Projects\Museum_Rearranger\Museum_Rearranger\bin\Debug\Newtonsoft.Json.xml
C:\Users\owner\Documents\Visual Studio 2015\Projects\Museum_Rearranger\Museum_Rearranger\bin\Debug\Microsoft.Xna.Framework.GamerServices.xml
C:\Users\owner\Documents\Visual Studio 2015\Projects\Museum_Rearranger\Museum_Rearranger\bin\Debug\Microsoft.Xna.Framework.Input.Touch.xml
C:\Users\owner\Documents\Visual Studio 2015\Projects\Museum_Rearranger\Museum_Rearranger\obj\Debug\Museum_Rearranger.csprojResolveAssemblyReference.cache
C:\Users\owner\Documents\Visual Studio 2015\Projects\Museum_Rearranger\Museum_Rearranger\obj\Debug\Museum_Rearranger.dll
C:\Users\owner\Documents\Visual Studio 2015\Projects\Museum_Rearranger\Museum_Rearranger\obj\Debug\Museum_Rearranger.pdb
C:\Users\owner\Documents\Visual Studio 2015\Projects\github\Stardew_Valley_Mods\Stardew_Valley_Mods\Museum_Rearrange\Museum_Rearranger\Museum_Rearranger\obj\Debug\Museum_Rearranger.csprojResolveAssemblyReference.cache
C:\Users\owner\Documents\Visual Studio 2015\Projects\github\Stardew_Valley_Mods\Stardew_Valley_Mods\Museum_Rearrange\Museum_Rearranger\Museum_Rearranger\bin\Debug\Museum_Rearranger.dll
C:\Users\owner\Documents\Visual Studio 2015\Projects\github\Stardew_Valley_Mods\Stardew_Valley_Mods\Museum_Rearrange\Museum_Rearranger\Museum_Rearranger\bin\Debug\Museum_Rearranger.pdb
C:\Users\owner\Documents\Visual Studio 2015\Projects\github\Stardew_Valley_Mods\Stardew_Valley_Mods\Museum_Rearrange\Museum_Rearranger\Museum_Rearranger\bin\Debug\Microsoft.Xna.Framework.dll
C:\Users\owner\Documents\Visual Studio 2015\Projects\github\Stardew_Valley_Mods\Stardew_Valley_Mods\Museum_Rearrange\Museum_Rearranger\Museum_Rearranger\bin\Debug\Microsoft.Xna.Framework.Game.dll
C:\Users\owner\Documents\Visual Studio 2015\Projects\github\Stardew_Valley_Mods\Stardew_Valley_Mods\Museum_Rearrange\Museum_Rearranger\Museum_Rearranger\bin\Debug\Microsoft.Xna.Framework.Graphics.dll
C:\Users\owner\Documents\Visual Studio 2015\Projects\github\Stardew_Valley_Mods\Stardew_Valley_Mods\Museum_Rearrange\Museum_Rearranger\Museum_Rearranger\bin\Debug\Stardew Valley.exe
C:\Users\owner\Documents\Visual Studio 2015\Projects\github\Stardew_Valley_Mods\Stardew_Valley_Mods\Museum_Rearrange\Museum_Rearranger\Museum_Rearranger\bin\Debug\StardewModdingAPI.exe
C:\Users\owner\Documents\Visual Studio 2015\Projects\github\Stardew_Valley_Mods\Stardew_Valley_Mods\Museum_Rearrange\Museum_Rearranger\Museum_Rearranger\bin\Debug\xTile.dll
C:\Users\owner\Documents\Visual Studio 2015\Projects\github\Stardew_Valley_Mods\Stardew_Valley_Mods\Museum_Rearrange\Museum_Rearranger\Museum_Rearranger\bin\Debug\Microsoft.Xna.Framework.GamerServices.dll
C:\Users\owner\Documents\Visual Studio 2015\Projects\github\Stardew_Valley_Mods\Stardew_Valley_Mods\Museum_Rearrange\Museum_Rearranger\Museum_Rearranger\bin\Debug\Microsoft.Xna.Framework.Input.Touch.dll
C:\Users\owner\Documents\Visual Studio 2015\Projects\github\Stardew_Valley_Mods\Stardew_Valley_Mods\Museum_Rearrange\Museum_Rearranger\Museum_Rearranger\bin\Debug\Lidgren.Network.dll
C:\Users\owner\Documents\Visual Studio 2015\Projects\github\Stardew_Valley_Mods\Stardew_Valley_Mods\Museum_Rearrange\Museum_Rearranger\Museum_Rearranger\bin\Debug\Microsoft.Xna.Framework.Xact.dll
C:\Users\owner\Documents\Visual Studio 2015\Projects\github\Stardew_Valley_Mods\Stardew_Valley_Mods\Museum_Rearrange\Museum_Rearranger\Museum_Rearranger\bin\Debug\Steamworks.NET.dll
C:\Users\owner\Documents\Visual Studio 2015\Projects\github\Stardew_Valley_Mods\Stardew_Valley_Mods\Museum_Rearrange\Museum_Rearranger\Museum_Rearranger\bin\Debug\Newtonsoft.Json.dll
C:\Users\owner\Documents\Visual Studio 2015\Projects\github\Stardew_Valley_Mods\Stardew_Valley_Mods\Museum_Rearrange\Museum_Rearranger\Museum_Rearranger\bin\Debug\Microsoft.Xna.Framework.xml
C:\Users\owner\Documents\Visual Studio 2015\Projects\github\Stardew_Valley_Mods\Stardew_Valley_Mods\Museum_Rearrange\Museum_Rearranger\Museum_Rearranger\bin\Debug\Microsoft.Xna.Framework.Game.xml
C:\Users\owner\Documents\Visual Studio 2015\Projects\github\Stardew_Valley_Mods\Stardew_Valley_Mods\Museum_Rearrange\Museum_Rearranger\Museum_Rearranger\bin\Debug\Microsoft.Xna.Framework.Graphics.xml
C:\Users\owner\Documents\Visual Studio 2015\Projects\github\Stardew_Valley_Mods\Stardew_Valley_Mods\Museum_Rearrange\Museum_Rearranger\Museum_Rearranger\bin\Debug\StardewModdingAPI.pdb
C:\Users\owner\Documents\Visual Studio 2015\Projects\github\Stardew_Valley_Mods\Stardew_Valley_Mods\Museum_Rearrange\Museum_Rearranger\Museum_Rearranger\bin\Debug\Microsoft.Xna.Framework.GamerServices.xml
C:\Users\owner\Documents\Visual Studio 2015\Projects\github\Stardew_Valley_Mods\Stardew_Valley_Mods\Museum_Rearrange\Museum_Rearranger\Museum_Rearranger\bin\Debug\Microsoft.Xna.Framework.Input.Touch.xml
C:\Users\owner\Documents\Visual Studio 2015\Projects\github\Stardew_Valley_Mods\Stardew_Valley_Mods\Museum_Rearrange\Museum_Rearranger\Museum_Rearranger\bin\Debug\Microsoft.Xna.Framework.Xact.xml
C:\Users\owner\Documents\Visual Studio 2015\Projects\github\Stardew_Valley_Mods\Stardew_Valley_Mods\Museum_Rearrange\Museum_Rearranger\Museum_Rearranger\bin\Debug\Newtonsoft.Json.xml
C:\Users\owner\Documents\Visual Studio 2015\Projects\github\Stardew_Valley_Mods\Stardew_Valley_Mods\Museum_Rearrange\Museum_Rearranger\Museum_Rearranger\obj\Debug\Museum_Rearranger.dll
C:\Users\owner\Documents\Visual Studio 2015\Projects\github\Stardew_Valley_Mods\Stardew_Valley_Mods\Museum_Rearrange\Museum_Rearranger\Museum_Rearranger\obj\Debug\Museum_Rearranger.pdb

View File

@ -1,9 +1,18 @@
Museum Rearranger 1.0.2
Museum Rearranger 1.1.0
For SDV 1.07 and SMAPI 0.40 (Should work as long as the api isn't dramatically changed)
Initial Release 7/12/16 1:52 AM
Updated: 10/11/16 11:51 PM
Posted on 1:52 AM PST on 7/12/16
Compatability:
SDV 1.1
Windows
Updates:
1.1.0
-Updated to SDV 1.1
-Added in a new key config for toggling if the inventory displays while rearranging the museum. Press T by default to toggle showing the menu.
1.0.2
-Massively rewrote some code because it was super necessary.
-Fixed some typoes with the config files.