Commit Graph

5016 Commits

Author SHA1 Message Date
reaperrr
d90ff99e74 Replace WithReloadingSpriteTurret with conditions
WithReloadingSpriteTurret was bound to run into conflicts with any WithTurret*Animation traits due to overriding the turret sequence constantly via ITick.
Using (stacked) conditions instead avoids that.
2018-03-08 16:03:14 +01:00
reaperrr
55b11d1745 Don't cache ActorSpawners at creation
Re-evaluate before every spawn attempt instead.
Also accounts for ActorSpawner being conditional now.

While a bit more costly in terms of performance, this allows to create spawns mid-game.
2018-03-08 15:39:44 +01:00
Voidwalker
711bad91a3 Generalize WormManager into ActorSpawnManager.
Added support of multiple actors, conditions and types.
2018-03-08 15:39:44 +01:00
Paul Chote
e69cf4fd5c Rename another Stream.Write(byte[]) extension method. 2018-03-07 22:29:35 +01:00
Peter Antal
9ce0bcb0b7 Mop up active Stylecop nits.
Style consistency cleanup.
2018-03-03 11:45:35 +00:00
reaperrr
c5f9d6ff2d Add more configurability to AI MinimumExcessPower logic
Allows to scale the targeted minimum excess with building count as well as define a maximum cap to avoid overproducing powerplants.
2018-02-27 19:47:00 +01:00
Matthias Mailänder
cf944ae9f1 Require IntoActor everywhere. 2018-02-23 20:02:47 +01:00
Matthias Mailänder
6bd1e90671 Add TransformCrusherOnCrush 2018-02-23 20:02:47 +01:00
reaperrr
9107ca3bc1 Remove unused legacy IsWater flag
This was planned anyway, we had just forgotten about it when the last blocker was removed.
2018-02-22 11:51:10 +01:00
Alexis Hunt
08ad7d7f4e Refactor handling of hit radii in projectiles.
penev discovered that the RulesetLoaded functions of projectiles were
never being called, meaning that their blocking calculations were not
properly accounting for actors with large hitboxes.

The best fix for this is to change FindActorsOnLine to always account
for the largest actor's hit radius, rather than forcing callers to pass
the largest radius. Per the comment in Util.cs, as a result, move this
computation to ActorMap. I decided to simplify by not making a separate
calculation for actors that block projectiles only; this may cause a
small performance degradation as the search space is a bit larger.

Similarly to this, I've removed the ability to specify a search radius
manually. Because this is only a search radius, setting a value smaller
than the largest eligible actor makes no sense; that would lead to
completely inconsistent blocking. Setting a larger value, on the other
hand, would make no difference.

CreateEffectWarhead was the only place in core code any of these search
radii were set, and that's because 0 was a mysterious magic value that
made the warhead incapable of hitting actors. I replaced it with a
boolean flag that more clearly indicates the actual behaviour.

