Commit Graph

54 Commits

Author SHA1 Message Date
Andre Mohren
fac758f38e ProductionQueue notifications now optional. 2018-09-24 22:43:14 +02:00
Andre Mohren
a57cfc7d40 Fixed ProductionItem costs calculation. 2018-07-26 14:01:37 +00:00
Andre Mohren
81e1b39bb9 Made PowerManager optional for traits who do not require it. 2018-07-26 14:02:42 +01:00
Paul Chote
0654f18f22 Break out of cancellation loop when there is nothing left to cancel. 2018-04-22 18:01:57 +02:00
Paul Chote
f2cf51d1a4 Play appropriate audio notifications when build/production limit is reached. 2018-04-22 18:01:57 +02:00
Paul Chote
da10e94b41 Add per-item and total queue length limits to ProductionQueue.
Implement 999 per-actor limit.
2018-04-22 18:01:57 +02:00
Andre Mohren
5b7d43f1e0 Virtual ProductionQueue.AllQueued 2018-04-12 08:08:45 +02:00
Mustafa Alperen Seki
356f24b78c Add logic to disallowing On Hold on a queue. 2018-03-18 15:58:57 +01:00
reaperrr
5ae1d1c4bf Fix bracket style issue in ProductionQueue
While it's really minor and insignificant, our style convention is to put opening { brackets on a newline (unless everything fits into a single line).
2018-02-21 22:04:33 +03: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
Mustafa Alperen Seki
acf25354b0 Consider BuildAtProductionType for exit types too for normal ProductionQueue 2017-12-27 13:46:20 +00:00
reaperrr
383840135f Replace IsDisabled checks in production with IsTraitPaused/Disabled checks
Note: We might want to separate IsTraitDisabled checks later (possibly make the latter cancel the currently produced item), but that can be done in a follow-up.
2017-12-17 21:18:44 +00:00
GSonderling
488cec64b8 Added support for filtering exits by production type. 2017-12-13 04:08:52 +01:00
abcdefg30
cba7c60f6f Fix the "Unit Ready" notification playing erroneously 2017-10-25 22:43:35 +01:00
Paul Chote
cfac996438 Generalize factionVariant to a TypeDictionary of Inits. 2017-10-22 03:32:21 +03:00
reaperrr
28e1f391e0 Make ITick require explicit implementation 2017-09-16 15:51:37 +02:00
Taryn Hill
43317e0f5d Update copyright notice year to 2017 2016-12-31 23:46:13 -06:00
reaperrr
61284d73dd Make interface implementations explicit where possible in traits that implement INotifySold 2016-10-20 19:02:30 +02:00
reaperrr
22dcb1c66f Move INotifySold to Common and require explicit implementation 2016-10-20 19:02:28 +02:00
Zimmermann Gyula
d9f38d57a7 Cache the *Infos in ProductionItem. 2016-08-21 12:05:34 +02:00
Zimmermann Gyula
f80ac6e5c0 Rename ProductionQueue.BuildSpeed and change it's default value. 2016-08-21 12:05:34 +02:00
Zimmermann Gyula
de10cb22e8 Shift CustomBuildTimeValue to Buildable. 2016-08-21 12:05:32 +02:00
Paul Chote
7e49ae7eb0 Prepare DeveloperMode code for trait-defined lobby options. 2016-05-14 18:54:44 +01:00
Oliver Brakmann
87e1acfc9f Re-implement the insufficient funds warning in a simpler manner 2016-04-11 19:06:18 +02:00
Oliver Brakmann
41388b9c63 Revert the previous InsufficientFundsWarning implementation 2016-04-11 19:06:18 +02:00
reaperrr
38cea38f6b Migrate BuildSpeed from float to int 2016-03-24 18:43:48 +01:00
abcdefg30
be1080f7bd Add support for playing an InsufficientFunds warning 2016-02-23 22:16:51 +01: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
5496245a00 Remove unnecessary lookups and checks
- We already return early if the unit doesn't have a BuildableInfo
- World.Map.Rules.Actors[actorName] won't return null
- Made BuildUnit use an ActorInfo instead of the name as parameter
2016-01-21 22:24:50 +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
abcdefg30
fdfea2f0fb Fix style errors in ProductionQueue.cs 2016-01-21 15:41:33 +01:00
RoosterDragon
3026bdcea5 Implement equality on TraitPair. 2016-01-17 00:13:06 +00:00
RoosterDragon
bfe1804bf6 Fix some spellings. 2015-11-27 16:19:59 +00:00
atlimit8
b6f17df260 Add ActorsHavingTrait<TTrait>([Func<TTrait, bool]) 2015-10-28 16:36:45 -05:00
Paul Chote
7f4663f606 Pull out a temporary variable in ProductionQueue. 2015-09-20 22:46:07 +01:00
Paul Chote
ef55d646f7 Unstatic the Sound class. 2015-09-20 14:11:06 +01:00
atlimit8
09984683a7 Add ActorInfo.TraitInfo[OrDefault]<T>() requiring ITraitIfo types 2015-09-19 09:56:14 -05:00
atlimit8
8162fa27ab Add ActorInfo.HasTraitInfo<T>() requiring ITraitInfo types 2015-09-19 09:49:24 -05:00
atlimit8
8250f223c4 More HashSet trait fields & Lint support 2015-09-05 16:59:30 -05:00
RoosterDragon
d415d3ba4e Reduce allocations in the main game loop.
- Cache the shroud projection even for flat maps to avoid allocating single element arrays.
- Avoid LINQ in shroud and map projection queries to avoid enumerator allocations.
- Avoid LINQ in calculation of sync values.
- Cache enumerables in ProductionQueue.
- Cache delegate in HackyAI.
2015-08-18 21:17:28 +01:00
Pavel Penev
8b58f3a1d8 Rename ProductionQueue.Race to Faction 2015-08-11 03:29:49 +03:00
Pavel Penev
6e9b5ed2c9 Rename ProductionQueueInfo.Race to Factions
Also add an upgrade rule.
2015-08-11 03:27:12 +03:00
penev92
7c1ef2231d Rename RaceInit to FactionInit 2015-07-25 00:39:31 +03:00
penev92
bb648decc3 Rename Player.Country to Player.Faction 2015-07-15 04:06:52 +03:00
penev92
2e04fb5ddd Rename Faction trait members
Rename Faction.Race to Faction.InternalName
2015-07-14 18:50:39 +03:00
atlimit8
1bcc07ce69 Add property requirements to safe traits 2015-07-12 12:44:30 -05:00
Paul Chote
97b4509607 Remove deprecated Buildable.Owner field. 2015-04-30 07:35:27 +12:00