Skip to content

Commit

Permalink
Add a location picker for selecting a location in a town or outdoor s…
Browse files Browse the repository at this point in the history
…ector.

It's currently used in special node editing and in advanced town details.
  • Loading branch information
CelticMinstrel committed Feb 28, 2025
1 parent 2de8e67 commit 0468dab
Show file tree
Hide file tree
Showing 23 changed files with 482 additions and 58 deletions.
2 changes: 2 additions & 0 deletions proj/vs2013/ScenEdit/Scen Editor.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,7 @@
<ClCompile Include="..\..\..\src\scenedit\scen.fileio.cpp" />
<ClCompile Include="..\..\..\src\scenedit\scen.graphics.cpp" />
<ClCompile Include="..\..\..\src\scenedit\scen.keydlgs.cpp" />
<ClCompile Include="..\..\..\src\scenedit\scen.locpicker.cpp" />
<ClCompile Include="..\..\..\src\scenedit\scen.main.cpp" />
<ClCompile Include="..\..\..\src\scenedit\scen.menus.win.cpp" />
<ClCompile Include="..\..\..\src\scenedit\scen.townout.cpp" />
Expand All @@ -119,6 +120,7 @@
<ClInclude Include="..\..\..\src\scenedit\scen.global.hpp" />
<ClInclude Include="..\..\..\src\scenedit\scen.graphics.hpp" />
<ClInclude Include="..\..\..\src\scenedit\scen.keydlgs.hpp" />
<ClInclude Include="..\..\..\src\scenedit\scen.locpicker.hpp" />
<ClInclude Include="..\..\..\src\scenedit\scen.menus.hpp" />
<ClInclude Include="..\..\..\src\scenedit\scen.townout.hpp" />
<ClInclude Include="..\..\..\rsrc\menus\scenresource.h" />
Expand Down
6 changes: 6 additions & 0 deletions proj/vs2013/ScenEdit/Scen Editor.vcxproj.filters
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,9 @@
<ClCompile Include="..\..\..\src\scenedit\scen.keydlgs.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\..\..\src\scenedit\scen.locpicker.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\..\..\src\scenedit\scen.graphics.cpp">
<Filter>Source Files</Filter>
</ClCompile>
Expand Down Expand Up @@ -56,6 +59,9 @@
<ClInclude Include="..\..\..\src\scenedit\scen.keydlgs.hpp">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="..\..\..\src\scenedit\scen.locpicker.hpp">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="..\..\..\src\scenedit\scen.graphics.hpp">
<Filter>Header Files</Filter>
</ClInclude>
Expand Down
2 changes: 2 additions & 0 deletions proj/vs2017/Scenario Editor/Scenario Editor.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,7 @@
<ClCompile Include="..\..\..\src\scenedit\scen.fileio.cpp" />
<ClCompile Include="..\..\..\src\scenedit\scen.graphics.cpp" />
<ClCompile Include="..\..\..\src\scenedit\scen.keydlgs.cpp" />
<ClCompile Include="..\..\..\src\scenedit\scen.locpicker.cpp" />
<ClCompile Include="..\..\..\src\scenedit\scen.main.cpp" />
<ClCompile Include="..\..\..\src\scenedit\scen.menus.win.cpp" />
<ClCompile Include="..\..\..\src\scenedit\scen.townout.cpp" />
Expand All @@ -177,6 +178,7 @@
<ClInclude Include="..\..\..\src\scenedit\scen.global.hpp" />
<ClInclude Include="..\..\..\src\scenedit\scen.graphics.hpp" />
<ClInclude Include="..\..\..\src\scenedit\scen.keydlgs.hpp" />
<ClInclude Include="..\..\..\src\scenedit\scen.locpicker.hpp" />
<ClInclude Include="..\..\..\src\scenedit\scen.menus.hpp" />
<ClInclude Include="..\..\..\src\scenedit\scen.townout.hpp" />
</ItemGroup>
Expand Down
6 changes: 6 additions & 0 deletions proj/vs2017/Scenario Editor/Scenario Editor.vcxproj.filters
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,9 @@
<ClCompile Include="..\..\..\src\scenedit\scen.keydlgs.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\..\..\src\scenedit\scen.locpicker.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\..\..\src\scenedit\scen.main.cpp">
<Filter>Source Files</Filter>
</ClCompile>
Expand Down Expand Up @@ -74,6 +77,9 @@
<ClInclude Include="..\..\..\src\scenedit\scen.keydlgs.hpp">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="..\..\..\src\scenedit\scen.locpicker.hpp">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="..\..\..\src\scenedit\scen.menus.hpp">
<Filter>Header Files</Filter>
</ClInclude>
Expand Down
10 changes: 10 additions & 0 deletions proj/xc12/BoE.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,9 @@
915473CE2C800AB000EB1C94 /* enchant.hpp in Headers */ = {isa = PBXBuildFile; fileRef = 915473CC2C800AB000EB1C94 /* enchant.hpp */; };
915473CF2C800AB000EB1C94 /* enchant.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 915473CD2C800AB000EB1C94 /* enchant.cpp */; };
915AF9E81BBF8B5C008AEF49 /* scrollpane.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 919B13A81BBE2B54009905A4 /* scrollpane.cpp */; };
9170C50E2D717F24009B6E7C /* scen.locpicker.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 9170C50C2D717F24009B6E7C /* scen.locpicker.cpp */; };
9170C50F2D717F24009B6E7C /* scen.locpicker.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 9170C50C2D717F24009B6E7C /* scen.locpicker.cpp */; };
9170C5102D717F24009B6E7C /* scen.locpicker.hpp in Headers */ = {isa = PBXBuildFile; fileRef = 9170C50D2D717F24009B6E7C /* scen.locpicker.hpp */; };
9176FEC71D550EFE006EF694 /* out_legacy.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 9176FEC01D550EFC006EF694 /* out_legacy.cpp */; };
9176FEC81D550EFE006EF694 /* scen_legacy.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 9176FEC11D550EFC006EF694 /* scen_legacy.cpp */; };
9176FECB1D550EFE006EF694 /* talk_legacy.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 9176FEC41D550EFD006EF694 /* talk_legacy.cpp */; };
Expand Down Expand Up @@ -734,6 +737,8 @@
9169C31B1B37A5D50041002B /* Blades of Exile.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "Blades of Exile.app"; sourceTree = BUILT_PRODUCTS_DIR; };
9169C31D1B37A5D50041002B /* BoE Character Editor.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "BoE Character Editor.app"; sourceTree = BUILT_PRODUCTS_DIR; };
9169C31F1B37A5D50041002B /* BoE Scenario Editor.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "BoE Scenario Editor.app"; sourceTree = BUILT_PRODUCTS_DIR; };
9170C50C2D717F24009B6E7C /* scen.locpicker.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = scen.locpicker.cpp; sourceTree = "<group>"; };
9170C50D2D717F24009B6E7C /* scen.locpicker.hpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.h; path = scen.locpicker.hpp; sourceTree = "<group>"; };
9176FEC01D550EFC006EF694 /* out_legacy.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = out_legacy.cpp; sourceTree = "<group>"; };
9176FEC11D550EFC006EF694 /* scen_legacy.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = scen_legacy.cpp; sourceTree = "<group>"; };
9176FEC41D550EFD006EF694 /* talk_legacy.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = talk_legacy.cpp; sourceTree = "<group>"; };
Expand Down Expand Up @@ -1446,6 +1451,7 @@
91B3EEDE0F969BA700BF5B67 /* scen.global.hpp */,
91B3EEE50F969BA700BF5B67 /* scen.graphics.hpp */,
91B3EEE00F969BA700BF5B67 /* scen.keydlgs.hpp */,
9170C50D2D717F24009B6E7C /* scen.locpicker.hpp */,
914CA4641909B00100B6ADD1 /* scen.menus.hpp */,
91B3EEE60F969BA700BF5B67 /* scen.townout.hpp */,
);
Expand All @@ -1463,6 +1469,7 @@
91B3EEF30F969BA700BF5B67 /* scen.graphics.cpp */,
91B3EEEE0F969BA700BF5B67 /* scen.keydlgs.cpp */,
91B3EEEB0F969BA700BF5B67 /* scen.main.cpp */,
9170C50C2D717F24009B6E7C /* scen.locpicker.cpp */,
914CA45719074D0A00B6ADD1 /* scen.menus.mac.mm */,
91B3EEF40F969BA700BF5B67 /* scen.townout.cpp */,
);
Expand Down Expand Up @@ -1713,6 +1720,7 @@
91F3205123E65EA3009650AF /* framerate_limiter.hpp in Headers */,
9149924C25913E3F00B5BE97 /* container.hpp in Headers */,
9149924E25913E3F00B5BE97 /* led.hpp in Headers */,
9170C5102D717F24009B6E7C /* scen.locpicker.hpp in Headers */,
9143044B2970EDC1003A3967 /* keymods.hpp in Headers */,
9149925025913E3F00B5BE97 /* ledgroup.hpp in Headers */,
915473CE2C800AB000EB1C94 /* enchant.hpp in Headers */,
Expand Down Expand Up @@ -2146,6 +2154,7 @@
D384F6A32C1B9D4000A806C3 /* replay.cpp in Sources */,
915473CF2C800AB000EB1C94 /* enchant.cpp in Sources */,
915AF9E81BBF8B5C008AEF49 /* scrollpane.cpp in Sources */,
9170C50E2D717F24009B6E7C /* scen.locpicker.cpp in Sources */,
91E128E71BC1E6DD00C8BE1D /* basicbtns.cpp in Sources */,
919BE8942D676567000C64C6 /* special-condition.cpp in Sources */,
91E128ED1BC2076B00C8BE1D /* 3choice.cpp in Sources */,
Expand Down Expand Up @@ -2198,6 +2207,7 @@
413AAF662D38A4A0002E9BF1 /* creature.cpp in Sources */,
413AAF652D38A48E002E9BF1 /* pc.cpp in Sources */,
413AAF642D38A47C002E9BF1 /* population.cpp in Sources */,
9170C50F2D717F24009B6E7C /* scen.locpicker.cpp in Sources */,
413AAF632D38A1B8002E9BF1 /* party.cpp in Sources */,
413AAF622D38A076002E9BF1 /* universe.cpp in Sources */,
413AAF612D389F94002E9BF1 /* fileio_party.cpp in Sources */,
Expand Down
19 changes: 19 additions & 0 deletions rsrc/dialogs/choose-location.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
<?xml version='1.0' encoding='UTF-8' standalone='no'?>
<?xml-stylesheet href="dialog.xsl" type="text/xsl"?>
<dialog defbtn='done'>
<pict name='mainpic' type='dlog' num='16' top='6' left='6'/>
<text name='prompt' anchor='mainpic' relative='pos pos-in' size='large' top='0' left='12' width='248' height='14'>Select a location:</text>
<tilemap name='map' anchor='mainpic' relative='pos-in pos' framed='true' top='8' left='0' rows='18' cols='18'>
<pict framed='false' type='map' num='0' top='0' left='0'/>
</tilemap>
<!-- The name begins with Z to ensure it's drawn on top of the map picts, whose auto-generated names begin with X -->
<pict name='zpointer' type='item' anchor='map' relative='pos-in' size='small' outline='double' filled='false' num='131' top='3' left='3'/>
<text name='help' anchor='left' relative='pos-in pos' top='0' left='6' width='422' height='16'>Click on a space to select.<br/>Use arrows to change pages.</text>
<button name='left' anchor='map' relative='pos-in pos' type='left' top='10' left='0' def-key='left'/>
<button name='down' anchor='left' relative='pos pos-in' type='down' top='0' left='121' def-key='down'/>
<button name='right' anchor='down' relative='pos pos-in' type='right' top='0' left='121' def-key='right'/>
<button name='cancel' anchor='done' relative='neg pos-in' type='regular' top='0' left='67' def-key='esc'>Cancel</button>
<button name='done' anchor='right' relative='pos-in pos' type='done' top='4' left='0'/>
<button name='up' anchor='down' relative='pos-in neg' type='up' top='473' left='0' def-key='up'/>
<button name='switch' anchor='right' relative='pos-in neg' type='regular' top='473' left='0'>Switch</button>
</dialog>
8 changes: 4 additions & 4 deletions rsrc/dialogs/edit-town-advanced.xml
Original file line number Diff line number Diff line change
Expand Up @@ -35,16 +35,16 @@
<text relative='pos-in' anchor='exits' top='3' left='3' width='197' height='15'>Exit town locations:</text>
<text name='exit-x' relative='pos-in pos' rel-anchor='prev' top='4' left='100' width='35' height='15'>X</text>
<text name='exit-y' relative='pos pos-in' rel-anchor='prev' top='0' left='12' width='35' height='15'>Y</text>
<text name='exit1' relative='pos-in pos' anchor='exit-x' top='4' left='-100' width='96' height='15'>Top</text>
<button name='exit1' relative='pos-in pos' anchor='exit-x' type='tiny' top='4' left='-100' width='96' height='15' text-size='10'>Top</button>
<field name='exit1-x' relative='pos-in pos' anchor='exit-x' top='4' left='-8' width='39' height='16'/>
<field name='exit1-y' relative='pos-in pos' anchor='exit-y' top='4' left='-8' width='39' height='16'/>
<text name='exit2' relative='pos-in pos' anchor='exit1' top='9' left='0' width='96' height='15'>Left</text>
<button name='exit2' relative='pos-in pos' anchor='exit1' type='tiny' top='9' left='0' width='96' height='15' text-size='10'>Left</button>
<field name='exit2-x' relative='pos-in pos' anchor='exit1-x' top='8' left='0' width='39' height='16'/>
<field name='exit2-y' relative='pos-in pos' anchor='exit1-y' top='8' left='0' width='39' height='16'/>
<text name='exit3' relative='pos-in pos' anchor='exit2' top='9' left='0' width='96' height='15'>Bottom</text>
<button name='exit3' relative='pos-in pos' anchor='exit2' type='tiny' top='9' left='0' width='96' height='15' text-size='10'>Bottom</button>
<field name='exit3-x' relative='pos-in pos' anchor='exit2-x' top='8' left='0' width='39' height='16'/>
<field name='exit3-y' relative='pos-in pos' anchor='exit2-y' top='8' left='0' width='39' height='16'/>
<text name='exit4' relative='pos-in pos' anchor='exit3' top='9' left='0' width='96' height='15'>Right</text>
<button name='exit4' relative='pos-in pos' anchor='exit3' type='tiny' top='9' left='0' width='96' height='15' text-size='10'>Right</button>
<field name='exit4-x' relative='pos-in pos' anchor='exit3-x' top='8' left='0' width='39' height='16'/>
<field name='exit4-y' relative='pos-in pos' anchor='exit3-y' top='8' left='0' width='39' height='16'/>
<button name='exit-help' type='help' relative='neg-in pos-in' anchor='exits' top='2' left='18'/>
Expand Down
2 changes: 1 addition & 1 deletion src/dialogxml/dialogs/strchoice.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ cStringChoice::cStringChoice(cDialog* parent, bool editable)
, dlg(*ResMgr::dialogs.get(editable ? "choose-edit-string" : "choose-string"), parent)
{}

