Skip to content

Commit c7b153f

Browse files
authored
Is ground content (#110)
* trashcan isn't ground content * pipes aren't ground content * auto tree tap isn't ground content * filter-injectors aren't ground content * devices aren't ground content also some whitespace indentation fixes * is_ground_content * autocrafter isn't ground content * tubes aren't ground content * pane_embedded_tube isn't ground content * embedded_tube isn't ground content * routing tubes aren't ground content * whitespace fix indentation
1 parent 96dca7e commit c7b153f

11 files changed

+61
-27
lines changed

autocrafter.lua

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -433,6 +433,7 @@ minetest.register_node("pipeworks:autocrafter", {
433433
drawtype = "normal",
434434
tiles = {"pipeworks_autocrafter.png"},
435435
groups = {snappy = 3, tubedevice = 1, tubedevice_receiver = 1, dig_generic = 1, axey=1, handy=1, pickaxey=1},
436+
is_ground_content = false,
436437
_mcl_hardness=0.8,
437438
tube = {insert_object = function(pos, node, stack, direction)
438439
local meta = minetest.get_meta(pos)

changelog.txt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,11 @@ Changelog
33

44

55

6+
2024-02-26 (SwissalpS)
7+
set is_ground_content to false for various nodes.
8+
9+
10+
611
2023-06-22 (SwissalpS, rubenwardy)
712
groups support in recipe. Set recipe as usual via recipe formspec or digilines.
813
Autocrafter now resolves matching recipe using groups so that items in input

devices.lua

Lines changed: 40 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -148,6 +148,7 @@ for s in ipairs(states) do
148148
paramtype = "light",
149149
paramtype2 = "facedir",
150150
groups = dgroups,
151+
is_ground_content = false,
151152
_mcl_hardness=0.8,
152153
_sound_def = {
153154
key = "node_sound_metal_defaults",
@@ -203,6 +204,7 @@ for s in ipairs(states) do
203204
fixed = { -5/16, -4/16, -8/16, 5/16, 5/16, 8/16 }
204205
},
205206
groups = dgroups,
207+
is_ground_content = false,
206208
_mcl_hardness=0.8,
207209
_sound_def = {
208210
key = "node_sound_metal_defaults",
@@ -254,10 +256,11 @@ minetest.register_node(nodename_valve_loaded, {
254256
fixed = { -5/16, -4/16, -8/16, 5/16, 5/16, 8/16 }
255257
},
256258
groups = {snappy=3, pipe=1, not_in_creative_inventory=1, dig_generic = 4, axey=1, handy=1, pickaxey=1},
259+
is_ground_content = false,
257260
_mcl_hardness=0.8,
258261
_sound_def = {
259-
key = "node_sound_metal_defaults",
260-
},
262+
key = "node_sound_metal_defaults",
263+
},
261264
walkable = true,
262265
on_place = pipeworks.rotate_on_place,
263266
after_dig_node = function(pos)
@@ -307,10 +310,11 @@ minetest.register_node("pipeworks:grating", {
307310
sunlight_propagates = true,
308311
paramtype = "light",
309312
groups = {snappy=3, pipe=1, dig_generic = 4, axey=1, handy=1, pickaxey=1},
313+
is_ground_content = false,
310314
_mcl_hardness=0.8,
311315
_sound_def = {
312-
key = "node_sound_metal_defaults",
313-
},
316+
key = "node_sound_metal_defaults",
317+
},
314318
walkable = true,
315319
pipe_connections = { top = 1 },
316320
after_place_node = function(pos)
@@ -335,10 +339,11 @@ minetest.register_node(nodename_spigot_empty, {
335339
paramtype = "light",
336340
paramtype2 = "facedir",
337341
groups = {snappy=3, pipe=1, dig_generic = 4, axey=1, handy=1, pickaxey=1},
342+
is_ground_content = false,
338343
_mcl_hardness=0.8,
339344
_sound_def = {
340-
key = "node_sound_metal_defaults",
341-
},
345+
key = "node_sound_metal_defaults",
346+
},
342347
walkable = true,
343348
pipe_connections = { left=1, right=1, front=1, back=1,
344349
left_param2 = 3, right_param2 = 1, front_param2 = 2, back_param2 = 0 },
@@ -373,10 +378,11 @@ minetest.register_node(nodename_spigot_loaded, {
373378
paramtype = "light",
374379
paramtype2 = "facedir",
375380
groups = {snappy=3, pipe=1, not_in_creative_inventory=1, dig_generic = 4, axey=1, handy=1, pickaxey=1},
381+
is_ground_content = false,
376382
_mcl_hardness=0.8,
377383
_sound_def = {
378-
key = "node_sound_metal_defaults",
379-
},
384+
key = "node_sound_metal_defaults",
385+
},
380386
walkable = true,
381387
pipe_connections = { left=1, right=1, front=1, back=1,
382388
left_param2 = 3, right_param2 = 1, front_param2 = 2, back_param2 = 0 },
@@ -432,10 +438,11 @@ minetest.register_node(nodename_panel_empty, {
432438
paramtype = "light",
433439
paramtype2 = "facedir",
434440
groups = {snappy=3, pipe=1, dig_generic = 4, axey=1, handy=1, pickaxey=1},
441+
is_ground_content = false,
435442
_mcl_hardness=0.8,
436443
_sound_def = {
437-
key = "node_sound_metal_defaults",
438-
},
444+
key = "node_sound_metal_defaults",
445+
},
439446
walkable = true,
440447
on_place = pipeworks.rotate_on_place,
441448
after_dig_node = function(pos)
@@ -455,10 +462,11 @@ minetest.register_node(nodename_panel_loaded, {
455462
paramtype = "light",
456463
paramtype2 = "facedir",
457464
groups = {snappy=3, pipe=1, not_in_creative_inventory=1, dig_generic = 4, axey=1, handy=1, pickaxey=1},
465+
is_ground_content = false,
458466
_mcl_hardness=0.8,
459467
_sound_def = {
460-
key = "node_sound_metal_defaults",
461-
},
468+
key = "node_sound_metal_defaults",
469+
},
462470
walkable = true,
463471
on_place = pipeworks.rotate_on_place,
464472
after_dig_node = function(pos)
@@ -488,10 +496,11 @@ minetest.register_node(nodename_sensor_empty, {
488496
paramtype = "light",
489497
paramtype2 = "facedir",
490498
groups = {snappy=3, pipe=1, dig_generic = 4, axey=1, handy=1, pickaxey=1},
499+
is_ground_content = false,
491500
_mcl_hardness=0.8,
492501
_sound_def = {
493-
key = "node_sound_metal_defaults",
494-
},
502+
key = "node_sound_metal_defaults",
503+
},
495504
walkable = true,
496505
on_place = pipeworks.rotate_on_place,
497506
after_dig_node = function(pos)
@@ -530,10 +539,11 @@ minetest.register_node(nodename_sensor_loaded, {
530539
paramtype = "light",
531540
paramtype2 = "facedir",
532541
groups = {snappy=3, pipe=1, not_in_creative_inventory=1, dig_generic = 4, axey=1, handy=1, pickaxey=1},
542+
is_ground_content = false,
533543
_mcl_hardness=0.8,
534544
_sound_def = {
535-
key = "node_sound_metal_defaults",
536-
},
545+
key = "node_sound_metal_defaults",
546+
},
537547
walkable = true,
538548
on_place = pipeworks.rotate_on_place,
539549
after_dig_node = function(pos)
@@ -600,6 +610,7 @@ for fill = 0, 10 do
600610
paramtype = "light",
601611
paramtype2 = "facedir",
602612
groups = {snappy=3, pipe=1, tankfill=fill+1, not_in_creative_inventory=1, dig_generic = 4, axey=1, handy=1, pickaxey=1},
613+
is_ground_content = false,
603614
_mcl_hardness=0.8,
604615
_sound_def = {
605616
key = "node_sound_metal_defaults",
@@ -631,6 +642,7 @@ for fill = 0, 10 do
631642
paramtype = "light",
632643
paramtype2 = "facedir",
633644
groups = sgroups,
645+
is_ground_content = false,
634646
_mcl_hardness=0.8,
635647
_sound_def = {
636648
key = "node_sound_metal_defaults",
@@ -661,10 +673,11 @@ minetest.register_node(nodename_fountain_empty, {
661673
sunlight_propagates = true,
662674
paramtype = "light",
663675
groups = {snappy=3, pipe=1, dig_generic = 4, axey=1, handy=1, pickaxey=1},
676+
is_ground_content = false,
664677
_mcl_hardness=0.8,
665678
_sound_def = {
666-
key = "node_sound_metal_defaults",
667-
},
679+
key = "node_sound_metal_defaults",
680+
},
668681
walkable = true,
669682
pipe_connections = { bottom = 1 },
670683
after_place_node = function(pos)
@@ -699,10 +712,11 @@ minetest.register_node(nodename_fountain_loaded, {
699712
sunlight_propagates = true,
700713
paramtype = "light",
701714
groups = {snappy=3, pipe=1, not_in_creative_inventory=1, dig_generic = 4, axey=1, handy=1, pickaxey=1},
715+
is_ground_content = false,
702716
_mcl_hardness=0.8,
703717
_sound_def = {
704-
key = "node_sound_metal_defaults",
705-
},
718+
key = "node_sound_metal_defaults",
719+
},
706720
walkable = true,
707721
pipe_connections = { bottom = 1 },
708722
after_place_node = function(pos)
@@ -752,10 +766,11 @@ minetest.register_node(nodename_sp_empty, {
752766
paramtype = "light",
753767
paramtype2 = "facedir",
754768
groups = {snappy=3, pipe=1, dig_generic = 4, axey=1, handy=1, pickaxey=1},
769+
is_ground_content = false,
755770
_mcl_hardness=0.8,
756771
_sound_def = {
757-
key = "node_sound_metal_defaults",
758-
},
772+
key = "node_sound_metal_defaults",
773+
},
759774
walkable = true,
760775
on_place = pipeworks.rotate_on_place,
761776
after_dig_node = function(pos)
@@ -777,10 +792,11 @@ minetest.register_node(nodename_sp_loaded, {
777792
paramtype = "light",
778793
paramtype2 = "facedir",
779794
groups = {snappy=3, pipe=1, not_in_creative_inventory=1, dig_generic = 4, axey=1, handy=1, pickaxey=1},
795+
is_ground_content = false,
780796
_mcl_hardness=0.8,
781797
_sound_def = {
782-
key = "node_sound_metal_defaults",
783-
},
798+
key = "node_sound_metal_defaults",
799+
},
784800
walkable = true,
785801
on_place = pipeworks.rotate_on_place,
786802
after_dig_node = function(pos)

filter-injector.lua

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -389,6 +389,7 @@ for _, data in ipairs({
389389
},
390390
paramtype2 = "facedir",
391391
groups = {snappy = 2, choppy = 2, oddly_breakable_by_hand = 2, mesecon = 2, axey=1, handy=1, pickaxey=1},
392+
is_ground_content = false,
392393
_mcl_hardness=0.8,
393394
legacy_facedir_simple = true,
394395
_sound_def = {

legacy.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ if not minetest.get_modpath("auto_tree_tap") and
2424
description = S("Auto-Tap"),
2525
tiles = {"pipeworks_nodebreaker_top_off.png","pipeworks_nodebreaker_bottom_off.png","pipeworks_nodebreaker_side2_off.png","pipeworks_nodebreaker_side1_off.png",
2626
"pipeworks_nodebreaker_back.png","pipeworks_nodebreaker_front_off.png"},
27-
is_ground_content = true,
27+
is_ground_content = false,
2828
paramtype2 = "facedir",
2929
groups = {snappy=2,choppy=2,oddly_breakable_by_hand=2, mesecon = 2,tubedevice=1, not_in_creative_inventory=1, axey=1, handy=1, pickaxey=1},
3030
_mcl_hardness=0.8,

pipes.lua

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,7 @@ for index, connects in ipairs(cconnects) do
7676
fixed = outsel
7777
},
7878
groups = pgroups,
79+
is_ground_content = false,
7980
_mcl_hardness=0.8,
8081
_sound_def = {
8182
key = "node_sound_metal_defaults",
@@ -113,6 +114,7 @@ for index, connects in ipairs(cconnects) do
113114
fixed = outsel
114115
},
115116
groups = pgroups,
117+
is_ground_content = false,
116118
_mcl_hardness=0.8,
117119
_sound_def = {
118120
key = "node_sound_metal_defaults",
@@ -151,6 +153,7 @@ if REGISTER_COMPATIBILITY then
151153
paramtype = "light",
152154
description = S("Pipe Segment (legacy)"),
153155
groups = {not_in_creative_inventory = 1, pipe_to_update = 1},
156+
is_ground_content = false,
154157
drop = "pipeworks:pipe_1_empty",
155158
after_place_node = function(pos)
156159
pipeworks.scan_for_pipe_objects(pos)
@@ -163,6 +166,7 @@ if REGISTER_COMPATIBILITY then
163166
sunlight_propagates = true,
164167
paramtype = "light",
165168
groups = {not_in_creative_inventory = 1, pipe_to_update = 1},
169+
is_ground_content = false,
166170
drop = "pipeworks:pipe_1_empty",
167171
after_place_node = function(pos)
168172
pipeworks.scan_for_pipe_objects(pos)

trashcan.lua

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ minetest.register_node("pipeworks:trashcan", {
1111
"pipeworks_trashcan_side.png",
1212
},
1313
groups = {snappy = 3, tubedevice = 1, tubedevice_receiver = 1, dig_generic = 4, axey=1, handy=1, pickaxey=1},
14+
is_ground_content = false,
1415
_mcl_hardness=0.8,
1516
tube = {
1617
insert_object = function(pos, node, stack, direction)

tubes/embedded_tube.lua

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ function pipeworks.register_embedded_tube(nodename, opts)
2727
pickaxey=1,
2828
handy=1
2929
},
30+
is_ground_content = false,
3031
_mcl_hardness = 0.8,
3132
legacy_facedir_simple = true,
3233
_sound_def = {

tubes/pane_embedded_tube.lua

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,11 +31,12 @@ minetest.register_node("pipeworks:steel_pane_embedded_tube", {
3131
paramtype = "light",
3232
paramtype2 = "facedir",
3333
groups = {cracky=1, oddly_breakable_by_hand = 1, tubedevice = 1, dig_glass = 2, pickaxey=1, handy=1},
34+
is_ground_content = false,
3435
_mcl_hardness=0.8,
3536
legacy_facedir_simple = true,
3637
_sound_def = {
37-
key = "node_sound_stone_defaults",
38-
},
38+
key = "node_sound_stone_defaults",
39+
},
3940
tube = {
4041
connect_sides = {front = 1, back = 1,},
4142
priority = 50,

tubes/registration.lua

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,7 @@ local register_one_tube = function(name, tname, dropname, desc, plain, noctrs, e
106106
fixed = outboxes
107107
},
108108
groups = tgroups,
109+
is_ground_content = false,
109110
_mcl_hardness=0.8,
110111
_sound_def = {
111112
key = "node_sound_wood_defaults",
@@ -227,6 +228,7 @@ local register_all_tubes = function(name, desc, plain, noctrs, ends, short, inv,
227228
description = S("Pneumatic tube segment (legacy)"),
228229
after_place_node = pipeworks.after_place,
229230
groups = {not_in_creative_inventory = 1, tube_to_update = 1, tube = 1},
231+
is_ground_content = false,
230232
tube = {connect_sides = {front = 1, back = 1, left = 1, right = 1, top = 1, bottom = 1}},
231233
drop = name.."_1",
232234
})

tubes/routing.lua

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@ pipeworks.register_tube("pipeworks:broken_tube", {
5050
node_def = {
5151
drop = "pipeworks:tube_1",
5252
groups = {not_in_creative_inventory = 1, tubedevice_receiver = 1},
53+
is_ground_content = false,
5354
tube = {
5455
insert_object = function(pos, node, stack, direction)
5556
minetest.item_drop(stack, nil, pos)
@@ -179,6 +180,7 @@ if pipeworks.enable_one_way_tube then
179180
node_box = {type = "fixed",
180181
fixed = {{-1/2, -9/64, -9/64, 1/2, 9/64, 9/64}}},
181182
groups = {snappy = 2, choppy = 2, oddly_breakable_by_hand = 2, tubedevice = 1, axey=1, handy=1, pickaxey=1},
183+
is_ground_content = false,
182184
_mcl_hardness=0.8,
183185
_sound_def = {
184186
key = "node_sound_wood_defaults",

0 commit comments

Comments
 (0)