forked from Ekdohibs/itest
-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathbatboxes.lua
More file actions
78 lines (72 loc) · 2.9 KB
/
batboxes.lua
File metadata and controls
78 lines (72 loc) · 2.9 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
minetest.register_node("voltbuild:batbox",{description="BatBox",
groups={energy=1, cracky=2, energy_consumer=1, energy_storage=1},
paramtype2 = "facedir",
legacy_facedir_simple = true,
tiles={"itest_batbox_side.png", "itest_batbox_side.png", "itest_batbox_output.png", "itest_batbox_side.png", "itest_batbox_side.png", "itest_batbox_side.png"},
voltbuild = {max_energy = 3000, max_psize = 32, max_tier=1,
max_stress=2000,active=true},
documentation = {summary="Low voltage energy storage for later use."},
on_construct = function(pos)
local meta = minetest.env:get_meta(pos)
meta:set_int("energy",0)
meta:set_string("formspec", storage.get_formspec(pos))
storage.on_construct(pos)
end,
can_dig = storage.can_dig,
allow_metadata_inventory_put = voltbuild.allow_metadata_inventory_put,
allow_metadata_inventory_move = voltbuild.allow_metadata_inventory_move,
})
components.register_abm({
nodenames={"voltbuild:batbox"},
interval=1.0,
chance=1,
action = storage.abm
})
minetest.register_node("voltbuild:mfe_unit",{description="MFE Unit",
groups={energy=1, cracky=2, energy_consumer=1, energy_storage=1},
paramtype2 = "facedir",
legacy_facedir_simple = true,
tiles={"itest_mfe_side.png", "itest_mfe_side.png", "itest_mfe_output.png", "itest_mfe_side.png", "itest_mfe_side.png", "itest_mfe_side.png"},
voltbuild = {max_energy = 24000, max_psize = 128, max_tier=2,max_stress=2000,
active=true},
documentation = {summary="Medium voltage energy storage for later use."},
on_construct = function(pos)
local meta = minetest.env:get_meta(pos)
meta:set_int("energy",0)
meta:set_string("formspec", storage.get_formspec(pos))
storage.on_construct(pos)
end,
can_dig = storage.can_dig,
allow_metadata_inventory_put = voltbuild.allow_metadata_inventory_put,
allow_metadata_inventory_move = voltbuild.allow_metadata_inventory_move,
})
components.register_abm({
nodenames={"voltbuild:mfe_unit"},
interval=1.0,
chance=1,
action = storage.abm
})
minetest.register_node("voltbuild:mfs_unit",{description="MFS Unit",
groups={energy=1, cracky=2, energy_consumer=1, energy_storage=1},
paramtype2 = "facedir",
legacy_facedir_simple = true,
tiles={"itest_mfsu_side.png", "itest_mfsu_side.png", "itest_mfsu_output.png", "itest_mfsu_side.png", "itest_mfsu_side.png", "itest_mfsu_side.png"},
voltbuild = {max_energy = 240000, max_psize = 512,max_tier=3,max_stress=2000,
active=true},
documentation = {summary="High voltage energy storage for later use."},
on_construct = function(pos)
local meta = minetest.env:get_meta(pos)
meta:set_int("energy",0)
meta:set_string("formspec", storage.get_formspec(pos))
storage.on_construct(pos)
end,
can_dig = storage.can_dig,
allow_metadata_inventory_put = voltbuild.allow_metadata_inventory_put,
allow_metadata_inventory_move = voltbuild.allow_metadata_inventory_move,
})
components.register_abm({
nodenames={"voltbuild:mfs_unit"},
interval=1.0,
chance=1,
action = storage.abm
})