There is a K2 remote interface for this:
remote.call("kr-radioactivity", "add_entity", "thorium-ore")
remote.call("kr-radioactivity", "add_item", "neptunium-237")
remote.call("kr-radioactivity", "add_item", "plutonium-238")
remote.call("kr-radioactivity", "add_item", "plutonium-239")
remote.call("kr-radioactivity", "add_item", "plutonium-fuel")
remote.call("kr-radioactivity", "add_item", "plutonium-mox")
remote.call("kr-radioactivity", "add_item", "protactinium-233")
remote.call("kr-radioactivity", "add_item", "protactinium-234")
remote.call("kr-radioactivity", "add_item", "thorium-232")
remote.call("kr-radioactivity", "add_item", "thorium-233")
remote.call("kr-radioactivity", "add_item", "thorium-fuel")
remote.call("kr-radioactivity", "add_item", "thorium-mox")
remote.call("kr-radioactivity", "add_item", "thorium-ore")
remote.call("kr-radioactivity", "add_item", "uranium-233")
remote.call("kr-radioactivity", "add_item", "uranium-234")
remote.call("kr-radioactivity", "add_item", "uranium-236")
remote.call("kr-radioactivity", "add_item", "uranium-237")
remote.call("kr-radioactivity", "add_item", "uranium-mox")
remote.call("kr-radioactivity", "add_item", "used-plutonium-mox")
remote.call("kr-radioactivity", "add_item", "used-thorium-mox")
remote.call("kr-radioactivity", "add_item", "used-uranium-mox")
I pretty much gave up trying to get this to work, no doubt it is due to my lack of knowledge.
I just hard coded the these into the K2 constants.lua file... an ugly thing to do, but it works.
So I have it working for me, probably not many others wishing to have radioactivity kill them.
But if interested, here is what I modified in Krastrio2's ./scripts/constants.lua :
constants.radioactivity_defaults = {
{
type = "entity",
tbl = "entities",
objects = {
"uranium-ore",
"thorium-ore"
}
},
{
type = "item",
tbl = "items",
objects = {
"nuclear-fuel",
"uranium-235",
"uranium-238",
"uranium-fuel-cell",
"uranium-ore",
"used-up-uranium-fuel-cell",
"neptunium-237",
"plutonium-238",
"plutonium-239",
"plutonium-fuel",
"plutonium-mox",
"protactinium-233",
"protactinium-234",
"thorium-232",
"thorium-233",
"thorium-fuel",
"thorium-mox",
"thorium-ore",
"uranium-233",
"uranium-234",
"uranium-236",
"uranium-237",
"uranium-mox",
"used-plutonium-mox",
"used-thorium-mox",
"used-uranium-mox"
},
},
}