[0.18.24] artillery-flare does not have shot_category set

Bugs that are actually features.
Post Reply
xlomkn
Burner Inserter
Burner Inserter
Posts: 18
Joined: Wed Dec 14, 2016 8:17 pm
Contact:

[0.18.24] artillery-flare does not have shot_category set

Post by xlomkn »

When having a mod with distincts artillery ammo category, you can use the vanilla artillery remote to fire any of them.

To reproduce:
  • Install MIRV mod
  • Do the research and launch a MIRV from a rocket silo
  • You may use the MIRV remote to launch a nuclear projectile, but...
  • You may also use the regular artillery remote and point it outside of the reach of your artillery turrets: point and click here and an MIRV nuclear projectile is sent (because MIRV has a huge range)
  • In fact, each times you use the artillery remote, you don't know which projectile will be sent
It may seems to be a MIRV bug, and in fact it could be fixed in MIRV by adding this:

Code: Select all

local artillery_flare = data.raw["artillery-flare"]["artillery-flare"]
if artillery_flare then
  artillery_flare.shot_category = "artillery-shell"
end
but it seems to me that the vanilla game should have it set so that not all mods have to do it. It is also quite error prone for modders.

Anyway, I will report this to MIRV also.

Oh, and thanks: you're top 1 in my beloved games list ;)

Rseding91
Factorio Staff
Factorio Staff
Posts: 13202
Joined: Wed Jun 11, 2014 5:23 am
Contact:

Re: [0.18.24] artillery-flare does not have shot_category set

Post by Rseding91 »

Thanks for the report. That's intentional: the remote is setup so it can fire every artillery that exists.

If a mod doesn't want that, then it needs to do as you've said: set the category of the remote to a specific one. Or just remove it.
If you want to get ahold of me I'm almost always on Discord.

User avatar
IngoKnieto
Fast Inserter
Fast Inserter
Posts: 106
Joined: Mon Oct 03, 2016 9:29 am
Contact:

Re: [0.18.24] artillery-flare does not have shot_category set

Post by IngoKnieto »

I disagree with the universal remote solution.

That means if I want to implement a custom artillery with its own remote, and I don't want it to be used by the vanilla remote, then I have to change the vanilla remote. And changing base game objects always has the potential of breaking other mods...
Or am I seeing something wrong here?

I think having artillery_flare.shot_category as a table so one remote could serve multiple artillery types would maybe be the best solution.

Code: Select all

artillery_flare.shot_category = {"artillery-shell", "my-custom-shell"}
Maybe that's something to consider for 1.1 :)

Post Reply

Return to “Not a bug”