60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
...
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
...
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
...
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
...
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
|
'sorcery_conduit_copper_side.png';
};
groups = {
sorcery_ley_device = 1;
cracky = 3;
};
_sorcery = {
ley = { mode = 'signal'; power = 10 };
};
})
minetest.register_craft {
output = 'sorcery:conduit 4';
recipe = {
{'default:copper_ingot', 'default:copper_ingot', 'default:copper_ingot'};
{'default:copper_ingot', 'sorcery:electrumblock', 'default:copper_ingot'};
................................................................................
paramtype2 = 'facedir';
groups = {
cracky = 2;
choppy = 1;
sorcery_ley_device = 1;
};
_sorcery = {
ley = { mode = 'signal'; power = 5; }
};
tiles = tiles;
})
minetest.register_craft {
output = id .. ' 4';
recipe = {
{item, 'sorcery:conduit'};
................................................................................
if props and props.on_leychange then
props.on_leychange(pos)
end
end
end
sorcery.ley.notify = function(pos)
local n = sorcery.ley.mapnet(pos)
sorcery.ley.notifymap(n.map)
end
sorcery.ley.field_to_current = function(strength,time)
local ley_factor = 0.25
-- a ley harvester will produce this much current with
-- access to a full-strength leyline
................................................................................
sorcery_ley_device = 1;
sorcery_magitech = 1;
};
on_construct = function(pos)
local meta = minetest.get_meta(pos)
meta:set_string('infotext','Condenser')
end;
on_rightclick = function(pos)
local c = sorcery.ley.netcaps(pos,1)
c.net.devices.signal = nil
print('LEYNET', dump(c))
end;
_sorcery = {
ley = { mode = 'produce';
power = function(pos,time)
return sorcery.ley.field_to_current(sorcery.ley.estimate(pos).force, time);
end;
affinity = function(pos)
return sorcery.ley.estimate(pos).aff
................................................................................
]], math.floor(burnprog * 100)) .. lamps)
end
for _,active in pairs{true,false} do
local id = 'sorcery:generator' .. (active and '_active' or '')
minetest.register_node(id, {
description = 'Generator';
paramtype2 = 'facedir';
groups = { cracky = 2; sorcery_ley_device = 1; };
drop = 'sorcery:generator';
tiles = {
'sorcery_ley_generator_top.png';
'sorcery_ley_generator_bottom.png';
'sorcery_ley_generator_side.png';
'sorcery_ley_generator_side.png';
'sorcery_ley_generator_back.png';
|
|
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
...
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
...
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
...
311
312
313
314
315
316
317
318
319
320
321
322
323
324
...
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
|
'sorcery_conduit_copper_side.png';
};
groups = {
sorcery_ley_device = 1;
cracky = 3;
};
_sorcery = {
ley = { mode = 'signal'; power = 100 };
};
})
minetest.register_craft {
output = 'sorcery:conduit 4';
recipe = {
{'default:copper_ingot', 'default:copper_ingot', 'default:copper_ingot'};
{'default:copper_ingot', 'sorcery:electrumblock', 'default:copper_ingot'};
................................................................................
paramtype2 = 'facedir';
groups = {
cracky = 2;
choppy = 1;
sorcery_ley_device = 1;
};
_sorcery = {
ley = { mode = 'signal'; power = 50; }
};
tiles = tiles;
})
minetest.register_craft {
output = id .. ' 4';
recipe = {
{item, 'sorcery:conduit'};
................................................................................
if props and props.on_leychange then
props.on_leychange(pos)
end
end
end
sorcery.ley.notify = function(pos)
local n = sorcery.ley.mapnet(pos)
if n then sorcery.ley.notifymap(n.map) end
end
sorcery.ley.field_to_current = function(strength,time)
local ley_factor = 0.25
-- a ley harvester will produce this much current with
-- access to a full-strength leyline
................................................................................
sorcery_ley_device = 1;
sorcery_magitech = 1;
};
on_construct = function(pos)
local meta = minetest.get_meta(pos)
meta:set_string('infotext','Condenser')
end;
_sorcery = {
ley = { mode = 'produce';
power = function(pos,time)
return sorcery.ley.field_to_current(sorcery.ley.estimate(pos).force, time);
end;
affinity = function(pos)
return sorcery.ley.estimate(pos).aff
................................................................................
]], math.floor(burnprog * 100)) .. lamps)
end
for _,active in pairs{true,false} do
local id = 'sorcery:generator' .. (active and '_active' or '')
minetest.register_node(id, {
description = 'Generator';
paramtype2 = 'facedir';
groups = { cracky = 2; sorcery_ley_device = 1; sorcery_device_generator = active and 1 or 2};
drop = 'sorcery:generator';
tiles = {
'sorcery_ley_generator_top.png';
'sorcery_ley_generator_bottom.png';
'sorcery_ley_generator_side.png';
'sorcery_ley_generator_side.png';
'sorcery_ley_generator_back.png';
|