Nainstalovat Steam
přihlásit se
|
jazyk
简体中文 (Zjednodušená čínština)
繁體中文 (Tradiční čínština)
日本語 (Japonština)
한국어 (Korejština)
ไทย (Thajština)
български (Bulharština)
Dansk (Dánština)
Deutsch (Němčina)
English (Angličtina)
Español-España (Evropská španělština)
Español-Latinoamérica (Latin. španělština)
Ελληνικά (Řečtina)
Français (Francouzština)
Italiano (Italština)
Bahasa Indonesia (Indonéština)
Magyar (Maďarština)
Nederlands (Nizozemština)
Norsk (Norština)
Polski (Polština)
Português (Evropská portugalština)
Português-Brasil (Brazilská portugalština)
Română (Rumunština)
Русский (Ruština)
Suomi (Finština)
Svenska (Švédština)
Türkçe (Turečtina)
Tiếng Việt (Vietnamština)
Українська (Ukrajinština)
Nahlásit problém s překladem
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.