Skip to content
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

[fix-occupancy] backend for fix/occupancy #4661

Merged
merged 9 commits into from
May 31, 2024
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
18 changes: 18 additions & 0 deletions docs/about/Removed.rst
Original file line number Diff line number Diff line change
Expand Up @@ -173,12 +173,30 @@ fix/feeding-timers
==================
The corresponding DF :bug:`2606` was fixed in DF 0.40.12.

.. _fix/item-occupancy:

fix/item-occupancy
==================
Merged into `fix/occupancy`.

.. _fix/merchants:

fix/merchants
=============
Humans can now make trade agreements. This fix is no longer necessary.

.. _fix/tile-occupancy:

fix/tile-occupancy
==================
Merged into `fix/occupancy`.

.. _fix-unit-occupancy:

fix-unit-occupancy
==================
Merged into `fix/occupancy`.

.. _fortplan:

fortplan
Expand Down
1 change: 1 addition & 0 deletions docs/changelog.txt
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ Template for new versions:
- `seedwatch`: display a limit of ``-`` instead of ``0`` for a seed that is present in inventory but not being watched
- `tiletypes`: make aquifers functional when adding the ``aquifer`` property
- `seedwatch`: do not include unplantable tree seeds in its status report
- ``Buildings::containsTile``: fix result for buildings that are solid and have no extent structures

## Misc Improvements
- `blueprint`: capture track carving designations in addition to already-carved tracks
Expand Down
9 changes: 9 additions & 0 deletions docs/plugins/fix-occupancy.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
fix-occupancy
=============

.. dfhack-tool::
:summary: Provides the backend logic for fix/occupancy.
:tags: dev
:no-command:

This plugin provides the backend logic for `fix/occupancy`.
41 changes: 0 additions & 41 deletions docs/plugins/fix-unit-occupancy.rst

This file was deleted.

3 changes: 3 additions & 0 deletions library/modules/Buildings.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -895,6 +895,9 @@ bool Buildings::containsTile(df::building *bld, df::coord2d tile) {
return false;
}

if (!bld->room.extents)
return true;

df::building_extents_type *etile = getExtentTile(bld->room, tile);
return etile && *etile;
}
Expand Down
2 changes: 1 addition & 1 deletion plugins/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ if(BUILD_SUPPORTED)
dfhack_plugin(fastdwarf fastdwarf.cpp)
dfhack_plugin(faststart faststart.cpp)
dfhack_plugin(filltraffic filltraffic.cpp)
#dfhack_plugin(fix-unit-occupancy fix-unit-occupancy.cpp)
dfhack_plugin(fix-occupancy fix-occupancy.cpp LINK_LIBRARIES lua)
#dfhack_plugin(fixveins fixveins.cpp)
dfhack_plugin(flows flows.cpp)
#dfhack_plugin(follow follow.cpp)
Expand Down
Loading