Skip to content

Commit

Permalink
etc
Browse files Browse the repository at this point in the history
  • Loading branch information
aedenthorn committed Feb 14, 2023
1 parent 1668b56 commit c741a04
Show file tree
Hide file tree
Showing 6 changed files with 15 additions and 7 deletions.
2 changes: 1 addition & 1 deletion MoveIt/Methods.cs
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@ public static void PlaceObject()
}
else if (movingObject is TerrainFeature)
{
if (movingObject is LargeTerrainFeature)
if (movingObject is LargeTerrainFeature && Game1.currentLocation.largeTerrainFeatures.Contains(movingObject as LargeTerrainFeature))
{
var index = Game1.currentLocation.largeTerrainFeatures.IndexOf(movingObject as LargeTerrainFeature);
if (index >= 0)
Expand Down
2 changes: 1 addition & 1 deletion MoveIt/manifest.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"Name": "MoveIt",
"Author": "aedenthorn",
"Version": "0.3.1",
"Version": "0.3.2",
"Description": "MoveIt.",
"UniqueID": "aedenthorn.MoveIt",
"EntryDll": "MoveIt.dll",
Expand Down
7 changes: 4 additions & 3 deletions StackedItemIcons/CodePatches.cs
Original file line number Diff line number Diff line change
Expand Up @@ -19,18 +19,19 @@ public static void Prefix(Object __instance, SpriteBatch spriteBatch, ref Vector
{
if (!Config.EnableMod || __instance.Stack < Config.MinForDoubleStack || __instance.bigCraftable.Value)
return;

//jiggle = (float)Math.Sin(Game1.ticks / 10f) / 10f;
float offset = Config.Spacing / 4f;
if(__instance.Stack < Config.MinForTripleStack)
{
spriteBatch.Draw(Game1.objectSpriteSheet, location + new Vector2(-offset, -offset) * scaleSize + new Vector2((float)((int)(32f * scaleSize)), (float)((int)(32f * scaleSize))), new Microsoft.Xna.Framework.Rectangle?(Game1.getSourceRectForStandardTileSheet(Game1.objectSpriteSheet, __instance.ParentSheetIndex, 16, 16)), color * transparency, 0, new Vector2(8f, 8f) * scaleSize, 4f * scaleSize, SpriteEffects.None, layerDepth);
spriteBatch.Draw(Game1.objectSpriteSheet, location + new Vector2(-offset, -offset) * scaleSize + new Vector2((float)((int)(32f * scaleSize)), (float)((int)(32f * scaleSize))), new Microsoft.Xna.Framework.Rectangle?(Game1.getSourceRectForStandardTileSheet(Game1.objectSpriteSheet, __instance.ParentSheetIndex, 16, 16)), color * transparency, 0, new Vector2(8f, 8f) * scaleSize, 4f * scaleSize, SpriteEffects.None, 0);

location += new Vector2(offset, offset) * scaleSize;
}
else
{
spriteBatch.Draw(Game1.objectSpriteSheet, location + new Vector2(-offset, -offset) * 2 * scaleSize + new Vector2((float)((int)(32f * scaleSize)), (float)((int)(32f * scaleSize))), new Microsoft.Xna.Framework.Rectangle?(Game1.getSourceRectForStandardTileSheet(Game1.objectSpriteSheet, __instance.ParentSheetIndex, 16, 16)), color * transparency, 0, new Vector2(8f, 8f) * scaleSize, 4f * scaleSize, SpriteEffects.None, layerDepth);
spriteBatch.Draw(Game1.objectSpriteSheet, location + new Vector2((float)((int)(32f * scaleSize)), (float)((int)(32f * scaleSize))), new Microsoft.Xna.Framework.Rectangle?(Game1.getSourceRectForStandardTileSheet(Game1.objectSpriteSheet, __instance.ParentSheetIndex, 16, 16)), color * transparency, 0, new Vector2(8f, 8f) * scaleSize, 4f * scaleSize, SpriteEffects.None, layerDepth);
spriteBatch.Draw(Game1.objectSpriteSheet, location + new Vector2(-offset, -offset) * 2 * scaleSize + new Vector2((float)((int)(32f * scaleSize)), (float)((int)(32f * scaleSize))), new Microsoft.Xna.Framework.Rectangle?(Game1.getSourceRectForStandardTileSheet(Game1.objectSpriteSheet, __instance.ParentSheetIndex, 16, 16)), color * transparency, 0, new Vector2(8f, 8f) * scaleSize, 4f * scaleSize, SpriteEffects.None, 0);
spriteBatch.Draw(Game1.objectSpriteSheet, location + new Vector2((float)((int)(32f * scaleSize)), (float)((int)(32f * scaleSize))), new Microsoft.Xna.Framework.Rectangle?(Game1.getSourceRectForStandardTileSheet(Game1.objectSpriteSheet, __instance.ParentSheetIndex, 16, 16)), color * transparency, 0, new Vector2(8f, 8f) * scaleSize, 4f * scaleSize, SpriteEffects.None, 0);
location += new Vector2(offset, offset) * 2 * scaleSize;

}
Expand Down
7 changes: 7 additions & 0 deletions StackedItemIcons/ModEntry.cs
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,13 @@ private void GameLoop_GameLaunched(object sender, StardewModdingAPI.Events.GameL
getValue: () => Config.MinForTripleStack,
setValue: value => Config.MinForTripleStack = value
);

configMenu.AddNumberOption(
mod: ModManifest,
name: () => "Spacing",
getValue: () => Config.Spacing,
setValue: value => Config.Spacing = value
);


}
Expand Down
4 changes: 2 additions & 2 deletions StackedItemIcons/manifest.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"Name": "Stacked Item Icons",
"Author": "aedenthorn",
"Version": "0.1.0",
"Version": "0.1.1",
"Description": "Stacked Item Icons.",
"UniqueID": "aedenthorn.StackedItemIcons",
"EntryDll": "StackedItemIcons.dll",
Expand All @@ -12,7 +12,7 @@
"Directory": "_releases",
"ModFolder": "StackedItemIcons"
},
"UpdateKeys": [ "Nexus:" ],
"UpdateKeys": [ "Nexus:15468" ],
"Dependencies": [
{
"UniqueID": "Platonymous.ModUpdater",
Expand Down
Binary file added _releases/MoveIt 0.3.2.zip
Binary file not shown.

0 comments on commit c741a04

Please sign in to comment.