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
Pavel Penev
899ea7e16d
Add a description to DisableUpgrade
2015-09-01 20:19:31 +03:00
Pavel Penev
cdedfe6931
Don't get stuck in deployed mode because of an impossible move order
2015-09-01 20:19:29 +03:00
Pavel Penev
7668e0a30c
Add deploy and undeploy sounds to DeployToUpgrade
2015-09-01 20:19:27 +03:00
Pavel Penev
21f9547fed
Add facing to DeployToUpgrade
...
Make the actor turn to a desired facing before starting to deploy (and before granting the upgrade).
2015-09-01 20:19:25 +03:00
Pavel Penev
7d59aaa00c
Add a deploy animation to DeployToUpgrade
...
Play a "deploy"/"undeploy" animation
2015-09-01 20:19:23 +03:00
clemty
2bbc1fcda4
LUA and trait documentation fixes
...
- Typo in documentation ("proximitry").
- Add spaces between sentences.
- Remove most occurrences of " " (two spaces) unless clearly used as indendation
- Punctuation (although no fullstop after filenames like "notifications.yaml").
2015-08-24 19:41:15 +02:00
RoosterDragon
3a0eb5554e
Provide HasStance extension method for Stance enum, to avoid overhead of HasFlag method.
2015-07-15 20:40:38 +01:00
Matija Hustić
b2a26c57bc
Adjusted other users of timed upgrades.
2015-07-14 03:08:48 +01:00
Matija Hustić
58472bf090
Timed upgrades track sources.
2015-07-14 02:54:40 +01:00
atlimit8
daec860192
Added multiplier modifier traits, removing GainsStatUpgrades, InvulnerabilityUpgrade, & Invulnerable.
2015-07-13 09:24:50 -05:00
atlimit8
1bcc07ce69
Add property requirements to safe traits
2015-07-12 12:44:30 -05:00
Matthias Mailänder
56e9bcd96e
rename RangeSquard to LengthSquared
2015-07-09 21:16:01 +02:00
Matthias Mailänder
7447e0bf93
rename WRange to WDist
2015-07-09 10:55:38 +02:00