Allow fluid energy source for lamps?

Things that we aren't going to implement
User avatar
Deadlock989
Smart Inserter
Smart Inserter
Posts: 2529
Joined: Fri Nov 06, 2015 7:41 pm

Allow fluid energy source for lamps?

Post by Deadlock989 »

Nothing ventured, nothing gained. Not under any illusions about how popular fluid energy sources are but still.

Burner lamps used to get asked for a lot. I have a mod which provides a burner "lamp" which is actually a void energy source furnace that processes recipes based on any available items that have chemical fuel values. The bigger the fuel value, the longer the recipe. The light effect is just part of the working visualisation. The result of the recipe is either nothing or the fuel's "burnt result". This works OK because the "lamp" is rigged to burn for a long time so it doesn't really matter that the lamp burns all day and night. I sort of get why a lamp can't easily have a burner energy source because lamps don't have an inventory-based GUI, and items in fuel slots need an inventory-based GUI. (If that's not the reason though, an actual burner lamp would still be nice to have.)

You can do the same thing with fluids - a furnace or a fixed recipe crafting machine with a fluid box. For a fluid energy source though, the fluid box doesn't need a GUI. The player can't pick up fluids out of the slot anyway so they don't really need access to it. Because the "lamp" should really be burning the fluid at its actual energy value, it matters a lot more to the player that this thing is on all day when it doesn't need to be.

So it would be Nice To Have lamps which can burn fluid but be literal lamps.

Use case: impossible aetheric steam lamps that turn off during the day and could in theory be coloured by signals.


Image
User avatar
Deadlock989
Smart Inserter
Smart Inserter
Posts: 2529
Joined: Fri Nov 06, 2015 7:41 pm

Re: Allow fluid energy source for lamps?

Post by Deadlock989 »

Actually ... I just remembered that lamps can't have animations as their on-state. I'd rather have the animation and just make them cheap, unless animated lamps are in any way a realistic option.
posila
Factorio Staff
Factorio Staff
Posts: 5408
Joined: Thu Jun 11, 2015 1:35 pm
Contact:

Re: Allow fluid energy source for lamps?

Post by posila »

Deadlock989 wrote: Sat Nov 14, 2020 6:36 pmI sort of get why a lamp can't easily have a burner energy source because lamps don't have an inventory-based GUI, and items in fuel slots need an inventory-based GUI.
That's actually not it. It's because lamps are not updatable entities for some time already. Their energy consumption is "batched" in electric network itself, similar to how solar panels are merged into one thing inside an electric network.

So, the request would be to create UpdatableLamp entity type which could be configured to use any of the energy sources.
User avatar
Deadlock989
Smart Inserter
Smart Inserter
Posts: 2529
Joined: Fri Nov 06, 2015 7:41 pm

Re: Allow fluid energy source for lamps?

Post by Deadlock989 »

posila wrote: Sat Nov 14, 2020 7:15 pm So, the request would be to create UpdatableLamp entity type which could be configured to use any of the energy sources.
Right. Would supporting animations be out of the question?

Another one I've talked about with Bilka in the past (and has been asked for by others) is a lamp that supports variations accessible at runtime like a SimpleEntityWithOwner. So you'd be able to set entity.graphics_variation at runtime and that would index both the on_animation and off_animation depending on the lamp's power/signal state.
User avatar
Deadlock989
Smart Inserter
Smart Inserter
Posts: 2529
Joined: Fri Nov 06, 2015 7:41 pm

Re: Allow fluid energy source for lamps?

Post by Deadlock989 »

I thought about this and decided I can easily get on without it. If lamps are optimised for electric networks then it's not worth making a request to introduce an un-optimised entity that vanilla will never use. For my own case the workaround is fine.
Bilka
Factorio Staff
Factorio Staff
Posts: 3310
Joined: Sat Aug 13, 2016 9:20 am
Contact:

Re: Allow fluid energy source for lamps?

Post by Bilka »

Deadlock989 wrote: Sat Nov 14, 2020 6:36 pm Burner lamps used to get asked for a lot. I have a mod which provides a burner "lamp" which is actually a void energy source furnace that processes recipes based on any available items that have chemical fuel values. The bigger the fuel value, the longer the recipe. The light effect is just part of the working visualisation. The result of the recipe is either nothing or the fuel's "burnt result".
A simpler version of this workaround is an assembling machine with a burner energy source and a fixed recipe that produces and consumes nothing.
code example
This natively works with any energy source type, like fluids. Another interesting note is that one could use the runtime recipe lock instead of the fixed_recipe in the prototype to switch out the recipe runtime and combine that with the recipe related working visualisations for more graphical shenanigans.
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
Deadlock989
Smart Inserter
Smart Inserter
Posts: 2529
Joined: Fri Nov 06, 2015 7:41 pm

Re: Allow fluid energy source for lamps?

Post by Deadlock989 »

Bilka wrote: Sun Nov 15, 2020 5:44 pm A simpler version of this workaround is an assembling machine with a burner energy source and a fixed recipe that produces and consumes nothing. This natively works with any energy source type, like fluids.
You're right. I think at the time (18+ months ago) I didn't know that recipes don't have to have any ingredients. I will likely switch over to that, thanks.
Another interesting note is that one could use the runtime recipe lock instead of the fixed_recipe in the prototype to switch out the recipe runtime and combine that with the recipe related working visualisations for more graphical shenanigans.
You could definitely do some cunning things there with crafting tints and the colour of the "lamp". I guess you could give it a GUI that allows a colour selection or even just a hotkey toggle that loops through colours if you couldn't be bothered to get stuck into another GUI. I might explore the latter given that "crafting machine lamps" can't have a circuit network connection to interfere with any of that.
User avatar
Deadlock989
Smart Inserter
Smart Inserter
Posts: 2529
Joined: Fri Nov 06, 2015 7:41 pm

Re: Allow fluid energy source for lamps?

Post by Deadlock989 »

Coloured "lamps", in 12 19 hues and 1 grey. Colour "rotatable" with a hotkey, will add copy-paste setting in a bit. Can be toggled between pipe-ending and pass-through variants. Locked recipe is also automatically blueprintable/copypastable. If you use the completely null recipe and a fluid energy source then you can have passthrough fluid boxes as well. If you give them half the fuel usage of electric lamps to compensate for being on all day that works out at 0.08 steam/second. Thanks Bilka.

Untitled.jpg
Untitled.jpg (128.31 KiB) Viewed 3185 times
Edited to add, it turns out that entities with a locked recipe don't fire on_entity_settings_pasted at all, either as source or destination. I worked around this by not locking anything but setting hide_from_player_crafting to true and putting them in a unique crafting category so that the recipes don't clutter the player's main menu or appear anywhere other than the lamp's crafting selection menu, also by setting their active recipe to a default one when they are built without one.
Last edited by Deadlock989 on Mon Nov 16, 2020 3:21 pm, edited 1 time in total.
Stimpatch
Inserter
Inserter
Posts: 45
Joined: Wed Sep 11, 2019 8:23 am
Contact:

Re: Allow fluid energy source for lamps?

Post by Stimpatch »

Wow... just Wow. Really nice work there. Again.
Rseding91
Factorio Staff
Factorio Staff
Posts: 14594
Joined: Wed Jun 11, 2014 5:23 am
Contact:

Re: Allow fluid energy source for lamps?

Post by Rseding91 »

Making lamps updatable for energy source support isn't going to happen. I personally don't want to implement and maintain a new variant of lamp just for energy source support. A lot of time and energy went into making the current lamp take 0 or as near to 0 CPU time as we can make it.

I'm going to leave this in modding interface requests on the off chance another developer wants to sign up for maintaining a new entity type.
If you want to get ahold of me I'm almost always on Discord.
User avatar
Deadlock989
Smart Inserter
Smart Inserter
Posts: 2529
Joined: Fri Nov 06, 2015 7:41 pm

Re: Allow fluid energy source for lamps?

Post by Deadlock989 »

Deadlock989 wrote: Sun Nov 15, 2020 1:15 pm I thought about this and decided I can easily get on without it. If lamps are optimised for electric networks then it's not worth making a request to introduce an un-optimised entity that vanilla will never use. For my own case the workaround is fine.
posila
Factorio Staff
Factorio Staff
Posts: 5408
Joined: Thu Jun 11, 2015 1:35 pm
Contact:

Re: Allow fluid energy source for lamps?

Post by posila »

Moved to won't implement, if you want, create new request for animations on lamps.
Post Reply

Return to “Won't implement”