-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
0.4, collect chest items, magic storage integration
- Loading branch information
Showing
8 changed files
with
143 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
using System; | ||
using MagicStorage; | ||
using MagicStorage.Components; | ||
using Terraria; | ||
using Terraria.DataStructures; | ||
using Terraria.ModLoader; | ||
|
||
namespace ItemChecklist | ||
{ | ||
// autopause? | ||
static class MagicStorageIntegration | ||
{ | ||
static Mod MagicStorage; | ||
public static bool Enabled => MagicStorage != null; | ||
static Point16 previousStorageAccess = new Point16(-1, -1); | ||
static StorageAccess tile; | ||
//static StorageAccess tile = null; //throws TypeInitializationException | ||
|
||
public static void Load() | ||
{ | ||
MagicStorage = ModLoader.GetMod("MagicStorage"); | ||
} | ||
|
||
public static void Unload() | ||
{ | ||
MagicStorage = null; | ||
} | ||
|
||
internal static void FindItemsInStorage() | ||
{ | ||
var storagePlayer = Main.LocalPlayer.GetModPlayer<StoragePlayer>(); | ||
Point16 storageAccess = storagePlayer.ViewingStorage(); | ||
if (storageAccess == previousStorageAccess) | ||
return; | ||
previousStorageAccess = storageAccess; | ||
if (!Main.playerInventory || storageAccess.X < 0 || storageAccess.Y < 0) | ||
return; | ||
ModTile modTile = TileLoader.GetTile(Main.tile[storageAccess.X, storageAccess.Y].type); | ||
if (modTile == null || !(modTile is StorageAccess)) | ||
{ | ||
return; | ||
} | ||
TEStorageHeart heart = ((StorageAccess)modTile).GetHeart(storageAccess.X, storageAccess.Y); | ||
if (heart == null) | ||
{ | ||
return; | ||
} | ||
var items = heart.GetStoredItems(); | ||
// Will 1000 items crash the chat? | ||
foreach (var item in items) | ||
{ | ||
ItemChecklist.instance.GetGlobalItem<ItemChecklistGlobalItem>().ItemReceived(item); | ||
} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
author = jopojelly | ||
version = 0.2.2.4 | ||
version = 0.4 | ||
displayName = Item Checklist | ||
homepage = https://forums.terraria.org/index.php?threads/item-checklist-in-game-100-item-collection-checklist.52786/ | ||
hideCode = false | ||
|
@@ -9,3 +9,4 @@ languageVersion = 6 | |
includePDB = true | ||
notworkingside = Client | ||
buildIgnore = .vs\*, Properties\*, *.csproj, *.user, obj\*, bin\*, *.config, lib\*, .gitignore, .git\* | ||
weakReferences = [email protected] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,13 @@ | ||
Item Checklist lets you view a checklist for picking up or crafting 100% of the items in the game | ||
|
||
Toggle the checklist with the hotkey assigned to it in the settings. | ||
|
||
The checklist has several buttons at the top. | ||
|
||
Cycle Found Filter: Filters the list to show All, only Found, or only missing items. | ||
Cycle Sort Method: Sorts the list by ID, Value, Alphabetical, Rarity, or the chest auto-sorting algorithm. | ||
Cycle Mod Filter: Lets you filter by all items, only vanilla items, or individual mods. | ||
Toggle Messages: Toggles the announcement chat text that happens when you pick up a new item. | ||
Toggle Collect Chest Items: You can toggle the behavior of counting items seen in chests as "collected". | ||
|
||
If you use Magic Storage and have the Toggle Collect Chest Items enabled, you will also collect all items in storage if you access it. |
Binary file not shown.