Add "only borders" option for If Fields? special node

This commit is contained in:
2025-03-06 09:49:18 -05:00
committed by Celtic Minstrel
parent 0f64c9a19d
commit ff20b340e8
2 changed files with 4 additions and 0 deletions

View File

@@ -3407,6 +3407,9 @@ void ifthen_spec(const runtime_state& ctx) {
int i = 0;
for(short j = spec.ex1b; j < min(spec.ex2b, univ.town->max_dim); j++)
for(short k = spec.ex1a; k < min(spec.ex2a, univ.town->max_dim); k++) {
// If pict non-zero, exclude rectangle interior
if(spec.pic > 0 && i > spec.ex1b && i < spec.ex2b && j > spec.ex1a && j < spec.ex2a)
continue;
switch(eFieldType(spec.m1)) {
// These values are not allowed
case SPECIAL_EXPLORED: case SPECIAL_SPOT: case SPECIAL_ROAD:

View File

@@ -74,6 +74,7 @@ namespace {
.ex1b(eSpecPicker::NODE);
node_properties_t S_FIELDS = node_builder_t(eSpecType::IF_FIELDS)
.rect(eLocType::ACTIVE_TOWN)
.pict(eSpecPicker::TOGGLE)
.msg1(eSpecPicker::FIELD)
.msg2(eSpecPicker::NODE);
node_properties_t S_PARTY_SIZE = node_builder_t(eSpecType::IF_PARTY_SIZE)