diff options
author | Star Rauchenberger <fefferburbia@gmail.com> | 2024-07-24 13:36:07 -0400 |
---|---|---|
committer | Star Rauchenberger <fefferburbia@gmail.com> | 2024-07-24 13:36:07 -0400 |
commit | 4ffb5871e4bc54ab6765fcd738835c295d1e2924 (patch) | |
tree | 47d9521046ae6b628ec3b64d5a2890e6a26bcbbf /src/network_set.cpp | |
parent | 1a935f45c98905a20a13265ae0d00f9674ec4ea6 (diff) | |
download | lingo-ap-tracker-4ffb5871e4bc54ab6765fcd738835c295d1e2924.tar.gz lingo-ap-tracker-4ffb5871e4bc54ab6765fcd738835c295d1e2924.tar.bz2 lingo-ap-tracker-4ffb5871e4bc54ab6765fcd738835c295d1e2924.zip |
Pilgrim Antechamber sunwarp now shows if pilgrimage is doable
Diffstat (limited to 'src/network_set.cpp')
-rw-r--r-- | src/network_set.cpp | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/network_set.cpp b/src/network_set.cpp index 6d2a098..2a9e12c 100644 --- a/src/network_set.cpp +++ b/src/network_set.cpp | |||
@@ -21,6 +21,19 @@ void NetworkSet::AddLink(int id1, int id2) { | |||
21 | network_by_item_[id2].insert({id1, id2}); | 21 | network_by_item_[id2].insert({id1, id2}); |
22 | } | 22 | } |
23 | 23 | ||
24 | void NetworkSet::AddLinkToNetwork(int network_id, int id1, int id2) { | ||
25 | if (id2 > id1) { | ||
26 | // Make sure id1 < id2 | ||
27 | std::swap(id1, id2); | ||
28 | } | ||
29 | |||
30 | if (!network_by_item_.count(network_id)) { | ||
31 | network_by_item_[network_id] = {}; | ||
32 | } | ||
33 | |||
34 | network_by_item_[network_id].insert({id1, id2}); | ||
35 | } | ||
36 | |||
24 | bool NetworkSet::IsItemInNetwork(int id) const { | 37 | bool NetworkSet::IsItemInNetwork(int id) const { |
25 | return network_by_item_.count(id); | 38 | return network_by_item_.count(id); |
26 | } | 39 | } |