Skip to content

Level items: items laid in an ItemSlot are hidden by the switch and removeLevelItems - #334

Closed
Kharote wants to merge 1 commit into
mainfrom
fix/itemslot-level-items
Closed

Kharote wants to merge 1 commit into
mainfrom
fix/itemslot-level-items

Conversation

@Kharote

@Kharote Kharote commented Nov 24, 2026 •

Copy link
Copy Markdown
Collaborator

What this changes

With the level's items off (World.setLevelItemsEnabled(false)), the arrows and the axe the level lays in a scene's ItemSlots (the bodies by Nebákov, StashCorpse3) stayed visible to everyone, and World.removeLevelItems({ position, radius }) over them hid nothing.

The sweep leaves alone every item that hangs on another entity, so that a sword in a hand or on the inventory's figure is never hidden. An item in an ItemSlot hangs on the slot entity and was left alone the same way. An ItemSlot parent no longer counts: those items are hidden by the switch and by removed places as loose ones are.

How it was tested

Kit, one game on trosecko at the Nebákov scene (1921.5 / 1402.5), World.setLevelItemsEnabled(false): the sweep hid the scene's arrows by the bodies (arrow_normal at 1921–1923 / 1406–1407, the reported place) along with the level's other items; 57 items gone, the sweep 4 to 6 ms.

Checklist

  • I read CONTRIBUTING.md and agree that my contribution is licensed as it says.
  • The change is my own work: no code, assets or dumps that are not mine or that come from the game.
  • python Dev/tools/format_source.py --check passes.
  • Tests cover the change, and the checks of this pull request pass.
  • Public behaviour that changed is documented (KCD-Synced/KCDS-DOCS) or needs no docs.

@Kharote
Kharote marked this pull request as ready for review November 24, 2026 11:00
@Kharote Kharote mentioned this pull request Nov 24, 2026
5 tasks done
@Kharote

Kharote commented Nov 24, 2026

Copy link
Copy Markdown
Collaborator Author

Shipped in 1.2.1 (#349, release v1.2.1).

@Kharote Kharote closed this Nov 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant