Page 1 of 1

Allow "animation" for item-request-proxy icon

Posted: Wed Aug 14, 2019 8:58 pm
by Arcitos
Currently any "item-request-proxy" entity requires a type "picture" sprite for the icon of the proxy.

My question/suggestion: Allow the use of type "animation" for this, too.

This would make nice things possible, imagine for example an item request proxy with an icon like this:
repair-in-progress.gif
repair-in-progress.gif (6.13 KiB) Viewed 3183 times

What do you think?

Regards,
Arcitos

Re: Allow "animation" for item-request-proxy icon

Posted: Wed Aug 14, 2019 9:13 pm
by DaveMcW
<marquee><blink>No thank you</blink></marquee>

Re: Allow "animation" for item-request-proxy icon

Posted: Wed Aug 14, 2019 9:29 pm
by Arcitos
DaveMcW wrote: Wed Aug 14, 2019 9:13 pm <marquee><blink>No thank you</blink></marquee>
If my intention would be to annoy the player with unneccessarily distracting symbols, I'd just abuse the possibilities provided by the new rendering api :D

In fact, this proposal is to avoid needing to render a separate animation whenever this item request proxy is active.

Re: Allow "animation" for item-request-proxy icon

Posted: Fri Aug 16, 2019 11:47 am
by eradicator
+0.5 might come in handy later.

I didn't even think about the possibility of having more than one item-request-proxy prototype. I guess you want to spawn this manually and the engine keeps using the default one for stuff like blueprint modules? But has you probably have to track the proxy status anyway (to trigger some additional lua actions on fullfillment) is this really that much more useful than a rendering animation?

Re: Allow "animation" for item-request-proxy icon

Posted: Fri Aug 16, 2019 3:31 pm
by Arcitos
eradicator wrote: Fri Aug 16, 2019 11:47 am +0.5 might come in handy later.

I didn't even think about the possibility of having more than one item-request-proxy prototype. I guess you want to spawn this manually and the engine keeps using the default one for stuff like blueprint modules? But has you probably have to track the proxy status anyway (to trigger some additional lua actions on fullfillment) is this really that much more useful than a rendering animation?
Partially, yes. These request proxies are used to represent requests for repair or maintenance items. The lua logic is not the problem, even with some tick handling beeing necessary (btw, if someone is about to add an "on_request_proxy_fulfilled" event: Yes please!).

Currently I use rendered animations to mark machines that are in state of repair. Above this animated sign a transparent request proxy is placed - not very intuitive for the player and also not very good for FPS, because rendering take a good bit of FPS as soon as hundreds of icons need to be drawn each tick. If i could use this animation as the icon of the request proxy, I wouldn't need to use rendering to draw entities.

Re: Allow "animation" for item-request-proxy icon

Posted: Fri Aug 16, 2019 4:44 pm
by eradicator
Possibly slightly nicer hack:
Use an invisible simple entity ghost placeable_by={{'repair-kit',1},...}. It'll fire on_robot_built (though might conflict with mods force-reviving ghosts). And if you attach the render to the ghost the render might (haven't tested) be automatically destroyed when the ghost is revived.

Re: Allow "animation" for item-request-proxy icon

Posted: Sun Aug 18, 2019 4:41 am
by Rseding91
But why?

Re: Allow "animation" for item-request-proxy icon

Posted: Wed Aug 28, 2019 11:01 pm
by Arcitos
Rseding91 wrote: Sun Aug 18, 2019 4:41 amBut why?
Hi, I'm sorry, I wasn't able to reply earlier.
My reason for this proposal is that this would allow the use of animated icons for item-request-proxies that mimic the flashing entity status signs. It would also allow to create some kind of non-static icon like the rotating wrench symbol shown above, which will come in handy for some mod uses, where the item-request-proxies are also bearing information about the machine they're above.