Team Competition


Adds 19 PVP/PVE scenarios. Includes tons of admin options, diplomacy, team management, survival waves, a market system, and some solo compatible modes.

Scenarios
3 months ago
0.18 - 1.1
4.90K

b Using icon and icons and getting away with it

4 years ago

Your entities.lua contains this code

portal_chest,
{
type = "item",
name = "tc_export_chest",
icon = "base/graphics/icons/logistic-chest-requester.png",
icons = ico_e,
subgroup = "logistic-network",
order = "b[storage]-e[logistic-chest-requester]",
place_result = "tc_export_chest",
stack_size = 1
},

{
type = "item",
name = "tc_import_chest",
icon = "base/graphics/icons/logistic-chest-passive-provider.png",
icons = ico_i,
subgroup = "logistic-network",
order = "b[storage]-e[logistic-chest-requester]",
place_result = "tc_import_chest",
stack_size = 1
},

STRICTLY according to the item prototype specification https://wiki.factorio.com/Types/IconSpecification

you have 2 options:

1) icons and (optionally) icon_size
or
2) icon and (mandatory) icon_size

You have implemented 1) AND partly 2)

The game code seems to have let you get away with this, but it is causing an issues for my Recycling Machines mod https://forums.factorio.com/viewtopic.php?p=484088#p484088

You can safely get rid of the icon because you have icons specified. Could you remove that please?

4 years ago

Sure. Will do that. Thanks

4 years ago

FYI, the devs are saying that your code should produce an error. Or rather, if they try and reproduce the error themselves, they cannot.

https://forums.factorio.com/viewtopic.php?f=29&t=82329

4 years ago

Further FYI. The mods have confirmed that your code is valid, but also that the icon = is ignored, so you really don't need it.

I have amended my code to ignore any icon field if the icon_size is missing.

4 years ago

I will remove the icon line anyway. Could also break other mods

4 years ago

Sure, but you can claim that you are within specification, since the Devs have updated the specification in the wiki now :)

New response