Remove lv, mv, and hv tiers from power tools.

Theyre already tiered with Mk1-3 (at least drill is, more in the future).
Tools can be considered as designed for different tiers of circuits thx to their power needs.
For example Mk3 will require ages to load in LV batbox.
Batboxes load tools timining: LV standard (1000EU), MV 4x faster (4000EU), HV 16x faster (16000EU)
Also since 1EU is the same in any circuit it is possible to move energy from one to another with portable devices like crystals.

Other changes:
- moved charge/discharge functions to battery_boxes_commons.lua
- added UI style backgrounds for all the batboxes
This commit is contained in:
RealBadAngel
2013-07-17 19:14:01 +02:00
parent 55a0a40963
commit 3bc6cad671
11 changed files with 45 additions and 299 deletions

View File

@ -3,7 +3,7 @@ local chainsaw_max_charge = 30000 -- 30000 - Maximum charge of the saw
local chainsaw_charge_per_node = 12 -- 12 - Gives 2500 nodes on a single charge (about 50 complete normal trees)
local chainsaw_leaves = true -- true - Cut down entire trees, leaves and all
technic.register_LV_power_tool ("technic:chainsaw",chainsaw_max_charge)
technic.register_power_tool ("technic:chainsaw",chainsaw_max_charge)
minetest.register_tool("technic:chainsaw", {
description = "Chainsaw",

View File

@ -1,7 +1,7 @@
-- original code comes from walkin_light mod by Echo http://minetest.net/forum/viewtopic.php?id=2621
local flashlight_max_charge=30000
technic.register_LV_power_tool ("technic:flashlight",flashlight_max_charge)
technic.register_power_tool ("technic:flashlight",flashlight_max_charge)
minetest.register_tool("technic:flashlight", {
description = "Flashlight",

View File

@ -210,7 +210,7 @@ function drill_dig_it4 (pos,player)
drill_dig_it0 (pos,player)
end
technic.register_MV_power_tool ("technic:mining_drill",mining_drill_max_charge)
technic.register_power_tool ("technic:mining_drill",mining_drill_max_charge)
minetest.register_tool("technic:mining_drill", {
description = "Mining Drill Mk1",
inventory_image = "technic_mining_drill.png",
@ -243,10 +243,10 @@ minetest.register_tool("technic:mining_drill_mk2", {
return itemstack
end,
})
technic.register_HV_power_tool ("technic:mining_drill_mk2",mining_drill_mk2_max_charge)
technic.register_power_tool ("technic:mining_drill_mk2",mining_drill_mk2_max_charge)
for i=1,4,1 do
technic.register_HV_power_tool ("technic:mining_drill_mk2_"..i,mining_drill_mk2_max_charge)
technic.register_power_tool ("technic:mining_drill_mk2_"..i,mining_drill_mk2_max_charge)
minetest.register_tool("technic:mining_drill_mk2_"..i, {
description = "Mining Drill Mk2 in Mode "..i,
inventory_image = "technic_mining_drill_mk2.png^technic_tool_mode"..i..".png",
@ -267,10 +267,10 @@ minetest.register_tool("technic:mining_drill_mk3", {
return itemstack
end,
})
technic.register_HV_power_tool ("technic:mining_drill_mk3",mining_drill_mk3_max_charge)
technic.register_power_tool ("technic:mining_drill_mk3",mining_drill_mk3_max_charge)
for i=1,5,1 do
technic.register_HV_power_tool ("technic:mining_drill_mk3_"..i,mining_drill_mk3_max_charge)
technic.register_power_tool ("technic:mining_drill_mk3_"..i,mining_drill_mk3_max_charge)
minetest.register_tool("technic:mining_drill_mk3_"..i, {
description = "Mining Drill Mk3 in Mode "..i,
inventory_image = "technic_mining_drill_mk3.png^technic_tool_mode"..i..".png",

View File

@ -1,5 +1,5 @@
local laser_mk1_max_charge=40000
technic.register_LV_power_tool ("technic:laser_mk1",laser_mk1_max_charge)
technic.register_power_tool ("technic:laser_mk1",laser_mk1_max_charge)
local laser_shoot = function(itemstack, player, pointed_thing)
local laser_straight_mode=0

View File

@ -1,5 +1,5 @@
local sonic_screwdriver_max_charge=15000
technic.register_HV_power_tool ("technic:sonic_screwdriver",sonic_screwdriver_max_charge)
technic.register_power_tool ("technic:sonic_screwdriver",sonic_screwdriver_max_charge)
minetest.register_tool("technic:sonic_screwdriver", {
description = "Sonic Screwdriver",