Skip to content

Commit

Permalink
Increase the amount of salt stored in a sack; add a stockpile for exc…
Browse files Browse the repository at this point in the history
…ess salt piles.
  • Loading branch information
vornne committed Jul 7, 2013
1 parent a3fa71b commit a263f2e
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 8 deletions.
2 changes: 1 addition & 1 deletion module_items.py
Expand Up @@ -1002,7 +1002,7 @@ def itm_butchering_knife():
["carrot", "Carrot", [("pw_carrot",0)], itp_type_one_handed_wpn|itp_primary|itp_no_parry, itc_dagger|itcf_carry_dagger_front_right,
15, weight(0.25)|spd_rtng(90)|weapon_length(25)|swing_damage(0,cut), imodbits_none, [itm_class(item_class_food, 8)]],
["salt_sack", "Salt Sack", [("pw_salt_sack",0)], itp_type_one_handed_wpn|itp_primary|itp_no_parry, itc_dagger|itcf_carry_quiver_right_vertical,
400, weight(1.5)|spd_rtng(60)|swing_damage(5,blunt)|thrust_damage(5,blunt)|weapon_length(20), imodbits_none, [itm_class(item_class_food, 0)]],
1600, weight(1.5)|spd_rtng(60)|swing_damage(5,blunt)|thrust_damage(5,blunt)|weapon_length(20), imodbits_none, [itm_class(item_class_food, 0)]],
["salt", "Salt", [("pw_salt",0)], itp_type_one_handed_wpn|itp_primary, itc_dagger,
100, weight(0.25)|spd_rtng(70)|swing_damage(5,blunt)|thrust_damage(5,blunt)|weapon_length(20), imodbits_none, [itm_class(item_class_food, 0)]],

Expand Down
1 change: 1 addition & 0 deletions module_scene_props.py
Expand Up @@ -2334,6 +2334,7 @@ def spr_destroy_heap_triggers():
("pw_stockpile_iron_bar",spr_use_time(1),"pw_chest_c","bo_pw_chest_c", spr_stockpile_resource_triggers("itm_iron_bar")),
("pw_stockpile_flour_sack",spr_use_time(1),"mill_flour_sack_desk_a","bo_mill_flour_sack_desk_a_fixed", spr_stockpile_resource_triggers("itm_flour_sack")),
("pw_stockpile_salt_sack",spr_use_time(1),"pw_salt_sack","bo_pw_weapon_small", spr_stockpile_resource_triggers("itm_salt_sack")),
("pw_stockpile_salt",spr_use_time(1),"pw_salt","bo_pw_weapon_small", spr_stockpile_resource_triggers("itm_salt")),
("pw_stockpile_salted_fish",spr_use_time(1),"pw_fish","bo_pw_weapon_small", spr_stockpile_resource_triggers("itm_salted_fish")),
("pw_stockpile_salted_meat",spr_use_time(1),"pw_meat_salted","bo_pw_weapon", spr_stockpile_resource_triggers("itm_salted_meat")),
("pw_stockpile_wheat_sheaf",spr_use_time(1),"pw_wheat_sheaf","bo_pw_weapon", spr_stockpile_resource_triggers("itm_wheat_sheaf")),
Expand Down
23 changes: 16 additions & 7 deletions module_scripts.py
Expand Up @@ -6764,19 +6764,28 @@ def generate_store_profile_options(): # generate operations to store on/off sett
("spawn_processed_resources", # server: spawn a row of items on the ground in front of the agent; overwrites pos1
[(store_script_param, ":agent_id", 1), # must be valid
(store_script_param, ":processed_item_id", 2),
(store_script_param, ":processed_item_count", 3), # limited to a maximum of 10
(store_script_param, ":processed_item_count", 3),

(val_min, ":processed_item_count", 10),
(agent_get_position, pos1, ":agent_id"),
(position_set_z_to_ground_level, pos1),
(position_move_y, pos1, 10),
(store_div, ":move_x", ":processed_item_count", 2),
(val_mul, ":move_x", -10),
(position_move_x, pos1, ":move_x"),
(try_begin),
(gt, ":processed_item_count", 2),
(position_move_x, pos1, -20),
(try_end),
(assign, ":column", 0),
(try_for_range, ":unused", 0, ":processed_item_count"),
(set_spawn_position, pos1),
(spawn_item, ":processed_item_id", 0, "$g_spawn_item_prune_time"),
(position_move_x, pos1, 10),
(try_begin),
(lt, ":column", 3),
(position_move_x, pos1, 10),
(val_add, ":column", 1),
(else_try),
(assign, ":column", 0),
(position_move_y, pos1, 10),
(position_move_x, pos1, -30),
(try_end),
(try_end),
]),

Expand Down Expand Up @@ -7150,7 +7159,7 @@ def generate_process_init(skill=None, level=1, resource_class=None, start_effect
(else_try),
(eq, ":resource_item_id", "itm_salt_sack"),
(call_script, "script_cf_agent_consume_item", ":agent_id", "itm_salt_sack", 1),
(call_script, "script_spawn_processed_resources", ":agent_id", "itm_salt", 4),
(call_script, "script_spawn_processed_resources", ":agent_id", "itm_salt", 16),
(try_end),
(neq, ":processed_item_id", -1),
(call_script, "script_cf_agent_consume_items", ":agent_id", "itm_salt", ":resource_item_id", ":resource_item_id", ":resource_item_id"),
Expand Down

0 comments on commit a263f2e

Please sign in to comment.