Commit Graph

197 Commits

Author SHA1 Message Date
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
Matthias Mailänder
be3ea7b79e Move audio traits into Sounds namespace. 2016-04-10 22:34:10 +02:00
reaperrr
251b1b44d4 Migrate StrategicVictoryConditions.RatioRequired to int percentage
Remove bogus CriticalRatioRequired from RA Hopes Anchor.
2016-03-28 14:44:20 +02:00
reaperrr
38cea38f6b Migrate BuildSpeed from float to int 2016-03-24 18:43:48 +01:00
Jonathan Ling
2d4c3f715f Refactored ticks to delay per issue #9810 2016-03-22 17:03:37 -04:00
Paul Chote
d4f8fe1666 Move map configuration to rules. 2016-03-07 21:41:13 +00:00
Zimmermann Gyula
505542955c Normalize InsufficientFundsWarning header.
It got merged with the old, now outdated header.
2016-02-28 12:57:36 +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
RoosterDragon
eb3be990a6 Remove dead code and encapsulate more in Sync.cs. 2016-01-31 00:42:00 +00:00
abcdefg30
79829c5270 Add support for playing a "Our ally is under attack" notification 2016-01-26 21:16:29 +01:00
abcdefg30
a56ffb581f Move some checks in *AttackNotifier to improve performance 2016-01-26 21:10:12 +01:00
abcdefg30
ed3f3706f9 Reduce trait lookups further by adding a BuildableInfo parameter to GetBuildTime 2016-01-21 22:29:01 +01:00
abcdefg30
4e0775b59e Remove the unused ISync implementation in ClassicProductionQueue.cs
The base class ProductionQueue already implements ISync
2016-01-21 22:24:51 +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
8e89a6a696 Simplify names, remove unused usings, remove redundant casts. 2016-01-17 21:35:36 +00:00
Oliver Brakmann
aaeb715006 Merge pull request #10246 from penev92/terrainPalettes
Allow tile templates to define their own palette
2016-01-17 21:39:28 +01:00
Pavel Penev
861d1368a4 Unhardcode internal terrain palette name from all over the codebase 2016-01-17 19:02:16 +02:00
RoosterDragon
3026bdcea5 Implement equality on TraitPair. 2016-01-17 00:13:06 +00:00
Sean Hunt
8f4ec87b63 Factor silos needed warning to a new trait. 2015-12-27 14:40:37 -05:00
RoosterDragon
b0619a3e25 Added comments in performance sensitive code. 2015-12-13 16:24:54 +00:00
RoosterDragon
bfe1804bf6 Fix some spellings. 2015-11-27 16:19:59 +00:00
Oliver Brakmann
177d983728 Merge pull request #9759 from atlimit8/ActorsHavingTrait
Add ActorsHavingTrait<TTrait>()
2015-11-04 22:26:10 +01:00
Oliver Brakmann
e7e4f2f825 Fix base range circle not being shown during building placement 2015-10-29 11:00:59 +01:00
atlimit8
b6f17df260 Add ActorsHavingTrait<TTrait>([Func<TTrait, bool]) 2015-10-28 16:36:45 -05:00
RoosterDragon
7c889c5ef0 Fix TOCTOU issues when calling Game.RunAfterDelay.
Since the action runs after a delay, the state of the game may no longer be the same and it may no longer be valid to run the action. Anything that references the world now calls IsCurrentWorld to ensure the world hasn't changed or been disposed.
2015-10-25 19:44:21 +00:00
Paul Chote
9aa5828155 Merge pull request #9307 from obrakmann/fix6174_beacon-key-in-replays
Make some navigation keys available to spectators
2015-09-26 11:30:50 +01:00
atlimit8
9acf121eb1 Replace ActorInfo.Traits.WithInterface with ActorInfo.TraitInfos<T>() 2015-09-21 15:50:57 -05:00
Paul Chote
7f4663f606 Pull out a temporary variable in ProductionQueue. 2015-09-20 22:46:07 +01:00
Oliver Brakmann
379b5a181f Make (Harvester|Base)AttackNotifiers visible to team mates and spectators 2015-09-20 22:37:34 +02: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
85fab45451 Remove Actor.HasTrait<T>() 2015-09-19 09:49:23 -05:00
atlimit8
8250f223c4 More HashSet trait fields & Lint support 2015-09-05 16:59:30 -05:00
reaperrr
bc2b60be05 Extend WithSpriteBody funtionality
Move building placement range circle to PlaceBuilding, add
PauseAnimationWhenDisabled.
2015-08-29 23:10:22 +02: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
Matthias Mailänder
118782a85e check palette references 2015-08-17 21:36:45 +02:00
Matthias Mailänder
e13f983946 Merge pull request #9038 from penev92/bleed_rename
Some more renaming from "race" to "faction"
2015-08-13 21:13:31 +02: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
RoosterDragon
a0117a3890 Add a method to look up actors by ID.
This can be used to speed up some methods.
2015-08-09 20:25:34 +01:00
Matthias Mailänder
bbb186d9c8 fix marking player as spectator going through unsynced code 2015-08-03 10:28:32 +02:00
Pavel Penev
10c5b82ef0 Rename BuildableInfo.ForceRace 2015-07-31 05:41:19 +03:00
Pavel Penev
a8dae72409 Clean ProvidesPrerequisite.cs of "race" 2015-07-31 05:38:49 +03:00
Pavel Penev
1e9cc50805 Clean Production.cs of "race" 2015-07-31 05:38:43 +03:00