MIT because I don't really mind people using my code - GPL is much more restrictive and I'm only doing this for fun.
Thanks to the MIT, you can always use part of my code(giving attribution, etc.), but (just out of curiosity), what do you want to use?
If you want the pollution values I give, I generally used the algorithm:
pollution = tonnage + 1000*uranium + 100*californium + 10000*tritium
If you want specific values, they are as follows:
- 0.1t: 300.1
- 0.5t: 700.5
- 2t: 1302
- 4t: 4004
- 8t: 9008
- 20t: 30020
- 500t: 75500
- 1kt: 101000
- 15kt : 315000
- 100kt : 450000
- 1Mt : 1800000
If you want to use True-Nukes' detonations as part of another mod, when creating a prototype, simply add:
local nuke_explosions = require("True-Nukes.prototypes.nukes.data-nuke-explosions")
which returns a table:
{
N0_1t_detonation = N0_1t_detonation,
N0_5t_detonation = N0_5t_detonation,
N2t_detonation = N2t_detonation,
N4t_detonation = N4t_detonation,
N8t_detonation = N8t_detonation,
N20t_detonation = N20t_detonation,
N500t_detonation = N500t_detonation,
N1kt_detonation = N1kt_detonation,
N15kt_detonation = N15kt_detonation,
N100kt_detonation = N100kt_detonation,
N1Mt_detonation = N1Mt_detonation
}
where each entry in the table is the entire TriggerEffect required to cause the nuke to detonate (including graphics, etc.), so if you have a projectile which you want to cause a (for example) 20t detonation from, simply set:
projectile.action =
{
type = "direct",
action_delivery =
{
type = "instant",
target_effects = nuke_explosions.N20t_detonation
}
}
and you get a 20t nuclear detonation.
If you want to cause pollution from a lua script, see:
https://lua-api.factorio.com/latest/LuaSurface.html#LuaSurface.pollute
for any information.
Hope this helps!!!