diff options
| author | Robert Heinrich | 2012-04-17 18:11:14 +0200 |
|---|---|---|
| committer | Robert Heinrich | 2012-04-17 18:11:14 +0200 |
| commit | 299510f0d9f87c09a505a31aea4b94d11237597d (patch) | |
| tree | 8d5e729ab6ec41563179ed5a0003180fb63c9886 /plugins/zone.cpp | |
| parent | 40f36c19128f2daa7e40c5a1d882ffd1f5b5f47f (diff) | |
| download | dfhack-299510f0d9f87c09a505a31aea4b94d11237597d.tar.gz dfhack-299510f0d9f87c09a505a31aea4b94d11237597d.tar.bz2 dfhack-299510f0d9f87c09a505a31aea4b94d11237597d.tar.xz | |
zone: don't assign to cages which are designated but not yet placed (minor fix, it's not like bad things happen without it)
Diffstat (limited to 'plugins/zone.cpp')
| -rw-r--r-- | plugins/zone.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/plugins/zone.cpp b/plugins/zone.cpp index 3c0f645f..ee6abf32 100644 --- a/plugins/zone.cpp +++ b/plugins/zone.cpp @@ -897,6 +897,10 @@ int32_t findCageAtCursor() building->z == cursor->z)) continue; + // don't set id if cage is not constructed yet + if(building->getBuildStage()!=building->getMaxBuildStage()) + break; + if(isCage(building)) { foundID = building->id; @@ -1122,6 +1126,10 @@ df::building * getBuiltCageAtPos(df::coord pos) && building->y1 == pos.y && building->z == pos.z ) { + // don't set pointer if not constructed yet + if(building->getBuildStage()!=building->getMaxBuildStage()) + break; + cage = building; break; } |
