[wheybags] [17.68] Rich Text virtual-signal

Bugs that are actually features.
Post Reply
User avatar
LuziferSenpai
Filter Inserter
Filter Inserter
Posts: 333
Joined: Tue Jul 08, 2014 10:06 am
Contact:

[wheybags] [17.68] Rich Text virtual-signal

Post by LuziferSenpai »

Hey,

I dont know if this is intended or not, but when using a Signal which is also a Entity/Item orso, it shows the Rich Text, not the Icon.

Greetz,

Luzifer
Coding is awesome!
Animes are love!
Factorio is life!

My MODs:
Click

Greetz,

Senpai

User avatar
wheybags
Former Staff
Former Staff
Posts: 328
Joined: Fri Jun 02, 2017 1:50 pm
Contact:

Re: [wheybags] [17.68] Rich Text virtual-signal

Post by wheybags »

Not a bug, it's not a virtual signal, it's an item.

User avatar
LuziferSenpai
Filter Inserter
Filter Inserter
Posts: 333
Joined: Tue Jul 08, 2014 10:06 am
Contact:

Re: [wheybags] [17.68] Rich Text virtual-signal

Post by LuziferSenpai »

So I need to check for it?
Coding is awesome!
Animes are love!
Factorio is life!

My MODs:
Click

Greetz,

Senpai

User avatar
Optera
Smart Inserter
Smart Inserter
Posts: 2916
Joined: Sat Jun 11, 2016 6:41 am
Contact:

Re: [wheybags] [17.68] Rich Text virtual-signal

Post by Optera »

I read the report as rich text for virtual signal "iron-ore" not showing the associated icon.

Bilka
Factorio Staff
Factorio Staff
Posts: 3129
Joined: Sat Aug 13, 2016 9:20 am
Contact:

Re: [wheybags] [17.68] Rich Text virtual-signal

Post by Bilka »

Optera wrote:
Tue Sep 17, 2019 7:11 pm
I read the report as rich text for virtual signal "iron-ore" not showing the associated icon.
There is no "iron-ore" virtual signal, so that would be working correctly. Virtual signals are only the colors + letters + numbers, not the items and fluids.
I'm an admin over at https://wiki.factorio.com. Feel free to contact me if there's anything wrong (or right) with it.

User avatar
Optera
Smart Inserter
Smart Inserter
Posts: 2916
Joined: Sat Jun 11, 2016 6:41 am
Contact:

Re: [wheybags] [17.68] Rich Text virtual-signal

Post by Optera »

Bilka wrote:
Tue Sep 17, 2019 7:14 pm
Optera wrote:
Tue Sep 17, 2019 7:11 pm
I read the report as rich text for virtual signal "iron-ore" not showing the associated icon.
There is no "iron-ore" virtual signal, so that would be working correctly. Virtual signals are only the colors + letters + numbers, not the items and fluids.
[sarcasm]Factorio also ensures there's never any mod doing something like adding virtual with the same name as item.[/sarcasm]

posila
Factorio Staff
Factorio Staff
Posts: 5202
Joined: Thu Jun 11, 2015 1:35 pm
Contact:

Re: [wheybags] [17.68] Rich Text virtual-signal

Post by posila »

Optera wrote:
Wed Sep 18, 2019 5:26 am
[sarcasm]Factorio also ensures there's never any mod doing something like adding virtual with the same name as item.[/sarcasm]
If your mod does add virtual signal prototype called iron-ore, there will be virtual signal called iron-ore in the game and

Code: Select all

[img=virtual-signal/iron-ore]
will show icon of your iron-ore virtual signal, that your mod defined.

User avatar
Optera
Smart Inserter
Smart Inserter
Posts: 2916
Joined: Sat Jun 11, 2016 6:41 am
Contact:

Re: [wheybags] [17.68] Rich Text virtual-signal

Post by Optera »

Correct.
I just made a mod to test it for fluid, item and entity.

Code: Select all

local icon_background = { icon = "__base__/graphics/icons/signal/signal_white.png", icon_size = 32 }

data:extend{
  {
    type = "item-subgroup",
    name = "virtual-signal-test",
    group = "signals",
    order = "zzz"
  },
}

local function make_signal(base)
  local vs_icons
  if base.icons then
    vs_icons = table.deepcopy(base.icons)
    table.insert(vs_icons, 1, icon_background)
  elseif base.icon then
    vs_icons = { icon_background, { icon = base.icon, icon_size = base.icon_size } }
  else
    vs_icons = { icon_background }
  end
  local signal = {
    type = "virtual-signal",
    name = base.name,
    icons = vs_icons,
    subgroup = "virtual-signal-test",
    order = "z",
  }
  data:extend{signal}
end

make_signal(data.raw.fluid["water"])
make_signal(data.raw.item["iron-plate"])
make_signal(data.raw.item["stone-furnace"])
In game result:
2019-09-18-08-18-23-9259121.png
2019-09-18-08-18-23-9259121.png (44.36 KiB) Viewed 1457 times

User avatar
LuziferSenpai
Filter Inserter
Filter Inserter
Posts: 333
Joined: Tue Jul 08, 2014 10:06 am
Contact:

Re: [wheybags] [17.68] Rich Text virtual-signal

Post by LuziferSenpai »

I just need to to put the type as Rich Text Filter, in that way it should work.
Coding is awesome!
Animes are love!
Factorio is life!

My MODs:
Click

Greetz,

Senpai

Post Reply

Return to “Not a bug”