Fixes #14151.
2018-02-21 23:26:41 +01:00
Mustafa Alperen Seki
c4b0ad45e3 Add lua functions for DeliverCash and DeliverExperience 2018-02-21 21:38:43 +01:00
Guido L
21472f2cc6 HackyAI: Refactor and remove duplicated logic. 2018-02-21 21:34:00 +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
Mustafa Alperen Seki
913e7fc995 Unhardcode GrantExternalConditionPower cursors 2018-02-18 23:02:31 +01:00
abcdefg30
0f1cd07dee Don't render empty background images 2018-02-18 20:18:30 +01:00
Mustafa Alperen Seki
0e0ab318e6 Make ThrowsShrapnel conditional 2018-02-18 18:41:29 +01:00
Mustafa Alperen Seki
733055007a Add Player Palette support for Bullet, Missile and GravityBomb. 2018-02-18 18:23:24 +01:00
abcdefg30
bed6b26428 Fix FallsToEarth not accounting for effective ownership 2018-02-17 12:21:55 +01:00
Mustafa Alperen Seki
3ed8e4b4e8 Make SPM not fire from an actor with disabled instance of a SW. 2018-02-06 21:09:38 +01:00
Mustafa Alperen Seki
99eedfd0e7 Make SupportPowerChargeBar conditional 2018-02-06 21:09:38 +01:00
Mustafa Alperen Seki
ce63dd33db Make PrimaryBuilding conditional. 2018-02-06 21:09:38 +01:00
Mustafa Alperen Seki
491f808b75 Add GrantConditionOnFaction. 2018-02-06 21:09:38 +01:00
Mustafa Alperen Seki
065eb78afc Make AttackSuicides coditional 2018-02-06 03:10:15 +01:00
Paul Chote
258df13451 Fix missing PauseStateLocked check on "/pause" chat command. 2018-02-04 15:30:53 +01:00
Paul Chote
237d9b3a29 Fix missing click sounds on observer stat hotkeys. 2018-02-03 19:16:18 +01:00
Paul Chote
8174d0e69a Use EffectiveOwner for actor tooltips. 2018-02-03 18:35:50 +01:00
Paul Chote
2fccfdf1ee Add support for disabling IIssueDeployOrders. 2018-01-28 18:06:30 +01:00
Paul Chote
fc31fac1f0 Work around duplicated notification sound when the ingame menu is open. 2018-01-28 14:51:41 +01:00
Paul Chote
73f5f1fa75 Remove AddChatLine registration on IngameChatLogic dispose. 2018-01-28 14:51:41 +01:00
Arular101
21504a774d Add missing copyright notice 2018-01-17 23:07:01 +01:00
Arular101
8a60918841 Update copyright notice year to 2018 2018-01-17 00:47:34 +01:00
Paul Chote
7dea5e28af Remove ReturnToBase order feedback if no RearmBuildings are defined.
ReturnToBase requires RearmBuildings to function.
2018-01-14 23:25:47 +01:00
Mustafa Alperen Seki
c87aa62647 Make ProduceActorPower care for PrimaryBuilding 2018-01-13 17:55:57 +01:00
Arular101
24b7f7a23f Cast to long to avoid overflow when multiplying by the health (part 2) 2018-01-13 17:32:34 +01:00
Arular101
30acee38c9 Cast to long to avoid overflow when multiplying by the health 2018-01-13 17:32:34 +01:00
Oliver Brakmann
32b0170785 Fix primary building flag not working properly in D2k 2018-01-13 17:19:38 +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
ff39802090 Make /kill and /dispose use orders. 2018-01-13 15:50:54 +01:00
Paul Chote
9a7c6ba34e Refresh lobby server list when switching to the Servers tab. 2018-01-09 21:55:23 +01:00
Paul Chote
3f37f02e84 Use https for web services. 2018-01-09 20:52:25 +01:00
Paul Chote
f6fcf4ca6f Fix crash when the mouse-overed support power loses all instances. 2018-01-06 14:32:00 +01:00
GSonderling
69e6e033a6 AI will now defend MCV as if it was a harvester or a building.
Adjusted comments.
2018-01-04 22:11:43 +01:00
Paul Chote
7b056509ec Don't try to remove tooltips that haven't been added. 2018-01-01 18:23:16 +02:00
Paul Chote
f8abd5d319 Serialize the correct player in FrozenActor-targeting orders. 2018-01-01 16:01:44 +01:00
Paul Chote
47fa9e496d Fix tooltips not showing for frozen actors with dead backing actors.
This also documents some old bugs.
2018-01-01 16:01:44 +01:00
Andrii Yukhymchak
11db40a2b3 Fixed issue with unit ready when capturing 2018-01-01 12:52:47 +00:00
Paul Chote
dec11f4fa0 Force spectator color to white to avoid spoofing by the server. 2018-01-01 11:25:08 +01:00
Paul Chote
ae394f937b Fix the color validator overriding spectator colors. 2018-01-01 11:25:08 +01:00
Paul Chote
3353215b66 Add a total player count to the MP browser. 2018-01-01 11:12:27 +01:00
Paul Chote
7fba6a2155 Add a view-only server list tab to the multiplayer lobby. 2017-12-30 17:03:58 +01:00