Commit Graph

55 Commits

Author SHA1 Message Date
Paul Chote
67254e0b39 Rename Fluent *GetString methods to GetMessage. 2024-11-03 16:52:47 +02:00
test1232156
564da2fb8d Fix prerequisites spelling error
Co-Authored-By: Gustas <37534529+punkpun@users.noreply.github.com>
2024-10-23 19:08:12 +03:00
Paul Chote
d6285affec Remove FluentBundle.Arguments helper method. 2024-10-04 15:11:27 +03:00
Paul Chote
b29b685058 Rename Fluent-related code to be more precise. 2024-10-04 15:11:27 +03:00
RoosterDragon
0649f3dc32 RCS0056 - roslynator_max_line_length = 160 2024-07-29 21:56:36 +02:00
RoosterDragon
2fde98a0d1 Fix uses of LabelWidget.Text and ButtonWidget.Text to use GetText instead.
The Text element of these widgets was changed from display text to a translation key as part of adding translation support. Functions interested in the display text need to invoke GetText instead. Lots of functions have not been updated, resulting in symptoms such as measuring the font size of the translation key rather than the display text and resizing a widget to the wrong size.

Update all callers to use GetText when getting or setting display text. This ensure their existing functionality that was intended to work in terms of the display text and not the translation key works as expected.
2024-01-15 15:16:58 +02:00
Gustas
0f5b78442b Extract unit names and descriptions 2023-11-25 16:28:19 +01:00
dnqbob
19c8c36030 Replace Cash + Resources with GetCashAndResources() 2023-09-07 16:40:57 +03:00
RoosterDragon
285443f10f Fix CA1310, CA1311 2023-08-07 21:38:09 +02:00
RoosterDragon
d83e579dfe Fix CA1305 2023-08-07 21:38:09 +02:00
Matthias Mailänder
6e6bf1ca81 Translate labels with parameters. 2023-05-09 20:14:52 +03:00
Matthias Mailänder
65c0cf1065 Deprecate string format shorthand. 2023-05-05 19:03:09 +02:00
RoosterDragon
8ee6957e6a Fix IDE0048 2023-03-01 21:56:28 +02:00
Gustas
8d0fe52dd8 Remove unnecessary parentheses 2023-02-27 08:36:47 +02:00
abcdefg30
5bf7fe852c Remove the copyright year numbers 2023-01-11 11:58:54 +02:00
Matthias Mailänder
2c8c6e50da Code cleanup 2022-08-14 16:11:51 +02:00
abcdefg30
6a31b1f9f3 Update the copyright header year 2022-05-28 00:35:10 -05:00
Andre Mohren
6810469634 Updated copyright years. 2021-06-29 18:33:21 -05:00
teinarss
10676be377 Replace F extension with string interpolation 2021-05-08 22:20:59 +02:00
Paul Chote
d52ba83f96 Replace terniary null checks with coalescing. 2021-03-08 18:11:25 +01:00
teinarss
27f1a7ab27 Use out var syntax 2020-08-19 18:11:07 +01:00
abcdefg30
23b3c237b7 Update the year numbers in all license headers to 2020 2020-01-05 17:00:34 +00:00
Mustafa Alperen Seki
de7706c98f Add ProductionCost/TimeMultiplier 2019-04-22 20:44:50 +02:00
Paul Chote
ab4a7e3558 Replace System.Drawing primitives with our own. 2019-03-04 18:26:42 +00:00
abcdefg30
cadbd0d9ab Change the year number in all cs headers from 2018 to 2019 2019-01-26 23:15:21 +01:00
Paul Chote
13f5ef50b9 Fix production tooltip padding. 2018-12-08 15:32:58 +01:00
Andre Mohren
b1a44086a0 Removed unused using directives. 2018-11-17 17:23:22 +00:00
Mustafa Alperen Seki
53304a0353 Change LowPowerSlowdown to LowPowerModifier 2018-10-08 21:38:30 +01:00
Andre Mohren
a86f41cd5c Made Valued optional for traits who do not require it. 2018-09-28 22:06:56 +01:00
Andre Mohren
81e1b39bb9 Made PowerManager optional for traits who do not require it. 2018-07-26 14:02:42 +01:00
Mustafa Alperen Seki
ec61527ebc Don't show negative prerequisites on tooltip 2018-04-26 17:10:26 +02:00
Arular101
8a60918841 Update copyright notice year to 2018 2018-01-17 00:47:34 +01:00
Alexis Hunt
157a783df5 Correct UI for unslowed queues in low power.
Because of the way the tick logic works, 0 (or any negative number) for
LowPowerSlowdown is functionally equivalent to 1. But LowPowerSlowdown
is multipled by a time in several cases, so while 1 will produce the
correct result (no slowdown), 0 will say that the time remaining is
00:00. Forbid nonpositive values, and correct the d2k mod which was
using 0.

