RoosterDragon
5bd5a384b7
Use a BitSet for representing target types.
...
- Rename Bits<T> to BitSet<T>.
- Implement set based helpers for BitSet<T>.
- When representing TargetTypes of ITargetable in various traits, use a BitSet<TargetableType> instead of HashSet<string> for better performance & reduced memory usage.
- Fix FieldLoader to trim input values when generating a BitSet<T>.
- Require T in BitSet<T> and BitSetAllocator<T> to be a class since it's just a marker value. This allows the JIT to instantiate generic code for these classes once, as they don't benefit from specialized code for T. (Typically JITs will generate shared code for all reference types, and unique code for every value type encountered).
2018-03-21 12:07:44 +01:00
Mustafa Alperen Seki
5e7e3bb011
Add DamageTypes to Kill() and make some traits use it.
2018-03-09 00:25:29 +01:00
Mustafa Alperen Seki
065eb78afc
Make AttackSuicides coditional
2018-02-06 03:10:15 +01:00
Paul Chote
2fccfdf1ee
Add support for disabling IIssueDeployOrders.
2018-01-28 18:06:30 +01:00
Arular101
8a60918841
Update copyright notice year to 2018
2018-01-17 00:47:34 +01:00
Paul Chote
86bfe28ade
Add ScreenBounds method to IRender interface.
...
This method is expected to return Rectangles that cover
the region where Renderables returned by Render may exist.
2017-12-11 19:45:07 +01:00
Paul Chote
b898b5001a
Rename AttackBase.IsAttacking to IsAiming to make its uses and assumptions clear.
2017-11-26 15:58:00 +01:00
reaperrr
456d32f3eb
Make Attack* traits PausableConditional and replace IsDisabled with IsTraitDisabled checks
2017-11-25 03:55:56 +02:00
reaperrr
68487d1197
Replace turret IsDisabled check with AT.IsTraitDisabled check
2017-11-25 03:55:56 +02:00
reaperrr
8b7a71685c
Remove AmmoPool-awareness from Armament
2017-11-12 19:48:06 +00:00
Paul Chote
5f9a67ed87
Migrate frozen actors from ExtraData to Target.
2017-10-26 18:48:41 +03:00
Paul Chote
d967c564a2
Remove TargetActor and TargetLocation from order issuing.
2017-10-15 19:07:46 +02:00
reaperrr
28e1f391e0
Make ITick require explicit implementation
2017-09-16 15:51:37 +02:00
reaperrr
c75e64a952
Properly account for disabled Armaments in various places
...
These places didn't care if an Armament was disabled, which could lead to unexpected behavior.
2017-08-22 20:55:46 +01:00
reaperrr
951ee2210c
Consider disabled armaments invalid
2017-08-22 20:55:46 +01:00
abcdefg30
7156c2c09d
Add the missing base implementation to AttackFrontal's RulesetLoaded
2017-08-17 19:28:51 +02:00
forcecore
d1328212c6
AttackFrontal's FacingTolerance is now in effect
2017-08-07 10:26:26 +02:00
reaperrr
94fa24088b
Add dedicated TDGunboat traits
...
And get rid of Mobile.OnRails hack.
2017-07-23 15:06:03 +02:00
reaperrr
0a1083e554
Merge the Valid(...)Weapons methods
2017-06-24 11:24:17 +01:00
reaperrr
33e8bf9928
Adapt Attack logic to Weapon.TargetActorCenter
2017-06-24 11:24:17 +01:00
reaperrr
da7433a95f
Add plumbing for targeting of target center instead of closest targetable position
...
Note: Projectiles that can track their target need minor additional changes, but for InstantHit (which already implemented support for this) and unguided projectiles (Bullet, GravityBomb) this commit is already sufficient.
2017-06-15 01:32:37 +02:00
Paul Chote
e8d6d63707
Add IIssueDeployOrder.
2017-06-06 08:53:54 -06:00
reaperrr
6a212eea53
Make attacking actors/turrets face the targeted position
2017-06-05 14:22:47 +02:00
Markus Hartung
f7ddb969c6
Change so Attack* calls Created on base class
2017-06-04 17:11:44 +02:00
Paul Chote
45b13dabfb
Explicitly implement interfaces in AttackBase.
2017-05-29 06:27:19 -05:00
Paul Chote
34844e87a3
Replace Lazy trait lookups with INotifyCreated.
2017-05-29 06:27:19 -05:00
atlimit8
4917c6e453
Merge pull request #12924 from reaperrr/fix-tunnel-atk
...
Prevent units in tunnels/underground from attacking
2017-04-29 00:25:23 -05:00
reaperrr
1fae993593
Prevent attacking while in tunnel/underground
2017-04-27 17:50:02 +02:00
MartinCurwen
ea6e1fdd64
Multiple armament check fix in AttackGarrisoned
2017-04-19 17:40:14 +01:00
Paul Chote
a9cfbd9ad7
Fix Obelisk not dropping targets when they move out of range.
2017-03-10 19:42:15 +00:00
Paul Chote
a52ea71c62
Add AttackCharges trait for TD and TS obelisks.
2017-02-11 16:19:58 +00:00
Paul Chote
a8d46adb2d
Rename tesla attack logic and move to Mods.Cnc.
2017-02-11 16:19:58 +00:00
abcdefg30
19549a9068
Fix null being passed through the INotifyAttack interface
2017-01-29 11:07:20 +01:00
Taryn Hill
43317e0f5d
Update copyright notice year to 2017
2016-12-31 23:46:13 -06:00
Paul Chote
268ed016ab
Rename UpgradableTrait to ConditionalTrait.
2016-12-23 23:28:34 +00:00
Paul Chote
9ddfdc45b3
Introduce SoundType enum.
2016-12-23 11:34:23 +00:00
Paul Chote
23f4ae5027
Replace UpgradeMinEnabledLevel checks with an EnabledByDefault shim.
2016-11-19 17:19:25 +00:00
Oliver Brakmann
9ab2ce2362
Merge pull request #11520 from reaperrr/IdleWander
...
Make civilians wander around when idle
2016-07-04 11:50:35 +02:00
reaperrr
c8012baffb
Make all Attack* traits listen to Stop order
2016-07-02 16:02:00 +02:00
reaperrr
75c49620d1
Introduce INotifyAttack.PreparingAttack
...
And use it to allow triggering attack animations/overlays at a different point
than the actual weapon firing.
2016-07-02 16:02:00 +02:00
reaperrr
f5a0c7e425
Move AttackWander into root Traits folder
...
It's not really an Attack* trait, so it doesn't belong into that subfolder.
2016-06-25 12:36:35 +02:00
reaperrr
27993729be
Make attack cursor smarter
...
Rather than simply taking the first valid armament, regardless of available ammo and regardless of which valid armament has the highest range, the attack cursor is now chosen a) by whether the armament has ammo and b) by which valid armament has the highest range.
2016-06-23 15:09:11 +02:00
reaperrr
4f55b088eb
Check if weapon without self-reloading is out of ammo when deciding validity
...
This should prevent attacking helicopters (or other actors) staying at the range to target of a weapon that is out of ammo and needs manual reloading at a RearmBuilding or via upgrades.
2016-06-23 14:47:41 +02:00
reaperrr
2f1a6e8807
Add maximum and minimum range vs. target checks
...
This adresses the issue that actors would ignore the validity of weapons when deciding the attack distance versus a target. This could result in actors staying out of range of a weapon valid versus target if they carried a weapon with higher range but invalid versus target.
2016-06-16 20:39:45 +02:00
reaperrr
fd5a597966
Move Render traits to Traits.Render namespace
2016-04-15 20:43:04 +02:00
Paul Chote
acab6f1f4b
Fix custom order generators for left-click targeting.
2016-04-09 11:59:54 -04:00
Paul Chote
2024f86290
Fix Turreted units not dropping cancelled targets.
2016-04-03 10:22:53 +01:00
Taryn Hill
6d4e365af5
Require explicit implementation of INotifyPassenger(Entered|Exited)
2016-03-29 06:59:43 -05:00
Jonathan Ling
2d4c3f715f
Refactored ticks to delay per issue #9810
2016-03-22 17:03:37 -04:00
RoosterDragon
4598b0de43
Have turrets actively track targets, even when not ready to attack.
2016-03-12 20:42:10 +00:00