From ff20b340e8248112f51a369d433eb313810bd638 Mon Sep 17 00:00:00 2001 From: Celtic Minstrel Date: Thu, 6 Mar 2025 09:49:18 -0500 Subject: [PATCH] Add "only borders" option for If Fields? special node --- src/game/boe.specials.cpp | 3 +++ src/scenario/special-condition.cpp | 1 + 2 files changed, 4 insertions(+) diff --git a/src/game/boe.specials.cpp b/src/game/boe.specials.cpp index b5c7c078..63decd0e 100644 --- a/src/game/boe.specials.cpp +++ b/src/game/boe.specials.cpp @@ -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: diff --git a/src/scenario/special-condition.cpp b/src/scenario/special-condition.cpp index f232f217..69be8186 100644 --- a/src/scenario/special-condition.cpp +++ b/src/scenario/special-condition.cpp @@ -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)