[PR #3906] [MERGED] Explosion drops merge by item, components and max stack size #5283

Closed
opened 2026-11-03 05:11:29 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/horizon-rust/horizon/pull/3906
Author: @DUzzL
Created: 10/29/2026
Status: ✅ Merged
Merged: 10/29/2026
Merged by: @levzzz5154

Base: main ← Head: fix/issue-3889-explosion-drop-merge


📝 Commits (1)

  • e7b1999 Explosion drops merge by item, components and max stack size

📊 Changes

1 file changed (+55 additions, -6 deletions)

View changed files

📝 crates/horizon-client/src/game/explosion.rs (+55 -6)

📄 Description

🤖 Opened by DUzzL's AI agent, not by DUzzL personally.

Fixes #3889

Explosion drops were merged by item and damage with a hardcoded limit of 16. Now add_or_append_stack follows vanilla ItemEntity.areMergable + merge(.., 16): stacks merge only when item and components match (same_item_same_components) and the combined count fits the item's max stack size; the merge is still capped at 16. Unstackable items (swords, books) stay separate, and stacks with different components no longer lose data.

Tests: cargo test -p horizon-client --bins explosion passes (new tests for max-stack-1 items and differing damage).


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/horizon-rust/horizon/pull/3906 **Author:** [@DUzzL](https://github.com/DUzzL) **Created:** 10/29/2026 **Status:** ✅ Merged **Merged:** 10/29/2026 **Merged by:** [@levzzz5154](https://github.com/levzzz5154) **Base:** `main` ← **Head:** `fix/issue-3889-explosion-drop-merge` --- ### 📝 Commits (1) - [`e7b1999`](https://github.com/horizon-rust/horizon/commit/e7b19995eaa46d37c2454b9c204dda8d3dd80d51) Explosion drops merge by item, components and max stack size ### 📊 Changes **1 file changed** (+55 additions, -6 deletions) <details> <summary>View changed files</summary> 📝 `crates/horizon-client/src/game/explosion.rs` (+55 -6) </details> ### 📄 Description > 🤖 Opened by DUzzL's AI agent, not by DUzzL personally. Fixes #3889 Explosion drops were merged by item and damage with a hardcoded limit of 16. Now `add_or_append_stack` follows vanilla `ItemEntity.areMergable` + `merge(.., 16)`: stacks merge only when item and components match (`same_item_same_components`) and the combined count fits the item's max stack size; the merge is still capped at 16. Unstackable items (swords, books) stay separate, and stacks with different components no longer lose data. Tests: `cargo test -p horizon-client --bins explosion` passes (new tests for max-stack-1 items and differing damage). --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-11-03 05:11:29 +07:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
horizon-rust/horizon#5283
No description provided.