Commit Graph

175 Commits

Author SHA1 Message Date
RoosterDragon
62ab6ae6f1 OccupiedCells and TargetableCells must return arrays, not just enumerables.
This allows callers to efficiently enumerate these returned collections without the allocation and overhead imposed by the IEnumerable interface. All implementations were already returning arrays, so this only required a signature change.
2017-12-07 20:39:30 +02:00
reaperrr
be290cfabd Split Actor.Bounds into RenderBounds and SelectableBounds
Additionally, internally renamed VisualBounds to SelectionOverlayBounds to avoid confusion with RenderBounds.

This step was necessary to prevent actors with selectable area smaller than their graphics to be removed too early from ScreenMap even though part of the graphics should still be visible.
RA cruisers were a prime example, but to a lesser extent several other actors were affected as well.

This separation also serves as preparation to determine the final RenderBounds from multiple source bounds later, to fix the remaining ScreenMap issues (building 'bibs', aircraft shadows).
2017-11-21 01:00:09 +02:00
Mustafa Alperen Seki
ca1448c7ba Add Support of Types for GivesBuildableArea 2017-11-20 16:17:13 +02:00
kosti1
6a750d7a65 Added buildradius checkbox to lobby options 2017-11-01 18:18:41 +01:00
Andre Mohren
aadfcdac66 Allow RallyPoint cursor to be defined via Yaml 2017-10-26 01:28:42 +02:00
Paul Chote
d967c564a2 Remove TargetActor and TargetLocation from order issuing. 2017-10-15 19:07:46 +02:00
Raffael Zica
f2b5040d30 YamlException is now thrown if WeaponInfo can not be found in Ruleset.Weapons
Removed invalid spacing at the end of the line 36 in ThrowsShrapnel

Prevented NullReferenceException in cases where weapons aren't optional
2017-10-14 14:12:08 +02:00
reaperrr
8533debc44 Require explicit INotifyAddedToWorld and INotifyRemovedFromWorld 2017-10-07 10:17:11 +02:00
reaperrr
0ce3c113e1 Require explicit ITargetableCells 2017-10-07 10:17:11 +02:00
Andre Mohren
4e45747b41 Game no longer crashes if no ResourceLayer is used. 2017-10-06 21:57:57 +02:00
reaperrr
5026dfe5d3 Require explicit INotifyCreated 2017-09-28 13:14:08 +02:00
reaperrr
28e1f391e0 Make ITick require explicit implementation 2017-09-16 15:51:37 +02:00
abcdefg30
ed598d2ab4 Make it possible to disable adjacency 2017-09-13 22:13:49 +02:00
abcdefg30
71f2026b32 Remove the hardcoded cloak reference from activities 2017-09-13 21:18:21 +02:00
Paul Chote
0f6dda3f5f Calculate building placement offsets in screen space. 2017-09-10 18:26:54 +02:00
Forcecore
1dfba51665 Removed dead WSB from Refinery trait 2017-09-09 11:15:31 +01:00
abcdefg30
5cfb5aaf2d Rework the addition and removal of building influence 2017-08-31 17:36:22 +02:00
Zimmermann Gyula
cb36dfa532 Implement instant refineries.
AKA RA2 refinery logic.
2017-08-25 22:19:03 +02:00
Oliver Brakmann
d61939f59f Fix harv docking activities getting lost under certain circumstances 2017-08-07 10:45:45 +02:00
Taryn Hill
57fb551545 Improve the exception message when a Bridge's DemolishWeapon cannot be found 2017-07-29 22:26:30 +02:00
reaperrr
5bdb7bd689 Add OccupiedUntargetable FootprintCellType
For cells that are occupied & unpassable, but should be ignored by HitShape.UseOccupiedCellsOffsets.
2017-07-13 17:43:41 +02:00
reaperrr
fdb3866238 Remove FootprintUtils 2017-07-13 17:43:41 +02:00
reaperrr
46dc827d46 Refactor footprint cell lookups and move them to Building
Removing FootprintUtils happens in the next commit for better
reviewability.
2017-07-13 17:43:41 +02:00
reaperrr
3200f4fb0f Remove bib-related hacks from Building and FootprintUtils 2017-07-06 01:42:55 +02:00
reaperrr
9b137afa6d Add ITargetableCells interface 2017-07-06 01:42:55 +02:00
reaperrr
69aa4f5962 Building style fixes for better readability 2017-07-06 01:42:55 +02:00
Paul Chote
2a2bd676a3 Remove hardcoded references to HideBibPreviewInit. 2017-07-01 10:35:22 +01:00
reaperrr
82758a8bef Add TargetableOffsets to HitShape
And remove ITargetablePositions from Building.
Also, added UseFootprintOffsets to replicate the old Building behavior for easier setup of TargetablePositions for buildings.
2017-06-04 00:07:08 +02:00
evgeniysergeev
c06df1ed21 make IsCloseEnoughToBase function virtual 2017-05-29 11:50:56 +02:00
reaperrr
d92d9f86fc Add IBlocksProjectilesInfo interface 2017-05-13 11:15:38 -07:00
atlimit8
6075569659 Make RepairsUnits pausable-conditional 2017-04-30 09:48:02 -05:00
Paul Chote
a83c0f96dd Add GrantConditionOnLineBuildDirection trait. 2017-04-23 00:44:10 +01:00
Paul Chote
227b80d6c2 Add support for removing segments when parent nodes are removed. 2017-04-23 00:44:10 +01:00
Paul Chote
304e3ef9f9 Distinguish between line build nodes and segments. 2017-04-23 00:44:09 +01:00
atlimit8
6b18eb1993 Merge pull request #12977 from rob-v/RallyPointPrimaryBuilding
When changing rally point with ctrl also make primary
2017-04-11 18:05:16 -05:00
rob-v
4b652aa894 Fix Pre-damaged bridge tiles visually transform to new when attacked #13076 2017-04-09 14:50:36 +02:00
rob-v
bfcb37e1b7 When changing rally point also make primary building #12855 2017-03-22 16:41:30 +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
f360c10569 Rename ConditionManager variables. 2016-12-23 15:02:52 +00:00
Paul Chote
dcad5c3f7c Rename UpgradeManager to ConditionManager. 2016-12-23 14:57:56 +00:00
Oliver Brakmann
f15a81282e Merge pull request #12477 from pchote/conditions-lint
Add a conditions lint rule + other rules fixes.
2016-12-23 14:27:22 +01:00
Paul Chote
9ddfdc45b3 Introduce SoundType enum. 2016-12-23 11:34:23 +00:00
Paul Chote
024cc3db7e Prepare condition attributes for new lint rule. 2016-12-23 11:29:24 +00:00
Paul Chote
e0583af663 Convert PrimaryBuilding to conditions. 2016-12-13 19:30:39 +00:00
Paul Chote
73a0f470c8 Implement TS bridge rendering. 2016-12-10 11:52:05 +00:00
Paul Chote
69e3c538d9 Implement ground-level bridge destruction and repair. 2016-12-10 11:52:04 +00:00
Paul Chote
0bc087f7bd Rename BridgeLayer to LegacyBridgeLayer. 2016-12-10 11:36:39 +00:00
Paul Chote
a5549d3944 Rename BridgeHut to LegacyBridgeHut. 2016-12-10 11:35:29 +00:00
reaperrr
77a134da91 Move INotifyDamageStateChanged to mod code and require explicit implementation 2016-10-22 18:21:52 +02:00