Paul Chote
39c2b76c51
Convert DisableOnUpgrade to conditions.
2016-12-13 19:30:42 +00:00
Paul Chote
f4e0b91e04
Convert DeployToUpgrade to conditions.
2016-12-13 19:30:41 +00:00
Paul Chote
29d7d42638
Convert UpgradeOnTerrain to conditions.
2016-12-13 19:30:40 +00:00
Paul Chote
f9791bbc1d
Convert UpgradeOnMovement to conditions.
2016-12-13 19:30:39 +00:00
Paul Chote
b9bc6eba16
Convert UpgradeOnDamageState to conditions.
2016-12-13 19:30:39 +00:00
Paul Chote
32f0d570bf
Rework UpgradeActorsNear -> ProximityExternalCondition.
2016-12-12 14:28:54 +00:00
Paul Chote
da6fd74881
Add support for stacked condition bonuses.
2016-12-06 17:21:14 +00:00
Paul Chote
a692c1e761
Rework timed conditions.
2016-12-06 17:21:12 +00:00
Paul Chote
f934a4e2b7
Add an external condition whitelist.
2016-12-06 17:21:12 +00:00
Paul Chote
dc7fa14992
Add GrantCondition trait.
2016-11-30 19:24:43 +00:00
Paul Chote
3f0b33992c
Rewrite UpgradeManager implementation to suit conditions.
2016-11-20 13:55:47 +00:00
Paul Chote
05187f5828
Remove legacy UpgradeTypes consumer code.
2016-11-20 13:38:41 +00:00
Paul Chote
5192c27199
Add an RequiresCondition field to UpgradeableTrait.
2016-11-19 17:19:26 +00:00
Paul Chote
23f4ae5027
Replace UpgradeMinEnabledLevel checks with an EnabledByDefault shim.
2016-11-19 17:19:25 +00:00
reaperrr
0fcc07cb7b
Add UpgradeOnMovement trait
...
This provides upgrades when an actor is moving. To avoid 'hiccups' for ground units, air units are considered moving as soon as they are airborne.
2016-10-23 13:23:04 +02:00
reaperrr
b174d00be9
Rename UpgradeOnDamage to UpgradeOnDamageState
...
The trait works for 'Undamaged' as well and no longer requires a damage state change to trigger either, so this trait name is more accurate.
2016-08-18 23:31:27 +02:00
reaperrr
7f8607e85b
Fix granting upgrades on initial damage state
...
Previously the upgrade(s) would only be granted when the damage state changed, regardless of whether the initial DamageState was already valid.
This prevented the trait from working on Undamaged actors that had just been created, for example.
2016-08-18 23:31:27 +02:00
reaperrr
adeb2a19ca
Remove bogus 'OrDefault' from UpgradeOnDamage
...
UpgradeManager is required anyway, so this was redundant.
2016-08-18 23:31:27 +02:00
reaperrr
bd4f7db711
Fix UpgradeOnDamage trait description
...
The old desc is bogus copy-pasta.
2016-08-11 11:31:18 +02:00
reaperrr
e59a491c1b
Allow UpgradeOnDamage to grant permanent upgrades
...
Needed to properly implement things like permanently crippled weapons or limbs.
2016-06-12 14:25:23 +02:00
Matthias Mailänder
3dc472bb06
Add UpgradeOnTerrain.
2016-06-04 17:42:58 +02:00
reaperrr
2fe91cd1a2
Make vertical range of UpgradeActorsNear customizable
2016-05-26 22:47:48 +02:00
reaperrr
b0e90989a6
Add plumbing for customizable vertical ProximityTrigger range
...
And check DistanceAboveTerrain instead of just vertical distance to upgrade
source.
This is necessary to avoid situations where an actor is technically on the right
vertical distance above/below ground, but not upgraded because it is located on a lower/higher terrain level than the upgrade source.
2016-05-26 22:47:45 +02:00
reaperrr
d03eaaaac0
Introduce UpgradeOnDamage trait
2016-05-16 02:41:12 +02:00
Oliver Brakmann
6323f763f1
Merge pull request #11122 from reaperrr/traits-render
...
Move Render traits to Traits.Render namespace
2016-04-17 21:48:32 +02:00
Matthias Mailänder
3d1fadf24a
Merge pull request #11014 from dtluna/can_undeploy
...
Added CanUndeploy property
2016-04-17 10:37:44 +02:00
reaperrr
fd5a597966
Move Render traits to Traits.Render namespace
2016-04-15 20:43:04 +02:00
dtluna
cf0a4bc21f
Added CanUndeploy property.
2016-04-03 02:46:38 +03:00
RoosterDragon
0cbce8141f
Fix circular trait dependencies on UpgradeManager.
...
Don't use Requires to force an ordering, instead just use INotifyCreated to grab all the traits once constructed.
2016-03-29 23:10:48 +01:00
Paul Chote
65df25b1a4
Remove lazy loading of binary map data.
2016-03-18 20:16:24 +00:00
Paul Chote
602acabe47
Remove World.TileSet.
2016-03-12 19:47:07 +00: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
teees
8315350f07
Don't grant upgrades to newly built units while disabled
2016-01-28 10:42:02 +01:00
RoosterDragon
8e89a6a696
Simplify names, remove unused usings, remove redundant casts.
2016-01-17 21:35:36 +00:00
abcdefg30
72ac5240b8
Remove ISpriteBody
2015-12-20 18:44:55 +01:00
atlimit8
c827dbe183
Replace IDisableMove with upgradability
2015-12-04 19:26:49 -06:00
abcdefg30
6f8d580567
Fix a crash when producing an actor without OccupiesSpace in combination with UpgradeActorsNear
2015-12-03 16:25:46 +01:00
abcdefg30
abed25d293
Merge pull request #9501 from atlimit8/DeployedInit
...
Add DeployStateInit for Pre-deployment and Clean Up after #9124
2015-11-28 15:58:46 +01:00
RoosterDragon
bfe1804bf6
Fix some spellings.
2015-11-27 16:19:59 +00:00
atlimit8
36db019823
Add DeployStateInit for pre-deployment
2015-11-21 20:25:17 -06:00
Pavel Penev
7e4f0be7fb
Add support for deploy animations using a specific upgrade
...
Also ignore orders while playing a deploy/undeploy animation. Fixes 9242.
We grant a level 1 Undeployed upgrade(s) when the actor is created which enables the default behavior of the actor. When the actor receives a deploy order, the Undeployed upgrade(s) is(are) revoked, which may or may not be used to enable a trait to play a deploy animation. Once the deployment is complete, the Deployed upgrade(s) is(are) granted.
Then do the reverse when undeploying, disabling weapons and other systems first by revoking the Deployed upgrade(s), and granting the Undeployed upgrade(s) when the undeploy animation is done.
2015-11-22 01:51:08 +02:00
Pavel Penev
13978b08bc
Fix UpgradeActorsNear revoking upgrades after the actor dies
...
Very hard bug to reproduce: if you can power down a stealth generator just as it is dieing you can hit a race condition that leads to ActorExited() being called to revoke the upgrades after they have already been revoked once.
2015-11-15 18:51:15 +02:00
Oliver Brakmann
63d1158f94
Merge pull request #8563 from matija-hustic/tesla_boost
...
Tesla boost for RA2 mod
2015-10-11 14:33:13 +02:00
Matija Hustić
c55141c91c
Enabled multiple timed upgrades from single source.
...
This makes the UpgradeManager support requests to grant a timed
upgrade multiple times from a single source.
GrantUpgradeWarhead modified to take advantage of this.
2015-10-09 22:41:23 +02:00
Pavel Penev
db609b12a0
Add a CanDeployOnRamps property to DeployToUpgrade
2015-10-09 17:15:54 +03:00
Nolt
7994d08702
Create #9435 DisableMovementOnUpgrade, rename DisableUpgrade to DisableOnUpgrade and Fixed not showing the blocked move cursor when movement is disabled.
2015-09-28 21:32:00 -03:00
atlimit8
6e39a5e264
Replace .WithInterface<T>().Any() => .HasTraitInfo<T>()
2015-09-21 15:50:57 -05:00
Paul Chote
ef55d646f7
Unstatic the Sound class.
2015-09-20 14:11:06 +01:00
atlimit8
8250f223c4
More HashSet trait fields & Lint support
2015-09-05 16:59:30 -05:00