Display Plates - Ground Signs & Map Markers


Big, medium and small signs ("plates") which can display an item, fluid or virtual icon. Display plates can be set to create a matching map marker at the location of the display plate. Can be used with blueprints, (except updating blueprints)

Utilities
1 year, 7 months ago
1.1
33.1K

i Possible solution for loss of display plate information in updated blueprints

1 year, 7 months ago
(updated 1 year, 7 months ago)

"This idea/suggestion is related to problems around preserving the display plate information when a player selects new contents for the blueprint.

For start, I am aware of all the issues behind it - went through a thread on the forums where the inability to access/modify blueprint entities during this event was discussed etc, and I started digging into the code a bit as well to see what's going on, and if some workaround was possible.

So, my idea was to try to find some other type of entity that could allow storing the information instead, and what I ended-up with was basing the display plates on lamp prototype instead of the simple-entity-with-owner prototype. The idea is to misuse the lamp's circuit condition to store information about displayed item, and the "Use colors" option for storing map marker toggle.

Of course, this would be quite a big refactor of the code, but it would allow to update existing blueprints without loss of information. The only drawback that I see is that it could affect performance, but I'm guessing that fake lamps that do not connect to electric network nor actually emit any kind of light shouldn't be an issue.

Currently I have a very quick-and-dirty hack locally where I was able to achieve the following:

  • Properly rendering the display plate as lamp, without it overlapping on top of character when walking on top of it (using integration_patch, with picture_on/picture_off being set to bogus 1x1 PNG).
  • Hooking into the correct event to trigger the display plate symbol selection dialog to be shown (defines.events.on_gui_opened, check if display plate is the entity, and simply display Industrial Plate Display GUI so that lamp GUI would get replaced/closed).
  • Just some ad-hoc checking if I can easily access circuit condition on display-plate-as-a-lamp entity.

I would be highly interested in contributing with a full patch via pull request if you would be interested in taking this direction, but I really wanted to check your feedback before starting any major coding :)

P.S.
Another possibility might be looking into constant-combinator as the base, but that might require finding a way to disable showing the symbol in alt-mode. A positive thing could be that display plate could be used for emitting signal as well, though."

(Moved from other fork, originally posted by azaghal)

4 months ago

Ah, thank you for cross-posting this, saw the deprecation (finally) on the other mod description once I started updating some modpacks of mine :)

@Flydiverny - so... If you would be kinda interested in having something like this implemented/accepted, I could probably figure out if I still have the hackish code around and start working towards a proper PR for it.

New response