Compare commits

...

3099 Commits

Author SHA1 Message Date
Paul Chote
c00ed84b25 Fix player joins resetting the server timestep. 2016-10-19 21:05:37 +02:00
Paul Chote
7f7f037ffd Fix a desync in GpsDot.IsTargetableBy.
World.ShroudExplores depends on RenderPlayer,
which makes it completely bogus for this purpose.
2016-10-19 19:16:41 +02:00
SoScared
bd8dc18bad move AA towards traditional 2016-10-15 15:57:28 +01:00
Oliver Brakmann
dd50004d91 Fix yak attacks in Evacuation 2016-10-15 12:02:12 +02:00
abcdefg30
b4033c609e Fix yaks trying to attack invalid targets 2016-10-14 19:00:58 +02:00
abcdefg30
9800b3513e Add a CanTarget method to lua 2016-10-14 19:00:46 +02:00
abcdefg30
047f94613b Target.FromActor never returns a TargetType.FrozenActor 2016-10-14 19:00:17 +02:00
RoosterDragon
74c69f835c Make sure AI can deploy an MCV when it lacks a base. 2016-10-14 18:24:12 +02:00
Paul Chote
bea6523f5e Add support for an older/alternative d2k release. 2016-10-14 18:14:42 +02:00
abcdefg30
38dab424fb Fix soviet units not attack moving to their rally points
and remove unnecessary (duplicated) code from the tick function
(the call to IdleHunt inside SpawnSovietUnits is enough)
2016-10-13 20:40:46 +02:00
abcdefg30
605f3b65a9 Fix soviet units not stopping to hunt after being captured in Exodus 2016-10-13 20:40:46 +02:00
abcdefg30
1f7a483fd6 Make HIJACKER unbuildable in the Evacuation mission
We don't allow building Mechanics as well
2016-10-13 20:40:46 +02:00
abcdefg30
d82549ec00 Merge pull request #12212 from obrakmann/remove-ai-capturing
Remove AI capturing from TD and RA, and AIs using mechanics and medics in RA
2016-10-12 14:53:18 +02:00
Oliver Brakmann
d003885bca Remove medics and mechanics from RA AIs 2016-10-11 21:08:56 +02:00
Oliver Brakmann
f907403ca7 Remove AI capturing from TD and RA 2016-10-11 20:50:36 +02:00
Paul Chote
29c13a4c26 Work around an initialisation order conflict. 2016-10-09 14:15:17 +02:00
Paul Chote
379ece7592 Fix non-selectable support actor health bars. 2016-10-08 15:32:05 +02:00
RoosterDragon
5b815ca2cf Marshal results in QueryDevices correctly. 2016-10-07 16:27:01 +02:00
abcdefg30
391c378118 Fix floating text showing up beneath shroud 2016-10-06 21:30:14 +02:00
Paul Chote
bd8aeb3cae Allow spys to infiltrate fake structures in RA. 2016-10-01 20:21:39 +02:00
Paul Chote
bab4cac2d7 Add InfiltrateForDecoration trait. 2016-10-01 20:21:39 +02:00
Oliver Brakmann
98664ce3e5 Log unknown orders instead of crashing with an NIE 2016-09-30 16:13:57 +02:00
Jonas A. Lind
57065de55e Changed MSUB Description
Simplified initial text and fixed strong/weak vs.
2016-09-28 13:39:10 +02:00
SoScared
2dd0e05423 AA Missile Sub + Tweak 2016-09-28 13:38:51 +02:00
abcdefg30
9b158b459c Remove a bogus LZRange field together with an unnecessary ParaDrop definition 2016-09-26 21:25:27 +02:00
Matthias Mailänder
80b06d1dd2 Only save a syncreport.log when a desync occurs. 2016-09-26 21:25:18 +02:00
Paul Chote
a33321390f Hack around the Lua API. 2016-09-26 19:04:28 +02:00
Paul Chote
1607173769 Change aircraft default to move to rally point after resupplying. 2016-09-26 19:04:28 +02:00
Paul Chote
bf957f09ff Add AbortOnResupply property to cancel aircraft activities on resupply. 2016-09-26 19:04:28 +02:00
Paul Chote
dbc8b0a99a Remove unnecessarily queued ResupplyAircraft activity. 2016-09-26 19:04:28 +02:00
Paul Chote
799b07cd1e Avoid landing-dances when issuing mixed full/empty aircraft RTB orders. 2016-09-26 19:04:28 +02:00
Paul Chote
c83b8b712e Fix integer overflows in Wangle.ArcTan. 2016-09-26 18:36:17 +02:00
reaperrr
c7adfd43a0 Fix LaserZap not being removed if HitAnim is not defined
This avoids degrading performance over time as well as an (albeit unlikely) OutOfMemoryException.
2016-09-26 14:54:27 +02:00
SoScared
55c1b6a663 Camo Pillbox HP 450 2016-09-25 22:01:22 +02:00
SoScared
2693f9de1c Mammoth Tank speed 50 2016-09-25 22:01:07 +02:00
Paul Chote
dc684e244e Use CosmeticRandom for picking smudge type. 2016-09-24 20:49:03 +02:00
Oliver Brakmann
8334e9adeb Fix setting MayYieldReservation when there is no reservation 2016-09-24 20:32:01 +02:00
Oliver Brakmann
e55f2f3bee Fix helicopters not taking off when their target got covered by shroud 2016-09-24 20:31:46 +02:00
Oliver Brakmann
59ee9bcb96 Prevent an infinite loop when planes go out of ammo and all airfields are gone 2016-09-24 20:31:29 +02:00
Oliver Brakmann
b3ba4f5ca2 Use the yield reservation logic for helicopters as well. Oops. 2016-09-24 20:30:51 +02:00
Oliver Brakmann
e628d756fb Remove brain-dead logic from TakeOff
1. TakeOff's Tick() method never checks itself whether it is canceled
2. If NextActivity is null, TakeOff is the only activity on the queue
3. Takeoff canceling the queue then just cancels itself, with no effect at all

4. If Takeoff however is running as an inner activity, it will cancel the complete main queue, wrecking all sorts of havoc
2016-09-24 20:30:40 +02:00
Paul Chote
4f55edad74 Report mission briefings in the mp lobby. 2016-09-23 23:52:28 +02:00
abcdefg30
43a30f6497 Render WithDecoration above shroud 2016-09-23 23:51:56 +02:00
Oliver Brakmann
a84815a832 Fix AI still producing units with captured factories in Nod missions 2016-09-23 19:42:42 +01:00
Paul Chote
d3dae5c34f Add a range check to Repair. 2016-09-23 18:57:24 +01:00
Oliver Brakmann
8a666b973f Fix kicking players joining servers hosting a map with non-default rules
Specifically, rules that remove traits which implement ILobbyOptions
2016-09-23 18:48:14 +01:00
Paul Chote
4a039166e4 Fix control group decoration position. 2016-09-23 18:34:20 +01:00
abcdefg30
25a63530d3 Split a UnitCommandWidget from WorldCommandWidget 2016-09-22 17:52:21 +01:00
abcdefg30
5349db0384 Fix spectators not being able to issue commands in TD 2016-09-22 17:52:14 +01:00
Paul Chote
60244d4910 Clean up ClientPings when a player drops from the server. 2016-09-21 18:17:40 +02:00
abcdefg30
a7251b7e95 Fix beacons not being cancelable 2016-09-21 18:14:06 +02:00
RoosterDragon
6e56349a26 Change Game.RunTime to a long to prevent overflow. 2016-09-21 18:13:56 +02:00
Paul Chote
cb553fbe15 Converting dates to string using the InvariantCulture. 2016-09-21 17:57:14 +02:00
Paul Chote
955f39620b Restore missing GameUid. 2016-09-21 17:57:03 +02:00
Paul Chote
af5402d41c Timestamp syncreport and exception log files. 2016-09-21 17:56:56 +02:00
Paul Chote
aaa1484643 Read data from *all* connections to the server. 2016-09-21 17:46:33 +02:00
Paul Chote
fb7b79e8fc Fix d2k lobby admin icon. 2016-09-21 17:11:49 +02:00
Chris Forbes
1f0d98344b server: Fix server getting wedged after map query with bad minimap
If the mapserver returned an unusable minimap blob, we'd end up dropping
the resulting exceptions on the floor, and committing a completely broken
MapPreview, which would then blow up the tail end of the map change
process, and all future ValidateClient calls after players join (which
itself was handled by kicking the player and logging some noise of dubious
value).

Adjusts exception handling in a number of places to log the exception
rather than dropping it on the floor, and makes the mapserver response
parsing tolerant of bogus minimap blobs -- in this case, we'd rather just
have no minimap.

Candidate for stable, as it fixes a bug present in the current release and
the current playtest series.

Signed-off-by: Chris Forbes <chrisf@ijw.co.nz>
2016-09-21 04:06:36 +01:00
Oliver Brakmann
37155ec9dd Remove workarounds for ownership change breakage from 'Infiltration' 2016-09-20 09:16:09 +01:00
Oliver Brakmann
5e3f0721ce Fix crashing when a spy's "real" owner gets changed 2016-09-20 09:16:02 +01:00
Matthias Mailänder
90a7d1f3e9 Fix a crash when no sync report is available. 2016-09-19 20:02:23 +02:00
Oliver Brakmann
3971b99363 Add advisory upgrade rule for WithRearmAnimation 2016-09-18 16:20:33 +02:00
Oliver Brakmann
b99c4903a6 Add WithRearmAnimation to buildings that need it 2016-09-18 16:20:09 +02:00
Oliver Brakmann
f7e5cce0ab Fix locking an airfield that is rearming aircraft while being sold 2016-09-18 16:19:26 +02:00
abcdefg30
19983e9e7f Fix the music resetting from time to time 2016-09-18 15:57:45 +02:00
Oliver Brakmann
b84bd1762b Fix not being able to close the chat window in replays 2016-09-18 15:31:00 +02:00
Paul Chote
9623bbebc8 Improve error message. 2016-09-18 15:27:43 +02:00
Paul Chote
7becb92a00 Don't crash if a replay can't be read. 2016-09-18 15:27:32 +02:00
Paul Chote
a812b937f3 Other misc fixes in Platform. 2016-09-18 14:17:34 +02:00
Paul Chote
8bbced1582 Fix string comparison cultures in Platform. 2016-09-18 14:17:21 +02:00
Paul Chote
a4eb40efe4 Resolve a bare "." to the game install path. 2016-09-18 14:17:07 +02:00
Paul Chote
214d7325bd Account for terrain height in AttackBomber. 2016-09-18 14:08:02 +02:00
Paul Chote
be09392c35 Give window modes human-friendly names.
* Fullscreen -> Fullscreen (Legacy)
* Pseudo-fullscreen -> Fullscreen
2016-09-18 12:51:13 +02:00
Paul Chote
f6e892a2dd Work around incorrect mono behaviour under OSX. 2016-09-17 18:22:56 +02:00
Paul Chote
cdd70e7daf Fix explicit oramap path lint checking. 2016-09-17 14:13:53 +02:00
Oliver Brakmann
4cf98effa4 Remove 'campaign-' prefix from disable-experience.yaml files 2016-09-16 17:32:29 +01:00
abcdefg30
1d8048c133 Create a PlayLaunchSounds method in SupportPower.cs 2016-09-12 19:14:17 +02:00
abcdefg30
ecbedad308 Fix the support power SpeechNotifications not being played to the correct player 2016-09-12 19:14:17 +02:00
Mustafa Alperen Seki
31c99d8071 Fix Sardaukar's prerequisite 2016-09-12 15:34:05 +02:00
Paul Chote
303a2be612 Fix bogus observer stats graph positioning. 2016-09-09 21:16:32 +02:00
abcdefg30
ece2f8494e Remove the TopBottomSpacing from the score screen player list 2016-09-09 12:14:29 +02:00
clemty
23f9998c7e gdi07 map yaml polish 2016-09-07 23:50:53 +02:00
abc013
fcab4e9eed Fixed enemy missiles not being deflected by Radar Jammers 2016-09-05 23:06:11 +02:00
Matthias Mailänder
c9474a857a Merge pull request #11956 from obrakmann/fix11953_fix-aircraft-reservation-madness
Fix aircraft reservation madness
2016-09-04 21:54:28 +02:00
Oliver Brakmann
7f64495d6f Make aircraft continue attack on same target after re-arming 2016-09-04 21:31:05 +02:00
Oliver Brakmann
e7d07e5a01 Fix FlyAttack not calling TakeOff for landed aircraft 2016-09-04 21:31:05 +02:00
Oliver Brakmann
6d15406ffe Fix aircraft reservation madness 2016-09-04 21:31:05 +02:00
reaperrr
6cc17b6af3 Merge pull request #11968 from pchote/gps-exploration
Explore shroud on first GPS launch, ignoring power/radar.
2016-09-04 21:27:53 +02:00
Matthias Mailänder
3ed241c4d4 Merge pull request #11951 from pchote/hack-production-locking
Rework external capture -> production interaction
2016-09-04 20:18:59 +02:00
Oliver Brakmann
a32a95a27c Merge pull request #11702 from Mailaender/infiltration-mission
Added Scott's Allies04 co-op multiplayer mission as "Infiltration"
2016-09-04 18:41:09 +02:00
Matthias Mailänder
76294c8273 Port the Co-Op Allies04 map to Lua. 2016-09-04 18:14:25 +02:00
Paul Chote
142caa6691 Explore shroud on first GPS launch, ignoring power/radar. 2016-09-04 16:40:48 +01:00
Taryn Hill
1592f9dd63 Merge pull request #11933 from Mailaender/mono-4.4.2
Updated Mono to version 4.4.2
2016-09-04 10:15:35 -05:00
Taryn Hill
0e73e88229 Merge pull request #11965 from pchote/fix-grenadier-stand
Fix grenadier attack and stand animations
2016-09-04 10:13:40 -05:00
Paul Chote
53f47f8ee1 Use explicit interfaces in WithBuildingPlaced(Overlay|Animation). 2016-09-04 15:25:50 +01:00
Paul Chote
21f9a0ec6c Remove tech disabling when building is locked. 2016-09-04 15:25:50 +01:00
Paul Chote
013b717a84 Disable unit production when building is locked. 2016-09-04 15:25:50 +01:00
Paul Chote
2df5918315 Disable BaseProvider when building is locked. 2016-09-04 15:25:50 +01:00
Paul Chote
a09b32b4f3 Disable WithBuildingPlacedAnimation while selling. 2016-09-04 15:25:49 +01:00
Oliver Brakmann
5c01647b20 Merge pull request #11949 from Mailaender/jes-infantry-sequence-polish
Polished the Dune 2000 infantry sequences
2016-09-04 13:59:11 +02:00
Oliver Brakmann
c58ec4d14f Merge pull request #11636 from abcdefg30/noGuard
Don't allow tanya to automatically target, but allow her to move within a attack-moving/guarding group
2016-09-04 13:44:46 +02:00
Paul Chote
48c9e74bb4 Merge pull request #11637 from abcdefg30/noMove
Fix the attack-move cursor appearing for units which can't attack-move
2016-09-04 11:06:58 +01:00
Paul Chote
85ab797705 Merge pull request #11957 from abc013/DisableReplayChat
Disabled chat input in replays
2016-09-04 10:43:34 +01:00
Paul Chote
f334505395 Fix grenadier FireDelay and LocalOffset. 2016-09-04 10:38:17 +01:00
Paul Chote
a7bfdd5eb1 Fix grenadier stand and attack sequences. 2016-09-04 10:37:37 +01:00
abcdefg30
29b0863076 Merge pull request #11964 from clemty/nod07a-fixcrash
fix crash in missions because cameras need .destroy, not .kill to be removed
2016-09-03 23:49:26 +02:00
abcdefg30
1a3c3bd21b Merge pull request #11960 from pchote/fix-parachute-death
Remove invalid cell check from Parachutable.
2016-09-03 23:45:54 +02:00
Oliver Brakmann
361c541f13 Merge pull request #11961 from pchote/fix-requiresmod
Fix crash when popping up the mod requirements dialog.
2016-09-03 23:42:49 +02:00
Oliver Brakmann
6a33c605b9 Merge pull request #11868 from abcdefg30/gpsBounty
Fix the floating text for bounties of actors not being InWorld showing up
2016-09-03 23:00:12 +02:00
clemty
47080d5dc0 fix removal of cameras in nod07a and nod08a
fixes #11963
2016-09-03 22:54:41 +02:00
Paul Chote
617f106e48 Fix crash when popping up the mod requirements dialog. 2016-09-03 19:28:10 +01:00
abc013
c7def33588 disabled chat input in replays 2016-09-03 20:26:05 +02:00
Matthias Mailänder
0ec0db72e4 Merge pull request #11952 from pchote/spectator-player-list
Include spectators in the player list.
2016-09-03 20:19:42 +02:00
Paul Chote
7725f6b952 Remove unnecessary and incorrect cell check.
This caused all cells inside the map to be
treated as valid parachute targets, ignoring
all later checks.
2016-09-03 19:16:06 +01:00
abcdefg30
9f72772a37 Remove the percentage parameter from GetBountyValue 2016-09-03 15:30:26 +02:00
abcdefg30
a76672b029 Cache GainsExperience and Cargo in GivesBounty 2016-09-03 15:30:25 +02:00
abcdefg30
278a812eec Display the value of the destroyed cargo actors 2016-09-03 15:30:24 +02:00
abcdefg30
81bdea1107 Fix the floating text for bounties of actors not being InWorld showing up 2016-09-03 15:30:24 +02:00
Matthias Mailänder
256834f044 Improve the light infantry death animations. 2016-09-03 14:38:02 +02:00
Matthias Mailänder
1ce421910b Add missing idle sequences to d2k infantry. 2016-09-03 14:24:33 +02:00
Paul Chote
67cc12436f Merge pull request #11918 from abc013/CapturableHuskFaction
Fix mcv husks losing their faction after being captured
2016-09-03 11:54:56 +01:00
Paul Chote
4a90ff834e Merge pull request #11867 from abcdefg30/gpsDot
Fix GPSDots being visible when the unit is not InWorld or dead
2016-09-03 11:35:14 +01:00
Paul Chote
e1fcfa3073 Include spectators in the player list. 2016-09-03 10:46:08 +01:00
reaperrr
b8f89ac5fb Merge pull request #11945 from MustaphaTR/ant-dog-fix
RA - Fix Dogs can attack Giant Ants
2016-09-02 22:35:18 +02:00
reaperrr
7311c69e35 Merge pull request #11944 from MustaphaTR/ant-zombie-kennel-fix
RA - Fix ants and zombies can be trained from kennel
2016-09-02 22:31:00 +02:00
abcdefg30
15214c21bc Merge pull request #11948 from pchote/fix-facing-normalization
Fix an off-by-one error in NormalizeFacing.
2016-09-02 22:17:36 +02:00
Matthias Mailänder
abbcdbd5df Add OnSelling and OnSold to the Lua API. 2016-09-02 21:59:59 +02:00
Matthias Mailänder
e3df47d6d2 Add Sell to the Lua API. 2016-09-02 21:59:59 +02:00
Paul Chote
9e867e23a9 Merge pull request #11941 from obrakmann/fix11940-std-scrolling-deadzone
Fix mouse input breakage
2016-09-02 20:45:56 +01:00
Oliver Brakmann
f554531bd2 Fix not showing scroll cursor during standard-scrolling
... when edge scrolling was also disabled.
2016-09-02 21:34:47 +02:00
Oliver Brakmann
f5be504640 Add a deadzone for standard scrolling 2016-09-02 21:34:46 +02:00
Oliver Brakmann
a8dc8454cb Fix ignoring deadzone with joystick scrolling
This re-introduces a bug where releasing the RMB button causes an order to be generated for the selected units if the user didn't move their mouse just prior.
2016-09-02 21:34:46 +02:00
Paul Chote
501252af19 Merge pull request #11693 from obrakmann/player-color-contrast
Add contrast to text drawn in player colors
2016-09-02 20:24:22 +01:00
Oliver Brakmann
624e69e97b Replace use of Contrast with Shadow for ingame chat and support power timers 2016-09-02 20:58:46 +02:00
Oliver Brakmann
38c16e4f7a Add a shadow to text drawn in player colors 2016-09-02 20:58:46 +02:00
Oliver Brakmann
1059d5b88d Add a Shadow option to LabelWidget and ButtonWidget 2016-09-02 20:58:46 +02:00
Oliver Brakmann
8ad18ad161 Rewrite color inversal in a reusable way 2016-09-02 20:58:46 +02:00
Paul Chote
3b1e4d708d Fix an off-by-one error in NormalizeFacing. 2016-09-02 19:57:32 +01:00
Paul Chote
cb7f6947d1 Merge pull request #11946 from abcdefg30/exclamationMark
Fix an inverted check in SupportPowerChargeBar
2016-09-02 19:52:19 +01:00
Oliver Brakmann
d0109491a7 Split ChromeMetrics' ContrastColor options into two
One for dark backgrounds, one for light ones. The light one isn't currently being used, but will be by future commits
2016-09-02 20:39:27 +02:00
Paul Chote
7700250974 Merge pull request #11906 from abcdefg30/tdMute
Fix the positioning of the mute label in the TD music player
2016-09-02 19:39:24 +01:00
abcdefg30
8a8ab1563f Fix an inverted check in SupportPowerChargeBar 2016-09-02 19:41:22 +02:00
Mustafa Alperen Seki
09be3d2ab2 Fix dogs can attack ants 2016-09-02 09:13:41 +02:00
Mustafa Alperen Seki
ec82924b48 Fix ants and zombies can be trained from kennel 2016-09-02 08:54:41 +02:00
Oliver Brakmann
c562131ed4 Merge pull request #11930 from abcdefg30/medium
Rename all "medium" difficulties to "normal"
2016-09-01 18:10:35 +02:00
Matthias Mailänder
1c293a444f Merge pull request #11931 from SoScared/mapdesertrats
exposing map desert rats' custom rules
2016-09-01 07:40:40 +02:00
Matthias Mailänder
f8fb31a4cc Update Mono to version 4.4.2 2016-09-01 07:25:15 +02:00
SoScared
1854d327d0 exposing map desert rats' custom rules 2016-08-31 23:24:02 +02:00
abcdefg30
e2a2c6433f Rename all "medium" difficulties to "normal" 2016-08-31 23:05:34 +02:00
Matthias Mailänder
43b7c98c33 Merge pull request #11920 from abcdefg30/byeCamHealth
Remove the bogus Health property from CAMERA
2016-08-31 21:14:44 +02:00
abcdefg30
887cd61943 Merge pull request #11924 from obrakmann/fix11922_addsmudge-nre
Fix NRE in SmudgeLayer.AddSmudge
2016-08-31 14:32:58 +02:00
Matthias Mailänder
b38c1a8623 Merge pull request #11923 from abc013/ResourceSiloWarning
Doubled AdviceInterval of ResourceStorageWarning.
2016-08-30 23:08:27 +02:00
abc013
85feaf0091 Fix mcv husks losing their faction after being captured 2016-08-30 22:00:26 +02:00
Oliver Brakmann
93dba184a1 Add comments explaining the special meaning of a null Sprite in SmudgeLayer 2016-08-30 20:12:46 +02:00
Oliver Brakmann
0ebf2d00b0 Fix NRE in SmudgeLayer.AddSmudge 2016-08-30 19:17:49 +02:00
abc013
f70d6c55bd Doubled AdviceInterval of ResourceStorageWarning. 2016-08-30 17:19:31 +02:00
abcdefg30
8475ad40a7 Remove the bogus Health property from CAMERA 2016-08-30 11:31:47 +02:00
abcdefg30
b999d88905 Merge pull request #11679 from Mailaender/exodus-mission
Added Scott's Allies03 co-op multiplayer mission as "Exodus"
2016-08-30 10:47:38 +02:00
Matthias Mailänder
ad986b2fb4 Port the Co-Op Allies03 map to Lua. 2016-08-30 07:35:45 +02:00
Matthias Mailänder
9775352856 Add a PassengerCount property to the Lua API. 2016-08-30 07:16:56 +02:00
Matthias Mailänder
f44623ce4d Don't force disable the debug menu for co-op missions. 2016-08-30 07:16:56 +02:00
abcdefg30
25be7d1434 Fix the positioning of the mute label in all lobbies 2016-08-29 21:51:33 +02:00
abcdefg30
21f504fed9 Remove the setting of tanya's stance to "HoldFire" in all missions 2016-08-29 21:39:17 +02:00
abcdefg30
aec6bb295a Remove AutoTarget but keep AttackMove (and Guard) on E7.noautotarget 2016-08-29 21:39:16 +02:00
abcdefg30
ffcdcc2831 Add a warning about tanya not auto-targeting in allies01 2016-08-29 21:39:15 +02:00
abcdefg30
44a14a7e45 Merge pull request #11890 from pchote/movie-metadata
Unpack RA movies on install.
2016-08-29 21:36:10 +02:00
Matthias Mailänder
eb88e1d39a Merge pull request #11893 from SoScared/mapswap
Official Map Pool - Ins and Outs
2016-08-29 21:17:31 +02:00
abcdefg30
d204026c84 Merge pull request #11879 from obrakmann/fix11849_mousescrolling-order-trigger
Fix issuing orders when releasing RMB after joystick-scrolling
2016-08-29 21:07:18 +02:00
abcdefg30
b5652bec59 Merge pull request #11870 from pchote/mod-mime-type
Add oramod file association for Windows, Linux, and OSX.
2016-08-29 21:02:13 +02:00
abcdefg30
e156559ae1 Merge pull request #11441 from Mailaender/lowbridges
Added static Tiberian Sun low bridges
2016-08-29 20:53:04 +02:00
abcdefg30
9ddfe23e17 Merge pull request #11900 from abc013/DeflectionStances
Replaced the AlliedMissiles boolean on JamsMissiles by a Stances field
2016-08-29 15:03:08 +02:00
Paul Chote
f2b847607c Merge pull request #11899 from GraionDilach/gen2-crate-paradrop
Do not apply the cell's Z offset twice during crate positioning.
2016-08-29 13:47:41 +01:00
Matthias Mailänder
401d330d46 Add a destroyable low bridge to Tread Lightly. 2016-08-29 13:34:53 +01:00
Matthias Mailänder
638fa3a3e6 Reimport Tread Lightly 2016-08-29 13:29:02 +01:00
Matthias Mailänder
6524a10faa Reimport map "River Raid" 2016-08-29 13:29:02 +01:00
Matthias Mailänder
3759ab6fa6 Reimport map "A River Runs Near It" 2016-08-29 13:29:02 +01:00
Paul Chote
9d17038843 Add bridge depth metadata. 2016-08-29 13:29:02 +01:00
Matthias Mailänder
4717d3e190 Add static Tiberian Sun low bridges. 2016-08-29 13:29:01 +01:00
Paul Chote
5482fdb839 Fix duplicate import of multi-cell overlays. 2016-08-29 13:27:29 +01:00
Matthias Mailänder
02fecc4d87 Merge pull request #11781 from Turupawn/bleed
Same unit command sounds wont overlap anymore
2016-08-29 06:54:41 +02:00
Matthias Mailänder
b7d0947d7d Merge pull request #11915 from pchote/lightpost-alpha-mod
Disable modifiers on TS alpha palette.
2016-08-28 22:43:43 +02:00
Paul Chote
c558ea240c Disable modifiers on alpha palette. 2016-08-28 18:52:24 +01:00
Oliver Brakmann
c842209645 Merge pull request #11901 from abcdefg30/frozenCenter
Fix GpsDots being displayed when their CenterPosition is shrouded
2016-08-28 14:36:04 +02:00
Oliver Brakmann
d6095d9a6a Merge pull request #11535 from Mailaender/upnp-discoverability
Improved the UPnP settings discoverability
2016-08-28 14:23:27 +02:00
Oliver Brakmann
1c12ad5cee Merge pull request #11903 from abcdefg30/indexing
Fix a possible crash in the lua Player.Team property
2016-08-28 14:16:48 +02:00
Oliver Brakmann
c9c542cb37 Show advisory notice when UPNP isn't supported by the router 2016-08-28 14:05:03 +02:00
Matthias Mailänder
a79cc6a606 Add a notice why automatic port forwarding is disabled. 2016-08-28 14:05:03 +02:00
Matthias Mailänder
273dcce4d4 UPnP NAT discovery requires a restart as well. 2016-08-28 14:05:03 +02:00
Matthias Mailänder
5b2d6e9a47 Merge pull request #11905 from abcdefg30/timers
Fix timers in ObserverProductionIconsWidget being calculated wrongly in replays
2016-08-28 13:40:27 +02:00
abcdefg30
8bf6e15b9f Merge pull request #11908 from alercah/alercah-author
Add me to AUTHORS
2016-08-28 12:10:22 +02:00
abcdefg30
81acb8dd2f Merge pull request #11907 from alercah/resource-display-interface
Move resource tick logic into chrome classes.
2016-08-28 12:09:54 +02:00
abcdefg30
74ad33d14e Fix the positioning of the mute label in the TD music player 2016-08-28 11:54:03 +02:00
abcdefg30
11d49f3c1b Merge pull request #11910 from SoScared/balancewall
[RA] Tweak damage vs Concrete with flamers and E3.
2016-08-28 11:27:47 +02:00
Oliver Brakmann
d14ff2a54e Fix removing things in the editor when stopping standard-scrolling with RMB
The cause for this was that the `HandleMouseInput` method of the `EditorViewPortController` ran before the one from the regular `ViewPortController`, thus intercepting the button press.

Switching the order of the two around fixes that, but introduced another problem, namely that the tooltips stopped working. Switching the order meant that the `ViewPortController` laid "on top" of the `EditorViewPortController`, so the latter didn't receive the `MouseEntered` event anymore. Setting the `IgnoreMouseOver` flag in the `ViewPortController` fixes this.
2016-08-28 11:26:23 +02:00
SoScared
d2fb972c91 tweak some damage vs walls 2016-08-27 23:19:32 +02:00
Alexis Hunt
becbee8388 Move resource tick logic into chrome classes. 2016-08-27 17:17:24 -04:00
Alexis Hunt
61b3bd09b7 Add me to AUTHORS 2016-08-27 16:35:50 -04:00
abc013
ad108a0108 Added an ugrade rule and updated the ra mod 2016-08-27 22:10:35 +02:00
abc013
c2f21a21ef Replaced the AlliedMissiles boolean on JamsMissiles by a Stances field (DeflectionStances). 2016-08-27 22:09:12 +02:00
abcdefg30
cd1c520c5c Fix timers in ObserverProductionIconsWidget being calculated wrongly in replays 2016-08-27 20:35:44 +02:00
Matthias Mailänder
84d58f78d2 Merge pull request #11902 from pchote/score-line-margin
Increase the left margin of the ingame-menu team line.
2016-08-27 20:21:14 +02:00
Matthias Mailänder
a7869fc010 Merge pull request #11866 from pchote/ts-civ-sequences
Remove duplication from TS civilian structure sequences.
2016-08-27 20:13:09 +02:00
abcdefg30
284d5e5af5 Fix a possible crash in the lua Player.Team property 2016-08-27 19:44:37 +02:00
Matthias Mailänder
020b0e628e Merge pull request #11871 from pchote/fix-production-circle
Remove hardcoded constants from Fly and ProductionAirdrop.
2016-08-27 19:43:15 +02:00
Paul Chote
82bee715df Add ^crate default for crates, drums, and palettes. 2016-08-27 18:31:04 +01:00
Paul Chote
4676e8b083 Overhaul civilian.yaml 2016-08-27 18:31:04 +01:00
Paul Chote
1b2e0ed55a Remove duplication from tree sequences. 2016-08-27 18:31:04 +01:00
Paul Chote
a6628efafb Remove duplication and set ZRamp on tracks and rocks. 2016-08-27 18:31:04 +01:00
abcdefg30
57d6f678e1 Remove an outdated TODO comment 2016-08-27 19:24:25 +02:00
Paul Chote
9e025e25ad Increase the left margin of the ingame-menu team line. 2016-08-27 18:03:16 +01:00
abcdefg30
cda23e808f Fix GpsDots being displayed when their CenterPosition is shrouded 2016-08-27 19:02:27 +02:00
reaperrr
7ac5a25ce6 Merge pull request #11882 from pchote/remove-astar-overlay
Remove legacy A* visualisation.
2016-08-27 18:37:23 +02:00
reaperrr
058bb49dff Merge pull request #11501 from pchote/tibsun-carryall
Add Carryall/Carryable traits, merging ts and d2k carryall behavior
2016-08-27 18:31:56 +02:00
Paul Chote
c3c6af018a Set carried turret facing on delivery. 2016-08-27 17:08:33 +01:00
Oliver Brakmann
7fbe282167 Merge pull request #11864 from pchote/line-depth
Fix line rendering with depth buffer enabled.
2016-08-27 17:57:30 +02:00
reaperrr
7739e7c0e0 Merge pull request #11887 from ABrandau/GDI-Medic-Sequence-Fix
TS medic crawl shadow frames correction.
2016-08-27 17:05:00 +02:00
Paul Chote
735a031d6e Fix selection rectangle with depth buffer enabled. 2016-08-27 15:43:20 +01:00
Paul Chote
3082c61e75 Add depth buffer support to tactical overlays. 2016-08-27 15:43:20 +01:00
Paul Chote
f3bac143e9 Add depth buffer support to beams and contrails. 2016-08-27 15:43:20 +01:00
Paul Chote
c092c93401 Add depth buffer support to debug overlays. 2016-08-27 15:43:20 +01:00
Paul Chote
50da18cd22 Add depth buffer support to RgbaColorRenderer. 2016-08-27 15:43:20 +01:00
Paul Chote
017020f2c3 Fix stack overflow in FindResources. 2016-08-27 15:42:18 +01:00
Paul Chote
ee77a4170b Hook up TS carryall logic. 2016-08-27 15:42:18 +01:00
Paul Chote
1ae86f34f8 Overhaul Carryall behaviour, adding support for manual control. 2016-08-27 15:42:18 +01:00
Zimmermann Gyula
ecc65e4fe4 Do not apply the cell's Z offset twice during crate positioning. 2016-08-27 16:41:52 +02:00
reaperrr
d08cc10abb Merge pull request #11889 from pchote/fix-turn-crash
Disable smooth turning for 180 degree turns.
2016-08-27 16:40:08 +02:00
Oliver Brakmann
dffb602ed4 Show scroll cursor when standard-scrolling using RMB 2016-08-27 13:56:09 +02:00
SoScared
eefc550ba7 Ins and outs for the map pool 2016-08-27 12:51:51 +02:00
Oliver Brakmann
0eb06c5abe Merge pull request #11888 from pchote/gpsdot
Draw GPS dots above the fog.
2016-08-27 11:51:31 +02:00
Paul Chote
ac94dcbd73 Unpack RA movies on install. 2016-08-26 23:44:28 +01:00
Paul Chote
7ffdd53abb Disable smooth turning for 180 degree turns. 2016-08-26 20:15:55 +01:00
Paul Chote
83137fc789 Draw GPS dots above the fog. 2016-08-26 19:27:54 +01:00
Oliver Brakmann
ff1203a892 Merge pull request #11883 from abc013/gpsHosp
Add GPS icons for oil derricks, hospitals and biolabs
2016-08-26 20:23:41 +02:00
ABrandau
272938e3d0 TS medic crawl shadow frames correction 2016-08-26 13:24:05 -04:00
Paul Chote
30c7c720ec Merge pull request #11880 from Mailaender/sequence-sprites-inheritance-check
Fixed false positive on sequence sprite checks
2016-08-26 18:09:53 +01:00
Paul Chote
d99bc78629 Merge pull request #11878 from RoosterDragon/fix-download-error-cancel
Allow download window to be closed on failed downloads.
2016-08-26 18:05:16 +01:00
Paul Chote
32eb98c17d Remove legacy A* visualisation. 2016-08-26 16:55:46 +01:00
abc013
ee033e031f Add gps icons for oil derricks, hospitals and biolabs 2016-08-26 17:08:54 +02:00
Oliver Brakmann
b3c4ecd7c5 Merge pull request #11881 from reaperrr/always-visible-bar
Allow keeping empty selection bars visible
2016-08-26 14:56:29 +02:00
Oliver Brakmann
1f2d046d34 Fix issuing orders when releasing RMB after standard-scrolling 2016-08-26 10:42:53 +02:00
reaperrr
e811612c06 Merge pull request #11862 from pchote/effects-above-shroud
Draw tactical overlays (beacons, rallypoints, text overlays, order generators) above the shroud.
2016-08-25 20:47:08 +02:00
reaperrr
39034b0de9 Allow keeping empty selection bars visible 2016-08-25 20:40:56 +02:00
Matthias Mailänder
4c672f73c0 Don't report false positives for sequence templates. 2016-08-25 19:55:59 +02:00
RoosterDragon
f1b0740e72 Allow download window to be closed on failed downloads. 2016-08-25 18:21:40 +01:00
reaperrr
af8bd461c7 Merge pull request #11872 from pchote/fix-d2k-grenadier-sequences
Fix d2k grenadier sequences.
2016-08-25 18:10:35 +02:00
Oliver Brakmann
479ee02431 Merge pull request #11876 from SoScared/map-pool-overhaul
Official Map Pool Overhaul
2016-08-25 14:05:57 +02:00
Oliver Brakmann
d6a6ed28c8 Fix issuing orders when releasing RMB after joystick-scrolling 2016-08-25 13:25:30 +02:00
abcdefg30
5d2a9d5f16 Fix GPSDots being visible when the unit is not InWorld or dead 2016-08-24 23:29:10 +02:00
abcdefg30
0d33376289 Merge pull request #11873 from reaperrr/revert-11460
Revert changes from #11460
2016-08-24 23:13:30 +02:00
SoScared
2bd6f5d4bf map preview/spawn fixups 2016-08-24 23:03:48 +02:00
abcdefg30
20624aa232 Merge pull request #11858 from reaperrr/fix-yaml-style
Yaml style clean-up
2016-08-24 22:53:01 +02:00
SoScared
fd5ee6079c map alterations 2016-08-24 22:46:58 +02:00
reaperrr
4574b18131 Revert changes from #11460 2016-08-24 18:45:43 +02:00
Paul Chote
7b43a5b49e Fix d2k grenadier sequences. 2016-08-24 17:34:08 +01:00
Paul Chote
06ca8b6cf2 Remove hardcoded constant from Fly. 2016-08-24 17:20:07 +01:00
Paul Chote
9572376de0 Remove hardcoded constants from ProductionAirdrop. 2016-08-24 17:19:06 +01:00
Paul Chote
4618ea0de3 Add oramod file association for OSX. 2016-08-24 13:39:08 +01:00
Paul Chote
4d75d7f4b6 Add oramod file association for Windows and Linux. 2016-08-24 11:36:13 +01:00
abcdefg30
fab807b86e Merge pull request #11830 from reaperrr/overridable-Armament
Make Armament as overridable as possible
2016-08-23 23:24:32 +02:00
abcdefg30
5360610491 Merge pull request #11863 from ABrandau/Ion-Cannon-Polish
Restore graphical look of the TS Ion Cannon.
2016-08-23 21:44:38 +02:00
Paul Chote
cd0ba2049f Draw repair and power down indicators above the shroud. 2016-08-23 16:34:24 +01:00
Paul Chote
f357163078 Draw floating text above the shroud. 2016-08-22 22:02:33 +01:00
ABrandau
a67867fe73 Restore graphical look of the TS Ion Cannon. 2016-08-22 16:07:32 -04:00
Oliver Brakmann
02a29ee52a Merge pull request #11658 from abcdefg30/allies04
Add allies04
2016-08-22 21:57:31 +02:00
Paul Chote
d2f5fe7380 Draw order generator renderables above the shroud. 2016-08-22 20:27:59 +01:00
Paul Chote
b016638ebe Allow beacons to be placed and drawn above the shroud. 2016-08-22 20:27:58 +01:00
Paul Chote
afdb0e0829 Draw rally points above the shroud. 2016-08-22 20:27:58 +01:00
Paul Chote
69b358ec7b Add IEffectAboveShroud for effects that draw above the shroud. 2016-08-22 20:27:58 +01:00
Paul Chote
ed349f9086 Remove health bar rendering duplication. 2016-08-22 20:27:58 +01:00
Paul Chote
6354686b58 Introduce IRenderAboveShroud interface. 2016-08-22 17:45:25 +01:00
Paul Chote
11805bb567 Rename and tweak post-render interfaces. 2016-08-22 17:40:05 +01:00
Oliver Brakmann
f1990853df Merge pull request #11854 from Mailaender/startmatch-typo
Fixed a typo in the message displayed when servers disabled single player matches
2016-08-22 11:12:36 +02:00
reaperrr
01282e7b3c TS yaml style fixes 2016-08-21 19:43:37 +02:00
reaperrr
5bf29713b1 D2k yaml style fixes 2016-08-21 19:39:50 +02:00
reaperrr
b5f36013c2 TD yaml style fixes 2016-08-21 19:36:48 +02:00
reaperrr
d5e0135de7 RA yaml style fixes 2016-08-21 19:30:54 +02:00
abcdefg30
698bf15a13 Merge pull request #11853 from pchote/ts-tib-slopes
Remove and document slope-specific tiberium artwork.
2016-08-21 18:59:04 +02:00
abcdefg30
a02910c852 Fix yaks in allies-05a 2016-08-21 18:34:37 +02:00
abcdefg30
e0cff5b0a5 Add allies04 2016-08-21 18:34:29 +02:00
Matthias Mailänder
880d848a66 Avoid duplication in server messages and fix a typo. 2016-08-21 18:27:23 +02:00
Paul Chote
0e2387b2a1 Remove and document slope-specific tib artwork. 2016-08-21 17:03:11 +01:00
reaperrr
e4d10a26f1 Merge pull request #11791 from pchote/voxel-depth
Fix voxel rendering with EnableDepthBuffer: True
2016-08-21 14:00:12 +02:00
Paul Chote
f0306e7cc2 Render voxels with an approximately-correct z-offset. 2016-08-21 12:43:16 +01:00
abcdefg30
c312cf9171 Merge pull request #11780 from daynemarais/desert-twister-cliff-fix
Fixed map tile error on "Desert Twister" map
2016-08-21 13:16:38 +02:00
Oliver Brakmann
e5d20d3cf0 Merge pull request #11311 from GraionDilach/expand-custombuildtime
Revamp custom build times.
2016-08-21 12:12:27 +02:00
Zimmermann Gyula
5648daeeed Manual cleanup. 2016-08-21 12:05:34 +02:00
Zimmermann Gyula
5eec9ef463 Automatically upgrade rules. 2016-08-21 12:05:34 +02:00
Zimmermann Gyula
d9f38d57a7 Cache the *Infos in ProductionItem. 2016-08-21 12:05:34 +02:00
Zimmermann Gyula
3309e8ac3d Look up the production queue multiplier in Lua. 2016-08-21 12:05:34 +02:00
Zimmermann Gyula
f80ac6e5c0 Rename ProductionQueue.BuildSpeed and change it's default value. 2016-08-21 12:05:34 +02:00
Zimmermann Gyula
de10cb22e8 Shift CustomBuildTimeValue to Buildable. 2016-08-21 12:05:32 +02:00
Oliver Brakmann
e93d7dd172 Merge pull request #11706 from abcdefg30/atreides03b
Add atreides03b
2016-08-21 10:23:55 +02:00
Dayne Marais
807129ac56 Fixed map tile error on "Desert Twister" map 2016-08-21 18:10:51 +10:00
reaperrr
0a4a08c29e Merge pull request #11177 from abcdefg30/powerBar
Make SupportPowerChargeBar and the SupportPowerTimer customizable with stances
2016-08-21 01:32:46 +02:00
abcdefg30
426a88e6fb Apply the upgrade rule to the ts mod 2016-08-21 01:19:56 +02:00
abcdefg30
3024d47f89 Apply the upgrade rule to the ra mod 2016-08-21 01:19:55 +02:00
abcdefg30
ddfd4c7873 Add an upgrade rule 2016-08-21 01:19:54 +02:00
abcdefg30
e8084daad7 Cache the SupportPowerManager in SupportPowerChargeBar 2016-08-21 01:19:53 +02:00
abcdefg30
e9e49a5d02 Add a new DisplayStances field to SupportPowerChargeBarInfo
other
2016-08-21 01:19:52 +02:00
abcdefg30
9848c98750 Replace the DisplayTimer field with a DisplayTimerStances field in SupportPowerInfo 2016-08-21 01:19:51 +02:00
abcdefg30
fa1f569d19 Add atreides03b 2016-08-20 22:55:59 +02:00
Paul Chote
1cdc169ad0 Merge pull request #11842 from obrakmann/fix11829_desert-shellmap-tiling-error
Fix desert tileset tiling issues in RA
2016-08-20 17:39:11 +01:00
Oliver Brakmann
b4c8ee485d Merge pull request #11816 from reaperrr/fix-UpgradeOnDamage
Fix UpgradeOnDamage to apply if initial DamageState is valid
2016-08-20 15:25:10 +02:00
reaperrr
19c3e7c9e3 Make Armament elements as overridable as possible
To allow downstream mods to ship customised Armament-derivatives.
2016-08-20 15:06:18 +02:00
Oliver Brakmann
7e8e0cd1fb Fix tiling error on RA's desert shellmap 2016-08-20 13:27:08 +02:00
Oliver Brakmann
085e599f5d Fix tile templates 79 and 80 being swapped in RA's desert tileset 2016-08-20 13:27:08 +02:00
Matthias Mailänder
02e7322b6b Merge pull request #11801 from WolfGaming/FixMinelayerGroup
Allow multiple minelayers in a single MinefieldOrderGenerator.
2016-08-20 08:25:49 +02:00
Matthias Mailänder
f5d57e361a Merge pull request #11788 from pchote/fix-smooth-moves
Make turning-while-moving actors follow curved paths.
2016-08-19 22:11:28 +02:00
Matthias Mailänder
bb444eb5f0 Merge pull request #11838 from obrakmann/yaml-cleanups
Mission-related yaml cleanups
2016-08-19 21:48:03 +02:00
Matthias Mailänder
0d49c50879 Merge pull request #11832 from obrakmann/fix-make-dep
Fix 'make dependencies' choking on Open.NAT directory name
2016-08-19 21:45:49 +02:00
Oliver Brakmann
e25eeaba17 Minor mission cleanups
* Remove exlamation mark from map title for Intervention
* Remove redundant yaml rule for Evacuation
2016-08-19 19:12:51 +02:00
Oliver Brakmann
88391391b2 Fix disabling the CrateSpawner the wrong way
In multiplayer maps, disabling the CrateSpawner by removing the trait leads to error messages in the lobby when you click on the "Crate" checkbox.
2016-08-19 19:11:22 +02:00
Oliver Brakmann
79ec85b0c7 Merge pull request #11837 from obrakmann/pr11750
Add OS X build instructions to INSTALL.md
2016-08-19 16:49:05 +02:00
masihaama
b241034c6d Add OS X build instructions to INSTALL.md
The following subset of Linux build directions work for OSX 10.11.3. Mono JIT compiler version 4.2.1
2016-08-19 16:39:08 +02:00
Oliver Brakmann
782b617852 Fix 'make dependencies' choking on Open.NAT directory name
The directory name appears to have changed in the package for 2.1.0.
2016-08-19 16:02:53 +02:00
reaperrr
cd03bc6883 Upgrade rule for UpgradeOnDamage to UpgradeOnDamageState 2016-08-18 23:31:27 +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
0ec9725c2a Merge pull request #11621 from Mailaender/text-controlgroup
Added With*ControlGroup
2016-08-18 21:25:32 +02:00
Matthias Mailänder
7485404c87 Tweak the infantry control group positioning. 2016-08-18 21:10:57 +02:00
reaperrr
f12e0d498c Merge pull request #11771 from pchote/split-content-files
Rework mod enumeration and split content metadata into their own files.
2016-08-18 14:59:51 +02:00
reaperrr
1cec0a2497 Merge pull request #11789 from obrakmann/fix11692_save-map-visibility-flag
Allow saving maps with multiple visibility options
2016-08-18 13:03:20 +02:00
Oliver Brakmann
ad08c4318a Merge pull request #11807 from GraionDilach/ai-infonly-stuck
Clearup mod AIs.
2016-08-16 21:43:08 +02:00
Oliver Brakmann
12af71e9d8 Merge pull request #11790 from GraionDilach/screenshot-ms
Include milliseconds in TakeScreenshot timestamp.
2016-08-15 14:22:20 +02:00
WolfGaming
f08853850d Merge pull request #11809 from obrakmann/fix11808_player-lua-api-breakage
Fix Lua API returning wrong player info
2016-08-15 11:57:00 +00:00
Oliver Brakmann
54b7fd7cf5 Merge pull request #11819 from Phrohdoh/actor-global-cost
Allow scripts to get the Valued.Cost value of an actor type
2016-08-14 22:28:04 +02:00
Taryn Hill
9089012a79 Allow scripts to get the Valued.Cost value of an actor type 2016-08-13 18:46:48 -05:00
Oliver Brakmann
6d742efbf4 Merge pull request #11812 from Phrohdoh/fix-ai-capturers
Fix CanBeViewedByPlayer query in HackyAI.GetVisibleActorsBelongingToPlayer
2016-08-13 20:14:37 +02:00
Taryn Hill
852f0f790f Fix CanBeViewedByPlayer query in
HackyAI.GetVisibleActorsBelongingToPlayer
2016-08-13 07:42:15 -05:00
Taryn Hill
1c5c9003f7 Merge pull request #11814 from RoosterDragon/fix-ai-timings
Ensure HackyAI tries to attack and capture as frequently as it should.
2016-08-13 07:36:58 -05:00
WolfGaming
0c79ef4f24 Allow multiple minelayers in a single MinefieldOrderGenerator. 2016-08-13 07:21:00 +00:00
Turupawn
bbac9ac61a Same unit command sounds wont overlap anymore
Responding to Travis inquiries

Changed Hashtable for Ditctionary + avoiding code duplication

More small code nits

another nit
2016-08-12 18:15:49 -06:00
reaperrr
398cb18043 Merge pull request #11772 from pchote/randomize-deathtypes
Support randomized death animations
2016-08-12 22:17:45 +02:00
reaperrr
75c5896cde Merge pull request #11773 from daynemarais/landing-aircraft-fix
Allowed aircraft to land on Tiberium and Veins
2016-08-12 22:05:30 +02:00
Paul Chote
a9bfa553fc Support multiple death animation variants. 2016-08-12 20:58:14 +01:00
Matthias Mailänder
fac58bd461 Replace pixel perfect offset with reference point definitions. 2016-08-12 21:54:51 +02:00
Matthias Mailänder
1a53bfd8a3 Keep sprite ctrl groups for Dune 2000, Red Alert, Tiberian Dawn. 2016-08-12 21:54:51 +02:00
Matthias Mailänder
8452792bb1 Render control groups using true type fonts in Tiberian Sun. 2016-08-12 21:54:51 +02:00
Matthias Mailänder
725a5d44eb Split SelectionDecorations control group rendering into
WithSpriteControlGroup and WithTextControlGroup
2016-08-12 21:53:16 +02:00
RoosterDragon
cc4ef736b0 Ensure HackyAI tries to attack and capture as frequently as it should.
Returning early in AssignRolesToIdleUnits would skip ticking down the counters that trigger new attack and capture attempts. This means they would be attempted far less often than intended.
2016-08-12 18:08:58 +01:00
Zimmermann Gyula
bea06ebb9a Update Tiberian Sun AI.
Increase infantry percentages.
Limit the AI repair units.
2016-08-12 16:07:56 +02:00
Zimmermann Gyula
099598e02c Update Dune 2000 AI.
Increase all AI combat infantry percentages.
Remove nonbuildable and deprecated infantry from AI UnitsToBuild list.
2016-08-12 14:39:06 +02:00
Zimmermann Gyula
33de63d7ee Update Tiberian Dawn AI.
Increase all AI infantry percentages.
Limit Engineers at Rush AI.
2016-08-12 14:38:55 +02:00
Zimmermann Gyula
028edc8051 Update Red Alert AI.
Increase land AI infantry percentages.
Add medic and mechanic to Normal and Turtle AI.
Limit Engineers at Rush AI.
2016-08-12 14:38:49 +02:00
Oliver Brakmann
da3333073f Merge pull request #11800 from WolfGaming/FixHuntable
RA: Delete the Huntable trait for walls and gates.
2016-08-12 14:14:07 +02:00
Oliver Brakmann
9604bf4cbd Merge pull request #11670 from evgeniysergeev/sandworm
Check that noiseDirection is not a zero
2016-08-12 13:45:14 +02:00
WolfGaming
299e925180 Only define Huntable for actors that need to be hunted. 2016-08-11 20:25:22 +00:00
Oliver Brakmann
068ffb169b Merge pull request #11417 from Phrohdoh/ai-capturers
Add naive capturing to HackyAI
2016-08-11 20:23:12 +02:00
Oliver Brakmann
f6f81e84df Fix Lua API returning wrong player info
The Lua API would return wrong information on player fields such as the team or faction when it was changed in the lobby. It referenced fields on the PlayerReference, which are pretty much read-only and don't get changed by the lobby.
2016-08-11 20:16:01 +02:00
Oliver Brakmann
92199d1dfd Merge pull request #11802 from reaperrr/fix-UpgradeOnDamage-desc
Fix UpgradeOnDamage trait description
2016-08-11 16:11:41 +02:00
reaperrr
bd4f7db711 Fix UpgradeOnDamage trait description
The old desc is bogus copy-pasta.
2016-08-11 11:31:18 +02:00
Taryn Hill
f3017d1bea CNC: Add capturing to Cabal AI 2016-08-10 19:06:25 -05:00
Taryn Hill
4e4676036f RA: Add capturing to Rush AI 2016-08-10 19:06:24 -05:00
Taryn Hill
c5e76a67dd HackyAI: Add basic capturing 2016-08-10 19:06:24 -05:00
Dayne Marais
0cfe553294 Allow aircraft to land on Tiberium and Veins 2016-08-10 22:09:56 +10:00
Zimmermann Gyula
558e266ae2 Include milliseconds in TakeScreenshot timestamp. 2016-08-09 10:44:08 +02:00
Paul Chote
88c43fa9b3 Extract content sources and downloads to external files. 2016-08-08 22:36:08 +01:00
Paul Chote
3261516b51 Support loading mods from arbitrary locations. 2016-08-08 22:36:08 +01:00
Paul Chote
cff8e949d8 Move ModContent out of the engine. 2016-08-08 22:36:07 +01:00
Paul Chote
bf4867909f Rename Manifest.Mod -> Metadata. 2016-08-08 22:36:07 +01:00
Paul Chote
3df9efb95d Rework mod enumeration / caching.
- Replaced ModMetadata.AllMods with Game.Mods.
- Store / reference mod Manifest instead of ModMetadata.
- Removes engine dependency on ModContent class.
2016-08-08 22:36:07 +01:00
Paul Chote
45a596953e Add a Utility class and update command interface. 2016-08-08 22:23:16 +01:00
Oliver Brakmann
207f0d2056 Allow saving maps with multiple visibility options 2016-08-08 23:14:06 +02:00
Oliver Brakmann
510555af5c Merge pull request #11776 from pchote/fix-bridge-freeze
Check terrain cost when testing pathable cells.
2016-08-08 18:41:24 +02:00
Oliver Brakmann
ab3da4f862 Merge pull request #11786 from Mailaender/dispose-renderer-sound
Fixed renderer not getting disposed.
2016-08-08 17:42:22 +02:00
Oliver Brakmann
ef3e2c1df2 Merge pull request #11783 from Mailaender/open.nat-2.1.0
Updated Open.NAT to version 2.1.0
2016-08-08 17:36:50 +02:00
Paul Chote
03e2fa5d55 Lerp turning-while-moving mobile actors along an arc. 2016-08-07 19:53:38 +01:00
Paul Chote
1f2824e614 Add WAngle.Lerp function. 2016-08-07 19:28:28 +01:00
Matthias Mailänder
a8118d9acd Dispose renderer and sound on exception. 2016-08-07 17:33:56 +02:00
Matthias Mailänder
0ec19365e3 We don't provide fallbacks anymore. 2016-08-07 17:33:56 +02:00
Matthias Mailänder
392fa3730e Update to Open.NAT 2.1.0 2016-08-07 10:14:43 +02:00
Matthias Mailänder
90ab5023a6 Merge pull request #11778 from pchote/detect-sequence-length-mismatch
Fix bogus D2K grenadier sequences.
2016-08-07 08:46:06 +02:00
Paul Chote
2b59cf08e8 Fix grenadier death sequences. 2016-08-06 21:19:41 +01:00
Paul Chote
b94b703157 Add a check for bogus Frames / Length combinations. 2016-08-06 21:19:32 +01:00
Oliver Brakmann
a461b6358a Merge pull request #11757 from pchote/platform-assembly
Remove the "Output Disabled" audio device and simplify platform initialization.
2016-08-06 21:01:48 +02:00
Paul Chote
860e92a2a6 Rename IGraphicsDevice.cs to PlatformInterfaces.cs. 2016-08-06 19:53:50 +01:00
Paul Chote
5a7a69a875 Tidy muting code. 2016-08-06 19:53:50 +01:00
Paul Chote
9437a86e7e Remove legacy sound code and simplify platform init. 2016-08-06 19:53:50 +01:00
Paul Chote
bb0fda41d2 Check terrain cost when testing pathable cells. 2016-08-06 19:01:04 +01:00
Paul Chote
de85a76c90 Merge pull request #11586 from GraionDilach/selfheal-revamp
Expand SelfHealing.
2016-08-06 17:31:46 +01:00
Matthias Mailänder
932b9f2bdf Remove 404 images from the readme. 2016-08-06 16:56:20 +02:00
Matthias Mailänder
6f75ddc823 Merge pull request #11758 from AoAGeneral/TDBalance
TD Balance Change 08012016
2016-08-03 07:13:52 +02:00
Matthias Mailänder
b08186f1cc Merge pull request #11666 from abcdefg30/survFix
Add an IsDead check to prevent crashes in survival01
2016-08-03 07:09:14 +02:00
Paul Chote
853ab798cb Merge pull request #11753 from RoosterDragon/vs
Allow VS2015 to format solution file
2016-08-01 21:57:12 +01:00
AoAGeneral
7025a230bf TD Balance Change 08012016 2016-08-01 12:08:26 -07:00
Paul Chote
86a0a0473b Merge pull request #11745 from RoosterDragon/download-cancel-fixes
Fix cancellation of downloads.
2016-07-31 19:39:17 +01:00
RoosterDragon
9ee6db9287 Allow VS2015 to format solution file. 2016-07-31 15:06:06 +01:00
Oliver Brakmann
75de73a17e Merge pull request #11744 from RoosterDragon/openal-cleanup
Close OpenAL sound device correctly
2016-07-31 15:32:04 +02:00
Matthias Mailänder
a73163c476 Merge pull request #11545 from pchote/aftermath-assets
Overhaul RA installed content.
2016-07-30 18:20:57 +02:00
RoosterDragon
3b5798b5e8 Fix cancellation of downloads.
The Download class cancels asynchronously, which means callers must handle cancellation inside the completion event, and not after requesting cancellation.
2016-07-30 16:27:45 +01:00
RoosterDragon
1c8f9d44df Clean up ALC sound device correctly.
ALC is thread-safe, therefore we can clean up from any thread and do not need to marshal to the main game thread. To clean up the device properly, we must first unset and destroy the context before attempting to close the device.
2016-07-30 14:53:33 +01:00
RoosterDragon
206088efb4 General code cleanup in OpenAlSoundEngine.cs. 2016-07-30 14:50:42 +01:00
Oliver Brakmann
77d0a8c54e Merge pull request #11638 from reaperrr/deprecate-IsWater-p1
Deprecate terrain IsWater check - Part 1
2016-07-30 14:25:17 +02:00
reaperrr
abaa0f4da5 Allow to customize which terrain types are considered water by HackyAI
For naval structure placement.
2016-07-30 13:19:32 +02:00
reaperrr
1e43554559 Allow to customize which terrain types are considered water by Parachutable 2016-07-30 13:19:32 +02:00
reaperrr
3e217c2192 Allow to customize which terrain types are considered water by WithCrateBody 2016-07-30 13:19:32 +02:00
Oliver Brakmann
6205eccff9 Merge pull request #11587 from pchote/d2k-106
Overhaul D2K installed content.
2016-07-30 12:29:04 +02:00
Paul Chote
492e308e2e Update asset downloads. 2016-07-30 09:59:24 +01:00
Paul Chote
3c0470cc93 Load beacon posters from lores.mix. 2016-07-30 09:59:24 +01:00
Paul Chote
9d8840a4da Extract only the redalert.mix contents that we need. 2016-07-30 09:59:24 +01:00
Paul Chote
68e176c531 Load C&C desert assets from content dir. 2016-07-30 09:49:28 +01:00
Paul Chote
5c496b8f2b Load aftermath assets from content dir. 2016-07-30 09:49:27 +01:00
Paul Chote
75b58e6839 Revert "Add Migrations GlobalModData."
This reverts commit c204c10f5e.
2016-07-30 09:49:27 +01:00
Paul Chote
841e8982dc Move RA assets to v2 dir for backwards compatibility. 2016-07-30 09:35:46 +01:00
Matthias Mailänder
93b5517445 Merge pull request #11734 from SoScared/balance2
Revert Nuke Truck Damage nerf vs Air
2016-07-30 10:31:13 +02:00
Paul Chote
e067618268 Add d2k download metadata. 2016-07-30 09:14:36 +01:00
Paul Chote
56fa7cee1b Fix install source tooltip width. 2016-07-30 09:14:36 +01:00
Paul Chote
0269805f2a Add GruntMods D2K installer metadata. 2016-07-30 09:14:36 +01:00
Paul Chote
3e1a2a89c0 Update content metadata for 1.06 and fonts. 2016-07-30 09:14:36 +01:00
Paul Chote
fdc74353fc Migrate to 1.06 patch content. 2016-07-30 09:14:35 +01:00
SoScared
b821ec6e72 Revert Nuke Truck Damage nerf vs Air 2016-07-29 14:40:44 +02:00
Matthias Mailänder
53f284c35a Merge pull request #11723 from GraionDilach/exp2score
Rename the Experience coloumn to Score in observer stats.
2016-07-28 08:38:26 +02:00
Oliver Brakmann
2eede9493e Merge pull request #11699 from Mailaender/unhardcode-capture-cursors
Unhardcoded the capture mouse cursor sequences
2016-07-27 21:36:33 +02:00
Matthias Mailänder
538137ce80 Merge pull request #11622 from Mailaender/dispose-p
Fixed parent package from ZipFile not getting disposed.
2016-07-27 14:41:17 +02:00
Matthias Mailänder
78848a67a0 Merge pull request #11721 from obrakmann/fix11660_smudge-removal-desync
Fix desync when removing smudges
2016-07-27 14:36:29 +02:00
Zimmermann Gyula
35cbb7adbb Change the Dune 2000 selfhealing from 2 HP to 4% per 125 frames. 2016-07-27 14:14:36 +02:00
Zimmermann Gyula
3ac5e0b455 Add a damagetype option to SelfHealing. 2016-07-27 14:14:35 +02:00
Zimmermann Gyula
4fa70cdfb9 Add a percentage option to SelfHealing. 2016-07-27 14:14:34 +02:00
Matthias Mailänder
fc8a2b2ebe Merge pull request #11634 from GraionDilach/fixup-damagedbyterrain
Fixup DamagedByTerrain.
2016-07-27 09:33:40 +02:00
Zimmermann Gyula
6b7ccd8aa5 Rename the Experience coloumn to Score in observer stats. 2016-07-27 02:46:10 +02:00
Zimmermann Gyula
f56602704e Rewrite TS vein YAML data. 2016-07-26 23:18:56 +02:00
Zimmermann Gyula
0f368bf6c3 Update the default mods excluding veins in TS. 2016-07-26 23:18:54 +02:00
Zimmermann Gyula
4812bc2997 Change DamagedByTerrain to apply the damage directly.
Instead of relying on a weapon.
2016-07-26 23:18:53 +02:00
Matthias Mailänder
2ab82664e3 Dispose the intermediate Stream after copying it to pkgStream. 2016-07-26 22:14:42 +02:00
Oliver Brakmann
30cf8c204b Fix desync when removing smudges
The cause of the crash was that the `RemoveSmudge` method only invokes `SharedRandom` in the else-branch of an if condition that is only taken when the `RenderPlayer` has fog visibility on the location (locations the `RenderPlayer` can see get removed from `dirty` in `TickRender`).

To add insult to injury, the `Type` field does not even need to get set since we are only using the `Sprite` field's `null` value as a marker to be picked up by the `TickRender` method. The `Type` field is only ever used twice in `AddSmudge`, in a branch of an if-condition that will not be taken when the `Sprite` field is null, which we set explicitly. The same holds true for the `Depth` field.
2016-07-26 21:46:18 +02:00
abcdefg30
e13fa2d474 Merge pull request #11571 from RockyTV/rockytv
Add command to generate settings docs
2016-07-26 17:38:38 +02:00
Alexandre Oliveira
66b74b0116 Add command to generate settings docs 2016-07-26 00:02:01 -03:00
Oliver Brakmann
d36be5b4ee Merge pull request #11704 from abcdefg30/byeCam
Remove CAMERA.Large from Evacuation and Survival01
2016-07-24 21:36:33 +02:00
Matthias Mailänder
cffeaa1774 Merge pull request #11705 from abcdefg30/descMO
Fix the Desc of MapOptionsInfo
2016-07-24 21:25:26 +02:00
abcdefg30
4ed2c53b1a Fix the Desc of MapOptionsInfo 2016-07-24 15:34:21 +02:00
abcdefg30
6f15b5a72d Remove CAMERA.Large from Survival01 2016-07-24 15:30:16 +02:00
abcdefg30
48d042ee05 Remove CAMERA.Large from Evacuation 2016-07-24 15:24:30 +02:00
Matthias Mailänder
5c230803fe Merge pull request #11696 from Mailaender/lonely-cactus
Removed a burnt cactus from TEMPERAT & SNOW terrain
2016-07-24 07:04:32 +02:00
Matthias Mailänder
da509d6394 Unhardcode the capture cursors. 2016-07-23 23:50:02 +02:00
Matthias Mailänder
37ff8420f2 Exclude burnt cactus from TEMPERAT & SNOW terrain. 2016-07-23 18:29:54 +02:00
Matthias Mailänder
40754e3ddb Merge pull request #11694 from obrakmann/fix-packaging-open.nat
Fix packaging script after move to Open.NAT
2016-07-23 18:02:10 +02:00
Oliver Brakmann
5b408855d1 Fix packaging script after move to Open.NAT 2016-07-23 17:09:38 +02:00
Matthias Mailänder
c0a440fb0a Merge pull request #11627 from obrakmann/player-experience2
Enable tracking of player experience in all mods
2016-07-23 15:53:22 +02:00
Oliver Brakmann
99d368905e Merge pull request #11680 from Mailaender/rm-jeep-unload
Removed the unused jeep unload sequence
2016-07-21 19:53:14 +02:00
Matthias Mailänder
4a09870df3 Remove the unused and redundant C&C hovercraft unload sequence. 2016-07-21 09:12:40 +02:00
Matthias Mailänder
31c4d339c4 Remove the unused and redundant Carryall unload sequence. 2016-07-21 09:12:10 +02:00
Matthias Mailänder
03e7b70029 Remove the unused jeep unload sequence (redundant to idle). 2016-07-21 09:07:20 +02:00
Oliver Brakmann
56ae4e846b Add GUI integration for PlayerExperience 2016-07-19 22:23:03 +02:00
Oliver Brakmann
3083c8a175 Add a yaml rules include file to disable player experience for scripted maps 2016-07-19 22:14:40 +02:00
evgeniysergeev
e824a4afbd Check that worm do not try to move at his current location
check latest value after while loop too
2016-07-19 22:55:43 +03:00
Oliver Brakmann
d292f15cc2 Enable player experience tracking in mod rules 2016-07-19 20:20:38 +02:00
Oliver Brakmann
dab7276601 Make repairing buildings and units grant experience
Using the repair button and repair pad, not using engineers and mechanics.
2016-07-19 20:20:38 +02:00
Oliver Brakmann
ac07c81e08 Make Infiltrates grant player experience 2016-07-19 20:20:38 +02:00
Oliver Brakmann
1e86326cbc Make capturing grant player experience 2016-07-19 20:20:38 +02:00
Oliver Brakmann
c1729a3b70 Make DonateSupplies grant player experience 2016-07-19 20:20:38 +02:00
Matthias Mailänder
25c640679c Merge pull request #11647 from abcdefg30/colorBorder
Add a dynamically generated bordercolor for supportpower timers
2016-07-19 10:27:11 +02:00
abcdefg30
76e57895b5 Merge pull request #11645 from RailTracker/bleed
Changed Basic and Combat observer stats to include Assets Destroyed/L…
2016-07-18 19:58:11 +02:00
abcdefg30
308a1a72b3 Add an IsDead check to prevent crashes in survival01 2016-07-18 18:55:21 +02:00
abcdefg30
00c6260ec2 Extract duplicated code to a SetupHuntTrigger function 2016-07-18 18:54:46 +02:00
Anthony Diep
b96de91480 Changed Basic and Combat observer stats to include Assets Destroyed/Lost instead of K/D ratio 2016-07-17 14:55:10 -07:00
abcdefg30
7769ef3c14 Add a dynamically generated bordercolor for supportpower timers 2016-07-17 16:07:53 +02:00
Oliver Brakmann
c2ec0d3cbc Merge pull request #11657 from Mailaender/fu-chocolatey
Replaced Chocolatey with more reliable alternatives
2016-07-16 16:50:15 +02:00
Matthias Mailänder
fb2fc7dae3 Replace the constantly breaking pandoc from Chocolatey
with a simple PowerShell script using the GitHub API.
2016-07-16 15:08:25 +02:00
Matthias Mailänder
5b61206ac6 Merge pull request #11513 from GraionDilach/idamage
Remove passing the warheads from DamageWarhead to AttackInfo.
2016-07-16 14:26:43 +02:00
Matthias Mailänder
0408a0345a Use the pre-installed NSIS. 2016-07-16 13:54:36 +02:00
abcdefg30
a7d82c6dba Merge pull request #11656 from Mailaender/appveyor-pandoc
Fixed AppVeyor failing at the MarkDown to HTML step
2016-07-16 12:44:53 +02:00
abcdefg30
549c00c6c1 Merge pull request #11653 from Mailaender/damagedbyterrain-div0
Fixed a division through zero in DamagedByTerrain.
2016-07-16 11:03:38 +02:00
Matthias Mailänder
8c6f501126 Fix pandoc v1.17.1 already installed. 2016-07-16 10:20:27 +02:00
Matthias Mailänder
fcd904a168 Avoid a division through zero. 2016-07-15 20:10:30 +02:00
abcdefg30
b1e8108a44 Merge pull request #11559 from MUzzell/feature-10416
Added ready checkbox for spectating admins
2016-07-15 15:47:05 +02:00
Oliver Brakmann
707a8e73da Merge pull request #11630 from Mailaender/fix-assetbrowser-palettes
Fixed palettes in the assets browser when the shellmap is disabled
2016-07-15 15:34:55 +02:00
abcdefg30
e8bcf0757f Merge pull request #11654 from Mailaender/dispose-installshieldcab
Fixed a resource leak on OpenRA.Utility.exe --list-installshield-cab
2016-07-15 15:28:59 +02:00
abcdefg30
d5bac4ebe4 Merge pull request #11651 from obrakmann/fix_HealthInit_breaking_Actor.Create
Allow HealthInit to be used with Actor.Create in Lua scripts
2016-07-15 14:10:47 +02:00
Oliver Brakmann
e6659f805b Merge pull request #11641 from abcdefg30/particleDensity
Convert ParticleDensityFactor from a float to an int
2016-07-15 10:30:57 +02:00
Matthias Mailänder
eb586fb37c Dispose the file open read stream. 2016-07-15 07:37:28 +02:00
Matthew Uzzell
6110357460 #10416 Added ready checkbox for spectating admins 2016-07-14 23:42:32 +01:00
Oliver Brakmann
d54de291b7 Merge pull request #11644 from Mailaender/appveyor-nsis-cache
Cached the NSIS installation on AppVeyor CI
2016-07-14 20:00:07 +02:00
Oliver Brakmann
417e9ca71f Add a single-argument constructor to HealthInit
...which is a requirement for an ActorInit to be usable with the Lua API's Actor.Create() method.
2016-07-14 19:45:03 +02:00
Oliver Brakmann
c4956120a7 Merge pull request #11572 from pchote/building-depth
Add building depth imposters for TS base structures.
2016-07-14 11:10:13 +02:00
Oliver Brakmann
f9255a33c4 Merge pull request #11536 from pchote/tfd
Add The First Decade metadata to the new content installer.
2016-07-14 11:08:03 +02:00
Paul Chote
216d82d4ef Set up TS base structure depth metadata. 2016-07-13 22:22:13 +01:00
Paul Chote
0371727596 Allow sequences to define depth offsets via sprites. 2016-07-13 22:22:13 +01:00
Paul Chote
5fbe747de2 Improve logging on sequence error. 2016-07-13 22:22:13 +01:00
Paul Chote
77e00e4587 Allow sequence blocks to remove inherited node Defaults. 2016-07-13 22:22:13 +01:00
Paul Chote
ac6b2a8f62 Support custom fully-open sequences for gates. 2016-07-13 22:22:07 +01:00
Paul Chote
983abee1ed Support tracking multiple sprites in SpriteCache. 2016-07-13 21:03:31 +01:00
Paul Chote
37c5e9e0b0 Fix incorrect secondary data channel in FastCreateQuad. 2016-07-13 21:03:30 +01:00
Paul Chote
f4c42581d5 Remove legacy CAB package support. 2016-07-13 21:01:56 +01:00
Paul Chote
204837d6c6 Add TFD metadata for TS. 2016-07-13 21:01:56 +01:00
Paul Chote
73ca64ee79 Add TFD metadata for TD. 2016-07-13 21:01:56 +01:00
Paul Chote
9ae444890b Add TFD metadata for RA. 2016-07-13 21:01:56 +01:00
Paul Chote
dbd21b9e46 Support extracting and deleting from content files. 2016-07-13 21:01:56 +01:00
Paul Chote
bddae7314a Reimplement InstallShieldCAB extraction. 2016-07-13 21:01:56 +01:00
Oliver Brakmann
8c8fa2d258 Merge pull request #11578 from abcdefg30/turretedDeath
Don't add duplicate facing entries when modifying the DeathActorInit in Turreted.cs
2016-07-13 19:09:08 +02:00
Oliver Brakmann
3539e3146e Merge pull request #11560 from abcdefg30/supportSpeech
Refine the support power speech notifications setup
2016-07-13 18:40:07 +02:00
Oliver Brakmann
43f406ad68 Merge pull request #11629 from abcdefg30/reqPlayer
Filter the lua PlayerProperties on Requires
2016-07-13 15:23:21 +02:00
Oliver Brakmann
8233857be1 Merge pull request #11393 from bateramos/upstream/#5966
Fixed air unit resupply
2016-07-13 14:27:04 +02:00
Matthias Mailänder
2236ee1f21 Cache the NSIS installation. 2016-07-13 07:43:24 +02:00
PedroFerreiraRamos
958e35d61f Fix air unit resupply #5966 2016-07-12 20:17:45 -03:00
abcdefg30
df5727ad38 Add an upgrade rule 2016-07-12 22:19:52 +02:00
abcdefg30
39d9832b03 Remove unnecessary ParticleDensityFactor yaml nodes
which only reflected the default value.
2016-07-12 22:19:51 +02:00
abcdefg30
3a8b2bda43 Convert ParticleDensityFactor from a float to an int 2016-07-12 22:19:50 +02:00
abcdefg30
60d7ef99d4 Merge pull request #11639 from Mailaender/check-cnc-sequences
Added sequence reference checks to OpenRA.Mods.Cnc.Traits.Render
2016-07-12 21:40:27 +02:00
Matthias Mailänder
3aea7bf955 Unhardcode, lint-test and self-document the ion cannon sequence. 2016-07-12 21:09:02 +02:00
abcdefg30
ba9fff3c6d Move the checks into the Any to prevent units in a group from doing nothing 2016-07-12 19:15:04 +02:00
abcdefg30
756dc7c127 Disable the attack-move and guard cursor for units which can't auto-target 2016-07-12 19:08:31 +02:00
abcdefg30
fb47c3ac9e Fix the attack-move cursor appearing for units which can't attack-move 2016-07-12 14:07:19 +02:00
abcdefg30
d2c5aec08d Filter the lua PlayerProperties on Requires 2016-07-12 14:03:44 +02:00
Zimmermann Gyula
cf8fff2b99 Remove passing the warheads from DamageWarhead to AttackInfo.
Added a Damage class to pass damage value and damage(types) instead.
This removes a great amount of overhead and longterm opens possibilities to have damagetypes without warheads.
2016-07-12 10:09:49 +02:00
Matthias Mailänder
67ba8c1bcc Add missing sequence references to TD render traits. 2016-07-12 07:34:02 +02:00
Matthias Mailänder
4703497656 Merge pull request #11635 from abcdefg30/training
Change the 'Training' sound to 'Building' for all queues except Infantry
2016-07-11 21:30:18 +02:00
abcdefg30
beb44c56fe Change the 'Training' sound to 'Building' for all queues except Infantry 2016-07-11 16:54:07 +02:00
Oliver Brakmann
6f57d1b561 Merge pull request #11631 from tmsbrg/install.md
Add curl as dependency for linux
2016-07-11 16:15:15 +02:00
abcdefg30
6342b40bfd Merge pull request #11499 from Mailaender/damaged-by-terrain
Merged PoisonedByTiberium and DamagedWithoutFoundations into DamagedByTerrain
2016-07-10 22:22:29 +02:00
Thomas van der Berg
f9f53a6925 Add curl package names to INSTALL.md 2016-07-10 21:13:59 +02:00
Matthias Mailänder
8ea30f9a09 TickRender regardless of the shellmap being enabled or not. 2016-07-10 20:47:08 +02:00
Matthias Mailänder
8df4e9e04c Merge PoisonedByTiberium and DamagedWithoutFoundations
into DamagedByTerrain.
2016-07-10 19:44:19 +02:00
Oliver Brakmann
203310ae4c Merge pull request #11623 from Mailaender/zip-entry-null
Fixed a potential NRE in DownloadPackageLogic.ShowDownloadDialog
2016-07-10 18:57:07 +02:00
Matthias Mailänder
57c22df114 Merge pull request #11487 from reaperrr/bldg-shape-prep
Improve Rectangle HitShape customizability
2016-07-10 17:09:31 +02:00
Matthias Mailänder
e8aa46e0d7 Merge pull request #11474 from obrakmann/player-experience
Add foundation for player experience tracking
2016-07-10 16:08:14 +02:00
Matthias Mailänder
90439ac64c Merge pull request #11574 from obrakmann/fix_non-combatant-unitcratepickup
Prevent non-combatant players from receiving units from crate pickups
2016-07-10 15:51:32 +02:00
Oliver Brakmann
20d55a1d93 Add Lua integration for PlayerExperience 2016-07-10 15:30:17 +02:00
Emiel Suilen
c3e862b2ca Add a PlayerExperience trait 2016-07-10 15:30:17 +02:00
Oliver Brakmann
5157ac917f Cache PlayerResources in PlayerStatistics
and remove a couple of redundant fields.
2016-07-10 15:30:17 +02:00
Matthias Mailänder
da3aaf4318 Merge pull request #11620 from pchote/fly-on-unreserve
Order landed aircraft to take off if their reservation is cancelled.
2016-07-10 09:28:16 +02:00
Matthias Mailänder
c3de3a0a90 Merge pull request #11619 from pchote/fix-depot-sell
Fix service depot selling.
2016-07-09 21:17:06 +02:00
Matthias Mailänder
2b8200fb0a Merge pull request #11550 from AoAGeneral/myfeature
TD Balance Changes 06302016
2016-07-09 21:02:46 +02:00
Matthias Mailänder
1fe66526cb Merge pull request #11577 from obrakmann/fix11454_EnterTransport_using_wrong_transport
Fix loading wrong transport when using alternate EnterTransport method
2016-07-09 20:59:42 +02:00
Matthias Mailänder
57acfe355b Merge pull request #11592 from reaperrr/fix-smudges
Fix smudges spawning/growing on cells occupied by structures or vehicles
2016-07-09 20:51:39 +02:00
Matthias Mailänder
6e0b058ec6 Merge pull request #11605 from pchote/renderscroll
Update keyboard scrolling at render rate.
2016-07-09 20:42:28 +02:00
Matthias Mailänder
d0bada1ae9 Don't crash when ZipFile.GetEntry returns null. 2016-07-09 20:10:53 +02:00
Oliver Brakmann
3afbc637f4 Merge pull request #11604 from pchote/fix-input-reset-crash
Fix input reset crash
2016-07-09 18:21:11 +02:00
Oliver Brakmann
66ebbab7c1 Merge pull request #11603 from pchote/fix-map-resize
Fix resizing of packaged maps.
2016-07-09 16:31:10 +02:00
Oliver Brakmann
c3633314f9 Merge pull request #11596 from GraionDilach/check-trail-delay
Fix a wrong check in LeavesTrails.
2016-07-09 16:21:48 +02:00
Oliver Brakmann
610c806ff3 Merge pull request #11519 from Mailaender/utility-same-spawn
Avoid importing spawn points with the same location
2016-07-09 15:08:33 +02:00
Oliver Brakmann
c000966590 Merge pull request #11361 from abcdefg30/newLua
Add new lua functions and fix the air attacks in allies05a
2016-07-09 14:59:47 +02:00
Paul Chote
4e32610056 Fix utility commands being unable to open oramaps. 2016-07-09 12:21:38 +01:00
Paul Chote
b87020f93f Order landed aircraft to take off if their reservation is cancelled. 2016-07-09 12:08:48 +01:00
Paul Chote
b0c9d49d14 Fix INotifyRepair argument order. 2016-07-09 11:12:56 +01:00
Paul Chote
7325f0e733 Fix service depot animation breaking sell. 2016-07-09 11:11:31 +01:00
Paul Chote
8ef38fc060 Update keyboard scrolling at render rate. 2016-07-09 01:29:17 +01:00
Paul Chote
780d6890d9 Expose viewport bookmark hotkeys to settings UI. 2016-07-09 01:11:44 +01:00
Paul Chote
2ed6706f59 Add hotkeys for viewport bookmarks. 2016-07-09 01:11:18 +01:00
Zimmermann Gyula
ad0c38d352 Fix a wrong check in LeavesTrails. 2016-07-09 02:08:33 +02:00
Matthias Mailänder
71d6471df7 Merge pull request #11602 from GraionDilach/authors-open.nat
Update AUTHORS with Open.Nat.
2016-07-08 22:17:19 +02:00
Zimmermann Gyula
91afb560a4 Update AUTHORS with Open.Nat. 2016-07-08 17:45:52 +02:00
Oliver Brakmann
b080417db3 Prevent non-combatant players from receiving units from crate pickups 2016-07-08 13:24:25 +02:00
Oliver Brakmann
196dd04b5d Merge pull request #11544 from Phrohdoh/debug-exits
Add ExitsDebugOverlay
2016-07-08 13:19:18 +02:00
Oliver Brakmann
f141798bcb Merge pull request #11580 from Mailaender/dedicated-nat-log
Fixed dedicated server crashing when writing UPnP Nat logs
2016-07-08 13:15:26 +02:00
Oliver Brakmann
6396f95ff5 Merge pull request #11594 from r34ch/lst-beach-landing
Allow RA LST to travel on beach tiles
2016-07-08 13:13:11 +02:00
D'Arcy Rush
3ae87c9db4 Allow RA LST to travel on beach tiles 2016-07-07 22:13:19 +01:00
reaperrr
e2cf6fdb9a Do not spawn smudges under buildings and vehicles in TS
Exceptions are intentional.
2016-07-07 20:51:21 +02:00
reaperrr
5df32e6d2a Fix smudges in D2k to not spawn or grow when hitting vehicle or structure 2016-07-07 20:51:21 +02:00
reaperrr
a212734c5c Fix smudges in TD to not spawn/grow under structures and vehicles
Also trees, husks and creeps (dinos and visceroids) in most cases.
Exceptions are intentional.
2016-07-07 20:51:21 +02:00
reaperrr
af1afca792 Fix TD artillery explosion sound not playing 2016-07-07 20:51:21 +02:00
reaperrr
1886bad107 Make smudges in RA not spawn/grow below vehicles and structures
Also walls, trees and husks in most cases.

Note: Differences between warheads are intentional.
Note2: Some smudge WHs were removed instead when the weapon was purely anti-air or anti-water.
2016-07-07 20:51:21 +02:00
reaperrr
4b1e243df3 Make smudges not spawn or grow when cell contains invalid target
This can be used to prevent smudges to spawn below buildings, vehicles etc.
2016-07-07 20:51:21 +02:00
Taryn Hill
4b7af5d780 TS: Make use of ExitsDebugOverlay(Manager) 2016-07-07 08:58:56 -05:00
Taryn Hill
7a0d12dd51 Implement ExitsDebugOverlay and ExitsDebugOverlayManager 2016-07-07 08:57:44 -05:00
Matthias Mailänder
93b7847ce2 Merge pull request #11583 from Phrohdoh/fix-withtextdeco
WithTextDecoration: Move exception to Info via IRulesetLoaded
2016-07-06 22:46:26 +02:00
Oliver Brakmann
eae3808515 Merge pull request #11589 from cjshmyr/crash-timestamp
Add timestamp to exception.log
2016-07-06 22:36:57 +02:00
Curtis Shmyr
2fc77a315e Add timestamp to exception.log 2016-07-06 13:49:08 -06:00
Taryn Hill
59d97b8447 WithTextDecoration: Move exception to Info via IRulesetLoaded 2016-07-05 14:09:27 -05:00
Oliver Brakmann
92e13616de Merge pull request #11207 from evgeniysergeev/removesmudge
add RemoveSmudge function
2016-07-05 12:33:56 +02:00
evgeniysergeev
e83ffbec1c add RemoveSmudge function and trait 2016-07-05 12:03:04 +03:00
Matthias Mailänder
d1f104a78f Add new log channel nat to the dedicated server as well. 2016-07-04 22:07:29 +02:00
reaperrr
31d822bcd2 Merge pull request #11565 from Mailaender/withtextdecoration
Added WithTextDecoration
2016-07-04 18:37:28 +02:00
abcdefg30
7593cf3b63 Don't add duplicate facing entries when modifying the DeathActorInit in Turreted.cs 2016-07-04 18:32:01 +02:00
Oliver Brakmann
2c42177ef8 Merge pull request #11549 from reaperrr/fix-ra-gren-dmg
Fix RA Grenadier damage versus Heavy armor
2016-07-04 17:53:35 +02:00
Oliver Brakmann
ffe36334a0 Fix loading wrong transport when using alternate EnterTransport method 2016-07-04 14:52:48 +02: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
Matthias Mailänder
6148e8d8a3 Rename Stances to ValidStances. 2016-07-04 00:34:28 +02:00
Matthias Mailänder
db146ae479 Remove Red Alert primary sprite font from Tiberian Sun. 2016-07-04 00:34:26 +02:00
Matthias Mailänder
2b67a53f7e Remove Red Alert primary sprite font from Dune 2000. 2016-07-03 21:32:02 +02:00
Matthias Mailänder
a6e42823e5 Add WithTextDecoration. 2016-07-03 21:31:58 +02:00
Matthias Mailänder
bd8c97e258 Merge pull request #11570 from abcdefg30/tsRules
Clean the ts yaml rules
2016-07-03 20:59:23 +02:00
Matthias Mailänder
9833a56e65 Merge pull request #11556 from pchote/gamespeeds
Port game speed selection to new lobby backend.
2016-07-03 20:55:09 +02:00
abcdefg30
430b654460 Merge pull request #11428 from reaperrr/attack-delay
Allow attack anims/overlays to start before weapons fire
2016-07-03 18:58:07 +02:00
reaperrr
81190be3b6 Merge pull request #11543 from Phrohdoh/chatcommands-no-dupes
Allow overriding previously registered chatcommands
2016-07-03 16:48:35 +02:00
Paul Chote
7caf636222 Port game speed selection to new lobby backend. 2016-07-03 15:46:08 +01:00
abcdefg30
d51960f621 Remove a bogus RevealsShroud definition from DPOD 2016-07-03 16:28:28 +02:00
abcdefg30
47f0b81448 Replace yes/no with true/false in all ts rule yamls 2016-07-03 16:28:27 +02:00
abcdefg30
0589a58ac3 Remove an empty "Building:" definition from NASAM 2016-07-03 16:28:25 +02:00
abcdefg30
0c43c43509 Remove unneeded "LandWhenIdle: no" definitions from ts defaults.yaml
Both ^Helicopter and ^Plane already inherit that from ^Aircraft
2016-07-03 16:28:25 +02:00
abcdefg30
e858e13da7 Merge pull request #11561 from Phrohdoh/gives-exp-stances
Replace GivesExperience.FriendlyFire and GivesBounty.Stances with ValidStances
2016-07-03 16:24:37 +02:00
abcdefg30
b9b9cf7f92 Make use of the new SpeechNotifications in ra and cnc 2016-07-03 16:21:08 +02:00
abcdefg30
6de12fb0e9 Add SpeechNotifications for InsufficientPower and Launch on support powers 2016-07-03 16:21:07 +02:00
abcdefg30
7fd7d44e7f Remove empty fields from support powers 2016-07-03 16:21:04 +02:00
abcdefg30
6d81de84a4 Replace direct references to filenames by ones to notifications where possible 2016-07-03 16:21:03 +02:00
abcdefg30
57d83e2813 Add more sound notifications to cnc 2016-07-03 16:21:02 +02:00
abcdefg30
96165293dc Add all missing speech notifications to cnc 2016-07-03 16:21:01 +02:00
abcdefg30
aa93983efd Sort the entries in mods/cnc/audio/notifications.yaml 2016-07-03 16:21:00 +02:00
abcdefg30
46a9750fcb Merge pull request #11555 from pchote/fix-editor-shellmap-ui
Use BeforeGameStart to remove shellmap UI on editor start.
2016-07-03 16:13:31 +02:00
Taryn Hill
f731dc8d68 Utility: Add upgrade rules for GivesExperience and GivesBounty changes 2016-07-03 08:50:55 -05:00
Taryn Hill
3f6f918b3d GivesBounty: Replace Stances with ValidStances 2016-07-03 08:50:55 -05:00
Taryn Hill
ec808ddc54 GivesExperience: Replace FriendlyFire with ValidStances 2016-07-03 08:50:54 -05:00
reaperrr
a0a6d0705e Merge pull request #11563 from Phrohdoh/fs-mount-tryget
FileSystem.Mount: Use TryGetValue instead of directly accessing a value
2016-07-03 15:37:01 +02:00
reaperrr
3ca3fc8d4b Merge pull request #11567 from Mailaender/lint-pips-groups
Documented and exposed the control group sprites to lint testing
2016-07-03 15:31:39 +02:00
Taryn Hill
6a228f0428 FileSystem: Use TryGetValue in Mount(string, string) 2016-07-03 08:25:14 -05:00
Matthias Mailänder
889bbcf428 Cache the palette lookup. 2016-07-03 14:41:15 +02:00
Matthias Mailänder
4325e1b400 Let pipImages tick using the appropriate interface. 2016-07-03 14:40:47 +02:00
Matthias Mailänder
3e5155fa7d Cache pipImages in the constructor. 2016-07-03 14:40:14 +02:00
abcdefg30
bc93e5f666 Merge pull request #11564 from Mailaender/coverity-zipfile
Fixed undisposed file and memory streams in ZipFile and surroundings
2016-07-03 14:22:36 +02:00
Matthias Mailänder
3a7558c273 Document and lint test pips and groups. 2016-07-03 12:26:29 +02:00
Matthias Mailänder
2de423ddb9 Dispose fileStream when problems occur. 2016-07-03 10:27:44 +02:00
Matthias Mailänder
96d9a01f76 Dispose pkgStream. 2016-07-03 10:26:56 +02:00
reaperrr
2a268f80b2 Give TS walls rectangular HitShapes 2016-07-02 17:39:16 +02:00
reaperrr
f25398c731 Add option to apply Rectangle HitShape to all TargetablePositions
This allows to simulate a footprint-shaped HitShape until we have a proper Polygon HitShape.
2016-07-02 17:39:15 +02:00
reaperrr
610f08f652 Add RotateToIsometry to Rectangle HitShape
This is a temporary measue until we have a more flexible Polygon HitShape.
2016-07-02 17:23:34 +02:00
reaperrr
9020d39fcc Introduce PositionClosestTo util 2016-07-02 17:23:34 +02:00
reaperrr
8590be5f74 Merge pull request #11482 from pchote/rework-zip-updating
Rework zip updating
2016-07-02 17:00:06 +02:00
reaperrr
c8012baffb Make all Attack* traits listen to Stop order 2016-07-02 16:02:00 +02:00
reaperrr
c153277e8b Add AttackSounds trait
This trait plays sounds when preparing to attack or attacking.
2016-07-02 16:02:00 +02:00
reaperrr
3b43544e2d Add start delay functionality to attack animation traits 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
87537d9669 Move WithAttackOverlay to Mods.Common 2016-07-02 16:02:00 +02:00
reaperrr
cf97e36815 Merge pull request #11558 from abcdefg30/portableUnhard
Unhardcode the target(blocked) cursor(s) in PortableChrono
2016-07-02 15:15:43 +02:00
reaperrr
2640b5df80 Merge pull request #11551 from abcdefg30/lowerLevel
Lower the case of the TechLevel in all rules.yaml files
2016-07-02 15:07:48 +02:00
reaperrr
fc50127390 Merge pull request #11557 from Mailaender/railway-rendering
Fixed Tiberian Sun railway rendering
2016-07-02 15:00:31 +02:00
abcdefg30
868d5c14e9 Unhardcode the target(blocked) cursor(s) in PortableChrono 2016-07-02 13:44:57 +02:00
Matthias Mailänder
7152cec589 Fix railway rendering outside the map editor. 2016-07-02 12:40:00 +02:00
Matthias Mailänder
2bccdde9d0 Move Inherits on top. 2016-07-02 12:39:43 +02:00
Paul Chote
89c4cf9658 Hack around map creation crash. 2016-07-01 21:58:27 +01:00
Paul Chote
21c150fae3 Throw a sensible exception when an invalid path is given. 2016-07-01 21:58:26 +01:00
Paul Chote
c706e68b73 Rework zip file updating. 2016-07-01 21:58:26 +01:00
Paul Chote
5d62881be6 Support upgrading explicitly referenced yaml paths. 2016-07-01 21:58:26 +01:00
Paul Chote
9baee57443 Use BeforeGameStart to remove shellmap UI on editor start. 2016-07-01 21:54:25 +01:00
abcdefg30
4732f3767f Merge pull request #11459 from reaperrr/fix-range-check
Fix weapon min/max range and validity checks
2016-07-01 14:24:41 +02:00
abcdefg30
f945837860 Lower the case of the TechLevel in all rules.yaml files 2016-07-01 00:00:42 +02:00
abcdefg30
1168d10519 Remove empty MapOptions: entries from rules.yaml files 2016-06-30 23:59:58 +02:00
AoAGeneral
df407c90e7 TD Balance Changes 06302016 2016-06-30 14:38:44 -07:00
Oliver Brakmann
b186084c79 Merge pull request #11547 from reaperrr/fix-td-p03
Fix debris P03 template in TD jungle and snow terrain
2016-06-30 21:32:45 +02:00
reaperrr
7a3888220f Make RA grenade versus Concrete explicit
To prevent people from assuming it's unintentional.
2016-06-30 19:31:03 +02:00
reaperrr
f9cf398949 Increase RA Grenadier damage vs. Heavy armor
5% versus Heavy armor is way too low. Increasing it to 25% results in an effective increase from 3 to 15 damage points for full hits, making grenadiers quite a bit more versatile, while still leaving a big enough gap to Rocket Soldiers in effectiveness versus tanks and defenses.
2016-06-30 19:28:19 +02:00
reaperrr
ea18a89e03 Fix debris P03 template in TD jungle and snow terrain 2016-06-30 19:08:13 +02:00
Taryn Hill
023b17a68e Allow overriding previously registered chatcommands 2016-06-30 09:28:27 -05:00
reaperrr
4d90361b8b Merge pull request #11514 from abcdefg30/64ops
Fix a crash with not space occupying actors granting support powers
2016-06-30 15:35:02 +02:00
reaperrr
8493b1deda Merge pull request #11512 from Nelax/ai-squadexclude
Added Squad Exclusion to HackyAI
2016-06-30 15:21:22 +02:00
reaperrr
f5c89ae56d Merge pull request #11497 from obrakmann/stuff-for-sp-1
Add functionality requested for Shattered Paradise
2016-06-30 15:13:49 +02:00
reaperrr
213c1bcb3e Merge pull request #11463 from reaperrr/fix-ai-mcv
Improve AI MCV deployment
2016-06-30 11:44:14 +02:00
Matthias Mailänder
641cb96dac Merge pull request #11542 from MustaphaTR/ant-crush-fix
RA - Some fixes about Giant Ants
2016-06-28 20:48:13 +02:00
Mustafa Alperen Seki
079d58dbef Some fixes about Giant Ants. 2016-06-28 16:42:58 +03:00
reaperrr
e647af3dd1 Allow modders to choose AI MCV deployment base restriction
For some mods, a random map location might be a better choice for the AI than deploying the MCV inside the base, so we allow modders to customize it.
2016-06-27 18:17:51 +02:00
reaperrr
28376782aa Make civilians in RA, TD and TS wander around
Except for some singleplayer actors where this could be problematic
(Einstein, Mobius, Agent Delphi, RA General).
2016-06-26 20:30:08 +02:00
reaperrr
09e365bc4a Fix Wanders to be usable on its own
Allows unarmed actors like civilians or harmless critters to wander around when idle.

Additionally made it upgradable.
2016-06-26 20:30:06 +02:00
Matthias Mailänder
921375973e Merge pull request #11522 from pchote/more-installers
Support content installation from "C&C The Ultimate Collection" (Origin versions).
Closes #9479
Closes #11524
2016-06-26 19:42:10 +02:00
Paul Chote
40089e7076 Fix logging on bogus extraction metadata. 2016-06-26 18:23:44 +01:00
Paul Chote
fe3231ec2c Add RA Aftermath disk metadata. 2016-06-26 18:23:42 +01:00
Paul Chote
e9e5e9da58 Add support for RA TUC music. 2016-06-26 18:23:18 +01:00
Paul Chote
1005e1146f Extract C&C videos to disk for perf and TUC compatibility. 2016-06-26 18:22:29 +01:00
Paul Chote
9c79e45356 Add TUC metadata for TS. 2016-06-26 18:22:29 +01:00
Paul Chote
147dccec0b Add TUC metadata for RA. 2016-06-26 18:22:26 +01:00
Paul Chote
974c0b6eed Add TUC metadata for C&C. 2016-06-26 18:18:40 +01:00
Paul Chote
d1a973458b Add support for installing content from disk. 2016-06-26 18:18:40 +01:00
Paul Chote
7ca7e695e1 Rename Disc -> Source in asset installer. 2016-06-26 18:18:40 +01:00
Oliver Brakmann
aad17148bc Merge pull request #11533 from HenrytheSlav/pword_UI
Password UI improvements
2016-06-26 17:47:35 +02:00
reaperrr
483452580f Merge pull request #11528 from pchote/migrations
Delete legacy downloaded scores.mix on first run
2016-06-26 16:54:02 +02:00
reaperrr
7ed792ba88 Merge pull request #11286 from Mailaender/open.nat-2.0.16
Dump Mono.NAT in favor of Open.Nat 2.0.16
2016-06-26 16:16:11 +02:00
HenrytheSlav
17d6afa071 Do not keep the wrong password in the textfield for next try. 2016-06-26 15:54:41 +02:00
HenrytheSlav
d19c9eadb0 Jump to textfield in password prompt. 2016-06-26 15:44:19 +02:00
Matthias Mailänder
3356e6a82d Merge pull request #11526 from pchote/cleanup-move
Remove legacy Move constructor.
2016-06-25 22:28:05 +02:00
Paul Chote
6aa0daa500 Remove legacy downloaded scores.mix. 2016-06-25 19:17:51 +01:00
Paul Chote
c204c10f5e Add Migrations GlobalModData. 2016-06-25 19:17:50 +01:00
Paul Chote
30dcbeb873 Remove legacy Move constructor. 2016-06-25 16:29:47 +01:00
reaperrr
c643a0abd6 Change AttackWander trait lookup
AttackMove is required and therefore can't be null, so the 'OrDefault' was redundant.
2016-06-25 12:42:42 +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
46ca650324 Fix initial Wanders delay
The previous 'fix' was apparently incomplete. This time it has been properly tested and works as intended.
2016-06-25 12:29:00 +02:00
Matthias Mailänder
a55b8659c7 Avoid importing spawn points with the same location. 2016-06-25 09:44:39 +02:00
Matthias Mailänder
a421a191b5 Merge pull request #11517 from abcdefg30/empLimit
Add a note in the tooltip of build-limited TS structures
2016-06-25 08:32:38 +02:00
abcdefg30
383b155c4e Add a note in the tooltip of build-limited TS structures 2016-06-25 00:33:12 +02:00
Oliver Brakmann
9eae2ca154 Merge pull request #11510 from reaperrr/move-loaders
Move audio loaders from engine to mod level
2016-06-24 23:59:08 +02:00
Oliver Brakmann
694fe2bdf1 Merge pull request #11515 from reaperrr/fix-wanders
Fix Wanders always triggering move at first game tick
2016-06-24 20:47:48 +02:00
abcdefg30
756f88c187 Merge pull request #11402 from Mailaender/sp-utility
Improved map import for singleplayer missions
2016-06-24 18:02:13 +02:00
reaperrr
38e1d409ff Make Wanders.TickIdle virtual
So inheriting traits can override it.
2016-06-24 16:43:54 +02:00
reaperrr
4eb17e1642 Fix all wandering actors wandering at first game tick
NotifyBecomingIdle is only notified at the first idle tick, so `countdown` is not set when TickIdle checks it at first game tick. Therefore, we let TickIdle return early at first game tick to avoid that.
2016-06-24 16:43:53 +02:00
Bynnar18
dace814829 Added ExcludeFromSquads to HackyAI 2016-06-24 09:18:43 -05:00
abcdefg30
dd5e229886 Fix a crash with not space occupying actors granting support powers 2016-06-24 15:30:57 +02:00
abcdefg30
eccdc47544 Remove trailing spaces and tabs from cnc64gdi01.lua 2016-06-24 15:29:57 +02:00
reaperrr
61acbe70d6 Extract WavReader to own file and move it to FileFormats 2016-06-23 23:47:57 +02:00
reaperrr
f1882e2dd6 Rename ImaAdpcmLoader to *Reader and move it to FileFormats 2016-06-23 23:47:55 +02:00
reaperrr
415e0bb54c Split AudReader from AudLoader and move it to FileFormats
We already separated loading from file format reading for sprites and videos.
2016-06-23 23:47:54 +02:00
reaperrr
ed210b380f Move audio loaders from engine to mod level 2016-06-23 23:47:52 +02:00
Oliver Brakmann
f0d6334697 Merge pull request #11511 from OmegaBolt/d2k-cliffmaze
D2k: Add Cliffmaze 1v1 map by S.D.
2016-06-23 21:14:11 +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
40e5dfbedb Fix helicopters not returning when all valid weapons are out of ammo
They now return if all weapons are invalid (which includes those that are otherwise valid, but out of ammo) and at least one AmmoPool needs reloading at RearmBuilding.
2016-06-23 14:47:42 +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
OmegaBolt
d017d38363 D2k: Add Cliffmaze 1v1 map by SD 2016-06-23 10:35:26 +01:00
reaperrr
ad77dca12a Remove WavReader dependency from BagFile reader 2016-06-23 01:55:01 +02:00
Oliver Brakmann
c2d4a3a8e8 Merge pull request #11470 from pchote/fix-direction-check
Fix Mobile.IsMovingInMyDirection check.
2016-06-22 22:49:03 +02:00
abcdefg30
34c6edbbe7 Merge pull request #11456 from obrakmann/disable-singleplayer-by-default-for-dedicateds
Disable single-player games by default on dedicated servers
2016-06-22 22:28:37 +02:00
Oliver Brakmann
95dbaa5d1f Merge pull request #11373 from reaperrr/fix-footprints
Fixed footprints of several RA and TD base structures
2016-06-22 20:51:36 +02:00
Oliver Brakmann
8e2adc7627 Disable singleplayer games by default on dedicated servers 2016-06-22 20:37:31 +02:00
reaperrr
ff48ba8fba Merge pull request #11500 from Mailaender/ts-sprite-offsets
Fixed sprite offsets of several Tiberian Sun buildings
2016-06-22 15:01:15 +02:00
reaperrr
99836bd55b Fix RA selection box offsets
Gap Gen, Adv. Powerplant, fake APP, Tesla Coil.
2016-06-21 23:53:55 +02:00
reaperrr
4cc6dede5d Fix TD selection and section deco offsets
...of Temple of Nod, Weapons Factory and Hand of Nod, to better match the new footprints.
2016-06-21 23:53:53 +02:00
reaperrr
096d82a901 Map actor Location upgrade rules
To move all buildings with changed footprint down by 1 cell.
2016-06-21 23:53:52 +02:00
reaperrr
57ff4822fc Add support for custom locations to legacy map importer
For example, to place actors with changed footprint correctly.
Use it to ensure correct positioning of several RA and TD structures as well as TD tiberium trees.
2016-06-21 23:53:50 +02:00
Matthias Mailänder
703388f034 Fixed sprite offsets. 2016-06-21 23:28:48 +02:00
abcdefg30
229e22b1d8 Fix the air attacks in allies05a using the new functions 2016-06-21 23:20:05 +02:00
abcdefg30
61fd9d2959 Add AmmoPoolProperties to lua 2016-06-21 23:20:02 +02:00
Paul Chote
7fe71961a4 Merge pull request #10715 from Mailaender/import-sequences
Added a TS/RA2 sprite sequence importer for infantry and buildings
2016-06-21 21:57:34 +01:00
Oliver Brakmann
35bde84f97 Merge pull request #11498 from pchote/move-carryall
Move carryall code to Mods.Common.
2016-06-21 22:54:50 +02:00
abcdefg30
4461379963 Make the Attack lua method available for non-mobile actors 2016-06-21 22:49:29 +02:00
abcdefg30
19482863fd Expose Land and Resupply functions for aircraft to lua 2016-06-21 22:49:28 +02:00
Paul Chote
2355ad9dd1 Move carryall code to Mods.Common. 2016-06-21 21:38:19 +01:00
Oliver Brakmann
2e07459e98 Make RejectsOrders upgradable 2016-06-21 19:13:25 +02:00
Oliver Brakmann
41417c5ad2 Add a DeathTypes filter to GivesBounty
also:

* Updates the documentation
* Adds an option to disable the floating text
2016-06-21 19:13:25 +02:00
reaperrr
8ba833777c Make AI deploy MCVs in the vincinity of existing construction yards
While the general idea of AIs building distant secondary bases might be tempting, in reality the AI would way too often send the MCV close to some enemy base, wasting the cash and potentially increased build speed/additional build queue.

Deploying MCVs close to the existing base ensures that the AI will actually have some benefit from building an MCV.
2016-06-20 20:52:04 +02:00
reaperrr
5992530655 Fix AI giving orders to MCVs that already have orders
Checking for IsMoving is a flawed approach no matter how you look at it. The MCV might just have temporarily stopped due to an obstacle, or about to be deployed.

Checking for IsIdle instead ensures that the MCV really isn't already in the process of doing something.
2016-06-20 20:52:04 +02:00
Matthias Mailänder
a7fa5e9fe1 Guess the correct sprite offset from building foundations. 2016-06-20 20:47:30 +02:00
Matthias Mailänder
8de6f1a18b Add a sprite sequence importer for infantry and buildings. 2016-06-20 20:47:26 +02:00
reaperrr
b5a67444e7 Pass ModData to upgrade methods 2016-06-20 18:59:26 +02:00
reaperrr
3aa529b2ba Fix TD mission base rebuild locations
To adapt to changed footprint.
2016-06-20 18:55:54 +02:00
reaperrr
fedc0e7d28 Fixed map placement of TD buildings
...with changed footprint.
2016-06-20 18:55:54 +02:00
reaperrr
c114c8fe1e Fixed map placement of RA buildings
...with changed footprint.
2016-06-20 18:55:54 +02:00
reaperrr
9a8f0d9aba Removed empty top rows from TD base structure footprints
Removed top row of buildings where it only consisted of _ cells and adjusted the art offset instead. This fixes the issue that CenterPosition was located in the middle between the occupied and passable cell for defenses like Obelisks, makes their placement a bit more intuitive and makes setting up proper HitShapes easier.
2016-06-20 18:55:54 +02:00
reaperrr
a392780c93 Tweaked RA airfield + soviet barracks offsets
Barracks art is now more centered and aligned with allied tent. Airfield is now more centered, which also makes the custom spawn position obsolete and fixes the misalignment between spawn and landing position.

This is also done to reduce misalignment between art and footprint-sized hit shapes that will follow later.
2016-06-20 18:55:54 +02:00
reaperrr
ad44c51898 Removed empty top rows from RA base structure footprints
Removed top row of buildings where it only consisted of _ cells and adjusted the art offset instead. This fixes the issue that CenterPosition was located in the middle between the occupied and passable cell for defenses like tesla coils, makes their placement a bit more intuitive and makes setting up proper HitShapes easier.
2016-06-20 18:55:54 +02:00
reaperrr
526f851489 Merge pull request #11426 from pchote/actorpreview-dynamic-facing
Support dynamic ActorPreview facings and creating previews from live actors.
2016-06-20 14:38:11 +02:00
reaperrr
7467a0e1a9 Merge pull request #11451 from pchote/map-lua-options
Port map difficulties to new lobby options backend.
2016-06-20 13:03:47 +02:00
reaperrr
94bde04422 Merge pull request #11483 from Mailaender/supportpower-factionspeech
Added support power speech notifications
2016-06-20 12:21:48 +02:00
Paul Chote
b59b57f67e Hide checkboxes if no matching trait exists. 2016-06-19 22:15:27 +01:00
Paul Chote
6570e1b22e Avoid crash when parsing an order with duplicate IDs. 2016-06-19 22:15:27 +01:00
Paul Chote
7c2d938327 Remove bogus MapOptions trait from the player actor. 2016-06-19 22:15:27 +01:00
Paul Chote
d08a8eb1f6 Replace Map.Difficulty with Map.LobbyOption in scripts. 2016-06-19 22:15:27 +01:00
Paul Chote
8ce4ab0bd1 Port map difficulty to new options backend. 2016-06-19 22:15:26 +01:00
Paul Chote
1d1b97cb6a Add ScriptLobbyDropdown trait and lua API. 2016-06-19 22:15:26 +01:00
Oliver Brakmann
74f0eceb56 Merge pull request #11031 from Phrohdoh/orautil-miniyaml-tree-actor
Add a utility command to output an actor's MiniYaml tree
2016-06-19 23:07:19 +02:00
Taryn Hill
1359361832 Add a utility command to output an actor's MiniYaml tree
Possibly taking in a path (to a .zip/.oramap/directory).
2016-06-19 15:39:39 -05:00
abcdefg30
5daf43ab43 Merge pull request #11486 from abcdefg30/byeLobbyDefaults
Remove LobbyDefaults from reservedModuleNames in Manifest.cs
2016-06-19 22:30:27 +02:00
abcdefg30
a8fc18522e Merge pull request #11479 from reaperrr/improve-shadow
Improve WithShadow
2016-06-19 22:29:29 +02:00
abcdefg30
4e04f91992 Remove LobbyDefaults from reservedModuleNames in Manifest.cs 2016-06-19 22:14:36 +02:00
abcdefg30
2d21d6aad2 Merge pull request #11485 from obrakmann/fix11472_X.vqa
Fix blank video heuristic for legacy map import to include upper-case 'X'
2016-06-19 20:40:27 +02:00
Oliver Brakmann
e08ba5eaee Fix blank video heuristic for legacy map import to include upper-case 'X' 2016-06-19 20:11:05 +02:00
reaperrr
906bbc5439 Give TD/RA aircraft custom shadow offsets
To a) match 'light direction' of other actor art, and b) make the shadow still a little visible for landed aircraft.
2016-06-19 19:28:44 +02:00
reaperrr
cc9b24d932 Make WithShadow Offset and ZOffset customizable 2016-06-19 19:13:10 +02:00
Matthias Mailänder
aebd4a9fea Add faction specific select target speech notifications
to ion cannon and cluster missile.
2016-06-19 18:51:10 +02:00
Matthias Mailänder
ad216ce050 Consolidate EMP attack order with faction speech notifications. 2016-06-19 18:50:31 +02:00
Matthias Mailänder
730b5ae2eb Replace cluster missile sounds with faction speech. 2016-06-19 18:50:00 +02:00
Matthias Mailänder
4896f2deb7 Replace Ion Cannon sounds with faction speech. 2016-06-19 18:49:23 +02:00
Matthias Mailänder
5cffccb679 Add Death Hand missile launch detected. 2016-06-19 18:48:20 +02:00
Matthias Mailänder
55ed5247cc Replace Death Hand missile sounds with faction speech. 2016-06-19 18:48:07 +02:00
Matthias Mailänder
2f1169b548 Don't null unused fields as they default to null. 2016-06-19 18:47:29 +02:00
Matthias Mailänder
409fe9067a Add speech notification equivalents to support power sounds. 2016-06-19 18:46:05 +02:00
Matthias Mailänder
4c3ff461d4 Add a missing space. 2016-06-19 18:43:42 +02:00
Matthias Mailänder
c8bc819034 Disable the trait instead of nulling the fields. 2016-06-19 18:43:27 +02:00
reaperrr
723c107aa5 Merge pull request #11473 from pchote/shroud-map-crate
Disable hide map crate if explored map is enabled.
2016-06-19 18:32:11 +02:00
reaperrr
e5986788a2 Merge pull request #11396 from Mailaender/sync-projectiles
Speed up sync by only syncing projectiles
2016-06-19 18:22:41 +02:00
reaperrr
6b1adbacc4 Make WithShadow public and upgradable 2016-06-19 15:16:28 +02:00
Paul Chote
4c5d5be583 Merge pull request #11476 from Phrohdoh/ts-manifest-remove-space
Remove spurious space in TS' mod.yaml
2016-06-19 11:14:35 +01:00
Matthias Mailänder
5245df729d Migrate to Open.Nat version 2.0.16
Move the dependency from all libraries to game engine only.
Initialize after the renderer setup to ensure a visible window.
2016-06-19 08:41:14 +02:00
Matthias Mailänder
b70fdd7edc Correct the comment as not all ticking traits are synced. 2016-06-19 08:19:48 +02:00
Taryn Hill
7da8a018e2 Remove spurious space in TS' mod.yaml 2016-06-18 22:19:54 -05:00
reaperrr
38295341a8 Merge pull request #11445 from abcdefg30/emp-support-power
Emp support power take 2
2016-06-18 21:14:01 +02:00
Matthias Mailänder
1b4d7508ef Merge pull request #11475 from obrakmann/fix-redalert.mix-path
Fix path to redalert.mix in ra/mod.yaml
2016-06-18 21:09:08 +02:00
Oliver Brakmann
87df458c2e Merge pull request #11462 from pchote/stream-installer-copy
Extract installer data using direct stream-stream copies
2016-06-18 20:56:26 +02:00
Oliver Brakmann
bf1db4b40c Fix path to redalert.mix in ra/mod.yaml 2016-06-18 20:52:47 +02:00
Oliver Brakmann
64af0f26e9 Merge pull request #11471 from Biofreak1987/fix-smudges
Fix smudges in nod07-nod08 missions
2016-06-18 17:55:31 +02:00
Paul Chote
9edf4be229 Disable hide map crate if explored map is enabled. 2016-06-18 14:18:05 +01:00
Matthias Mailänder
b8415907e4 Merge pull request #11469 from pchote/fix-initial-map-randomization
Fix initial server map randomization.
2016-06-18 14:28:09 +02:00
abcdefg30
4d130892c0 Merge pull request #11461 from pchote/fmv-install-prompt
Prompt FMV installation when trying to play a missing video.
2016-06-18 14:15:10 +02:00
Paul Chote
cf23c85834 Fix Mobile.IsMovingInMyDirection check.
self.Location returns mobile.ToCell, so the old
code would always return a dot product of 0.
2016-06-18 13:07:59 +01:00
Biofreak1987
eaa926887b Fix smudges in nod07-nod08 missions 2016-06-18 14:06:02 +02:00
Paul Chote
e70590fd94 Merge pull request #11460 from reaperrr/fix-e1-damage
Fix damage of RA/TD minigunners and RA Jeep vs. Heavy armor
2016-06-18 12:33:26 +01:00
Paul Chote
5a1766ab5d Merge pull request #11467 from Mailaender/asset-installer-rework-minor-fixes
Fixed some minor issues in the new mod content extraction.
2016-06-18 12:30:55 +01:00
Paul Chote
43b694514d Merge pull request #11347 from abcdefg30/luaSam
Fix the bogus getAirstrikeTarget methods of the nod08 missions
2016-06-18 12:11:08 +01:00
Paul Chote
8a6bc1f6f1 Merge pull request #11308 from reaperrr/fix-11304-IsMoving
Fix IsMoving returning false when activity is a MovePart-derivative
2016-06-18 11:32:51 +01:00
abcdefg30
f619cb774d Merge pull request #11468 from GraionDilach/expose-parachutableinfo
Expose ParachutableInfo.
2016-06-18 12:27:42 +02:00
Paul Chote
55cd2ca8f5 Move initial map suitability calculation to MapCache.
This was previously trying to use values that had
not yet been initialised, which meant that *all*
maps were treated as unsuitable.  This would cause
the mod to always fall back to the first installed
map.
2016-06-18 11:04:37 +01:00
Zimmermann Gyula
58a0e381a5 Expose ParachutableInfo. 2016-06-18 11:37:57 +02:00
Matthias Mailänder
790171ed87 Fix the MIX file ending. 2016-06-18 11:05:29 +02:00
Matthias Mailänder
85bd98fadc Don't forget to mount scores-counterstrike.mix 2016-06-18 10:59:39 +02:00
Oliver Brakmann
ebf3222e06 Merge pull request #11464 from Phrohdoh/miniyaml-dont-strip-empty-lines
Do not remove empty entries in MiniYaml.FromString
2016-06-18 10:19:32 +02:00
Paul Chote
6463b31c99 Add a minimum size threshold for showing progress. 2016-06-17 19:26:13 +01:00
Paul Chote
f1758e9559 Stream installer copy and raw extraction. 2016-06-17 18:53:59 +01:00
Taryn Hill
ee50276c7a Add a new MiniYaml test regarding line numbers 2016-06-17 11:20:43 -05:00
Taryn Hill
ec40623052 Do not remove empty entries in MiniYaml.FromString 2016-06-17 10:38:06 -05:00
Paul Chote
63782aad2e Stream MSCab extraction output. 2016-06-16 21:20:42 +01:00
Paul Chote
a9a5b9bc71 Change Blast.Decompress to use Stream I/O. 2016-06-16 21:20:27 +01: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
Oliver Brakmann
16a18e8de1 Merge pull request #11458 from reaperrr/fix-11457
Fix conflict in ModContentLogic
2016-06-16 19:37:11 +02:00
Paul Chote
bb88507f87 Add an "Install videos" prompt to the mission browser. 2016-06-16 18:32:55 +01:00
Paul Chote
3ac42e1643 Generalise and combine cancel/confirm prompts. 2016-06-16 18:28:02 +01:00
reaperrr
8fb94e3175 Increase RA Jeep MG efficiency vs. heavy armor to 15%
This effectively increases damage per shot vs. heavy armor from 1 to 2, and from 0 to 1 if the target has increased veterancy.
2016-06-16 16:55:21 +02:00
reaperrr
38da537136 Increase RA Minigunner MG efficiency vs. heavy armor to 15%
This effectively increases damage per shot vs. heavy armor from 1 to 2, and from 0 to 1 if the target has increased veterancy.
2016-06-16 16:55:19 +02:00
reaperrr
9d6f41ced8 Increase TD Minigunner MG efficiency vs. heavy armor to 15%
This effectively increases damage per shot vs. heavy armor from 1 to 2, and from 0 to 1 if the target has increased veterancy.
2016-06-16 16:55:18 +02:00
reaperrr
3c2a553f63 Fix conflict in ModContentLogic
The variable would otherwise conflict with the declaration at line 24.
2016-06-16 15:15:28 +02:00
Oliver Brakmann
bc03c199f5 Merge pull request #11375 from pchote/asset-installer-rework
New mod content installer
2016-06-15 22:53:42 +02:00
Oliver Brakmann
8e3415e70e Merge pull request #11436 from Mailaender/nsis-251
Updated NSIS to version 2.51
2016-06-15 22:24:10 +02:00
Paul Chote
b16a5110f4 Use ActorPreviews for WithCargo. 2016-06-15 20:36:25 +01:00
teees
7916a0a55f Copy walker animation frame to generated previews. 2016-06-15 20:36:25 +01:00
Paul Chote
eb5b50185c Add IActorPreviewInitModifier interface. 2016-06-15 20:36:25 +01:00
Paul Chote
970caf38c6 Support dynamic initial turret facings. 2016-06-15 20:36:24 +01:00
teees
4fa3ecfafb Add DynamicFacingInit. 2016-06-15 20:36:23 +01:00
teees
8724ed29bc Support dynamic offsets in ActorPreviews. 2016-06-15 20:36:08 +01:00
teees
b7bf7b6ec0 Move mod-level ActorInits out of the engine. 2016-06-15 20:35:22 +01:00
Paul Chote
4c5429200e Don’t double-notify passenger addition. 2016-06-15 20:35:22 +01:00
Paul Chote
8f412e255d Formatting fixes. 2016-06-14 20:18:57 +01:00
Paul Chote
3585d8afd4 Remove legacy installation logic. 2016-06-14 20:18:57 +01:00
Paul Chote
0b97a81616 Remove legacy music installer. 2016-06-14 20:18:56 +01:00
Paul Chote
27699ce3d7 Add new content installer metadata to TS. 2016-06-14 20:18:56 +01:00
Paul Chote
d2d15f6980 Add new content installer metadata to RA. 2016-06-14 20:18:56 +01:00
Paul Chote
6f4d168d9e Add new content installer metadata to D2k. 2016-06-14 20:18:56 +01:00
abcdefg30
b898e810bb Use INotifyCreated instead of INotifyAddedToWorld in AttackOrderPower 2016-06-14 20:18:51 +02:00
abcdefg30
1ea0607548 Support faction specific speech sounds 2016-06-14 20:18:50 +02:00
abcdefg30
c2c07d2451 Add Requires<AttackBaseInfo> to AttackOrderPowerInfo 2016-06-14 20:18:49 +02:00
abcdefg30
de14264ead Use the new INotifyBurstComplete interface instead of INotifyAttack 2016-06-14 20:18:48 +02:00
teees
ea4f33123e Use AttackOrderPower for EMP support power 2016-06-14 20:18:47 +02:00
teees
86eabeea3f Add AttackOrderPower as Supportpower 2016-06-14 20:18:44 +02:00
Paul Chote
009bdf98e6 Add new content installer metadata to TD. 2016-06-14 18:27:24 +01:00
Paul Chote
ff147f39b9 Add new content installer framework. 2016-06-14 18:27:24 +01:00
Paul Chote
054b3a43a4 Add a lightweight MSCab parser. 2016-06-14 18:27:24 +01:00
Paul Chote
bd3096f21b Add command to dump Mix contents. 2016-06-14 18:15:03 +01:00
Paul Chote
92ea404b0b Add command to dump InstallShield contents. 2016-06-14 18:15:03 +01:00
Paul Chote
67d6de91e3 Allow custom BorderWidths on ScrollPanelWidget. 2016-06-14 18:15:02 +01:00
Paul Chote
90468974ce Add tooltip support to ImageWidget. 2016-06-14 18:15:02 +01:00
Paul Chote
88768031a5 Add BecameVisible and BecameHidden methods to ChromeLogic. 2016-06-14 18:15:02 +01:00
Curtis Shmyr
f05c537491 Merge pull request #11447 from obrakmann/fix11446_fix-disabled-aa-tracking-targets
Fix disabled AA gun continuing to track targets
2016-06-13 18:08:51 -06:00
Oliver Brakmann
79fa3f731e Merge pull request #11435 from reaperrr/remove-rotoroverlay
Remove WithSpriteRotorOverlay
2016-06-13 21:59:32 +02:00
Matthias Mailänder
34c6aa79ab Merge pull request #11450 from cjshmyr/serverlaunch
Make launch-dedicated scripts consistent between platforms
2016-06-13 20:31:29 +02:00
Matthias Mailänder
fa864f55bf Move IonCannon and NukeLaunch into Projectiles folders. 2016-06-13 14:35:32 +02:00
Matthias Mailänder
71743b3b4a Only sync projectiles and future synced effects. 2016-06-13 14:35:28 +02:00
Curtis Shmyr
348d49cd5b Merge pull request #11404 from obrakmann/fix11246_getexternalip-nres
Fix NREs in LobbyUtils.GetExternalIP
2016-06-12 13:52:18 -06:00
Curtis Shmyr
b85f1e9555 Make launch-dedicated scripts consistent between platforms 2016-06-12 13:10:14 -06:00
Oliver Brakmann
3edc4da15c Fix disabled AA gun continuing to track targets 2016-06-12 18:01:04 +02:00
abcdefg30
d97d02b97f Merge pull request #11407 from reaperrr/ts-infantry-tweaks
Various TS infantry fixes
2016-06-12 14:42:12 +02:00
reaperrr
46229a50b4 Add explosion sound to TS explosion inf death 2016-06-12 14:25:34 +02:00
reaperrr
4c69fecad5 Make TS inf death sequences descriptive 2016-06-12 14:25:33 +02:00
reaperrr
ce73faaa1f Change WithDeathAnimation to look up string rather than integers
For DeathType sequence mapping.
2016-06-12 14:25:31 +02:00
reaperrr
873e2bfce4 Fix Tiberium and Vein DamageTypes 2016-06-12 14:25:30 +02:00
reaperrr
b84e27ef98 Remove TS Headshot DeathType
Also fixed a couple of mistakes compared to the original (some weapons still applied the wrong death type).
2016-06-12 14:25:28 +02:00
reaperrr
0947e7bdd6 Introduce ExplosionOnDamageTransition
And use it for TS cyborgs.
2016-06-12 14:25:26 +02:00
reaperrr
ff8af828a3 Fix Cyborgs to stay slow after losing their legs
Even if regaining health.
2016-06-12 14:25:25 +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
reaperrr
9def6b0f70 Merge pull request #11211 from Mailaender/debugcustomterrain
Added a CustomTerrainDebugOverlay
2016-06-12 11:53:47 +02:00
Matthias Mailänder
87b829e767 Merge pull request #11434 from GraionDilach/withvoxelwater-to-upgradeonterrain
Replace WithVoxelWaterBody with UpgradeOnTerrain.
2016-06-12 11:10:38 +02:00
Matthias Mailänder
c239b2f9be Merge pull request #9334 from Mailaender/editor-categories
Add support for EditorTemplateOrder auto-generation
2016-06-11 19:59:28 +02:00
Matthias Mailänder
c403345fed Update NSIS to version 2.51
Use Chocolatey to install since we don't require custom plugins.
2016-06-11 19:44:16 +02:00
Matthias Mailänder
f771ead7a9 Remove unused NsProcess.zip 2016-06-11 19:35:52 +02:00
Matthias Mailänder
cce10fed6b Merge pull request #11368 from Biofreak1987/nod07c
Add nod07c
2016-06-11 19:17:15 +02:00
Matthias Mailänder
e9f3d26047 Add a tileset metadata header auto-generation. 2016-06-11 19:05:03 +02:00
Matthias Mailänder
ccd4c99f8f Merge pull request #11367 from reaperrr/ts-misc-polish
Fixed various offsets in TS
2016-06-11 19:01:23 +02:00
Zimmermann Gyula
a08f325321 Deprecate WithVoxelWaterBody. 2016-06-11 18:01:39 +02:00
Zimmermann Gyula
f069326143 Use UpgradeOnTerrain in the TS APC setup. 2016-06-11 18:01:38 +02:00
Matthias Mailänder
f772ff5034 Merge pull request #11397 from reaperrr/add-moebius
Add Moebius, Chan and Delphi to TD
2016-06-11 17:59:19 +02:00
Matthias Mailänder
9332e16003 Merge pull request #11424 from GraionDilach/center-primarybuilding
Polish the TS PrimaryBuilding decoration.
2016-06-11 17:54:22 +02:00
Matthias Mailänder
4253b2d866 Merge pull request #11410 from abcdefg30/voxelNull
Fix possible NREs in RenderAsync in VoxelRenderer.cs
2016-06-11 17:52:20 +02:00
Paul Chote
d112590a82 Merge pull request #11421 from Mailaender/appveyor-pandoc-fix
Fixed the AppVeyor build
2016-06-11 16:47:18 +01:00
reaperrr
1adf887c75 Remove WithSpriteRotorOverlay
This is now redundant as WithIdleOverlay + upgrades can be used to completely replicate its functionality.
2016-06-11 17:43:10 +02:00
reaperrr
a6f6080df2 Replace WithSpriteRotorOverlay with WithIdleOverlay in OpenRA mods
In preparation of removing the now-redundant WithSpriteRotorOverlay trait.
2016-06-11 17:43:08 +02:00
Matthias Mailänder
5002cbc858 Pandoc is now installed into a system path. 2016-06-11 17:39:33 +02:00
reaperrr
b1e331e7ec Merge pull request #11364 from pchote/lobby-trait-options
Unhardcode the lobby options backend.
2016-06-11 13:40:09 +02:00
reaperrr
c516aec7a3 Merge pull request #11422 from GraionDilach/expose-teslazap-duration
Expose TeslaZap duration to yaml.
2016-06-11 13:10:12 +02:00
reaperrr
b90fc43c0d Merge pull request #11423 from GraionDilach/infiltrateforcash-maximum
Add a maximum limit to InfiltrateForCash.
2016-06-11 13:04:07 +02:00
reaperrr
239f51e8b2 Merge pull request #11406 from Mailaender/upgrademanager-exception
Added an error message when setting up upgrades without UpgradeManager
2016-06-11 12:59:59 +02:00
Zimmermann Gyula
736d58bd9a Add a maximum limit to InfiltrateForCash. 2016-06-10 18:32:49 +02:00
Zimmermann Gyula
6ef45d8f5c Change the TS Primary notif's palette to the AllowModifiers: false variant. 2016-06-10 16:24:55 +02:00
Zimmermann Gyula
1269d573ab Shift TS Primary Building tag from top to center. 2016-06-10 16:17:20 +02:00
Oliver Brakmann
0c5799cd1b Merge pull request #11411 from r34ch/flak-ground
Change RA flak truck to use flak explosion animation vs ground targets
2016-06-10 15:28:43 +02:00
Zimmermann Gyula
dfdeb81c14 Expose TeslaZap duration to yaml. 2016-06-10 13:22:58 +02:00
Biofreak1987
fc9b9ae19a Add nod07c 2016-06-08 20:32:58 +02:00
abcdefg30
aa53ff2b29 Fix possible NREs in RenderAsync in VoxelRenderer.cs 2016-06-08 18:36:22 +02:00
Matthias Mailänder
89cefbea50 Allow map imports from directories other than game root. 2016-06-07 22:03:48 +02:00
Matthias Mailänder
d76a344ebe Give hard-coded special case waypoints a descriptive name. 2016-06-07 22:03:46 +02:00
Matthias Mailänder
a3af1d91cc Don't add mpspawns when importing single-player maps. 2016-06-07 22:03:04 +02:00
D'Arcy Rush
b681f64ec4 Change RA flak truck to use flak explosion animation vs ground targets 2016-06-06 21:25:55 +01:00
Matthias Mailänder
9b6e15ea78 Add a CustomTerrain debug overlay. 2016-06-06 19:25:37 +02:00
abcdefg30
ad9fac57a3 Merge pull request #11408 from r34ch/incendiary-weapons
V2s and barrels can now ignite trees
2016-06-05 21:36:08 +02:00
reaperrr
225f777eaf Make Cyborgs explode regardless of death type
Also split out death-related traits of all non-cyborg infantry to a separate inheritable default.
2016-06-05 21:24:05 +02:00
reaperrr
3455d98289 Refactored TS infantry sequences
They now make heavy use of inheritance to cut down duplication. Most infantry in TS uses the Minigunner (E1) sequences, only that some frames are empty (civ2 shoot animation, for example) or used for a different purpose (panic anims for civilians, crippled legs for cyborgs).

To make this inheritance a bit easier, the attack sequences were renamed to a generic 'attack', rather than 'shoot' or 'throw', and split off to a separate abstract default inherited only by infantry with valid attack frames.
2016-06-05 21:24:03 +02:00
D'Arcy Rush
60441765aa V2s and barrels can now ignite trees 2016-06-05 20:05:43 +01:00
reaperrr
f8421fd2f8 Remove obsolete custom electro.shp
This shp was originally used to work around a palette issue with the original file inside conquer.mix, but since then we actually made it use the correct palette, without removing this converted shp. In other words, removing this file fixes the colors of the Zapped infantry death.
2016-06-05 19:07:31 +02:00
Matthias Mailänder
3b27975b33 Also check for a missing UpgradeManager trait
as optional upgrades will otherwise be silently non-functional.
2016-06-05 17:37:36 +02:00
Matthias Mailänder
bec879cf7c Don't check modulare actor templates
as the inherited combinations of the actors are of concern.
2016-06-05 17:36:32 +02:00
Paul Chote
e70b27f857 Merge pull request #11391 from Mailaender/flameguy
Added the FLAMEGUY death animation
2016-06-05 15:20:15 +01:00
Matthias Mailänder
af56bdef94 Explode the cyborgs to avoid glitchy no leg transitions. 2016-06-05 16:02:09 +02:00
reaperrr
5f30883cf5 Merge pull request #11399 from obrakmann/resize-td-missionbrowser
Resize TD mission browser
2016-06-05 15:57:12 +02:00
Oliver Brakmann
c0dd7c3182 Fix NREs in LobbyUtils.GetExternalIP 2016-06-05 12:55:00 +02:00
Oliver Brakmann
1168e4b3c4 Add map numbers to TD mission titles
Also made capitalization in titles consistent
2016-06-05 11:55:51 +02:00
Matthias Mailänder
6cc7a21629 Add FLAMEGUY. 2016-06-05 00:35:42 +02:00
Oliver Brakmann
65a5bd4e89 Resize the Tiberian Dawn mission browser dialog 2016-06-05 00:13:46 +02:00
reaperrr
9f8261514a Merge pull request #11090 from Mailaender/gdi07
Added Tiberian Dawn mission GDI 07
2016-06-04 22:59:09 +02:00
reaperrr
2de84253b5 Merge pull request #11398 from obrakmann/inotifyfiredsalvo
Added INotifyBurstComplete interface
2016-06-04 22:54:54 +02:00
teees
524bc3d45f Added INotifyBurstComplete trait interface to notify when a full salvo has been fired 2016-06-04 22:33:28 +02:00
reaperrr
f35338e88b Fix some style issues in Mobile 2016-06-04 21:44:48 +02:00
reaperrr
adc76638e5 Add Delphi, Chan and Moebius to TD 2016-06-04 21:39:14 +02:00
reaperrr
e9428ddab5 Move TD civ attack traits to separate default
To avoid having to disable several traits for unarmed civilians.
2016-06-04 21:30:09 +02:00
reaperrr
5c23dad2e3 Fix civilian voices in TD
Only civilians 3, 4 and 5 are females.
2016-06-04 21:15:45 +02:00
reaperrr
37c0feb2e8 Clean up TD civilian sequences 2016-06-04 20:58:32 +02:00
Oliver Brakmann
910d04f53d Merge pull request #11395 from pchote/fix-missing-filenames
Set yaml filename when loading from FileSystem.
2016-06-04 18:23:55 +02:00
Oliver Brakmann
8de91be069 Merge pull request #11380 from Mailaender/upgrade-on-terrain
Added UpgradeOnTerrain
2016-06-04 18:16:55 +02:00
Matthias Mailänder
3dc472bb06 Add UpgradeOnTerrain. 2016-06-04 17:42:58 +02:00
reaperrr
099c44f6f9 Remove ActorExtensionsForMove
And use IMove.IsMoving instead.
2016-06-04 16:34:47 +02:00
Paul Chote
b4d1517d0d Set yaml filename when loading from FileSystem. 2016-06-04 15:23:44 +01:00
reaperrr
d94d06d87b Merge pull request #11370 from pchote/fix-game-start-events
Fix shellmap UI disappearing prematurely when starting a mission or replay.
2016-06-04 15:41:35 +02:00
Oliver Brakmann
916f2ea2ea Merge pull request #11382 from reaperrr/projectile-streamlining
Moved projectiles to their own namespace and streamlined property names
2016-06-04 15:00:08 +02:00
Oliver Brakmann
fa3264affc Merge pull request #11381 from reaperrr/cleanup-upgraderules
Cleaned up upgrade rules
2016-06-04 14:43:15 +02:00
reaperrr
3adb0dc4cd Merge pull request #11377 from Mailaender/ra-burning-trees
Added burning trees to the Red Alert mod
2016-06-04 14:09:11 +02:00
reaperrr
8fc59114da Merge pull request #11337 from r34ch/ra-air-balance
[RA] Buff mig and longbow AG weapons
2016-06-04 13:53:40 +02:00
reaperrr
3f19e7c9de Merge pull request #11374 from obrakmann/fix-koth-capture-notification
Fix calling OnOwnerChange with wrong player in ProximityCapturable
2016-06-04 13:47:51 +02:00
reaperrr
e423f965cf Projectile property names upgrade rules 2016-06-04 12:59:05 +02:00
Paul Chote
bb43d3aec6 Merge pull request #11390 from OmegaBolt/d2k-lynchpass
Add Dune 2000 map Lynch Pass (2 player)
2016-06-04 11:31:53 +01:00
Paul Chote
6d17a7c9a1 Merge pull request #11296 from reaperrr/fix-ai-aggro
Removed dead AI code
2016-06-04 10:56:13 +01:00
Paul Chote
24f166595f Convert lobby dropdowns to new options backend. 2016-06-04 10:06:18 +01:00
Paul Chote
eb884ca76f Convert lobby checkboxes to new options backend. 2016-06-04 10:03:06 +01:00
Paul Chote
3e92c1944a Add plumbing for trait-defined lobby options. 2016-06-04 10:03:06 +01:00
Paul Chote
d27d265bdd Add Id field to ProvidesTechPrerequisite. 2016-06-04 10:03:05 +01:00
OmegaBolt
b698e89c1e Add Dune 2000 map Lynch Pass (2)
updated lynch pass
2016-06-03 19:05:21 +01:00
reaperrr
adc6095f9c Remove the rest of the unused AI Aggro left-overs 2016-06-01 22:48:50 +02:00
reaperrr
f1b8cf117a Remove dead code from HackyAI
Has been unused for three years...
2016-06-01 22:48:50 +02:00
Matthias Mailänder
5154e8b7ad Adjust the rallypoints to avoid overlaps when not giving orders. 2016-05-31 21:11:02 +02:00
Matthias Mailänder
e0e13f6a6a Add GDI mission 7: Finish The Nod Base. 2016-05-31 20:58:04 +02:00
reaperrr
1db96262f3 Make TeslaZap classes public 2016-05-31 15:05:38 +02:00
reaperrr
2e94a23d9e Make LaserZap classes public 2016-05-31 15:05:36 +02:00
reaperrr
af8e81a99d Add random Sequences support to GravityBomb 2016-05-31 15:05:35 +02:00
reaperrr
a320ca89a6 Rename GravityBomb Velocity to Speed
Mostly to make switching between projectiles a little easier for modders, and to potentially save some upgrade rule overhead if sprite projectiles are refactored to share a common code base.
2016-05-31 15:05:33 +02:00
reaperrr
386b142913 Add random sequences support to Missile 2016-05-31 15:05:30 +02:00
reaperrr
3d2855c3b9 Missile description fixes 2016-05-31 15:05:28 +02:00
reaperrr
170fdc89e3 Rename Bullet Trail to TrailImage 2016-05-31 15:05:26 +02:00
reaperrr
df35d60877 Change RangeLimit upgrade rule engine version 2016-05-31 13:51:23 +02:00
reaperrr
b7644df40a Remove upgrade rules older than release 20160508
Modders will have to use release 20160508 to apply upgrade rules written
between release 20151224 and 20160508.
2016-05-31 13:48:59 +02:00
Oliver Brakmann
038a10b676 Merge pull request #11379 from r34ch/fake-sd
[RA] Add the fake SD to France
2016-05-30 22:14:27 +02:00
Matthias Mailänder
e8ee2e2813 Merge pull request #11372 from r34ch/ra-goldmine
[RA] Add operation-goldmine.oramap
2016-05-30 20:01:10 +02:00
Matthias Mailänder
fa788805f9 Merge pull request #11376 from RoosterDragon/selection-perf
Only check for and render selection bars for actors on screen
2016-05-30 19:55:11 +02:00
Matthias Mailänder
1a2851bdaf Merge pull request #11316 from obrakmann/mp-allies02
Add Scott's Allies02 multiplayer mission as "Evacuation"
2016-05-30 19:49:07 +02:00
D'Arcy Rush
b3b355dd6f Add fake service depot. 2016-05-30 15:44:14 +01:00
D'Arcy Rush
fdf5a5293f Reorder fake structures UI layout to match their real counterparts. 2016-05-30 15:27:48 +01:00
D'Arcy Rush
75e75ca7c1 Buff Longbow AA weapon range to match AG range 2016-05-30 10:12:05 +01:00
D'Arcy Rush
d01e58bfd3 Buff mig and longbow AG weapons 2016-05-30 10:12:05 +01:00
D'Arcy Rush
d63bf8f053 Add operation-goldmine.oramap 2016-05-29 23:06:43 +01:00
Matthias Mailänder
b262676b08 Add a missing DESERT cactus to Red Alert. 2016-05-29 23:26:59 +02:00
Matthias Mailänder
a85a8f09c7 Add burning trees to Red Alert. 2016-05-29 23:26:56 +02:00
RoosterDragon
a4949ff1d5 Only check for and render selection bars for actors on screen.
This avoids expensive FogObscures checks and saves drawing selections bars for actors that are offscreen anyway.
2016-05-29 20:57:45 +01:00
Oliver Brakmann
29efba58b9 Merge pull request #11285 from Mailaender/maxmind-geoip-260
Updated to Maxmind GeoIP 2.6.0 and Database reader 2.0.0
2016-05-29 20:43:52 +02:00
Oliver Brakmann
e6dcf3dee6 Fix calling OnOwnerChange with wrong player in ProximityCapturable
The actor's owner only gets changed in an end frame task queued by `Actor.ChangeOwner`. So during this frame end task, `self.Owner` still points to the old owner, whereas we want the new one, represented by `captor.Owner`.

This bug lead to the capture notification being played when *losing* a building, but not when actually capturing it.
2016-05-29 20:33:34 +02:00
Oliver Brakmann
363d47f08b Merge pull request #11194 from abcdefg30/providesTech
Fix ProvidesPrerequisite not refreshing the tech tree (on owner change)
2016-05-29 20:30:23 +02:00
reaperrr
fcec4eb4b5 Fixed InitialFacings of TS defenses to match original 2016-05-29 19:00:24 +02:00
Oliver Brakmann
97ad5268b8 Merge pull request #11241 from Mailaender/replay-flag-crash
Fixed a crash when replay is selected in the wrong mod
2016-05-29 17:55:53 +02:00
Oliver Brakmann
7681cb2df5 Merge pull request #11180 from Mailaender/burning-trees
Added burning trees to the Tiberian Dawn mod
2016-05-29 15:32:28 +02:00
Oliver Brakmann
b3dd62b891 Add Scott's Allies02 multiplayer mission as "Evacuation" 2016-05-29 15:13:09 +02:00
reaperrr
8ee019a80a Fix Nod SAM Site sequence and armament offsets
The turret sequence in particular was located too far to the left.
2016-05-28 22:16:37 +02:00
reaperrr
f29904d77a Set firing offset and enable muzzle flash on TS Titan 2016-05-28 22:16:36 +02:00
reaperrr
f419b00cc6 Fix TS stealth tank firing offsets 2016-05-28 22:16:30 +02:00
reaperrr
805ffaa480 Fix TS Temple of Nod art offset 2016-05-28 22:16:28 +02:00
reaperrr
0d3500ee2f Fix Component Tower weapon and muzzle offsets 2016-05-28 22:16:27 +02:00
Paul Chote
ec2d883e9e Move lobby event unbinding to Dispose. 2016-05-28 18:21:44 +01:00
Paul Chote
fba509b363 Use BeforeGameStart to remove replay browser UI on game start. 2016-05-28 18:16:18 +01:00
Paul Chote
485e695585 Use BeforeGameStart to remove mission browser UI on game start. 2016-05-28 18:13:09 +01:00
Oliver Brakmann
3225ab7c99 Merge pull request #11369 from pchote/fix-gate-powerdown
Remove CanPowerDown from gates.
2016-05-28 18:57:25 +02:00
Paul Chote
ddf7c2c967 Merge pull request #11328 from reaperrr/td-polish
Some TD polishing
2016-05-28 17:37:45 +01:00
Paul Chote
09e110c007 Remove CanPowerDown from gates. 2016-05-28 17:19:18 +01:00
Matthias Mailänder
d1022671c0 Define the reverse playback at sequence level. 2016-05-28 16:03:19 +02:00
Matthias Mailänder
13cf193640 Lint check for invalid building footprint definitions. 2016-05-28 16:03:19 +02:00
Matthias Mailänder
99c7989ebc Rename WithSmoke into a more generic WithDamageOverlay trait.
Rename Sequence parameter to Image to avoid confusion.
2016-05-28 16:03:13 +02:00
Matthias Mailänder
65a2e155bf Update to Maxmind GeoIP 2.6.0 and Db parser 2.0.0 2016-05-28 15:57:08 +02:00
Matthias Mailänder
2567d59af4 Let TD trees burn and carbonate on incendiary weapons. 2016-05-28 15:41:27 +02:00
Matthias Mailänder
e0b77a8517 Add configurable DamageState/Type filters to WithSmoke. 2016-05-28 15:41:27 +02:00
reaperrr
e34c8f0650 Bullet style and description fixes 2016-05-28 15:01:28 +02:00
reaperrr
fef4f3eb79 Move projectiles to their own namespace and folder
While they are (currently) technically effects, this makes the actual purpose and wiki more clear.
2016-05-28 14:42:33 +02:00
RoosterDragon
773eb25917 Merge pull request #10630 from reaperrr/UAN-custom-pos
Make UpgradeActorsNear vertical range customizable
2016-05-28 13:37:09 +01:00
abcdefg30
b08d6e0447 Merge pull request #11363 from RoosterDragon/vs
Allow VS2015 to format solution file
2016-05-27 19:26:36 +02:00
RoosterDragon
7cb353b5c5 Allow Visual Studio to format solution file. 2016-05-27 18:11:13 +01:00
reaperrr
629f17b430 Merge pull request #11294 from Mailaender/generic-demolition
Renamed C4Demolition to Demolition
2016-05-26 23:23:49 +02:00
reaperrr
2fe91cd1a2 Make vertical range of UpgradeActorsNear customizable 2016-05-26 22:47:48 +02:00
reaperrr
dca26b71f4 Add VerticalLength and VerticalLengthSquared
For possible future use.
2016-05-26 22:47:47 +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
Matthias Mailänder
b6afc765b4 Merge pull request #11306 from Biofreak1987/nod09
Add nod09
2016-05-26 20:37:29 +02:00
Matthias Mailänder
d787f40388 Merge pull request #11142 from abcdefg30/captureOld
Add support for playing a "LoseNotification" to the old owner through CaptureNotification
2016-05-26 19:57:58 +02:00
Matthias Mailänder
2a27c329c5 Merge pull request #11276 from reaperrr/fix-ticktank-autotarget
Fix AutoTarget handling of multiple/upgradable Attack* traits
2016-05-26 19:44:13 +02:00
Matthias Mailänder
4d12040348 Merge pull request #11358 from reaperrr/game-to-common2
Moved some more things from Game to Mods.Common
2016-05-26 19:31:12 +02:00
Matthias Mailänder
6803de9539 Make the cursor configurable and expose it to Trait docs. 2016-05-26 19:28:38 +02:00
Matthias Mailänder
3e011a74af Rename C4Demolition to Demolition. 2016-05-26 19:27:40 +02:00
reaperrr
95795c5198 Move EditorTilesetFilter to Mods.Common 2016-05-26 11:54:48 +02:00
reaperrr
e7517e7bfa Moved DrawLineToTarget from Game to Mods.Common 2016-05-26 11:38:39 +02:00
reaperrr
54891ed4bd Moved RejectsOrders and ValidateOrder from Game to Mods.Common 2016-05-26 11:37:39 +02:00
reaperrr
bdb7c80f42 Moved FlashTarget to Mods.Common
There is nothing remaining in OpenRA.Game using this.
2016-05-26 08:16:22 +02:00
reaperrr
b254d5fa88 Merge pull request #11348 from reaperrr/clean-effects
Remove redundant Effects
2016-05-26 07:52:12 +02:00
Oliver Brakmann
1b35882821 Merge pull request #11356 from GraionDilach/parach-shadow-nullcheck
Do not try to tick undefined parachute shadows.
2016-05-25 20:40:01 +02:00
Zimmermann Gyula
785f883d41 Do not try to tick undefined parachute shadows. 2016-05-25 12:50:24 +02:00
Oliver Brakmann
86620888fd Merge pull request #11183 from Mailaender/query-device-nre
Fixed a NullReferenceException in OpenAL QueryDevices
2016-05-24 21:47:02 +02:00
Oliver Brakmann
363a15f0b5 Merge pull request #11354 from abcdefg30/mapcs
Fix a wrong string.Format index in the Map ctor
2016-05-24 21:27:08 +02:00
abcdefg30
72ce367522 Fix a wrong string.Format index in the Map ctor 2016-05-24 21:01:01 +02:00
abcdefg30
42821a31a0 Merge pull request #10613 from Mailaender/ra-gates
Added Gates to the Red Alert mod
2016-05-23 23:57:51 +02:00
reaperrr
122035c36c Remove Smoke effect and use SpriteEffect instead 2016-05-23 23:57:18 +02:00
reaperrr
555d4f4adc Remove Corpse effect and use SpriteEffect instead 2016-05-23 23:30:51 +02:00
reaperrr
51b88bfbaf Remove Explosion effect and use SpriteEffect instead 2016-05-23 23:30:49 +02:00
reaperrr
6a988fd676 Move WorldInteractionControllerWidget and SpriteEffect to Common 2016-05-23 23:30:48 +02:00
abcdefg30
6637c20c59 Fix the bogus getAirstrikeTarget methods of the nod08 missions
They always searched 6 times even after finding a target.
Now they also account for SAM sites (like in the previous missions).
2016-05-23 22:06:17 +02:00
reaperrr
f8583db0d4 Merge pull request #11342 from abcdefg30/lowShellmap
Fix the creeps actor on the Dune 2000 shellmap being in low power mode
2016-05-23 22:00:05 +02:00
reaperrr
d7b26509af Enable AutoTarget on TS Tick Tank 2016-05-23 20:28:02 +02:00
reaperrr
6089599b3f Make AutoTarget handling of AttackFollow more robust
At least in theory, it's possible for an actor to have multiple AttackFollow traits, or AttackFollow is disabled initially but enabled via upgrade later.
To avoid crashes or other issues, let's play it safe and take the same approach as with AttackBase look-ups.
2016-05-23 20:28:02 +02:00
reaperrr
2a19f66a0e Make AutoTarget able to handle multiple Attack* traits 2016-05-23 20:28:02 +02:00
reaperrr
1b6f67e9ee Improve AutoTarget code readability 2016-05-23 20:28:02 +02:00
reaperrr
d5915431dd Made AutoTarget upgradable 2016-05-23 20:28:02 +02:00
abcdefg30
031b4a81a4 Fix the creeps actor on the Dune 2000 shellmap being in low power mode 2016-05-23 01:12:40 +02:00
abcdefg30
6682a4e97e Merge pull request #11290 from Mailaender/d2k-shellmap-editor-crash
Fixed a crash when loading the Dune 2000 shellmap in the map editor
2016-05-23 01:11:34 +02:00
abcdefg30
7663567dea Merge pull request #11336 from obrakmann/fix11333-mpspawn-owners
Fix mpspawn ownership
2016-05-23 00:38:46 +02:00
Oliver Brakmann
8d3320c0e3 Add a lint check to ensure mpspawns are owned by the world owner 2016-05-22 12:55:35 +02:00
Oliver Brakmann
913f4cf7f0 Fix mpspawn actors not being owned by the world owner 2016-05-22 12:43:57 +02:00
reaperrr
ff4f467a9c Merge pull request #11330 from r34ch/grenadier-slot
Change RA grenadier UI ordering
2016-05-22 11:44:52 +02:00
D'Arcy Rush
56a3237eef Change RA grenadier UI ordering 2016-05-21 20:38:25 +01:00
Oliver Brakmann
6fe126d09d Merge pull request #11329 from Biofreak1987/gdi06-polish
Polish gdi06 commando behaviour
2016-05-21 18:52:36 +02:00
Biofreak1987
2d91ff93d4 Polish gdi06 commando behaviour 2016-05-21 14:47:13 +02:00
Oliver Brakmann
392dd7db3f Merge pull request #11112 from reaperrr/improve-LeavesTrails
Add facings support and other controls to LeavesTrails
2016-05-21 12:36:13 +02:00
Biofreak1987
3f8f688918 Add nod09 2016-05-21 01:16:36 +02:00
reaperrr
dbd7606667 Move SpriteEffect facing parameter to the end
To avoid potential incompatibilities with downstream projects.
2016-05-20 23:24:33 +02:00
Matthias Mailänder
f22bc68d94 Count the string length in the system codepage. 2016-05-20 21:22:12 +02:00
Matthias Mailänder
1df5e556c6 Auto-detect UTF8 instead of assuming ANSI for device names. 2016-05-20 21:22:10 +02:00
Matthias Mailänder
e47383a4fa Fix NREs in QueryDevices by bailing out early. 2016-05-20 21:21:52 +02:00
Oliver Brakmann
149271f71e Merge pull request #11291 from reaperrr/fix-10111-para
Some WithParachute fixes
2016-05-20 20:18:53 +02:00
Oliver Brakmann
ab3de743a1 Merge pull request #11327 from reaperrr/ts-cleanup
Make TS not load unnecessary mix files
2016-05-20 20:10:34 +02:00
reaperrr
60557e59f1 Merge pull request #11284 from Mailaender/net-4-eol
Updated to .NET version 4.5
2016-05-20 15:30:57 +02:00
reaperrr
f3d869c939 Polished TD shellmap
- Nod now uses the singleplayer color scheme. While not directly visible, you can at least guess now that units use the correct color.
- Fixed position of a wall piece (was placed on a bib) and both tiberium trees (by moving them 1 cell down)
- Made all Nod Gun turrets face in a plausible direction
2016-05-20 15:11:20 +02:00
reaperrr
9a5db590be Fixed TD infantry death animations
For death by bullet and death by dinosaur.
This is how it was in the original.
2016-05-20 14:47:28 +02:00
reaperrr
840e5e7a4c Tweaked GDI01 Gunboat and turret damage
Made clear that the BoatMissile warhead is an additional bonus rather than an override, reduced the bonus damage and increased gun turret reload delay.
Overall, this makes the Gunboat and turrets behave a bit more like in the original.
2016-05-20 14:29:01 +02:00
reaperrr
c9f339b724 Change TD Gunboat missile to behave more like in the original
Much more inaccurate, slightly higher BurstDelay and lower horizontal turn rate.
2016-05-20 14:08:26 +02:00
reaperrr
9915f34c99 Reduce turret TurnSpeed on TD Gunboat
So it looks a bit more like in the original.
2016-05-20 14:06:28 +02:00
reaperrr
3cc9706ac4 Set high TurnSpeed on TD Gunboat
So it doesn't get stuck at map edge for over a second.
2016-05-20 14:05:52 +02:00
reaperrr
2c07dfbbb7 Make TS not load unnecessary mix files
gmenu.mix only contains the menu orverride from Patch 2.0/Firestorm, maps0*.mix only contain singleplayer maps, multi.mix only contains multiplayer maps, patch.mix only contains ini files.
None of these are used or even usable directly by OpenRA as-is, so it's pointless to load them.
2016-05-20 13:50:40 +02:00
Oliver Brakmann
ebba7fdaf1 Add methods to retrieve player stats to Lua API 2016-05-19 23:08:01 +02:00
Oliver Brakmann
09d1dacd95 Add a Lua API method to randomize a collection 2016-05-19 23:08:01 +02:00
Oliver Brakmann
735975057d Add another way to call air strikes/paradrops to the Lua API 2016-05-19 23:08:01 +02:00
Oliver Brakmann
d743c23482 Add missing Requires to MissionObjectiveProperties 2016-05-19 23:08:01 +02:00
Oliver Brakmann
5d2445a234 Fix winstate logic for cooperative games 2016-05-19 23:08:01 +02:00
Oliver Brakmann
0192919501 Fix crash in Beacon ctor when it runs during instead of between ticks
Causes an exception like below, for example when calling the Lua API's Beacon.New() method.

``Exception of type `System.InvalidOperationException`: Collection was modified; enumeration operation may not execute.``
2016-05-19 23:08:01 +02:00
Matthias Mailänder
5029ac705f Update to .NET 4.5 2016-05-19 21:24:21 +02:00
Oliver Brakmann
b4664d1ec5 Merge pull request #11192 from reaperrr/fix-effectwh
Fix direct hit check in CreateEffectWarhead
2016-05-18 21:52:30 +02:00
reaperrr
6e7bce9571 Merge pull request #11275 from obrakmann/fix11256-deb-build-reqs
Add libmono-i18n4.0-all to the list of Debian package dependencies
2016-05-18 18:38:45 +02:00
reaperrr
d7650e6d51 Merge pull request #11293 from reaperrr/d2k-polish1
Some D2k polishing
2016-05-18 18:06:28 +02:00
Oliver Brakmann
8319dfa70e Merge pull request #11298 from Mykogen/fix-queue-batching
Shift+hotkey queues 5 units for production. Fixes #5544
2016-05-16 21:35:53 +02:00
reaperrr
644e3cf95d Merge pull request #11303 from Biofreak1987/ship-tooltip
Add generic tooltip name for td ships
2016-05-16 21:27:36 +02:00
reaperrr
64c059fd82 Merge pull request #11118 from viszkoktamas/bleed
Add hotkeys for moving viewport to map edge
2016-05-16 21:21:19 +02:00
Tamás Viszkok
522e937597 Hotkeys for move viewport to map edge 2016-05-16 20:26:59 +02:00
reaperrr
874a9adc31 Merge pull request #11283 from Biofreak1987/nod08b
Add nod08b
2016-05-16 20:19:08 +02:00
reaperrr
9707cd9be9 Merge pull request #11299 from reaperrr/dmgstate-upgrade
Introduce trait granting upgrades at specified DamageStates
2016-05-16 20:00:53 +02:00
Oliver Brakmann
89599af5b2 Merge pull request #11292 from reaperrr/fix-v2-explosion
Fix exploding V2RL sound
2016-05-16 19:57:13 +02:00
Biofreak1987
c14fb32dae Add generic tooltip name for td ships 2016-05-16 19:39:41 +02:00
reaperrr
407a061c0a Merge pull request #11176 from pchote/lobby-trait-checkbox-prep
Query lobby checkbox state via their owning traits.
2016-05-16 19:00:35 +02:00
reaperrr
9cca92942e Merge pull request #11130 from viszkoktamas/viewportBookmark
Add hotkeys for save areas of the map
2016-05-16 18:37:56 +02:00
reaperrr
af30f6b3ad Merge pull request #11302 from Biofreak1987/ship-explosion
Add ship explosions to td mod
2016-05-16 18:32:04 +02:00
Biofreak1987
1477da7ff0 Add ship explosions to td mod 2016-05-16 16:26:41 +02:00
reaperrr
b327f6a3b2 Make vehicles and cyborgs in TS slow down when damaged
By combining the new UpgradeOnDamage trait with SpeedModifiers.
2016-05-16 14:18:16 +02:00
Viszkok Tamás
a89376daf0 Added hotkeys for save areas of the map 2016-05-16 14:01:49 +02:00
Biofreak1987
9ed0e6584f Add nod08b 2016-05-16 08:57:19 +02:00
reaperrr
d03eaaaac0 Introduce UpgradeOnDamage trait 2016-05-16 02:41:12 +02:00
reaperrr
dcd057d032 Make DamageStates flags 2016-05-16 02:41:10 +02:00
Mykogen
2bbbdbeedb Shift+hotkey queues 5 units for production. Fixes #5544 2016-05-16 00:02:00 +02:00
reaperrr
2444491fc6 Fix exploding V2RL sound
You could here the 'Report' of the V2 weapon when the launcher exploded. Added V2-exclusive explosion weapon to fix that.
2016-05-15 20:58:02 +02:00
Matthias Mailänder
b5eb537f2d Remove trailing tabs. 2016-05-15 19:48:07 +02:00
Matthias Mailänder
4209d52c4c Define the concrete slabs as terrain rather than actors. 2016-05-15 16:40:15 +02:00
reaperrr
cee5ec4754 Give large D2k missiles a ballistic flight curve 2016-05-15 16:38:34 +02:00
reaperrr
2c7fe90532 Use 'true' instead of 'yes' on all D2k booleans 2016-05-15 16:38:02 +02:00
reaperrr
974eb5aa86 Fix facings of D2k grenadier stand sequence 2016-05-15 16:34:58 +02:00
Matthias Mailänder
fc523ae953 Print actor information instead of the function name. 2016-05-15 16:21:32 +02:00
Matthias Mailänder
3c7871b352 Add actor name to ease debugging of invalid bounds. 2016-05-15 16:21:32 +02:00
reaperrr
41a53d8ed0 Merge pull request #11243 from Mailaender/elegant-lasers
Polished the Tiberian Sun laser weaponry
2016-05-15 16:17:24 +02:00
reaperrr
51194059b3 Fix WithParachute shadow position on elevated terrain 2016-05-15 16:05:15 +02:00
reaperrr
c2f537a43d Move parachute shadow anim ticking from Render to Tick 2016-05-15 16:04:01 +02:00
reaperrr
a670ea4bad Remove ITraitInfo from WithParachuteInfo
ITraitInfo is already implemented by UpgradableTraitInfo, so this was redundant.
2016-05-15 16:00:51 +02:00
Matthias Mailänder
53c1222ce2 Avoid the 0c prefix for laser beam width. 2016-05-15 15:56:50 +02:00
Matthias Mailänder
8fcb31407d Add gates to the Red Alert mod. 2016-05-15 15:52:11 +02:00
Matthias Mailänder
0d500f4bb2 Merge pull request #11270 from reaperrr/fix-td-fieldcrash
Make FrozenUnderFog footprint include '_'
2016-05-15 15:40:08 +02:00
reaperrr
95a927a181 Merge pull request #11272 from r34ch/cold-front-fix
Cold front fix
2016-05-15 15:17:16 +02:00
reaperrr
e59c7a8b1f Make FrozenUnderFog count passable footprint cells
To avoid crashing on actors with only passable footprint cells.
2016-05-15 14:56:08 +02:00
Matthias Mailänder
b4cbb52d27 Merge pull request #11206 from evgeniysergeev/spatial
SpatiallyPartitioned fixup for d2
2016-05-15 14:46:53 +02:00
reaperrr
c201558023 Merge pull request #10714 from Mailaender/import-rules
Added basic RA2/TS mod rules importers
2016-05-15 14:46:24 +02:00
Matthias Mailänder
060eca8c50 Merge pull request #11288 from reaperrr/fix-reloading-sound
Play reload sounds only to owner
2016-05-15 14:20:41 +02:00
reaperrr
794db5a2f1 Play reload sounds only to owner 2016-05-15 13:53:21 +02:00
Matthias Mailänder
b9ed065328 add captureable, infantry emitting on sell and transformation 2016-05-15 11:46:46 +02:00
Matthias Mailänder
6b1dc60d2e invisible, 0x0 foundation and sprite image auto-detection 2016-05-15 11:46:46 +02:00
Matthias Mailänder
26c0f1ebc0 terrain palette auto detection 2016-05-15 11:46:46 +02:00
Matthias Mailänder
ee482fee29 very basic building and tree support 2016-05-15 11:46:46 +02:00
Matthias Mailänder
0fc73cbe3c Merge pull request #11280 from Biofreak1987/nod08a
Add nod08a
2016-05-15 09:35:18 +02:00
Biofreak1987
e9195d3a36 Add nod08a 2016-05-15 09:04:17 +02:00
abcdefg30
2865c833eb Merge pull request #11281 from Biofreak1987/nod07fix
Replace nod07 music and fix codestyle
2016-05-14 20:51:09 +02:00
Biofreak1987
53d08e9376 Replace nod07 music and fix codestyle 2016-05-14 20:08:58 +02:00
Paul Chote
35af6b5b91 Apply minor style fixes to DeveloperMode. 2016-05-14 18:54:44 +01:00
Paul Chote
0a7c80ef6e Prepare short game code for trait-defined lobby options. 2016-05-14 18:54:44 +01:00
Paul Chote
e3bc73a168 Prepare ally build adjacency code for trait-defined lobby options. 2016-05-14 18:54:44 +01:00
Paul Chote
c412e4e86c Prepare MapCreeps code for trait-defined lobby options. 2016-05-14 18:54:44 +01:00
Paul Chote
7e49ae7eb0 Prepare DeveloperMode code for trait-defined lobby options. 2016-05-14 18:54:44 +01:00
Paul Chote
1eba0bea13 Prepare Shroud code for trait-defined lobby options. 2016-05-14 18:54:44 +01:00
Paul Chote
a0b5b5ce66 Move initial map exploration to Shroud. 2016-05-14 18:54:44 +01:00
Paul Chote
dade84db85 Remove leftover dead fragile alliances code. 2016-05-14 18:54:44 +01:00
Oliver Brakmann
3e8309974a Merge pull request #11278 from reaperrr/gps-fixup
Hotfix for GpsPower
2016-05-14 17:14:31 +02:00
reaperrr
7e312bab0a Hotfix for GpsPower
Radar namespace was created after the last rebase of #11018.
2016-05-14 16:43:42 +02:00
reaperrr
b9c026d545 Merge pull request #11018 from Mailaender/gps-disable
Fixed GPS power not taking tech center disablement into account
2016-05-14 16:31:34 +02:00
Matthias Mailänder
61385fabd1 Merge pull request #11257 from HenrytheSlav/c4lockup
Buildings get locked by Demolishable activity before their destruction
2016-05-14 13:50:35 +02:00
D'Arcy Rush
0e5dd08c21 Remove erroneous ore cells from dual-cold-front.oramap 2016-05-14 12:07:24 +01:00
D'Arcy Rush
8ebd885145 Rename cold-front 1v1 to match ingame name 2016-05-14 12:04:07 +01:00
Oliver Brakmann
bd8d754b0c Add libmono-i18n4.0-all to the list of Debian package dependencies 2016-05-14 12:23:09 +02:00
HenrytheSlav
a9bb79c0a8 Buildings get locked by Demolishable activity nefore their destruction 2016-05-14 11:23:21 +02:00
Matthias Mailänder
531570fdb7 Merge pull request #11271 from cjshmyr/slnfix
Fix nod07b Lua script paths
2016-05-14 08:43:49 +02:00
Curtis Shmyr
1144803767 Fix nod07b Lua script paths 2016-05-13 17:56:07 -06:00
reaperrr
f31ea658ef Merge pull request #11148 from pchote/improve-scroll-input
Expose separate middle and right mouse scroll config.
2016-05-13 22:44:18 +02:00
Matthias Mailänder
54c30175e2 Merge pull request #11253 from HenrytheSlav/demotruck_air_nerf
Reduce effectiveness of demo truck against air targets
Closes #10865
2016-05-13 18:59:18 +02:00
Matthias Mailänder
67d04b26fd Merge pull request #11254 from HenrytheSlav/harv_selfheal
Add slow selfealing to the harvester (RA mod)
2016-05-13 18:56:34 +02:00
Oliver Brakmann
7abe20ac43 Merge pull request #11250 from abcdefg30/byeInitAct
Remove the last relicts of InitialActivity
2016-05-11 20:57:44 +02:00
evgeniysergeev
7e7b3f505d SpatiallyPartitioned fixup for d2
BoundsToBinRowsAndCols fixup for negative width or height

Using Math.Min and Math.Max utils instead of '?:'
2016-05-10 22:39:46 +03:00
HenrytheSlav
4c97bd1323 Add slow selfealing to the harvester (RA mod) 2016-05-10 21:17:01 +02:00
HenrytheSlav
aedd135c45 Reduce effectiveness of demo truck against air targets 2016-05-10 20:52:40 +02:00
abcdefg30
304c9b9ed1 Remove the last relicts of InitialActivity 2016-05-10 18:33:57 +02:00
abcdefg30
34a2033350 Merge pull request #11249 from cjshmyr/arty
Reduce RA Artillery range from 14 to 12 cells
2016-05-10 18:11:21 +02:00
abcdefg30
22ee4d1f39 Merge pull request #11186 from Mailaender/map-import-tileset
Made the legacy map import more robust
2016-05-10 18:03:16 +02:00
Matthias Mailänder
43eed07fae Merge pull request #11245 from reaperrr/fix-gtwr-make
Skip TD guard tower make anim frames containing yellow color
2016-05-09 20:43:47 +02:00
Matthias Mailänder
15a58378cb Merge pull request #11242 from Mailaender/ts-ai
Update the Tiberian Sun AI
2016-05-09 19:59:28 +02:00
reaperrr
9b16ac6bf1 Skip TD guard tower make frames 18 and 19
Those frames are yellow but not remapable. Skipping them is easier than fixing the art.
2016-05-08 21:03:22 +02:00
Matthias Mailänder
5d32b65a9c Decrease the width of all laser weapons. 2016-05-08 20:34:05 +02:00
Matthias Mailänder
33198f4da4 Add transparency to the sonic beam. 2016-05-08 20:33:19 +02:00
Matthias Mailänder
aea521815c Update the Tiberian Sun AI. 2016-05-08 20:19:41 +02:00
Matthias Mailänder
3b7a176aa6 Don't crash when a faction flag from another mod doesn't exist. 2016-05-08 16:02:23 +02:00
reaperrr
bd2a24af55 Merge pull request #11223 from Mailaender/missile-dead
Cleaned up logically dead Missile code.
2016-05-08 14:09:27 +02:00
abcdefg30
4fbb3334bf Merge pull request #11238 from obrakmann/fix-globalchat-nre
Fix a spurious NRE in GlobalChat
2016-05-08 14:02:12 +02:00
reaperrr
eb6157f81e Merge pull request #11197 from pchote/add-sysinfo-opt-out-prompt
Add sysinfo opt out prompt
2016-05-08 13:10:55 +02:00
Oliver Brakmann
d049413c26 Fix a spurious NRE in GlobalChat 2016-05-08 12:35:50 +02:00
Matthias Mailänder
763c097498 Merge pull request #11235 from Biofreak1987/nod07b
TD Campaign: Add nod07b - "Sick And Dying (b)
2016-05-08 12:03:39 +02:00
Biofreak1987
b14080cff4 Add nod07b 2016-05-07 17:56:25 +02:00
Paul Chote
bd7e53bec4 Merge pull request #11234 from obrakmann/fix11218-spawnactorondeath-dispose-race
Fix trait lookup of destroyed actor in SpawnActorOnDeath
2016-05-07 15:58:20 +01:00
Matthias Mailänder
5462097c42 Merge pull request #11205 from reaperrr/rangelimit-wdist
Refactored Missile.RangeLimit to be a WDist value
2016-05-07 15:10:49 +02:00
Oliver Brakmann
35dfb54459 Fix trait lookup of destroyed actor in SpawnActorOnDeath
The sequence of events leading to that crash looks like this:

1. Truk enters a building.

2. `Enter.FindAndTransitionToNextState()` is running, and since `DonateSupplies` uses `EnterBehaviour.Dispose`, `Actor.Dispose()` runs for the actor, queueing a FrameEndTask.

3. Truk is then killed:

 * `Health.InflictDamage()` first calls `SpawnActorOnDeath.Killed()`, which queues a FrameEndTask during which some trait lookups happen.

 * `Health.InflightDamage()` then calls `Actor.Dispose()` as well, queueing another FrameEndTask (which will never run, the game crashes before).

4. After the tick, the first FrameEndTask disposes of the actor. The second FrameEndTask would spawn the crate from the truk, but the trait lookups then fail and throw an exception.
2016-05-07 14:21:41 +02:00
Matthias Mailänder
834295fb22 Merge pull request #11228 from pchote/appdata-about-fix
Update appdata description using text from the website About page.
2016-05-07 13:52:37 +02:00
Matthias Mailänder
11a54896c1 Merge pull request #11094 from Biofreak1987/nod07a
TD Campaign: Add nod07a - "Sick And Dying (a)"
2016-05-07 13:47:21 +02:00
Matthias Mailänder
690a6b715e Merge pull request #11233 from abcdefg30/yellow
Add TheRaffy to AUTHORS
2016-05-07 13:30:05 +02:00
abcdefg30
c92792e8bd Add TheRaffy to AUTHORS 2016-05-07 13:01:55 +02:00
Paul Chote
1180e7e519 Merge pull request #11225 from obrakmann/fix11219_oil-derrick-tooltip-owner-row
Re-instate owner row for oil pumps and tech buildings in TD
2016-05-07 10:42:30 +01:00
Paul Chote
cf4ef11403 Merge pull request #11232 from abcdefg30/navalRepair
Fix possible instant repairs by spamming Repair activities
2016-05-07 10:30:57 +01:00
reaperrr
5505595a79 Merge pull request #11226 from abcdefg30/03bTruk
Fix the supply truck in allies03b not being targetable by tanya
2016-05-07 11:01:15 +02:00
reaperrr
f2a0332f8d Merge pull request #11231 from abcdefg30/trukPreq
Fix the prerequisite of the supply truck being displayed
2016-05-07 10:47:30 +02:00
Oliver Brakmann
4f206eb1dc Merge pull request #11227 from HenrytheSlav/upstream/utility-facing-fix
Fixes Utility import facings mirror-flip
2016-05-06 23:42:40 +02:00
Oliver Brakmann
79d5498dfc Re-instate owner row for oil pumps and tech buildings in TD 2016-05-06 22:50:16 +02:00
abcdefg30
25b1c991a2 Fix possible instant repairs by spamming Repair activities
Noticeable when spam-clicking on a naval yard/sub pen.
2016-05-06 17:51:24 +02:00
abcdefg30
94fc26f268 Fix the prerequisite of the supply truck being displayed
We don't do this for other units that only require a war factory (like the light tank or ranger) either.
2016-05-06 17:09:53 +02:00
Paul Chote
122fb62a76 Update appdata description using text from the website About page. 2016-05-05 21:56:13 +01:00
HenrytheSlav
1962ea3abc Fixes Utility import facings mirror-flip 2016-05-05 18:44:23 +02:00
abcdefg30
5a424936b1 Fix the supply truck in allies03b not being targetable by tanya 2016-05-05 16:13:32 +02:00
abcdefg30
f80449be31 Merge pull request #11215 from obrakmann/mod-campaign-rules
Extract common campaign rules for d2k and ra
2016-05-05 15:53:21 +02:00
Oliver Brakmann
3cdbb1f700 Make use of common mission rules in missions (D2K) 2016-05-05 13:02:08 +02:00
Oliver Brakmann
32b063d8e0 Extract common mission rules into a separate file (D2K) 2016-05-05 13:02:08 +02:00
Oliver Brakmann
4787bc04b3 Make use of common mission rules in missions (RA) 2016-05-05 13:02:08 +02:00
Oliver Brakmann
26571e18d3 Extract common mission rules into separate files (RA) 2016-05-05 13:02:03 +02:00
abcdefg30
089c8261ad Merge pull request #11217 from obrakmann/fix-selfheal-percentage
Fix self-healing percentage in yaml rules for all mods
2016-05-05 12:47:19 +02:00
Oliver Brakmann
987da71c1d Merge pull request #11222 from HenrytheSlav/theli_gems
Allow Chinook to land/deploy on gems
2016-05-05 12:21:34 +02:00
Matthias Mailänder
3d865d46e7 Removed logically dead code.
targetPassedBy is always true in this section
and - times - is +.
2016-05-05 10:19:38 +02:00
HenrytheSlav
b958c8302d Allow Chinook to land/deploy on gems 2016-05-04 23:06:36 +02:00
Matthias Mailänder
1bc4200128 Merge pull request #11136 from SzabKel/musicButtons
Added music controlling hotkeys. Closes #3231
2016-05-03 07:16:05 +02:00
Matthias Mailänder
891c5d9937 Merge pull request #11168 from reaperrr/hitshape-offsets
Add support for custom vertical HitShape offsets
2016-05-03 07:12:49 +02:00
Curtis Shmyr
43136e218a Reduce RA Arty range from 14 to 12 cells 2016-05-02 15:59:12 -06:00
Matthias Mailänder
b00e9cf615 Merge pull request #11216 from abcdefg30/supportBeacon
Make the circle and arrow sequences of Beacon optional
2016-05-02 22:27:12 +02:00
Oliver Brakmann
a8e6ca14ab Fix self-healing percentage in yaml rules for all mods 2016-05-02 19:05:48 +02:00
abcdefg30
c3c29ee7a2 Make the circle and arrow sequences of Beacon optional 2016-05-02 17:23:17 +02:00
reaperrr
62aabffed9 Make LeavesTrails loop through a list of offsets
Instead of the unflexible 'AlternateOffset' approach.
2016-05-01 23:01:07 +02:00
reaperrr
04d075ca9f Add control over whether trails should spawn with or without delay 2016-05-01 23:01:07 +02:00
reaperrr
866e0b3577 Add facings support, start delay and offset controls to LeavesTrails 2016-05-01 23:01:07 +02:00
reaperrr
ca7a17ea06 Add facings support to SpriteEffect 2016-05-01 23:01:07 +02:00
Matthias Mailänder
6af7fa412c Simplify tunnel top sequences. 2016-05-01 15:46:25 +02:00
reaperrr
f6907cc42f Lint check for missile RangeLimit 2016-05-01 14:27:50 +02:00
reaperrr
249e65c7d1 RangeLimit WDist refactor upgrade rules 2016-05-01 14:27:49 +02:00
Oliver Brakmann
e781bf3e0d Merge pull request #10918 from Mailaender/lint-beacon
Added documentation and lint checks to PlaceBeacon
2016-05-01 13:55:04 +02:00
Matthias Mailänder
6a9b8e81f4 Don't expose palettes and sprites to Lua. 2016-05-01 12:29:39 +02:00
Matthias Mailänder
4e9a48d253 Summarize the rendering parts to generate a beacon. 2016-05-01 12:29:39 +02:00
Matthias Mailänder
a8dd67a231 ParatroopersPower also supports beacons. 2016-05-01 12:29:38 +02:00
Matthias Mailänder
59fbfbc851 Don't enforce beacons to be player palettes. 2016-05-01 12:29:38 +02:00
Matthias Mailänder
9f4cdb9843 Unhardcode player beacons for documentation and lint testing. 2016-05-01 12:27:02 +02:00
Matthias Mailänder
76124b7c79 Unhardcode beacon sprites for documentation and lint testing. 2016-05-01 12:21:13 +02:00
Matthias Mailänder
d4fdb97c35 Throw with a less generic KeyNotFoundException on error. 2016-05-01 12:19:19 +02:00
Matthias Mailänder
d826cd6247 Fix case issues like Temperat vs TEMPERAT during map import. 2016-05-01 12:18:26 +02:00
reaperrr
1258ddde7f Refactored Missile.RangeLimit from ticks to WDist
Changed default from 'unlimited' fuel to weapon range.
2016-04-30 16:02:15 +02:00
Oliver Brakmann
cc9f84f136 Merge pull request #11199 from reaperrr/fix-para-nre
Fix potential NRE in Parachutable
2016-04-30 13:53:04 +02:00
abcdefg30
8c80b61897 Fix the tech tree not refreshing properly on owner change 2016-04-30 13:15:51 +02:00
abcdefg30
a9ec325765 Merge pull request #11202 from GraionDilach/fix-ts-visceroids
Fix visceroids not spawning in TS.
2016-04-30 11:53:46 +02:00
Zimmermann Gyula
48d5164314 Fix visceroids not spawning in TS. 2016-04-29 19:37:32 +02:00
reaperrr
58ba25cc17 Merge pull request #10813 from Mailaender/vein-damage
Added damaging through Veins.
2016-04-29 13:28:58 +02:00
reaperrr
262cf087fc Merge pull request #11172 from pchote/cargo-turret
Fix a crash when multi-turreted units leave a transport.
2016-04-29 12:57:04 +02:00
reaperrr
b87b2c010f Fix potential NRE in Parachutable 2016-04-29 12:56:05 +02:00
Paul Chote
21989acd28 Fix a crash when multi-turreted units leave a transport. 2016-04-29 04:05:33 +01:00
reaperrr
fdbe3c7ba6 Merge pull request #11196 from GraionDilach/halven-destroyer-closeenough
Halven CloseEnough on Stinger.
2016-04-28 14:11:45 +02:00
Paul Chote
25a1c0c283 Include version/mod/modversion in the game list query. 2016-04-27 23:06:21 +01:00
Paul Chote
98faa15d62 Add an opt-out prompt for system information collection. 2016-04-27 22:14:26 +01:00
Zimmermann Gyula
66d0c72968 Increase Stinger RangeLimit from 50 to 65.
With the 170 Speed, the Stinger can pass a maximum of 50*170 = 8500 (8c308) world units, while having a range of 9c0, which mean it runs out of fuel before it reaches it's effective maximum range. To prevent this, RangeLimit has been increased to 65 (9c0*1.25/170 is 67.8, rounded downwards).
2016-04-27 21:51:48 +02:00
Oliver Brakmann
b28caf6564 Merge pull request #11179 from reaperrr/minor-perf-fixes
Minor trait caching tweaks
2016-04-27 20:38:02 +02:00
Zimmermann Gyula
af36214e41 Halven CloseEnough on Stinger.
With 170 Speed, 298 CloseEnough, and 128 Spread, it will always act as a proximity weapon against the targets. Other missiles aren't affected because all the other missiles have a fair margin to satisfy the optimal Speed+Spread > CloseEnough condition.
2016-04-27 18:29:50 +02:00
Oliver Brakmann
ee82a8c3a9 Merge pull request #10756 from Mailaender/ts-beacon
Added the Tiberian Sun beacon
2016-04-26 21:28:22 +02:00
Oliver Brakmann
0ba288d66b Merge pull request #11182 from Mailaender/modchooser-button-loadsound-fail
Fixed mod chooser spamming sound.log with file not found messages
2016-04-26 21:11:41 +02:00
reaperrr
10dc6ca85c CreateEffectWarhead.TargetSearchRadius lint check 2016-04-26 19:47:22 +02:00
reaperrr
3aa811bd2e Rename 'unit' to 'victim' in CEWH's GetDirectHit check 2016-04-26 19:47:21 +02:00
reaperrr
fe7fe9b49b Fix CreateEffectWarhead's HitShape distance check
Originally, this was comparing distance beween pos and unit.CenterPosition with HitShape's OuterRadius. However, the OuterRadius can exceed the shape for Capsule and Rectangular shapes, so I tried to adress that a few months ago by using the DistanceFromEdge check instead. The approach was bogus, though. DistanceFromEdge just calculates the distance of a position to the edge, so by comparing it with the distance between pos and victim.CenterPosition in combination with using LengthSquared, it was entirely possible the explosion would be within the HitShape, but closer to the edge than the victim.CenterPosition and the check would return false.
Now we just check if DistanceFromEdge is 0 or negative, which means the impact is inside the HitShape.
2016-04-26 19:47:20 +02:00
reaperrr
3a8a8110be Extend CreateEffectWarhead's GetDirectHit to scan a WDist radius for hits
Instead of only the impact cell.
2016-04-26 19:47:18 +02:00
Matthias Mailänder
92e9cf2819 Add the Tiberian Sun beacon animation. 2016-04-24 23:28:29 +02:00
reaperrr
a268b5a048 TEST COMMIT
Gives TS infantry and walls hit shapes vertical top offset.
2016-04-24 20:47:57 +02:00
reaperrr
72c580b708 Add top and bottom offsets to HitShapes 2016-04-24 20:47:56 +02:00
Matthias Mailänder
083dd97611 Don't reference non-existing sounds in the mod chooser. 2016-04-24 20:42:46 +02:00
reaperrr
c6b09ef228 Cache ResourceLayer in PoisonedByTiberium ctor
Instead of every few ticks.
2016-04-24 20:14:37 +02:00
reaperrr
828dc61b67 Use already cached mobile in MobileProperties.Scatter 2016-04-24 20:12:51 +02:00
reaperrr
b497869993 Cache IMove in Repairable's ctor
Instead of looking it up on every repair order.
2016-04-24 20:12:49 +02:00
Oliver Brakmann
23e5889a70 Merge pull request #11167 from pchote/fix-gps-satellite-palette
Fix GPS satellite palette.
2016-04-24 13:17:26 +02:00
Oliver Brakmann
d88f8d348b Merge pull request #11174 from reaperrr/fix-11173
Disable OwnerRow on TD and RA map props
2016-04-24 12:59:27 +02:00
Paul Chote
b245e6e128 Merge pull request #11163 from reaperrr/fix-11056
Fix Creeps not considering players as enemies on some TD maps
2016-04-24 11:51:49 +01:00
reaperrr
83631f3b4d Disable OwnerRow on RA trees, rocks, bridges and crates 2016-04-24 01:10:32 +02:00
reaperrr
1f078cc364 Disable OwnerRow on TD bridges, destroyed fields and crates 2016-04-24 01:07:36 +02:00
reaperrr
6701420851 Disabled OwnerRow on TD trees, tib trees and rocks 2016-04-24 00:55:04 +02:00
reaperrr
b25f8ff4b0 Fixed owner of some trees on Lessons from Kosovo and Treasure Island
They're owned by Neutral instead of Creeps now.
2016-04-24 00:54:36 +02:00
Oliver Brakmann
eae96738b9 Merge pull request #11170 from pchote/fix-missiles-again
Fix missile facing check.
2016-04-23 23:02:58 +02:00
Paul Chote
59f5e24189 Simplify and fix missile turnaround facing check. 2016-04-23 17:14:56 +01:00
reaperrr
6f876e7441 Fix Creeps enemy config on RA conquest maps 2016-04-23 16:42:33 +02:00
reaperrr
8bb2574e21 Fixed Creeps on non-Conquest RA maps 2016-04-23 16:42:31 +02:00
Matthias Mailänder
fb53890636 Merge pull request #11144 from pchote/fix-start-game-frozen-explored-map
Generate frozen actor renderables for all map-placed actors.
2016-04-23 16:26:27 +02:00
Matthias Mailänder
a0fa5ad1bd Merge pull request #11166 from pchote/fix-gps-tooltips
Only refresh tooltip/health status of revealed frozen actors.
2016-04-23 16:13:05 +02:00
reaperrr
863772675b Merge pull request #11165 from pchote/fix-missile-flip
Fix missile facing check.
2016-04-23 15:15:59 +02:00
Paul Chote
d70356b47f Fix GPS satellite palette. 2016-04-23 14:10:54 +01:00
Oliver Brakmann
ea5009393f Merge pull request #10777 from reaperrr/fix-missile-cruise
Fix missiles not moving to CruiseAltitude if launched above it
2016-04-23 15:04:54 +02:00
reaperrr
5ad89f90a5 Give RA MiG missiles a higher CruiseAltitude 2016-04-23 14:50:36 +02:00
reaperrr
3dcb7bc02b Fix missiles not moving to CruiseAltitude if launched above it 2016-04-23 14:50:35 +02:00
Paul Chote
13cfd3699d Fix missile facing check. 2016-04-23 13:37:08 +01:00
Paul Chote
0b4a8d9a13 Only refresh tooltip/health status of revealed frozen actors. 2016-04-23 13:07:53 +01:00
abcdefg30
a717ab6763 Merge pull request #11135 from obrakmann/fix11127_zoom-pxldbl-interaction
Fix PixelDoubling not working properly after zooming with mousewheel
2016-04-23 11:55:53 +02:00
reaperrr
f1f8cc8763 Fix Creeps on Llamas 2 not seeing Multi4 and Multi5 as enemies 2016-04-22 23:15:55 +02:00
Oliver Brakmann
3b2a5e2dbc Merge pull request #11162 from reaperrr/fix-11159
Enable Targetable to handle multiple Cloak traits
2016-04-22 22:15:06 +02:00
RoosterDragon
28b8850936 Merge pull request #11160 from pchote/remove-td-concrete
Remove unused Concrete armor type from TD weapons.
2016-04-22 19:27:53 +01:00
reaperrr
521a8a66d2 Enable Targetable to handle multiple Cloak traits 2016-04-22 13:01:02 +02:00
reaperrr
b28f588733 Merge pull request #11124 from pchote/tileset-depth
Add tileset depth metadata support.
2016-04-21 22:59:42 +02:00
reaperrr
5b1b0f1494 Fix Creeps not seeing players as enemies on some TD maps 2016-04-21 22:13:08 +02:00
Oliver Brakmann
77ba2b4f13 Fix PixelDoubling not working properly after zooming with mousewheel
I decided to write it this way (instead of setting `Game.Settings.Graphics.PixelDouble` in `Viewport.Zoom` appropriately) because I see the double pixel setting as the user's preference that the game uses at the start of a match and which should not be changed only because the user decided to zoom in a bit.
2016-04-21 22:04:39 +02:00
Oliver Brakmann
c8a9936b6c Merge pull request #11161 from pchote/fix-td-replay-timer
Fix replay timer.
2016-04-21 21:17:22 +02:00
Oliver Brakmann
4858ae7132 Merge pull request #11157 from abcdefg30/d2kWalls
Fix the debris spawned when walls are destroyed in d2k
2016-04-21 21:04:18 +02:00
Paul Chote
a8350783fc Fix game timer when adjusting replay speed. 2016-04-21 17:52:47 +01:00
Paul Chote
0eb446fb7d Remove unused Concrete armour type. 2016-04-21 17:30:07 +01:00
Paul Chote
8807a79c4a Add tile depth metadata to TS tileset yaml. 2016-04-21 17:23:09 +01:00
Paul Chote
756d2428d9 Add depth support to TileSet. 2016-04-21 17:23:08 +01:00
Paul Chote
08100dc49b Fix initial render state for walls. 2016-04-21 17:21:29 +01:00
Paul Chote
183e5ae7ab Generate initial frozen renderables for all map-placed actors. 2016-04-21 17:21:29 +01:00
reaperrr
8bd8e8aa56 Merge pull request #11154 from obrakmann/fix11055_targetable-cloaked-units
Fix looking up un-required trait in Targetable ctor
2016-04-21 13:02:38 +02:00
reaperrr
65f8b9f63b Merge pull request #11141 from Mailaender/missile-targetedPassedBy
Removed redundant targetPassedBy check.
2016-04-21 12:30:14 +02:00
reaperrr
d82ff3412c Merge pull request #11137 from Mailaender/deadcode-healthradiuscheck
Removed unnecessary null checks in CheckTargetHealthRadius
2016-04-21 12:29:40 +02:00
abcdefg30
e23d8f25a9 Fix the debris spawned when walls are destroyed in d2k 2016-04-20 21:03:48 +02:00
Oliver Brakmann
728de3b55f Merge pull request #11151 from abcdefg30/tanyaIdle
Fix the length of the idle2 sequence of tanya
2016-04-20 20:44:09 +02:00
abcdefg30
8c244574d1 Merge pull request #11086 from Phrohdoh/ts-marn-shellmap
Add Marn's Shellmap "Fields of Green" to TS
2016-04-20 20:42:12 +02:00
Oliver Brakmann
eb2d7016b5 Merge pull request #11152 from abcdefg30/lobbyNote
Fix reselecting a dropdown option in the lobby causing a server message
2016-04-20 20:34:40 +02:00
Taryn Hill
3e40be47f7 Remove gdi4a from TS 2016-04-20 13:18:17 -05:00
Taryn Hill
1bb2aa3522 Add Marn's Shellmap "Fields of Green" to TS 2016-04-20 13:18:15 -05:00
abcdefg30
7a13fb189c Merge pull request #11153 from RoosterDragon/selection-fast-checks
Use Contains method on Selection when possible.
2016-04-20 17:50:45 +02:00
Oliver Brakmann
357d50679c Fix looking up un-required trait in Targetable ctor 2016-04-19 22:39:36 +02:00
RoosterDragon
178fcfaf8c Use Contains method on Selection when possible.
This allows the set to be utilized for a fast check, rather than degrading to a linear search via LINQ.
2016-04-19 21:19:36 +01:00
abcdefg30
ea68fbdd7c Fix reselecting a dropdown option in the lobby causing a server message 2016-04-19 20:49:57 +02:00
abcdefg30
4b7edf6947 Fix the length of the idle2 sequence of tanya 2016-04-19 20:28:03 +02:00
Oliver Brakmann
d7f140d5a3 Merge pull request #11146 from pchote/fix-spawn-reordering
Preserve editor actor ordering.
2016-04-18 20:10:04 +02:00
Matthias Mailänder
b5b190f0fa Merge pull request #11145 from pchote/storm-light-level
Increase ambient light level in Fort Lonestar and GDI06.
2016-04-18 15:32:50 +02:00
Matthias Mailänder
2c3ceb1630 Merge pull request #11111 from reaperrr/fix-td-engprio
Remove custom TD & D2k engineer selection priority
2016-04-18 15:28:36 +02:00
Matthias Mailänder
6f151d8096 Merge pull request #11084 from cjshmyr/chatprefix
Move Spectators & Team chat labels before player nickname
2016-04-18 15:23:17 +02:00
Matthias Mailänder
7795e4f524 Add damaging through Veins. 2016-04-18 08:46:04 +02:00
Matthias Mailänder
133a0f54a3 Check for invalid targets to avoid crashing. 2016-04-18 08:46:04 +02:00
Matthias Mailänder
27888715de Have vehicles avoid veins. 2016-04-18 08:45:41 +02:00
Matthias Mailänder
99b072ddce Have infantry avoid Tiberium. 2016-04-18 08:44:27 +02:00
Paul Chote
9d02c53638 Expose separate middle and right mouse scroll config. 2016-04-17 21:27:20 -04:00
Paul Chote
c68ef3d25f Preserve editor actor order. 2016-04-17 20:25:20 -04:00
Paul Chote
39ddf29a8d Increase ambient light level in gdi06. 2016-04-17 20:07:12 -04:00
Paul Chote
03913ef768 Increase ambient light level in fort lonestar. 2016-04-17 20:07:05 -04: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
Oliver Brakmann
2051976f5b Merge pull request #11138 from Mailaender/dispose-xccdb
Made XccGlobalDatabase disposable
2016-04-17 21:27:49 +02:00
Oliver Brakmann
0df7e2361b Merge pull request #11140 from Mailaender/map-preview-package-nre
Fixed NullReferenceExceptions if package opening fails.
2016-04-17 20:23:59 +02:00
Oliver Brakmann
041be70371 Merge pull request #11139 from Mailaender/upgraderules-parentnull
Fixed NullReferenceExceptions in UpgradeRules
2016-04-17 20:11:11 +02:00
abcdefg30
af3d8d4860 Add support for playing a "LoseNotification" to the old owner through CaptureNotification 2016-04-17 16:17:32 +02:00
szabkel
1b4a42d3d9 Added MusicControllerLogic, now we can handle audio buttons anywhere in the game. 2016-04-17 16:11:42 +02:00
Matthias Mailänder
12543f2f32 Avoid logically dead code. 2016-04-17 16:00:57 +02:00
Matthias Mailänder
48ea9dc300 Fix NRE if package download fails or is corrupted. 2016-04-17 15:57:00 +02:00
abcdefg30
a1d39b0a42 Document the existing fields in CaptureNotificationInfo 2016-04-17 15:29:27 +02:00
abcdefg30
c8cfb10ab1 Reduce the usage of different ways to determine the new owner
We don't need the LocalPlayer check if we only play the sound to the new owner,
and captor.Owner == newOwner in this case.
2016-04-17 15:26:53 +02:00
Matthias Mailänder
3e536a61e6 targetPassedBy is always false here so avoid redundant check. 2016-04-17 14:30:22 +02:00
Matthias Mailänder
62bc2a27d9 Fix NREs in UpgradeRules. 2016-04-17 14:15:49 +02:00
Matthias Mailänder
4719a085bb Dispose global mix database.dat properly. 2016-04-17 14:09:52 +02:00
Matthias Mailänder
bd28445754 Merge pull request #10946 from abcdefg30/lobby-bots
Add a "Lonestar AI" to Fort Lonestar
2016-04-17 11:15:50 +02:00
abcdefg30
78b2ffdee1 Merge pull request #11119 from obrakmann/more-map-churn
More map churn
2016-04-17 11:11:04 +02:00
abcdefg30
3294415e8e Add an "Lonestar AI" to Fort Lonestar 2016-04-17 11:01:26 +02:00
Paul Chote
42504bfa9c Add DummyAI trait for scripted maps. 2016-04-17 11:01:25 +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
Matthias Mailänder
e127ada598 Merge pull request #11098 from pchote/vertex-secondary-texcoords
Replace SheetType.DualIndexed with secondary texture coordinates on Vertex.
2016-04-17 10:22:57 +02:00
Matthias Mailänder
7209bc474d Merge pull request #11120 from teees/fix-barrels
Fix barrel recoil being set immediately, not when actually firing
2016-04-17 09:52:06 +02:00
reaperrr
c7eeb60b5d Removed custom selection priority from D2k engineer 2016-04-17 00:38:05 +02:00
Oliver Brakmann
c2c26cbcdc Merge pull request #11131 from abcdefg30/spyName
Fix the spyplane not having a tooltip ingame
2016-04-16 19:48:21 +02:00
abcdefg30
29a79b6175 Drop "U2" out of the spy planes tooltip 2016-04-16 19:40:49 +02:00
abcdefg30
66568104ec Fix the spyplane not having a tooltip ingame 2016-04-16 19:39:30 +02:00
Paul Chote
d59488d496 Merge pull request #11076 from obrakmann/low-funds-warning-2
Fix issues with the insufficient funds warning
2016-04-16 18:00:40 +01:00
Paul Chote
95a5689b9e Merge pull request #11104 from obrakmann/fix11074-lobby-ready-map-install
Fix ready checkbox in the lobby being unusable after installing a map
2016-04-16 17:42:04 +01:00
reaperrr
a1ce5bd978 Move VeteranProductionIconOverlay to Traits.Render 2016-04-16 14:26:26 +02:00
Paul Chote
5d0990f1c6 Removing remaining SheetType.DualIndexed plumbing. 2016-04-15 16:53:37 -04:00
Paul Chote
3a37551812 Remove SheetType.DualIndexed from terrain rendering. 2016-04-15 16:53:37 -04:00
Paul Chote
b68fee9521 Remove SheetType.DualIndexed from voxel rendering. 2016-04-15 16:46:47 -04:00
Paul Chote
7c67b10d28 Add a secondary texture coordinate to Vertex. 2016-04-15 16:46:47 -04:00
reaperrr
fd5a597966 Move Render traits to Traits.Render namespace 2016-04-15 20:43:04 +02:00
reaperrr
f07a5d6f69 Merge pull request #11091 from pchote/sprite-vertex-depth
Add depth buffer support for sprites.
2016-04-15 15:59:21 +02:00
Paul Chote
e54917a0b2 Fix depth-enabled shroud rendering. 2016-04-15 09:42:29 -04:00
Paul Chote
2915db67c4 Add depth buffer support to sprites and sequences. 2016-04-15 09:42:29 -04:00
Paul Chote
2634643d91 Write z data to the depth buffer. 2016-04-15 09:42:29 -04:00
Paul Chote
ecebb2a844 Change depth function to <=. 2016-04-15 09:42:28 -04:00
teees
3c4d9b4c84 Fix barrel recoil being set immediately, not when actually firing 2016-04-15 14:06:21 +02:00
Oliver Brakmann
1e26a9fa51 Add a bunch of new maps to RA 2016-04-14 21:51:15 +02:00
Oliver Brakmann
2d0e39b9d6 Re-add map Caffeinated to RA 2016-04-14 21:50:51 +02:00
Oliver Brakmann
10748d562e Re-balance a couple of RA maps 2016-04-14 21:50:07 +02:00
Oliver Brakmann
ecb0df6f21 Remove some skirmish maps from RA 2016-04-14 21:14:06 +02:00
abcdefg30
0538f0c66e Merge pull request #11105 from obrakmann/fix11046_subs-not-attackable
Fix submarines not being attackable when surfaced
2016-04-14 17:45:23 +02:00
reaperrr
d1e926e007 Remove custom TD engineer selection priority 2016-04-13 20:37:14 +02:00
Oliver Brakmann
189b94f3a0 Merge pull request #11110 from reaperrr/fix-win-make-check
Remove Platforms.Null from Windows style check
2016-04-13 20:31:32 +02:00
reaperrr
f4d5c1d755 Remove Platforms.Null from Windows style check
Doesn't exist anymore.
2016-04-13 18:35:17 +02:00
Oliver Brakmann
2fbea092bc Fix submarines not being attackable when surfaced
This will also fix the issue of all pre-placed subs playing the submerging sound during the start of a map.
2016-04-12 21:17:04 +02:00
Oliver Brakmann
c68e03366c Merge pull request #11097 from Mailaender/group-sound-traits
Grouped the sound traits together
2016-04-12 18:46:08 +02:00
Oliver Brakmann
b25eb81a42 Fix ready checkbox in the lobby being unusable after installing a map 2016-04-12 18:30:37 +02:00
reaperrr
6239aad070 Merge pull request #11017 from Mailaender/radar-refactor
Grouped the radar traits together
2016-04-12 17:07:01 +02:00
Oliver Brakmann
87eb443121 Add upgrade rule for moving InsufficientFundsWarning logic to PlayerResources 2016-04-11 19:06:18 +02:00
Oliver Brakmann
a8ead3669d Enable the insufficient funds warning in ra, d2k and ts 2016-04-11 19:06:18 +02:00
Oliver Brakmann
87e1acfc9f Re-implement the insufficient funds warning in a simpler manner 2016-04-11 19:06:18 +02:00
Oliver Brakmann
41388b9c63 Revert the previous InsufficientFundsWarning implementation 2016-04-11 19:06:18 +02:00
Biofreak1987
158263c922 Add nod07a
Add nod07a - "Sick And Dying (a)"
2016-04-11 00:26:25 +02:00
Matthias Mailänder
be3ea7b79e Move audio traits into Sounds namespace. 2016-04-10 22:34:10 +02:00
Matthias Mailänder
c4475539a1 Move CaptureNotification into Sounds sub-folder. 2016-04-10 22:33:37 +02:00
abcdefg30
f911a80b04 Merge pull request #11095 from Mailaender/lua-getactors
Added Player.GetActors to the Lua API
2016-04-10 21:32:03 +02:00
Oliver Brakmann
833dbb3e0d Merge pull request #11089 from GraionDilach/ts-debris-fix
Fix TS debris angles.
2016-04-10 21:09:49 +02:00
Matthias Mailänder
f37f1f1e0c Add Player.GetActors to the Lua API. 2016-04-10 19:52:41 +02:00
Matthias Mailänder
18d38f0bad Merge pull request #11065 from abcdefg30/luaMapActors
Add a lua method for querying all actors that are currently InWorld
2016-04-10 18:57:14 +02:00
Matthias Mailänder
3a3be979f3 Merge pull request #11081 from pchote/fix-left-click-orders
Fix left click orders
2016-04-10 17:32:14 +02:00
reaperrr
0861c9f6fa Merge pull request #11058 from pchote/terrain-vertex-depth
Use vertex depths for rendering terrain depth preview.
2016-04-10 16:13:50 +02:00
Oliver Brakmann
94eed2c58f Merge pull request #11088 from pchote/fix-file-headers
Fix outdated file headers.
2016-04-10 16:04:46 +02:00
Paul Chote
7315ffbcb7 Fix outdated file headers. 2016-04-10 09:41:12 -04:00
Paul Chote
dabea59b7d Pass depth scale factors to vertex shaders. 2016-04-10 09:41:01 -04:00
Paul Chote
c00ef40151 Add float3 support to TerrainSpriteLayer. 2016-04-10 09:41:01 -04:00
Paul Chote
19a276da2b Replace float[] with float3 in voxel renderer. 2016-04-10 09:41:01 -04:00
Paul Chote
a8dda39a72 Introduce float3 type. 2016-04-10 09:41:01 -04:00
Oliver Brakmann
aac4820ac7 Merge pull request #11082 from pchote/custom-rule-detection
Fix and improve lobby custom rules warning.
2016-04-10 14:52:06 +02:00
abcdefg30
602d96a8e1 Merge pull request #11079 from obrakmann/fix11040-stats-screen-client-tooltip-crash
Fix several NREs during setup of client tooltips in GameInfoStatsLogic
2016-04-10 12:03:23 +02:00
Curtis Shmyr
6a492035fc Move Spectators and Team chat labels before nicknames 2016-04-09 16:37:35 -06:00
Paul Chote
aa061a5bc6 Whitelist lighting and weather traits. 2016-04-09 13:41:08 -04:00
Paul Chote
923883fad7 Fix and improve custom rule detection. 2016-04-09 13:40:44 -04:00
Paul Chote
acab6f1f4b Fix custom order generators for left-click targeting. 2016-04-09 11:59:54 -04:00
Paul Chote
7a32c8e8e7 Change InputOverridesSelection return values to match name. 2016-04-09 11:24:10 -04:00
Oliver Brakmann
fe02bea521 Fix several NREs during setup of client tooltips in GameInfoStatsLogic 2016-04-09 15:21:17 +02:00
abcdefg30
a95d9cc1fa Replace abused Map.ActorsInBox calls by Map.ActorsInWorld in all cnc missions 2016-04-08 18:01:17 +02:00
abcdefg30
82ff09acda Replace abused Map.ActorsInBox calls by Map.ActorsInWorld in all d2k missions 2016-04-08 17:48:06 +02:00
abcdefg30
29bf2206f0 Remove the now redundant NWIdlePoint waypoint from soviet-05 2016-04-08 17:42:39 +02:00
abcdefg30
2f86f25418 Remove the redundant "set to defend stance" functions
They never even worked properly
2016-04-08 17:38:41 +02:00
abcdefg30
ec602f2090 Replace abused Map.ActorsInBox calls by Map.ActorsInWorld in all ra missions 2016-04-08 17:38:17 +02:00
Zimmermann Gyula
ff82494475 Fix TS debris angles. 2016-04-08 11:10:46 +02:00
abcdefg30
b02a9a188d Add a Utils.Where function to lua for filtering collections 2016-04-08 11:00:19 +02:00
abcdefg30
1c6253c3fb Add a lua method for querying all actors that are currently InWorld 2016-04-07 22:53:13 +02:00
Matthias Mailänder
b49f1439ed Merge pull request #11059 from jaZzKCS/patch-1
Closes #11057
2016-04-06 19:42:38 +02:00
jaZzKCS
c88c1c26bb Update ai.yaml
Enabling AI to build Repair Pad, which is now needed to build the MCV, hence needed for the AI to be able to replace the ConYard when it's gone.
2016-04-06 01:07:20 +02:00
Oliver Brakmann
90902b692e Merge pull request #11053 from reaperrr/fix-emitinf
Fix value of infantry emitted on sell
2016-04-05 22:29:57 +02:00
Matthias Mailänder
231c8ed786 Update GPS satellite player information. 2016-04-05 19:25:19 +02:00
Matthias Mailänder
ec87b18608 Disable GPS dots without active radar. 2016-04-05 19:25:19 +02:00
Matthias Mailänder
a8471d9f54 Disable Gps when tech center is disabled. 2016-04-05 19:25:19 +02:00
reaperrr
fb84dab660 Fix value of infantry emitted on sell 2016-04-05 16:28:33 +02:00
Paul Chote
39cb519c1a Merge pull request #11039 from obrakmann/fix-opening-ro-files-as-rw
Fix opening the scriptwrapper.lua file as read-write
2016-04-03 18:40:01 +01:00
Oliver Brakmann
065066acc4 Fix opening the scriptwrapper.lua file as read-write 2016-04-03 19:31:11 +02:00
Paul Chote
5e0d657ec7 Merge pull request #11038 from obrakmann/upstream/bleed
Fix palette used for flare in TD
2016-04-03 17:44:41 +01:00
Paul Chote
0cba0cf3e1 Merge pull request #11035 from obrakmann/fix-allies05a
Fix  issues in allies05a
2016-04-03 17:31:57 +01:00
Oliver Brakmann
cdba6a7a7d Fix palette used for flare in TD 2016-04-03 17:50:44 +02:00
Paul Chote
aed2125ad7 Merge pull request #11036 from abcdefg30/flareTD
Remove the OwnerRow on tooltips of flare in the TD campaign
2016-04-03 16:32:34 +01:00
Oliver Brakmann
0041839872 Merge pull request #11033 from abcdefg30/mrlsFix
Fix the mrls not working
2016-04-03 17:12:33 +02:00
abcdefg30
70509c8f23 Remove the OwnerRow on tooltips of flare in the TD 2016-04-03 17:11:02 +02:00
Oliver Brakmann
16ef67e247 Fix crash in allies05a when the prison is infiltrated 2016-04-03 16:56:48 +02:00
Oliver Brakmann
64c24462d4 Disable air attacks in allies05a for now 2016-04-03 16:53:37 +02:00
abcdefg30
a42b182dce Fix the mrls not working 2016-04-03 16:46:07 +02:00
Oliver Brakmann
8a2f662bd4 Merge pull request #11012 from pchote/fix-missing-music
Add missing music tracks to global mix database.
2016-04-03 13:42:17 +02:00
Oliver Brakmann
9b971075d7 Merge pull request #11029 from pchote/work-around-target-cancel
Fix Turreted units not dropping cancelled targets.
2016-04-03 12:54:48 +02:00
Matthias Mailänder
92c04210f7 Merge pull request #10965 from RoosterDragon/actor-info-ordering
Strengthen trait ordering rules
2016-04-03 12:36:20 +02:00
Matthias Mailänder
d57e53dc53 Merge pull request #10992 from pchote/server-maps
Allow Dedicated Servers to query map info from the Resource Center.
2016-04-03 12:19:41 +02:00
Matthias Mailänder
f5dbca9405 Merge pull request #11028 from pchote/fix-parachutes-again
Fix parachutes in non-heightmapped mods.
2016-04-03 12:14:12 +02:00
Paul Chote
2024f86290 Fix Turreted units not dropping cancelled targets. 2016-04-03 10:22:53 +01:00
Paul Chote
536c00ae77 Fix parachutes in non-heightmapped mods. 2016-04-03 09:25:48 +01:00
dtluna
cf0a4bc21f Added CanUndeploy property. 2016-04-03 02:46:38 +03:00
Oliver Brakmann
a29b9ff7be Merge pull request #11025 from pchote/fix-dedicated-logging
Improve log output on dedicated servers.
2016-04-02 18:30:32 +02:00
Matthias Mailänder
ce7488f457 Merge pull request #11023 from pchote/fix-map-creeps
Respect map creeps configuration.
2016-04-02 18:23:49 +02:00
Matthias Mailänder
0ec6feb7a3 Merge pull request #11024 from pchote/fix-nod-campaign-inf-death
Fix nod infantry death palette in campaigns.
2016-04-02 18:18:25 +02:00
Paul Chote
a79f40bf4b Log all player joins on dedicated servers. 2016-04-02 17:10:00 +01:00
Paul Chote
4b0aa77ce5 Add missing timestamp to dedicated server logs. 2016-04-02 17:09:52 +01:00
Paul Chote
a9c6416d48 Fix nod infantry death palette in campaigns. 2016-04-02 16:07:09 +01:00
Paul Chote
8b29373a7c Respect map creeps configuration. 2016-04-02 15:57:04 +01:00
abcdefg30
ff8c1af80f Merge pull request #11019 from Mailaender/lint-spawn-actors
Added lint testing to SpawnActorPower effect sprite and palette
2016-04-02 16:01:05 +02:00
Matthias Mailänder
9458a74e9c Lint test and SpawnActorPower effect sprite and palette. 2016-04-02 15:12:08 +02:00
abcdefg30
b53e5d46e7 Merge pull request #11002 from HenrytheSlav/pbox_fix
Pillbox/CamPillbox blind spot fix
2016-04-02 14:44:27 +02:00
Matthias Mailänder
a78d67a60c Put radar traits into their own namespace. 2016-04-02 14:36:26 +02:00
Matthias Mailänder
8df7d8b784 Separate JamsRadar into it's own file. 2016-04-02 14:27:12 +02:00
Matthias Mailänder
9b9b3474dd Group radar traits in a sub-folder. 2016-04-02 14:27:12 +02:00
abcdefg30
03b56b0337 Merge pull request #11004 from obrakmann/pr10266_paradrop-production
Paradrop Production
2016-04-02 13:00:47 +02:00
Matthias Mailänder
982fce7a99 Document that PowerManager is a player actor trait. 2016-04-02 13:00:35 +02:00
HenrytheSlav
f6e507f152 Pillbox/CamPillbox blind spot fix 2016-04-02 12:52:18 +02:00
abcdefg30
9064f95bfd Merge pull request #11016 from Phrohdoh/fix-withspritebody
Don't render WithSpriteBody if it is disabled
2016-04-02 12:30:26 +02:00
abcdefg30
d14f027321 Merge pull request #11013 from pchote/confirm-dialog-buttons
Restore two-button prompt for two-button dialogs.
2016-04-02 12:24:32 +02:00
Matthias Mailänder
aa4ffe5bd4 Merge pull request #11015 from abcdefg30/paraGround
Fix paratroopers on heightmapped terrain
2016-04-02 11:46:43 +02:00
Matthias Mailänder
72eea3a746 Merge pull request #10995 from scshunt/allow-empty-refinery-return
Allow empty harvesters to be ordered to refineries
2016-04-02 11:38:19 +02:00
abcdefg30
d9d78715cd Fix paratroopers on heightmapped terrain 2016-04-02 11:36:45 +02:00
Matthias Mailänder
f38d30a1ff Merge pull request #11005 from pchote/server
Extract dedicated server interface to OpenRA.Server.exe
2016-04-02 11:23:17 +02:00
Matthias Mailänder
ab22908fd2 Merge pull request #11008 from pchote/left-click-guard-fix
Fix order generator vs unit targeting under left click orders.
2016-04-02 11:15:09 +02:00
Taryn Hill
c02e6b68a3 Don't render WithSpriteBody if it is disabled 2016-04-01 19:33:12 -05:00
Paul Chote
1fadc8531c Restore two-button prompt for two-button dialogs. 2016-04-01 17:51:44 +01:00
Paul Chote
d6818be229 Add nod_win1.aud and nod_map1.aud to mix database. 2016-04-01 17:22:16 +01:00
Paul Chote
bf61785f96 Remove BinaryReader from XccGlobalDatabase. 2016-04-01 17:21:50 +01:00
Oliver Brakmann
811b2d26fd Merge pull request #11009 from pchote/fix-ts-editor-bounds
Fix northern boundary on new maps.
2016-04-01 17:04:43 +02:00
abcdefg30
985f43ba0d Merge pull request #10989 from Mailaender/empty-chrome-collection
Fixed Could not find collection '' spam in debug.log
2016-04-01 00:37:51 +02:00
abcdefg30
1b8ba71a4f Merge pull request #11006 from pchote/mp-filters
Tweak the multiplayer server listing.
2016-03-31 23:32:55 +02:00
Paul Chote
bad22f0919 Fix northern boundary on new maps. 2016-03-31 21:24:28 +01:00
Paul Chote
8efa7a143e Add ExpectedButton check to GuardOrderGenerator. 2016-03-31 21:11:53 +01:00
Paul Chote
06158ee155 Simplify and fix WICW left-click order check.
The InputOverridesSelection check was inverted.
2016-03-31 21:11:53 +01:00
Paul Chote
6593895ea1 Fix comment typo in LobbyCommands.cs. 2016-03-31 21:08:37 +01:00
Paul Chote
4ec1369553 Let servers query map details from the resource centre. 2016-03-31 21:08:36 +01:00
Paul Chote
65f7d46025 Parse map rules and players from remote maps. 2016-03-31 21:08:36 +01:00
Paul Chote
81f22f8871 Remove Game.RunAfterTick from UpdateRemoteSearch.
RunAfterTick isn't available from the Server.
2016-03-31 21:08:36 +01:00
abcdefg30
95f091853e Merge pull request #10975 from Phrohdoh/trait-taggable
Add ScriptTags trait
2016-03-31 01:09:29 +02:00
Oliver Brakmann
4c8b13ef27 Merge pull request #10917 from abcdefg30/luaClosedCell
Add a ClosestEdgeCell and a ClosestMatchingEdgeCell function to lua
2016-03-31 01:04:01 +02:00
abcdefg30
69181ec8b9 Merge pull request #10959 from Phrohdoh/cargo-scripting
Expose passenger enter/exit notifications to Lua
2016-03-31 00:53:35 +02:00
Oliver Brakmann
9f8599cadc Merge pull request #11001 from dtluna/uncloak_on_dock
Added Dock Uncloak type.
2016-03-31 00:42:51 +02:00
Paul Chote
345f91d3ec Remove the null renderer. 2016-03-30 19:40:19 +01:00
Paul Chote
706d3ae52a Move dedicated server code to OpenRA.Server.exe 2016-03-30 19:26:50 +01:00
Paul Chote
c46faa351c Reorder MP browser ordering:
- Games that can be joined
- Games that are in progress
- Empty servers
2016-03-30 19:05:59 +01:00
Paul Chote
b783dba2ae List started games by default. 2016-03-30 17:56:15 +01:00
Paul Chote
d9b9407925 Persist MP game server filters. 2016-03-30 17:51:47 +01:00
abcdefg30
cec2821f13 Add a ClosestEdgeCell and a ClosestMatchingEdgeCell function to lua 2016-03-30 16:05:10 +02:00
abcdefg30
d907296f4e Make the SpawnMapActors field in MapGlobal.cs readonly 2016-03-30 16:05:10 +02:00
Oliver Brakmann
500216937b Move ProductionFromMapEdge from D2k to Common 2016-03-30 02:46:19 +02:00
Bynnar18
a9ffe0a779 Paradrop Production 2016-03-30 02:46:19 +02:00
dtluna
a20631f475 Added Dock Uncloak type. 2016-03-30 02:45:41 +03:00
Paul Chote
b5c2703eba Pass random to ChooseInitialMap. 2016-03-29 23:46:12 +01:00
Paul Chote
fee899f63d Fix unnecessary uses of Game.ModData. 2016-03-29 23:46:12 +01:00
Paul Chote
2150a5e865 Move ChooseInitialMap to MapCache. 2016-03-29 23:46:11 +01:00
RoosterDragon
36c9558b5f Added some comments to TraitsInConstructOrder. 2016-03-29 23:10:49 +01: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
RoosterDragon
3192432a5c Strengthen ordering of TraitsInConstructOrder.
All types that are dependencies of a trait must now occur before it in the construct ordering. Previously, only one type that was a dependency of a trait needed to occur before it.
2016-03-29 23:10:46 +01:00
RoosterDragon
b3b816fcc6 Improve names and test code in ActorInfoTest. 2016-03-29 23:10:45 +01:00
RoosterDragon
2c15bc9308 Remove dead code in ActorInfoTest. 2016-03-29 22:49:01 +01:00
Taryn Hill
c6265527b2 Expose passenger enter/exit notifications to Lua 2016-03-29 07:00:01 -05:00
Taryn Hill
6d4e365af5 Require explicit implementation of INotifyPassenger(Entered|Exited) 2016-03-29 06:59:43 -05:00
Taryn Hill
6582d0f480 Add ScriptTags trait
This allows actors to be tagged with arbitrary strings.
Also includes ScriptTagsInit and MapGlobal.ActorsWithTag
  which expose this functionality to map scripters.
2016-03-28 16:15:44 -05:00
Matthias Mailänder
728bad9565 Merge pull request #10986 from obrakmann/fix10718-ra-map-rebalancing
Rebalance a number of RA maps
2016-03-28 20:31:03 +02:00
Oliver Brakmann
84dad6dae7 Re-added RA map 'Snowy Ridge' 2016-03-28 19:31:49 +02:00
Oliver Brakmann
a427634517 Rebalanced RA map 'Doubles' 2016-03-28 19:31:49 +02:00
Oliver Brakmann
977df4b67f Rebalanced RA map 'Singles' 2016-03-28 19:31:49 +02:00
Oliver Brakmann
b24e32d8a7 Rebalanced RA map 'Temperal' 2016-03-28 19:31:49 +02:00
Oliver Brakmann
92c285a344 Rebalanced RA map 'Sidestep' 2016-03-28 19:31:49 +02:00
Oliver Brakmann
b31485ffe1 Rebalanced RA map 'North by Northwest' 2016-03-28 19:31:49 +02:00
Oliver Brakmann
87491d3c4f Rebalanced RA map 'Mass Confliction' 2016-03-28 19:31:49 +02:00
Oliver Brakmann
68f4062d42 Rebalanced RA map 'Man to Man' 2016-03-28 19:31:49 +02:00
Oliver Brakmann
b988aefed2 Rebalanced RA map 'Keep off the Grass 2' 2016-03-28 19:31:49 +02:00
Oliver Brakmann
79f567a425 Rebalanced RA map 'High and Low' 2016-03-28 19:31:49 +02:00
Oliver Brakmann
83e52d684f Rebalanced RA map 'Forest Path' 2016-03-28 19:31:48 +02:00
Oliver Brakmann
095339f4cc Rebalanced RA map 'Encounter' 2016-03-28 19:31:48 +02:00
Oliver Brakmann
51e7f007cf Rebalanced RA map 'East vs West' 2016-03-28 19:31:48 +02:00
Oliver Brakmann
704abfad0d Rebalanced RA map 'Chokepoint' 2016-03-28 19:31:48 +02:00
Oliver Brakmann
1453b9d311 Rebalanced RA map 'Asymetric Battle' 2016-03-28 19:31:48 +02:00
Matthias Mailänder
77d4154f95 Merge pull request #10972 from reaperrr/fp-to-int1
Migrated some remaining floats in simulation to integers (and decimals)
2016-03-28 18:45:25 +02:00
Sean Hunt
c18987e293 Allow empty harvesters to be ordered to refineries
The primary reason is to fix OpenRA/ra2#161. Rather than make the
harvester trait more complicated by making this behaviour configurable,
this commit just applies to all harvesters.
2016-03-28 12:44:23 -04:00
Matthias Mailänder
8c502e7958 Merge pull request #10968 from MustaphaTR/fake-pp
RA - Added Fake Power Plants for France
2016-03-28 18:37:06 +02:00
reaperrr
d25d9e3d7e Apply all float removal upgrade rules on the same engine version 2016-03-28 17:29:29 +02:00
reaperrr
33f26e05e1 Use decimal instead of long for WPos offset
To remove overflow risk.
2016-03-28 17:20:49 +02:00
reaperrr
fe23ac7f93 Use decimal instead of float in WVec.LerpQuadratic
To reduce desync risk (without introducing overflow risk).
2016-03-28 17:20:49 +02:00
reaperrr
73ec1ec9b2 Remove float from ReturnToBase.CalculateTurnRadius
141 / PI ~= 44.88, so 45 should be accurate enough. This should reduce desync risk while improving performance of this calculation.
2016-03-28 17:20:49 +02:00
reaperrr
4894211789 Migrate Captures.SabotageHPRemoval and Capturable.CaptureThreshold to int percentages 2016-03-28 17:20:49 +02:00
reaperrr
82f23210d9 Migrate EmitInfantryOnSell ValuePercent and MinHpPercent to int percentages
Additionally, MinHpPercent should now actually have the desired effect (previously there was not logic attached).
2016-03-28 17:20:49 +02:00
reaperrr
3a97757bfa Migrate SelfHealing.HealIfBelow from float to int percentage 2016-03-28 17:20:49 +02:00
Matthias Mailänder
8ba875476f Merge pull request #10973 from reaperrr/fp-to-int2
Getting rid of float in simulation code Part 2
2016-03-28 17:13:52 +02:00
reaperrr
1ee4131f35 Make ThrowsParticle use WAngle instead of float 2016-03-28 15:41:34 +02:00
reaperrr
ade49ba1be Migrated Minelayer.MinefieldDepth to use WDist instead of float 2016-03-28 14:44:21 +02:00
reaperrr
251b1b44d4 Migrate StrategicVictoryConditions.RatioRequired to int percentage
Remove bogus CriticalRatioRequired from RA Hopes Anchor.
2016-03-28 14:44:20 +02:00
Matthias Mailänder
f6c7e3debb Don't try to lookup '' strings in chrome collections. 2016-03-28 13:38:29 +02:00
Pavel Penev
b162afee6b Merge pull request #10984 from pchote/fix-c17-palette
Fix C17 palette in TD campaign.
2016-03-27 22:38:09 +03:00
Pavel Penev
c78ad58e4b Merge pull request #10948 from pchote/custom-map-merger
Add --map-rules utility command for the resource center
2016-03-27 22:12:47 +03:00
Pavel Penev
c74ecd0794 Merge pull request #10898 from pchote/map-format-eleven
Add support for multiple map categories.
2016-03-27 18:16:51 +03:00
Paul Chote
ba20433f49 Fix C17 palette in TD campaign. 2016-03-27 14:28:25 +01:00
Paul Chote
74d3f87a4c Merge pull request #10934 from obrakmann/spec-objectives-panel
Make objectives panel visible to spectators/observers
2016-03-27 13:58:53 +01:00
Paul Chote
10738b0c77 Remove dead space when viewing the observer menu stats. 2016-03-27 13:59:46 +02:00
Oliver Brakmann
2490e4d67e Make objectives panel visible to spectators/observers
It also allows switching the context of the panel by selecting a certain player's view in the player view spectator drop down.
2016-03-27 13:43:23 +02:00
Paul Chote
3d499f34c6 Add additional categories to TS maps. 2016-03-27 12:17:01 +01:00
Paul Chote
eb1d033ab4 Update TS maps to format 11. 2016-03-27 12:17:01 +01:00
Paul Chote
55b06cd982 Update D2K maps to format 11. 2016-03-27 12:17:00 +01:00
Paul Chote
2151f9ac15 Update TD maps to format 11. 2016-03-27 12:17:00 +01:00
Paul Chote
85c41bf50e Update RA maps to format 11. 2016-03-27 12:17:00 +01:00
Paul Chote
96eda08677 Replace map type with a category list. 2016-03-27 12:16:55 +01:00
Matthias Mailänder
85c20e7adf Merge pull request #10947 from pchote/remove-cnc-mission-boilerplate
Remove cnc mission boilerplate
2016-03-27 12:19:28 +02:00
Oliver Brakmann
0bba5a540b Merge pull request #10963 from pchote/map-load-save
Rework map data load/save.
2016-03-26 19:24:45 +01:00
Paul Chote
2b076dd35d Merge pull request #10961 from Mailaender/animate-infantry-stand
Added animation support to infantry stand sequences
2016-03-26 17:54:12 +00:00
Paul Chote
c696c318c4 Log rule errors when loading from MapPreview. 2016-03-26 17:26:51 +00:00
Paul Chote
7f30f172a1 Add --map-rules utility command. 2016-03-26 17:25:25 +00:00
RoosterDragon
f4ebfed865 Merge pull request #10960 from Phrohdoh/paratrooper-exception
Add an explicit YamlException to ParatroopersPower.SendParatroopers
2016-03-25 13:36:27 +00:00
reaperrr
19e504163e Merge pull request #10971 from HenrytheSlav/upstream/bridgeart
Fix bad bridge art for TD snow template
2016-03-24 21:32:39 +01:00
reaperrr
01f15d7917 Change TS build speeds to match original 2016-03-24 18:43:49 +01:00
reaperrr
38cea38f6b Migrate BuildSpeed from float to int 2016-03-24 18:43:48 +01:00
HenrytheSlav
68bbe1769d bridge_art_fix 2016-03-24 00:05:47 +01:00
Mustafa Alperen Seki
f7be6d4d51 Added Fake Power Plants 2016-03-23 21:10:15 +02:00
Oliver Brakmann
a0f9af1ebe Merge pull request #10711 from colonelpopcorn/bleed
Refactored ticks to delay per issue #9810
2016-03-23 19:03:42 +01:00
Jonathan Ling
2d4c3f715f Refactored ticks to delay per issue #9810 2016-03-22 17:03:37 -04:00
colonelpopcorn
689f05c3ca Upgraded rules for Tiberian Dawn mod. 2016-03-22 16:58:38 -04:00
colonelpopcorn
24f010b673 Upgraded rules for Dune 2000 mod. 2016-03-22 16:58:38 -04:00
colonelpopcorn
95350a7e81 Upgraded rules for Red Alert mod. 2016-03-22 16:58:38 -04:00
colonelpopcorn
9c069ae3be Upgraded rules for Tiberian Sun mod. 2016-03-22 16:58:38 -04:00
Oliver Brakmann
52d0d8781d Merge pull request #10938 from reaperrr/explo-image
Unhardcode Explosion "Image"
2016-03-22 21:58:03 +01:00
Matthias Mailänder
4ee1da3970 Merge pull request #10964 from GraionDilach/fix-takecover
Fix TakeCover dependence on AttackTurreted.
2016-03-22 20:11:50 +01:00
Zimmermann Gyula
b0239368a1 Fix TakeCover dependence on AttackTurreted. 2016-03-22 10:38:24 +01:00
Paul Chote
3e00d72255 Rework map data load/save. 2016-03-21 23:15:12 +00:00
Paul Chote
ca2b712ad9 Clean up ImportTSMapCommand. 2016-03-21 23:08:43 +00:00
Oliver Brakmann
3a6c1de725 Merge pull request #10933 from Hanzik/replays-hotkeys
Replay hotkeys for pause/play/change of speed
2016-03-21 21:30:17 +01:00
Matthias Mailänder
ebe945e6c7 Merge pull request #10910 from RoosterDragon/turret-active-tracking
Turrets actively track targets
2016-03-21 20:52:18 +01:00
Matthias Mailänder
ed6067cd2f Merge pull request #10939 from pchote/fix-map-install-kick
Notify the server after installing a map.
2016-03-21 20:37:12 +01:00
Matthias Mailänder
e83261e6c3 Merge pull request #10922 from abcdefg30/shpPng
Fix the --png command trying to use OpenRA's virtual file system
2016-03-21 20:30:44 +01:00
Matthias Mailänder
dd0d8c86c6 Merge pull request #10942 from pchote/remove-map-lazyness
Remove map lazyness.
2016-03-21 20:23:47 +01:00
Matthias Mailänder
15c2df2c69 Merge pull request #10943 from pchote/map-grid-tile-range
Move Map.TilesByDistance to MapGrid and un-static it.
2016-03-21 20:05:08 +01:00
Matthias Mailänder
477d36c29a Merge pull request #10940 from pchote/drain-remaining-funds
Fix AI stalling after losing its conyard and ref.
2016-03-21 19:50:06 +01:00
Matthias Mailänder
0c41142027 Add animation support to infantry stand sequences. 2016-03-21 19:48:09 +01:00
Taryn Hill
8c8ff01b10 Add an explicit YamlException to ParatroopersPower.SendParatroppers 2016-03-20 18:07:43 -05:00
Paul Chote
4052da3ea6 Move Map.TilesByDistance to MapGrid and make non-static. 2016-03-20 21:41:04 +00:00
Paul Chote
946e6ba008 Fix "Civilians" spelling in gdi04c. 2016-03-20 21:29:41 +00:00
Paul Chote
6ca7663579 Extract common cnc campaign rules to shared includes. 2016-03-20 21:28:56 +00:00
Matthias Mailänder
5d8824fece Merge pull request #10957 from reaperrr/fix-deviator
Fix D2k deviator not taking effect
2016-03-20 19:39:58 +01:00
reaperrr
683eb7cf83 Upgrade rule for *Collection -> Image rename 2016-03-20 13:48:54 +01:00
reaperrr
a83f44d907 Unhardcode Explosion "Image"
Add ExplosionCollection property to CreateEffectWarhead
2016-03-20 13:48:53 +01:00
reaperrr
5905e75d95 Fix D2k deviator not taking effect
The warhead's scan range was lower than both the missile inaccuracy as
well as the Missile CloseEnough value of 298, so it almost never had an
effect.
2016-03-20 13:07:13 +01:00
reaperrr
0ff836b7ab Merge pull request #10955 from obrakmann/fix10936_missing-worm-sound
Fix filename case of sandworm attack sound
2016-03-20 12:59:57 +01:00
Honza Vrátník
1728f9d662 Added support for pause/play/speed hotkeys in replays 2016-03-20 12:39:16 +01:00
Oliver Brakmann
b1fd74010f Fix filename case of sandworm attack sound 2016-03-19 23:07:59 +01:00
Paul Chote
0dc939e0e8 Notify the server after installing a map. 2016-03-18 20:53:48 +00:00
Paul Chote
e6b28c2a00 Remove Map.AssetExists. 2016-03-18 20:23:52 +00:00
Paul Chote
1e5065e06a Remove lazy loading of map rules. 2016-03-18 20:23:52 +00:00
Paul Chote
4a7ef68b39 Remove Map.SpawnPoints. 2016-03-18 20:16:25 +00:00
Paul Chote
65df25b1a4 Remove lazy loading of binary map data. 2016-03-18 20:16:24 +00:00
abcdefg30
51bfe4accc Merge pull request #10916 from pchote/lobby-bots
Support map-defined bot types
2016-03-18 19:31:05 +01:00
Paul Chote
5741e53fe2 Fix AI stalling after losing its conyard and ref. 2016-03-18 18:16:24 +00:00
abcdefg30
7a63437a73 Merge pull request #10929 from Hanzik/editor-gridcolor
Changed grid in map editor to darker red
2016-03-18 19:10:30 +01:00
Oliver Brakmann
77297f1ca6 Merge pull request #10935 from pchote/dot-net-sdk-ver
Remove sdk flag from default makefile.
2016-03-17 22:06:05 +01:00
Paul Chote
dc0011a852 Remove sdk flag from default makefile. 2016-03-17 20:58:16 +00:00
Oliver Brakmann
483a008af6 Merge pull request #10931 from pchote/fix-appdata
Fix and overhaul Linux appdata
2016-03-17 21:08:20 +01:00
Paul Chote
fe28393406 Remove invalid bot types when switching maps. 2016-03-16 21:03:32 +00:00
Paul Chote
d40bff3fd9 Support map-defined AI in the lobby. 2016-03-16 21:03:31 +00:00
Paul Chote
ab6a9597bb Remove Map usage from LobbyLogic. 2016-03-16 21:03:31 +00:00
abcdefg30
ad2c6e9c11 Merge pull request #10915 from pchote/map-grid-subcells
Reference SubCells directly from MapGrid.
2016-03-16 21:58:38 +01:00
Paul Chote
3bdc4bee3a Fix and overhaul appdata metadata. 2016-03-16 19:59:06 +00:00
Paul Chote
c1b1c3cb1a Change maintainer for debian package. 2016-03-16 19:59:06 +00:00
Paul Chote
e79fbe1bb9 Reference SubCells directly from MapGrid. 2016-03-16 18:57:07 +00:00
Hanzik
52c8d165f8 Changed grid to darker red 2016-03-15 22:40:55 +01:00
Oliver Brakmann
c9e7bb43c2 Merge pull request #10924 from Mailaender/powershell-cp
Fixed AppVeyor after_test depending on a Unix cp command
2016-03-15 19:43:09 +01:00
Matthias Mailänder
1524717bc2 Don't rely on C:\Program Files\Git\usr\bin\cp.exe 2016-03-14 23:06:08 +01:00
Matthias Mailänder
b75c7e4869 Merge pull request #10923 from abcdefg30/isPlayerNuke
Add an IsPlayerPalette flag to NukePowerInfo
2016-03-14 19:59:29 +01:00
abcdefg30
8547fac90d Add an IsPlayerPalette flag to NukePowerInfo 2016-03-14 16:42:49 +01:00
abcdefg30
ad3b41dfa3 Fix the --png command trying to use OpenRA's virtual file system 2016-03-14 15:24:33 +01:00
abcdefg30
79bad0f8b1 Merge pull request #10920 from obrakmann/fix10812-subs-no-nuke-damage
Change nukes to be able to damage submerged submarines
2016-03-13 21:16:18 +01:00
Matthias Mailänder
82f7413a6a Merge pull request #10919 from obrakmann/fix10780_map-editor-no-neutral-actors
Fix some actors not being available for the neutral player in the map editor
2016-03-13 17:48:36 +01:00
Oliver Brakmann
38ccc4aff9 Change nukes to be able to damage submerged submarines 2016-03-13 15:53:33 +01:00
Oliver Brakmann
8c58dbacc1 Fix some actors not being available for the neutral player in the map editor 2016-03-13 15:32:29 +01:00
Oliver Brakmann
6b7bf86373 Merge pull request #10913 from pchote/fix-editor-tooltips
Fix multi-line tooltip padding.
2016-03-13 15:17:25 +01:00
abcdefg30
b097f7df91 Merge pull request #10912 from pchote/soundloader-streams
Introduce ISoundFormat for parsing sound files.
2016-03-13 14:56:01 +01:00
abcdefg30
e1b2f5a280 Merge pull request #10901 from pchote/server-maps
Remove Map usage from the server and mission browser.
2016-03-13 11:24:04 +01:00
Matthias Mailänder
bd03479e7d Remove trailing space. 2016-03-13 10:48:55 +01:00
Oliver Brakmann
541186a142 Merge pull request #10897 from pchote/map-tileset-cleanup
Clean up map tileset references.
2016-03-12 22:16:14 +01:00
RoosterDragon
163688fc39 Prevent turrets from firing until they are aligned with the target. 2016-03-12 20:42:10 +00:00
RoosterDragon
4598b0de43 Have turrets actively track targets, even when not ready to attack. 2016-03-12 20:42:10 +00:00
Paul Chote
324ef2e073 Remove Map usage from MissionBrowerLogic. 2016-03-12 20:07:07 +00:00
Paul Chote
1ba7a5e59e Use MapPreview on the server. 2016-03-12 20:07:07 +00:00
Paul Chote
6c319d53dd Remove an obsolete comment from Map. 2016-03-12 20:01:39 +00:00
Paul Chote
be5eee0227 Allow rules to be constructed from a MapPreview. 2016-03-12 20:01:39 +00:00
Oliver Brakmann
f8b61782a1 Merge pull request #10914 from Phrohdoh/sprite-loader-xmldoc
Add xmldoc to some ISpriteFrame members
2016-03-12 20:58:34 +01:00
Paul Chote
43a3d42d31 Change LoadMapSettings to accept a Ruleset. 2016-03-12 19:52:02 +00:00
Paul Chote
37a81f8385 Don't crash when updating bogus tiles. 2016-03-12 19:47:08 +00:00
Paul Chote
602acabe47 Remove World.TileSet. 2016-03-12 19:47:07 +00:00
Taryn Hill
19a6a7bbcf Add xmldoc to some ISpriteFrame members 2016-03-12 13:46:38 -06:00
Paul Chote
7993068c8f Remove Map.SequenceProvider. 2016-03-12 19:46:20 +00:00
abcdefg30
d7bdc840d6 Merge pull request #10909 from pchote/remove-ruleset-cache
Remove ruleset cache
2016-03-12 20:41:03 +01:00
abcdefg30
6c4d24e505 Merge pull request #10851 from obrakmann/prod-from-map-edge_ground-units-fixes
Fix ProductionFromMapEdge to work properly with ground units
2016-03-12 20:37:02 +01:00
abcdefg30
f3c8dd0397 Merge pull request #10886 from reaperrr/fix-gravitybomb
Fix GravityBomb crash when Image is null
2016-03-12 18:36:44 +01:00
Paul Chote
dbe55eedaf Fix multi-line tooltip padding. 2016-03-12 16:43:05 +00:00
Paul Chote
860876b08f Merge pull request #10893 from abcdefg30/MurtosExploit
Fix an exploit were players were able to repair at enemy service depots
2016-03-12 13:46:55 +00:00
Paul Chote
1a574028b7 Merge pull request #10891 from abcdefg30/repairCursorExploit
Fix players being able to command allied units to the service depot
2016-03-12 13:38:44 +00:00
Oliver Brakmann
3c9aa20e99 Merge pull request #10911 from reaperrr/fix-smoketrails
Fix Smoke facings to not track spawner's facing
2016-03-12 14:35:29 +01:00
Paul Chote
35cb2cb609 Lazily parse Wav data. 2016-03-12 13:17:28 +00:00
Paul Chote
3e37b717a4 Lazily parse Aud data. 2016-03-12 13:17:23 +00:00
Paul Chote
6bbe785019 Remove hardcoded wav/aud music assumption. 2016-03-12 13:01:01 +00:00
teees
0193ee5b3c Object oriented sound loader approach
Reshapes the ISoundLoader interface and
adds a new ISoundFormat interface to allow streaming in the near future
2016-03-12 12:50:52 +00:00
reaperrr
d3ca9e1733 Fix Smoke facings to not track spawner's facing 2016-03-12 13:12:42 +01:00
reaperrr
03dd192de8 Make shadow palette of GravityBomb configurable 2016-03-12 12:16:40 +01:00
Paul Chote
82a9d69a51 Remove RulesetCache and push rule parsing to background thread. 2016-03-11 21:18:32 +00:00
Paul Chote
a3b1baa654 Extract default TileSet/Sequence dictionaries to ModData. 2016-03-11 21:18:32 +00:00
abcdefg30
c32bf9f8f7 Merge pull request #10862 from ABrandau/ts-stat-correction
Adjust TS Actor stats to match vanilla TS and FS stats.
2016-03-11 21:51:52 +01:00
abcdefg30
956c36c4fc Merge pull request #10902 from pchote/inline-rules
Restore the ability for maps to include inline rules.
2016-03-11 21:33:52 +01:00
Paul Chote
b0c0bf3151 Revert format upgrader and map importers saving rules to external file. 2016-03-11 16:46:22 +00:00
Paul Chote
dd677ae916 Move TS lighting overrides to map.yaml. 2016-03-11 16:46:22 +00:00
Paul Chote
20e8bc249d Restore support for inline map rules. 2016-03-10 19:27:50 +00:00
Oliver Brakmann
2d98e41f11 Merge pull request #10839 from pchote/map-format-nine
Extract map rules to external files (and map format changes).
2016-03-09 21:50:56 +01:00
Paul Chote
d60e1ddfb9 Upgrade TS maps to format 10. 2016-03-08 22:19:27 +00:00
Paul Chote
1f9262f653 Upgrade D2K maps to format 10. 2016-03-08 22:19:26 +00:00
Paul Chote
9884a29b9e Upgrade RA maps to format 10. 2016-03-08 22:19:26 +00:00
Paul Chote
f4cdc523fc Upgrade TD maps to format 10. 2016-03-08 22:19:26 +00:00
Paul Chote
c58520e41b Add upgrade rules for Map format 9 -> 10. 2016-03-08 22:19:25 +00:00
Paul Chote
9c4dd54fa3 Generate map previews on save. 2016-03-08 21:13:38 +00:00
Paul Chote
b969d61466 Move advanced map yaml to their own files. 2016-03-08 20:54:54 +00:00
Paul Chote
e313ce62f0 Mount the map filesystem for yaml checks. 2016-03-08 20:54:51 +00:00
Paul Chote
e59557f588 Include all yaml and lua files in Map UID. 2016-03-08 20:54:26 +00:00
Paul Chote
8532f4deef Move smudge definitions from Map to SmudgeLayer. 2016-03-08 20:54:26 +00:00
abcdefg30
81749cf56d Merge pull request #10857 from pchote/map-format-more
Remove hardcoded map options and videos from the Map format.
2016-03-08 21:52:52 +01:00
Oliver Brakmann
bab1051e5e Merge pull request #10895 from abcdefg30/mammothWalls
Make mammoth tanks capable of crushing concrete walls
2016-03-08 18:55:35 +01:00
abcdefg30
9bb58b7e39 Make mammoth tanks capable of crushing concrete walls 2016-03-07 22:50:27 +01:00
Paul Chote
61e17b8c86 Fix option reporting when joining a server. 2016-03-07 21:41:15 +00:00
Paul Chote
3635888dd9 Upgrade TS maps to format 9. 2016-03-07 21:41:15 +00:00
Paul Chote
1afa56565c Upgrade TD maps to format 9. 2016-03-07 21:41:15 +00:00
Paul Chote
505dddcf96 Upgrade RA maps to format 9. 2016-03-07 21:41:14 +00:00
Paul Chote
5516557515 Upgrade D2K maps to format 9. 2016-03-07 21:41:14 +00:00
Paul Chote
4a7dfb9d4c Add upgrade rules for Map format 8 -> 9. 2016-03-07 21:41:14 +00:00
Paul Chote
01a14d9ae5 Move mission briefing to rules. 2016-03-07 21:41:14 +00:00
Paul Chote
668e13b849 Move mission videos to rules. 2016-03-07 21:41:13 +00:00
Paul Chote
8017844a15 Remove LobbyDefaults from mod.yaml. 2016-03-07 21:41:13 +00:00
Paul Chote
d4f8fe1666 Move map configuration to rules. 2016-03-07 21:41:13 +00:00
Paul Chote
5b2bf5b284 Move build radius configuration to rules. 2016-03-07 21:41:13 +00:00
Paul Chote
cce292a68a Move creeps configuration to rules. 2016-03-07 21:41:13 +00:00
Paul Chote
3c779d4101 Move starting units configuration to rules. 2016-03-07 21:41:13 +00:00
Paul Chote
e34864fe40 Use DefaultCash for the default cash. 2016-03-07 21:41:12 +00:00
Paul Chote
76b1810925 Remove unused FragileAlliances default. 2016-03-07 21:41:12 +00:00
Paul Chote
62f28d2909 Move shroud options to rules. 2016-03-07 21:41:12 +00:00
Paul Chote
f44993e4f7 Move crates option to rules. 2016-03-07 21:41:12 +00:00
Paul Chote
aed8518e04 Move cheats option to rules. 2016-03-07 21:41:12 +00:00
Paul Chote
5e59a9d1c1 Move ServerStarted notifications into the server thread. 2016-03-07 21:41:12 +00:00
Paul Chote
6389e9aa5c Fix automated map format upgrades. 2016-03-07 21:41:11 +00:00
Paul Chote
2029f34c86 Remove redundant Rules definition from ImportLegacyMapCommand. 2016-03-07 21:41:11 +00:00
abcdefg30
51ceda4e7f Merge pull request #10885 from pchote/fix-partially-locked-slots
Prevent locked spawns from being selected by other players.
2016-03-07 21:23:28 +01:00
abcdefg30
e8a051e761 Fix an exploit were players were able to repair at enemy service depots 2016-03-07 15:53:40 +01:00
abcdefg30
3b6e481196 Account for allied service depot when ordering an auto repair 2016-03-07 15:26:50 +01:00
abcdefg30
bfe9bc329c Fix players being able to command allied units to the service depot 2016-03-07 15:18:23 +01:00
Taryn Hill
0dcc51b3a3 Merge pull request #10890 from Micr0Bit/patch-3
Add SoScared to AUTHORS
2016-03-07 07:12:03 -06:00
Micr0Bit
04cd769ac2 Add SoScared to AUTHORS
should not have to explain why ... thank you @SoScared for :

https://www.youtube.com/watch?v=ueosN-JFqG0
http://www.twitch.tv/soscared
https://www.youtube.com/user/SoScared101
http://www.sleipnirstuff.com/forum/viewtopic.php?f=82&t=19414
http://www.sleipnirstuff.com/forum/viewtopic.php?f=82&t=19354
2016-03-07 03:51:29 +01:00
reaperrr
2378b427fe Fix GravityBomb crashing when Image is null 2016-03-06 20:04:41 +01:00
Oliver Brakmann
c02b70ee6d Merge pull request #10884 from pchote/revert-keyrepeat
Revert "Added Keybord input filter to only register first key press."
2016-03-06 19:57:06 +01:00
Paul Chote
ccdae033ff Prevent locked spawns from being selected. 2016-03-06 11:38:00 +00:00
Paul Chote
8b9bdadf53 Don't propagate locked spawns when changing slots. 2016-03-06 11:24:24 +00:00
abcdefg30
b1b4c0bbd4 Merge pull request #10856 from reaperrr/smoke-facings
Added facings support to sprite trails
2016-03-06 12:18:29 +01:00
Paul Chote
cff482bb1a Revert "Added Keybord input filter to only register first key press."
This reverts commit 57cd25d5f8.
2016-03-06 11:11:20 +00:00
Matthias Mailänder
f23df1170b Merge pull request #10875 from RoosterDragon/mod-package-dispose
Close some packages
2016-03-06 10:06:33 +01:00
Oliver Brakmann
1fb68b8a20 Merge pull request #10778 from Mailaender/test-nuke-sprites
Exposed nuke missile sprites to lint testing
2016-03-05 21:52:20 +01:00
RoosterDragon
4bd57aec91 Close packages that are not required when loading mod metadata. 2016-03-05 15:00:24 +00:00
Oliver Brakmann
0039cbc590 Fix indentation in ProductionFromMapEdge 2016-03-05 14:46:16 +01:00
Oliver Brakmann
df7ec2b029 Fix ProductionFromMapEdge spawning ground units in inappropriate places 2016-03-05 14:22:12 +01:00
Oliver Brakmann
be3bd52474 Add a method returning the closest edge cell matching a condition to Map 2016-03-05 14:17:01 +01:00
Oliver Brakmann
f547a4b6e9 Add ProductionSpawnLocationInit, used by ProductionFromMapEdge
This enables fixed per-factory actor spawn locations.
2016-03-05 14:16:57 +01:00
Oliver Brakmann
a1e6f65f8f Use a "real" Move instead of VisualMove in ProductionFromMapEdge 2016-03-05 14:11:52 +01:00
Oliver Brakmann
7a29cfeaea Add optional use of a rally point to ProductionFromMapEdge 2016-03-05 14:11:46 +01:00
reaperrr
717a5063d9 Add facings support to projectile trails and SmokeTrailWhenDamaged 2016-03-05 13:49:07 +01:00
Matthias Mailänder
83a13f1594 Merge pull request #10877 from RoosterDragon/png-dispose
Ensure we do not leak bitmaps when parsing invalid PNG files
2016-03-05 13:46:01 +01:00
reaperrr
d063087de9 Add TrailSequences to Bullet
And use that instead of Sequences.
2016-03-05 13:45:06 +01:00
Paul Chote
f50cd2307a Merge pull request #10876 from RoosterDragon/upgrade-fix-nre
Fix a theoretical null reference in UpgradeWeaponRules.
2016-03-05 10:42:37 +00:00
RoosterDragon
0bce7a1b71 Fix a possible null reference in UpgradeWeaponRules. 2016-03-04 21:29:56 +00:00
RoosterDragon
9166d9b369 Ensure we do not leak bitmaps when parsing invalid PNG files. 2016-03-04 19:55:44 +00:00
Pavel Penev
aa78dc32e3 Merge pull request #10874 from obrakmann/fix-spyware-typos
Fix typos in advanced settings dialog
2016-03-04 21:19:21 +02:00
Oliver Brakmann
bae8c09e8c Merge pull request #10873 from abcdefg30/lobbyGame
Change the game lobby's chat label from 'Lobby' to 'Game'
2016-03-04 20:11:22 +01:00
Oliver Brakmann
85d0be5d3e Fix typos in advanced settings dialog 2016-03-04 19:29:18 +01:00
abcdefg30
436e364c58 Merge pull request #10803 from obrakmann/player-census
Add ability to collect system information from users' systems
2016-03-04 16:27:32 +01:00
abcdefg30
ab4afb238b Merge pull request #10863 from reaperrr/ROT-TurnSpeed
Renamed ROT to TurnSpeed
2016-03-04 16:23:06 +01:00
abcdefg30
d58eb46833 Change the game lobby's chat label from 'Lobby' to 'Game' 2016-03-04 16:16:36 +01:00
abcdefg30
bc4a512d7d Merge pull request #10837 from RoosterDragon/priority-queue-tests
Add tests for PriorityQueue
2016-03-04 15:16:54 +01:00
reaperrr
0a168b26f0 Fix InitialFacing of turrets to match Mobile 2016-03-04 15:13:56 +01:00
reaperrr
cddf182996 Renamed ROT to TurnSpeed on Mobile, Aircraft, Turreted and ThrowsParticle 2016-03-04 15:13:55 +01:00
RoosterDragon
0790884e4f Fix namespaces of some tests. 2016-03-03 22:31:46 +00:00
RoosterDragon
0306a8de6c Add tests and make minor fixes to PriorityQueue. 2016-03-03 22:31:45 +00:00
Paul Chote
bc0efbefd1 Include OpenGL version string in sysinfo. 2016-03-02 21:33:12 +01:00
Oliver Brakmann
6b4ccecabe Add ability to collect system information from users' systems 2016-03-02 21:33:12 +01:00
ABrandau
9087527b48 Adjust Actor stats to match TS and FS stats. 2016-03-01 19:00:53 -04:00
reaperrr
d3ab8dbd01 Add facing support to Smoke effect 2016-03-01 23:37:27 +01:00
Oliver Brakmann
86e4a72dce Merge pull request #10841 from pchote/oramod
Add support for loading mods from `oramod` packages.
2016-02-29 22:13:40 +01:00
abcdefg30
09c48012d8 Merge pull request #10770 from AoAGeneral/upstream/myfeature
TD Balance Patch Revised. 021616
2016-02-29 15:47:01 +01:00
Paul Chote
293b6202ef Add support for oramod packages. 2016-02-28 20:30:40 +00:00
Paul Chote
5c32a77179 Don't dispose mod packages when returning to mod chooser. 2016-02-28 20:25:40 +00:00
Matthias Mailänder
50294917da Document FlashType. 2016-02-28 20:54:22 +01:00
Matthias Mailänder
8e62186c6c Require MissileWeapon. 2016-02-28 20:54:22 +01:00
Matthias Mailänder
a7a6815f99 Lint test the nuke missile sprites. 2016-02-28 20:54:10 +01:00
Pavel Penev
0eaa57c017 Merge pull request #10838 from pchote/map-saving-packages
Rework map loading and saving.
2016-02-28 21:50:18 +02:00
Paul Chote
21d19e65a5 Unhardcode map installation directory. 2016-02-28 19:34:56 +00:00
Paul Chote
be52c1cb72 Properly use the virtual filesystem for map loading and saving. 2016-02-28 19:27:33 +00:00
Oliver Brakmann
2f374d2a66 Merge pull request #10847 from penev92/fixWindowsDeps
Fix making dependencies on Windows
2016-02-28 13:37:08 +01:00
Oliver Brakmann
516f973487 Merge pull request #10848 from GraionDilach/fix-insuffunds-header
Normalize InsufficientFundsWarning header.
2016-02-28 13:27:16 +01:00
Zimmermann Gyula
505542955c Normalize InsufficientFundsWarning header.
It got merged with the old, now outdated header.
2016-02-28 12:57:36 +01:00
Paul Chote
6490a66ffc Fix false Folder contains for absolute paths. 2016-02-28 10:18:50 +00:00
Paul Chote
b0f4646b88 Dispose package on exception. 2016-02-28 10:18:50 +00:00
Paul Chote
617113fa86 Rework IReadWritePackage interface. 2016-02-28 10:18:50 +00:00
Paul Chote
bee3eb2c0a Dispose MapPreviews and map packages. 2016-02-28 10:18:49 +00:00
Paul Chote
b5f792b997 Fix unmounting of explicit packages. 2016-02-28 10:18:49 +00:00
Pavel Penev
970f295af0 Extract SDL zip when making dependencies using purely PowerShell commands
Fixes script crash when the currently used .NET DLL is not found (it's available only in .NET 4.5.1+ and even then it can fail to locate it for some reason).
2016-02-27 21:05:57 +02:00
Oliver Brakmann
584bf9e7f7 Merge pull request #10570 from abcdefg30/InsufficientFunds
Add support for playing an InsufficientFunds warning
2016-02-27 18:09:13 +01:00
Oliver Brakmann
59d9eeaa08 Merge pull request #10795 from Mailaender/screenmap-bounds-crash
Fixed screen map updates for invisible mobile actors
2016-02-27 17:52:49 +01:00
Paul Chote
0e87b49a61 Merge pull request #10802 from Mailaender/exit-sprite-checks
Added exit codes to CheckSequenceSprites
2016-02-27 13:36:53 +00:00
Matthias Mailänder
e4f3aeeb13 Terminate with exit codes on missing sprite sequences. 2016-02-27 14:12:01 +01:00
Matthias Mailänder
9734054582 Reduce duplication. 2016-02-27 14:10:17 +01:00
Paul Chote
bc379d2357 Merge pull request #10831 from abcdefg30/flare
Fix the flare being invisible
2016-02-27 12:57:50 +00:00
Paul Chote
20c8a2bb74 Merge pull request #10800 from obrakmann/fix10330_lobbycommand-input-validation
Fix LobbyCommands not validating user-modifiable input
2016-02-27 11:49:43 +00:00
Paul Chote
d4963311ed Merge pull request #10363 from Mailaender/ts-hospital-heal
Added hospital healing to Tiberian Sun
2016-02-27 11:17:56 +00:00
Matthias Mailänder
3117b50c92 Merge pull request #10840 from Micr0Bit/patch-1
Add FiveAces to AUTHORS
2016-02-27 09:31:36 +01:00
Micr0Bit
b625de4503 Add FiveAces to AUTHORS
https://www.youtube.com/watch?v=Y5IDhShbDNI (picked the full name from the description)
https://www.youtube.com/user/CovertFlobert
http://www.sleipnirstuff.com/forum/viewtopic.php?f=82&t=18054

i think the efforts and time that he is spending on making those Videos and to help making OpenRA more popular with his passion and creativity should be rewarded with a credit-entry
2016-02-27 01:32:17 +01:00
abcdefg30
726f446185 Fix the flare being invisible 2016-02-26 23:58:32 +01:00
Oliver Brakmann
94228cd372 Merge pull request #10836 from RoosterDragon/fuzzy-lock-fix
Fix thread issue in AttackOrFleeFuzzy
2016-02-26 23:19:25 +01:00
RoosterDragon
3ff678ef86 Lock fuzzyEngine during construction so it is published correctly. 2016-02-26 21:23:19 +00:00
Oliver Brakmann
fe6c4d8e5c Merge pull request #10788 from pchote/widget-moddata
Remove Game.ModData references from Widget code.
2016-02-25 22:18:18 +01:00
reaperrr
589b2d19c3 Merge pull request #10797 from pchote/fix-upgrade-rules
Fix mod updater and clear out legacy rules.
2016-02-25 14:34:47 +01:00
Oliver Brakmann
07ec56fd22 Merge pull request #10821 from obrakmann/pr10559-squashed
Added mousewheel zooming
2016-02-24 22:37:00 +01:00
Philipp Schärer
ea74499ec2 Added mousewheel zooming 2016-02-24 22:22:32 +01:00
RoosterDragon
ee4307cf9d Merge pull request #10819 from abcdefg30/selectMillHus
Adjust the (visual) selection bounds of the Windmill and the Lighthouse
2016-02-24 20:26:03 +00:00
RoosterDragon
b04e578857 Merge pull request #10814 from Mailaender/unselect-crash-site
Fixed selectable crash sites
2016-02-24 20:23:52 +00:00
Matthias Mailänder
286028eb0b Merge pull request #10820 from abcdefg30/tdBounds
Adjust the bounds of structures in TD
2016-02-24 20:40:07 +01:00
RoosterDragon
94638606fa Merge pull request #10680 from Mailaender/redcross-pip
Added artwork for the constant TD hospital healing power-up
2016-02-24 19:23:21 +00:00
RoosterDragon
c63d71b95d Merge pull request #10599 from Mailaender/sdl-2.0.4
Updated to SDL 2.0.4 for Windows
2016-02-24 19:07:51 +00:00
abcdefg30
7f9c3e978e Adjust the bounds of structures in TD 2016-02-24 18:04:06 +01:00
abcdefg30
376c788ba0 Adjust the (visual) selection bounds of the Windmill and the Lighthouse 2016-02-24 17:44:00 +01:00
abcdefg30
85ee351d96 Merge pull request #10636 from reaperrr/missile-speed
Refactor naming of Missile's speed-related properties
2016-02-24 17:39:25 +01:00
Paul Chote
a6c4eb330a Remove modRules widget logic argument. 2016-02-23 23:34:36 +00:00
Paul Chote
84b470017f Remove static Game.ModData references from widget logic. 2016-02-23 23:34:34 +00:00
Paul Chote
ff2aabda9b Remove ModRules assumption from editor code. 2016-02-23 23:32:59 +00:00
Paul Chote
a553b46d3b Remove upgrade pre-20151224 upgrade rules. 2016-02-23 23:31:32 +00:00
Oliver Brakmann
1dcc43801a Fix broken map format upgrade 2016-02-23 23:28:16 +00:00
Paul Chote
d2566d442c Load files for upgrading using the filesystem. 2016-02-23 23:24:27 +00:00
Matthias Mailänder
ecbd1a0247 Merge pull request #9509 from penev92/upgradeTickTank
Convert Tick Tank to use DeployToUpgrade + some fixes
2016-02-23 23:33:38 +01:00
Oliver Brakmann
4f1fa3acec Merge pull request #10786 from pchote/mappreview-packages
Remove internal use of map paths.
2016-02-23 22:52:54 +01:00
abcdefg30
fad0ed7124 Make use of the new InsufficientFunds warning in ra, d2k and ts 2016-02-23 22:16:54 +01:00
abcdefg30
063321ea6b Fix the horrible formatting in CustomBuildTimeValueExts 2016-02-23 22:16:52 +01:00
abcdefg30
be1080f7bd Add support for playing an InsufficientFunds warning 2016-02-23 22:16:51 +01:00
Matthias Mailänder
eb9d47a316 Avoid redundancy and selectable crash sites. 2016-02-23 22:08:12 +01:00
RoosterDragon
494f71a8bb Merge pull request #10758 from Mailaender/ice-tiles
Added the regrow-able LAT ice sets to the map editor
2016-02-23 20:56:56 +00:00
Oliver Brakmann
7249de5434 Merge pull request #10801 from pchote/update-license-header
Update license header for 2016 and GPLv3+.
2016-02-23 20:22:19 +01:00
abcdefg30
3496eed1e1 Merge pull request #10804 from obrakmann/fix10683_broken-dev-commands
Fix broken dev commands
2016-02-22 13:31:58 +01:00
Paul Chote
8c7237ddc4 Update README. 2016-02-22 08:26:47 +00:00
Pavel Penev
118d015e4d Make the TS map importer aware of deployable actors who use upgrades instead of transforming 2016-02-22 02:44:29 +02:00
Pavel Penev
17ef6efefc Fix AttackFollow (and consequently AttackTurreted) firing at old target when the trait is reenabled
Most noticeable by ordering a deployed Tick Tank to fire at the ground, then undeploying it and deploying it again.
2016-02-22 02:44:28 +02:00
Pavel Penev
ba0781c28d Remove now-redundant actor gatick (deployed tick tank) 2016-02-22 02:44:27 +02:00
Pavel Penev
99afec6533 Convert the Tick Tank to use DeployToUpgrade 2016-02-22 02:44:26 +02:00
Pavel Penev
07947179cd Don't crash on multiple Attack* traits
This is important for actors that use upgrades to switch between attack types.
2016-02-22 02:44:25 +02: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
Matthias Mailänder
65942ecfbf Merge pull request #10722 from pchote/fix-asset-dependency
Remove asset requirement from dedicated servers and the resource site.
2016-02-21 17:20:19 +01:00
Paul Chote
8a9bce45ec Remove map loading shim. 2016-02-21 16:11:36 +00:00
Paul Chote
d492c23a6d Store map packages in MapPreview. 2016-02-21 16:11:36 +00:00
Paul Chote
226081d379 Remove map saving shim method. 2016-02-21 16:11:36 +00:00
Paul Chote
573e26c887 Load and save maps using packages. 2016-02-21 16:11:35 +00:00
Oliver Brakmann
cf9f25eb0b Fix LobbyCommands not validating user-modifiable input
Validates all input that could have been changed with custom yaml rules.
2016-02-21 16:50:43 +01:00
Oliver Brakmann
40514184d8 Convert CRLF to LF line endings in LobbyCommands.cs 2016-02-21 16:30:53 +01:00
Paul Chote
9c3b967a47 Remove dead map saving code. 2016-02-21 15:11:55 +00:00
Matthias Mailänder
3885f0b559 Fix screen map updates for boundless actors. 2016-02-21 11:34:33 +01:00
Matthias Mailänder
9d85ddb82c Merge pull request #10191 from abcdefg30/backfallDeathAnim
Add support for a FallbackSequence in WithDeathAnimation
2016-02-21 10:18:47 +01:00
abcdefg30
5db994b83f Merge pull request #10372 from Mailaender/cnc-tooltips
Added tooltips for civilian buildings to Tiberian Dawn
2016-02-21 10:01:30 +01:00
Matthias Mailänder
eedf5ce6f4 Merge pull request #10785 from pchote/fix-shadow-height
Add terrain height support to WithShadow.
2016-02-21 10:00:14 +01:00
abcdefg30
ff3f9356cc Merge pull request #10695 from bateramos/upstream/#10029
Bug fix #10029 Plane resupply
2016-02-20 17:28:37 +01:00
abcdefg30
0a07be801a Merge pull request #10774 from obrakmann/fix-make-version
Fix 'make version' to adjust the user's custom map path
2016-02-20 17:28:27 +01:00
abcdefg30
9e799537f8 Fix make version on windows 2016-02-20 17:18:55 +01:00
Oliver Brakmann
8d1bb58754 Fix 'make version' to adjust the user's custom map path 2016-02-20 17:18:55 +01:00
abcdefg30
f7d53311e3 Merge pull request #10751 from RoosterDragon/shuffle
Improve Util.Shuffle
2016-02-20 17:04:44 +01:00
Paul Chote
04c40eddfe Add terrain height support to WithShadow. 2016-02-20 15:31:36 +00:00
Matthias Mailänder
16a3eb4d2c Merge pull request #10781 from pchote/fix-windows-fs
Fix filesystem references under Windows.
2016-02-19 22:00:54 +01:00
Paul Chote
34e6bfdfa0 Fix filesystem references under Windows. 2016-02-19 20:44:06 +00:00
PedroFerreiraRamos
bf97dd6b7b Bug fix #10029 Plane resupply 2016-02-19 08:35:18 -02:00
Matthias Mailänder
c420d24fb3 only display generic names for civilian buildings in missions 2016-02-19 10:26:12 +01:00
Matthias Mailänder
2eca30db76 add non-generic tooltips from the original game 2016-02-19 10:19:20 +01:00
Matthias Mailänder
00e95864b9 Merge pull request #10768 from pchote/startup-mappreview
Avoid creating throwaway map objects at startup.
2016-02-19 09:20:18 +01:00
Paul Chote
02ab54c9bc Load MapPreview data without initialising a full Map. 2016-02-18 20:19:44 +00:00
Paul Chote
ab25e26312 Add method to check if IGlobalModData exists. 2016-02-18 20:19:43 +00:00
Matthias Mailänder
3674038f00 Merge pull request #10765 from pchote/readonlyfs
Don't reenumerate FileSystem when switching maps.
2016-02-18 21:15:41 +01:00
Paul Chote
fe75f265f8 Disable now-invalid sequence caching. 2016-02-18 18:12:34 +00:00
Paul Chote
0b13811976 Don't reenumerate files when loading maps. 2016-02-18 18:12:33 +00:00
Paul Chote
88f6daf57f Misc remaining FileSystem cleanups. 2016-02-18 18:12:33 +00:00
Paul Chote
d573e21a48 Traits open files via the Map. 2016-02-18 18:12:33 +00:00
Paul Chote
7106d7ecdf Pass ModData to ILintPass. 2016-02-18 18:12:33 +00:00
Paul Chote
24e9294741 Tidy ModData/ModFiles usage in utility commands. 2016-02-18 18:12:33 +00:00
Paul Chote
edf59b159f Small tidy in AssetBrowserLogic. 2016-02-18 18:12:32 +00:00
Paul Chote
a4337648e1 Use IReadOnlyFileSystem in MissionBrowserLogic. 2016-02-18 18:12:32 +00:00
Paul Chote
a0141318d5 Pass FileSystem in to InstallUtils. 2016-02-18 18:12:32 +00:00
Paul Chote
b9f8301959 Use IReadOnlyFileSystem in Sound code. 2016-02-18 18:12:32 +00:00
Paul Chote
d1d3d72edb Implement IReadOnlyFileSystem on Map. 2016-02-18 18:12:32 +00:00
Paul Chote
6fde09c075 Use IReadOnlyFileSystem in voxel loader. 2016-02-18 18:12:31 +00:00
Paul Chote
9341055f50 Use IReadOnlyFileSystem in UI code. 2016-02-18 18:12:31 +00:00
Paul Chote
b347fade71 Use IReadOnlyFileSystem in artwork loaders. 2016-02-18 18:12:31 +00:00
Paul Chote
a1bc70cb58 Use IReadOnlyFileSystem in MusicInfo. 2016-02-18 18:12:31 +00:00
Paul Chote
9978e20a83 Introduce IReadOnlyFileSystem interface. 2016-02-18 18:12:31 +00:00
reaperrr
4d3a4a32b9 Merge pull request #10750 from obrakmann/drop-invalid-target
Fixed not dropping targets that are out of range if the attacker cannot move
2016-02-18 17:02:48 +01:00
reaperrr
76e7a27ca5 Merge pull request #10767 from obrakmann/undo-medics-low-selection-prio
Undo lowering selection priority of medics and mechanics
2016-02-18 15:47:24 +01:00
Matthias Mailänder
64de0efa87 Merge pull request #10769 from abcdefg30/credits
Fix the spacing at the end of the AUTHORS file
2016-02-17 21:29:07 +01:00
Oliver Brakmann
426bf0d975 Merge pull request #10731 from RoosterDragon/fuzzy-singletons
Create singletons for AttackOrFleeFuzzy rulesets
2016-02-17 21:25:03 +01:00
Oliver Brakmann
b28d03049b Merge pull request #10728 from Codes4Fun/bleed
Fixed domain index updates for bridges
2016-02-17 20:46:23 +01:00
Paul Chote
65f017acc9 Revert "Make travis fetch the mod content before running tests."
This reverts commit 1f4269df76.
2016-02-17 01:47:25 +00:00
Paul Chote
33c52963d7 Revert "Lint sequences using the external utility command."
This reverts commit 1442056cb1.
2016-02-17 01:47:24 +00:00
Paul Chote
31c83c46a8 Don't force assets on dedicated servers and tools. 2016-02-17 01:47:22 +00:00
abcdefg30
2b0d87ea3f Fix the spacing at the end of the AUTHORS file
Polishes the ingame look
2016-02-16 21:32:29 +01:00
AoAGeneral
a8615dc1eb TD Balance Patch Revised. 021616
Grenadier damage vs light increase to 80 from 75.

Increase APC HP to 210 from 200.

Guard Tower damage vs heavy reduced to 30 from 35.

SAM damage increase to 35 from 30.

Light Tank movement speed reduced to 110 from 113.

Light Tank Cost increased to 700 from 600. (Build time increase to 17
seconds from 15)

Light Tank HP Decreased to 340 from 350.

Rocket Infantry damage vs none decreased to 30 from 50.

(Revised from https://github.com/OpenRA/OpenRA/pull/10761)

forums will be updated once check made with the notes about GT.
2016-02-16 00:22:09 -08:00
Oliver Brakmann
c7089d9fca Undo lowering selection priority of medics and mechanics (TS) 2016-02-15 21:28:18 +01:00
Oliver Brakmann
742cc613c5 Undo lowering selection priority of medics and mechanics (RA) 2016-02-15 21:27:36 +01:00
Oliver Brakmann
5866164c40 Merge pull request #10353 from Mailaender/resize-map
Added a resize map command
2016-02-15 21:10:39 +01:00
Oliver Brakmann
7b90eea9aa Merge pull request #10754 from Mailaender/medic-cursor
Added the medic heal cursor
2016-02-15 21:02:49 +01:00
abcdefg30
72aefba89e Merge pull request #10748 from Mailaender/veins-minimap
Gave veins an orange minimap color
2016-02-15 15:54:09 +01:00
abcdefg30
07bdf49934 Merge pull request #10703 from pchote/explicitpackages
Unify filesystem package syntax.
2016-02-15 15:00:31 +01:00
Matthias Mailänder
3a8d28e508 Check for out of bounds map actors and remove them if so. 2016-02-15 08:49:04 +01:00
Matthias Mailänder
01577b400b Add heal cursor to GDI Medic. 2016-02-15 08:41:06 +01:00
Paul Chote
b50b2f31b5 Restore key:value syntax for MapFolders. 2016-02-15 00:44:37 +00:00
Paul Chote
a229e4253f Implement new syntax for mod-specific filesystem requests. 2016-02-15 00:44:36 +00:00
Paul Chote
a0bc556172 Implement new syntax for package-specific filesystem requests. 2016-02-15 00:44:36 +00:00
Paul Chote
102880c80f Use the virtual filesystem to resolve MapFolder paths. 2016-02-15 00:44:36 +00:00
RoosterDragon
3a99111a42 Improve Util.Shuffle.
Reduce algorithmic complexity from O(n^2) to O(n).
2016-02-14 22:22:00 +00:00
Oliver Brakmann
412188465c Merge pull request #10666 from Mailaender/nuget-update
Updated NuGet dependencies
2016-02-14 23:03:15 +01:00
Oliver Brakmann
fe25b9501b Merge pull request #10723 from abcdefg30/nukeHardcode
Unhardcode the palette the missile weapon of the NukePower uses
2016-02-14 22:43:38 +01:00
Oliver Brakmann
f3eab0eab0 Merge pull request #10742 from mazarf/bleed
Fix max view distance check.
2016-02-14 22:39:07 +01:00
abcdefg30
b27950b517 Unhardcode the palette the missile weapon of the NukePower uses 2016-02-14 22:32:53 +01:00
Oliver Brakmann
ce62e456d7 Fix TD gunboat attack behaviour 2016-02-14 21:28:50 +01:00
teees
dc6d31cec8 Fix turreted immovable actors not dropping targets that are out of range 2016-02-14 21:28:50 +01:00
teees
e95cb7540d Fix immovable actors not dropping targets that are out of range 2016-02-14 21:28:50 +01:00
Oliver Brakmann
dec9018723 Merge pull request #10759 from GraionDilach/spriteeffect-bleeding-fog
Do not render trails under fog by default.
2016-02-14 20:51:43 +01:00
abcdefg30
5327ea1418 Fix crushed sequences not appearing due to an FrameEndTask 2016-02-14 19:38:13 +01:00
abcdefg30
24ec7b0ad7 Fix the mobile trait spamming crush-notifications 2016-02-14 19:38:12 +01:00
abcdefg30
a46815e532 Move the creation of the CrushedSequence to WithDeathAnimation 2016-02-14 18:52:00 +01:00
abcdefg30
fe5754e2bd Change the parameters of ICrushable.CrushableBy 2016-02-14 18:51:59 +01:00
abcdefg30
9ea2a7a0bd Add [RequireExplicitImplementation] to the ICrushable interface 2016-02-14 18:51:58 +01:00
abcdefg30
17e23a7adc Add support for a FallbackSequence in WithDeathAnimation
Used when the actor is killed by non-standard means, like suicide.
2016-02-14 18:51:58 +01:00
abcdefg30
f21d1f52e7 Make the ICrushable implementation explicit 2016-02-14 18:51:57 +01:00
abcdefg30
8b59ce4dc2 Add a new INotifyCrushed interface 2016-02-14 18:51:56 +01:00
abcdefg30
e343803810 Remove an unnecessary Where in Crate.cs 2016-02-14 18:51:55 +01:00
Zimmermann Gyula
f37e59e116 Do not render trails under fog by default.
Exposed a boolean for rendering a SpriteEffect under fog. Exposed a setting in LeavesTrails for this boolean, defaulting to false.
2016-02-14 18:11:43 +01:00
Matthias Mailänder
93b3b454aa Add the regrowable LAT ice sets to the map editor. 2016-02-14 17:03:43 +01:00
reaperrr
08034fa7e0 Upgrade D2k missile rules 2016-02-14 13:43:45 +01:00
reaperrr
838ad30622 Upgrade TD missile rules 2016-02-14 13:43:45 +01:00
reaperrr
32bb632dbc Upgrade RA missile rules 2016-02-14 13:43:45 +01:00
reaperrr
e75cda66ec Upgrade TS missile rules 2016-02-14 13:41:27 +01:00
reaperrr
fe76742651 Upgrade rules for renamed Missile speed properties 2016-02-14 13:41:27 +01:00
reaperrr
462b8583a2 Refactor Missile speed nomenclature 2016-02-14 13:41:27 +01:00
Matthias Mailänder
0db2682fdf Add heal cursor to GDI Medic. 2016-02-14 11:01:45 +01:00
Matthias Mailänder
a471b5c5ab The sell2 cursor doesn't have a purpose yet. 2016-02-14 11:01:45 +01:00
Matthias Mailänder
6d80174e81 Cursor undeploy is in use. 2016-02-14 11:01:44 +01:00
Oliver Brakmann
2debda926a Merge pull request #10205 from abcdefg30/fort-lonestar
Fix and rebalance Fort Lonestar
2016-02-13 22:00:33 +01:00
Matthias Mailänder
8b9e60ba82 Set the bounds when resizing maps. 2016-02-13 21:56:51 +01:00
Matthias Mailänder
284e6ea061 Add a resize map command. 2016-02-13 21:56:51 +01:00
Oliver Brakmann
4c1322b4cd Merge pull request #10740 from reaperrr/fix-missile-nre
Fix Missile projectile crashing with NRE if it has no Image
2016-02-13 21:25:50 +01:00
Matthias Mailänder
c881a174ee Give veins an orange minimap color. 2016-02-13 21:01:14 +01:00
Matthias Mailänder
d189838b77 Add hospital healing. 2016-02-13 20:47:34 +01:00
Oliver Brakmann
7f5143bf46 Merge pull request #10746 from Phrohdoh/armament-yaml-excpt
Add an explicit YamlException to ArmamentInfo
2016-02-13 19:07:42 +01:00
Oliver Brakmann
6007bca0a2 Merge pull request #10744 from Mailaender/aircraft-falls-to-earth
Added missing Requires<AircraftInfo> to FallsToEarthInfo.
2016-02-13 18:56:22 +01:00
Taryn Hill
4f798ede3c Add an explicit YamlException to ArmamentInfo
Throw a more descriptive exception when the current weapon ruleset
doesn't contain an entry for the referenced weapon.
2016-02-13 09:15:16 -06:00
Matthias Mailänder
00ecea03cb Require AircraftInfo for activity FallToEarth. 2016-02-13 14:24:19 +01:00
Mazar Farran
22a3358581 Fix max view distance check. 2016-02-12 21:01:34 -08:00
reaperrr
8729f39154 Fix Missile projectile crashing with NRE if it has no Image 2016-02-13 01:06:22 +01:00
Oliver Brakmann
613854de91 Merge pull request #10632 from reaperrr/cleanup-harv
Improve Harvester-related code
2016-02-12 22:03:51 +01:00
Oliver Brakmann
781d173b7d Merge pull request #10733 from abcdefg30/leaveEditor
Fix the misleading wording of the confirm dialogs
2016-02-12 20:49:37 +01:00
abcdefg30
b23c5687ec Fix a crash when using parabombs on Fort Lonestar 2016-02-12 16:56:33 +01:00
abcdefg30
3a217fed20 Let units directly hunt instead of attack move on Fort Lonestar 2016-02-12 16:56:33 +01:00
abcdefg30
07f9ec7562 Add "Mobile Tent" actor
It is available through crates
2016-02-12 16:56:32 +01:00
abcdefg30
b3436f9b6a Make the walls have a player as owner
except when there is no player in the respective edge.
2016-02-12 16:56:31 +01:00
abcdefg30
59385f9b04 Add new difficulties to Fort Lonestar and try to balance them 2016-02-12 16:56:30 +01:00
abcdefg30
0b284de241 Fix the spawnpoint selection not working on Fort Lonestar 2016-02-12 16:56:30 +01:00
abcdefg30
fff67d3348 Add support for sending Iron Curtained units on Fort Lonestar 2016-02-12 16:56:29 +01:00
abcdefg30
7092e81f2d Make MECH buildable on Fort Lonestar but very expensive 2016-02-12 16:56:28 +01:00
abcdefg30
05c77c6df9 Add myself to the Authors of Fort Lonestar 2016-02-12 16:56:28 +01:00
abcdefg30
5dc91d533e Add support for sending unarmed actors as part of the waves on Fort Lonestar 2016-02-12 16:56:27 +01:00
abcdefg30
ba93269e73 Enable AllyBuildRadius and add GivesBuildableArea to the defenses on Fort Lonestar 2016-02-12 16:56:26 +01:00
abcdefg30
8b22f4fc7c Add different ProductionBars for each production queue on Fort Lonestar 2016-02-12 16:56:26 +01:00
abcdefg30
be0903ab34 Improve crates on Fort Lonestar 2016-02-12 16:56:25 +01:00
abcdefg30
0f0cb20629 Add paratroopers to Fort Lonestar 2016-02-12 16:56:24 +01:00
abcdefg30
1818c362da Clean fort-lonestar.lua up 2016-02-12 16:56:23 +01:00
abcdefg30
7812087209 Clean the yaml up and fix wrong inheritance on Fort Lonestar
Fort Lonestar became unplayable when someone changed the weapon default definitions
As most of its weapons try to override the defaults this resulted in two SpreadDamageWarheads (Warhead: and Warhead@1Dam:) for each weapon
2016-02-12 16:56:23 +01:00
Oliver Brakmann
6fa4b2bbda Fix missing 'Cancel' buttons on some confirmation prompts 2016-02-12 16:48:59 +01:00
abcdefg30
3604d901b1 Fix the missleading wording of the confirm dialogs 2016-02-12 16:48:58 +01:00
abcdefg30
b8942d4298 Merge pull request #10639 from RockyTV/replay-fix
Wrap OpenRA.exe arguments in quotes
2016-02-11 15:01:37 +01:00
RoosterDragon
3b480ea4bb Create singletons for AttackOrFleeFuzzy rulesets.
This avoids the cost of recreating the engines and rules for every AI and AI squad.
2016-02-10 20:17:27 +00:00
Codes4Fun
c9ed97524f Fix for 7539.
When the bridge damage state changes, the domain cells of the bridge
would pull in the first neighbors domain which may be untraversable.
This change only pulls the domain of traversable neighbor tiles.
2016-02-09 14:38:16 -08:00
Oliver Brakmann
6093398de3 Merge pull request #10543 from whinis/RestartSkirmish
Restart skirmish matches
2016-02-09 20:42:02 +01:00
Alexandre Oliveira
bcb8daba84 Wrap OpenRA arguments in quotes
On Windows, if the path to the replay contained spaces, it wouldn't be parsed correctly and would crash the game.
2016-02-09 11:21:00 -02:00
Matthias Mailänder
93466c74ba Merge pull request #10701 from pchote/map-cleanup-part-4
Remove automatic map format upgrades and add versioned user map dirs
2016-02-08 23:08:55 +01:00
Matthias Mailänder
a5bc4f756d Merge pull request #10721 from pchote/assemblycleanup
Fix mod assembly loading on Windows.
2016-02-08 23:00:09 +01:00
Paul Chote
f839e96ea7 Use versioned user map directories. 2016-02-08 18:53:28 +00:00
Paul Chote
34910cd128 Move map format upgrades to an explicit upgrade rule. 2016-02-08 18:53:28 +00:00
Paul Chote
e4867ad18a Clean up GetMapHash lint rule. 2016-02-08 18:51:58 +00:00
Paul Chote
6c7b687f34 Move map UID calculation to a static method. 2016-02-08 18:51:58 +00:00
Paul Chote
6c6826c3f3 Fix mod assembly loading on Windows. 2016-02-07 23:38:12 +00:00
Matthias Mailänder
e0d74455f5 Merge pull request #10720 from GraionDilach/gen2-map-import-waypoint-fix
Do not crash during importing a TS map if a waypoint ID isn't an integer.
2016-02-07 21:36:28 +01:00
Oliver Brakmann
5d88b7fae2 Merge pull request #10716 from Mailaender/all-assets
Re-enabled All Packages which seems to be fast enough now.
2016-02-07 21:10:31 +01:00
Pavel Penev
336fee45b1 Merge pull request #10719 from pchote/filesystem-loadscreens
Load Loadscreen images via the virtual filesystem.
2016-02-07 21:48:41 +02:00
Matthias Mailänder
aec74d8f7f Only list packages with viewable contents. 2016-02-07 20:24:44 +01:00
Matthias Mailänder
f87a4bf16f Default to the all packages instead of the first. 2016-02-07 20:24:44 +01:00
Matthias Mailänder
5e0a89fa30 Re-enabled All Packages which seems to be fast enough now. 2016-02-07 20:24:42 +01:00
Paul Chote
f8992991f5 Load the load screen images from the virtual filesystem. 2016-02-07 17:57:05 +00:00
Paul Chote
79b039d8b9 Change ILoadScreen to take a ModData instance. 2016-02-07 17:57:05 +00:00
Oliver Brakmann
aaa5b37199 Merge pull request #10713 from pchote/filesystem-modmetadata
Unify static mod metadata collections.
2016-02-07 18:47:49 +01:00
Zimmermann Gyula
4aa9d26e12 Do not crash during gen2 map importing if a waypoint ID isn't an integer. 2016-02-07 18:40:12 +01:00
Paul Chote
2328de94a7 Fix d2k dll reference. 2016-02-07 17:11:35 +00:00
Paul Chote
62402e0e2e Unify static mod metadata collections. 2016-02-07 16:28:04 +00:00
Oliver Brakmann
d4aa28e221 Merge pull request #10706 from pchote/filesystem-assemblies
Loads mod assemblies via the virtual filesystem.
2016-02-07 16:53:33 +01:00
Oliver Brakmann
02f25b0692 Merge pull request #10704 from pchote/filesystem-fonts
Loads fonts via the virtual filesystem.
2016-02-07 16:41:34 +01:00
Whinis
f2260174f0 Changes to allow restarting of skirmish match 2016-02-07 10:22:54 -05:00
Oliver Brakmann
1df728adad Merge pull request #10697 from pchote/map-cleanup-part-2
Remove Map references from MapPreview.
2016-02-07 15:47:37 +01:00
Oliver Brakmann
ce0e092432 Merge pull request #10707 from RoosterDragon/mobile-fix
Fix mobile checks
2016-02-07 14:29:19 +01:00
abcdefg30
d5b37edccb Merge pull request #10712 from chrisforbes/map-cull
ra: Remove caffeinated, snowy-ridge
2016-02-07 12:59:59 +01:00
Paul Chote
879987960e Merge pull request #10603 from Mailaender/appveyor-nsis-pr-version
Fixed AppVeyor pull request artifact suffixes
2016-02-07 11:10:56 +00:00
Chris Forbes
a1a2796292 ra: Remove caffeinated, snowy-ridge
These are both terrible.

Caffeinated is my old RA95 study of how much
detailing you could get away with; it has horribly unbalanced resources
and spawn locations.

Snowy-ridge is a 1v1v1 so small that you can shoot from one base to
another, and the bottom player has a serious disadvantage.

Signed-off-by: Chris Forbes <chrisf@ijw.co.nz>
2016-02-07 22:30:02 +13:00
Paul Chote
7015a2e12f Loads mod assemblies via the virtual filesystem. 2016-02-06 22:42:27 +00:00
Paul Chote
8b5592e1dd Reduce jank in the mission chooser. 2016-02-06 22:30:50 +00:00
Paul Chote
7b00da04ca Remove MapPreview.Map. 2016-02-06 22:30:50 +00:00
Paul Chote
3708a7649d Remove MapPreview.CacheRules. 2016-02-06 22:30:49 +00:00
Paul Chote
4328f24276 Remove unnecessary Map usage from MissionBrowserLogic. 2016-02-06 22:30:49 +00:00
Paul Chote
e13e0792f6 Remove unnecessary Map usage from MainMenuLogic. 2016-02-06 22:30:49 +00:00
Paul Chote
d5e3fbf452 Store map path in MapPreview. 2016-02-06 22:30:49 +00:00
Paul Chote
6628bc046f Add a Map reference to LobbyLogic. 2016-02-06 22:30:46 +00:00
Paul Chote
4ec3997be6 Rename LobbyPreview.Map to LobbyLogic.MapPreview. 2016-02-06 22:30:25 +00:00
Paul Chote
7a5678ec39 Move MapVisibility to MapPreview. 2016-02-06 22:28:35 +00:00
Pavel Penev
6aac8c5f70 Merge pull request #10705 from pchote/filesystem-lint
Fix lint test yaml loading.
2016-02-07 00:24:49 +02:00
RoosterDragon
7fe42d7493 Fix mobility checks when we aren't checking a realized actor. 2016-02-06 22:18:30 +00:00
Matthias Mailänder
60e86f73d0 Merge pull request #10702 from RoosterDragon/map-contains-fix
Fix Map.Contains for maps with height
2016-02-06 23:02:56 +01:00
Oliver Brakmann
a6e98620c0 Merge pull request #10650 from pchote/remove-fragile-diplomacy
Remove fragile diplomacy.
2016-02-06 22:55:55 +01:00
Paul Chote
844e1a1770 Loads fonts via the virtual filesystem. 2016-02-06 21:24:43 +00:00
Paul Chote
e1c73beede Fix CheckSequences to load via the filesystem. 2016-02-06 21:15:31 +00:00
Paul Chote
789d3c172a Fix CheckSequenceSprites to load via the filesystem. 2016-02-06 21:12:21 +00:00
Paul Chote
ce55b0454e Fix CheckChromeLogic lint test to load via the filesystem. 2016-02-06 21:12:07 +00:00
Oliver Brakmann
870867760a Merge pull request #10696 from RoosterDragon/self-assumed-not-null
Remove null checks against self
2016-02-06 21:22:52 +01:00
RoosterDragon
36e09990ca Fix Map.Contains checks for maps with height.
If a cell lacked any valid projected cells, then it is off the map entirely. The previous logic would think such a cell was within the map as none of projected cells were out of bounds (as there were no projected cells to fail the check).
2016-02-06 17:55:27 +00:00
Oliver Brakmann
8588f36575 Merge pull request #10687 from pchote/filesystem-yaml
Load mod yaml via the virtual filesystem.
2016-02-06 17:54:27 +01:00
Paul Chote
1442056cb1 Lint sequences using the external utility command. 2016-02-06 16:33:22 +00:00
Paul Chote
1f4269df76 Make travis fetch the mod content before running tests. 2016-02-06 16:30:23 +00:00
Paul Chote
4a12e7bafc Load mod yaml via the virtual filesystem. 2016-02-06 16:30:23 +00:00
Paul Chote
45bae7e9b3 Mount the mod filesystem context in the ModData ctor. 2016-02-06 16:30:23 +00:00
Paul Chote
b81d2d8333 Fix incorrect ModFiles.Open(resolved path). 2016-02-06 16:30:22 +00:00
Pavel Penev
c44f0d4120 Merge pull request #10692 from pchote/map-cleanup-part-1
Move CellCorners to MapGrid.
2016-02-06 17:15:13 +02:00
Oliver Brakmann
bb044a34d5 Merge pull request #10670 from RockyTV/rockytv
Disable 1 human versus bots games
2016-02-06 15:36:22 +01:00
Oliver Brakmann
7a0825ce92 Merge pull request #10381 from penev92/warheadEffects
Enhance CreateEffectWarhead
2016-02-06 13:35:52 +01:00
Paul Chote
626fa0b60b Move CellCorners to MapGrid. 2016-02-05 23:00:14 +00:00
RoosterDragon
4b308dee02 Remove checks for self being null in Mobile.cs. 2016-02-05 22:11:11 +00:00
RoosterDragon
ddea517b19 Merge pull request #10587 from Mailaender/gps-refactor
Cleaned up the GPS code a bit
2016-02-04 18:09:25 +00:00
Alexandre Oliveira
989bf4f807 Disable 1 human versus bots games
Changed the Server.LockBots setting to Server.DisableSinglePlayer.

If the setting is enabled, and there is only one client in the server,
the game won't start.
2016-02-03 20:32:34 -02:00
Oliver Brakmann
25bdad4ee5 Ensure widget creation happens after traits are loaded
This is to make sure that traits' `WorldLoaded` method runs before widgets are created.
2016-02-03 22:43:09 +01:00
Matthias Mailänder
19149e4c69 Add decoration when hospital healing is enabled in TD. 2016-02-03 22:14:03 +01:00
Zimmermann Gyula
02010a6dd2 Add art for medkit decoration to TD. 2016-02-03 22:13:20 +01:00
Oliver Brakmann
951336689b Merge pull request #10667 from Mailaender/mcs
Updated to use the unified Mono compiler suite
2016-02-03 19:15:08 +01:00
Oliver Brakmann
1dbb75482b Merge pull request #10616 from Mailaender/bio-immunity
Added HazMat suites to Tiberian Dawn
2016-02-03 19:02:24 +01:00
Matthias Mailänder
712a2b2896 Merge pull request #10554 from pchote/remove-package-order
Remove IReadOnlyPackage.Priority
2016-02-02 21:26:14 +01:00
Paul Chote
00945dc9ef Tidy IReadOnlyPackage interface and implementations. 2016-02-01 22:49:12 +00:00
Paul Chote
feab81bdea Remove IReadOnlyPackage.Priority.
Priority is now determined solely by order in mod.yaml
(later packages take priority of earlier ones).
2016-02-01 22:49:11 +00:00
Paul Chote
cbfd9bb921 Properly handle multiple mount/unmount requests. 2016-02-01 22:49:11 +00:00
Paul Chote
fcccc0f5f9 Merge mod Folders into Packages. 2016-02-01 22:49:11 +00:00
Matthias Mailänder
f67e682041 Merge pull request #10669 from RoosterDragon/vs-version
Update VS version in solution file
2016-02-01 21:45:24 +01:00
abcdefg30
ac2455824c Merge pull request #10653 from Mailaender/common-metrics
Moved shared metrics to mods/commons.
2016-02-01 12:00:53 +01:00
RoosterDragon
0a6009a1b0 Update version in solution file to match VS 2015 Update 1. 2016-01-31 23:05:05 +00:00
abcdefg30
1cc8330c51 Merge pull request #10535 from pchote/mix-type-autodetection
Auto-detect mix hash type.
2016-01-31 22:57:14 +01:00
Matthias Mailänder
a19baa9500 Merge pull request #10657 from RoosterDragon/sync-perf
Improve sync performance
2016-01-31 22:56:08 +01:00
Matthias Mailänder
5ba304619d Merge pull request #10659 from obrakmann/fix10593_gdi03-invalid-tile
Replace invalid tile in gdi03
2016-01-31 20:12:39 +01:00
Matthias Mailänder
44bd704799 Don't recommend WinForms on Debian
as that isn't a requirement anymore.
2016-01-31 20:04:46 +01:00
Matthias Mailänder
dc24d004c4 Don't recommend mono-mcs
as it is already a dependency of mono-devel.
2016-01-31 20:04:22 +01:00
Matthias Mailänder
c7b6695328 Don't recommend cli-common-dev
as it is meant to be for DEB building.
2016-01-31 20:03:44 +01:00
Matthias Mailänder
9bb130928b Don't use deprecated Mono compilers. 2016-01-31 19:44:07 +01:00
Matthias Mailänder
4278eff253 Merge pull request #10642 from Sapena/flood_fill
Recovered flood fill functionality from the old editor
2016-01-31 18:49:17 +01:00
Matthias Mailänder
f6c669d6d4 Merge pull request #10611 from reaperrr/flip-offsets1
Make FlipX/FlipY flip respective embedded offsets as well
2016-01-31 18:27:50 +01:00
Matthias Mailänder
77585735ad Update to Mono.Nat version 1.2.24 2016-01-31 18:14:24 +01:00
Matthias Mailänder
a6a789b878 Update to SharpFont 3.1.0 2016-01-31 18:14:01 +01:00
Oliver Brakmann
bbe8b199ed Add decoration when HazMat suits are enabled in TD 2016-01-31 17:10:46 +01:00
Zimmermann Gyula
e69fcd385b Add art for HazMat decoration to TD 2016-01-31 17:10:46 +01:00
Matthias Mailänder
33f649e949 Grant Tiberium immunity from biolab captures. 2016-01-31 17:10:46 +01:00
Matthias Mailänder
76066c65bd Disable trainable dinos. 2016-01-31 17:10:46 +01:00
Oliver Brakmann
8291cffb1c Merge pull request #10608 from reaperrr/ra-no-sw-tech2
Enable Chrono Tank at "No Superweapons"
2016-01-31 16:39:34 +01:00
Oliver Brakmann
738bf44569 Merge pull request #10588 from Mailaender/eluant-20160124
Updated to Eluant version 20160124
2016-01-31 16:25:47 +01:00
Oliver Brakmann
5fdce51699 Merge pull request #10551 from RockyTV/rockytv
Change CONNECTIONFAILED_PANEL title if server requires password
2016-01-31 16:14:21 +01:00
Oliver Brakmann
e532637a24 Merge pull request #10404 from Mailaender/legacy-map-import-refactor
Organized legacy map import into respective mod DLLs
2016-01-31 15:31:02 +01:00
Pavel Penev
6913ac29e6 Clean up some dead YAML from Fort Lonestar and Drop Zone W weapons definitions
There haven't been WaterExplosion and WaterImpactSound properties on CreateEffectWarhead for quite a while.
2016-01-31 16:22:48 +02:00
Pavel Penev
489ee9fc54 Add support for multiple impact sounds to CreateEffectWarhead
Have the engine pick one impact sound at random from the provided list.
2016-01-31 16:22:47 +02:00
Pavel Penev
7e3ec91d30 Add support for multiple explosions to CreateEffectWarhead
Have the engine pick one explosion at random from the provided list.
2016-01-31 16:22:09 +02:00
Oliver Brakmann
d336904c52 Merge pull request #10517 from reaperrr/d2k-cleanup1
Some D2k clean-ups
2016-01-31 15:19:53 +01:00
Oliver Brakmann
9dbb725cef Replace invalid tile in gdi03 2016-01-31 12:36:22 +01:00
RoosterDragon
dc37574494 Cache sync hash functions per actor for faster sync calculations.
Caching the result of the function lookup allows the actor to calculate all the sync hashes for its syncable traits faster as it does not need to repeat the lookup each time.
2016-01-31 00:44:43 +00:00
RoosterDragon
eb3be990a6 Remove dead code and encapsulate more in Sync.cs. 2016-01-31 00:42:00 +00:00
Matthias Mailänder
690e5125ec Move shared metrics to mods/commons. 2016-01-30 23:03:37 +01:00
Philipp Schärer
b0cd4ec367 Fixed styling issues and TS compatibility 2016-01-30 22:17:23 +01:00
Oliver Brakmann
c22281876c Merge pull request #10651 from Phrohdoh/widget-xmldoc
Add xmldoc to Widget.HandleMouseInput
2016-01-30 22:06:25 +01:00
Matthias Mailänder
10ebd7e48d Merge pull request #10649 from obrakmann/radar-team-colors
Added option to show team colors on radar map
2016-01-30 21:53:14 +01:00
Paul Chote
b387e6a19e Polish the lobby option bin layout. 2016-01-30 20:47:57 +00:00
Paul Chote
73b3f20921 Remove fragile alliances feature. 2016-01-30 20:47:50 +00:00
Oliver Brakmann
aa491a35c8 Fix Monster Tank Madness to not use Player.SetStance 2016-01-30 20:47:49 +00:00
Matthias Mailänder
5ae86d86a9 Merge pull request #10637 from reaperrr/d2k-split-weapons
Split D2k weapons.yaml
2016-01-30 21:44:37 +01:00
Taryn Hill
d12fd9de86 Add xmldoc to Widget.HandleMouseInput 2016-01-30 14:41:53 -06:00
Philipp Schärer
32b599266c Recovered flood fill functionality from the old editor 2016-01-30 20:38:50 +01:00
Oliver Brakmann
7ca1af4e96 Merge pull request #10648 from pchote/rewrite-yaml-merger
Rewrite yaml merger
2016-01-30 20:04:53 +01:00
reaperrr
0bfe9a701a Fix faction-specific upgraded factory images for mercenaries and smugglers 2016-01-30 17:45:03 +01:00
Paul Chote
f8f3d1deb4 Fix allies-05a map yaml. 2016-01-30 15:03:57 +00:00
Paul Chote
3e3c11ea5c Remove duplication between vice and pvice sequences. 2016-01-30 15:03:56 +00:00
Paul Chote
ab921682c4 Rewrite yaml merger. 2016-01-30 15:03:56 +00:00
DArcy Rush
eb795909da Implement player stance colors
Adds an option to display actors on radar and
support weapon timers in colors denoting the
diplomatic stance toward the player.
2016-01-30 15:46:55 +01:00
Paul Chote
1581ba951f Add a new test case for actor info merging. 2016-01-30 11:55:37 +00:00
reaperrr
c19383472f Merge pull request #10624 from pchote/overhaul-color-validator
Fix color validator issues and increase color picker palette size.
2016-01-29 23:57:46 +01:00
reaperrr
930aeb71c4 Some misc D2k cleanup
C. Yard doesn't need DamagedWithoutFoundation, aircraft aren't selectable so they don't need a voice, ordos tank ROT matches default, RepairBuildings on carryall is redundant.
2016-01-29 23:18:09 +01:00
reaperrr
daef6283c1 Add Mercenaries and Smugglers to D2k
Rename some structures.
2016-01-29 23:18:07 +01:00
reaperrr
42711dbe7b Merge pull request #10638 from obrakmann/git-ignore-support-dir
Add Support directory to .gitignore file
2016-01-29 23:14:28 +01:00
Oliver Brakmann
ee3d8b50f7 Merge pull request #10641 from reaperrr/fix-cpZ0
Fix Mobile using legacy CenterPosition.Z check
2016-01-29 23:08:14 +01:00
Oliver Brakmann
4e44e6b914 Merge pull request #10640 from abcdefg30/removeReveals
Remove obsolete and performance costly RevealsShroud definitions
2016-01-29 23:04:56 +01:00
Oliver Brakmann
7128e1b8f0 Merge pull request #10623 from riiga/icons
Improved GPS icons
2016-01-29 22:53:48 +01:00
reaperrr
75d066d6af Fix Mobile using legacy CenterPosition.Z check 2016-01-29 22:26:52 +01:00
abcdefg30
e8c67993c1 Remove obsolete and performance costly RevealsShroud definitions
from the APC on the dropzone maps.
2016-01-29 22:22:15 +01:00
riiga
7180f4fbef Improved GPS icons and added shadows to all icons 2016-01-29 22:19:54 +01:00
Paul Chote
31cc399579 Remove unused package annotations. 2016-01-29 20:41:20 +00:00
Paul Chote
cbf2b1984a Auto detect mix type. 2016-01-29 20:41:20 +00:00
Oliver Brakmann
ce8b03a276 Merge pull request #10530 from pchote/remove-external-hashes
Index filesystem contents by filename instead of hash.
2016-01-29 21:12:31 +01:00
Paul Chote
6085de7263 Remove unused PackagePaths. 2016-01-29 19:59:31 +00:00
Paul Chote
fa6b50f2a2 Fix filename case of D2K FMVs. 2016-01-29 19:56:17 +00:00
Paul Chote
f90b21b1b7 Fix D2K installation on case sensitive filesystems. 2016-01-29 19:56:17 +00:00
Paul Chote
314aba0861 Overhaul InstallShieldPackage.
- Remove hashing
- Use full file paths
- Replace BinaryReader with stream extensions.
2016-01-29 19:56:17 +00:00
Paul Chote
7ed24ce6de Remove legacy hashing from BagFile. 2016-01-29 19:56:17 +00:00
Paul Chote
ccdbdebdb1 Remove legacy hashing from D2kSoundResources. 2016-01-29 19:56:16 +00:00
Paul Chote
91c25d7b84 Remove unused Package.(Classic|Crc)Hashes. 2016-01-29 19:56:16 +00:00
Paul Chote
86e4cb763d Replace FileSystem hash index with a regular string cache.
This requires that .mix files have valid max database
entries for all files used by the mod.
2016-01-29 19:56:16 +00:00
Oliver Brakmann
8bec1f5c5b Add Support directory to .gitignore file 2016-01-29 20:43:58 +01:00
reaperrr
01cd6c93d9 Merge pull request #10633 from teees/nawast-fix
fix nawast popping up on gdi build menu, fixes #10631
2016-01-29 18:00:18 +01:00
reaperrr
ed3c0799d3 Do not consider waiting harvesters to be idle 2016-01-29 16:08:29 +01:00
reaperrr
1f35a1c010 Let harvesters tick idle for a while before queueing Wait activity 2016-01-29 16:08:28 +01:00
reaperrr
f38f159dad Remove Chronosphere from Chrono Tank prerequisite
And lower tech-level requirement to 'high', making it available at "No
Superweapons".
2016-01-29 15:55:07 +01:00
teees
97265be139 fix nawast popping up on gdi build menu, fixes #10631 2016-01-29 09:27:05 +01:00
reaperrr
75736cb127 Clean up Harvester and FindResources unblocking 2016-01-29 02:57:43 +01:00
reaperrr
7b315aa9cc Merge pull request #10562 from pchote/classic-facing-fudge
Implement ClassicFacingFudge for fudging classic facings.
2016-01-28 23:45:48 +01:00
Matthias Mailänder
4203feed40 Merge pull request #10576 from abcdefg30/bridgeRepaired
Add support for playing a BridgeRepaired notification
2016-01-28 20:09:05 +01:00
Matthias Mailänder
9f002050ec Merge pull request #10601 from pchote/fix-td-connection-dialog
Fix button positions on TD connection dialog.
2016-01-28 19:53:47 +01:00
Matthias Mailänder
4c86dad8d5 Merge pull request #10628 from teees/upgradeactorsnear-fix
Don't grant upgrades to newly built units while disabled
2016-01-28 15:15:23 +01:00
abcdefg30
a34818bb3e Merge pull request #10620 from teees/production-exit-fix
Fix units warping from an exit subcell to cellcenter when produced
2016-01-28 14:55:45 +01:00
reaperrr
27a67415e9 Merge pull request #10621 from teees/ts-fixes
Small ts rules fixes
2016-01-28 12:25:51 +01:00
teees
8315350f07 Don't grant upgrades to newly built units while disabled 2016-01-28 10:42:02 +01:00
Paul Chote
dd963b75f5 Per-terrain color validation. 2016-01-27 21:43:55 +00:00
Paul Chote
cc4ca839d9 Bind color mixer to validator range. 2016-01-27 21:43:55 +00:00
Paul Chote
66df822412 Enable ClassicFacingFudge in RA. 2016-01-27 21:39:51 +00:00
Paul Chote
2d9bbd9405 Enable ClassicFacingFudge in TD. 2016-01-27 21:39:50 +00:00
Paul Chote
608b5d1674 Add UseClassicFacingFudge flag for TD/RA. 2016-01-27 21:32:21 +00:00
Paul Chote
fe60f5a77f Introduce Turreted.WorldOrientation. 2016-01-27 21:32:21 +00:00
Paul Chote
7638746069 Define additional constraints in HSV space. 2016-01-27 19:56:04 +00:00
Paul Chote
617295cc91 Overhaul color validator logic. 2016-01-27 19:49:03 +00:00
Matthias Mailänder
e11afaf55b Update to SDL 2.0.4 on Windows. 2016-01-27 20:25:55 +01:00
Paul Chote
1832a9c60f Increase the size of the color picker. 2016-01-27 19:16:37 +00:00
teees
c5da3623ac fix spelling mistake 2016-01-27 15:08:09 +01:00
teees
3088230c29 Add EjectOnDeath for civilian transport vehicles 2016-01-27 14:19:41 +01:00
teees
55fd75edce Use correct armor type 2016-01-27 14:19:41 +01:00
teees
e721bb9602 Use correct crushing behavior 2016-01-27 14:19:41 +01:00
teees
cb3be2cd0d Fix units visually moving to a bogus subcell via MoveIntoWorld 2016-01-27 12:01:37 +01:00
Oliver Brakmann
2f2d7e1083 Merge pull request #10592 from RoosterDragon/fa-debug
Debug frozen actors without footprints
2016-01-26 23:24:08 +01:00
Oliver Brakmann
8584ed710e Merge pull request #10564 from abcdefg30/botUnderAttack
Added support for playing a "Our ally is under attack" notification
2016-01-26 23:20:41 +01:00
reaperrr
fd632baa5b Flip embedded offsets along when flipping sequences
Instead of only flipping the sprite, but not the baked-in offsets.
2016-01-26 22:01:27 +01:00
RoosterDragon
68eda63008 Add some debugging code to catch frozen actors without footprints. 2016-01-26 20:45:04 +00:00
abcdefg30
a2753ad1e4 Make use of the OurAllyIsUnderAttack notification in ts 2016-01-26 21:16:37 +01:00
abcdefg30
79829c5270 Add support for playing a "Our ally is under attack" notification 2016-01-26 21:16:29 +01:00
abcdefg30
a56ffb581f Move some checks in *AttackNotifier to improve performance 2016-01-26 21:10:12 +01:00
Matthias Mailänder
faff5aadca also version pull request artifacts 2016-01-26 20:17:00 +01:00
Oliver Brakmann
2ae9bc7ebd Merge pull request #10567 from Mailaender/passenger-upgrade-lint
Fixed Passenger missing UpgradeGrantedReference
2016-01-26 20:11:36 +01:00
Oliver Brakmann
5bd474f3d0 Merge pull request #10573 from Mailaender/ts-exit-offsets
Adjusted the Tiberian Sun harvester spawn point
2016-01-26 20:06:44 +01:00
Matthias Mailänder
c3629a93a3 Merge pull request #10610 from riiga/uipolish
Use player name as default for global chat
2016-01-26 20:01:49 +01:00
Matthias Mailänder
dd18e2f632 Merge pull request #10600 from pchote/fix-td-spec-kick
Fix spectator kick button in TD lobby.
2016-01-26 19:52:21 +01:00
Oliver Brakmann
4b02134b2d Merge pull request #10594 from abcdefg30/sizeD2k
Fix a crash in d2k caused by empty bounds
2016-01-26 19:30:30 +01:00
Oliver Brakmann
e0bf307d4d Merge pull request #10596 from abcdefg30/d2kNotifications
Add all remaining d2k speech notifications
2016-01-26 19:25:18 +01:00
riiga
38c5ad35fa Uses player name as default for global chat 2016-01-26 19:20:07 +01:00
Oliver Brakmann
a2639da5e8 Merge pull request #10602 from pchote/fix-td-aircraft-fog-visibility
Fix TD aircraft being visible through fog.
2016-01-26 18:59:18 +01:00
reaperrr
f4c4997d60 Merge pull request #10580 from pchote/ra-no-sw-tech
Add a "no superweapons" tech level to RA.
2016-01-26 16:58:07 +01:00
Paul Chote
49eb521db0 Fix aircraft without sight being visible under fog. 2016-01-25 21:04:08 +00:00
Paul Chote
fd06b8abc3 Fix button positions on TD connection dialog.
"forward" acting buttons go on the right.
"back" acting buttons go on the left.
2016-01-25 21:00:47 +00:00
Paul Chote
9f6a6b31e9 Fix spectator kick button in TD lobby. 2016-01-25 20:56:26 +00:00
Matthias Mailänder
0878f5f371 Merge pull request #9981 from teees/gates-trait
Added gates to Tiberian Sun
2016-01-25 19:51:01 +01:00
abcdefg30
d087a16042 Fix a crash in d2k caused by empty bounds
This adds respective checks to Building.cs.
2016-01-25 16:44:17 +01:00
abcdefg30
386acdcfc9 Merge pull request #10536 from Mailaender/warn-nobots
Added a warning when bots have been disabled
2016-01-25 16:35:42 +01:00
abcdefg30
b8c59c5fad Add all remaining d2k speech notifications
except the MAP* notifications because they differ between the factions
and are used in the mission selector only.
2016-01-25 16:26:53 +01:00
abcdefg30
27c6829b65 Arrange the d2k speech notifications in alphabetical order 2016-01-25 15:59:22 +01:00
teees
5ca9f52a62 IWallConnectorInfo to allow gates connect to walls in map editor 2016-01-25 09:25:36 +01:00
teees
3dc63999e3 Fix for BlockProjectiles to ignore blockers with height <= 0 2016-01-25 09:14:00 +01:00
teees
18e26d87c7 Add support for multiple IWallConnector traits 2016-01-25 09:14:00 +01:00
Paul Chote
1de1458fda Fix wall adjacency for multi-cell neighbours. 2016-01-25 09:14:00 +01:00
teees
65e1e301f4 Added Gates
FIXUP: account for full gate footprint when updating neighbours.

FIXUP: gate-wall connection adjacency yaml.
2016-01-25 09:14:00 +01:00
teees
3d597c7880 Add IBlocksProjectiles interface to avoid using BlocksProjectiles directly 2016-01-25 09:14:00 +01:00
teees
7f2feb29cd Added IWallConnector trait interface 2016-01-25 09:14:00 +01:00
Paul Chote
8ade035049 Add support for loading CVec[] from yaml. 2016-01-25 09:14:00 +01:00
Paul Chote
963a92214d Fix line build for multi-cell neighbours. 2016-01-25 09:14:00 +01:00
Matthias Mailänder
1555c163cb add singleplayer briefing extraction 2016-01-24 21:50:12 +01:00
abcdefg30
73e68773e0 Use the BridgeRepaired notification in ts 2016-01-24 21:16:27 +01:00
abcdefg30
db1d83fc4e Add support for playing a BridgeRepaired notification 2016-01-24 21:16:26 +01:00
abcdefg30
085367ced6 Merge pull request #10461 from RoosterDragon/partition-bounds
Calculate better upper bounds in SpatiallyPartitioned.
2016-01-24 21:13:55 +01:00
Oliver Brakmann
8fe90999a5 Merge pull request #10462 from RoosterDragon/partition-no-empty
Prevent items without size from being added to SpatiallyPartitioned.
2016-01-24 20:59:25 +01:00
Matthias Mailänder
d2848696fa Update Eluant to version 20160124. 2016-01-24 19:37:46 +01:00
Matthias Mailänder
a11a183cad GpsWatcher.Owner is not used anywhere else 2016-01-24 19:25:37 +01:00
Matthias Mailänder
91041fbea3 no need to cast this 2016-01-24 19:25:37 +01:00
Matthias Mailänder
a2398d2e00 annotate spy satellite related palettes and sprites 2016-01-24 19:25:37 +01:00
Matthias Mailänder
38625ec6f8 avoid an unneccessary abbreviation 2016-01-24 19:25:37 +01:00
Matthias Mailänder
f709ef891a document and expose GpsDot strings to lint testing 2016-01-24 19:25:33 +01:00
Matthias Mailänder
29e6f53a78 document interdependencies 2016-01-24 16:52:37 +01:00
Matthias Mailänder
6c56ac39c6 split GpsWatcher into it's own file 2016-01-24 16:48:44 +01:00
Matthias Mailänder
5c1a236a75 split mod specific parts of legacy map import 2016-01-24 15:40:35 +01:00
Matthias Mailänder
2b38a0b279 add crate actors for legacy map compatibility 2016-01-24 15:40:31 +01:00
Matthias Mailänder
0d497c6a16 this class should not be public 2016-01-24 15:30:36 +01:00
abcdefg30
3de5e7fea1 Merge pull request #10571 from Mailaender/wwcrate
Added the water variant for the wooden crate
2016-01-24 15:02:53 +01:00
abcdefg30
ec30f38b7e Merge pull request #10584 from Mailaender/ai-armed-harvesters
Fixed AI using armed harvesters for combat
2016-01-24 14:48:05 +01:00
Matthias Mailänder
8b5dac7c6f Merge pull request #10585 from abcdefg30/unhardcodeBridges
Unhardcode the cursors used by RepairsBridges
2016-01-24 14:27:12 +01:00
abcdefg30
13d271308d Merge pull request #10583 from Mailaender/tactical-terrace
Added original TS maps Tactical and Terraces
2016-01-24 14:22:35 +01:00
abcdefg30
3fa926c9bd Merge pull request #10582 from Mailaender/crat0c
Added missing CRAT0C rule
2016-01-24 14:20:00 +01:00
abcdefg30
f52210c15b Unhardcode the cursors used by RepairsBridges 2016-01-24 14:14:23 +01:00
Matthias Mailänder
922217271c don't actively attack nor defend with armed harvesters 2016-01-24 14:05:00 +01:00
abcdefg30
4df876382f Merge pull request #10579 from Mailaender/kate
Added support for the Kate text editor
2016-01-24 14:01:01 +01:00
Matthias Mailänder
03590b13cc check the cheap bool before expensive trait lookups 2016-01-24 13:52:44 +01:00
Oliver Brakmann
3d4f6f8e57 Merge pull request #10577 from riiga/upstream/buildingtabplacement
Moved Kennel in Soviet buildings tab as per issue 8973
2016-01-24 13:36:29 +01:00
Matthias Mailänder
e50e07c67c add map Terraces 2016-01-24 13:33:44 +01:00
Matthias Mailänder
cf182cc9f9 add map Tactical 2016-01-24 13:33:31 +01:00
Matthias Mailänder
4d02ae27ae add missing CRAT0C definition 2016-01-24 13:30:27 +01:00
Matthias Mailänder
e6213c864b Merge pull request #10581 from reaperrr/remove-charge-bitrot
Remove bitrotted WeaponInfo.Charges
2016-01-24 13:16:23 +01:00
reaperrr
56ab3f43da Remove bitrotted WeaponInfo.Charges
There is no logic attached anymore (or never was).
2016-01-24 12:58:39 +01:00
Paul Chote
b83247187a Increase the width of the RA lobby option dropdowns. 2016-01-24 11:48:09 +00:00
Paul Chote
df30257881 Add a "No Superweapons" tech level. 2016-01-24 11:33:30 +00:00
Matthias Mailänder
2876522617 Add a Kate project file. 2016-01-24 10:58:31 +01:00
riiga
04f506928c Moved Kennel in Soviet buildings tab as per issue 8973 2016-01-23 23:48:04 +01:00
Matthias Mailänder
eefd6c45ef Fix TS harvester spawn point. 2016-01-23 17:59:24 +01:00
abcdefg30
6b008a1b71 Merge pull request #10563 from whinis/ObeliskFix
Fixes Obelisk not attacking again after a forced attack command
2016-01-23 17:47:15 +01:00
Whinis
ad81b2ee68 Fixes Obelisk not attacking again after a forced attack command 2016-01-23 11:40:51 -05:00
Matthias Mailänder
9d3a3dd9e5 Merge pull request #10568 from abcdefg30/waterCrates
Fix crates not showing their water animation
2016-01-23 15:10:26 +01:00
Matthias Mailänder
756d4f2374 simplify steel crate sequences 2016-01-23 15:07:21 +01:00
Matthias Mailänder
c3bca38987 add the water variant for the wooden crate 2016-01-23 14:58:04 +01:00
Matthias Mailänder
2420509bb6 add lint references to all crate body sequences 2016-01-23 14:56:50 +01:00
Matthias Mailänder
8b478e3d0a Merge pull request #10569 from abcdefg30/PrimaryNote
Unhardcode the "PrimaryBuildingSelected" notification
2016-01-23 14:09:41 +01:00
Paul Chote
5f4ca605bd Merge pull request #10420 from Mailaender/revert-fixAttack
Revert "Don't attack actors that you can't see"
2016-01-23 12:45:55 +00:00
abcdefg30
71c804781e Unhardcode the "PrimaryBuildingSelected" notification 2016-01-23 13:41:18 +01:00
abcdefg30
b1fac69b01 Make the INotifyParachuteLanded implementation in WithCrateBody.cs explicit 2016-01-23 13:22:11 +01:00
abcdefg30
4a67104603 Fix crates not showing their water animation
when they are not paradropped.
2016-01-23 13:21:29 +01:00
Matthias Mailänder
dcd1f5ba3c add missing UpgradeGrantedReference to Passenger 2016-01-23 12:11:08 +01:00
Matthias Mailänder
7aa6921c72 Merge pull request #10557 from abcdefg30/queueCleanup
More cleanup in the production logic
2016-01-23 10:52:33 +01:00
Oliver Brakmann
97d10da39b Merge pull request #10478 from pchote/fix-replay-support-timers
Sync replay support timers to original game time.
2016-01-22 23:19:25 +01:00
reaperrr
ef290a9596 Split D2k weapons.yaml
To make things more organized and in line with other mods.
2016-01-22 17:09:57 +01:00
abcdefg30
ed3f3706f9 Reduce trait lookups further by adding a BuildableInfo parameter to GetBuildTime 2016-01-21 22:29:01 +01:00
abcdefg30
4e0775b59e Remove the unused ISync implementation in ClassicProductionQueue.cs
The base class ProductionQueue already implements ISync
2016-01-21 22:24:51 +01:00
abcdefg30
5496245a00 Remove unnecessary lookups and checks
- We already return early if the unit doesn't have a BuildableInfo
- World.Map.Rules.Actors[actorName] won't return null
- Made BuildUnit use an ActorInfo instead of the name as parameter
2016-01-21 22:24:50 +01:00
abcdefg30
17daac11a1 Avoid unnecessary lookups in the production logic
by improving the GetBuildTime method and moving lookups around.
2016-01-21 22:24:49 +01:00
Matthias Mailänder
6272d79072 Merge pull request #10561 from obrakmann/fix10560_fix-1st-spy-hideout-sov03
Fix bogus conditional in soviet03 lua script
2016-01-21 21:43:31 +01:00
Oliver Brakmann
26ad018348 Fix bogus conditional in soviet03 lua script 2016-01-21 21:28:05 +01:00
abcdefg30
2ee7e11064 Merge pull request #10488 from obrakmann/fix10451_printing_money_with_spies
Change guaranteed amount of stolen funds to spy's value
2016-01-21 21:27:48 +01:00
Matthias Mailänder
eb9fb75d3c warn players if bots have been disabled 2016-01-21 21:25:23 +01:00
abcdefg30
fac6459b19 Merge pull request #10526 from obrakmann/koth-refactor
Improve ProximityCapturable
2016-01-21 20:38:57 +01:00
Oliver Brakmann
a612ca9c5f Use proper speech notification for InfiltrateForCash 2016-01-21 20:35:28 +01:00
Oliver Brakmann
159a760941 Merge pull request #10558 from abcdefg30/chronoCursor
Unhardcode the chronoshift cursor sequences
2016-01-21 20:22:29 +01:00
Oliver Brakmann
a0f3c576e5 Merge pull request #10532 from abcdefg30/polish
Apply some general polish to the code/yaml
2016-01-21 20:18:57 +01:00
Matthias Mailänder
7ef640dfba Merge pull request #10553 from AoAGeneral/bleed
MSAM Trajectory change.
2016-01-21 20:06:03 +01:00
Matthias Mailänder
08abc2f873 Merge pull request #10552 from AoAGeneral/upstream/myfeature
TD Balance Changes v1192016
2016-01-21 20:03:48 +01:00
Matthias Mailänder
df695fed7f Merge pull request #10555 from pchote/fix-installation
Fix TD/RA/TS installation from CD.
2016-01-21 19:58:04 +01:00
abcdefg30
ab7907c5a1 Unhardcode the chronoshift cursor sequences 2016-01-21 17:43:41 +01:00
abcdefg30
03ed54b3fb Merge pull request #10537 from pchote/move-util
Move OpenRA.Traits.Util to Mods.Common
2016-01-21 17:13:03 +01:00
abcdefg30
2437091760 Remove yaml duplication in ts by creating ^Cloakable and using inheritance 2016-01-21 15:41:35 +01:00
abcdefg30
6bbab081d1 Fix wrong indentation in ProductionPaletteWidget.cs 2016-01-21 15:41:34 +01:00
abcdefg30
fdfea2f0fb Fix style errors in ProductionQueue.cs 2016-01-21 15:41:33 +01:00
abcdefg30
3106336c6a Add missing spaces to the rallypoint sequences in misc.yaml 2016-01-21 15:41:33 +01:00
abcdefg30
e37d804a5a Replace spaces by tabs in UpgradeRules.cs 2016-01-21 15:41:32 +01:00
abcdefg30
a8475d7fcd Merge pull request #10541 from Mailaender/unhardcode-chronoshift-palette-sequences
Unhardcode ChronoShift palettes and sequences
2016-01-21 14:30:49 +01:00
Paul Chote
00920b0060 Fix TD/RA/TS installation from CD. 2016-01-21 00:01:32 +00:00
Alexandre Oliveira
6f715a6a4e Change CONNECTIONFAILED_PANEL title if server requires password
If the server requires a password, display Password Required instead of the usual Connection Error title.
2016-01-20 18:44:36 -02:00
Paul Chote
b0bd252343 Move Util to Mods.Common. 2016-01-19 23:35:18 +00:00
Paul Chote
0039a2bdbf Split out an ActivityUtils class. 2016-01-19 23:34:13 +00:00
Paul Chote
e46fc644c1 Remove Util.QuantizeFacing from trait code. 2016-01-19 23:34:13 +00:00
Paul Chote
275be64f05 Remove Util.QuantizeFacing from support powers. 2016-01-19 23:34:13 +00:00
AoAGeneral
7ac1a1fb20 MSAM Trajectory change.
changes from 341 to 300.

This allows aircraft to escape the MSAM with the same mechanics as
current release. In https://github.com/OpenRA/OpenRA/pull/10552 the
reload speed was changed to prevent stand still. This allows them to
keep fire rates up rather then wasted fire.

The missile mechanic change is a great buff addition. Thank you very
much!
2016-01-19 14:05:04 -08:00
AoAGeneral
fb95776170 TD Balance Changes v1192016
Balance changes are as followed:

Increase power of AGT to 50 from 40.

MSAM faster reload to 45 from 100.

Increase APC damage vs light target to 105 from 100.

MLRS attack speed increase to 100 from 140.

Rocket Infantry damage increase to 35 from 30.

MCV Price increase to 4000 from 2000. Build time increase from 0:48 to
1:36.

MCV unit HP increase to 950 from 750. armor type Heavy from Light.

MCV now requires both Command Center and Repair Pad to produce.

Construction yard HP increase to 2000 from 1400.

Repair pad HP increase to 600 from 400.

Link discussion at:
http://www.sleipnirstuff.com/forum/viewtopic.php?f=82&p=294421#294421
2016-01-19 12:41:51 -08:00
Oliver Brakmann
4f2b1f5177 Make WithRangeCircle a little more flexible
* Added ability to show the circle in the player's colour.
* Added ability to show the circle either always or only when selected.
* Added ability to configure the stances players need to see the circle.
2016-01-19 21:07:50 +01:00
Oliver Brakmann
8b5df6bf2c Improve ProximityCapturable
The following changes are made:

* Replaced the custom actor search with ProximityTriggers.
* Added a `Sticky` flag, which causes the ownership to not revert back to
  the original owner when the captor leaves.
* Added trait documentation.
2016-01-19 21:07:50 +01:00
Alexandre Oliveira
8ab72edc6a Fix alignment of Retry connection button on RA 2016-01-19 16:10:12 -02:00
Oliver Brakmann
3b675c9bad Merge pull request #10547 from Mailaender/passenger-refactor
Small code cleanup in the Passenger trait
2016-01-19 19:07:47 +01:00
abcdefg30
3c8be18a73 Merge pull request #10507 from pchote/fix-locked-color-validation
Disable color validation for locked colors.
2016-01-19 18:18:09 +01:00
abcdefg30
0804f97deb Merge pull request #10538 from pchote/fix-report-case
Fix filename case on weapon reports.
2016-01-19 18:12:16 +01:00
Oliver Brakmann
332d61c2c0 Merge pull request #10397 from pchote/ts-map-importer
Add the "gen2" map importer.
2016-01-18 22:00:48 +01:00
Matthias Mailänder
fc8d35c2d4 put enter transport order targeters into respective files 2016-01-18 21:53:57 +01:00
Paul Chote
c581283c9a Add the TS map importer. 2016-01-18 20:52:35 +00:00
Matthias Mailänder
a8a1fafbc9 unhardcode ChronoShift palettes and sequences 2016-01-18 21:31:06 +01:00
Oliver Brakmann
a04223fcd2 Merge pull request #10143 from Phrohdoh/interface-reflection
Implement a utility command to check for explicit interface implementation violations.
2016-01-18 20:23:43 +01:00
Oliver Brakmann
afdc6bc0ae Merge pull request #10546 from abcdefg30/madTarget
Fix the TargetTypes of the Mad Tank
2016-01-18 19:53:36 +01:00
abcdefg30
d416138cec Merge pull request #10542 from RoosterDragon/simplify
General Cleanup
2016-01-18 11:37:30 +01:00
abcdefg30
50e4cc84d0 Fix the TargetTypes of the Mad Tank
"Vehicle" was missing, which lead to tanya shooting at it.
Tanya's weapon (Colt45) has InvalidTargets: Vehicle defined,
so adding just "Vehicle" to the TargetTypes fixed the bug.
2016-01-18 11:00:37 +01:00
Matthias Mailänder
40debbde28 Merge pull request #10508 from pchote/cancel-tooltip-on-menu
Cancel tooltips when opening the ingame menu.
2016-01-18 07:30:11 +01:00
Taryn Hill
25eddb9567 Explicitly implement ISelectionBar 2016-01-17 22:33:41 -06:00
Taryn Hill
e3229f4cd8 Add explicit interface checking to 'make check' 2016-01-17 17:31:36 -06:00
Taryn Hill
2e861c6d65 Implement a utility command to check for explicit
interface implementation violations
2016-01-17 17:31:36 -06:00
Paul Chote
3ccbb480ad Merge pull request #10505 from Mailaender/palette-conf
Fixed parachute palette configuration for Red Alert 2
2016-01-17 21:54:56 +00:00
Oliver Brakmann
d151343216 Merge pull request #10468 from RoosterDragon/fix-dev-shroud-invalidation
Fix shroud not updating when disabled
2016-01-17 22:42:34 +01:00
RoosterDragon
8e89a6a696 Simplify names, remove unused usings, remove redundant casts. 2016-01-17 21:35:36 +00:00
Oliver Brakmann
2e157b82f4 Limit InfiltrateForCash's guaranteed amount to spy's value in RA 2016-01-17 22:09:04 +01:00
Oliver Brakmann
c40b64ad02 Fix arbitrary defaults in InfiltrateForCashInfo. 2016-01-17 22:09:04 +01:00
Oliver Brakmann
ee8323373b Add trait documentation to InfiltrateForCash 2016-01-17 22:00:55 +01:00
Oliver Brakmann
5ec11fba8f Allow falling back to infiltrator's value in InfiltrateForCash 2016-01-17 22:00:55 +01:00
Oliver Brakmann
aaeb715006 Merge pull request #10246 from penev92/terrainPalettes
Allow tile templates to define their own palette
2016-01-17 21:39:28 +01:00
Paul Chote
cac2d82e5a Fix filename case for TS voices. 2016-01-17 19:31:25 +00:00
Paul Chote
9f7f759da4 Fix filename case on weapon reports. 2016-01-17 19:24:40 +00:00
Matthias Mailänder
a829baa82a Merge pull request #10521 from pchote/facing-cleanup
Remove Util.GetFacing.
2016-01-17 20:21:50 +01:00
Pavel Penev
288de5284e Fix TerrainTemplatePreviewWidget to use proper palettes 2016-01-17 19:02:18 +02:00
Pavel Penev
861d1368a4 Unhardcode internal terrain palette name from all over the codebase 2016-01-17 19:02:16 +02:00
Pavel Penev
0c51d73be9 Enable use of "custom" palettes per tile Templates
Keep the tileset's palette as default, defined on the tileset, but override it for any tile templates that may want to do so with a palette defined on the template.
2016-01-17 19:02:15 +02:00
Oliver Brakmann
7cf98c5e26 Merge pull request #10324 from RoosterDragon/change-frozen-actor-removals
GPS updates frozen actors that change owner
2016-01-17 13:37:53 +01:00
Matthias Mailänder
457dca25b4 Merge pull request #10506 from pchote/fix-flying-mcvs
Remove some hardcoded trait assumptions from HackyAI.
2016-01-17 08:18:04 +01:00
RoosterDragon
dc99dbef2a Add an upgrade rule for FrozenUnderFogUpdatedByGps. 2016-01-17 00:15:08 +00:00
RoosterDragon
3c930c3ef9 Introduce FrozenUnderFogUpdatedByGps and IOnGpsRefreshed.
This trait uses the new interface to register with the GpsWatcher to get notified when the GPS state changes. It needs to register as if the actor is destroyed, the GpsWatcher can no longer query actors in the world to get the trait. This is no good as the trait needs to perform actions after the death of its parent actor.

When the GPS is enabled, the trait will track ownership changes and update the frozen actor (just like if there was only a GPS dot, it would change colour) and it will also remove frozen actors if the real actor dies or is sold.
2016-01-17 00:13:06 +00:00
RoosterDragon
a232eff7fd Replace IRemoveFrozenActor with FrozenActorLayer.Remove.
The IRemoveFrozenActor interface is replaced with a Remove method on FrozenActorLayer. IRemoveFrozenActor is a performance problem for FrozenActorLayer.Tick as it incurs a large cache miss penalty in order to load and enumerate the array of these interfaces for every frozen actor. Instead, we invert control and allow traits to remove frozen actors directly which eliminates the performance penalty.
2016-01-17 00:13:06 +00:00
RoosterDragon
c98df23b57 Create FrozenActor.RefreshState method for better encapsulation and reuse of this logic. 2016-01-17 00:13:06 +00:00
RoosterDragon
3026bdcea5 Implement equality on TraitPair. 2016-01-17 00:13:06 +00:00
Paul Chote
bee77db1e3 Rename variables for clarity. 2016-01-17 00:02:49 +00:00
Paul Chote
bec059a3c7 Remove unnecessary assumption about non-mobile. 2016-01-17 00:02:49 +00:00
Paul Chote
d4815407f2 Remove hardcoded trait assumptions from MCV and ConYards. 2016-01-17 00:02:49 +00:00
Paul Chote
e026a0f00f Create proper data structures for hardcoded AI classes. 2016-01-17 00:02:49 +00:00
Paul Chote
3b18c7815d Remove Util.GetFacing. 2016-01-16 22:38:17 +00:00
Paul Chote
a0979634bb Use .Yaw.Facing in Map. 2016-01-16 22:38:17 +00:00
Paul Chote
8a8368b97b Use .Yaw.Facing in Missile. 2016-01-16 22:38:17 +00:00
Paul Chote
46bf58b520 Introduce WVec.Yaw and WAngle.Facing. 2016-01-16 22:38:17 +00:00
Oliver Brakmann
addbe6d564 Merge pull request #10472 from Mailaender/guard-refactor
Cleaned up the Guard code
2016-01-16 23:09:19 +01:00
Oliver Brakmann
aeafa3383d Merge pull request #10516 from reaperrr/shp-compress
Recompressed a number of shp(td) files with shapeset
2016-01-16 22:59:41 +01:00
Oliver Brakmann
29e8396863 Merge pull request #10531 from pchote/fix-tileset-case
Fix case mismatches in TS tileset importer.
2016-01-16 22:43:02 +01:00
Oliver Brakmann
9de239e246 Merge pull request #10371 from Mailaender/demotruck-detonates
Generalized the DemoTruck trait for Tiberian Sun
2016-01-16 19:46:37 +01:00
Matthias Mailänder
6900e4bad3 rename DemoTruck to AttackSuicides
generalize move to add Aircraft support
give it a description
don't require Explodes as it is just a soft dependency
use a regular self kill
2016-01-16 19:38:23 +01:00
Oliver Brakmann
01a873218d Merge pull request #10364 from Mailaender/unload-overlay
Added the Tiberian Sun harvester unload overlay
2016-01-16 19:30:19 +01:00
abcdefg30
b593063057 Merge pull request #10519 from RockyTV/rockytv
Decrease Engineer and Medic priority
2016-01-16 14:35:41 +01:00
Matthias Mailänder
56313e6d8a Merge pull request #10525 from pchote/split-package-interfaces
Split IPackage into IReadOnlyPackage and IReadWritePackage
2016-01-16 14:19:54 +01:00
Matthias Mailänder
5fc6af6566 Merge pull request #10493 from pchote/fix-menu-hover
Update button mouseover when switching menus.
2016-01-16 14:10:24 +01:00
Paul Chote
9f28eefb31 Fix case mismatches in TS tileset importer. 2016-01-16 13:07:36 +00:00
Matthias Mailänder
152ff32ded add the Tiberian Sun harvester unload overlay 2016-01-16 13:51:08 +01:00
Matthias Mailänder
f3210755c0 rename WithDockingOverlay to WithDockedOverlay 2016-01-16 13:51:06 +01:00
abcdefg30
2ccf142ce9 Merge pull request #10492 from pchote/fix-mission-order
Sort missions by their order in missions.yaml
2016-01-16 13:26:26 +01:00
abcdefg30
aa23928e7b Merge pull request #10514 from pchote/blink-install-button
Blink install map button.
2016-01-16 13:16:31 +01:00
abcdefg30
c701ed6a5c Merge pull request #10510 from pchote/cancel-pbog-on-death
Cancel PBOG on death
2016-01-16 12:17:39 +01:00
abcdefg30
ee1cf5ff87 Merge pull request #10523 from pchote/fix-pbog-gameover-crash
Fix a crash if an order generator is active when a game ends.
2016-01-16 12:04:45 +01:00
Paul Chote
bdb8fd48ca Remove legacy package creation code. 2016-01-16 10:37:21 +00:00
Paul Chote
f8d0b97e8d Split IPackage into IReadOnlyPackage and IReadWritePackage. 2016-01-16 10:37:21 +00:00
reaperrr
77b0bd6067 Merge pull request #10520 from pchote/fix-voxel-z-offsets
Use height offset when rendering voxels.
2016-01-16 00:10:17 +01:00
Paul Chote
2fb0af60d1 Merge pull request #10482 from Mailaender/ra2-wav
Fixed crashes with Red Alert 2 wav files
2016-01-15 23:05:13 +00:00
Paul Chote
24570f0bdf Merge pull request #10490 from penev92/packages
Some renaming from "folder" to "package"
2016-01-15 22:40:02 +00:00
Paul Chote
1cb93b52c0 Cancel PBOG when placement becomes invalid. 2016-01-15 21:26:32 +00:00
Paul Chote
99ba155a16 Fix a crash if an order generator is active when a game ends. 2016-01-15 21:13:22 +00:00
Paul Chote
054be44563 Cache production queue on PBOG. 2016-01-15 20:59:57 +00:00
Paul Chote
44b1402080 Update button mouseover when switching menus. 2016-01-15 20:57:39 +00:00
Paul Chote
4bf887a905 Extract a helper method for switching menu types. 2016-01-15 20:57:39 +00:00
Oliver Brakmann
8ebee425ab Merge pull request #10264 from whinis/bleed
Restart button for missions
2016-01-15 21:55:02 +01:00
Whinis
9059e3e2c8 Changes to the RestartGame function to make it more streamlined
Removal of PromptAbortAction and inclusion into PromptConfirmAction
Changes to prevent a restart button being required for all mods
ConfirmAction
Addtion of named parameters to PromptConfirmAction
Moved StartGame from MissionBrowserLogic.cs to Game.cs
2016-01-15 15:34:00 -05:00
RoosterDragon
999965fc82 Merge pull request #10491 from pchote/fix-country-overflow
Fix MP browser country name overflow
2016-01-15 19:54:09 +00:00
RoosterDragon
db520a8560 Merge pull request #10476 from pchote/sound-device-labels
Truncate SoundDevice label at the UI level.
2016-01-15 19:53:42 +00:00
Matthias Mailänder
047f71e5ec Reset stream position after TryParseSound failures 2016-01-15 18:29:25 +01:00
Matthias Mailänder
d578ea4094 Implement MergedStream.Position properly 2016-01-15 18:29:25 +01:00
Matthias Mailänder
dc62dcd56d Avoid the bracket syntax everywhere 2016-01-15 18:29:25 +01:00
Matthias Mailänder
71e8e20987 Report unknown codecs when failing 2016-01-15 18:29:11 +01:00
Paul Chote
1896e707e6 Fix deployed tick tank turret. 2016-01-15 17:13:59 +00:00
Matthias Mailänder
fb39aed29f Return earlier on error in AudLoader 2016-01-15 18:11:22 +01:00
Matthias Mailänder
a01bc02390 Log sound parsing errors in sound.log 2016-01-15 18:10:52 +01:00
Paul Chote
18b3595894 Fix nod laser turret. 2016-01-15 17:08:45 +00:00
Paul Chote
d235dad754 Fix voxel barrel rendering. 2016-01-15 17:05:00 +00:00
Paul Chote
88e15d9100 Fix voxel z offsets. 2016-01-15 17:04:19 +00:00
Alexandre Oliveira
5ce454ce7b Decrease Engineer, Medic and Mechanic priority
Fixes the issue that engineers would just run straight at the target while
mixed with a group and attack moved.
2016-01-15 14:18:10 -02:00
Pavel Penev
e3f5697f7e Some more renaming from "folder" to "package" 2016-01-14 22:08:49 +02:00
Oliver Brakmann
da4f04acfb Merge pull request #10509 from pchote/cancel-pbog-on-menu
Cancel custom input modes when opening the menu.
2016-01-14 20:29:30 +01:00
abcdefg30
3128bec301 Merge pull request #10512 from pchote/disable-line-build
Use shift to disable line building.
2016-01-14 20:18:26 +01:00
Oliver Brakmann
4d3918f6de Merge pull request #10511 from pchote/disable-slot-admin-when-empty
Disable slot admin dropdown when empty.
2016-01-14 20:11:08 +01:00
reaperrr
4c737bccd5 Re-compress some D2k SHPs 2016-01-14 20:10:31 +01:00
reaperrr
902c19d394 Re-compress SHPs in RA bits with shapeset 2016-01-14 20:10:11 +01:00
reaperrr
82806d90bd Re-compress SHPs in cnc bits folder with shapeset 2016-01-14 20:09:16 +01:00
Alexander Heinz
e0c033fe99 restart button added for singleplayer in cnc, ra, d2k 2016-01-14 11:53:31 -05:00
Paul Chote
6d017b09f3 Blink install map button. 2016-01-14 00:27:30 +00:00
Paul Chote
fca759987c Use shift to disable line building. 2016-01-13 23:57:18 +00:00
Paul Chote
a639d9587d Disable slot admin dropdown when empty. 2016-01-13 23:45:25 +00:00
Paul Chote
244fb582fb Cancel tooltips when opening the ingame menu. 2016-01-13 23:32:45 +00:00
Paul Chote
06678ecc0d Cancel custom input modes when opening the menu. 2016-01-13 23:28:51 +00:00
Paul Chote
80b5311082 Disable color validation for locked colors. 2016-01-13 23:09:54 +00:00
Matthias Mailänder
5516291c60 Merge pull request #10441 from abcdefg30/07demolish
Let Tanya try to attack the flame turrets in soviet07
2016-01-13 22:50:41 +01:00
Matthias Mailänder
0317c984cb fix parachute palette configuration 2016-01-13 22:34:40 +01:00
Paul Chote
675faa2a6d Truncate long server locations. 2016-01-12 00:03:17 +00:00
Paul Chote
260681d048 Sort missions by their order in missions.yaml. 2016-01-11 23:54:55 +00:00
Paul Chote
eebdd6d041 Fix width of server location column. 2016-01-11 23:39:06 +00:00
Oliver Brakmann
8a755e673c Merge pull request #10480 from pchote/fix-cloak-modifier
Fix Cloak modifying the palette of decoration renderables.
2016-01-11 22:12:46 +01:00
Oliver Brakmann
e2a4efec29 Merge pull request #10479 from pchote/fix-d2k-moveflash
Disable modifiers on the d2k move flash palette.
2016-01-11 21:56:28 +01:00
Oliver Brakmann
af1611fcac Merge pull request #10477 from pchote/fix-pbog-decoration-offset
Use the correct CenterPosition for PBOG overlays.
2016-01-11 21:47:03 +01:00
Oliver Brakmann
1be9cedc01 Merge pull request #10303 from r34ch/doubles-rebalance
Rebalance doubles.oramap in RA mod
2016-01-11 21:39:53 +01:00
Pavel Penev
45382d193a Rename IFolder to IPackage 2016-01-11 21:53:48 +02:00
Paul Chote
2c0f231c77 Merge pull request #10486 from penev92/modImages
Hardcode mod logo and preview image file names
2016-01-11 19:31:05 +00:00
Pavel Penev
75d983c922 Hardcode mod logo and preview image file names
(Revert "Unhardcode mod logo and preview image paths")
2016-01-11 21:16:57 +02:00
Matthias Mailänder
37c41b2a23 Merge pull request #10232 from penev92/modSupport
Implement mod loading from the support directory
2016-01-11 12:37:35 +01:00
Paul Chote
62c222ebd2 Fix Cloak modifying the palette of decoration renderables. 2016-01-11 00:40:05 +00:00
Paul Chote
a8ac3a41e7 Disable modifiers on the d2k move flash palette. 2016-01-11 00:25:00 +00:00
Paul Chote
353837e37b Sync replay support timers to original game time. 2016-01-11 00:06:46 +00:00
Paul Chote
4f07d615b7 Use the correct CenterPosition for PBOG overlays. 2016-01-10 23:41:23 +00:00
Paul Chote
8731d78594 Truncate SoundDevice label at the UI level. 2016-01-10 23:31:30 +00:00
Pavel Penev
652f38ff66 Merge pull request #10471 from Mailaender/check-d2k-legacymap-actor-import
Fixed the Dune 2000 legacy map import
2016-01-11 00:29:54 +02:00
Pavel Penev
3722b2848b Change D2k to use the new path syntax with a mod ID prefix
Allows seemless movement between the game's mods directory and the support directory.
NOTE: Rebuilding will create the mod directories in the game's project dir and put the new DLLs there, which may lead to (although swallowed) exceptions when populating the mod dictionary due to repeating keys.
2016-01-10 23:52:10 +02:00
Pavel Penev
a3299d7030 Unhardcode mod logo and preview image paths 2016-01-10 23:52:09 +02:00
Pavel Penev
71c2d6b9d7 Add GetCandidateMods() method to ModMetadata to preload all folders that may contain a mod
This allows for loading of mods from both the game's mods directory and the support directory
2016-01-10 23:52:08 +02:00
Pavel Penev
778492840f Update mod.yaml loading methods to account for potential "package paths" 2016-01-10 23:19:29 +02:00
Pavel Penev
0e53312a1d Add a package-oriented Platform.ResolvePath() method 2016-01-10 23:19:28 +02:00
Pavel Penev
b27cf8ea94 Small refactoring in Manifest.cs 2016-01-10 23:19:26 +02:00
Matthias Mailänder
4012433e10 test and correct the ActorDataByActorCode 2016-01-10 21:56:26 +01:00
Oliver Brakmann
6114fe582c Merge pull request #10453 from huwpascoe/selbox
Refactored WorldInteractionControllerWidget
2016-01-10 19:34:25 +01:00
Matthias Mailänder
13f20a4b56 cache the trait lookup 2016-01-10 07:28:28 +01:00
Matthias Mailänder
a74aaf73c5 Guard requires IMove 2016-01-10 07:28:19 +01:00
Matthias Mailänder
5b263e3cdb put GuardOrderGenerator in the correct namespace 2016-01-10 07:22:42 +01:00
Matthias Mailänder
7729646f45 Merge pull request #10465 from obrakmann/fix-upgrade-rule-dates
Fix dates for upgrade rules
2016-01-10 06:53:13 +01:00
RoosterDragon
a15d1801e1 Calculate better upper bounds in SpatiallyPartitioned.
SpatiallyPartitioned was calculating larger that necessary bounding regions as this was simple to do and does not impact correctness. By being careful to calculate the upper bounds exactly we can avoid checking more bins than we need to during updates and queries.
2016-01-09 23:44:58 +00:00
RoosterDragon
8ff08d4e19 Add IntegerDivisionRoundingAwayFromZero.
This provides the mirror of the integer division operator, which rounds towards zero.
2016-01-09 23:44:55 +00:00
RoosterDragon
8b12a4a747 Add tests for SpatiallyPartitioned. 2016-01-09 23:44:53 +00:00
RoosterDragon
21fd4df586 Invalidate shroud when enabling/disabled the shroud.
This ensures when shroud is toggled during a replay, the shroud renderer and radar update correctly.
2016-01-09 23:07:32 +00:00
Oliver Brakmann
0a413af3eb Merge pull request #10440 from abcdefg30/05aDemolish
Polish the demolition of the prison in allies05a
2016-01-09 22:22:54 +01:00
Oliver Brakmann
2ee3a66b48 Merge pull request #10442 from abcdefg30/06secondary
Add a new secondary objective to the soviet06 missions
2016-01-09 22:13:46 +01:00
Oliver Brakmann
a0d33320a0 Merge pull request #10439 from abcdefg30/sub04a
Disable sub pen and ship yard in soviet04a
2016-01-09 21:41:17 +01:00
Oliver Brakmann
b8667ba968 Merge pull request #10458 from Mailaender/ts-cliffsin
Added Tiberian Sun map Cliffs of Insanity
2016-01-09 21:38:26 +01:00
Oliver Brakmann
2a1bc11133 Merge pull request #10459 from Mailaender/ts-karasjok
Added map Town of Karasjok for Tiberian Sun
2016-01-09 21:23:56 +01:00
Oliver Brakmann
abe76d6f07 Fix dates for upgrade rules
The dates for the following two upgrade rules have not been touched since they were backported to release-20151224:

1. 20151107: PaticleSize -> ParticleSize
2. 20151122: DeployToUpgrade, Upgrades -> DeployedUpgrades
2016-01-09 20:25:32 +01:00
RoosterDragon
1bc3a7395f Prevent items without size from being added to SpatiallyPartitioned.
Items with no size act unexpectedly as they can fail to be returned when querying partition bins as they do not intersect along the top or left edges of the bin. We prevent such items being added in the first place to avoid this scenario.

As a side effect - we must now prevent any Immobile items that do not have size from being added to the screen map.
2016-01-09 16:51:13 +00:00
abcdefg30
9476889989 Add a new secondary objective to the soviet06 missions 2016-01-09 14:58:36 +01:00
RoosterDragon
bef6f40759 Merge pull request #10392 from Mailaender/d2k-ai-aircraft
Fixed AI bots not building any Carryalls
2016-01-09 11:46:51 +00:00
RoosterDragon
764f5d6bd9 Merge pull request #10236 from teees/ts-air-separation
Set ideal aircraft separation to half of the default value
2016-01-09 11:43:09 +00:00
Matthias Mailänder
715ba32262 add map Town of Karasjok 2016-01-09 08:24:24 +01:00
Matthias Mailänder
1d20203478 add Cliffs of Insanity 2016-01-09 08:11:13 +01:00
Matthias Mailänder
97b0b1afab Merge pull request #10418 from pchote/format-names
Rename WW compression formats and move into Mods.Common.
2016-01-08 19:17:50 +01:00
Matthias Mailänder
3c4dd64b86 Merge pull request #10457 from obrakmann/fix10450_lobby-early-crash
Don't update player list when lobby doesn't have our client yet
2016-01-08 19:14:03 +01:00
Matthias Mailänder
65a06adc51 Merge pull request #10041 from teees/exit-on-death
Unload passengers / cargo on death
2016-01-08 18:15:40 +01:00
teees
b7a3a446e1 Unload passengers on death 2016-01-08 08:50:35 +01:00
Paul Chote
1202a4d968 Move IniFile to Mods.Common. 2016-01-07 21:07:43 +00:00
Paul Chote
9f4b7097b2 Move WW compression formats into Mods.Common. 2016-01-07 21:07:43 +00:00
Paul Chote
83477ec19e Move VqaReader to Mods.Common. 2016-01-07 21:07:42 +00:00
Paul Chote
33f3e5ad47 Rename WW-created compression formats. 2016-01-07 21:07:42 +00:00
Oliver Brakmann
d580551572 Don't update player list when lobby doesn't have our client yet 2016-01-07 21:54:47 +01:00
Matthias Mailänder
7c31f6e18e Merge pull request #10417 from RoosterDragon/log-thread-safety
Make Log thread-safe.
2016-01-07 21:34:56 +01:00
Matthias Mailänder
c607c8532f Merge pull request #10443 from Truth99A/TD-BuildPaletteOrder-Change
Changed build palette order of structures for TD
2016-01-07 21:05:32 +01:00
Matthias Mailänder
27eeaf3d41 Merge pull request #10112 from DnAp/PowerTooltip
Closes #6011
2016-01-07 20:57:14 +01:00
abcdefg30
22e071c57f Merge pull request #10152 from teees/ts-aircraft-husks
Added aircraft husks (Tiberian Sun)
2016-01-07 17:36:53 +01:00
abcdefg30
9aca470a73 Merge pull request #9808 from teees/cloak-fix
Several fixes for cloak behavior
2016-01-07 17:34:33 +01:00
Huw Pascoe
df441ff5c7 Refactored WorldInteractionControllerWidget
Cleaned up all the nullable types
Simplified dragEnd, lastMousePos, xy, etc.
2016-01-07 16:00:41 +00:00
teees
e8856a9268 Set ideal separation to a lower value for ts aircraft 2016-01-07 14:50:22 +01:00
teees
5ef93d330a Added aircraft husks 2016-01-07 14:36:22 +01:00
teees
3a83e0cb92 Changes to ts cloaking behaviour to closer resemble the original 2016-01-07 13:44:17 +01:00
teees
f46185b85f Reworked cloaking behaviour 2016-01-07 13:44:16 +01:00
Truth99A
3f156f6dda changed build palette order of sturctures for TD
changed the build palette order so that it follows the tech tree
images of the change + poll can be found at: http://www.sleipnirstuff.com/forum/viewtopic.php?f=82&t=19220&postdays=0&postorder=asc&vote=viewresult
2016-01-07 12:38:50 +11:00
abcdefg30
9db974cfe9 Merge pull request #10406 from Mailaender/d2k-no-ra
Removed the RA mod DLL dependency from D2k
2016-01-06 21:53:09 +01:00
abcdefg30
6fa70134cd Merge pull request #10399 from Mailaender/cnc-no-ra
Removed the RA mod DLL dependency from TD
2016-01-06 21:51:16 +01:00
abcdefg30
334105da19 Merge pull request #10369 from Mailaender/tread-lightly
Fixed map "Tread Lightly"
2016-01-06 21:39:52 +01:00
abcdefg30
c28a09e3ef Merge pull request #10377 from Mailaender/tiberium-garden-redux
Added TS map Tiberium Garden Redux
2016-01-06 21:31:37 +01:00
Matthias Mailänder
b61cfc86a0 Merge pull request #10032 from teees/vocloader
Added VocLoader
2016-01-05 22:33:27 +01:00
teees
5def1ed626 Added VocLoader 2016-01-05 18:06:54 +01:00
Matthias Mailänder
aa9ef48737 Revert "Don't attack actors that you can't see"
This reverts commit d235ea3a52.
2016-01-04 23:02:03 +01:00
Matthias Mailänder
98a1a452c1 Merge pull request #10410 from RoosterDragon/fal-footprint
Fix FrozenActorLayer.FootprintBounds.
2016-01-04 22:13:49 +01:00
Oliver Brakmann
36dc8775bc Merge pull request #10414 from abcdefg30/luaLearn
Reference the Map Scripting page from the Lua API page
2016-01-04 21:57:46 +01:00
Matthias Mailänder
16d2f8466c Merge pull request #10412 from kyrylo/ra-minelayer-health-buff
ra: buff minelayer's HP
2016-01-04 21:51:39 +01:00
RoosterDragon
081b40b14f Make Log thread-safe.
Since logging is exposed via static methods, it need to be thread-safe or multiple threads trying to log at the same time will cause bad things to happen.
2016-01-04 19:27:48 +00:00
abcdefg30
e9d76011c5 Merge pull request #10388 from RoosterDragon/auto-target-perf
Speed up AutoTarget.ChooseTarget among groups of allied units.
2016-01-04 17:48:33 +01:00
abcdefg30
749163464a Reference the Map Scripting page from the Lua API page 2016-01-04 16:59:44 +01:00
abcdefg30
bb399a536b Merge pull request #10409 from Mailaender/fix-globalchat
Fixed all known crashes in GlobalChat
2016-01-04 15:42:14 +01:00
atlimit8
e4f4c578f6 Merge pull request #10376 from RoosterDragon/repulse-perf
Speed up Aircraft.Repulse.
2016-01-04 01:26:03 -06:00
RoosterDragon
adc7e902e3 Speed up AutoTarget.ChooseTarget among groups of allied units.
Most auto target scans will be conducted among groups of allied units unable to target each other because they are allied and their weapons only target enemies. Since they cannot target each other, the scan will be repeated constantly. Realising this, we can significantly reduce the performance impact of auto target scanning by bailing early in this scenario to avoid carrying out expensive targeting checks on friendly units which we know will fail anyway.
2016-01-04 07:07:26 +00:00
atlimit8
7acd71cd7d Merge pull request #10407 from pchote/ts-resource-colors
Fix the TS resource minimap colors.
2016-01-04 00:31:58 -06:00
Kyrylo Silin
91690bdc44 ra: buff minelayer's HP
Currently 1 rocket soldier can kill a minelayer with 2 shots. With this
change a rocket soldier needs 3 shots. I think this buff is needed
because minelayer costs $800 and it has even less HP than a paper light
tank.
2016-01-04 07:41:51 +02:00
RoosterDragon
0dc51f79a0 Fix FrozenActorLayer.FootprintBounds.
The size of the bounds was too small (as rectangle has exclusive edges on the right and bottom). This meant some intersection tests would fail and thus the frozen actor was not found when searching the partition bins.
2016-01-03 23:48:28 +00:00
Matthias Mailänder
83bada07b5 don't disconnect every client when one user gets kicked 2016-01-03 23:19:36 +01:00
Matthias Mailänder
fa4a177cd5 fix a NullReferenceException when the widget is unbound 2016-01-03 23:09:04 +01:00
RoosterDragon
5b8b059d19 Merge pull request #10405 from Mailaender/ts-rm-gps
Removed GpsWatcher from Tiberian Sun
2016-01-03 21:40:57 +00:00
Paul Chote
ca2728f361 Fix the TS resource minimap colors. 2016-01-03 21:32:15 +00:00
Matthias Mailänder
bb9429a530 remove the RA mod dependency 2016-01-03 22:25:54 +01:00
Matthias Mailänder
1c8a0fc52a remove GpsWatcher from Tiberian Sun 2016-01-03 21:32:07 +01:00
Taryn Hill
7cb8b42a13 Merge pull request #10401 from scshunt/authorship
Add me to AUTHORS file.
2016-01-03 11:48:32 -06:00
Sean Hunt
aa0cd89b5c Add myself to AUTHORS 2016-01-03 12:16:51 -05:00
Matthias Mailänder
3053024fa2 Merge pull request #10400 from scshunt/style
Style fixes.
2016-01-03 18:10:40 +01:00
Sean Hunt
a7a22d7a49 Style fixes. 2016-01-03 12:02:26 -05:00
Matthias Mailänder
27712efe9b remove the RA mod dependency 2016-01-03 17:48:41 +01:00
Matthias Mailänder
ed5b8d024b reimport Tread Lightly 2016-01-03 12:12:03 +01:00
Matthias Mailänder
7d827a9c32 limit the production of carryalls 2016-01-03 11:57:50 +01:00
Matthias Mailänder
88289f8242 add Tiberium Garden Redux 2016-01-03 11:55:28 +01:00
Matthias Mailänder
c17db1245d use the original naming to keep compatible for legacy map import 2016-01-03 11:55:27 +01:00
Matthias Mailänder
47bc8426f1 use the original naming for legacy map import
although it seems redundant for now
2016-01-03 11:51:48 +01:00
Matthias Mailänder
14d412a361 Merge pull request #10385 from pchote/d2k-worm-trail
Finish D2K worm implementation
2016-01-03 09:21:08 +01:00
Matthias Mailänder
df8b1efbf4 fix AI not building any Carryalls 2016-01-03 08:54:12 +01:00
Paul Chote
47c97735ed Overhaul sand worm rendering and attacking. 2016-01-03 01:17:30 +00:00
Paul Chote
8ce274ed79 Overhaul and rename WithActiveAnimation -> WithIdleAnimation. 2016-01-03 01:17:29 +00:00
Paul Chote
adaa1fa70e Add multiple sequence and upgrade support to LeavesTrails. 2016-01-03 01:17:29 +00:00
Paul Chote
6af377030c Add sequence parameter to SpriteEffect. 2016-01-03 01:17:29 +00:00
RoosterDragon
8d7ed98636 Merge pull request #10380 from pchote/improve-trails
Polish and improved customization for actor trails
2016-01-03 01:15:26 +00:00
RoosterDragon
55d074b25d Merge pull request #10384 from pchote/upgrade-newlines
Fix duplicated end of file newline being saved to upgraded yaml.
2016-01-03 00:56:19 +00:00
RoosterDragon
cf841f1e64 Merge pull request #10386 from penev92/fixStuff
Fix upgrade rule output spam
2016-01-03 00:40:44 +00:00
Paul Chote
f108d4b113 Polish wakes for TS HVR and APC. 2016-01-02 21:19:06 +00:00
Pavel Penev
30f6c10101 Fix upgrade rule output spam 2016-01-02 22:37:12 +02:00
Paul Chote
4f1d8b7ac9 Remove spurious final newline from mod files. 2016-01-02 20:06:53 +00:00
Paul Chote
bc4ea3f87b Don’t duplicate the final newline when saving upgraded yaml. 2016-01-02 20:06:52 +00:00
Matthias Mailänder
63af439c73 Merge pull request #10365 from reaperrr/fix-missile-effects
Misc Missile and CreateEffectWarhead tweaks
2016-01-02 17:08:52 +01:00
abcdefg30
7934995a8f Let Tanya try to attack the flame turrets in soviet07 2016-01-02 16:31:01 +01:00
abcdefg30
7c84c666d7 Add some empty lines to soviet07.lua for better readability 2016-01-02 16:24:25 +01:00
abcdefg30
fb7d64a126 Disable sub pen and ship yard in soviet04a
as there is no water in this mission
2016-01-02 16:13:29 +01:00
abcdefg30
c6822452e8 Polish the demolition of the prison in allies05a 2016-01-02 16:07:59 +01:00
RoosterDragon
224c458d20 Merge pull request #10375 from Mailaender/zip-codepage
Use UTF8 instead of system locale code page
2016-01-02 14:57:04 +00:00
Paul Chote
7a9f27aa11 Fix trail sprite size with zoom. 2016-01-02 12:25:52 +00:00
Paul Chote
f8b0674ccc Add extra configuration options for trails. 2016-01-02 12:25:52 +00:00
Matthias Mailänder
fb62b40848 Merge pull request #10252 from penev92/removeToP
Remove obsolete TransformOnPassenger trait
2016-01-02 12:49:01 +01:00
Matthias Mailänder
51468c60ed use UTF8 instead of system locale code page 2016-01-02 09:08:21 +01:00
RoosterDragon
53ede338de Speed up Aircraft.Repulse.
Avoid LINQ in the repulsion force calculation, and cache a trait lookup used when determining movement speed.
2016-01-02 06:48:12 +00:00
Pavel Penev
51281e2546 Remove obsolete TransformOnPassenger trait
The upgrade system has made this obsolete. Units like the RA2 IFV are better done that way.
2016-01-02 02:01:46 +02:00
RoosterDragon
0363aeaaea Merge pull request #10362 from Mailaender/new-map-crash
Fixed a crash on new map creation
2016-01-01 20:53:06 +00:00
Pavel Penev
17239979d7 Merge pull request #10162 from teees/hovers-fix2
fix hovers trait to use heightmap
2016-01-01 22:51:27 +02:00
teees
ce5c8fde5c fix hovers trait to use heightmap 2016-01-01 21:04:17 +01:00
Matthias Mailänder
bf2513407a fix a crash on new map creation 2016-01-01 16:47:15 +01:00
Oliver Brakmann
46133891bb Merge pull request #10312 from r34ch/man-to-man-rebalance
Rebalance man-to-man.oramap for the RA mod
2016-01-01 16:38:08 +01:00
Oliver Brakmann
e1a5a5632d Merge pull request #10366 from Phoib/NoLineEnding
Eliminated superfluous linendings
2016-01-01 16:33:28 +01:00
Oliver Brakmann
9e0f325887 Merge pull request #10301 from r34ch/singles-rebalance
Singles rebalance
2016-01-01 16:31:37 +01:00
Emiel Suilen
3e63869bd1 Eliminated superfluous linendings 2016-01-01 16:22:19 +01:00
reaperrr
d93a3a61ee Use DistanceFromEdge instead of OuterRadius for CreateEffectWarhead's hit check 2016-01-01 15:52:13 +01:00
reaperrr
671f5af723 Unhardcode Missile freefall gravity 2016-01-01 15:52:12 +01:00
reaperrr
c02206601c Use airMargin in CreateEffectWarhead's water check
Closes #10350.
2016-01-01 15:43:34 +01:00
Paul Chote
99ef4dc832 Merge pull request #10346 from RoosterDragon/misc-fixes
Dispose fixes + misc touchups
2016-01-01 13:53:05 +00:00
DArcy Rush
e004b5a7c5 Rebalance doubles.oramap for the RA mod 2016-01-01 13:22:09 +00:00
Paul Chote
0d2be8182f Merge pull request #10345 from RoosterDragon/test-deprecation
Suppress warning about Is.StringContaining on NUnit 3
2016-01-01 13:02:08 +00:00
Matthias Mailänder
be235eb9fb Merge pull request #10210 from pchote/other-enter-traits
Add enter behaviour field to Infiltrates/EngineerRepair/RepairsBridges.
2016-01-01 12:01:26 +01:00
Matthias Mailänder
b3c474ebf9 Merge pull request #9452 from atlimit8/CreateFrozenActorsInFrozenUnderFogConstructor
Move FrozenActor creation to Created in FrozenUnderFog
2016-01-01 11:45:08 +01:00
RoosterDragon
3e77f48b06 Rethrow exception correctly in CoordinateTest. 2016-01-01 04:51:57 +00:00
RoosterDragon
5f13fa0343 Fix serialization of custom exceptions. 2016-01-01 04:51:55 +00:00
RoosterDragon
b5f24c3fa6 Add some missing Dispose calls, fix some Dispose implementations. 2016-01-01 04:51:54 +00:00
DnAp
c4b925ffc3 Make trait PowerTooltip 2015-12-31 18:20:55 +03:00
Matthias Mailänder
85ffd505c1 Merge pull request #10344 from obrakmann/fix10339_map-editor-filetype-crash
Allow only valid file types when saving maps in the editor
2015-12-31 13:33:45 +01:00
Matthias Mailänder
f8161300ed Merge pull request #10304 from whinis/ReplayReworkPR
Reworking ReplayRecorderConnection to be not be a Connection
2015-12-31 12:40:51 +01:00
Matthias Mailänder
cd730914db Merge pull request #10119 from RoosterDragon/sort-effects-with-actors
Interleave renderables for effects and actors
2015-12-31 12:31:47 +01:00
Matthias Mailänder
6a555a7a8d Merge pull request #10089 from abcdefg30/shellmapCPU
Try to win a small amount of performance when the shellmap is disabled
2015-12-31 12:22:14 +01:00
DArcy Rush
68d8ba7344 Update singles.oramap in the RA mod 2015-12-31 09:33:24 +00:00
DArcy Rush
e88721ca73 Rebalance man-to-man.oramap for the RA mod 2015-12-31 08:41:50 +00:00
Matthias Mailänder
9e5d325a25 Merge pull request #10347 from r34ch/kotg2-rebalance
Rebalance keep-off-the-grass-2.oramap for the RA mod
2015-12-31 09:39:49 +01:00
Matthias Mailänder
39bdda8fd3 Merge pull request #10352 from RoosterDragon/global-light-perf
Speed up GlobalLightingPaletteEffect.
2015-12-31 09:35:19 +01:00
atlimit8
4744f436d3 Move FrozenActor creation to Created in FrozenUnderFog 2015-12-31 00:53:26 -06:00
RoosterDragon
32bf9f7661 Suppress warning about Is.StringContaining on NUnit 3. 2015-12-31 06:37:55 +00:00
RoosterDragon
208b51feb1 Speed up GlobalLightingPaletteEffect.
Perform everything in integer arithmetic using some bit twiddling to avoid the performance cost of converting to and from floating point values.
2015-12-31 06:26:05 +00:00
Whinis
155c74fc5f Reworking ReplayRecorderConnection to no longer be an IConnection but rather attached to IConnection 2015-12-30 22:17:13 -05:00
reaperrr
f7c6938e27 Merge pull request #10243 from pchote/fix-neutrino-bullets
Fix collision detection for Missiles and Bullets.
2015-12-31 00:14:16 +01:00
Matthias Mailänder
aed5e4a057 Merge pull request #10337 from RoosterDragon/fix-upgrade
Fix UpgradeChromeMetrics.
2015-12-30 23:48:33 +01:00
RoosterDragon
47aafc7936 Merge pull request #10334 from obrakmann/fix10331_suppress-unread-irc-notifications
Fix counting IRC notifications as unread messages
2015-12-30 22:25:17 +00:00
abcdefg30
f364a306f3 Merge pull request #10201 from teees/discardexcessresources
Optionally discard resources when silo capacity has been reached
2015-12-30 22:43:15 +01:00
DArcy Rush
6b93e21b81 Rebalance keep-off-the-grass-2.oramap for the RA mod 2015-12-30 21:36:16 +00:00
Paul Chote
5b99a0c2da Implement enter behaviour for building/bridge repair. 2015-12-30 19:54:18 +00:00
Paul Chote
1959820bc8 Implement enter behaviour for Infiltrates plus other cleanups. 2015-12-30 19:53:51 +00:00
Paul Chote
f5fafb1b9d Move EnterBehaviour behaviour to Enter. 2015-12-30 19:53:06 +00:00
Paul Chote
8771562e37 Reduce projectile search radius to match warheads. 2015-12-30 19:32:00 +00:00
Paul Chote
124e7b389a Add a lint test for projectile target search radius. 2015-12-30 19:31:59 +00:00
Paul Chote
a44b50c2ad Increase wall blocking geometry to a full cell. 2015-12-30 19:31:59 +00:00
Paul Chote
871d328c35 Fix collision detection for Missiles and Bullets. 2015-12-30 19:15:17 +00:00
Oliver Brakmann
83ee267105 Allow only valid file types when saving maps in the editor
It will also allow saving to files and directories which have a dot in their name.
2015-12-30 19:59:13 +01:00
Oliver Brakmann
a580aa1f27 Merge pull request #10316 from abcdefg30/powerUpDownD2k
Swap the Disable- and EnablePower sounds of D2K
2015-12-30 17:06:47 +01:00
abcdefg30
d2b75d780d Merge pull request #9856 from atlimit8/FilterInstalledModsFromNeededMods
Show only missing required "mod (version)"s
2015-12-30 15:38:07 +01:00
Matthias Mailänder
f0ef8e669a Merge pull request #9945 from teees/air-fix
Adjust orca sight range and prevent aircraft from flying into shroud
2015-12-30 14:33:13 +01:00
Matthias Mailänder
c6cc0ecd29 Merge pull request #10323 from RoosterDragon/struct-equatable
Ensure some structs implement IEquatable<T>.
2015-12-30 09:28:09 +01:00
Matthias Mailänder
5061e7acd7 Merge pull request #10333 from atlimit8/RemoveLingeringNUnit2
Fix-up NUnit 2 & 3 use in Unix Makefile
2015-12-30 09:21:23 +01:00
Matthias Mailänder
3372079beb Merge pull request #10336 from RoosterDragon/fix-param-order
Fix parameters sent to DetectionCircleRenderable.
2015-12-30 09:13:37 +01:00
RoosterDragon
a010b06b49 Fix UpgradeChromeMetrics.
This needs to handle the null value passed in for the parent parameter from it's only (non-recursive) callsite.
2015-12-30 04:48:38 +00:00
RoosterDragon
6156575cd5 Fix parameters sent to DetectionCircleRenderable.
The parameters had been accidentally reversed in the builder methods.
2015-12-30 04:26:52 +00:00
atlimit8
68fd5dfd58 Merge pull request #10272 from RoosterDragon/player-dict
Speed up dictionaries keyed on Player
2015-12-29 19:27:11 -06:00
abcdefg30
2dd48ebe5f Merge pull request #10320 from r34ch/competitive-maps
Add competitive maps to the pool
2015-12-30 02:01:28 +01:00
atlimit8
dbcb0d6c09 Fix-up NUnit 2 & 3 use in Unix Makefile 2015-12-29 18:48:32 -06:00
Oliver Brakmann
7858ba16c4 Fix counting IRC notifications as unread messages 2015-12-30 00:50:03 +01:00
Oliver Brakmann
0be9d09650 Merge pull request #10328 from r34ch/ra-light-tank-buff
Buff light tank in the RA mod
2015-12-29 23:11:45 +01:00
Oliver Brakmann
d3b9277981 Merge pull request #10327 from pjdelport/add-travis-make-nunit
Add "make nunit" step to Travis
2015-12-29 22:50:50 +01:00
Piët Delport
8c3533e8e6 Add "make nunit" step to Travis
Historically, this wasn't working, but it should be more stable now.
2015-12-29 22:43:58 +02:00
Oliver Brakmann
928eda3a24 Merge pull request #10326 from pjdelport/add-nunit-binpath-config
Add NUnit configuration with correct binpath
2015-12-29 21:42:43 +01:00
DArcy Rush
efefb0e842 Buff light tank in the RA mod 2015-12-29 20:06:49 +00:00
Pavel Penev
1d69669b05 Merge pull request #10168 from teees/heightmap-fixes
Use heightmap to get correct groundlevel, use AircraftInfo for correct ground level
2015-12-29 21:45:55 +02:00
Piët Delport
8050b10488 Add NUnit configuration with correct binpath
This allows the tests to find and load OpenRA.Mods.Common.dll correctly
under Linux / Mono.

This should fix #10325.
2015-12-29 21:03:51 +02:00
Oliver Brakmann
6190db06ad Merge pull request #10309 from pjdelport/update-nunit-2.6.4-to-3.0.1
Update the default NUnit from 2.6.4 to 3.0.1
2015-12-29 19:10:00 +01:00
Piët Delport
e7a5be0c1b Add --noresult to the "make nunit" invocation
(requested by @obrakmann)
2015-12-29 19:47:41 +02:00
Piët Delport
8399ec721e Update AppVeyor config for NUnit 3.x
This follows the instructions at:

https://www.appveyor.com/docs/running-tests#nunit-3-x

and should enable reporting test results to AppVeyor, too.
2015-12-29 19:34:02 +02:00
Piët Delport
7f51a69eb5 Update NUnit lib path for the ps1 script too 2015-12-29 19:34:02 +02:00
Piët Delport
d682522b78 List myself in AUTHORS 2015-12-29 19:34:02 +02:00
Piët Delport
e9faad8224 Update fetch scripts to download NUnit 3.0.1, and adjust paths
Update Makefile to look for nunit3-console.exe
2015-12-29 19:34:02 +02:00
abcdefg30
c372d966b4 Merge pull request #10322 from RoosterDragon/triggers-array
Store triggers in ScriptTriggers in an array.
2015-12-29 16:41:03 +01:00
abcdefg30
0c23648899 Merge pull request #10225 from reaperrr/disable-turret
Disable WithSpriteTurret until build/transform complete
2015-12-29 16:27:38 +01:00
RoosterDragon
4948f73154 Ensure some structs implement IEquatable<T>. 2015-12-29 15:27:00 +00:00
abcdefg30
a7de8b3919 Merge pull request #10256 from RoosterDragon/fal-partitioning
Spatially partition frozen actors
2015-12-29 16:16:26 +01:00
abcdefg30
d5cfc1672c Merge pull request #9800 from huwpascoe/hitshape
Hitshape
2015-12-29 16:16:05 +01:00
RoosterDragon
0c5463208d Store triggers in ScriptTriggers in an array.
We can use the enum to index the array directly, in order to give faster lookups compared to a dictionary.
2015-12-29 14:27:54 +00:00
abcdefg30
e38424a2eb Merge pull request #10133 from Mailaender/benchmark
Added a benchmark mode
2015-12-29 15:20:28 +01:00
abcdefg30
3c171569a7 Merge pull request #10193 from atlimit8/ITraitInfoInterface
TraitInfoInterface base for interfaces implemented by trait infos
2015-12-29 15:04:57 +01:00
abcdefg30
76d88e5ae4 Remove the now unused ctor of VqaPlayerWidget to silence travis 2015-12-29 14:54:22 +01:00
abcdefg30
64f57ac9a5 Try to win a small amount of performance when the shellmap is disabled 2015-12-29 14:54:21 +01:00
DArcy Rush
6dafeba3ab Add behind-the-veil.oramap to the RA mod 2015-12-29 11:35:42 +00:00
DArcy Rush
2a69b60af0 Add sidestep.oramap to the RA mod 2015-12-29 11:34:48 +00:00
DArcy Rush
734312ff37 Add and touch up tabula-rasa.oramap for the RA mod 2015-12-29 11:23:47 +00:00
RoosterDragon
4b2df6d133 Merge pull request #10290 from Phrohdoh/remove-fromdict
Remove unused methods in MiniYaml
2015-12-29 02:26:43 +00:00
RoosterDragon
840dd189ae Merge pull request #10310 from pchote/moregl
More OpenGL cleanups
2015-12-29 02:08:40 +00:00
reaperrr
7076dfaa4d HitShape Upgrade Rules
Radius is now a sub-property of Shape.Circle.
2015-12-29 00:29:03 +00:00
Huw Pascoe
b427190ab4 HitShape Unit Tests
The shapes should accurately calculate their distancce from a point.
2015-12-28 23:25:36 +00:00
Huw Pascoe
a8299221db Integrated HitShapes
Integrated hit shapes with field loader and warhead calculations.
2015-12-28 23:25:35 +00:00
Huw Pascoe
5ef6d86f66 Added HitShapes
New IHitShape interface.
Added Circle, Capsule and Rectangle shapes.
2015-12-28 23:25:33 +00:00
RoosterDragon
8d2fc24fbe Speed up SpatiallyPartitioned.InBox for searches in a single partition bin.
If a search in a spatial partition is taking place entirely within a single bin, the cost of tracking possible duplicate items with a set can be avoided for a small speedup.
2015-12-28 21:49:58 +00:00
RoosterDragon
8ec03ab3b7 Spatially partition frozen actor layer.
Track changes in the shroud in a spatial partition in frozen actor layer. This allows us to run the expensive visibility updates only on frozen actors with a footprint in affected partitions, rather than on all frozen actors every time.
2015-12-28 21:49:57 +00:00
abcdefg30
f65ecf7780 Swap the Disable- and EnablePower sounds of D2K
Although the naming suggests something different,
the sounds are more fitting the other way round.
2015-12-28 22:30:34 +01:00
reaperrr
8d412e75ed Misc ZOffset fixes 2015-12-28 21:29:21 +00:00
reaperrr
c7b61799dc Make Bullet and Missile contrail ZOffset customizable
And give them a high default to avoid contrails "hiding" below large sprites.
2015-12-28 21:28:32 +00:00
reaperrr
2c5998e5d2 Make actor Contrail ZOffset customizable 2015-12-28 21:28:30 +00:00
RoosterDragon
e7f127976a Fix floating text ZOffset. 2015-12-28 21:28:29 +00:00
reaperrr
eafae0dee5 Fix ZOffset for move flash sequence 2015-12-28 21:28:28 +00:00
reaperrr
a7b5800d6f Make AreaBeam and LaserZap Z sorting customizable 2015-12-28 21:28:27 +00:00
reaperrr
92c7af7302 Fix beacon and rallypoint sequence ZOffsets 2015-12-28 21:28:26 +00:00
reaperrr
55f5bb5404 Fix powerdown/poweroff sequence ZOffsets 2015-12-28 21:28:25 +00:00
reaperrr
d8169556c8 Fix repair indicator sequence ZOffset 2015-12-28 21:28:24 +00:00
reaperrr
9cdbb5cf9e Fix crate effect sequence ZOffsets 2015-12-28 21:28:22 +00:00
reaperrr
af2343f487 Fix D2k rpg sequence ZOffset 2015-12-28 21:28:21 +00:00
RoosterDragon
8cb7211bb1 Fix YAML style. 2015-12-28 21:28:19 +00:00
reaperrr
32c6860445 Adapt explosion ZOffsets for effect Z sorting 2015-12-28 21:28:18 +00:00
reaperrr
072e4ce212 Adjust TS projectile sequences for Z sorting 2015-12-28 21:28:16 +00:00
reaperrr
0f61bec6b2 Adjust D2k projectile sequences for Z sorting 2015-12-28 21:28:15 +00:00
reaperrr
7cb5615c0b Adjust TD projectile sequences for Z sorting
Remove unused atomicup / atomicdown entries.
2015-12-28 21:28:14 +00:00
reaperrr
74123be3af Adjust RA projectile and smoke trail sequences for Z sorting
Make torpedoes go below ships.
Remove unused atomicup/atomicdown entries.
2015-12-28 21:28:13 +00:00
RoosterDragon
a50fa4fcaa Interleave renderables for effects and actors.
Previously, renderables from actors were z-ordered, but effects were excluded and not ordered. Now we order them all as a whole.
2015-12-28 21:28:12 +00:00
Paul Chote
7cc8846d72 Merge pull request #10271 from RoosterDragon/point-sequencing
Support sending sequences of points when drawing lines
2015-12-28 19:36:49 +00:00
Paul Chote
0d07fe4b78 Merge pull request #10066 from Mailaender/last-resource-sprite-frame
Fixed highest density sprite frame never being rendered
2015-12-28 19:32:34 +00:00
Paul Chote
b7b48e71ef Merge pull request #10222 from teees/withvoxelturret-fix
Disable WithVoxelTurret until build/transform complete
2015-12-28 18:55:48 +00:00
Paul Chote
12df496f5b Merge pull request #10015 from atlimit8/MapEditorTooltips
Add map editor only tooltips
2015-12-28 18:46:07 +00:00
Paul Chote
6b0e4cf645 Unify framebuffer api naming. 2015-12-28 15:15:30 +00:00
Paul Chote
e69c3360f6 Reorganise GL initialisation. 2015-12-28 15:15:29 +00:00
Oliver Brakmann
5e04c45dd9 Merge pull request #10163 from teees/cruising
Added cruising upgrade to aircraft
2015-12-28 15:25:41 +01:00
Paul Chote
e63fc00b76 Unify framebuffer api naming. 2015-12-28 14:23:44 +00:00
Oliver Brakmann
3cd708d2bb Merge pull request #10302 from Phrohdoh/attrib-require-traits
Allow ActorReferenceAttribute to list required traits
2015-12-28 14:30:01 +01:00
Oliver Brakmann
906aa0f1fd Merge pull request #10003 from r34ch/mute-setting
Mute setting
2015-12-28 14:07:27 +01:00
Paul Chote
4372ed650e Move CheckGlVersion to OpenGL. 2015-12-28 10:59:43 +00:00
Paul Chote
d96a32a89f Move WriteGraphicsLog to OpenGL. 2015-12-28 10:57:43 +00:00
Pavel Penev
4ec200b3a1 Merge pull request #10300 from abcdefg30/bomberjohn
Polish the chronoshiftpower on the map Bomber John
2015-12-27 23:18:31 +02:00
Oliver Brakmann
4052781bf3 Merge pull request #10260 from scshunt/silos-needed
Factor silos needed warning to a new trait.
2015-12-27 21:05:22 +01:00
Sean Hunt
8f4ec87b63 Factor silos needed warning to a new trait. 2015-12-27 14:40:37 -05:00
reaperrr
23dc6f64ac Merge pull request #9605 from Mailaender/nod-poweroffline
Added support for speech variants to CanPowerDown
2015-12-27 20:10:27 +01:00
Oliver Brakmann
14b6034e9d Merge pull request #10216 from pchote/remove-tags
Reimplement Primary and Fake tags using WithDecoration.
2015-12-27 19:43:57 +01:00
Pavel Penev
90aef33b68 Merge pull request #10299 from pchote/remove-minitk2
Replace MiniTK.Audio with OpenAL-CS and update to latest SDL2-CS.
2015-12-27 19:49:06 +02:00
Taryn Hill
5b5a45b0a4 Place constraints on ActorReferences in ParatroopersPower to improve linting 2015-12-27 11:24:16 -06:00
Taryn Hill
5542076a68 Make AirstrikePowerInfo.UnitType require AircraftInfo 2015-12-27 11:24:16 -06:00
Taryn Hill
a7a6f41ef9 Allow ActorReferenceAttribute to list required trait types enforced by --check-yaml 2015-12-27 11:24:13 -06:00
Paul Chote
9063befb71 Update SDL2-CS dependency. 2015-12-27 17:03:32 +00:00
Paul Chote
9f41743465 Replace MiniTK.Audio with OpenAL-CS. 2015-12-27 17:03:32 +00:00
Oliver Brakmann
feba44cd6d Merge pull request #10297 from Trebgarta/bleed
Observer Shroud Options listing polish #10263
2015-12-27 17:31:13 +01:00
Oliver Brakmann
5a27150587 Merge pull request #9977 from RoosterDragon/dispose-lua-values
Ensure LuaValues are disposed
2015-12-27 17:20:39 +01:00
abcdefg30
d342c81abc Polish the chronoshiftpower on the map Bomber John 2015-12-27 17:20:10 +01:00
Taryn Hill
453cb17a0f Merge pull request #10288 from pchote/remove-minitk
Replace MiniTK.Graphics with custom OpenGL shim.
2015-12-27 09:25:31 -06:00
reaperrr
7bd0ce012d Merge pull request #10270 from RoosterDragon/less-samples
Remove some unneeded PerfSamples
2015-12-27 15:52:12 +01:00
reaperrr
d2d302432e Merge pull request #10289 from RoosterDragon/aud-sample-rate
Allow AUD file with sample rates other than 22050 Hz
2015-12-27 15:40:32 +01:00
Paul Chote
397ca0f481 Replace MiniTK.Graphics with custom OpenGL shim. 2015-12-27 14:37:07 +00:00
Doruk Turak
5436319406 Observer Shroud Options listing polish #10263
Pretty self explanatory: Now "All Players" and "Disable Shroud" options come before
2015-12-27 16:32:32 +02:00
Taryn Hill
2974af83c6 Remove unused MiniYaml methods From(Dictionary|List) 2015-12-27 07:56:41 -06:00
Matthias Mailänder
fcdf32015e fix Nod building online/offline notifications using EVA voices 2015-12-27 11:44:50 +01:00
Matthias Mailänder
a8d8764b81 unhardcode and self-document the notification 2015-12-27 11:44:41 +01:00
Matthias Mailänder
89ff2f1ba2 expose palette and sprite sequence to lint testing 2015-12-27 11:38:58 +01:00
RoosterDragon
da84f3d5ef Allow AUD file with sample rates other than 22050 Hz. 2015-12-27 00:05:28 +00:00
Matthias Mailänder
4660b7156d Merge pull request #10249 from pchote/remove-legacy-gl
Replace deprecated OpenGL features with more modern replacements
2015-12-26 22:53:22 +01:00
Paul Chote
74fb9bbfbb Remove legacy SetLineWidth methods. 2015-12-26 13:51:53 +00:00
Paul Chote
be29ec5342 Use explicit shader attributes. 2015-12-26 12:50:33 +00:00
Paul Chote
788def1c31 Remove Quad rendering support. 2015-12-26 12:46:55 +00:00
Paul Chote
d0e9af8f6b Convert VoxelRenderer to TriangleList. 2015-12-26 12:46:55 +00:00
Paul Chote
a754a96b77 Convert SpriteRenderer to TriangleList. 2015-12-26 12:46:54 +00:00
Paul Chote
af344452ea Convert RgbaColorRenderer to TriangleList. 2015-12-26 12:46:54 +00:00
Paul Chote
409a0052ca Remove legacy tag rendering. 2015-12-26 12:38:27 +00:00
Paul Chote
5b017cee58 Remove "Primary" tag. 2015-12-26 12:38:27 +00:00
Paul Chote
ef2f9cbafa Remove "Fake" tag. 2015-12-26 12:38:27 +00:00
Paul Chote
372bbaf7b6 Overhaul WithDecoration trait. 2015-12-26 12:38:26 +00:00
Paul Chote
cec2c584e6 Fix TS EMP overlay. 2015-12-26 12:37:22 +00:00
Paul Chote
7b54fe1645 Fix TS actor defaults. 2015-12-26 12:37:22 +00:00
Paul Chote
3ceacbb7c1 Fix Z-sorting for UISpriteRenderable. 2015-12-26 12:37:22 +00:00
DArcy Rush
67f88e368f Add mute option to the game 2015-12-25 23:33:18 +00:00
Oliver Brakmann
3474da0ecc Merge pull request #10072 from r34ch/monster-tank-madness
Monster tank madness polish
2015-12-25 21:36:43 +01:00
abcdefg30
b3f6085ea0 Adjustments to "Fail mission if impossible to land at beach" 2015-12-25 20:10:21 +00:00
DArcy Rush
c65a15bfb0 Fail mission if impossible to land at beach 2015-12-25 20:08:53 +00:00
DArcy Rush
e452f40ae1 Hide TechCenter tooltip 2015-12-25 20:01:54 +00:00
DArcy Rush
b282ecdf2a Make Dr. Demitri use Soviet voice 2015-12-25 20:01:54 +00:00
Oliver Brakmann
9ea2e0015d Merge pull request #10255 from pchote/campaign-colors-redo
Enable original TD campaign colors.
2015-12-25 19:48:18 +01:00
Matthias Mailänder
4f080a996e also render highest density sprite frame 2015-12-25 19:37:55 +01:00
Matthias Mailänder
276c1984fd document graphic settings interesting for benchmarking 2015-12-25 19:30:18 +01:00
Matthias Mailänder
d4e842e643 add a benchmark mode 2015-12-25 19:30:15 +01:00
Oliver Brakmann
39ffa18000 Merge pull request #10110 from Mailaender/rm-stylecop
Removed StyleCop dependency for unit tests
2015-12-25 19:29:06 +01:00
Matthias Mailänder
e80625880f Merge pull request #10011 from atlimit8/EasierActorSelectionInGame
Better actor selection in game by actor bounds center
2015-12-25 19:17:12 +01:00
Oliver Brakmann
d375a27416 Merge pull request #10161 from jaZzKCS/patch-1
Updated music.yaml files (RA/TD/D2k)
2015-12-25 18:31:48 +01:00
Matthias Mailänder
7335c4a8ce Merge pull request #10069 from penev92/soundLoader
Add plumbing for mod-defined sound loaders
2015-12-25 14:40:43 +01:00
Matthias Mailänder
b289478123 Merge pull request #10189 from reaperrr/less-lazy1
AttackBase and Armament optimizations
2015-12-25 14:04:46 +01:00
Matthias Mailänder
3dee27c855 Merge pull request #10269 from RoosterDragon/shader-path
Load shaders relative to the game directory, rather than the CWD
2015-12-25 13:03:06 +01:00
abcdefg30
668902c526 Merge pull request #10274 from Mailaender/mono-4.2
Updated to Mono 4.2
2015-12-24 16:45:48 +01:00
Matthias Mailänder
01aed5e64c update to mono 4.2 series 2015-12-24 16:27:57 +01:00
Matthias Mailänder
c83e194b4e Merge pull request #10267 from abcdefg30/allies5aDesc
Adjust the description of allies05a
2015-12-24 15:08:04 +01:00
RoosterDragon
3a2139de26 Add PlayerDictionary.
This custom collection allows other classes to implement a Player to value mapping, but also stores the values in an array for faster lookup by the player index in the world. For some code, this improved lookup time is important for performance.
2015-12-23 23:54:04 +00:00
RoosterDragon
5c14044138 Support sending sequences of points when drawing lines.
This allows the graph widgets to avoid having to create temporary arrays just to draw these lines, which reduces GC pressure.
2015-12-23 22:58:53 +00:00
RoosterDragon
611a928a47 Prevent changing world players after being set once. 2015-12-23 21:53:47 +00:00
RoosterDragon
6d02d5ebaa Remove some unneeded PerfSamples. 2015-12-23 20:19:22 +00:00
RoosterDragon
c25fe32c9e Load shaders relative to the game directory, rather than the CWD.
If OpenRA is started with a current working directory that does not match the path to the game, then loading shaders will fail. By using a path relative to the game directory, we can successfully start the game with different working directories.
2015-12-23 19:19:02 +00:00
atlimit8
b07cd683e8 Easier actor selection in game by actor bounds center 2015-12-23 12:09:08 -06:00
RoosterDragon
6ab6d774a7 Ensure LuaValues are disposed.
Adding in these missing calls prevents these instances from having to be finalized.
2015-12-23 17:22:51 +00:00
abcdefg30
57510fc954 Add a "tutorial" message at the beginning of allies05a 2015-12-23 13:54:16 +01:00
abcdefg30
3b6a02a3af Adjust the description of allies05a 2015-12-23 12:21:27 +01:00
jaZzKCS
4c461b08af Update music.yaml
Added a one-liner to make sure the song "Afterlife" (await_r.aud) is loaded in both content data alternatives (Aftermath scores.mix from DL mirror / Base game scores.mix file from Game CD.)

Regarding of which scores.mix file is used (the DL mirror one including the Aftermath expansion tracks or the vanilla one from "Install from CD"-option)
the naming of the file is different. Resulting in missing out this song when using the bigger scores.mix file with the bonus tracks.
2015-12-22 21:39:39 +01:00
Oliver Brakmann
387d0d0e3f Merge pull request #10154 from teees/fix-banshee-deathsound
enable banshee death sound
2015-12-21 22:52:32 +01:00
atlimit8
43b2957331 Merge pull request #10251 from abcdefg30/removeISpriteBody
Remove ISpriteBody
2015-12-21 11:37:54 -06:00
Paul Chote
e11f49a773 Enable original TD campaign colors. 2015-12-21 17:14:49 +00:00
Paul Chote
95629c29a4 Use map rules to build the editor sidebar. 2015-12-21 15:05:44 +00:00
Paul Chote
fef25c7269 Add IndexedPlayerPalette for original campaign colors. 2015-12-21 15:05:28 +00:00
Matthias Mailänder
0fe644f458 Merge pull request #10203 from pchote/widelines2
Rewrite line renderer: Part 2 (remove LineRenderer plus other cleanups)
2015-12-21 07:36:21 +01:00
Oliver Brakmann
71478aa2b8 Merge pull request #9734 from RoosterDragon/auto-target-perf
Improve AutoTarget performance
2015-12-20 19:53:17 +01:00
abcdefg30
72ac5240b8 Remove ISpriteBody 2015-12-20 18:44:55 +01:00
Pavel Penev
42c98ec154 Don't crash when parsing corrupt sound files
Log the exception and move to the next parser.
2015-12-20 19:17:54 +02:00
Pavel Penev
8542ed33ce Add ModData.GetLoaders()
Extract sound loaders and sprite loaders creation into a generic method to avoid code duplication.
2015-12-20 19:17:53 +02:00
Pavel Penev
61c1cab963 Add the SoundFormats field to mods 2015-12-20 19:17:51 +02:00
Pavel Penev
a31b0becf1 Make AudLoader implement ISoundLoader 2015-12-20 19:17:50 +02:00
Pavel Penev
5063e56786 Make WavLoader implement ISoundLoader 2015-12-20 19:17:49 +02:00
Pavel Penev
8d56de80ca Add ISoundLoader
The interface is to be implemented by all sound loaders, just like ISpriteLoader. All loading goes through the interface. This would allow mods to create their own sound loaders outside the engine.
Also add a SoundFormats property to mod.yaml, where mods can define what sound loaders they will need.
This requires Game.Sound to be initialized after the ModData is loaded.
2015-12-20 19:17:48 +02:00
abcdefg30
e5cb7e03e1 Merge pull request #10239 from penev92/annotationChange
Use '@' in mod.yaml to indicate extra info
2015-12-20 17:47:36 +01:00
abcdefg30
49cf33dda3 Merge pull request #10242 from obrakmann/fix10228_frozenactor-startrevealed
Fix the StartsRevealed option of FrozenUnderFog being ignored
2015-12-20 17:45:21 +01:00
Pavel Penev
7c0b30888d Merge pull request #10238 from abcdefg30/d2kFoundationDamage
Fix DamagedWithoutFoundation causing more damage than it should
2015-12-20 18:10:18 +02:00
abcdefg30
fa260ddee1 Document fields in DamagedWithoutFoundationInfo 2015-12-20 16:36:13 +01:00
abcdefg30
c0206b18b0 Fix DamagedWithoutFoundation causing more damage than it should
Tick caused extra damage in addition to the damage in AddedToWorld,
which lead the actor to have less health than damageThreshold.
2015-12-20 16:36:11 +01:00
Pavel Penev
4e6df6372d Merge pull request #10247 from obrakmann/fix10245_soviet06_build_prereqs
Fix gap gens being buildable in Soviet 06x
2015-12-20 17:24:48 +02:00
Oliver Brakmann
79bd2d400b Fix gap gens being buildable in Soviet 06x 2015-12-20 14:43:34 +01:00
Paul Chote
855b473084 Merge pull request #10229 from abcdefg30/initialDropzone
Fix crates not spawning immediately on the dropzone maps
2015-12-19 13:36:28 +00:00
Paul Chote
e021617c85 Remove duplication from FillRect. 2015-12-19 12:28:59 +00:00
Paul Chote
4ffee12065 Remove legacy line rendering code. 2015-12-19 12:28:59 +00:00
Paul Chote
8e9318e64d Use RgbaColorRenderer in UISpriteRenderable. 2015-12-19 12:28:59 +00:00
Paul Chote
1b755d9833 Use RgbaColorRenderer in RadarWidget. 2015-12-19 12:28:58 +00:00
Paul Chote
ee5ccc4b8a Use RgbaColorRenderer in LineGraphWidget. 2015-12-19 12:28:58 +00:00
Paul Chote
17c98e8af5 Use RgbaColorRenderer in PerfGraphWidget. 2015-12-19 12:28:58 +00:00
Paul Chote
8fc323602c Use RgbaColorRenderer in WeatherOverlay. 2015-12-19 12:28:56 +00:00
Paul Chote
f6606afa8b Use RgbaColorRenderer in CombatDebugOverlay. 2015-12-19 12:28:10 +00:00
Paul Chote
b0806fca92 Use RgbaColorRenderer in SelectionBoxRenderable. 2015-12-19 12:28:10 +00:00
Paul Chote
310222eb0e Use RgbaColorRenderer for rendering contrails. 2015-12-19 12:28:10 +00:00
Paul Chote
c618c2d8ab Use RgbaColorRenderer for selection box rendering. 2015-12-19 12:28:10 +00:00
Paul Chote
8719b4ed3c Use RgbaColorRenderer in SpriteRenderable / TextRenderable. 2015-12-19 12:28:10 +00:00
Paul Chote
b35762f537 Use RgbaColorRenderer in TerrainGeometryOverlay. 2015-12-19 12:28:09 +00:00
Paul Chote
cdf4aaf2b8 Use RgbaColorRenderer in SelectionBarsRenderable. 2015-12-19 12:28:09 +00:00
Paul Chote
27f615261a Use RgbaColorRenderer in VoxelRenderable. 2015-12-19 12:28:09 +00:00
Paul Chote
03a48a7a41 Use RgbaColorRenderer in TargetLineRenderable. 2015-12-19 12:28:09 +00:00
Paul Chote
bb0a7bdaf5 Add two-colour line rendering to RgbaColorRenderer. 2015-12-19 12:28:09 +00:00
Paul Chote
c5dbc5fab7 Add composite line drawing methods to RgbaColorRenderer. 2015-12-19 12:28:09 +00:00
Paul Chote
50dfa6df8f Fix Contrail field description. 2015-12-19 12:28:08 +00:00
Paul Chote
55433bd27c Fix voxel shadow geometry position. 2015-12-19 12:28:08 +00:00
Paul Chote
43226d7c55 Move DrawRollover to WICW. 2015-12-19 12:28:08 +00:00
Paul Chote
0f1fcdaca4 Move DrawTargetMarker to TargetLineRenderable. 2015-12-19 12:28:08 +00:00
Oliver Brakmann
879ccaf4f8 Fix the StartsRevealed option of FrozenUnderFog being ignored 2015-12-18 20:32:10 +01:00
Pavel Penev
55bb7eb1a0 Use '@' in mod.yaml to indicate extra info
Applies to MapFolders (to indicate System and User directories) and Packages (to indicate package annotation).
2015-12-16 23:39:22 +02:00
teees
1869880aab Enable Hovers: when cruising, merged common aircraft rules into defaults 2015-12-16 13:44:13 +01:00
teees
00c15eaf3a Add cruising upgrade to Aircraft trait 2015-12-16 13:18:18 +01:00
Oliver Brakmann
c7a9d024b0 Merge pull request #10234 from abcdefg30/damagedFix
Fix the idle animation of the host in WithRepairAnimation.cs
2015-12-15 22:51:18 +01:00
Oliver Brakmann
7a1d6e9c26 Merge pull request #10233 from teees/remove-aircraft-defaults
Remove aircraft defaults
2015-12-15 22:43:25 +01:00
abcdefg30
6e5181fe4d Fix the idle animation of the host in WithRepairAnimation.cs using the damage state of the repaired actor. 2015-12-15 20:57:55 +01:00
teees
cdf82cab14 Merged common ra aircraft definitions 2015-12-15 18:45:14 +01:00
teees
c1c386a994 Removed default definitions for repair and rearmbuildings in Aircraft.cs 2015-12-15 18:44:05 +01:00
abcdefg30
1cdd121753 Fix crates not spawning immediately on the dropzone maps 2015-12-15 13:25:48 +01:00
Oliver Brakmann
20725c9b2c Merge pull request #10153 from abcdefg30/repairableNear
Add a 'Voice' field to RepairableNearInfo
2015-12-14 21:59:56 +01:00
Oliver Brakmann
11cbb43212 Merge pull request #9918 from penev92/fixTransforms
Fix an oversight regarding building unlocking
2015-12-14 21:00:41 +01:00
Oliver Brakmann
02fa63c1b4 Merge pull request #9853 from penev92/unglobalFileSystem
Unglobal file system
2015-12-14 20:52:30 +01:00
reaperrr
83dc3a36d2 Add d2k turret make sequences
Currently unused, as WithMakeAnimation and WithWallSpriteBody don't work well together at this point.
2015-12-14 15:33:05 +01:00
reaperrr
e5b3291d41 Enable crumble overlay for D2k turrets 2015-12-14 15:28:31 +01:00
reaperrr
0d60ee5fe0 Disable WithSpriteTurret until build/transform complete 2015-12-14 15:27:52 +01:00
teees
19036d1927 Disable WithVoxelTurret until build/transform complete 2015-12-14 12:10:40 +01:00
reaperrr
2d55bbdedf Cache trait look-ups and range modifiers directly in Armament
Avoid the performance impact of accessing Lazy.Value by caching them
when the actor is created and accessing the references directly when needed.
2015-12-14 04:34:58 +01:00
reaperrr
0e5ea959aa Perform faster checks in AB.CanAttack much earlier
Move self.IsDisabled right after IsInWorld and IsTraitDisabled checks.
This should skip/avoid a lot of the following checks when actors are disabled by low power, EMP or similar, potentially saving some performance when there are many disabled actors with attack trait.

Move IsValidFor before HasAnyValidWeapons because the latter is more
expensive.
2015-12-14 04:34:58 +01:00
reaperrr
acc9b37a01 Remove ITraitInfo from AttackBase
That is already included in UpgradableTraitInfo.
2015-12-14 04:34:58 +01:00
atlimit8
bee590a057 Merge pull request #10208 from RoosterDragon/perf-comments
Added some performance comments
2015-12-13 20:46:07 -06:00
Pavel Penev
22678221d0 Fix an oversight regarding building unlocking 2015-12-14 04:18:57 +02:00
Pavel Penev
d08a400565 Add a context argument to package files contructors 2015-12-14 03:42:25 +02:00
Pavel Penev
4ce1444c6b Fix shader loading
Also remove now redundant mounting of the game directory
2015-12-14 03:42:24 +02:00
Pavel Penev
1b88d24cfa Unstatic GlobalFileSystem and rename it to FileSystem
Add a ModFiles field on ModData and move all access to the file system to go through that.
2015-12-14 03:42:22 +02:00
Pavel Penev
5684bcec1c Move IFolder out of GlobalFileSystem.cs 2015-12-14 03:42:18 +02:00
Matthias Mailänder
02c5c1bbfb Merge pull request #10148 from pchote/widelines
Rewrite line renderer: Part 1 (improved lasers plus other cleanups)
2015-12-13 20:55:54 +01:00
Matthias Mailänder
0bde5bc294 Merge pull request #10211 from abcdefg30/damagedAfld
Fix the idle animation of the hostBuilding in Rearm.cs
2015-12-13 20:43:29 +01:00
abcdefg30
9d76ff2770 Merge pull request #10214 from RoosterDragon/lays-terrain-bounds
Ensure LaysTerrain doesn't access cells outside the map
2015-12-13 20:07:16 +01:00
Oliver Brakmann
1f440baaa0 Merge pull request #10120 from RoosterDragon/gps-dot-perf
Fix broken GPS and frozen actor behaviour
2015-12-13 18:28:12 +01:00
RoosterDragon
b0619a3e25 Added comments in performance sensitive code. 2015-12-13 16:24:54 +00:00
RoosterDragon
0f70e23b70 Ensure LaysTerrain doesn't access cells outside the map. 2015-12-13 16:21:08 +00:00
abcdefg30
62addb9c60 Merge pull request #10182 from obrakmann/fix9851-attackmove-click-madness
Fix AttackMove not working properly under certain conditions
2015-12-13 16:06:51 +01:00
abcdefg30
cf9ea91606 Fix the idle animation of the hostBuilding in Rearm.cs
using the damage state of the reloaded actor
2015-12-13 16:00:18 +01:00
Oliver Brakmann
59d22a2ff0 Fix AttackMove not working properly under certain conditions
This fixes the issue where AttackMove (and possibly other order modes) would not work properly when people were clicking their mouse buttons at the same time. A move order (the default order mode) would be issued instead.
2015-12-13 14:16:06 +01:00
abcdefg30
fe334906f6 Make 'CloseEnough' on 'RepairableNear' use WDist 2015-12-13 01:10:38 +01:00
abcdefg30
301c2f0ca0 Add a 'Voice' field to RepairableNearInfo 2015-12-13 01:08:34 +01:00
Pavel Penev
2017a6d989 Merge pull request #10206 from abcdefg30/survival02
Let spawned soviet vehicles attack move on Survival02
2015-12-12 23:44:48 +02:00
RoosterDragon
21292061f9 Added "PERF: Avoid LINQ." comments. 2015-12-12 21:05:13 +00:00
RoosterDragon
d0c23ef2dd Prevent redundant enumerations in Attack.InnerTick.
The armaments variable is enumerated several times, but the results won't change. If we cache it straight away we can improve performance.
2015-12-12 20:55:23 +00:00
RoosterDragon
7fbbaa2221 Optimize AutoTarget.ChooseTarget.
Avoid using LINQ for filtering, grouping and dictionary building. Instead, we do these ourselves to reduce overhead.

Actors are checked for AutoTargetIgnoreInfo (rather than the trait) since info checks are marginally faster. This check can now be done immediately to allow us to skip such actors right away.

The ClosestTo calculation is now only run on the group on actors for the selected armament, rather than all potential armaments.
2015-12-12 20:55:22 +00:00
RoosterDragon
487727c9d0 Optimize AutoTarget.ScanForTarget.
The currentTarget parameter is null at the only call site. Inlining it allows us to make some simplifications to the logic.
2015-12-12 20:55:20 +00:00
RoosterDragon
16386873af Optimize AttackBase.ChooseArmamentsForTarget.
Remove the unused onlyEnabled parameter to avoid it needlessly being captured in the closure, and simplify the logic.

Evaluate RequiresForceFire and Weapon.IsValidAgainst last in their respective logic chains as these are the most expensive operations and benefit from short-circuiting being able to skip their evaluation.
2015-12-12 20:55:19 +00:00
RoosterDragon
0fab3ec1b2 Remove LINQ in some performance critical AutoTarget paths. 2015-12-12 20:55:18 +00:00
RoosterDragon
dcf375a412 Store Targetables in Actor.
This can be used to avoid several lookups for these traits, as well as allow Actor to provide specialised methods to deal with target types efficiently. This also reduces some code duplication.
2015-12-12 20:55:17 +00:00
RoosterDragon
aaa82339d1 Small cleanup in TraitDictionary. 2015-12-12 20:46:10 +00:00
RoosterDragon
c0286bb147 Remove ActorMap.ActorsInWorld.
Prefer the more direct and efficient query on World.Actors instead.
2015-12-12 20:42:44 +00:00
RoosterDragon
912a0630e2 Tweak some Render methods for efficiency. 2015-12-12 20:42:43 +00:00
RoosterDragon
62a932272c Fix GPS refreshing for incorrect player.
GpsWatcher.RefreshGps was wrongly using the render player in simulation code.
2015-12-12 19:57:08 +00:00
RoosterDragon
f96d02a794 Fix GPS dot relying on frozen actor render state.
The GPS dot was not displayed if a frozen actor for it was already visible. However, this was mistakenly affecting visibility checks in the world. Now, we only avoid rendering it when the frozen actor is present, but the indicator is still regarded as visible for visilbity checks in the world.
2015-12-12 19:57:07 +00:00
RoosterDragon
cbc090dd38 Ensure frozen actors are rendered on the first tick they become visible.
The previous lazy rendering means the snapshot of the render state might be more up to date then when the frozen actor actually did become visible. Now, we take this snapshot as soon as needed. We still retain the performance of only doing this rendering when needed by avoiding extra rendering until the visibility cycles again.
2015-12-12 19:54:25 +00:00
RoosterDragon
87d35a75da Merge dictionaries in GpsDot.
This speeds up GpsDot.Tick as it requires only one dictionary lookup per player rather than two.
2015-12-12 19:54:23 +00:00
abcdefg30
93757d3324 Let spawned soviet vehicles attack move on Survival02 2015-12-12 18:49:28 +01:00
Paul Chote
8230be6a14 Merge pull request #10196 from RoosterDragon/hardware-cursoring
More graceful hardware cursor failing
2015-12-12 12:55:53 +00:00
Oliver Brakmann
01d3bbb12c Merge pull request #10067 from Mailaender/ingame-client-tooltip
Added an in-game client tooltip with IP and country
2015-12-11 21:09:05 +01:00
teees
3b65232365 Optionally discard resources when silo capacity has been reached 2015-12-11 17:55:40 +01:00
teees
9dba85def5 Use heightmap to get correct groundlevel, fix additional behavior 2015-12-11 17:10:38 +01:00
Matthias Mailänder
79dc26c978 add an in-game client tooltip without latency indicator 2015-12-11 07:29:54 +01:00
Matthias Mailänder
1f07962510 remove unused Session.Slot 2015-12-11 07:29:07 +01:00
Pavel Penev
a673aee547 Merge pull request #10199 from RoosterDragon/vector-typos
Fix some typos in vector strings
2015-12-11 01:31:08 +02:00
Paul Chote
92d0261005 Overhaul LazerZap and AreaBeam rendering. 2015-12-10 23:25:59 +00:00
Paul Chote
78556ec60c Remove obsolete WorldRenderer.DrawRangeCircle. 2015-12-10 23:25:58 +00:00
Paul Chote
170ef577d7 Reimplement RenderDetectionCircle trails. 2015-12-10 23:22:47 +00:00
Paul Chote
e2d43da1d8 Use RgbaColorRenderer for range circle rendering. 2015-12-10 23:22:47 +00:00
Paul Chote
43eb4dadc9 Remove obsolete QuadRenderer. 2015-12-10 23:22:47 +00:00
Paul Chote
68302c9617 Use RgbaColorRenderer for pathfinder debug rendering. 2015-12-10 23:22:47 +00:00
Paul Chote
8158d25ee6 Use RgbaColorRenderer for weather rendering. 2015-12-10 23:22:46 +00:00
Paul Chote
66744ee92a Use RgbaColorRenderer for UI rendering. 2015-12-10 23:22:46 +00:00
Paul Chote
2d89f15374 Use RgbaColorRenderer for warhead debug rendering. 2015-12-10 23:22:45 +00:00
Paul Chote
02dedf9acf Introduce RgbaColorRenderer class. 2015-12-10 23:22:07 +00:00
RoosterDragon
654ca6ed03 Fix some typos in vector strings. 2015-12-10 21:53:11 +00:00
RoosterDragon
4ed5a24bbe Merge pull request #10118 from pchote/rework-order-targets
Rework order targeting crazyness.
2015-12-10 20:09:57 +00:00
RoosterDragon
e1f4ad7176 Merge pull request #9838 from Phrohdoh/warhead-colors
Per-warhead WarheadDebugOverlay colors
2015-12-10 19:35:00 +00:00
Taryn Hill
20927e9aae Change healing weapons to have a Green DebugOverlayColor 2015-12-09 20:57:57 -06:00
Taryn Hill
9b9d3c8af5 Add DebugOverlayColor to Warhead
This allows us to render WarheadDebugOverlay circles in a
color-per-warhead fashion.
2015-12-09 20:48:10 -06:00
RoosterDragon
679cff004e When hardware cursors fail, retry next session. 2015-12-08 22:53:21 +00:00
RoosterDragon
765bc4fa72 When the SDL hardware cursor fails, ensure more of the error message is logged.
Capture the useful details from the inner exception into the message, as this will be logged.
2015-12-08 22:51:55 +00:00
RoosterDragon
47224bca40 Merge pull request #10078 from penev92/actorNameOverlay
Add an actor name overlay debug option
2015-12-08 21:16:26 +00:00
RoosterDragon
0c1df850a5 Merge pull request #10185 from obrakmann/fix-lobby-chat-unread-messages-button-blinking
Fix showing unread messages count on active lobby chat button
2015-12-08 20:48:08 +00:00
atlimit8
3d2aa751a3 TraitInfoInterface base for interfaces implemented by trait infos 2015-12-07 18:22:43 -06:00
abcdefg30
0976972f7c Merge pull request #10141 from reaperrr/fix-anim-cancel
Fix actors not going back to idle animation after custom animation
2015-12-07 15:13:00 +01:00
abcdefg30
22aa548d1b Merge pull request #10126 from RoosterDragon/fuf-perf
Speed up FrozenUnderFog.Tick
2015-12-07 15:03:59 +01:00
Pavel Penev
6f8b3c45b4 Add RenderDebugState trait 2015-12-07 01:41:19 +02:00
Pavel Penev
c51bad6050 Expose HackyAI's Squads and IsEnabled fields 2015-12-07 01:41:16 +02:00
Pavel Penev
6217ec0360 Add a ShowActorTags property to DeveloperMode 2015-12-07 01:41:15 +02:00
Pavel Penev
4bbb406d4d Add checkboxes for actor tag overlay 2015-12-07 01:41:14 +02:00
Pavel Penev
101d8ab363 Give TS its own copy of ingame-info.yaml
This is a 1:1 copy of RA's ingame-info.yaml file.
2015-12-07 01:41:13 +02:00
Oliver Brakmann
40c7ada8e7 Merge pull request #9927 from atlimit8/EasierActorSelectionInMapEditor
Easier actor selection in map editor by actor bounds center
2015-12-06 21:30:38 +01:00
Oliver Brakmann
c02881e51e Merge pull request #9735 from RoosterDragon/animation-refactor
Refactor animation classes
2015-12-06 18:53:45 +01:00
Oliver Brakmann
8c8e29e2fa Merge pull request #9802 from RoosterDragon/move-min-range
Fix MoveWithinRange not moving far enough for min range checks
2015-12-06 17:11:22 +01:00
Matthias Mailänder
fa5fd5c92f Merge pull request #9710 from obrakmann/yaml-removals
Fix yaml removals
2015-12-06 17:04:47 +01:00
Oliver Brakmann
16dd2a3323 Fix showing unread messages count on active lobby chat button
The lobby chat button text would change to include the unread messages count for a split second, even when the lobby chat was the current panel, leading to the button text sort of 'blinking' in an ugly way.
2015-12-06 14:27:40 +01:00
abcdefg30
310f0cbea5 Merge pull request #10174 from atlimit8/WDistToString
Make WDist.ToString() return <cells>c<units>
2015-12-06 13:51:24 +01:00
abcdefg30
c6cb0e2c78 Merge pull request #10183 from reaperrr/fix-ts-obel
Fix TS Obelisk charge overlay Z offset
2015-12-06 13:42:00 +01:00
reaperrr
04b5b3df5c Fix TS Obelisk charge overlay Z offset
To make sure it is played on top of the 'body'.
2015-12-06 02:04:40 +01:00
Matthias Mailänder
995d1dd4af Merge pull request #9650 from r34ch/health-bars-on-damage
Display status bars dropdown
2015-12-05 19:45:20 +01:00
Matthias Mailänder
a9d2ec5750 Merge pull request #9619 from abcdefg30/repulsionbug
Fix aircraft repulsing other aircraft when not being repulsable themselves
2015-12-05 19:20:40 +01:00
Matthias Mailänder
142d3ef6ab Merge pull request #9438 from atlimit8/UpgradableMobile
Upgradable Mobile and replace IDisableMove
2015-12-05 18:24:40 +01:00
Oliver Brakmann
d5dc49db85 Merge pull request #10156 from abcdefg30/deathSoundsAny
Fix DeathSounds not working without DeathTypes defined
2015-12-05 18:16:50 +01:00
Matthias Mailänder
0c44bac636 Merge pull request #9357 from UberWaffe/LineImpactProjectile
Added a LineImpactProjectile (Attempt 2)
2015-12-05 18:09:12 +01:00
RoosterDragon
082ea6ba73 Refactor animation classes.
Specify pause function in constructors of Animation if required, and remove the unused pause function from AnimationWithOffset.

Cleanup Animation.cs and reduce code duplication.
2015-12-05 16:58:26 +00:00
Oliver Brakmann
af4667fc68 Merge pull request #10178 from abcdefg30/proxCaptor
Remove junk ProximityCaptor values
2015-12-05 17:20:13 +01:00
abcdefg30
6df67cf451 Merge pull request #9595 from ChaoticMind/middle_click
Middle click to cancel directly (skips onhold) & ctrl+cancel to cancel entire queue
2015-12-05 16:06:09 +01:00
Kevin Azzam
7b22023d57 Implement middle click to cancel (skips onhold) and ctrl+cancel to cancel entire queue 2015-12-05 15:50:41 +01:00
atlimit8
e9b0691f70 Improve rule upgrade logic for immobilization 2015-12-04 19:30:39 -06:00
atlimit8
c827dbe183 Replace IDisableMove with upgradability 2015-12-04 19:26:49 -06:00
atlimit8
0fc04b7a4a Make Mobile upgradable 2015-12-04 19:22:23 -06:00
atlimit8
019951795d Upgrades for Carryable while waiting or being carried 2015-12-04 19:19:54 -06:00
atlimit8
f5460f9f56 Upgrade(s) while loading cargo 2015-12-04 19:17:16 -06:00
abcdefg30
466279e23b Remove junk ProximityCaptor values 2015-12-05 01:56:32 +01:00
abcdefg30
e5bafe835f Merge pull request #9541 from reaperrr/rename-rendertraits-xy
Rename WithTurret, WithBarrel and WithReloadingTurret to include 'Sprite' in trait name
2015-12-05 00:24:37 +01:00
UberWaffe
35c62cabf5 Changed Sonic Tank projectile to LineImpactProjectile (from LaserZap). 2015-12-05 00:23:57 +02:00
UberWaffe
8b9df5f32c Changed TS SonicZap weapon to LineImpactProjectile (from LaserZap).
Changed TS Ghost Railgun weapon to LineImpactProjectile (from LaserZap).
Changed TS Mammoth Mk2 weapon to LineImpactProjectile (from LaserZap).
2015-12-05 00:23:56 +02:00
UberWaffe
f7f0dde4bb Added LineImpactProjectile. 2015-12-05 00:23:55 +02:00
abcdefg30
642e213049 Fix DeathSounds not working without DeathTypes defined 2015-12-04 22:06:16 +01:00
atlimit8
d196d2d40f make WDist.ToString() return <cells>c<units> 2015-12-04 13:03:57 -06:00
Paul Chote
a34b0be873 Add AnyBlockingActorsBetween helper. 2015-12-04 17:44:40 +02:00
Oliver Brakmann
b45ae48c59 Merge pull request #10170 from abcdefg30/crashActorsNear
Fix a crash when producing an actor without OccupiesSpace...
2015-12-03 21:57:15 +01:00
Oliver Brakmann
44b940333a Merge pull request #9988 from pchote/isometric-boundingregion
Fix CellRegion.BoundingRegion behaviour.
2015-12-03 21:36:58 +01:00
abcdefg30
6f8d580567 Fix a crash when producing an actor without OccupiesSpace in combination with UpgradeActorsNear 2015-12-03 16:25:46 +01:00
Pavel Penev
a4b755dd87 Merge pull request #9791 from RichSuther/upstream/fix-keyboard-filter
Added Keyboard input filter to only register first key press.
2015-12-02 21:56:05 +02:00
Oliver Brakmann
fd2bd7c9d3 Merge pull request #9639 from abcdefg30/specchat
Add team chat for spectators
2015-12-01 22:32:57 +01:00
Oliver Brakmann
5174da6d93 Merge pull request #10048 from r34ch/scientist-on-sell
Add CHAN to EmitInfantryOnSell on certain structures.
2015-12-01 21:34:31 +01:00
Oliver Brakmann
1a11eec43a Merge pull request #10099 from abcdefg30/newExplosions
Add more building explosions to d2k and cnc
2015-12-01 21:19:00 +01:00
abcdefg30
07bfd5f59e Merge pull request #9786 from RoosterDragon/reserve-fixes
Reserve fixes
2015-12-01 21:13:41 +01:00
Matthias Mailänder
035dc3fc5c Merge pull request #9943 from abcdefg30/moreexplosions
Add more variations to building explosions in ra
2015-12-01 20:05:05 +01:00
abcdefg30
837c553e88 Merge pull request #10068 from Mailaender/catch-natdevice-externalip
Fixed crashes when NatDevice.GetExternalIP() fails
2015-12-01 17:20:13 +01:00
Pavel Penev
e1dc53a0d2 Merge pull request #10093 from teees/harvesterdocksequence
Made the HarvesterDockSequence class abstract
2015-12-01 13:53:21 +02:00
Paul Chote
03693a06eb Add CurrentSource parameter to ProjectileArgs. 2015-12-01 07:47:39 +02:00
teees
2211808ef4 enable banshee death sound 2015-11-30 18:56:40 +01:00
abcdefg30
354f44a17b Merge pull request #10151 from teees/fix-falltoearth
Fixed FallToEarth groundlevel check
2015-11-30 16:57:22 +01:00
teees
c9e5dba38b Fixed FallToEarth groundlevel check 2015-11-30 13:02:16 +01:00
DArcy Rush
8eb34f3cfa Replace 'Always show Healthbars' checkbox with dropdown
The player can now cycle between;
-Standard: Health and Status bars display only on mouse hover.
-Show On Damage: Health shows on damaged actors, Status always shows.
-Always Show: Health and Status bars are always displayed.
2015-11-29 21:52:31 +00:00
Matthias Mailänder
70de26557b Merge pull request #10145 from obrakmann/fix10127_creeps-enemies
Set enemies of the 'Creeps' player when adding a new player in the editor
2015-11-29 19:47:23 +01:00
Pavel Penev
f9efe94f62 Merge pull request #10134 from abcdefg30/upgradeUpgrades
Try to polish the upgrade rules
2015-11-29 20:45:29 +02:00
abcdefg30
a10ea0350e Misc (style) improvements in the upgrade rule code 2015-11-29 19:39:43 +01:00
abcdefg30
5c6c44ba7b Try to avoid adding duplicate values through upgrade rules 2015-11-29 19:39:42 +01:00
abcdefg30
1695627ffc Let upgrade rules also account for negated traits
(this commit affects only "-SpawnViceroid:", "-LeavesHusk:", "-Plane:" and "-Helicopter:")
2015-11-29 19:39:41 +01:00
Oliver Brakmann
e53a167046 Set enemies of 'Creeps' player when adding a new player in the editor 2015-11-29 15:21:20 +01:00
reaperrr
e9ed50a831 Fix actors not going back to idle animation after custom animation 2015-11-28 22:45:05 +01:00
reaperrr
35c4aca983 Rename WithTurret, WithBarrel and WithReloadingTurret
Make them use RenderUtils.ZOffsetFromCenter.
2015-11-28 20:57:09 +01:00
reaperrr
72ec431766 Add RenderUtils
With ZOffsetFromCenter as first feature so render traits don't have to use it from WithTurret(Overlay)
2015-11-28 20:47:17 +01:00
RoosterDragon
9e43daeec7 Add tests for trait inheritance and removals in yaml. 2015-11-28 17:20:32 +01:00
RoosterDragon
0caffa8196 Remove some global state dependence in ActorInfo.
Instead on relying on the global Game.ModData.ObjectCreator, this is passed in via a parameter.
2015-11-28 17:20:32 +01:00
Paul Chote
c7249e6fa6 Move yaml removals to the end of the merge. 2015-11-28 17:20:32 +01:00
Paul Chote
a074bb1d4b Rename MiniYaml MergeLiberal -> MergePartial, MergeStrict -> Merge. 2015-11-28 17:20:21 +01:00
abcdefg30
b8715b0377 Let the utility fix cosmetics in the chrome yamls 2015-11-28 16:12:17 +01:00
abcdefg30
18b9022915 Fix potential crashes in the upgrade rules 2015-11-28 16:12:16 +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
Oliver Brakmann
f89d40ee10 Merge pull request #10131 from pchote/add-join-logging
Add a server log line for player joins.
2015-11-28 15:44:59 +01:00
Matthias Mailänder
19e000a8ec Merge pull request #10021 from teees/weed
added nawast
2015-11-28 11:54:01 +01:00
Paul Chote
cfb2933a6b Merge pull request #10125 from Mailaender/eluant-20151127
Updated to current version from Eluant fork
2015-11-28 10:44:13 +00:00
Paul Chote
4c0ffe98f1 Merge pull request #10121 from RoosterDragon/spelling
Fix some spellings
2015-11-28 10:42:58 +00:00
Paul Chote
92e6efd45c Add a server log line for player joins. 2015-11-28 10:38:47 +00:00
RoosterDragon
bfe1804bf6 Fix some spellings. 2015-11-27 16:19:59 +00:00
RoosterDragon
91ea3532b4 Change a dictionary to an array for faster player lookup in FrozenUnderFog.
Deferencing an array element to get the state is cheaper than a dictionary lookup. We can do this since the players collection does not change during gameplay.
2015-11-27 15:46:32 +00:00
RoosterDragon
ab6ef9be40 Cache traits directly in FrozenUnderFog.
Avoid the performance impact of accessing Lazy.Value by caching the traits on the first tick and accessing the references directly when needed.
2015-11-27 15:45:50 +00:00
RoosterDragon
23a38a08f7 Refactor player setup.
Tweak how players in a world are created. Change the collection to be an array to more strongly imply it will not change during a game.
2015-11-27 15:15:43 +00:00
Matthias Mailänder
5dcd48a54e update Eluant 2015-11-27 14:01:22 +01:00
Matthias Mailänder
5c083fa6de Merge pull request #10092 from pchote/saboteur-suicide
Implement suicide bomb for D2K Saboteur
2015-11-27 13:41:23 +01:00
Paul Chote
373bfefc6c Only support move orders against terrain targets. 2015-11-26 18:38:10 +00:00
Paul Chote
756bec69b3 Fall back to target cell if there are no valid orders against the target actor. 2015-11-26 18:37:40 +00:00
Paul Chote
fb99a1f3c2 Remove ActorMap query for each actor. 2015-11-26 18:30:43 +00:00
Paul Chote
7b31f18046 Reduce duplication in UnitOrderGenerator. 2015-11-26 18:25:39 +00:00
atlimit8
e417ecb93f Add map editor only tooltips 2015-11-25 17:28:29 -06:00
Paul Chote
1a5de4707f Implement suicide saboteur. 2015-11-25 21:16:16 +00:00
Paul Chote
7c69461ff2 Fix C4Demolition trait doc punctuation. 2015-11-25 21:16:15 +00:00
Paul Chote
6304d72f44 Add enter behaviour customisation to C4Demolition. 2015-11-25 21:16:15 +00:00
Pavel Penev
3e8df55bcb Merge pull request #10082 from OmegaBolt/d2k-deviator
D2k Deviator balance
2015-11-25 22:51:55 +02:00
Pavel Penev
da1485dab7 Merge pull request #10106 from Mailaender/nsis-section-polish
Polished the Windows installer
2015-11-25 22:33:39 +02:00
Pavel Penev
44457c854a Merge pull request #10085 from reaperrr/d2k-missile-fixes
Give Missile Tank weapon a range limit
2015-11-25 22:28:43 +02:00
Pavel Penev
4cb2fc8387 Merge pull request #10095 from r34ch/kennel-exit
Add second exit to kennel
2015-11-25 22:16:27 +02:00
Pavel Penev
c374bff9fb Merge pull request #10103 from pchote/fix-png-command
Fix the ConvertSpriteToPngCommand.
2015-11-25 22:07:52 +02:00
Pavel Penev
df71b42d13 Merge pull request #10104 from pchote/fix-d2k-tags
Fix the D2K building selection decorations
2015-11-25 21:58:45 +02:00
Pavel Penev
893d3afc4d Merge pull request #10105 from pchote/fix-outpost-position
Fix D2K outpost artwork offsets and selection box.
2015-11-25 21:57:04 +02:00
abcdefg30
944d8f8b11 Add more building explosions to cnc 2015-11-25 17:06:48 +01:00
Matthias Mailänder
c4bf5b85d4 remove unnecessary dependency on StyleCop 2015-11-25 14:32:12 +01:00
Matthias Mailänder
ba5aec2d66 simplify the hierarchy section hierarchy 2015-11-25 10:03:06 +01:00
Matthias Mailänder
d40cb941d3 make the "Game" component read-only 2015-11-25 10:02:14 +01:00
Paul Chote
555c02cd92 Fix D2K outpost artwork offsets and selection box. 2015-11-24 23:37:41 +00:00
Paul Chote
dffd2c87cd Add upgraded tag to D2K production structures. 2015-11-24 23:21:19 +00:00
Paul Chote
ee1fb0f1e0 Add SelectionDecoration flag to WithDecoration. 2015-11-24 23:03:06 +00:00
Paul Chote
d626c7c568 Add new primary building tag artwork. 2015-11-24 23:03:06 +00:00
Paul Chote
0c2d9c5ed4 Fix the ConvertSpriteToPngCommand. 2015-11-24 23:02:45 +00:00
abcdefg30
7dad0517e4 Small reordering and cleanup in mods/cnc/sequences/misc.yaml 2015-11-24 21:49:43 +01:00
abcdefg30
b7ddf1b8f5 Add more building explosions to d2k 2015-11-24 21:26:05 +01:00
DArcy Rush
e098743b09 Add second exit to kennel 2015-11-24 08:21:32 +00:00
teees
0c17188f24 Made the HarvesterDockSequence class abstract 2015-11-23 23:49:00 +01:00
Matthias Mailänder
b75bfec2f8 avoid working with NatDevice directly as it is dangerous 2015-11-23 21:40:48 +01:00
Matthias Mailänder
86a2a54640 catch MappingExceptions in NatDevice.GetExternalIP 2015-11-23 21:39:42 +01:00
Matthias Mailänder
262f547271 Merge pull request #9994 from huwpascoe/rally
TargetLine for Rally Points
2015-11-23 21:36:20 +01:00
Huw Pascoe
e92ccdf808 TargetLine for Rally Points
Also enabled allied players to see waypoints.
2015-11-23 19:30:24 +00:00
teees
11cdd84606 Added nawast 2015-11-23 20:26:39 +01:00
reaperrr
08ef8443b2 Give Missile Tank weapon a range limit and reduce Quad rocket range limit 2015-11-23 00:24:37 +01:00
OmegaBolt
937584af53 D2k Deviator balance 2015-11-22 23:15:13 +00:00
Pavel Penev
bacac082cc Merge pull request #10079 from abcdefg30/cdesktypo
Fix the description of ReturnToOrigin in Chronoshiftable.cs
2015-11-22 23:20:03 +02:00
abcdefg30
b2b0a5fe9c Merge pull request #10071 from obrakmann/fix-pacifist-worms
Fix worms not attacking anything anymore
2015-11-22 21:55:50 +01:00
abcdefg30
d8feb69e8c Merge pull request #10074 from OmegaBolt/d2k-terrain-regress
Add SpiceSand to more terrain type definitions
2015-11-22 21:54:05 +01:00
abcdefg30
921d3b9278 Fix the description of ReturnToOrigin in Chronoshiftable.cs 2015-11-22 21:52:23 +01:00
Matthias Mailänder
2f82b22ca1 Merge pull request #9980 from penev92/chromeLogic
Allow loading of ChromeLogic properties from YAML
2015-11-22 19:21:11 +01:00
OmegaBolt
16af35289e D2k, fix #10037 terrain regressions 2015-11-22 18:02:16 +00:00
Matthias Mailänder
284adf9501 Merge pull request #10047 from abcdefg30/film03a
Add the briefing video to atreides03a
2015-11-22 18:29:22 +01:00
Oliver Brakmann
8e5929b070 Fix worms not attacking anything anymore 2015-11-22 18:20:00 +01:00
Matthias Mailänder
3ab5c0042b Merge pull request #10037 from OmegaBolt/d2k-terrain
Fixes #4243.
Fixes #8317.
2015-11-22 18:14:59 +01:00
Matthias Mailänder
79bf69cd4c Merge pull request #9978 from RoosterDragon/cache-script-actor-luavalue
Cache self.ToLuaValue in ScriptTriggers
2015-11-22 18:06:41 +01:00
Oliver Brakmann
a6dadbe26e Merge pull request #9926 from reaperrr/d2k-spiceblooms3
Further improve D2k spiceblooms
2015-11-22 17:17:47 +01:00
reaperrr
c4ca5d6497 Add invisible spice bloom spawn
When real spiceblooms explode, they spawn an invisible
spicebloom.spawnpoint actor, which only 'grows' when the cell is of
GrowthTerrainType. When 'exploding', it then displays the animation of
blowing spice up into the air, and spawns a real spicebloom.

This replicates the original behavior where spice blooms would only grow
on sand cells that had been harvested and free of spice.
2015-11-22 16:43:16 +01:00
reaperrr
a175f53ba7 Improve spice bloom seeding mechanism
Improve seeding target cell determination.
Draw out spice seedable cells before loop.
Default to null for SpiceBloom.Weapon.
Pull spice seeding into its own method.
Skip it completely if no seed weapon is defined.
2015-11-22 16:41:12 +01:00
reaperrr
64b1aea065 Only allow spice blooms to grow on certain terrain types 2015-11-22 16:16:24 +01:00
Matthias Mailänder
db38d390eb Merge pull request #9970 from Sapena/fix_9965_minimap_orders_left_click_control_scheme
Fixed the minimap orders for left click control
2015-11-22 16:13:40 +01:00
Matthias Mailänder
3727fccd1b Merge pull request #9982 from abcdefg30/chronodesc
Unhardcode and document things in Chronoshiftable
2015-11-22 16:05:36 +01:00
Matthias Mailänder
1e85c73a1e Merge pull request #9862 from atlimit8/StoresResourcesOverflowBuffer
Preclude StoresResources.Stored overflow
2015-11-22 15:51:17 +01:00
Matthias Mailänder
0b349f943e Merge pull request #9890 from atlimit8/CreateEffectWarhead_TargetTypes
Target type support for CreateEffectWarhead
2015-11-22 15:42:54 +01:00
Matthias Mailänder
4559949846 Merge pull request #10062 from RoosterDragon/seeds-bounds-check
Prevent invalid cells checks in SeedsResource
2015-11-22 08:04:13 +01:00
atlimit8
36db019823 Add DeployStateInit for pre-deployment 2015-11-21 20:25:17 -06:00
atlimit8
607b345aaf Clean-up MiniYaml after #9124, closing #9497 2015-11-21 20:10:58 -06:00
RoosterDragon
172846fdb4 Merge pull request #10063 from pchote/fix-mp-dropdown
Fix width of the MP filter checkboxes.
2015-11-22 01:34:33 +00:00
Paul Chote
6777bb247b Fix width of the MP filter checkboxes. 2015-11-22 01:01:05 +00:00
abcdefg30
b51548a60d Merge pull request #9585 from ChaoticMind/select_all_map
Make "select all units" work across screen/map again
2015-11-22 01:50:48 +01:00
RoosterDragon
c4851a40cd Prevent invalid cells checks in SeedsResource. 2015-11-22 00:30:27 +00:00
abcdefg30
802b6215e1 Merge pull request #10014 from penev92/fixDTU
Fixup DeployToUpgrade
2015-11-22 00:59:29 +01:00
abcdefg30
ea19f7cd54 Add an upgrade rule for the Upgrades -> DeployedUpgrades change 2015-11-22 01:51:11 +02:00
Pavel Penev
64dd2357cd Update thumpers and Mobile Sensor Arrays to the new DeployToUpgrade
Currently those are the only two usages of the trait.
2015-11-22 01:51:09 +02: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
Oliver Brakmann
69c9a7a0cc Merge pull request #10059 from abcdefg30/06transport
Fix 'oldlst's letting units enter it (after delivering them)
2015-11-21 23:23:17 +01:00
Oliver Brakmann
62aebbab38 Merge pull request #10060 from abcdefg30/06crash
Add IsDead checks to gdi06
2015-11-21 23:15:20 +01:00
Oliver Brakmann
0713978673 Merge pull request #10058 from abcdefg30/harv05
Fix the harvester stopping when you reach the base in gdi05
2015-11-21 23:06:48 +01:00
Paul Chote
f945e35136 Fix CellRegion.BoundingRegion behaviour. 2015-11-21 22:00:35 +00:00
atlimit8
34cbd8bdf2 Merge pull request #10061 from pchote/fix-sam-death-crash
Fix a NRE when destroying SAM Sites in GDI06.
2015-11-21 15:50:06 -06:00
Paul Chote
1667dd812e Fix a NRE when destroying SAM Sites in GDI06. 2015-11-21 21:29:31 +00:00
abcdefg30
997c9ca615 Add IsDead checks to gdi06 2015-11-21 22:15:45 +01:00
abcdefg30
fb56093ccf Fix 'oldlst's letting units enter it (after delivering them) 2015-11-21 21:26:59 +01:00
abcdefg30
b24dbe86c8 Fix the harvester stopping when you reach the base in gdi05 2015-11-21 21:05:22 +01:00
Oliver Brakmann
458de06727 Merge pull request #10056 from abcdefg30/rushwater
Fix the rushAI building spens/syrds without being able to build naval units
2015-11-21 21:01:47 +01:00
Oliver Brakmann
16de21d41c Merge pull request #10018 from pchote/fix-spy-cursor
Restore targeting cursor when mousing over a disguised enemy spy.
2015-11-21 20:57:12 +01:00
abcdefg30
1a269d0f2e Fix the rushAI building spens/syrds without being able to build naval units 2015-11-21 20:29:28 +01:00
abcdefg30
ff228b79ea Merge pull request #10027 from atlimit8/FillEditorActorSelectionTooltipBlankLine
Fill editor actor selection tooltip blank line
2015-11-21 20:20:39 +01:00
Pavel Penev
be49435265 Merge pull request #10035 from reaperrr/fix-orca-missile
Increased default range of angles that missiles can launch at
2015-11-21 21:09:25 +02:00
abcdefg30
3fc9d23648 Merge pull request #10040 from teees/weap-fix
Move weapons factory exit and waypoint closer to the building
2015-11-21 20:05:15 +01:00
abcdefg30
73dd073e08 Merge pull request #9798 from teees/medic-selfheal
Lower GDI medic self heal speed
2015-11-21 20:00:41 +01:00
teees
c87a9de9a4 Lower gdi medic self heal speed 2015-11-21 19:25:50 +01:00
Paul Chote
65a7f2e863 Restore earlier spy targeting behaviour. 2015-11-21 18:06:47 +00:00
Oliver Brakmann
74db6f337d Merge pull request #10023 from OpenRA/fixGpsDot
Fix gps dot
2015-11-21 18:57:34 +01:00
Oliver Brakmann
ab260de203 Merge pull request #10007 from penev92/fixAttack
Don't attack actors outside vision range
2015-11-21 18:57:11 +01:00
Pavel Penev
d235ea3a52 Don't attack actors that you can't see 2015-11-21 19:33:10 +02:00
Paul Chote
09b000f7cd Merge pull request #10038 from r34ch/ammo-box-select
Hide ammobox healthbar.
2015-11-21 14:06:55 +00:00
Matthias Mailänder
e4054ef8d0 Merge pull request #9956 from teees/radar-update-line
Draw radar update line for mobile sensors array (TS)
2015-11-21 14:58:34 +01:00
Matthias Mailänder
645900d836 Merge pull request #8861 from atlimit8/NunitMakefileTarget
Add `nunit` NUnit make target to Makefile.
2015-11-21 14:33:01 +01:00
DArcy Rush
5d7a088f18 Add CHAN to EmitInfantryOnSell on certain structures. 2015-11-21 09:39:05 +00:00
atlimit8
418e70b68e Easier actor selection in map editor by actor bounds center 2015-11-20 22:59:20 -06:00
atlimit8
39545c7150 Remove editor actor selection tooltip blank line 2015-11-20 22:56:44 -06:00
abcdefg30
d3b62b60ae Add the briefing video to atreides03a 2015-11-21 01:14:35 +01:00
Pavel Penev
8d4d37ca46 Make GPS respect shroud 2015-11-21 01:11:40 +02:00
Pavel Penev
78e2eabd17 Remove byPlayer parameter from IFogVisibilityModifier.HasFogVisibility() 2015-11-21 01:11:38 +02:00
Pavel Penev
217c3881c6 Add IFogVisibilityModifier.IsVisible(Actor) 2015-11-21 01:11:37 +02:00
Pavel Penev
bfa23c18c0 Track GpsDot state per player
Should let us fix the issue mentioned in https://github.com/OpenRA/OpenRA/pull/10007#issuecomment-157409237
2015-11-21 01:11:36 +02:00
abcdefg30
7afbe0d6fd Merge pull request #10045 from r34ch/chan-scientist
Rename Chan to Scientist.
2015-11-20 23:09:30 +01:00
DArcy Rush
23880afe05 Rename Chan to Scientist. 2015-11-20 20:38:10 +00:00
teees
5337c788ce moved weapons factory exit and waypoint closer to the building 2015-11-20 07:39:03 +01:00
DArcy Rush
6db8eac009 Hide ammobox healthbar. 2015-11-19 22:57:19 +00:00
OmegaBolt
ce217d0fdd D2k spice no longer erases map details & terrain fixes 2015-11-19 21:51:22 +00:00
Oliver Brakmann
a4d864903d Merge pull request #10022 from reaperrr/fix-point-art
Fix waypoint, spawnpoint and camera editor art
2015-11-19 19:36:12 +01:00
reaperrr
af39d731a5 Fix D2k wormspawner editor art 2015-11-19 19:27:56 +01:00
Oliver Brakmann
6bc3c61f23 Merge pull request #10010 from penev92/fixUAN
Fix UpgradeActorsNear revoking upgrades after the actor dies
2015-11-19 18:59:42 +01:00
reaperrr
1d020872ec Increase the default range of angles that missiles can launch at 2015-11-19 15:02:19 +01:00
Kevin Azzam
64ed164295 Make "select all units" work across screen/map again 2015-11-19 00:21:16 +01:00
abcdefg30
6cd8649156 Small code style fixes 2015-11-18 21:16:58 +01:00
abcdefg30
9b2391cf0c Unhardcode and document things in Chronoshiftable 2015-11-18 21:16:57 +01:00
abcdefg30
c35f9007c3 Merge pull request #9582 from ChaoticMind/ctrl_backspace
Implement some keyboard hotkeys for chat (TextFieldWidget)
2015-11-18 20:48:05 +01:00
Kevin Azzam
3c79e9075b Add some hotkeys for OSX (cmd + arrow_keys, ctrl + k, and ctrl + d) 2015-11-18 18:44:02 +01:00
reaperrr
defab6959e Fix D2k effect palette shadow index 2015-11-17 21:09:29 +01:00
reaperrr
88430f3a33 Fix mpspawn, waypoint and camera art
All mpspawn, waypoint and camera editor art uses the correct shadow and remap colors.
Additionally added camera art to CnC, D2k and TS.
2015-11-17 21:09:29 +01:00
reaperrr
9827796ea8 Merge pull request #9997 from abcdefg30/d2kspeed
Add production acceleration to d2k
2015-11-17 19:30:04 +01:00
reaperrr
782a1f3497 Merge pull request #10020 from cjshmyr/truckbuffs
Increase Supply & Demo Truck vision from 3 to 4 cells
2015-11-17 19:18:36 +01:00
atlimit8
7e4bf51895 Merge pull request #9937 from hacklex/server-settings-fix
Changed ServerSettings cloning to a more reliable approach
2015-11-16 21:47:17 -06:00
Thehx
6bd3195c3d Changed ServerSettings cloning to a more reliable approach 2015-11-17 05:27:42 +03:00
Curtis Shmyr
cfec9caaaa Increase TRUK and DTRK vision from 3 to 4 cells 2015-11-16 18:25:29 -07:00
Paul Chote
5a5fc8474f Merge pull request #10013 from abcdefg30/bomberchrono
Fix a crash when using the chronoshift power on the map bomber john
2015-11-16 21:59:55 +00:00
Paul Chote
565e292e12 Merge pull request #10008 from penev92/serverBrowserFilter
Add a null check to CachedTransform.Update()
2015-11-16 21:51:50 +00:00
Oliver Brakmann
612026b4bd Merge pull request #10001 from pchote/fix-d2k-shroud
Split D2K shroud/fog rendering and fix shroud blending.
2015-11-16 22:25:10 +01:00
Paul Chote
124c0ea041 Make CanTarget modifiers a ref parameter. 2015-11-16 20:38:53 +00:00
Oliver Brakmann
d2d4767e94 Merge pull request #9951 from Phrohdoh/explain-node-merge
Add a comment explaining some of the sequence parsing code.
2015-11-16 20:02:22 +01:00
teees
2777262cb0 Draw radar update line for mobile sensors array 2015-11-16 15:38:13 +01:00
abcdefg30
a5f15f5080 Merge pull request #10009 from penev92/grantUpgradePower
Check if WithSpriteBody is available in GrantUpgradePower
2015-11-16 13:55:48 +01:00
teees
b12e029b04 Prevent aircraft from flying into shroud 2015-11-16 09:01:36 +01:00
teees
3662a1781b Adjusted orca and drop pod sight range 2015-11-16 09:01:35 +01:00
Pavel Penev
4d787cbedb Check if WithSpriteBody is available in GrantUpgradePower 2015-11-16 01:25:09 +02:00
abcdefg30
828cb5cf38 Fix a crash when using the chronoshift power
if the "chronosphere-actor" doesn't have an "active" sequence
2015-11-15 22:21:23 +01: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
Pavel Penev
636725235b Add a null check to CachedTransform.Update() 2015-11-15 16:23:07 +02:00
Paul Chote
1dca3f1206 Split D2K shroud/fog rendering and fix shroud blending. 2015-11-15 11:35:22 +00:00
Matthias Mailänder
7d2c86d75b Merge pull request #10000 from cjshmyr/typos
Fix some comment typos
2015-11-15 09:26:46 +01:00
Curtis Shmyr
f0e9b85ccc I before E except after C 2015-11-14 22:32:37 -07:00
abcdefg30
e8cb0a3d48 Add production acceleration to d2k
except for starports
2015-11-15 01:48:07 +01:00
Curtis Shmyr
7b0c9b7bf5 Merge pull request #9992 from obrakmann/pr9959-new
RA balance fixed up
2015-11-14 14:06:20 -07:00
Oliver Brakmann
dceb1fbd80 Increase range of flak truck against air targets
From 6 cells to 8 cells
2015-11-14 20:51:10 +01:00
Paul Chote
a9f2fc962e Merge pull request #9984 from cjshmyr/spypowerdrain
Lower Spy's InfiltrateForPowerOutage time from 30->20sec
2015-11-14 19:33:03 +00:00
DArcy Rush
ee4383b75d Rebalance Tesla Tank.
Allow attacking of target regardless of facing.
2015-11-14 19:16:59 +01:00
Pavel Penev
4c7e6db4da Merge pull request #9599 from ChaoticMind/lua_debug
Add a Lua wrapper to display debug messages (shows if setting enabled)
2015-11-14 20:00:38 +02:00
Oliver Brakmann
5b73417d83 Merge pull request #9987 from pchote/transforms
Check deploy location at the time of transform.
2015-11-14 16:41:44 +01:00
Pavel Penev
0c1283c8c0 Merge pull request #9969 from obrakmann/fix9892_dead-radar-stops-all-reinf
Fix reinforcements appearing in soviet04a/b despite killed radar dome
2015-11-14 14:58:25 +02:00
Paul Chote
67193b43d5 Check deploy location at the time of transform. 2015-11-14 12:49:26 +00:00
Pavel Penev
8f85794a52 Allow AssetBrowserLogic's allowed extentions to be loaded from YAML
Keep the default list of file formats as a fallback for thirdparty mods, but still add it to YAML to show off the functionality and to make it more transparent what formats are supported.
2015-11-14 14:40:52 +02:00
Oliver Brakmann
473ae7c9cb Merge pull request #9985 from cjshmyr/husknames
Update some husk names to match current tooltips
2015-11-14 13:15:48 +01:00
Paul Chote
62682351b6 Merge pull request #9974 from reaperrr/fix-d2k-bloom-editor
Fix spice bloom editor visibility
2015-11-14 12:08:19 +00:00
Pavel Penev
5b185f93a1 Pass subnodes of the widget Logic node to the corresponding ChromeLogic class 2015-11-14 14:06:53 +02:00
Curtis Shmyr
2a240718db Update some husk names to match current tooltips 2015-11-14 02:01:25 -07:00
Curtis Shmyr
bac98acce7 lower InfiltrateForPowerOutage time from 30->20sec 2015-11-14 01:42:13 -07:00
abcdefg30
a1fd16f6c9 Add a flipped napalm explosion for buildings 2015-11-14 00:41:30 +01:00
abcdefg30
e238c583d5 Add more variations to building explosions 2015-11-14 00:10:33 +01:00
abcdefg30
08f8dc0067 Move Length: * to Defaults on exlosion: 2015-11-13 23:59:54 +01:00
Pavel Penev
56a2f4c9a3 Merge pull request #9976 from obrakmann/fix9975_mod-loading-exceptions
Fix exceptions while loading mods
2015-11-13 22:22:45 +02:00
Paul Chote
57cd1b2a8a Merge pull request #9961 from GraionDilach/fix-ts-tileset
Fix TS legacy tileset importer color regression.
2015-11-13 20:04:35 +00:00
Oliver Brakmann
d9663d8a80 Merge pull request #9972 from Biofreak1987/fix_dead_cyard_ai_construction
Fix ai building in soviet04/06 missions despite killed construction yard
2015-11-13 20:50:00 +01:00
Pavel Penev
fed8ba666f Merge pull request #9770 from evgeniysergeev/combined_frames
flip sprites in combined sequences
2015-11-13 21:15:53 +02:00
Pavel Penev
fb5695b0c9 Merge pull request #9979 from RoosterDragon/fix-sln
Allow VS2015 to format solution file
2015-11-13 17:07:19 +02:00
Philipp Schärer
830288b5a0 Fixed the minimap orders for left click control
Use the correct actions when orders are issued
over the minimap.
2015-11-13 08:56:43 +01:00
evgeniysergeev
ea1115fe46 flip sprites in sequences and frames in combined sequences 2015-11-13 06:31:12 +03:00
RoosterDragon
8cf4502e2e Allow VS to reorder entries in solution file. 2015-11-12 23:39:03 +00:00
RoosterDragon
e6e98d3aa2 Cache self.ToLuaValue in ScriptTriggers.
When making an Lua function call, any LuaCustomClrObject must be introspected via reflection in order to determine what to expose in Lua code. In OpenRA, we use these for any types that implement IScriptBindable, such as Actor.

Previously, we would need to pay the cost of this reflection for every individual Lua call an Actor used in its ScriptTriggers trait where it passed `self` as a parameter. This would be repeated every time. For performance, we now cache self.ToLuaValue in the trait and use that for all calls so we only pay the reflection cost once on trait construction. This removes a significant overhead in the Lua bridging code.
2015-11-12 22:18:19 +00:00
abcdefg30
f52bbd1b0b Merge pull request #9928 from Biofreak1987/fix_nod05_airstrike_crash
Fix nod05 airstrike Lua crash and update map rules
2015-11-12 22:48:46 +01:00
Oliver Brakmann
f2bad4331d Skip mod directories without a mod manifest file 2015-11-12 22:13:38 +01:00
Oliver Brakmann
5e576ddca4 Add missing RequiresMods entry to mods/all/mod.yaml 2015-11-12 22:13:06 +01:00
Oliver Brakmann
1b8cdfad02 Merge pull request #9854 from Arcitectus/resolve.Issue#6170
prevent allied units from autoattack building which is being captured…
2015-11-12 21:42:39 +01:00
reaperrr
820b193d27 Fix spice bloom editor visibility 2015-11-12 19:52:55 +01:00
Biofreak1987
627edd4ac2 Fix ai building in soviet04/06 missions despite killed construction yard 2015-11-12 13:34:48 +01:00
Biofreak1987
84a0dc0242 Fix nod05 airstrike Lua crash and update map rules
- Fix airstrike Lua crash when there are no targets
- Increased harvester search range
- Hide owner row from husks and walls

Changes to make it closer to the original:
- Added e3 and sandbag production
- Made airstrikes gdi only
- Limited airstrike squadsize to 1
- Allow to attack civilian buildings
2015-11-12 13:27:53 +01:00
Paul Chote
98d0844695 Merge pull request #9922 from penev92/validateColor
Validate player color when changing slots in the lobby
2015-11-11 22:56:30 +00:00
Paul Chote
dbd23c9d46 Merge pull request #9919 from obrakmann/fix9863
Fix bogus owner check in Lua API production code
2015-11-11 22:23:44 +00:00
Oliver Brakmann
e05098400a Merge pull request #9968 from Phrohdoh/miniyaml-cleanups
MiniYaml.cs cleanups
2015-11-11 22:19:37 +01:00
Oliver Brakmann
121b0a6e9c Merge pull request #9942 from abcdefg30/descexplodes
Fix the documentation of Explodes
2015-11-11 22:14:14 +01:00
Oliver Brakmann
c8a517713d Fix reinforcements appearing in soviet04a/b despite killed radar dome 2015-11-11 22:11:54 +01:00
Pavel Penev
d760ee1cd5 Merge pull request #9948 from OmegaBolt/d2k-thumper-bal
D2k thumper worm attraction balance change
2015-11-11 23:01:06 +02:00
Pavel Penev
36bf9eee0c Merge pull request #9949 from pchote/fix-more-overlaps
Truncate player names in more places.
2015-11-11 22:38:54 +02:00
Pavel Penev
a4b54aacbb Merge pull request #9933 from pchote/shroud-cursor-bug
Prevent frozen actors leaking through shroud.
2015-11-11 22:28:12 +02:00
abcdefg30
8c2c946254 Add an upgrade rule for the DeathType -> DeathTypes change 2015-11-11 21:24:04 +01:00
abcdefg30
4a4608e1f3 Rename DeathType to DeathTypes of Explodes 2015-11-11 21:23:40 +01:00
abcdefg30
a5aff66848 Polish the documentation in Explodes.cs 2015-11-11 21:23:27 +01:00
DArcy Rush
b3cba2d005 Rebalance phase transport.
Passengers increased to 4, speed and LoS increased.
2015-11-11 19:36:19 +00:00
DArcy Rush
ef1a92eaa8 Reduce chronotank charge time.
Chronotank charge decreased from 20s to 12s.
2015-11-11 19:36:19 +00:00
Oliver Brakmann
db96b62427 Merge pull request #9967 from cjshmyr/barrackexits
Made both barracks' doors exit to different cells
2015-11-11 20:20:03 +01:00
Taryn Hill
a8600ffbe7 Replace instance of 4 spaces with a single tab in MiniYaml.cs 2015-11-11 13:03:22 -06:00
Curtis Shmyr
1a0bf541de Made both barracks' doors exit to different cells 2015-11-11 11:51:15 -07:00
Taryn Hill
44e03c094b Add newlines in MiniYaml.cs for readability 2015-11-11 12:47:30 -06:00
Taryn Hill
9b568f53a1 Rename some variables in MiniYaml.cs for readability 2015-11-11 12:44:04 -06:00
Michael Rätzel
51bb515a4d prevent allied units from autoattack building which is being captured. resolves #6170. 2015-11-11 14:32:38 +01:00
Taryn Hill
d33922915e Merge pull request #9891 from teees/sounds-fix
Added sounds for orca takeoff and landing (TS)
2015-11-11 06:15:59 -06:00
Zimmermann Gyula
d13d5088cd Fix TS legacy tileset importer color regression. 2015-11-11 12:18:01 +01:00
Pavel Penev
34876db9d9 Merge pull request #9885 from pchote/editor-copypasta
Add copy/paste to the map editor
2015-11-11 01:00:37 +02:00
Paul Chote
a081321790 Add copy/paste to the map editor. 2015-11-10 22:18:18 +00:00
Paul Chote
1c06297ff7 Make editor brushes disposable. 2015-11-10 22:17:28 +00:00
Oliver Brakmann
bf3a46be93 Merge pull request #9958 from penev92/gpsAutoTarget
Enable AutoTarget to aquire targets under fog if GPS is present
2015-11-10 22:23:58 +01:00
Oliver Brakmann
727ad3e61b Merge pull request #9947 from OmegaBolt/d2k-leftover-armours
D2k fixed armour & AI typos
2015-11-10 21:57:51 +01:00
Pavel Penev
ab2c5ab43d Enable AutoTarget to aquire targets under fog if GPS is present 2015-11-10 22:50:22 +02:00
Oliver Brakmann
4bbf6ea0c7 Merge pull request #9925 from atlimit8/MultiLineMapEditorTooltips
Multi-line map editor tooltips
2015-11-10 21:06:57 +01:00
Taryn Hill
2fc391c5b8 Add a comment explaining some of the sequence parsing code 2015-11-10 07:17:18 -06:00
atlimit8
44eec7a885 Merge pull request #9893 from teees/minor-fixes
Polish the Tiberian Sun Construction Yard and MCV deployment

Use the undeploy cursor for the construction yard
Use the correct deploy sound for the mcv
2015-11-09 23:27:22 -06:00
Oliver Brakmann
496f8d7ddf Merge pull request #9950 from GraionDilach/fix-sp-disable
Fix observer GUI showing disabled support powers.
2015-11-09 21:03:32 +01:00
Pavel Penev
cfdce8d1a2 Merge pull request #9934 from OmegaBolt/d2k-sw-times
D2k super weapon timers
2015-11-09 21:49:36 +02:00
Pavel Penev
76cdda2eae Merge pull request #9946 from OmegaBolt/d2k-bfd-mapup
D2k Battle For Dune map update
2015-11-09 21:41:37 +02:00
Oliver Brakmann
4ea20027b1 Merge pull request #9941 from OmegaBolt/d2k-orni-bombs
D2k Ornithopter bomb damage increase
2015-11-09 19:57:10 +01:00
Paul Chote
491e96466d Truncate player name in replay browser. 2015-11-09 18:55:54 +00:00
Zimmermann Gyula
6b891c50cf Fix observer GUI showing disabled support powers. 2015-11-09 19:55:51 +01:00
Paul Chote
6236b29fde Truncate player name in observer stats and diplomacy panels. 2015-11-09 18:51:15 +00:00
Paul Chote
dcc21aea41 Truncate player name in ingame menu stats. 2015-11-09 18:50:58 +00:00
Oliver Brakmann
b30bae08c0 Fix bogus owner check in Lua API production code 2015-11-09 19:31:19 +01:00
OmegaBolt
fbebb26a33 D2k thumper worm attraction balance 2015-11-09 18:28:22 +00:00
OmegaBolt
3532b22e5e D2k fixed armour & AI typos 2015-11-09 18:08:51 +00:00
OmegaBolt
bf982f81d0 D2k Battle For Dune map update 2015-11-09 17:03:16 +00:00
OmegaBolt
494266e257 D2k Ornithopter bomb damage increase 2015-11-09 14:36:48 +00:00
OmegaBolt
03367d4913 D2k super weapon timers 2015-11-08 22:15:58 +00:00
Paul Chote
9ae811e0c0 Prevent frozen actors leaking through shroud. 2015-11-08 20:53:47 +00:00
Pavel Penev
d2c94adc55 Merge pull request #9875 from OmegaBolt/d2k_infondunes
D2k, fixed infantry moving too slow on dunes
2015-11-08 21:54:51 +02:00
atlimit8
cdb2da33be CreateEffectWarhead target types support 2015-11-08 12:54:17 -06:00
atlimit8
def564e97c reorganize CreateEffectWarhead.GetImpactType(World world, CPos cell, WPos pos) 2015-11-08 12:54:14 -06:00
Oliver Brakmann
ea2defdbc1 Merge pull request #9659 from abcdefg30/atreides03a
Add atreides03a
2015-11-08 19:30:37 +01:00
Matthias Mailänder
ab739c8446 Merge pull request #9415 from atlimit8/SpawnActorOnDeath_to_Common
Move SpawnActorOnDeath to OpenRA.Mods.Common
2015-11-08 19:07:07 +01:00
Matthias Mailänder
3941bc441f Merge pull request #9913 from OmegaBolt/d2k-start-cash
Added D2k 7000 start cash option
2015-11-08 17:39:51 +01:00
Pavel Penev
62f2c01bd6 Merge pull request #9920 from pchote/label-truncation
Truncate long user-defined strings.
2015-11-08 17:21:19 +02:00
Paul Chote
fed2029d1f Truncate long player names in lobby. 2015-11-08 14:59:59 +00:00
Paul Chote
cfc92f66a4 Truncate long server names in MP browser. 2015-11-08 14:59:59 +00:00
Paul Chote
19aa07d019 Truncate long map name in replay browser. 2015-11-08 14:59:59 +00:00
Paul Chote
b689364a4d Truncate long map name / mod version in MP panel. 2015-11-08 14:59:59 +00:00
Paul Chote
bb66957bad Truncate long map name / author in map chooser. 2015-11-08 14:59:58 +00:00
Paul Chote
ef3a0e36e0 Truncate long map name / author in lobby. 2015-11-08 14:59:58 +00:00
Paul Chote
6673c882ee Add helpers for truncating long labels. 2015-11-08 14:59:53 +00:00
Pavel Penev
c7ebfd608e Merge pull request #9929 from pchote/editor-defaultlocation
Set the default map location to the support dir.
2015-11-08 14:46:52 +02:00
Paul Chote
6edac4bdf7 Set the default map location to the support dir. 2015-11-08 12:08:20 +00:00
Paul Chote
4bd3b257f1 Merge pull request #9887 from r34ch/n64-td-mission
Move blossom trees south one cell on cnc64gdi01.
2015-11-08 11:39:49 +00:00
Paul Chote
101efaed4f Merge pull request #9873 from teees/editor-fix
Handle mouse up event in default editor brush (instead of mouse down)
2015-11-08 11:29:03 +00:00
Paul Chote
9ef708b3df Merge pull request #9923 from obrakmann/fix-gdi06-creep-stances
Fix lint warning in gdi06
2015-11-08 11:12:55 +00:00
Matthias Mailänder
f02dc7e426 Merge pull request #9846 from Biofreak1987/soviet06_prerequisites_fix
Fix soviet06 prerequisites
2015-11-08 09:39:37 +01:00
Matthias Mailänder
e8a07a6ddf Merge pull request #9921 from obrakmann/fix-weatheroverlay-typo
Fix typo in WeatherOverlayInfo
2015-11-08 09:12:15 +01:00
Matthias Mailänder
0e13472651 Merge pull request #9924 from cjshmyr/lua-islocalplayer
Added 3 Lua player API properties
2015-11-08 08:52:17 +01:00
atlimit8
9c0d83d0d9 Make ActorSelector tooltips better match actor tooltips in map editor 2015-11-07 16:10:13 -06:00
atlimit8
4c2488f9b1 Made editor actor preview tooltip easier to read 2015-11-07 16:10:13 -06:00
atlimit8
cbc8d1c5ec Multiline support for SimpleTooltipLogic 2015-11-07 16:10:00 -06:00
Curtis Shmyr
2a6c87f81d Added 3 Lua player API properties 2015-11-07 12:17:09 -07:00
Oliver Brakmann
0742cbfdb9 Fix lint warning in gdi06 2015-11-07 19:33:29 +01:00
Pavel Penev
98134fab5d Validate player color when changing slots in the lobby 2015-11-07 20:27:10 +02:00
Oliver Brakmann
27d915046c Fix typo in WeatherOverlayInfo 2015-11-07 19:23:22 +01:00
Matthias Mailänder
39fa74a013 Merge pull request #9882 from teees/walker-turn-animation
Tick VoxelWalker move animation when turning
2015-11-07 18:42:22 +01:00
Matthias Mailänder
b45aa98081 Merge pull request #9888 from reaperrr/d2k-spiceblooms2
Improve D2k spiceblooms
2015-11-07 18:28:11 +01:00
Matthias Mailänder
391580d8bf Merge pull request #9917 from penev92/d2kRepairPad
D2k repair pad
2015-11-07 18:07:44 +01:00
Pavel Penev
239f842107 Merge pull request #9909 from reaperrr/fix-upgrade-dates
Change engineVersion for several upgrade rules to 20150920
2015-11-07 16:17:01 +02:00
Pavel Penev
4b954b8e28 Buff D2k repair pads 2015-11-07 14:54:29 +02:00
Pavel Penev
d04b0617fe Fix repair pad reference in units' Repairable trait 2015-11-07 14:38:33 +02:00
Pavel Penev
5df01b2137 Merge pull request #9916 from pchote/news-from-the-future
Fetch battlefield news once per game launch.
2015-11-07 14:12:03 +02:00
Oliver Brakmann
c738628c02 Merge pull request #9915 from pchote/globalchat-margins
Fix global chat line margins.
2015-11-07 12:40:08 +01:00
Oliver Brakmann
a70ebe2486 Merge pull request #9877 from pchote/lobby-unread
Show unread message count on lobby chat tabs.
2015-11-07 12:34:35 +01:00
Paul Chote
b235e244a4 Fetch battlefield news once per game launch. 2015-11-07 11:29:34 +00:00
Paul Chote
8c975fc81f Fix global chat line margins. 2015-11-07 11:17:08 +00:00
Pavel Penev
a417c82b0f Merge pull request #9901 from reaperrr/d2k-muzzles
Fix D2k Trike and Raider muzzles
2015-11-07 13:06:32 +02:00
Paul Chote
797f800966 Add unread message count to lobby chat tabs. 2015-11-07 10:59:18 +00:00
Paul Chote
d49e2cc84b Add Tick method to ChromeLogic. 2015-11-07 10:52:30 +00:00
OmegaBolt
51a4147b69 D2k 7000 start cash option 2015-11-07 02:26:02 +00:00
Oliver Brakmann
3539095ea1 Merge pull request #9898 from OmegaBolt/d2k-crate-prereq
D2k crate balance
2015-11-06 19:42:05 +01:00
abcdefg30
4576b97bf6 Add atreides03a 2015-11-06 19:27:01 +01:00
reaperrr
1ea339f316 Fix WithSpriteRotorOverlay upgrade rule to account for @ separator 2015-11-06 15:09:42 +01:00
reaperrr
f208cc6d38 Change engineVersion for upgrade rules of changes made between 20150808 and 20150919
Those changes were merged after the feature-freeze, but predate the stable release. Changing the engine version to the day after release makes it easier for modders to upgrade without using bogus engine dates.
2015-11-06 15:00:44 +01:00
DArcy Rush
42af7b9f07 Add self to AUTHORS. 2015-11-06 09:35:43 +00:00
DArcy Rush
29bd95c351 Move blossom trees south one cell in cnc64gdi01. 2015-11-06 09:35:06 +00:00
teees
2e0719f1fd tick VoxelWalker move animation when turning 2015-11-06 06:51:57 +01:00
reaperrr
63925fe7a5 Fix D2k Trike and Raider muzzles
The muzzle weapon appears to need some warhead to 'fire' at actors.
2015-11-06 00:48:26 +01:00
Oliver Brakmann
e609abf445 Merge pull request #9852 from RoosterDragon/event-handler-removals
Detach some event handlers
2015-11-05 22:46:42 +01:00
OmegaBolt
5831d58d13 D2k crate balance
- Fixed prerequisites.
- Added more infantry crates.
- Upped the create explosion damage, though it is still very little. Takes about a third health off a Trike.
2015-11-05 20:09:17 +00:00
RoosterDragon
ee1ef5eff7 Merge pull request #9886 from penev92/fixC17
Fix the C17 delivery plane doing a steep dive when trying to land
2015-11-05 19:47:30 +00:00
Oliver Brakmann
3c09ec3de7 Merge pull request #9855 from RoosterDragon/irc-disconnect-hack
Work around a hang on shutdown caused by IRC
2015-11-05 20:39:20 +01:00
Oliver Brakmann
d3d8a59088 Merge pull request #9867 from GraionDilach/fix-powermultiplier-namespace
Fix PowerMultiplier namespace.
2015-11-05 20:21:42 +01:00
teees
79d2ea3d09 Use the correct deploy sound for the mcv 2015-11-05 12:56:28 +01:00
teees
fbd65b5118 Use the undeploy cursor for the con yard 2015-11-05 12:56:28 +01:00
teees
f81c3da259 Added sounds for orca takeoff and landing 2015-11-05 08:59:32 +01:00
atlimit8
7352290c94 Move SpawnActorOnDeath to OpenRA.Mods.Common & fix spawned death actor teleportation 2015-11-05 00:55:29 -06:00
RoosterDragon
6f09d1a2f4 Remove event handler when disposed in MainMenuLogic.
Removes a static event handler to Game.OnRemoteDirectConnect which allow the GC to reclaim the MainMenuLogic class after it has been disposed.
2015-11-04 23:09:33 +00:00
RoosterDragon
9f728b287b Remove event handlers to CellEntryChanged when done.
Several classes would attach event handlers to the Map which would live longer then they did. Detaching them when no longer needed allows the GC to reclaim them.
2015-11-04 23:09:32 +00:00
RoosterDragon
c562b8c51e Detach event handlers on dispose in TerrainSpriteLayer.
The WorldRenderer outlives the TerrainSpriteLayer and thus keeps it alive longer than expected via the event handler. We detach it to allow the GC to reclaim it.
2015-11-04 23:09:30 +00:00
atlimit8
726bf1c8a9 Support using NUnit.Runners NuGet package for make nunit 2015-11-04 16:56:19 -06:00
reaperrr
71360c1bc2 Reduce spawned spice per piece 2015-11-04 23:54:26 +01:00
reaperrr
008eda7a5f Make sure that a spice bloom spawns at least the minimum of pieces 2015-11-04 23:44:36 +01:00
reaperrr
2e6b71154a Increase variation and average of spice bloom growth 2015-11-04 23:44:36 +01:00
reaperrr
0afb1ed5c8 Improve SpiceExplosion and add BloomExplosion
Fixes angle and loudness of spice debris, adds BloomExplosion to add proper animation and damage crushing actors.
2015-11-04 23:41:03 +01:00
reaperrr
46a728826b Fix spice debris target cell randomization 2015-11-04 23:41:02 +01:00
RoosterDragon
8fe493938e Merge pull request #9842 from GraionDilach/damagewarhead-stance-fix
Fix (HealthPercentage)DamageWarheads ignoring stances.
2015-11-04 22:32:37 +00:00
atlimit8
bbf96141ae Add nunit NUnit make target to Makefile. 2015-11-04 15:41:47 -06:00
Pavel Penev
5cf34f926b Fix the C17 delivery plane doing a steep dive when trying to land 2015-11-04 23:40:26 +02:00
Oliver Brakmann
af7d62a343 Merge pull request #9884 from penev92/fixDropdown
Fix server filter width
2015-11-04 22:29:52 +01:00
Oliver Brakmann
177d983728 Merge pull request #9759 from atlimit8/ActorsHavingTrait
Add ActorsHavingTrait<TTrait>()
2015-11-04 22:26:10 +01:00
Pavel Penev
e741e4300b Fix server filter width 2015-11-04 23:16:18 +02:00
Biofreak1987
b84f663765 Fix soviet06 prerequisites 2015-11-04 20:23:39 +01:00
Oliver Brakmann
861f16329b Merge pull request #9745 from Biofreak1987/soviet06_difficulty
Add difficulty settings to soviet06 missions
2015-11-04 20:18:28 +01:00
Oliver Brakmann
040543fd6b Merge pull request #9743 from reaperrr/untangle-uibits
Fix RA-uibits dependency in D2k and TS
2015-11-03 22:10:23 +01:00
Oliver Brakmann
ada72ee501 Merge pull request #9868 from abcdefg30/build107_8
Allow building on tiles 107 and 108
2015-11-03 19:35:11 +01:00
Oliver Brakmann
adeeb7f89f Merge pull request #9871 from atlimit8/UpdateHexColorUpgradeEngineVersion
Fix hex colors upgrade rules engine version
2015-11-03 19:03:29 +01:00
OmegaBolt
e9fa198fc2 D2k, fixed infantry moving slow on dunes and rough 2015-11-03 14:42:14 +00:00
teees
2465344a20 only change editor brushes on mouseup
let other uses of the right mouse button bubble up
2015-11-03 13:15:28 +01:00
teees
eb6df6fe62 Handle mouse up event in default editor brush 2015-11-03 11:45:10 +01:00
Pavel Penev
120afb9254 Merge pull request #9865 from teees/offset-fix
Tweaked the local offsets for the laser turret and obelisk (TS)
2015-11-03 08:43:29 +02:00
atlimit8
e0123c2011 Merge pull request #9870 from obrakmann/fix9831_viceroids-spawn-from-crushing
Fix viceroids being spawned by crushed infantry
2015-11-02 21:48:35 -06:00
atlimit8
e385b21fae Fix hex colors upgrade rules engine version 2015-11-02 17:28:25 -06:00
Oliver Brakmann
17370c9e2e Fix viceroids being spawned by crushed infantry 2015-11-02 21:30:31 +01:00
Oliver Brakmann
214945a61f Merge pull request #9324 from atlimit8/ColorSpacePrefixes
Hex Color Parsing
2015-11-02 20:28:04 +01:00
abcdefg30
f3b364d749 Allow building on tiles 107 and 108
(in the snow and temperat tilesets)
2015-11-02 19:14:36 +01:00
Zimmermann Gyula
9ace207102 Fix PowerMultiplier namespace. 2015-11-02 14:03:37 +01:00
teees
528c1c6a77 Tweak laser turret armament offset 2015-11-02 12:34:41 +01:00
teees
2a94abbdb1 Tweak obelisk armament offset 2015-11-02 12:00:01 +01:00
atlimit8
29de05cb59 Preclude StoresResources.Stored overflow
Closes #9857
2015-11-02 00:08:10 -06:00
Matthias Mailänder
d37e5f0129 Merge pull request #9809 from RockyTV/upstream/ant-range
Fix Giant Ants and Zombies not being able to attack diagonally
2015-11-02 06:15:16 +01:00
atlimit8
ce649e4501 Merge pull request #9848 from r34ch/tech-buildings-los
Add LoS to Bio lab and prison.
2015-11-01 17:42:54 -06:00
atlimit8
74c63812eb Show only missing required "mod (version)"s 2015-11-01 17:14:46 -06:00
RoosterDragon
8106ecbf4e Work around a hang on shutdown caused by IRC.
Our IRC client doesn't shut down properly - but we only need to shut it down when we're about to close the game anyway, so we just don't bother since it won't hurt anybody.
2015-11-01 22:31:46 +00:00
Taryn Hill
aa594c8532 Merge pull request #9463 from penev92/modDependencies
Add support for inter-mod dependencies
2015-11-01 15:08:43 -06:00
Pavel Penev
1d93bf0500 Update make version to change the required mod target versions 2015-11-01 22:35:39 +02:00
Pavel Penev
2faf15bad7 Add an Install Mod dialog to the ModChooser 2015-11-01 22:35:38 +02:00
Pavel Penev
9748b556dc Add RequiresMods tag to the mod Manifest
List required mods and their versions to enable mod dependencies on another mods.
Also used for identifying the engine version by `modchooser`'s version.
2015-11-01 22:22:03 +02:00
Zimmermann Gyula
0f14339763 Fix (HealthPercentage)DamageWarheads ignoring stances/TargetTypes.
Moves the IsValidAgainst check from SpreadDamage level to Damage level
and adds a duplication to HealthPercentageDamageWarhead.
2015-11-01 21:06:54 +01:00
RoosterDragon
7a6b5a0e55 Merge pull request #9763 from reaperrr/warhead-perf
Attempt to reduce SpreadDamageWarhead CPU overhead
2015-11-01 19:38:50 +00:00
DArcy Rush
c27ba0fa90 Add LoS to Bio lab and prison. 2015-11-01 14:02:17 +00:00
Oliver Brakmann
88c20a6654 Merge pull request #9414 from atlimit8/TurretFacingsInit
Support loading multiple turret facings
2015-11-01 13:18:17 +01:00
Matthias Mailänder
281cd95be4 Merge pull request #9627 from RoosterDragon/mix-on-filesystem
Avoid redundant copies of mix files in memory
2015-11-01 08:54:24 +01:00
Oliver Brakmann
7fe0c9c55d Merge pull request #9828 from Arcitectus/RallyPoint.Reset.OnCapture
reset RallyPoint Location after building was captured. resolves #9163.
2015-10-31 21:57:07 +01:00
Michael Rätzel
c5029e270d reset RallyPoint Location after capture. resolves #9163. 2015-10-31 20:31:08 +01:00
Biofreak1987
37cc524f43 Add difficulty settings to soviet06 missions 2015-10-31 14:48:14 +01:00
Alexandre Oliveira
dedccd44bb Fix Giant Ants and Zombies not being able to attack diagonally 2015-10-30 15:37:53 -02:00
RoosterDragon
26d7d59c1a Fix MoveWithinRange not moving far enough for min range checks.
MoveWithinRange was only moving the unit far enough away so the center of the target was above the minimum distance. However, the min range checks in the attack code require all positions on the target to be above the minimum distance. For large targets (e.g. buildings) this means some of the target was still too close, and the unit would get stuck in a loop.

Now MoveWithinRange uses the same range checks in order to ensure units are moved the correct distances.
2015-10-29 22:59:20 +00:00
atlimit8
b6f17df260 Add ActorsHavingTrait<TTrait>([Func<TTrait, bool]) 2015-10-28 16:36:45 -05:00
RichSuther
57cd25d5f8 Added Keybord input filter to only register first key press. 2015-10-28 12:08:54 +00:00
RoosterDragon
b4180615a8 Add Aircraft.MakeReservation.
This provides a simpler method for making reservations and also ensures the previous reservation is definitely unreserved before being discarded.
2015-10-27 22:15:56 +00:00
RoosterDragon
e2dd967757 Fix some reservation issues.
- TakeOff.Tick was nulling a local variable, rather than the Reservation field - this is changed to call UnReserve which does the right thing.
- Aircraft.ResolveOrder was missing an UnReserve call before setting a new reservation.
2015-10-27 22:00:26 +00:00
atlimit8
a5b93156db Add --rgba2hex & --argb2hex color format conversion utility commands 2015-10-27 16:12:57 -05:00
atlimit8
949994f10b Convert MiniYaml colors to hex 2015-10-27 16:10:33 -05:00
atlimit8
dac15edce5 Load rgb[a] hex colors from MiniYaml (+ Lua) 2015-10-27 16:09:48 -05:00
reaperrr
731875c270 Reduce default warhead TargetExtraSearchRadius
There aren't any actors in any shipping mod where a health radius larger
than 1c512 would be feasible, so no need to make the default larger than necessary.
2015-10-26 16:24:16 +01:00
reaperrr
7d3905ca53 Move musicplayer, spawnpoint and strategic point UI art to button.png
Migrate strategic points to new spawnpoint art.
2015-10-25 17:00:29 +01:00
reaperrr
fa29b16967 Skip DoImpact if actor has no Health trait 2015-10-25 13:23:21 +01:00
reaperrr
92c05912e1 Remove negligible stages from default warhead Falloff
- reduces situations where infantry goes prone even though the impact was rather far away and damage absolutely negligible
- saves a little bit of performance by reducing the total area of effect, resulting in lower average number of calls to Health.InflictDamage at a given Spread value
2015-10-25 11:55:47 +01:00
abcdefg30
cd62873003 Add team chat for spectators 2015-10-15 16:20:17 +02:00
abcdefg30
db37b14392 Minor code (style) cleanup 2015-10-15 15:05:17 +02:00
abcdefg30
4432c071cc Fix aircraft repulsing other aircraft when not being repulsable themselves 2015-10-13 21:48:38 +02:00
RoosterDragon
210c7e312b Don't keep mix files in memory.
Added SegmentStream class to assist in maintaining views into portions of the FileStream of the overall mix file to avoid having to copy sections into in-memory buffers.
2015-10-13 19:23:56 +01:00
Kevin Azzam
96c0c2dec6 Make ctrl+x cut to clipboard 2015-10-12 18:58:26 +02:00
Kevin Azzam
a0bcfb6f35 Add a Lua wrapper to display debug messages (shows if setting enabled) 2015-10-11 13:13:31 +02:00
Kevin Azzam
fdf993ddda Reset cursor blinking after keyboard-activated cursor movement 2015-10-10 13:16:16 +02:00
Kevin Azzam
5e4ea69dbd Refactor TextFieldWidget into much clearer and extensible code 2015-10-10 00:50:33 +02:00
Kevin Azzam
96c30788b0 Add hotkeys for TextFieldWidget including:
- ctrl+left/ctrl+right (cmd on osx) (back/forward by a word)
- ctrl+backspace/ctrl+delete (alt on osx) (delete word)
- ctrl+k/ctrl+u (cmd+delete/cmd+backspace on osx) (delete line from cursor)
- ctrl+x (cmd on osx) (deletes line)
2015-10-09 23:56:19 +02:00
atlimit8
54b03c92d8 Support loading multiple turret facings 2015-10-02 21:58:02 -05:00
2231 changed files with 116979 additions and 57734 deletions

9
.gitignore vendored
View File

@@ -70,4 +70,11 @@ StyleCopViolations.xml
# SublimeText
*.sublime-project
*.sublime-workspace
*.sublime-workspace
# NUnit
/TestResult.xml
/lib/
# Support directory
/Support

9
.kateproject Normal file
View File

@@ -0,0 +1,9 @@
{
"name": "OpenRA"
, "files": [ { "git": 1 } ]
, "build": {
"directory": "."
, "build": "make all"
, "clean": "make clean"
}
}

View File

@@ -2,7 +2,7 @@
# see travis-ci.org for details
language: csharp
mono: 4.0.0
mono: 4.4.2
# http://docs.travis-ci.com/user/migrating-from-legacy
sudo: false
@@ -28,12 +28,14 @@ env:
# Run the build script
# Check source code with StyleCop
# call OpenRA to check for YAML errors
# Run the NUnit tests
script:
- travis_retry make all-dependencies
- make all
- make all SDK="-sdk:4.5"
- make check
- make check-scripts
- make test
- make nunit
# Automatically update the trait documentation and Lua API
after_success:

25
AUTHORS
View File

@@ -26,6 +26,7 @@ Also thanks to:
* Adam Valy (Tschokky)
* Akseli Virtanen (RAGEQUIT)
* Alexander Fast (mizipzor)
* Alexis Hunt (alercah)
* Allen262
* Andrew Aldridge (i80and)
* Andrew Perkins
@@ -44,6 +45,7 @@ Also thanks to:
* clem
* Cody Brittain (Generalcamo)
* D2k Sardaukar
* D'Arcy Rush (r34ch)
* Daniel Derejvanik (Harisson)
* Danny Keary (Dan9550)
* David Jiménez (Rydra)
@@ -54,6 +56,7 @@ Also thanks to:
* Eric Bajumpaa (SteelPhase)
* Evgeniy Sergeev (evgeniysergeev)
* Fahrradkette
* Florian Wiesbauer (FiveAces)
* Frank Razenberg (zzattack)
* Gareth Needham (Ripley`)
* Glen Anderson (GlenAnderson)
@@ -74,9 +77,12 @@ Also thanks to:
* Jeff Harris (jeff_1amstudios)
* Jes
* Joakim Lindberg (booom3)
* John Turner (whinis)
* Jonas A. Lind (SoScared)
* Joppy Furr
* Kanar
* Kenny Hoxworth (hoxworth)
* Kevin Azzam (ChaoticMind)
* Krishnakanth Mallik
* Kyrre Soerensen (zypres)
* Lawrence Wang
@@ -89,6 +95,7 @@ Also thanks to:
* Matthijs Benschop (Nerdie)
* Max621
* Max Ugrumov (katzsmile)
* Michael Rätzel
* Michael Sztolcman (s1w_)
* Mustafa Alperen Seki (MustaphaTR)
* Neil Shivkar (havok13888)
@@ -99,13 +106,18 @@ Also thanks to:
* Paolo Chiodi (paolochiodi)
* Paul Dovydaitis (pdovy)
* Pavlos Touboulidis (pav)
* Pedro Ferreira Ramos (bateramos)
* Pizzaoverhead
* Piët Delport (pjdelport)
* Psydev
* Raphael Vogt (TheRaffy, Yellow)
* Raymond Bedrossian (Squiggles211)
* Raymond Martineau (mart0258)
* Riderr3
* riiga
* Rikhardur Bjarni Einarsson (WolfGaming)
* Sascha Biedermann (bidifx)
* Sean Hunt (coppro)
* Sebastien Kerguen (xanax)
* Shawn Collins (UberWaffe)
* Simon Verbeke (Saticmotion)
@@ -138,11 +150,8 @@ distributed under the CC BY-SA 3.0 license.
Using SharpFont created by Robert Rouhani and
distributed under the MIT license.
Using the Open Toolkit distributed under the
MIT license.
Using SDL2# created by Ethan Lee and released
under the zlib license.
Using SDL2-CS and OpenAL-CS created by Ethan
Lee and released under the zlib license.
Using Eluant created by Chris Howie and released
under the MIT license.
@@ -150,8 +159,9 @@ under the MIT license.
Using FuzzyLogicLibrary (fuzzynet) by Dmitry
Kaluzhny and released under the GNU GPL terms.
Using Mono.Nat by Alan McGovern and Ben
Motmans and distributed under the MIT license.
Using Open.Nat by Lucas Ontivero, based on the work
of Alan McGovern and Ben Motmans and distributed
under the MIT license.
Using ICSharpCode.SharpZipLib initially by Mike
Krueger and distributed under the GNU GPL terms.
@@ -163,4 +173,3 @@ distributed under the LGPL version 2.1 or later.
Finally, special thanks goes to the original teams
at Westwood Studios and EA for creating the classic
games which OpenRA aims to reimagine.

65
ConvertFrom-Markdown.ps1 Normal file

File diff suppressed because one or more lines are too long

View File

@@ -7,7 +7,7 @@ Windows
=======
* [Windows PowerShell >= 4.0](http://microsoft.com/powershell)
* [.NET Framework >= 4.0 (Client Profile)](http://www.microsoft.com/en-us/download/details.aspx?id=17113)
* [.NET Framework >= 4.5 (Client Profile)](http://www.microsoft.com/en-us/download/details.aspx?id=30653)
* [SDL 2](http://www.libsdl.org/download-2.0.php) (included)
* [FreeType](http://gnuwin32.sourceforge.net/packages/freetype.htm) (included)
* [zlib](http://gnuwin32.sourceforge.net/packages/zlib.htm) (included)
@@ -34,16 +34,15 @@ Type `sudo make install-all` for system wide installation. Run `make install-lin
Debian/Ubuntu
-------------
* mono-dmcs
* libmono-system-windows-forms4.0-cil
* nuget
* cli-common-dev (>= 2.10)
* mono-devel
* libfreetype6
* libopenal1
* liblua5.1-0
* libsdl2-2.0-0
* xdg-utils
* zenity
* curl
openSUSE
--------
@@ -56,6 +55,7 @@ openSUSE
* lua51
* xdg-utils
* zenity
* curl
Gentoo
------
@@ -71,3 +71,13 @@ Gentoo
* dev-lang/lua-5.1.5
* x11-misc/xdg-utils
* gnome-extra/zenity
* net-misc/curl
OSX
=====
Use `make dependencies` to map the native libraries to your system.
To compile OpenRA, run `make` from the command line.
Run with `mono --debug OpenRA.Game.exe`.

147
Makefile
View File

@@ -6,6 +6,11 @@
# to compile with development tools, run:
# make all [DEBUG=false]
#
# to check unit tests (requires NUnit version >= 2.6), run:
# make nunit [NUNIT_CONSOLE=<path-to/nunit[2]-console>] [NUNIT_LIBS_PATH=<path-to-libs-dir>] [NUNIT_LIBS=<nunit-libs>]
# Use NUNIT_CONSOLE if nunit[3|2]-console was not downloaded by `make dependencies` nor is it in bin search paths
# Use NUNIT_LIBS_PATH if NUnit libs are not in search paths. Include trailing /
# Use NUNIT_LIBS if NUnit libs have different names (such as including a prefix or suffix)
# to check the official mods for erroneous yaml files, run:
# make test
#
@@ -37,10 +42,13 @@
############################## TOOLCHAIN ###############################
#
CSC = dmcs
SDK ?=
CSC = mcs $(SDK)
CSFLAGS = -nologo -warn:4 -codepage:utf8 -unsafe -warnaserror
DEFINE = TRACE
COMMON_LIBS = System.dll System.Core.dll System.Data.dll System.Data.DataSetExtensions.dll System.Drawing.dll System.Xml.dll thirdparty/download/ICSharpCode.SharpZipLib.dll thirdparty/download/FuzzyLogicLibrary.dll thirdparty/download/Mono.Nat.dll thirdparty/download/MaxMind.Db.dll thirdparty/download/MaxMind.GeoIP2.dll thirdparty/download/Eluant.dll thirdparty/download/SmarIrc4net.dll
COMMON_LIBS = System.dll System.Core.dll System.Data.dll System.Data.DataSetExtensions.dll System.Drawing.dll System.Xml.dll thirdparty/download/ICSharpCode.SharpZipLib.dll thirdparty/download/FuzzyLogicLibrary.dll thirdparty/download/MaxMind.Db.dll thirdparty/download/MaxMind.GeoIP2.dll thirdparty/download/Eluant.dll thirdparty/download/SmarIrc4net.dll
NUNIT_LIBS_PATH :=
NUNIT_LIBS := $(NUNIT_LIBS_PATH)nunit.framework.dll
DEBUG = true
ifeq ($(DEBUG), $(filter $(DEBUG),false no n off 0))
@@ -79,7 +87,7 @@ INSTALL_PROGRAM = $(INSTALL) -m755
INSTALL_DATA = $(INSTALL) -m644
# program targets
CORE = pdefault pnull game utility
CORE = pdefault game utility server
TOOLS = gamemonitor
VERSION = $(shell git name-rev --name-only --tags --no-undefined HEAD 2>/dev/null || echo git-`git rev-parse --short HEAD`)
@@ -100,7 +108,7 @@ endif
game_SRCS := $(shell find OpenRA.Game/ -iname '*.cs')
game_TARGET = OpenRA.Game.exe
game_KIND = winexe
game_LIBS = $(COMMON_LIBS) $(game_DEPS) thirdparty/download/SharpFont.dll
game_LIBS = $(COMMON_LIBS) $(game_DEPS) thirdparty/download/SharpFont.dll thirdparty/download/Open.Nat.dll
game_FLAGS = -win32icon:OpenRA.Game/OpenRA.ico
PROGRAMS += game
game: $(game_TARGET)
@@ -110,15 +118,9 @@ pdefault_SRCS := $(shell find OpenRA.Platforms.Default/ -iname '*.cs')
pdefault_TARGET = OpenRA.Platforms.Default.dll
pdefault_KIND = library
pdefault_DEPS = $(game_TARGET)
pdefault_LIBS = $(COMMON_LIBS) thirdparty/download/SDL2-CS.dll $(pdefault_DEPS)
pnull_SRCS := $(shell find OpenRA.Platforms.Null/ -iname '*.cs')
pnull_TARGET = OpenRA.Platforms.Null.dll
pnull_KIND = library
pnull_DEPS = $(game_TARGET)
pnull_LIBS = $(COMMON_LIBS) $(pnull_DEPS)
PROGRAMS += pdefault pnull
platforms: $(pdefault_TARGET) $(pnull_TARGET)
pdefault_LIBS = $(COMMON_LIBS) thirdparty/download/SDL2-CS.dll thirdparty/download/OpenAL-CS.dll $(pdefault_DEPS)
PROGRAMS += pdefault
platforms: $(pdefault_TARGET)
# Mods Common
mod_common_SRCS := $(shell find OpenRA.Mods.Common/ -iname '*.cs')
@@ -129,6 +131,16 @@ mod_common_LIBS = $(COMMON_LIBS) $(STD_MOD_LIBS) thirdparty/download/StyleCop.dl
PROGRAMS += mod_common
mod_common: $(mod_common_TARGET)
# NUnit testing
test_dll_SRCS := $(shell find OpenRA.Test/ -iname '*.cs')
test_dll_TARGET = OpenRA.Test.dll
test_dll_KIND = library
test_dll_DEPS = $(game_TARGET) $(mod_common_TARGET)
test_dll_FLAGS = -warn:1
test_dll_LIBS = $(COMMON_LIBS) $(game_TARGET) $(mod_common_TARGET) $(NUNIT_LIBS)
PROGRAMS += test_dll
test_dll: $(test_dll_TARGET)
##### Official Mods #####
STD_MOD_LIBS = $(game_TARGET)
@@ -184,9 +196,6 @@ check: utility mods
@echo "Checking for code style violations in OpenRA.Platforms.Default..."
@mono --debug OpenRA.Utility.exe ra --check-code-style OpenRA.Platforms.Default
@echo
@echo "Checking for code style violations in OpenRA.Platforms.Null..."
@mono --debug OpenRA.Utility.exe ra --check-code-style OpenRA.Platforms.Null
@echo
@echo "Checking for code style violations in OpenRA.GameMonitor..."
@mono --debug OpenRA.Utility.exe ra --check-code-style OpenRA.GameMonitor
@echo
@@ -210,6 +219,31 @@ check: utility mods
@echo
@echo "Checking for code style violations in OpenRA.Test..."
@mono --debug OpenRA.Utility.exe ra --check-code-style OpenRA.Test
@echo
@echo "Checking for explicit interface violations..."
@mono --debug OpenRA.Utility.exe all --check-explicit-interfaces
@echo
@echo "Checking for code style violations in OpenRA.Server..."
@mono --debug OpenRA.Utility.exe ra --check-code-style OpenRA.Server
NUNIT_CONSOLE := $(shell test -f thirdparty/download/nunit3-console.exe && echo mono thirdparty/download/nunit3-console.exe || \
which nunit3-console 2>/dev/null || which nunit2-console 2>/dev/null || which nunit-console 2>/dev/null)
nunit: test_dll
@echo
@echo "Checking unit tests..."
@if [ "$(NUNIT_CONSOLE)" = "" ] ; then \
echo 'nunit[3|2]-console not found!'; \
echo 'Was "make dependencies" called or is NUnit installed?'>&2; \
echo 'See "make help".'; \
exit 1; \
fi
@if $(NUNIT_CONSOLE) --help | head -n 1 | grep -E "NUnit version (1|2\.[0-5])";then \
echo 'NUnit version >= 2.6 required'>&2; \
echo 'Try "make dependencies" first to use NUnit from NuGet.'>&2; \
echo 'See "make help".'; \
exit 1; \
fi
@$(NUNIT_CONSOLE) --noresult OpenRA.Test.nunit
test: utility mods
@echo
@@ -246,6 +280,15 @@ utility_LIBS = $(COMMON_LIBS) $(utility_DEPS) thirdparty/download/ICSharpCode.Sh
PROGRAMS += utility
utility: $(utility_TARGET)
# Dedicated server
server_SRCS := $(shell find OpenRA.Server/ -iname '*.cs')
server_TARGET = OpenRA.Server.exe
server_KIND = exe
server_DEPS = $(game_TARGET)
server_LIBS = $(COMMON_LIBS) $(server_DEPS)
PROGRAMS += server
server: $(server_TARGET)
# Patches binary headers to work around a mono bug
fixheader.exe: packaging/fixheader.cs
@echo CSC fixheader.exe
@@ -275,7 +318,7 @@ $(foreach prog,$(PROGRAMS),$(eval $(call BUILD_ASSEMBLY,$(prog))))
#
default: core
core: game platforms mods utility
core: game platforms mods utility server
tools: gamemonitor
@@ -296,7 +339,6 @@ cli-dependencies:
@./thirdparty/fetch-thirdparty-deps.sh
@ $(CP_R) thirdparty/download/*.dll .
@ $(CP_R) thirdparty/download/*.dll.config .
@ $(CP) thirdparty/SDL2-CS.dll.config .
linux-dependencies: cli-dependencies linux-native-dependencies
@@ -320,7 +362,9 @@ all-dependencies: cli-dependencies windows-dependencies osx-dependencies
version: mods/ra/mod.yaml mods/cnc/mod.yaml mods/d2k/mod.yaml mods/ts/mod.yaml mods/modchooser/mod.yaml mods/all/mod.yaml
@for i in $? ; do \
awk '{sub("Version:.*$$","Version: $(VERSION)"); print $0}' $${i} > $${i}.tmp && \
mv -f $${i}.tmp $${i} ; \
awk '{sub("\tmodchooser:.*$$","\tmodchooser: $(VERSION)"); print $0}' $${i}.tmp > $${i}.tmp2 && \
awk '{sub("/[^/]*: User$$", "/$(VERSION): User"); print $0}' $${i}.tmp2 > $${i} && \
rm $${i}.tmp $${i}.tmp2; \
done
docs: utility mods version
@@ -359,16 +403,16 @@ install-core: default
@$(CP_R) glsl "$(DATA_INSTALL_DIR)"
@$(CP_R) lua "$(DATA_INSTALL_DIR)"
@$(CP) SDL2-CS* "$(DATA_INSTALL_DIR)"
@$(CP) OpenAL-CS* "$(DATA_INSTALL_DIR)"
@$(CP) Eluant* "$(DATA_INSTALL_DIR)"
@$(INSTALL_PROGRAM) ICSharpCode.SharpZipLib.dll "$(DATA_INSTALL_DIR)"
@$(INSTALL_PROGRAM) FuzzyLogicLibrary.dll "$(DATA_INSTALL_DIR)"
@$(INSTALL_PROGRAM) SharpFont.dll "$(DATA_INSTALL_DIR)"
@$(CP) SharpFont.dll.config "$(DATA_INSTALL_DIR)"
@$(INSTALL_PROGRAM) Mono.Nat.dll "$(DATA_INSTALL_DIR)"
@$(INSTALL_PROGRAM) Open.Nat.dll "$(DATA_INSTALL_DIR)"
@$(INSTALL_PROGRAM) MaxMind.Db.dll "$(DATA_INSTALL_DIR)"
@$(INSTALL_PROGRAM) MaxMind.GeoIP2.dll "$(DATA_INSTALL_DIR)"
@$(INSTALL_PROGRAM) Newtonsoft.Json.dll "$(DATA_INSTALL_DIR)"
@$(INSTALL_PROGRAM) RestSharp.dll "$(DATA_INSTALL_DIR)"
@$(INSTALL_PROGRAM) SmarIrc4net.dll "$(DATA_INSTALL_DIR)"
ifneq ($(UNAME_S),Darwin)
@@ -395,6 +439,7 @@ install-linux-mime:
@$(INSTALL_DIR) "$(DESTDIR)$(datadir)/applications"
@$(INSTALL_DATA) packaging/linux/openra-join-servers.desktop "$(DESTDIR)$(datadir)/applications"
@$(INSTALL_DATA) packaging/linux/openra-replays.desktop "$(DESTDIR)$(datadir)/applications"
@$(INSTALL_DATA) packaging/linux/openra-launch-mod.desktop "$(DESTDIR)$(datadir)/applications"
install-linux-appdata:
@$(INSTALL_DIR) "$(DESTDIR)$(datadir)/appdata/"
@@ -423,10 +468,26 @@ endif
@$(INSTALL_PROGRAM) -m +rx openra "$(BIN_INSTALL_DIR)"
@-$(RM) openra
@echo "#!/bin/sh" > openra-server
@echo 'cd "$(gameinstalldir)"' >> openra-server
ifeq ($(DEBUG), $(filter $(DEBUG),false no n off 0))
@echo 'mono OpenRA.Server.exe "$$@"' >> openra-server
else
@echo 'mono --debug OpenRA.Server.exe "$$@"' >> openra-server
endif
@$(INSTALL_DIR) "$(BIN_INSTALL_DIR)"
@$(INSTALL_PROGRAM) -m +rx openra-server "$(BIN_INSTALL_DIR)"
@-$(RM) openra-server
uninstall:
@-$(RM_R) "$(DATA_INSTALL_DIR)"
@-$(RM_F) "$(BIN_INSTALL_DIR)/openra"
@-$(RM_F) "$(BIN_INSTALL_DIR)/openra-server"
@-$(RM_F) "$(DESTDIR)$(datadir)/applications/openra.desktop"
@-$(RM_F) "$(DESTDIR)$(datadir)/applications/openra-join-servers.desktop"
@-$(RM_F) "$(DESTDIR)$(datadir)/applications/openra-launch-mod.desktop"
@-$(RM_F) "$(DESTDIR)$(datadir)/applications/openra-join-servers.desktop"
@-$(RM_F) "$(DESTDIR)$(datadir)/icons/hicolor/16x16/apps/openra.png"
@-$(RM_F) "$(DESTDIR)$(datadir)/icons/hicolor/32x32/apps/openra.png"
@-$(RM_F) "$(DESTDIR)$(datadir)/icons/hicolor/48x48/apps/openra.png"
@@ -437,32 +498,38 @@ uninstall:
@-$(RM_F) "$(DESTDIR)$(mandir)/man6/openra.6"
help:
@echo to compile, run:
@echo \ \ make [DEBUG=false]
@echo 'to compile, run:'
@echo ' make [DEBUG=false]'
@echo
@echo to compile with development tools, run:
@echo \ \ make all [DEBUG=false]
@echo 'to compile with development tools, run:'
@echo ' make all [DEBUG=false]'
@echo
@echo to check the official mods for erroneous yaml files, run:
@echo \ \ make test
@echo 'to check unit tests (requires NUnit version >= 2.6), run:'
@echo ' make nunit [NUNIT_CONSOLE=<path-to/nunit[3|2]-console>] [NUNIT_LIBS_PATH=<path-to-libs-dir>] [NUNIT_LIBS=<nunit-libs>]'
@echo ' Use NUNIT_CONSOLE if nunit[3|2]-console was not downloaded by `make dependencies` nor is it in bin search paths'
@echo ' Use NUNIT_LIBS_PATH if NUnit libs are not in search paths. Include trailing /'
@echo ' Use NUNIT_LIBS if NUnit libs have different names (such as including a prefix or suffix)'
@echo
@echo to generate documentation aimed at modders, run:
@echo \ \ make docs
@echo 'to check the official mods for erroneous yaml files, run:'
@echo ' make test'
@echo
@echo to install, run:
@echo \ \ make \[prefix=/foo\] \[bindir=/bar/bin\] install
@echo 'to generate documentation aimed at modders, run:'
@echo ' make docs'
@echo
@echo to install with development tools, run:
@echo \ \ make \[prefix=/foo\] \[bindir=/bar/bin\] install-all
@echo 'to install, run:'
@echo ' make [prefix=/foo] [bindir=/bar/bin] install'
@echo
@echo to install Linux startup scripts, desktop files and icons
@echo \ \ make install-linux-shortcuts [DEBUG=false]
@echo 'to install with development tools, run:'
@echo ' make [prefix=/foo] [bindir=/bar/bin] install-all'
@echo
@echo to uninstall, run:
@echo \ \ make uninstall
@echo 'to install Linux startup scripts, desktop files and icons'
@echo ' make install-linux-shortcuts [DEBUG=false]'
@echo
@echo to start the game, run:
@echo \ \ openra
@echo 'to uninstall, run:'
@echo ' make uninstall'
@echo
@echo 'to start the game, run:'
@echo ' openra'
@@ -473,4 +540,4 @@ help:
.SUFFIXES:
.PHONY: core tools package all mods clean distclean dependencies version $(PROGRAMS)
.PHONY: core tools package all mods clean distclean dependencies version $(PROGRAMS) nunit

View File

@@ -1,10 +1,11 @@
#region Copyright & License Information
/*
* Copyright 2007-2015 The OpenRA Developers (see AUTHORS)
* Copyright 2007-2016 The OpenRA Developers (see AUTHORS)
* This file is part of OpenRA, which is free software. It is made
* available to you under the terms of the GNU General Public License
* as published by the Free Software Foundation. For more information,
* see COPYING.
* as published by the Free Software Foundation, either version 3 of
* the License, or (at your option) any later version. For more
* information, see COPYING.
*/
#endregion

View File

@@ -1,10 +1,11 @@
#region Copyright & License Information
/*
* Copyright 2007-2015 The OpenRA Developers (see AUTHORS)
* Copyright 2007-2016 The OpenRA Developers (see AUTHORS)
* This file is part of OpenRA, which is free software. It is made
* available to you under the terms of the GNU General Public License
* as published by the Free Software Foundation. For more information,
* see COPYING.
* as published by the Free Software Foundation, either version 3 of
* the License, or (at your option) any later version. For more
* information, see COPYING.
*/
#endregion

View File

@@ -1,10 +1,11 @@
#region Copyright & License Information
/*
* Copyright 2007-2015 The OpenRA Developers (see AUTHORS)
* Copyright 2007-2016 The OpenRA Developers (see AUTHORS)
* This file is part of OpenRA, which is free software. It is made
* available to you under the terms of the GNU General Public License
* as published by the Free Software Foundation. For more information,
* see COPYING.
* as published by the Free Software Foundation, either version 3 of
* the License, or (at your option) any later version. For more
* information, see COPYING.
*/
#endregion
@@ -24,6 +25,13 @@ namespace OpenRA
{
public sealed class Actor : IScriptBindable, IScriptNotifyBind, ILuaTableBinding, ILuaEqualityBinding, ILuaToStringBinding, IEquatable<Actor>, IDisposable
{
internal struct SyncHash
{
public readonly ISync Trait;
public readonly int Hash;
public SyncHash(ISync trait, int hash) { Trait = trait; Hash = hash; }
}
public readonly ActorInfo Info;
public readonly World World;
@@ -44,6 +52,7 @@ namespace OpenRA
public Rectangle VisualBounds { get; private set; }
public IEffectiveOwner EffectiveOwner { get; private set; }
public IOccupySpace OccupiesSpace { get; private set; }
public ITargetable[] Targetables { get; private set; }
public bool IsIdle { get { return currentActivity == null; } }
public bool IsDead { get { return Disposed || (health != null && health.IsDead); } }
@@ -61,6 +70,8 @@ namespace OpenRA
}
}
internal IEnumerable<SyncHash> SyncHashes { get; private set; }
readonly IFacing facing;
readonly IHealth health;
readonly IRenderModifier[] renderModifiers;
@@ -97,6 +108,9 @@ namespace OpenRA
}
}
// PERF: Cache all these traits as soon as the actor is created. This is a fairly cheap one-off cost per
// actor that allows us to provide some fast implementations of commonly used methods that are relied on by
// performance-sensitive parts of the core game engine, such as pathfinding, visibility and rendering.
Bounds = DetermineBounds();
VisualBounds = DetermineVisualBounds();
EffectiveOwner = TraitOrDefault<IEffectiveOwner>();
@@ -107,6 +121,13 @@ namespace OpenRA
disables = TraitsImplementing<IDisable>().ToArray();
visibilityModifiers = TraitsImplementing<IVisibilityModifier>().ToArray();
defaultVisibility = Trait<IDefaultVisibility>();
Targetables = TraitsImplementing<ITargetable>().ToArray();
SyncHashes =
TraitsImplementing<ISync>()
.Select(sync => Pair.New(sync, Sync.GetHashFunction(sync)))
.ToArray()
.Select(pair => new SyncHash(pair.First, pair.Second(pair.First)));
}
Rectangle DetermineBounds()
@@ -140,7 +161,7 @@ namespace OpenRA
public void Tick()
{
var wasIdle = IsIdle;
currentActivity = Traits.Util.RunActivity(this, currentActivity);
currentActivity = ActivityUtils.RunActivity(this, currentActivity);
if (!wasIdle && IsIdle)
foreach (var n in TraitsImplementing<INotifyBecomingIdle>())
@@ -149,6 +170,7 @@ namespace OpenRA
public IEnumerable<IRenderable> Render(WorldRenderer wr)
{
// PERF: Avoid LINQ.
var renderables = Renderables(wr);
foreach (var modifier in renderModifiers)
renderables = modifier.ModifyRender(this, wr, renderables);
@@ -157,6 +179,13 @@ namespace OpenRA
IEnumerable<IRenderable> Renderables(WorldRenderer wr)
{
// PERF: Avoid LINQ.
// Implementations of Render are permitted to return both an eagerly materialized collection or a lazily
// generated sequence.
// For large amounts of renderables, a lazily generated sequence (e.g. as returned by LINQ, or by using
// `yield`) will avoid the need to allocate a large collection.
// For small amounts of renderables, allocating a small collection can often be faster and require less
// memory than creating the objects needed to represent a sequence.
foreach (var render in renders)
foreach (var renderable in render.Render(this, wr))
yield return renderable;
@@ -206,6 +235,7 @@ namespace OpenRA
public override string ToString()
{
// PERF: Avoid format strings.
var name = Info.Name + " " + ActorID;
if (!IsInWorld)
name += " (not in world)";
@@ -271,11 +301,11 @@ namespace OpenRA
Owner = newOwner;
Generation++;
foreach (var t in TraitsImplementing<INotifyOwnerChanged>())
t.OnOwnerChanged(this, oldOwner, newOwner);
if (wasInWorld)
w.Add(this);
foreach (var t in this.TraitsImplementing<INotifyOwnerChanged>())
t.OnOwnerChanged(this, oldOwner, newOwner);
});
}
@@ -287,12 +317,12 @@ namespace OpenRA
return (health == null) ? DamageState.Undamaged : health.DamageState;
}
public void InflictDamage(Actor attacker, int damage, IWarhead warhead)
public void InflictDamage(Actor attacker, Damage damage)
{
if (Disposed || health == null)
return;
health.InflictDamage(this, attacker, damage, warhead, false);
health.InflictDamage(this, attacker, damage, false);
}
public void Kill(Actor attacker)
@@ -305,6 +335,7 @@ namespace OpenRA
public bool IsDisabled()
{
// PERF: Avoid LINQ.
foreach (var disable in disables)
if (disable.Disabled)
return true;
@@ -313,6 +344,7 @@ namespace OpenRA
public bool CanBeViewedByPlayer(Player player)
{
// PERF: Avoid LINQ.
foreach (var visibilityModifier in visibilityModifiers)
if (!visibilityModifier.IsVisible(this, player))
return false;
@@ -320,6 +352,33 @@ namespace OpenRA
return defaultVisibility.IsVisible(this, player);
}
public IEnumerable<string> GetAllTargetTypes()
{
// PERF: Avoid LINQ.
foreach (var targetable in Targetables)
foreach (var targetType in targetable.TargetTypes)
yield return targetType;
}
public IEnumerable<string> GetEnabledTargetTypes()
{
// PERF: Avoid LINQ.
foreach (var targetable in Targetables)
if (targetable.IsTraitEnabled())
foreach (var targetType in targetable.TargetTypes)
yield return targetType;
}
public bool IsTargetableBy(Actor byActor)
{
// PERF: Avoid LINQ.
foreach (var targetable in Targetables)
if (targetable.IsTraitEnabled() && targetable.TargetableBy(this, byActor))
return true;
return false;
}
#region Scripting interface
Lazy<ScriptActorInterface> luaInterface;
@@ -338,7 +397,7 @@ namespace OpenRA
public LuaValue Equals(LuaRuntime runtime, LuaValue left, LuaValue right)
{
Actor a, b;
if (!left.TryGetClrValue<Actor>(out a) || !right.TryGetClrValue<Actor>(out b))
if (!left.TryGetClrValue(out a) || !right.TryGetClrValue(out b))
return false;
return a == b;

View File

@@ -1,10 +1,11 @@
#region Copyright & License Information
/*
* Copyright 2007-2015 The OpenRA Developers (see AUTHORS)
* Copyright 2007-2016 The OpenRA Developers (see AUTHORS)
* This file is part of OpenRA, which is free software. It is made
* available to you under the terms of the GNU General Public License
* as published by the Free Software Foundation. For more information,
* see COPYING.
* as published by the Free Software Foundation, either version 3 of
* the License, or (at your option) any later version. For more
* information, see COPYING.
*/
#endregion
@@ -73,7 +74,7 @@ namespace OpenRA
{
CPos a;
CVec b;
if (!left.TryGetClrValue<CPos>(out a) || !right.TryGetClrValue<CVec>(out b))
if (!left.TryGetClrValue(out a) || !right.TryGetClrValue(out b))
throw new LuaException("Attempted to call CPos.Add(CPos, CVec) with invalid arguments ({0}, {1})".F(left.WrappedClrType().Name, right.WrappedClrType().Name));
return new LuaCustomClrObject(a + b);
@@ -83,7 +84,7 @@ namespace OpenRA
{
CPos a;
CVec b;
if (!left.TryGetClrValue<CPos>(out a) || !right.TryGetClrValue<CVec>(out b))
if (!left.TryGetClrValue(out a) || !right.TryGetClrValue(out b))
throw new LuaException("Attempted to call CPos.Subtract(CPos, CVec) with invalid arguments ({0}, {1})".F(left.WrappedClrType().Name, right.WrappedClrType().Name));
return new LuaCustomClrObject(a - b);
@@ -92,7 +93,7 @@ namespace OpenRA
public LuaValue Equals(LuaRuntime runtime, LuaValue left, LuaValue right)
{
CPos a, b;
if (!left.TryGetClrValue<CPos>(out a) || !right.TryGetClrValue<CPos>(out b))
if (!left.TryGetClrValue(out a) || !right.TryGetClrValue(out b))
return false;
return a == b;

View File

@@ -1,10 +1,11 @@
#region Copyright & License Information
/*
* Copyright 2007-2015 The OpenRA Developers (see AUTHORS)
* Copyright 2007-2016 The OpenRA Developers (see AUTHORS)
* This file is part of OpenRA, which is free software. It is made
* available to you under the terms of the GNU General Public License
* as published by the Free Software Foundation. For more information,
* see COPYING.
* as published by the Free Software Foundation, either version 3 of
* the License, or (at your option) any later version. For more
* information, see COPYING.
*/
#endregion
@@ -75,7 +76,7 @@ namespace OpenRA
public LuaValue Add(LuaRuntime runtime, LuaValue left, LuaValue right)
{
CVec a, b;
if (!left.TryGetClrValue<CVec>(out a) || !right.TryGetClrValue<CVec>(out b))
if (!left.TryGetClrValue(out a) || !right.TryGetClrValue(out b))
throw new LuaException("Attempted to call CVec.Add(CVec, CVec) with invalid arguments ({0}, {1})".F(left.WrappedClrType().Name, right.WrappedClrType().Name));
return new LuaCustomClrObject(a + b);
@@ -84,7 +85,7 @@ namespace OpenRA
public LuaValue Subtract(LuaRuntime runtime, LuaValue left, LuaValue right)
{
CVec a, b;
if (!left.TryGetClrValue<CVec>(out a) || !right.TryGetClrValue<CVec>(out b))
if (!left.TryGetClrValue(out a) || !right.TryGetClrValue(out b))
throw new LuaException("Attempted to call CVec.Subtract(CVec, CVec) with invalid arguments ({0}, {1})".F(left.WrappedClrType().Name, right.WrappedClrType().Name));
return new LuaCustomClrObject(a - b);
@@ -98,7 +99,7 @@ namespace OpenRA
public LuaValue Equals(LuaRuntime runtime, LuaValue left, LuaValue right)
{
CVec a, b;
if (!left.TryGetClrValue<CVec>(out a) || !right.TryGetClrValue<CVec>(out b))
if (!left.TryGetClrValue(out a) || !right.TryGetClrValue(out b))
return false;
return a == b;
@@ -118,7 +119,7 @@ namespace OpenRA
set
{
throw new LuaException("WVec is read-only. Use CVec.New to create a new value");
throw new LuaException("CVec is read-only. Use CVec.New to create a new value");
}
}

View File

@@ -1,10 +1,11 @@
#region Copyright & License Information
/*
* Copyright 2007-2015 The OpenRA Developers (see AUTHORS)
* Copyright 2007-2016 The OpenRA Developers (see AUTHORS)
* This file is part of OpenRA, which is free software. It is made
* available to you under the terms of the GNU General Public License
* as published by the Free Software Foundation. For more information,
* see COPYING.
* as published by the Free Software Foundation, either version 3 of
* the License, or (at your option) any later version. For more
* information, see COPYING.
*/
#endregion

View File

@@ -1,37 +0,0 @@
#region Copyright & License Information
/*
* Copyright 2007-2015 The OpenRA Developers (see AUTHORS)
* This file is part of OpenRA, which is free software. It is made
* available to you under the terms of the GNU General Public License
* as published by the Free Software Foundation. For more information,
* see COPYING.
*/
#endregion
using System.Collections.Generic;
namespace OpenRA
{
// Referenced from ModMetadata, so needs to be in OpenRA.Game :(
public class ContentInstaller : IGlobalModData
{
public readonly string[] TestFiles = { };
public readonly string[] DiskTestFiles = { };
public readonly string PackageToExtractFromCD = null;
public readonly bool OverwriteFiles = true;
public readonly Dictionary<string, string[]> CopyFilesFromCD = new Dictionary<string, string[]>();
public readonly Dictionary<string, string[]> ExtractFilesFromCD = new Dictionary<string, string[]>();
public readonly string PackageMirrorList = null;
public readonly string MusicPackageMirrorList = null;
public readonly int ShippedSoundtracks = 0;
/// <summary> InstallShield .CAB file IDs, used to extract Mod-specific files. </summary>
public readonly HashSet<int> InstallShieldCABFileIds = new HashSet<int>();
/// <summary> InstallShield .CAB file IDs, used to extract Mod-specific archives and extract contents of ExtractFilesFromCD. </summary>
public readonly HashSet<string> InstallShieldCABFilePackageIds = new HashSet<string>();
}
}

View File

@@ -1,10 +1,11 @@
#region Copyright & License Information
/*
* Copyright 2007-2015 The OpenRA Developers (see AUTHORS)
* Copyright 2007-2016 The OpenRA Developers (see AUTHORS)
* This file is part of OpenRA, which is free software. It is made
* available to you under the terms of the GNU General Public License
* as published by the Free Software Foundation. For more information,
* see COPYING.
* as published by the Free Software Foundation, either version 3 of
* the License, or (at your option) any later version. For more
* information, see COPYING.
*/
#endregion
@@ -16,8 +17,8 @@ namespace OpenRA
{
public class Download
{
readonly object syncObject = new object();
WebClient wc;
bool cancelled;
public static string FormatErrorMessage(Exception e)
{
@@ -27,6 +28,8 @@ namespace OpenRA
switch (ex.Status)
{
case WebExceptionStatus.RequestCanceled:
return "Cancelled";
case WebExceptionStatus.NameResolutionFailure:
return "DNS lookup failed";
case WebExceptionStatus.Timeout:
@@ -40,40 +43,42 @@ namespace OpenRA
}
}
public Download(string url, string path, Action<DownloadProgressChangedEventArgs> onProgress, Action<AsyncCompletedEventArgs, bool> onComplete)
public Download(string url, string path, Action<DownloadProgressChangedEventArgs> onProgress, Action<AsyncCompletedEventArgs> onComplete)
{
wc = new WebClient();
wc.Proxy = null;
wc.DownloadProgressChanged += (_, a) => onProgress(a);
wc.DownloadFileCompleted += (_, a) => onComplete(a, cancelled);
Game.OnQuit += Cancel;
wc.DownloadFileCompleted += (_, a) => { Game.OnQuit -= Cancel; };
wc.DownloadFileAsync(new Uri(url), path);
lock (syncObject)
{
wc = new WebClient { Proxy = null };
wc.DownloadProgressChanged += (_, a) => onProgress(a);
wc.DownloadFileCompleted += (_, a) => { DisposeWebClient(); onComplete(a); };
wc.DownloadFileAsync(new Uri(url), path);
}
}
public Download(string url, Action<DownloadProgressChangedEventArgs> onProgress, Action<DownloadDataCompletedEventArgs, bool> onComplete)
public Download(string url, Action<DownloadProgressChangedEventArgs> onProgress, Action<DownloadDataCompletedEventArgs> onComplete)
{
wc = new WebClient();
wc.Proxy = null;
wc.DownloadProgressChanged += (_, a) => onProgress(a);
wc.DownloadDataCompleted += (_, a) => onComplete(a, cancelled);
Game.OnQuit += Cancel;
wc.DownloadDataCompleted += (_, a) => { Game.OnQuit -= Cancel; };
wc.DownloadDataAsync(new Uri(url));
lock (syncObject)
{
wc = new WebClient { Proxy = null };
wc.DownloadProgressChanged += (_, a) => onProgress(a);
wc.DownloadDataCompleted += (_, a) => { DisposeWebClient(); onComplete(a); };
wc.DownloadDataAsync(new Uri(url));
}
}
public void Cancel()
void DisposeWebClient()
{
Game.OnQuit -= Cancel;
wc.CancelAsync();
wc.Dispose();
cancelled = true;
lock (syncObject)
{
wc.Dispose();
wc = null;
}
}
public void CancelAsync()
{
lock (syncObject)
if (wc != null)
wc.CancelAsync();
}
}
}

View File

@@ -1,10 +1,11 @@
#region Copyright & License Information
/*
* Copyright 2007-2015 The OpenRA Developers (see AUTHORS)
* Copyright 2007-2016 The OpenRA Developers (see AUTHORS)
* This file is part of OpenRA, which is free software. It is made
* available to you under the terms of the GNU General Public License
* as published by the Free Software Foundation. For more information,
* see COPYING.
* as published by the Free Software Foundation, either version 3 of
* the License, or (at your option) any later version. For more
* information, see COPYING.
*/
#endregion

View File

@@ -1,10 +1,11 @@
#region Copyright & License Information
/*
* Copyright 2007-2015 The OpenRA Developers (see AUTHORS)
* Copyright 2007-2016 The OpenRA Developers (see AUTHORS)
* This file is part of OpenRA, which is free software. It is made
* available to you under the terms of the GNU General Public License
* as published by the Free Software Foundation. For more information,
* see COPYING.
* as published by the Free Software Foundation, either version 3 of
* the License, or (at your option) any later version. For more
* information, see COPYING.
*/
#endregion

View File

@@ -1,10 +1,11 @@
#region Copyright & License Information
/*
* Copyright 2007-2015 The OpenRA Developers (see AUTHORS)
* Copyright 2007-2016 The OpenRA Developers (see AUTHORS)
* This file is part of OpenRA, which is free software. It is made
* available to you under the terms of the GNU General Public License
* as published by the Free Software Foundation. For more information,
* see COPYING.
* as published by the Free Software Foundation, either version 3 of
* the License, or (at your option) any later version. For more
* information, see COPYING.
*/
#endregion
@@ -18,4 +19,6 @@ namespace OpenRA.Effects
void Tick(World world);
IEnumerable<IRenderable> Render(WorldRenderer r);
}
public interface IEffectAboveShroud { IEnumerable<IRenderable> RenderAboveShroud(WorldRenderer wr); }
}

View File

@@ -1,40 +0,0 @@
#region Copyright & License Information
/*
* Copyright 2007-2015 The OpenRA Developers (see AUTHORS)
* This file is part of OpenRA, which is free software. It is made
* available to you under the terms of the GNU General Public License
* as published by the Free Software Foundation. For more information,
* see COPYING.
*/
#endregion
using System.Collections.Generic;
using OpenRA.Graphics;
namespace OpenRA.Effects
{
public class SpriteEffect : IEffect
{
readonly string palette;
readonly Animation anim;
readonly WPos pos;
public SpriteEffect(WPos pos, World world, string image, string palette)
{
this.pos = pos;
this.palette = palette;
anim = new Animation(world, image);
anim.PlayThen("idle", () => world.AddFrameEndTask(w => w.Remove(this)));
}
public void Tick(World world)
{
anim.Tick();
}
public IEnumerable<IRenderable> Render(WorldRenderer wr)
{
return anim.Render(pos, WVec.Zero, 0, wr.Palette(palette), 1f / wr.Viewport.Zoom);
}
}
}

View File

@@ -1,10 +1,11 @@
#region Copyright & License Information
/*
* Copyright 2007-2015 The OpenRA Developers (see AUTHORS)
* Copyright 2007-2016 The OpenRA Developers (see AUTHORS)
* This file is part of OpenRA, which is free software. It is made
* available to you under the terms of the GNU General Public License
* as published by the Free Software Foundation. For more information,
* see COPYING.
* as published by the Free Software Foundation, either version 3 of
* the License, or (at your option) any later version. For more
* information, see COPYING.
*/
#endregion
@@ -113,6 +114,7 @@ namespace OpenRA
public static bool HasModifier(this Modifiers k, Modifiers mod)
{
// PERF: Enum.HasFlag is slower and requires allocations.
return (k & mod) == mod;
}
@@ -326,6 +328,15 @@ namespace OpenRA
return root;
}
public static int IntegerDivisionRoundingAwayFromZero(int dividend, int divisor)
{
int remainder;
var quotient = Math.DivRem(dividend, divisor, out remainder);
if (remainder == 0)
return quotient;
return quotient + (Math.Sign(dividend) == Math.Sign(divisor) ? 1 : -1);
}
public static string JoinWith<T>(this IEnumerable<T> ts, string j)
{
return string.Join(j, ts);
@@ -350,7 +361,7 @@ namespace OpenRA
public static Dictionary<TKey, TElement> ToDictionaryWithConflictLog<TSource, TKey, TElement>(
this IEnumerable<TSource> source, Func<TSource, TKey> keySelector, Func<TSource, TElement> elementSelector,
string debugName, Func<TKey, string> logKey, Func<TElement, string> logValue)
string debugName, Func<TKey, string> logKey = null, Func<TElement, string> logValue = null)
{
// Fall back on ToString() if null functions are provided:
logKey = logKey ?? (s => s.ToString());
@@ -478,6 +489,11 @@ namespace OpenRA
return int.TryParse(s, NumberStyles.Integer, NumberFormatInfo.InvariantInfo, out i);
}
public static bool TryParseInt64Invariant(string s, out long i)
{
return long.TryParse(s, NumberStyles.Integer, NumberFormatInfo.InvariantInfo, out i);
}
public static bool IsTraitEnabled(this object trait)
{
return trait as IDisabledTrait == null || !(trait as IDisabledTrait).IsTraitDisabled;

View File

@@ -1,10 +1,11 @@
#region Copyright & License Information
/*
* Copyright 2007-2015 The OpenRA Developers (see AUTHORS)
* Copyright 2007-2016 The OpenRA Developers (see AUTHORS)
* This file is part of OpenRA, which is free software. It is made
* available to you under the terms of the GNU General Public License
* as published by the Free Software Foundation. For more information,
* see COPYING.
* as published by the Free Software Foundation, either version 3 of
* the License, or (at your option) any later version. For more
* information, see COPYING.
*/
#endregion
@@ -16,6 +17,7 @@ using System.Drawing.Imaging;
using System.Globalization;
using System.Linq;
using System.Reflection;
using System.Runtime.Serialization;
using System.Text.RegularExpressions;
using OpenRA.Graphics;
using OpenRA.Primitives;
@@ -24,6 +26,7 @@ namespace OpenRA
{
public static class FieldLoader
{
[Serializable]
public class MissingFieldsException : YamlException
{
public readonly string[] Missing;
@@ -42,6 +45,13 @@ namespace OpenRA
Header = missing.Length > 1 ? header : headerSingle ?? header;
Missing = missing;
}
public override void GetObjectData(SerializationInfo info, StreamingContext context)
{
base.GetObjectData(info, context);
info.AddValue("Missing", Missing);
info.AddValue("Header", Header);
}
}
public static Func<string, Type, string, object> InvalidValueAction = (s, t, f) =>
@@ -212,21 +222,9 @@ namespace OpenRA
}
else if (fieldType == typeof(Color))
{
if (value != null)
{
var parts = value.Split(',');
if (parts.Length == 3)
return Color.FromArgb(
Exts.ParseIntegerInvariant(parts[0]).Clamp(0, 255),
Exts.ParseIntegerInvariant(parts[1]).Clamp(0, 255),
Exts.ParseIntegerInvariant(parts[2]).Clamp(0, 255));
if (parts.Length == 4)
return Color.FromArgb(
Exts.ParseIntegerInvariant(parts[0]).Clamp(0, 255),
Exts.ParseIntegerInvariant(parts[1]).Clamp(0, 255),
Exts.ParseIntegerInvariant(parts[2]).Clamp(0, 255),
Exts.ParseIntegerInvariant(parts[3]).Clamp(0, 255));
}
Color color;
if (value != null && HSLColor.TryParseRGB(value, out color))
return color;
return InvalidValueAction(value, fieldType, fieldName);
}
@@ -235,20 +233,11 @@ namespace OpenRA
if (value != null)
{
var parts = value.Split(',');
if (parts.Length % 4 != 0)
return InvalidValueAction(value, fieldType, fieldName);
var colors = new Color[parts.Length / 4];
var colors = new Color[parts.Length];
for (var i = 0; i < colors.Length; i++)
{
colors[i] = Color.FromArgb(
Exts.ParseIntegerInvariant(parts[4 * i]).Clamp(0, 255),
Exts.ParseIntegerInvariant(parts[4 * i + 1]).Clamp(0, 255),
Exts.ParseIntegerInvariant(parts[4 * i + 2]).Clamp(0, 255),
Exts.ParseIntegerInvariant(parts[4 * i + 3]).Clamp(0, 255));
}
if (!HSLColor.TryParseRGB(parts[i], out colors[i]))
return InvalidValueAction(value, fieldType, fieldName);
return colors;
}
@@ -259,9 +248,12 @@ namespace OpenRA
{
if (value != null)
{
var parts = value.Split(',');
Color rgb;
if (HSLColor.TryParseRGB(value, out rgb))
return new HSLColor(rgb);
// Allow old ColorRamp format to be parsed as HSLColor
// Allow old HSLColor/ColorRamp formats to be parsed as HSLColor
var parts = value.Split(',');
if (parts.Length == 3 || parts.Length == 4)
return new HSLColor(
(byte)Exts.ParseIntegerInvariant(parts[0]).Clamp(0, 255),
@@ -382,6 +374,28 @@ namespace OpenRA
return InvalidValueAction(value, fieldType, fieldName);
}
else if (fieldType == typeof(CVec[]))
{
if (value != null)
{
var parts = value.Split(',');
if (parts.Length % 2 != 0)
return InvalidValueAction(value, fieldType, fieldName);
var vecs = new CVec[parts.Length / 2];
for (var i = 0; i < vecs.Length; i++)
{
int rx, ry;
if (int.TryParse(parts[2 * i], out rx) && int.TryParse(parts[2 * i + 1], out ry))
vecs[i] = new CVec(rx, ry);
}
return vecs;
}
return InvalidValueAction(value, fieldType, fieldName);
}
else if (fieldType.IsEnum)
{
try
@@ -494,6 +508,26 @@ namespace OpenRA
return InvalidValueAction(value, fieldType, fieldName);
}
else if (fieldType == typeof(float3))
{
if (value != null)
{
var parts = value.Split(new char[] { ',' }, StringSplitOptions.RemoveEmptyEntries);
float x = 0;
float y = 0;
float z = 0;
float.TryParse(parts[0], NumberStyles.Float, NumberFormatInfo.InvariantInfo, out x);
float.TryParse(parts[1], NumberStyles.Float, NumberFormatInfo.InvariantInfo, out y);
// z component is optional for compatibility with older float2 definitions
if (parts.Length > 2)
float.TryParse(parts[2], NumberStyles.Float, NumberFormatInfo.InvariantInfo, out z);
return new float3(x, y, z);
}
return InvalidValueAction(value, fieldType, fieldName);
}
else if (fieldType == typeof(Rectangle))
{
if (value != null)
@@ -722,7 +756,7 @@ namespace OpenRA
}
}
// mirrors DescriptionAttribute from System.ComponentModel but we dont want to have to use that everywhere.
// Mirrors DescriptionAttribute from System.ComponentModel but we don't want to have to use that everywhere.
[AttributeUsage(AttributeTargets.All)]
public sealed class DescAttribute : Attribute
{

View File

@@ -1,10 +1,11 @@
#region Copyright & License Information
/*
* Copyright 2007-2015 The OpenRA Developers (see AUTHORS)
* Copyright 2007-2016 The OpenRA Developers (see AUTHORS)
* This file is part of OpenRA, which is free software. It is made
* available to you under the terms of the GNU General Public License
* as published by the Free Software Foundation. For more information,
* see COPYING.
* as published by the Free Software Foundation, either version 3 of
* the License, or (at your option) any later version. For more
* information, see COPYING.
*/
#endregion
@@ -16,6 +17,7 @@ using System.Drawing.Imaging;
using System.Globalization;
using System.Linq;
using System.Reflection;
using OpenRA.Graphics;
namespace OpenRA
{
@@ -73,14 +75,16 @@ namespace OpenRA
var t = v.GetType();
// Color.ToString() does the wrong thing; force it to format as an array
// Color.ToString() does the wrong thing; force it to format as rgb[a] hex
if (t == typeof(Color))
{
var c = (Color)v;
return "{0},{1},{2},{3}".F(((int)c.A).Clamp(0, 255),
((int)c.R).Clamp(0, 255),
((int)c.G).Clamp(0, 255),
((int)c.B).Clamp(0, 255));
return HSLColor.ToHexString((Color)v);
}
// HSLColor.ToString() does the wrong thing; force it to format as rgb[a] hex
if (t == typeof(HSLColor))
{
return ((HSLColor)v).ToHexString();
}
if (t == typeof(ImageFormat))
@@ -123,7 +127,7 @@ namespace OpenRA
return result;
}
if (t.IsGenericType && t.GetGenericTypeDefinition() == typeof(OpenRA.Primitives.Cache<,>))
if (t.IsGenericType && t.GetGenericTypeDefinition() == typeof(Primitives.Cache<,>))
return ""; // TODO
if (t == typeof(DateTime))

View File

@@ -1,10 +1,11 @@
#region Copyright & License Information
/*
* Copyright 2007-2015 The OpenRA Developers (see AUTHORS)
* Copyright 2007-2016 The OpenRA Developers (see AUTHORS)
* This file is part of OpenRA, which is free software. It is made
* available to you under the terms of the GNU General Public License
* as published by the Free Software Foundation. For more information,
* see COPYING.
* as published by the Free Software Foundation, either version 3 of
* the License, or (at your option) any later version. For more
* information, see COPYING.
*
* This file is based on the blast routines (version 1.1 by Mark Adler)
* included in zlib/contrib
@@ -56,16 +57,19 @@ namespace OpenRA.FileFormats
static Huffman lencode = new Huffman(lenlen, lenlen.Length, 16);
static Huffman distcode = new Huffman(distlen, distlen.Length, 64);
// Decode PKWare Compression Library stream.
public static byte[] Decompress(byte[] src)
/// <summary>PKWare Compression Library stream.</summary>
/// <param name="input">Compressed input stream.</param>
/// <param name="output">Stream to write the decompressed output.</param>
/// <param name="onProgress">Progress callback, invoked with (read bytes, written bytes).</param>
public static void Decompress(Stream input, Stream output, Action<long, long> onProgress = null)
{
var br = new BitReader(src);
var br = new BitReader(input);
// Are literals coded?
var coded = br.ReadBits(8);
if (coded < 0 || coded > 1)
throw new NotImplementedException("Invalid datastream");
throw new NotImplementedException("Invalid data stream");
var encodedLiterals = coded == 1;
// log2(dictionary size) - 6
@@ -77,7 +81,9 @@ namespace OpenRA.FileFormats
ushort next = 0; // index of next write location in out[]
var first = true; // true to check distances (for first 4K)
var outBuffer = new byte[MAXWIN]; // output buffer and sliding window
var ms = new MemoryStream();
var inputStart = input.Position;
var outputStart = output.Position;
// decode literals and length/distance pairs
do
@@ -93,7 +99,10 @@ namespace OpenRA.FileFormats
if (len == 519)
{
for (var i = 0; i < next; i++)
ms.WriteByte(outBuffer[i]);
output.WriteByte(outBuffer[i]);
if (onProgress != null)
onProgress(input.Position - inputStart, output.Position - outputStart);
break;
}
@@ -136,9 +145,12 @@ namespace OpenRA.FileFormats
if (next == MAXWIN)
{
for (var i = 0; i < next; i++)
ms.WriteByte(outBuffer[i]);
output.WriteByte(outBuffer[i]);
next = 0;
first = false;
if (onProgress != null)
onProgress(input.Position - inputStart, output.Position - outputStart);
}
} while (len != 0);
}
@@ -150,17 +162,18 @@ namespace OpenRA.FileFormats
if (next == MAXWIN)
{
for (var i = 0; i < next; i++)
ms.WriteByte(outBuffer[i]);
output.WriteByte(outBuffer[i]);
next = 0;
first = false;
if (onProgress != null)
onProgress(input.Position - inputStart, output.Position - outputStart);
}
}
} while (true);
return ms.ToArray();
}
// Decode a code using huffman table h.
// Decode a code using Huffman table h.
static int Decode(Huffman h, BitReader br)
{
var code = 0; // len bits being decoded
@@ -184,14 +197,13 @@ namespace OpenRA.FileFormats
class BitReader
{
readonly byte[] src;
int offset = 0;
int bitBuffer = 0;
readonly Stream stream;
byte bitBuffer = 0;
int bitCount = 0;
public BitReader(byte[] src)
public BitReader(Stream stream)
{
this.src = src;
this.stream = stream;
}
public int ReadBits(int count)
@@ -202,7 +214,7 @@ namespace OpenRA.FileFormats
{
if (bitCount == 0)
{
bitBuffer = src[offset++];
bitBuffer = stream.ReadUInt8();
bitCount = 8;
}

View File

@@ -1,10 +1,11 @@
#region Copyright & License Information
/*
* Copyright 2007-2015 The OpenRA Developers (see AUTHORS)
* Copyright 2007-2016 The OpenRA Developers (see AUTHORS)
* This file is part of OpenRA, which is free software. It is made
* available to you under the terms of the GNU General Public License
* as published by the Free Software Foundation. For more information,
* see COPYING.
* as published by the Free Software Foundation, either version 3 of
* the License, or (at your option) any later version. For more
* information, see COPYING.
*/
#endregion

View File

@@ -1,10 +1,11 @@
#region Copyright & License Information
/*
* Copyright 2007-2015 The OpenRA Developers (see AUTHORS)
* Copyright 2007-2016 The OpenRA Developers (see AUTHORS)
* This file is part of OpenRA, which is free software. It is made
* available to you under the terms of the GNU General Public License
* as published by the Free Software Foundation. For more information,
* see COPYING.
* as published by the Free Software Foundation, either version 3 of
* the License, or (at your option) any later version. For more
* information, see COPYING.
*/
#endregion
@@ -55,7 +56,7 @@ namespace OpenRA.FileFormats
{
var pn = (byte*)tempPn;
var i = blen * 4;
for (; i > klen; i--) pn[i - 1] = (byte)sign;
for (; i > klen; i--) pn[i - 1] = sign;
for (; i > 0; i--) pn[i - 1] = key[klen - i];
}
}

View File

@@ -1,10 +1,11 @@
#region Copyright & License Information
/*
* Copyright 2007-2015 The OpenRA Developers (see AUTHORS)
* Copyright 2007-2016 The OpenRA Developers (see AUTHORS)
* This file is part of OpenRA, which is free software. It is made
* available to you under the terms of the GNU General Public License
* as published by the Free Software Foundation. For more information,
* see COPYING.
* as published by the Free Software Foundation, either version 3 of
* the License, or (at your option) any later version. For more
* information, see COPYING.
*/
#endregion
@@ -111,11 +112,11 @@ namespace OpenRA.FileFormats
/// <summary>
/// A fast (native) CRC32 implementation that can be used on a pinned byte array using
/// default polynomal.
/// default polynomial.
/// </summary>
/// <param name="data"> [in,out] If non-null, the.</param>
/// <param name="len"> The length of the data data.</param>
/// <param name="polynomial">The polynomal to xor with.</param>
/// <param name="len"> The length of the data.</param>
/// <param name="polynomial">The polynomial to XOR with.</param>
/// <returns>The calculated checksum.</returns>
public static unsafe uint Calculate(byte* data, uint len, uint polynomial)
{

View File

@@ -1,17 +1,17 @@
#region Copyright & License Information
/*
* Copyright 2007-2015 The OpenRA Developers (see AUTHORS)
* Copyright 2007-2016 The OpenRA Developers (see AUTHORS)
* This file is part of OpenRA, which is free software. It is made
* available to you under the terms of the GNU General Public License
* as published by the Free Software Foundation. For more information,
* see COPYING.
* as published by the Free Software Foundation, either version 3 of
* the License, or (at your option) any later version. For more
* information, see COPYING.
*/
#endregion
using System;
using System.IO;
using System.Linq;
using OpenRA.Graphics;
namespace OpenRA.FileFormats

View File

@@ -1,10 +1,11 @@
#region Copyright & License Information
/*
* Copyright 2007-2015 The OpenRA Developers (see AUTHORS)
* Copyright 2007-2016 The OpenRA Developers (see AUTHORS)
* This file is part of OpenRA, which is free software. It is made
* available to you under the terms of the GNU General Public License
* as published by the Free Software Foundation. For more information,
* see COPYING.
* as published by the Free Software Foundation, either version 3 of
* the License, or (at your option) any later version. For more
* information, see COPYING.
*/
#endregion

View File

@@ -1,10 +1,11 @@
#region Copyright & License Information
/*
* Copyright 2007-2015 The OpenRA Developers (see AUTHORS)
* Copyright 2007-2016 The OpenRA Developers (see AUTHORS)
* This file is part of OpenRA, which is free software. It is made
* available to you under the terms of the GNU General Public License
* as published by the Free Software Foundation. For more information,
* see COPYING.
* as published by the Free Software Foundation, either version 3 of
* the License, or (at your option) any later version. For more
* information, see COPYING.
*/
#endregion
@@ -41,114 +42,126 @@ namespace OpenRA.FileFormats
Color[] palette = null;
var data = new List<byte>();
for (;;)
try
{
var length = IPAddress.NetworkToHostOrder(br.ReadInt32());
var type = Encoding.UTF8.GetString(br.ReadBytes(4));
var content = br.ReadBytes(length);
/*var crc = */br.ReadInt32();
for (;;)
{
var length = IPAddress.NetworkToHostOrder(br.ReadInt32());
var type = Encoding.UTF8.GetString(br.ReadBytes(4));
var content = br.ReadBytes(length);
/*var crc = */br.ReadInt32();
using (var ms = new MemoryStream(content))
using (var cr = new BinaryReader(ms))
switch (type)
{
case "IHDR":
{
var width = IPAddress.NetworkToHostOrder(cr.ReadInt32());
var height = IPAddress.NetworkToHostOrder(cr.ReadInt32());
var bitDepth = cr.ReadByte();
var colorType = (PngColorType)cr.ReadByte();
var compression = cr.ReadByte();
/*var filter = */cr.ReadByte();
var interlace = cr.ReadByte();
if (bitmap == null && type != "IHDR")
throw new InvalidDataException("Invalid PNG file - header does not appear first.");
if (compression != 0) throw new InvalidDataException("Compression method not supported");
if (interlace != 0) throw new InvalidDataException("Interlacing not supported");
bitmap = new Bitmap(width, height, MakePixelFormat(bitDepth, colorType));
}
break;
case "PLTE":
{
palette = new Color[256];
for (var i = 0; i < 256; i++)
using (var ms = new MemoryStream(content))
using (var cr = new BinaryReader(ms))
switch (type)
{
case "IHDR":
{
var r = cr.ReadByte(); var g = cr.ReadByte(); var b = cr.ReadByte();
palette[i] = Color.FromArgb(r, g, b);
if (bitmap != null)
throw new InvalidDataException("Invalid PNG file - duplicate header.");
var width = IPAddress.NetworkToHostOrder(cr.ReadInt32());
var height = IPAddress.NetworkToHostOrder(cr.ReadInt32());
var bitDepth = cr.ReadByte();
var colorType = (PngColorType)cr.ReadByte();
var compression = cr.ReadByte();
/*var filter = */cr.ReadByte();
var interlace = cr.ReadByte();
if (compression != 0) throw new InvalidDataException("Compression method not supported");
if (interlace != 0) throw new InvalidDataException("Interlacing not supported");
bitmap = new Bitmap(width, height, MakePixelFormat(bitDepth, colorType));
}
}
break;
break;
case "tRNS":
{
if (palette == null)
throw new InvalidDataException("Non-Palette indexed PNG are not supported.");
for (var i = 0; i < length; i++)
palette[i] = Color.FromArgb(cr.ReadByte(), palette[i]);
}
break;
case "IDAT":
{
data.AddRange(content);
}
break;
case "IEND":
{
if (bitmap == null)
throw new InvalidDataException("Image header not found.");
var bits = bitmap.LockBits(bitmap.Bounds(),
ImageLockMode.WriteOnly, PixelFormat.Format8bppIndexed);
using (var ns = new MemoryStream(data.ToArray()))
case "PLTE":
{
// 'zlib' flags bytes; confuses the DeflateStream.
/*var flags = (byte)*/ns.ReadByte();
/*var moreFlags = (byte)*/ns.ReadByte();
using (var ds = new DeflateStream(ns, CompressionMode.Decompress))
using (var dr = new BinaryReader(ds))
palette = new Color[256];
for (var i = 0; i < 256; i++)
{
var prevLine = new byte[bitmap.Width]; // all zero
for (var y = 0; y < bitmap.Height; y++)
{
var filter = (PngFilter)dr.ReadByte();
var line = dr.ReadBytes(bitmap.Width);
for (var i = 0; i < bitmap.Width; i++)
line[i] = i > 0
? UnapplyFilter(filter, line[i], line[i - 1], prevLine[i], prevLine[i - 1])
: UnapplyFilter(filter, line[i], 0, prevLine[i], 0);
Marshal.Copy(line, 0, new IntPtr(bits.Scan0.ToInt64() + y * bits.Stride), line.Length);
prevLine = line;
}
var r = cr.ReadByte(); var g = cr.ReadByte(); var b = cr.ReadByte();
palette[i] = Color.FromArgb(r, g, b);
}
}
bitmap.UnlockBits(bits);
break;
if (palette == null)
throw new InvalidDataException("Non-Palette indexed PNG are not supported.");
using (var temp = new Bitmap(1, 1, PixelFormat.Format8bppIndexed))
case "tRNS":
{
var cp = temp.Palette;
for (var i = 0; i < 256; i++)
cp.Entries[i] = palette[i]; // finalize the palette.
bitmap.Palette = cp;
return bitmap;
if (palette == null)
throw new InvalidDataException("Non-Palette indexed PNG are not supported.");
for (var i = 0; i < length; i++)
palette[i] = Color.FromArgb(cr.ReadByte(), palette[i]);
}
}
}
break;
case "IDAT":
{
data.AddRange(content);
}
break;
case "IEND":
{
var bits = bitmap.LockBits(bitmap.Bounds(),
ImageLockMode.WriteOnly, PixelFormat.Format8bppIndexed);
using (var ns = new MemoryStream(data.ToArray()))
{
// 'zlib' flags bytes; confuses the DeflateStream.
/*var flags = (byte)*/ns.ReadByte();
/*var moreFlags = (byte)*/ns.ReadByte();
using (var ds = new DeflateStream(ns, CompressionMode.Decompress))
using (var dr = new BinaryReader(ds))
{
var prevLine = new byte[bitmap.Width]; // all zero
for (var y = 0; y < bitmap.Height; y++)
{
var filter = (PngFilter)dr.ReadByte();
var line = dr.ReadBytes(bitmap.Width);
for (var i = 0; i < bitmap.Width; i++)
line[i] = i > 0
? UnapplyFilter(filter, line[i], line[i - 1], prevLine[i], prevLine[i - 1])
: UnapplyFilter(filter, line[i], 0, prevLine[i], 0);
Marshal.Copy(line, 0, new IntPtr(bits.Scan0.ToInt64() + y * bits.Stride), line.Length);
prevLine = line;
}
}
}
bitmap.UnlockBits(bits);
if (palette == null)
throw new InvalidDataException("Non-Palette indexed PNG are not supported.");
using (var temp = new Bitmap(1, 1, PixelFormat.Format8bppIndexed))
{
var cp = temp.Palette;
for (var i = 0; i < 256; i++)
cp.Entries[i] = palette[i]; // finalize the palette.
bitmap.Palette = cp;
return bitmap;
}
}
}
}
}
catch
{
if (bitmap != null)
bitmap.Dispose();
throw;
}
}
}
@@ -187,7 +200,7 @@ namespace OpenRA.FileFormats
if (bitDepth == 8 && colorType == (PngColorType.Indexed | PngColorType.Color))
return PixelFormat.Format8bppIndexed;
throw new InvalidDataException("Unknown pixelformat");
throw new InvalidDataException("Unknown pixel format");
}
}
}

View File

@@ -1,10 +1,11 @@
#region Copyright & License Information
/*
* Copyright 2007-2015 The OpenRA Developers (see AUTHORS)
* Copyright 2007-2016 The OpenRA Developers (see AUTHORS)
* This file is part of OpenRA, which is free software. It is made
* available to you under the terms of the GNU General Public License
* as published by the Free Software Foundation. For more information,
* see COPYING.
* as published by the Free Software Foundation, either version 3 of
* the License, or (at your option) any later version. For more
* information, see COPYING.
*/
#endregion

View File

@@ -1,10 +1,11 @@
#region Copyright & License Information
/*
* Copyright 2007-2015 The OpenRA Developers (see AUTHORS)
* Copyright 2007-2016 The OpenRA Developers (see AUTHORS)
* This file is part of OpenRA, which is free software. It is made
* available to you under the terms of the GNU General Public License
* as published by the Free Software Foundation. For more information,
* see COPYING.
* as published by the Free Software Foundation, either version 3 of
* the License, or (at your option) any later version. For more
* information, see COPYING.
*/
#endregion

View File

@@ -1,44 +1,54 @@
#region Copyright & License Information
/*
* Copyright 2007-2015 The OpenRA Developers (see AUTHORS)
* Copyright 2007-2016 The OpenRA Developers (see AUTHORS)
* This file is part of OpenRA, which is free software. It is made
* available to you under the terms of the GNU General Public License
* as published by the Free Software Foundation. For more information,
* see COPYING.
* as published by the Free Software Foundation, either version 3 of
* the License, or (at your option) any later version. For more
* information, see COPYING.
*/
#endregion
using System;
using System.Collections.Generic;
using System.IO;
namespace OpenRA.FileFormats
{
public class XccGlobalDatabase
public class XccGlobalDatabase : IDisposable
{
public readonly string[] Entries;
public XccGlobalDatabase(Stream s)
readonly Stream s;
public XccGlobalDatabase(Stream stream)
{
s = stream;
var entries = new List<string>();
var reader = new BinaryReader(s);
while (reader.PeekChar() > -1)
while (s.Peek() > -1)
{
var count = reader.ReadInt32();
var count = s.ReadInt32();
for (var i = 0; i < count; i++)
{
var chars = new List<char>();
char c;
byte c;
// Read filename
while ((c = reader.ReadChar()) != 0)
chars.Add(c);
while ((c = s.ReadUInt8()) != 0)
chars.Add((char)c);
entries.Add(new string(chars.ToArray()));
// Skip comment
while ((c = reader.ReadChar()) != 0) { }
while ((c = s.ReadUInt8()) != 0) { }
}
}
Entries = entries.ToArray();
}
public void Dispose()
{
s.Dispose();
}
}
}

View File

@@ -1,10 +1,11 @@
#region Copyright & License Information
/*
* Copyright 2007-2015 The OpenRA Developers (see AUTHORS)
* Copyright 2007-2016 The OpenRA Developers (see AUTHORS)
* This file is part of OpenRA, which is free software. It is made
* available to you under the terms of the GNU General Public License
* as published by the Free Software Foundation. For more information,
* see COPYING.
* as published by the Free Software Foundation, either version 3 of
* the License, or (at your option) any later version. For more
* information, see COPYING.
*/
#endregion
@@ -49,11 +50,11 @@ namespace OpenRA.FileFormats
writer.Write(Encoding.ASCII.GetBytes("XCC by Olaf van der Spek"));
writer.Write(new byte[] { 0x1A, 0x04, 0x17, 0x27, 0x10, 0x19, 0x80, 0x00 });
writer.Write((int)(Entries.Aggregate(Entries.Length, (a, b) => a + b.Length) + 52)); // Size
writer.Write((int)0); // Type
writer.Write((int)0); // Version
writer.Write((int)0); // Game/Format (0 == TD)
writer.Write((int)Entries.Length); // Entries
writer.Write(Entries.Aggregate(Entries.Length, (a, b) => a + b.Length) + 52); // Size
writer.Write(0); // Type
writer.Write(0); // Version
writer.Write(0); // Game/Format (0 == TD)
writer.Write(Entries.Length); // Entries
foreach (var e in Entries)
{
writer.Write(Encoding.ASCII.GetBytes(e));

View File

@@ -1,10 +1,11 @@
#region Copyright & License Information
/*
* Copyright 2007-2015 The OpenRA Developers (see AUTHORS)
* Copyright 2007-2016 The OpenRA Developers (see AUTHORS)
* This file is part of OpenRA, which is free software. It is made
* available to you under the terms of the GNU General Public License
* as published by the Free Software Foundation. For more information,
* see COPYING.
* as published by the Free Software Foundation, either version 3 of
* the License, or (at your option) any later version. For more
* information, see COPYING.
*/
#endregion
@@ -19,19 +20,17 @@ using OpenRA.Primitives;
namespace OpenRA.FileSystem
{
public sealed class BagFile : IFolder
public sealed class BagFile : IReadOnlyPackage
{
static readonly uint[] Nothing = { };
public string Name { get; private set; }
public IEnumerable<string> Contents { get { return index.Keys; } }
readonly string bagFilename;
readonly Stream s;
readonly int bagFilePriority;
readonly Dictionary<uint, IdxEntry> index;
readonly Dictionary<string, IdxEntry> index;
public BagFile(string filename, int priority)
public BagFile(FileSystem context, string filename)
{
bagFilename = filename;
bagFilePriority = priority;
Name = filename;
// A bag file is always accompanied with an .idx counterpart
// For example: audio.bag requires the audio.idx file
@@ -39,23 +38,20 @@ namespace OpenRA.FileSystem
// Build the index and dispose the stream, it is no longer needed after this
List<IdxEntry> entries;
using (var indexStream = GlobalFileSystem.Open(indexFilename))
using (var indexStream = context.Open(indexFilename))
entries = new IdxReader(indexStream).Entries;
index = entries.ToDictionaryWithConflictLog(x => x.Hash,
index = entries.ToDictionaryWithConflictLog(x => x.Filename,
"{0} (bag format)".F(filename),
null, x => "(offs={0}, len={1})".F(x.Offset, x.Length));
s = GlobalFileSystem.Open(filename);
s = context.Open(filename);
}
public int Priority { get { return 1000 + bagFilePriority; } }
public string Name { get { return bagFilename; } }
public Stream GetContent(uint hash)
public Stream GetStream(string filename)
{
IdxEntry entry;
if (!index.TryGetValue(hash, out entry))
if (!index.TryGetValue(filename, out entry))
return null;
s.Seek(entry.Offset, SeekOrigin.Begin);
@@ -72,7 +68,7 @@ namespace OpenRA.FileSystem
waveHeaderMemoryStream.Write(Encoding.ASCII.GetBytes("WAVE"));
waveHeaderMemoryStream.Write(Encoding.ASCII.GetBytes("fmt "));
waveHeaderMemoryStream.Write(BitConverter.GetBytes(16));
waveHeaderMemoryStream.Write(BitConverter.GetBytes((short)WavLoader.WaveType.Pcm));
waveHeaderMemoryStream.Write(BitConverter.GetBytes((short)1));
waveHeaderMemoryStream.Write(BitConverter.GetBytes((short)channels));
waveHeaderMemoryStream.Write(BitConverter.GetBytes(entry.SampleRate));
waveHeaderMemoryStream.Write(BitConverter.GetBytes(2 * channels * entry.SampleRate));
@@ -94,7 +90,7 @@ namespace OpenRA.FileSystem
waveHeaderMemoryStream.Write(Encoding.ASCII.GetBytes("WAVE"));
waveHeaderMemoryStream.Write(Encoding.ASCII.GetBytes("fmt "));
waveHeaderMemoryStream.Write(BitConverter.GetBytes(20));
waveHeaderMemoryStream.Write(BitConverter.GetBytes((short)WavLoader.WaveType.ImaAdpcm));
waveHeaderMemoryStream.Write(BitConverter.GetBytes((short)17));
waveHeaderMemoryStream.Write(BitConverter.GetBytes((short)channels));
waveHeaderMemoryStream.Write(BitConverter.GetBytes(entry.SampleRate));
waveHeaderMemoryStream.Write(BitConverter.GetBytes(bytesPerSec));
@@ -118,65 +114,9 @@ namespace OpenRA.FileSystem
return mergedStream;
}
uint? FindMatchingHash(string filename)
public bool Contains(string filename)
{
var hash = IdxEntry.HashFilename(filename, PackageHashType.CRC32);
if (index.ContainsKey(hash))
return hash;
// Maybe we were given a raw hash?
uint raw;
if (!uint.TryParse(filename, NumberStyles.AllowHexSpecifier, CultureInfo.InvariantCulture, out raw))
return null;
if ("{0:X}".F(raw) == filename && index.ContainsKey(raw))
return raw;
return null;
}
public Stream GetContent(string filename)
{
var hash = FindMatchingHash(filename);
return hash.HasValue ? GetContent(hash.Value) : null;
}
public bool Exists(string filename)
{
return FindMatchingHash(filename).HasValue;
}
public IEnumerable<uint> ClassicHashes()
{
return Nothing;
}
public IEnumerable<uint> CrcHashes()
{
return index.Keys;
}
public IEnumerable<string> AllFileNames()
{
var lookup = new Dictionary<uint, string>();
if (GlobalFileSystem.Exists("global mix database.dat"))
{
var db = new XccGlobalDatabase(GlobalFileSystem.Open("global mix database.dat"));
foreach (var e in db.Entries)
{
var hash = IdxEntry.HashFilename(e, PackageHashType.CRC32);
if (!lookup.ContainsKey(hash))
lookup.Add(hash, e);
}
}
return index.Keys.Select(k => lookup.ContainsKey(k) ? lookup[k] : "{0:X}".F(k));
}
public void Write(Dictionary<string, byte[]> contents)
{
GlobalFileSystem.Unmount(this);
throw new NotImplementedException("Updating bag files unsupported");
return index.ContainsKey(filename);
}
public void Dispose()

View File

@@ -1,10 +1,11 @@
#region Copyright & License Information
/*
* Copyright 2007-2015 The OpenRA Developers (see AUTHORS)
* Copyright 2007-2016 The OpenRA Developers (see AUTHORS)
* This file is part of OpenRA, which is free software. It is made
* available to you under the terms of the GNU General Public License
* as published by the Free Software Foundation. For more information,
* see COPYING.
* as published by the Free Software Foundation, either version 3 of
* the License, or (at your option) any later version. For more
* information, see COPYING.
*/
#endregion
@@ -15,19 +16,19 @@ using System.Linq;
namespace OpenRA.FileSystem
{
public sealed class BigFile : IFolder
public sealed class BigFile : IReadOnlyPackage
{
public string Name { get; private set; }
public int Priority { get; private set; }
readonly Dictionary<string, Entry> entries = new Dictionary<string, Entry>();
public IEnumerable<string> Contents { get { return index.Keys; } }
readonly Dictionary<string, Entry> index = new Dictionary<string, Entry>();
readonly Stream s;
public BigFile(string filename, int priority)
public BigFile(FileSystem context, string filename)
{
Name = filename;
Priority = priority;
s = GlobalFileSystem.Open(filename);
s = context.Open(filename);
try
{
if (s.ReadASCII(4) != "BIGF")
@@ -47,7 +48,7 @@ namespace OpenRA.FileSystem
for (var i = 0; i < entryCount; i++)
{
var entry = new Entry(s);
entries.Add(entry.Path, entry);
index.Add(entry.Path, entry);
}
}
catch
@@ -86,34 +87,14 @@ namespace OpenRA.FileSystem
}
}
public Stream GetContent(string filename)
public Stream GetStream(string filename)
{
return entries[filename].GetData();
return index[filename].GetData();
}
public bool Exists(string filename)
public bool Contains(string filename)
{
return entries.ContainsKey(filename);
}
public IEnumerable<uint> ClassicHashes()
{
return entries.Keys.Select(filename => PackageEntry.HashFilename(filename, PackageHashType.Classic));
}
public IEnumerable<uint> CrcHashes()
{
return Enumerable.Empty<uint>();
}
public IEnumerable<string> AllFileNames()
{
return entries.Keys;
}
public void Write(Dictionary<string, byte[]> contents)
{
throw new NotImplementedException();
return index.ContainsKey(filename);
}
public void Dispose()

View File

@@ -1,51 +1,54 @@
#region Copyright & License Information
/*
* Copyright 2007-2015 The OpenRA Developers (see AUTHORS)
* Copyright 2007-2016 The OpenRA Developers (see AUTHORS)
* This file is part of OpenRA, which is free software. It is made
* available to you under the terms of the GNU General Public License
* as published by the Free Software Foundation. For more information,
* see COPYING.
* as published by the Free Software Foundation, either version 3 of
* the License, or (at your option) any later version. For more
* information, see COPYING.
*/
#endregion
using System;
using System.Collections.Generic;
using System.IO;
using OpenRA.Primitives;
namespace OpenRA.FileSystem
{
public sealed class D2kSoundResources : IFolder
public sealed class D2kSoundResources : IReadOnlyPackage
{
readonly Stream s;
readonly string filename;
readonly List<string> filenames;
readonly int priority;
readonly Dictionary<uint, PackageEntry> index = new Dictionary<uint, PackageEntry>();
public D2kSoundResources(string filename, int priority)
struct Entry
{
this.filename = filename;
this.priority = priority;
public readonly uint Offset;
public readonly uint Length;
s = GlobalFileSystem.Open(filename);
public Entry(uint offset, uint length)
{
Offset = offset;
Length = length;
}
}
public string Name { get; private set; }
public IEnumerable<string> Contents { get { return index.Keys; } }
readonly Stream s;
readonly Dictionary<string, Entry> index = new Dictionary<string, Entry>();
public D2kSoundResources(FileSystem context, string filename)
{
Name = filename;
s = context.Open(filename);
try
{
filenames = new List<string>();
var headerLength = s.ReadUInt32();
while (s.Position < headerLength + 4)
{
var name = s.ReadASCIIZ();
var offset = s.ReadUInt32();
var length = s.ReadUInt32();
var hash = PackageEntry.HashFilename(name, PackageHashType.Classic);
if (!index.ContainsKey(hash))
index.Add(hash, new PackageEntry(hash, offset, length));
filenames.Add(name);
index.Add(name, new Entry(offset, length));
}
}
catch
@@ -55,48 +58,19 @@ namespace OpenRA.FileSystem
}
}
public Stream GetContent(uint hash)
public Stream GetStream(string filename)
{
PackageEntry e;
if (!index.TryGetValue(hash, out e))
Entry e;
if (!index.TryGetValue(filename, out e))
return null;
s.Seek(e.Offset, SeekOrigin.Begin);
return new MemoryStream(s.ReadBytes((int)e.Length));
}
public Stream GetContent(string filename)
public bool Contains(string filename)
{
return GetContent(PackageEntry.HashFilename(filename, PackageHashType.Classic));
}
public bool Exists(string filename)
{
return index.ContainsKey(PackageEntry.HashFilename(filename, PackageHashType.Classic));
}
public IEnumerable<string> AllFileNames()
{
return filenames;
}
public string Name { get { return filename; } }
public int Priority { get { return 1000 + priority; } }
public IEnumerable<uint> ClassicHashes()
{
return index.Keys;
}
public IEnumerable<uint> CrcHashes()
{
yield break;
}
public void Write(Dictionary<string, byte[]> contents)
{
throw new NotImplementedException("Cannot save Dune 2000 Sound Resources.");
return index.ContainsKey(filename);
}
public void Dispose()

View File

@@ -0,0 +1,293 @@
#region Copyright & License Information
/*
* Copyright 2007-2016 The OpenRA Developers (see AUTHORS)
* This file is part of OpenRA, which is free software. It is made
* available to you under the terms of the GNU General Public License
* as published by the Free Software Foundation, either version 3 of
* the License, or (at your option) any later version. For more
* information, see COPYING.
*/
#endregion
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using OpenRA.Primitives;
namespace OpenRA.FileSystem
{
public interface IReadOnlyFileSystem
{
Stream Open(string filename);
bool TryGetPackageContaining(string path, out IReadOnlyPackage package, out string filename);
bool TryOpen(string filename, out Stream s);
bool Exists(string filename);
}
public class FileSystem : IReadOnlyFileSystem
{
public IEnumerable<IReadOnlyPackage> MountedPackages { get { return mountedPackages.Keys; } }
readonly Dictionary<IReadOnlyPackage, int> mountedPackages = new Dictionary<IReadOnlyPackage, int>();
readonly Dictionary<string, IReadOnlyPackage> explicitMounts = new Dictionary<string, IReadOnlyPackage>();
// Mod packages that should not be disposed
readonly List<IReadOnlyPackage> modPackages = new List<IReadOnlyPackage>();
readonly IReadOnlyDictionary<string, Manifest> installedMods;
Cache<string, List<IReadOnlyPackage>> fileIndex = new Cache<string, List<IReadOnlyPackage>>(_ => new List<IReadOnlyPackage>());
public FileSystem(IReadOnlyDictionary<string, Manifest> installedMods)
{
this.installedMods = installedMods;
}
public IReadOnlyPackage OpenPackage(string filename)
{
if (filename.EndsWith(".mix", StringComparison.InvariantCultureIgnoreCase))
return new MixFile(this, filename);
if (filename.EndsWith(".zip", StringComparison.InvariantCultureIgnoreCase))
return new ZipFile(this, filename);
if (filename.EndsWith(".oramap", StringComparison.InvariantCultureIgnoreCase))
return new ZipFile(this, filename);
if (filename.EndsWith(".oramod", StringComparison.InvariantCultureIgnoreCase))
return new ZipFile(this, filename);
if (filename.EndsWith(".RS", StringComparison.InvariantCultureIgnoreCase))
return new D2kSoundResources(this, filename);
if (filename.EndsWith(".Z", StringComparison.InvariantCultureIgnoreCase))
return new InstallShieldPackage(this, filename);
if (filename.EndsWith(".PAK", StringComparison.InvariantCultureIgnoreCase))
return new PakFile(this, filename);
if (filename.EndsWith(".big", StringComparison.InvariantCultureIgnoreCase))
return new BigFile(this, filename);
if (filename.EndsWith(".bag", StringComparison.InvariantCultureIgnoreCase))
return new BagFile(this, filename);
IReadOnlyPackage parent;
string subPath = null;
if (TryGetPackageContaining(filename, out parent, out subPath))
return OpenPackage(subPath, parent);
return new Folder(Platform.ResolvePath(filename));
}
public IReadOnlyPackage OpenPackage(string filename, IReadOnlyPackage parent)
{
// HACK: limit support to zip and folder until we generalize the PackageLoader support
if (filename.EndsWith(".zip", StringComparison.InvariantCultureIgnoreCase) ||
filename.EndsWith(".oramap", StringComparison.InvariantCultureIgnoreCase))
{
using (var s = parent.GetStream(filename))
return new ZipFile(s, filename, parent);
}
if (parent is ZipFile)
return new ZipFolder(this, (ZipFile)parent, filename, filename);
if (parent is ZipFolder)
{
var folder = (ZipFolder)parent;
return new ZipFolder(this, folder.Parent, folder.Name + "/" + filename, filename);
}
if (parent is Folder)
{
var subFolder = Platform.ResolvePath(Path.Combine(parent.Name, filename));
if (Directory.Exists(subFolder))
return new Folder(subFolder);
}
return null;
}
public void Mount(string name, string explicitName = null)
{
var optional = name.StartsWith("~");
if (optional)
name = name.Substring(1);
try
{
IReadOnlyPackage package;
if (name.StartsWith("$"))
{
name = name.Substring(1);
Manifest mod;
if (!installedMods.TryGetValue(name, out mod))
throw new InvalidOperationException("Could not load mod '{0}'. Available mods: {1}".F(name, installedMods.Keys.JoinWith(", ")));
package = mod.Package;
modPackages.Add(package);
}
else
package = OpenPackage(name);
Mount(package, explicitName);
}
catch
{
if (!optional)
throw;
}
}
public void Mount(IReadOnlyPackage package, string explicitName = null)
{
var mountCount = 0;
if (mountedPackages.TryGetValue(package, out mountCount))
{
// Package is already mounted
// Increment the mount count and bump up the file loading priority
mountedPackages[package] = mountCount + 1;
foreach (var filename in package.Contents)
{
fileIndex[filename].Remove(package);
fileIndex[filename].Add(package);
}
}
else
{
// Mounting the package for the first time
mountedPackages.Add(package, 1);
if (explicitName != null)
explicitMounts.Add(explicitName, package);
foreach (var filename in package.Contents)
fileIndex[filename].Add(package);
}
}
public bool Unmount(IReadOnlyPackage package)
{
var mountCount = 0;
if (!mountedPackages.TryGetValue(package, out mountCount))
return false;
if (--mountCount <= 0)
{
foreach (var packagesForFile in fileIndex.Values)
packagesForFile.RemoveAll(p => p == package);
mountedPackages.Remove(package);
var explicitKeys = explicitMounts.Where(kv => kv.Value == package)
.Select(kv => kv.Key)
.ToList();
foreach (var key in explicitKeys)
explicitMounts.Remove(key);
// Mod packages aren't owned by us, so we shouldn't dispose them
if (modPackages.Contains(package))
modPackages.Remove(package);
else
package.Dispose();
}
else
mountedPackages[package] = mountCount;
return true;
}
public void UnmountAll()
{
foreach (var package in mountedPackages.Keys)
if (!modPackages.Contains(package))
package.Dispose();
mountedPackages.Clear();
explicitMounts.Clear();
modPackages.Clear();
fileIndex = new Cache<string, List<IReadOnlyPackage>>(_ => new List<IReadOnlyPackage>());
}
public void LoadFromManifest(Manifest manifest)
{
UnmountAll();
foreach (var kv in manifest.Packages)
Mount(kv.Key, kv.Value);
}
Stream GetFromCache(string filename)
{
var package = fileIndex[filename]
.LastOrDefault(x => x.Contains(filename));
if (package != null)
return package.GetStream(filename);
return null;
}
public Stream Open(string filename)
{
Stream s;
if (!TryOpen(filename, out s))
throw new FileNotFoundException("File not found: {0}".F(filename), filename);
return s;
}
public bool TryGetPackageContaining(string path, out IReadOnlyPackage package, out string filename)
{
var explicitSplit = path.IndexOf('|');
if (explicitSplit > 0 && explicitMounts.TryGetValue(path.Substring(0, explicitSplit), out package))
{
filename = path.Substring(explicitSplit + 1);
return true;
}
package = fileIndex[path].LastOrDefault(x => x.Contains(path));
filename = path;
return package != null;
}
public bool TryOpen(string filename, out Stream s)
{
var explicitSplit = filename.IndexOf('|');
if (explicitSplit > 0)
{
IReadOnlyPackage explicitPackage;
if (explicitMounts.TryGetValue(filename.Substring(0, explicitSplit), out explicitPackage))
{
s = explicitPackage.GetStream(filename.Substring(explicitSplit + 1));
if (s != null)
return true;
}
}
s = GetFromCache(filename);
if (s != null)
return true;
// Ask each package individually
// TODO: This fallback can be removed once the filesystem cleanups are complete
var package = mountedPackages.Keys.LastOrDefault(x => x.Contains(filename));
if (package != null)
{
s = package.GetStream(filename);
return s != null;
}
s = null;
return false;
}
public bool Exists(string filename)
{
var explicitSplit = filename.IndexOf('|');
if (explicitSplit > 0)
{
IReadOnlyPackage explicitPackage;
if (explicitMounts.TryGetValue(filename.Substring(0, explicitSplit), out explicitPackage))
if (explicitPackage.Contains(filename.Substring(explicitSplit + 1)))
return true;
}
return fileIndex.ContainsKey(filename);
}
}
}

View File

@@ -1,10 +1,11 @@
#region Copyright & License Information
/*
* Copyright 2007-2015 The OpenRA Developers (see AUTHORS)
* Copyright 2007-2016 The OpenRA Developers (see AUTHORS)
* This file is part of OpenRA, which is free software. It is made
* available to you under the terms of the GNU General Public License
* as published by the Free Software Foundation. For more information,
* see COPYING.
* as published by the Free Software Foundation, either version 3 of
* the License, or (at your option) any later version. For more
* information, see COPYING.
*/
#endregion
@@ -13,70 +14,68 @@ using System.IO;
namespace OpenRA.FileSystem
{
public sealed class Folder : IFolder
public sealed class Folder : IReadWritePackage
{
readonly string path;
readonly int priority;
// Create a new folder package
public Folder(string path, int priority, Dictionary<string, byte[]> contents)
public Folder(string path)
{
this.path = path;
this.priority = priority;
if (Directory.Exists(path))
Directory.Delete(path, true);
Write(contents);
}
public Folder(string path, int priority)
{
this.path = path;
this.priority = priority;
if (!Directory.Exists(path))
Directory.CreateDirectory(path);
}
public Stream GetContent(string filename)
public string Name { get { return path; } }
public IEnumerable<string> Contents
{
get
{
foreach (var filename in Directory.GetFiles(path, "*", SearchOption.TopDirectoryOnly))
yield return Path.GetFileName(filename);
foreach (var filename in Directory.GetDirectories(path))
yield return Path.GetFileName(filename);
}
}
public Stream GetStream(string filename)
{
try { return File.OpenRead(Path.Combine(path, filename)); }
catch { return null; }
}
public IEnumerable<uint> ClassicHashes()
public bool Contains(string filename)
{
foreach (var filename in Directory.GetFiles(path, "*", SearchOption.TopDirectoryOnly))
yield return PackageEntry.HashFilename(Path.GetFileName(filename), PackageHashType.Classic);
var combined = Path.Combine(path, filename);
return combined.StartsWith(path) && File.Exists(combined);
}
public IEnumerable<uint> CrcHashes()
public void Update(string filename, byte[] contents)
{
yield break;
// HACK: ZipFiles can't be loaded as read-write from a stream, so we are
// forced to bypass the parent package and load them with their full path
// in FileSystem.OpenPackage. Their internal name therefore contains the
// full parent path too. We need to be careful to not add a second path
// prefix to these hacked packages.
var filePath = filename.StartsWith(path) ? filename : Path.Combine(path, filename);
Directory.CreateDirectory(Path.GetDirectoryName(filePath));
using (var s = File.Create(filePath))
s.Write(contents, 0, contents.Length);
}
public IEnumerable<string> AllFileNames()
public void Delete(string filename)
{
foreach (var filename in Directory.GetFiles(path, "*", SearchOption.TopDirectoryOnly))
yield return Path.GetFileName(filename);
}
public bool Exists(string filename)
{
return File.Exists(Path.Combine(path, filename));
}
public int Priority { get { return priority; } }
public string Name { get { return path; } }
public void Write(Dictionary<string, byte[]> contents)
{
if (!Directory.Exists(path))
Directory.CreateDirectory(path);
foreach (var file in contents)
using (var dataStream = File.Create(Path.Combine(path, file.Key)))
using (var writer = new BinaryWriter(dataStream))
writer.Write(file.Value);
// HACK: ZipFiles can't be loaded as read-write from a stream, so we are
// forced to bypass the parent package and load them with their full path
// in FileSystem.OpenPackage. Their internal name therefore contains the
// full parent path too. We need to be careful to not add a second path
// prefix to these hacked packages.
var filePath = filename.StartsWith(path) ? filename : Path.Combine(path, filename);
if (Directory.Exists(filePath))
Directory.Delete(filePath, true);
else if (File.Exists(filePath))
File.Delete(filePath);
}
public void Dispose() { }

View File

@@ -1,273 +0,0 @@
#region Copyright & License Information
/*
* Copyright 2007-2015 The OpenRA Developers (see AUTHORS)
* This file is part of OpenRA, which is free software. It is made
* available to you under the terms of the GNU General Public License
* as published by the Free Software Foundation. For more information,
* see COPYING.
*/
#endregion
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Reflection;
using OpenRA.Primitives;
namespace OpenRA.FileSystem
{
public interface IFolder : IDisposable
{
Stream GetContent(string filename);
bool Exists(string filename);
IEnumerable<uint> ClassicHashes();
IEnumerable<uint> CrcHashes();
IEnumerable<string> AllFileNames();
void Write(Dictionary<string, byte[]> contents);
int Priority { get; }
string Name { get; }
}
public static class GlobalFileSystem
{
public static List<IFolder> MountedFolders = new List<IFolder>();
static Cache<uint, List<IFolder>> classicHashIndex = new Cache<uint, List<IFolder>>(_ => new List<IFolder>());
static Cache<uint, List<IFolder>> crcHashIndex = new Cache<uint, List<IFolder>>(_ => new List<IFolder>());
public static List<string> FolderPaths = new List<string>();
static void MountInner(IFolder folder)
{
MountedFolders.Add(folder);
foreach (var hash in folder.ClassicHashes())
{
var l = classicHashIndex[hash];
if (!l.Contains(folder))
l.Add(folder);
}
foreach (var hash in folder.CrcHashes())
{
var l = crcHashIndex[hash];
if (!l.Contains(folder))
l.Add(folder);
}
}
static int order = 0;
public static IFolder CreatePackage(string filename, int order, Dictionary<string, byte[]> content)
{
if (filename.EndsWith(".mix", StringComparison.InvariantCultureIgnoreCase))
return new MixFile(filename, order, content);
if (filename.EndsWith(".zip", StringComparison.InvariantCultureIgnoreCase))
return new ZipFile(filename, order, content);
if (filename.EndsWith(".oramap", StringComparison.InvariantCultureIgnoreCase))
return new ZipFile(filename, order, content);
if (filename.EndsWith(".RS", StringComparison.InvariantCultureIgnoreCase))
throw new NotImplementedException("The creation of .RS archives is unimplemented");
if (filename.EndsWith(".Z", StringComparison.InvariantCultureIgnoreCase))
throw new NotImplementedException("The creation of .Z archives is unimplemented");
if (filename.EndsWith(".PAK", StringComparison.InvariantCultureIgnoreCase))
throw new NotImplementedException("The creation of .PAK archives is unimplemented");
if (filename.EndsWith(".big", StringComparison.InvariantCultureIgnoreCase))
throw new NotImplementedException("The creation of .big archives is unimplemented");
if (filename.EndsWith(".cab", StringComparison.InvariantCultureIgnoreCase))
throw new NotImplementedException("The creation of .cab archives is unimplemented");
return new Folder(filename, order, content);
}
public static IFolder OpenPackage(string filename, string annotation, int order)
{
if (filename.EndsWith(".mix", StringComparison.InvariantCultureIgnoreCase))
{
var type = string.IsNullOrEmpty(annotation)
? PackageHashType.Classic
: FieldLoader.GetValue<PackageHashType>("(value)", annotation);
return new MixFile(filename, type, order);
}
if (filename.EndsWith(".zip", StringComparison.InvariantCultureIgnoreCase))
return new ZipFile(filename, order);
if (filename.EndsWith(".oramap", StringComparison.InvariantCultureIgnoreCase))
return new ZipFile(filename, order);
if (filename.EndsWith(".RS", StringComparison.InvariantCultureIgnoreCase))
return new D2kSoundResources(filename, order);
if (filename.EndsWith(".Z", StringComparison.InvariantCultureIgnoreCase))
return new InstallShieldPackage(filename, order);
if (filename.EndsWith(".PAK", StringComparison.InvariantCultureIgnoreCase))
return new PakFile(filename, order);
if (filename.EndsWith(".big", StringComparison.InvariantCultureIgnoreCase))
return new BigFile(filename, order);
if (filename.EndsWith(".bag", StringComparison.InvariantCultureIgnoreCase))
return new BagFile(filename, order);
if (filename.EndsWith(".hdr", StringComparison.InvariantCultureIgnoreCase))
return new InstallShieldCABExtractor(filename, order);
return new Folder(filename, order);
}
public static void Mount(string name, string annotation = null)
{
var optional = name.StartsWith("~");
if (optional)
name = name.Substring(1);
name = Platform.ResolvePath(name);
FolderPaths.Add(name);
Action a = () => MountInner(OpenPackage(name, annotation, order++));
if (optional)
try { a(); }
catch { }
else
a();
}
public static void UnmountAll()
{
foreach (var folder in MountedFolders)
folder.Dispose();
MountedFolders.Clear();
FolderPaths.Clear();
classicHashIndex = new Cache<uint, List<IFolder>>(_ => new List<IFolder>());
crcHashIndex = new Cache<uint, List<IFolder>>(_ => new List<IFolder>());
}
public static bool Unmount(IFolder mount)
{
if (MountedFolders.Contains(mount))
mount.Dispose();
return MountedFolders.RemoveAll(f => f == mount) > 0;
}
public static void Mount(IFolder mount)
{
if (!MountedFolders.Contains(mount)) MountedFolders.Add(mount);
}
public static void LoadFromManifest(Manifest manifest)
{
UnmountAll();
foreach (var dir in manifest.Folders)
Mount(dir);
foreach (var pkg in manifest.Packages)
Mount(pkg.Key, pkg.Value);
}
static Stream GetFromCache(PackageHashType type, string filename)
{
var index = type == PackageHashType.CRC32 ? crcHashIndex : classicHashIndex;
var folder = index[PackageEntry.HashFilename(filename, type)]
.Where(x => x.Exists(filename))
.MinByOrDefault(x => x.Priority);
if (folder != null)
return folder.GetContent(filename);
return null;
}
public static Stream Open(string filename)
{
Stream s;
if (!TryOpen(filename, out s))
throw new FileNotFoundException("File not found: {0}".F(filename), filename);
return s;
}
public static bool TryOpen(string name, out Stream s)
{
var filename = name;
var foldername = string.Empty;
// Used for faction specific packages; rule out false positive on Windows C:\ drive notation
var explicitFolder = name.Contains(':') && !Directory.Exists(Path.GetDirectoryName(name));
if (explicitFolder)
{
var divide = name.Split(':');
foldername = divide.First();
filename = divide.Last();
}
// Check the cache for a quick lookup if the folder name is unknown
// TODO: This disables caching for explicit folder requests
if (filename.IndexOfAny(new char[] { '/', '\\' }) == -1 && !explicitFolder)
{
s = GetFromCache(PackageHashType.Classic, filename);
if (s != null)
return true;
s = GetFromCache(PackageHashType.CRC32, filename);
if (s != null)
return true;
}
// Ask each package individually
IFolder folder;
if (explicitFolder && !string.IsNullOrEmpty(foldername))
folder = MountedFolders.Where(x => x.Name == foldername).MaxByOrDefault(x => x.Priority);
else
folder = MountedFolders.Where(x => x.Exists(filename)).MaxByOrDefault(x => x.Priority);
if (folder != null)
{
s = folder.GetContent(filename);
return true;
}
s = null;
return false;
}
public static bool Exists(string name)
{
var explicitFolder = name.Contains(':') && !Directory.Exists(Path.GetDirectoryName(name));
if (explicitFolder)
{
var divide = name.Split(':');
var foldername = divide.First();
var filename = divide.Last();
return MountedFolders.Where(n => n.Name == foldername).Any(f => f.Exists(filename));
}
else
return MountedFolders.Any(f => f.Exists(name));
}
static Dictionary<string, Assembly> assemblyCache = new Dictionary<string, Assembly>();
public static Assembly ResolveAssembly(object sender, ResolveEventArgs e)
{
foreach (var assembly in AppDomain.CurrentDomain.GetAssemblies())
if (assembly.FullName == e.Name)
return assembly;
var frags = e.Name.Split(',');
var filename = frags[0] + ".dll";
Assembly a;
if (assemblyCache.TryGetValue(filename, out a))
return a;
if (Exists(filename))
using (var s = Open(filename))
{
var buf = s.ReadBytes((int)s.Length);
a = Assembly.Load(buf);
assemblyCache.Add(filename, a);
return a;
}
return null;
}
}
}

View File

@@ -0,0 +1,31 @@
#region Copyright & License Information
/*
* Copyright 2007-2016 The OpenRA Developers (see AUTHORS)
* This file is part of OpenRA, which is free software. It is made
* available to you under the terms of the GNU General Public License
* as published by the Free Software Foundation, either version 3 of
* the License, or (at your option) any later version. For more
* information, see COPYING.
*/
#endregion
using System;
using System.Collections.Generic;
using System.IO;
namespace OpenRA.FileSystem
{
public interface IReadOnlyPackage : IDisposable
{
string Name { get; }
IEnumerable<string> Contents { get; }
Stream GetStream(string filename);
bool Contains(string filename);
}
public interface IReadWritePackage : IReadOnlyPackage
{
void Update(string filename, byte[] contents);
void Delete(string filename);
}
}

View File

@@ -1,10 +1,11 @@
#region Copyright & License Information
/*
* Copyright 2007-2015 The OpenRA Developers (see AUTHORS)
* Copyright 2007-2016 The OpenRA Developers (see AUTHORS)
* This file is part of OpenRA, which is free software. It is made
* available to you under the terms of the GNU General Public License
* as published by the Free Software Foundation. For more information,
* see COPYING.
* as published by the Free Software Foundation, either version 3 of
* the License, or (at your option) any later version. For more
* information, see COPYING.
*/
#endregion
@@ -15,80 +16,31 @@ namespace OpenRA.FileSystem
{
public class IdxEntry
{
public const string DefaultExtension = "wav";
public readonly uint Hash;
public readonly string Name;
public readonly string Extension;
public readonly string Filename;
public readonly uint Offset;
public readonly uint Length;
public readonly uint SampleRate;
public readonly uint Flags;
public readonly uint ChunkSize;
public IdxEntry(uint hash, uint offset, uint length, uint sampleRate, uint flags, uint chuckSize)
{
Hash = hash;
Offset = offset;
Length = length;
SampleRate = sampleRate;
Flags = flags;
ChunkSize = chuckSize;
}
public IdxEntry(Stream s)
{
var asciiname = s.ReadASCII(16);
var pos = asciiname.IndexOf('\0');
var name = s.ReadASCII(16);
var pos = name.IndexOf('\0');
if (pos != 0)
asciiname = asciiname.Substring(0, pos);
name = name.Substring(0, pos);
Name = asciiname;
Extension = DefaultExtension;
Filename = string.Concat(name, ".wav");
Offset = s.ReadUInt32();
Length = s.ReadUInt32();
SampleRate = s.ReadUInt32();
Flags = s.ReadUInt32();
ChunkSize = s.ReadUInt32();
Hash = HashFilename(string.Concat(Name, ".", Extension), PackageHashType.CRC32);
}
public void Write(BinaryWriter w)
{
w.Write(Name.PadRight(16, '\0'));
w.Write(Offset);
w.Write(Length);
w.Write(SampleRate);
w.Write(Flags);
w.Write(ChunkSize);
}
public override string ToString()
{
string filename;
if (names.TryGetValue(Hash, out filename))
return "{0} - offset 0x{1:x8} - length 0x{2:x8}".F(filename, Offset, Length);
else
return "0x{0:x8} - offset 0x{1:x8} - length 0x{2:x8}".F(Hash, Offset, Length);
}
public static uint HashFilename(string name, PackageHashType type)
{
return PackageEntry.HashFilename(name, type);
}
static Dictionary<uint, string> names = new Dictionary<uint, string>();
public static void AddStandardName(string s)
{
// RA1 and TD
var hash = HashFilename(s, PackageHashType.Classic);
names.Add(hash, s);
// TS
var crcHash = HashFilename(s, PackageHashType.CRC32);
names.Add(crcHash, s);
return "{0} - offset 0x{1:x8} - length 0x{2:x8}".F(Filename, Offset, Length);
}
}
}

View File

@@ -1,527 +0,0 @@
#region Copyright & License Information
/*
* Copyright 2007-2015 The OpenRA Developers (see AUTHORS)
* This file is part of OpenRA, which is free software. It is made
* available to you under the terms of the GNU General Public License
* as published by the Free Software Foundation. For more information,
* see COPYING.
*/
#endregion
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text.RegularExpressions;
using ICSharpCode.SharpZipLib.Zip.Compression;
using ICSharpCode.SharpZipLib.Zip.Compression.Streams;
namespace OpenRA.FileSystem
{
public class InstallShieldCABExtractor : IDisposable, IFolder
{
const uint FileSplit = 0x1;
const uint FileObfuscated = 0x2;
const uint FileCompressed = 0x4;
const uint FileInvalid = 0x8;
const uint LinkPrev = 0x1;
const uint LinkNext = 0x2;
const uint MaxFileGroupCount = 71;
#region Nested Structs
struct FileGroup
{
public readonly string Name;
public readonly uint FirstFile;
public readonly uint LastFile;
public FileGroup(Stream reader, long offset)
{
var nameOffset = reader.ReadUInt32();
/* unknown */ reader.ReadBytes(18);
FirstFile = reader.ReadUInt32();
LastFile = reader.ReadUInt32();
reader.Seek(offset + (long)nameOffset, SeekOrigin.Begin);
Name = reader.ReadASCIIZ();
}
}
struct VolumeHeader
{
public readonly uint DataOffset;
public readonly uint DataOffsetHigh;
public readonly uint FirstFileIndex;
public readonly uint LastFileIndex;
public readonly uint FirstFileOffset;
public readonly uint FirstFileOffsetHigh;
public readonly uint FirstFileSizeExpanded;
public readonly uint FirstFileSizeExpandedHigh;
public readonly uint FirstFileSizeCompressed;
public readonly uint FirstFileSizeCompressedHigh;
public readonly uint LastFileOffset;
public readonly uint LastFileOffsetHigh;
public readonly uint LastFileSizeExpanded;
public readonly uint LastFileSizeExpandedHigh;
public readonly uint LastFileSizeCompressed;
public readonly uint LastFileSizeCompressedHigh;
public VolumeHeader(Stream reader)
{
DataOffset = reader.ReadUInt32();
DataOffsetHigh = reader.ReadUInt32();
FirstFileIndex = reader.ReadUInt32();
LastFileIndex = reader.ReadUInt32();
FirstFileOffset = reader.ReadUInt32();
FirstFileOffsetHigh = reader.ReadUInt32();
FirstFileSizeExpanded = reader.ReadUInt32();
FirstFileSizeExpandedHigh = reader.ReadUInt32();
FirstFileSizeCompressed = reader.ReadUInt32();
FirstFileSizeCompressedHigh = reader.ReadUInt32();
LastFileOffset = reader.ReadUInt32();
LastFileOffsetHigh = reader.ReadUInt32();
LastFileSizeExpanded = reader.ReadUInt32();
LastFileSizeExpandedHigh = reader.ReadUInt32();
LastFileSizeCompressed = reader.ReadUInt32();
LastFileSizeCompressedHigh = reader.ReadUInt32();
}
}
struct CommonHeader
{
public const long Size = 16;
public readonly uint Version;
public readonly uint VolumeInfo;
public readonly long CabDescriptorOffset;
public readonly uint CabDescriptorSize;
public CommonHeader(Stream reader)
{
Version = reader.ReadUInt32();
VolumeInfo = reader.ReadUInt32();
CabDescriptorOffset = (long)reader.ReadUInt32();
CabDescriptorSize = reader.ReadUInt32();
}
}
struct CabDescriptor
{
public readonly long FileTableOffset;
public readonly uint FileTableSize;
public readonly uint FileTableSize2;
public readonly uint DirectoryCount;
public readonly uint FileCount;
public readonly long FileTableOffset2;
public CabDescriptor(Stream reader, CommonHeader commonHeader)
{
reader.Seek(commonHeader.CabDescriptorOffset + 12, SeekOrigin.Begin);
FileTableOffset = (long)reader.ReadUInt32();
/* unknown */ reader.ReadUInt32();
FileTableSize = reader.ReadUInt32();
FileTableSize2 = reader.ReadUInt32();
DirectoryCount = reader.ReadUInt32();
/* unknown */ reader.ReadBytes(8);
FileCount = reader.ReadUInt32();
FileTableOffset2 = (long)reader.ReadUInt32();
}
}
struct FileDescriptor
{
public readonly ushort Flags;
public readonly uint ExpandedSize;
public readonly uint CompressedSize;
public readonly uint DataOffset;
public readonly byte[] MD5;
public readonly uint NameOffset;
public readonly ushort DirectoryIndex;
public readonly uint LinkToPrevious;
public readonly uint LinkToNext;
public readonly byte LinkFlags;
public readonly ushort Volume;
public readonly string Filename;
public FileDescriptor(Stream reader, long tableOffset)
{
Flags = reader.ReadUInt16();
ExpandedSize = reader.ReadUInt32();
/* unknown */ reader.ReadUInt32();
CompressedSize = reader.ReadUInt32();
/* unknown */ reader.ReadUInt32();
DataOffset = reader.ReadUInt32();
/* unknown */ reader.ReadUInt32();
MD5 = reader.ReadBytes(16);
/* unknown */ reader.ReadBytes(16);
NameOffset = reader.ReadUInt32();
DirectoryIndex = reader.ReadUInt16();
/* unknown */ reader.ReadBytes(12);
LinkToPrevious = reader.ReadUInt32();
LinkToNext = reader.ReadUInt32();
LinkFlags = reader.ReadBytes(1)[0];
Volume = reader.ReadUInt16();
var posSave = reader.Position;
reader.Seek(tableOffset + NameOffset, SeekOrigin.Begin);
Filename = reader.ReadASCIIZ();
reader.Seek(posSave, SeekOrigin.Begin);
}
}
class CabReader : IDisposable
{
readonly FileDescriptor fileDes;
public uint RemainingArchiveStream;
public uint RemainingFileStream;
readonly uint index;
readonly string commonName;
ushort volumeNumber;
Stream cabFile;
public CabReader(FileDescriptor fileDes, uint index, string commonName)
{
this.fileDes = fileDes;
this.index = index;
this.commonName = commonName;
volumeNumber = (ushort)((uint)fileDes.Volume - 1u);
RemainingArchiveStream = 0;
if ((fileDes.Flags & FileCompressed) > 0)
RemainingFileStream = fileDes.CompressedSize;
else
RemainingFileStream = fileDes.ExpandedSize;
cabFile = null;
NextFile();
}
public void CopyTo(Stream dest)
{
if ((fileDes.Flags & FileCompressed) != 0)
{
var inf = new Inflater(true);
var buffer = new byte[165535];
do
{
var bytesToExtract = cabFile.ReadUInt16();
RemainingArchiveStream -= 2u;
RemainingFileStream -= 2u;
inf.SetInput(GetBytes(bytesToExtract));
RemainingFileStream -= bytesToExtract;
while (!inf.IsNeedingInput)
{
var inflated = inf.Inflate(buffer);
dest.Write(buffer, 0, inflated);
}
inf.Reset();
}
while (RemainingFileStream > 0);
}
else
{
do
{
RemainingFileStream -= RemainingArchiveStream;
dest.Write(GetBytes(RemainingArchiveStream), 0, (int)RemainingArchiveStream);
}
while (RemainingFileStream > 0);
}
}
public byte[] GetBytes(uint count)
{
if (count < RemainingArchiveStream)
{
RemainingArchiveStream -= count;
return cabFile.ReadBytes((int)count);
}
else
{
var outArray = new byte[count];
var read = cabFile.Read(outArray, 0, (int)RemainingArchiveStream);
if (RemainingFileStream > RemainingArchiveStream)
{
NextFile();
RemainingArchiveStream -= (uint)cabFile.Read(outArray, read, (int)count - read);
}
return outArray;
}
}
public void Dispose()
{
cabFile.Dispose();
}
public void NextFile()
{
if (cabFile != null)
cabFile.Dispose();
++volumeNumber;
cabFile = GlobalFileSystem.Open("{0}{1}.cab".F(commonName, volumeNumber));
if (cabFile.ReadUInt32() != 0x28635349)
throw new InvalidDataException("Not an Installshield CAB package");
uint fileOffset;
if ((fileDes.Flags & FileSplit) != 0)
{
cabFile.Seek(CommonHeader.Size, SeekOrigin.Current);
var head = new VolumeHeader(cabFile);
if (index == head.LastFileIndex)
{
if ((fileDes.Flags & FileCompressed) != 0)
RemainingArchiveStream = head.LastFileSizeCompressed;
else
RemainingArchiveStream = head.LastFileSizeExpanded;
fileOffset = head.LastFileOffset;
}
else if (index == head.FirstFileIndex)
{
if ((fileDes.Flags & FileCompressed) != 0)
RemainingArchiveStream = head.FirstFileSizeCompressed;
else
RemainingArchiveStream = head.FirstFileSizeExpanded;
fileOffset = head.FirstFileOffset;
}
else
throw new Exception("Cannot Resolve Remaining Stream");
}
else
{
if ((fileDes.Flags & FileCompressed) != 0)
RemainingArchiveStream = fileDes.CompressedSize;
else
RemainingArchiveStream = fileDes.ExpandedSize;
fileOffset = fileDes.DataOffset;
}
cabFile.Seek(fileOffset, SeekOrigin.Begin);
}
}
#endregion
readonly Stream hdrFile;
readonly CommonHeader commonHeader;
readonly CabDescriptor cabDescriptor;
readonly List<uint> directoryTable;
readonly Dictionary<uint, string> directoryNames = new Dictionary<uint, string>();
readonly Dictionary<uint, FileDescriptor> fileDescriptors = new Dictionary<uint, FileDescriptor>();
readonly Dictionary<string, uint> fileLookup = new Dictionary<string, uint>();
int priority;
string commonName;
public int Priority { get { return priority; } }
public string Name { get { return commonName; } }
public InstallShieldCABExtractor(string hdrFilename, int priority = -1)
{
var fileGroups = new List<FileGroup>();
var fileGroupOffsets = new List<uint>();
this.priority = priority;
hdrFile = GlobalFileSystem.Open(hdrFilename);
// Strips archive number AND file extension
commonName = Regex.Replace(hdrFilename, @"\d*\.[^\.]*$", "");
var signature = hdrFile.ReadUInt32();
if (signature != 0x28635349)
throw new InvalidDataException("Not an Installshield CAB package");
commonHeader = new CommonHeader(hdrFile);
cabDescriptor = new CabDescriptor(hdrFile, commonHeader);
/* unknown */ hdrFile.ReadBytes(14);
for (var i = 0U; i < MaxFileGroupCount; ++i)
fileGroupOffsets.Add(hdrFile.ReadUInt32());
hdrFile.Seek(commonHeader.CabDescriptorOffset + cabDescriptor.FileTableOffset, SeekOrigin.Begin);
directoryTable = new List<uint>();
for (var i = 0U; i < cabDescriptor.DirectoryCount; ++i)
directoryTable.Add(hdrFile.ReadUInt32());
foreach (var offset in fileGroupOffsets)
{
var nextOffset = offset;
while (nextOffset != 0)
{
hdrFile.Seek((long)nextOffset + 4 + commonHeader.CabDescriptorOffset, SeekOrigin.Begin);
var descriptorOffset = hdrFile.ReadUInt32();
nextOffset = hdrFile.ReadUInt32();
hdrFile.Seek((long)descriptorOffset + commonHeader.CabDescriptorOffset, SeekOrigin.Begin);
fileGroups.Add(new FileGroup(hdrFile, commonHeader.CabDescriptorOffset));
}
}
hdrFile.Seek(commonHeader.CabDescriptorOffset + cabDescriptor.FileTableOffset + cabDescriptor.FileTableOffset2, SeekOrigin.Begin);
foreach (var fileGroup in fileGroups)
{
for (var index = fileGroup.FirstFile; index <= fileGroup.LastFile; ++index)
{
AddFileDescriptorToList(index);
var fileDescriptor = fileDescriptors[index];
var fullFilePath = "{0}\\{1}\\{2}".F(fileGroup.Name, DirectoryName((uint)fileDescriptor.DirectoryIndex), fileDescriptor.Filename);
fileLookup.Add(fullFilePath, index);
}
}
}
public string DirectoryName(uint index)
{
if (directoryNames.ContainsKey(index))
return directoryNames[index];
hdrFile.Seek(commonHeader.CabDescriptorOffset +
cabDescriptor.FileTableOffset +
directoryTable[(int)index],
SeekOrigin.Begin);
var test = hdrFile.ReadASCIIZ();
return test;
}
public bool Exists(string filename)
{
return fileLookup.ContainsKey(filename);
}
public uint DirectoryCount()
{
return cabDescriptor.DirectoryCount;
}
public string FileName(uint index)
{
if (!fileDescriptors.ContainsKey(index))
AddFileDescriptorToList(index);
return fileDescriptors[index].Filename;
}
void AddFileDescriptorToList(uint index)
{
hdrFile.Seek(commonHeader.CabDescriptorOffset +
cabDescriptor.FileTableOffset +
cabDescriptor.FileTableOffset2 +
index * 0x57,
SeekOrigin.Begin);
var fd = new FileDescriptor(hdrFile,
commonHeader.CabDescriptorOffset + cabDescriptor.FileTableOffset);
fileDescriptors.Add(index, fd);
}
public uint FileCount()
{
return cabDescriptor.FileCount;
}
public void ExtractFile(uint index, string fileName)
{
Directory.CreateDirectory(Path.GetDirectoryName(fileName));
using (var destfile = File.Open(fileName, FileMode.Create))
GetContentById(index, destfile);
}
public void Write(Dictionary<string, byte[]> input)
{
throw new NotImplementedException("Cannot Add Files To Cab");
}
public IEnumerable<uint> ClassicHashes()
{
return fileLookup.Keys.Select(k => PackageEntry.HashFilename(k, PackageHashType.Classic));
}
public Stream GetContentById(uint index)
{
var fileDes = fileDescriptors[index];
if ((fileDes.Flags & FileInvalid) != 0)
throw new Exception("File Invalid");
if ((fileDes.LinkFlags & LinkPrev) != 0)
return GetContentById(fileDes.LinkToPrevious);
if ((fileDes.Flags & FileObfuscated) != 0)
throw new NotImplementedException("Haven't implemented obfustcated files");
var output = new MemoryStream((int)fileDes.ExpandedSize);
using (var reader = new CabReader(fileDes, index, commonName))
reader.CopyTo(output);
if (output.Length != fileDes.ExpandedSize)
throw new Exception("Did not fully extract Expected = {0}, Got = {1}".F(fileDes.ExpandedSize, output.Length));
output.Position = 0;
return output;
}
public void GetContentById(uint index, Stream output)
{
var fileDes = fileDescriptors[index];
if ((fileDes.Flags & FileInvalid) != 0)
throw new Exception("File Invalid");
if ((fileDes.LinkFlags & LinkPrev) != 0)
{
GetContentById(fileDes.LinkToPrevious, output);
return;
}
if ((fileDes.Flags & FileObfuscated) != 0)
throw new NotImplementedException("Haven't implemented obfustcated files");
using (var reader = new CabReader(fileDes, index, commonName))
reader.CopyTo(output);
if (output.Length != fileDes.ExpandedSize)
throw new Exception("Did not fully extract Expected = {0}, Got = {1}".F(fileDes.ExpandedSize, output.Length));
}
public Stream GetContent(string fileName)
{
return GetContentById(fileLookup[fileName]);
}
public IEnumerable<uint> CrcHashes()
{
yield break;
}
public IEnumerable<string> AllFileNames()
{
return fileLookup.Keys;
}
public void Dispose()
{
hdrFile.Dispose();
}
}
}

View File

@@ -1,10 +1,11 @@
#region Copyright & License Information
/*
* Copyright 2007-2015 The OpenRA Developers (see AUTHORS)
* Copyright 2007-2016 The OpenRA Developers (see AUTHORS)
* This file is part of OpenRA, which is free software. It is made
* available to you under the terms of the GNU General Public License
* as published by the Free Software Foundation. For more information,
* see COPYING.
* as published by the Free Software Foundation, either version 3 of
* the License, or (at your option) any later version. For more
* information, see COPYING.
*/
#endregion
@@ -15,54 +16,70 @@ using OpenRA.FileFormats;
namespace OpenRA.FileSystem
{
public sealed class InstallShieldPackage : IFolder
public sealed class InstallShieldPackage : IReadOnlyPackage
{
readonly Dictionary<uint, PackageEntry> index = new Dictionary<uint, PackageEntry>();
readonly List<string> filenames;
public struct Entry
{
public readonly uint Offset;
public readonly uint Length;
public Entry(uint offset, uint length)
{
Offset = offset;
Length = length;
}
}
public string Name { get; private set; }
public IEnumerable<string> Contents { get { return index.Keys; } }
readonly Dictionary<string, Entry> index = new Dictionary<string, Entry>();
readonly Stream s;
readonly long dataStart = 255;
readonly int priority;
readonly string filename;
public InstallShieldPackage(string filename, int priority)
public InstallShieldPackage(FileSystem context, string filename)
{
this.filename = filename;
this.priority = priority;
Name = filename;
filenames = new List<string>();
s = GlobalFileSystem.Open(filename);
s = context.Open(filename);
try
{
// Parse package header
var reader = new BinaryReader(s);
var signature = reader.ReadUInt32();
var signature = s.ReadUInt32();
if (signature != 0x8C655D13)
throw new InvalidDataException("Not an Installshield package");
reader.ReadBytes(8);
/*var FileCount = */reader.ReadUInt16();
reader.ReadBytes(4);
/*var ArchiveSize = */reader.ReadUInt32();
reader.ReadBytes(19);
var tocAddress = reader.ReadInt32();
reader.ReadBytes(4);
var dirCount = reader.ReadUInt16();
s.Position += 8;
/*var FileCount = */s.ReadUInt16();
s.Position += 4;
/*var ArchiveSize = */s.ReadUInt32();
s.Position += 19;
var tocAddress = s.ReadInt32();
s.Position += 4;
var dirCount = s.ReadUInt16();
// Parse the directory list
s.Seek(tocAddress, SeekOrigin.Begin);
var tocReader = new BinaryReader(s);
var fileCountInDirs = new List<uint>();
s.Position = tocAddress;
// Parse directories
var directories = new Dictionary<string, uint>();
for (var i = 0; i < dirCount; i++)
fileCountInDirs.Add(ParseDirectory(tocReader));
{
// Parse directory header
var fileCount = s.ReadUInt16();
var chunkSize = s.ReadUInt16();
var nameLength = s.ReadUInt16();
var dirName = s.ReadASCII(nameLength);
// Skip to the end of the chunk
s.ReadBytes(chunkSize - nameLength - 6);
directories.Add(dirName, fileCount);
}
// Parse files
foreach (var fileCount in fileCountInDirs)
for (var i = 0; i < fileCount; i++)
ParseFile(reader);
foreach (var dir in directories)
for (var i = 0; i < dir.Value; i++)
ParseFile(s, dir.Key);
}
catch
{
@@ -71,84 +88,46 @@ namespace OpenRA.FileSystem
}
}
static uint ParseDirectory(BinaryReader reader)
{
// Parse directory header
var fileCount = reader.ReadUInt16();
var chunkSize = reader.ReadUInt16();
var nameLength = reader.ReadUInt16();
reader.ReadChars(nameLength); // var DirName = new String(reader.ReadChars(NameLength));
// Skip to the end of the chunk
reader.ReadBytes(chunkSize - nameLength - 6);
return fileCount;
}
uint accumulatedData = 0;
void ParseFile(BinaryReader reader)
void ParseFile(Stream s, string dirName)
{
reader.ReadBytes(7);
var compressedSize = reader.ReadUInt32();
reader.ReadBytes(12);
var chunkSize = reader.ReadUInt16();
reader.ReadBytes(4);
var nameLength = reader.ReadByte();
var fileName = new string(reader.ReadChars(nameLength));
s.Position += 7;
var compressedSize = s.ReadUInt32();
s.Position += 12;
var chunkSize = s.ReadUInt16();
s.Position += 4;
var nameLength = s.ReadByte();
var fileName = dirName + "\\" + s.ReadASCII(nameLength);
var hash = PackageEntry.HashFilename(fileName, PackageHashType.Classic);
if (!index.ContainsKey(hash))
index.Add(hash, new PackageEntry(hash, accumulatedData, compressedSize));
filenames.Add(fileName);
// Use index syntax to overwrite any duplicate entries with the last value
index[fileName] = new Entry(accumulatedData, compressedSize);
accumulatedData += compressedSize;
// Skip to the end of the chunk
reader.ReadBytes(chunkSize - nameLength - 30);
s.Position += chunkSize - nameLength - 30;
}
public Stream GetContent(uint hash)
public Stream GetStream(string filename)
{
PackageEntry e;
if (!index.TryGetValue(hash, out e))
Entry e;
if (!index.TryGetValue(filename, out e))
return null;
s.Seek(dataStart + e.Offset, SeekOrigin.Begin);
var data = s.ReadBytes((int)e.Length);
return new MemoryStream(Blast.Decompress(data));
var ret = new MemoryStream();
Blast.Decompress(s, ret);
ret.Seek(0, SeekOrigin.Begin);
return ret;
}
public Stream GetContent(string filename)
public bool Contains(string filename)
{
return GetContent(PackageEntry.HashFilename(filename, PackageHashType.Classic));
return index.ContainsKey(filename);
}
public IEnumerable<uint> ClassicHashes()
{
return index.Keys;
}
public IEnumerable<uint> CrcHashes()
{
yield break;
}
public IEnumerable<string> AllFileNames()
{
return filenames;
}
public bool Exists(string filename)
{
return index.ContainsKey(PackageEntry.HashFilename(filename, PackageHashType.Classic));
}
public int Priority { get { return 2000 + priority; } }
public string Name { get { return filename; } }
public void Write(Dictionary<string, byte[]> contents)
{
throw new NotImplementedException("Cannot save InstallShieldPackages.");
}
public IReadOnlyDictionary<string, Entry> Index { get { return new ReadOnlyDictionary<string, Entry>(index); } }
public void Dispose()
{

View File

@@ -1,10 +1,11 @@
#region Copyright & License Information
/*
* Copyright 2007-2015 The OpenRA Developers (see AUTHORS)
* Copyright 2007-2016 The OpenRA Developers (see AUTHORS)
* This file is part of OpenRA, which is free software. It is made
* available to you under the terms of the GNU General Public License
* as published by the Free Software Foundation. For more information,
* see COPYING.
* as published by the Free Software Foundation, either version 3 of
* the License, or (at your option) any later version. For more
* information, see COPYING.
*/
#endregion
@@ -14,49 +15,26 @@ using System.Globalization;
using System.IO;
using System.Linq;
using OpenRA.FileFormats;
using OpenRA.Primitives;
namespace OpenRA.FileSystem
{
public sealed class MixFile : IFolder
public sealed class MixFile : IReadOnlyPackage
{
readonly Dictionary<uint, PackageEntry> index;
public string Name { get; private set; }
public IEnumerable<string> Contents { get { return index.Keys; } }
readonly Dictionary<string, PackageEntry> index;
readonly long dataStart;
readonly Stream s;
readonly int priority;
readonly string filename;
readonly PackageHashType type;
readonly FileSystem context;
// Save a mix to disk with the given contents
public MixFile(string filename, int priority, Dictionary<string, byte[]> contents)
public MixFile(FileSystem context, string filename)
{
this.filename = filename;
this.priority = priority;
this.type = PackageHashType.Classic;
Name = filename;
this.context = context;
if (File.Exists(filename))
File.Delete(filename);
s = File.Create(filename);
try
{
index = new Dictionary<uint, PackageEntry>();
contents.Add("local mix database.dat", new XccLocalDatabase(contents.Keys.Append("local mix database.dat")).Data());
Write(contents);
}
catch
{
Dispose();
throw;
}
}
public MixFile(string filename, PackageHashType type, int priority)
{
this.filename = filename;
this.priority = priority;
this.type = type;
s = GlobalFileSystem.Open(filename);
s = context.Open(filename);
try
{
// Detect format type
@@ -76,9 +54,9 @@ namespace OpenRA.FileSystem
else
entries = ParseHeader(s, isCncMix ? 0 : 4, out dataStart);
index = entries.ToDictionaryWithConflictLog(x => x.Hash,
index = ParseIndex(entries.ToDictionaryWithConflictLog(x => x.Hash,
"{0} ({1} format, Encrypted: {2}, DataStart: {3})".F(filename, isCncMix ? "C&C" : "RA/TS/RA2", isEncrypted, dataStart),
null, x => "(offs={0}, len={1})".F(x.Offset, x.Length));
null, x => "(offs={0}, len={1})".F(x.Offset, x.Length)));
}
catch (Exception)
{
@@ -87,6 +65,60 @@ namespace OpenRA.FileSystem
}
}
Dictionary<string, PackageEntry> ParseIndex(Dictionary<uint, PackageEntry> entries)
{
var classicIndex = new Dictionary<string, PackageEntry>();
var crcIndex = new Dictionary<string, PackageEntry>();
var allPossibleFilenames = new HashSet<string>();
// Try and find a local mix database
var dbNameClassic = PackageEntry.HashFilename("local mix database.dat", PackageHashType.Classic);
var dbNameCRC = PackageEntry.HashFilename("local mix database.dat", PackageHashType.CRC32);
foreach (var kv in entries)
{
if (kv.Key == dbNameClassic || kv.Key == dbNameCRC)
{
var db = new XccLocalDatabase(GetContent(kv.Value));
foreach (var e in db.Entries)
allPossibleFilenames.Add(e);
break;
}
}
// Load the global mix database
// TODO: This should be passed to the mix file ctor
if (context.Exists("global mix database.dat"))
{
using (var db = new XccGlobalDatabase(context.Open("global mix database.dat")))
{
foreach (var e in db.Entries)
allPossibleFilenames.Add(e);
}
}
foreach (var filename in allPossibleFilenames)
{
var classicHash = PackageEntry.HashFilename(filename, PackageHashType.Classic);
var crcHash = PackageEntry.HashFilename(filename, PackageHashType.CRC32);
PackageEntry e;
if (entries.TryGetValue(classicHash, out e))
classicIndex.Add(filename, e);
if (entries.TryGetValue(crcHash, out e))
crcIndex.Add(filename, e);
}
var bestIndex = crcIndex.Count > classicIndex.Count ? crcIndex : classicIndex;
var unknown = entries.Count - bestIndex.Count;
if (unknown > 0)
Log.Write("debug", "{0}: failed to resolve filenames for {1} unknown hashes".F(Name, unknown));
return bestIndex;
}
static List<PackageEntry> ParseHeader(Stream s, long offset, out long headerEnd)
{
s.Seek(offset, SeekOrigin.Begin);
@@ -156,130 +188,35 @@ namespace OpenRA.FileSystem
return ret;
}
uint? FindMatchingHash(string filename)
public Stream GetContent(PackageEntry entry)
{
var hash = PackageEntry.HashFilename(filename, type);
if (index.ContainsKey(hash))
return hash;
// Maybe we were given a raw hash?
uint raw;
if (!uint.TryParse(filename, NumberStyles.AllowHexSpecifier, CultureInfo.InvariantCulture, out raw))
return null;
if ("{0:X}".F(raw) == filename && index.ContainsKey(raw))
return raw;
return null;
Stream parentStream;
var offset = dataStart + entry.Offset + SegmentStream.GetOverallNestedOffset(s, out parentStream);
var path = ((FileStream)parentStream).Name;
return new SegmentStream(File.OpenRead(path), offset, entry.Length);
}
public Stream GetContent(uint hash)
public Stream GetStream(string filename)
{
PackageEntry e;
if (!index.TryGetValue(hash, out e))
if (!index.TryGetValue(filename, out e))
return null;
s.Seek(dataStart + e.Offset, SeekOrigin.Begin);
var data = s.ReadBytes((int)e.Length);
return new MemoryStream(data);
return GetContent(e);
}
public Stream GetContent(string filename)
public IReadOnlyDictionary<string, PackageEntry> Index
{
var hash = FindMatchingHash(filename);
return hash.HasValue ? GetContent(hash.Value) : null;
}
static readonly uint[] Nothing = { };
public IEnumerable<uint> ClassicHashes()
{
if (type == PackageHashType.Classic)
return index.Keys;
return Nothing;
}
public IEnumerable<uint> CrcHashes()
{
if (type == PackageHashType.CRC32)
return index.Keys;
return Nothing;
}
public IEnumerable<string> AllFileNames()
{
var lookup = new Dictionary<uint, string>();
if (Exists("local mix database.dat"))
get
{
var db = new XccLocalDatabase(GetContent("local mix database.dat"));
foreach (var e in db.Entries)
{
var hash = PackageEntry.HashFilename(e, type);
if (!lookup.ContainsKey(hash))
lookup.Add(hash, e);
}
var absoluteIndex = index.ToDictionary(e => e.Key, e => new PackageEntry(e.Value.Hash, (uint)(e.Value.Offset + dataStart), e.Value.Length));
return new ReadOnlyDictionary<string, PackageEntry>(absoluteIndex);
}
if (GlobalFileSystem.Exists("global mix database.dat"))
{
var db = new XccGlobalDatabase(GlobalFileSystem.Open("global mix database.dat"));
foreach (var e in db.Entries)
{
var hash = PackageEntry.HashFilename(e, type);
if (!lookup.ContainsKey(hash))
lookup.Add(hash, e);
}
}
return index.Keys.Select(k => lookup.ContainsKey(k) ? lookup[k] : "{0:X}".F(k));
}
public bool Exists(string filename)
public bool Contains(string filename)
{
return FindMatchingHash(filename).HasValue;
}
public int Priority { get { return 1000 + priority; } }
public string Name { get { return filename; } }
public void Write(Dictionary<string, byte[]> contents)
{
// Cannot modify existing mixfile - rename existing file and
// create a new one with original content plus modifications
GlobalFileSystem.Unmount(this);
// TODO: Add existing data to the contents list
if (index.Count > 0)
throw new NotImplementedException("Updating mix files unfinished");
// Construct a list of entries for the file header
uint dataSize = 0;
var items = new List<PackageEntry>();
foreach (var kv in contents)
{
var length = (uint)kv.Value.Length;
var hash = PackageEntry.HashFilename(Path.GetFileName(kv.Key), type);
items.Add(new PackageEntry(hash, dataSize, length));
dataSize += length;
}
// Write the new file
s.Seek(0, SeekOrigin.Begin);
using (var writer = new BinaryWriter(s))
{
// Write file header
writer.Write((ushort)items.Count);
writer.Write(dataSize);
foreach (var item in items)
item.Write(writer);
writer.Flush();
// Copy file data
foreach (var file in contents)
s.Write(file.Value);
}
return index.ContainsKey(filename);
}
public void Dispose()

View File

@@ -1,10 +1,11 @@
#region Copyright & License Information
/*
* Copyright 2007-2015 The OpenRA Developers (see AUTHORS)
* Copyright 2007-2016 The OpenRA Developers (see AUTHORS)
* This file is part of OpenRA, which is free software. It is made
* available to you under the terms of the GNU General Public License
* as published by the Free Software Foundation. For more information,
* see COPYING.
* as published by the Free Software Foundation, either version 3 of
* the License, or (at your option) any later version. For more
* information, see COPYING.
*/
#endregion

View File

@@ -1,14 +1,14 @@
#region Copyright & License Information
/*
* Copyright 2007-2015 The OpenRA Developers (see AUTHORS)
* Copyright 2007-2016 The OpenRA Developers (see AUTHORS)
* This file is part of OpenRA, which is free software. It is made
* available to you under the terms of the GNU General Public License
* as published by the Free Software Foundation. For more information,
* see COPYING.
* as published by the Free Software Foundation, either version 3 of
* the License, or (at your option) any later version. For more
* information, see COPYING.
*/
#endregion
using System;
using System.Collections.Generic;
using System.IO;
@@ -21,20 +21,20 @@ namespace OpenRA.FileSystem
public string Filename;
}
public sealed class PakFile : IFolder
public sealed class PakFile : IReadOnlyPackage
{
readonly string filename;
readonly int priority;
public string Name { get; private set; }
public IEnumerable<string> Contents { get { return index.Keys; } }
readonly Dictionary<string, Entry> index;
readonly Stream stream;
public PakFile(string filename, int priority)
public PakFile(FileSystem context, string filename)
{
this.filename = filename;
this.priority = priority;
Name = filename;
index = new Dictionary<string, Entry>();
stream = GlobalFileSystem.Open(filename);
stream = context.Open(filename);
try
{
index = new Dictionary<string, Entry>();
@@ -60,7 +60,7 @@ namespace OpenRA.FileSystem
}
}
public Stream GetContent(string filename)
public Stream GetStream(string filename)
{
Entry entry;
if (!index.TryGetValue(filename, out entry))
@@ -71,36 +71,11 @@ namespace OpenRA.FileSystem
return new MemoryStream(data);
}
public IEnumerable<uint> ClassicHashes()
{
foreach (var filename in index.Keys)
yield return PackageEntry.HashFilename(filename, PackageHashType.Classic);
}
public IEnumerable<uint> CrcHashes()
{
yield break;
}
public IEnumerable<string> AllFileNames()
{
foreach (var filename in index.Keys)
yield return filename;
}
public bool Exists(string filename)
public bool Contains(string filename)
{
return index.ContainsKey(filename);
}
public void Write(Dictionary<string, byte[]> contents)
{
throw new NotImplementedException("Cannot save Pak archives.");
}
public int Priority { get { return 1000 + priority; } }
public string Name { get { return filename; } }
public void Dispose()
{
stream.Dispose();

View File

@@ -1,62 +1,84 @@
#region Copyright & License Information
/*
* Copyright 2007-2015 The OpenRA Developers (see AUTHORS)
* Copyright 2007-2016 The OpenRA Developers (see AUTHORS)
* This file is part of OpenRA, which is free software. It is made
* available to you under the terms of the GNU General Public License
* as published by the Free Software Foundation. For more information,
* see COPYING.
* as published by the Free Software Foundation, either version 3 of
* the License, or (at your option) any later version. For more
* information, see COPYING.
*/
#endregion
using System;
using System.Collections;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;
using ICSharpCode.SharpZipLib.Zip;
using SZipFile = ICSharpCode.SharpZipLib.Zip.ZipFile;
namespace OpenRA.FileSystem
{
public sealed class ZipFile : IFolder
public sealed class ZipFile : IReadWritePackage
{
readonly string filename;
readonly int priority;
SZipFile pkg;
public IReadWritePackage Parent { get; private set; }
public string Name { get; private set; }
readonly Stream pkgStream;
readonly SZipFile pkg;
static ZipFile()
{
ZipConstants.DefaultCodePage = Encoding.Default.CodePage;
ZipConstants.DefaultCodePage = Encoding.UTF8.CodePage;
}
public ZipFile(string filename, int priority)
public ZipFile(Stream stream, string name, IReadOnlyPackage parent = null)
{
this.filename = filename;
this.priority = priority;
try
{
// pull the file into memory, dont keep it open.
pkg = new SZipFile(new MemoryStream(File.ReadAllBytes(filename)));
}
catch (ZipException e)
{
Log.Write("debug", "Couldn't load zip file: {0}", e.Message);
}
// SharpZipLib breaks when asked to update archives loaded from outside streams or files
// We can work around this by creating a clean in-memory-only file, cutting all outside references
pkgStream = new MemoryStream();
stream.CopyTo(pkgStream);
pkgStream.Position = 0;
Name = name;
Parent = parent as IReadWritePackage;
pkg = new SZipFile(pkgStream);
}
// Create a new zip with the specified contents
public ZipFile(string filename, int priority, Dictionary<string, byte[]> contents)
public ZipFile(IReadOnlyFileSystem context, string filename)
{
this.priority = priority;
this.filename = filename;
string name;
IReadOnlyPackage p;
if (!context.TryGetPackageContaining(filename, out p, out name))
throw new FileNotFoundException("Unable to find parent package for " + filename);
if (File.Exists(filename))
File.Delete(filename);
Name = name;
Parent = p as IReadWritePackage;
pkg = SZipFile.Create(filename);
Write(contents);
// SharpZipLib breaks when asked to update archives loaded from outside streams or files
// We can work around this by creating a clean in-memory-only file, cutting all outside references
pkgStream = new MemoryStream();
using (var sourceStream = p.GetStream(name))
sourceStream.CopyTo(pkgStream);
pkgStream.Position = 0;
pkg = new SZipFile(pkgStream);
}
public Stream GetContent(string filename)
ZipFile(string filename, IReadWritePackage parent)
{
pkgStream = new MemoryStream();
Name = filename;
Parent = parent;
pkg = SZipFile.Create(pkgStream);
}
public static ZipFile Create(string filename, IReadWritePackage parent)
{
return new ZipFile(filename, parent);
}
public Stream GetStream(string filename)
{
var entry = pkg.GetEntry(filename);
if (entry == null)
@@ -71,64 +93,68 @@ namespace OpenRA.FileSystem
}
}
public IEnumerable<uint> ClassicHashes()
public IEnumerable<string> Contents
{
foreach (ZipEntry entry in pkg)
yield return PackageEntry.HashFilename(entry.Name, PackageHashType.Classic);
get
{
foreach (ZipEntry entry in pkg)
yield return entry.Name;
}
}
public IEnumerable<uint> CrcHashes()
{
yield break;
}
public IEnumerable<string> AllFileNames()
{
foreach (ZipEntry entry in pkg)
yield return entry.Name;
}
public bool Exists(string filename)
public bool Contains(string filename)
{
return pkg.GetEntry(filename) != null;
}
public int Priority { get { return 500 + priority; } }
public string Name { get { return filename; } }
public void Write(Dictionary<string, byte[]> contents)
void Commit()
{
if (Parent == null)
throw new InvalidDataException("Cannot update ZipFile without writable parent");
var pos = pkgStream.Position;
pkgStream.Position = 0;
Parent.Update(Name, pkgStream.ReadBytes((int)pkgStream.Length));
pkgStream.Position = pos;
}
public void Update(string filename, byte[] contents)
{
// TODO: Clear existing content?
pkg.Close();
pkg = SZipFile.Create(filename);
pkg.BeginUpdate();
foreach (var kvp in contents)
pkg.Add(new StaticMemoryDataSource(kvp.Value), kvp.Key);
pkg.Add(new StaticStreamDataSource(new MemoryStream(contents)), filename);
pkg.CommitUpdate();
pkg.Close();
pkg = new SZipFile(new MemoryStream(File.ReadAllBytes(filename)));
Commit();
}
public void Delete(string filename)
{
pkg.BeginUpdate();
pkg.Delete(filename);
pkg.CommitUpdate();
Commit();
}
public void Dispose()
{
if (pkg != null)
pkg.Close();
if (pkgStream != null)
pkgStream.Dispose();
}
}
class StaticMemoryDataSource : IStaticDataSource
class StaticStreamDataSource : IStaticDataSource
{
byte[] data;
public StaticMemoryDataSource(byte[] data)
readonly Stream s;
public StaticStreamDataSource(Stream s)
{
this.data = data;
this.s = s;
}
public Stream GetSource()
{
return new MemoryStream(data);
return s;
}
}
}

View File

@@ -0,0 +1,76 @@
#region Copyright & License Information
/*
* Copyright 2007-2016 The OpenRA Developers (see AUTHORS)
* This file is part of OpenRA, which is free software. It is made
* available to you under the terms of the GNU General Public License
* as published by the Free Software Foundation, either version 3 of
* the License, or (at your option) any later version. For more
* information, see COPYING.
*/
#endregion
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;
using ICSharpCode.SharpZipLib.Zip;
using SZipFile = ICSharpCode.SharpZipLib.Zip.ZipFile;
namespace OpenRA.FileSystem
{
public sealed class ZipFolder : IReadOnlyPackage
{
public string Name { get; private set; }
public ZipFile Parent { get; private set; }
readonly string path;
static ZipFolder()
{
ZipConstants.DefaultCodePage = Encoding.UTF8.CodePage;
}
public ZipFolder(FileSystem context, ZipFile parent, string path, string filename)
{
if (filename.EndsWith("/"))
filename = filename.Substring(0, filename.Length - 1);
Name = filename;
Parent = parent;
if (path.EndsWith("/"))
path = path.Substring(0, path.Length - 1);
this.path = path;
}
public Stream GetStream(string filename)
{
// Zip files use '/' as a path separator
return Parent.GetStream(path + '/' + filename);
}
public IEnumerable<string> Contents
{
get
{
foreach (var entry in Parent.Contents)
{
if (entry.StartsWith(path) && entry != path)
{
var filename = entry.Substring(path.Length + 1);
var dirLevels = filename.Split('/').Count(c => !string.IsNullOrEmpty(c));
if (dirLevels == 1)
yield return filename;
}
}
}
}
public bool Contains(string filename)
{
return Parent.Contains(path + '/' + filename);
}
public void Dispose() { /* nothing to do */ }
}
}

View File

@@ -1,21 +1,26 @@
#region Copyright & License Information
/*
* Copyright 2007-2015 The OpenRA Developers (see AUTHORS)
* Copyright 2007-2016 The OpenRA Developers (see AUTHORS)
* This file is part of OpenRA, which is free software. It is made
* available to you under the terms of the GNU General Public License
* as published by the Free Software Foundation. For more information,
* see COPYING.
* as published by the Free Software Foundation, either version 3 of
* the License, or (at your option) any later version. For more
* information, see COPYING.
*/
#endregion
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Drawing;
using System.Drawing.Imaging;
using System.Globalization;
using System.IO;
using System.Linq;
using System.Net;
using System.Reflection;
using System.Threading;
using System.Threading.Tasks;
using OpenRA.Chat;
using OpenRA.FileSystem;
using OpenRA.Graphics;
@@ -32,6 +37,8 @@ namespace OpenRA
public const int Timestep = 40;
public const int TimestepJankThreshold = 250; // Don't catch up for delays larger than 250ms
public static InstalledMods Mods { get; private set; }
public static ModData ModData;
public static Settings Settings;
public static ICursor Cursor;
@@ -46,22 +53,27 @@ namespace OpenRA
public static Sound Sound;
public static bool HasInputFocus = false;
public static bool BenchmarkMode = false;
public static GlobalChat GlobalChat;
static Task discoverNat;
public static OrderManager JoinServer(string host, int port, string password, bool recordReplay = true)
{
IConnection connection = new NetworkConnection(host, port);
var connection = new NetworkConnection(host, port);
if (recordReplay)
connection = new ReplayRecorderConnection(connection, TimestampedFilename);
connection.StartRecording(() => { return TimestampedFilename(); });
var om = new OrderManager(host, port, password, connection);
JoinInner(om);
return om;
}
static string TimestampedFilename()
static string TimestampedFilename(bool includemilliseconds = false)
{
return DateTime.UtcNow.ToString("OpenRA-yyyy-MM-ddTHHmmssZ");
var format = includemilliseconds ? "yyyy-MM-ddTHHmmssfffZ" : "yyyy-MM-ddTHHmmssZ";
return "OpenRA-" + DateTime.UtcNow.ToString(format, CultureInfo.InvariantCulture);
}
static void JoinInner(OrderManager om)
@@ -84,7 +96,7 @@ namespace OpenRA
// More accurate replacement for Environment.TickCount
static Stopwatch stopwatch = Stopwatch.StartNew();
public static int RunTime { get { return (int)Game.stopwatch.ElapsedMilliseconds; } }
public static long RunTime { get { return stopwatch.ElapsedMilliseconds; } }
public static int RenderFrame = 0;
public static int NetFrameNumber { get { return OrderManager.NetFrameNumber; } }
@@ -153,7 +165,7 @@ namespace OpenRA
using (new PerfTimer("NewWorld"))
OrderManager.World = new World(map, OrderManager, type);
worldRenderer = new WorldRenderer(OrderManager.World);
worldRenderer = new WorldRenderer(ModData, OrderManager.World);
using (new PerfTimer("LoadComplete"))
OrderManager.World.LoadComplete(worldRenderer);
@@ -173,6 +185,44 @@ namespace OpenRA
GC.Collect();
}
public static void RestartGame()
{
var replay = OrderManager.Connection as ReplayConnection;
var replayName = replay != null ? replay.Filename : null;
var lobbyInfo = OrderManager.LobbyInfo;
var orders = new[] {
Order.Command("sync_lobby {0}".F(lobbyInfo.Serialize())),
Order.Command("startgame")
};
// Disconnect from the current game
Disconnect();
Ui.ResetAll();
// Restart the game with the same replay/mission
if (replay != null)
JoinReplay(replayName);
else
CreateAndStartLocalServer(lobbyInfo.GlobalSettings.Map, orders);
}
public static void CreateAndStartLocalServer(string mapUID, IEnumerable<Order> setupOrders)
{
OrderManager om = null;
Action lobbyReady = null;
lobbyReady = () =>
{
LobbyInfoChanged -= lobbyReady;
foreach (var o in setupOrders)
om.IssueOrder(o);
};
LobbyInfoChanged += lobbyReady;
om = JoinServer(IPAddress.Loopback.ToString(), CreateLocalServer(mapUID), "");
}
public static bool IsHost
{
get
@@ -189,68 +239,99 @@ namespace OpenRA
public static void InitializeSettings(Arguments args)
{
Settings = new Settings(Platform.ResolvePath("^", "settings.yaml"), args);
Settings = new Settings(Platform.ResolvePath(Path.Combine("^", "settings.yaml")), args);
}
internal static void Initialize(Arguments args)
{
Console.WriteLine("Platform is {0}", Platform.CurrentPlatform);
AppDomain.CurrentDomain.AssemblyResolve += GlobalFileSystem.ResolveAssembly;
// Special case handling of Game.Mod argument: if it matches a real filesystem path
// then we use this to override the mod search path, and replace it with the mod id
var modArgument = args.GetValue("Game.Mod", null);
string customModPath = null;
if (modArgument != null && (File.Exists(modArgument) || Directory.Exists(modArgument)))
{
customModPath = modArgument;
args.ReplaceValue("Game.Mod", Path.GetFileNameWithoutExtension(modArgument));
}
InitializeSettings(args);
Log.AddChannel("perf", "perf.log");
Log.AddChannel("debug", "debug.log");
Log.AddChannel("sync", "syncreport.log");
Log.AddChannel("server", "server.log");
Log.AddChannel("sound", "sound.log");
Log.AddChannel("graphics", "graphics.log");
Log.AddChannel("geoip", "geoip.log");
Log.AddChannel("irc", "irc.log");
Log.AddChannel("nat", "nat.log");
if (Settings.Server.DiscoverNatDevices)
UPnP.TryNatDiscovery();
else
var platforms = new[] { Settings.Game.Platform, "Default", null };
foreach (var p in platforms)
{
Settings.Server.NatDeviceAvailable = false;
Settings.Server.AllowPortForward = false;
}
if (p == null)
throw new InvalidOperationException("Failed to initialize platform-integration library. Check graphics.log for details.");
GeoIP.Initialize();
GlobalFileSystem.Mount(Platform.GameDir); // Needed to access shaders
var renderers = new[] { Settings.Graphics.Renderer, "Default", null };
foreach (var r in renderers)
{
if (r == null)
throw new InvalidOperationException("No suitable renderers were found. Check graphics.log for details.");
Settings.Graphics.Renderer = r;
Settings.Game.Platform = p;
try
{
Renderer = new Renderer(Settings.Graphics, Settings.Server);
var rendererPath = Platform.ResolvePath(Path.Combine(".", "OpenRA.Platforms." + p + ".dll"));
var assembly = Assembly.LoadFile(rendererPath);
var platformType = assembly.GetTypes().SingleOrDefault(t => typeof(IPlatform).IsAssignableFrom(t));
if (platformType == null)
throw new InvalidOperationException("Platform dll must include exactly one IPlatform implementation.");
var platform = (IPlatform)platformType.GetConstructor(Type.EmptyTypes).Invoke(null);
Renderer = new Renderer(platform, Settings.Graphics);
Sound = new Sound(platform, Settings.Sound);
break;
}
catch (Exception e)
{
Log.Write("graphics", "{0}", e);
Console.WriteLine("Renderer initialization failed. Fallback in place. Check graphics.log for details.");
Console.WriteLine("Renderer initialization failed. Check graphics.log for details.");
if (Renderer != null)
Renderer.Dispose();
if (Sound != null)
Sound.Dispose();
}
}
Sound = new Sound(Settings.Server.Dedicated ? "Null" : Settings.Sound.Engine);
GeoIP.Initialize();
if (!Game.Settings.Server.DiscoverNatDevices)
Game.Settings.Server.AllowPortForward = false;
else
{
discoverNat = UPnP.DiscoverNatDevices(Settings.Server.NatDiscoveryTimeout);
Game.Settings.Server.AllowPortForward = true;
}
GlobalChat = new GlobalChat();
Mods = new InstalledMods(customModPath);
Console.WriteLine("Available mods:");
foreach (var mod in ModMetadata.AllMods)
Console.WriteLine("\t{0}: {1} ({2})", mod.Key, mod.Value.Title, mod.Value.Version);
foreach (var mod in Mods)
Console.WriteLine("\t{0}: {1} ({2})", mod.Key, mod.Value.Metadata.Title, mod.Value.Metadata.Version);
InitializeMod(Settings.Game.Mod, args);
}
if (Settings.Server.DiscoverNatDevices)
RunAfterDelay(Settings.Server.NatDiscoveryTimeout, UPnP.StoppingNatDiscovery);
public static bool IsModInstalled(string modId)
{
return Mods.ContainsKey(modId) && Mods[modId].RequiresMods.All(IsModInstalled);
}
public static bool IsModInstalled(KeyValuePair<string, string> mod)
{
return Mods.ContainsKey(mod.Key)
&& Mods[mod.Key].Metadata.Version == mod.Value
&& IsModInstalled(mod.Key);
}
public static void InitializeMod(string mod, Arguments args)
@@ -273,43 +354,39 @@ namespace OpenRA
OrderManager.Dispose();
if (ModData != null)
{
ModData.ModFiles.UnmountAll();
ModData.Dispose();
}
ModData = null;
// Fall back to default if the mod doesn't exist
if (!ModMetadata.AllMods.ContainsKey(mod))
// Fall back to default if the mod doesn't exist or has missing prerequisites.
if (!IsModInstalled(mod))
mod = new GameSettings().Mod;
Console.WriteLine("Loading mod: {0}", mod);
Settings.Game.Mod = mod;
Sound.StopVideo();
Sound.Initialize();
ModData = new ModData(mod, !Settings.Server.Dedicated);
ModData = new ModData(Mods[mod], Mods, true);
using (new PerfTimer("LoadMaps"))
ModData.MapCache.LoadMaps();
if (Settings.Server.Dedicated)
{
RunDedicatedServer();
Environment.Exit(0);
}
var installData = ModData.Manifest.Get<ContentInstaller>();
var isModContentInstalled = installData.TestFiles.All(f => File.Exists(Platform.ResolvePath(f)));
// Mod assets are missing!
if (!isModContentInstalled)
if (!ModData.LoadScreen.RequiredContentIsInstalled())
{
InitializeMod("modchooser", new Arguments());
return;
}
ModData.MountFiles();
ModData.InitializeLoaders();
Renderer.InitializeFonts(ModData.Manifest);
ModData.InitializeLoaders(ModData.DefaultFileSystem);
Renderer.InitializeFonts(ModData);
var grid = ModData.Manifest.Contains<MapGrid>() ? ModData.Manifest.Get<MapGrid>() : null;
Renderer.InitializeDepthBuffer(grid);
if (Cursor != null)
Cursor.Dispose();
@@ -329,7 +406,6 @@ namespace OpenRA
Console.WriteLine("Error was: " + e.Message);
Cursor = new SoftwareCursor(ModData.CursorProvider);
Settings.Graphics.HardwareCursors = false;
}
}
else
@@ -342,38 +418,19 @@ namespace OpenRA
JoinLocal();
ModData.LoadScreen.StartGame(args);
}
public static void RunDedicatedServer()
{
while (true)
try
{
Settings.Server.Map = WidgetUtils.ChooseInitialMap(Settings.Server.Map);
Settings.Save();
CreateServer(new ServerSettings(Settings.Server));
while (true)
{
Thread.Sleep(100);
if (server.State == Server.ServerState.GameStarted && server.Conns.Count < 1)
{
Console.WriteLine("No one is playing, shutting down...");
server.Shutdown();
break;
}
}
if (Settings.Server.DedicatedLoop)
{
Console.WriteLine("Starting a new server instance...");
ModData.MapCache.LoadMaps();
continue;
}
break;
if (discoverNat != null)
discoverNat.Wait();
}
catch (Exception e)
{
Console.WriteLine("NAT discovery failed: {0}", e.Message);
Log.Write("nat", e.ToString());
Game.Settings.Server.AllowPortForward = false;
}
ModData.LoadScreen.StartGame(args);
}
public static void LoadEditor(string mapUid)
@@ -392,7 +449,7 @@ namespace OpenRA
static string ChooseShellmap()
{
var shellmaps = ModData.MapCache
.Where(m => m.Status == MapStatus.Available && m.Map.Visibility.HasFlag(MapVisibility.Shellmap))
.Where(m => m.Status == MapStatus.Available && m.Visibility.HasFlag(MapVisibility.Shellmap))
.Select(m => m.Uid);
if (!shellmaps.Any())
@@ -405,10 +462,10 @@ namespace OpenRA
public static event Action OnQuit = () => { };
// Note: These delayed actions should only be used by widgets or disposing objects
// - things that depend on a particular world should be queuing them on the worldactor.
// - things that depend on a particular world should be queuing them on the world actor.
static volatile ActionQueue delayedActions = new ActionQueue();
public static void RunAfterTick(Action a) { delayedActions.Add(a, Game.RunTime); }
public static void RunAfterDelay(int delayMilliseconds, Action a) { delayedActions.Add(a, Game.RunTime + delayMilliseconds); }
public static void RunAfterTick(Action a) { delayedActions.Add(a, RunTime); }
public static void RunAfterDelay(int delayMilliseconds, Action a) { delayedActions.Add(a, RunTime + delayMilliseconds); }
static void TakeScreenshotInner()
{
@@ -420,11 +477,11 @@ namespace OpenRA
ThreadPool.QueueUserWorkItem(_ =>
{
var mod = ModData.Manifest.Mod;
var directory = Platform.ResolvePath("^", "Screenshots", mod.Id, mod.Version);
var mod = ModData.Manifest.Metadata;
var directory = Platform.ResolvePath("^", "Screenshots", ModData.Manifest.Id, mod.Version);
Directory.CreateDirectory(directory);
var filename = TimestampedFilename();
var filename = TimestampedFilename(true);
var format = Settings.Graphics.ScreenshotFormat;
var extension = ImageCodecInfo.GetImageEncoders().FirstOrDefault(x => x.FormatID == format.Guid)
.FilenameExtension.Split(';').First().ToLowerInvariant().Substring(1);
@@ -435,7 +492,7 @@ namespace OpenRA
bitmap.Dispose();
Game.RunAfterTick(() => Debug("Saved screenshot " + filename));
RunAfterTick(() => Debug("Saved screenshot " + filename));
});
}
@@ -474,7 +531,11 @@ namespace OpenRA
Sound.Tick();
Sync.CheckSyncUnchanged(world, orderManager.TickImmediate);
if (world != null)
if (world == null)
return;
// Don't tick when the shellmap is disabled
if (world.ShouldTick)
{
var isNetTick = LocalTick % NetTickScale == 0;
@@ -484,6 +545,9 @@ namespace OpenRA
Log.Write("debug", "--Tick: {0} ({1})", LocalTick, isNetTick ? "net" : "local");
if (BenchmarkMode)
Log.Write("cpu", "{0};{1}".F(LocalTick, PerfHistory.Items["tick_time"].LastValue));
if (isNetTick)
orderManager.Tick();
@@ -497,19 +561,20 @@ namespace OpenRA
PerfHistory.Tick();
}
else
if (orderManager.NetFrameNumber == 0)
orderManager.LastTickTime = RunTime;
Sync.CheckSyncUnchanged(world, () => world.TickRender(worldRenderer));
else if (orderManager.NetFrameNumber == 0)
orderManager.LastTickTime = RunTime;
}
else
PerfHistory.Tick();
Sync.CheckSyncUnchanged(world, () => world.TickRender(worldRenderer));
}
}
}
static void LogicTick()
{
delayedActions.PerformActions(Game.RunTime);
delayedActions.PerformActions(RunTime);
if (OrderManager.Connection.ConnectionState != lastConnectionState)
{
@@ -542,9 +607,9 @@ namespace OpenRA
using (new PerfSample("render_widgets"))
{
Game.Renderer.WorldVoxelRenderer.BeginFrame();
Renderer.WorldVoxelRenderer.BeginFrame();
Ui.PrepareRenderables();
Game.Renderer.WorldVoxelRenderer.EndFrame();
Renderer.WorldVoxelRenderer.EndFrame();
Ui.Draw();
@@ -569,6 +634,9 @@ namespace OpenRA
PerfHistory.Items["batches"].Tick();
PerfHistory.Items["render_widgets"].Tick();
PerfHistory.Items["render_flip"].Tick();
if (BenchmarkMode)
Log.Write("render", "{0};{1}".F(RenderFrame, PerfHistory.Items["render"].LastValue));
}
static void Loop()
@@ -619,7 +687,7 @@ namespace OpenRA
{
// Ideal time between logic updates. Timestep = 0 means the game is paused
// but we still call LogicTick() because it handles pausing internally.
var logicInterval = worldRenderer != null && worldRenderer.World.Timestep != 0 ? worldRenderer.World.Timestep : Game.Timestep;
var logicInterval = worldRenderer != null && worldRenderer.World.Timestep != 0 ? worldRenderer.World.Timestep : Timestep;
// Ideal time between screen updates
var maxFramerate = Settings.Graphics.CapFramerate ? Settings.Graphics.MaxFramerate.Clamp(1, 1000) : 1000;
@@ -667,7 +735,7 @@ namespace OpenRA
}
}
else
Thread.Sleep(nextUpdate - now);
Thread.Sleep((int)(nextUpdate - now));
}
}
@@ -747,7 +815,7 @@ namespace OpenRA
public static void CreateServer(ServerSettings settings)
{
server = new Server.Server(new IPEndPoint(IPAddress.Any, settings.ListenPort), settings, ModData);
server = new Server.Server(new IPEndPoint(IPAddress.Any, settings.ListenPort), settings, ModData, false);
}
public static int CreateLocalServer(string map)
@@ -760,7 +828,7 @@ namespace OpenRA
AllowPortForward = false
};
server = new Server.Server(new IPEndPoint(IPAddress.Loopback, 0), settings, ModData);
server = new Server.Server(new IPEndPoint(IPAddress.Loopback, 0), settings, ModData, false);
return server.Port;
}

View File

@@ -1,10 +1,11 @@
#region Copyright & License Information
/*
* Copyright 2007-2015 The OpenRA Developers (see AUTHORS)
* Copyright 2007-2016 The OpenRA Developers (see AUTHORS)
* This file is part of OpenRA, which is free software. It is made
* available to you under the terms of the GNU General Public License
* as published by the Free Software Foundation. For more information,
* see COPYING.
* as published by the Free Software Foundation, either version 3 of
* the License, or (at your option) any later version. For more
* information, see COPYING.
*/
#endregion

View File

@@ -1,10 +1,11 @@
#region Copyright & License Information
/*
* Copyright 2007-2015 The OpenRA Developers (see AUTHORS)
* Copyright 2007-2016 The OpenRA Developers (see AUTHORS)
* This file is part of OpenRA, which is free software. It is made
* available to you under the terms of the GNU General Public License
* as published by the Free Software Foundation. For more information,
* see COPYING.
* as published by the Free Software Foundation, either version 3 of
* the License, or (at your option) any later version. For more
* information, see COPYING.
*/
#endregion
@@ -25,40 +26,30 @@ namespace OpenRA
/// The actor name can be anything, but the sprites used in the Render*: traits default to this one.
/// If you add an ^ in front of the name, the engine will recognize this as a collection of traits
/// that can be inherited by others (using Inherits:) and not a real unit.
/// You can remove inherited traits by adding a - infront of them as in -TraitName: to inherit everything, but this trait.
/// You can remove inherited traits by adding a - in front of them as in -TraitName: to inherit everything, but this trait.
/// </summary>
public readonly string Name;
readonly TypeDictionary traits = new TypeDictionary();
List<ITraitInfo> constructOrderCache = null;
public ActorInfo(string name, MiniYaml node, Dictionary<string, MiniYaml> allUnits)
public ActorInfo(ObjectCreator creator, string name, MiniYaml node)
{
try
{
var allParents = new HashSet<string>();
var abstractActorType = name.StartsWith("^");
// Guard against circular inheritance
allParents.Add(name);
var mergedNode = MergeWithParents(node, allUnits, allParents).ToDictionary();
Name = name;
foreach (var t in mergedNode)
var abstractActorType = name.StartsWith("^");
foreach (var t in node.Nodes)
{
if (t.Key[0] == '-')
throw new YamlException("Bogus trait removal: " + t.Key);
if (t.Key != "Inherits" && !t.Key.StartsWith("Inherits@"))
try
{
traits.Add(LoadTraitInfo(t.Key.Split('@')[0], t.Value));
}
catch (FieldLoader.MissingFieldsException e)
{
if (!abstractActorType)
throw new YamlException(e.Message);
}
try
{
traits.Add(LoadTraitInfo(creator, t.Key.Split('@')[0], t.Value));
}
catch (FieldLoader.MissingFieldsException e)
{
if (!abstractActorType)
throw new YamlException(e.Message);
}
}
}
catch (YamlException e)
@@ -74,42 +65,12 @@ namespace OpenRA
traits.Add(t);
}
static Dictionary<string, MiniYaml> GetParents(MiniYaml node, Dictionary<string, MiniYaml> allUnits)
{
return node.Nodes.Where(n => n.Key == "Inherits" || n.Key.StartsWith("Inherits@"))
.ToDictionary(n => n.Value.Value, n =>
{
MiniYaml i;
if (!allUnits.TryGetValue(n.Value.Value, out i))
throw new YamlException(
"Bogus inheritance -- parent type {0} does not exist".F(n.Value.Value));
return i;
});
}
static MiniYaml MergeWithParents(MiniYaml node, Dictionary<string, MiniYaml> allUnits, HashSet<string> allParents)
{
var parents = GetParents(node, allUnits);
foreach (var kv in parents)
{
if (!allParents.Add(kv.Key))
throw new YamlException(
"Bogus inheritance -- duplicate inheritance of {0}.".F(kv.Key));
node = MiniYaml.MergeStrict(node, MergeWithParents(kv.Value, allUnits, allParents));
}
return node;
}
static ITraitInfo LoadTraitInfo(string traitName, MiniYaml my)
static ITraitInfo LoadTraitInfo(ObjectCreator creator, string traitName, MiniYaml my)
{
if (!string.IsNullOrEmpty(my.Value))
throw new YamlException("Junk value `{0}` on trait node {1}"
.F(my.Value, traitName));
var info = Game.CreateObject<ITraitInfo>(traitName + "Info");
var info = creator.CreateObject<ITraitInfo>(traitName + "Info");
try
{
FieldLoader.Load(info, my);
@@ -139,9 +100,15 @@ namespace OpenRA
var unresolved = source.Except(resolved);
var testResolve = new Func<Type, Type, bool>((a, b) => a == b || a.IsAssignableFrom(b));
var more = unresolved.Where(u => u.Dependencies.All(d => resolved.Exists(r => testResolve(d, r.Type))));
// Re-evaluate the vars above until sorted
// This query detects which unresolved traits can be immediately resolved as all their direct dependencies are met.
var more = unresolved.Where(u =>
u.Dependencies.All(d => // To be resolvable, all dependencies must be satisfied according to the following conditions:
resolved.Exists(r => testResolve(d, r.Type)) && // There must exist a resolved trait that meets the dependency.
!unresolved.Any(u1 => testResolve(d, u1.Type)))); // All matching traits that meet this dependency must be resolved first.
// Continue resolving traits as long as possible.
// Each time we resolve some traits, this means dependencies for other traits may then be possible to satisfy in the next pass.
while (more.Any())
resolved.AddRange(more);
@@ -161,14 +128,14 @@ namespace OpenRA
exceptionString += u.Type + ": { " + string.Join(", ", deps) + " }\r\n";
}
throw new Exception(exceptionString);
throw new YamlException(exceptionString);
}
constructOrderCache = resolved.Select(r => r.Trait).ToList();
return constructOrderCache;
}
static IEnumerable<Type> PrerequisitesOf(ITraitInfo info)
public static IEnumerable<Type> PrerequisitesOf(ITraitInfo info)
{
return info
.GetType()
@@ -191,9 +158,9 @@ namespace OpenRA
i.Name.Replace("Init", ""), i));
}
public bool HasTraitInfo<T>() where T : ITraitInfo { return traits.Contains<T>(); }
public T TraitInfo<T>() where T : ITraitInfo { return traits.Get<T>(); }
public T TraitInfoOrDefault<T>() where T : ITraitInfo { return traits.GetOrDefault<T>(); }
public IEnumerable<T> TraitInfos<T>() where T : ITraitInfo { return traits.WithInterface<T>(); }
public bool HasTraitInfo<T>() where T : ITraitInfoInterface { return traits.Contains<T>(); }
public T TraitInfo<T>() where T : ITraitInfoInterface { return traits.Get<T>(); }
public T TraitInfoOrDefault<T>() where T : ITraitInfoInterface { return traits.GetOrDefault<T>(); }
public IEnumerable<T> TraitInfos<T>() where T : ITraitInfoInterface { return traits.WithInterface<T>(); }
}
}

View File

@@ -1,13 +1,15 @@
#region Copyright & License Information
/*
* Copyright 2007-2015 The OpenRA Developers (see AUTHORS)
* Copyright 2007-2016 The OpenRA Developers (see AUTHORS)
* This file is part of OpenRA, which is free software. It is made
* available to you under the terms of the GNU General Public License
* as published by the Free Software Foundation. For more information,
* see COPYING.
* as published by the Free Software Foundation, either version 3 of
* the License, or (at your option) any later version. For more
* information, see COPYING.
*/
#endregion
using System.IO;
using OpenRA.FileFormats;
using OpenRA.FileSystem;
@@ -34,19 +36,24 @@ namespace OpenRA.GameRules
Filename = (nd.ContainsKey("Filename") ? nd["Filename"].Value : key) + "." + ext;
}
public void Load()
public void Load(IReadOnlyFileSystem fileSystem)
{
if (!GlobalFileSystem.Exists(Filename))
Stream stream;
if (!fileSystem.TryOpen(Filename, out stream))
return;
Exists = true;
using (var s = GlobalFileSystem.Open(Filename))
ISoundFormat soundFormat;
foreach (var loader in Game.ModData.SoundLoaders)
{
if (Filename.ToLowerInvariant().EndsWith("wav"))
Length = (int)WavLoader.WaveLength(s);
else
Length = (int)AudLoader.SoundLength(s);
if (loader.TryParseSound(stream, out soundFormat))
{
Length = (int)soundFormat.LengthInSeconds;
break;
}
}
stream.Dispose();
}
}
}

View File

@@ -1,15 +1,19 @@
#region Copyright & License Information
/*
* Copyright 2007-2015 The OpenRA Developers (see AUTHORS)
* Copyright 2007-2016 The OpenRA Developers (see AUTHORS)
* This file is part of OpenRA, which is free software. It is made
* available to you under the terms of the GNU General Public License
* as published by the Free Software Foundation. For more information,
* see COPYING.
* as published by the Free Software Foundation, either version 3 of
* the License, or (at your option) any later version. For more
* information, see COPYING.
*/
#endregion
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using OpenRA.FileSystem;
using OpenRA.GameRules;
using OpenRA.Graphics;
using OpenRA.Traits;
@@ -23,25 +27,25 @@ namespace OpenRA
public readonly IReadOnlyDictionary<string, SoundInfo> Voices;
public readonly IReadOnlyDictionary<string, SoundInfo> Notifications;
public readonly IReadOnlyDictionary<string, MusicInfo> Music;
public readonly IReadOnlyDictionary<string, TileSet> TileSets;
public readonly IReadOnlyDictionary<string, SequenceProvider> Sequences;
public readonly TileSet TileSet;
public readonly SequenceProvider Sequences;
public Ruleset(
IDictionary<string, ActorInfo> actors,
IDictionary<string, WeaponInfo> weapons,
IDictionary<string, SoundInfo> voices,
IDictionary<string, SoundInfo> notifications,
IDictionary<string, MusicInfo> music,
IDictionary<string, TileSet> tileSets,
IDictionary<string, SequenceProvider> sequences)
IReadOnlyDictionary<string, ActorInfo> actors,
IReadOnlyDictionary<string, WeaponInfo> weapons,
IReadOnlyDictionary<string, SoundInfo> voices,
IReadOnlyDictionary<string, SoundInfo> notifications,
IReadOnlyDictionary<string, MusicInfo> music,
TileSet tileSet,
SequenceProvider sequences)
{
Actors = new ReadOnlyDictionary<string, ActorInfo>(actors);
Weapons = new ReadOnlyDictionary<string, WeaponInfo>(weapons);
Voices = new ReadOnlyDictionary<string, SoundInfo>(voices);
Notifications = new ReadOnlyDictionary<string, SoundInfo>(notifications);
Music = new ReadOnlyDictionary<string, MusicInfo>(music);
TileSets = new ReadOnlyDictionary<string, TileSet>(tileSets);
Sequences = new ReadOnlyDictionary<string, SequenceProvider>(sequences);
Actors = actors;
Weapons = weapons;
Voices = voices;
Notifications = notifications;
Music = music;
TileSet = tileSet;
Sequences = sequences;
foreach (var a in Actors.Values)
{
@@ -79,5 +83,172 @@ namespace OpenRA
}
public IEnumerable<KeyValuePair<string, MusicInfo>> InstalledMusic { get { return Music.Where(m => m.Value.Exists); } }
static IReadOnlyDictionary<string, T> MergeOrDefault<T>(string name, IReadOnlyFileSystem fileSystem, IEnumerable<string> files, MiniYaml additional,
IReadOnlyDictionary<string, T> defaults, Func<MiniYamlNode, T> makeObject)
{
if (additional == null && defaults != null)
return defaults;
var result = MiniYaml.Load(fileSystem, files, additional)
.ToDictionaryWithConflictLog(k => k.Key.ToLowerInvariant(), makeObject, "LoadFromManifest<" + name + ">");
return new ReadOnlyDictionary<string, T>(result);
}
public static Ruleset LoadDefaults(ModData modData)
{
var m = modData.Manifest;
var fs = modData.DefaultFileSystem;
Ruleset ruleset = null;
Action f = () =>
{
var actors = MergeOrDefault("Manifest,Rules", fs, m.Rules, null, null,
k => new ActorInfo(modData.ObjectCreator, k.Key.ToLowerInvariant(), k.Value));
var weapons = MergeOrDefault("Manifest,Weapons", fs, m.Weapons, null, null,
k => new WeaponInfo(k.Key.ToLowerInvariant(), k.Value));
var voices = MergeOrDefault("Manifest,Voices", fs, m.Voices, null, null,
k => new SoundInfo(k.Value));
var notifications = MergeOrDefault("Manifest,Notifications", fs, m.Notifications, null, null,
k => new SoundInfo(k.Value));
var music = MergeOrDefault("Manifest,Music", fs, m.Music, null, null,
k => new MusicInfo(k.Key, k.Value));
// The default ruleset does not include a preferred tileset or sequence set
ruleset = new Ruleset(actors, weapons, voices, notifications, music, null, null);
};
if (modData.IsOnMainThread)
{
modData.HandleLoadingProgress();
var loader = new Task(f);
loader.Start();
// Animate the loadscreen while we wait
while (!loader.Wait(40))
modData.HandleLoadingProgress();
}
else
f();
return ruleset;
}
public static Ruleset LoadDefaultsForTileSet(ModData modData, string tileSet)
{
var dr = modData.DefaultRules;
var ts = modData.DefaultTileSets[tileSet];
var sequences = modData.DefaultSequences[tileSet];
return new Ruleset(dr.Actors, dr.Weapons, dr.Voices, dr.Notifications, dr.Music, ts, sequences);
}
public static Ruleset Load(ModData modData, IReadOnlyFileSystem fileSystem, string tileSet,
MiniYaml mapRules, MiniYaml mapWeapons, MiniYaml mapVoices, MiniYaml mapNotifications,
MiniYaml mapMusic, MiniYaml mapSequences)
{
var m = modData.Manifest;
var dr = modData.DefaultRules;
Ruleset ruleset = null;
Action f = () =>
{
var actors = MergeOrDefault("Rules", fileSystem, m.Rules, mapRules, dr.Actors,
k => new ActorInfo(modData.ObjectCreator, k.Key.ToLowerInvariant(), k.Value));
var weapons = MergeOrDefault("Weapons", fileSystem, m.Weapons, mapWeapons, dr.Weapons,
k => new WeaponInfo(k.Key.ToLowerInvariant(), k.Value));
var voices = MergeOrDefault("Voices", fileSystem, m.Voices, mapVoices, dr.Voices,
k => new SoundInfo(k.Value));
var notifications = MergeOrDefault("Notifications", fileSystem, m.Notifications, mapNotifications, dr.Notifications,
k => new SoundInfo(k.Value));
var music = MergeOrDefault("Music", fileSystem, m.Music, mapMusic, dr.Music,
k => new MusicInfo(k.Key, k.Value));
// TODO: Add support for merging custom tileset modifications
var ts = modData.DefaultTileSets[tileSet];
// TODO: Top-level dictionary should be moved into the Ruleset instead of in its own object
var sequences = mapSequences == null ? modData.DefaultSequences[tileSet] :
new SequenceProvider(fileSystem, modData, ts, mapSequences);
// TODO: Add support for custom voxel sequences
ruleset = new Ruleset(actors, weapons, voices, notifications, music, ts, sequences);
};
if (modData.IsOnMainThread)
{
modData.HandleLoadingProgress();
var loader = new Task(f);
loader.Start();
// Animate the loadscreen while we wait
while (!loader.Wait(40))
modData.HandleLoadingProgress();
}
else
f();
return ruleset;
}
static bool AnyCustomYaml(MiniYaml yaml)
{
return yaml != null && (yaml.Value != null || yaml.Nodes.Any());
}
static bool AnyFlaggedTraits(ModData modData, List<MiniYamlNode> actors)
{
foreach (var actorNode in actors)
{
foreach (var traitNode in actorNode.Value.Nodes)
{
try
{
var traitName = traitNode.Key.Split('@')[0];
var traitType = modData.ObjectCreator.FindType(traitName + "Info");
if (traitType.GetInterface("ILobbyCustomRulesIgnore") == null)
return true;
}
catch { }
}
}
return false;
}
public static bool DefinesUnsafeCustomRules(ModData modData, IReadOnlyFileSystem fileSystem,
MiniYaml mapRules, MiniYaml mapWeapons, MiniYaml mapVoices, MiniYaml mapNotifications, MiniYaml mapSequences)
{
// Maps that define any weapon, voice, notification, or sequence overrides are always flagged
if (AnyCustomYaml(mapWeapons) || AnyCustomYaml(mapVoices) || AnyCustomYaml(mapNotifications) || AnyCustomYaml(mapSequences))
return true;
// Any trait overrides that aren't explicitly whitelisted are flagged
if (mapRules != null)
{
if (AnyFlaggedTraits(modData, mapRules.Nodes))
return true;
if (mapRules.Value != null)
{
var mapFiles = FieldLoader.GetValue<string[]>("value", mapRules.Value);
foreach (var f in mapFiles)
if (AnyFlaggedTraits(modData, MiniYaml.FromStream(fileSystem.Open(f), f)))
return true;
}
}
return false;
}
}
}

View File

@@ -1,159 +0,0 @@
#region Copyright & License Information
/*
* Copyright 2007-2015 The OpenRA Developers (see AUTHORS)
* This file is part of OpenRA, which is free software. It is made
* available to you under the terms of the GNU General Public License
* as published by the Free Software Foundation. For more information,
* see COPYING.
*/
#endregion
using System;
using System.Collections.Generic;
using System.Linq;
using OpenRA.GameRules;
using OpenRA.Graphics;
using OpenRA.Support;
namespace OpenRA
{
public sealed class RulesetCache : IDisposable
{
static readonly List<MiniYamlNode> NoMapRules = new List<MiniYamlNode>();
readonly ModData modData;
readonly Dictionary<string, ActorInfo> actorCache = new Dictionary<string, ActorInfo>();
readonly Dictionary<string, WeaponInfo> weaponCache = new Dictionary<string, WeaponInfo>();
readonly Dictionary<string, SoundInfo> voiceCache = new Dictionary<string, SoundInfo>();
readonly Dictionary<string, SoundInfo> notificationCache = new Dictionary<string, SoundInfo>();
readonly Dictionary<string, MusicInfo> musicCache = new Dictionary<string, MusicInfo>();
readonly Dictionary<string, TileSet> tileSetCache = new Dictionary<string, TileSet>();
readonly Dictionary<string, SequenceCache> sequenceCaches = new Dictionary<string, SequenceCache>();
public event EventHandler LoadingProgress;
void RaiseProgress()
{
if (LoadingProgress != null)
LoadingProgress(this, new EventArgs());
}
public RulesetCache(ModData modData)
{
this.modData = modData;
}
/// <summary>
/// Cache and return the Ruleset for a given map.
/// If a map isn't specified then return the default mod Ruleset.
/// </summary>
public Ruleset Load(Map map = null)
{
var m = modData.Manifest;
Dictionary<string, ActorInfo> actors;
Dictionary<string, WeaponInfo> weapons;
Dictionary<string, SoundInfo> voices;
Dictionary<string, SoundInfo> notifications;
Dictionary<string, MusicInfo> music;
Dictionary<string, TileSet> tileSets;
using (new PerfTimer("Actors"))
actors = LoadYamlRules(actorCache, m.Rules,
map != null ? map.RuleDefinitions : NoMapRules,
(k, y) => new ActorInfo(k.Key.ToLowerInvariant(), k.Value, y));
using (new PerfTimer("Weapons"))
weapons = LoadYamlRules(weaponCache, m.Weapons,
map != null ? map.WeaponDefinitions : NoMapRules,
(k, _) => new WeaponInfo(k.Key.ToLowerInvariant(), k.Value));
using (new PerfTimer("Voices"))
voices = LoadYamlRules(voiceCache, m.Voices,
map != null ? map.VoiceDefinitions : NoMapRules,
(k, _) => new SoundInfo(k.Value));
using (new PerfTimer("Notifications"))
notifications = LoadYamlRules(notificationCache, m.Notifications,
map != null ? map.NotificationDefinitions : NoMapRules,
(k, _) => new SoundInfo(k.Value));
using (new PerfTimer("Music"))
music = LoadYamlRules(musicCache, m.Music,
map != null ? map.MusicDefinitions : NoMapRules,
(k, _) => new MusicInfo(k.Key, k.Value));
using (new PerfTimer("TileSets"))
tileSets = LoadTileSets(tileSetCache, sequenceCaches, m.TileSets);
var sequences = sequenceCaches.ToDictionary(kvp => kvp.Key, kvp => new SequenceProvider(kvp.Value, map));
return new Ruleset(actors, weapons, voices, notifications, music, tileSets, sequences);
}
Dictionary<string, T> LoadYamlRules<T>(
Dictionary<string, T> itemCache,
string[] files, List<MiniYamlNode> nodes,
Func<MiniYamlNode, Dictionary<string, MiniYaml>, T> f)
{
RaiseProgress();
var inputKey = string.Concat(string.Join("|", files), "|", nodes.WriteToString());
var mergedNodes = files
.Select(s => MiniYaml.FromFile(s))
.Aggregate(nodes, MiniYaml.MergeLiberal);
Func<MiniYamlNode, Dictionary<string, MiniYaml>, T> wrap = (wkv, wyy) =>
{
var key = inputKey + wkv.Value.ToLines(wkv.Key).JoinWith("|");
T t;
if (itemCache.TryGetValue(key, out t))
return t;
t = f(wkv, wyy);
itemCache.Add(key, t);
RaiseProgress();
return t;
};
var yy = mergedNodes.ToDictionary(x => x.Key, x => x.Value);
var itemSet = mergedNodes.ToDictionaryWithConflictLog(kv => kv.Key.ToLowerInvariant(), kv => wrap(kv, yy), "LoadYamlRules", null, null);
RaiseProgress();
return itemSet;
}
Dictionary<string, TileSet> LoadTileSets(Dictionary<string, TileSet> itemCache, Dictionary<string, SequenceCache> sequenceCaches, string[] files)
{
var items = new Dictionary<string, TileSet>();
foreach (var file in files)
{
TileSet t;
if (itemCache.TryGetValue(file, out t))
items.Add(t.Id, t);
else
{
t = new TileSet(modData, file);
itemCache.Add(file, t);
// every time we load a tile set, we create a sequence cache for it
var sc = new SequenceCache(modData, t);
sequenceCaches.Add(t.Id, sc);
items.Add(t.Id, t);
}
}
return items;
}
public void Dispose()
{
foreach (var cache in sequenceCaches.Values)
cache.Dispose();
sequenceCaches.Clear();
}
}
}

View File

@@ -1,10 +1,11 @@
#region Copyright & License Information
/*
* Copyright 2007-2015 The OpenRA Developers (see AUTHORS)
* Copyright 2007-2016 The OpenRA Developers (see AUTHORS)
* This file is part of OpenRA, which is free software. It is made
* available to you under the terms of the GNU General Public License
* as published by the Free Software Foundation. For more information,
* see COPYING.
* as published by the Free Software Foundation, either version 3 of
* the License, or (at your option) any later version. For more
* information, see COPYING.
*/
#endregion

View File

@@ -1,10 +1,11 @@
#region Copyright & License Information
/*
* Copyright 2007-2015 The OpenRA Developers (see AUTHORS)
* Copyright 2007-2016 The OpenRA Developers (see AUTHORS)
* This file is part of OpenRA, which is free software. It is made
* available to you under the terms of the GNU General Public License
* as published by the Free Software Foundation. For more information,
* see COPYING.
* as published by the Free Software Foundation, either version 3 of
* the License, or (at your option) any later version. For more
* information, see COPYING.
*/
#endregion
@@ -24,12 +25,14 @@ namespace OpenRA.GameRules
public int[] RangeModifiers;
public int Facing;
public WPos Source;
public Func<WPos> CurrentSource;
public Actor SourceActor;
public WPos PassiveTarget;
public Target GuidedTarget;
}
public interface IProjectileInfo { IEffect Create(ProjectileArgs args); }
public interface IProjectile : IEffect { }
public interface IProjectileInfo { IProjectile Create(ProjectileArgs args); }
public sealed class WeaponInfo
{
@@ -45,8 +48,6 @@ namespace OpenRA.GameRules
[Desc("Number of shots in a single ammo magazine.")]
public readonly int Burst = 1;
public readonly bool Charges = false;
[Desc("What types of targets are affected.")]
public readonly HashSet<string> ValidTargets = new HashSet<string> { "Ground", "Water" };
@@ -126,14 +127,17 @@ namespace OpenRA.GameRules
/// <summary>Checks if the weapon is valid against (can target) the actor.</summary>
public bool IsValidAgainst(Actor victim, Actor firedBy)
{
var targetable = victim.TraitsImplementing<ITargetable>().Where(Exts.IsTraitEnabled);
if (!IsValidTarget(targetable.SelectMany(t => t.TargetTypes)))
var targetTypes = victim.GetEnabledTargetTypes();
if (!IsValidTarget(targetTypes))
return false;
if (!Warheads.Any(w => w.IsValidAgainst(victim, firedBy)))
return false;
// PERF: Avoid LINQ.
foreach (var warhead in Warheads)
if (warhead.IsValidAgainst(victim, firedBy))
return true;
return true;
return false;
}
/// <summary>Checks if the weapon is valid against (can target) the frozen actor.</summary>

View File

@@ -1,17 +1,15 @@
#region Copyright & License Information
/*
* Copyright 2007-2015 The OpenRA Developers (see AUTHORS)
* Copyright 2007-2016 The OpenRA Developers (see AUTHORS)
* This file is part of OpenRA, which is free software. It is made
* available to you under the terms of the GNU General Public License
* as published by the Free Software Foundation. For more information,
* see COPYING.
* as published by the Free Software Foundation, either version 3 of
* the License, or (at your option) any later version. For more
* information, see COPYING.
*/
#endregion
using System;
using System.Collections.Generic;
using System.Linq;
using OpenRA.Graphics;
namespace OpenRA
{

View File

@@ -1,20 +1,19 @@
#region Copyright & License Information
/*
* Copyright 2007-2015 The OpenRA Developers (see AUTHORS)
* Copyright 2007-2016 The OpenRA Developers (see AUTHORS)
* This file is part of OpenRA, which is free software. It is made
* available to you under the terms of the GNU General Public License
* as published by the Free Software Foundation. For more information,
* see COPYING.
* as published by the Free Software Foundation, either version 3 of
* the License, or (at your option) any later version. For more
* information, see COPYING.
*/
#endregion
using System;
using System.Collections;
using System.Collections.Generic;
using System.Linq;
using System.Threading;
using Meebey.SmartIrc4net;
using OpenRA;
using OpenRA.Primitives;
namespace OpenRA.Chat
@@ -66,7 +65,7 @@ namespace OpenRA.Chat
}
}
public class GlobalChat : IDisposable
public sealed class GlobalChat : IDisposable
{
readonly IrcClient client = new IrcClient();
volatile Channel channel;
@@ -107,6 +106,8 @@ namespace OpenRA.Chat
client.OnDevoice += (_, e) => SetUserVoiced(e.Whom, false);
client.OnPart += OnPart;
client.OnQuit += OnQuit;
TrySetNickname(Game.Settings.Player.Name);
}
void SetUserOp(string whom, bool isOp)
@@ -150,7 +151,7 @@ namespace OpenRA.Chat
}
client.Listen();
}) { Name = "IrcListenThread" }.Start();
}) { Name = "IrcListenThread", IsBackground = true }.Start();
}
void AddNotification(string text)
@@ -225,14 +226,22 @@ namespace OpenRA.Chat
void OnKick(object sender, KickEventArgs e)
{
Disconnect();
connectionStatus = ChatConnectionStatus.Error;
AddNotification("Error: You were kicked from the chat by {0}".F(e.Who));
if (e.Whom == client.Nickname)
{
Disconnect();
connectionStatus = ChatConnectionStatus.Error;
AddNotification("You were kicked from the chat by {0}. ({1})".F(e.Who, e.KickReason));
}
else
{
Users.Remove(e.Whom);
AddNotification("{0} was kicked from the chat by {1}. ({2})".F(e.Whom, e.Who, e.KickReason));
}
}
void OnJoin(object sender, JoinEventArgs e)
{
if (e.Who == client.Nickname || e.Channel != channel.Name)
if (e.Who == client.Nickname || channel == null || e.Channel != channel.Name)
return;
AddNotification("{0} joined the chat.".F(e.Who));
@@ -275,7 +284,7 @@ namespace OpenRA.Chat
void OnPart(object sender, PartEventArgs e)
{
if (e.Data.Channel != channel.Name)
if (channel == null || e.Data.Channel != channel.Name)
return;
AddNotification("{0} left the chat.".F(e.Who));
@@ -364,8 +373,19 @@ namespace OpenRA.Chat
public void Dispose()
{
if (client.IsConnected)
client.Disconnect();
// HACK: The IRC library we are using has terrible thread-handling code that relies on Thread.Abort.
// There is a thread reading from the network socket which is aborted, however on Windows this is inside
// native code so this abort call hangs until the network socket reads something and returns to managed
// code where it can then be aborted.
//
// This means we may hang for several seconds during shutdown (until we receive something over IRC!) before
// closing.
//
// Since our IRC client currently lives forever, the only time we call this Dispose method is during the
// shutdown of our process. Therefore, we can work around the problem by just not bothering to disconnect
// properly. Since our process is about to die anyway, it's not like anyone will care.
////if (client.IsConnected)
//// client.Disconnect();
}
}
}

View File

@@ -1,10 +1,11 @@
#region Copyright & License Information
/*
* Copyright 2007-2015 The OpenRA Developers (see AUTHORS)
* Copyright 2007-2016 The OpenRA Developers (see AUTHORS)
* This file is part of OpenRA, which is free software. It is made
* available to you under the terms of the GNU General Public License
* as published by the Free Software Foundation. For more information,
* see COPYING.
* as published by the Free Software Foundation, either version 3 of
* the License, or (at your option) any later version. For more
* information, see COPYING.
*/
#endregion
@@ -17,36 +18,35 @@ namespace OpenRA.Graphics
{
public class Animation
{
readonly int defaultTick = 40; // 25 fps == 40 ms
public ISpriteSequence CurrentSequence { get; private set; }
public bool IsDecoration = false;
public Func<bool> Paused;
readonly Func<int> facingFunc;
int frame = 0;
bool backwards = false;
string name;
bool tickAlways;
public string Name { get { return name; } }
public string Name { get; private set; }
public bool IsDecoration { get; set; }
readonly SequenceProvider sequenceProvider;
readonly Func<int> facingFunc;
readonly Func<bool> paused;
int frame;
bool backwards;
bool tickAlways;
int timeUntilNextFrame;
Action tickFunc = () => { };
public Animation(World world, string name)
: this(world, name, () => 0) { }
public Animation(World world, string name, Func<int> facingFunc)
: this(world.Map.SequenceProvider, name, facingFunc) { }
: this(world, name, facingFunc, null) { }
public Animation(SequenceProvider sequenceProvider, string name, Func<int> facingFunc)
public Animation(World world, string name, Func<bool> paused)
: this(world, name, () => 0, paused) { }
public Animation(World world, string name, Func<int> facingFunc, Func<bool> paused)
{
this.sequenceProvider = sequenceProvider;
this.name = name.ToLowerInvariant();
this.tickFunc = () => { };
sequenceProvider = world.Map.Rules.Sequences;
Name = name.ToLowerInvariant();
this.facingFunc = facingFunc;
this.paused = paused;
}
public int CurrentFrame { get { return backwards ? CurrentSequence.Start + CurrentSequence.Length - frame - 1 : frame; } }
@@ -76,12 +76,23 @@ namespace OpenRA.Graphics
PlayThen(sequenceName, null);
}
int CurrentSequenceTickOrDefault()
{
const int DefaultTick = 40; // 25 fps == 40 ms
return CurrentSequence != null ? CurrentSequence.Tick : DefaultTick;
}
void PlaySequence(string sequenceName)
{
CurrentSequence = GetSequence(sequenceName);
timeUntilNextFrame = CurrentSequenceTickOrDefault();
}
public void PlayRepeating(string sequenceName)
{
backwards = false;
tickAlways = false;
CurrentSequence = sequenceProvider.GetSequence(name, sequenceName);
timeUntilNextFrame = CurrentSequence != null ? CurrentSequence.Tick : defaultTick;
PlaySequence(sequenceName);
frame = 0;
tickFunc = () =>
@@ -97,9 +108,8 @@ namespace OpenRA.Graphics
if (!HasSequence(sequenceName))
return false;
CurrentSequence = sequenceProvider.GetSequence(name, sequenceName);
var tick = CurrentSequence != null ? CurrentSequence.Tick : defaultTick;
timeUntilNextFrame = Math.Min(tick, timeUntilNextFrame);
CurrentSequence = GetSequence(sequenceName);
timeUntilNextFrame = Math.Min(CurrentSequenceTickOrDefault(), timeUntilNextFrame);
frame %= CurrentSequence.Length;
return true;
}
@@ -108,8 +118,7 @@ namespace OpenRA.Graphics
{
backwards = false;
tickAlways = false;
CurrentSequence = sequenceProvider.GetSequence(name, sequenceName);
timeUntilNextFrame = CurrentSequence != null ? CurrentSequence.Tick : defaultTick;
PlaySequence(sequenceName);
frame = 0;
tickFunc = () =>
@@ -134,8 +143,7 @@ namespace OpenRA.Graphics
{
backwards = false;
tickAlways = true;
CurrentSequence = sequenceProvider.GetSequence(name, sequenceName);
timeUntilNextFrame = CurrentSequence != null ? CurrentSequence.Tick : defaultTick;
PlaySequence(sequenceName);
frame = func();
tickFunc = () => frame = func();
@@ -144,8 +152,7 @@ namespace OpenRA.Graphics
public void PlayFetchDirection(string sequenceName, Func<int> direction)
{
tickAlways = false;
CurrentSequence = sequenceProvider.GetSequence(name, sequenceName);
timeUntilNextFrame = CurrentSequence != null ? CurrentSequence.Tick : defaultTick;
PlaySequence(sequenceName);
frame = 0;
tickFunc = () =>
@@ -159,17 +166,12 @@ namespace OpenRA.Graphics
};
}
int timeUntilNextFrame;
Action tickFunc;
public void Tick()
{
if (Paused == null || !Paused())
if (paused == null || !paused())
Tick(40); // tick one frame
}
public bool HasSequence(string seq) { return sequenceProvider.HasSequence(name, seq); }
public void Tick(int t)
{
if (tickAlways)
@@ -180,7 +182,7 @@ namespace OpenRA.Graphics
while (timeUntilNextFrame <= 0)
{
tickFunc();
timeUntilNextFrame += CurrentSequence != null ? CurrentSequence.Tick : defaultTick;
timeUntilNextFrame += CurrentSequenceTickOrDefault();
}
}
}
@@ -189,17 +191,19 @@ namespace OpenRA.Graphics
{
newImage = newImage.ToLowerInvariant();
if (name != newImage)
if (Name != newImage)
{
name = newImage.ToLowerInvariant();
Name = newImage;
if (!ReplaceAnim(CurrentSequence.Name))
ReplaceAnim(newAnimIfMissing);
}
}
public bool HasSequence(string seq) { return sequenceProvider.HasSequence(Name, seq); }
public ISpriteSequence GetSequence(string sequenceName)
{
return sequenceProvider.GetSequence(name, sequenceName);
return sequenceProvider.GetSequence(Name, sequenceName);
}
public string GetRandomExistingSequence(string[] sequences, MersenneTwister random)

View File

@@ -1,10 +1,11 @@
#region Copyright & License Information
/*
* Copyright 2007-2015 The OpenRA Developers (see AUTHORS)
* Copyright 2007-2016 The OpenRA Developers (see AUTHORS)
* This file is part of OpenRA, which is free software. It is made
* available to you under the terms of the GNU General Public License
* as published by the Free Software Foundation. For more information,
* see COPYING.
* as published by the Free Software Foundation, either version 3 of
* the License, or (at your option) any later version. For more
* information, see COPYING.
*/
#endregion
@@ -18,22 +19,20 @@ namespace OpenRA.Graphics
public readonly Animation Animation;
public readonly Func<WVec> OffsetFunc;
public readonly Func<bool> DisableFunc;
public readonly Func<bool> Paused;
public readonly Func<WPos, int> ZOffset;
public AnimationWithOffset(Animation a, Func<WVec> offset, Func<bool> disable)
: this(a, offset, disable, () => false, null) { }
: this(a, offset, disable, null) { }
public AnimationWithOffset(Animation a, Func<WVec> offset, Func<bool> disable, int zOffset)
: this(a, offset, disable, () => false, _ => zOffset) { }
: this(a, offset, disable, _ => zOffset) { }
public AnimationWithOffset(Animation a, Func<WVec> offset, Func<bool> disable, Func<bool> pause, Func<WPos, int> zOffset)
public AnimationWithOffset(Animation a, Func<WVec> offset, Func<bool> disable, Func<WPos, int> zOffset)
{
this.Animation = a;
this.Animation.Paused = pause;
this.OffsetFunc = offset;
this.DisableFunc = disable;
this.ZOffset = zOffset;
Animation = a;
OffsetFunc = offset;
DisableFunc = disable;
ZOffset = zOffset;
}
public IEnumerable<IRenderable> Render(Actor self, WorldRenderer wr, PaletteReference pal, float scale)
@@ -47,7 +46,7 @@ namespace OpenRA.Graphics
public static implicit operator AnimationWithOffset(Animation a)
{
return new AnimationWithOffset(a, null, null, null, null);
return new AnimationWithOffset(a, null, null, null);
}
}
}

View File

@@ -1,15 +1,17 @@
#region Copyright & License Information
/*
* Copyright 2007-2015 The OpenRA Developers (see AUTHORS)
* Copyright 2007-2016 The OpenRA Developers (see AUTHORS)
* This file is part of OpenRA, which is free software. It is made
* available to you under the terms of the GNU General Public License
* as published by the Free Software Foundation. For more information,
* see COPYING.
* as published by the Free Software Foundation, either version 3 of
* the License, or (at your option) any later version. For more
* information, see COPYING.
*/
#endregion
using System.Collections.Generic;
using System.Linq;
using OpenRA.FileSystem;
namespace OpenRA.Graphics
{
@@ -24,16 +26,19 @@ namespace OpenRA.Graphics
static Dictionary<string, Collection> collections;
static Dictionary<string, Sheet> cachedSheets;
static Dictionary<string, Dictionary<string, Sprite>> cachedSprites;
static IReadOnlyFileSystem fileSystem;
public static void Initialize(IEnumerable<string> chromeFiles)
public static void Initialize(ModData modData)
{
Deinitialize();
fileSystem = modData.DefaultFileSystem;
collections = new Dictionary<string, Collection>();
cachedSheets = new Dictionary<string, Sheet>();
cachedSprites = new Dictionary<string, Dictionary<string, Sprite>>();
var chrome = chromeFiles.Select(s => MiniYaml.FromFile(s)).Aggregate(MiniYaml.MergeLiberal);
var chrome = MiniYaml.Merge(modData.Manifest.Chrome
.Select(s => MiniYaml.FromStream(fileSystem.Open(s), s)));
foreach (var c in chrome)
LoadCollection(c.Key, c.Value);
@@ -83,6 +88,9 @@ namespace OpenRA.Graphics
public static Sprite GetImage(string collectionName, string imageName)
{
if (string.IsNullOrEmpty(collectionName))
return null;
// Cached sprite
Dictionary<string, Sprite> cachedCollection;
Sprite sprite;
@@ -106,7 +114,9 @@ namespace OpenRA.Graphics
sheet = cachedSheets[mi.Src];
else
{
sheet = new Sheet(SheetType.BGRA, mi.Src);
using (var stream = fileSystem.Open(mi.Src))
sheet = new Sheet(SheetType.BGRA, stream);
cachedSheets.Add(mi.Src, sheet);
}

View File

@@ -1,19 +1,17 @@
#region Copyright & License Information
/*
* Copyright 2007-2015 The OpenRA Developers (see AUTHORS)
* Copyright 2007-2016 The OpenRA Developers (see AUTHORS)
* This file is part of OpenRA, which is free software. It is made
* available to you under the terms of the GNU General Public License
* as published by the Free Software Foundation. For more information,
* see COPYING.
* as published by the Free Software Foundation, either version 3 of
* the License, or (at your option) any later version. For more
* information, see COPYING.
*/
#endregion
using System;
using System.Collections.Generic;
using System.Drawing;
using System.Linq;
using OpenRA.FileSystem;
using OpenRA.Primitives;
namespace OpenRA.Graphics
{
@@ -24,11 +22,13 @@ namespace OpenRA.Graphics
public CursorProvider(ModData modData)
{
var sequenceFiles = modData.Manifest.Cursors;
var sequences = new MiniYaml(null, sequenceFiles.Select(s => MiniYaml.FromFile(s)).Aggregate(MiniYaml.MergeLiberal));
var fileSystem = modData.DefaultFileSystem;
var sequenceYaml = MiniYaml.Merge(modData.Manifest.Cursors.Select(
s => MiniYaml.FromStream(fileSystem.Open(s), s)));
var shadowIndex = new int[] { };
var nodesDict = sequences.ToDictionary();
var nodesDict = new MiniYaml(null, sequenceYaml).ToDictionary();
if (nodesDict.ContainsKey("ShadowIndex"))
{
Array.Resize(ref shadowIndex, shadowIndex.Length + 1);
@@ -38,11 +38,11 @@ namespace OpenRA.Graphics
var palettes = new Dictionary<string, ImmutablePalette>();
foreach (var p in nodesDict["Palettes"].Nodes)
palettes.Add(p.Key, new ImmutablePalette(GlobalFileSystem.Open(p.Value.Value), shadowIndex));
palettes.Add(p.Key, new ImmutablePalette(fileSystem.Open(p.Value.Value), shadowIndex));
Palettes = palettes.AsReadOnly();
var frameCache = new FrameCache(modData.SpriteLoaders);
var frameCache = new FrameCache(fileSystem, modData.SpriteLoaders);
var cursors = new Dictionary<string, CursorSequence>();
foreach (var s in nodesDict["Cursors"].Nodes)
foreach (var sequence in s.Value.Nodes)

View File

@@ -1,10 +1,11 @@
#region Copyright & License Information
/*
* Copyright 2007-2015 The OpenRA Developers (see AUTHORS)
* Copyright 2007-2016 The OpenRA Developers (see AUTHORS)
* This file is part of OpenRA, which is free software. It is made
* available to you under the terms of the GNU General Public License
* as published by the Free Software Foundation. For more information,
* see COPYING.
* as published by the Free Software Foundation, either version 3 of
* the License, or (at your option) any later version. For more
* information, see COPYING.
*/
#endregion

View File

@@ -1,14 +1,16 @@
#region Copyright & License Information
/*
* Copyright 2007-2015 The OpenRA Developers (see AUTHORS)
* Copyright 2007-2016 The OpenRA Developers (see AUTHORS)
* This file is part of OpenRA, which is free software. It is made
* available to you under the terms of the GNU General Public License
* as published by the Free Software Foundation. For more information,
* see COPYING.
* as published by the Free Software Foundation, either version 3 of
* the License, or (at your option) any later version. For more
* information, see COPYING.
*/
#endregion
using System.Drawing;
using System.Globalization;
using OpenRA.Scripting;
namespace OpenRA.Graphics
@@ -27,13 +29,17 @@ namespace OpenRA.Graphics
return new HSLColor((byte)(255 * h), (byte)(255 * ss), (byte)(255 * ll));
}
public HSLColor(Color color)
{
RGB = color;
H = (byte)((color.GetHue() / 360.0f) * 255);
S = (byte)(color.GetSaturation() * 255);
L = (byte)(color.GetBrightness() * 255);
}
public static HSLColor FromRGB(int r, int g, int b)
{
var c = Color.FromArgb(r, g, b);
var h = (byte)((c.GetHue() / 360.0f) * 255);
var s = (byte)(c.GetSaturation() * 255);
var l = (byte)(c.GetBrightness() * 255);
return new HSLColor(h, s, l);
return new HSLColor(Color.FromArgb(r, g, b));
}
public static Color RGBFromHSL(float h, float s, float l)
@@ -66,6 +72,27 @@ namespace OpenRA.Graphics
return Color.FromArgb((int)(rgb[0] * 255), (int)(rgb[1] * 255), (int)(rgb[2] * 255));
}
public static bool TryParseRGB(string value, out Color color)
{
color = new Color();
value = value.Trim();
if (value.Length != 6 && value.Length != 8)
return false;
byte red, green, blue, alpha = 255;
if (!byte.TryParse(value.Substring(0, 2), NumberStyles.HexNumber, CultureInfo.InvariantCulture, out red)
|| !byte.TryParse(value.Substring(2, 2), NumberStyles.HexNumber, CultureInfo.InvariantCulture, out green)
|| !byte.TryParse(value.Substring(4, 2), NumberStyles.HexNumber, CultureInfo.InvariantCulture, out blue))
return false;
if (value.Length == 8
&& !byte.TryParse(value.Substring(6, 2), NumberStyles.HexNumber, CultureInfo.InvariantCulture, out alpha))
return false;
color = Color.FromArgb(alpha, red, green, blue);
return true;
}
public static bool operator ==(HSLColor me, HSLColor other)
{
return me.H == other.H && me.S == other.S && me.L == other.L;
@@ -96,6 +123,18 @@ namespace OpenRA.Graphics
return "{0},{1},{2}".F(H, S, L);
}
public static string ToHexString(Color color)
{
if (color.A == 255)
return color.R.ToString("X2") + color.G.ToString("X2") + color.B.ToString("X2");
return color.R.ToString("X2") + color.G.ToString("X2") + color.B.ToString("X2") + color.A.ToString("X2");
}
public string ToHexString()
{
return ToHexString(RGB);
}
public override int GetHashCode() { return H.GetHashCode() ^ S.GetHashCode() ^ L.GetHashCode(); }
public override bool Equals(object obj)

View File

@@ -1,23 +1,22 @@
#region Copyright & License Information
/*
* Copyright 2007-2015 The OpenRA Developers (see AUTHORS)
* This file is part of OpenRA, which is free software. It is made
* available to you under the terms of the GNU General Public License
* as published by the Free Software Foundation. For more information,
* see COPYING.
*/
* Copyright 2007-2016 The OpenRA Developers (see AUTHORS)
* This file is part of OpenRA, which is free software. It is made
* available to you under the terms of the GNU General Public License
* as published by the Free Software Foundation, either version 3 of
* the License, or (at your option) any later version. For more
* information, see COPYING.
*/
#endregion
using System;
using System.Collections.Generic;
using System.Drawing;
using System.Linq;
using OpenRA.Graphics;
using OpenRA.Primitives;
namespace OpenRA.Graphics
{
public class HardwareCursor : ICursor
public sealed class HardwareCursor : ICursor
{
readonly Dictionary<string, IHardwareCursor[]> hardwareCursors = new Dictionary<string, IHardwareCursor[]>();
readonly CursorProvider cursorProvider;

View File

@@ -1,10 +1,11 @@
#region Copyright & License Information
/*
* Copyright 2007-2015 The OpenRA Developers (see AUTHORS)
* Copyright 2007-2016 The OpenRA Developers (see AUTHORS)
* This file is part of OpenRA, which is free software. It is made
* available to you under the terms of the GNU General Public License
* as published by the Free Software Foundation. For more information,
* see COPYING.
* as published by the Free Software Foundation, either version 3 of
* the License, or (at your option) any later version. For more
* information, see COPYING.
*/
#endregion

View File

@@ -1,174 +0,0 @@
#region Copyright & License Information
/*
* Copyright 2007-2015 The OpenRA Developers (see AUTHORS)
* This file is part of OpenRA, which is free software. It is made
* available to you under the terms of the GNU General Public License
* as published by the Free Software Foundation. For more information,
* see COPYING.
*/
#endregion
using System;
using System.Collections.Generic;
using System.Drawing;
namespace OpenRA.Graphics
{
public class LineRenderer : Renderer.IBatchRenderer
{
static readonly float2 Offset = new float2(0.5f, 0.5f);
readonly Renderer renderer;
readonly IShader shader;
readonly Action renderAction;
readonly Vertex[] vertices;
int nv = 0;
float lineWidth = 1f;
public LineRenderer(Renderer renderer, IShader shader)
{
this.renderer = renderer;
this.shader = shader;
vertices = new Vertex[renderer.TempBufferSize];
renderAction = () =>
{
renderer.SetLineWidth(LineWidth);
renderer.DrawBatch(vertices, nv, PrimitiveType.LineList);
};
}
public float LineWidth
{
get
{
return lineWidth;
}
set
{
if (LineWidth != value)
Flush();
lineWidth = value;
}
}
public void Flush()
{
if (nv > 0)
{
renderer.Device.SetBlendMode(BlendMode.Alpha);
shader.Render(renderAction);
renderer.Device.SetBlendMode(BlendMode.None);
nv = 0;
}
}
public void DrawRect(float2 tl, float2 br, Color c)
{
var tr = new float2(br.X, tl.Y);
var bl = new float2(tl.X, br.Y);
DrawLine(tl, tr, c);
DrawLine(tl, bl, c);
DrawLine(tr, br, c);
DrawLine(bl, br, c);
}
public void DrawLine(float2 start, float2 end, Color color)
{
renderer.CurrentBatchRenderer = this;
if (nv + 2 > renderer.TempBufferSize)
Flush();
color = Util.PremultiplyAlpha(color);
var r = color.R / 255.0f;
var g = color.G / 255.0f;
var b = color.B / 255.0f;
var a = color.A / 255.0f;
vertices[nv++] = new Vertex(start + Offset, r, g, b, a);
vertices[nv++] = new Vertex(end + Offset, r, g, b, a);
}
public void DrawLine(float2 start, float2 end, Color startColor, Color endColor)
{
renderer.CurrentBatchRenderer = this;
if (nv + 2 > renderer.TempBufferSize)
Flush();
startColor = Util.PremultiplyAlpha(startColor);
var r = startColor.R / 255.0f;
var g = startColor.G / 255.0f;
var b = startColor.B / 255.0f;
var a = startColor.A / 255.0f;
vertices[nv++] = new Vertex(start + Offset, r, g, b, a);
endColor = Util.PremultiplyAlpha(endColor);
r = endColor.R / 255.0f;
g = endColor.G / 255.0f;
b = endColor.B / 255.0f;
a = endColor.A / 255.0f;
vertices[nv++] = new Vertex(end + Offset, r, g, b, a);
}
public void DrawLineStrip(IEnumerable<float2> points, Color color)
{
renderer.CurrentBatchRenderer = this;
color = Util.PremultiplyAlpha(color);
var r = color.R / 255.0f;
var g = color.G / 255.0f;
var b = color.B / 255.0f;
var a = color.A / 255.0f;
var first = true;
var prev = new Vertex();
foreach (var point in points)
{
if (first)
{
first = false;
prev = new Vertex(point + Offset, r, g, b, a);
continue;
}
if (nv + 2 > renderer.TempBufferSize)
Flush();
vertices[nv++] = prev;
prev = new Vertex(point + Offset, r, g, b, a);
vertices[nv++] = prev;
}
}
public void FillRect(RectangleF r, Color color)
{
for (var y = r.Top; y < r.Bottom; y++)
DrawLine(new float2(r.Left, y), new float2(r.Right, y), color);
}
public void FillEllipse(RectangleF r, Color color)
{
var a = (r.Right - r.Left) / 2;
var b = (r.Bottom - r.Top) / 2;
var xc = (r.Right + r.Left) / 2;
var yc = (r.Bottom + r.Top) / 2;
for (var y = r.Top; y <= r.Bottom; y++)
{
var dx = a * (float)Math.Sqrt(1 - (y - yc) * (y - yc) / b / b);
DrawLine(new float2(xc - dx, y), new float2(xc + dx, y), color);
}
}
public void SetViewportParams(Size screen, float zoom, int2 scroll)
{
shader.SetVec("Scroll", scroll.X, scroll.Y);
shader.SetVec("r1", zoom * 2f / screen.Width, -zoom * 2f / screen.Height);
shader.SetVec("r2", -1, 1);
}
}
}

View File

@@ -1,10 +1,11 @@
#region Copyright & License Information
/*
* Copyright 2007-2015 The OpenRA Developers (see AUTHORS)
* Copyright 2007-2016 The OpenRA Developers (see AUTHORS)
* This file is part of OpenRA, which is free software. It is made
* available to you under the terms of the GNU General Public License
* as published by the Free Software Foundation. For more information,
* see COPYING.
* as published by the Free Software Foundation, either version 3 of
* the License, or (at your option) any later version. For more
* information, see COPYING.
*/
#endregion
@@ -37,7 +38,7 @@ namespace OpenRA.Graphics
if (defaultSrc != Src)
root.Add(new MiniYamlNode("Src", Src));
return new MiniYaml(FieldSaver.FormatValue(this, this.GetType().GetField("rect")), root);
return new MiniYaml(FieldSaver.FormatValue(this, GetType().GetField("rect")), root);
}
}
}

View File

@@ -1,148 +0,0 @@
#region Copyright & License Information
/*
* Copyright 2007-2015 The OpenRA Developers (see AUTHORS)
* This file is part of OpenRA, which is free software. It is made
* available to you under the terms of the GNU General Public License
* as published by the Free Software Foundation. For more information,
* see COPYING.
*/
#endregion
using System;
using System.Drawing;
using System.Drawing.Imaging;
using System.Linq;
using OpenRA.Traits;
namespace OpenRA.Graphics
{
public static class Minimap
{
public static Bitmap TerrainBitmap(TileSet tileset, Map map, bool actualSize = false)
{
var isRectangularIsometric = map.Grid.Type == MapGridType.RectangularIsometric;
var b = map.Bounds;
// Fudge the heightmap offset by adding as much extra as we need / can.
// This tries to correct for our incorrect assumption that MPos == PPos
var heightOffset = Math.Min(map.Grid.MaximumTerrainHeight, map.MapSize.Y - b.Bottom);
var width = b.Width;
var height = b.Height + heightOffset;
var bitmapWidth = width;
if (isRectangularIsometric)
bitmapWidth = 2 * bitmapWidth - 1;
if (!actualSize)
bitmapWidth = height = Exts.NextPowerOf2(Math.Max(bitmapWidth, height));
var terrain = new Bitmap(bitmapWidth, height);
var bitmapData = terrain.LockBits(terrain.Bounds(),
ImageLockMode.ReadWrite, PixelFormat.Format32bppArgb);
var mapTiles = map.MapTiles.Value;
unsafe
{
var colors = (int*)bitmapData.Scan0;
var stride = bitmapData.Stride / 4;
for (var y = 0; y < height; y++)
{
for (var x = 0; x < width; x++)
{
var uv = new MPos(x + b.Left, y + b.Top);
var type = tileset.GetTileInfo(mapTiles[uv]);
var leftColor = type != null ? type.LeftColor : Color.Black;
if (isRectangularIsometric)
{
// Odd rows are shifted right by 1px
var dx = uv.V & 1;
var rightColor = type != null ? type.RightColor : Color.Black;
if (x + dx > 0)
colors[y * stride + 2 * x + dx - 1] = leftColor.ToArgb();
if (2 * x + dx < stride)
colors[y * stride + 2 * x + dx] = rightColor.ToArgb();
}
else
colors[y * stride + x] = leftColor.ToArgb();
}
}
}
terrain.UnlockBits(bitmapData);
return terrain;
}
// Add the static resources defined in the map; if the map lives
// in a world use AddCustomTerrain instead
static Bitmap AddStaticResources(TileSet tileset, Map map, Ruleset resourceRules, Bitmap terrainBitmap)
{
var terrain = new Bitmap(terrainBitmap);
var isRectangularIsometric = map.Grid.Type == MapGridType.RectangularIsometric;
var b = map.Bounds;
// Fudge the heightmap offset by adding as much extra as we need / can
// This tries to correct for our incorrect assumption that MPos == PPos
var heightOffset = Math.Min(map.Grid.MaximumTerrainHeight, map.MapSize.Y - b.Bottom);
var width = b.Width;
var height = b.Height + heightOffset;
var resources = resourceRules.Actors["world"].TraitInfos<ResourceTypeInfo>()
.ToDictionary(r => r.ResourceType, r => r.TerrainType);
var bitmapData = terrain.LockBits(terrain.Bounds(),
ImageLockMode.ReadWrite, PixelFormat.Format32bppArgb);
unsafe
{
var colors = (int*)bitmapData.Scan0;
var stride = bitmapData.Stride / 4;
for (var y = 0; y < height; y++)
{
for (var x = 0; x < width; x++)
{
var uv = new MPos(x + b.Left, y + b.Top);
if (map.MapResources.Value[uv].Type == 0)
continue;
string res;
if (!resources.TryGetValue(map.MapResources.Value[uv].Type, out res))
continue;
var color = tileset[tileset.GetTerrainIndex(res)].Color.ToArgb();
if (isRectangularIsometric)
{
// Odd rows are shifted right by 1px
var dx = uv.V & 1;
if (x + dx > 0)
colors[y * stride + 2 * x + dx - 1] = color;
if (2 * x + dx < stride)
colors[y * stride + 2 * x + dx] = color;
}
else
colors[y * stride + x] = color;
}
}
}
terrain.UnlockBits(bitmapData);
return terrain;
}
public static Bitmap RenderMapPreview(TileSet tileset, Map map, bool actualSize)
{
return RenderMapPreview(tileset, map, map.Rules, actualSize);
}
public static Bitmap RenderMapPreview(TileSet tileset, Map map, Ruleset resourceRules, bool actualSize)
{
using (var terrain = TerrainBitmap(tileset, map, actualSize))
return AddStaticResources(tileset, map, resourceRules, terrain);
}
}
}

View File

@@ -1,10 +1,11 @@
#region Copyright & License Information
/*
* Copyright 2007-2015 The OpenRA Developers (see AUTHORS)
* Copyright 2007-2016 The OpenRA Developers (see AUTHORS)
* This file is part of OpenRA, which is free software. It is made
* available to you under the terms of the GNU General Public License
* as published by the Free Software Foundation. For more information,
* see COPYING.
* as published by the Free Software Foundation, either version 3 of
* the License, or (at your option) any later version. For more
* information, see COPYING.
*/
#endregion
@@ -57,7 +58,7 @@ namespace OpenRA.Graphics
var b = new Bitmap(Size, 1, PixelFormat.Format32bppArgb);
var data = b.LockBits(new Rectangle(0, 0, b.Width, b.Height),
ImageLockMode.WriteOnly, PixelFormat.Format32bppArgb);
var temp = new uint[Palette.Size];
var temp = new uint[Size];
palette.CopyToArray(temp, 0);
Marshal.Copy((int[])(object)temp, 0, data.Scan0, Size);
b.UnlockBits(data);

View File

@@ -1,19 +1,14 @@
#region Copyright & License Information
/*
* Copyright 2007-2015 The OpenRA Developers (see AUTHORS)
* Copyright 2007-2016 The OpenRA Developers (see AUTHORS)
* This file is part of OpenRA, which is free software. It is made
* available to you under the terms of the GNU General Public License
* as published by the Free Software Foundation. For more information,
* see COPYING.
* as published by the Free Software Foundation, either version 3 of
* the License, or (at your option) any later version. For more
* information, see COPYING.
*/
#endregion
using System;
using System.Collections.Generic;
using System.Drawing;
using System.Linq;
using OpenRA.Traits;
namespace OpenRA.Graphics
{
public sealed class PaletteReference

View File

@@ -1,10 +1,11 @@
#region Copyright & License Information
/*
* Copyright 2007-2015 The OpenRA Developers (see AUTHORS)
* Copyright 2007-2016 The OpenRA Developers (see AUTHORS)
* This file is part of OpenRA, which is free software. It is made
* available to you under the terms of the GNU General Public License
* as published by the Free Software Foundation. For more information,
* see COPYING.
* as published by the Free Software Foundation, either version 3 of
* the License, or (at your option) any later version. For more
* information, see COPYING.
*/
#endregion
@@ -14,23 +15,10 @@ using OpenRA.Graphics;
namespace OpenRA
{
[AttributeUsage(AttributeTargets.Assembly)]
public sealed class PlatformAttribute : Attribute
{
public readonly Type Type;
public PlatformAttribute(Type graphicsDeviceType)
{
if (!typeof(IDeviceFactory).IsAssignableFrom(graphicsDeviceType))
throw new InvalidOperationException("Incorrect type in RendererAttribute");
Type = graphicsDeviceType;
}
}
public interface IDeviceFactory
public interface IPlatform
{
IGraphicsDevice CreateGraphics(Size size, WindowMode windowMode);
ISoundEngine CreateSound();
ISoundEngine CreateSound(string device);
}
public interface IHardwareCursor : IDisposable { }
@@ -61,14 +49,15 @@ namespace OpenRA
Bitmap TakeScreenshot();
void PumpInput(IInputHandler inputHandler);
string GetClipboardText();
bool SetClipboardText(string text);
void DrawPrimitives(PrimitiveType type, int firstVertex, int numVertices);
void SetLineWidth(float width);
void EnableScissor(int left, int top, int width, int height);
void DisableScissor();
void EnableDepthBuffer();
void DisableDepthBuffer();
void ClearDepthBuffer();
void SetBlendMode(BlendMode mode);
@@ -77,6 +66,8 @@ namespace OpenRA
IHardwareCursor CreateHardwareCursor(string name, Size size, byte[] data, int2 hotspot);
void SetHardwareCursor(IHardwareCursor cursor);
string GLVersion { get; }
}
public interface IVertexBuffer<T> : IDisposable
@@ -92,6 +83,7 @@ namespace OpenRA
void SetBool(string name, bool value);
void SetVec(string name, float x);
void SetVec(string name, float x, float y);
void SetVec(string name, float x, float y, float z);
void SetVec(string name, float[] vec, int length);
void SetTexture(string param, ITexture texture);
void SetMatrix(string param, float[] mtx);
@@ -122,7 +114,6 @@ namespace OpenRA
PointList,
LineList,
TriangleList,
QuadList,
}
public struct Range<T>

View File

@@ -1,10 +1,11 @@
#region Copyright & License Information
/*
* Copyright 2007-2015 The OpenRA Developers (see AUTHORS)
* Copyright 2007-2016 The OpenRA Developers (see AUTHORS)
* This file is part of OpenRA, which is free software. It is made
* available to you under the terms of the GNU General Public License
* as published by the Free Software Foundation. For more information,
* see COPYING.
* as published by the Free Software Foundation, either version 3 of
* the License, or (at your option) any later version. For more
* information, see COPYING.
*/
#endregion
@@ -29,7 +30,7 @@ namespace OpenRA.Graphics
{
// Increase luminosity if required to represent the full ramp
var rampRange = (byte)((1 - rampFraction) * c.L);
var c1 = new HSLColor(c.H, c.S, (byte)Math.Max(rampRange, c.L)).RGB;
var c1 = new HSLColor(c.H, c.S, Math.Max(rampRange, c.L)).RGB;
var c2 = new HSLColor(c.H, c.S, (byte)Math.Max(0, c.L - rampRange)).RGB;
var baseIndex = ramp[0];
var remapRamp = ramp.Select(r => r - ramp[0]);

View File

@@ -1,72 +0,0 @@
#region Copyright & License Information
/*
* Copyright 2007-2015 The OpenRA Developers (see AUTHORS)
* This file is part of OpenRA, which is free software. It is made
* available to you under the terms of the GNU General Public License
* as published by the Free Software Foundation. For more information,
* see COPYING.
*/
#endregion
using System;
using System.Drawing;
namespace OpenRA.Graphics
{
public class QuadRenderer : Renderer.IBatchRenderer
{
readonly Renderer renderer;
readonly IShader shader;
readonly Action renderAction;
readonly Vertex[] vertices;
int nv = 0;
public QuadRenderer(Renderer renderer, IShader shader)
{
this.renderer = renderer;
this.shader = shader;
vertices = new Vertex[renderer.TempBufferSize];
renderAction = () => renderer.DrawBatch(vertices, nv, PrimitiveType.QuadList);
}
public void Flush()
{
if (nv > 0)
{
renderer.Device.SetBlendMode(BlendMode.Alpha);
shader.Render(renderAction);
renderer.Device.SetBlendMode(BlendMode.None);
nv = 0;
}
}
public void FillRect(RectangleF rect, Color color)
{
renderer.CurrentBatchRenderer = this;
if (nv + 4 > renderer.TempBufferSize)
Flush();
color = Util.PremultiplyAlpha(color);
var r = color.R / 255.0f;
var g = color.G / 255.0f;
var b = color.B / 255.0f;
var a = color.A / 255.0f;
vertices[nv] = new Vertex(new float2(rect.Left, rect.Top), r, g, b, a);
vertices[nv + 1] = new Vertex(new float2(rect.Right, rect.Top), r, g, b, a);
vertices[nv + 2] = new Vertex(new float2(rect.Right, rect.Bottom), r, g, b, a);
vertices[nv + 3] = new Vertex(new float2(rect.Left, rect.Bottom), r, g, b, a);
nv += 4;
}
public void SetViewportParams(Size screen, float zoom, int2 scroll)
{
shader.SetVec("Scroll", scroll.X, scroll.Y);
shader.SetVec("r1", zoom * 2f / screen.Width, -zoom * 2f / screen.Height);
shader.SetVec("r2", -1, 1);
}
}
}

View File

@@ -1,16 +1,15 @@
#region Copyright & License Information
/*
* Copyright 2007-2015 The OpenRA Developers (see AUTHORS)
* Copyright 2007-2016 The OpenRA Developers (see AUTHORS)
* This file is part of OpenRA, which is free software. It is made
* available to you under the terms of the GNU General Public License
* as published by the Free Software Foundation. For more information,
* see COPYING.
* as published by the Free Software Foundation, either version 3 of
* the License, or (at your option) any later version. For more
* information, see COPYING.
*/
#endregion
using System.Collections.Generic;
using System.Drawing;
using System.Linq;
namespace OpenRA.Graphics
{

View File

@@ -0,0 +1,295 @@
#region Copyright & License Information
/*
* Copyright 2007-2016 The OpenRA Developers (see AUTHORS)
* This file is part of OpenRA, which is free software. It is made
* available to you under the terms of the GNU General Public License
* as published by the Free Software Foundation, either version 3 of
* the License, or (at your option) any later version. For more
* information, see COPYING.
*/
#endregion
using System;
using System.Collections.Generic;
using System.Drawing;
using System.Linq;
namespace OpenRA.Graphics
{
public class RgbaColorRenderer : Renderer.IBatchRenderer
{
static readonly float2 Offset = new float2(0.5f, 0.5f);
readonly Renderer renderer;
readonly IShader shader;
readonly Action renderAction;
readonly Vertex[] vertices;
int nv = 0;
public RgbaColorRenderer(Renderer renderer, IShader shader)
{
this.renderer = renderer;
this.shader = shader;
vertices = new Vertex[renderer.TempBufferSize];
renderAction = () => renderer.DrawBatch(vertices, nv, PrimitiveType.TriangleList);
}
public void Flush()
{
if (nv > 0)
{
renderer.Device.SetBlendMode(BlendMode.Alpha);
shader.Render(renderAction);
renderer.Device.SetBlendMode(BlendMode.None);
nv = 0;
}
}
public void DrawLine(float3 start, float3 end, float width, Color startColor, Color endColor)
{
renderer.CurrentBatchRenderer = this;
if (nv + 6 > renderer.TempBufferSize)
Flush();
var delta = (end - start) / (end - start).XY.Length;
var corner = width / 2 * new float3(-delta.Y, delta.X, delta.Z);
startColor = Util.PremultiplyAlpha(startColor);
var sr = startColor.R / 255.0f;
var sg = startColor.G / 255.0f;
var sb = startColor.B / 255.0f;
var sa = startColor.A / 255.0f;
endColor = Util.PremultiplyAlpha(endColor);
var er = endColor.R / 255.0f;
var eg = endColor.G / 255.0f;
var eb = endColor.B / 255.0f;
var ea = endColor.A / 255.0f;
vertices[nv++] = new Vertex(start - corner + Offset, sr, sg, sb, sa, 0, 0);
vertices[nv++] = new Vertex(start + corner + Offset, sr, sg, sb, sa, 0, 0);
vertices[nv++] = new Vertex(end + corner + Offset, er, eg, eb, ea, 0, 0);
vertices[nv++] = new Vertex(end + corner + Offset, er, eg, eb, ea, 0, 0);
vertices[nv++] = new Vertex(end - corner + Offset, er, eg, eb, ea, 0, 0);
vertices[nv++] = new Vertex(start - corner + Offset, sr, sg, sb, sa, 0, 0);
}
public void DrawLine(float3 start, float3 end, float width, Color color)
{
renderer.CurrentBatchRenderer = this;
if (nv + 6 > renderer.TempBufferSize)
Flush();
var delta = (end - start) / (end - start).XY.Length;
var corner = width / 2 * new float2(-delta.Y, delta.X);
color = Util.PremultiplyAlpha(color);
var r = color.R / 255.0f;
var g = color.G / 255.0f;
var b = color.B / 255.0f;
var a = color.A / 255.0f;
vertices[nv++] = new Vertex(start - corner + Offset, r, g, b, a, 0, 0);
vertices[nv++] = new Vertex(start + corner + Offset, r, g, b, a, 0, 0);
vertices[nv++] = new Vertex(end + corner + Offset, r, g, b, a, 0, 0);
vertices[nv++] = new Vertex(end + corner + Offset, r, g, b, a, 0, 0);
vertices[nv++] = new Vertex(end - corner + Offset, r, g, b, a, 0, 0);
vertices[nv++] = new Vertex(start - corner + Offset, r, g, b, a, 0, 0);
}
/// <summary>
/// Calculate the 2D intersection of two lines.
/// Will behave badly if the lines are parallel.
/// Z position is the average of a and b (ignores actual intersection point if it exists)
/// </summary>
float3 IntersectionOf(float3 a, float3 da, float3 b, float3 db)
{
var crossA = a.X * (a.Y + da.Y) - a.Y * (a.X + da.X);
var crossB = b.X * (b.Y + db.Y) - b.Y * (b.X + db.X);
var x = da.X * crossB - db.X * crossA;
var y = da.Y * crossB - db.Y * crossA;
var d = da.X * db.Y - da.Y * db.X;
return new float3(x / d, y / d, 0.5f * (a.Z + b.Z));
}
void DrawDisconnectedLine(IEnumerable<float3> points, float width, Color color)
{
using (var e = points.GetEnumerator())
{
if (!e.MoveNext())
return;
var lastPoint = e.Current;
while (e.MoveNext())
{
var point = e.Current;
DrawLine(lastPoint, point, width, color);
lastPoint = point;
}
}
}
void DrawConnectedLine(float3[] points, float width, Color color, bool closed)
{
// Not a line
if (points.Length < 2)
return;
// Single segment
if (points.Length == 2)
{
DrawLine(points[0], points[1], width, color);
return;
}
renderer.CurrentBatchRenderer = this;
color = Util.PremultiplyAlpha(color);
var r = color.R / 255.0f;
var g = color.G / 255.0f;
var b = color.B / 255.0f;
var a = color.A / 255.0f;
var start = points[0];
var end = points[1];
var dir = (end - start) / (end - start).XY.Length;
var corner = width / 2 * new float3(-dir.Y, dir.X, dir.Z);
// Corners for start of line segment
var ca = start - corner;
var cb = start + corner;
// Segment is part of closed loop
if (closed)
{
var prev = points[points.Length - 1];
var prevDir = (start - prev) / (start - prev).XY.Length;
var prevCorner = width / 2 * new float3(-prevDir.Y, prevDir.X, prevDir.Z);
ca = IntersectionOf(start - prevCorner, prevDir, start - corner, dir);
cb = IntersectionOf(start + prevCorner, prevDir, start + corner, dir);
}
var limit = closed ? points.Length : points.Length - 1;
for (var i = 0; i < limit; i++)
{
var next = points[(i + 2) % points.Length];
var nextDir = (next - end) / (next - end).XY.Length;
var nextCorner = width / 2 * new float3(-nextDir.Y, nextDir.X, nextDir.Z);
// Vertices for the corners joining start-end to end-next
var cc = closed || i < limit ? IntersectionOf(end + corner, dir, end + nextCorner, nextDir) : end + corner;
var cd = closed || i < limit ? IntersectionOf(end - corner, dir, end - nextCorner, nextDir) : end - corner;
// Fill segment
if (nv + 6 > renderer.TempBufferSize)
Flush();
vertices[nv++] = new Vertex(ca + Offset, r, g, b, a, 0, 0);
vertices[nv++] = new Vertex(cb + Offset, r, g, b, a, 0, 0);
vertices[nv++] = new Vertex(cc + Offset, r, g, b, a, 0, 0);
vertices[nv++] = new Vertex(cc + Offset, r, g, b, a, 0, 0);
vertices[nv++] = new Vertex(cd + Offset, r, g, b, a, 0, 0);
vertices[nv++] = new Vertex(ca + Offset, r, g, b, a, 0, 0);
// Advance line segment
end = next;
dir = nextDir;
corner = nextCorner;
ca = cd;
cb = cc;
}
}
public void DrawLine(IEnumerable<float2> points, float width, Color color, bool connectSegments = false)
{
DrawLine(points.Select(p => new float3(p, 0)), width, color, connectSegments);
}
public void DrawLine(IEnumerable<float3> points, float width, Color color, bool connectSegments = false)
{
if (!connectSegments)
DrawDisconnectedLine(points, width, color);
else
DrawConnectedLine(points as float3[] ?? points.ToArray(), width, color, false);
}
public void DrawPolygon(float3[] vertices, float width, Color color)
{
DrawConnectedLine(vertices, width, color, true);
}
public void DrawPolygon(float2[] vertices, float width, Color color)
{
DrawConnectedLine(vertices.Select(v => new float3(v, 0)).ToArray(), width, color, true);
}
public void DrawRect(float3 tl, float3 br, float width, Color color)
{
var tr = new float3(br.X, tl.Y, tl.Z);
var bl = new float3(tl.X, br.Y, br.Z);
DrawPolygon(new[] { tl, tr, br, bl }, width, color);
}
public void FillRect(float3 tl, float3 br, Color color)
{
var tr = new float3(br.X, tl.Y, tl.Z);
var bl = new float3(tl.X, br.Y, br.Z);
FillRect(tl, tr, br, bl, color);
}
public void FillRect(float3 a, float3 b, float3 c, float3 d, Color color)
{
renderer.CurrentBatchRenderer = this;
if (nv + 6 > renderer.TempBufferSize)
Flush();
color = Util.PremultiplyAlpha(color);
var cr = color.R / 255.0f;
var cg = color.G / 255.0f;
var cb = color.B / 255.0f;
var ca = color.A / 255.0f;
vertices[nv++] = new Vertex(a + Offset, cr, cg, cb, ca, 0, 0);
vertices[nv++] = new Vertex(b + Offset, cr, cg, cb, ca, 0, 0);
vertices[nv++] = new Vertex(c + Offset, cr, cg, cb, ca, 0, 0);
vertices[nv++] = new Vertex(c + Offset, cr, cg, cb, ca, 0, 0);
vertices[nv++] = new Vertex(d + Offset, cr, cg, cb, ca, 0, 0);
vertices[nv++] = new Vertex(a + Offset, cr, cg, cb, ca, 0, 0);
}
public void FillEllipse(float3 tl, float3 br, Color color, int vertices = 32)
{
// TODO: Create an ellipse polygon instead
var a = (br.X - tl.X) / 2;
var b = (br.Y - tl.Y) / 2;
var xc = (br.X + tl.X) / 2;
var yc = (br.Y + tl.Y) / 2;
for (var y = tl.Y; y <= br.Y; y++)
{
var z = float2.Lerp(tl.Z, br.Z, (y - tl.Y) / (br.Y - tl.Y));
var dx = a * (float)Math.Sqrt(1 - (y - yc) * (y - yc) / b / b);
DrawLine(new float3(xc - dx, y, z), new float3(xc + dx, y, z), 1, color);
}
}
public void SetViewportParams(Size screen, float depthScale, float depthOffset, float zoom, int2 scroll)
{
shader.SetVec("Scroll", scroll.X, scroll.Y, scroll.Y);
shader.SetVec("r1",
zoom * 2f / screen.Width,
-zoom * 2f / screen.Height,
-depthScale * zoom / screen.Height);
shader.SetVec("r2", -1, 1, 1 - depthOffset);
}
public void SetDepthPreviewEnabled(bool enabled)
{
shader.SetBool("EnableDepthPreview", enabled);
}
}
}

View File

@@ -1,15 +1,15 @@
#region Copyright & License Information
/*
* Copyright 2007-2015 The OpenRA Developers (see AUTHORS)
* Copyright 2007-2016 The OpenRA Developers (see AUTHORS)
* This file is part of OpenRA, which is free software. It is made
* available to you under the terms of the GNU General Public License
* as published by the Free Software Foundation. For more information,
* see COPYING.
* as published by the Free Software Foundation, either version 3 of
* the License, or (at your option) any later version. For more
* information, see COPYING.
*/
#endregion
using System.Drawing;
using OpenRA.Graphics;
using OpenRA.Traits;
namespace OpenRA.Graphics
@@ -18,17 +18,26 @@ namespace OpenRA.Graphics
{
readonly WPos pos;
readonly Actor actor;
readonly bool displayHealth;
readonly bool displayExtra;
public SelectionBarsRenderable(Actor actor)
: this(actor.CenterPosition, actor) { }
public SelectionBarsRenderable(Actor actor, bool displayHealth, bool displayExtra)
: this(actor.CenterPosition, actor)
{
this.displayHealth = displayHealth;
this.displayExtra = displayExtra;
}
public SelectionBarsRenderable(WPos pos, Actor actor)
: this()
{
this.pos = pos;
this.actor = actor;
}
public WPos Pos { get { return pos; } }
public bool DisplayHealth { get { return displayHealth; } }
public bool DisplayExtra { get { return displayExtra; } }
public PaletteReference Palette { get { return null; } }
public int ZOffset { get { return 0; } }
@@ -39,81 +48,63 @@ namespace OpenRA.Graphics
public IRenderable OffsetBy(WVec vec) { return new SelectionBarsRenderable(pos + vec, actor); }
public IRenderable AsDecoration() { return this; }
void DrawExtraBars(WorldRenderer wr, float2 start, float2 end)
void DrawExtraBars(WorldRenderer wr, float3 start, float3 end)
{
foreach (var extraBar in actor.TraitsImplementing<ISelectionBar>())
{
var value = extraBar.GetValue();
if (value != 0)
if (value != 0 || extraBar.DisplayWhenEmpty)
{
start.Y += (int)(4 / wr.Viewport.Zoom);
end.Y += (int)(4 / wr.Viewport.Zoom);
var offset = new float3(0, (int)(4 / wr.Viewport.Zoom), 0);
start += offset;
end += offset;
DrawSelectionBar(wr, start, end, extraBar.GetValue(), extraBar.GetColor());
}
}
}
void DrawSelectionBar(WorldRenderer wr, float2 start, float2 end, float value, Color barColor)
void DrawSelectionBar(WorldRenderer wr, float3 start, float3 end, float value, Color barColor)
{
var iz = 1 / wr.Viewport.Zoom;
var c = Color.FromArgb(128, 30, 30, 30);
var c2 = Color.FromArgb(128, 10, 10, 10);
var p = new float2(0, -4 / wr.Viewport.Zoom);
var q = new float2(0, -3 / wr.Viewport.Zoom);
var r = new float2(0, -2 / wr.Viewport.Zoom);
var p = new float2(0, -4 * iz);
var q = new float2(0, -3 * iz);
var r = new float2(0, -2 * iz);
var barColor2 = Color.FromArgb(255, barColor.R / 2, barColor.G / 2, barColor.B / 2);
var z = float2.Lerp(start, end, value);
var wlr = Game.Renderer.WorldLineRenderer;
wlr.DrawLine(start + p, end + p, c);
wlr.DrawLine(start + q, end + q, c2);
wlr.DrawLine(start + r, end + r, c);
var z = float3.Lerp(start, end, value);
var wcr = Game.Renderer.WorldRgbaColorRenderer;
wcr.DrawLine(start + p, end + p, iz, c);
wcr.DrawLine(start + q, end + q, iz, c2);
wcr.DrawLine(start + r, end + r, iz, c);
wlr.DrawLine(start + p, z + p, barColor2);
wlr.DrawLine(start + q, z + q, barColor);
wlr.DrawLine(start + r, z + r, barColor2);
wcr.DrawLine(start + p, z + p, iz, barColor2);
wcr.DrawLine(start + q, z + q, iz, barColor);
wcr.DrawLine(start + r, z + r, iz, barColor2);
}
Color GetHealthColor(IHealth health)
{
var player = actor.World.RenderPlayer ?? actor.World.LocalPlayer;
if (Game.Settings.Game.TeamHealthColors && player != null && !player.Spectating)
{
var apparentOwner = actor.EffectiveOwner != null && actor.EffectiveOwner.Disguised
? actor.EffectiveOwner.Owner
: actor.Owner;
// For friendly spies, treat the unit's owner as the actual owner
if (actor.Owner.IsAlliedWith(actor.World.RenderPlayer))
apparentOwner = actor.Owner;
if (apparentOwner == player)
return Color.LimeGreen;
if (apparentOwner.IsAlliedWith(player))
return Color.Yellow;
if (apparentOwner.NonCombatant)
return Color.Tan;
return Color.Red;
}
if (Game.Settings.Game.UsePlayerStanceColors)
return actor.Owner.PlayerStanceColor(actor);
else
return health.DamageState == DamageState.Critical ? Color.Red :
health.DamageState == DamageState.Heavy ? Color.Yellow : Color.LimeGreen;
}
void DrawHealthBar(WorldRenderer wr, IHealth health, float2 start, float2 end)
void DrawHealthBar(WorldRenderer wr, IHealth health, float3 start, float3 end)
{
if (health == null || health.IsDead)
return;
var c = Color.FromArgb(128, 30, 30, 30);
var c2 = Color.FromArgb(128, 10, 10, 10);
var p = new float2(0, -4 / wr.Viewport.Zoom);
var q = new float2(0, -3 / wr.Viewport.Zoom);
var r = new float2(0, -2 / wr.Viewport.Zoom);
var iz = 1 / wr.Viewport.Zoom;
var p = new float2(0, -4 * iz);
var q = new float2(0, -3 * iz);
var r = new float2(0, -2 * iz);
var healthColor = GetHealthColor(health);
var healthColor2 = Color.FromArgb(
@@ -122,16 +113,16 @@ namespace OpenRA.Graphics
healthColor.G / 2,
healthColor.B / 2);
var z = float2.Lerp(start, end, (float)health.HP / health.MaxHP);
var z = float3.Lerp(start, end, (float)health.HP / health.MaxHP);
var wlr = Game.Renderer.WorldLineRenderer;
wlr.DrawLine(start + p, end + p, c);
wlr.DrawLine(start + q, end + q, c2);
wlr.DrawLine(start + r, end + r, c);
var wcr = Game.Renderer.WorldRgbaColorRenderer;
wcr.DrawLine(start + p, end + p, iz, c);
wcr.DrawLine(start + q, end + q, iz, c2);
wcr.DrawLine(start + r, end + r, iz, c);
wlr.DrawLine(start + p, z + p, healthColor2);
wlr.DrawLine(start + q, z + q, healthColor);
wlr.DrawLine(start + r, z + r, healthColor2);
wcr.DrawLine(start + p, z + p, iz, healthColor2);
wcr.DrawLine(start + q, z + q, iz, healthColor);
wcr.DrawLine(start + r, z + r, iz, healthColor2);
if (health.DisplayHP != health.HP)
{
@@ -141,11 +132,11 @@ namespace OpenRA.Graphics
deltaColor.R / 2,
deltaColor.G / 2,
deltaColor.B / 2);
var zz = float2.Lerp(start, end, (float)health.DisplayHP / health.MaxHP);
var zz = float3.Lerp(start, end, (float)health.DisplayHP / health.MaxHP);
wlr.DrawLine(z + p, zz + p, deltaColor2);
wlr.DrawLine(z + q, zz + q, deltaColor);
wlr.DrawLine(z + r, zz + r, deltaColor2);
wcr.DrawLine(z + p, zz + p, iz, deltaColor2);
wcr.DrawLine(z + q, zz + q, iz, deltaColor);
wcr.DrawLine(z + r, zz + r, iz, deltaColor2);
}
}
@@ -157,15 +148,18 @@ namespace OpenRA.Graphics
var health = actor.TraitOrDefault<IHealth>();
var screenPos = wr.ScreenPxPosition(pos);
var screenPos = wr.Screen3DPxPosition(pos);
var bounds = actor.VisualBounds;
bounds.Offset(screenPos.X, screenPos.Y);
bounds.Offset((int)screenPos.X, (int)screenPos.Y);
var start = new float2(bounds.Left + 1, bounds.Top);
var end = new float2(bounds.Right - 1, bounds.Top);
var start = new float3(bounds.Left + 1, bounds.Top, screenPos.Z);
var end = new float3(bounds.Right - 1, bounds.Top, screenPos.Z);
DrawHealthBar(wr, health, start, end);
DrawExtraBars(wr, start, end);
if (DisplayHealth)
DrawHealthBar(wr, health, start, end);
if (DisplayExtra)
DrawExtraBars(wr, start, end);
}
public void RenderDebugGeometry(WorldRenderer wr) { }

View File

@@ -1,18 +1,18 @@
#region Copyright & License Information
/*
* Copyright 2007-2015 The OpenRA Developers (see AUTHORS)
* Copyright 2007-2016 The OpenRA Developers (see AUTHORS)
* This file is part of OpenRA, which is free software. It is made
* available to you under the terms of the GNU General Public License
* as published by the Free Software Foundation. For more information,
* see COPYING.
* as published by the Free Software Foundation, either version 3 of
* the License, or (at your option) any later version. For more
* information, see COPYING.
*/
#endregion
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Reflection;
using OpenRA.FileSystem;
namespace OpenRA.Graphics
{
@@ -43,15 +43,27 @@ namespace OpenRA.Graphics
IReadOnlyDictionary<string, ISpriteSequence> ParseSequences(ModData modData, TileSet tileSet, SpriteCache cache, MiniYamlNode node);
}
public class SequenceProvider
public class SequenceProvider : IDisposable
{
readonly ModData modData;
readonly TileSet tileSet;
readonly Lazy<Sequences> sequences;
public readonly SpriteCache SpriteCache;
readonly Lazy<SpriteCache> spriteCache;
public SpriteCache SpriteCache { get { return spriteCache.Value; } }
public SequenceProvider(SequenceCache cache, Map map)
readonly Dictionary<string, UnitSequences> sequenceCache = new Dictionary<string, UnitSequences>();
public SequenceProvider(IReadOnlyFileSystem fileSystem, ModData modData, TileSet tileSet, MiniYaml additionalSequences)
{
this.sequences = Exts.Lazy(() => cache.LoadSequences(map));
this.SpriteCache = cache.SpriteCache;
this.modData = modData;
this.tileSet = tileSet;
sequences = Exts.Lazy(() =>
{
using (new Support.PerfTimer("LoadSequences"))
return Load(fileSystem, additionalSequences);
});
spriteCache = Exts.Lazy(() => new SpriteCache(fileSystem, modData.SpriteLoaders, new SheetBuilder(SheetType.Indexed)));
}
public ISpriteSequence GetSequence(string unitName, string sequenceName)
@@ -90,47 +102,9 @@ namespace OpenRA.Graphics
return unitSeq.Value.Keys;
}
public void Preload()
Sequences Load(IReadOnlyFileSystem fileSystem, MiniYaml additionalSequences)
{
SpriteCache.SheetBuilder.Current.CreateBuffer();
foreach (var unitSeq in sequences.Value.Values)
foreach (var seq in unitSeq.Value.Values) { }
SpriteCache.SheetBuilder.Current.ReleaseBuffer();
}
}
public sealed class SequenceCache : IDisposable
{
readonly ModData modData;
readonly TileSet tileSet;
readonly Lazy<SpriteCache> spriteCache;
public SpriteCache SpriteCache { get { return spriteCache.Value; } }
readonly Dictionary<string, UnitSequences> sequenceCache = new Dictionary<string, UnitSequences>();
public SequenceCache(ModData modData, TileSet tileSet)
{
this.modData = modData;
this.tileSet = tileSet;
// Every time we load a tile set, we create a sequence cache for it
spriteCache = Exts.Lazy(() => new SpriteCache(modData.SpriteLoaders, new SheetBuilder(SheetType.Indexed)));
}
public Sequences LoadSequences(Map map)
{
using (new Support.PerfTimer("LoadSequences"))
return Load(map != null ? map.SequenceDefinitions : new List<MiniYamlNode>());
}
Sequences Load(List<MiniYamlNode> sequenceNodes)
{
var sequenceFiles = modData.Manifest.Sequences;
var nodes = sequenceFiles
.Select(s => MiniYaml.FromFile(s))
.Aggregate(sequenceNodes, MiniYaml.MergeLiberal);
var nodes = MiniYaml.Load(fileSystem, modData.Manifest.Sequences, additionalSequences);
var items = new Dictionary<string, UnitSequences>();
foreach (var n in nodes)
{
@@ -153,6 +127,14 @@ namespace OpenRA.Graphics
return new ReadOnlyDictionary<string, UnitSequences>(items);
}
public void Preload()
{
SpriteCache.SheetBuilder.Current.CreateBuffer();
foreach (var unitSeq in sequences.Value.Values)
foreach (var seq in unitSeq.Value.Values) { }
SpriteCache.SheetBuilder.Current.ReleaseBuffer();
}
public void Dispose()
{
if (spriteCache.IsValueCreated)

View File

@@ -1,18 +1,19 @@
#region Copyright & License Information
/*
* Copyright 2007-2015 The OpenRA Developers (see AUTHORS)
* Copyright 2007-2016 The OpenRA Developers (see AUTHORS)
* This file is part of OpenRA, which is free software. It is made
* available to you under the terms of the GNU General Public License
* as published by the Free Software Foundation. For more information,
* see COPYING.
* as published by the Free Software Foundation, either version 3 of
* the License, or (at your option) any later version. For more
* information, see COPYING.
*/
#endregion
using System;
using System.Drawing;
using System.Drawing.Imaging;
using System.IO;
using System.Runtime.InteropServices;
using OpenRA.FileSystem;
namespace OpenRA.Graphics
{
@@ -47,9 +48,8 @@ namespace OpenRA.Graphics
Size = texture.Size;
}
public Sheet(SheetType type, string filename)
public Sheet(SheetType type, Stream stream)
{
using (var stream = GlobalFileSystem.Open(filename))
using (var bitmap = (Bitmap)Image.FromStream(stream))
{
Size = bitmap.Size;

View File

@@ -1,17 +1,17 @@
#region Copyright & License Information
/*
* Copyright 2007-2015 The OpenRA Developers (see AUTHORS)
* Copyright 2007-2016 The OpenRA Developers (see AUTHORS)
* This file is part of OpenRA, which is free software. It is made
* available to you under the terms of the GNU General Public License
* as published by the Free Software Foundation. For more information,
* see COPYING.
* as published by the Free Software Foundation, either version 3 of
* the License, or (at your option) any later version. For more
* information, see COPYING.
*/
#endregion
using System;
using System.Collections.Generic;
using System.Drawing;
using System.Linq;
namespace OpenRA.Graphics
{
@@ -25,8 +25,7 @@ namespace OpenRA.Graphics
public enum SheetType
{
Indexed = 1,
DualIndexed = 2,
BGRA = 4,
BGRA = 2,
}
public sealed class SheetBuilder : IDisposable
@@ -60,15 +59,15 @@ namespace OpenRA.Graphics
this.allocateSheet = allocateSheet;
}
public Sprite Add(ISpriteFrame frame) { return Add(frame.Data, frame.Size, frame.Offset); }
public Sprite Add(byte[] src, Size size) { return Add(src, size, float2.Zero); }
public Sprite Add(byte[] src, Size size, float2 spriteOffset)
public Sprite Add(ISpriteFrame frame) { return Add(frame.Data, frame.Size, 0, frame.Offset); }
public Sprite Add(byte[] src, Size size) { return Add(src, size, 0, float3.Zero); }
public Sprite Add(byte[] src, Size size, float zRamp, float3 spriteOffset)
{
// Don't bother allocating empty sprites
if (size.Width == 0 || size.Height == 0)
return new Sprite(current, Rectangle.Empty, spriteOffset, channel, BlendMode.Alpha);
return new Sprite(current, Rectangle.Empty, 0, spriteOffset, channel, BlendMode.Alpha);
var rect = Allocate(size, spriteOffset);
var rect = Allocate(size, zRamp, spriteOffset);
Util.FastCopyIntoChannel(rect, src);
current.CommitBufferedData();
return rect;
@@ -100,8 +99,8 @@ namespace OpenRA.Graphics
return (TextureChannel)nextChannel;
}
public Sprite Allocate(Size imageSize) { return Allocate(imageSize, float2.Zero); }
public Sprite Allocate(Size imageSize, float2 spriteOffset)
public Sprite Allocate(Size imageSize) { return Allocate(imageSize, 0, float3.Zero); }
public Sprite Allocate(Size imageSize, float zRamp, float3 spriteOffset)
{
if (imageSize.Width + p.X > current.Size.Width)
{
@@ -129,7 +128,7 @@ namespace OpenRA.Graphics
p = new Point(0, 0);
}
var rect = new Sprite(current, new Rectangle(p, imageSize), spriteOffset, channel, BlendMode.Alpha);
var rect = new Sprite(current, new Rectangle(p, imageSize), zRamp, spriteOffset, channel, BlendMode.Alpha);
p.X += imageSize.Width;
return rect;

View File

@@ -1,18 +1,17 @@
#region Copyright & License Information
/*
* Copyright 2007-2015 The OpenRA Developers (see AUTHORS)
* This file is part of OpenRA, which is free software. It is made
* available to you under the terms of the GNU General Public License
* as published by the Free Software Foundation. For more information,
* see COPYING.
*/
* Copyright 2007-2016 The OpenRA Developers (see AUTHORS)
* This file is part of OpenRA, which is free software. It is made
* available to you under the terms of the GNU General Public License
* as published by the Free Software Foundation, either version 3 of
* the License, or (at your option) any later version. For more
* information, see COPYING.
*/
#endregion
using System;
using System.Collections.Generic;
using System.Drawing;
using System.Linq;
using OpenRA.Graphics;
using OpenRA.Primitives;
namespace OpenRA.Graphics
@@ -24,7 +23,7 @@ namespace OpenRA.Graphics
void Tick();
}
public class SoftwareCursor : ICursor
public sealed class SoftwareCursor : ICursor
{
readonly HardwarePalette palette = new HardwarePalette();
readonly Cache<string, PaletteReference> paletteReferences;
@@ -82,8 +81,8 @@ namespace OpenRA.Graphics
var cursorSize = CursorProvider.CursorViewportZoomed ? 2.0f * cursorSprite.Size : cursorSprite.Size;
var cursorOffset = CursorProvider.CursorViewportZoomed ?
(2 * cursorSequence.Hotspot) + cursorSprite.Size.ToInt2() :
cursorSequence.Hotspot + (0.5f * cursorSprite.Size).ToInt2();
(2 * cursorSequence.Hotspot) + cursorSprite.Size.XY.ToInt2() :
cursorSequence.Hotspot + (0.5f * cursorSprite.Size.XY).ToInt2();
renderer.SetPalette(palette);
renderer.SpriteRenderer.DrawSprite(cursorSprite,

View File

@@ -1,10 +1,11 @@
#region Copyright & License Information
/*
* Copyright 2007-2015 The OpenRA Developers (see AUTHORS)
* Copyright 2007-2016 The OpenRA Developers (see AUTHORS)
* This file is part of OpenRA, which is free software. It is made
* available to you under the terms of the GNU General Public License
* as published by the Free Software Foundation. For more information,
* see COPYING.
* as published by the Free Software Foundation, either version 3 of
* the License, or (at your option) any later version. For more
* information, see COPYING.
*/
#endregion
@@ -19,24 +20,26 @@ namespace OpenRA.Graphics
public readonly Sheet Sheet;
public readonly BlendMode BlendMode;
public readonly TextureChannel Channel;
public readonly float2 Size;
public readonly float2 Offset;
public readonly float2 FractionalOffset;
public readonly float ZRamp;
public readonly float3 Size;
public readonly float3 Offset;
public readonly float3 FractionalOffset;
public readonly float Top, Left, Bottom, Right;
public Sprite(Sheet sheet, Rectangle bounds, TextureChannel channel)
: this(sheet, bounds, float2.Zero, channel) { }
: this(sheet, bounds, 0, float2.Zero, channel) { }
public Sprite(Sheet sheet, Rectangle bounds, float2 offset, TextureChannel channel, BlendMode blendMode = BlendMode.Alpha)
public Sprite(Sheet sheet, Rectangle bounds, float zRamp, float3 offset, TextureChannel channel, BlendMode blendMode = BlendMode.Alpha)
{
Sheet = sheet;
Bounds = bounds;
Offset = offset;
ZRamp = zRamp;
Channel = channel;
Size = new float2(bounds.Size);
Size = new float3(bounds.Size.Width, bounds.Size.Height, bounds.Size.Height * zRamp);
BlendMode = blendMode;
FractionalOffset = offset / Size;
FractionalOffset = Size.Z != 0 ? offset / Size :
new float3(offset.X / Size.X, offset.Y / Size.Y, 0);
Left = (float)Math.Min(bounds.Left, bounds.Right) / sheet.Size.Width;
Top = (float)Math.Min(bounds.Top, bounds.Bottom) / sheet.Size.Height;
@@ -45,6 +48,24 @@ namespace OpenRA.Graphics
}
}
public class SpriteWithSecondaryData : Sprite
{
public readonly Rectangle SecondaryBounds;
public readonly TextureChannel SecondaryChannel;
public readonly float SecondaryTop, SecondaryLeft, SecondaryBottom, SecondaryRight;
public SpriteWithSecondaryData(Sprite s, Rectangle secondaryBounds, TextureChannel secondaryChannel)
: base(s.Sheet, s.Bounds, s.ZRamp, s.Offset, s.Channel, s.BlendMode)
{
SecondaryBounds = secondaryBounds;
SecondaryChannel = secondaryChannel;
SecondaryLeft = (float)Math.Min(secondaryBounds.Left, secondaryBounds.Right) / s.Sheet.Size.Width;
SecondaryTop = (float)Math.Min(secondaryBounds.Top, secondaryBounds.Bottom) / s.Sheet.Size.Height;
SecondaryRight = (float)Math.Max(secondaryBounds.Left, secondaryBounds.Right) / s.Sheet.Size.Width;
SecondaryBottom = (float)Math.Max(secondaryBounds.Top, secondaryBounds.Bottom) / s.Sheet.Size.Height;
}
}
public enum TextureChannel : byte
{
Red = 0,

View File

@@ -1,10 +1,11 @@
#region Copyright & License Information
/*
* Copyright 2007-2015 The OpenRA Developers (see AUTHORS)
* Copyright 2007-2016 The OpenRA Developers (see AUTHORS)
* This file is part of OpenRA, which is free software. It is made
* available to you under the terms of the GNU General Public License
* as published by the Free Software Foundation. For more information,
* see COPYING.
* as published by the Free Software Foundation, either version 3 of
* the License, or (at your option) any later version. For more
* information, see COPYING.
*/
#endregion
@@ -13,11 +14,12 @@ using System.Drawing;
using System.Linq;
using OpenRA.Primitives;
using OpenRA.Support;
using OpenRA.Widgets;
using SharpFont;
namespace OpenRA.Graphics
{
public class SpriteFont
public sealed class SpriteFont : IDisposable
{
static readonly Library Library = new Library();
@@ -27,7 +29,7 @@ namespace OpenRA.Graphics
readonly Face face;
readonly Cache<Pair<char, Color>, GlyphInfo> glyphs;
public SpriteFont(string name, int size, SheetBuilder builder)
public SpriteFont(string name, byte[] data, int size, SheetBuilder builder)
{
if (builder.Type != SheetType.BGRA)
throw new ArgumentException("The sheet builder must create BGRA sheets.", "builder");
@@ -35,11 +37,12 @@ namespace OpenRA.Graphics
this.size = size;
this.builder = builder;
face = new Face(Library, name);
face = new Face(Library, data, 0);
face.SetPixelSizes((uint)size, (uint)size);
glyphs = new Cache<Pair<char, Color>, GlyphInfo>(CreateGlyph, Pair<char, Color>.EqualityComparer);
// PERF: Cache these delegates for Measure calls.
Func<char, float> characterWidth = character => glyphs[Pair.New(character, Color.White)].Advance;
lineWidth = line => line.Sum(characterWidth);
@@ -91,6 +94,24 @@ namespace OpenRA.Graphics
DrawText(text, location, fg);
}
public void DrawTextWithContrast(string text, float2 location, Color fg, Color bgDark, Color bgLight, int offset)
{
DrawTextWithContrast(text, location, fg, WidgetUtils.GetContrastColor(fg, bgDark, bgLight), offset);
}
public void DrawTextWithShadow(string text, float2 location, Color fg, Color bg, int offset)
{
if (offset != 0)
DrawText(text, location + new float2(offset, offset), bg);
DrawText(text, location, fg);
}
public void DrawTextWithShadow(string text, float2 location, Color fg, Color bgDark, Color bgLight, int offset)
{
DrawTextWithShadow(text, location, fg, WidgetUtils.GetContrastColor(fg, bgDark, bgLight), offset);
}
public int2 Measure(string text)
{
if (string.IsNullOrEmpty(text))
@@ -149,6 +170,11 @@ namespace OpenRA.Graphics
return g;
}
public void Dispose()
{
face.Dispose();
}
}
class GlyphInfo

View File

@@ -1,13 +1,15 @@
#region Copyright & License Information
/*
* Copyright 2007-2015 The OpenRA Developers (see AUTHORS)
* Copyright 2007-2016 The OpenRA Developers (see AUTHORS)
* This file is part of OpenRA, which is free software. It is made
* available to you under the terms of the GNU General Public License
* as published by the Free Software Foundation. For more information,
* see COPYING.
* as published by the Free Software Foundation, either version 3 of
* the License, or (at your option) any later version. For more
* information, see COPYING.
*/
#endregion
using System.Collections.Generic;
using System.Drawing;
using System.IO;
using System.Linq;
@@ -23,8 +25,17 @@ namespace OpenRA.Graphics
public interface ISpriteFrame
{
/// <summary>
/// Size of the frame's `Data`.
/// </summary>
Size Size { get; }
/// <summary>
/// Size of the entire frame including the frame's `Size`.
/// Think of this like a picture frame.
/// </summary>
Size FrameSize { get; }
float2 Offset { get; }
byte[] Data { get; }
bool DisableExportPadding { get; }
@@ -33,25 +44,56 @@ namespace OpenRA.Graphics
public class SpriteCache
{
public readonly SheetBuilder SheetBuilder;
readonly Cache<string, Sprite[]> sprites;
readonly ISpriteLoader[] loaders;
readonly IReadOnlyFileSystem fileSystem;
public SpriteCache(ISpriteLoader[] loaders, SheetBuilder sheetBuilder)
readonly Dictionary<string, List<Sprite[]>> sprites = new Dictionary<string, List<Sprite[]>>();
public SpriteCache(IReadOnlyFileSystem fileSystem, ISpriteLoader[] loaders, SheetBuilder sheetBuilder)
{
SheetBuilder = sheetBuilder;
sprites = new Cache<string, Sprite[]>(filename => SpriteLoader.GetSprites(filename, loaders, sheetBuilder));
this.fileSystem = fileSystem;
this.loaders = loaders;
}
public Sprite[] this[string filename] { get { return sprites[filename]; } }
Sprite[] LoadSprite(string filename, List<Sprite[]> cache)
{
var sprite = SpriteLoader.GetSprites(fileSystem, filename, loaders, SheetBuilder);
cache.Add(sprite);
return sprite;
}
/// <summary>Returns the first set of sprites with the given filename.</summary>
public Sprite[] this[string filename]
{
get
{
var allSprites = sprites.GetOrAdd(filename);
var sprite = allSprites.FirstOrDefault();
return sprite ?? LoadSprite(filename, allSprites);
}
}
/// <summary>Returns all instances of sets of sprites with the given filename</summary>
public IEnumerable<Sprite[]> AllCached(string filename)
{
return sprites.GetOrAdd(filename);
}
/// <summary>Loads and caches a new instance of sprites with the given filename</summary>
public Sprite[] Reload(string filename)
{
return LoadSprite(filename, sprites.GetOrAdd(filename));
}
}
public class FrameCache
{
readonly Cache<string, ISpriteFrame[]> frames;
public FrameCache(ISpriteLoader[] loaders)
public FrameCache(IReadOnlyFileSystem fileSystem, ISpriteLoader[] loaders)
{
frames = new Cache<string, ISpriteFrame[]>(filename => SpriteLoader.GetFrames(filename, loaders));
frames = new Cache<string, ISpriteFrame[]>(filename => SpriteLoader.GetFrames(fileSystem, filename, loaders));
}
public ISpriteFrame[] this[string filename] { get { return frames[filename]; } }
@@ -59,22 +101,31 @@ namespace OpenRA.Graphics
public static class SpriteLoader
{
public static Sprite[] GetSprites(string filename, ISpriteLoader[] loaders, SheetBuilder sheetBuilder)
public static Sprite[] GetSprites(IReadOnlyFileSystem fileSystem, string filename, ISpriteLoader[] loaders, SheetBuilder sheetBuilder)
{
return GetFrames(filename, loaders).Select(a => sheetBuilder.Add(a)).ToArray();
return GetFrames(fileSystem, filename, loaders).Select(a => sheetBuilder.Add(a)).ToArray();
}
public static ISpriteFrame[] GetFrames(string filename, ISpriteLoader[] loaders)
public static ISpriteFrame[] GetFrames(IReadOnlyFileSystem fileSystem, string filename, ISpriteLoader[] loaders)
{
using (var stream = GlobalFileSystem.Open(filename))
using (var stream = fileSystem.Open(filename))
{
ISpriteFrame[] frames;
foreach (var loader in loaders)
if (loader.TryParseSprite(stream, out frames))
return frames;
var spriteFrames = GetFrames(stream, loaders);
if (spriteFrames == null)
throw new InvalidDataException(filename + " is not a valid sprite file!");
throw new InvalidDataException(filename + " is not a valid sprite file");
return spriteFrames;
}
}
public static ISpriteFrame[] GetFrames(Stream stream, ISpriteLoader[] loaders)
{
ISpriteFrame[] frames;
foreach (var loader in loaders)
if (loader.TryParseSprite(stream, out frames))
return frames;
return null;
}
}
}

View File

@@ -1,10 +1,11 @@
#region Copyright & License Information
/*
* Copyright 2007-2015 The OpenRA Developers (see AUTHORS)
* Copyright 2007-2016 The OpenRA Developers (see AUTHORS)
* This file is part of OpenRA, which is free software. It is made
* available to you under the terms of the GNU General Public License
* as published by the Free Software Foundation. For more information,
* see COPYING.
* as published by the Free Software Foundation, either version 3 of
* the License, or (at your option) any later version. For more
* information, see COPYING.
*/
#endregion
@@ -48,27 +49,30 @@ namespace OpenRA.Graphics
public IRenderable OffsetBy(WVec vec) { return new SpriteRenderable(sprite, pos + vec, offset, zOffset, palette, scale, isDecoration); }
public IRenderable AsDecoration() { return new SpriteRenderable(sprite, pos, offset, zOffset, palette, scale, true); }
float2 ScreenPosition(WorldRenderer wr)
float3 ScreenPosition(WorldRenderer wr)
{
return wr.ScreenPxPosition(pos) + wr.ScreenPxOffset(offset) - (0.5f * scale * sprite.Size).ToInt2();
var xy = wr.ScreenPxPosition(pos) + wr.ScreenPxOffset(offset) - (0.5f * scale * sprite.Size.XY).ToInt2();
// HACK: The z offset needs to be applied somewhere, but this probably is the wrong place.
return new float3(xy, sprite.Offset.Z + wr.ScreenZPosition(pos, 0) - 0.5f * scale * sprite.Size.Z);
}
public IFinalizedRenderable PrepareRender(WorldRenderer wr) { return this; }
public void Render(WorldRenderer wr)
{
Game.Renderer.WorldSpriteRenderer.DrawSprite(sprite, ScreenPosition(wr), palette, sprite.Size * scale);
Game.Renderer.WorldSpriteRenderer.DrawSprite(sprite, ScreenPosition(wr), palette, scale * sprite.Size);
}
public void RenderDebugGeometry(WorldRenderer wr)
{
var offset = ScreenPosition(wr) + sprite.Offset;
Game.Renderer.WorldLineRenderer.DrawRect(offset, offset + sprite.Size, Color.Red);
var screenOffset = ScreenPosition(wr) + sprite.Offset;
Game.Renderer.WorldRgbaColorRenderer.DrawRect(screenOffset, screenOffset + sprite.Size, 1 / wr.Viewport.Zoom, Color.Red);
}
public Rectangle ScreenBounds(WorldRenderer wr)
{
var offset = ScreenPosition(wr) + sprite.Offset;
return new Rectangle((int)offset.X, (int)offset.Y, (int)sprite.Size.X, (int)sprite.Size.Y);
var screenOffset = ScreenPosition(wr) + sprite.Offset;
return new Rectangle((int)screenOffset.X, (int)screenOffset.Y, (int)sprite.Size.X, (int)sprite.Size.Y);
}
}
}

View File

@@ -1,10 +1,11 @@
#region Copyright & License Information
/*
* Copyright 2007-2015 The OpenRA Developers (see AUTHORS)
* Copyright 2007-2016 The OpenRA Developers (see AUTHORS)
* This file is part of OpenRA, which is free software. It is made
* available to you under the terms of the GNU General Public License
* as published by the Free Software Foundation. For more information,
* see COPYING.
* as published by the Free Software Foundation, either version 3 of
* the License, or (at your option) any later version. For more
* information, see COPYING.
*/
#endregion
@@ -29,7 +30,7 @@ namespace OpenRA.Graphics
this.renderer = renderer;
this.shader = shader;
vertices = new Vertex[renderer.TempBufferSize];
renderAction = () => renderer.DrawBatch(vertices, nv, PrimitiveType.QuadList);
renderAction = () => renderer.DrawBatch(vertices, nv, PrimitiveType.TriangleList);
}
public void Flush()
@@ -51,53 +52,53 @@ namespace OpenRA.Graphics
{
renderer.CurrentBatchRenderer = this;
if (s.BlendMode != currentBlend || s.Sheet != currentSheet || nv + 4 > renderer.TempBufferSize)
if (s.BlendMode != currentBlend || s.Sheet != currentSheet || nv + 6 > renderer.TempBufferSize)
Flush();
currentBlend = s.BlendMode;
currentSheet = s.Sheet;
}
public void DrawSprite(Sprite s, float2 location, PaletteReference pal)
public void DrawSprite(Sprite s, float3 location, PaletteReference pal)
{
DrawSprite(s, location, pal.TextureIndex, s.Size);
}
public void DrawSprite(Sprite s, float2 location, PaletteReference pal, float2 size)
public void DrawSprite(Sprite s, float3 location, PaletteReference pal, float3 size)
{
DrawSprite(s, location, pal.TextureIndex, size);
}
void DrawSprite(Sprite s, float2 location, float paletteTextureIndex, float2 size)
void DrawSprite(Sprite s, float3 location, float paletteTextureIndex, float3 size)
{
SetRenderStateForSprite(s);
Util.FastCreateQuad(vertices, location + s.FractionalOffset * size, s, paletteTextureIndex, nv, size);
nv += 4;
nv += 6;
}
// For RGBASpriteRenderer, which doesn't use palettes
public void DrawSprite(Sprite s, float2 location)
public void DrawSprite(Sprite s, float3 location)
{
DrawSprite(s, location, 0, s.Size);
}
public void DrawSprite(Sprite s, float2 location, float2 size)
public void DrawSprite(Sprite s, float3 location, float3 size)
{
DrawSprite(s, location, 0, size);
}
public void DrawSprite(Sprite s, float2 a, float2 b, float2 c, float2 d)
public void DrawSprite(Sprite s, float3 a, float3 b, float3 c, float3 d)
{
SetRenderStateForSprite(s);
Util.FastCreateQuad(vertices, a, b, c, d, s, 0, nv);
nv += 4;
nv += 6;
}
public void DrawSprite(Sprite s, Vertex[] sourceVertices, int offset)
{
SetRenderStateForSprite(s);
Array.Copy(sourceVertices, offset, vertices, nv, 4);
nv += 4;
Array.Copy(sourceVertices, offset, vertices, nv, 6);
nv += 6;
}
public void DrawVertexBuffer(IVertexBuffer<Vertex> buffer, int start, int length, PrimitiveType type, Sheet sheet, BlendMode blendMode)
@@ -113,11 +114,17 @@ namespace OpenRA.Graphics
shader.SetTexture("Palette", palette);
}
public void SetViewportParams(Size screen, float zoom, int2 scroll)
public void SetViewportParams(Size screen, float depthScale, float depthOffset, float zoom, int2 scroll)
{
shader.SetVec("Scroll", scroll.X, scroll.Y);
shader.SetVec("r1", zoom * 2f / screen.Width, -zoom * 2f / screen.Height);
shader.SetVec("r2", -1, 1);
shader.SetVec("Scroll", scroll.X, scroll.Y, scroll.Y);
shader.SetVec("r1",
zoom * 2f / screen.Width,
-zoom * 2f / screen.Height,
-depthScale * zoom / screen.Height);
shader.SetVec("r2", -1, 1, 1 - depthOffset);
// Texture index is sampled as a float, so convert to pixels then scale
shader.SetVec("DepthTextureScale", 128 * depthScale * zoom / screen.Height);
}
public void SetDepthPreviewEnabled(bool enabled)

View File

@@ -1,18 +1,17 @@
#region Copyright & License Information
/*
* Copyright 2007-2015 The OpenRA Developers (see AUTHORS)
* Copyright 2007-2016 The OpenRA Developers (see AUTHORS)
* This file is part of OpenRA, which is free software. It is made
* available to you under the terms of the GNU General Public License
* as published by the Free Software Foundation. For more information,
* see COPYING.
* as published by the Free Software Foundation, either version 3 of
* the License, or (at your option) any later version. For more
* information, see COPYING.
*/
#endregion
using System.Collections.Generic;
using System.Drawing;
using System.Linq;
using OpenRA.Graphics;
using OpenRA.Traits;
namespace OpenRA.Graphics
{
@@ -43,16 +42,26 @@ namespace OpenRA.Graphics
if (!waypoints.Any())
return;
var first = wr.ScreenPxPosition(waypoints.First());
var iz = 1 / wr.Viewport.Zoom;
var first = wr.Screen3DPosition(waypoints.First());
var a = first;
foreach (var b in waypoints.Skip(1).Select(pos => wr.ScreenPxPosition(pos)))
foreach (var b in waypoints.Skip(1).Select(pos => wr.Screen3DPosition(pos)))
{
Game.Renderer.WorldLineRenderer.DrawLine(a, b, color);
wr.DrawTargetMarker(color, b);
Game.Renderer.WorldRgbaColorRenderer.DrawLine(a, b, iz, color);
DrawTargetMarker(wr, color, b);
a = b;
}
wr.DrawTargetMarker(color, first);
DrawTargetMarker(wr, color, first);
}
public static void DrawTargetMarker(WorldRenderer wr, Color color, float3 location)
{
var iz = 1 / wr.Viewport.Zoom;
var offset = new float2(iz, iz);
var tl = location - offset;
var br = location + offset;
Game.Renderer.WorldRgbaColorRenderer.FillRect(tl, br, color);
}
public void RenderDebugGeometry(WorldRenderer wr) { }

View File

@@ -1,54 +1,73 @@
#region Copyright & License Information
/*
* Copyright 2007-2015 The OpenRA Developers (see AUTHORS)
* Copyright 2007-2016 The OpenRA Developers (see AUTHORS)
* This file is part of OpenRA, which is free software. It is made
* available to you under the terms of the GNU General Public License
* as published by the Free Software Foundation. For more information,
* see COPYING.
* as published by the Free Software Foundation, either version 3 of
* the License, or (at your option) any later version. For more
* information, see COPYING.
*/
#endregion
using System;
using System.Collections.Generic;
using OpenRA.Traits;
namespace OpenRA.Graphics
{
sealed class TerrainRenderer : IDisposable
{
readonly TerrainSpriteLayer terrain;
readonly Map map;
readonly Dictionary<string, TerrainSpriteLayer> spriteLayers = new Dictionary<string, TerrainSpriteLayer>();
readonly Theater theater;
readonly CellLayer<TerrainTile> mapTiles;
public TerrainRenderer(World world, WorldRenderer wr)
{
map = world.Map;
theater = wr.Theater;
mapTiles = world.Map.MapTiles.Value;
terrain = new TerrainSpriteLayer(world, wr, theater.Sheet, BlendMode.Alpha,
wr.Palette("terrain"), wr.World.Type != WorldType.Editor);
foreach (var template in map.Rules.TileSet.Templates)
{
var palette = template.Value.Palette ?? TileSet.TerrainPaletteInternalName;
spriteLayers.GetOrAdd(palette, pal =>
new TerrainSpriteLayer(world, wr, theater.Sheet, BlendMode.Alpha, wr.Palette(palette), world.Type != WorldType.Editor));
}
foreach (var cell in world.Map.AllCells)
foreach (var cell in map.AllCells)
UpdateCell(cell);
world.Map.MapTiles.Value.CellEntryChanged += UpdateCell;
world.Map.MapHeight.Value.CellEntryChanged += UpdateCell;
map.Tiles.CellEntryChanged += UpdateCell;
map.Height.CellEntryChanged += UpdateCell;
}
public void UpdateCell(CPos cell)
{
terrain.Update(cell, theater.TileSprite(mapTiles[cell]));
var tile = map.Tiles[cell];
var palette = TileSet.TerrainPaletteInternalName;
if (map.Rules.TileSet.Templates.ContainsKey(tile.Type))
palette = map.Rules.TileSet.Templates[tile.Type].Palette ?? palette;
var sprite = theater.TileSprite(tile);
foreach (var kv in spriteLayers)
kv.Value.Update(cell, palette == kv.Key ? sprite : null);
}
public void Draw(WorldRenderer wr, Viewport viewport)
{
terrain.Draw(viewport);
foreach (var kv in spriteLayers.Values)
kv.Draw(wr.Viewport);
foreach (var r in wr.World.WorldActor.TraitsImplementing<IRenderOverlay>())
r.Render(wr);
}
public void Dispose()
{
terrain.Dispose();
map.Tiles.CellEntryChanged -= UpdateCell;
map.Height.CellEntryChanged -= UpdateCell;
foreach (var kv in spriteLayers.Values)
kv.Dispose();
}
}
}

View File

@@ -1,10 +1,11 @@
#region Copyright & License Information
/*
* Copyright 2007-2015 The OpenRA Developers (see AUTHORS)
* Copyright 2007-2016 The OpenRA Developers (see AUTHORS)
* This file is part of OpenRA, which is free software. It is made
* available to you under the terms of the GNU General Public License
* as published by the Free Software Foundation. For more information,
* see COPYING.
* as published by the Free Software Foundation, either version 3 of
* the License, or (at your option) any later version. For more
* information, see COPYING.
*/
#endregion
@@ -12,8 +13,6 @@ using System;
using System.Collections.Generic;
using System.Drawing;
using System.IO;
using System.Linq;
using OpenRA.Traits;
namespace OpenRA.Graphics
{
@@ -33,7 +32,7 @@ namespace OpenRA.Graphics
readonly WorldRenderer worldRenderer;
readonly Map map;
float paletteIndex;
readonly PaletteReference palette;
public TerrainSpriteLayer(World world, WorldRenderer wr, Sheet sheet, BlendMode blendMode, PaletteReference palette, bool restrictToBounds)
{
@@ -41,40 +40,41 @@ namespace OpenRA.Graphics
this.restrictToBounds = restrictToBounds;
Sheet = sheet;
BlendMode = blendMode;
paletteIndex = palette.TextureIndex;
this.palette = palette;
map = world.Map;
rowStride = 4 * map.MapSize.X;
rowStride = 6 * map.MapSize.X;
vertices = new Vertex[rowStride * map.MapSize.Y];
vertexBuffer = Game.Renderer.Device.CreateVertexBuffer(vertices.Length);
emptySprite = new Sprite(sheet, Rectangle.Empty, TextureChannel.Alpha);
wr.PaletteInvalidated += () =>
wr.PaletteInvalidated += UpdatePaletteIndices;
}
void UpdatePaletteIndices()
{
// Everything in the layer uses the same palette,
// so we can fix the indices in one pass
for (var i = 0; i < vertices.Length; i++)
{
paletteIndex = palette.TextureIndex;
var v = vertices[i];
vertices[i] = new Vertex(v.X, v.Y, v.Z, v.S, v.T, v.U, v.V, palette.TextureIndex, v.C);
}
// Everything in the layer uses the same palette,
// so we can fix the indices in one pass
for (var i = 0; i < vertices.Length; i++)
{
var v = vertices[i];
vertices[i] = new Vertex(v.X, v.Y, v.Z, v.U, v.V, paletteIndex, v.C);
}
for (var row = 0; row < map.MapSize.Y; row++)
dirtyRows.Add(row);
};
for (var row = 0; row < map.MapSize.Y; row++)
dirtyRows.Add(row);
}
public void Update(CPos cell, Sprite sprite)
{
var pos = sprite == null ? float2.Zero :
worldRenderer.ScreenPosition(map.CenterOfCell(cell)) + sprite.Offset - 0.5f * sprite.Size;
Update(cell.ToMPos(map.Grid.Type), sprite, pos);
var xyz = sprite == null ? float3.Zero :
worldRenderer.Screen3DPosition(map.CenterOfCell(cell)) + sprite.Offset - 0.5f * sprite.Size;
Update(cell.ToMPos(map.Grid.Type), sprite, xyz);
}
public void Update(MPos uv, Sprite sprite, float2 pos)
public void Update(MPos uv, Sprite sprite, float3 pos)
{
if (sprite != null)
{
@@ -87,8 +87,8 @@ namespace OpenRA.Graphics
else
sprite = emptySprite;
var offset = rowStride * uv.V + 4 * uv.U;
Util.FastCreateQuad(vertices, pos, sprite, paletteIndex, offset, sprite.Size);
var offset = rowStride * uv.V + 6 * uv.U;
Util.FastCreateQuad(vertices, pos, sprite, palette.TextureIndex, offset, sprite.Size);
dirtyRows.Add(uv.V);
}
@@ -123,13 +123,14 @@ namespace OpenRA.Graphics
Game.Renderer.WorldSpriteRenderer.DrawVertexBuffer(
vertexBuffer, rowStride * firstRow, rowStride * (lastRow - firstRow),
PrimitiveType.QuadList, Sheet, BlendMode);
PrimitiveType.TriangleList, Sheet, BlendMode);
Game.Renderer.Flush();
}
public void Dispose()
{
worldRenderer.PaletteInvalidated -= UpdatePaletteIndices;
vertexBuffer.Dispose();
}
}

View File

@@ -1,10 +1,11 @@
#region Copyright & License Information
/*
* Copyright 2007-2015 The OpenRA Developers (see AUTHORS)
* Copyright 2007-2016 The OpenRA Developers (see AUTHORS)
* This file is part of OpenRA, which is free software. It is made
* available to you under the terms of the GNU General Public License
* as published by the Free Software Foundation. For more information,
* see COPYING.
* as published by the Free Software Foundation, either version 3 of
* the License, or (at your option) any later version. For more
* information, see COPYING.
*/
#endregion
@@ -12,7 +13,6 @@ using System;
using System.Collections.Generic;
using System.Drawing;
using System.Linq;
using OpenRA.FileSystem;
using OpenRA.Support;
namespace OpenRA.Graphics
@@ -43,7 +43,6 @@ namespace OpenRA.Graphics
{
this.tileset = tileset;
var allocated = false;
var type = tileset.EnableDepth ? SheetType.DualIndexed : SheetType.Indexed;
Func<Sheet> allocate = () =>
{
@@ -51,13 +50,13 @@ namespace OpenRA.Graphics
throw new SheetOverflowException("Terrain sheet overflow. Try increasing the tileset SheetSize parameter.");
allocated = true;
return new Sheet(type, new Size(tileset.SheetSize, tileset.SheetSize));
return new Sheet(SheetType.Indexed, new Size(tileset.SheetSize, tileset.SheetSize));
};
sheetBuilder = new SheetBuilder(type, allocate);
sheetBuilder = new SheetBuilder(SheetType.Indexed, allocate);
random = new MersenneTwister();
var frameCache = new FrameCache(Game.ModData.SpriteLoaders);
var frameCache = new FrameCache(Game.ModData.DefaultFileSystem, Game.ModData.SpriteLoaders);
foreach (var t in tileset.Templates)
{
var variants = new List<Sprite[]>();
@@ -70,11 +69,24 @@ namespace OpenRA.Graphics
variants.Add(indices.Select(j =>
{
var f = allFrames[j];
var s = sheetBuilder.Allocate(f.Size, f.Offset);
Util.FastCopyIntoChannel(s, 0, f.Data);
var tile = t.Value.Contains(j) ? t.Value[j] : null;
// The internal z axis is inverted from expectation (negative is closer)
var zOffset = tile != null ? -tile.ZOffset : 0;
var zRamp = tile != null ? tile.ZRamp : 1f;
var offset = new float3(f.Offset, zOffset);
var s = sheetBuilder.Allocate(f.Size, zRamp, offset);
Util.FastCopyIntoChannel(s, f.Data);
if (tileset.EnableDepth)
Util.FastCopyIntoChannel(s, 1, allFrames[j + frameCount].Data);
{
var ss = sheetBuilder.Allocate(f.Size, zRamp, offset);
Util.FastCopyIntoChannel(ss, allFrames[j + frameCount].Data);
// s and ss are guaranteed to use the same sheet
// because of the custom terrain sheet allocation
s = new SpriteWithSecondaryData(s, ss.Bounds, ss.Channel);
}
return s;
}).ToArray());
@@ -84,7 +96,7 @@ namespace OpenRA.Graphics
// Ignore the offsets baked into R8 sprites
if (tileset.IgnoreTileSpriteOffsets)
allSprites = allSprites.Select(s => new Sprite(s.Sheet, s.Bounds, float2.Zero, s.Channel, s.BlendMode));
allSprites = allSprites.Select(s => new Sprite(s.Sheet, s.Bounds, s.ZRamp, new float3(float2.Zero, s.Offset.Z), s.Channel, s.BlendMode));
templates.Add(t.Value.Id, new TheaterTemplate(allSprites.ToArray(), variants.First().Count(), t.Value.Images.Length));
}

View File

@@ -1,30 +1,31 @@
#region Copyright & License Information
/*
* Copyright 2007-2015 The OpenRA Developers (see AUTHORS)
* Copyright 2007-2016 The OpenRA Developers (see AUTHORS)
* This file is part of OpenRA, which is free software. It is made
* available to you under the terms of the GNU General Public License
* as published by the Free Software Foundation. For more information,
* see COPYING.
* as published by the Free Software Foundation, either version 3 of
* the License, or (at your option) any later version. For more
* information, see COPYING.
*/
#endregion
using System.Collections.Generic;
using System.Drawing;
using System.Linq;
namespace OpenRA.Graphics
{
public struct UISpriteRenderable : IRenderable, IFinalizedRenderable
{
readonly Sprite sprite;
readonly WPos effectiveWorldPos;
readonly int2 screenPos;
readonly int zOffset;
readonly PaletteReference palette;
readonly float scale;
public UISpriteRenderable(Sprite sprite, int2 screenPos, int zOffset, PaletteReference palette, float scale)
public UISpriteRenderable(Sprite sprite, WPos effectiveWorldPos, int2 screenPos, int zOffset, PaletteReference palette, float scale)
{
this.sprite = sprite;
this.effectiveWorldPos = effectiveWorldPos;
this.screenPos = screenPos;
this.zOffset = zOffset;
this.palette = palette;
@@ -32,14 +33,14 @@ namespace OpenRA.Graphics
}
// Does not exist in the world, so a world positions don't make sense
public WPos Pos { get { return WPos.Zero; } }
public WPos Pos { get { return effectiveWorldPos; } }
public WVec Offset { get { return WVec.Zero; } }
public bool IsDecoration { get { return true; } }
public PaletteReference Palette { get { return palette; } }
public int ZOffset { get { return zOffset; } }
public IRenderable WithPalette(PaletteReference newPalette) { return new UISpriteRenderable(sprite, screenPos, zOffset, newPalette, scale); }
public IRenderable WithPalette(PaletteReference newPalette) { return new UISpriteRenderable(sprite, effectiveWorldPos, screenPos, zOffset, newPalette, scale); }
public IRenderable WithZOffset(int newOffset) { return this; }
public IRenderable OffsetBy(WVec vec) { return this; }
public IRenderable AsDecoration() { return this; }
@@ -47,13 +48,13 @@ namespace OpenRA.Graphics
public IFinalizedRenderable PrepareRender(WorldRenderer wr) { return this; }
public void Render(WorldRenderer wr)
{
Game.Renderer.SpriteRenderer.DrawSprite(sprite, screenPos, palette, sprite.Size * scale);
Game.Renderer.SpriteRenderer.DrawSprite(sprite, screenPos, palette, scale * sprite.Size);
}
public void RenderDebugGeometry(WorldRenderer wr)
{
var offset = screenPos + sprite.Offset;
Game.Renderer.LineRenderer.DrawRect(offset, offset + sprite.Size, Color.Red);
var offset = screenPos + sprite.Offset.XY;
Game.Renderer.RgbaColorRenderer.DrawRect(offset, offset + sprite.Size.XY, 1, Color.Red);
}
public Rectangle ScreenBounds(WorldRenderer wr)

View File

@@ -1,17 +1,17 @@
#region Copyright & License Information
/*
* Copyright 2007-2015 The OpenRA Developers (see AUTHORS)
* Copyright 2007-2016 The OpenRA Developers (see AUTHORS)
* This file is part of OpenRA, which is free software. It is made
* available to you under the terms of the GNU General Public License
* as published by the Free Software Foundation. For more information,
* see COPYING.
* as published by the Free Software Foundation, either version 3 of
* the License, or (at your option) any later version. For more
* information, see COPYING.
*/
#endregion
using System;
using System.Drawing;
using System.Drawing.Imaging;
using System.Runtime.InteropServices;
namespace OpenRA.Graphics
{
@@ -21,33 +21,46 @@ namespace OpenRA.Graphics
static readonly int[] ChannelMasks = { 2, 1, 0, 3 };
static readonly float[] ChannelSelect = { 0.2f, 0.4f, 0.6f, 0.8f };
public static void FastCreateQuad(Vertex[] vertices, float2 o, Sprite r, float paletteTextureIndex, int nv, float2 size)
public static void FastCreateQuad(Vertex[] vertices, float3 o, Sprite r, float paletteTextureIndex, int nv, float3 size)
{
var b = new float2(o.X + size.X, o.Y);
var c = new float2(o.X + size.X, o.Y + size.Y);
var d = new float2(o.X, o.Y + size.Y);
var b = new float3(o.X + size.X, o.Y, o.Z);
var c = new float3(o.X + size.X, o.Y + size.Y, o.Z + size.Z);
var d = new float3(o.X, o.Y + size.Y, o.Z + size.Z);
FastCreateQuad(vertices, o, b, c, d, r, paletteTextureIndex, nv);
}
public static void FastCreateQuad(Vertex[] vertices, float2 a, float2 b, float2 c, float2 d, Sprite r, float paletteTextureIndex, int nv)
public static void FastCreateQuad(Vertex[] vertices, float3 a, float3 b, float3 c, float3 d, Sprite r, float paletteTextureIndex, int nv)
{
float sl = 0;
float st = 0;
float sr = 0;
float sb = 0;
var attribC = ChannelSelect[(int)r.Channel];
if (r.Sheet.Type == SheetType.DualIndexed)
attribC *= -1;
vertices[nv] = new Vertex(a, r.Left, r.Top, paletteTextureIndex, attribC);
vertices[nv + 1] = new Vertex(b, r.Right, r.Top, paletteTextureIndex, attribC);
vertices[nv + 2] = new Vertex(c, r.Right, r.Bottom, paletteTextureIndex, attribC);
vertices[nv + 3] = new Vertex(d, r.Left, r.Bottom, paletteTextureIndex, attribC);
var ss = r as SpriteWithSecondaryData;
if (ss != null)
{
sl = ss.SecondaryLeft;
st = ss.SecondaryTop;
sr = ss.SecondaryRight;
sb = ss.SecondaryBottom;
attribC = -(attribC + ChannelSelect[(int)ss.SecondaryChannel] / 10);
}
vertices[nv] = new Vertex(a, r.Left, r.Top, sl, st, paletteTextureIndex, attribC);
vertices[nv + 1] = new Vertex(b, r.Right, r.Top, sr, st, paletteTextureIndex, attribC);
vertices[nv + 2] = new Vertex(c, r.Right, r.Bottom, sr, sb, paletteTextureIndex, attribC);
vertices[nv + 3] = new Vertex(c, r.Right, r.Bottom, sr, sb, paletteTextureIndex, attribC);
vertices[nv + 4] = new Vertex(d, r.Left, r.Bottom, sl, sb, paletteTextureIndex, attribC);
vertices[nv + 5] = new Vertex(a, r.Left, r.Top, sl, st, paletteTextureIndex, attribC);
}
public static void FastCopyIntoChannel(Sprite dest, byte[] src) { FastCopyIntoChannel(dest, 0, src); }
public static void FastCopyIntoChannel(Sprite dest, int channelOffset, byte[] src)
public static void FastCopyIntoChannel(Sprite dest, byte[] src)
{
var data = dest.Sheet.GetData();
var srcStride = dest.Bounds.Width;
var destStride = dest.Sheet.Size.Width * 4;
var destOffset = destStride * dest.Bounds.Top + dest.Bounds.Left * 4 + ChannelMasks[(int)dest.Channel + channelOffset];
var destOffset = destStride * dest.Bounds.Top + dest.Bounds.Left * 4 + ChannelMasks[(int)dest.Channel];
var destSkip = destStride - 4 * srcStride;
var height = dest.Bounds.Height;

View File

@@ -1,10 +1,11 @@
#region Copyright & License Information
/*
* Copyright 2007-2015 The OpenRA Developers (see AUTHORS)
* Copyright 2007-2016 The OpenRA Developers (see AUTHORS)
* This file is part of OpenRA, which is free software. It is made
* available to you under the terms of the GNU General Public License
* as published by the Free Software Foundation. For more information,
* see COPYING.
* as published by the Free Software Foundation, either version 3 of
* the License, or (at your option) any later version. For more
* information, see COPYING.
*/
#endregion
@@ -15,17 +16,15 @@ namespace OpenRA.Graphics
[StructLayout(LayoutKind.Sequential)]
public struct Vertex
{
public readonly float X, Y, Z, U, V, P, C;
public readonly float X, Y, Z, S, T, U, V, P, C;
public Vertex(float2 xy, float u, float v, float p, float c)
: this(xy.X, xy.Y, 0, u, v, p, c) { }
public Vertex(float3 xyz, float s, float t, float u, float v, float p, float c)
: this(xyz.X, xyz.Y, xyz.Z, s, t, u, v, p, c) { }
public Vertex(float[] xyz, float u, float v, float p, float c)
: this(xyz[0], xyz[1], xyz[2], u, v, p, c) { }
public Vertex(float x, float y, float z, float u, float v, float p, float c)
public Vertex(float x, float y, float z, float s, float t, float u, float v, float p, float c)
{
X = x; Y = y; Z = z;
S = s; T = t;
U = u; V = v;
P = p; C = c;
}

View File

@@ -1,10 +1,11 @@
#region Copyright & License Information
/*
* Copyright 2007-2015 The OpenRA Developers (see AUTHORS)
* Copyright 2007-2016 The OpenRA Developers (see AUTHORS)
* This file is part of OpenRA, which is free software. It is made
* available to you under the terms of the GNU General Public License
* as published by the Free Software Foundation. For more information,
* see COPYING.
* as published by the Free Software Foundation, either version 3 of
* the License, or (at your option) any later version. For more
* information, see COPYING.
*/
#endregion
@@ -22,6 +23,7 @@ namespace OpenRA.Graphics
{
public static bool Includes(this ScrollDirection d, ScrollDirection s)
{
// PERF: Enum.HasFlag is slower and requires allocations.
return (d & s) == s;
}
@@ -52,8 +54,15 @@ namespace OpenRA.Graphics
ProjectedCellRegion allCells;
bool allCellsDirty = true;
readonly float[] availableZoomSteps = new[] { 2f, 1f, 0.5f, 0.25f };
float zoom = 1f;
public float[] AvailableZoomSteps
{
get { return availableZoomSteps; }
}
public float Zoom
{
get
@@ -63,16 +72,34 @@ namespace OpenRA.Graphics
set
{
zoom = value;
var newValue = ClosestTo(AvailableZoomSteps, value);
zoom = newValue;
viewportSize = (1f / zoom * new float2(Game.Renderer.Resolution)).ToInt2();
cellsDirty = true;
allCellsDirty = true;
}
}
public static int TicksSinceLastMove = 0;
public static long TicksSinceLastMove = 0;
public static int2 LastMousePos;
float ClosestTo(float[] collection, float target)
{
var closestValue = collection.First();
var subtractResult = Math.Abs(closestValue - target);
foreach (var element in collection)
{
if (Math.Abs(element - target) < subtractResult)
{
subtractResult = Math.Abs(element - target);
closestValue = element;
}
}
return closestValue;
}
public ScrollDirection GetBlockedDirections()
{
var ret = ScrollDirection.None;
@@ -122,7 +149,7 @@ namespace OpenRA.Graphics
var world = worldRenderer.Viewport.ViewToWorldPx(view);
var map = worldRenderer.World.Map;
var candidates = CandidateMouseoverCells(world).ToList();
var tileSet = worldRenderer.World.TileSet;
var tileSet = worldRenderer.World.Map.Rules.TileSet;
foreach (var uv in candidates)
{
@@ -134,13 +161,12 @@ namespace OpenRA.Graphics
var ramp = 0;
if (map.Contains(uv))
{
var tile = map.MapTiles.Value[uv];
var ti = tileSet.GetTileInfo(tile);
var ti = tileSet.GetTileInfo(map.Tiles[uv]);
if (ti != null)
ramp = ti.RampType;
}
var corners = map.CellCorners[ramp];
var corners = map.Grid.CellCorners[ramp];
var pos = map.CenterOfCell(uv.ToCPos(map));
var screen = corners.Select(c => worldRenderer.ScreenPxPosition(pos + c)).ToArray();

View File

@@ -1,10 +1,11 @@
#region Copyright & License Information
/*
* Copyright 2007-2015 The OpenRA Developers (see AUTHORS)
* Copyright 2007-2016 The OpenRA Developers (see AUTHORS)
* This file is part of OpenRA, which is free software. It is made
* available to you under the terms of the GNU General Public License
* as published by the Free Software Foundation. For more information,
* see COPYING.
* as published by the Free Software Foundation, either version 3 of
* the License, or (at your option) any later version. For more
* information, see COPYING.
*/
#endregion

View File

@@ -1,10 +1,11 @@
#region Copyright & License Information
/*
* Copyright 2007-2015 The OpenRA Developers (see AUTHORS)
* Copyright 2007-2016 The OpenRA Developers (see AUTHORS)
* This file is part of OpenRA, which is free software. It is made
* available to you under the terms of the GNU General Public License
* as published by the Free Software Foundation. For more information,
* see COPYING.
* as published by the Free Software Foundation, either version 3 of
* the License, or (at your option) any later version. For more
* information, see COPYING.
*/
#endregion

View File

@@ -1,10 +1,11 @@
#region Copyright & License Information
/*
* Copyright 2007-2015 The OpenRA Developers (see AUTHORS)
* Copyright 2007-2016 The OpenRA Developers (see AUTHORS)
* This file is part of OpenRA, which is free software. It is made
* available to you under the terms of the GNU General Public License
* as published by the Free Software Foundation. For more information,
* see COPYING.
* as published by the Free Software Foundation, either version 3 of
* the License, or (at your option) any later version. For more
* information, see COPYING.
*/
#endregion
@@ -38,6 +39,7 @@ namespace OpenRA.Graphics
readonly List<Vertex[]> vertices = new List<Vertex[]>();
readonly Cache<Pair<string, string>, Voxel> voxels;
readonly IReadOnlyFileSystem fileSystem;
IVertexBuffer<Vertex> vertexBuffer;
int totalVertexCount;
int cachedVertexCount;
@@ -52,14 +54,15 @@ namespace OpenRA.Graphics
if (allocated)
throw new SheetOverflowException("");
allocated = true;
return SheetBuilder.AllocateSheet(SheetType.DualIndexed, Game.Settings.Graphics.SheetSize);
return SheetBuilder.AllocateSheet(SheetType.Indexed, Game.Settings.Graphics.SheetSize);
};
return new SheetBuilder(SheetType.DualIndexed, allocate);
return new SheetBuilder(SheetType.Indexed, allocate);
}
public VoxelLoader()
public VoxelLoader(IReadOnlyFileSystem fileSystem)
{
this.fileSystem = fileSystem;
voxels = new Cache<Pair<string, string>, Voxel>(LoadFile);
vertices = new List<Vertex[]>();
totalVertexCount = 0;
@@ -68,13 +71,14 @@ namespace OpenRA.Graphics
sheetBuilder = CreateSheetBuilder();
}
Vertex[] GenerateSlicePlane(int su, int sv, Func<int, int, VxlElement> first, Func<int, int, VxlElement> second, Func<int, int, float[]> coord)
Vertex[] GenerateSlicePlane(int su, int sv, Func<int, int, VxlElement> first, Func<int, int, VxlElement> second, Func<int, int, float3> coord)
{
var colors = new byte[su * sv];
var normals = new byte[su * sv];
var c = 0;
for (var v = 0; v < sv; v++)
{
for (var u = 0; u < su; u++)
{
var voxel = first(u, v) ?? second(u, v);
@@ -82,20 +86,28 @@ namespace OpenRA.Graphics
normals[c] = voxel == null ? (byte)0 : voxel.Normal;
c++;
}
}
var s = sheetBuilder.Allocate(new Size(su, sv));
Util.FastCopyIntoChannel(s, 0, colors);
Util.FastCopyIntoChannel(s, 1, normals);
var size = new Size(su, sv);
var s = sheetBuilder.Allocate(size);
var t = sheetBuilder.Allocate(size);
Util.FastCopyIntoChannel(s, colors);
Util.FastCopyIntoChannel(t, normals);
// s and t are guaranteed to use the same sheet because
// of the custom voxel sheet allocation implementation
s.Sheet.CommitBufferedData();
var channelP = ChannelSelect[(int)s.Channel];
var channelC = ChannelSelect[(int)s.Channel + 1];
return new Vertex[4]
var channelC = ChannelSelect[(int)t.Channel];
return new Vertex[6]
{
new Vertex(coord(0, 0), s.Left, s.Top, channelP, channelC),
new Vertex(coord(su, 0), s.Right, s.Top, channelP, channelC),
new Vertex(coord(su, sv), s.Right, s.Bottom, channelP, channelC),
new Vertex(coord(0, sv), s.Left, s.Bottom, channelP, channelC)
new Vertex(coord(0, 0), s.Left, s.Top, t.Left, t.Top, channelP, channelC),
new Vertex(coord(su, 0), s.Right, s.Top, t.Right, t.Top, channelP, channelC),
new Vertex(coord(su, sv), s.Right, s.Bottom, t.Right, t.Bottom, channelP, channelC),
new Vertex(coord(su, sv), s.Right, s.Bottom, t.Right, t.Bottom, channelP, channelC),
new Vertex(coord(0, sv), s.Left, s.Bottom, t.Left, t.Bottom, channelP, channelC),
new Vertex(coord(0, 0), s.Left, s.Top, t.Left, t.Top, channelP, channelC)
};
}
@@ -153,21 +165,21 @@ namespace OpenRA.Graphics
yield return GenerateSlicePlane(l.Size[1], l.Size[2],
(u, v) => get(x, u, v),
(u, v) => get(x - 1, u, v),
(u, v) => new float[] { x, u, v });
(u, v) => new float3(x, u, v));
for (var y = 0; y <= l.Size[1]; y++)
if (yPlanes[y])
yield return GenerateSlicePlane(l.Size[0], l.Size[2],
(u, v) => get(u, y, v),
(u, v) => get(u, y - 1, v),
(u, v) => new float[] { u, y, v });
(u, v) => new float3(u, y, v));
for (var z = 0; z <= l.Size[2]; z++)
if (zPlanes[z])
yield return GenerateSlicePlane(l.Size[0], l.Size[1],
(u, v) => get(u, v, z),
(u, v) => get(u, v, z - 1),
(u, v) => new float[] { u, v, z });
(u, v) => new float3(u, v, z));
}
public VoxelRenderData GenerateRenderData(VxlLimb l)
@@ -217,9 +229,9 @@ namespace OpenRA.Graphics
{
VxlReader vxl;
HvaReader hva;
using (var s = GlobalFileSystem.Open(files.First + ".vxl"))
using (var s = fileSystem.Open(files.First + ".vxl"))
vxl = new VxlReader(s);
using (var s = GlobalFileSystem.Open(files.Second + ".hva"))
using (var s = fileSystem.Open(files.Second + ".hva"))
hva = new HvaReader(s, files.Second + ".hva");
return new Voxel(this, vxl, hva);
}

View File

@@ -1,10 +1,11 @@
#region Copyright & License Information
/*
* Copyright 2007-2015 The OpenRA Developers (see AUTHORS)
* Copyright 2007-2016 The OpenRA Developers (see AUTHORS)
* This file is part of OpenRA, which is free software. It is made
* available to you under the terms of the GNU General Public License
* as published by the Free Software Foundation. For more information,
* see COPYING.
* as published by the Free Software Foundation, either version 3 of
* the License, or (at your option) any later version. For more
* information, see COPYING.
*/
#endregion
@@ -12,6 +13,7 @@ using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using OpenRA.FileSystem;
namespace OpenRA.Graphics
{
@@ -19,21 +21,16 @@ namespace OpenRA.Graphics
{
static Dictionary<string, Dictionary<string, Voxel>> units;
public static void Initialize(string[] voxelFiles, List<MiniYamlNode> voxelNodes)
public static void Initialize(VoxelLoader loader, IReadOnlyFileSystem fileSystem, List<MiniYamlNode> sequences)
{
units = new Dictionary<string, Dictionary<string, Voxel>>();
var sequences = voxelFiles
.Select(s => MiniYaml.FromFile(s))
.Aggregate(voxelNodes, MiniYaml.MergeLiberal);
foreach (var s in sequences)
LoadVoxelsForUnit(s.Key, s.Value);
LoadVoxelsForUnit(loader, s.Key, s.Value);
Game.ModData.VoxelLoader.RefreshBuffer();
loader.RefreshBuffer();
}
static Voxel LoadVoxel(string unit, MiniYaml info)
static Voxel LoadVoxel(VoxelLoader voxelLoader, string unit, MiniYaml info)
{
var vxl = unit;
var hva = unit;
@@ -47,15 +44,15 @@ namespace OpenRA.Graphics
hva = fields[1].Trim();
}
return Game.ModData.VoxelLoader.Load(vxl, hva);
return voxelLoader.Load(vxl, hva);
}
static void LoadVoxelsForUnit(string unit, MiniYaml sequences)
static void LoadVoxelsForUnit(VoxelLoader loader, string unit, MiniYaml sequences)
{
Game.ModData.LoadScreen.Display();
try
{
var seq = sequences.ToDictionary(my => LoadVoxel(unit, my));
var seq = sequences.ToDictionary(my => LoadVoxel(loader, unit, my));
units.Add(unit, seq);
}
catch (FileNotFoundException) { } // Do nothing; we can crash later if we actually wanted art

View File

@@ -1,10 +1,11 @@
#region Copyright & License Information
/*
* Copyright 2007-2015 The OpenRA Developers (see AUTHORS)
* Copyright 2007-2016 The OpenRA Developers (see AUTHORS)
* This file is part of OpenRA, which is free software. It is made
* available to you under the terms of the GNU General Public License
* as published by the Free Software Foundation. For more information,
* see COPYING.
* as published by the Free Software Foundation, either version 3 of
* the License, or (at your option) any later version. For more
* information, see COPYING.
*/
#endregion
@@ -21,11 +22,11 @@ namespace OpenRA.Graphics
public readonly Sprite Sprite;
public readonly Sprite ShadowSprite;
public readonly float ShadowDirection;
public readonly float2[] ProjectedShadowBounds;
public readonly float3[] ProjectedShadowBounds;
public VoxelRenderProxy(Sprite sprite, Sprite shadowSprite, float2[] projectedShadowBounds, float shadowDirection)
public VoxelRenderProxy(Sprite sprite, Sprite shadowSprite, float3[] projectedShadowBounds, float shadowDirection)
{
this.Sprite = sprite;
Sprite = sprite;
ShadowSprite = shadowSprite;
ProjectedShadowBounds = projectedShadowBounds;
ShadowDirection = shadowDirection;
@@ -93,6 +94,8 @@ namespace OpenRA.Graphics
var invShadowTransform = Util.MatrixInverse(shadowTransform);
var cameraTransform = Util.MakeFloatMatrix(camera.AsMatrix());
var invCameraTransform = Util.MatrixInverse(cameraTransform);
if (invCameraTransform == null)
throw new InvalidOperationException("Failed to invert the cameraTransform matrix during RenderAsync.");
// Sprite rectangle
var tl = new float2(float.MaxValue, float.MaxValue);
@@ -142,7 +145,7 @@ namespace OpenRA.Graphics
var shadowScreenTransform = Util.MatrixMultiply(cameraTransform, invShadowTransform);
var shadowGroundNormal = Util.MatrixVectorMultiply(shadowTransform, groundNormal);
var screenCorners = new float2[4];
var screenCorners = new float3[4];
for (var j = 0; j < 4; j++)
{
// Project to ground plane
@@ -151,17 +154,17 @@ namespace OpenRA.Graphics
// Rotate to camera-space
corners[j] = Util.MatrixVectorMultiply(shadowScreenTransform, corners[j]);
screenCorners[j] = new float2(corners[j][0], corners[j][1]);
screenCorners[j] = new float3(corners[j][0], corners[j][1], 0);
}
// Shadows are rendered at twice the resolution to reduce artefacts
// Shadows are rendered at twice the resolution to reduce artifacts
Size spriteSize, shadowSpriteSize;
int2 spriteOffset, shadowSpriteOffset;
CalculateSpriteGeometry(tl, br, 1, out spriteSize, out spriteOffset);
CalculateSpriteGeometry(stl, sbr, 2, out shadowSpriteSize, out shadowSpriteOffset);
var sprite = sheetBuilder.Allocate(spriteSize, spriteOffset);
var shadowSprite = sheetBuilder.Allocate(shadowSpriteSize, shadowSpriteOffset);
var sprite = sheetBuilder.Allocate(spriteSize, 0, spriteOffset);
var shadowSprite = sheetBuilder.Allocate(shadowSpriteSize, 0, shadowSpriteOffset);
var sb = sprite.Bounds;
var ssb = shadowSprite.Bounds;
var spriteCenter = new float2(sb.Left + sb.Width / 2, sb.Top + sb.Height / 2);
@@ -198,9 +201,12 @@ namespace OpenRA.Graphics
{
var rd = v.Voxel.RenderData(i);
var t = v.Voxel.TransformationMatrix(i, frame);
var it = Util.MatrixInverse(t);
if (it == null)
throw new InvalidOperationException("Failed to invert the transformed matrix of frame {0} during RenderAsync.".F(i));
// Transform light vector from shadow -> world -> limb coords
var lightDirection = ExtractRotationVector(Util.MatrixMultiply(Util.MatrixInverse(t), lightTransform));
var lightDirection = ExtractRotationVector(Util.MatrixMultiply(it, lightTransform));
Render(rd, Util.MatrixMultiply(transform, t), lightDirection,
lightAmbientColor, lightDiffuseColor, color.TextureMidIndex, normals.TextureMidIndex);
@@ -263,7 +269,7 @@ namespace OpenRA.Graphics
shader.SetVec("AmbientLight", ambientLight, 3);
shader.SetVec("DiffuseLight", diffuseLight, 3);
shader.Render(() => renderer.DrawBatch(Game.ModData.VoxelLoader.VertexBuffer, renderData.Start, renderData.Count, PrimitiveType.QuadList));
shader.Render(() => renderer.DrawBatch(Game.ModData.VoxelLoader.VertexBuffer, renderData.Start, renderData.Count, PrimitiveType.TriangleList));
}
public void BeginFrame()
@@ -331,7 +337,7 @@ namespace OpenRA.Graphics
var size = new Size(renderer.SheetSize, renderer.SheetSize);
var framebuffer = renderer.Device.CreateFrameBuffer(size);
var sheet = new Sheet(SheetType.DualIndexed, framebuffer.Texture);
var sheet = new Sheet(SheetType.BGRA, framebuffer.Texture);
mappedBuffers.Add(sheet, framebuffer);
return sheet;

View File

@@ -1,10 +1,11 @@
#region Copyright & License Information
/*
* Copyright 2007-2015 The OpenRA Developers (see AUTHORS)
* Copyright 2007-2016 The OpenRA Developers (see AUTHORS)
* This file is part of OpenRA, which is free software. It is made
* available to you under the terms of the GNU General Public License
* as published by the Free Software Foundation. For more information,
* see COPYING.
* as published by the Free Software Foundation, either version 3 of
* the License, or (at your option) any later version. For more
* information, see COPYING.
*/
#endregion
@@ -12,6 +13,7 @@ using System;
using System.Collections.Generic;
using System.Drawing;
using System.Linq;
using OpenRA.Effects;
using OpenRA.Traits;
namespace OpenRA.Graphics
@@ -21,10 +23,6 @@ namespace OpenRA.Graphics
public static readonly Func<IRenderable, int> RenderableScreenZPositionComparisonKey =
r => ZPosition(r.Pos, r.ZOffset);
const int RangeCircleSegments = 32;
static readonly int[][] RangeCircleStartRotations = Exts.MakeArray(RangeCircleSegments, i => WRot.FromFacing(8 * i).AsMatrix());
static readonly int[][] RangeCircleEndRotations = Exts.MakeArray(RangeCircleSegments, i => WRot.FromFacing(8 * i + 6).AsMatrix());
public readonly Size TileSize;
public readonly World World;
public readonly Theater Theater;
@@ -37,8 +35,9 @@ namespace OpenRA.Graphics
readonly TerrainRenderer terrainRenderer;
readonly Lazy<DeveloperMode> devTrait;
readonly Func<string, PaletteReference> createPaletteReference;
readonly bool enableDepthBuffer;
internal WorldRenderer(World world)
internal WorldRenderer(ModData modData, World world)
{
World = world;
TileSize = World.Map.Grid.TileSize;
@@ -46,6 +45,9 @@ namespace OpenRA.Graphics
createPaletteReference = CreatePaletteReference;
var mapGrid = modData.Manifest.Get<MapGrid>();
enableDepthBuffer = mapGrid.EnableDepthBuffer;
foreach (var pal in world.TraitDict.ActorsWithTrait<ILoadsPalettes>())
pal.Trait.LoadPalettes(this);
@@ -54,7 +56,7 @@ namespace OpenRA.Graphics
palette.Initialize();
Theater = new Theater(world.TileSet);
Theater = new Theater(world.Map.Rules.TileSet);
terrainRenderer = new TerrainRenderer(world, this);
devTrait = Exts.Lazy(() => world.LocalPlayer != null ? world.LocalPlayer.PlayerActor.Trait<DeveloperMode>() : null);
@@ -98,10 +100,7 @@ namespace OpenRA.Graphics
List<IFinalizedRenderable> GenerateRenderables()
{
var actors = World.ScreenMap.ActorsInBox(Viewport.TopLeft, Viewport.BottomRight)
.Append(World.WorldActor);
// Include player actor for the rendered player
var actors = World.ScreenMap.ActorsInBox(Viewport.TopLeft, Viewport.BottomRight).Append(World.WorldActor);
if (World.RenderPlayer != null)
actors = actors.Append(World.RenderPlayer.PlayerActor);
@@ -109,19 +108,11 @@ namespace OpenRA.Graphics
if (World.OrderGenerator != null)
worldRenderables = worldRenderables.Concat(World.OrderGenerator.Render(this, World));
worldRenderables = worldRenderables.Concat(World.Effects.SelectMany(e => e.Render(this)));
worldRenderables = worldRenderables.OrderBy(RenderableScreenZPositionComparisonKey);
// Effects are drawn on top of all actors
// HACK: Effects aren't interleaved with actors.
var effectRenderables = World.Effects
.SelectMany(e => e.Render(this));
if (World.OrderGenerator != null)
effectRenderables = effectRenderables.Concat(World.OrderGenerator.RenderAfterWorld(this, World));
Game.Renderer.WorldVoxelRenderer.BeginFrame();
var renderables = worldRenderables.Concat(effectRenderables)
.Select(r => r.PrepareRender(this)).ToList();
var renderables = worldRenderables.Select(r => r.PrepareRender(this)).ToList();
Game.Renderer.WorldVoxelRenderer.EndFrame();
return renderables;
@@ -133,7 +124,11 @@ namespace OpenRA.Graphics
return;
if (devTrait.Value != null)
{
Game.Renderer.WorldSpriteRenderer.SetDepthPreviewEnabled(devTrait.Value.ShowDepthPreview);
Game.Renderer.WorldRgbaSpriteRenderer.SetDepthPreviewEnabled(devTrait.Value.ShowDepthPreview);
Game.Renderer.WorldRgbaColorRenderer.SetDepthPreviewEnabled(devTrait.Value.ShowDepthPreview);
}
RefreshPalette();
@@ -144,33 +139,56 @@ namespace OpenRA.Graphics
var bounds = Viewport.GetScissorBounds(World.Type != WorldType.Editor);
Game.Renderer.EnableScissor(bounds);
if (enableDepthBuffer)
Game.Renderer.Device.EnableDepthBuffer();
terrainRenderer.Draw(this, Viewport);
Game.Renderer.Flush();
for (var i = 0; i < renderables.Count; i++)
renderables[i].Render(this);
foreach (var a in World.ActorsWithTrait<IPostRender>())
if (enableDepthBuffer)
Game.Renderer.ClearDepthBuffer();
foreach (var a in World.ActorsWithTrait<IRenderAboveWorld>())
if (a.Actor.IsInWorld && !a.Actor.Disposed)
a.Trait.RenderAfterWorld(this, a.Actor);
a.Trait.RenderAboveWorld(a.Actor, this);
var renderShroud = World.RenderPlayer != null ? World.RenderPlayer.Shroud : null;
foreach (var a in World.ActorsWithTrait<IRenderShroud>())
a.Trait.RenderShroud(this, renderShroud);
if (enableDepthBuffer)
Game.Renderer.ClearDepthBuffer();
if (devTrait.Value != null && devTrait.Value.ShowDebugGeometry)
for (var i = 0; i < renderables.Count; i++)
renderables[i].RenderDebugGeometry(this);
foreach (var a in World.ActorsWithTrait<IRenderShroud>())
a.Trait.RenderShroud(renderShroud, this);
if (enableDepthBuffer)
Game.Renderer.Device.DisableDepthBuffer();
Game.Renderer.DisableScissor();
var overlayRenderables = World.Selection.Actors.Where(a => !a.Disposed)
.SelectMany(a => a.TraitsImplementing<IPostRenderSelection>())
.SelectMany(t => t.RenderAfterWorld(this));
var aboveShroud = World.ActorsWithTrait<IRenderAboveShroud>().Where(a => a.Actor.IsInWorld && !a.Actor.Disposed)
.SelectMany(a => a.Trait.RenderAboveShroud(a.Actor, this));
var aboveShroudSelected = World.Selection.Actors.Where(a => !a.Disposed)
.SelectMany(a => a.TraitsImplementing<IRenderAboveShroudWhenSelected>()
.SelectMany(t => t.RenderAboveShroud(a, this)));
var aboveShroudEffects = World.Effects.Select(e => e as IEffectAboveShroud)
.Where(e => e != null)
.SelectMany(e => e.RenderAboveShroud(this));
var aboveShroudOrderGenerator = SpriteRenderable.None;
if (World.OrderGenerator != null)
aboveShroudOrderGenerator = World.OrderGenerator.RenderAboveShroud(this, World);
Game.Renderer.WorldVoxelRenderer.BeginFrame();
var finalOverlayRenderables = overlayRenderables.Select(r => r.PrepareRender(this));
var finalOverlayRenderables = aboveShroud
.Concat(aboveShroudSelected)
.Concat(aboveShroudEffects)
.Concat(aboveShroudOrderGenerator)
.Select(r => r.PrepareRender(this));
Game.Renderer.WorldVoxelRenderer.EndFrame();
// HACK: Keep old grouping behaviour
@@ -179,54 +197,18 @@ namespace OpenRA.Graphics
r.Render(this);
if (devTrait.Value != null && devTrait.Value.ShowDebugGeometry)
{
for (var i = 0; i < renderables.Count; i++)
renderables[i].RenderDebugGeometry(this);
foreach (var g in finalOverlayRenderables.GroupBy(prs => prs.GetType()))
foreach (var r in g)
r.RenderDebugGeometry(this);
if (World.Type == WorldType.Regular && Game.Settings.Game.AlwaysShowStatusBars)
{
foreach (var g in World.Actors.Where(a => !a.Disposed
&& a.Info.HasTraitInfo<SelectableInfo>()
&& !World.FogObscures(a)
&& !World.Selection.Actors.Contains(a)))
DrawRollover(g);
}
Game.Renderer.Flush();
}
public void DrawRollover(Actor unit)
{
if (unit.Info.HasTraitInfo<SelectableInfo>())
new SelectionBarsRenderable(unit).Render(this);
}
public void DrawRangeCircle(WPos pos, WDist range, Color c)
{
var offset = new WVec(range.Length, 0, 0);
for (var i = 0; i < RangeCircleSegments; i++)
{
var pa = pos + offset.Rotate(RangeCircleStartRotations[i]);
var pb = pos + offset.Rotate(RangeCircleEndRotations[i]);
Game.Renderer.WorldLineRenderer.DrawLine(ScreenPosition(pa), ScreenPosition(pb), c);
}
}
public void DrawTargetMarker(Color c, float2 location)
{
var tl = new float2(-1 / Viewport.Zoom, -1 / Viewport.Zoom);
var br = new float2(1 / Viewport.Zoom, 1 / Viewport.Zoom);
var bl = new float2(tl.X, br.Y);
var tr = new float2(br.X, tl.Y);
var wlr = Game.Renderer.WorldLineRenderer;
wlr.DrawLine(location + tl, location + tr, c);
wlr.DrawLine(location + tr, location + br, c);
wlr.DrawLine(location + br, location + bl, c);
wlr.DrawLine(location + bl, location + tl, c);
}
public void RefreshPalette()
{
palette.ApplyModifiers(World.WorldActor.TraitsImplementing<IPaletteModifier>());
@@ -239,6 +221,12 @@ namespace OpenRA.Graphics
return new float2(TileSize.Width * pos.X / 1024f, TileSize.Height * (pos.Y - pos.Z) / 1024f);
}
public float3 Screen3DPosition(WPos pos)
{
var z = ZPosition(pos, 0) * TileSize.Height / 1024f;
return new float3(TileSize.Width * pos.X / 1024f, TileSize.Height * (pos.Y - pos.Z) / 1024f, z);
}
public int2 ScreenPxPosition(WPos pos)
{
// Round to nearest pixel
@@ -246,28 +234,34 @@ namespace OpenRA.Graphics
return new int2((int)Math.Round(px.X), (int)Math.Round(px.Y));
}
// For scaling vectors to pixel sizes in the voxel renderer
public void ScreenVectorComponents(WVec vec, out float x, out float y, out float z)
public float3 Screen3DPxPosition(WPos pos)
{
x = TileSize.Width * vec.X / 1024f;
y = TileSize.Height * vec.Y / 1024f;
z = TileSize.Height * vec.Z / 1024f;
// Round to nearest pixel
var px = Screen3DPosition(pos);
return new float3((float)Math.Round(px.X), (float)Math.Round(px.Y), px.Z);
}
// For scaling vectors to pixel sizes in the voxel renderer
public float3 ScreenVectorComponents(WVec vec)
{
return new float3(
TileSize.Width * vec.X / 1024f,
TileSize.Height * (vec.Y - vec.Z) / 1024f,
TileSize.Height * vec.Z / 1024f);
}
// For scaling vectors to pixel sizes in the voxel renderer
public float[] ScreenVector(WVec vec)
{
float x, y, z;
ScreenVectorComponents(vec, out x, out y, out z);
return new[] { x, y, z, 1f };
var xyz = ScreenVectorComponents(vec);
return new[] { xyz.X, xyz.Y, xyz.Z, 1f };
}
public int2 ScreenPxOffset(WVec vec)
{
// Round to nearest pixel
float x, y, z;
ScreenVectorComponents(vec, out x, out y, out z);
return new int2((int)Math.Round(x), (int)Math.Round(y - z));
var xyz = ScreenVectorComponents(vec);
return new int2((int)Math.Round(xyz.X), (int)Math.Round(xyz.Y));
}
public float ScreenZPosition(WPos pos, int offset)

Some files were not shown because too many files have changed in this diff Show More