Change surface minimum darkness %

Post Reply
blankdiploma
Burner Inserter
Burner Inserter
Posts: 11
Joined: Wed Feb 20, 2019 6:10 am
Contact:

Change surface minimum darkness %

Post by blankdiploma »

Currently, the minimum darkness of a surface is hard-coded to be 85% at the deepest part of the night, calculated by time-of-day.

I am writing a mod that implements underground surfaces, and thus I would like to be able to force significantly deeper darkness.

If the override value is simply "How dark is it at evening-o-clock?" and I need to freeze the time of day on the surface, that's obviously fine.

Rseding91
Factorio Staff
Factorio Staff
Posts: 13175
Joined: Wed Jun 11, 2014 5:23 am
Contact:

Re: Change surface minimum darkness %

Post by Rseding91 »

I've looked into this before and got stuck on the fact that the darkness % effects solar panels directly - not just visual.

I'll see again but I don't remember it being something easy to work around.
If you want to get ahold of me I'm almost always on Discord.

blankdiploma
Burner Inserter
Burner Inserter
Posts: 11
Joined: Wed Feb 20, 2019 6:10 am
Contact:

Re: Change surface minimum darkness %

Post by blankdiploma »

I mean, it's perfectly fine that this directly affects solar panels - I want to make the underground extremely dark, which should also naturally make solar panels next-to-useless. I don't want placing solar panels underground to be a viable source of energy :)

So that sounds just fine to me!

BenSeidel
Filter Inserter
Filter Inserter
Posts: 584
Joined: Tue Jun 28, 2016 1:44 am
Contact:

Re: Change surface minimum darkness %

Post by BenSeidel »

Yes, but you don't want your solar panels to produce negative power, as it could do when it goes an extra 15% below it's "zero" point.

blankdiploma
Burner Inserter
Burner Inserter
Posts: 11
Joined: Wed Feb 20, 2019 6:10 am
Contact:

Re: Change surface minimum darkness %

Post by blankdiploma »

I mean, sure. On the other hand, power_output = max(power_output, 0) isn't exactly a MENSA brain teaser :D

Boodals
Fast Inserter
Fast Inserter
Posts: 129
Joined: Sun Feb 11, 2018 7:10 pm
Contact:

Re: Change surface minimum darkness %

Post by Boodals »

I added this (I have source access). It is in a version that was released recently.

Post Reply

Return to “Implemented mod requests”