Additionally, in the production tooltip, the colour should display as
white even in low power if there is no slowdown.
2018-01-13 16:13:59 +01:00
RoosterDragon
5338784e45 Fix bad uses of FirstEnabledTraitOrDefault on TraitInfos.
These are not traits so this method does not work. We can use EnabledByDefault on the ConditionalTraitInfo instead.
2017-12-10 13:39:24 +00:00
RoosterDragon
7a7eed4fb7 Add FirstEnabledTraitOrDefault helper method.
This avoids the allocations caused by LINQ when using traits.FirstOrDefault(Exts.IsTraitEnabled). This is important in FrozenActorLayer.RefreshState which is called very often. We apply the new helper method to all areas using the old pattern. An overload that takes an array allows arrays to be enumerated without causing allocations.
2017-12-10 13:39:24 +00:00
Paul Chote
458c913264 Clean up ProductionTooltipLogic:
- Avoid creating unnecessary bindings
- Fix time display not updating on low power
- Fix power usage color not updating on power changes
- Avoid duplicated text size calculations
2017-09-10 21:30:55 +02:00
Paul Chote
4f00d62237 Move hardcoded production keys into yaml. 2017-09-10 21:30:55 +02:00
rob-v
199e9847d1 Add tooltips to production statistics #12820 2017-04-17 21:51:23 +02:00
Taryn Hill
43317e0f5d Update copyright notice year to 2017 2016-12-31 23:46:13 -06:00
Paul Chote
23f4ae5027 Replace UpgradeMinEnabledLevel checks with an EnabledByDefault shim. 2016-11-19 17:19:25 +00:00
reaperrr
efa6ad64f7 Remove now-redundant TooltipInfo check 2016-10-23 18:42:36 +02:00
reaperrr
00c0161513 Show internal name instead of crashing when buildable actor has no tooltip
But throw a lint error instead.
2016-10-23 14:59:22 +02:00
reaperrr
074bb78cbd Made Tooltip trait upgradable 2016-10-23 14:59:18 +02:00
Tyson Liddell
aeb1e07823 Moved production description from Tooltip to Buildable 2016-10-16 12:03:42 +11:00
Alexis Hunt
becbee8388 Move resource tick logic into chrome classes. 2016-08-27 17:17:24 -04:00
Paul Chote
e71225496b Clarify GPL version. 2016-02-21 16:30:48 +00:00
Paul Chote
b396965fd9 Update licence header year. 2016-02-21 16:27:31 +00:00
abcdefg30
ed3f3706f9 Reduce trait lookups further by adding a BuildableInfo parameter to GetBuildTime 2016-01-21 22:29:01 +01:00
abcdefg30
17daac11a1 Avoid unnecessary lookups in the production logic
by improving the GetBuildTime method and moving lookups around.
2016-01-21 22:24:49 +01:00
Paul Chote
b6f463729b Add a ChromeLogic base class for chrome logic. 2015-10-21 19:35:35 +01:00