undo/redo for edit talk node

This commit is contained in:
2025-06-20 10:17:37 -05:00
parent 9e22ed04ea
commit 6044232713
4 changed files with 40 additions and 3 deletions

View File

@@ -88,6 +88,19 @@ public:
std::fill(link1, link1 + 4, ' ');
std::fill(link2, link2 + 4, ' ');
}
bool operator==(const cNode& other) const {
CHECK_EQ(other, personality);
CHECK_EQ(other, type);
for(int i = 0; i < 4; i++){
if(link1[i] != other.link1[i]) return false;
if(link2[i] != other.link2[i]) return false;
if(extras[i] != other.extras[i]) return false;
}
CHECK_EQ(other, str1);
CHECK_EQ(other, str2);
return true;
}
bool operator!=(const cNode& other) const { return !(*this == other); }
};
std::array<cPersonality, 10> people;
std::vector<cNode> talk_nodes;