game.surfaces[1].always_day from bool to real number

Things that we aren't going to implement
Post Reply
User avatar
darkfrei
Smart Inserter
Smart Inserter
Posts: 2903
Joined: Thu Nov 20, 2014 11:11 pm
Contact:

game.surfaces[1].always_day from bool to real number

Post by darkfrei »

Hi!

Is it possible to change existing

Code: Select all

/c game.surfaces[1].always_day=true
to something like

Code: Select all

/c game.surfaces[1].sun_bright=1
where the value is from 0 (not overwritten) to 1 (complete overwritten, the same like always_day=true).

User avatar
darkfrei
Smart Inserter
Smart Inserter
Posts: 2903
Joined: Thu Nov 20, 2014 11:11 pm
Contact:

Re: game.surfaces[1].always_day from bool to real number

Post by darkfrei »

Now we have only two positions: .always_day=true and .always_day=false, but nothing between.


User avatar
darkfrei
Smart Inserter
Smart Inserter
Posts: 2903
Joined: Thu Nov 20, 2014 11:11 pm
Contact:

Re: game.surfaces[1].always_day from bool to real number

Post by darkfrei »

Klonan wrote:You're probably more looking for this:

http://lua-api.factorio.com/latest/LuaS ... ce.daytime
Nice work! But not exactly. See this idea: viewtopic.php?f=33&t=51196
With .daytime you can set day time, but all nights are same dark. And there is no way to set nights a little bit brighter.

User avatar
Mooncat
Smart Inserter
Smart Inserter
Posts: 1190
Joined: Wed May 18, 2016 4:55 pm
Contact:

Re: game.surfaces[1].always_day from bool to real number

Post by Mooncat »

So you are talking about brightness, which should be a new property rather than changing the ones that are related to daytime.

Moweather introduces cloudy day that makes the surface to be darker. It is done by changing daytime. For now, you can use the same trick too as this is the only thing that affects brightness.

But IMO, for long term, a new variable should be implemented. Changing daytime for brightness is simply wrong.

User avatar
steinio
Smart Inserter
Smart Inserter
Posts: 2633
Joined: Sat Mar 12, 2016 4:19 pm
Contact:

Re: game.surfaces[1].always_day from bool to real number

Post by steinio »

Mooncat wrote:So you are talking about brightness, which should be a new property rather than changing the ones that are related to daytime.

Moweather introduces cloudy day that makes the surface to be darker. It is done by changing daytime. For now, you can use the same trick too as this is the only thing that affects brightness.

But IMO, for long term, a new variable should be implemented. Changing daytime for brightness is simply wrong.
There is already surface.darkness but it's read only.
Image

Transport Belt Repair Man

View unread Posts

User avatar
Mooncat
Smart Inserter
Smart Inserter
Posts: 1190
Joined: Wed May 18, 2016 4:55 pm
Contact:

Re: game.surfaces[1].always_day from bool to real number

Post by Mooncat »

steinio wrote:
Mooncat wrote:So you are talking about brightness, which should be a new property rather than changing the ones that are related to daytime.

Moweather introduces cloudy day that makes the surface to be darker. It is done by changing daytime. For now, you can use the same trick too as this is the only thing that affects brightness.

But IMO, for long term, a new variable should be implemented. Changing daytime for brightness is simply wrong.
There is already surface.darkness but it's read only.
Good to know!
hm... but according to its description, it sounds like it is just a function converting daytime to darkness, something like

Code: Select all

return surface.daytime * DaytimeToDarknessConstant;

User avatar
steinio
Smart Inserter
Smart Inserter
Posts: 2633
Joined: Sat Mar 12, 2016 4:19 pm
Contact:

Re: game.surfaces[1].always_day from bool to real number

Post by steinio »

Mooncat wrote:
steinio wrote:
Mooncat wrote:So you are talking about brightness, which should be a new property rather than changing the ones that are related to daytime.

Moweather introduces cloudy day that makes the surface to be darker. It is done by changing daytime. For now, you can use the same trick too as this is the only thing that affects brightness.

But IMO, for long term, a new variable should be implemented. Changing daytime for brightness is simply wrong.
There is already surface.darkness but it's read only.
Good to know!
hm... but according to its description, it sounds like it is just a function converting daytime to darkness, something like

Code: Select all

return surface.daytime * DaytimeToDarknessConstant;
Yes could be. Daytime and darkness are strongly bound together.
Image

Transport Belt Repair Man

View unread Posts

User avatar
darkfrei
Smart Inserter
Smart Inserter
Posts: 2903
Joined: Thu Nov 20, 2014 11:11 pm
Contact:

Re: game.surfaces[1].always_day from bool to real number

Post by darkfrei »

Mooncat wrote: hm... but according to its description, it sounds like it is just a function converting daytime to darkness, something like

Code: Select all

return surface.daytime * DaytimeToDarknessConstant;
And complete code is just

Code: Select all

if not (surface.alwaysday) then return surface.daytime * DaytimeToDarknessConstant else return 1 end

User avatar
Mooncat
Smart Inserter
Smart Inserter
Posts: 1190
Joined: Wed May 18, 2016 4:55 pm
Contact:

Re: game.surfaces[1].always_day from bool to real number

Post by Mooncat »

darkfrei wrote:
Mooncat wrote: hm... but according to its description, it sounds like it is just a function converting daytime to darkness, something like

Code: Select all

return surface.daytime * DaytimeToDarknessConstant;
And complete code is just

Code: Select all

if not (surface.alwaysday) then return surface.daytime * DaytimeToDarknessConstant else return 1 end
In fact, setting surface.always_day = true is the same as

Code: Select all

surface.freeze_daytime = true
surface.daytime = 0
And surface.always_day = false is

Code: Select all

surface.freeze_daytime = false
That's why I removed the option for changing always_day in Creative Mode. I wouldn't be surprised if the devs decide to remove it entirely in 0.16.

Post Reply

Return to “Won't implement”