Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
a992f044cd | ||
|
|
b6d376a2f9 | ||
|
|
cb75e2bca7 |
No files matched your search
@@ -0,0 +1,138 @@
|
||||
# Depositing Items
|
||||
|
||||
RS-Warehouse provides several ways to deposit items into the Warehouse.
|
||||
|
||||
Items can be deposited using:
|
||||
|
||||
1. **Transaction Menu**
|
||||
2. **Auto-Deposit**
|
||||
3. **Warehouse Chest — Automatic Processing**
|
||||
4. **Warehouse Chest — On Chest Close**
|
||||
5. **Command — `/shop deposit`**
|
||||
|
||||
Each method ultimately adds the deposited items to the shared Warehouse inventory.
|
||||
|
||||
---
|
||||
|
||||
## 1. Deposit Through the Transaction Menu
|
||||
|
||||
Items can be deposited directly through the item's **Transaction Menu**.
|
||||
|
||||
Open the Warehouse and select the category containing the item you want to deposit.
|
||||
|
||||
Select the item to open its Transaction Menu.
|
||||
|
||||
From the Transaction Menu, click the wool to set the amount you want to deposit. Deposit amount will be displayed in the
|
||||
title. Green wool adds to the deposit amount, Red wool will subtract from it.
|
||||
|
||||
Once you have the desired amount set, click the item in the center of the wool.
|
||||
|
||||
📷 Screenshot
|
||||
|
||||
|
||||
|
||||
> **NOTE:** Variant items such as damaged, enchanted, and partially filled items have their own transaction menus and are handled separately from the primary item.
|
||||
|
||||
---
|
||||
|
||||
## 2. Auto-Deposit
|
||||
|
||||
**Auto-Deposit** allows you to automatically deposit items when you pick them up.
|
||||
|
||||
Each player has their own Auto-Deposit filter.
|
||||
|
||||
When Auto-Deposit is enabled and you pick up an item that matches one of the items in your filter, RS-Warehouse sends the item directly to the Warehouse instead of placing it into your inventory.
|
||||
|
||||
📷 Screenshot
|
||||
|
||||
### Adding Items to the Auto-Deposit Filter
|
||||
|
||||
Open the **Auto-Deposit** menu from the Warehouse.
|
||||
|
||||
Place an item into the Auto-Deposit menu to add it to your personal filter.
|
||||
|
||||
The item placed into the filter is used as a copy of the item you want to automatically deposit.
|
||||
|
||||
📷 Screenshot
|
||||
|
||||
> **NOTE:** Adding an item to the Auto-Deposit filter does not remove that item from your inventory.
|
||||
|
||||
For more information, see **[Auto-Deposit](...)**.
|
||||
|
||||
---
|
||||
|
||||
## 3. Warehouse Chest — Automatic Processing
|
||||
|
||||
A **Warehouse Chest** can automatically process its contents at regular intervals.
|
||||
|
||||
The processing interval is controlled by the server's `config.yml`.
|
||||
|
||||
The configured interval determines how often RS-Warehouse checks the Warehouse Chest for items to deposit.
|
||||
|
||||
📷 Screenshot
|
||||
|
||||
> **NOTE:** The automatic processing interval is controlled by the server configuration and may be different on your server.
|
||||
|
||||
---
|
||||
|
||||
## 4. Warehouse Chest — On Chest Close
|
||||
|
||||
A **Warehouse Chest** can also process its contents when the chest is closed.
|
||||
|
||||
When this option is enabled, RS-Warehouse processes the items in the Warehouse Chest when the player closes the chest.
|
||||
|
||||
📷 Screenshot
|
||||
|
||||
This allows items to be deposited without waiting for the next automatic processing interval.
|
||||
|
||||
> **NOTE:** Chest-close processing and automatic timed processing are separate options controlled by the server configuration.
|
||||
|
||||
---
|
||||
|
||||
## 5. Command — `/shop deposit`
|
||||
|
||||
Items can also be deposited using the **`/shop deposit`** command.
|
||||
|
||||
This command opens the **Warehouse Deposit** inventory.
|
||||
|
||||
📷 Screenshot
|
||||
|
||||
Place the items you want to deposit into the inventory.
|
||||
|
||||
When the inventory is closed, RS-Warehouse processes the items and adds them to the Warehouse.
|
||||
|
||||
📷 Screenshot
|
||||
|
||||
> **NOTE:** The `/shop deposit` command provides a convenient way to access the Warehouse Deposit inventory without navigating through the Warehouse menus.
|
||||
|
||||
---
|
||||
|
||||
## New Items
|
||||
|
||||
Items that have not yet been assigned to a category can still be deposited.
|
||||
|
||||
Depending on the server configuration, newly discovered items may be placed into the **Unassigned** category.
|
||||
|
||||
For more information, see **[The Unassigned Category](...)**.
|
||||
|
||||
---
|
||||
|
||||
## Which Method Should I Use?
|
||||
|
||||
Each deposit method is useful in different situations.
|
||||
|
||||
| Method | Best Used For |
|
||||
|---|---|
|
||||
| **Transaction Menu** | Depositing a specific item directly |
|
||||
| **Auto-Deposit** | Automatically depositing items when picked up |
|
||||
| **Warehouse Chest — Automatic Processing** | Farms and storage systems that continuously feed a Warehouse Chest |
|
||||
| **Warehouse Chest — On Chest Close** | Manually placing items into a Warehouse Chest |
|
||||
| **`/shop deposit`** | Quickly depositing items through a dedicated inventory |
|
||||
|
||||
---
|
||||
|
||||
## Finished
|
||||
|
||||
RS-Warehouse provides several ways to get items into the Warehouse.
|
||||
|
||||
Choose the method that best fits how you collect and store items on your server.
|
||||
@@ -0,0 +1,103 @@
|
||||
# Withdrawing Items
|
||||
|
||||
Items stored in the Warehouse can be withdrawn directly into your inventory.
|
||||
|
||||
The normal withdrawal process is:
|
||||
|
||||
1. Open the Warehouse.
|
||||
2. Select a category.
|
||||
3. Select the item you want.
|
||||
4. Open the item's Transaction Menu.
|
||||
5. Select **Withdraw**.
|
||||
6. Choose the amount.
|
||||
7. Confirm the withdrawal by picking up the item in the center.
|
||||
|
||||
📷 Screenshot
|
||||
|
||||
---
|
||||
|
||||
## Selecting an Item
|
||||
|
||||
Open the Warehouse and select the category containing the item you want to withdraw.
|
||||
|
||||
📷 Screenshot
|
||||
|
||||
Select the item to open its **Transaction Menu**.
|
||||
|
||||
📷 Screenshot
|
||||
|
||||
The Transaction Menu displays the item currently selected along with its available Warehouse quantity.
|
||||
|
||||
---
|
||||
|
||||
## Choosing the Withdrawal Amount
|
||||
|
||||
Select **Withdraw** to choose how many items you want to remove from the Warehouse.
|
||||
|
||||
📷 Screenshot
|
||||
|
||||
The amount selection menu allows you to adjust the amount before completing the withdrawal.
|
||||
|
||||
📷 Screenshot
|
||||
|
||||
> **NOTE:** The amount available for withdrawal is limited by the quantity stored in the Warehouse and the amount that can be placed into your inventory.
|
||||
|
||||
---
|
||||
|
||||
## Completing the Withdrawal
|
||||
|
||||
Confirm the withdrawal to receive the selected items.
|
||||
|
||||
The items are removed from the Warehouse and added to your inventory.
|
||||
|
||||
📷 Screenshot
|
||||
|
||||
The Warehouse quantity is updated after a successful withdrawal.
|
||||
|
||||
---
|
||||
|
||||
## Withdrawing Variants
|
||||
|
||||
Some items may have variants stored separately from the primary item.
|
||||
|
||||
RS-Warehouse supports transaction menus for:
|
||||
|
||||
- **Damaged Variants**
|
||||
- **Enchanted Variants**
|
||||
- **Partially Filled Variants**
|
||||
|
||||
These variants can be selected and withdrawn independently.
|
||||
|
||||
📷 Screenshot
|
||||
|
||||
> **NOTE:** A variant represents a specific version of an item and is handled separately from the primary item.
|
||||
|
||||
---
|
||||
|
||||
## Inventory Space
|
||||
|
||||
Your available inventory space affects how many items can be withdrawn at one time.
|
||||
|
||||
If your inventory cannot hold the requested amount, the available withdrawal amount is limited accordingly.
|
||||
|
||||
> **IMPORTANT:** Make sure you have enough inventory space before withdrawing large quantities.
|
||||
|
||||
---
|
||||
|
||||
## Auto-Deposit and Withdrawals
|
||||
|
||||
If an item is configured for **Auto-Deposit**, RS-Warehouse may prevent it from being withdrawn while that Auto-Deposit filter is active.
|
||||
|
||||
If this occurs, remove the item from your Auto-Deposit filter before attempting to withdraw it.
|
||||
|
||||
📷 Screenshot
|
||||
|
||||
For more information, see **[Auto-Deposit](...)**.
|
||||
|
||||
---
|
||||
|
||||
## Finished
|
||||
|
||||
You can withdraw Warehouse items whenever you need them.
|
||||
|
||||
Use the category and item menus to locate the item, select the desired amount, and complete the withdrawal.
|
||||
@@ -1,47 +0,0 @@
|
||||
# Depositing Items
|
||||
|
||||
Players can deposit items directly into the warehouse.
|
||||
|
||||
---
|
||||
|
||||
## Open the Warehouse
|
||||
|
||||
Open the Warehouse Chest.
|
||||
|
||||
📷 Screenshot
|
||||
|
||||
---
|
||||
|
||||
## Select Deposit
|
||||
|
||||
Choose Deposit.
|
||||
|
||||
📷 Screenshot
|
||||
|
||||
---
|
||||
|
||||
## Select Items
|
||||
|
||||
Choose the items to deposit.
|
||||
|
||||
📷 Screenshot
|
||||
|
||||
---
|
||||
|
||||
## Confirmation
|
||||
|
||||
Items are transferred into warehouse storage.
|
||||
|
||||
📷 Screenshot
|
||||
|
||||
---
|
||||
|
||||
## Finished
|
||||
|
||||
Your items are now available to all authorized players.
|
||||
|
||||
---
|
||||
|
||||
⬅️ Previous: [Subcategories](Subcategories.md)
|
||||
|
||||
➡️ Next: [Withdrawing Items](Withdrawing-Items.md)
|
||||
@@ -8,6 +8,6 @@ This page documents every permission node used by RS-Warehouse.
|
||||
|
||||
---
|
||||
|
||||
⬅️ Previous: [Withdrawing Items](Withdrawing-Items.md)
|
||||
⬅️ Previous: [Withdrawing Items](../02)%20Depositing%20And%20Withdrawing/Withdrawing-Items.md)
|
||||
|
||||
➡️ Next: [Commands](Commands.md)
|
||||
@@ -73,4 +73,4 @@ The subcategory is now available.
|
||||
|
||||
⬅️ Previous: [Categories](Categories.md)
|
||||
|
||||
➡️ Next: [Depositing Items](Depositing-Items.md)
|
||||
➡️ Next: [Depositing Items](../02)%20Depositing%20And%20Withdrawing/Depositing-Items.md)
|
||||
Whitespace-only changes.
+2
-2
@@ -9,8 +9,8 @@
|
||||
|
||||
- [Auto-Deposit](50%29%20Side%20Pages/Auto-Deposit.md)
|
||||
- [UnCategorized Category](50%29%20Side%20Pages/UnCategorized%20Category.md)
|
||||
- [Depositing Items]
|
||||
- [Withdrawing Items]
|
||||
- [Depositing Items](02%29%20Depositing%20And%20Withdrawing/B%29%20Depositing%20items.md)
|
||||
- [Withdrawing Items](02%29%20Depositing%20And%20Withdrawing/B%29%20Withdrawing%20items.md)
|
||||
|
||||
### Organization
|
||||
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
<groupId>com.rsscripting</groupId>
|
||||
<artifactId>RS-Warehouse</artifactId>
|
||||
<name>RS-Warehouse</name>
|
||||
<version>1.0.0</version>
|
||||
<version>1.3.0</version>
|
||||
|
||||
<properties>
|
||||
<maven.compiler.source>21</maven.compiler.source>
|
||||
|
||||
@@ -84,12 +84,6 @@ public class ItemsMenu {
|
||||
)
|
||||
);
|
||||
|
||||
List<WarehouseItem> items =
|
||||
ItemsPagination.getItemsForDisplay(
|
||||
categoryId,
|
||||
page
|
||||
);
|
||||
|
||||
int maxPage =
|
||||
ItemsPagination.getMaximumPage(
|
||||
categoryId
|
||||
@@ -108,6 +102,12 @@ public class ItemsMenu {
|
||||
page
|
||||
);
|
||||
|
||||
List<WarehouseItem> items =
|
||||
ItemsPagination.getItemsForDisplay(
|
||||
categoryId,
|
||||
page
|
||||
);
|
||||
|
||||
boolean hasPrevious =
|
||||
page > 0;
|
||||
|
||||
|
||||
@@ -19,6 +19,7 @@ public class ItemsPagination {
|
||||
|
||||
int highestAssignedPage = -1;
|
||||
int unassigned = 0;
|
||||
int finalAssignedHighestSlot = 8;
|
||||
|
||||
for (WarehouseItem item : items) {
|
||||
|
||||
@@ -46,13 +47,24 @@ public class ItemsPagination {
|
||||
|
||||
}
|
||||
|
||||
int consumed = 0;
|
||||
/*
|
||||
* No assigned items means this is a normal unassigned-only list.
|
||||
*/
|
||||
if (highestAssignedPage == -1) {
|
||||
|
||||
for (int assignedPage = 0;
|
||||
assignedPage <= highestAssignedPage;
|
||||
assignedPage++) {
|
||||
if (unassigned == 0) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
int highestSlot = 8;
|
||||
return (unassigned - 1) / 45;
|
||||
|
||||
}
|
||||
|
||||
/*
|
||||
* Only the final assigned page can contain unassigned items.
|
||||
*/
|
||||
int finalAssignedPage =
|
||||
highestAssignedPage + 1;
|
||||
|
||||
for (WarehouseItem item : items) {
|
||||
|
||||
@@ -61,12 +73,12 @@ public class ItemsPagination {
|
||||
&&
|
||||
item.slot() != null
|
||||
&&
|
||||
item.page() == assignedPage + 1
|
||||
item.page() == finalAssignedPage
|
||||
) {
|
||||
|
||||
highestSlot =
|
||||
finalAssignedHighestSlot =
|
||||
Math.max(
|
||||
highestSlot,
|
||||
finalAssignedHighestSlot,
|
||||
item.slot()
|
||||
);
|
||||
|
||||
@@ -74,29 +86,22 @@ public class ItemsPagination {
|
||||
|
||||
}
|
||||
|
||||
consumed +=
|
||||
int availableOnFinalAssignedPage =
|
||||
Math.max(
|
||||
0,
|
||||
53 - highestSlot
|
||||
53 - finalAssignedHighestSlot
|
||||
);
|
||||
|
||||
}
|
||||
|
||||
consumed =
|
||||
Math.min(
|
||||
consumed,
|
||||
unassigned
|
||||
int remainingUnassigned =
|
||||
Math.max(
|
||||
0,
|
||||
unassigned - availableOnFinalAssignedPage
|
||||
);
|
||||
|
||||
unassigned -= consumed;
|
||||
|
||||
int overflowPages =
|
||||
(unassigned + 44) / 45;
|
||||
(remainingUnassigned + 44) / 45;
|
||||
|
||||
return Math.max(
|
||||
0,
|
||||
highestAssignedPage + overflowPages
|
||||
);
|
||||
return highestAssignedPage + overflowPages;
|
||||
|
||||
}
|
||||
|
||||
@@ -149,7 +154,37 @@ public class ItemsPagination {
|
||||
}
|
||||
|
||||
/*
|
||||
* Assigned pages
|
||||
* Categories with no assigned items are a simple unassigned-only
|
||||
* list. They begin on page 1 and use all 45 item slots.
|
||||
*/
|
||||
if (highestAssignedPage == -1) {
|
||||
|
||||
int start =
|
||||
page * 45;
|
||||
|
||||
if (start >= unassigned.size()) {
|
||||
return new ArrayList<>();
|
||||
}
|
||||
|
||||
int end =
|
||||
Math.min(
|
||||
start + 45,
|
||||
unassigned.size()
|
||||
);
|
||||
|
||||
return new ArrayList<>(
|
||||
unassigned.subList(
|
||||
start,
|
||||
end
|
||||
)
|
||||
);
|
||||
|
||||
}
|
||||
|
||||
/*
|
||||
* Assigned pages. Only the final assigned page receives
|
||||
* unassigned items, and they begin immediately after the
|
||||
* highest assigned slot on that page.
|
||||
*/
|
||||
if (page <= highestAssignedPage) {
|
||||
|
||||
@@ -174,39 +209,7 @@ public class ItemsPagination {
|
||||
|
||||
}
|
||||
|
||||
/*
|
||||
* Figure out how many unassigned items have
|
||||
* already been consumed by previous assigned pages.
|
||||
*/
|
||||
int consumed = 0;
|
||||
|
||||
for (int previousPage = 0;
|
||||
previousPage < page;
|
||||
previousPage++) {
|
||||
|
||||
int previousHighestSlot = 8;
|
||||
|
||||
for (WarehouseItem item : assigned) {
|
||||
|
||||
if (item.page() == (previousPage + 1)) {
|
||||
|
||||
previousHighestSlot =
|
||||
Math.max(
|
||||
previousHighestSlot,
|
||||
item.slot()
|
||||
);
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
consumed +=
|
||||
Math.max(
|
||||
0,
|
||||
53 - previousHighestSlot
|
||||
);
|
||||
|
||||
}
|
||||
if (page == highestAssignedPage) {
|
||||
|
||||
int remainingSlots =
|
||||
Math.max(
|
||||
@@ -214,20 +217,18 @@ public class ItemsPagination {
|
||||
53 - highestSlot
|
||||
);
|
||||
|
||||
while (
|
||||
remainingSlots > 0
|
||||
&&
|
||||
consumed < unassigned.size()
|
||||
) {
|
||||
|
||||
results.add(
|
||||
unassigned.get(
|
||||
consumed
|
||||
)
|
||||
int end =
|
||||
Math.min(
|
||||
remainingSlots,
|
||||
unassigned.size()
|
||||
);
|
||||
|
||||
consumed++;
|
||||
remainingSlots--;
|
||||
results.addAll(
|
||||
unassigned.subList(
|
||||
0,
|
||||
end
|
||||
)
|
||||
);
|
||||
|
||||
}
|
||||
|
||||
@@ -235,21 +236,22 @@ public class ItemsPagination {
|
||||
|
||||
}
|
||||
|
||||
int consumed = 0;
|
||||
|
||||
for (int assignedPage = 0;
|
||||
assignedPage <= highestAssignedPage;
|
||||
assignedPage++) {
|
||||
|
||||
int highestSlot = 8;
|
||||
/*
|
||||
* Pages after the final assigned page contain only unassigned
|
||||
* items. The first overflow page starts after the unassigned
|
||||
* items that fit on the final assigned page.
|
||||
*/
|
||||
int finalAssignedHighestSlot = 8;
|
||||
int finalAssignedPage =
|
||||
highestAssignedPage + 1;
|
||||
|
||||
for (WarehouseItem item : assigned) {
|
||||
|
||||
if (item.page() == assignedPage + 1) {
|
||||
if (item.page() == finalAssignedPage) {
|
||||
|
||||
highestSlot =
|
||||
finalAssignedHighestSlot =
|
||||
Math.max(
|
||||
highestSlot,
|
||||
finalAssignedHighestSlot,
|
||||
item.slot()
|
||||
);
|
||||
|
||||
@@ -257,24 +259,18 @@ public class ItemsPagination {
|
||||
|
||||
}
|
||||
|
||||
consumed +=
|
||||
int consumed =
|
||||
Math.max(
|
||||
0,
|
||||
53 - highestSlot
|
||||
53 - finalAssignedHighestSlot
|
||||
);
|
||||
|
||||
}
|
||||
|
||||
consumed =
|
||||
Math.min(
|
||||
consumed,
|
||||
unassigned.size()
|
||||
);
|
||||
|
||||
/*
|
||||
* Overflow pages
|
||||
*/
|
||||
|
||||
int overflowPage =
|
||||
page
|
||||
- highestAssignedPage
|
||||
|
||||
+2
-2
@@ -310,8 +310,8 @@ public class EnchantedVariantsTransactionMenuListener
|
||||
|
||||
EnchantedVariantsTransactionMenu.open(
|
||||
player,
|
||||
warehouseItemId,
|
||||
0
|
||||
enchantedVariantId,
|
||||
amount
|
||||
);
|
||||
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user