From 562fd56ff0f0f80afd8d9b4c4ded77a7e842f558 Mon Sep 17 00:00:00 2001 From: Panquesito7 Date: Thu, 4 Jun 2020 13:04:34 -0500 Subject: [PATCH] Minor fixes and improvements --- .luacheckrc | 2 -- technic/machines/HV/nuclear_reactor.lua | 2 +- technic/machines/MV/lighting.lua | 12 ++++++------ technic/machines/register/generator.lua | 4 ++-- technic/tools/flashlight.lua | 2 +- wrench/support.lua | 4 +--- 6 files changed, 11 insertions(+), 15 deletions(-) diff --git a/.luacheckrc b/.luacheckrc index f7c30d1..abbd6ea 100644 --- a/.luacheckrc +++ b/.luacheckrc @@ -34,7 +34,6 @@ read_globals = { } files["concrete/init.lua"].ignore = { "steel_ingot" } -files["technic/machines/MV/lighting.lua"].read_globals = { "LIGHT_MAX" } files["technic/machines/MV/tool_workshop.lua"].ignore = { "pos" } files["technic/machines/other/frames.lua"].ignore = { "item_texture", "item_type", "adj", "connected", "" } files["technic/machines/register/battery_box.lua"].ignore = { "pos", "tube_upgrade" } @@ -45,7 +44,6 @@ files["technic/machines/register/generator.lua"].ignore = { "node" } files["technic/machines/switching_station.lua"].ignore = { "pos1", "tier", "poshash" } files["technic/radiation.lua"].ignore = { "LAVA_VISC" } files["technic/tools/chainsaw.lua"].ignore = { "pos" } -files["technic/tools/flashlight.lua"].read_globals = { "LIGHT_MAX" } files["technic/tools/mining_drill.lua"].ignore = { "mode" } files["technic_chests/register.lua"].ignore = { "fs_helpers", "name", "locked_after_place" } diff --git a/technic/machines/HV/nuclear_reactor.lua b/technic/machines/HV/nuclear_reactor.lua index 077ebea..c6ed4df 100644 --- a/technic/machines/HV/nuclear_reactor.lua +++ b/technic/machines/HV/nuclear_reactor.lua @@ -455,7 +455,7 @@ minetest.register_node("technic:hv_nuclear_reactor_core_active", { technic_run = run, technic_on_disable = function(pos, node) local timer = minetest.get_node_timer(pos) - timer:start(1) + timer:start(1) end, on_timer = function(pos, node) local meta = minetest.get_meta(pos) diff --git a/technic/machines/MV/lighting.lua b/technic/machines/MV/lighting.lua index d849efe..2254ecf 100644 --- a/technic/machines/MV/lighting.lua +++ b/technic/machines/MV/lighting.lua @@ -157,7 +157,7 @@ minetest.register_node('technic:homedecor_glowlight_half_yellow_active', { paramtype = "light", paramtype2 = "facedir", walkable = true, - light_source = LIGHT_MAX, + light_source = minetest.LIGHT_MAX, sounds = default.node_sound_wood_defaults(), groups = { snappy = 3, not_in_creative_inventory=1}, @@ -238,7 +238,7 @@ minetest.register_node('technic:homedecor_glowlight_quarter_yellow_active', { paramtype = "light", paramtype2 = "facedir", walkable = true, - light_source = LIGHT_MAX-1, + light_source = minetest.LIGHT_MAX-1, sounds = default.node_sound_wood_defaults(), groups = { snappy = 3, not_in_creative_inventory=1}, @@ -320,7 +320,7 @@ minetest.register_node('technic:homedecor_glowlight_half_white_active', { paramtype = "light", paramtype2 = "facedir", walkable = true, - light_source = LIGHT_MAX, + light_source = minetest.LIGHT_MAX, sounds = default.node_sound_wood_defaults(), groups = { snappy = 3, not_in_creative_inventory=1}, @@ -401,7 +401,7 @@ minetest.register_node('technic:homedecor_glowlight_quarter_white_active', { paramtype = "light", paramtype2 = "facedir", walkable = true, - light_source = LIGHT_MAX-1, + light_source = minetest.LIGHT_MAX-1, sounds = default.node_sound_wood_defaults(), groups = { snappy = 3, not_in_creative_inventory=1}, @@ -482,7 +482,7 @@ minetest.register_node('technic:homedecor_glowlight_small_cube_yellow_active', { paramtype = "light", paramtype2 = "facedir", walkable = true, - light_source = LIGHT_MAX-1, + light_source = minetest.LIGHT_MAX-1, sounds = default.node_sound_wood_defaults(), groups = { snappy = 3, not_in_creative_inventory=1}, @@ -563,7 +563,7 @@ minetest.register_node('technic:homedecor_glowlight_small_cube_white_active', { paramtype = "light", paramtype2 = "facedir", walkable = true, - light_source = LIGHT_MAX-1, + light_source = minetest.LIGHT_MAX-1, sounds = default.node_sound_wood_defaults(), groups = { snappy = 3, not_in_creative_inventory=1}, diff --git a/technic/machines/register/generator.lua b/technic/machines/register/generator.lua index 9006d9a..9120e29 100644 --- a/technic/machines/register/generator.lua +++ b/technic/machines/register/generator.lua @@ -203,8 +203,8 @@ function technic.register_generator(data) technic_run = run, technic_on_disable = function(pos, node) local timer = minetest.get_node_timer(pos) - timer:start(1) - end, + timer:start(1) + end, on_timer = function(pos, node) local meta = minetest.get_meta(pos) local node = minetest.get_node(pos) diff --git a/technic/tools/flashlight.lua b/technic/tools/flashlight.lua index f077584..84decbb 100644 --- a/technic/tools/flashlight.lua +++ b/technic/tools/flashlight.lua @@ -118,6 +118,6 @@ minetest.register_node("technic:light", { walkable = false, buildable_to = true, sunlight_propagates = true, - light_source = LIGHT_MAX, + light_source = minetest.LIGHT_MAX, pointable = false, }) diff --git a/wrench/support.lua b/wrench/support.lua index 4b2f291..78ffa03 100644 --- a/wrench/support.lua +++ b/wrench/support.lua @@ -15,12 +15,10 @@ Syntax: inventory is always stored (Ex. active state for machines) --]] -wrench.META_TYPE_INT = 0 wrench.META_TYPE_FLOAT = 1 wrench.META_TYPE_STRING = 2 -local _, STRING, FLOAT = - wrench.META_TYPE_INT, +local STRING, FLOAT = wrench.META_TYPE_STRING, wrench.META_TYPE_FLOAT