Skip to content

Commit 7dfb115

Browse files
authored
Harvest snow with shovels (#82730)
2 parents 12aec17 + f64216f commit 7dfb115

File tree

3 files changed

+96
-4
lines changed

3 files changed

+96
-4
lines changed
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
[
2+
{
3+
"type": "ter_furn_transform",
4+
"id": "f_snow_bowl",
5+
"furniture": [ { "result": "f_snow_bowl", "valid_furniture": [ "f_null" ] } ]
6+
},
7+
{
8+
"type": "effect_on_condition",
9+
"id": "EOC_SHOVEL_SNOW",
10+
"effect": [
11+
{
12+
"u_choose_adjacent_highlight": { "context_val": "_dig_loc" },
13+
"condition": {
14+
"and": [
15+
{ "map_terrain_with_flag": "SNOW_SOURCE", "loc": { "context_val": "loc" } },
16+
{ "map_furniture_id": "f_null", "loc": { "context_val": "loc" } }
17+
]
18+
},
19+
"message": "Select ice or snow to harvest from.",
20+
"failure_message": "There's no frozen terrain nearby"
21+
},
22+
{ "u_transform_radius": 0, "ter_furn_transform": "f_snow_bowl", "target_var": { "context_val": "_dig_loc" } },
23+
{
24+
"map_spawn_item": "water",
25+
"loc": { "context_val": "_dig_loc" },
26+
"count": 5,
27+
"flags": [ "SHREDDED", "FROZEN" ]
28+
}
29+
]
30+
}
31+
]

data/mods/aftershock_exoplanet/items/tools.json

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,52 @@
4040
}
4141
]
4242
},
43+
{
44+
"id": "g_shovel",
45+
"type": "ITEM",
46+
"subtypes": [ "TOOL" ],
47+
"copy-from": "g_shovel",
48+
"name": { "str": "trowel" },
49+
"description": "A small, sharp shovel, perfect for breaking off chunks of ice.",
50+
"material": [ "mc_steel", "plastic" ],
51+
"use_action": {
52+
"type": "effect_on_conditions",
53+
"ammo_scale": 1,
54+
"menu_text": "Harvest ice",
55+
"effect_on_conditions": [ "EOC_SHOVEL_SNOW" ]
56+
}
57+
},
58+
{
59+
"id": "shovel",
60+
"type": "ITEM",
61+
"subtypes": [ "TOOL" ],
62+
"copy-from": "shovel",
63+
"name": { "str": "shovel" },
64+
"description": "A shovel with a steel blade.",
65+
"material": [ "mc_steel", "plastic" ],
66+
"use_action": {
67+
"type": "effect_on_conditions",
68+
"ammo_scale": 1,
69+
"menu_text": "Harvest ice",
70+
"effect_on_conditions": [ "EOC_SHOVEL_SNOW" ]
71+
}
72+
},
73+
{
74+
"id": "shovel_snow",
75+
"looks_like": "shovel",
76+
"type": "ITEM",
77+
"copy-from": "shovel_snow",
78+
"subtypes": [ "TOOL" ],
79+
"name": { "str": "snow shovel" },
80+
"description": "A sturdy metal shovel used for picking up snow and moving it somewhere else.",
81+
"material": [ "mc_steel", "plastic" ],
82+
"use_action": {
83+
"type": "effect_on_conditions",
84+
"ammo_scale": 1,
85+
"menu_text": "Harvest ice",
86+
"effect_on_conditions": [ "EOC_SHOVEL_SNOW" ]
87+
}
88+
},
4389
{
4490
"id": "afs_imager",
4591
"type": "ITEM",

data/mods/aftershock_exoplanet/maps/furniture_and_terrain/terrain_groundxeno.json

Lines changed: 19 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434
"symbol": ".",
3535
"color": "light_blue",
3636
"move_cost": 2,
37-
"flags": [ "TRANSPARENT", "DIGGABLE", "FLAT", "ROUGH" ],
37+
"flags": [ "TRANSPARENT", "DIGGABLE", "SNOW_SOURCE", "FLAT", "ROUGH" ],
3838
"bash": {
3939
"str_min": 50,
4040
"str_max": 100,
@@ -196,7 +196,7 @@
196196
"symbol": ".",
197197
"color": "light_blue",
198198
"move_cost": 2,
199-
"flags": [ "TRANSPARENT", "DIGGABLE", "FLAT", "ROUGH" ],
199+
"flags": [ "TRANSPARENT", "DIGGABLE", "SNOW_SOURCE", "FLAT", "ROUGH" ],
200200
"bash": {
201201
"str_min": 8,
202202
"str_max": 100,
@@ -215,7 +215,7 @@
215215
"symbol": ".",
216216
"color": "light_blue",
217217
"move_cost": 4,
218-
"flags": [ "TRANSPARENT", "DIGGABLE", "FLAT" ],
218+
"flags": [ "TRANSPARENT", "DIGGABLE", "SNOW_SOURCE", "FLAT" ],
219219
"bash": {
220220
"str_min": 8,
221221
"str_max": 100,
@@ -234,7 +234,7 @@
234234
"symbol": ".",
235235
"color": "light_blue",
236236
"move_cost": 4,
237-
"flags": [ "TRANSPARENT", "DIGGABLE", "FLAT" ],
237+
"flags": [ "TRANSPARENT", "DIGGABLE", "SNOW_SOURCE", "FLAT" ],
238238
"bash": {
239239
"str_min": 80,
240240
"str_max": 100,
@@ -436,6 +436,21 @@
436436
"flags": [ "NOITEM", "MINEABLE", "BLOCK_WIND" ],
437437
"bash": { "str_min": 64, "str_max": 160, "sound": "smash!", "sound_fail": "thump." }
438438
},
439+
{
440+
"type": "furniture",
441+
"id": "f_snow_bowl",
442+
"name": "snow bowl",
443+
"symbol": "o",
444+
"description": "A small depression dug from mostly clean snow. Can hold small amounts of liquid.",
445+
"color": "white",
446+
"move_cost_mod": 2,
447+
"coverage": 30,
448+
"required_str": -1,
449+
"flags": [ "TRANSPARENT", "FLAMMABLE_HARD", "CONTAINER", "PLACE_ITEM", "LIQUIDCONT", "UNSTABLE", "MOUNTABLE", "TINY" ],
450+
"max_volume": "8 L",
451+
"examine_action": "keg",
452+
"keg_capacity": "8 L"
453+
},
439454
{
440455
"type": "terrain",
441456
"id": "t_moxfloor",

0 commit comments

Comments
 (0)