LuaEntityPrototype::gun
- LuziferSenpai
- Filter Inserter
- Posts: 339
- Joined: Tue Jul 08, 2014 10:06 am
- Contact:
LuaEntityPrototype::gun
It would be nice to beable to read the gun of a artillery turret or normal turret, because I didnt found ANY way todo that in script.
Re: LuaEntityPrototype::gun
Are you looking for this:
https://lua-api.factorio.com/latest/Lua ... ack_result
?
Edit:
Looking at this I don't think that turrets have more information. I'm not sure how to get damage for laser turret in runtime from prorotype data. On gun turrets you might be able to grab ammo from inventory slot and use that to calculate damage.
https://lua-api.factorio.com/latest/Lua ... ack_result
?
Edit:
Looking at this I don't think that turrets have more information. I'm not sure how to get damage for laser turret in runtime from prorotype data. On gun turrets you might be able to grab ammo from inventory slot and use that to calculate damage.
- LuziferSenpai
- Filter Inserter
- Posts: 339
- Joined: Tue Jul 08, 2014 10:06 am
- Contact:
Re: LuaEntityPrototype::gun
So any Update to this?
No, not possible because I dont need the dmg, but I need the prototype itself.orzelek wrote: ↑Mon Jul 27, 2020 5:30 pmAre you looking for this:
https://lua-api.factorio.com/latest/Lua ... ack_result
?
Edit:
Looking at this I don't think that turrets have more information. I'm not sure how to get damage for laser turret in runtime from prorotype data. On gun turrets you might be able to grab ammo from inventory slot and use that to calculate damage.
Re: LuaEntityPrototype::gun
You mean something like game.entity_prototypes or entity.prototype?LuziferSenpai wrote: ↑Mon Oct 19, 2020 11:53 amSo any Update to this?
No, not possible because I dont need the dmg, but I need the prototype itself.orzelek wrote: ↑Mon Jul 27, 2020 5:30 pmAre you looking for this:
https://lua-api.factorio.com/latest/Lua ... ack_result
?
Edit:
Looking at this I don't think that turrets have more information. I'm not sure how to get damage for laser turret in runtime from prorotype data. On gun turrets you might be able to grab ammo from inventory slot and use that to calculate damage.
A good mod deserves a good changelog. Here's a tutorial (WIP) about Factorio's way too strict changelog syntax!
Re: LuaEntityPrototype::gun
Ok, I expanded ::guns to include the artillery ones.
If you want to get ahold of me I'm almost always on Discord.