Add files via upload
parent
bea0e3e310
commit
f5bdffe182
|
@ -0,0 +1,9 @@
|
|||
-- LUALOCALS < ---------------------------------------------------------
|
||||
local include, nodecore
|
||||
= include, nodecore
|
||||
-- LUALOCALS > ---------------------------------------------------------
|
||||
|
||||
include("turbine")
|
||||
include("waterwheel")
|
||||
--include("pipes_glass")
|
||||
--include("pipes_bamboo")
|
|
@ -0,0 +1,6 @@
|
|||
depends = nc_api_all, nc_items, nc_terrain, nc_fire, nc_lux, nc_lode, nc_igneous, nc_optics, nc_doors, wc_steam
|
||||
optional_depends = wc_dynamics, wc_naturae
|
||||
author = Winter94
|
||||
description = For all of your engineering needs!
|
||||
name = wc_steampunk
|
||||
title = NodeCore Steampunk Engineering
|
Binary file not shown.
After Width: | Height: | Size: 114 B |
|
@ -0,0 +1,33 @@
|
|||
-- LUALOCALS < ---------------------------------------------------------
|
||||
local minetest, nodecore, math, pairs
|
||||
= minetest, nodecore, math, pairs
|
||||
-- LUALOCALS > ---------------------------------------------------------
|
||||
|
||||
local modname = minetest.get_current_modname()
|
||||
|
||||
local directions = {
|
||||
{x=0, y=1, z=0},
|
||||
{x=0, y=-1, z=0},
|
||||
{x=1, y=0, z=0},
|
||||
{x=-1, y=0, z=0},
|
||||
{x=0, y=0, z=1},
|
||||
{x=0, y=0, z=-1},
|
||||
}
|
||||
|
||||
nodecore.register_abm({
|
||||
label = "steam power",
|
||||
nodenames = {"group:dense_gas"},
|
||||
neighbors = {"group:door"},
|
||||
interval = 1,
|
||||
chance = 1,
|
||||
action = function(pos)
|
||||
for _, dir in pairs(directions) do
|
||||
local outpos = vector.add(pos, dir)
|
||||
nodecore.operate_door(outpos, nil, dir)
|
||||
nodecore.set_node(pos, {name = "wc_steam:steam"})
|
||||
nodecore.sound_play("nc_api_craft_hiss", {pos = pos, gain = 0.02, fade = 1})
|
||||
end
|
||||
end
|
||||
})
|
||||
|
||||
|
|
@ -0,0 +1,31 @@
|
|||
-- LUALOCALS < ---------------------------------------------------------
|
||||
local minetest, nodecore, math, pairs
|
||||
= minetest, nodecore, math, pairs
|
||||
-- LUALOCALS > ---------------------------------------------------------
|
||||
local modname = minetest.get_current_modname()
|
||||
|
||||
local directions = {
|
||||
-- {x=0, y=1, z=0},
|
||||
{x=0, y=-1, z=0},
|
||||
-- {x=1, y=0, z=0},
|
||||
-- {x=-1, y=0, z=0},
|
||||
-- {x=0, y=0, z=1},
|
||||
-- {x=0, y=0, z=-1},
|
||||
}
|
||||
|
||||
|
||||
nodecore.register_abm({
|
||||
label = "waterwheel",
|
||||
nodenames = {"group:water"},
|
||||
neighbors = {"group:door"},
|
||||
neighbors_invert = true,
|
||||
interval = 1,
|
||||
chance = 1,
|
||||
action = function(pos)
|
||||
for _, dir in pairs(directions) do
|
||||
local outpos = vector.add(pos, dir)
|
||||
nodecore.operate_door(outpos, nil, dir)
|
||||
end
|
||||
end
|
||||
})
|
||||
|
Loading…
Reference in New Issue