安装 Steam
登录
|
语言
繁體中文(繁体中文)
日本語(日语)
한국어(韩语)
ไทย(泰语)
български(保加利亚语)
Čeština(捷克语)
Dansk(丹麦语)
Deutsch(德语)
English(英语)
Español-España(西班牙语 - 西班牙)
Español - Latinoamérica(西班牙语 - 拉丁美洲)
Ελληνικά(希腊语)
Français(法语)
Italiano(意大利语)
Bahasa Indonesia(印度尼西亚语)
Magyar(匈牙利语)
Nederlands(荷兰语)
Norsk(挪威语)
Polski(波兰语)
Português(葡萄牙语 - 葡萄牙)
Português-Brasil(葡萄牙语 - 巴西)
Română(罗马尼亚语)
Русский(俄语)
Suomi(芬兰语)
Svenska(瑞典语)
Türkçe(土耳其语)
Tiếng Việt(越南语)
Українська(乌克兰语)
报告翻译问题








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.