No such node, but same code works else where.
Posted: Wed Mar 30, 2016 8:12 am
So I'm trying to utilize the following code for an 'item' file. I already use this code for 'technology' files and I have no problems, but when I use it for 'item' I get the following message on start up: "Error while loading item prototype (steel-axe-t1): No such node (stack_size / damage / durability / speed)"
Code: Select all
require "defines"
require "util"
require ("stats")
da = stats.steelAxe.da
du = stats.steelAxe.du
sp = stats.steelAxe.sp
ss = stats.steelAxe.ss
data:extend(
{
{
type = "mining-tool",
name = "steel-axe-t1",
icon = "__zerxethia__/graphics/icons/steel-axe-t1.png",
flags = {"goes-to-main-inventory"},
action =
{
type="direct",
action_delivery =
{
type = "instant",
target_effects =
{
type = "damage",
damage = { amount = da, type = "physical"}
}
}
},
durability = du,
subgroup = "tool",
order = "a[mining]-b[steel-axe-t1]",
speed = sp,
stack_size = ss,
},
---stats.lua
stats = {
steelAxe = {
da = 8,
du = 5000,
sp = 4
ss = 100,
}
}