diff options
| author | Star Rauchenberger <fefferburbia@gmail.com> | 2025-08-20 15:03:18 -0400 |
|---|---|---|
| committer | Star Rauchenberger <fefferburbia@gmail.com> | 2025-08-20 15:03:18 -0400 |
| commit | d77c73397b684faa55f0e95484ac89ca68bde1ad (patch) | |
| tree | 84fd35d342b69a9765d8f94473b56998d26e323d /tools/assign_ids | |
| parent | 53ad8e2f3e5fcf9cf9d5d4628498557e0f5500e8 (diff) | |
| download | lingo2-archipelago-d77c73397b684faa55f0e95484ac89ca68bde1ad.tar.gz lingo2-archipelago-d77c73397b684faa55f0e95484ac89ca68bde1ad.tar.bz2 lingo2-archipelago-d77c73397b684faa55f0e95484ac89ca68bde1ad.zip | |
Added "endings" object type
Diffstat (limited to 'tools/assign_ids')
| -rw-r--r-- | tools/assign_ids/main.cpp | 13 |
1 files changed, 13 insertions, 0 deletions
| diff --git a/tools/assign_ids/main.cpp b/tools/assign_ids/main.cpp index 2471bc5..77c0e5a 100644 --- a/tools/assign_ids/main.cpp +++ b/tools/assign_ids/main.cpp | |||
| @@ -87,6 +87,12 @@ class AssignIds { | |||
| 87 | } | 87 | } |
| 88 | } | 88 | } |
| 89 | 89 | ||
| 90 | for (const auto& [_, id] : id_mappings_.endings()) { | ||
| 91 | if (id > next_id_) { | ||
| 92 | next_id_ = id; | ||
| 93 | } | ||
| 94 | } | ||
| 95 | |||
| 90 | next_id_++; | 96 | next_id_++; |
| 91 | } | 97 | } |
| 92 | 98 | ||
| @@ -195,6 +201,13 @@ class AssignIds { | |||
| 195 | masteries[h_mastery.name()] = next_id_++; | 201 | masteries[h_mastery.name()] = next_id_++; |
| 196 | } | 202 | } |
| 197 | } | 203 | } |
| 204 | |||
| 205 | for (const HumanEnding& h_ending : h_room.endings()) { | ||
| 206 | if (!id_mappings_.endings().contains(h_ending.name())) { | ||
| 207 | auto& endings = *id_mappings_.mutable_endings(); | ||
| 208 | endings[h_ending.name()] = next_id_++; | ||
| 209 | } | ||
| 210 | } | ||
| 198 | } | 211 | } |
| 199 | 212 | ||
| 200 | private: | 213 | private: |
