Page 1 of 1

How to remove the grenade?

Posted: Fri Jul 01, 2016 2:09 pm
by WIZ4
Please tell me what I should write in the data.lua that would remove the grenade?

Re: How to remove the grenade?

Posted: Fri Jul 01, 2016 2:28 pm
by DaveMcW

Code: Select all

local effects = data.raw["technology"]["military-2"].effects
for key,_ in pairs(effects) do
  if (effects[key].recipe == "grenade") then
    effects[key] = nil
  end
end

Re: How to remove the grenade?

Posted: Fri Jul 01, 2016 2:42 pm
by WIZ4
DaveMcW wrote:

Code: Select all

local effects = data.raw["technology"]["military-2"].effects
for key,_ in pairs(effects) do
  if (effects[key].recipe == "grenade") then
    effects[key] = nil
  end
end
Thank you:)