Install Steam
login
|
language
简体中文 (Simplified Chinese)
繁體中文 (Traditional Chinese)
日本語 (Japanese)
한국어 (Korean)
ไทย (Thai)
Български (Bulgarian)
Čeština (Czech)
Dansk (Danish)
Deutsch (German)
Español - España (Spanish - Spain)
Español - Latinoamérica (Spanish - Latin America)
Ελληνικά (Greek)
Français (French)
Italiano (Italian)
Bahasa Indonesia (Indonesian)
Magyar (Hungarian)
Nederlands (Dutch)
Norsk (Norwegian)
Polski (Polish)
Português (Portuguese - Portugal)
Português - Brasil (Portuguese - Brazil)
Română (Romanian)
Русский (Russian)
Suomi (Finnish)
Svenska (Swedish)
Türkçe (Turkish)
Tiếng Việt (Vietnamese)
Українська (Ukrainian)
Report a translation problem
I am not competent enough to propose a fix, however reading source code reveals a suspicious method GetPowerPlantPotential of class PowerTabUtility (https://github.com/Owlchemist/power-tab-2/blob/0e47dea5f7e0d9754df883e166b88e9440c3277d/Source/PowerTabUtility.cs#L96). If I understand the source code correctly, it temporarily turns sky fully bright, fetches the DesiredPowerOutput of thing in question and restores sky brightness. The return value of GetPowerPlantPotential is later used in DesiredPowerOutput method, which returns the maximum of potential and PowerConsumption od thing in question.
Given that power consumption of sun lamp is dependent on time of day, it likely depends on current sky brightness in order to evaluate it's power conumption. Thus I strongly suspect that GetPowerPlantPotential is a culprit here.
Honestly I don't understand the point of calling Mathf.Max (https://github.com/Owlchemist/power-tab-2/blob/0e47dea5f7e0d9754df883e166b88e9440c3277d/Source/PowerTabUtility.cs#L87). I mean, `.Props.PowerConsumption` is probably an accurate value of current power consumption, so why not just return it directly? However I have no experience of modding Rimworld, so this question might be just due to my incompetence.
The problem is that CompPowerTrader.PowerOutput always returns power consumption for sun lamp even if it is night time. Issue was solved by checking PowerOn property of CompPowerTrader
(https://github.com/Owlchemist/power-tab-2/blob/0e47dea5f7e0d9754df883e166b88e9440c3277d/Source/PowerTabUtility.cs#L56)
like this:
Also would be cool if repo was updated with the actual state of the mod.