Skip to content

Pedestal fixes3 #1492

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 5 commits into from
Aug 19, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions changelog.txt
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,8 @@ Template for new versions:
- `confirm`: the pause option now pauses individual confirmation types, allowing multiple different confirmations to be paused independently
- `immortal-cravings`: prioritize high-value meals, properly split of portions, and don't go eating or drinking on a full stomach
- `uniform-unstick`: no longer causes units to equip multiples of assigned items
- `caravan`: in the pedestal item assignment dialog, add new items at the end of the list of displayed items instead of at a random position
- `caravan`: in the pedestal item assignment dialog, consistently remove items from the list of displayed items

## Misc Improvements
- `devel/hello-world`: updated to show off the new Slider widget
Expand Down
7 changes: 4 additions & 3 deletions internal/caravan/pedestal.lua
Original file line number Diff line number Diff line change
Expand Up @@ -599,9 +599,10 @@ end

local function unassign_item(bld, item)
if not bld then return end
local _, found, idx = utils.binsearch(bld.displayed_items, item.id)
if found then
local idx, _ = utils.linear_index(bld.displayed_items, item.id)
if idx then
bld.displayed_items:erase(idx)
item.flags.in_building = false
end
end

Expand All @@ -628,7 +629,7 @@ local function attach_item(item, display_bld)
local ref = df.new(df.general_ref_building_display_furniturest)
ref.building_id = display_bld.id
item.general_refs:insert('#', ref)
utils.insert_sorted(display_bld.displayed_items, item.id)
display_bld.displayed_items:insert('#', item.id)
item.flags.forbid = false
item.flags.in_building = false
end
Expand Down
Loading