add option to use game creator section ID

This commit is contained in:
Martin Michelsen
2024-03-09 09:45:20 -08:00
parent 64f2cb8f9e
commit 2aae90e65a
9 changed files with 58 additions and 27 deletions
+10 -8
View File
@@ -50,14 +50,16 @@ void ItemCreator::set_random_crypt(shared_ptr<PSOLFGEncryption> new_random_crypt
}
void ItemCreator::set_section_id(uint8_t new_section_id) {
this->section_id = new_section_id;
this->log.prefix = string_printf("[ItemCreator:%s/%s/%s/%c/%hhu] ",
name_for_enum(stack_limits->version),
abbreviation_for_episode(episode),
abbreviation_for_mode(mode),
abbreviation_for_difficulty(difficulty),
this->section_id);
this->pt = common_item_set->get_table(this->episode, this->mode, this->difficulty, this->section_id);
if (this->section_id != new_section_id) {
this->section_id = new_section_id;
this->log.prefix = string_printf("[ItemCreator:%s/%s/%s/%c/%hhu] ",
name_for_enum(stack_limits->version),
abbreviation_for_episode(episode),
abbreviation_for_mode(mode),
abbreviation_for_difficulty(difficulty),
this->section_id);
this->pt = common_item_set->get_table(this->episode, this->mode, this->difficulty, this->section_id);
}
}
bool ItemCreator::are_rare_drops_allowed() const {