Weather system added, mostly decoration. Some tweaks to residents. Moved altar to its own menu, s for sacrifice. You can no longer burn incense outside the base.
This commit is contained in:
@@ -257,6 +257,9 @@ void deposit_item(int item_type) {
|
||||
else if (item_type == ITEM_SMALL_GAME) { inv_small_game -= amount; storage_small_game += amount; move_small_game_to_storage(amount); }
|
||||
else if (item_type == ITEM_MEAT) { inv_meat -= amount; storage_meat += amount; }
|
||||
else if (item_type == ITEM_SKINS) { inv_skins -= amount; storage_skins += amount; }
|
||||
else if (item_type == ITEM_FEATHERS) { inv_feathers -= amount; storage_feathers += amount; }
|
||||
else if (item_type == ITEM_DOWN) { inv_down -= amount; storage_down += amount; }
|
||||
else if (item_type == ITEM_INCENSE) { inv_incense -= amount; storage_incense += amount; }
|
||||
else if (item_type == ITEM_SPEARS) { inv_spears -= amount; storage_spears += amount; }
|
||||
else if (item_type == ITEM_SLINGS) { inv_slings -= amount; storage_slings += amount; }
|
||||
else if (item_type == ITEM_AXES) { inv_axes -= amount; storage_axes += amount; }
|
||||
@@ -301,6 +304,9 @@ void withdraw_item(int item_type) {
|
||||
else if (item_type == ITEM_SMALL_GAME) { storage_small_game -= amount; inv_small_game += amount; move_small_game_to_personal(amount); }
|
||||
else if (item_type == ITEM_MEAT) { storage_meat -= amount; inv_meat += amount; }
|
||||
else if (item_type == ITEM_SKINS) { storage_skins -= amount; inv_skins += amount; }
|
||||
else if (item_type == ITEM_FEATHERS) { storage_feathers -= amount; inv_feathers += amount; }
|
||||
else if (item_type == ITEM_DOWN) { storage_down -= amount; inv_down += amount; }
|
||||
else if (item_type == ITEM_INCENSE) { storage_incense -= amount; inv_incense += amount; }
|
||||
else if (item_type == ITEM_SPEARS) { storage_spears -= amount; inv_spears += amount; }
|
||||
else if (item_type == ITEM_SLINGS) { storage_slings -= amount; inv_slings += amount; }
|
||||
else if (item_type == ITEM_AXES) { storage_axes -= amount; inv_axes += amount; }
|
||||
@@ -341,6 +347,9 @@ void sacrifice_item(int item_type) {
|
||||
}
|
||||
else if (item_type == ITEM_MEAT) inv_meat--;
|
||||
else if (item_type == ITEM_SKINS) inv_skins--;
|
||||
else if (item_type == ITEM_FEATHERS) inv_feathers--;
|
||||
else if (item_type == ITEM_DOWN) inv_down--;
|
||||
else if (item_type == ITEM_INCENSE) inv_incense--;
|
||||
else if (item_type == ITEM_SPEARS) inv_spears--;
|
||||
else if (item_type == ITEM_SLINGS) inv_slings--;
|
||||
else if (item_type == ITEM_AXES) inv_axes--;
|
||||
@@ -375,6 +384,9 @@ void build_personal_inventory_options(string[]@ options, int[]@ item_types) {
|
||||
options.insert_last("Small Game: " + inv_small_game); item_types.insert_last(ITEM_SMALL_GAME);
|
||||
options.insert_last("Meat: " + inv_meat); item_types.insert_last(ITEM_MEAT);
|
||||
options.insert_last("Skins: " + inv_skins); item_types.insert_last(ITEM_SKINS);
|
||||
options.insert_last("Feathers: " + inv_feathers); item_types.insert_last(ITEM_FEATHERS);
|
||||
options.insert_last("Down: " + inv_down); item_types.insert_last(ITEM_DOWN);
|
||||
options.insert_last("Incense: " + inv_incense); item_types.insert_last(ITEM_INCENSE);
|
||||
options.insert_last("Spears: " + inv_spears); item_types.insert_last(ITEM_SPEARS);
|
||||
options.insert_last("Slings: " + inv_slings); item_types.insert_last(ITEM_SLINGS);
|
||||
options.insert_last("Axes: " + inv_axes); item_types.insert_last(ITEM_AXES);
|
||||
@@ -404,6 +416,9 @@ void build_storage_inventory_options(string[]@ options, int[]@ item_types) {
|
||||
options.insert_last("Small Game: " + storage_small_game); item_types.insert_last(ITEM_SMALL_GAME);
|
||||
options.insert_last("Meat: " + storage_meat); item_types.insert_last(ITEM_MEAT);
|
||||
options.insert_last("Skins: " + storage_skins); item_types.insert_last(ITEM_SKINS);
|
||||
options.insert_last("Feathers: " + storage_feathers); item_types.insert_last(ITEM_FEATHERS);
|
||||
options.insert_last("Down: " + storage_down); item_types.insert_last(ITEM_DOWN);
|
||||
options.insert_last("Incense: " + storage_incense); item_types.insert_last(ITEM_INCENSE);
|
||||
options.insert_last("Spears: " + storage_spears); item_types.insert_last(ITEM_SPEARS);
|
||||
options.insert_last("Slings: " + storage_slings); item_types.insert_last(ITEM_SLINGS);
|
||||
options.insert_last("Axes: " + storage_axes); item_types.insert_last(ITEM_AXES);
|
||||
@@ -431,7 +446,10 @@ void show_inventory() {
|
||||
info += inv_clay + " clay, ";
|
||||
info += inv_small_game + " small game, ";
|
||||
info += inv_meat + " meat, ";
|
||||
info += inv_skins + " skins. ";
|
||||
info += inv_skins + " skins, ";
|
||||
info += inv_feathers + " feathers, ";
|
||||
info += inv_down + " down, ";
|
||||
info += inv_incense + " incense. ";
|
||||
info += "Tools: " + inv_spears + " spears, " + inv_slings + " slings, " + inv_axes + " axes, " + inv_snares + " snares, " + inv_knives + " knives, " + inv_fishing_poles + " fishing poles, " + inv_ropes + " ropes, " + inv_reed_baskets + " reed baskets, " + inv_clay_pots + " clay pots. ";
|
||||
info += "Clothing: " + inv_skin_hats + " hats, " + inv_skin_gloves + " gloves, " + inv_skin_pants + " pants, " + inv_skin_tunics + " tunics, " + inv_moccasins + " moccasins, " + inv_skin_pouches + " skin pouches.";
|
||||
screen_reader_speak(info, true);
|
||||
@@ -550,12 +568,25 @@ void run_storage_menu() {
|
||||
}
|
||||
}
|
||||
|
||||
void run_altar_menu() {
|
||||
void check_altar_menu(int player_x) {
|
||||
if (!key_pressed(KEY_S)) return;
|
||||
|
||||
// Must be in base
|
||||
if (player_x > BASE_END) {
|
||||
screen_reader_speak("Must be in base to use altar.", true);
|
||||
return;
|
||||
}
|
||||
|
||||
// Must have altar
|
||||
if (world_altars.length() == 0) {
|
||||
screen_reader_speak("No altar built.", true);
|
||||
return;
|
||||
}
|
||||
|
||||
run_altar_menu();
|
||||
}
|
||||
|
||||
void run_altar_menu() {
|
||||
screen_reader_speak("Altar. Favor " + format_favor(favor) + ".", true);
|
||||
|
||||
int selection = 0;
|
||||
@@ -635,6 +666,26 @@ void try_feed_fire_log(WorldFire@ fire) {
|
||||
}
|
||||
}
|
||||
|
||||
void try_burn_incense() {
|
||||
if (world_altars.length() == 0) {
|
||||
screen_reader_speak("No altar built.", true);
|
||||
return;
|
||||
}
|
||||
if (inv_clay_pots <= 0) {
|
||||
screen_reader_speak("You need a clay pot to burn incense.", true);
|
||||
return;
|
||||
}
|
||||
if (inv_incense <= 0) {
|
||||
screen_reader_speak("No incense to burn.", true);
|
||||
return;
|
||||
}
|
||||
|
||||
inv_incense--;
|
||||
incense_hours_remaining += INCENSE_HOURS_PER_STICK;
|
||||
incense_burning = true;
|
||||
screen_reader_speak("Incense burning. " + incense_hours_remaining + " hours remaining.", true);
|
||||
}
|
||||
|
||||
void check_equipment_menu() {
|
||||
if (key_pressed(KEY_E)) {
|
||||
// Check if player has any equipment
|
||||
@@ -678,6 +729,11 @@ void run_action_menu(int x) {
|
||||
}
|
||||
}
|
||||
|
||||
if (x <= BASE_END && world_altars.length() > 0 && inv_incense > 0) {
|
||||
options.insert_last("Burn incense");
|
||||
action_types.insert_last(4);
|
||||
}
|
||||
|
||||
while(true) {
|
||||
wait(5);
|
||||
menu_background_tick();
|
||||
@@ -708,6 +764,8 @@ void run_action_menu(int x) {
|
||||
try_feed_fire_vine(nearby_fire);
|
||||
} else if (action == 3) {
|
||||
try_feed_fire_log(nearby_fire);
|
||||
} else if (action == 4) {
|
||||
try_burn_incense();
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user