Skip to content

Commit 48fd7db

Browse files
committed
update RFR for changes to siegeengines
for compatibility with DFHack/df-structures#860
1 parent bde3891 commit 48fd7db

File tree

4 files changed

+26
-8
lines changed

4 files changed

+26
-8
lines changed

docs/changelog.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,7 @@ Template for new versions:
6060

6161
## Fixes
6262
- `buildingplan`: Bolt throwers will no longer be constructed using populated bins.
63+
- `RemoteFortressReader`: updated siege engine facing enums for new diagonal directions
6364
- `suspendmanager`: treat reinforced walls as a blocking construction and buildable platform
6465

6566
## Misc Improvements

library/xml

plugins/remotefortressreader/building_reader.cpp

Lines changed: 19 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -560,18 +560,31 @@ void CopyBuilding(int buildingIndex, RemoteFortressReader::BuildingInstance * re
560560
auto facing = actual->facing;
561561
switch (facing)
562562
{
563-
case df::building_siegeenginest::Left:
564-
remote_build->set_direction(WEST);
565-
break;
566-
case df::building_siegeenginest::Up:
563+
using enum df::enums::siegeengine_orientation::siegeengine_orientation;
564+
case North:
567565
remote_build->set_direction(NORTH);
568566
break;
569-
case df::building_siegeenginest::Right:
567+
case Northeast:
568+
remote_build->set_direction(NORTHEAST);
569+
break;
570+
case East:
570571
remote_build->set_direction(EAST);
571572
break;
572-
case df::building_siegeenginest::Down:
573+
case Southeast:
574+
remote_build->set_direction(SOUTHEAST);
575+
break;
576+
case South:
573577
remote_build->set_direction(SOUTH);
574578
break;
579+
case Southwest:
580+
remote_build->set_direction(SOUTHWEST);
581+
break;
582+
case West:
583+
remote_build->set_direction(WEST);
584+
break;
585+
case Northwest:
586+
remote_build->set_direction(NORTHWEST);
587+
break;
575588
default:
576589
break;
577590
}

plugins/remotefortressreader/proto/RemoteFortressReader.proto

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,11 @@ enum BuildingDirection
141141
EAST = 1;
142142
SOUTH = 2;
143143
WEST = 3;
144-
NONE = 4;
144+
NORTHEAST = 4;
145+
SOUTHEAST = 5;
146+
SOUTHWEST = 6;
147+
NORTHWEST = 7;
148+
NONE = 8;
145149
}
146150

147151
enum TileDigDesignation

0 commit comments

Comments
 (0)