Backpack clothing type added.
This commit is contained in:
@@ -502,8 +502,9 @@ bool load_game_state_from_raw(const string&in rawData) {
|
||||
if (get_raw_number(rawData, "equipment_feet", value)) equipped_feet = value;
|
||||
if (get_raw_number(rawData, "equipment_arms", value)) equipped_arms = value;
|
||||
|
||||
if (equipped_arms != EQUIP_POUCH) equipped_arms = EQUIP_NONE;
|
||||
if (equipped_arms != EQUIP_POUCH && equipped_arms != EQUIP_BACKPACK) equipped_arms = EQUIP_NONE;
|
||||
if (equipped_arms == EQUIP_POUCH && inv_skin_pouches <= 0) equipped_arms = EQUIP_NONE;
|
||||
if (equipped_arms == EQUIP_BACKPACK && inv_backpacks <= 0) equipped_arms = EQUIP_NONE;
|
||||
if (incense_hours_remaining > 0) incense_burning = true;
|
||||
|
||||
if (inv_small_game_types.length() == 0 && inv_small_game > 0) {
|
||||
@@ -895,15 +896,16 @@ bool load_game_state() {
|
||||
if (equipped_hands != EQUIP_GLOVES) equipped_hands = EQUIP_NONE;
|
||||
if (equipped_legs != EQUIP_PANTS) equipped_legs = EQUIP_NONE;
|
||||
if (equipped_feet != EQUIP_MOCCASINS) equipped_feet = EQUIP_NONE;
|
||||
if (equipped_arms != EQUIP_POUCH) equipped_arms = EQUIP_NONE;
|
||||
if (equipped_arms != EQUIP_POUCH && equipped_arms != EQUIP_BACKPACK) equipped_arms = EQUIP_NONE;
|
||||
if (equipped_arms == EQUIP_POUCH && inv_skin_pouches <= 0) equipped_arms = EQUIP_NONE;
|
||||
if (equipped_arms == EQUIP_BACKPACK && inv_backpacks <= 0) equipped_arms = EQUIP_NONE;
|
||||
reset_quick_slots();
|
||||
string[] loadedQuickSlots = get_string_list_or_split(saveData, "equipment_quick_slots");
|
||||
uint slot_count = loadedQuickSlots.length();
|
||||
if (slot_count > quick_slots.length()) slot_count = quick_slots.length();
|
||||
for (uint i = 0; i < slot_count; i++) {
|
||||
int slot_value = parse_int(loadedQuickSlots[i]);
|
||||
if (slot_value >= EQUIP_NONE && slot_value <= EQUIP_POUCH) {
|
||||
if (slot_value >= EQUIP_NONE && slot_value <= EQUIP_BACKPACK) {
|
||||
quick_slots[i] = slot_value;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user