From 946f54070b4bed0fa52e291b6603e28be449299d Mon Sep 17 00:00:00 2001 From: Louis <55180044+louisroyer@users.noreply.github.com> Date: Tue, 7 Apr 2020 16:22:39 +0200 Subject: [PATCH] Fix crash when switching station is placed --- technic/machines/HV/cables.lua | 2 +- technic/machines/HV/init.lua | 2 +- technic/machines/LV/cables.lua | 2 +- technic/machines/LV/init.lua | 2 +- technic/machines/MV/cables.lua | 2 +- technic/machines/MV/init.lua | 2 +- technic/register.lua | 3 ++- 7 files changed, 8 insertions(+), 7 deletions(-) diff --git a/technic/machines/HV/cables.lua b/technic/machines/HV/cables.lua index b315433..00cb89f 100644 --- a/technic/machines/HV/cables.lua +++ b/technic/machines/HV/cables.lua @@ -8,5 +8,5 @@ minetest.register_craft({ } }) -technic.register_cable(S("HV"), 3/16, "hv") +technic.register_cable(S("HV"), 3/16, "HV") diff --git a/technic/machines/HV/init.lua b/technic/machines/HV/init.lua index d7136b4..edf0a4f 100644 --- a/technic/machines/HV/init.lua +++ b/technic/machines/HV/init.lua @@ -1,5 +1,5 @@ -technic.register_tier("HV", "High Voltage") +technic.register_tier("HV") local path = technic.modpath.."/machines/HV" diff --git a/technic/machines/LV/cables.lua b/technic/machines/LV/cables.lua index 3183547..7aed160 100644 --- a/technic/machines/LV/cables.lua +++ b/technic/machines/LV/cables.lua @@ -10,5 +10,5 @@ minetest.register_craft({ } }) -technic.register_cable(S("LV"), 2/16, "lv") +technic.register_cable(S("LV"), 2/16, "LV") diff --git a/technic/machines/LV/init.lua b/technic/machines/LV/init.lua index fde684d..b258897 100644 --- a/technic/machines/LV/init.lua +++ b/technic/machines/LV/init.lua @@ -1,5 +1,5 @@ -technic.register_tier("LV", "Low Voltage") +technic.register_tier("LV") local path = technic.modpath.."/machines/LV" diff --git a/technic/machines/MV/cables.lua b/technic/machines/MV/cables.lua index 90fccc4..8c69c6a 100644 --- a/technic/machines/MV/cables.lua +++ b/technic/machines/MV/cables.lua @@ -10,5 +10,5 @@ minetest.register_craft({ } }) -technic.register_cable(S("MV"), 2.5/16, "mv") +technic.register_cable(S("MV"), 2.5/16, "MV") diff --git a/technic/machines/MV/init.lua b/technic/machines/MV/init.lua index 07c44b6..5715eaa 100644 --- a/technic/machines/MV/init.lua +++ b/technic/machines/MV/init.lua @@ -1,5 +1,5 @@ -technic.register_tier("MV", "Medium Voltage") +technic.register_tier("MV") local path = technic.modpath.."/machines/MV" diff --git a/technic/register.lua b/technic/register.lua index 8f75b81..085aeec 100644 --- a/technic/register.lua +++ b/technic/register.lua @@ -11,12 +11,13 @@ technic.power_tools = {} technic.networks = {} -function technic.register_tier(tier, description) +function technic.register_tier(tier) technic.machines[tier] = {} end function technic.register_machine(tier, nodename, machine_type) if not technic.machines[tier] then + print("Warning: trying to register a machine with an unregistered tier") return end technic.machines[tier][nodename] = machine_type