diff --git a/technic/radiation.lua b/technic/radiation.lua index 9d0cede0..47f9eb6c 100644 --- a/technic/radiation.lua +++ b/technic/radiation.lua @@ -185,6 +185,7 @@ technic.register_group_resistance("tree", 3.4) technic.register_group_resistance("uranium_block", 500) technic.register_group_resistance("wood", 1.7) +--Radiation resistances cache technic.resistance_cache = {} function technic.cache_resistances() @@ -197,6 +198,8 @@ function technic.cache_resistances() end end +technic.cache_resistances() + local function node_radiation_resistance(node_name) local cached_resistance = technic.resistance_cache[node_name] if cached_resistance then @@ -206,9 +209,6 @@ local function node_radiation_resistance(node_name) end end --- Initialize cache -technic.cache_resistances() - --[[ Radioactive nodes cause damage to nearby players. The damage effect depends on the intrinsic strength of the radiation source,