From 108c06d1d25763bc26ba6eb787e728e82ec76d0f Mon Sep 17 00:00:00 2001 From: Joachim Stolberg Date: Mon, 2 Mar 2020 21:51:18 +0100 Subject: [PATCH] icta controller, wall pipe improved, red stone added --- README.md | 6 +- coal_power_station/generator.lua | 2 +- energy_storage/generator.lua | 2 +- energy_storage/heatexchanger1.lua | 4 +- energy_storage/inlet.lua | 57 ++++++++++ hydrogen/electrolyzer.lua | 4 +- hydrogen/fuelcell.lua | 2 +- icta_controller/commands.lua | 55 ++++++++-- icta_controller/submenu.lua | 11 +- init.lua | 6 + items/redstone.lua | 103 ++++++++++++++++++ liquids/liquid_pipe.lua | 9 +- mod.conf | 2 +- solar/inverter.lua | 2 +- ta3_power/akkubox.lua | 4 +- ta3_power/tiny_generator.lua | 2 +- textures/techage_lua_controller.png | Bin 0 -> 346 bytes textures/techage_lua_controller_inventory.png | Bin 0 -> 838 bytes textures/techage_lua_server_back.png | Bin 0 -> 351 bytes textures/techage_lua_server_front.png | Bin 0 -> 326 bytes textures/techage_lua_server_side.png | Bin 0 -> 224 bytes textures/techage_lua_server_top.png | Bin 0 -> 265 bytes textures/techage_ramchip.png | Bin 811 -> 650 bytes textures/techage_server_back.png | Bin 0 -> 351 bytes textures/techage_server_front.png | Bin 0 -> 326 bytes textures/techage_server_side.png | Bin 0 -> 224 bytes textures/techage_server_top.png | Bin 0 -> 265 bytes tools/repairkit.lua | 8 +- wind_turbine/rotor.lua | 2 +- 29 files changed, 249 insertions(+), 32 deletions(-) create mode 100644 items/redstone.lua create mode 100644 textures/techage_lua_controller.png create mode 100644 textures/techage_lua_controller_inventory.png create mode 100644 textures/techage_lua_server_back.png create mode 100644 textures/techage_lua_server_front.png create mode 100644 textures/techage_lua_server_side.png create mode 100644 textures/techage_lua_server_top.png create mode 100644 textures/techage_server_back.png create mode 100644 textures/techage_server_front.png create mode 100644 textures/techage_server_side.png create mode 100644 textures/techage_server_top.png diff --git a/README.md b/README.md index 86135c8..f0d03f3 100644 --- a/README.md +++ b/README.md @@ -13,9 +13,9 @@ Textures: CC BY-SA 3.0 ### Dependencies -Required: default, doors, tubelib2, basic_materials, bucket, stairs, lcdlib -Optional: unified_inventory, wielded_light, minecart -Highly recommended: signs_bot, minecart +Required: default, doors, tubelib2, basic_materials, bucket, stairs, screwdriver, minecart, lcdlib, safer_lua +Optional: unified_inventory,wielded_light,unifieddyes +Highly recommended: signs_bot, hyperloop ### History diff --git a/coal_power_station/generator.lua b/coal_power_station/generator.lua index 1c39f1a..df907dd 100644 --- a/coal_power_station/generator.lua +++ b/coal_power_station/generator.lua @@ -222,7 +222,7 @@ techage.register_node({"techage:generator", "techage:generator_on"}, { end, on_recv_message = function(pos, src, topic, payload) local nvm = techage.get_nvm(pos) - if topic == "power" then + if topic == "delivered" then return math.floor((nvm.provided or 0) + 0.5) else return State:on_receive_message(pos, topic, payload) diff --git a/energy_storage/generator.lua b/energy_storage/generator.lua index 3da4f8b..beaf251 100644 --- a/energy_storage/generator.lua +++ b/energy_storage/generator.lua @@ -226,7 +226,7 @@ techage.register_node({"techage:ta4_generator", "techage:ta4_generator_on"}, { end, on_recv_message = function(pos, src, topic, payload) local nvm = techage.get_nvm(pos) - if topic == "power" then + if topic == "delivered" then return math.floor((nvm.provided or 0) + 0.5) else return State:on_receive_message(pos, topic, payload) diff --git a/energy_storage/heatexchanger1.lua b/energy_storage/heatexchanger1.lua index 826ada8..f0307bb 100644 --- a/energy_storage/heatexchanger1.lua +++ b/energy_storage/heatexchanger1.lua @@ -261,8 +261,8 @@ techage.register_node({"techage:heatexchanger1"}, { else return "stopped" end - elseif topic == "power" then - return math.max(nvm.needed or 0, 0) + elseif topic == "delivered" then + return -math.max(nvm.needed or 0, 0) elseif topic == "load" then return techage.power.percent(nvm.capa_max, nvm.capa) elseif topic == "on" then diff --git a/energy_storage/inlet.lua b/energy_storage/inlet.lua index 88a06d7..4eaeb7e 100644 --- a/energy_storage/inlet.lua +++ b/energy_storage/inlet.lua @@ -29,6 +29,26 @@ local function after_dig_node(pos, oldnode, oldmetadata, digger) Pipe:after_dig_node(pos) end +local function tubelib2_on_update2(pos, outdir, tlib2, node) + techage.liquid.update_network(pos, outdir) + local conn = M(pos):get_int("pipe2_conn") + if conn == 20 or conn == 40 then + -- replace node by tube + minetest.remove_node(pos) + Pipe:after_dig_node(pos) + node.name = "techage:ta4_wall_pipe" + minetest.set_node(pos, node) + Pipe:after_place_tube(pos) + end +end + +local networks_def = { + pipe2 = { + sides = {F=1, B=1}, + ntype = "tank", + }, +} + minetest.register_node("techage:ta4_pipe_inlet", { description = S("TA4 Pipe Inlet"), tiles = { @@ -43,6 +63,8 @@ minetest.register_node("techage:ta4_pipe_inlet", { after_place_node = after_place_node, after_dig_node = after_dig_node, + tubelib2_on_update2 = tubelib2_on_update2, + networks = networks_def, paramtype2 = "facedir", -- important! on_rotate = screwdriver.disallow, -- important! @@ -51,6 +73,41 @@ minetest.register_node("techage:ta4_pipe_inlet", { sounds = default.node_sound_metal_defaults(), }) +minetest.register_node("techage:ta4_wall_pipe", { + description = S("TA4 Wall Pipe"), + tiles = { + -- up, down, right, left, back, front + "basic_materials_concrete_block.png", + "basic_materials_concrete_block.png", + "basic_materials_concrete_block.png", + "basic_materials_concrete_block.png", + "basic_materials_concrete_block.png^techage_tes_inlet.png", + "basic_materials_concrete_block.png^techage_tes_inlet.png", + }, + + after_place_node = function(pos, placer, itemstack, pointed_thing) + if not Pipe:after_place_tube(pos, placer, pointed_thing) then + minetest.remove_node(pos) + return true + end + return false + end, + + after_dig_node = function(pos, oldnode, oldmetadata, digger) + if oldmetadata and oldmetadata.fields and oldmetadata.fields.tl2_param2 then + oldnode.param2 = oldmetadata.fields.tl2_param2 + Pipe:after_dig_tube(pos, oldnode) + end + end, + + paramtype2 = "facedir", -- important! + on_rotate = screwdriver.disallow, -- important! + groups = {crumbly = 2, cracky = 2, snappy = 2, not_in_creative_inventory = 1}, + is_ground_content = false, + drop = "techage:ta4_pipe_inlet", + sounds = default.node_sound_metal_defaults(), +}) + Pipe:add_secondary_node_names({"techage:ta4_pipe_inlet"}) local Numbers = { diff --git a/hydrogen/electrolyzer.lua b/hydrogen/electrolyzer.lua index eca3af6..658e253 100644 --- a/hydrogen/electrolyzer.lua +++ b/hydrogen/electrolyzer.lua @@ -285,8 +285,8 @@ techage.register_node({"techage:ta4_electrolyzer", "techage:ta4_electrolyzer_on" local nvm = techage.get_nvm(pos) if topic == "load" then return techage.power.percent(CAPACITY, (nvm.liquid and nvm.liquid.amount) or 0) - elseif topic == "power" then - return math.floor((nvm.taken or 0) + 0.5) + elseif topic == "delivered" then + return -math.floor((nvm.taken or 0) + 0.5) else return State:on_receive_message(pos, topic, payload) end diff --git a/hydrogen/fuelcell.lua b/hydrogen/fuelcell.lua index c6a83cd..0c71ea4 100644 --- a/hydrogen/fuelcell.lua +++ b/hydrogen/fuelcell.lua @@ -276,7 +276,7 @@ techage.register_node({"techage:ta4_fuelcell", "techage:ta4_fuelcell_on"}, { local nvm = techage.get_nvm(pos) if topic == "load" then return techage.power.percent(CAPACITY, (nvm.liquid and nvm.liquid.amount) or 0) - elseif topic == "power" then + elseif topic == "delivered" then return math.floor((nvm.given or 0) + 0.5) else return State:on_receive_message(pos, topic, payload) diff --git a/icta_controller/commands.lua b/icta_controller/commands.lua index f5dccf4..4685ce3 100644 --- a/icta_controller/commands.lua +++ b/icta_controller/commands.lua @@ -160,7 +160,7 @@ techage.icta_register_condition("input", { }) techage.icta_register_condition("state", { - title = "block state request", + title = "read block state", formspec = { { type = "number", @@ -198,7 +198,7 @@ techage.icta_register_condition("state", { }) techage.icta_register_condition("fuel", { - title = "fuel request", + title = "read amount of fuel", formspec = { { type = "number", @@ -235,7 +235,7 @@ techage.icta_register_condition("fuel", { }) techage.icta_register_condition("load", { - title = "load request", + title = "read power/liquid load", formspec = { { type = "number", @@ -271,8 +271,45 @@ techage.icta_register_condition("load", { end, }) +techage.icta_register_condition("delivered", { + title = "read delivered power", + formspec = { + { + type = "number", + name = "number", + label = "block number", + default = "", + }, + { + type = "textlist", + name = "operand", + label = "", + choices = "greater,less", + default = "greater", + }, + { + type = "digits", + name = "value", + label = "than", + default = "" + }, + { + type = "label", + name = "lbl", + label = "Read and evaluate the delivered\npower from a generator block.\nPower consuming blocks like accus\ncould also provide a negative value.", + }, + }, + button = function(data, environ) + return 'deliv('..techage.fmt_number(data.number)..","..data.operand..' '..data.value..')' + end, + code = function(data, environ) + return send_single_string(environ, data.number, "delivered"), + techage.operand(data.operand)..tonumber(data.value) + end, +}) + techage.icta_register_condition("chest", { - title = "chest state request", + title = "read chest state", formspec = { { type = "number", @@ -311,7 +348,7 @@ techage.icta_register_condition("chest", { }) techage.icta_register_condition("signaltower", { - title = "Signal Tower state request", + title = "read Signal Tower state", formspec = { { type = "number", @@ -347,7 +384,7 @@ techage.icta_register_condition("signaltower", { }) techage.icta_register_action("signaltower", { - title = "Signal Tower command", + title = "send Signal Tower command", formspec = { { type = "numbers", @@ -464,7 +501,7 @@ techage.icta_register_action("cleardisplay", { }) techage.icta_register_action("chat", { - title = "chat send", + title = "send chat message", formspec = { { type = "ascii", @@ -505,7 +542,7 @@ function techage.icta_door_toggle(pos, owner, state) end techage.icta_register_action("door", { - title = "doors open/close", + title = "open/close door", formspec = { { type = "digits", @@ -548,7 +585,7 @@ function techage.icta_player_detect(own_num, number, name) end techage.icta_register_condition("playerdetector", { - title = "Player Detector name request", + title = "read Player Detector", formspec = { { type = "number", diff --git a/icta_controller/submenu.lua b/icta_controller/submenu.lua index f428532..46a6264 100644 --- a/icta_controller/submenu.lua +++ b/icta_controller/submenu.lua @@ -34,7 +34,7 @@ local function add_controls_to_table(tbl, kvDefinition, kvSelect) tbl[#tbl+1] = "label[0,"..offs..";"..elem.label..":]" offs = offs + 0.4 end - if elem.type == "numbers" or elem.type == "digits" or elem.type == "letters" + if elem.type == "numbers" or elem.type == "number" or elem.type == "digits" or elem.type == "letters" or elem.type == "ascii" then val = kvSelect[elem.name] or elem.default tbl[#tbl+1] = "field[0.3,"..(offs+0.2)..";8,1;"..elem.name..";;"..val.."]" @@ -76,6 +76,15 @@ local function field_to_kvSelect(kvDefinition, kvSelect, fields) error = true end end + elseif elem.type == "number" then + if fields[elem.name] then + if fields[elem.name]:find("^[%d ]+$") then + kvSelect[elem.name] = fields[elem.name] + else + kvSelect[elem.name] = elem.default + error = true + end + end elseif elem.type == "digits" then -- including positions if fields[elem.name] then if fields[elem.name]:find("^[+%%-,%d]+$") then diff --git a/init.lua b/init.lua index 93e85a0..96f0d86 100644 --- a/init.lua +++ b/init.lua @@ -223,6 +223,11 @@ else dofile(MP.."/icta_controller/display.lua") dofile(MP.."/icta_controller/signaltower.lua") + -- Lua Controller +-- dofile(MP.."/lua_controller/controller.lua") +-- dofile(MP.."/lua_controller/commands.lua") +-- dofile(MP.."/lua_controller/server.lua") + -- Items dofile(MP.."/items/barrel.lua") dofile(MP.."/items/baborium.lua") @@ -239,6 +244,7 @@ else dofile(MP.."/items/plastic.lua") dofile(MP.."/items/hydrogen.lua") dofile(MP.."/items/electronic.lua") + dofile(MP.."/items/redstone.lua") if techage.basalt_stone_enabled then dofile(MP.."/items/basalt.lua") diff --git a/items/redstone.lua b/items/redstone.lua new file mode 100644 index 0000000..259d355 --- /dev/null +++ b/items/redstone.lua @@ -0,0 +1,103 @@ +--[[ + + TechAge + ======= + + Copyright (C) 2019 Joachim Stolberg + + GPL v3 + See LICENSE.txt for more information + + Redstone as result from the redmud/sand + +]]-- + +local S = techage.S + + +minetest.register_node("techage:red_stone", { + description = S("Red Stone"), + tiles = {"default_stone.png^[colorize:#ff4538:110"}, + groups = {cracky = 3, stone = 1}, + drop = 'techage:basalt_cobble', + sounds = default.node_sound_stone_defaults(), +}) + +stairs.register_stair_and_slab( + "red_stone", + "techage:red_stone", + {cracky = 3, stone = 1}, + {"default_stone.png^[colorize:#ff4538:110"}, + "Red Stone Stair", + "Red Stone Slab", + default.node_sound_stone_defaults(), + false +) + +minetest.register_node("techage:red_stone_brick", { + description = S("Red Stone Brick"), + paramtype2 = "facedir", + place_param2 = 0, + tiles = {"default_stone_brick.png^[colorize:#ff4538:110"}, + is_ground_content = false, + groups = {cracky = 2, stone = 1}, + sounds = default.node_sound_stone_defaults(), +}) + +stairs.register_stair_and_slab( + "red_stone_brick", + "techage:red_stone_brick", + {cracky = 2, stone = 1}, + {"default_stone_brick.png^[colorize:#ff4538:110"}, + "Red Brick Stair", + "Red Brick Slab", + default.node_sound_stone_defaults(), + false +) + +minetest.register_node("techage:red_stone_block", { + description = S("Red Stone Block"), + tiles = {"default_stone_block.png^[colorize:#ff4538:110"}, + is_ground_content = false, + groups = {cracky = 2, stone = 1}, + sounds = default.node_sound_stone_defaults(), +}) + +stairs.register_stair_and_slab( + "red_stone_block", + "techage:red_stone_block", + {cracky = 2, stone = 1}, + {"default_stone_block.png^[colorize:#ff4538:110"}, + "Red Stone Block Stair", + "Red Stone Block Slab", + default.node_sound_stone_defaults(), + false +) + + +minetest.register_craft({ + output = "techage:red_stone_brick 4", + recipe = { + {"techage:red_stone", "techage:red_stone"}, + {"techage:red_stone", "techage:red_stone"}, + } +}) + +minetest.register_craft({ + output = "techage:red_stone_block 9", + recipe = { + {"techage:red_stone", "techage:red_stone", "techage:red_stone"}, + {"techage:red_stone", "techage:red_stone", "techage:red_stone"}, + {"techage:red_stone", "techage:red_stone", "techage:red_stone"}, + } +}) + +techage.furnace.register_recipe({ + output = "techage:red_stone", + recipe = { + "techage:redmud", + "default:sand", + }, + time = 4, +}) + diff --git a/liquids/liquid_pipe.lua b/liquids/liquid_pipe.lua index 377e762..d897b0e 100644 --- a/liquids/liquid_pipe.lua +++ b/liquids/liquid_pipe.lua @@ -27,10 +27,15 @@ local Pipe = tubelib2.Tube:new({ show_infotext = false, force_to_use_tubes = true, tube_type = "pipe2", - primary_node_names = {"techage:ta3_pipeS", "techage:ta3_pipeA"}, + primary_node_names = {"techage:ta3_pipeS", "techage:ta3_pipeA", "techage:ta4_wall_pipe"}, secondary_node_names = {}, after_place_tube = function(pos, param2, tube_type, num_tubes) - minetest.swap_node(pos, {name = "techage:ta3_pipe"..tube_type, param2 = param2}) + local name = minetest.get_node(pos).name + if name == "techage:ta4_wall_pipe" then + minetest.swap_node(pos, {name = "techage:ta4_wall_pipe", param2 = param2}) + else + minetest.swap_node(pos, {name = "techage:ta3_pipe"..tube_type, param2 = param2}) + end end, }) diff --git a/mod.conf b/mod.conf index 3ea051f..fc97803 100644 --- a/mod.conf +++ b/mod.conf @@ -1,4 +1,4 @@ name = techage -depends = default,doors,tubelib2,basic_materials,bucket,stairs,screwdriver,minecart,lcdlib +depends = default,doors,tubelib2,basic_materials,bucket,stairs,screwdriver,minecart,lcdlib,safer_lua optional_depends = unified_inventory,wielded_light,unifieddyes description = Techage, go through 4 tech ages in search of wealth and power! \ No newline at end of file diff --git a/solar/inverter.lua b/solar/inverter.lua index 8745438..9375986 100644 --- a/solar/inverter.lua +++ b/solar/inverter.lua @@ -201,7 +201,7 @@ Solar:add_secondary_node_names({"techage:ta4_solar_inverter"}) techage.register_node({"techage:ta4_solar_inverter"}, { on_recv_message = function(pos, src, topic, payload) local nvm = techage.get_nvm(pos) - if topic == "power" then + if topic == "delivered" then return math.floor((nvm.delivered or 0) + 0.5) else return State:on_receive_message(pos, topic, payload) diff --git a/ta3_power/akkubox.lua b/ta3_power/akkubox.lua index 9f7b78b..84dfcae 100644 --- a/ta3_power/akkubox.lua +++ b/ta3_power/akkubox.lua @@ -205,8 +205,8 @@ techage.register_node({"techage:ta3_akku"}, { local nvm = techage.get_nvm(pos) if topic == "load" then return techage.power.percent(PWR_CAPA, nvm.capa) - elseif topic == "power" then - return nvm.needed or 0 + elseif topic == "delivered" then + return -(nvm.needed or 0) else return State:on_receive_message(pos, topic, payload) end diff --git a/ta3_power/tiny_generator.lua b/ta3_power/tiny_generator.lua index 3933b14..00d6463 100644 --- a/ta3_power/tiny_generator.lua +++ b/ta3_power/tiny_generator.lua @@ -283,7 +283,7 @@ Cable:add_secondary_node_names({"techage:tiny_generator", "techage:tiny_generato techage.register_node({"techage:tiny_generator", "techage:tiny_generator_on"}, { on_recv_message = function(pos, src, topic, payload) local nvm = techage.get_nvm(pos) - if topic == "power" then + if topic == "delivered" then return nvm.provided or 0 elseif topic == "fuel" then return techage.fuel.get_fuel_amount(nvm) diff --git a/textures/techage_lua_controller.png b/textures/techage_lua_controller.png new file mode 100644 index 0000000000000000000000000000000000000000..b55cc4eb7c9ccd8be89925500dad985d97c1c6e1 GIT binary patch literal 346 zcmeAS@N?(olHy`uVBq!ia0vp^4j|0J3?w7mbKU|emUKs7M+SzC{oH>NS%G}U;vjb? zhIQv;UIICiC9V-A&iT2ysd*&~&PAz-C8;S2<(VZJ3hti10pX2&;y^{51s;*b3=G`D zAk4@xYmNj^P%*$K#MLLW@YMO!_n$ma*!#iK%97LEZTYI@KY#vIYjI6XPJHa^D|MJR z2V`eSkY6x^!?PP{K+XhD7sn8feEYb*~jD* g*3%SdV8g($?3J2RKvLL6pxYQcUHx3vIVCg!00W6^+W-In literal 0 HcmV?d00001 diff --git a/textures/techage_lua_controller_inventory.png b/textures/techage_lua_controller_inventory.png new file mode 100644 index 0000000000000000000000000000000000000000..4a5de554332350df2c10fb63b00aa833926dd2ea GIT binary patch literal 838 zcmV-M1G)T(P)e zSad^gZEa<4bO1wgWnpw>WFU8GbZ8()Nlj2!fese{00OQ_L_t(&-eb&Ncj-R^61aTt z2{M;~jaQHXANck8JxS^*)vqqfjlySQ7~){m0|O0M(9`_<2rUwgkfhKFr0Gvwacu-9 zAw?Ml21OZ#K_N%72apXyHuDl!T~Jyny?%c?M(Y#2rd-@kuH;eY)2k>T67Zy1gw z+4!O28aZQc+42n;3BW%NGoc41T`)f`Q4-#Mm6w)6oqVM`mMFgH4`q z+9bSou1=gpbaG^Ln|U0i+HEl#+{2|cr~V9VkBr)YC=Zw!nlhLfnhpv%l0ATI5W1oC zmKzkEdb%f}Q|C`(We4nJa0`PlBg3pY5H=O_D5_|f@~(f+fINCkSuYHC~?lu%}vcKVQ?-=O)N=G zQ7F$W$xv|j^bH7a7!q+fIYEL|S=M0Ef^YV^XVMgp9=Y8=UudacXxOX_ zFdh=h)qgR(EOr}tQJs6vcxr_#5q4VH#M(>!MP|ku_QG` zp**uBL&4qCHz2%`PaLRdou`XqNXEUlGaR`b97NjUi&&=5xUKQXXoj%g=@D?7bo|;s(!_|tImOu zE1-c%WWj@IE~U2$p?BxJa}+!={f>R(>MfqD>(nPrUo5x4mdK II;Vst0Om?_-v9sr literal 0 HcmV?d00001 diff --git a/textures/techage_lua_server_side.png b/textures/techage_lua_server_side.png new file mode 100644 index 0000000000000000000000000000000000000000..281f7159828dc088ee50323d000306522da617cf GIT binary patch literal 224 zcmeAS@N?(olHy`uVBq!ia0vp^3LwnF3?v&v(vJfvmUKs7M+SzC{oH>NS%G}U;vjb? zhIQv;UIICiC9V-A&iT2ysd*&~&PAz-C8;S2<(VZJ3hti10pX2&;y^{51s;*b3=G`D zAk4@xYmNj^kUzjD#MLLW5Xij!_^E-RQCMJL)QsFbAfK@$$S;_|;n|HeAV4nJa0`PlBg3pY5H=O_D5_|f*kxwc06ly)U-%*?j4(PqM_ zX51V3D!#rFJ>2^F`3gBEpBGHqIRRr3Y3pyU7~7 yY6xWSv4RRQT(ng-G&E#mc2-_=wT~%@k>RMdU|r{gwV^=E89ZJ6T-G@yGywoSEm9c( literal 0 HcmV?d00001 diff --git a/textures/techage_ramchip.png b/textures/techage_ramchip.png index 36d0c890bf5192d6d8445e1bd5a00a71605faad2..8558bcae298f181ab6c839e5ba153442d1ff3a40 100644 GIT binary patch delta 617 zcmV-v0+#)&28soc7$yV*00013M{Ml?000DMK}|sb0I`n?{9y$E0004VQb$4nuFf3k zk&GCBAy7?3z3 zH<4DCT(lb3G}0lI1Eew1W|EIqvl{8@H5bWs1UZ0b)n5a|JICb%n)75wz{ukQ;B6v* zK&Zfs44j>yfD+OQ(`02)d0VcX~jV4g;9XnoJi=HVTtj)rkgm4>&fGrOUoF zaY|F~P0jlN`V+DA!p*DJ@CmMeXNx^N;NdzYc002c$OjJcobMi7WGA1S_#mCLe(AotOG{wr< zGh_MB)8aKXHJh88&d<_mX=wlf0sj8}0s;sM3JQvfibh68R8&-AVq)*_@3642qNv3M z00001bW%=J06^y0W&i*H0b)x>L;#2d9Y_EG010qNS#tmY3z10;e+P6)O+^Rf0v!$* z5Db8dApigZUr9tkR9M5^SKG3qAP@}b%Wwv{{{Ocw?ZL>XoXA>RwY&4sF$uKLGz0T` z{b%v@wZjaUUatw?=k}jJL*NkJ810-f(OF{{5S$CfSjT_}(8l<+vFz_H0tB{nivR`$ zYe8T^U_oF(ur?M9f39>!n4kgCI}_Nu5Q6swoabPikHL7a03{@Yvz`#lkrd|@l2Vy- zg~Y5VW&krOG)k60mbsu01l0&y;Fw7w)zL@*mPYg1d1dD54Mz5_sR( z$COpe0}MKsbv18Gfgmu`zyP?ct7$x0h7?BzprK>@eG&C4f1;KIgNvYDLoh6&z7jEy ziI}B`5iv3aLWiD+3u1fRetF|AV(Y}RH!A_+=H=!v*2T5qr1-mShV?um$Y zTfgQ(wFJ_M^UTaCo~9rOlpu&D!|*&`8%apeA^0F7-5@xM7;1t=>gIz(TBpIZ{`g>de6&Ht=i7PwcyC24f2xmPFy!(6=!&z8NH^kA#Cpxs z1JPdds)(eA2rh1_PYE=pw$6_L5s52RDEI8*Uw{H!5v=cL^exwYJS9K|RYn%(!U8BI z!6m_7a5xkk76pezt%0h;qTsM7IGop)1qT=&l{{_HWku2TP4Kzs`U~pDe>i>tssTz= UkvFF-3;+NC07*qoM6N<$f=3fy;{X5v diff --git a/textures/techage_server_back.png b/textures/techage_server_back.png new file mode 100644 index 0000000000000000000000000000000000000000..f2500168d870b0404745b1edca048f628df7692d GIT binary patch literal 351 zcmeAS@N?(olHy`uVBq!ia0vp^3LwnE1|*BCs=fdzwj^(N7X}^%W(MZve|F9Vif|Tq zL>4nJa0`PlBg3pY5H=O_D5_|f@~(f+fINCkSuYHC~?lu%}vcKVQ?-=O)N=G zQ7F$W$xv|j^bH7a7!q+fIYEL|S=M0Ef^YV^XVMgp9=Y8=UudacXxOX_ zFdh=h)qgR(EOr}tQJs6vcxr_#5q4VH#M(>!MP|ku_QG` zp**uBL&4qCHz2%`PaLRdou`XqNXEUlGaR`b97NjUi&&=5xUKQXXoj%g=@D?7bo|;s(!_|tImOu zE1-c%WWj@IE~U2$p?BxJa}+!={f>R(>MfqD>(nPrUo5x4mdK II;Vst0Om?_-v9sr literal 0 HcmV?d00001 diff --git a/textures/techage_server_side.png b/textures/techage_server_side.png new file mode 100644 index 0000000000000000000000000000000000000000..281f7159828dc088ee50323d000306522da617cf GIT binary patch literal 224 zcmeAS@N?(olHy`uVBq!ia0vp^3LwnF3?v&v(vJfvmUKs7M+SzC{oH>NS%G}U;vjb? zhIQv;UIICiC9V-A&iT2ysd*&~&PAz-C8;S2<(VZJ3hti10pX2&;y^{51s;*b3=G`D zAk4@xYmNj^kUzjD#MLLW5Xij!_^E-RQCMJL)QsFbAfK@$$S;_|;n|HeAV4nJa0`PlBg3pY5H=O_D5_|f*kxwc06ly)U-%*?j4(PqM_ zX51V3D!#rFJ>2^F`3gBEpBGHqIRRr3Y3pyU7~7 yY6xWSv4RRQT(ng-G&E#mc2-_=wT~%@k>RMdU|r{gwV^=E89ZJ6T-G@yGywoSEm9c( literal 0 HcmV?d00001 diff --git a/tools/repairkit.lua b/tools/repairkit.lua index dec96ad..4310fe7 100644 --- a/tools/repairkit.lua +++ b/tools/repairkit.lua @@ -242,10 +242,10 @@ local function read_state(itemstack, user, pointed_thing) load = dump(load) minetest.chat_send_player(user:get_player_name(), ndef.description.." "..number..": load = "..load.." % ") end - local power = techage.send_single("0", number, "power", nil) - if power and power ~= "" and power ~= "unsupported" then - power = dump(power) - minetest.chat_send_player(user:get_player_name(), ndef.description.." "..number..": power = "..power.." ku ") + local delivered = techage.send_single("0", number, "delivered", nil) + if delivered and delivered ~= "" and delivered ~= "unsupported" then + delivered = dump(delivered) + minetest.chat_send_player(user:get_player_name(), ndef.description.." "..number..": delivered = "..delivered.." ku ") end local owner = M(pos):get_string("owner") or "" if owner ~= "" then diff --git a/wind_turbine/rotor.lua b/wind_turbine/rotor.lua index 74a30ce..bf21220 100644 --- a/wind_turbine/rotor.lua +++ b/wind_turbine/rotor.lua @@ -261,7 +261,7 @@ techage.register_node({"techage:ta4_wind_turbine"}, { else return "stopped" end - elseif topic == "power" then + elseif topic == "delivered" then return nvm.delivered or 0 elseif topic == "on" then nvm.running = true