silverflyone
2bd24efa4b
Merge branch 'develop' of https://github.com/silverflyone/dfhack into develop
2023-04-05 11:49:30 +10:00
silverflyone
0cebad1078
Update Buildings.cpp
...
Removed extra min/max checks.
2023-04-05 11:49:14 +10:00
silverflyone
c6fc55f98f
Merge branch 'DFHack:develop' into develop
2023-04-04 03:45:23 +10:00
silverflyone
181f0bdf72
Update Buildings.cpp
...
Boundary checks added.
2023-04-04 03:27:32 +10:00
silverflyone
f8de51aba3
Update Buildings.cpp
...
Fixes #3159 .
Valid map coordinates from (0, 0, 0) to (world->map.x_count - 1, world->map.y_count - 1, world->map.z_count - 1).
Stockpile coords (x1, y1, z) to (x2, y2, z) may lie outside of this region.
Use min of (0, 0) and max of (world->map.x_count - 1, world->map.y_count - 1) when iterating the block.
2023-04-04 03:08:43 +10:00
Myk Taylor
fe0590503f
mark tiles with magma or deep water as "not free"
2023-03-24 15:05:17 -07:00
Myk Taylor
03e44f1e7f
fix initial extended/retracted position for upright spike traps
2023-03-23 00:25:29 -07:00
silverflyone
d8afb6c682
Update Buildings.cpp
...
Changed the StockpileIterator::operator++ to checks block based on <= 16 rather than <16. Previously it was not returning items at stockpile tiles at the block boundary. Identified as part of combine.lua changes.
2023-02-15 15:31:50 +11:00
Roxy
826f918954
remove isHospital as hospitals are no longer civzones
2023-02-06 19:11:00 -05:00
Roxy
ca5a17a799
explanatory comment for magic number
2023-02-06 19:09:47 -05:00
Roxy
a38246aaa4
Update logic for zone type checks
2023-02-06 16:47:50 -05:00
Myk Taylor
22dd49ce38
remove "room" checking for buildings -- there is no room
2023-01-27 13:38:21 -08:00
20k
4559168005
update for multiple ownership
2023-01-22 22:59:25 +00:00
20k
b15fcc93d2
remove assignments on zone destroy
2023-01-22 15:26:55 +00:00
20k
c7ca9d0d7b
reverse squad iteration delete
2023-01-22 15:25:16 +00:00
20k
9054efd7c8
Update miscutils to support member pointer to a variable defined in the base when passing in a derived type
2023-01-21 19:15:28 +00:00
20k
3024c4a0df
update to remove ambiguity after structures change
2023-01-21 18:45:36 +00:00
20k
1dbf01e5d1
Civzone interop style changes
2023-01-21 18:45:36 +00:00
20k
8c68f54f50
update with squad removal support
2023-01-21 18:45:36 +00:00
20k
4d9c411358
fix flag
2023-01-19 23:33:03 +00:00
20k
8b7c8d83b5
remove save fixup
...
Add notifyCivzoneModified
2023-01-19 21:55:20 +00:00
20k
d5610ab859
zone <-> building interop
2023-01-19 16:39:41 +00:00
Myk Taylor
92489ef27d
get things to compile with the recent structure updates
2023-01-08 11:33:14 -08:00
Myk Taylor
845391f4e6
fix overzealous "ui" -> "plotinfo" replacement
...
some comments were just talking about the UI..
2023-01-05 17:46:30 -08:00
Myk Taylor
5e5775f5e3
rename globals according to structures update
2023-01-05 17:11:01 -08:00
Myk Taylor
93b8479e94
comment out problematic code in Buildings.cpp
2022-12-16 14:47:43 -06:00
myk002
cb80f7dd75
don't cache dup civzones when scanning buildings
2022-09-25 16:04:36 -07:00
myk002
31397af99b
cache civzones so lookup is O(1) instead of O(N)
2022-02-26 15:32:25 -08:00
lethosor
e7754ea890
Enable -Wunused-variable and fix most errors
2021-09-07 01:16:21 -04:00
myk002
1a016a0ff3
force creation of extents for abstract buildings
2021-06-07 07:02:46 -07:00
myk002
32a0363f31
move identity check up a bit to avoid useless work
2021-01-24 08:57:56 -08:00
myk002
03719f58df
avoid infinite parentage when linking rooms
2021-01-24 08:52:34 -08:00
myk002
3ba984c22c
only reset extents if they are unusable
...
this allows callers of Buildings::setSize() to "pre-initialize" the
extents to declare non-rectangular structures. this allows quickfort to
create non-rectangular stockpiles, farm plots, zones, etc. the extents
are still reset as before if the size of the building doesn't match the
caller's expectations.
this commit also fixes a memory leak when setSize() allocates memory for
extents, but the memory is not deallocated if the building is ultimately
invalid for some reason.
2020-12-16 11:10:47 -08:00
lethosor
1d0e2dc6bc
Update extents handling to use building_extents_type
2020-11-03 14:56:16 -05:00
Myk Taylor
09fbaba726
buildingplan: support all building types
...
Allow buildingplan to handle all building types, update the docs, and add in little extra fixes to ensure all the new types work correctly.
2020-10-16 14:23:35 -07:00
Myk Taylor
e546d3eec3
rename is_civzone to the more general allow_wall
2020-08-15 20:13:48 -07:00
Myk Taylor
ae872e812f
properly detect valid tiles for civzones
2020-08-15 17:24:12 -07:00
Ben Lubar
635e709d95
name ui_look_list union
...
update scripts and structures
2020-03-06 16:06:27 -06:00
lethosor
08aeb6faeb
Fix EventManager building ID type
...
The pointer to the building ID was sometimes not dereferenced properly.
Addressed by switching to an ID cast to a pointer type for consistency with
other types of events.
Fixes #1434
Ref #1003 (19695b4ee7
)
Broken in #1253 (a7dfacd1c5
)
2019-10-05 20:26:31 -04:00
lethosor
e9ec08f419
Add Buildings::getRoomDescription(), moved from search plugin, +cleanup
2018-05-12 17:00:21 -04:00
lethosor
2c95ac411e
Update xml and all uses of job_handler
2017-11-25 00:59:59 -05:00
lethosor
10e13c532a
Add "tweak cage-butcher" and some extra Building module functions
...
* Buildings::markedForRemoval()
* Buildings::getCageOccupants()
Closes #906
2017-06-25 15:27:21 -04:00
lethosor
19695b4ee7
EventManager/eventful: Pass building ID pointers to event handlers
...
Previously, there was some disagreement over whether event handlers such as
Buildings::updateBuildings() took building pointers or building IDs shoved
into pointers. It turned out to be the latter, which, unfortunately, did not
compile on x64. Passing building IDs isn't possible in all cases, because
building event handlers can be called for recently-deleted buildings too.
Pointers to building IDs do work reliably, though.
Fixes #1003
2017-02-17 22:53:48 -05:00
lethosor
70ac99cbfa
Fix Buildings::setOwner() persistence
...
Needed to set bld->owner_id for changes to persist across save/load
Fixes #983 , thanks to Quietust
2016-08-21 20:58:40 -04:00
lethosor
e965f5318f
Replace many includes with forward declarations in modules/Maps.h
2016-08-13 21:44:01 -04:00
lethosor
215afa34f3
Update for 64-bit unit changes
...
Includes xml, stonesense, scripts
Ref DFHack/df-structures@25cb373
2016-08-10 23:50:00 -04:00
lethosor
79377669a1
Merge remote-tracking branch 'NCommander/dwarfvet' into develop
2016-07-29 16:25:53 -04:00
lethosor
2455e36510
Initial 64-bit support
2016-07-03 23:32:43 -04:00
Michael Casadevall
e45fbfc61d
Modified dwaftvet plugin to work with latest DFHack
...
Initial commit of the dwarfvet plugin
Signed-off-by: Michael Casadevall <mcasadevall@ubuntu.com>
2016-06-08 04:14:59 -04:00
lethosor
248331a196
buildingplan: Support floodgates, grates, bars
...
See #808
2016-01-31 14:50:07 -05:00