fix initial extended/retracted position for upright spike traps

develop
Myk Taylor 2023-03-23 00:25:29 -07:00
parent 6af4f4b8c7
commit 03e44f1e7f
No known key found for this signature in database
2 changed files with 9 additions and 1 deletions

@ -37,7 +37,8 @@ changelog.txt uses a syntax similar to RST, with a few special sequences:
- `prospector`: prospector tool in fort mode is now available. embark prospect is not yet available and is disabled at this time. - `prospector`: prospector tool in fort mode is now available. embark prospect is not yet available and is disabled at this time.
## Fixes ## Fixes
- `tailor` now properly discriminates between dyed and undyed cloth and no longer defaults to using adamantine - `tailor`: now properly discriminates between dyed and undyed cloth and no longer defaults to using adamantine
- `buildingplan`: upright spike traps are now placed extended rather than retracted
## Misc Improvements ## Misc Improvements

@ -68,6 +68,7 @@ using namespace DFHack;
#include "df/building_stockpilest.h" #include "df/building_stockpilest.h"
#include "df/building_trapst.h" #include "df/building_trapst.h"
#include "df/building_water_wheelst.h" #include "df/building_water_wheelst.h"
#include "df/building_weaponst.h"
#include "df/building_wellst.h" #include "df/building_wellst.h"
#include "df/building_workshopst.h" #include "df/building_workshopst.h"
#include "df/buildings_other_id.h" #include "df/buildings_other_id.h"
@ -591,6 +592,12 @@ df::building *Buildings::allocInstance(df::coord pos, df::building_type type, in
obj->gate_flags.bits.closed = false; obj->gate_flags.bits.closed = false;
break; break;
} }
case building_type::Weapon:
{
if (VIRTUAL_CAST_VAR(obj, df::building_weaponst, bld))
obj->gate_flags.bits.closed = false;
break;
}
default: default:
break; break;
} }