RitualBelt now has an API.
This commit is contained in:
parent
31b35b43eb
commit
a70f11646a
3 changed files with 30 additions and 3 deletions
16
rituals.cpp
16
rituals.cpp
|
@ -102,4 +102,20 @@ namespace combat {
|
|||
|
||||
fmt::println("\n");
|
||||
}
|
||||
|
||||
RitualAction& RitualBelt::get(int index) {
|
||||
return equipped.at(index);
|
||||
}
|
||||
|
||||
void RitualBelt::equip(int index, RitualAction& action) {
|
||||
equipped.insert_or_assign(index, action);
|
||||
}
|
||||
|
||||
bool RitualBelt::has(int index) {
|
||||
return equipped.contains(index);
|
||||
}
|
||||
|
||||
void RitualBelt::unequip(int index) {
|
||||
equipped.erase(index);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue