Commit Graph

203 Commits

Author SHA1 Message Date
Andre Mohren
091f660dc7 Extracted Repairing notification to RepairableBuilding. 2018-09-24 22:43:14 +02:00
Andre Mohren
90c2249317 PrimaryBuilding notification now optional. 2018-09-24 22:43:14 +02:00
reaperrr
46cee82027 Move RepairsUnits out of Building folder 2018-08-12 14:36:59 +01:00
Chris Forbes
d4ef841678 Convert masses of HashSet<string> to BitSet<DamageType> 2018-07-28 20:12:42 +01:00
Andre Mohren
b86355cda6 Made MapBuildRadius optional for traits who do not require it. 2018-07-25 22:35:46 +01:00
Zimmermann Gyula
d9786dcf72 Normalize the line-endings on RepairableBuilding. 2018-06-17 16:13:16 +02:00
Andre Mohren
fc82c24e1f FreeActor now supports to be triggered by condition. 2018-06-16 14:47:45 +02:00
Paul Chote
2ef6f7c0cc Replace repair indicator effect with a Decoration subclass. 2018-06-02 18:12:08 +02:00
Paul Chote
218914458f Document RepairableBuilding fields. 2018-06-02 18:12:08 +02:00
GSonderling
bf4dbd9b80 Added checks to make sure cash can't be < 0. 2018-05-07 19:47:41 +02:00
abcdefg30
917fd2103f Use ShakeOnDeath instead of the hardcoded shaking for bridges 2018-05-06 04:51:03 +02:00
reaperrr
3c34330925 Skip check for ITemporaryBlocker entirely if rules don't contain any temporary blockers
This benefits all mods without temporary blockers like gates or energy walls.
2018-05-04 19:40:18 +02:00
Chris Forbes
770f14fa2a Use IPositionable.CanExistInCell in Bridge/GroundLevelBridge
We don't care whether there's empty space for the actor now -- we care whether
the terrain the actor is ALREADY standing on remains suitable after the
bridge state change.
2018-04-10 01:01:53 +02:00
Michael Silber
1b110b7833 Add Replaceable and Replacement traits to support wall overrides. 2018-04-07 23:32:24 +02:00
Michael Silber
6b24271a17 Pass ActorInfo through building-placement-validation code. 2018-03-21 12:53:50 +01:00
reaperrr
d643d2ebda Remove legacy .aud sound defaults from Common traits
While C&C-specific sound defaults might be acceptable for C&C-specific traits like MadTank and Chronoshiftable, for common, generic traits like Building they no longer are.
2018-03-09 18:58:49 +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
c976bb1d7b Make BaseProvider PausableConditional 2018-03-08 17:19:23 +01:00
Mustafa Alperen Seki
ce63dd33db Make PrimaryBuilding conditional. 2018-02-06 21:09:38 +01:00
Arular101
8a60918841 Update copyright notice year to 2018 2018-01-17 00:47:34 +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
Oliver Brakmann
32b0170785 Fix primary building flag not working properly in D2k 2018-01-13 17:19:38 +01:00
reaperrr
04fb0f209d Spatially partition some actor overlays 2017-12-23 17:56:11 +00:00
reaperrr
c1cba4ecc1 Make Gate more independent from Building and pausable-conditional
Replace Gate IsDisabled checks with IsTraitDisabled/Paused checks
2017-12-17 21:18:44 +00:00
GSonderling
488cec64b8 Added support for filtering exits by production type. 2017-12-13 04:08:52 +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
373aaee004 Use World.(AddTo|RemoveFrom)Maps in Immobile/Building. 2017-12-11 19:45:07 +01:00
Paul Chote
9e18ec7314 Simplify ScreenMap bounds checking. 2017-12-11 19:45:07 +01:00
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