diff options
author | Vanessa Ezekowitz <vanessaezekowitz@gmail.com> | 2017-09-30 16:46:40 -0400 |
---|---|---|
committer | Vanessa Ezekowitz <vanessaezekowitz@gmail.com> | 2017-09-30 16:47:17 -0400 |
commit | 028c135fb761242b2207ef5efc997dc413353c1e (patch) | |
tree | 3aec16440ff708e305113135e1547a56b8260fcc /devices.lua | |
parent | 879b4489b21946306004506bea51b32f6d9de6a2 (diff) |
add pressure gaugeorigin/pressure-gauge
(doesn't work yet, and won't pass water)
Diffstat (limited to 'devices.lua')
-rw-r--r-- | devices.lua | 73 |
1 files changed, 73 insertions, 0 deletions
diff --git a/devices.lua b/devices.lua index 3b7fc78..fcbd264 100644 --- a/devices.lua +++ b/devices.lua @@ -476,6 +476,79 @@ minetest.register_node("pipeworks:flow_sensor_loaded", { on_rotate = pipeworks.fix_after_rotation }) +-- pressure gauge + +minetest.register_node("pipeworks:pressure_gauge_empty", { + description = "Pressure Gauge", + drawtype = "mesh", + mesh = "pipeworks_pressure_gauge.obj", + tiles = { + "pipeworks_pressure_gauge.png", + "pipeworks_pressure_gauge_0.png" + }, + sunlight_propagates = true, + paramtype = "light", + paramtype2 = "facedir", + groups = {snappy=3, pipe=1}, + sounds = default.node_sound_wood_defaults(), + walkable = true, + on_place = pipeworks.rotate_on_place, + after_dig_node = function(pos) + pipeworks.scan_for_pipe_objects(pos) + end, + selection_box = { + type = "fixed", + fixed = { + { -2/16, -2/16, -8/16, 2/16, 2/16, 8/16 }, + { -3/16, -3/16, -4/16, 3/16, 3/16, 4/16 }, + } + }, + collision_box = { + type = "fixed", + fixed = { + { -2/16, -2/16, -8/16, 2/16, 2/16, 8/16 }, + { -3/16, -3/16, -4/16, 3/16, 3/16, 4/16 }, + } + }, + on_rotate = pipeworks.fix_after_rotation +}) + +minetest.register_node("pipeworks:pressure_gauge_loaded", { + description = "Pressure Gauge", + drawtype = "mesh", + mesh = "pipeworks_pressure_gauge.obj", + tiles = { + "pipeworks_pressure_gauge.png", + "pipeworks_pressure_gauge_3.png" + }, + sunlight_propagates = true, + paramtype = "light", + paramtype2 = "facedir", + groups = {snappy=3, pipe=1, not_in_creative_inventory=1}, + sounds = default.node_sound_wood_defaults(), + walkable = true, + on_place = pipeworks.rotate_on_place, + after_dig_node = function(pos) + pipeworks.scan_for_pipe_objects(pos) + end, + selection_box = { + type = "fixed", + fixed = { + { -2/16, -2/16, -8/16, 2/16, 2/16, 8/16 }, + { -3/16, -3/16, -4/16, 3/16, 3/16, 4/16 }, + } + }, + collision_box = { + type = "fixed", + fixed = { + { -2/16, -2/16, -8/16, 2/16, 2/16, 8/16 }, + { -3/16, -3/16, -4/16, 3/16, 3/16, 4/16 }, + } + }, + drop = "pipeworks:pressure_gauge_empty", + on_rotate = pipeworks.fix_after_rotation +}) + -- tanks for fill = 0, 10 do |