Merge pull request #3075 from myk002/myk_spikey

fix initial extended/retracted position for upright spike traps
develop
Myk 2023-03-23 02:23:45 -07:00 committed by GitHub
commit a2ce8a2774
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
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.
## 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

@ -68,6 +68,7 @@ using namespace DFHack;
#include "df/building_stockpilest.h"
#include "df/building_trapst.h"
#include "df/building_water_wheelst.h"
#include "df/building_weaponst.h"
#include "df/building_wellst.h"
#include "df/building_workshopst.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;
break;
}
case building_type::Weapon:
{
if (VIRTUAL_CAST_VAR(obj, df::building_weaponst, bld))
obj->gate_flags.bits.closed = false;
break;
}
default:
break;
}