cStringChoice::cStringChoice(std::vector<std::string>& strs, std::string title, cDialog* parent, bool editable)
cStringChoice::cStringChoice(const std::vector<std::string>& strs, std::string title, cDialog* parent, bool editable)
: cStringChoice(parent, editable)
{
setTitle(title);
Expand Down
2 changes: 1 addition & 1 deletion src/dialogxml/dialogs/strchoice.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ class cStringChoice {
/// @param strs A list of all strings in the dialog.
/// @param title The title to show in the dialog.
/// @param parent Optionally, a parent dialog.
explicit cStringChoice(std::vector<std::string>& strs, std::string title, cDialog* parent = nullptr, bool editable = false);
explicit cStringChoice(const std::vector<std::string>& strs, std::string title, cDialog* parent = nullptr, bool editable = false);
/// Initializes a dialog from an iterator pair.
/// @param begin An iterator to the first string in the dialog.
/// @param end An iterator to one past the last string in the dialog.
Expand Down
2 changes: 1 addition & 1 deletion src/dialogxml/widgets/container.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ typedef std::map<std::string,cControl*>::iterator ctrlIter;
/// A superclass to represent a control that contains other controls.
class cContainer : public cControl {
void callHandler(event_fcn<EVT_CLICK>::type onClick, cDialog& me, std::string id, eKeyMod mods) override;
std::string clicking;
protected:
std::string clicking;
/// Parses a child control.
/// @param elem The element defining the control.
/// @param controls The map into which the control will be inserted.
Expand Down
60 changes: 57 additions & 3 deletions src/dialogxml/widgets/tilemap.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,18 @@ location cTilemap::getCell(const std::string& id) const {
return location(std::stoi(x_str) * cellWidth, std::stoi(y_str) * cellHeight);
}

location cTilemap::getCellPos(size_t x, size_t y) const {
rectangle bounds = getBounds();
bounds.offset(x * cellWidth, y * cellHeight);
return bounds.topLeft();
}

location cTilemap::getCellPos(cControl& child) const {
// If it's not ours, return origin.
if(!hasChild(child.getName())) return location();
return getCell(child.getName());
}

std::string cTilemap::buildId(const std::string& base, size_t x, size_t y) {
std::ostringstream sout;
if(!base.empty()) {
Expand Down Expand Up @@ -92,14 +104,37 @@ bool cTilemap::isScrollable() const {
return false;
}

bool cTilemap::handleClick(location where, cFramerateLimiter& fps_limiter) {
bool success = false;
isHandlingClick = true;
forEach([&](std::string id, cControl& ctrl) {
rectangle bounds = ctrl.getBounds();
bounds.offset(getBounds().topLeft());
bounds.offset(getCell(id));
if(!success && ctrl.isClickable() && bounds.contains(where)) {
rectangle localBounds = ctrl.getBounds();
ctrl.setBounds(bounds);
clicking = id;
if(ctrl.handleClick(where, fps_limiter)){
success = true;
} else clicking.clear();
ctrl.setBounds(localBounds);
}
});
isHandlingClick = false;
return success;
}

void cTilemap::draw() {
if(!isVisible()) return;
for(auto& ctrl : controls) {
rectangle localBounds = ctrl.second->getBounds();
rectangle globalBounds = localBounds;
globalBounds.offset(getBounds().topLeft());
globalBounds.offset(getCell(ctrl.first));
ctrl.second->setBounds(globalBounds);
if(isHandlingClick ? ctrl.first != clicking : true) {
globalBounds.offset(getBounds().topLeft());
globalBounds.offset(getCell(ctrl.first));
ctrl.second->setBounds(globalBounds);
}
ctrl.second->draw();
ctrl.second->setBounds(localBounds);
}
Expand Down Expand Up @@ -134,6 +169,25 @@ void cTilemap::recalcRect() {
frame.bottom -= spacing;
}

void cTilemap::attachClickHandlers(std::function<bool(cDialog&,std::string,eKeyMod)> handler, std::string prefix) {
for(auto& ctrl : controls) {
bool matches = false;
if(prefix.empty()) {
size_t first_x = ctrl.first.find_first_of("x"), last_x = ctrl.first.find_last_of("x"), first_y = ctrl.first.find_first_of("y"), last_y = ctrl.first.find_last_of("y");
if(first_x == 0 && last_x == 0 && first_y != std::string::npos && first_y == last_y) {
matches = true;
}
} else {
if(ctrl.first.compare(0, prefix.size(), prefix)) {
matches = true;
}
}
if(matches) {
ctrl.second->attachClickHandler(handler);
}
}
}

void cTilemap::fillTabOrder(std::vector<int>& specificTabs, std::vector<int>& reverseTabs) {
for(auto p : controls) {
cControl& ctrl = *p.second;
Expand Down
12 changes: 12 additions & 0 deletions src/dialogxml/widgets/tilemap.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ class cTilemap : public cContainer {
static std::string buildId(const std::string& base, size_t x, size_t y);
std::string current_cell;
mutable int id_tries = 0;
bool isHandlingClick = false;
public:
std::string generateId(const std::string& baseId) const override;
bool parseAttribute(ticpp::Attribute& attr, std::string tagName, std::string fname) override;
Expand All @@ -34,6 +35,17 @@ class cTilemap : public cContainer {
cControl& getChild(std::string id, size_t x, size_t y);
bool hasChild(size_t x, size_t y) const;
cControl& getChild(size_t x, size_t y);
location getCellPos(size_t x, size_t y) const;
location getCellPos(cControl& child) const;
/// Attach the same click handler to every instance of a child control.
/// @param handler The handler to attach.
/// @param prefix The unique ID of the control template.
/// @throw xHandlerNotSupported if any of the controls do not support click handlers.
/// @throw std::invalid_argument if any of the controls do not exist.
/// @see cControl::attachClickHandler()
/// @deprecated in favour of @ref attachEventHandlers
void attachClickHandlers(std::function<bool(cDialog&,std::string,eKeyMod)> handler, std::string prefix);
bool handleClick(location where, cFramerateLimiter& fps_limiter) override;
/// Recalculate the tilemap's bounding rect based on its contained controls.
void recalcRect() override;
/// Adds any fields in this tilemap to the tab order building arrays.
Expand Down
6 changes: 3 additions & 3 deletions src/scenario/special-condition.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ namespace {
.sdf(eSpecField::EX1A, eSpecField::EX1B)
.ex2b(eSpecPicker::NODE);
node_properties_t S_TERRAIN = node_builder_t(eSpecType::IF_TER_TYPE)
.loc(eSpecField::EX1A, eSpecField::EX1B)
.loc(eSpecField::EX1A, eSpecField::EX1B, eLocType::ACTIVE_AUTO)
.ex2a(STRT_TER)
.ex2b(eSpecPicker::NODE);
node_properties_t S_ALIVE = node_builder_t(eSpecType::IF_ALIVE)
Expand All @@ -41,7 +41,7 @@ namespace {
.ex1b(eSpecPicker::NODE)
.ex2a(eSpecPicker::TOGGLE);
node_properties_t S_ITEM_THERE = node_builder_t(eSpecType::IF_ITEM_CLASS_ON_SPACE)
.loc(eSpecField::EX1A, eSpecField::EX1B)
.loc(eSpecField::EX1A, eSpecField::EX1B, eLocType::ACTIVE_TOWN)
.ex2a(eSpecPicker::ITEM_CLASS)
.ex2b(eSpecPicker::NODE)
.ex2c(eSpecPicker::TOGGLE);
Expand Down Expand Up @@ -72,7 +72,7 @@ namespace {
node_properties_t S_DAY = node_builder_t(eSpecType::IF_DAY_REACHED)
.ex1b(eSpecPicker::NODE);
node_properties_t S_FIELDS = node_builder_t(eSpecType::IF_FIELDS)
.rect()
.rect(eLocType::ACTIVE_TOWN)
.msg1(eSpecPicker::FIELD)
.msg2(eSpecPicker::NODE);
node_properties_t S_PARTY_SIZE = node_builder_t(eSpecType::IF_PARTY_SIZE)
Expand Down
6 changes: 3 additions & 3 deletions src/scenario/special-general.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -117,16 +117,16 @@ namespace{
.msg();
node_properties_t S_TERCHANGE = node_builder_t(eSpecType::CHANGE_TER)
.msg()
.loc(eSpecField::EX1A, eSpecField::EX1B)
.loc(eSpecField::EX1A, eSpecField::EX1B, eLocType::ACTIVE_AUTO)
.ex2a(STRT_TER);
node_properties_t S_TERSWAP = node_builder_t(eSpecType::SWAP_TER)
.msg()
.loc(eSpecField::EX1A, eSpecField::EX1B)
.loc(eSpecField::EX1A, eSpecField::EX1B, eLocType::ACTIVE_AUTO)
.ex2a(STRT_TER)
.ex2b(STRT_TER);
node_properties_t S_TERTRANS = node_builder_t(eSpecType::TRANS_TER)
.msg()
.loc(eSpecField::EX1A, eSpecField::EX1B);
.loc(eSpecField::EX1A, eSpecField::EX1B, eLocType::ACTIVE_AUTO);
node_properties_t S_BUF_CLEAR = node_builder_t(eSpecType::CLEAR_BUF);
node_properties_t S_BUF_ADDSTR = node_builder_t(eSpecType::APPEND_STRING)
.ex1a(eSpecPicker::MSG_SINGLE)
Expand Down
Loading

0 comments on commit 0468dab

Please sign in to comment.