Compare commits

..

3118 Commits

Author SHA1 Message Date
Matthias Mailänder
3f48c649f0 Merge pull request #7722 from penev92/bleed_diplomacyWindow
Closes #7391
2015-04-05 08:34:38 +02:00
Pavel Penev
a013cf4fca Merge pull request #7842 from obrakmann/change_aircraft_altitude
Lower aircraft altitude
2015-04-04 14:18:20 -07:00
Pavel Penev
be0eaee6cc Merge pull request #7864 from Mailaender/ra-logo
Removed the grain effect from the Red Alert logo
2015-04-04 13:59:01 -07:00
Pavel Penev
0190382104 Merge pull request #7839 from obrakmann/fix7836_gdi05a_crash
Fix issues in gdi05a
2015-04-04 13:50:57 -07:00
Matthias Mailänder
5409c04066 use the new vectorized hammer & sickle as a template 2015-04-04 22:41:41 +02:00
penev92
2c108a1845 Use proper names and flags for unknown players 2015-04-04 17:24:19 +03:00
Matthias Mailänder
cc82e7c527 Merge pull request #7841 from Mailaender/ra-announce-yaml-polishing
Removed AnnounceOnSeen from Red Alert and fixed Lint warnings
2015-04-04 14:22:29 +02:00
Oliver Brakmann
a3f875b8a8 Merge pull request #7845 from reaperrr/mapcontrol-remove
Removed map control from player statistics for performance reasons
2015-04-04 13:24:07 +02:00
Matthias Mailänder
612f18edd8 Merge pull request #7846 from obrakmann/turn-to-attack-delay-v2
Expose turn-to-attack delay to yaml, v2
2015-04-04 10:54:50 +02:00
reaperrr
e25247f259 Removes map control from player statistics for performance reasons 2015-04-04 01:38:54 +02:00
Oliver Brakmann
b1d3486561 Expose Plane turn-to-attack delay to yaml 2015-04-04 00:10:06 +02:00
Oliver Brakmann
32ed63727d Revert "Expose Plane turn-to-attack delay to yaml."
This reverts commit 02da41e5c5.
2015-04-03 23:42:35 +02:00
Oliver Brakmann
a8d7140c1a Merge pull request #7815 from Phrohdoh/aircraft-turn-timing
Expose Plane turn-to-attack delay to yaml.
2015-04-03 23:15:41 +02:00
Oliver Brakmann
4ca27234e6 Merge pull request #7686 from reaperrr/custom-visibility-update
Skip visibility updates when fog & shroud are disabled via lobby
2015-04-03 20:58:56 +02:00
Matthias Mailänder
fd143a5eb0 remove EnemyWatcher from RA 2015-04-03 17:04:43 +02:00
Oliver Brakmann
ba977c040f gdi05a: ensure base discovery trigger fires in time 2015-04-03 16:27:48 +02:00
Oliver Brakmann
d53cfafde9 Lower aircraft altitude
In order to work around a problem where the game does not take aircrafts' altitude into account when deciding whether a unit should be rendered or not, leading to aircrafts seemingly (dis)appearing a couple of cells into the map instead of right at the lower edge of the map.

Planes will now fly at the default altitude of 1280, helicopters slightly below at 1024.
2015-04-03 16:19:27 +02:00
Matthias Mailänder
016e8cd6fe remove automatic EnemyUnitsApproaching notification for D2k 2015-04-03 16:18:41 +02:00
Matthias Mailänder
d0046f804a remove AnnounceOnSeen from Red Alert mod again
closes #7787
2015-04-03 15:36:44 +02:00
Matthias Mailänder
a6af357646 fix OpenRA.Lint Warning
Sprite image camera.* from actor camera.* has no sequence definition
2015-04-03 15:35:29 +02:00
Matthias Mailänder
a8bf90f8b2 Merge pull request #7746 from RoosterDragon/shroud-vis-perf
Speed up frozen actor visibility updates.
2015-04-03 15:20:10 +02:00
Matthias Mailänder
8494ad0a38 Merge pull request #7834 from RoosterDragon/avoid-preventable-allocations
Avoid preventable allocations
2015-04-03 13:52:46 +02:00
RoosterDragon
3885ca3f14 Speed up frozen actor visibility updates.
Cache the isVisibleTest function in the ctor for FrozenActor. The footprint never changes so the test will always be valid.
2015-04-03 12:21:03 +01:00
Oliver Brakmann
253d97ca5d Fix sandbag ownership and build prerequisites for gdi05a 2015-04-03 13:16:57 +02:00
Pavel Penev
cedfe5c0b5 Merge pull request #7734 from RoosterDragon/frozen-lazy-render
Lazily generate frozen actor renderables.
2015-04-03 04:16:19 -07:00
Oliver Brakmann
1070d752f3 Turn event handler into no-op for captured factories in gdi05a 2015-04-03 13:14:25 +02:00
Pavel Penev
39dfbb5505 Merge pull request #7837 from Mailaender/ts-building-overlay-translucency
Added transparency to the Tiberian Sun building placement overlay
2015-04-03 03:39:44 -07:00
Paul Chote
98b8078f7d Merge pull request #7573 from bvandenbogaard/bleed
Added audio.bag/audio.idx support used in RA2
2015-04-03 11:35:54 +01:00
Matthias Mailänder
5733c049e1 Merge pull request #7715 from RoosterDragon/random-prevent-crash
Only evaluate input sequence once in RandomOrDefault.
2015-04-03 12:27:20 +02:00
Matthias Mailänder
bf588c1cf2 transparent build overlay 2015-04-03 12:03:39 +02:00
Paul Chote
070d8ea6a2 Merge pull request #7811 from reaperrr/new-blendmodes1
Added two new BlendModes
2015-04-03 10:57:12 +01:00
Matthias Mailänder
f785f15bf4 Merge pull request #7798 from reaperrr/ts-weapons01
Split TS weapons.yaml and fix weapons and aircraft
2015-04-03 11:56:21 +02:00
Paul Chote
94360655c3 Merge pull request #7830 from obrakmann/fix7824_allies03b_crash
Fix crash in allies03b
2015-04-03 10:44:05 +01:00
Matthias Mailänder
de2860358f Merge pull request #7814 from Phrohdoh/default-image
Image reference in 'Defaults' sequence block.
2015-04-03 10:36:29 +02:00
Matthias Mailänder
39b42a35a0 Merge pull request #7823 from RoosterDragon/celllayer-enumerator
Fix CellLayer.GetEnumerator
2015-04-03 10:13:16 +02:00
Paul Chote
5f7b9b7621 Merge pull request #7827 from obrakmann/fix-refund-tooltip-margins
Fix margins of refund tooltips
2015-04-03 01:13:04 +01:00
RoosterDragon
b66db23adf Only evaluate input sequence once in RandomOrDefault.
This ensures non-deterministic sequences cannot crash by returning an empty sequence on the second evaluation.
2015-04-03 01:08:30 +01:00
Pavel Penev
78afbffbc8 Merge pull request #7835 from reaperrr/fix-ps-check
Fixed make.ps1 'check' command
2015-04-02 15:12:41 -07:00
reaperrr
d72cec6275 Fix make.ps1 'check' command 2015-04-02 23:19:49 +02:00
RoosterDragon
287ead56b3 Avoid allocating a delegate and new list in every tick of RepairableBuilding. 2015-04-02 21:41:22 +01:00
RoosterDragon
ab2ef0ba03 Improve performance of target validation.
The Warhead and WeaponInfo classes now maintain preconstructed sets of valid and invalid targets to speed up validation checks since LINQ Intersect no longer has to be called (which recreates the sets internally each time).

Fixed minor bugs in the AI where it was repeating the validation logic but failing to account for invalid targets.
2015-04-02 21:11:12 +01:00
Pavel Penev
5ac648600d Merge pull request #7794 from ScottNZ/balance-stuff
Misc ra balance changes
2015-04-02 11:47:38 -07:00
Oliver Brakmann
92e0dbd864 Merge pull request #7822 from RoosterDragon/map-cache-dispose-fix
Ensure MapCache disposes cleanly.
2015-04-02 20:26:02 +02:00
Oliver Brakmann
b1f6136b98 Fix crash in allies03b 2015-04-02 19:06:16 +02:00
Taryn Hill
58f32a11f8 Merge pull request #7828 from obrakmann/fix7821_pbog_crash_td
Fix crash when placing buildings in TD.
2015-04-02 11:38:35 -05:00
Oliver Brakmann
0406e8e708 Add $-sign to refund tooltip 2015-04-02 18:35:34 +02:00
Oliver Brakmann
5e7a71edf5 Fix crash when placing buildings in TD
Caused by production queues being tied to buildings, not the player, in TD.
PBOG would therefore try to find the PlaceBuilding trait, which is on the player, on the conyard actor and crash.
2015-04-02 18:04:19 +02:00
reaperrr
4fc58b4491 Skip shroud/fog calculations when both are disabled via lobby option. 2015-04-02 00:42:51 +02:00
RoosterDragon
9c0d3d737d Fix CellLayer.GetEnumerator. 2015-04-01 22:52:36 +01:00
reaperrr
6dc577ed6f Make all aircraft repairable on GDI repair bay, make all armed aircraft rearmable on both helipads 2015-04-01 23:49:01 +02:00
reaperrr
32bed06df5 Fix Orca Bomber and Banshee Fighter flight behavior and reloading 2015-04-01 23:49:00 +02:00
reaperrr
0efce0e94a Brings TS weapons more in line with the original's rules
Adds trails to missiles.
2015-04-01 23:48:59 +02:00
reaperrr
fbfc38fe1b Fix TS weapon names to match the original 2015-04-01 22:42:01 +02:00
reaperrr
ca67407358 Split TS weapons.yaml into several categorized yamls 2015-04-01 22:42:01 +02:00
reaperrr
40d73db9fd Added BlendModes to TS EMP explosion and Ion Cannon explosion 2015-04-01 22:01:26 +02:00
reaperrr
883e3822c6 Tweak D2k artillery missiles speed and angle.
Additionally, remove bogus properties (leftovers from projectile change)
2015-04-01 22:01:25 +02:00
reaperrr
10f205b43d Reduce brightness of several D2k weapon effects via new blend modes 2015-04-01 22:01:24 +02:00
RoosterDragon
47e2c48068 Ensure MapCache disposes cleanly.
This prevents the map loading thread writing to disposed objects which can have unintended side effects.
2015-04-01 20:58:09 +01:00
Oliver Brakmann
cc1da824cd Merge pull request #7820 from Mailaender/oldlength-ancient-mono-fix
Removed unused oldLength
2015-04-01 21:39:56 +02:00
reaperrr
c0448fce3e Adds two new BlendModes. 2015-04-01 21:16:01 +02:00
Matthias Mailänder
dc3f82f537 Merge pull request #7816 from Phrohdoh/cleanups
Small code cleanup.
2015-04-01 20:53:42 +02:00
Matthias Mailänder
4cc016c3d0 remove unused oldLength
closes #7808
2015-04-01 19:43:56 +02:00
Taryn Hill
4ed53c5952 Simplify return statements.
Remove redundant ‘this’.
Remove unused using directives.
Simplify LINQ chains.
Add some trait property descriptions.
Add readonly where viable.
Add fullstops to some yaml descriptions.
2015-04-01 12:33:17 -05:00
Chris Forbes
14e9cfd433 Merge pull request #7812 from pchote/modules
Pluggable upgrade modules
2015-04-02 05:25:48 +13:00
Oliver Brakmann
ff77d2d029 Fix margins of refund tooltips 2015-04-01 17:14:41 +02:00
Taryn Hill
28ea59854e Merge pull request #7748 from pchote/heightmap-input
Account for terrain height and slope when calculating order location.
2015-04-01 07:57:33 -05:00
Taryn Hill
02da41e5c5 Expose Plane turn-to-attack delay to yaml.
Require Plane in some ctors.
2015-04-01 00:12:20 -05:00
Taryn Hill
32083344aa Set place to default image for TS’ overlay sequence. 2015-03-31 21:37:28 -05:00
Taryn Hill
f41497b421 Allow Defaults: image in sequence definitions. 2015-03-31 21:36:50 -05:00
Taryn Hill
e066c893eb Remove unnecessary image references in ts/sequences/misc. 2015-03-31 21:36:15 -05:00
Paul Chote
704e3656b4 Implement Ion Cannon Uplink upgrade. 2015-03-31 22:32:13 +01:00
Paul Chote
a89029acf0 Implement GDI power turbines upgrade. 2015-03-31 22:32:13 +01:00
Paul Chote
0c5be6183f Implement GDI component tower upgrades. 2015-03-31 22:32:13 +01:00
Paul Chote
ebd09f196c Add upgrade support to SupportPower. 2015-03-31 22:32:12 +01:00
Paul Chote
e440d00585 Add upgrade support to WithIdleOverlay. 2015-03-31 22:32:12 +01:00
Paul Chote
5c18220636 Add upgrade support to WithTurret. 2015-03-31 22:32:11 +01:00
Paul Chote
42f3fa7439 Add upgrade support to WithMuzzleFlash. 2015-03-31 22:23:44 +01:00
Paul Chote
ee12257d24 Fix RenderRangeCircle for disabled Armaments. 2015-03-31 22:23:43 +01:00
Paul Chote
a9e1c09d82 Add upgrade support to DetectCloaked. 2015-03-31 22:23:43 +01:00
Paul Chote
4597895ea3 Add upgrade support to AttackBase. 2015-03-31 22:23:43 +01:00
Paul Chote
d1839701bb Add Plug and Pluggable for building actor-specific upgrades. 2015-03-31 22:23:41 +01:00
reaperrr
c0c7ad1035 Merge pull request #7806 from Phrohdoh/ts-placement-marker
Expose PlaceBuilding palette and use palette.pal for TS' overlay.
2015-03-31 23:19:02 +02:00
Taryn Hill
79a0ab0667 Use palette.pal for the TS foundation overlay. 2015-03-31 15:26:16 -05:00
Taryn Hill
c6c52eac7d Expose and document the palette used
by PlaceBuildingOrderGenerator for
the structure placement overlay
2015-03-31 15:26:04 -05:00
Paul Chote
57a6fff6ce Don’t crash if the click location is outside the map. 2015-03-31 20:59:53 +01:00
Paul Chote
c0fa025b74 Indicate current mouseover cell in TerrainGeometryOverlay. 2015-03-31 20:59:53 +01:00
Paul Chote
1e54b19bd3 Implement heightmap-aware view -> cell conversion. 2015-03-31 20:59:53 +01:00
Paul Chote
c68cb995f4 Move cell corner state into Map. 2015-03-31 20:59:52 +01:00
Paul Chote
49624e335c Remove legacy DIY view -> world conversions. 2015-03-31 20:59:52 +01:00
Paul Chote
2630537daf Fix a mistake in Map.CellContaining.
Fixes #6247.
2015-03-31 20:59:52 +01:00
Taryn Hill
0d5588f08a Merge pull request #7772 from pchote/remove-tilesetbuilder
Remove OpenRA.TilesetBuilder.
2015-03-31 14:56:02 -05:00
Paul Chote
878a0f7008 Remove OpenRA.TilesetBuilder.
This project has not been maintained in years,
and has been outright broken for a significant
amount of this period.
2015-03-31 20:42:37 +01:00
reaperrr
360f3bc2f8 Merge pull request #7776 from pchote/ts-buildables
Remove bogus buildable actors from TS.
2015-03-31 21:05:15 +02:00
Paul Chote
9ac3e57afd Fix EMP icon. 2015-03-31 19:11:38 +01:00
Paul Chote
f0414d2ec0 Make special structures unbuildable. 2015-03-31 19:11:38 +01:00
Paul Chote
a3ba925458 Make special vehicles unbuildable. 2015-03-31 19:11:38 +01:00
Paul Chote
1f4fe0a44d Move civilian vehicles to their own yaml file. 2015-03-31 19:11:37 +01:00
Paul Chote
7b330e23e2 Make special aircraft unbuildable. 2015-03-31 19:11:37 +01:00
Paul Chote
b6ca5102b4 Fix mutant hijacker. 2015-03-31 19:11:37 +01:00
Paul Chote
fbca912207 Make mission-specific and civilian infantry unbuildable. 2015-03-31 19:11:22 +01:00
Paul Chote
f7e1140268 Merge pull request #7771 from reaperrr/d2k-yaml-cleanup1
Fixes D2k muzzle/firing offsets and cleans sequences
2015-03-31 17:55:13 +01:00
Paul Chote
9fdd43ed41 Merge pull request #7789 from Phrohdoh/ts-starting-units
Add light, medium, and heavy starting units to TS.
2015-03-31 17:45:54 +01:00
Paul Chote
cca1ccab1f Merge pull request #7796 from MustaphaTR/3-orni
D2K - 3 Ornithopter
2015-03-31 17:42:13 +01:00
Paul Chote
b9ac0ec077 Merge pull request #7792 from reaperrr/ts-shell-titan
Fix TS shellmap music and Titan selection box
2015-03-31 17:40:12 +01:00
Benno van den Bogaard
8cf7c46c8f Added audio.bag/audio.idx support used in RA2 2015-03-31 18:13:20 +02:00
Oliver Brakmann
bec56ee5b6 Merge pull request #7784 from reaperrr/fix-ctor-regressions
Fixes #7764, #7780...
2015-03-31 00:06:01 +02:00
Oliver Brakmann
c9a4f9c126 Merge pull request #7757 from pchote/ts-tileset-variants
Add support for TS-style random tile variants.
2015-03-30 23:25:05 +02:00
reaperrr
83b702343e Fixes #7764, #7780 and other potential regressions introduced by #7671. 2015-03-30 21:51:29 +02:00
Paul Chote
84e85d8a5d Rename Image -> Images. 2015-03-30 20:20:36 +01:00
Paul Chote
4be5334a0e Add support for TS-style random tile variants. 2015-03-30 19:44:53 +01:00
Mustafa Alperen Seki
71874392b7 3 Ornithopter 2015-03-30 17:35:23 +02:00
ScottNZ
d3f2a8677e Spy Plane ability is no longer special compared to the other factions, so remove it from the Soviet faction description 2015-03-31 00:01:40 +13:00
ScottNZ
925f838e6d Update some infantry tooltip descriptions 2015-03-30 23:55:22 +13:00
ScottNZ
5a29febe97 Increase shroud reveal range of shok from 4 cells to 5 2015-03-30 23:55:22 +13:00
ScottNZ
c193b91b4f Increase shok range from 3.5 cells to 6 2015-03-30 23:55:21 +13:00
ScottNZ
b62a710fd9 Remove sniper (make it unbuildable) 2015-03-30 23:55:20 +13:00
ScottNZ
f7893534f5 Make spy plane available to all Soviet factions 2015-03-30 23:55:20 +13:00
ScottNZ
5e3457a046 Buff pillbox against infantry 2015-03-30 23:55:19 +13:00
reaperrr
0b4ec5a815 Merge pull request #7770 from penev92/bleed_starportCarryall
Bring back carryall.starport and fix trike.starport's prerequisites
2015-03-30 02:13:46 +02:00
reaperrr
ad808a4ad0 Fixes Titan selection box, improves Wolverine selection box. 2015-03-30 02:04:52 +02:00
reaperrr
ba0b934c38 Fix TS shellmap music 2015-03-30 02:04:51 +02:00
Taryn Hill
410d9325e3 Add light, medium, and heavy starting units to TS. 2015-03-29 14:50:05 -05:00
reaperrr
57dab6ccc1 Fix D2k gun tower to use tank muzzle 2015-03-29 14:23:09 +02:00
Paul Chote
dcebbf211c Merge pull request #7754 from Phrohdoh/crlf-to-lf
Replace CRLF with LF in TilesetBuilder/defaults.yaml.
2015-03-29 12:17:19 +01:00
reaperrr
25d5daf6f5 Fixes/improves D2k firing offsets.
- Raider/Stealth Raider
- Bazooka infantry
- Devastator
- Gun Tower
2015-03-29 12:42:47 +02:00
reaperrr
05426562cd D2k sequence cleanups and gun turret muzzle fix 2015-03-29 12:42:46 +02:00
penev92
df759172c0 Bring back carryall.starport and fix trike.starport's prerequisites 2015-03-29 13:06:51 +03:00
Pavel Penev
975cb3101f Merge pull request #7765 from Mailaender/voxel-shadow-palette
Documented the voxel shadow palette
2015-03-29 02:27:21 -07:00
Oliver Brakmann
9b1ef23c3c Merge pull request #7768 from OpenRA/revert-7761-appveyor-artifacts-kiss
Revert "Deploy with just OpenRA-Setup.exe"
2015-03-29 11:09:51 +02:00
Oliver Brakmann
ebe8e1dc4d Merge pull request #7766 from Mailaender/appveyor-make-version
Fixed the missing version tag in the Windows installer
2015-03-29 11:08:52 +02:00
Matthias Mailänder
105417e7c1 Revert "Deploy with just OpenRA-Setup.exe" 2015-03-29 10:30:57 +02:00
Matthias Mailänder
e289be1557 tag the version on Windows 2015-03-29 08:24:47 +02:00
Matthias Mailänder
c5a1141711 un-hardcode and self-document the shadow palette 2015-03-29 08:17:20 +02:00
Matthias Mailänder
91d4a1ce66 Update README.md
linkfix
2015-03-28 23:58:09 +01:00
Matthias Mailänder
6666f1ec46 Merge pull request #7762 from Mailaender/appveyor-after-test
Package after the units tests instead of before deploy
2015-03-28 23:33:55 +01:00
Matthias Mailänder
fb3ea081a1 before before deploy 2015-03-28 23:20:16 +01:00
Oliver Brakmann
4a69687311 Merge pull request #7761 from Mailaender/appveyor-artifacts-kiss
Deploy with just OpenRA-Setup.exe
2015-03-28 23:00:30 +01:00
Matthias Mailänder
dc9b193925 KISS 2015-03-28 22:53:41 +01:00
Matthias Mailänder
49835b2f7a Merge pull request #7760 from Mailaender/appveyor-artifact-name
Yet another attempt to fix AppVeyor deployment
2015-03-28 22:22:45 +01:00
Matthias Mailänder
766b9d6aa3 try a different syntax for environment variables 2015-03-28 22:01:33 +01:00
Matthias Mailänder
e454e6dcb1 name the artifact 2015-03-28 21:53:39 +01:00
Matthias Mailänder
3bcc94c182 Merge pull request #7759 from obrakmann/fix-wiki-update
Fix wiki update to match travis' idea of branch names
2015-03-28 21:15:23 +01:00
Oliver Brakmann
858a8331b1 Merge pull request #7758 from Mailaender/appveyor-artifacts
Tried to fix AppVeyor deployment
2015-03-28 21:14:42 +01:00
Oliver Brakmann
6f54f8e616 Fix wiki update to match travis' idea of branch names 2015-03-28 21:00:17 +01:00
Matthias Mailänder
324dcf0e8a try to simplify/fix the artifacts filter 2015-03-28 20:57:42 +01:00
Matthias Mailänder
e886f64785 Merge pull request #7756 from pchote/fix-ts-palette
Fix TS player palette definition.
2015-03-28 20:17:49 +01:00
Paul Chote
77a56c95f1 Fix TS player palette definition.
Regression from #7699.
2015-03-28 19:11:44 +00:00
Oliver Brakmann
820df840a3 Merge pull request #7755 from Mailaender/powershell-utf8
Enforced UTF8 encoding for pandoc
2015-03-28 20:07:49 +01:00
Matthias Mailänder
f287fb9c10 enforce UTF8 encoding for pandoc 2015-03-28 19:45:11 +01:00
penev92
a26be8188c Hide faction for players who randomed in diplomacy and objectives panels 2015-03-28 20:44:05 +02:00
Taryn Hill
3faea1bfc0 Replace CRLF with LF in TilesetBuilder/defaults.yaml 2015-03-28 12:53:34 -05:00
Matthias Mailänder
b59bdce194 Merge pull request #7753 from obrakmann/fix-appyveyor
Fix appveyor build again
2015-03-28 18:20:21 +01:00
Oliver Brakmann
ba7b2ac6bd Reverse arguments to pandoc 2015-03-28 18:15:29 +01:00
Oliver Brakmann
93af7b7677 Merge pull request #7752 from Mailaender/pandoc-appveyor-fix
Trying to fix pandoc in the AppVeyor build again
2015-03-28 18:00:43 +01:00
Matthias Mailänder
f6d740b4b7 absolute path for pandoc 2015-03-28 16:55:43 +01:00
Matthias Mailänder
8f1f2e8999 prepare for Chocolatey (v0.9.9) 2015-03-28 16:54:58 +01:00
Oliver Brakmann
2cf53f0e13 Merge pull request #7747 from reaperrr/ra-tent-fix
Made RA tent art tileset-specific again
2015-03-28 16:22:40 +01:00
reaperrr
c32631de9b Merge pull request #7699 from x-a-n-a-x/new-TS-build-palette-skin
Added a new Tiberian Sun mod build palette skin
2015-03-28 16:15:22 +01:00
Paul Chote
9b11b0fd41 Merge pull request #7607 from Mailaender/html-local-markdown
Brought back the HTML documentation for NSIS
2015-03-28 14:55:00 +00:00
Matthias Mailänder
5733e3832e Merge pull request #7749 from pchote/remove-legacy-extensions
Remove GlobalFilesystem.OpenWithExts.
2015-03-28 15:27:03 +01:00
Paul Chote
b2458fc614 Remove GlobalFilesystem.OpenWithExts. Closes #5272. 2015-03-28 12:38:48 +00:00
reaperrr
2a6f69345d Removes the desert conversions of walls.
The files aren't used by the game anymore and just confuse the legacy editor.
2015-03-28 13:38:08 +01:00
reaperrr
557b479f40 Makes ra tent art tileset-specific again 2015-03-28 12:43:12 +01:00
Matthias Mailänder
99283da84f Merge pull request #7723 from RoosterDragon/batch-shroud-cell-changes
Batch shroud cell changes
2015-03-28 12:16:30 +01:00
x-a-n-a-x
a8d5542422 Added a new Tiberian Sun mod build palette skin 2015-03-28 10:10:45 +01:00
Matthias Mailänder
87d2aa062a Merge pull request #7710 from pchote/radar-geometry-fix
Fix radar origin for non-square widgets.
2015-03-28 10:01:06 +01:00
reaperrr
fe09cef825 Merge pull request #7745 from pchote/ts-snow
Add snow tileset and artwork to TS.
2015-03-28 01:26:41 +01:00
reaperrr
764c082478 Merge pull request #7741 from pchote/ra-remove-legacy-parsing
Disable legacy sequence parsing in RA.
2015-03-28 00:45:46 +01:00
Oliver Brakmann
18c59bdb7f Merge pull request #7671 from reaperrr/random-optimisations
More constructor caching and minor random optimisations
2015-03-27 23:40:11 +01:00
Oliver Brakmann
66c56ac47a Merge pull request #7678 from delftswa2014/feature/aicheats
Money cheat for all players and AI
2015-03-27 23:02:37 +01:00
Oliver Brakmann
7739f59d62 Merge pull request #7703 from reaperrr/d2k-trails
Fixed D2k trails and deviator explosion color
2015-03-27 22:27:20 +01:00
RoosterDragon
d44830c945 Inline the equality test in CPos.Equals for performance. 2015-03-27 19:50:09 +00:00
RoosterDragon
1853ddde94 Use MPos indexer for CellLayer in Shroud.
This reduces us to one conversion per cell rather than two or three.
2015-03-27 19:50:07 +00:00
RoosterDragon
1584018dcd Batch shroud cell changes.
By maintaining a set of changed cells we can avoid repeating work for cells that change multiple times before being rendered. The shroud renderer and radar widget now delay their work until they must render, and thus process each changed cell only once. This avoids significant repetition that was causing major slowdown when many actors were in the world.
2015-03-27 19:50:05 +00:00
reaperrr
663d434457 Fix sniper electro death anim.
Closes #7742.
2015-03-27 17:35:16 +00:00
reaperrr
b7fc275067 RA sequence cleanups.
Note: Removing Length: * from interior boxes and larvae as well as barrels
is intentional, boxes have just 1 frame, and frames 2+3 of larvae and
barrels are just duplicates of the first, added by Westwood to work around
damage stage issues.

Fixes fence palette on desert maps.
2015-03-27 17:35:16 +00:00
Paul Chote
08aa1e86a9 Disable legacy sequence parsing in RA. 2015-03-27 17:35:15 +00:00
reaperrr
6f244d5e3c Fix D2k missile trails and deviator explosion 2015-03-27 13:59:34 +01:00
reaperrr
8bc31a4ae2 Make smoke trail palette customisable, add player color trail support to bullets & missiles 2015-03-27 13:59:33 +01:00
reaperrr
9e2da0d2df Add support for player color explosions to CreateEffectWarhead 2015-03-27 13:51:13 +01:00
reaperrr
b52d055eec Misc constructor caching
Cache trait look-ups in constructor for various other traits and
activities.
2015-03-27 13:47:04 +01:00
reaperrr
1e9d1a6cb7 Cache trait look-ups in the constructor where possible for Air activities/traits 2015-03-27 13:47:04 +01:00
Pavel Penev
9a780ba07d Merge pull request #7738 from pchote/cnc-remove-legacy-parsing
Disable legacy sequence parsing in TD.
2015-03-27 02:58:41 -07:00
Pavel Penev
7179ec6ffb Merge pull request #7639 from reaperrr/projectile-cleanup
Remove TurboBoost and various other Projectile cleanups
2015-03-27 01:46:54 -07:00
reaperrr
b5c74c63c9 Make variable bullet angle and speed independent from each other 2015-03-27 00:11:33 +01:00
reaperrr
d531d29791 Add/tweak some descriptions and streamline style/organisation of
projectile and explosion effects code
2015-03-27 00:11:32 +01:00
reaperrr
1cc900b269 Yaml style fixes to reduce future --upgrade-mod "noise" a little 2015-03-27 00:11:32 +01:00
reaperrr
33cb4fe3e1 Projectile refactoring upgrade rules 2015-03-27 00:11:31 +01:00
reaperrr
c92b2298c3 Remove missile TurboBoost 2015-03-27 00:04:39 +01:00
reaperrr
2a4719b88b Rename Missile ROT to RateOfTurn 2015-03-27 00:04:38 +01:00
reaperrr
f9332c9efe Renames BlocksBullets to BlocksProjectiles and projectile High property to Blockable 2015-03-27 00:04:37 +01:00
reaperrr
fb710f15bb Move projectile palette definition from weapon to projectile effects 2015-03-27 00:04:36 +01:00
Pavel Penev
c61dc48548 Merge pull request #7324 from reaperrr/limitedammo2
Refactored LimitedAmmo to AmmoPool
2015-03-26 15:59:56 -07:00
Paul Chote
4e1a02e35e Add snow test map. 2015-03-26 22:42:44 +00:00
Paul Chote
0a6e21d908 Support tileset-specific art in TS. 2015-03-26 22:42:43 +00:00
Paul Chote
a9f6e09afd Add TS snow tileset. 2015-03-26 22:42:43 +00:00
Paul Chote
a2b423e4f9 Add a(nother) workaround for the legacy editor. 2015-03-26 22:41:46 +00:00
Paul Chote
549c0bf382 Disable legacy sequence parsing in TD.
Removes unused `powerdown` sequences.
2015-03-26 22:41:46 +00:00
Paul Chote
7ad2f3e104 Support tileset-specific sprite definitions. 2015-03-26 22:41:45 +00:00
reaperrr
c51afd837c Upgrade rules for LimitedAmmo -> AmmoPool refactoring 2015-03-26 23:21:02 +01:00
reaperrr
38d5163062 Refactors LimitedAmmo to AmmoPool.
Removes Reloads trait.

This enables adding multiple AmmoPools via @ differentiators and
Name which adds the possibility to assign each armament to a specific
ammo pool.

Furthermore, this moves all Reloads functionality onto AmmoPool.

Now a combination of all three is possible on a single actor: no limited
ammo, limited ammo that can reload on its own, and limited ammo which
needs to be reloaded at a rearm actor.

Additionally moves RearmSound from Minelayer to AmmoPool.
2015-03-26 23:21:01 +01:00
Matthias Mailänder
43b4bfc9e5 Merge pull request #7706 from penev92/bleed_fixDisguise
Fix for the EnemyWatcher-Disguise trait interaction
2015-03-26 22:35:18 +01:00
Matthias Mailänder
ab2db13b3c Merge pull request #7736 from abcdefg30/allies05aFIX
Fixes #7735
2015-03-26 22:26:31 +01:00
Matthias Mailänder
4084140716 Merge pull request #7731 from pchote/ts-tileset-fixes
Fix TS/RA2 tileset importer and apply correctness fixes to TS temperate.
2015-03-26 22:13:31 +01:00
penev92
460d0b84a6 Fix EnemyWatcher's interaction with disguised actors 2015-03-26 15:20:26 +02:00
Paul Chote
bbee16db99 Fix TS tileset. 2015-03-25 19:59:09 +00:00
Paul Chote
5d0eecd4c5 Don’t crash on bogus TerrainTiles. 2015-03-25 19:59:09 +00:00
Paul Chote
c5625d0d70 Fix radar color keys. 2015-03-25 19:59:09 +00:00
Paul Chote
a76bc3e188 Include sprite extension in imported tilesets. 2015-03-25 19:59:08 +00:00
Paul Chote
23bbe23603 Update imported tile types.
Using data provided by @tomsons26.
2015-03-25 19:59:08 +00:00
Oliver Brakmann
6fca67e7f6 Merge pull request #7664 from penev92/bleed_harvesterInsurance
Implement Carryall edge spawn, harvester delivery by carryall and harvester insurance for D2k
2015-03-25 20:03:00 +01:00
Oliver Brakmann
15af43d9b4 Merge pull request #7674 from obrakmann/fix7414_debian_dependencies
Add MaxMind GeoIP2's dependencies to debian package
2015-03-25 19:14:01 +01:00
abcdefg30
7c7e5efc4f Fix a fatal error in allies05a 2015-03-25 16:15:49 +01:00
reaperrr
036f2459bf Merge pull request #7732 from pchote/tsra2-reverses
Clean up sequence key loading and add Reverses field for TS/RA2.
2015-03-25 06:41:44 +01:00
Matthias Mailänder
b5779b2583 Merge pull request #7733 from pchote/d2k-remove-legacy-parsing
Disable legacy sequence parsing in D2K.
2015-03-24 22:16:12 +01:00
RoosterDragon
777a57af62 Lazily generate frozen actor renderables.
Previously actors that could be frozen under fog but were currently visible would be rendered by the frozen under fog system constantly in order to keep a copy of the renderables ready to go for the frozen counterpart when the actor became invisible. Instead, we now delay this extra rendering until the actor actually becomes invisible. This eliminates the wasted rendering to generate renderables that were never used.
2015-03-24 21:08:27 +00:00
Paul Chote
9b33d7b1e5 Disable legacy sequence parsing in D2K. 2015-03-24 18:01:30 +00:00
Paul Chote
4baf639130 Add a Reverses sequence key for TS/RA2 animations. 2015-03-24 17:37:08 +00:00
Paul Chote
4d60757611 Simplify sequence field parsing. 2015-03-24 17:37:08 +00:00
Taryn Hill
8d8db8d90d Merge pull request #7707 from pchote/tileset-fixes
Automated correctness fixes for tileset definitions.
2015-03-24 09:03:34 -05:00
Oliver Brakmann
60319aa500 Add MaxMind GeoIP2's dependencies to debian package
It would have been easier to just depend on libnewtonsoft-json5.0-cil, but that is only available in Ubuntu 14.04 and higher.
2015-03-24 14:30:22 +01:00
Paul Chote
52624912fe Work around bogus tiles. 2015-03-23 20:33:24 +00:00
Paul Chote
92452271fe Use per-tile color in minimap. 2015-03-23 20:33:23 +00:00
Paul Chote
491c851c87 Fix D2K tileset. 2015-03-23 20:33:23 +00:00
Paul Chote
dd36c5094c Fix TD tilesets. 2015-03-23 20:32:29 +00:00
Paul Chote
6e1307d08d Fix RA tilesets. 2015-03-23 20:32:28 +00:00
Paul Chote
ec77e15e54 Add a utility command to fix implicit tile definitions. 2015-03-23 20:32:28 +00:00
Paul Chote
8844defb44 Fix TileSet.Save(). 2015-03-23 20:32:28 +00:00
Taryn Hill
ab63d3f7df Merge pull request #7714 from Mailaender/d2k-black-tile-removal
Removed legacy ARRAKIS tiles.
2015-03-23 15:15:28 -05:00
Matthias Mailänder
2f1aae59eb don't crash so easily 2015-03-23 21:03:26 +01:00
Matthias Mailänder
edbb31afe1 remove mistaken templates 2015-03-23 21:03:24 +01:00
Matthias Mailänder
2223b0a43b Merge pull request #7719 from reaperrr/fix-wda-crashes
Disables WithDeathAnimation for deployed TS units
2015-03-23 20:30:24 +01:00
Taryn Hill
c68becb1ea Merge pull request #7721 from abcdefg30/smallpolish
Small polish.
2015-03-23 12:28:55 -05:00
abcdefg30
f84882ce9c Replace spaces with tabs 2015-03-23 17:27:53 +01:00
abcdefg30
fb8ac18522 Fix the wrong indentation in PerfHistory.cs 2015-03-23 17:27:52 +01:00
abcdefg30
c5a5bb0844 Add a missing space in the Template description 2015-03-23 17:27:51 +01:00
reaperrr
e65453de24 Disables WithDeathAnimation for deployed TS units (Tick Tank, Arty, Sensor Array, ICBM launcher)
Fixes crash when destroying them.
2015-03-23 14:56:40 +01:00
reaperrr
3c4d712b78 Merge pull request #7708 from pchote/sequence-utility
Add a utility command for checking sequences.
2015-03-23 13:19:42 +01:00
Paul Chote
d631d8b780 Merge pull request #7711 from Mailaender/d2k-sietch-offset
Fixed the Sietch sprite offset
2015-03-22 22:31:59 +00:00
reaperrr
bbabf4e2e7 Merge pull request #7712 from Mailaender/grid-above-spice
Fixed spice being drawn above the grid
2015-03-22 22:49:23 +01:00
reaperrr
09a0d83936 Merge pull request #7577 from RoosterDragon/shroud-visibility-perf
Speed up shroud visibility updates.
2015-03-22 22:38:41 +01:00
Paul Chote
7b57d87df5 Merge pull request #7713 from Mailaender/camera-icon
Added a camera icon
2015-03-22 19:30:00 +00:00
Matthias Mailänder
f39b01b53c Merge pull request #7700 from pchote/sequence-defaults
Add support for per-sequence animation defaults
2015-03-22 20:22:04 +01:00
Paul Chote
a7c64a0941 Remove redundancies from TS sequences. 2015-03-22 17:31:42 +00:00
Matthias Mailänder
90138785a1 draw the grid above the spice 2015-03-22 18:13:08 +01:00
Matthias Mailänder
ee58c68604 fix Sietch sprite offset 2015-03-22 18:09:33 +01:00
Paul Chote
2444f35695 Fix radar origin for non-square widgets. 2015-03-22 17:01:24 +00:00
penev92
efee3598f9 Add D2k harvester insurance on worm frenzy 2015-03-22 17:00:59 +02:00
penev92
0d05fb5326 Implement FreeActorWithDelivery to enable off-map harvester delivery
Fix FreeActorInfo fields descriptions
2015-03-22 17:00:57 +02:00
penev92
fa6e5948d7 Remove the Lua scripted harvester delivery from the D2k shellmap and reorganize Carryall actor definitions 2015-03-22 16:58:16 +02:00
penev92
7608cb93b4 Split CarryUnit into PickupUnit and DeliverUnit 2015-03-22 16:58:15 +02:00
penev92
4eb67b328f Refactor AutoCarryall trait and rename to Carryall
Fixup Carryable
2015-03-22 16:58:14 +02:00
penev92
f9a2378be8 Produce D2k carryalls at the edge of the map 2015-03-22 16:58:13 +02:00
penev92
5927e1080a Add ChooseClosestEdgeCell() method to the Map class 2015-03-22 16:58:11 +02:00
Paul Chote
bcc3aefaa7 Merge pull request #7702 from abcdefg30/tscrash
Fix a crash in UpgradeActorsNear.cs
2015-03-22 13:58:05 +00:00
Paul Chote
8fd4eca2da Merge pull request #7560 from RoosterDragon/let-it-go
Speed up frozen actor updates & prevent flicker
2015-03-22 13:52:33 +00:00
Paul Chote
c92d1342f0 Allow mods to define Defaults for all animations in a sequence. 2015-03-22 12:58:08 +00:00
Paul Chote
a69145caf0 Add a utility command for checking sequences. 2015-03-22 12:48:51 +00:00
Matthias Mailänder
7f9f29c8a2 add a camera icon 2015-03-22 07:51:22 +01:00
abcdefg30
5d7f6081e4 Fix a crash in UpgradeActorsNear.cs 2015-03-21 22:51:25 +01:00
Matthias Mailänder
5de9e72707 Merge pull request #7492 from penev92/bleed_enemySightedNotification
Closes #7491
2015-03-21 19:18:01 +01:00
Matthias Mailänder
3900733c1d Merge pull request #7581 from Phrohdoh/sequence-error-fix
Clarify the error relating to too many frames defined in a sequence.
2015-03-21 15:33:14 +01:00
Oliver Brakmann
919c0fd359 Merge pull request #7638 from pchote/infantry-body
Decompose RenderInfantry into WithInfantryBody and RenderSprites.
2015-03-21 15:22:53 +01:00
Paul Chote
cf92d0ea24 Merge pull request #7687 from reaperrr/ts-wda
Use 3rd damage level of TS buildings for death instead of critical
2015-03-21 14:10:45 +00:00
Oliver Brakmann
ff49cdcc5f Use the OnPlayerDiscovered trigger in gdi05a 2015-03-21 15:19:19 +02:00
penev92
16dee554c4 Introduce OnDiscovered and OnPlayerDiscovered Lua triggers 2015-03-21 15:19:18 +02:00
Matthias Mailänder
79c53e3981 Merge pull request #7525 from penev92/bleed_enemySightedNotification2
Refactor EnemyWatcher and AnnounceOnSeen traits
2015-03-21 14:16:06 +01:00
Paul Chote
4ea55809ca Decompose RenderInfantry into WithInfantryBody and RenderSprites. 2015-03-21 13:04:17 +00:00
Paul Chote
fa0264a73c Fix WithDeathAnimation dependency. 2015-03-21 13:04:16 +00:00
Oliver Brakmann
6c50d0eda8 Merge pull request #7608 from pchote/widgetcommon
Move common widgets from Game to Mods.Common.
2015-03-21 13:57:56 +01:00
penev92
d9a6b1ec5a Disable notifications for U2 2015-03-21 14:19:20 +02:00
Paul Chote
e5c03413cc Move common widgets from Game to Mods.Common. 2015-03-21 11:53:53 +00:00
penev92
328e329fe7 Disallow sound/radar notifications for neutral actors via a configurable field on the trait 2015-03-21 12:03:41 +02:00
penev92
55e04a44c8 Add EnemyWatcher and AnnounceOnSeen to RA 2015-03-21 11:32:28 +02:00
penev92
1b616123ef Introduce INotifyDiscovered interface and use it to move notifications from EnemyWatcher to AnnounceOnSeen 2015-03-21 07:53:41 +02:00
Matthias Mailänder
eb0ea8d543 Merge pull request #7693 from obrakmann/fix7688_d2k_insignia_behind_radar
Fix d2k faction logos being visible behind radar on narrow maps
2015-03-20 22:46:14 +01:00
Oliver Brakmann
112d7caf97 Fix d2k faction logos being visible behind radar on narrow maps 2015-03-20 19:10:05 +01:00
Matthias Mailänder
e98c55a852 Merge pull request #7681 from abcdefg30/startgamenotification
Allow the use of race variants in "StartGameNotification:"
2015-03-20 18:08:16 +01:00
Matthias Mailänder
146afd755b bring back the HTML documentation 2015-03-20 18:01:12 +01:00
Matthias Mailänder
7be8c4461b Merge pull request #7405 from Rydra/upstream/int2immutable
Made int2 class immutable
2015-03-20 16:03:46 +01:00
abcdefg30
a249302b6b Allow the use of race variants in "StartGameNotification:" 2015-03-20 14:52:58 +01:00
David Jiménez
f15f1e41e8 Made int2 struct immutable 2015-03-20 13:54:01 +01:00
Matthias Mailänder
dc1862f3dc Merge pull request #7529 from delftswa2014/feature/kdr_stat
Add Kill/Death ratio in statistics window
2015-03-20 13:35:21 +01:00
Matthias Mailänder
d7a373ffda Merge pull request #7691 from Mailaender/appveyor-windows-move
Corrected the NSIS Setup.exe renaming in the last AppVeyor step
2015-03-20 07:37:54 +01:00
Matthias Mailänder
2f199a1c9c correct the path 2015-03-20 07:34:42 +01:00
Matthias Mailänder
fc09fe9e03 Merge pull request #7683 from obrakmann/fix-appveyor-build-the-37482th
Fix archive extraction in appveyor builds
2015-03-20 07:10:02 +01:00
Matthias Mailänder
0569eb640f Merge pull request #7649 from RoosterDragon/stylecop-line-length
Enforce a line length limit.
2015-03-20 07:07:58 +01:00
reaperrr
b66cae100b Use 3rd damage level of TS buildings for death animation instead of critical damage state 2015-03-20 01:11:50 +01:00
RoosterDragon
c3531d6f70 Avoid duplicated frozen visibility checks.
The FrozenUnderFog.Tick method will now reuse the calculation do by the frozen actor when it had to calculate its visibility, this prevents it having to re-do the fairly expensive visibility calculation.
2015-03-19 17:30:40 +00:00
RoosterDragon
1515ac54f6 Enforce a line length limit. 2015-03-19 17:20:34 +00:00
Oliver Brakmann
721ba5e9c3 Merge pull request #7595 from WolfGaming/SellTooltip
Refund tooltip
2015-03-19 18:11:30 +01:00
WolfGaming
068a96fd46 Fixes NullPointerException when frozen.Actor is null. 2015-03-19 05:53:59 +00:00
WolfGaming
d2f02e7a4b Fix missions showing tooltips wrong. 2015-03-19 05:53:55 +00:00
WolfGaming
c460906ed5 Added refund tooltip. 2015-03-19 05:53:51 +00:00
WolfGaming
bf3ddcfbf1 Implemented an interface that allows traits to add custom information to tooltips. 2015-03-19 05:53:44 +00:00
Pavel Penev
272086de76 Merge pull request #7541 from Mailaender/d2k-build-hotkeys
Fixed the hard-coded Dune 2000 production tab hotkeys
2015-03-18 12:08:41 -07:00
Oliver Brakmann
4d8189ea97 Fix archive extraction in appveyor builds 2015-03-18 18:10:10 +01:00
Matthias Mailänder
73b4a18e22 make the d2k production tab hotkeys configurable 2015-03-18 06:49:44 +01:00
Matthias Mailänder
16ff6e2112 Merge pull request #7561 from RoosterDragon/fast-map-border-shroud
Speed up map border shroud & fix viewport visible cells
2015-03-18 06:36:45 +01:00
Pavel Penev
82c01ec640 Merge pull request #7667 from Mailaender/move-without-force
Avoid PowerShellisms to fix the AppVeyor build
2015-03-17 18:58:09 -07:00
Pavel Penev
4c0a81fe15 Merge pull request #7679 from obrakmann/new-ftrk-icon
Replace flak truck icon with non-copyrighted art
2015-03-17 12:45:50 -07:00
Oliver Brakmann
d16701447f Replace flak truck icon with non-copyrighted art
The new art is based on an image from the public domain (http://commons.wikimedia.org/wiki/File:%D0%9C%D1%83%D0%B7%D0%B5%D0%B9_%D0%B2%D0%BE%D0%B5%D0%BD%D0%BD%D0%BE%D0%B9_%D1%82%D0%B5%D1%85%D0%BD%D0%B8%D0%BA%D0%B8_%D0%9E%D1%80%D1%83%D0%B6%D0%B8%D0%B5_%D0%9F%D0%BE%D0%B1%D0%B5%D0%B4%D1%8B,_%D0%9A%D1%80%D0%B0%D1%81%D0%BD%D0%BE%D0%B4%D0%B0%D1%80_%2829%29.jpg), modified for OpenRA by @OmegaBolt.
2015-03-17 18:51:04 +01:00
pevers
bc14889881 added cheat command to give money to all the players and AI 2015-03-17 16:45:37 +01:00
Matthias Mailänder
26a4b9b841 Merge pull request #7623 from cjshmyr/orelord
Added new 1v1 RA map by MicroBit - Ore Lord
2015-03-17 05:15:00 +01:00
Oliver Brakmann
e4ef1eb820 Merge pull request #7626 from Mailaender/ts-radar-dishes
Fixed Tiberian Sun radar dishes
2015-03-16 18:37:59 +01:00
reaperrr
258e924afe Merge pull request #7619 from pchote/ts-civilian-fixes
Fix TS civilian actor/sequence definitions.
2015-03-16 03:41:37 +01:00
reaperrr
a14bf8622f Merge pull request #7570 from Mailaender/mods-common
Moved more traits to Mods.Common
2015-03-15 19:53:13 +01:00
Curtis Shmyr
e71aca2038 Added new RA map by MicroBit - Ore Lord 2015-03-15 11:47:29 -06:00
Matthias Mailänder
737a0e0b67 move common traits 2015-03-15 18:25:28 +01:00
Oliver Brakmann
4a2803c9d1 Merge pull request #7528 from delftswa2014/feature/distinguish_ally_enemy_messages
Add "(Ally)" behind the name of allies in all-chat
2015-03-15 16:15:01 +01:00
Oliver Brakmann
f6b45fe6cd Merge pull request #7648 from Phrohdoh/emit-inf-check-race
Make EmitInfantryOnSell compare string[] for owner's race.
2015-03-15 15:03:51 +01:00
jabbink
1f26d900f5 Add "(Ally)" behind the name of allies in all-chat
Fixes #7518
2015-03-15 11:52:32 +01:00
Matthias Mailänder
5c1cd0db16 suppress prompting on file moves 2015-03-15 07:32:33 +01:00
Matthias Mailänder
fe5ff86fe2 avoid PowerShellisms 2015-03-15 01:34:50 +01:00
Taryn Hill
fcb2141132 EmitInfantryOnSell now checks a Races string[] against the seller’s race. 2015-03-14 15:54:26 -05:00
Taryn Hill
bc69539993 Clarify the error relating to too many frames defined in a sequence. 2015-03-14 15:50:52 -05:00
Pavel Penev
9a66fc7382 Merge pull request #7656 from OmegaBolt/bfdmap
Battle for Dune 3v3 map
2015-03-14 18:20:24 +02:00
OmegaBolt
9d3efd12a0 Battle for Dune 3v3 map
PR as recommended by penev
2015-03-14 15:42:30 +00:00
Pavel Penev
e8a12a5550 Merge pull request #7661 from Mailaender/appveyor-nsis-plugins
Try to fix the AppVeyor build
2015-03-14 15:00:50 +02:00
Matthias Mailänder
32e1cfd2f2 Merge pull request #7644 from razzmatazz/hackyai-mcv-redeployment-fix
HackyAI can now build buildings near a new MCV
2015-03-14 12:40:39 +01:00
Oliver Brakmann
863db5a42c Merge pull request #7640 from Phrohdoh/rand-dmg-sounds
SoundOnDamageTransition to use string[].
2015-03-14 12:39:20 +01:00
Oliver Brakmann
0062391665 Merge pull request #7652 from fluxer/bleed
add /lib and /lib64 to the locations lookup for Lua
2015-03-14 10:52:32 +01:00
Matthias Mailänder
33e49c371a try to fix the AppVeyor build 2015-03-14 09:57:22 +01:00
Pavel Penev
03bab4a72a Merge pull request #7631 from pchote/sequence-rework
Rework sequence parsing.
2015-03-14 00:13:03 +02:00
Taryn Hill
76457c5fc1 Merge pull request #7542 from Mailaender/appveyor-deployment-fix
Fixed AppVeyor deployment.
2015-03-13 16:22:40 -05:00
Pavel Penev
04e0275d33 Merge pull request #7650 from Phrohdoh/fix-ramp-nre
Fix NRE caused by checking the RampType of a tile in #7645.
2015-03-13 20:30:02 +02:00
Pavel Penev
dd424f0b14 Merge pull request #7657 from MustaphaTR/copyright-date-readme
Update year of Copyrights on Readme
2015-03-13 16:34:54 +02:00
Mustafa Alperen Seki
aaf0f8d906 Update year of Copyrights on Readme 2015-03-13 12:36:09 +02:00
Pavel Penev
dc6040217b Merge pull request #7618 from Rydra/upstream/hv-heuristic
Changed the harvester heuristic, solved several regressions in Pathfinder and harvesters
2015-03-13 01:55:50 +02:00
Taryn Hill
7bf058896d Apply SoundOnDamageTransition upgrade rule. 2015-03-12 16:09:15 -05:00
Taryn Hill
1e0612ddf0 Change SoundOnDamageTransition to randomly select
from a string[] instead of a single string.
2015-03-12 16:09:11 -05:00
Taryn Hill
32edeccb56 Merge pull request #7476 from abcdefg30/any-subfaction
Allow picking of a random subfaction.
2015-03-12 15:52:39 -05:00
abcdefg30
63fe578ba8 Allow picking of a random subfaction 2015-03-12 21:34:23 +01:00
Saulius Menkevičius
e1fa6af954 HackyAI can now build buildings with new MCV
There was an issue where HackyAI would try to build buildings
at old base location and would fail, unless it was placed at the
same place where the old MCV was.
2015-03-12 20:10:08 +02:00
Ivailo Monev
6f070994b5 add /lib and /lib64 to the locations lookup for Lua (issue #7637) 2015-03-12 15:20:46 +00:00
Taryn Hill
602de0ea13 Fix NRE caused by checking the RampType of a tile in #7645. 2015-03-12 09:11:51 -05:00
David Jiménez
ea32c20450 Changed the harvester heuristic so that now takes into account the distance from the initial search location. This makes harvesters somewhat more "intelligent" and gather nearer resources. Also solved several regressions introduced in the recent changes in the Pathfinder 2015-03-12 12:28:34 +01:00
Matthias Mailänder
fa4f43b750 account for initial health 2015-03-11 23:18:03 +01:00
Pavel Penev
687403ab89 Merge pull request #7645 from Phrohdoh/fix-slope-buildings
Mark ramp/slope tiles as unbuildable.
2015-03-11 23:50:17 +02:00
Taryn Hill
a744900e74 Mark ramp/slope tiles as unbuildable. 2015-03-11 16:30:55 -05:00
Matthias Mailänder
4f775a8dc7 Merge pull request #7641 from Generalcamo/patch-2
Add a Cloaking sound to the Phase Transport
2015-03-11 20:24:42 +01:00
Cody Brittain
a2de502619 Add a Cloaking sound to the Phase Transport
Adds a cloaking sound to the phase transport
2015-03-10 20:30:45 -04:00
Oliver Brakmann
f5535c00a2 Merge pull request #7593 from Phrohdoh/wiki-trait-links
Wiki trait links.
2015-03-10 18:40:53 +01:00
Oliver Brakmann
60bf903e7c Merge pull request #7634 from Phrohdoh/sw-docs
Add some documentation to support powers.
2015-03-10 18:35:41 +01:00
Matthias Mailänder
cb29c29efc deploy on any branch with tags 2015-03-10 07:31:26 +01:00
Matthias Mailänder
32328835ff try to fix artifact deployment 2015-03-10 07:31:26 +01:00
Matthias Mailänder
7bf3ef0e90 stop 7-Zip from displaying prompts that halt the build 2015-03-10 07:31:24 +01:00
Matthias Mailänder
7123f93e86 Merge pull request #7617 from Mailaender/fuzzy-nuget
Removed FuzzyLogicLibrary.dll binary from source code management
2015-03-10 06:50:56 +01:00
Taryn Hill
a5bbb60db9 Remove unnecessary newline from output.
Make required trait strings a hyperlink.
2015-03-10 00:20:40 -05:00
Taryn Hill
51e470e64c Add some documentation to support powers. 2015-03-10 00:13:24 -05:00
Paul Chote
f91ee3fb45 Fix sequence terminology. 2015-03-09 20:45:49 +00:00
Paul Chote
7292bd20b3 Move Sequence parsing into mod code. 2015-03-09 20:45:22 +00:00
Paul Chote
d3783f0244 Introduce ISpriteSequence interface. 2015-03-09 19:19:00 +00:00
Paul Chote
2cc714be4e Allow IGlobalModData to opt-in to custom parsing. 2015-03-09 19:19:00 +00:00
Paul Chote
60937b096b Give a sensible error if LoadScreen/LobbyDefaults is missing. 2015-03-09 19:18:59 +00:00
Matthias Mailänder
429111a282 fix the destroyed radar dishes 2015-03-08 21:51:36 +01:00
Matthias Mailänder
762c0e12a2 Merge pull request #7522 from delftswa2014/bugfix/sellicon
Closes #7508
2015-03-08 19:13:34 +01:00
Oliver Brakmann
78e74eb685 Merge pull request #7601 from Phrohdoh/ab-hotkeys
Add hotkeys to playback controls.
2015-03-08 17:19:24 +01:00
Taryn Hill
a05b015581 Add hotkeys to playback controls. 2015-03-08 10:30:26 -05:00
Oliver Brakmann
190d197613 Merge pull request #7544 from delftswa2014/bugfix/sam_site_friendlyfire
Friendly fire fixes and sam sites
2015-03-08 16:16:14 +01:00
Oliver Brakmann
a39352aee3 Merge pull request #7524 from penev92/bleed_enemySightedNotification1
Fix the EnemyWatcher trait (hotfix)
2015-03-08 15:44:31 +01:00
Paul Chote
4110064c44 Fix TS civilian actor/sequence definitions. 2015-03-08 13:01:47 +00:00
penev92
4a5b3b59ed Properly remove worms from the world 2015-03-08 15:01:40 +02:00
penev92
58ab28206f Fix multiple notifications in multiplayer bug 2015-03-08 15:01:38 +02:00
penev92
1261fd1b07 Increase NotificationInterval to 30 seconds 2015-03-08 15:01:36 +02:00
Pavel Penev
a3065ad90c Merge pull request #7616 from obrakmann/fix-win-map-hashes
Ensure LF line ending for .yaml files for hash consistency across platforms
2015-03-08 14:55:32 +02:00
Matthias Mailänder
ac5a1b2569 fetch FuzzyLogicLibrary from NuGet 2015-03-08 10:22:37 +01:00
Pavel Penev
5ad1424c87 Merge pull request #7579 from Mailaender/lua51-msvc110
Avoid MSVC120 runtime dependency for Lua Windows DLLs
2015-03-08 02:29:55 +02:00
Pavel Penev
4c394d61e4 Merge pull request #7611 from Mailaender/freetype2-msvc-downgrade
Fixed FreeType2 depending on too new VS C++ runtime DLLs
2015-03-08 02:27:14 +02:00
Oliver Brakmann
419e63a33c Ensure LF line ending for .yaml files for hash consistency across platforms
Without this change, the git client will auto-convert the line endings to CRLF, which leads to hash mismatches for unpacked maps, which would be especially bad if we were going to build the Windows package on a Windows system.

Adds the same rule for .lua files as well, in preparation for a change that will make those contribute to the map hash.
2015-03-07 23:34:01 +01:00
Matthias Mailänder
b7255761e3 downgrade to MSVC8 runtime dependency 2015-03-07 17:54:42 +01:00
Taryn Hill
04fff1da72 Merge pull request #7606 from pchote/manifest
Allow mods to define custom manifest data.
2015-03-07 09:51:00 -06:00
Matthias Mailänder
0f309c31be downgrade FreeType2 version to old msvcrt.dll dependency
also downgrade ZLib dependency to old VC runtime versions
2015-03-07 14:04:36 +01:00
Paul Chote
dcfc62f333 Move InstallUtils from Game to Mods.Common. 2015-03-07 10:02:43 +00:00
Paul Chote
2de91a4c4e Convert ContentInstaller into a manifest module. 2015-03-07 10:02:42 +00:00
Paul Chote
5552000d69 Allow mods to define custom manifest metadata. 2015-03-07 10:02:42 +00:00
Paul Chote
31710c1644 Remove obsolete Movies entry from cnc manifest. 2015-03-07 10:02:42 +00:00
Pavel Penev
77684f4439 Merge pull request #7353 from Mailaender/promptconfirm-incompatible-replay
Added a warning before loading incompatible replays
2015-03-07 11:20:33 +02:00
Matthias Mailänder
e13447e641 automatically switch mods when possible 2015-03-07 10:12:16 +01:00
Matthias Mailänder
3bb448b29b warn before loading incompatible replays 2015-03-07 10:06:17 +01:00
Pavel Penev
5fa7e50c8e Merge pull request #7599 from DeadlySurprise/radarCursorFix
Fixed radar not showing move/attack cursors
2015-03-06 22:32:37 +02:00
Pavel Penev
f590fe0d91 Merge pull request #7602 from obrakmann/fix7600_pdof_bib
Add mini-bib to fake chronosphere
2015-03-06 22:24:31 +02:00
Oliver Brakmann
886513277a Add mini-bib to fake chronosphere
Fixes #7600
2015-03-06 20:29:30 +01:00
DeadlySurprise
1a2e8d56d1 Fixed radar not showing move/attack cursors 2015-03-06 14:30:45 +01:00
Taryn Hill
36db620262 Merge pull request #7533 from reaperrr/ra-weapons
Split RA weapons.yaml into multiple roughly categorized files.
2015-03-05 17:27:16 -06:00
jabbink
da546fc955 Add Kill/Death ratio in statistics window
closes #6858
2015-03-05 11:15:08 +01:00
Matthias Mailänder
957a9e2532 Merge pull request #7580 from Phrohdoh/ab-logical-frame-counter
Use correct frame indices in the asset browser.
2015-03-04 22:11:56 +01:00
Matthias Mailänder
fc750874bc Merge pull request #7586 from Phrohdoh/exit-descs-buff
Make Exit’s descs more informative.
2015-03-04 20:45:59 +01:00
pevers
17fec82348 fixed taking over sam/pillbox/etc. to stop firing
fixed issue with powered down samsites

more optimization

very small optimization

undo changes to powerdown samsite fixes

refixed powered down sam sites

removed debug line

redid the fix in another approach by queueing a sell activity on the top of the queue. This was already present but didn't always work

fixed line I removed

prevented attack activity to be queued when actor is disabled

another style fail of me

reverse and queueactivity activities are now executed on top of the queue for a sell action
2015-03-04 18:13:33 +01:00
Taryn Hill
7b16ba5d42 Use correct frame indices in the asset browser
with total frame count in parentheses.
2015-03-04 10:52:07 -06:00
Taryn Hill
d6da7d54e4 Make Exit’s descs more informative. 2015-03-04 09:15:09 -06:00
Scott
43c3621ef6 Merge pull request #7582 from Phrohdoh/ignore-moq
Add Moq.dll to the gitignore.
2015-03-04 19:00:46 +13:00
Taryn Hill
025493f6a5 Add Moq.dll to the gitignore. 2015-03-03 22:02:35 -06:00
Paul Chote
8c4ea20636 Merge pull request #7430 from Rydra/upstream/pf-optimized
[Discussion PR] Complete refactor of Pathfinder
2015-03-03 19:50:25 +00:00
David Jiménez
54ae572303 - Introduced Unit Testing capabilities to the PathFinder trait and algorithm.
Introduced also a small Unit test project to prove it.

- Separated caching capabilities from PathFinder class to increase cohesion and maintainability.
Refactored the pathfinding algorithm by extracting methods based on responsibilities like
calculating costs and reordering functions. These changes should provide a in average a small increase in
pathfinding performance and maintainability.

- Optimized the pathfinder algorithm to reuse calculations like the
MovementCost and heuristics.

- Introduced base classes, IPathSearch and IPriorityQueue interfaces,
and restructured code to ease readability and testability

- Renamed the PathFinder related classes to more appropriate names. Made the
traits rely on the interface IPathfinder instead of concrete PathFinder
implementation.

- Massive performance improvements

- Solved error with harvesters' Heuristic

- Updated the heuristic to ease redability and adjustability. D can be
adjusted to offer best paths by decreasing and more performance by
increasing it

- Refactored the CellLayer<CellInfo> creation in its own Singleton class

- Extracted the graph abstraction onto an IGraph interface, making the
Pathfinder agnostic to the definition of world and terrain. This
abstraction can help in the future to be able to cache graphs for similar
classes and their costs, speeding up the pathfinder and being able to feed
the A* algorithm with different types of graphs like Hierarchical graphs
2015-03-03 20:11:11 +01:00
Oliver Brakmann
50d726ea31 Merge pull request #7477 from pchote/d2k-raceart
Add race-specific sequence support, and overhaul D2K actor definitions.
2015-03-03 20:07:30 +01:00
Paul Chote
b968b527d2 Allow map players to use non-selectable races. 2015-03-03 18:45:46 +00:00
Paul Chote
6e08fd33c4 Update d2k map importer actor table. 2015-03-03 18:45:46 +00:00
Paul Chote
476986660f Allow GDI/Nod flavoured conyards to be built in debug mode. 2015-03-03 18:45:45 +00:00
Paul Chote
b670673f9f Reorganize D2K actor rules.
This removes the redundancy between faction variants and adjusts the layout
to be more consistent with the other mods.
2015-03-03 18:45:45 +00:00
Paul Chote
b7a98c8eb7 Document the other Transforms trait properties. 2015-03-03 18:45:45 +00:00
Paul Chote
59d06a22bf Change "Cannot deploy here" to a notification. 2015-03-03 18:45:44 +00:00
Paul Chote
7b27b803f9 Allow actors to force a specific race variant. 2015-03-03 18:45:44 +00:00
Paul Chote
d1ed1bf0fb Set actor race (and icons) based on active producer. 2015-03-03 18:45:44 +00:00
RoosterDragon
6234e311ca Speed up shroud visibility updates.
A unit with the CreatesShroud or RevealsShroud trait must update all shrouds when it changes position. Calculating the tiles it can currently see is an expensive calculation that previously had to be repeated for every shroud that needed to know these tiles.

Now, we lazily populate a ref parameter to allow it to be reused for an actor if possible. The biggest improvement comes from the fact that allied players can re-use this calculation when updating their shrouds. Since many games includes a neutral player allied to both sides, most games will see a decent speedup.
2015-03-02 22:18:06 +00:00
Paul Chote
44159ecdd6 Add support for race-specific actor sequences. 2015-03-02 20:46:24 +00:00
Paul Chote
00a2146299 Adjust GetImage plumbing in preparation for race-specific sequences. 2015-03-02 20:46:24 +00:00
Paul Chote
4c3a95ebc0 Fix bogus Produces definition on TD FACT. 2015-03-02 20:46:24 +00:00
Paul Chote
f606a1bfd7 Use a consistent set of arguments for Render* ctors. 2015-03-02 20:46:23 +00:00
Oliver Brakmann
d135e58ad9 Merge pull request #7501 from Bynnar18/leftclick
Reimplementing Left Click Orders with Fixes
2015-03-02 18:01:26 +01:00
reaperrr
477dbbd532 Splits RA weapons.yaml into multiple roughly categorized files 2015-03-01 22:11:45 +01:00
Bynnar18
0abe8f9b2b Fixes issues with support powers and adds property to all IOrderGenerator classes to determine priority over selection in the left-click order scheme. 2015-03-01 14:58:19 -06:00
Bynnar18
7b46b76329 Fixed left-click orders and implemented a selection deadzone. 2015-03-01 14:58:19 -06:00
Bynnar18
36d59d6b1d Restored faulty left-click logic for now. 2015-03-01 14:58:18 -06:00
Oliver Brakmann
75bfd0fb31 Merge pull request #7535 from reaperrr/allmods-audio
Cleanup: Moved audio-related yamls to audio subfolder
2015-03-01 19:20:47 +01:00
Pavel Penev
711659d7dd Merge pull request #7540 from Mailaender/d2k-description
Changed the Dune 2000 mod chooser description
2015-03-01 17:53:20 +02:00
Matthias Mailänder
ab04380234 give this a more in-universe description
we now have sandworms, carryalls and concrete
2015-03-01 14:59:41 +01:00
Oliver Brakmann
61cea23c3c Merge pull request #7562 from abcdefg30/onSellRemoved
Fix a crash in OnAllRemovedFromWorld
2015-03-01 14:00:25 +01:00
Oliver Brakmann
74c22523aa Merge pull request #7564 from Mailaender/common-widgets
Moved the whole widget code to OpenRA.Mods.Common
2015-02-28 23:00:07 +01:00
Matthias Mailänder
ff6dbde8d7 move widget code to commons 2015-02-28 20:32:19 +01:00
Oliver Brakmann
92101a1393 Merge pull request #7487 from abcdefg30/changealtitude
Change the plane altitude in ra
2015-02-28 19:49:39 +01:00
RoosterDragon
d3b93345b4 Fix Viewport.VisibleCells.
Reworked the visible cells calculation to ensure the visible region is actually minimal, which should reduce the amount of rendering to be done by a small amount. Previously, the region would tend to overdraw by 2-3 cells in either direction. For isometric maps, there was also a bug where it would draw far too much vertically above the top of the map.
2015-02-28 13:36:58 +00:00
abcdefg30
28262df1e5 Don't crash when selling an actor using OnAllRemovedFromWorld 2015-02-28 09:38:14 +01:00
RoosterDragon
803390c68e Speed up rendering map border shroud when no shroud is visible.
When the map border shroud must be rendered, but no cells at the border are visible, then we know that no shroud will be visible at all. We can bail from rendering early in this case.
2015-02-27 20:07:32 +00:00
Pavel Penev
cee3d6cf9e Merge pull request #7532 from RoosterDragon/disabledoverlay-modifyrender
Adjust DisabledOverlay.ModifyRender to be more efficient.
2015-02-27 01:08:39 +02:00
RoosterDragon
6baa35a763 Adjust DisabledOverlay.ModifyRender to be more efficient.
When not disabled, ModifyRender doesn't actually alter the sequence, so we can just return it directly and avoid adding another layer of enumerable. If it is disabled, then the modifying enumerable has one less condition to check inside the loop.
2015-02-26 21:58:29 +00:00
Pavel Penev
0c9960ae1b Merge pull request #7519 from obrakmann/fix7516_default-facing
Change default facing to 0
2015-02-26 23:23:43 +02:00
Oliver Brakmann
a1beb8a61e Merge pull request #7555 from delftswa2014/bugfix/resourcegrowth_transient
allowed resources to be grown under Actors
2015-02-26 22:18:01 +01:00
Pavel Penev
67cee6324c Merge pull request #7511 from obrakmann/vqaplayer-no-mouse
Prevent VqaPlayerWidget from eating the radar bin's mouse input
2015-02-26 23:14:26 +02:00
Oliver Brakmann
325f8fbb17 Merge pull request #7554 from x-a-n-a-x/RA-DebugSymbol
Adds a debug symbol (RA mod)
2015-02-26 22:00:20 +01:00
Nick ten Veen
96e9b90a64 Fixed #7008 for TD, TS and D2K aswell 2015-02-26 21:56:35 +01:00
Nick ten Veen
78511de58f allowed resources to be grown under Actors 2015-02-26 18:15:09 +01:00
Sebastien Kerguen
1b0a805fc6 Adds the chrome.psd (art source) 2015-02-26 17:26:07 +01:00
Sebastien Kerguen
3834a08c73 Adds a debug symbol (RA mod) 2015-02-26 17:08:00 +01:00
Oliver Brakmann
4beef806d6 Merge pull request #7521 from delftswa2014/bugfix/cheatfix
Forgot shroud on all-cheat
2015-02-25 23:35:00 +01:00
reaperrr
57a4bdb606 Remove obsolete PackageContents from TS mod.yaml 2015-02-23 23:30:14 +01:00
reaperrr
e38736670c Move TS music, notifications and voices yamls to audio subfolder.
Move TileSets and tile/cell settings for consistency with other mods.
2015-02-23 23:29:39 +01:00
reaperrr
650bc615af Move D2k music, notifications and voices yamls to audio subfolder.
Move TileSets a little for consistency with other mod.yamls.
2015-02-23 23:27:49 +01:00
reaperrr
26158ad722 Move TD music, notifications and voices yamls to audio subfolder.
Move TileSets and Translations in mods.yaml for consistency with other mods.
2015-02-23 23:24:18 +01:00
reaperrr
7baad53124 Move RA music, notifications and voices yamls to audio subfolder 2015-02-23 23:20:55 +01:00
Oliver Brakmann
ec12fb130c Merge pull request #7527 from delftswa2014/bugfix/lobby_chat_margin
Increase ItemSpacing in CHAT_TEMPLATE for the lobby chat
2015-02-23 22:13:42 +01:00
Oliver Brakmann
0bf9b04b51 Merge pull request #7531 from RoosterDragon/stream-read-fixes
Fix some broken Stream.Read calls.
2015-02-23 21:49:49 +01:00
pevers
6d716d301a DisableShroud cheat now properly disables after disabling the all-cheat
Smaller code base

Added newline

Added newline between assignment and statement

fixed spacing

fixed spacing

fixed spacing
2015-02-23 21:19:07 +01:00
RoosterDragon
d4421f0a41 Fix some broken Stream.Read calls.
Change callers of this method to use the ReadBytes extension method that ensures the requested amount of bytes are consumed.

Also tighten argument validation.
2015-02-23 19:40:16 +00:00
jabbink
a7a326c568 Increase ItemSpacing in CHAT_TEMPLATE for the lobby chat
Fixes #7447
2015-02-23 15:12:11 +01:00
David Jiménez
8659a3e71e Introduced the interfaces IActor, ICacheStorage, ILog, IMap, IWorld a
nd IMobileInfo to separate concrete implementations and abstractions
2015-02-22 23:14:12 +01:00
pevers
97ca96f8ab fixed sellicon bug 2015-02-22 18:14:25 +01:00
Oliver Brakmann
85fae8720d Merge pull request #7510 from DeadlySurprise/UninstallFix
Added uninstaller check for running game
2015-02-22 17:14:11 +01:00
Oliver Brakmann
02c4ace0af Change default facing to 0 2015-02-22 16:25:40 +01:00
Oliver Brakmann
293ec6577b Merge pull request #7507 from delftswa2014/bugfix/cheatfix
Fixed all cheat code
2015-02-22 15:10:17 +01:00
pevers
3f1db45ea6 changed all cheat to really enable everything on call
added givecash to the all cheat

fixed spacing

fixed spacing
2015-02-22 14:43:42 +01:00
DeadlySurprise
4668452e9b Added plugin download to appveyor 2015-02-21 21:58:07 +01:00
DeadlySurprise
c50feeb4e2 Added uninstaller check for running game 2015-02-21 21:57:46 +01:00
Oliver Brakmann
d3dab83de8 Merge pull request #7461 from pchote/remove-legacy-sidebar
Remove legacy sidebar code
2015-02-21 16:46:39 +01:00
Oliver Brakmann
878430622f Merge pull request #7479 from Mailaender/nuget-openal-soft
Replaced OpenAL Soft Windows DLL with a fetch script from Nuget
2015-02-21 15:42:24 +01:00
Matthias Mailänder
361c1bc010 Merge pull request #7483 from pchote/deadbuildingstate
Fix missing first animation frame and remove DeadBuildingState.
2015-02-21 14:00:23 +01:00
Pavel Penev
20ca9b2ab1 Merge pull request #7486 from delftswa2014/bugfix/apcbibs
Fixed #7472 so that cargo is only shown on allied vehicles
2015-02-21 02:08:41 +02:00
Pavel Penev
293bb78a3c Merge pull request #7457 from pchote/actorpreviews
Introduce ActorPreviewWidget (and other related changes).
2015-02-21 01:35:03 +02:00
Oliver Brakmann
aeceb05e08 Merge pull request #7305 from RoosterDragon/shroud-lazy-update
Vastly improve shroud rendering performance.
2015-02-20 23:59:48 +01:00
Oliver Brakmann
10f0c83270 Prevent VqaPlayerWidget from eating the radar bin's mouse inputs 2015-02-20 22:44:37 +01:00
RoosterDragon
4d5101a7c4 Vastly improve shroud rendering performance.
Changes in the shroud are now tracked. If a cell changes it will mark itself and its neighbors as dirty. During the render phase all dirty cells will have their vertices calculated and cached. If a cell is not dirty, the pre-calculated vertices are retrieved from cache. Then the sprite renderer is provided the sprite and the pre-calculated vertices to draw.

This prevents constant recalculation of vertices for the shroud in the render phase, requiring instead only dirty cells in the visible area. The update phase is reduced to a practical noop, instead incurring the cost only of changed cells each frame, rather than checking the visible area.
2015-02-20 20:03:42 +00:00
Paul Chote
df7588f1bc Merge pull request #7488 from RoosterDragon/trait-remove-perf
Speed up TraitContainer.RemoveActor.
2015-02-20 17:45:40 +00:00
Paul Chote
4ac8199e8e Merge pull request #7482 from OpenRA/appveyor-deploy-conditions
Fixed AppVeyor deploying and failing the build
2015-02-20 17:29:10 +00:00
Paul Chote
1a6de9a03c Merge pull request #7374 from DeadlySurprise/cashOverflowFix
Added a check for overflowing player credits
2015-02-20 17:24:57 +00:00
Paul Chote
f4e94f9f60 Merge pull request #7318 from reaperrr/remove-percellwh
Removed PerCellDamageWarhead
2015-02-20 17:15:28 +00:00
Paul Chote
f2087de9bd Remove DeadBuildingState.
Fixes #3422, #3522, #5136.
2015-02-20 16:56:46 +00:00
Paul Chote
29bf625887 Remove DeadBuildingState from RA. 2015-02-20 16:56:41 +00:00
Paul Chote
63e9cd4c9c Remove DeadBuildingState from TD. 2015-02-20 16:54:04 +00:00
Paul Chote
e9caf7f6e6 Initialise frame time when playing a new sequence.
Fixes #3706, #6389.
2015-02-20 16:54:04 +00:00
Paul Chote
e52c15553f Remove legacy sidebar code. 2015-02-20 16:46:55 +00:00
pevers
329d610577 Fixed #7472 so that cargo is only shown on allied vehicles
fixed spacing

pips are shown on every team when shroud is disabled

removed comment

Remove unwanted comment explaining how ally-detection works

fixed the real problem in RenderAfterWorld
2015-02-19 21:09:37 +01:00
Paul Chote
2a1e4f70a9 Replace the legacy TS sidebar placeholder with a modern placeholder. 2015-02-19 17:54:01 +00:00
Pavel Penev
e2da1f11cb Merge pull request #7495 from abcdefg30/placed_overlay
Fix a visual glitch in WithBuildingPlacedOverlay
2015-02-19 00:40:58 +02:00
abcdefg30
adffd33f4d Don't repulse actors flying with another altitude 2015-02-18 22:06:31 +01:00
abcdefg30
c70edc65fe Change cruise altitudes and fall rates 2015-02-18 22:06:30 +01:00
abcdefg30
6155928678 Don't display beacons in the air 2015-02-18 22:06:28 +01:00
Oliver Brakmann
44f884c561 Merge pull request #7156 from DeadlySurprise/luaMediaApi
Lua API : Added floating text and radar video
2015-02-18 20:57:37 +01:00
Oliver Brakmann
ca611a82e4 Merge pull request #7135 from penev92/bleed_d2kMapImporter
D2k: Add map importer
2015-02-18 20:33:17 +01:00
DeadlySurprise
7b53582c5e Implemented Floating Text and radar video 2015-02-18 14:38:30 +01:00
abcdefg30
f63bc1e001 Fix a glitch in WithBuildingPlacedOverlay
when transforming the actor.
2015-02-18 12:50:17 +01:00
penev92
922af4d9cf Add missing tiles BLOXBGBS-29 (1x1) and BLOXBGBS-617 (2x2) 2015-02-18 13:18:42 +02:00
penev92
da425f47e7 Initial implementation of D2k legacy map importer
Improve error handling; fix utility command description

Revert output location to working directory for both map importers

Rework how the map tiles get populated

Remove actor comments
2015-02-18 13:16:32 +02:00
abcdefg30
035b96f469 Made the ts conyard sellable 2015-02-18 11:13:48 +01:00
Igor Popov
5bcd56eb9d Merge pull request #7439 from ScottNZ/fix-map-import
Fix map importer using the map title as the output filename.
2015-02-17 09:47:01 +03:00
reaperrr
89527962dd Upgrade rule for PerCellDamage removal 2015-02-17 01:33:23 +01:00
reaperrr
f39488de41 Remove PerCellDamageWarhead
Remove redundant CrateNuke definition from Training Camp
2015-02-17 01:33:22 +01:00
RoosterDragon
a3898db660 Speed up TraitContainer.RemoveActor.
Use the binary search invariant of the lists to find the actor quickly and remove the range of entries from the list in a single operation to avoid redundant copying otherwise caused by removing entries one by one.
2015-02-17 00:02:43 +00:00
Chris Forbes
32411d64df Merge pull request #7480 from pchote/beacon-poster-fade
Desaturate beacon posters in TD menu.
2015-02-17 10:06:27 +13:00
Matthias Mailänder
38dbb3063b Merge pull request #7462 from obrakmann/fix7459_build_area
Fix extent of buildable area below structures
2015-02-16 22:04:03 +01:00
penev92
9664e32005 Merge pull request #7424 from RoosterDragon/minor-alloc
Avoid some memory allocations
2015-02-16 20:20:40 +02:00
Matthias Mailänder
917ae35e40 don't try to deploy all the time 2015-02-15 17:30:40 +01:00
Paul Chote
6e55c79a66 Desaturate beacon posters in TD menu. 2015-02-15 15:34:40 +00:00
Matthias Mailänder
6626df468c fetch OpenAL Soft from Nuget on Windows 2015-02-15 11:33:05 +01:00
Matthias Mailänder
4b70005d49 Merge pull request #7458 from pchote/replay-metadata
Closes #6669
2015-02-15 10:31:17 +01:00
Paul Chote
2d31e12bb9 Add --replay-metadata utility command. 2015-02-15 08:58:59 +00:00
Oliver Brakmann
7c59a523db Merge pull request #7460 from pchote/soviet-sidebar
Fix soviet sidebar regression
2015-02-14 20:47:06 +01:00
Oliver Brakmann
beb9e5087b Merge pull request #7446 from atimoschenkow/fix-sound-reset
Fix #7431
2015-02-14 17:04:14 +01:00
Oliver Brakmann
d1f810731d Merge pull request #7437 from 42foobar42/nod2b
added nod mission 2b
2015-02-14 16:50:27 +01:00
Oliver Brakmann
de16d29aa6 Merge pull request #7445 from jwbuurlage/bleed
Fixes #7219. In addition, sets cursor corresponding to the order with hi...
2015-02-14 12:22:34 +01:00
ScottNZ
61de2a2312 Fix map importer using the map title as the output filename.
This is broken because the map title can make an invalid filename.
2015-02-15 00:04:38 +13:00
Matthias Mailänder
76bf570426 Merge pull request #7436 from penev92/bleed_moveFiles2
Move the AI to Mods.Common
2015-02-14 09:42:18 +01:00
Matthias Mailänder
589e9fb5ee Merge pull request #7471 from x-a-n-a-x/D2KUI-tooltips
Closes #7470
2015-02-14 07:21:14 +01:00
Sebastien Kerguen
fa3c0e77d5 - fixes the missing tooltip glyphs #7470 2015-02-13 22:55:02 +01:00
Paul Chote
50860ab2b5 Merge pull request #7378 from obrakmann/fix_wiki_deployment
Switch wiki deployment to the orabot user with SSH auth
2015-02-12 14:43:19 +00:00
Taryn Hill
5349c69307 Merge pull request #7467 from ScottNZ/stylecop-fixes
Brace style fixes.
2015-02-12 07:54:10 -06:00
ScottNZ
582b6635ff Brace style fixes 2015-02-13 02:32:49 +13:00
Paul Chote
aa550790e5 Merge pull request #4528 from Mailaender/mime
Registered Linux MIME type to directly load replays
2015-02-12 11:21:37 +00:00
Paul Chote
6cacc70f6e Merge pull request #7456 from Mailaender/d2k-radar-fixup
Fixed the faction insignia being drawn over the radar minimap
2015-02-12 10:36:41 +00:00
Alexander Boll
52c67aef76 added hunt to every movement 2015-02-10 21:08:20 +01:00
Alexander Boll
e4647a8333 added nod mission 2b 2015-02-10 21:08:19 +01:00
Matthias Mailänder
ba66be18f7 remove empty Children: 2015-02-10 20:17:50 +01:00
Matthias Mailänder
b4ada2d61c change drawing order of faction logos over the minimap 2015-02-10 20:17:48 +01:00
Oliver Brakmann
7f4b62b7ee Fix extent of buildable area below structures
Restore use of GetBuildingAt to take bibs into account for buildable area, and only consult the actor map if the actor at that location is not a building.
2015-02-10 19:28:54 +01:00
Paul Chote
1af61c92c5 Split SpriteRenderable into its own file. 2015-02-10 17:47:49 +00:00
Paul Chote
2834c95e35 Fix soviet sidebar texture rectangles. 2015-02-10 17:11:15 +00:00
Paul Chote
8d51fb0e66 Use ActorPreviewWidget for the color pickers. 2015-02-10 15:22:42 +00:00
Paul Chote
aa9db669e7 Fix ActorPreview turret facings. 2015-02-10 15:22:42 +00:00
Paul Chote
268ca94dc1 Introduce ActorPreviewWidget. 2015-02-10 15:22:42 +00:00
Paul Chote
db1a27b071 Introduce IFinalizedRenderable.ScreenBounds. 2015-02-10 14:26:44 +00:00
Paul Chote
c55d723fb4 Remove Scale from IRenderable interface.
It is no longer used, and isn’t implemented for most renderables.
2015-02-09 23:26:06 +00:00
Paul Chote
a495a2f528 Split IFinalizedRenderable from Renderable to remove mutable structs. 2015-02-09 23:23:37 +00:00
Matthias Mailänder
1eb6c984f5 Merge pull request #7384 from Mailaender/new-d2k-build-palette
Added the new modular build palette to Dune 2000
2015-02-09 22:08:43 +01:00
penev92
6c6a4322ed Move the AI namespace to Mods.Common 2015-02-09 16:57:29 +02:00
atimoschenkow
9bf43c00a3 Fix #7431 2015-02-09 00:50:18 +01:00
Jan-Willem Buurlage
7eb2106375 Change cursor according to the command with highest priority. 2015-02-08 22:38:05 +01:00
Jan-Willem Buurlage
ce6c883fb1 Fixed #7219. Reduce boarding priority to resolve conflict with force-attacking own units. 2015-02-08 22:31:56 +01:00
Jan-Willem Buurlage
26562862f7 Add myself to authors 2015-02-08 22:30:55 +01:00
Matthias Mailänder
b0f986887c make maximum and minimum rows configurable 2015-02-08 20:43:35 +01:00
Matthias Mailänder
3be3700722 use the new modular UI 2015-02-08 20:43:32 +01:00
Matthias Mailänder
d921e0f838 Merge pull request #7418 from Mailaender/movie-list-removal
Removed the unused movie lists
2015-02-08 13:00:02 +01:00
Oliver Brakmann
32243122be Merge pull request #7435 from penev92/bleed_moveFiles
Moving more files to Mods.Common
2015-02-07 10:10:32 +01:00
Oliver Brakmann
0af8d6902b Merge pull request #7420 from abcdefg30/tsbounds
Fix some ts structure bounds
2015-02-06 22:03:54 +01:00
Oliver Brakmann
aafde15ddf Merge pull request #7393 from 42foobar42/bleed
Nod Mission 2a
2015-02-06 21:18:50 +01:00
Alexander Boll
9a09421800 fixed mission 2a and cleaned the code
changed according style code and added production trigger

corrected tech tree

removed comments and corrected same style issues

added gdi tech tree and changed produce to build

changed image format and replace spaces with tabs

deleted unnecessary tabs, added tooltips and corrected name

added lua file from nod 2a

changed according style code and added production trigger

deleted unnecessary tabs, added tooltips and corrected name

fixed image size

changed for loops to Utils.Do, removed facing and health from yaml,
changed movement function and corrected mission description

restored facing values unequal zero und fixed image position

Polish things a bit

Have player's units move into the map at the start

Polish some things
2015-02-06 21:11:18 +01:00
abcdefg30
3b84f42689 Fix some structure bounds 2015-02-06 20:48:21 +01:00
penev92
64887cb8c8 Move MainMenuLogic to Mods.Common 2015-02-06 13:37:43 +02:00
penev92
494b600ed8 Move refinery and harvester logic to Mods.Common;
Remove unused interface IAcceptOreDockAction
2015-02-06 13:23:07 +02:00
Matthias Mailänder
6714b498af Merge pull request #7428 from Phrohdoh/chmod
Unset executable bit from some thirdparty objects.
2015-02-05 19:22:22 +01:00
Oliver Brakmann
fc7e944727 Merge pull request #7398 from LipkeGu/ts_assets_part2
Adding the Rocks to Tiberian Sun
2015-02-05 18:22:57 +01:00
Oliver Brakmann
01ee8a3ca7 Merge pull request #7421 from huwpascoe/bugfix-carryall
BugFix: harvester-carryall remote death
2015-02-05 17:04:40 +01:00
Oliver Brakmann
1cb04d4500 Merge pull request #7408 from Mailaender/appveyor-nsis-deploy
Fixed NSIS being installed during every pull request build
2015-02-05 16:11:50 +01:00
Taryn Hill
a0130f105e Unset executable bit from some thirdparty objects. 2015-02-04 12:37:04 -06:00
huwpascoe
804cdee8f0 BugFix: harvester-carryall remote death
The d2k harvester would suddenly explode if the approaching carryall was
destroyed. This is because there was no distinction between the unit being
carried and the unit being reserved. To test you'll probably have to tweak
the turret missile in weapons.yaml so you can forcefire on the carryall.

* added a bool to check if carryall is actually holding it's target
* fixed harvester being stuck in reserved mode
2015-02-03 22:43:35 +00:00
Taryn Hill
e79239311a Merge pull request #7376 from abcdefg30/tsprereqs
Fix TS prerequisites.
2015-02-03 15:46:13 -06:00
Oliver Brakmann
86051ade43 Merge pull request #7423 from abcdefg30/demofix
Fix the demo truck explosion not killing the initiator
2015-02-03 22:20:18 +01:00
Guido L.
ce5e6e5a76 Add Rocks to Tiberian Sun 2015-02-03 19:26:47 +01:00
Oliver Brakmann
99c4e12650 Merge pull request #7425 from chrisforbes/issuestats
add issuestats badges to README
2015-02-03 17:21:54 +01:00
Chris Forbes
9f05d39352 add issuestats badges to README 2015-02-03 15:35:42 +13:00
RoosterDragon
b4993efff1 Avoid some minor allocations.
- Don't call string.Format in Actor.ToString since it gets called often, instead prefer a simple concat.
- In HiddenUnderFog.IsVisible, avoid a needless level of lambda indirection.
2015-02-02 21:16:14 +00:00
RoosterDragon
7e28acadd8 DrawPanelPartial now specifies each sprite as an individual parameter.
This allows some array allocations to be avoided, and makes the code more obvious since each sprite is referred to by name rather than an array index.
2015-02-02 21:16:14 +00:00
Oliver Brakmann
0371cfef3b Merge pull request #7406 from abcdefg30/allies05a
Ported allies05a to lua
2015-02-02 17:06:53 +01:00
Oliver Brakmann
ccc34806de Some polish for allies05a
* Viewport follows the truck automatically
* Greece's reinforcements arrive only after the heli has left the scene
* Added "Reinforcements have arrived" notification
* Adds all the Lua files of the recent missions to the solution
2015-02-02 16:51:50 +01:00
abcdefg30
aab54218e5 Ported allies05a to lua 2015-02-02 16:51:50 +01:00
abcdefg30
3b5e95bdc5 Set "AffectsParent: true" for the "MiniNuke" weapon 2015-02-02 15:17:41 +01:00
Matthias Mailänder
595c792879 remove the unused movie lists 2015-02-01 18:53:50 +01:00
Matthias Mailänder
5040baac9b Merge pull request #7415 from obrakmann/gdi05a
Add mission gdi05a
2015-02-01 18:49:27 +01:00
Oliver Brakmann
1b4dc3d1fe Add mission gdi05a 2015-02-01 18:12:46 +01:00
Oliver Brakmann
479259b9d7 Update mission gdi03 2015-02-01 15:50:18 +01:00
Oliver Brakmann
4aa97ec776 Allow support powers to start with a full charge when created 2015-02-01 15:49:45 +01:00
Oliver Brakmann
de616c69a2 Merge pull request #7416 from atimoschenkow/adjust-nudge
Adjust nudging for cases where no enterable cell is found
2015-02-01 15:18:59 +01:00
Oliver Brakmann
07d6a104a1 Merge pull request #7413 from Unit158/BoDupdate
Updated Break of Day
2015-02-01 15:14:51 +01:00
atimoschenkow
f2ae11f247 Adjust nudging for cases where no enterable cell is found
- Randomly select one of the occupied "non-stupid" cells
- Notify blockers in that cell
- Wait until it can be entered
- Move to cell
2015-02-01 14:57:10 +01:00
DeadlySurprise
4f07de2af8 Added a check for overflowing player credits 2015-02-01 13:28:47 +01:00
Matthias Mailänder
bcda232a1c Merge pull request #7231 from RoosterDragon/linq-checks
Checked LINQ queries and collections for inefficiencies.
2015-02-01 08:56:15 +01:00
Christopher Grant
ec79915323 Updated Break of Day 2015-01-31 18:04:35 -05:00
Oliver Brakmann
b68918f5d5 Merge pull request #7401 from RoosterDragon/stylecop-ignore-designer
Ignore designer generated files during StyleCop checks.
2015-01-31 14:35:28 +01:00
RoosterDragon
7ad58a3e3d Revert "don't check auto-generated code"
This reverts commit 47e2d9d623.
2015-01-31 12:46:47 +00:00
RoosterDragon
7a0889db91 Ignore designer generated files during StyleCop checks. 2015-01-31 12:46:47 +00:00
Matthias Mailänder
cfbe59f1e4 only install NSIS during deployment 2015-01-31 11:31:48 +01:00
Paul Chote
885b8ee18b Merge pull request #7407 from Mailaender/moneybinwidget-invalid-spacing
Fixed OpenRA.Mods.D2k/Widgets/MoneyBinWidget.cs: [SP2000] Invalid spacing at the end of the line.
2015-01-31 23:21:36 +13:00
Matthias Mailänder
89a5facb14 fix SP2000 2015-01-31 11:07:06 +01:00
Matthias Mailänder
7592f7d6fb Merge pull request #7342 from LipkeGu/Draw_sprite_crash
Do not try to draw "null" sprites
2015-01-31 10:55:26 +01:00
Matthias Mailänder
f0d4650857 Merge pull request #7392 from abcdefg30/missiondiplomacy
Disable the diplomacy menu in mission or campaign maps
2015-01-31 10:49:44 +01:00
Matthias Mailänder
83e3edb90a Merge pull request #7404 from obrakmann/non-targetable-spyplane
Make spy plane non-targetable
2015-01-31 10:37:53 +01:00
Oliver Brakmann
22b1f4de59 Merge pull request #7331 from Phrohdoh/dune-armor-bonuses
TerrainModifiesDamage trait.
2015-01-30 17:30:43 +01:00
Oliver Brakmann
f0a1292207 Make spy plane non-targetable 2015-01-30 15:52:35 +01:00
Matthias Mailänder
4899b555a9 Merge pull request #7191 from Mailaender/ts-superweapons
Added the Nod missile silo and the Ion Cannon to the Tiberian Sun mod
2015-01-29 21:48:14 +01:00
abcdefg30
28b90b0115 Use the class enum in LeaveMapLogic.cs as well 2015-01-29 20:26:40 +01:00
abcdefg30
b7b1e13c63 Disable the diplomacy menu in mission or campaign maps 2015-01-29 20:26:15 +01:00
RoosterDragon
82bea961ba Checked LINQ queries and collections for inefficiencies.
- Made Array.IndexOf available via extension method.
- Made ToHashSet extension method.
- Change collections queried often via Contains into sets.
- Avoid Count() extension if Count or Length property exist.
- Made Count() > 0 checks and variations calls to Any() instead.
- Don't call ToList/ToArray if there is no benefit to materializing the sequence.
- If the sequence does benefit from materialization, follow this general pattern:
  - Collection queried often via Contains use ToHashSet to speed up lookups.
  - Short lived variables use ToList. This is because ToArray requires an extra copy to output the final size.
  - Collections persisted into fields or for a long time use ToArray to minimize memory overhead.
2015-01-29 19:20:11 +00:00
Oliver Brakmann
f5f3747338 Merge pull request #7400 from obrakmann/whitespace-fix
Remove whitespace from empty line
2015-01-28 21:36:32 +01:00
Oliver Brakmann
f247bc890e Remove whitespace from empty line 2015-01-28 21:25:07 +01:00
Oliver Brakmann
7ddc340d5b Merge pull request #7314 from Unit158/Levelup-command
Added a levelup command
2015-01-28 20:58:17 +01:00
Oliver Brakmann
2e1ca40bb5 Merge pull request #7155 from cjshmyr/buildarea
Use ActorMap instead of BuildingInfluence for finding buildable area
2015-01-28 19:03:49 +01:00
Oliver Brakmann
9ec349cfd6 Merge pull request #7259 from MustaphaTR/d2k-tile-fix
D2K - Fixed some tiles
2015-01-28 18:54:02 +01:00
Mustafa Alperen Seki
a1810f7d28 Fixed some d2k tiles. 2015-01-28 14:17:06 +02:00
Oliver Brakmann
b0b83f2a3e Merge pull request #7388 from MustaphaTR/d2k-carryall-to-last
D2K - Carryall moved to last in Starport.
2015-01-27 20:32:06 +01:00
Matthias Mailänder
1859e9289a Merge pull request #7385 from huwpascoe/beepy
Changed the chat notification sounds for RA mod
2015-01-27 20:26:09 +01:00
Mustafa Alperen Seki
4e366a85fe Carryall moved to last in Starport. 2015-01-27 16:23:13 +02:00
Curtis Shmyr
30cf02c8e2 Use ActorMap instead of BuildingInfluence for finding buildable area 2015-01-26 20:22:21 -07:00
Taryn Hill
86f6d634c0 Add TerrainModifiesDamage trait.
^Infantry take 80% damage on Rough terrain in D2k.
2015-01-26 18:08:44 -06:00
huwpascoe
ac38340f4e Changed the chat notification sounds for RA and CNC mod. 2015-01-26 23:10:02 +00:00
Matthias Mailänder
034c071fbc Merge pull request #7382 from Mailaender/stylecop-plus
Added support for StyleCop+
2015-01-25 23:58:42 +01:00
Paul Chote
27a3a1e974 Merge pull request #7383 from obrakmann/fix7379_invalid_debug_channel
Fix wrong log channel name: Debug -> debug
2015-01-26 09:20:10 +13:00
Oliver Brakmann
b75adfe40e Merge pull request #6846 from Mailaender/gem-mine
Replaced the gem mine artwork
2015-01-25 20:16:51 +01:00
Oliver Brakmann
f2d8831576 Merge pull request #7360 from abcdefg30/allies03b
Ported allies03b to lua
2015-01-25 20:01:30 +01:00
Matthias Mailänder
f444fa6763 Merge pull request #7362 from RoosterDragon/fix-shared-font-sheetbuilder
Avoid a globally shared SheetBuilder in SpriteFont.
2015-01-25 19:48:54 +01:00
abcdefg30
4a7afd1a16 Ported allies03b to lua 2015-01-25 19:34:30 +01:00
Oliver Brakmann
266f26cdce Merge pull request #7223 from LipkeGu/ts_assets_mapeditor
Add Buildings and Trees to Tiberian Sun
2015-01-25 19:13:35 +01:00
Matthias Mailänder
24deec2a7b fix CodeLineMustNotEndWithWhitespace 2015-01-25 18:41:29 +01:00
Matthias Mailänder
47e2d9d623 don't check auto-generated code 2015-01-25 18:40:44 +01:00
Matthias Mailänder
93c4be6f7a add support for StyleCop+ 2015-01-25 18:40:44 +01:00
Oliver Brakmann
16cf805a23 Fix wrong log channel name: Debug -> debug 2015-01-25 18:34:16 +01:00
Oliver Brakmann
a38a1918dc Merge pull request #7098 from penev92/bleed_fixRefineryHierarchy
Clean up refinery and harvester docking sequence logic
2015-01-25 18:08:14 +01:00
penev92
828614d0f0 Add YAML upgrade rule 2015-01-25 17:17:35 +02:00
penev92
49508482c3 Update Refinery docking rules in YAML files 2015-01-25 17:17:34 +02:00
penev92
502ed6a0e7 Add SpriteHarvesterDockSequence and VoxelHarvesterDockSequence
Pass drag-related info from Refinery to HarvesterDockSequence
2015-01-25 17:17:34 +02:00
penev92
c18da7abb0 Fix harvester dock sequence names 2015-01-25 16:58:04 +02:00
penev92
202e280551 Fix OreRefinery and TiberiumRefinery names 2015-01-25 16:58:03 +02:00
penev92
6a40dfd0db Changed IAcceptOre to IAcceptResources 2015-01-25 16:58:02 +02:00
Oliver Brakmann
4cbfa31053 Merge pull request #6880 from Mailaender/lua-music
Added Media.PlayMusic to the Lua API
2015-01-25 15:05:47 +01:00
Oliver Brakmann
1f048b64ac Add upgrade rule for PlayMusicOnMapLoad removal 2015-01-25 14:44:13 +01:00
Matthias Mailänder
895f02d7cb update the music player widget when the music changes 2015-01-25 14:43:36 +01:00
Matthias Mailänder
c3e3a47746 play mission won theme 2015-01-25 14:43:36 +01:00
Matthias Mailänder
d5643a79b7 auto play shellmap music (again) on all mods
closes #6071
2015-01-25 14:43:36 +01:00
Matthias Mailänder
a7f27a65ea add Media.StopMusic() 2015-01-25 14:43:36 +01:00
Matthias Mailänder
3489794713 replace PlayMusicOnMapLoad trait with Lua Media.PlayMusic method 2015-01-25 14:43:36 +01:00
Matthias Mailänder
554f3ae8de Merge pull request #7375 from abcdefg30/fixsurvival02
Fix a crash in survival02
2015-01-25 14:34:51 +01:00
abcdefg30
a5b0ea73b0 Fix ts prerequisistes 2015-01-25 14:31:48 +01:00
Christopher Grant
66c33452e8 Added a levelup command 2015-01-24 14:56:33 -05:00
Matthias Mailänder
26202520a1 add the GDI Upgrade Center and Ion Cannon 2015-01-24 17:35:53 +01:00
Matthias Mailänder
d7c9a6cbc8 add the Nod Missile Silo and Cluster Missile 2015-01-24 17:35:52 +01:00
Matthias Mailänder
fc16990c05 unhardcode and self-document 2015-01-24 17:35:21 +01:00
Matthias Mailänder
aba9ffe93e remove unused sequence 2015-01-24 17:35:21 +01:00
Oliver Brakmann
98fd875a43 Merge pull request #7372 from ScottNZ/countries
Add more fake buildings
2015-01-24 12:30:48 +01:00
ScottNZ
7d8a6186e2 No access to Allied construction yards in allies 03, so remove unneeded fake definitions 2015-01-24 13:03:06 +13:00
ScottNZ
8e1661c297 Remove high tech fake structure access from a few missions 2015-01-24 13:02:35 +13:00
Oliver Brakmann
2f588968b0 Switch wiki deployment to the openra user with ssh auth 2015-01-23 22:36:10 +01:00
Oliver Brakmann
f360161922 Merge pull request #7227 from sinaptik/bleed
add scroll buttons that appear in the production palette when icons exceed available space
2015-01-23 19:46:30 +01:00
abcdefg30
b309983fd4 Fix a crash in survival02 2015-01-23 15:18:20 +01:00
ScottNZ
3c4e149f80 Rebalance fake structure costs: %10 of the original 2015-01-23 23:45:00 +13:00
ScottNZ
1986b31bcb Add fake atek (atef), mslo (mslf) and pdox (pdof) structures to ra.
Thanks to MicroBit for the icons.
2015-01-23 23:44:59 +13:00
ScottNZ
806d9ad4ad Move fake structures to fakes.yaml 2015-01-23 23:44:59 +13:00
sinaptik
b6b2b1a942 Add scroll buttons that appear in the production palette when icons exceed available space #7227
scroll up and down buttons: add disabled status, make dynamic, make smaller

Rename MaxIconRows to MaxIconRowOffset for clarity

Clean up scrolling logic, reset row position when switching tab
2015-01-23 18:40:11 +13:00
Oliver Brakmann
b97ccc3465 Merge pull request #7201 from reaperrr/yaml-reorg-cnc
Split TD weapons.yaml into multiple categorised yamls
2015-01-22 22:31:27 +01:00
Oliver Brakmann
2c71e954bf Merge pull request #7170 from penev92/bleed_enemySightedNotification
Implement "Enemy unit sighted" notification
2015-01-22 21:58:58 +01:00
Oliver Brakmann
ee3b4e6652 Merge pull request #7364 from RoosterDragon/yaml-redo
Reassert some changes lost in rebasing in MiniYaml.cs.
2015-01-21 20:14:32 +01:00
Oliver Brakmann
e875240ca3 Merge pull request #7367 from abcdefg30/fixmgg
Fix the prerequisites of mobile gap generator
2015-01-21 20:05:44 +01:00
abcdefg30
d73e739e5b Make mgg buildable by france only 2015-01-21 16:15:51 +01:00
reaperrr
309d64f2a3 Split cnc weapons.yaml into multiple rough categories 2015-01-20 23:23:50 +01:00
RoosterDragon
c39ff6894c Reassert some changes lost in rebasing in MiniYaml.cs. 2015-01-20 20:52:02 +00:00
Oliver Brakmann
7267a3afdb Merge pull request #6984 from DeadlySurprise/yamlFix
Fixed yaml bug with leading spaces
2015-01-20 21:42:22 +01:00
Paul Chote
99e2700ba7 Merge pull request #7356 from abcdefg30/limitcheat
Ignore buildlimits with AllTech cheat
2015-01-20 11:46:27 +13:00
RoosterDragon
c313c52e96 Avoid a globally shared SheetBuilder in SpriteFont.
A globally shared sheet builder leaks memory and resources between mod switches. Instead, we create and inject the sheet builder during mod startup to ensure we still share the builder across all fonts, but can reclaim it when the mod is unloaded.
2015-01-19 21:04:17 +00:00
Matthias Mailänder
398af8e513 Merge pull request #7357 from pchote/yay-outdated-distros
Fix compilation on mono 2.10.
2015-01-18 22:12:11 +01:00
Paul Chote
fb17fe79e2 Merge pull request #7351 from Mailaender/appveyor-push-artifact
Added appveyor PushArtifact to fix deployment
2015-01-19 09:51:13 +13:00
Paul Chote
4a73c88a85 Fix compilation on mono 2.10. 2015-01-19 08:56:18 +13:00
abcdefg30
2fd1576d15 Ignore buildlimits with AllTech cheat 2015-01-18 20:36:26 +01:00
Oliver Brakmann
98325ea32e Merge pull request #7329 from abcdefg30/improvemtm
Polished monster-tank-madness
2015-01-18 16:51:50 +01:00
reaperrr
ea1b45551c Merge pull request #7354 from penev92/bleed_moveFiles
Move parachutes and crates to Mods.Common
2015-01-18 16:28:27 +01:00
penev92
52cc69fd1f Move Crate, CrateSpawner and all CrateActions to Mods.Common 2015-01-18 16:40:55 +02:00
penev92
f1a0f6e2a5 Move Parachute, Parachutable and ParaDrop to Mods.Common 2015-01-18 16:15:14 +02:00
Matthias Mailänder
411446f9bd package the XML files 2015-01-18 13:17:11 +01:00
Matthias Mailänder
1b5928879c save replays in a less generic file extension 2015-01-18 13:17:11 +01:00
Matthias Mailänder
417b499472 register Linux MIME type to directly load replays 2015-01-18 13:17:10 +01:00
Matthias Mailänder
37c9caabd8 this has already been resolved in #7121 and #7187 2015-01-18 13:17:10 +01:00
Matthias Mailänder
44f1c52e44 Merge pull request #7204 from Mailaender/ts-harvest-overlay
Added the Tiberian Sun harvest animation
2015-01-18 12:58:46 +01:00
Matthias Mailänder
22df04a51b push the artifact rename the setup.exe 2015-01-18 10:54:35 +01:00
Matthias Mailänder
17277a318d Merge pull request #7345 from Mailaender/appveyor-nsis
Moved Windows setup deployment to AppVeyor
2015-01-18 09:50:32 +01:00
Matthias Mailänder
6a25bc90d8 Merge pull request #7346 from Mailaender/windows-dependencies
Added all native Windows dependencies to the fetch script
2015-01-18 09:46:26 +01:00
Matthias Mailänder
8e4674520e create a thirdparty/windows directory if it does not exit 2015-01-18 08:33:59 +01:00
Matthias Mailänder
601022f582 deploy Windows setup exe via AppVeyor only 2015-01-18 08:01:33 +01:00
Matthias Mailänder
b25184adca fetch Zlib from nuget 2015-01-18 07:35:54 +01:00
Matthias Mailänder
9cae84d29d fetch Lua 5.1 from nuget.org 2015-01-18 07:35:41 +01:00
Matthias Mailänder
23380c6df6 don't fetch native Windows binaries on Unix 2015-01-18 07:35:40 +01:00
Guido L.
8d6722be2d Do not try to pass "null" sprites 2015-01-18 03:41:10 +01:00
abcdefg30
7fe64b14a4 Polished monster-tank-madness 2015-01-17 23:56:31 +01:00
reaperrr
55b858051d Merge pull request #7347 from Mailaender/ingame-menu-csproj
Fixed the IDE build again
2015-01-17 18:52:05 +01:00
Matthias Mailänder
d6d75e244b bring back IngameMenuLogic 2015-01-17 18:30:47 +01:00
Oliver Brakmann
c2dac459bb Merge pull request #7334 from RoosterDragon/less-alloc
Cache or inline some delegates to avoid allocations.
2015-01-17 16:04:36 +01:00
Oliver Brakmann
c7b2bce18b Merge pull request #7307 from Mailaender/common-networking-ui
Moved connection UI to OpenRA.Mods.Common
2015-01-17 15:51:43 +01:00
Matthias Mailänder
5aeb6eda06 move connection UI to commons 2015-01-17 15:17:54 +01:00
Matthias Mailänder
94a3fc0186 Merge pull request #7336 from obrakmann/d2k-no-healing-barracks
Remove healing ability from d2k barracks
2015-01-17 15:13:50 +01:00
Matthias Mailänder
94678e37e8 Merge pull request #7296 from MustaphaTR/d2k-starport-tank
D2K - Fix Starport unit prerequisites.
2015-01-17 15:09:37 +01:00
Matthias Mailänder
c1c1960b44 Merge pull request #7337 from reaperrr/common29
Moved Lint, UtilityCommands and Scripting properties to Mods.Common
2015-01-17 14:53:48 +01:00
penev92
a4a8a793df Add EnemyWatcher trait to D2k and AnnounceOnSeen to D2k units and sandworms; remove sandworm announcement on worm spawn 2015-01-17 14:41:23 +02:00
penev92
e2832bb3d7 Implement EnemyWatcher and AnnounceOnSeen traits 2015-01-17 14:41:22 +02:00
Oliver Brakmann
878de65268 Merge pull request #7343 from Mailaender/travis-nsis-common
Fixed Travis deployment by adding NSIS stubs and plugins
2015-01-17 12:01:17 +01:00
Matthias Mailänder
2920b1bb02 fix Error: opening stub "/usr/share/nsis/Stubs/zlib" 2015-01-17 11:56:13 +01:00
Matthias Mailänder
87d14bc001 Merge pull request #7341 from obrakmann/fix_travis_build
Fix travis build not exiting in the top-level directory
2015-01-17 11:46:22 +01:00
Matthias Mailänder
e694692b97 add the Tiberian Sun harvest animation 2015-01-17 11:36:41 +01:00
Oliver Brakmann
e70a028328 Fix travis build not exiting in the top-level directory 2015-01-17 11:36:03 +01:00
Matthias Mailänder
4edb937401 Merge pull request #7339 from obrakmann/fix7303_wrong_ip_in_lobby_client_tooltip
Fixes #7303
2015-01-17 10:57:51 +01:00
Matthias Mailänder
65973f4af5 Merge pull request #7335 from ScottNZ/countries
Combine PDOX and PDOX.Germany
2015-01-17 09:35:27 +01:00
Matthias Mailänder
25185f6661 Merge pull request #7333 from obrakmann/fix-d2k-tile
Fix wrong template definition in the d2k tileset
2015-01-17 08:07:07 +01:00
Oliver Brakmann
2267530865 Fix showing wrong IP for server admins in the lobby client tooltips
The external IP will now only be resolved for the local client.
2015-01-16 20:18:40 +01:00
Oliver Brakmann
e58d4ae87e Merge pull request #7257 from Mailaender/d2k-guarding-voice
Added the Dune 2000 Guarding voice
2015-01-15 23:26:57 +01:00
reaperrr
52dd8c922f Moves Lint checks to Mods.Common 2015-01-15 23:15:51 +01:00
reaperrr
e82b2ce8dd Moves BaseAttackNotifier to Mods.Common 2015-01-15 22:59:43 +01:00
reaperrr
6f0ae30a7e Moves nearly all ScriptingProperties to Mods.Common 2015-01-15 22:56:35 +01:00
reaperrr
f3d364877a Moves the last 3 UtilityCommands and some prerequisite references to Mods.Common 2015-01-15 22:39:41 +01:00
ScottNZ
0e1bc262b1 Combine PDOX and PDOX.Germany to respect BuildLimit: 1 (Fixes #7330) 2015-01-16 09:33:55 +13:00
Oliver Brakmann
c092c0231f Merge pull request #7316 from reaperrr/move-stuff28
Moved Upgrades, SupportPowers and some misc features to Mods.Common
2015-01-15 20:57:40 +01:00
Oliver Brakmann
8575fdab68 Merge pull request #7298 from abcdefg30/repairnotifications
Add repairing and unit repaired sounds to ra service depo
2015-01-15 20:31:15 +01:00
abcdefg30
15c07d94ac Add repairing and unit repaired sounds to fix 2015-01-15 20:16:24 +01:00
Oliver Brakmann
13d819f0ac Remove healing ability from d2k barracks 2015-01-15 20:14:42 +01:00
reaperrr
e8fbfc366a Moves some misc traits/activities to Mods.Common, moves some RA traits into the Traits folder 2015-01-15 13:18:12 +01:00
reaperrr
be9d37f30e Moves SupportPowers and related Widgets to Mods.Common 2015-01-15 13:18:11 +01:00
reaperrr
f897a9ff01 Moves Upgrades and Invulnerable trait to Mods.Common 2015-01-15 00:07:27 +01:00
RoosterDragon
930d9cbea3 Cache or inline some delegates to avoid repeated allocations. 2015-01-14 22:57:41 +00:00
Oliver Brakmann
e4ce46514c Merge pull request #7278 from penev92/bleed_sandworm
Enhance Sandworm behaviour
2015-01-14 20:40:24 +01:00
penev92
e6f1c6b460 Enhance sandworm targeting logic by having actors produce noise 2015-01-14 21:26:55 +02:00
penev92
e42cf58cb1 Add IgnoresVisibility field to AttackBase 2015-01-14 21:26:54 +02:00
penev92
ea9ebaa08d Add IgnoresCloak trait 2015-01-14 21:26:53 +02:00
Oliver Brakmann
240e71684d Fix wrong template definition in the d2k tileset 2015-01-14 19:30:59 +01:00
Oliver Brakmann
0831b105cb Merge pull request #7164 from abcdefg30/survival02
Ported survival02 to lua
2015-01-13 20:16:00 +01:00
abcdefg30
363a6c6161 Add tooltips to cycl, barb and wood 2015-01-13 18:50:50 +01:00
abcdefg30
9dd85125d8 Ported Survival02 to lua 2015-01-13 17:48:12 +01:00
abcdefg30
a4f051ad6b Added a lua function for paratroopers 2015-01-13 17:48:11 +01:00
abcdefg30
660f43cc66 Added a lua function for airstrikes 2015-01-13 17:45:54 +01:00
Paul Chote
3ea70e891d Merge pull request #7291 from RoosterDragon/dynamic-palette-sizing
Implement dynamic hardware palette sizing.
2015-01-13 17:41:15 +13:00
Paul Chote
bdca98d4d6 Merge pull request #7311 from Mailaender/travis-docker
Switched to the new the Docker-based Travis CI infrastructure
2015-01-13 17:29:05 +13:00
Matthias Mailänder
a7220498b0 Merge pull request #7321 from abcdefg30/fixsoviet01
Polished soviet-01
2015-01-12 22:11:33 +01:00
Matthias Mailänder
cab7a34813 Merge pull request #7261 from abcdefg30/yaml-cleanup
map.yaml cleanup
2015-01-12 22:05:32 +01:00
Oliver Brakmann
75a9848468 Merge pull request #7276 from penev92/bleed_fixAttack
Minor targeting cleanup
2015-01-12 18:48:18 +01:00
Taryn Hill
20c0063656 Merge pull request #7323 from abcdefg30/devpower
Fix power decreasing while the dev hack is enabled.
2015-01-12 10:02:59 -07:00
abcdefg30
b7d8b2c6b3 Don't remove power while the dev hack is enabled 2015-01-11 21:37:32 +01:00
abcdefg30
dbde7e7a27 Polished soviet-01
- Made buildings unsellable
- Let the mission fail, if all airfields are destroyed
- Removed NPC fake objective
2015-01-11 21:15:02 +01:00
abcdefg30
80195d3fd0 Removed unused actors and reordered the rest 2015-01-11 16:36:49 +01:00
Oliver Brakmann
25abdfbcd6 Merge pull request #7319 from abcdefg30/remvalues
Removed Facing: 0 and Health: 1
2015-01-11 16:22:04 +01:00
abcdefg30
4be5c03385 Removed Facing: 0 and Health: 1 2015-01-11 16:04:41 +01:00
Oliver Brakmann
56446f5335 Merge pull request #7313 from Unit158/DropProductFix
Fixed airdrop production crash
2015-01-11 11:58:20 +01:00
Matthias Mailänder
3f85e1dd43 Merge pull request #7295 from reaperrr/move-prodrep
Move some more traits to Mods.Common
2015-01-11 08:26:03 +01:00
Matthias Mailänder
5c1b828be8 Merge pull request #7302 from pchote/makefile-deps
Move the mod dependencies to the test/check rules.
2015-01-11 08:21:46 +01:00
reaperrr
c431545a44 Wrap up Render traits move 2015-01-11 03:04:42 +01:00
reaperrr
5b8c97ae37 Move OrderGenerators to Mods.Common 2015-01-11 03:04:40 +01:00
reaperrr
0e1773ac5d Move Production to Mods.Common 2015-01-11 03:04:39 +01:00
Chicken man
279b7b0279 Fixed airdrop production crash 2015-01-10 20:40:39 -05:00
Taryn Hill
0dc65e5cf3 Merge pull request #7301 from abcdefg30/yearnumbers
Updated year numbers in all files.
2015-01-10 17:57:42 -07:00
Paul Chote
e0e0fea152 Move the mod dependencies to the test/check rules.
The utility does not require these at compile time, but the check and test commands are located inside the RA mod, which references all of the mod dlls at run time.
2015-01-11 11:21:26 +13:00
Matthias Mailänder
a95abd7b38 setup the Guarding voice 2015-01-10 22:34:57 +01:00
Matthias Mailänder
50b9054679 Merge pull request #7287 from abcdefg30/all-notifications
Added all ra notifications to notifications.yaml
2015-01-10 22:22:59 +01:00
Matthias Mailänder
2d3634e23a try to cache the Ubuntu package installation 2015-01-10 21:24:56 +01:00
Matthias Mailänder
edbab6976c switch to the new the Docker-based infrastructure 2015-01-10 21:24:54 +01:00
Matthias Mailänder
08411dbd73 Merge pull request #7308 from Mailaender/d2k-shellmap-harv-polish
Polished the Dune 2000 shellmap harvester delivery
2015-01-10 15:20:28 +01:00
Matthias Mailänder
3ef57d0180 Merge pull request #7273 from Mailaender/with-cargo-fix
Fixed WithCargo
2015-01-10 14:32:47 +01:00
Matthias Mailänder
e6ea359472 tweak the offset 2015-01-10 13:30:38 +01:00
Matthias Mailänder
be982bb42e Merge pull request #7250 from atimoschenkow/redundancy-fix
Refactored NotifyBlocker() (and several overloads) into ActorExts
2015-01-10 12:18:05 +01:00
atimoschenkow
cefd554a5e NotifyBlocker extension method for Actor 2015-01-10 12:02:59 +01:00
Oliver Brakmann
ae03fa9af5 Merge pull request #7306 from Mailaender/ra-missing-desert-palette
Removed glitchy decorations from DESERT tileset
2015-01-10 11:26:57 +01:00
Scott
77a4e467f8 Fix a small typo in survival01 (missing colon) 2015-01-10 12:12:59 +13:00
Matthias Mailänder
9ebf0ec85e exclude decorations without desert palette equivalents 2015-01-09 22:54:26 +01:00
abcdefg30
8ca61aa917 Updated all year numbers 2015-01-09 21:18:05 +01:00
Matthias Mailänder
5840e91908 Merge pull request #7299 from penev92/bleed_reorderMakefile
Reorder Travis build command orders
2015-01-09 20:57:20 +01:00
penev92
5d6f23af31 Add command dependencies 2015-01-09 18:48:37 +02:00
penev92
a8a726f56b Reorder Travis command order, add new lines to Makefile output for better readability 2015-01-09 17:49:34 +02:00
Oliver Brakmann
d9932549f2 Merge pull request #7297 from abcdefg30/fixutility
Fix a stupid mistake in utility.cmd (td vs cnc)
2015-01-09 15:38:30 +01:00
abcdefg30
d9572d4ca4 Rename Win -> MissionAccomplished and Lose -> MissionFailed
But keep them in notifications.yaml for backwards compatibility.
2015-01-09 14:14:03 +01:00
abcdefg30
ad1f9e56b6 Fix a stupid mistake in utility.cmd (td vs cnc) 2015-01-09 14:10:44 +01:00
abcdefg30
4a1e0a44d5 Added all speech notifications to notifications.yaml 2015-01-09 14:09:54 +01:00
Mustafa Alperen Seki
a7017d6d71 Fix Starport unit prerequisites. 2015-01-09 10:34:49 +02:00
Mustafa Alperen Seki
52a08e24af Fix Starport unit prerequisites. 2015-01-09 10:32:08 +02:00
Mustafa Alperen Seki
c2f9169d54 Fix Starport unit prerequisites. 2015-01-09 10:29:02 +02:00
Oliver Brakmann
4ec3a9e9fe Merge pull request #7294 from penev92/bleed_reorderMakefile
Reorder the Makefile
2015-01-08 17:42:21 +01:00
Oliver Brakmann
c779259462 Merge pull request #7282 from penev92/bleed_moveFiles
Move more traits to Mods.Common
2015-01-08 17:29:19 +01:00
penev92
cada348262 Reorder the "test" and "check" sections of the Makefile in order to run the faster/more dangerous things first 2015-01-08 18:02:13 +02:00
Oliver Brakmann
248afc0fee Merge pull request #7284 from pchote/fire-offset
Improve the fire animation position on D2K husks.
2015-01-08 16:59:40 +01:00
reaperrr
c619c06999 Merge pull request #7292 from RoosterDragon/upgradeoverlay-modifyrender
Adjust UpgradeOverlay.ModifyRender to be more efficient.
2015-01-08 08:48:55 +01:00
Matthias Mailänder
89b2f4d5d3 Merge pull request #7217 from Mailaender/chrome-init-cleanup
Cleaned up the ingame widget initialization
2015-01-08 07:40:36 +01:00
Matthias Mailänder
88922b056e Merge pull request #7229 from RoosterDragon/map-coords
Introduce a new type for representing map coordinates.
2015-01-08 07:39:23 +01:00
Chris Forbes
507fe66f78 Merge pull request #7288 from RoosterDragon/faster-depth-sorting
Speed up depth sorting of renderables.
2015-01-08 14:22:20 +13:00
Chris Forbes
0a493df4c1 Merge pull request #7281 from RoosterDragon/cache-render-traits
Cache render related TraitsImplementing calls in Actor.
2015-01-08 14:13:11 +13:00
RoosterDragon
df6956867a Adjust UpgradeOverlay.ModifyRender to be more efficient.
When IsTraitDisabled is set, ModifyRender doesn't actually alter the sequence, so we can just return it directly and avoid adding another layer of enumerable. If it is unset, then the modifying enumerable has one less condition to check inside the loop.
2015-01-08 00:52:03 +00:00
penev92
37cdcaf354 Move everything Capture-related + Transform activity to Mods.Common 2015-01-08 01:49:15 +02:00
penev92
18ac3953cc Move everything ExternalCapture-related to Mods.Common 2015-01-08 01:49:14 +02:00
penev92
8504c233d9 Move everything Repair-related to Mods.Common 2015-01-08 01:49:14 +02:00
penev92
bcd5160604 Move everything Bridge-related to Mods.Common 2015-01-08 01:47:20 +02:00
RoosterDragon
53f06ba093 Implement dynamic hardware palette sizing.
The HardwarePalette will now grow its palette buffer and texture in power-of-2 increments. This avoids it having to allocate memory for a full 256x256 texture up front. In practice the default mods use 22 or 23 palettes so a 32x256 texture is used. This means both the buffer and texture save neatly on memory. Additionally, HardwarePalette.ApplyModifiers sees a nice speedup as it has to transfer a much smaller amount of memory from the buffer to the texture.

To facilitate this change, the MaxPalettes constant is no more. Instead the PaletteReference deals with the calculation of the index and this is passed into the appropriate methods.
2015-01-07 22:41:51 +00:00
DeadlySurprise
fbe6ab7f4e Fixed yaml bug with leading spaces 2015-01-07 22:16:15 +01:00
RoosterDragon
69c409c20d Speed up depth sorting of renderables.
The OrderBy overload that takes an int generating key selector is faster than the one that requires a custom comparer. We extract a function from the ScreenZPosition function that determines the Z position of a WPos with an offset, but does not account for the tileset height. For the ordering function this is fine as only the relative magnitude of the comparison keys matter, so we don't need to spend time adjusting for the tileset height, as that won't affect the sort.
2015-01-07 18:22:38 +00:00
RoosterDragon
7cfece6dc0 Introduce a new type for representing map coordinates.
To resolve the ambiguity introduced when the introduction of isometric maps meant that cell and map coordinates were no longer equivalent, a new type has been introduced so they can each be represented separately.
2015-01-07 17:30:34 +00:00
Igor Popov
40c9d0a47d Merge pull request #7275 from RoosterDragon/formatting
Formatted all files.
2015-01-07 13:56:04 +03:00
Paul Chote
3667ebb7ca Merge pull request #7203 from RoosterDragon/reduce-server-footprint
Avoid initialization of graphical elements for a server.
2015-01-07 10:34:59 +13:00
RoosterDragon
a6cda967c2 Formatted all files.
Automatically formatted all files via VS. This generally corrects indentation, removes trailing whitespace and corrects misplaced tabs or spaces. Manually tweaked a few files where required.
2015-01-06 21:28:50 +00:00
Matthias Mailänder
282f76c1c1 Merge pull request #7256 from obrakmann/td-lobby-headers
Fix incorrect name for lobby headers container in TD
2015-01-06 22:08:16 +01:00
penev92
1c3dc388ea Remove redundant (and possibly risky) AttackFollow.CanAttack() 2015-01-06 22:07:41 +02:00
penev92
17dfda4c9d Some fixes to Cloak.IsVisible() 2015-01-06 22:07:33 +02:00
Oliver Brakmann
6468c0b6e6 Merge pull request #7266 from reaperrr/stylecop-make
Add StyleCop checks for Game, Editor and Mod dlls to make.ps1
2015-01-06 21:05:36 +01:00
Matthias Mailänder
eef3c548b8 Merge pull request #7286 from abcdefg30/d2kfix
Closes #7283
Closes #7285
2015-01-06 20:44:41 +01:00
Matthias Mailänder
c250457a34 make this fool proof by choosing a sane default 2015-01-06 20:04:45 +01:00
abcdefg30
84c2fdf9a9 Remove Buildable: from corrino buildings 2015-01-06 11:53:35 +01:00
abcdefg30
72a8951738 Fix sardaukars targeting air units 2015-01-06 11:43:11 +01:00
Paul Chote
55e5dd93eb Improve the fire animation position on D2K husks. 2015-01-06 23:36:43 +13:00
RoosterDragon
dc4d522967 Cache render related TraitsImplementing calls in Actor.
The TraitsImplementing<T> performs a dictionary lookup to match up its generic type parameter with the right trait collection. Since actors are rendered so much, it is useful to cache this result to avoid looking it up repeatedly.
2015-01-05 21:05:19 +00:00
reaperrr
dd90409b3d Document make check in Makefile 2015-01-05 20:49:20 +01:00
reaperrr
192ae175a6 Add StyleCop checks for mod dlls to make.ps1 2015-01-05 20:49:19 +01:00
Matthias Mailänder
e353fe5263 Merge pull request #7271 from reaperrr/ra-common27
Moved more traits & activities to Mods.Common
2015-01-05 20:35:21 +01:00
Oliver Brakmann
6a0363d482 Merge pull request #7265 from pchote/fix-lag-crash
Fix a race condition in the map download code.
2015-01-05 18:44:13 +01:00
Oliver Brakmann
ee50aec55a Fix incorrect name for lobby headers container in TD
...which caused the headers to still be visible when the options bin was open.

Also moves the "Map Options" title to the same place the headers occupy,
to above the options bin.
2015-01-05 18:40:46 +01:00
RoosterDragon
2c34358372 Avoid initialization of graphical elements for a server.
Avoid allocating memory and resources for graphical elements that will never be drawn when starting a dedicated server. This reduces the server memory footprint by approx 17 MiB.
2015-01-04 19:22:41 +00:00
Matthias Mailänder
4770876fff these only store value set in the constructor 2015-01-04 20:19:22 +01:00
Oliver Brakmann
58dc61e6ed Merge pull request #7262 from RoosterDragon/actormap-partitioning
Fix ActorMap spatial partitioning to actually work.
2015-01-04 18:48:01 +01:00
reaperrr
573c26145e Move Render*Circle, ThrowsParticle and ParatroopersPower to appropriate locations 2015-01-04 18:12:11 +01:00
reaperrr
7a8826f5e0 Move Targetable*, Seeds/StoresResource(s) and two RenderBuilding traits to Mods.Common 2015-01-04 18:12:10 +01:00
reaperrr
b7a3b9fdbf Move ScaredyCat, TakeCover, RenderInfantry, WithBuildingExplosion and SpawnMPUnits as well as Hunt activity to Mods.Common. 2015-01-04 18:12:09 +01:00
reaperrr
d07db9c6a9 Move Guard, CashTrickler, Explodes, SelfHealing, Sellable and Crushable to Mods.Common.
Extract Guardable trait from Guard into own file.
2015-01-04 18:12:08 +01:00
Matthias Mailänder
d4d55bb6dc modularize the remaining legacy ingame interface widgets
and consolidate chrome root initialization
2015-01-04 17:57:38 +01:00
Matthias Mailänder
9d2f33d42c add a World type 2015-01-04 17:57:38 +01:00
Oliver Brakmann
dbbc790dab Merge pull request #7270 from Mailaender/mods-ra-stylecop
StyleCop clean OpenRA.Mods.RA and enforce rules with Makefile
2015-01-04 17:45:20 +01:00
Oliver Brakmann
302cf44f5a Merge pull request #7267 from atimoschenkow/fix-selection-after-radar
Selection rectangle is drawn after exiting radar widget while dragging the viewport
2015-01-04 17:23:08 +01:00
atimoschenkow
831f19e993 A selection box is drawn if the mouse exits the radar widget while dragging the viewport.
These changes prevent this side effect.
2015-01-04 17:06:50 +01:00
Matthias Mailänder
1b0e3a7a7f StyleCop clean OpenRA.Mods.RA 2015-01-04 17:02:46 +01:00
Oliver Brakmann
75808c365a Merge pull request #7269 from abcdefg30/general-polish
Some general polish
2015-01-04 16:54:37 +01:00
reaperrr
2691f16a81 Merge pull request #7268 from Mailaender/stylecop-game-final
StyleCop clean OpenRA.Game Part 2 and enforce rules with Makefile
2015-01-04 15:47:54 +01:00
Matthias Mailänder
bc3acfeee7 StyleCop clean OpenRA.Game 2015-01-04 15:38:54 +01:00
Matthias Mailänder
d2d715765c Merge pull request #7263 from reaperrr/ra-common26
Moved Armament, Attack, Move, Air features and dependencies to Mods.Common
2015-01-04 15:33:16 +01:00
reaperrr
cb3ba37462 StyleCop fixes 2015-01-04 15:02:19 +01:00
Matthias Mailänder
0046dab1fd avoid legacy boolean values 2015-01-04 14:29:40 +01:00
Matthias Mailänder
18663323aa add the gem mine by @MicroJOo 2015-01-04 14:26:05 +01:00
Oliver Brakmann
580e0fc0df Merge pull request #7147 from penev92/bleed_enrichDune2kResources
Add more resources to the D2k mod
2015-01-04 14:18:38 +01:00
Oliver Brakmann
4cdf1b73c4 Merge pull request #7167 from MatthijsBenschop/d2k-carryall-extras
Some carryall fixes
2015-01-04 14:11:13 +01:00
abcdefg30
4fed02cd74 Make health bars 2 pixels shorter 2015-01-04 13:07:55 +01:00
abcdefg30
be5fc0bc27 Return from skirmish lobby to singleplayer menu instead of main menu 2015-01-04 13:06:06 +01:00
abcdefg30
f2e224dd72 Fix a crash in RemoveProximityTrigger 2015-01-04 13:06:06 +01:00
abcdefg30
98aed777d0 Improved legacy map import
Health: 1 and Facing: 0 will be omitted.
2015-01-04 13:06:05 +01:00
abcdefg30
e4c562ca53 Oppress undesired messages about difficulty changes 2015-01-04 13:06:04 +01:00
Paul Chote
a7ae72a7bb Fix a race condition in the map download code.
Fixes #7264.
2015-01-04 19:25:43 +13:00
reaperrr
654f56c5d5 Moves Attack, Armament, Move, Air traits and activities as well as anything required by them to Mods.Common.
Extracts Exit from Production into its own trait.
2015-01-04 05:24:28 +01:00
RoosterDragon
a0737ccbf3 Fix ActorMap spatial partitioning to actually work.
The bin partitioning in ActorMap worked by dividing the map up into a few chunks of cells, each of which would contain some actors. Unfortunately, the bins were accessed directly in world coordinates which are on a scale 1024x greater than cell coordinates. This lead to all actors being placed into the bottom right bin. When checking for actors in a box, only this bottom right bin would be iterated for actors. Thanks to the fact this bin indeed contained all the actors, some clamps on the input ranges and filtering required per bin anyway, this actually returned correct results. Effectively, it was as if there was no spatial partitioning at all.

Not surprisingly however, this is fairly inefficient. By correcting the spatial partitioning to actually partition we see a 7x speedup in ActorsInBox on the RA shellmap.
2015-01-04 02:35:16 +00:00
Oliver Brakmann
9e0bd02e39 Merge pull request #7253 from Mailaender/utility-check-verbosity
Tweaked the StyleCop utility output
2015-01-04 01:06:43 +01:00
Oliver Brakmann
158517c09f Merge pull request #7251 from Mailaender/stylecop-clean-game
StyleCop cleaned OpenRA.Game Part 1
2015-01-04 01:00:56 +01:00
reaperrr
eb33d72a70 Merge pull request #7254 from penev92/bleed_moveFiles
Moving more files to Common
2015-01-04 00:46:11 +01:00
Matthias Mailänder
f02e30a797 Merge pull request #7260 from RoosterDragon/fix-pathsearch-cache
Fix broken pathing
2015-01-03 23:52:05 +01:00
Matthijs Benschop
3c49364b57 Fix harvesters doing nothing after being dropped of by a carryall 2015-01-03 22:44:41 +01:00
Matthijs Benschop
740595064a The carryable should not unreserve itself 2015-01-03 22:44:41 +01:00
Matthijs Benschop
0868558e94 Allow a carryable to change his destination after being reserved 2015-01-03 22:44:41 +01:00
RoosterDragon
c7b4eff89a Ensure the whole path search cache is initialized.
The region covered by map.Cells may not cover the whole map size, but we need the whole cache initialized so it can be used correctly when a different map is used, because that map may have the same size but a different offset which means a different region is covered.
2015-01-03 20:07:04 +00:00
Matthias Mailänder
44cd174a8d StyleCop clean OpenRA.Game 2015-01-03 19:00:48 +01:00
Matthias Mailänder
30a5df46af Merge pull request #7222 from penev92/bleed_wander
Add Wanders trait and make AttackWander inherit that
2015-01-03 15:19:18 +01:00
penev92
62601491ad Move Enter and Repair Building activities, EngineerRepair trait and ActorExts to Mods.Common and extract IgnoresDisguise trait to its own file 2015-01-03 07:03:41 +02:00
penev92
b1e2e5bea6 Move PlayerStatistics to Mods.Common 2015-01-03 07:03:40 +02:00
penev92
0e71580af6 Move DetectCloaked to Mods.Common 2015-01-03 07:03:40 +02:00
penev92
5e1af58bbe Move Gives/Gains Experience and Bounty to Mods.Common 2015-01-03 07:03:28 +02:00
penev92
04c09dda31 Add a delay before wandering, use it on viceroids
Add a Min and Max delay and make it random
2015-01-03 06:56:20 +02:00
penev92
ded8ae9345 Add Wanders trait and make AttackWander inherit that 2015-01-03 06:52:49 +02:00
Matthias Mailänder
0f733d6b0d absolute path is not of relevance and only junking up the logs 2015-01-02 18:41:11 +01:00
Matthias Mailänder
1c90199fb0 one everything is fine per project is enough 2015-01-02 18:41:11 +01:00
Matthias Mailänder
7b5b14e0cf remove the spammy exit 0 output 2015-01-02 18:41:11 +01:00
Matthias Mailänder
9dd607c846 Merge pull request #7230 from RoosterDragon/occupied-cells-arrays
Make OccupiedCells implementations return arrays.
2015-01-02 17:38:56 +01:00
Matthias Mailänder
cddb956fee Merge pull request #7245 from Hellhake/stylecop-rest
Fix StyleCop warnings in Editor, Renderer.Sdl2, Utility, Test
2015-01-02 16:53:22 +01:00
Hellhake
7f06c4123a Enable stylecop clean projects for make check 2015-01-02 16:40:55 +01:00
Matthias Mailänder
167ba72119 Merge pull request #7246 from Hellhake/stylecop-ra
Fix StyleCop warnings in OpenRA.Mods.RA
2015-01-02 16:38:22 +01:00
penev92
6dabec6124 Add more tileset templates and voice notifications
Add House Corrino

Add Corrino-specific structures

Remove "new" tileset entries and speech notifications for now
2015-01-02 17:23:23 +02:00
Hellhake
311d154bd6 Fix StyleCop warnings in OpenRA.Test 2015-01-02 16:08:07 +01:00
Hellhake
90c948ebc3 Fix StyleCop warnings in OpenRA.Utility 2015-01-02 16:08:07 +01:00
Hellhake
bce017494d Fix StyleCop warnings in OpenRA.Renderer.Sdl2 2015-01-02 16:07:58 +01:00
Hellhake
beefe18ca5 Fix StyleCop warnings in OpenRA.Editor 2015-01-02 16:07:52 +01:00
Hellhake
b6410bc1e0 Fix StyleCop warnings in OpenRA.Mods.RA 2015-01-02 14:39:49 +01:00
Oliver Brakmann
30e42cdc62 Merge pull request #7247 from Hellhake/stylecop-game
Fix StyleCop warnings in OpenRA.Game
2015-01-02 12:58:04 +01:00
Oliver Brakmann
7fa0a9722a Merge pull request #7242 from LipkeGu/ignore_nuget
Add nuget(.exe) binary to .gitignore
2015-01-02 12:22:57 +01:00
Oliver Brakmann
ce41c60a40 Merge pull request #7244 from Hellhake/bom
Remove BOM
2015-01-02 12:11:27 +01:00
Hellhake
5a97a4b63b Fix StyleCop warnings in OpenRA.Game 2015-01-02 12:11:01 +01:00
Guido L.
7b25984561 Add nuget(.exe) binary to .gitignore 2015-01-02 11:52:29 +01:00
Matthias Mailänder
4c8f05e8aa Merge pull request #7178 from Mailaender/d2k-carryall-delivery
Polished the Dune 2000 shellmap to highlight both Carryalls and Sandworms
2015-01-02 11:29:15 +01:00
Paul Chote
151c263957 Merge pull request #7243 from Mailaender/travis-security
Replaced GitHub access token
2015-01-02 17:57:13 +13:00
Hellhake
fa72e04042 Remove BOM 2015-01-01 22:51:12 +01:00
Matthias Mailänder
1b3654a7f9 replace GitHub access token 2015-01-01 20:31:04 +01:00
Matthias Mailänder
53f2bcd638 Merge pull request #6946 from LipkeGu/ServerCrash
Fix bad behavor while pinging Clients
2015-01-01 15:38:42 +01:00
Oliver Brakmann
1d58a896bd Merge pull request #7177 from Mailaender/attack-overlay
Added an attack overlay for the sand worm
2015-01-01 15:05:21 +01:00
Matthias Mailänder
3835aec17f add an attack overlay for the sand worm 2015-01-01 14:53:04 +01:00
Matthias Mailänder
e9989496c4 Merge pull request #7235 from Mailaender/nuget-fail
Fail the whole script when nuget fails
2015-01-01 14:13:38 +01:00
Guido L.
f03355ba90 Fix bad behavor while pinging Clients 2015-01-01 13:45:59 +01:00
Matthias Mailänder
f093de98b6 Merge pull request #7238 from Mailaender/server-cpu-fix
Fixed high CPU usage due to Socket.Select not blocking the thread properly when the game started
2015-01-01 10:53:40 +01:00
Paul Chote
df425b29b3 Merge pull request #7194 from reaperrr/move-ra-common25
More Mods.RA reorganisation, more files moved to Mods.Common
2015-01-01 16:39:26 +13:00
asl97
d2a14842d8 avoid a busy server loop with high CPU usage
fixes #7237
2014-12-31 19:46:39 +01:00
Matthias Mailänder
714233d72e Merge pull request #7220 from obrakmann/d2k-worm-option-and-maps
Add worms to d2k maps and add lobby option to disable them
2014-12-31 13:03:37 +01:00
Oliver Brakmann
16a7038d90 Merge pull request #7236 from pchote/observershroud-spam
Fix missing collection debug messages.
2014-12-31 12:14:29 +01:00
Paul Chote
e930dc2b89 Fix missing collection debug messages. Fixes #6909. 2014-12-31 23:07:25 +13:00
Matthias Mailänder
2791ac7491 fail the whole script when nuget fails 2014-12-31 11:04:24 +01:00
Paul Chote
aa325eda36 Merge pull request #7232 from RoosterDragon/yaml-parse-perf
Improve YAML parse time.
2014-12-31 09:20:48 +13:00
RoosterDragon
fdcfb30011 Improve YAML parse time.
Stream lines to avoid needing to load the whole file first, and avoid a LINQ Contains call when string.IndexOf will be much faster.
2014-12-30 18:17:32 +00:00
RoosterDragon
fe24304a21 Make OccupiedCells implementations return arrays.
Since there are only one or two items, it's cheaper to return a concrete collection and avoid the overhead of the compiler generated state machine.

This in particular speeds up Shroud.GetVisOrigins when dealing with Mobile.OccupiedCells, as the expensive CanEnterCell call is made only once rather than twice.
2014-12-30 17:25:04 +00:00
Guido L.
2c485414e2 Add Buildings and Trees to Tiberian Sun 2014-12-30 18:18:48 +01:00
Oliver Brakmann
caa38f034e Update missions with new map option 2014-12-28 19:26:40 +01:00
Oliver Brakmann
de0a62eb42 Add a lobby option to control spawning creeps (viceroids/worms)
The lobby option is only exposed in d2k currently, not in TD or TS.
2014-12-28 19:26:39 +01:00
Oliver Brakmann
06226e8958 Merge pull request #7215 from pchote/production-hotkeys
Make production type hotkeys configurable.
2014-12-28 19:02:18 +01:00
Oliver Brakmann
c1bf8b29e3 Add worm spawn points to d2k maps 2014-12-28 17:47:36 +01:00
Matthias Mailänder
1e8382b7a1 add new map Kanly
http://resource.openra.net/maps/1696
2014-12-28 17:47:36 +01:00
Matthias Mailänder
d9c7096151 add new map Eyes of The Desert
http://resource.openra.net/maps/1661
2014-12-28 17:47:36 +01:00
Matthias Mailänder
a18512cd57 Merge pull request #7212 from reaperrr/stable-sharp-dep
Revert to stable SharpFont version 2.5.0.1
2014-12-28 16:12:39 +01:00
Matthias Mailänder
68253a61d0 Merge pull request #7216 from pchote/travis-retry
Use travis_retry to reduce the nuget timeout errors.
2014-12-28 10:47:29 +01:00
Paul Chote
07ebb017b9 Use travis_retry to reduce the nuget timeout errors. 2014-12-28 18:49:08 +13:00
Paul Chote
d9752c3bdf Make production type hotkeys configurable. 2014-12-28 17:24:12 +13:00
Paul Chote
a549e1b418 Merge pull request #7205 from ScottNZ/nuget
Make fetch-thirdparty-deps.ps1 work on more Windows platforms.
2014-12-28 10:13:59 +13:00
reaperrr
d5f5aeee0f Revert to SharpFont 2.5.0.1 for Linux and OSX, too 2014-12-27 21:24:12 +01:00
reaperrr
be7830e118 Revert to stable SharpFont version 2.5.0.1 2014-12-27 21:12:20 +01:00
ScottNZ
8725ee9de3 Make fetch-thirdparty-deps.ps1 work on more Windows platforms. 2014-12-27 22:05:54 +13:00
reaperrr
311e347ad2 Style fixes 2014-12-26 22:10:52 +01:00
Matthias Mailänder
1ec3c4bc62 Update INSTALL.md
try to explain the changes from #7190 and #7197
2014-12-26 21:45:08 +01:00
reaperrr
d074fb4471 Move *ResourceWarheads to Common, move warheads to Common.Warheads namespace 2014-12-26 21:38:50 +01:00
reaperrr
9dfd369446 Move some Building traits and related elements to Mods.Common 2014-12-26 21:38:49 +01:00
reaperrr
2f67a88b93 Move Armament, Attack* and various other traits to Traits namespace 2014-12-26 21:38:48 +01:00
reaperrr
2054e41552 Dissolve Render namespace 2014-12-26 21:38:47 +01:00
reaperrr
51fe951cd6 Move SupportPowers to Traits namespace 2014-12-26 21:38:47 +01:00
reaperrr
d58807cdb8 Dissolve RA.Buildings namespace.
Move a handfull related, loose traits to RA.Traits as well.
2014-12-26 21:38:46 +01:00
Paul Chote
9e806d5869 Merge pull request #7197 from Mailaender/nuget-thirdparty
Cleaned most of the thirdparty folder from foreign binaries
2014-12-27 09:28:44 +13:00
Paul Chote
9928d9a187 Merge pull request #7196 from Mailaender/prologue
Added the intro videos to the first missions as background info
2014-12-27 08:23:04 +13:00
Matthias Mailänder
94fcfccef9 add the intro videos to the first missions 2014-12-26 19:40:03 +01:00
Oliver Brakmann
cfb36a96d8 Merge pull request #7193 from pchote/style
Fix and enforce code style in Mods.Common, D2k, and TS.
2014-12-26 19:33:27 +01:00
Matthias Mailänder
e7ff627d87 Update INSTALL.md
add Windows PowerShell as dependency for the Makefile substitutes
2014-12-26 16:27:22 +01:00
Matthias Mailänder
962d8fe74f fetch Mono.Nat from nuget 2014-12-26 15:40:06 +01:00
Matthias Mailänder
51d081f93f fetch SDL2 (native Windows DLL) from nuget 2014-12-26 15:40:06 +01:00
Matthias Mailänder
02e1a8d5d2 fetch NUnit 2 from nuget 2014-12-26 15:40:06 +01:00
Matthias Mailänder
9ad76f87d2 fetch SharpFont from nuget 2014-12-26 15:40:06 +01:00
Matthias Mailänder
13785ddabd fetch MaxMind.GeoIP2 from nuget 2014-12-26 15:40:06 +01:00
Matthias Mailänder
6c855cdb8a fetch ICSharpCode.SharpZipLib from nuget 2014-12-26 15:40:04 +01:00
Paul Chote
63d5db1d12 Add Mods.D2k to make check. 2014-12-26 12:13:10 +13:00
Paul Chote
288a89168f Fix d2k naming style nits. 2014-12-26 12:13:10 +13:00
Paul Chote
2726108cff Fix d2k spacing and ordering style nits. 2014-12-26 12:13:09 +13:00
Paul Chote
28aad98125 Add Mods.TS to make check. 2014-12-26 12:13:09 +13:00
Paul Chote
2012946f06 Fix style nits in Mods.TS. 2014-12-26 12:13:09 +13:00
Paul Chote
44b1647fbe Add Mods.Common to make check. 2014-12-26 12:13:09 +13:00
Paul Chote
7575fd811d Rename static fields in SettingsLogic. 2014-12-26 12:13:09 +13:00
Paul Chote
97394789da Disable SA1509. 2014-12-26 12:13:08 +13:00
Paul Chote
9e47634d0f Fix public/static ordering. 2014-12-26 12:13:08 +13:00
Paul Chote
904efac284 Remove underscore prefix. 2014-12-26 12:13:08 +13:00
Paul Chote
362b4aeaef Fix variable ordering. 2014-12-26 12:13:08 +13:00
Paul Chote
22ab35f681 Fix capitalization. 2014-12-26 12:13:08 +13:00
Paul Chote
4ea7b5a908 Usings order. 2014-12-26 12:13:07 +13:00
Paul Chote
805039530d Info -> info. 2014-12-26 12:13:07 +13:00
Paul Chote
673ebba135 Fix invalid spacing style warnings. 2014-12-26 12:13:07 +13:00
Oliver Brakmann
0a68db5dfa Merge pull request #7187 from pchote/allmods
Show games from all compatible mods in the server browser.
2014-12-25 23:22:05 +01:00
Paul Chote
d584ca2797 Merge pull request #7190 from Mailaender/more-stylecop
Added yaml and code style analysis commands to OpenRA.Utility
2014-12-26 10:55:59 +13:00
Paul Chote
2cdcd0f590 Don’t crash if a replay can’t be loaded. 2014-12-26 08:48:37 +13:00
Matthias Mailänder
c1d9665b3d drop in Atreides harvester replacements with carryalls
replace Harkonnen base with Emperors outpost
2014-12-25 14:25:29 +01:00
Matthias Mailänder
e7a64ab8b0 automatically check for code style violations 2014-12-25 10:27:45 +01:00
Paul Chote
f4055dae53 Add --check-code-style utility command. 2014-12-25 10:18:20 +01:00
Paul Chote
ecd4479807 Move OpenRA.Lint into a --check-yaml utility command. 2014-12-25 10:10:57 +01:00
Paul Chote
91807cb53c Remove redundant StyleCop definitions. 2014-12-25 10:10:57 +01:00
Paul Chote
3086cc6154 Disable SA1024 and SA1035.
These rules generate many false positives, and do not help with code readability within OpenRA.
2014-12-25 10:10:57 +01:00
Matthias Mailänder
2dae43335e Merge pull request #7185 from zstyblik/pr20141224-heli-stances
Closes #7117
2014-12-25 10:05:13 +01:00
Paul Chote
568a23e395 Show all mods in the server browser. 2014-12-25 09:46:14 +13:00
Paul Chote
c45d472f9d Hide started games from the server list to reduce noise. 2014-12-25 09:46:14 +13:00
Paul Chote
199f80c8ed Cache GameServer joinable/compatible state across render frames. 2014-12-25 09:46:14 +13:00
Matthias Mailänder
b17c49d12f Merge pull request #7180 from abcdefg30/fix-lonestar
Repaired Fort Lonestar map
2014-12-24 18:03:26 +01:00
abcdefg30
1b068f5986 Add MustBeDestroyed to sniper and reorganize map.yaml 2014-12-24 16:12:45 +01:00
Oliver Brakmann
39d13dc654 Merge pull request #7121 from pchote/switchmods
Add Launch.Connect command and on-connect mod switching.
2014-12-24 16:06:00 +01:00
Matthias Mailänder
34a793c246 Merge pull request #7186 from Mailaender/ts-modchooser-png
Added mod chooser graphics to the Tiberian Sun mod
2014-12-24 15:13:01 +01:00
Oliver Brakmann
659d677cdb Merge pull request #7052 from Mailaender/gdi01-polishing
Fixed GDI01 secondary objectives and mission descriptions
2014-12-24 14:30:40 +01:00
Matthias Mailänder
c97aaa3064 add modchooser graphics 2014-12-24 14:22:55 +01:00
Zdenek Styblik
26d5a62c53 Enable stances for helicopters in RA
Commit enables stance changes for helicopters in RA. It also sets default stance
to HoldFire to keep previous behaviour.

closes #7117
2014-12-24 12:34:01 +01:00
Matthias Mailänder
4b913d423e Merge pull request #7162 from penev92/bleed_moveFiles
Further RA project cleanup
2014-12-24 11:02:23 +01:00
Matthias Mailänder
0cc95b8cfa Merge pull request #7184 from abcdefg30/fixsoviets
Fix soviets01
2014-12-24 10:48:58 +01:00
abcdefg30
e577f3d7f8 map.yaml cleanup 2014-12-24 10:09:26 +01:00
abcdefg30
366be4585a Fix soviets01 2014-12-24 09:56:23 +01:00
Matthias Mailänder
849d7ce0b3 Merge pull request #7175 from pchote/hardware-cursors
Closes #7015
2014-12-24 09:37:17 +01:00
Matthias Mailänder
4e4a14ae0b Merge pull request #7181 from pchote/d2k-leavemap
Fix d2k ingame-leavemap.yaml.
2014-12-24 09:16:38 +01:00
Paul Chote
54f3c1e7ac Fix d2k ingame-leavemap.yaml. 2014-12-24 09:54:34 +13:00
Matthias Mailänder
c460769442 Merge pull request #7176 from Mailaender/wormspawner-icon
Replaced the wormspawner editor icon
2014-12-23 15:41:33 +01:00
penev92
681042caec Further RA project cleanup 2014-12-23 15:18:07 +02:00
Matthias Mailänder
77ad98fa69 replace wormspawner editor icon 2014-12-23 11:46:32 +01:00
Paul Chote
6923046564 Expose the cursor mode setting. 2014-12-23 22:09:22 +13:00
Paul Chote
1317101662 Add support for hardware cursors. 2014-12-23 22:09:22 +13:00
Paul Chote
75b046ae2a Reorganize cursor plumbing in preparation for hardware cursors. 2014-12-23 22:09:22 +13:00
Paul Chote
202247cf6a Include no-extension workaround for FrameCache too. 2014-12-23 22:09:22 +13:00
Paul Chote
380b0e1561 Capitalise cursor properties. 2014-12-23 22:09:21 +13:00
Matthias Mailänder
7c19f710b8 Merge pull request #7134 from pchote/map-class
Introduce map Class field to replace Selectable/UseAsShellmap
2014-12-22 22:23:41 +01:00
Paul Chote
dc211cc729 Fix an unrelated editor regression. 2014-12-23 10:00:23 +13:00
Paul Chote
bd2518649a Upgrade shipped maps to the latest format. 2014-12-23 10:00:19 +13:00
Paul Chote
96b5b1fc66 Automatically switch mods when connecting to a server / replay. 2014-12-23 09:20:21 +13:00
Paul Chote
660f6682ff Add Launch.Connect parameter for launching directly to a server. 2014-12-23 09:20:21 +13:00
Paul Chote
7bfffeadc2 Simplify mod content installation plumbing. 2014-12-23 09:20:21 +13:00
Paul Chote
ec7a32184e Move the mod-level initialisation code back into the load screen. 2014-12-23 09:20:19 +13:00
Paul Chote
6f0927069a Allow outside code to specify the map chooser visibility filter. 2014-12-23 09:08:00 +13:00
Paul Chote
2ed594fd86 Introduce map Visibility field.
This replaces the Selectable, UseAsShellmap, and special-cased Type = "Mission" fields.
2014-12-23 09:08:00 +13:00
Paul Chote
b4c9c19cce Don’t crash when saving automatically-upgraded maps. 2014-12-23 09:08:00 +13:00
Paul Chote
14deb1efdf Drop support for map format 5. 2014-12-23 09:08:00 +13:00
Matthias Mailänder
711a1ca5fc Merge pull request #6830 from RoosterDragon/dispose-renderer-resources
Closes #5116
2014-12-22 19:59:41 +01:00
Matthias Mailänder
ea410d0688 Merge pull request #7096 from ScottNZ/countries
Closes #5928
2014-12-22 19:20:43 +01:00
Oliver Brakmann
4f4501ccb6 Merge pull request #7165 from Mailaender/appveyor
Added AppVeyor support
2014-12-22 18:49:23 +01:00
Matthias Mailänder
967d6b6ea0 Merge pull request #7161 from reaperrr/dissolve-namespaces03
Dissolve Move, Infiltration and Crates namespaces
2014-12-22 18:43:05 +01:00
RoosterDragon
b28d999131 Made SheetBuilder rely on global settings rather than global renderer.
Additionally exposed an InitializeSettings method on game to initialize the global settings so that other classes can set up all the secret dependencies on the global settings required.
2014-12-22 17:39:19 +00:00
RoosterDragon
9cbac2d5e1 Clean up style of files affected by the last commit. 2014-12-22 17:34:02 +00:00
RoosterDragon
f0f02dff5c Dispose of graphics resources deterministically.
Textures, FrameBuffers and VertexBuffers allocated by the Sdl2 Renderer were only being released via finalizers. This could lead to OpenGL out of memory errors since resources may not be cleaned up in a timely manner. To avoid this, IDisposable has been implemented and transitively applied to classes that use these resources.

As a side-effect some static state is no longer static, particularly in Renderer, in order to facilitate this change and just for nicer design in general.

Also dispose some bitmaps.
2014-12-22 17:34:01 +00:00
reaperrr
070a3839d4 Remove obsolete D2k sln
Closes #7163.
2014-12-22 18:13:31 +01:00
reaperrr
370c3c65b6 Moved AttackLeap to Mods.RA.Traits, moved AttackPopupTurreted to
Mods.Cnc.Traits
2014-12-22 18:13:30 +01:00
reaperrr
65a140afa5 Dissolve Crates namespace, move CrateActions and Crate trait to Traits/Crates 2014-12-22 18:13:29 +01:00
reaperrr
52219b1c7a Dissolve Infiltration namespace 2014-12-22 18:13:28 +01:00
reaperrr
5c5210f5e3 Dissolve Move namespace into Activities & Traits 2014-12-22 17:32:08 +01:00
Matthias Mailänder
b0181b6d7b don't run tests that will fail due to known issues 2014-12-22 10:18:44 +01:00
Matthias Mailänder
c04bb13e71 fix redeploying failing the secondary objective
code cleanup
2014-12-22 09:56:36 +01:00
Matthias Mailänder
b294816489 left-click orders have been deprecated 2014-12-22 09:45:18 +01:00
Matthias Mailänder
38b579a081 Merge pull request #7169 from pchote/revert-attackmove
Closes #7128
2014-12-22 09:43:42 +01:00
Paul Chote
9fc8726a5e Merge pull request #7171 from chrisforbes/fix-mission-nre
Fix NRE in start game MissionBrowser IsDisabled query
2014-12-22 16:34:06 +13:00
Chris Forbes
2790748587 Fix NRE in start game MissionBrowser IsDisabled query 2014-12-22 16:12:53 +13:00
Paul Chote
488f0d1140 Revert "Fixes AttackMove moving even if an enemy is within range."
This reverts commit a155c7b7ac.
2014-12-22 15:17:51 +13:00
Paul Chote
e212517bbb Merge pull request #7126 from penev92/bleed_sandworm
Fix worms not releasing targets when they move deep onto rock
2014-12-22 14:46:08 +13:00
Paul Chote
f352aedf61 Merge pull request #7071 from RoosterDragon/deal-in-map-coords
Avoid redundant cell <-> map conversions
2014-12-22 14:08:30 +13:00
Paul Chote
acb29d74cd Merge pull request #7141 from RoosterDragon/sync-less-tostring
Generate sync reports faster
2014-12-22 09:01:08 +13:00
Matthias Mailänder
c42f4d8fcc add AppVeyor support 2014-12-21 20:08:35 +01:00
Matthias Mailänder
b05fd1664f Merge pull request #7158 from obrakmann/fix6839_part2
Disable dev and player commands for observers
2014-12-21 12:32:51 +01:00
RoosterDragon
c37a691c33 Convert some keys users of CellLayer to index via map-coords for efficiency. 2014-12-20 23:39:03 +00:00
RoosterDragon
b728deb0e1 Added the ability to enumerate the map-coords of a CellRegion for performance. 2014-12-20 23:36:28 +00:00
Oliver Brakmann
b9e3c62671 Merge pull request #7157 from reaperrr/ra-common22
Moved Tooltip to Mods.Common.Traits
2014-12-20 22:16:51 +01:00
Oliver Brakmann
a2eddeae40 Disable dev and player commands for observers
Fixes #6839
2014-12-20 19:34:10 +01:00
reaperrr
51cc87a8dc Move Tooltip to Mods.Common 2014-12-20 15:19:26 +01:00
Oliver Brakmann
087a06b3bc Merge pull request #7152 from ihptru/masterserver
notify user that his server does not have forwarded ports
2014-12-20 13:34:51 +01:00
Oliver Brakmann
2509bbdc8e Merge pull request #7149 from LipkeGu/devcmd_observer_crash
Accept DevCommands only from local players
2014-12-20 13:25:17 +01:00
ihptru
57897b4916 notify user that his server does not have forwarded ports 2014-12-20 10:54:01 +03:00
Chris Forbes
080e94f970 Merge pull request #7153 from reaperrr/ra-common20
More RA/Common reorganisation
2014-12-20 15:24:11 +13:00
reaperrr
2d7c1a3394 Rename CommonTraitsInterfaces to TraitsInterfaces, move to Traits namespace 2014-12-19 13:18:36 +01:00
reaperrr
de224a381d Make WithRotor independent from WithTurret
Move WithRotor to Mods.Common
2014-12-19 13:18:32 +01:00
ScottNZ
67faca2e57 Remove fake structure access from a few missions 2014-12-19 18:13:33 +13:00
ScottNZ
d77086a94b Buff parabombs - increase damage and spread 2014-12-19 18:13:32 +13:00
ScottNZ
a4ed728428 Reduce price of MAD tank to $2000 2014-12-19 18:13:32 +13:00
ScottNZ
2f8fb1a138 Increase minelayer capacity to 5 2014-12-19 18:13:31 +13:00
ScottNZ
486b878e9b Set up additional prerequisites to make it easier for modders 2014-12-19 18:13:31 +13:00
ScottNZ
52f6cb418a Fix faction dropdowns unhighlighting when they shouldn't 2014-12-19 18:13:30 +13:00
ScottNZ
4f4c67735d Overhaul the lobby faction dropdown for ra 2014-12-19 18:13:27 +13:00
ScottNZ
ac090b3acd Fix a bogus label name in ra 2014-12-19 18:08:52 +13:00
ScottNZ
32c25d03a1 Add new flags to ra countries, based on tomsons26's work 2014-12-19 18:08:51 +13:00
ScottNZ
846b15fb26 Add Advanced Gap Generator for France 2014-12-19 18:08:51 +13:00
ScottNZ
4b94bfdf85 stnk -> England, mgg -> France, ctnk -> Germany, qtnk -> Russia, dtrk -> Ukraine 2014-12-19 18:08:50 +13:00
ScottNZ
8da406238b Set up prerequisites for WEAP 2014-12-19 18:08:50 +13:00
ScottNZ
fc1392e9ad Add Advanced Chronosphere for Germany 2014-12-19 18:08:50 +13:00
ScottNZ
61ad0edc15 Change spy to be 50% cheaper for England 2014-12-19 18:08:49 +13:00
ScottNZ
40fda57769 Let vanilla Allies build fake structures (except fake sub pen because it's silly) 2014-12-19 18:08:49 +13:00
ScottNZ
20fd862d75 Rebalance fake structures 2014-12-19 18:08:48 +13:00
ScottNZ
01db3fc4b8 Adjust fake structure tooltips to appear real to enemies 2014-12-19 18:08:48 +13:00
ScottNZ
62f85e8e36 Update voice definitions for new countries 2014-12-19 18:08:48 +13:00
ScottNZ
1c2bda8460 Update crates for new countries 2014-12-19 18:08:47 +13:00
ScottNZ
c526f572e7 Set up tank drop for Russia, parabombs for Ukraine and spy plane/paradrop for Soviet 2014-12-19 18:08:47 +13:00
ScottNZ
e54be8c58b Set up custom prerequisites for FACT 2014-12-19 18:05:28 +13:00
ScottNZ
c4110bad45 Add country definitions 2014-12-19 18:05:28 +13:00
Paul Chote
5b011e6baf Merge pull request #7072 from obrakmann/fmv-overhaul
Move FMV playback from Lua scripts to widgets
2014-12-19 17:43:07 +13:00
Paul Chote
e3068a8032 Merge pull request #6964 from obrakmann/fix6589_add_short_game_option
Short Game option
2014-12-19 17:20:47 +13:00
Guido L.
47e2859196 Accept DevCommands only from local Players 2014-12-18 22:41:19 +01:00
Oliver Brakmann
2ec36b65aa Merge pull request #7146 from MustaphaTR/d2k-starting-units
D2k - Added more Rifle Inf. to Starting Units.
2014-12-18 20:42:44 +01:00
Oliver Brakmann
441f30f021 Punctuation fixes 2014-12-18 20:24:37 +01:00
Oliver Brakmann
5a6282d6f9 Adjust missions 2014-12-18 20:24:37 +01:00
Oliver Brakmann
f182e3be1d Adjust minigames 2014-12-18 20:24:37 +01:00
Oliver Brakmann
3cd4152dd2 Adjust rules 2014-12-18 20:24:37 +01:00
Oliver Brakmann
4b9b1df96b Add short game option to GUI 2014-12-18 20:24:37 +01:00
Oliver Brakmann
280b30961f Add plumbing for short game option 2014-12-18 20:03:26 +01:00
Oliver Brakmann
470ae17271 Move mission objectives and victory conditions to Mods.Common 2014-12-18 20:03:26 +01:00
Oliver Brakmann
e342619ac7 Add video support to legacy map importer
This enables the map importer to map the .ini video definitions to ours.

The mapping generally is as follows:

Intro => BackgroundInfo
Brief => Briefing
Action => GameStart
Win => GameWon
Lose => GameLost

An issue in some Red Alert maps means that this mapping is not always
quite correct. In those maps that do not have a 'Brief' video defined
(scg03a is an example), Westwood has assigned the video that should
probaby have been the 'Action' video to the 'Intro' slot instead. I can
only assume that that was done due to some limitation in the original
game code. Mappers will have to correct that assignment manually in
those cases.
2014-12-18 18:59:42 +01:00
Oliver Brakmann
1564e6c0dd Update missions for yaml-defined FMV playback 2014-12-18 18:59:42 +01:00
Oliver Brakmann
04bd4627d4 Add yaml-defined FMV playback to GUI elements 2014-12-18 18:59:42 +01:00
Mustafa Alperen Seki
cd53de198c D2k - Added more Rifle Inf. to Starting Units. 2014-12-18 13:41:49 +02:00
Paul Chote
cb471bb36b Merge pull request #7133 from reaperrr/ra-reorg10
Reorganise Mods.D2k, more reorganisation for Mods.RA
2014-12-18 23:00:21 +13:00
Oliver Brakmann
1175215bf3 Merge pull request #7039 from Mailaender/bring-back-teamchat-tab
Brought back TAB to switch team/all chat when nothing has been typed yet
2014-12-17 22:18:14 +01:00
reaperrr
c19d096d92 Bring Mods.D2k in line with our new folder/namespace structure 2014-12-17 13:10:50 +01:00
Chris Forbes
3bb3eebeb9 Merge pull request #7138 from DavidARussell/bleed
Applys decloak to units activating a C4 demolition or infiltrate ability
2014-12-17 22:32:16 +13:00
Paul Chote
e1a701d21b Merge pull request #7143 from Unit158/AUTHORS
Add Unit158 to AUTHORS
2014-12-17 15:24:41 +13:00
Chicken man
15620e8da8 Add Unit158 to AUTHORS 2014-12-16 19:09:04 -05:00
David Russell
5e2df2c39a Decloak on demolish and infiltrate
Per issue #7028, infiltrating or demolishing a building will now cause an
infantry unit to decloak (if it has a cloak ability). This behaviour is
configurable (defaults to true in both cases) using the
DecloakOnInfiltrate and DecloakOnDemolish options.
2014-12-16 22:25:49 +00:00
RoosterDragon
3511fbbf2c Generate sync reports faster by delaying ToString calls until it is written to disk.
Values for the report are generated by calling ToString on members, we avoid calling this on value types for performance. By instead just copying the value we can delay calling ToString until later and avoid spending time and memory creating strings that usually go unused.
2014-12-16 18:39:02 +00:00
Paul Chote
f186f22bfc Merge pull request #7073 from Mailaender/travis-csharp
Added official Travis C# support
2014-12-16 20:58:55 +13:00
reaperrr
b5872d9fa5 Reorganise RA-specific parts of Mods.RA a little more 2014-12-15 00:01:36 +01:00
Paul Chote
1f90b9b74b Merge pull request #7129 from reaperrr/ra-common15
More Mods.RA/Mods.Common reorganisation
2014-12-15 08:15:41 +13:00
reaperrr
ee8e1f46c1 Move 'Activity' into its own namespace in OpenRA.Game. 2014-12-14 17:12:46 +01:00
reaperrr
91c19b0f66 Move various RA-specific traits to the new folder/namespace structure 2014-12-14 17:11:52 +01:00
reaperrr
b217730caa Move Activities CallFunc, RemoveSelf and SimpleTeleport to Common 2014-12-14 17:11:52 +01:00
reaperrr
0015c1319e Rename Util.cs to BuildingUtils.cs 2014-12-14 17:11:51 +01:00
reaperrr
4bf50c9153 Move more traits from Mods.RA to Mods.Common 2014-12-14 17:11:50 +01:00
Oliver Brakmann
8723aa86fb Merge pull request #6679 from Mailaender/change-owner-warhead
Implemented Deviator nerve gas missiles as warheads
2014-12-14 16:28:58 +01:00
Matthias Mailänder
9e650adef8 implement Ordos nerve gas missiles as warheads
closes #2838
2014-12-14 16:03:16 +01:00
Matthias Mailänder
b6ed3c1c0d Merge pull request #7108 from RoosterDragon/faster-path-init
Cache the initial path layer for faster path search startups.
2014-12-14 15:52:06 +01:00
Matthias Mailänder
f55b95017c Merge pull request #7122 from penev92/bleed_moveFiles
Move more files away from OpenRA.Mods.RA
2014-12-14 15:40:46 +01:00
penev92
1e9535b63a Move more files
Move VoxelNormalsPalette to TS
2014-12-14 15:39:38 +02:00
Matthias Mailänder
611e3038b2 Merge pull request #7066 from WolfGaming/FixTimeoutInSinglePlayer
Fix: Game can no longer drop you in a single player game.
2014-12-14 10:50:36 +01:00
Scott
0e220c65d3 Merge pull request #7127 from pchote/stylecop
Fix a collection of whitespace-style issues in Mods.Common.
2014-12-14 19:37:11 +13:00
Paul Chote
0f332472f1 Fix StyleCop nits in Mods.TS. 2014-12-14 17:13:23 +13:00
Paul Chote
4504df1de9 Fix StyleCop nits in Mods.Cnc. 2014-12-14 17:11:20 +13:00
Paul Chote
ecd3809bc2 Fix a collection of whitespace-style issues in Mods.Common. 2014-12-14 17:06:43 +13:00
WolfGaming
20fe03b6c1 Added comment and a static field for localhost. 2014-12-14 02:26:42 +00:00
penev92
fbda9dc1b1 Fix worms getting stuck when target reaches rock 2014-12-14 02:32:01 +02:00
Oliver Brakmann
299a933dac Merge pull request #7123 from pchote/style-cleanup
Clean up some code style issues.
2014-12-14 00:06:52 +01:00
Paul Chote
eefd7dba2c Fix some minor style issues in Attack*. 2014-12-14 11:31:04 +13:00
Paul Chote
ebdb260650 Fix style issues from a recent PR. 2014-12-14 11:31:04 +13:00
Paul Chote
a50ccd1020 Remove the AttackSwallow Info field overloading. 2014-12-14 10:49:35 +13:00
RoosterDragon
f01f8d92b3 Cache the initial path layer for faster path search startups.
Reinitializing the initial cell info layer for the path search took a fair bit of time. We cache this initial setup so it only has to be done each time the map size changes. A CopyValuesFrom method in CellLayer is provided which copies values between layers by just copying the internal arrays for super speed.

This speeds up InitCellInfo 10x.
2014-12-13 21:44:32 +00:00
WolfGaming
f191babec8 Fix: Game can no longer drop you in a single player game. 2014-12-13 16:04:00 +00:00
Matthias Mailänder
8e001663dc Merge pull request #6821 from penev92/bleed_sandworm
Closes #2245
2014-12-13 14:16:55 +01:00
obrakmann
515e2c572c Merge pull request #7097 from abcdefg30/difficulty03a
Polished allies03a
2014-12-13 13:53:42 +01:00
penev92
f57625f9e6 Add WormAttack notification, fix worm min count and spawn interval
Enhance usage of WormManager Minimum and Maximum properties, add escape radius to AttackSwallow
2014-12-13 14:06:56 +02:00
penev92
b4d1a605da Add RadarPing on worm spawn, fix wandering issue, add new Wormspawner.shp 2014-12-13 14:02:45 +02:00
penev92
61cb74adb4 Improved visuals, added WormSign norification 2014-12-13 14:02:44 +02:00
penev92
c4efd269d4 Step three in implementing sandworms
Removed/fixed comments

Code style fixes

Fixed AttackWander, addressed style nits

Fix Travis crash
2014-12-13 14:02:44 +02:00
penev92
1057f8ff3b Second implementation of Sandworms
Fix tabs in AttackSwallow.cs
2014-12-13 14:02:43 +02:00
abcdefg30
ddf4a4a656 Don't hunt cloaked units 2014-12-13 11:46:18 +01:00
abcdefg30
2729233735 Polished allies03a 2014-12-13 11:24:11 +01:00
Matthias Mailänder
5da5bce405 Merge pull request #7102 from ScottNZ/parachutable
Fixes #7101
2014-12-13 08:14:23 +01:00
Matthias Mailänder
e353c93b76 Merge pull request #7107 from reaperrr/ra-common-move01
Made Common namespaces more consistent
2014-12-12 22:19:54 +01:00
obrakmann
aba00eaf64 Merge pull request #7116 from reaperrr/attackmove-split
Splits AttackMove into trait and activity
2014-12-12 21:29:13 +01:00
reaperrr
56ac46541a Merge pull request #7119 from Mailaender/allies01-tanya-crash
Fixed a Fatal Lua Error in the first Allies mission
2014-12-12 13:30:56 +01:00
reaperrr
584a6b2e75 Splits AttackMove into trait and activity.
Moves them to subfolders/namespaces accordingly.
2014-12-12 13:24:30 +01:00
reaperrr
94907088c8 Merge pull request #7113 from Smilex/issue_7100
Prevent divide by zero. Issue #7100
2014-12-12 13:21:18 +01:00
reaperrr
65fb1a2cba Merge pull request #7114 from Mailaender/no-bots-koth-hopes-anchor
Disallowed bots on Hopes Anchor
2014-12-11 23:29:38 +01:00
reaperrr
26075b8eaf Moves loadscreens into LoadScreens folder/namespace.
Moves LoadWidgetAtGameStart to Traits/World.
2014-12-11 23:21:34 +01:00
reaperrr
75b91af023 TimedUpgradeBar moved to Traits/Render 2014-12-11 23:21:33 +01:00
reaperrr
aadceb085b Renames RallyPoint effect to RallyPointIndicator 2014-12-11 23:21:32 +01:00
reaperrr
ffca040c47 Moves traits from Common and Power namespaces to Common.Traits namespace 2014-12-11 23:21:31 +01:00
reaperrr
9a1e110481 Move some Render traits to Mods.Common 2014-12-11 23:10:06 +01:00
reaperrr
88c119ebba Merge pull request #7106 from penev92/bleed_moveFiles
Move Upgrades and Prerequisites from Mods.RA to Mods.Common
2014-12-11 22:34:58 +01:00
Matthias Mailänder
6e6b1fc452 fix an oversight in #7081 2014-12-11 20:49:03 +01:00
Ian T. Jacobsen
f62a9b4f8a Changed parens
Changed parens
2014-12-11 13:16:14 +00:00
obrakmann
c8ad2d4911 Merge pull request #7093 from RoosterDragon/frozen-stream
Make FrozenActorsInBox a streaming enumerable.
2014-12-11 00:10:40 +01:00
obrakmann
2d5b41338e Merge pull request #7091 from RoosterDragon/buffer-copy-palettes
Block copy palettes
2014-12-10 22:57:37 +01:00
obrakmann
3b0a725c23 Merge pull request #7067 from WolfGaming/AttackMove
Fix: AttackMove moving when within range
2014-12-10 22:07:50 +01:00
Matthias Mailänder
b32861c832 disallow bots on Hopes Anchor 2014-12-10 20:04:13 +01:00
Ian T. Jacobsen
38556c7014 Prevent divide by zero 2014-12-10 17:14:41 +00:00
WolfGaming
a155c7b7ac Fixes AttackMove moving even if an enemy is within range. 2014-12-10 13:28:10 +00:00
reaperrr
fb6b9b8be5 Merge pull request #7085 from Mailaender/d2k-clock
Fixed color and overlap glitches in the Dune 2000 build palette
2014-12-10 13:13:18 +01:00
Chris Forbes
d72dfe30e1 Merge pull request #6993 from Mailaender/server-browser-colors
Color coded the server browser and added a filter for password protected games
2014-12-10 16:30:57 +13:00
penev92
ce2c536a1a Move Upgrades and Prerequisites 2014-12-10 00:07:07 +02:00
obrakmann
af0be2f592 Merge pull request #7042 from Mailaender/chronosphere-owner-shroud
Fixed teleporter check the target instead of the initiating owner shrouds
2014-12-09 21:09:32 +01:00
Matthias Mailänder
4be6b51c58 save a trait lookup 2014-12-09 20:31:34 +01:00
Oliver Brakmann
ac1e7a7352 check shroud against the initiating owner when teleporting
fixes #6999
2014-12-09 20:31:33 +01:00
Matthias Mailänder
253dfcac29 split SimpleTeleport into it's own file 2014-12-09 20:31:33 +01:00
reaperrr
8f076131c8 Merge pull request #7090 from Mailaender/d2k-infantry-noidle-stand
Fixed infantry without idle animation never returning to stand
2014-12-09 20:08:10 +01:00
Matthias Mailänder
f56876cd23 Merge pull request #7036 from penev92/bleed_moveFiles_1
Moved several render traits from Mods.RA to Common
2014-12-09 19:53:27 +01:00
ScottNZ
39c10e76e1 Fix Parachutable to work for tank drops 2014-12-10 00:37:35 +13:00
penev92
09350528fd Moving renders
Remove Traits.Render
2014-12-09 01:29:25 +02:00
obrakmann
fbddff3a75 Merge pull request #7088 from Gishten/taskbranch-7083
Fix aircraft fly endlessly in a circle when ordered to attack inside own...
2014-12-08 09:57:32 +01:00
Jonathan Gustafsson
d7f321e04d Fix aircraft fly endlessly in a circle when ordered to attack inside own turning radius 2014-12-08 07:41:10 +01:00
Chris Forbes
eec4f7171a Merge pull request #7057 from pchote/celllayerupdates
Improve radar rendering performance
2014-12-08 14:09:09 +13:00
Chris Forbes
522c63ff58 Merge pull request #7081 from Mailaender/ignore-missing-npc-objectives
Removed the need to give NPCs fake objectives to properly end the game
2014-12-08 14:05:59 +13:00
RoosterDragon
1116f578a3 Make FrozenActorsInBox a streaming enumerable.
Following the same layout as ActorsInBox, this streams the enumerable internally making it cheaper to call if only part of it is required, and also avoids building an intermediate list.
2014-12-07 21:36:56 +00:00
RoosterDragon
8c2fdb9097 Add CopyToArray method for IPalette.
By allowing a palette to be copied to an array, a speedup can be gained in HardwarePalette since palettes can be block copied using native magic rather than having to copy them item by item. We transpose the buffer in HardwarePalette in order to allow a contiguous block copy into this buffer, transposing again in the shader to keep everything correct.
2014-12-07 20:46:46 +00:00
Matthias Mailänder
70e1ceaa04 allow TAB to switch team/all chat when nothing is auto-completed 2014-12-07 17:36:55 +01:00
Matthias Mailänder
9bfd82e868 fix infantry without idle animation not returning to stand 2014-12-07 16:39:09 +01:00
Matthias Mailänder
cd6e3291e2 adjust clock.shp to the Dune 2000 icon size
remove artifacts from automatic palette conversions
2014-12-07 11:53:31 +01:00
Matthias Mailänder
a57b7800c0 color code the server browser and filter protected
closes #4495
2014-12-07 08:22:32 +01:00
Paul Chote
51f874fae2 Merge pull request #7033 from Mailaender/d2k-carryall-tweaks
Tweaked spice harvester carryalls
2014-12-07 11:09:55 +13:00
obrakmann
0454d94e77 Merge pull request #6896 from LipkeGu/ai_waepons
[TS] Add Defence buildings to the AI
2014-12-06 22:59:37 +01:00
Paul Chote
400cfb9713 Merge pull request #6904 from LipkeGu/fix_log_path_prefix
fix LogPathPrefix
2014-12-07 10:29:19 +13:00
obrakmann
01b44f0478 Merge pull request #7079 from Mailaender/mobile-cursor
Unhardcoded and self-documented the mobile cursor definitions
2014-12-06 21:25:01 +01:00
Matthias Mailänder
d319a8f506 split Einstein and Tanya survival objectives for clarity
fixes #7068
2014-12-06 21:04:48 +01:00
Matthias Mailänder
e16bc064a0 fix the end game dialog not showing which objectives failed
- don't mark everything as failed just because one objective did
- remove fake objectives workarounds for non-playable factions
2014-12-06 21:04:46 +01:00
Matthias Mailänder
f246475b81 Merge pull request #7065 from reaperrr/magenta-fix
Revive magenta cnc desert tiles for compatibility reasons
2014-12-06 21:01:37 +01:00
Matthias Mailänder
486376b56a Merge pull request #7045 from Gishten/bleed
Closes #6989
2014-12-06 20:54:50 +01:00
Matthias Mailänder
2ae93f44aa move carryall to it's own aircraft queue 2014-12-06 20:31:15 +01:00
Matthias Mailänder
74d22f4db2 unhardcode the cursor definitions
closes #7074
2014-12-06 19:01:10 +01:00
Jonathan Gustafsson
c5b2c747f8 Vehicles can't move to nearby walled tile #6989 2014-12-06 15:01:17 +01:00
Matthias Mailänder
e1a441b7f3 use official Travis csharp support 2014-12-06 08:50:07 +01:00
obrakmann
de28df2c41 Merge pull request #7049 from WolfGaming/FixUpgradeCrash
Added missing stance check.
2014-12-05 21:26:04 +01:00
Paul Chote
ea05e06290 Merge pull request #7038 from Mailaender/packaging-tweaks
Reduced the Travis dependencies and adapted the installation instructions
2014-12-05 19:58:43 +13:00
obrakmann
7a91e7937a Merge pull request #7018 from atlimit8/PoisonedByTiberiumByUpgrade
Control whether actor is poisioned by resource through the use of upgrades.
2014-12-04 21:44:20 +01:00
obrakmann
e5c4ae28de Merge pull request #6768 from atlimit8/PowerByUpgrade
Add Upgrade support to Power/CanPowerDown
2014-12-04 21:26:36 +01:00
atlimit8
92779cc496 Support multiple Power traits 2014-12-04 14:19:50 -06:00
atlimit8
47357addeb Add Upgrade support to Power/CanPowerDown 2014-12-04 04:12:21 -06:00
atlimit8
4646e8fb32 Control whether actor is poisioned by resource (Tiberium) through the use of upgrade(s) 2014-12-04 04:00:39 -06:00
Paul Chote
af9a74ddd4 Optimise actor radar rendering for another significant perf win. 2014-12-04 21:18:45 +13:00
Paul Chote
5e402e95cb Update only dirty radar pixels and refresh every tick. 2014-12-04 21:18:45 +13:00
Paul Chote
e064593961 Add a CellEntryChanged event to CellLayer. 2014-12-04 21:18:45 +13:00
Paul Chote
ab4a8be66e Store the radar layers in a single buffered sheet. 2014-12-04 21:18:44 +13:00
reaperrr
5cb198829b Revive magenta desert tiles for compatibility reasons 2014-12-03 22:03:13 +01:00
obrakmann
ae992d1403 Merge pull request #7043 from reaperrr/cnc-tileset-fix
Added map editor categories to TD tilesets
2014-12-03 21:37:10 +01:00
obrakmann
8886df9837 Merge pull request #6979 from reaperrr/ra-reorg02
Moved various RA traits into Traits namespace & folders
2014-12-03 21:28:11 +01:00
reaperrr
e575cc0864 Adds editor categories to TD tilesets
Removes magenta desert tiles
2014-12-03 21:23:09 +01:00
reaperrr
7470391c5d Move RA World traits, FrozenUnderFog Modifier and various other traits into Traits 2014-12-03 12:52:17 +01:00
obrakmann
7c44110fb0 Merge pull request #6884 from MustaphaTR/ra-ai
RA - Updated AI
2014-12-02 21:39:50 +01:00
obrakmann
ff2ffa8ec8 Merge pull request #6890 from Mailaender/document-build-time-value
Documented various traits
2014-12-01 20:53:38 +01:00
WolfGaming
22ab93b549 Added missing stance check. 2014-12-01 09:57:24 +00:00
Matthias Mailänder
2e33d12135 Merge pull request #7046 from penev92/bleed_removeChronoshiftableTraitFromTD
Remove Chronoshiftable trait from TD mod vehicles
2014-11-30 23:03:03 +01:00
penev92
4a61bb838f Remove Chronoshiftable trait from TD mod 2014-11-30 23:20:56 +02:00
Matthias Mailänder
5361b920ca document various traits 2014-11-30 19:08:44 +01:00
Matthias Mailänder
43f4e3f5c3 document "Value" 2014-11-30 16:53:32 +01:00
Matthias Mailänder
93ef16d657 Merge pull request #7032 from RoosterDragon/less-makearray
Change some Exts.MakeArray calls into Enumerable.Range.
2014-11-30 12:21:11 +01:00
Matthias Mailänder
34bedeb71f split Hovers from WithShadow
fixes #4508
2014-11-30 10:54:36 +01:00
Matthias Mailänder
6ecc6d67cd fix overlapping shadows 2014-11-30 10:54:36 +01:00
Matthias Mailänder
bfcc52c871 enable high tech factory welding 2014-11-30 10:37:58 +01:00
Matthias Mailänder
003838de3f make carryalls initially lift-off from high tech factories 2014-11-30 10:37:58 +01:00
Matthias Mailänder
e910e8bec4 add lore to the description 2014-11-30 10:37:58 +01:00
Matthias Mailänder
5402993930 document Makefile changes 2014-11-30 09:50:50 +01:00
Matthias Mailänder
05bc9e5a7a native dependencies are not required during the build 2014-11-30 09:50:39 +01:00
Matthias Mailänder
9d2411a600 Merge pull request #6950 from pchote/retire-packaging
Closes #6480
2014-11-30 09:47:10 +01:00
Paul Chote
97e5473126 Remove linux native libraries and automate configure. 2014-11-30 10:20:24 +13:00
Paul Chote
c4967db0cc Remove native code from deb packages. 2014-11-30 09:34:54 +13:00
Paul Chote
260c36239b Remove automated rpm and arch packaging.
See #6480 for the reasoning.
2014-11-30 09:34:54 +13:00
obrakmann
4d1372aaec Merge pull request #7013 from atlimit8/ModsCommonScripting
Move the core of OpenRA.Mods.RA.Scripting to OpenRA.Mods.Common.Scripting
2014-11-29 18:13:18 +01:00
obrakmann
0dd7d08974 Merge pull request #6756 from RoosterDragon/release-more-buffers
Release more sheet buffers
2014-11-29 17:47:06 +01:00
Matthias Mailänder
422cc97cec Merge pull request #7009 from obrakmann/fix7000_e3_close_range_fix
Add min range to bazookas
2014-11-29 17:37:49 +01:00
Matthias Mailänder
272682e53e Merge pull request #7010 from obrakmann/fix6990_cargo_on_radar
Do not show cargo on radar map
2014-11-29 16:08:57 +01:00
RoosterDragon
c2d86557f1 Use more locking to improve thread-safety in Sheet. 2014-11-29 12:04:51 +00:00
RoosterDragon
c2b7d9ca5b Release sheet buffers in SequenceProvider and MapCache.
The buffers in SequenceProvider can be freed if Preload is called, since we know everything is loaded. A SequenceProvider is created for each TileSet is use so this saves memory for however many tilesets had been used in the game. This will be at least one for the shellmap, and often more.

The MapCache loading thread is kept alive for 5 seconds after it last generated a map (in anticipation of more requests). Once this time expires the thread is allowed to die, as it is unlikely there will be more requests in the short term. At this time it is ideal to force the changes to be committed to the texture so we can release the buffer. As well as marking the buffer for release, we must access the texture to force the changes stored in the buffer to be written to the texture, after which the buffer can be reclaimed.

Additionally, when starting the MapCache loading thread we must ensure the buffer is created from the main thread since it may query the texture object which has thread affinity. After that the buffer may be modified freely on the loading thread until released.
2014-11-29 12:04:51 +00:00
RoosterDragon
a6f5a21ed4 Made Sheet.Texture into Sheet.GetTexture() since we will want to call it for side-effects.
Do the same for Sheet.Data since it has the side effect of generating a buffer.
2014-11-29 12:04:50 +00:00
RoosterDragon
ff16690b86 Lazily generate buffer in Sheet.
The managed byte buffer is created on demand, meaning a newly allocated sheet will not waste memory holding onto the buffer until some changes are actually required to be written. This avoids a newly allocated sheet wasting memory on buffers that do not differ from their backing texture.
2014-11-29 12:04:00 +00:00
obrakmann
e6852e2b50 Merge pull request #6780 from MatthijsBenschop/d2k-caryall
D2K: Implement automatic Carryall
2014-11-29 12:38:39 +01:00
Matthijs Benschop
a3195f21e5 Add myself to Authors 2014-11-29 12:17:20 +01:00
Matthijs Benschop
2d380c64bd Implementation of the automated D2k Carryall
Closes #2246
2014-11-29 12:17:11 +01:00
Paul Chote
71a8815ffb Merge pull request #6760 from atlimit8/RepairableBuildingByUpgrade
Repairable building by upgrade
2014-11-29 22:16:24 +13:00
Paul Chote
84a8d6ba9f Merge pull request #6745 from atlimit8/SellableByUpgrade
Upgrade support for Sellable
2014-11-29 22:08:29 +13:00
Paul Chote
da4599f621 Merge pull request #6638 from DeadlySurprise/tsVqa
Tiberian Sun .vqa support
2014-11-29 22:01:28 +13:00
RoosterDragon
dc2e44da36 Change some Exts.MakeArray calls into Enumerable.Range.
Avoid creating some arrays where sequences will suffice.
2014-11-29 02:20:42 +00:00
atlimit8
9ddf6dc36c Added RepairableBuildingInfo.CancelWhenDisabled 2014-11-27 17:55:35 -06:00
atlimit8
3c79a9d875 Added upgrade support to RepairableBuilding 2014-11-27 16:28:45 -06:00
obrakmann
6ebaebd1d1 Merge pull request #6878 from Mailaender/captureable-flag
Added a captureable flag
2014-11-27 22:52:09 +01:00
atlimit8
1d631d6980 Added Upgrade support to Sellable 2014-11-27 12:08:14 -06:00
Mustafa Alperen Seki
3aea3faa8e Updated RA AI 2014-11-27 17:21:41 +02:00
atlimit8
91b5ac5070 Move the core of OpenRA.Mods.RA.Scripting to OpenRA.Mods.Common.Scripting 2014-11-26 15:49:16 -06:00
obrakmann
60cf2d2cae Merge pull request #6750 from atlimit8/ITraitDisabled
Added IDisabledTrait & UpgradableTrait with upgrade levels support
2014-11-26 20:21:15 +01:00
atlimit8
bbd54cb32f Added IDisabledTrait & rewrote upgrade code using a level-based approach.
Upgradeable traits are notified whenever an upgrade of their declared types are granted or revoked.  The traits maintain their own internal level counter, which is then used to enable or disable the trait functionality.  A trait can register for multiple upgrade types which then all affect the internal level counter.

	IDisabledTrait for identifying (and filtering) disabled traits
	UpgradableTrait provides an abstract base for traits to support upgrade levels
	Added IDisabledTrait support to GlobalButtonOrderGenerator

	Includes rework by pchote with alterations.
2014-11-26 05:45:26 -06:00
Oliver Brakmann
867f7f777e Do not show cargo on radar map
Fixes #6990
2014-11-25 23:08:26 +01:00
Oliver Brakmann
4956bc9213 Add min range to bazookas
Fixes #7000
2014-11-25 22:08:33 +01:00
Chris Forbes
76cf5b8b98 Merge pull request #6995 from reaperrr/buildpal-tab-desc
Added description to ChooseBuildTabOnSelect
2014-11-24 09:30:05 +13:00
reaperrr
7240f8db9f Adds description to BuildPaletteWidget. 2014-11-23 18:14:02 +01:00
reaperrr
aad6ad00a1 Adds description to ChooseBuildTabOnSelect 2014-11-23 18:13:35 +01:00
Matthias Mailänder
f263579158 Merge pull request #6934 from abcdefg30/survival01
Ported Survival01 to Lua
2014-11-23 15:17:42 +01:00
Matthias Mailänder
7ad2a57517 Merge pull request #6927 from huwpascoe/actor-fixup
Actor properties consistency improved
2014-11-23 14:53:33 +01:00
Matthias Mailänder
b52dbe6c07 Merge pull request #6988 from RoosterDragon/enum-memory
Reduce enum memory
2014-11-23 14:48:20 +01:00
abcdefg30
b492c412cd Added "missiontimer initialized" speech notification to allies02 2014-11-23 13:32:44 +01:00
abcdefg30
33eeee4680 Added OnKilledOrCaptured and OnAllKilledOrCaptured 2014-11-23 13:32:40 +01:00
abcdefg30
e29adf5f4f Added proximity triggers 2014-11-23 13:31:39 +01:00
abcdefg30
0899b26874 Added some power functions 2014-11-23 13:31:38 +01:00
abcdefg30
71fa6b2aed Fixed a bug in Intervention
https://github.com/OpenRA/OpenRA/pull/5483#issuecomment-44781904
broke the game.
2014-11-23 13:31:36 +01:00
abcdefg30
19713a19f6 Added support for selecting mission difficulty 2014-11-23 13:31:35 +01:00
abcdefg30
c5978d0dbe Ported Survival01 to lua 2014-11-23 13:31:24 +01:00
obrakmann
13ff5ddf6a Merge pull request #6986 from chrisforbes/minimal-neighbors
Prune neighbor sets based on direction we arrived at a cell
2014-11-23 12:42:54 +01:00
Matthias Mailänder
279e425431 Merge pull request #6983 from huwpascoe/server-browser
Cleaned up the server browser
2014-11-23 11:26:03 +01:00
Chris Forbes
68309af233 Remove enemy territory avoidance in FindResources.
This is called from the inner loop of the pathfinder, so cannot afford
to do actor queries etc. It also didn't have the desired effect --
harvesters still wander through enemy territory even with the bias.

Just rip it out for a perf win.
2014-11-23 15:09:48 +13:00
Chris Forbes
f4e5c63408 Pathfinder: Only consider useful neighbors
Depending on the direction we came from, many neighbors are completely
useless. This is the first step to implementing the ideas in 'Jump Point
Search'

V2: Added comment describing what the array is for.
2014-11-23 15:09:48 +13:00
Chris Forbes
c470945db7 Remove vestigial direction-sorting machinery from PathSearch 2014-11-23 15:09:48 +13:00
huwpascoe
d313317cf5 Cleaned up the server browser 2014-11-22 21:55:55 +00:00
RoosterDragon
35da7d8a6e Make the underlying types of TextureChannel and BlendMode enums a byte to save memory. 2014-11-22 18:12:46 +00:00
obrakmann
20fdd1ccb5 Merge pull request #6795 from Mailaender/gdi03-new-lua
Ported mission GDI03 to the new Lua API
2014-11-22 16:37:17 +01:00
MicroGraphics
91d79d4f42 Added "Capture-the" Flag 2014-11-22 16:23:48 +01:00
abcdefg30
c62d33c4bb let nod attack from different directions 2014-11-22 14:59:09 +01:00
Matthias Mailänder
2dad3b5a59 fix harvesters crushing the sand bags 2014-11-22 14:59:09 +01:00
Matthias Mailänder
a29a16b921 port gdi03 to the new Lua API 2014-11-22 14:59:08 +01:00
Matthias Mailänder
8245b818f8 remove lonely tab 2014-11-22 14:57:16 +01:00
huwpascoe
a660bb95b5 Actor properties consistency improved 2014-11-21 02:44:05 +00:00
Matthias Mailänder
6a425b8636 Merge pull request #6972 from pchote/thirdparty-readme
Closes #6863
2014-11-20 20:11:42 +01:00
Guido L.
0806cca133 Prevent the creation of Logfiles in the Game Directory 2014-11-20 12:59:02 +01:00
Chris Forbes
8ba2137af0 Merge pull request #6978 from pchote/font-licenses
Attribute GNU freefont in the credits.
2014-11-20 18:42:23 +13:00
Paul Chote
a383e5ea9e Add a readme file with the thirdparty dll sources.
Closes #6863.
2014-11-20 18:32:42 +13:00
Paul Chote
692e4af4aa Attribute GNU freefont in the credits. Closes #6862. 2014-11-20 18:19:05 +13:00
obrakmann
c7d418dfb0 Merge pull request #6963 from reaperrr/ra-reorg01
Initial step towards reorganising namespace/folder structure of Mods.*
2014-11-19 22:05:10 +01:00
Chris Forbes
69d035f4db Merge pull request #6973 from Phrohdoh/fix-gitconfig
Fix global git config in update-wiki.sh
2014-11-20 08:26:54 +13:00
Taryn Hill
95a2ebf72d Fix global git config in update-wiki.sh 2014-11-19 07:24:53 -06:00
DeadlySurprise
c504383d92 Changed aspect ratio implementation 2014-11-18 22:35:34 +01:00
DeadlySurprise
cdb05537f3 Added tiberian sun vqa file support 2014-11-18 22:35:33 +01:00
Matthias Mailänder
96497b6bde Merge pull request #6966 from DeadlySurprise/vqa_crash_fix
Fixes #4224
2014-11-18 22:07:55 +01:00
DeadlySurprise
b7e3dfc665 Fixed vqa crashes 2014-11-18 18:42:38 +01:00
reaperrr
f3f051fd46 Move Common Modifiers and PaletteEffects into Traits space 2014-11-18 18:10:59 +01:00
Matthias Mailänder
6774435ef4 Merge pull request #6962 from obrakmann/split_wiki_docs
Wiki: keep separate Trait and Lua API docs for release and playtest
2014-11-18 06:57:58 +01:00
reaperrr
127969d014 Move Air activities and traits to Activities\Air and Traits\Air, respectively 2014-11-17 12:56:18 +01:00
reaperrr
797ac17e61 Reorganize Mods.Cnc 2014-11-17 12:56:17 +01:00
reaperrr
1a032d6f6c Reorganize Mods.D2k 2014-11-16 17:03:52 +01:00
reaperrr
80279dc304 Reorganize Mods.TS 2014-11-16 17:00:41 +01:00
Oliver Brakmann
7359af8667 Wiki: keep separate Trait and Lua API docs for release and playtest 2014-11-16 10:41:47 +01:00
Paul Chote
5c4d49394d Merge pull request #6945 from Phrohdoh/madtank-fix
MadTank deployed teleportation fix.
2014-11-16 17:31:46 +13:00
Paul Chote
6b90d3b9d6 Merge pull request #6960 from obrakmann/fix_buggy_mouse_orders
Fix broken orders when actors are selected
2014-11-16 17:17:06 +13:00
Taryn Hill
31b24b4802 Implement (new) IPreventsTeleport in MadTank.
Prevents MadTank from being teleported after deployment.
2014-11-15 20:55:44 -06:00
obrakmann
8ac2f7fce3 Merge pull request #6957 from ScottNZ/bleed
Set passenger facings when they are unloading
2014-11-15 23:54:15 +01:00
ScottNZ
60a197f8d7 Set PassengerFacing to 0 for ra/td lst 2014-11-16 10:53:16 +13:00
Paul Chote
a3c5747246 Merge pull request #6959 from Mailaender/travis-wiki-playtest
Fixed Travis updating the wrong wiki page
2014-11-16 09:32:46 +13:00
Oliver Brakmann
4e3f565354 Fix broken orders when actors are selected.
Fixes an oversight in #6949.
2014-11-15 21:00:52 +01:00
Matthias Mailänder
1e97accf90 not new, but only Lua API 2014-11-15 20:40:02 +01:00
Matthias Mailänder
834538b336 not just Traits anymore 2014-11-15 20:40:02 +01:00
obrakmann
2c3b812b26 Merge pull request #6949 from pchote/retire-classic-mouse
Retire classic mouse orders
2014-11-15 19:38:32 +01:00
Matthias Mailänder
8005c98143 Merge pull request #6958 from obrakmann/fix6956
Fix shell script syntax errors
2014-11-15 19:10:18 +01:00
Oliver Brakmann
1db0d55aa4 Fix shell script syntax errors
Fixes #6956
2014-11-15 10:43:51 +01:00
Matthias Mailänder
bad8f70210 Merge pull request #6921 from reaperrr/common-traits01
Moved various traits to Mods.Common
2014-11-15 09:41:36 +01:00
ScottNZ
eea978a4ae Set passenger facings when they are unloading 2014-11-15 19:51:14 +13:00
Matthias Mailänder
5bf3d9879c Merge pull request #6948 from pchote/revert-production-desync
Closes #6910
Closes #6925
Closes #6933
2014-11-15 00:15:25 +01:00
Paul Chote
c8ed0fc75c Fix the hotkey panel margins. 2014-11-15 09:46:31 +13:00
Paul Chote
f5c09121ad Remove buggy classic mouse orders. Closes #3153. 2014-11-15 09:40:25 +13:00
Paul Chote
563efd678a Revert "DevEnableTech now displays from all factions"
This reverts commit 5d5f302d07.
2014-11-15 09:20:04 +13:00
reaperrr
5213aef105 Move Palette traits into Traits\World 2014-11-14 01:01:47 +01:00
reaperrr
0cbcae93a9 Move Valued, CustomSellValue and CustomBuildTimeValue to Common 2014-11-14 01:01:46 +01:00
reaperrr
5e866b862b Move Burns from RA to Common, move RallyPoint to Traits folder 2014-11-14 01:01:44 +01:00
reaperrr
41f3ee1080 Move ShroudPalette, ShroudRenderer and StartGameNotification to Common
Move World into Traits folder
2014-11-14 00:59:17 +01:00
reaperrr
3372914216 Move some traits from RA.Buildings to Common 2014-11-14 00:33:30 +01:00
obrakmann
455d4dc97f Merge pull request #6917 from reaperrr/common-11
Move palette stuff + nuke effect + Immobile trait to Mods.Common
2014-11-13 20:52:21 +01:00
obrakmann
0ae0669d4b Merge pull request #6856 from MustaphaTR/d2k-crate-explode
D2k - More Crate PowerUps
2014-11-13 20:03:51 +01:00
Taryn Hill
ee35e1b2ae Merge pull request #6770 from atlimit8/PassengerProvidesUpgrade
Passengers can provide upgrade(s) to transport.
2014-11-12 19:54:59 -07:00
obrakmann
22c2dc56fe Merge pull request #6931 from Happy0/mono310_workaround
Workarounds for a bug in certain versions of Mono (3.10 and certain versions of 3.8) which stops OpenRA building
2014-11-12 20:45:20 +01:00
Gordon Martin
04cbea3792 Desugaring a couple of ternary expressions which prevented OpenRA building on Mono 3.10 and certain versions of the 3.8 series due to a bug in Mono: https://bugzilla.xamarin.com/show_bug.cgi?id=23319 2014-11-11 21:43:33 +00:00
obrakmann
b37a90c3e6 Merge pull request #6902 from Mailaender/geoip-2.1.0
Update to MaxMind GeoIP2 .NET version 2.1.0
2014-11-11 20:08:29 +01:00
Chris Forbes
551000104d Merge pull request #6905 from LipkeGu/Dont_query_traits_on_dead_units
AnyUnitsAt: Ignore Units which are Destroyed
2014-11-12 08:06:58 +13:00
Chris Forbes
08f50811b0 Merge pull request #6892 from MustaphaTR/d2k-stealth-raider
D2k - Shortened Stealth Raider Code
2014-11-12 08:05:32 +13:00
obrakmann
8dba65cff0 Merge pull request #6930 from baxxxster/bleed
Update AUTHORS, Added Baxxster
2014-11-11 20:03:45 +01:00
Mustafa Alperen Seki
008a416fd8 Update misc.yaml 2014-11-11 09:52:10 +02:00
Mustafa Alperen Seki
6d65519788 Update misc.yaml 2014-11-11 09:30:56 +02:00
Glenn Martin Jensen
164badf4bc Update AUTHORS 2014-11-11 01:28:13 +01:00
Matthias Mailänder
a2f776759b Merge pull request #6912 from reaperrr/ts-tibcolor
Tweak TS tiberium colors and add shadow to blue tib crystal
2014-11-10 21:02:39 +01:00
Paul Chote
7c2cb601f5 Merge pull request #6872 from Mailaender/check-map-rules
Fixed Fort Lonestar and Drop Zone maps and added a test to check map rule loading
2014-11-11 08:35:56 +13:00
Matthias Mailänder
d418afaab9 don't re-use regular multiplayer crates
fixes #6869
2014-11-10 20:20:10 +01:00
Matthias Mailänder
5775fa5e9f add a new lint check for map rule loading 2014-11-10 20:20:05 +01:00
Paul Chote
713ddb7b9c Merge pull request #6718 from huwpascoe/tilebuilder
Fixed DPI scaling issues with tilebuilder
2014-11-10 22:25:35 +13:00
obrakmann
724b1d3f45 Merge pull request #6919 from Mailaender/voxel-barrel-requires
Fixed a crash in WithVoxelBarrel
2014-11-09 13:05:30 +01:00
Matthias Mailänder
d0e908ef91 add missing requires
closes #6914
2014-11-09 07:58:39 +01:00
reaperrr
2043c31e05 Move most palette-related stuff + nuke effect + Immobile trait to Mods.Common 2014-11-09 04:17:02 +01:00
Guido L.
ae4ee0926a AnyUnitsAt: Ignore destroyed Units 2014-11-09 03:15:33 +01:00
reaperrr
4f5e4b26b5 Add shadow to blue tiberium crystal 2014-11-09 03:14:20 +01:00
reaperrr
3a362e5e2f Tweak blue tiberium color 2014-11-09 02:56:11 +01:00
Scott
961782cb21 Merge pull request #6816 from steelphase-forks/bleed-ps-make-version
Update make version to check for git.
2014-11-09 13:17:30 +13:00
steelphase
07d77871d9 Update make to not have issues with pausing at the end. 2014-11-08 19:11:24 -05:00
steelphase
db2a72b475 Update make version to check for git.
This will prevent the version from being set to null if git isn't in the
path.
2014-11-08 19:11:17 -05:00
obrakmann
93bde9f511 Merge pull request #6900 from pchote/fix-gameplay-skipping
Force at least one render per tick during regular gameplay.
2014-11-08 22:43:36 +01:00
obrakmann
11a5a658e2 Merge pull request #6906 from reaperrr/common-10
Moved LoadScreens and some Warheads to Mods.Common
2014-11-08 22:23:44 +01:00
reaperrr
3743fb35a3 Tweaks green tiberium color 2014-11-08 20:47:38 +01:00
Matthias Mailänder
01708b60a7 Merge pull request #6901 from pchote/heightmaps-part-two
Implement terrain heightmaps
2014-11-08 18:22:57 +01:00
atlimit8
1c473ecfac Passengers can grant upgrades to transport. 2014-11-08 02:14:13 -06:00
reaperrr
52bb0e8c6b Move some Warheads to Mods.Common 2014-11-07 15:15:47 +01:00
reaperrr
0807b7009b Move NullLoadScreen, DefaultLoadScreen and LoadWidgetAtGameStart to Mods.Common 2014-11-07 15:13:58 +01:00
Matthias Mailänder
ecc7e44b2e update to MaxMind GeoIP2 .NET version 2.1.0
https://github.com/maxmind/GeoIP2-dotnet/releases/tag/v2.1.0
2014-11-07 09:34:49 +01:00
Matthias Mailänder
2ab8b28bcf Merge pull request #6898 from OpenRA/common-09
Moved remaining two ServerTraits and some Modifiers to Mods.Common
2014-11-07 08:48:40 +01:00
Paul Chote
cfddd47864 Add a new test map. 2014-11-07 19:18:34 +13:00
Paul Chote
118275b376 Add terrain geometry visualisation. 2014-11-07 19:18:34 +13:00
Paul Chote
18f65552a1 Account for terrain height in Viewport. 2014-11-07 19:14:02 +13:00
Paul Chote
55d9e71ff3 Force at least one render per tick during regular gameplay.
Partially reverts #5850, as this feature is a serious usability regression when controlling units. Fixes #6867.
2014-11-07 18:58:56 +13:00
Paul Chote
6527ab21d7 Improve voxel shadow rendering. 2014-11-07 18:18:41 +13:00
Paul Chote
60420340fb Add height map support. 2014-11-07 18:18:41 +13:00
Guido L
70e4462c9f [TS] Add Defence buildings to the AI 2014-11-07 02:04:11 +01:00
reaperrr
cd00fdeacc Moves the remaining two ServerTraits and 3 out of 4 Modifiers to Mods.Common 2014-11-07 00:05:25 +01:00
Matthias Mailänder
3dd93c7ff6 Merge pull request #6889 from atlimit8/ModsCommon-SystemCore
Add System.Core reference to OpenRA.Mods.Common.csproj for Linq
2014-11-06 23:31:57 +01:00
obrakmann
603d700382 Merge pull request #6876 from Mailaender/render-perflog
Measure long TickRender in perf.log
2014-11-06 22:05:49 +01:00
Paul Chote
c66c72dc71 Merge pull request #6888 from obrakmann/fix6887_crash_dialog_on_restart
Prevent crash dialog from popping up when the game restarts
2014-11-07 08:15:45 +13:00
Angusm3
7ea176fe02 Add Angusm3 to AUTHORS 2014-11-06 20:02:36 +01:00
Matthias Mailänder
090ab292f7 Merge pull request #6897 from reaperrr/common-power
Moved Power and PowerdownIndicator effect to Mods.Common
2014-11-06 19:24:44 +01:00
reaperrr
477f5aac94 Move Power and PowerdownIndicator effect to Mods.Common 2014-11-06 18:43:00 +01:00
Matthias Mailänder
ac82e3079a Merge pull request #6710 from huwpascoe/depends
Fixes #3160
Fixes #3568
Fixes #4894
Closes #6701
2014-11-06 10:48:17 +01:00
Matthias Mailänder
c10d5c76d2 Merge pull request #6894 from reaperrr/common06
Moved a few start location/spawn traits to Mods.Common
2014-11-06 10:31:19 +01:00
reaperrr
5aec72ce6d Adds Mods.Common usings where necessary. 2014-11-05 20:46:53 +01:00
reaperrr
488af4b4b9 Moves a few start location/spawn traits to Mods.Common. 2014-11-05 20:46:53 +01:00
Matthias Mailänder
89923d4a45 Merge pull request #6855 from pchote/heightmaps-part-one
Add groundwork for heightmapped terrain.
2014-11-05 09:54:38 +01:00
Mustafa Alperen Seki
292eceb655 Shortened Stealth Raider Code 2014-11-05 10:11:46 +02:00
atlimit8
f2a02be972 Add System.Core reference to OpenRA.Mods.Common.csproj for Linq 2014-11-04 16:30:25 -06:00
obrakmann
85b167dfea Merge pull request #6732 from reaperrr/common-05
Moved a few more traits to Mods.Common
2014-11-04 22:31:56 +01:00
Paul Chote
f0eee47e68 Introduce TerrainTemplatePreviewWidget. 2014-11-05 09:39:55 +13:00
Paul Chote
9f1def2840 Convert TS terrain height, ramp, and minimap colors. 2014-11-05 09:39:55 +13:00
Paul Chote
63f5fc8613 Work around the undesired R8 terrain sprite offsets. 2014-11-05 09:39:55 +13:00
Paul Chote
aab9ad5ac0 Load tmp(ts) ExtraData for cliffs etc. 2014-11-05 09:39:55 +13:00
Paul Chote
c3b6f9bef6 Rename TileTemplate -> TerrainTemplateInfo. 2014-11-05 09:39:55 +13:00
Paul Chote
ab2bc789ce TileSet cleanups. 2014-11-05 09:39:54 +13:00
Paul Chote
7d11649fab Add support for per-tile minimap color and height/ramp type. 2014-11-05 09:39:54 +13:00
Oliver Brakmann
64506b856a Prevent crash dialog from popping up when the game restarts
Fixes #6887
2014-11-04 21:35:56 +01:00
reaperrr
c4d19b77a4 Moves BlocksBullets, DeathSounds, ActorLostNotification, AnnounceOnBuild and AnnounceOnKill to Mods.Common 2014-11-03 20:34:44 +01:00
obrakmann
e6bf1cafd3 Merge pull request #6875 from Mailaender/build-domain-perf-log
Measure BuildDomains in perf.log
2014-11-03 20:31:20 +01:00
Paul Chote
04b2f004d5 Merge pull request #6796 from Mailaender/soviet-01-lua
Added soviet 01 to the Red Alert campaign
2014-11-04 08:06:28 +13:00
Paul Chote
620c986e9f Merge pull request #6733 from penev92/bleed
Moved RenderSprites.cs from Mods.RA to Common
2014-11-04 07:58:35 +13:00
Paul Chote
bd4c22ba96 Merge pull request #6682 from Mailaender/player-settings-ui
Added player name and color selection to Settings menu
2014-11-04 07:54:49 +13:00
obrakmann
b7ccff4cef Merge pull request #6797 from huwpascoe/nunit
NUnit integration
2014-11-03 19:53:04 +01:00
Matthias Mailänder
8a6c5ea85a add soviet-01 2014-11-03 19:53:02 +01:00
obrakmann
2696f8c963 Merge pull request #6766 from huwpascoe/pq-transform-fix
Fixed ProductionQueue freezing Transform
2014-11-03 19:07:46 +01:00
Matthias Mailänder
ea57fa12f1 Merge pull request #6873 from MustaphaTR/ts-crushable
TS  - Added more crushers.
2014-11-03 08:47:33 +01:00
huwpascoe
56551c29c4 Fixed ProductionQueue freezing Transform 2014-11-02 20:34:44 +00:00
huwpascoe
dfc6ebd3ba Introduced NUnit and some tests. 2014-11-02 20:18:04 +00:00
obrakmann
19c1f4ca99 Merge pull request #6877 from Mailaender/spritefont-perf
Measure SpriteFont in perf.log
2014-11-02 18:18:53 +01:00
obrakmann
c21402530e Merge pull request #6868 from Mailaender/network-code-clean
StyleCop cleanup of the Network code
2014-11-02 18:01:10 +01:00
penev92
623642f9d5 Moved RenderSprites.cs from Mods.RA to Common 2014-11-02 18:33:47 +02:00
Oliver Brakmann
eb9cf40c4c Add ReturnToBase to Lua API 2014-11-02 12:51:18 +01:00
Matthias Mailänder
5e5d784a31 unhardcode and self-document 2014-11-02 12:51:18 +01:00
Matthias Mailänder
0049d08356 remove missing .lua files 2014-11-02 12:51:18 +01:00
Paul Chote
78039bde31 Merge pull request #6848 from Mailaender/fmv-sound-polish
Fixed sound overlapping with full motion video clips
2014-11-02 10:42:14 +13:00
Matthias Mailänder
fb0d5036da beautify comment 2014-11-01 22:16:03 +01:00
Paul Chote
17f3b36f97 Merge pull request #6843 from Mailaender/unpolished-map-cull
Removed maps with visual problems
2014-11-02 09:57:46 +13:00
Matthias Mailänder
b28615c2f6 StyleCop clean Order 2014-11-01 21:50:53 +01:00
Matthias Mailänder
a26a9cc3a2 StyleCop clean GenericSelectTarget 2014-11-01 21:48:09 +01:00
Matthias Mailänder
0a06ae1d76 avoid unneccessary spaces 2014-11-01 21:48:09 +01:00
Matthias Mailänder
3f75ff0e00 StyleCop clean Unitorders 2014-11-01 21:48:09 +01:00
Matthias Mailänder
8e667304aa StyleCop clean SyncReport 2014-11-01 21:48:09 +01:00
Matthias Mailänder
7decbdeae0 StyleCop clean Session 2014-11-01 21:48:09 +01:00
Matthias Mailänder
a4b6ddc836 StyleCop clean ReplayRecorderConnection 2014-11-01 21:48:09 +01:00
Matthias Mailänder
6a5d304f07 StyleCop clean FrameData 2014-11-01 21:46:19 +01:00
Matthias Mailänder
7adacc0477 StyleCop clean Connection 2014-11-01 21:46:19 +01:00
Matthias Mailänder
7b22a01fc0 StyleCop clean OrderIO 2014-11-01 21:46:19 +01:00
Matthias Mailänder
95a4248419 StyleCop clean OrderManager 2014-11-01 21:46:19 +01:00
obrakmann
2b6295608a Merge pull request #6689 from huwpascoe/alltech
DevEnableTech now displays from all factions
2014-11-01 21:02:31 +01:00
Matthias Mailänder
44b485606f StyleCop 2014-11-01 16:36:51 +01:00
Matthias Mailänder
83ed06e015 C#ify 2014-11-01 16:35:42 +01:00
Matthias Mailänder
c7f5b24593 use LoadChar 2014-11-01 16:13:54 +01:00
Matthias Mailänder
cf43581bac measure sprite font performance 2014-11-01 16:13:54 +01:00
Matthias Mailänder
d2eafdffb3 Merge pull request #6866 from Phrohdoh/filecleanup
Clean up some chars.
2014-11-01 15:41:53 +01:00
Matthias Mailänder
10edb7a621 also measure render performance bottle necks
closes #4133
2014-11-01 15:33:03 +01:00
Matthias Mailänder
ce357d5314 measure BuildDomains in perf.log 2014-11-01 15:12:36 +01:00
Mustafa Alperen Seki
5fe090ab7f Added more infantry crushers. 2014-11-01 13:47:34 +02:00
Mustafa Alperen Seki
8b4ed823a3 More Crate PowerUps
Update misc.yaml

Update misc.yaml
2014-11-01 13:44:12 +02:00
Taryn Hill
b8f5786bdb Clean up some chars. 2014-10-30 20:34:56 -06:00
obrakmann
2d88a77849 Merge pull request #6861 from ihptru/utility-fix
fixes crash in minimap generator for some of maps
2014-10-30 21:29:36 +01:00
obrakmann
edb309d2cf Merge pull request #6789 from atlimit8/FixRepairBridgeOrderTargeter
Fixed RepairBridgeOrderTargeter & hut logic - it now ignores dangling bridges
2014-10-30 21:25:14 +01:00
ihptru
f971ff11ca fixes crash in minimap generator for some of maps 2014-10-30 22:35:01 +03:00
atlimit8
1ab5b76a3e Fixed RepairBridgeOrderTargeter & hut logic - it now ignores dangling bridges & rejects bridges under repair
Closes #4354
2014-10-30 12:55:20 -05:00
obrakmann
e257b5316c Merge pull request #6456 from Mailaender/remove-belowunits
Removed the BelowUnits trait
2014-10-29 23:49:49 +01:00
huwpascoe
7d973f0192 Added missing trait dependency 2014-10-29 20:53:18 +00:00
Matthias Mailänder
ad7208b18d private readonly elsewhere unused variables 2014-10-29 21:38:33 +01:00
Matthias Mailänder
a3baee9d68 remove BelowUnits
closes #3670
2014-10-29 21:38:30 +01:00
huwpascoe
db126ce1b6 Reimplemented TraitsInConstructOrder() 2014-10-29 20:37:14 +00:00
obrakmann
219151f41f Merge pull request #6851 from atlimit8/BuildingCompleteForProduction
Use INotifyBuildComplete for Production & AnnounceOnBuild
2014-10-29 16:38:20 +01:00
Taryn Hill
e5948ba501 Merge pull request #6852 from pchote/fix-modscommon-xbuild
Copy Mods.Common.dll to the correct location after build.
2014-10-28 14:08:16 -06:00
Matthias Mailänder
9612ee7f0f don't play Battle Control Initialized during FMVs 2014-10-28 20:51:56 +01:00
Paul Chote
7ff7935860 Copy Mods.Common to the correct location after build. 2014-10-29 07:44:40 +13:00
atlimit8
6452b17c82 Made AnnounceOnBuild implement INotifyBuildComplete. 2014-10-28 01:55:18 -05:00
atlimit8
2ad1a5d8dd Extend using INotifyBuildComplete to Production. 2014-10-28 01:54:39 -05:00
Matthias Mailänder
4f919f5f4b remove Year 501
closes #6447
2014-10-28 07:37:10 +01:00
Matthias Mailänder
6f5e25f608 remove map Brimstone 2014-10-28 07:37:10 +01:00
obrakmann
7d98822dcd Merge pull request #6842 from Mailaender/map-scrap
Removed several maps from the Red Alert mod
2014-10-27 21:45:28 +01:00
Matthias Mailänder
18176b1980 remove Convergence and River War maps 2014-10-27 07:00:53 +01:00
obrakmann
0f50d0bf49 Merge pull request #6847 from pchote/fix-utility
Fix the --png utility command.
2014-10-26 22:09:03 +01:00
Paul Chote
646b66e4c3 Merge pull request #6844 from Mailaender/new-d2k-maps
Added new maps to the Dune 2000 mod
2014-10-27 09:28:08 +13:00
Paul Chote
55c4b37412 Merge pull request #6841 from Mailaender/hopes-anchor
Added a new map Hopes Anchor
2014-10-27 09:21:56 +13:00
Paul Chote
87c02adcb5 Fix the --png utility command. Closes #6845. 2014-10-27 09:17:29 +13:00
Matthias Mailänder
5d5bf1459f added Vladimir's Folly
http://resource.openra.net/maps/1639/
2014-10-26 19:45:30 +01:00
Matthias Mailänder
8d6d09a394 added Desert Twister by @psydev
http://resource.openra.net/maps/990
2014-10-26 15:54:02 +01:00
Matthias Mailänder
282f23b082 added Oasis Conquest
http://resource.openra.net/maps/1470
2014-10-26 15:53:45 +01:00
Matthias Mailänder
6f69bf198d remove maps
closes #5458
2014-10-26 15:05:37 +01:00
Matthias Mailänder
9193d9edce add new map Hopes Anchor by @NukemBro
http://resource.openra.net/maps/1368/
2014-10-26 14:50:24 +01:00
Matthias Mailänder
1478822a2f Merge pull request #6836 from pchote/polish-gdi0102
Closes #6757
Closes #6834
2014-10-26 08:02:46 +01:00
Matthias Mailänder
cb7ed7bf61 Merge pull request #6837 from obrakmann/mission-polish
Another mission polish PR
2014-10-26 07:47:47 +01:00
Matthias Mailänder
2215e21def Merge pull request #6740 from Mailaender/tidy-d2k-dll
Tidied the Dune 2000 mod DLL
2014-10-26 07:37:42 +01:00
Paul Chote
99c0d8bd53 Require silos to be captured or destroyed in GDI02. 2014-10-26 13:43:35 +13:00
obrakmann
b9e04211e9 Merge pull request #6838 from pchote/transport-vis-fix
Fix transport passenger shroud revealing
2014-10-26 01:51:41 +02:00
Oliver Brakmann
cb9f186097 Prevent viceroids from appearing in missions 2014-10-26 00:38:32 +02:00
Oliver Brakmann
fd8cd4ddea Enable fog in TD missions 2014-10-26 00:38:32 +02:00
Oliver Brakmann
1a63a0a167 Fix chat sounds overlapping with playing FMV in missions 2014-10-26 00:38:32 +02:00
Oliver Brakmann
90d517a448 Fix crates in gdi04a/b 2014-10-26 00:38:32 +02:00
Oliver Brakmann
7b1ab34392 Make crates not suck
* allow for crates without any associated CrateActions
* allow for crates to not auto-remove
2014-10-26 00:38:31 +02:00
Paul Chote
3eb05ef23e Don’t reveal shroud at the original transport load point. 2014-10-26 10:01:47 +13:00
obrakmann
c0cfacceb1 Merge pull request #6832 from pchote/disable-bogus-sp-maps
Disable missions that define bogus rules.
2014-10-25 22:41:14 +02:00
Paul Chote
6f7d20681b Polish GDI01:
* Insert initial forces via landing craft.
* Remove unbuildable concrete wall from production palette.
* Fix chat sounds and reinforcement notification overlapping FMV.
* Cut down the excessive starting forces to encourage base building.
* Require Silo capture/destruction for victory.
2014-10-26 09:29:34 +13:00
obrakmann
f94b48459f Merge pull request #6835 from pchote/polish-nod01
Polish nod01
2014-10-25 22:25:46 +02:00
Paul Chote
8b66162e99 Fix landing craft reinforcements in GDI01 and GDI02. 2014-10-26 09:21:43 +13:00
Paul Chote
8e4765ca46 Allow integers to bridge to enums. 2014-10-26 09:19:45 +13:00
Paul Chote
69b561b12c Fix transport cargo visibility in GDI01 and GDI02. 2014-10-26 09:19:45 +13:00
Paul Chote
bb3dc06227 Polish Nod01:
- Script initial unit entry.
- Centre the camera on the initial starting point
- Give additional e3 reinforcements to clear the village.
2014-10-26 09:18:54 +13:00
Paul Chote
91854c52fa Catch and display an error if CallLuaFunc throws. 2014-10-26 09:17:12 +13:00
obrakmann
dd03ce02d3 Merge pull request #6804 from steelphase-forks/bleed-debugging-clean
Update UseVSHostingProcess
2014-10-25 22:05:46 +02:00
Oliver Brakmann
f891b626f3 Document another pitfall in the Lua API 2014-10-25 12:45:16 +02:00
obrakmann
93456fd2ab Merge pull request #6825 from huwpascoe/bike
Balancing: Increased BIKE cost to 600
2014-10-24 22:38:50 +02:00
obrakmann
f12738e42f Merge pull request #6748 from abcdefg30/allies03a
Ported allies-03a
2014-10-24 22:21:41 +02:00
Paul Chote
ab80ce8dd8 Disable missions that define bogus rules. Fixes #6818. 2014-10-25 09:17:07 +13:00
abcdefg30
ff8944d288 Ported allies03a 2014-10-24 20:32:47 +02:00
abcdefg30
3091d2c480 Readded tanyas ability to crush vehicles on allies01 2014-10-24 19:37:24 +02:00
abcdefg30
cc97f45ea4 Removed -classic suffix 2014-10-24 19:37:23 +02:00
Matthias Mailänder
442241b6cd fix Exception: Tried logging to non-existant channel debug 2014-10-24 19:37:22 +02:00
Matthias Mailänder
444b5f92c3 add HEALCRATE and inherit from ^Crate 2014-10-24 19:37:22 +02:00
Matthias Mailänder
f188894a53 Merge pull request #6807 from obrakmann/lua-cleanups
Lua cleanups
2014-10-24 18:29:34 +02:00
Matthias Mailänder
9efa0ceab5 Merge pull request #6823 from pchote/fix-shpts-offsets
Closes #6020
2014-10-23 07:13:22 +02:00
Matthias Mailänder
b901395502 Merge pull request #6824 from pchote/external-editor-templates
Fixes #6812
2014-10-23 07:09:11 +02:00
huwpascoe
07f3523bd4 Balancing: Increased BIKE cost to 600 2014-10-23 01:56:11 +01:00
Paul Chote
fda25a56ca Make the legacy editor more robust against invalid templates. 2014-10-23 10:26:36 +13:00
Paul Chote
62c04b2793 Rewrite shp(ts) parsing to avoid offset issues. Fixes #6822. 2014-10-23 08:14:28 +13:00
obrakmann
fa81fde78a Merge pull request #6814 from steelphase-forks/bleed-slider-thumb
Add chrome for slider thumb.
2014-10-22 09:23:58 +02:00
steelphase
8fe7c71b66 Add chrome for slider thumb.
update hardcoded references to chrome.yaml to use public parameters.
2014-10-21 17:14:55 -04:00
Matthias Mailänder
1bed876540 bring back the player name and color to the settings menu
closes #6380
2014-10-21 23:09:39 +02:00
Matthias Mailänder
cfbdebc371 fix inconsistent naming 2014-10-21 23:04:09 +02:00
Matthias Mailänder
337bcac045 name order these properly 2014-10-21 22:25:14 +02:00
Oliver Brakmann
f55af366f2 Remove more references to old Lua API
Fixes #6811
2014-10-21 22:08:06 +02:00
Oliver Brakmann
4b63b6ef2e Whitespace fixes 2014-10-21 22:08:06 +02:00
Oliver Brakmann
d1af36c189 Point out pitfalls in the Lua API documentation 2014-10-21 22:08:06 +02:00
Oliver Brakmann
35ccc79902 Move Utils.CenterOfCell into Map global 2014-10-21 22:08:06 +02:00
Oliver Brakmann
37c5d51f19 Move Utils.Seconds and .Minutes into DateTime global
Also renames Date.IsHalloween to DateTime.IsHalloween
2014-10-21 22:08:06 +02:00
Oliver Brakmann
6a44c265e2 Made gdi04c easier to win and added cell trigger guards 2014-10-21 22:08:06 +02:00
steelphase
d8e764baac Update UseVSHostingProcess
This shouldn't need to be enabled.
2014-10-20 14:23:04 -04:00
obrakmann
02fabf8ce8 Merge pull request #6800 from pchote/fix-replay-browser
Fix a crash when double-clicking a replay with an unknown map.
2014-10-20 20:15:29 +02:00
Paul Chote
a09cfd7a8f Fix a crash when double-clicking a replay with an unknown map. 2014-10-20 22:55:19 +13:00
Paul Chote
2b0042ca23 Merge pull request #6799 from pchote/additional-sounds
Made use of various additional sound files in Red Alert
2014-10-20 20:28:17 +13:00
Paul Chote
4d2f912389 Merge pull request #6793 from Mailaender/bleed-exc-wrap
Moved the crash monitors outside of the game executables
2014-10-20 20:05:22 +13:00
Paul Chote
fe7eaa151d Merge pull request #6794 from abcdefg30/mtmfix
Fixed broken triggers on monster-tank-madness
2014-10-20 19:19:56 +13:00
huwpascoe
c3514e98eb Fixed DPI scaling issues with tilebuilder 2014-10-19 21:58:22 +01:00
huwpascoe
5d5f302d07 DevEnableTech now displays from all factions 2014-10-19 20:28:29 +01:00
abcdefg30
3110d6d0a4 fix broken triggers 2014-10-19 15:07:13 +02:00
obrakmann
00dbf270a4 Merge pull request #6552 from abcdefg30/monstertankmadness
Ported monster tank madness to lua
2014-10-19 13:44:00 +02:00
abcdefg30
fdecc18ddc Ported monster-tank-madness to lua 2014-10-19 13:30:38 +02:00
abcdefg30
1073646b72 Registered all new files 2014-10-19 13:30:37 +02:00
abcdefg30
d7857416b1 Added two diplomacy functions to lua
...and sneaked into AUTHORS
2014-10-19 13:30:00 +02:00
abcdefg30
8bd64f6a66 Added Kill function to lua 2014-10-19 13:24:59 +02:00
abcdefg30
b85cff62d3 Added OnInfiltrated function to lua 2014-10-19 13:24:51 +02:00
Matthias Mailänder
b7b4bf25b5 add the zenity crash dialog to the Desura scripts 2014-10-19 11:31:59 +02:00
Paul Chote
590de11df4 Add crash dialog to Linux launcher. 2014-10-19 11:18:40 +02:00
Paul Chote
571b80546b Add crash dialog to OSX launcher. 2014-10-19 11:18:40 +02:00
steelphase
c0e7718fd5 Remove Unused Settings
This removes unused settings related to CrashDialog
2014-10-19 11:18:40 +02:00
steelphase
307eaecc9e Update Windows installer and Makefile
Update windows installer to point to OpenRA.exe
replace CrashDialog with GameMonitor in MakeFile
Fix and simplify packaging scripts
2014-10-19 11:18:38 +02:00
steelphase
beef3242b8 Disable internal Error Message
Rely on GameMonitor to display error message.
2014-10-19 11:12:58 +02:00
steelphase
af3e3f795f Add Game Monitor
Add Game Monitor and update sln.
This also removes CrashDialog
2014-10-19 11:12:58 +02:00
obrakmann
6a24b28f92 Merge pull request #6783 from pchote/consistent-map-uids
Update shipped map UIDs
2014-10-19 10:23:23 +02:00
obrakmann
e91e1661d2 Merge pull request #6788 from pchote/fix-rule-validation
Fix the handling of maps with invalid rules.
2014-10-19 10:17:27 +02:00
Paul Chote
de8f3c3530 Add missing EOF newline to mod yaml files. 2014-10-19 21:06:50 +13:00
Paul Chote
cf2d30d80a Update map yaml formatting. 2014-10-19 21:06:50 +13:00
Paul Chote
fa01808962 Save the preview video field when saving a map. 2014-10-19 21:06:28 +13:00
Matthias Mailänder
d2fd05f780 Merge pull request #6790 from pchote/osx-icon
Update OSX app icon.
2014-10-19 09:17:06 +02:00
Matthias Mailänder
ae899b603d Merge pull request #6786 from pchote/retire-code
Retire legacy Lua API and IRC code.
2014-10-19 09:13:14 +02:00
Matthias Mailänder
d1ece9001c Merge pull request #6764 from abcdefg30/utilitybatch
Added a batchscript for OpenRA.Utility.exe
2014-10-19 09:12:11 +02:00
Paul Chote
6445e78385 Add a reference to Eluant in AUTHORS. 2014-10-19 19:54:02 +13:00
Paul Chote
9aab4b2be6 Move shared font files to the common mod directory. 2014-10-19 19:54:02 +13:00
Paul Chote
2236b53bc5 Update OSX app icon. 2014-10-19 18:43:16 +13:00
Scott
7e48e8c741 Merge pull request #6737 from pchote/replay-sidebar
Overhaul the observer sidebar.
2014-10-19 16:17:44 +13:00
Paul Chote
50643b0cfe Fix the handling of maps with invalid rules. Fixes #6787. 2014-10-19 15:52:13 +13:00
Paul Chote
0fc8344eb0 Add the statistics button to TD replays. 2014-10-19 15:32:27 +13:00
Paul Chote
2f6ceafc9c Add a new stats button glyph. 2014-10-19 15:32:27 +13:00
Paul Chote
ad88378a0b Overhaul the replay sidebar. 2014-10-19 15:32:26 +13:00
Paul Chote
43f395b0c6 Split out TS’s dropdowns.yaml. 2014-10-19 15:32:26 +13:00
Paul Chote
0b875e2ca2 Allow custom ScrollPanel button styles. 2014-10-19 15:32:26 +13:00
Paul Chote
d117faa48d Define BaseLine offset for ButtonWidget. 2014-10-19 15:32:26 +13:00
Paul Chote
6556cfc667 Merge pull request #6782 from Mailaender/configure-gentoo
Fixed Lua 5.1 library detection failed on Gentoo and derivatives
2014-10-19 15:01:16 +13:00
Paul Chote
10923d6438 Remove old IRC code. 2014-10-19 13:19:09 +13:00
Paul Chote
b1fba883a9 Remove legacy Lua API. 2014-10-19 12:43:17 +13:00
Paul Chote
5207fcc83b Remove legacy Lua API traits. 2014-10-19 12:43:17 +13:00
Paul Chote
7c46f42ff2 Remove GDI03. 2014-10-19 12:43:17 +13:00
Matthias Mailänder
2696644fa7 fix Lua 5.1 library detection failed on Gentoo and derivatives
closes #6529
2014-10-18 21:28:11 +02:00
Matthias Mailänder
2e5aab332e fix Tanya announcing her own death when walking over a mine 2014-10-18 21:09:34 +02:00
Matthias Mailänder
399275e5f3 add a configurable interval to announce on kill to avoid spam 2014-10-18 21:09:32 +02:00
Matthias Mailänder
c9346d1da8 setup the minelayer rearm sound 2014-10-18 21:08:50 +02:00
Matthias Mailänder
45e3d41093 StyleCop and add documentation 2014-10-18 21:08:50 +02:00
Matthias Mailänder
aab71ccbaf setup all Tanya voices 2014-10-18 21:08:50 +02:00
Matthias Mailänder
4b263a438f use depth charge explosion sound 2014-10-18 21:08:50 +02:00
Matthias Mailänder
c7a9be9d05 Merge pull request #6762 from obrakmann/lua-production
Add production support to Lua API, port gdi04a, gdi04b and intervention missions
2014-10-18 20:56:24 +02:00
Oliver Brakmann
22e6e5d759 Port Intervention to the new Lua API 2014-10-18 18:19:03 +02:00
Oliver Brakmann
a1f9881a72 Port gdi04b to the new Lua API 2014-10-18 18:19:03 +02:00
Oliver Brakmann
3a1185d9b5 Port gdi04a to the new Lua API 2014-10-18 18:19:03 +02:00
Oliver Brakmann
c0da807ee7 Add production support to the new Lua API 2014-10-18 18:19:03 +02:00
Oliver Brakmann
5140ce4762 More Lua API enhancements 2014-10-18 18:19:02 +02:00
Oliver Brakmann
a1ce37ddc5 Fix issues in ScriptTriggers' Clean method
* fixes a memory leak
* moves the cleanup into a FrameEndTask to avoid collisions with the
  trigger iterator (fixes #6747)
2014-10-18 16:25:46 +02:00
Matthias Mailänder
426f146905 Merge pull request #6725 from reaperrr/ts-smudges
Fixes TS smudges...
2014-10-18 14:36:06 +02:00
Matthias Mailänder
5b06008b53 Merge pull request #6765 from huwpascoe/mcvgroup
Fixes #6763
2014-10-18 14:29:47 +02:00
Matthias Mailänder
2f2b968cdc Merge pull request #6775 from pchote/smokey
Fix smoke animation offset in TD and RA.
2014-10-18 12:57:36 +02:00
Matthias Mailänder
a9cd2e686c Merge pull request #6753 from pchote/ingame-menu-cleanup
Ingame menu cleanup
2014-10-18 12:52:17 +02:00
Matthias Mailänder
5701162588 Merge pull request #6746 from pchote/lua-ownership
Fix ChangeOwner bogosity.
2014-10-18 12:41:59 +02:00
Matthias Mailänder
7b3b598d1d Merge pull request #6776 from pchote/better-lua-errors
Closes #5846
2014-10-18 12:24:32 +02:00
Paul Chote
6307afc6cb Merge pull request #6774 from reaperrr/lst-wps
GDI01 and GDI02 fixes
2014-10-18 13:45:47 +13:00
Paul Chote
79492a3240 End the mission when a script error occurs. 2014-10-18 13:32:15 +13:00
Paul Chote
3de9bc4f14 Fix smoke animation offset in TD and RA. 2014-10-18 13:29:24 +13:00
Paul Chote
d79ecb432a Write Lua debug information to lua.log. 2014-10-18 12:59:11 +13:00
Paul Chote
dbd4b0931b Don’t crash if trigger callbacks throw exceptions. 2014-10-18 12:59:11 +13:00
obrakmann
97e4c08dec Merge pull request #6772 from reaperrr/wake-fix
Fixed RenderGunboat wake animation
2014-10-17 23:13:49 +02:00
reaperrr
08c516a0ba Fix TD gunboat "turret" offsets 2014-10-17 23:01:45 +02:00
reaperrr
ca5f3bd1d1 Fix gdi02 harvester not harvesting and more 2014-10-17 22:39:28 +02:00
reaperrr
aa7e91f901 Fix gdi01 landing craft unload waypoint 2014-10-17 22:38:17 +02:00
Paul Chote
a08a3a3869 Use INotifyOwnerChanged for updating internal references. 2014-10-18 08:41:11 +13:00
Paul Chote
8508fc5155 Support changing owner from within scripted maps. 2014-10-18 08:41:11 +13:00
obrakmann
d0a7d65558 Merge pull request #6758 from RoosterDragon/fix-spriteloader-overcache
Create a separate SpriteFrameLoader for caching sprite frames.
2014-10-17 21:25:30 +02:00
obrakmann
8fdc631502 Merge pull request #6769 from pchote/fix-nod3-hqs
Fix HQ rules in nod03a and nod03b.
2014-10-17 20:57:34 +02:00
obrakmann
53763abfee Merge pull request #6767 from huwpascoe/crush-fix
Fixed ICrushable not being triggered properly
2014-10-17 20:52:50 +02:00
reaperrr
9bca5f5131 Fix RenderGunboat wake animation 2014-10-17 19:15:04 +02:00
reaperrr
3c702b6f8a Merge pull request #6741 from Mailaender/tidy-cnc-dll
Tidied the Tiberian Dawn mod DLL
2014-10-17 19:12:54 +02:00
Matthias Mailänder
ed95247625 fix syntax errors 2014-10-17 22:11:06 +13:00
Paul Chote
13393c301c Add world desaturation to TD end-game menu. 2014-10-17 22:11:06 +13:00
Paul Chote
311a909f18 Fix the in-game widget hierarchy. 2014-10-17 22:11:06 +13:00
Paul Chote
879bd1ce7c Fix HQ rules in nod03a and nod03b. 2014-10-17 07:38:14 +13:00
abcdefg30
4ed5720064 Added a batchscript for utility.exe 2014-10-16 16:00:30 +02:00
Matthias Mailänder
a946fac06b Merge pull request #6716 from LipkeGu/ts_PreReqs
[TS] Correcting the Prerequisites
2014-10-16 06:53:03 +02:00
huwpascoe
aae4aa3f24 Fixed ICrushable not being triggered properly 2014-10-16 05:11:16 +01:00
huwpascoe
15fa152bc3 MCV no longer loses controlgroup when transforming 2014-10-16 01:44:06 +01:00
obrakmann
8119273517 Merge pull request #6534 from Mailaender/dps-table-utility
Brought back damage per second export again
2014-10-16 00:10:24 +02:00
Matthias Mailänder
2e0daeb4cf Merge pull request #6761 from steelphase-forks/bleed-Authors
Add SteelPhase to AUTHORS
2014-10-15 07:35:01 +02:00
steelphase
ac1f9c240b Add myself to AUTHORS 2014-10-15 01:31:27 -04:00
Matthias Mailänder
0478861485 Merge pull request #6744 from pchote/font-fix
Fix path for Small font.
2014-10-15 07:14:28 +02:00
RoosterDragon
d671e1de01 Create a separate FrameCache for caching sprite frames.
We split the caching SpriteLoader into a SpriteCache and FrameCache. SpriteLoader instead becomes a holder for static loading methods.

Only a few classes loaded sprite frames, and they all use it with a transient cache. By moving this method into a new class, we can lose the now redundant frame cache, saving on memory significantly since the frame data array can be reclaimed by the GC. This saves ~58 MiB on frames and ~4 MiB on the caching dictionary in simple tests.
2014-10-14 22:06:11 +01:00
Paul Chote
377704024d Fix path for Small font. 2014-10-13 12:42:20 +13:00
Matthias Mailänder
b86f4a1347 tidy cnc mod dll 2014-10-12 17:38:14 +02:00
reaperrr
11cd7684a0 Fix Laser Turret and Nod SAM Site selection bounds 2014-10-12 14:20:53 +02:00
reaperrr
752d7fbbcb Add smudges to TS weapons 2014-10-12 14:20:52 +02:00
Matthias Mailänder
2a15c44d91 Merge pull request #6736 from pchote/fix-player-binding
Don’t regenerate the Lua player bindings each query.
2014-10-12 09:43:42 +02:00
Paul Chote
fad0215842 Merge pull request #6698 from RoosterDragon/memory-savings
Small memory savings
2014-10-12 11:43:08 +13:00
Paul Chote
19760b44cc Don’t regenerate the lua player bindings each query. 2014-10-12 10:43:15 +13:00
reaperrr
f800cd7f02 Merge pull request #6723 from penev92/bleed
Moved two more Orders from RA to Common
2014-10-11 15:55:10 +02:00
Matthias Mailänder
997bcc2f6e Merge pull request #6727 from penev92/bleed_fix_Eluant
Fix Eluant.dll reference in Common project. Requested in #6723.
2014-10-11 14:44:33 +02:00
Matthias Mailänder
f249aa85b4 Merge pull request #6731 from obrakmann/fix6728_intervention_breakage
Fix old Lua breakage
2014-10-11 14:44:26 +02:00
Matthias Mailänder
58d18ebe45 Merge pull request #6729 from atlimit8/OldLuaTurnFix
Fixes old Lua API Turn Activity crash
2014-10-11 14:23:54 +02:00
Matthias Mailänder
b77bd82561 Merge pull request #6708 from pchote/ts-tileset-converter
Import the TS temperate tileset.
2014-10-11 14:12:09 +02:00
Matthias Mailänder
396ef3445a Merge pull request #6706 from pchote/mission-menu-phase-two
Improve the mission menu
2014-10-11 14:07:51 +02:00
Oliver Brakmann
18b9f9a021 Fix old Lua breakage
Works around a problem in the old Lua API where a trait lookup would
not find the correct class and make the script crash.

In this instance, `Game.modData.ObjectCreator.FindType("RallyPoint")`
return `OpenRA.Mods.Common.Effects.RallyPoint` instead of the expected
`OpenRA.Mods.Common.RallyPoint`.

The other change is an oversight from the recent warhead rewrites.

Fixes #6728
2014-10-11 13:39:31 +02:00
atlimit8
6640fa2539 Fixes old Lua Move Activity 2014-10-11 06:27:49 -05:00
Matthias Mailänder
9080d31c5a bring back CSV damage per second export 2014-10-11 12:55:56 +02:00
atlimit8
0e182e4fa8 Fixes old Lua Turn Activity crash 2014-10-11 05:26:56 -05:00
Paul Chote
22e9744b9b Update ingame briefing panel for new preview dimensions. 2014-10-11 23:06:56 +13:00
Paul Chote
bba17b93e1 Add support for thirdparty missions. 2014-10-11 23:06:56 +13:00
Paul Chote
a870a6e023 Upgrade RA missions for the new mission chooser. 2014-10-11 23:06:55 +13:00
Paul Chote
6160ec749b Upgrade TD missions for the new mission chooser. 2014-10-11 23:06:53 +13:00
Paul Chote
5d32e97ef1 Add support for briefing videos in the mission menu. 2014-10-11 23:05:35 +13:00
Paul Chote
0a4117ec76 Add support for mission groups. 2014-10-11 23:05:35 +13:00
Paul Chote
9ffd1cefbb Fix the title of the TD missions panel. 2014-10-11 23:05:35 +13:00
Paul Chote
84e71258dc Prevent mouse events from propagating through a video. 2014-10-11 23:05:35 +13:00
Paul Chote
a60452b30a Make the video cancel hotkey configurable. 2014-10-11 23:05:34 +13:00
Paul Chote
6b1505b71d Add an aspect ratio correction flag to VqaPlayerWidget. 2014-10-11 23:05:34 +13:00
penev92
96855e6650 Fix Eluant.dll reference in Common project. Requested in #6723. 2014-10-11 12:07:28 +03:00
Matthias Mailänder
df5b7d4497 Merge pull request #6699 from obrakmann/fix6692_new_objective_notification
Added notifications for new objectives to scripted missions
2014-10-11 11:05:33 +02:00
penev92
e64380e9df Moved two more Orders from RA to Common 2014-10-11 11:57:05 +03:00
Scott
185d6755f0 Merge pull request #6724 from pchote/absolute-paths
Load assets using absolute file paths
2014-10-11 21:16:09 +13:00
Matthias Mailänder
080bbab514 Merge pull request #6694 from LipkeGu/ai_update
[TS] Add Nod Stealth Generator and GDI TechCenter to the AI
2014-10-11 10:11:29 +02:00
Paul Chote
3c74dafdf1 Merge pull request #6726 from Mailaender/travis-mono-3.8
Updated the release build servers to Mono 3.8
2014-10-11 21:10:51 +13:00
Matthias Mailänder
c026df8ddd build with previous latest mono 3.8 2014-10-11 09:13:39 +02:00
Matthias Mailänder
2ce2f7afe4 Merge pull request #6722 from abcdefg30/disable_tanyas_stances
Disallow changing tanya's stance on allies01
2014-10-11 07:59:56 +02:00
Paul Chote
3e42d7b5a0 Cache the support dir path. 2014-10-11 11:04:44 +13:00
Paul Chote
4f44cc1969 Load assets using absolute paths. Fixes #6717. 2014-10-11 11:02:30 +13:00
obrakmann
ca6a094878 Merge pull request #6662 from atlimit8/CaptureActor-Enter
Enter subclasses & fix for 6658
2014-10-10 19:51:17 +02:00
abcdefg30
ae1c3df948 Disabled changing e7's stances 2014-10-10 19:49:37 +02:00
Paul Chote
0d0b8c1e22 Remove obsolete PackageContents array from Manifest. 2014-10-10 23:44:37 +13:00
Paul Chote
9f3230a009 Remove static state from ChromeProvider. 2014-10-10 23:44:37 +13:00
RoosterDragon
69125989ab Changed Vertex constructors to pass more parameters as plain floats.
This avoids callers having to construct a float2 struct, only to have the Vertex constructor unwrap it into individual components again.
2014-10-10 09:38:14 +01:00
atlimit8
3b21c9713f Added bridge hut repair tracking 2014-10-09 18:04:13 -05:00
atlimit8
acc0b618c8 Restricted terrain targeting to force-move enter transports 2014-10-09 18:04:13 -05:00
atlimit8
b736e059e9 Removed Enter(Actor self, Actor target, Activity inside) & made Enter abstract 2014-10-09 18:04:13 -05:00
atlimit8
ad24a70235 Infiltrate as Enter subclass 2014-10-09 18:04:12 -05:00
atlimit8
c994ee4668 DonateSupplies as Enter subclass 2014-10-09 18:04:12 -05:00
atlimit8
41452dcfeb RepairBuilding & RepairBridge as Enter subclasses 2014-10-09 18:04:12 -05:00
atlimit8
6d0feb9fbf Demolish as Enter subclass 2014-10-09 18:04:12 -05:00
atlimit8
4783b1f646 CaptureActor as Enter subclass & fixes 6658 2014-10-09 18:04:12 -05:00
atlimit8
31a096dcf1 HashSet<byte> => BitArray resourceTypeIndices
BitArray can store 256 bits in 32 bytes plus overhead (pointer & length),
which gives it better memory locality too (<= 2 locations in memory).
Also, the actual count will be much less, probably at most around a dozen.
This might not impact performance, but the AI is dumb & HashSet<byte> is
clearly inefficient.
2014-10-09 20:03:25 +01:00
RoosterDragon
bbb3990a0f Don't store pre-calculated texture coords in Sprite.
By storing only the four corners, we can save the object overhead of an array and 4 float elements per sprite. This results in savings of around 5 MiB to store these coordinates.
2014-10-09 20:03:03 +01:00
RoosterDragon
59b3cd154d Change indexes into tile arrays to be stored as bytes to save memory.
The index value needs only be big enough to handle all defined terrain types. This is a low number so we can save memory by defining it as a byte. This particularly saves memory for the CustomTerrain field in the Map class, which defines a cell layer for the map using tile indexes, so we can reduce the size of that layer 4x as a result.
2014-10-09 20:03:01 +01:00
obrakmann
268c63f7df Merge pull request #6714 from penev92/bleed
Moved DeployOrderTargeter.cs from OpenRA.Mods.RA to Common
2014-10-09 18:02:48 +02:00
Paul Chote
d64a8fbd47 Merge pull request #6719 from reaperrr/ts-cleanup01
Minor TS cleanup
2014-10-09 21:45:57 +13:00
Guido L
7306cd32c8 [TS] fix Prerequisites and typos
changed the Prereqs

aircraft changes

vehicle changes

Infantry changes

removed forgotten (who has added this crap)
2014-10-08 22:54:04 +02:00
reaperrr
827eb6806e Merge pull request #6705 from steelphase-forks/common-resharp
Mods.Common resharpered
2014-10-08 22:15:00 +02:00
Taryn Hill
3f83e8432d Merge pull request #6712 from steelphase-forks/bleed-copy-local
remove copy local
2014-10-08 15:01:42 -05:00
reaperrr
71d81eb4ad Fixes a TS weapon typo and removes redundant armament recoil values 2014-10-08 21:49:19 +02:00
Taryn Hill
dc9b97c695 Merge pull request #6675 from Mailaender/ts-harvester-attack-notifier
Fixed Tiberian Sun harvester under attack notification not playing.
2014-10-08 10:41:48 -05:00
penev92
7e59e1bf9a Moved DeployOrderTargeter.cs from OpenRA.Mods.RA to Common 2014-10-08 15:29:58 +03:00
steelphase
628463f920 remove copy local
remove copy local from project references
2014-10-08 02:29:14 -04:00
Oliver Brakmann
36477ae323 Added notifications for new objectives to scripted missions
Fixes #6692
2014-10-08 06:24:51 +02:00
obrakmann
c1d1c6f226 Merge pull request #6653 from pchote/empdisable
Disable movement of EMPd actors
2014-10-07 21:31:19 +02:00
Paul Chote
d610c02642 Add an early TS tileset importer and temperate tileset. 2014-10-08 08:11:39 +13:00
obrakmann
3c791f0eb9 Merge pull request #6643 from DeadlySurprise/assetBrowser
Adds vqa playback to the asset browser
2014-10-07 21:07:08 +02:00
Paul Chote
446d98e625 Support ini files with spaces around the ‘=‘. 2014-10-08 08:06:50 +13:00
obrakmann
220bc2ec08 Merge pull request #6673 from pchote/unhardcode-sprites
Move sprite parsers into mod code
2014-10-07 20:45:50 +02:00
obrakmann
532c658b5d Merge pull request #6704 from chrisforbes/closure-hazards
Closure hazards -- Fixes #6703
2014-10-07 20:01:19 +02:00
DeadlySurprise
e187876bdf Adds vqa playback to the asset browser 2014-10-07 18:59:02 +02:00
Paul Chote
5050748afe Fix invalid targets invalidating GrantUpgradeWarhead for all nearby actors. 2014-10-07 20:21:28 +13:00
Paul Chote
fde963a993 Make EMP freeze mobile actors. 2014-10-07 19:30:24 +13:00
Paul Chote
6b54575569 Fix Move activity ignoring IDisableMove. 2014-10-07 19:30:24 +13:00
Paul Chote
34eb634779 Add self argument to Move constructors. 2014-10-07 19:30:23 +13:00
Paul Chote
772994c1c4 Remove Mobile assumptions from Lua APIs. 2014-10-07 19:30:23 +13:00
steelphase
0cb0ae57f3 Mods.Common Commands namespace
Added Commands Namespace.
2014-10-07 02:14:09 -04:00
steelphase
c5bea39bf8 Mods.Common R# Console
Resharper corrections.
2014-10-07 02:07:40 -04:00
Chris Forbes
ea475ed39b DomainIndex: Fix benign loop variable in closure hazard
This never outlived a single iteration of the neighbors loop.
2014-10-07 18:30:23 +13:00
Chris Forbes
3360b11962 WithMuzzleFlash: fix loop variable in closure hazard
This fixes a real bug -- if the actor had multiple armaments, we'd end
up placing the muzzle flashes all based on the offsets of the last one.
2014-10-07 18:27:31 +13:00
Chris Forbes
98563eb854 PrimaryBuilding: Fix benign loop variable in closure hazard
This never outlived a single loop iteration.
2014-10-07 18:24:00 +13:00
Chris Forbes
f2492f4155 LevelUpCrateAction: fix loop variable in closure bug
This was a real bug -- if there were multiple recipients, we'd apply the
levels N times to the last recipient rather than once to each.
2014-10-07 18:19:55 +13:00
Chris Forbes
edbd65bdf3 filesystem: Fix benign use of loop variable in closure
This closure never outlives a single loop iteration.
2014-10-07 18:17:09 +13:00
Chris Forbes
f61b52ccae editor: Fix a benign loop-variable-inside-closure issue
The getter is accessed exactly once, at call time.
The setter is stored, and invoked later on losing focus, but we pass a
bogus one anyway, so there is no issue.
2014-10-07 18:12:41 +13:00
Paul Chote
41c296e5c2 Fix some bogus cell accesses in Map. 2014-10-07 09:55:50 +13:00
Paul Chote
9312d1915f Fix the legacy map editor. 2014-10-07 09:55:50 +13:00
Paul Chote
fff8c7680b Support tmp(ts) templates with empty tiles. 2014-10-07 09:55:50 +13:00
Paul Chote
6a72e87028 Remove the remaining legacy sprite plumbing. 2014-10-07 09:55:50 +13:00
Paul Chote
beb7a394a2 Move ShpD2 sprite loading into Mods.Common. 2014-10-07 09:55:50 +13:00
Paul Chote
533d044755 Move TmpTS sprite loading into Mods.TS. 2014-10-07 09:55:50 +13:00
Paul Chote
37cedd88a2 Move TmpTD sprite loading into Mods.Common. 2014-10-07 09:55:49 +13:00
Paul Chote
997c79130a Move TmpRA sprite loading into Mods.Common. 2014-10-07 09:55:49 +13:00
Paul Chote
ca38193264 Move R8 sprite loading into Mods.D2k. 2014-10-07 09:55:49 +13:00
Paul Chote
c798b306c4 Move ShpTS sprite loading into Mods.Common. 2014-10-07 09:55:49 +13:00
Paul Chote
d658643b73 Move ShpTD sprite loading into Mods.Common. 2014-10-07 09:55:49 +13:00
Paul Chote
9cf8328979 Add plumbing for mod-defined sprite loaders. 2014-10-07 09:55:49 +13:00
Paul Chote
ad0da91ecc Remove --transpose utility command.
The engine has supported transposed sprites for a long time now.
2014-10-07 09:55:49 +13:00
Paul Chote
2b92ce7edd Use SpriteLoader for frame exporting. 2014-10-07 09:55:49 +13:00
Paul Chote
7207841f8b Use the existing SpriteLoader cache for tilesets. 2014-10-07 09:55:48 +13:00
Guido L
8afb4a3672 added also gatech to the AI ... 2014-10-06 22:31:57 +02:00
Guido L
30db708fd5 Adding NASTLH to the AI 2014-10-06 22:31:57 +02:00
Matthias Mailänder
802eaac87b Merge pull request #6691 from pchote/objective-duplication
Fix closure issue with mission objectives.
2014-10-06 20:58:18 +02:00
Matthias Mailänder
86c12a3637 Merge pull request #6667 from steelphase-forks/common-effects
Mods.Common effects
2014-10-06 20:57:12 +02:00
Matthias Mailänder
1770ce4b60 Merge pull request #6687 from pchote/fix-shellmap
Revert "Some minor Cargo style fixes."
2014-10-06 19:50:21 +02:00
obrakmann
d288868ca6 Merge pull request #6690 from huwpascoe/cargoland
Chinooks now accept deploy order inflight
2014-10-06 17:21:28 +02:00
Paul Chote
06d1a2fbe2 Merge pull request #6379 from Mailaender/allies-02-new-lua
Ported Allies 02 to the new Lua API
2014-10-06 19:47:43 +13:00
steelphase
3c60794e2e Mods.Common Effects
Moved over more effects to Mods.Common
2014-10-06 01:57:10 -04:00
Paul Chote
a77714f98b Fix closure issue with mission objectives. Fixes #6680. 2014-10-06 18:49:36 +13:00
Paul Chote
ba89eaa50d Revert cachedLocation change that caused issues with transports.
This partially reverts commit 2f5ac1a360.
2014-10-06 18:07:30 +13:00
huwpascoe
d948cb5d55 Chinooks now accept deploy order inflight 2014-10-06 01:16:14 +01:00
Matthias Mailänder
24732ae635 port allies-02 to new Lua API 2014-10-05 22:45:23 +02:00
obrakmann
2f4a267ba7 Merge pull request #6681 from Mailaender/document-basic-traits
Documented traits with generic names
2014-10-05 21:12:42 +02:00
obrakmann
a21544f242 Merge pull request #6676 from pchote/map-chooser-layout
Make the RA/D2K/TS map chooser layout consistent with the lobby.
2014-10-05 19:49:29 +02:00
Matthias Mailänder
6a8345b3d0 document traits with generic names 2014-10-05 17:58:43 +02:00
Matthias Mailänder
15b358afa5 Merge pull request #6670 from reaperrr/ts-offsets01
Closes #5905
2014-10-05 13:23:23 +02:00
reaperrr
a6814bf0a2 Tweak TS barracks SpawnOffset and ExitCell 2014-10-05 13:17:41 +02:00
reaperrr
e9cad50652 Fix Footprint, DockOffset, SpawnOffset and spawn Facing of TS refinery 2014-10-05 13:17:06 +02:00
Paul Chote
1fe28b5385 Make the RA/D2K/TS map chooser layout consistent with the lobby. 2014-10-05 21:42:44 +13:00
Matthias Mailänder
1f7bd53b19 Merge pull request #6663 from reaperrr/common-stuff4
Moved more stuff to Mods.Common
2014-10-05 10:10:14 +02:00
Matthias Mailänder
7101b001b2 Merge pull request #6546 from huwpascoe/freezefix
Closes #4591
2014-10-05 09:33:21 +02:00
Matthias Mailänder
f6f88bddb2 Merge pull request #6644 from pchote/proximity-triggers
Closes #2175
2014-10-05 09:12:00 +02:00
Matthias Mailänder
25c89698fd document HarvesterAttack- and BaseAttackNotifier 2014-10-05 08:59:29 +02:00
Matthias Mailänder
33e9ad0472 add missing HarvesterAttackNotifier
closes #6671
2014-10-05 08:40:14 +02:00
Matthias Mailänder
cee96d881d Merge pull request #6666 from pchote/fix-spy-tooltip
Fix spy tooltip definition.
2014-10-05 08:31:42 +02:00
Matthias Mailänder
1568db7941 Merge pull request #6672 from pchote/revert-mono
Revert "build with latest Mono from @Xamarin"
2014-10-05 08:29:08 +02:00
Paul Chote
c5d987be66 Revert "build with latest Mono from @Xamarin"
This reverts commit f1bfbf933b.
2014-10-05 17:51:32 +13:00
reaperrr
67e7c99b5c Fix TS offsets, selection bounds, weapon factory exits 2014-10-05 01:25:11 +02:00
Paul Chote
f7028cf197 Fix spy tooltip definition. Fixes #6665. 2014-10-05 09:17:32 +13:00
reaperrr
6e1f1b9cc8 Bring Mods.Common includes in alphabetical order 2014-10-04 18:53:56 +02:00
reaperrr
8b5bd49095 Move ResourceClaim and ResourceClaimLayer to Mods.Common 2014-10-04 18:52:48 +02:00
reaperrr
9381386b7c Move PlayMusicOnMapLoad to Mods.Common 2014-10-04 18:50:14 +02:00
reaperrr
c741fcedec Move Smoke effect, ContrailFader effect, SmudgeLayer and LeaveSmudgeWarhead to Mods.Common 2014-10-04 18:48:07 +02:00
reaperrr
b987ab15be Add Mods.Common reference to Mods.Cnc 2014-10-04 18:34:42 +02:00
obrakmann
d204b2470e Merge pull request #6647 from pchote/pbox-spawn-fix
Set CurrentAdjacentCells correctly for Lua-spawned transports
2014-10-04 16:16:26 +02:00
Matthias Mailänder
d75a60dd75 Merge pull request #6659 from reaperrr/linebuild-fix
Fixes #6635
2014-10-04 14:11:00 +02:00
obrakmann
820cb945c9 Merge pull request #6656 from pchote/turret-facing-fix
Turret facing fix
2014-10-04 13:52:07 +02:00
reaperrr
d35bd8c868 Makes unbuildable fences only connect to themselves 2014-10-04 13:45:48 +02:00
Matthias Mailänder
78f934dfb8 Merge pull request #6640 from reaperrr/mods-common-03
Moves Console and some effects to Mods.Common
2014-10-04 13:33:41 +02:00
obrakmann
84cec1baba Merge pull request #6650 from pchote/luatable-bridge
Allow Lua bridge to convert between LuaTable and arrays.
2014-10-04 12:36:36 +02:00
obrakmann
a91084c0f8 Merge pull request #6613 from pchote/remove-mp-tooltips
Remove the MP tooltip row from campaign missions.
2014-10-04 12:20:14 +02:00
Paul Chote
c6691e881c Fix Turreted style issues. 2014-10-04 23:17:15 +13:00
Paul Chote
f7c344bef8 Query Turreted trait dependencies using INotifyCreated. Fixes #6655. 2014-10-04 23:15:42 +13:00
obrakmann
4c2eba6b04 Merge pull request #6503 from huwpascoe/turretalign
Turrets now realign by default
2014-10-04 12:05:13 +02:00
Matthias Mailänder
8729803d29 Merge pull request #6649 from huwpascoe/rmbo
Balancing: Reduced Commando HP
2014-10-04 11:49:31 +02:00
Scott
f8ab476fa9 Merge pull request #6652 from pchote/fix-husk-crash
Fix crash when husks are spawned by a moving actor.
2014-10-04 20:22:32 +13:00
Paul Chote
008d5f91aa Fix crash when husks are spawned by a moving actor.
Fixes #6648.
2014-10-04 20:05:57 +13:00
Paul Chote
85b26d1ff8 Update Lua bindings to use array arguments. 2014-10-04 19:43:27 +13:00
Paul Chote
471dc409b7 Allow Lua bindings to convert to and from arrays. 2014-10-04 19:43:18 +13:00
Paul Chote
564a709a3a Apply upgrades to units produced within range immediately. 2014-10-04 14:01:45 +13:00
Paul Chote
bf2bc0c02e Extend INotifyOtherProduction to all actors. 2014-10-04 14:01:45 +13:00
Paul Chote
1a5ff440d1 Add the stealth generator to TS. 2014-10-04 14:01:45 +13:00
Paul Chote
da592f0a25 Add UpgradeActorsNear trait for passive upgrades. 2014-10-04 14:01:45 +13:00
Paul Chote
0652d338f8 Add proximity trigger plumbing. 2014-10-04 14:01:45 +13:00
Paul Chote
1bd408948d Add WithRangeCircle trait for drawing arbitrary ranges. 2014-10-04 14:01:44 +13:00
huwpascoe
3ece9ede42 Turrets now realign when not attacking. 2014-10-04 01:18:19 +01:00
huwpascoe
488d2d57e0 Fix map.png lock 2014-10-04 01:18:18 +01:00
huwpascoe
43cd1fc7a8 Balancing: Reduced Commando HP 2014-10-03 22:33:21 +01:00
reaperrr
f03617bbe5 Move Console commands to Mods.Common 2014-10-03 23:19:27 +02:00
reaperrr
ab30e8a993 Move FloatingText effect to Mods.Common 2014-10-03 23:08:42 +02:00
reaperrr
a7d3ff973e Move Explosion effect to Mods.Common 2014-10-03 23:08:41 +02:00
Paul Chote
cb85da6712 Merge pull request #6632 from steelphase-forks/common-widgets
Mods.Common Widgets
2014-10-04 10:06:05 +13:00
Paul Chote
2f5ac1a360 Some minor Cargo style fixes. 2014-10-04 09:57:10 +13:00
Paul Chote
1df018f526 Update CurrentAdjacentCells when actor is added to the world. Fixes #6633. 2014-10-04 09:48:10 +13:00
Matthias Mailänder
beed736169 Merge pull request #6528 from atlimit8/DragIntoTransports
Modifies IMove & Enter and Fixes #4640 - Units teleport into transports
2014-10-03 15:37:29 +02:00
atlimit8
b9ac4da32a Prevent transport from moving while loading cargo 2014-10-03 08:07:05 -05:00
atlimit8
3f6e1a608a Added IDisableMove 2014-10-03 08:07:05 -05:00
atlimit8
cead66668f Fixed #4640 - Units teleport into transports. 2014-10-03 08:07:02 -05:00
Matthias Mailänder
1e288832dd Merge pull request #6645 from obrakmann/fix6642_tib_warhead_crash
Avoid reading CenterPosition of invalid targets in DamageWarhead
2014-10-03 14:49:35 +02:00
Oliver Brakmann
8f8b0b966f Avoid reading CenterPosition of invalid targets in DamageWarhead
Fixes #6642
2014-10-03 14:24:27 +02:00
Matthias Mailänder
8489340276 Merge pull request #6556 from pchote/upgrade-all-the-things
Add support for time-limited actor upgrades.
2014-10-03 11:46:20 +02:00
Paul Chote
ece2b34f7d Add classic-style tooltips for RA campaign missions. 2014-10-03 20:25:34 +13:00
Paul Chote
5f68a9c773 Fix bogus fence tooltip. 2014-10-03 20:25:34 +13:00
Paul Chote
02166628d1 Add classic-style tooltips for TD campaign missions. 2014-10-03 20:25:33 +13:00
Paul Chote
80f42b4921 Add support for generic tooltip names. 2014-10-03 20:25:33 +13:00
atlimit8
af5b18a080 Extend Enter activity class for (re)usability in enter/exit/dock logic 2014-10-02 20:47:28 -05:00
atlimit8
83acbe0266 Extended IMove for Enter logic 2014-10-02 20:47:28 -05:00
obrakmann
9de79318e8 Merge pull request #6623 from steelphase-forks/bleed-ScrollPanelSound
Scroll Panel Sound
2014-10-02 20:09:44 +02:00
obrakmann
0219769946 Merge pull request #6634 from abcdefg30/autoharvest
Let harvesters autoharvest when produced
2014-10-02 19:25:50 +02:00
abcdefg30
d1e9d7d19d Harvester now autoharvest when produced 2014-10-02 16:41:55 +02:00
reaperrr
d7be83dcd7 Merge pull request #6627 from s1ww/cnc_cash_ticks
Normalizing CashTicks AUD for TD
2014-10-01 22:05:24 +02:00
steelphase
fc44d082dc Scroll Panel Sound
Adds sound to Up, Down, and Thumb Button
2014-10-01 09:53:28 -04:00
steelphase
2f87a62ee8 Mods.Common Widgets
Moved over Widgets that don't require a bunch of things to move.
2014-10-01 09:48:41 -04:00
Paul Chote
863d75eefe Merge pull request #6621 from steelphase-forks/bleed-soundfix
Sound Fix for DropDownButton Widget
2014-10-01 22:12:55 +13:00
Paul Chote
fd14ebddb8 Remove the now-redundant ScriptInvulnerable trait. 2014-10-01 21:50:18 +13:00
Paul Chote
b6d17d3034 Expose upgrades to map scripts. 2014-10-01 21:50:18 +13:00
Paul Chote
8a014393a3 Rename UnitUpgradeCrateAction to GrantUpgradeCrateAction. 2014-10-01 21:29:22 +13:00
Paul Chote
22574e920b Detonate demo trucks when they are iron-curtained. 2014-10-01 21:29:22 +13:00
Paul Chote
abba61dd8c Replace RemoveOnConditions with KillsSelf.
Upgrades offer more flexibility than prerequisites.
2014-10-01 21:29:21 +13:00
Paul Chote
bb44d76762 Add a GrantUpgradeWarhead and initial TS EMP implementation. 2014-10-01 21:29:21 +13:00
Paul Chote
a03305762f Add the invulnerability crate to RA. 2014-10-01 21:29:21 +13:00
Paul Chote
968486a03e Reimplement iron curtain as a generic stat upgrade. 2014-10-01 21:29:19 +13:00
Paul Chote
331f2852db Fix cloak upgrade expiration. 2014-10-01 21:28:49 +13:00
Paul Chote
c697a1e7b4 Add a UnitUpgradeManager trait.
This introduces support for timed upgrades, starting with crate buffs.
2014-10-01 21:28:45 +13:00
Paul Chote
b4c826237e Remove duplicated IronCurtainable rules. 2014-10-01 20:58:40 +13:00
obrakmann
c57407de4a Merge pull request #6626 from steelphase-forks/bleed-modRulesFix
LoadWidget modRules Fix
2014-09-30 22:35:06 +02:00
Matthias Mailänder
a666e963eb Merge pull request #6504 from s1ww/mapchooser_filter
Closes #6374
2014-09-30 21:27:36 +02:00
Matthias Mailänder
a37f89aadf Merge pull request #6574 from pchote/celltrigger
Implement cell triggers.
2014-09-30 20:49:03 +02:00
Matthias Mailänder
72d30fd9d5 Merge pull request #6614 from abcdefg30/fixobj-fine-tuning
Fix broken objectives fine-tuning
2014-09-30 20:39:32 +02:00
Oliver Brakmann
df64f79753 Whitespace fixes 2014-09-30 19:25:09 +13:00
Oliver Brakmann
154ebc5857 Update gdi04c to use cell triggers 2014-09-30 19:25:09 +13:00
Paul Chote
a61fdba44d Implement cell triggers. Closes #4400. 2014-09-30 19:25:09 +13:00
s1ww
c2e08922f5 Normalizing CashTicks AUD for TD 2014-09-30 07:20:17 +02:00
steelphase
3a5d04f824 LoadWidget modRules Fix
Fixes #6625
2014-09-29 23:07:48 -04:00
steelphase
65ded0ed90 Sound Fix for DropDownButton Widget 2014-09-29 18:41:40 -04:00
obrakmann
e9b76e516b Merge pull request #6605 from Mailaender/travis-mono-latest
Build releases with latest Mono
2014-09-29 21:55:20 +02:00
Matthias Mailänder
f1bfbf933b build with latest Mono from @Xamarin 2014-09-29 21:10:46 +02:00
Chris Forbes
f5aafe6670 Merge pull request #6612 from pchote/fix-warheads
Fix a loop closure bug in the weapons code.
2014-09-30 07:20:42 +13:00
abcdefg30
7d72f81c5d fix broken objectives fine-tuning 2014-09-29 16:14:42 +02:00
Paul Chote
3f7f7e1164 Merge pull request #6607 from reaperrr/fix-vehicle-c4
Remove C4 demolishability from RA vehicles
2014-09-29 21:17:20 +13:00
Paul Chote
a11f01f28a Merge pull request #6606 from reaperrr/mine-investigation
Fixes mines doing no damage to crusher
2014-09-29 21:08:03 +13:00
Paul Chote
7bc8c171e8 Minor style fixes. 2014-09-29 21:01:44 +13:00
Paul Chote
f463407d8d Fix a loop closure bug in the weapons code.
Fixes #6597. Fixes #6599.
2014-09-29 20:57:20 +13:00
s1ww
db99b816db Implementing search feature in map choosers 2014-09-29 06:59:42 +02:00
reaperrr
1b53b23663 Fixes mines and explosion crates not damaging crusher/collector 2014-09-28 23:10:29 +02:00
reaperrr
e955c0f4ce Remove redundant tab 2014-09-28 23:10:28 +02:00
reaperrr
5e9948918e Remove C4 demolishability from RA vehicles 2014-09-28 22:02:43 +02:00
huwpascoe
d150ea1721 Fix server freeze on client absence. 2014-09-28 16:27:40 +01:00
obrakmann
20a41d8803 Merge pull request #6377 from Mailaender/allies-01-new-lua
Ported Allies 01 to the New Lua API
2014-09-28 12:09:03 +02:00
Matthias Mailänder
867ebcec3b port allies-01 to new Lua API 2014-09-28 10:53:01 +02:00
obrakmann
7393527cbf Merge pull request #6598 from pchote/fix-lua-dead-actor-bogosity
Fix Lua API interaction with destroyed actors
2014-09-28 10:45:30 +02:00
Matthias Mailänder
04b5c74a15 Merge pull request #6584 from obrakmann/fix6579_lowres_ui_overlap
Fix overlap of in-game UI elements at low resolutions
2014-09-28 07:12:49 +02:00
Paul Chote
04d61f465a Don’t rebuild the actor bindings every query. 2014-09-28 14:46:39 +13:00
Paul Chote
ca6119821f Allow lua API to bind a minimal set of properties to dead actors. 2014-09-28 14:46:37 +13:00
Oliver Brakmann
403e7ec929 Fix overlap of in-game UI elements when using low resolutions
Fixes #6579
2014-09-28 00:51:51 +02:00
Paul Chote
b010f1df1e Merge pull request #6570 from jacobdufault/cleanup
Remove unnecessary conditionals
2014-09-28 10:39:39 +13:00
Matthias Mailänder
35f6617726 Merge pull request #6580 from reaperrr/ts-eliteweap
Implements original TS elite weapons
2014-09-27 21:41:27 +02:00
Matthias Mailänder
5214219610 Merge pull request #6581 from abcdefg30/brimstone
Closes #5788
2014-09-27 21:32:33 +02:00
reaperrr
674f03ebc0 Merge pull request #6582 from Mailaender/lua-script-docs-typo-fix
Fixed typos in the Lua API intro again
2014-09-27 16:38:42 +02:00
Matthias Mailänder
a9548a7fa4 fix typos again 2014-09-27 15:12:14 +02:00
abcdefg30
128ae6e1b7 Fixed wrong constructionyard placing on map brimstone 2014-09-27 14:46:21 +02:00
reaperrr
4e169a0441 TS elite weapons 2014-09-27 14:41:46 +02:00
reaperrr
5d1d6d6d08 Merge pull request #6576 from pchote/armaments
Allow armaments to be enabled/disabled by upgrades.
2014-09-27 14:08:07 +02:00
Matthias Mailänder
71a872c53c Merge pull request #6553 from Phrohdoh/TSGridFixes
More TS art offset fixes.
2014-09-27 13:36:59 +02:00
reaperrr
477d7894a0 Merge pull request #6569 from jacobdufault/add-author
Update AUTHORS
2014-09-27 13:32:27 +02:00
obrakmann
be44b20797 Merge pull request #6577 from pchote/fix-validation
Don’t die when connecting to a full server.
2014-09-27 13:23:45 +02:00
reaperrr
ffeff5c7b6 Merge pull request #6575 from pchote/selfhealing
Add elite self-healing bonus
2014-09-27 13:19:24 +02:00
Paul Chote
3a64fd717f Merge pull request #6488 from jonathanmiles/support-power-targetability
AI no longer calls support power on things it can't target
2014-09-27 23:13:14 +12:00
Paul Chote
2bbdd0ae06 Add self-healing for elite units. 2014-09-27 22:14:45 +12:00
Paul Chote
372d03c320 Convert SelfHealing to upgrades. 2014-09-27 22:14:45 +12:00
Paul Chote
56332251f5 Don’t double-remove dead actors from the world. 2014-09-27 22:14:16 +12:00
Paul Chote
7042004af3 Don’t die when connecting to a full server. 2014-09-27 22:07:04 +12:00
Matthias Mailänder
82d3833d18 Merge pull request #6557 from abcdefg30/progbarcolors
Unhardcoded productionbar colors
2014-09-27 10:09:10 +02:00
Matthias Mailänder
d21c28310e Merge pull request #6568 from jacobdufault/remove-dead-settings
Remove an unused setting
2014-09-27 10:02:31 +02:00
Matthias Mailänder
15e5db855a Merge pull request #6573 from obrakmann/fix6572
Do not validate the color of players which have the LockColor flag set
2014-09-27 08:15:11 +02:00
Paul Chote
67e3c74d31 Allow armaments to be enabled/disabled by upgrades. 2014-09-27 14:59:15 +12:00
Oliver Brakmann
00dc6f1633 Do not validate the color of players which have the LockColor flag set
Fixes #6572
2014-09-27 01:43:02 +02:00
Jacob Dufault
ad98a831da Remove an unused setting 2014-09-26 17:38:36 -04:00
Jacob Dufault
7fe7284d99 Update AUTHORS 2014-09-26 17:37:42 -04:00
Jacob Dufault
67ff4dbac1 Remove unnecessary conditionals
- Game.modData.Manifest.LuaScripts is never null.
- context.LoadLuaScripts will work properly even if the file collection is empty.
2014-09-26 17:36:28 -04:00
abcdefg30
22dc63620f Unhardcoded productionbar colors 2014-09-26 14:55:42 +02:00
Paul Chote
8d54efc7af Merge pull request #6555 from obrakmann/fix6547_global_chat
Add a chat cache
2014-09-26 23:18:49 +12:00
obrakmann
7bb89ba664 Merge pull request #6543 from s1ww/upgraded_gui
Upgrading player gui redux
2014-09-26 09:49:22 +02:00
Oliver Brakmann
36b5097fa0 Cache chat conversations in the lobby and in-game
This preserves the chat content from the lobby and makes it available
in-game, and also makes all chat content available to the end-game
dialog.
2014-09-26 07:18:33 +02:00
s1ww
b4705add88 Upgrading player gui 2014-09-26 07:02:15 +02:00
Oliver Brakmann
ef35ee2204 Load end-game dialog only after game ends, not already when it starts
This is to ensure that statistics reflect the state at the end of the
game, not that from the start of the game.

Fixes #6547.
2014-09-25 21:02:39 +02:00
Scott
47565c33be Merge pull request #6512 from pchote/more-color-validation
Include map-players in the color validation checks.
2014-09-25 17:09:09 +12:00
Matthias Mailänder
0428814fe5 Merge pull request #6477 from s1ww/bleed
Updating outdated maps
2014-09-25 06:53:35 +02:00
s1ww
8cba84d47d Reworked railmines for each tileset 2014-09-25 04:38:09 +02:00
Matthias Mailänder
a25248f4bd Merge pull request #6551 from LipkeGu/samsitefix
Adjusting the Offset for the Turret of "Nod SAM Site"
2014-09-24 21:30:02 +02:00
Matthias Mailänder
3d80f47d96 Merge pull request #6550 from pchote/more-bounds-fixes
More map-bounds fixes
2014-09-24 21:23:50 +02:00
Taryn Hill
2988c500c0 More TS art fixes. 2014-09-24 14:20:14 -05:00
LipkeGu
ee079fa01c Adjusting the Z-Offset for the turret of "Nod SAM Site" 2014-09-24 17:11:40 +02:00
Paul Chote
ee77db1831 Add some additional robustness against bogus cell queries in ActorMap. 2014-09-24 22:36:59 +12:00
Paul Chote
3c2383ebc6 Don’t crash if a warhead smudge extends outside the map. Fixes #6548. 2014-09-24 22:34:02 +12:00
Paul Chote
17702dc057 Merge pull request #6334 from Mailaender/parachute-out-of-map
Fixed a crash when parachutes were spawned outside of the map
2014-09-24 22:26:08 +12:00
Paul Chote
8a4e42995a Include map-players in the color validator. 2014-09-24 22:11:37 +12:00
Matthias Mailänder
d1b28ad93b Merge pull request #6549 from LipkeGu/bansheevoice
Assign the correct voice to the "Nod Banshee Fighter"
2014-09-24 06:42:02 +02:00
LipkeGu
8ac97f6297 Assign the correct voice to the "Nod Banshee Fighter" 2014-09-24 03:48:43 +02:00
Chris Forbes
71e79b172c Merge pull request #6542 from jacobdufault/minor-code-cleanup
Simplify GetCtor logic
2014-09-24 09:37:59 +12:00
Matthias Mailänder
c607aabc0b Merge pull request #6539 from LipkeGu/patch-2
Update cursors.yaml
2014-09-23 21:30:55 +02:00
Jacob Dufault
65763a643f Simplify GetCtor logic 2014-09-22 13:41:07 -04:00
LipkeGu
74dc01908e Update cursors.yaml
insert the "missing" space
2014-09-22 16:20:58 +02:00
Matthias Mailänder
b818fb5fe6 Merge pull request #6536 from steelphase-forks/common-modbrowser
Mod Chooser move.
2014-09-21 20:59:23 +02:00
steelphase
7199b6fd96 Mod Chooser move.
Moved code for mod chooser to mod.common.
2014-09-21 14:27:20 -04:00
Matthias Mailänder
57f42aeeef Merge pull request #6535 from huwpascoe/bleed
Added self to AUTHORS
2014-09-21 20:18:33 +02:00
huwpascoe
2ba38f7c56 Added self to AUTHORS 2014-09-21 17:13:38 +01:00
Matthias Mailänder
b30fcc2110 Merge pull request #6521 from steelphase-forks/common-graphics
Add Mod.Common Graphics
2014-09-21 12:05:28 +02:00
Matthias Mailänder
44d134afe0 don't update the actor map outside the map borders 2014-09-21 10:52:44 +02:00
Matthias Mailänder
3f66d310db never spawn parachutes outside the map
fixes #6302
2014-09-21 10:47:33 +02:00
Matthias Mailänder
f0e6eee7e1 Merge pull request #6526 from MatthijsBenschop/debug-crash-fix
Prevent player name from becoming part of a formatting string.
2014-09-21 10:21:11 +02:00
Matthias Mailänder
dc1710d7aa Merge pull request #6522 from obrakmann/fix6517_lobby_music_crash
Check world for null in MusicPlayerLogic to prevent crashing the lobby
2014-09-21 10:17:40 +02:00
Matthijs Benschop
534f6c5a33 Prevent player name from becoming part of a formatting string.
fixes #6524
2014-09-21 10:01:40 +02:00
Oliver Brakmann
52d74886bd Check world for null in MusicPlayerLogic to prevent crashing the lobby
Fixes #6517
2014-09-21 08:17:55 +02:00
steelphase
f948bf0d1b Add Mod.Common Graphics
Moved Graphics to Mod.Common
2014-09-21 01:34:35 -04:00
Matthias Mailänder
ded39d1933 Merge pull request #6519 from abcdefg30/trainingcamp
Repaired Trainingcamp map
2014-09-21 07:13:58 +02:00
Matthias Mailänder
f75f036de3 Merge pull request #6493 from pchote/utility-commands
Move utility commands into the mod assemblies.
2014-09-21 07:10:45 +02:00
Taryn Hill
4be8525852 Merge pull request #6527 from pchote/revert-6518
Revert "Polishing/normalizing new GUI"
2014-09-20 20:27:10 -05:00
Paul Chote
01c5af4046 Revert "Polishing/normalizing new GUI"
This reverts commit 5020c7a73e.
2014-09-21 12:59:04 +12:00
Paul Chote
a3acf2aaca Merge pull request #6516 from LipkeGu/patch-1
Make the TS Construction Yard selectable
2014-09-21 12:08:06 +12:00
Alexander Fast
08890b0994 Added IUtilityCommand and move default commands into Mods.Common. 2014-09-21 10:15:50 +12:00
Matthias Mailänder
ea11906938 Merge pull request #6518 from s1ww/player_gui
Polishing/normalizing new GUI
2014-09-20 20:12:14 +02:00
abcdefg30
698d57ed82 Made dog buildable at fort lonestar 2014-09-20 17:40:10 +02:00
abcdefg30
02adaea35d Fixed training camp map
Removed unused traits,
fixed prerequisites
and fixed two typos.
2014-09-20 17:40:09 +02:00
s1ww
5020c7a73e Polishing/normalizing new GUI 2014-09-20 17:18:42 +02:00
LipkeGu
dce744c51d Make the TS Construction Yard selectable
Increasing the size of the selection box to make the Construction Yard selectable.
2014-09-20 16:31:28 +02:00
Matthias Mailänder
bb21f8b5fa Merge pull request #6473 from obrakmann/fix6422
Add chat tab to end-game dialog
2014-09-20 14:45:47 +02:00
Paul Chote
ff7b3541f4 Remove obsolete —upgrade-map-v5 and --setings-value commands. 2014-09-21 00:25:53 +12:00
Matthias Mailänder
9ebb9209ad Merge pull request #6494 from obrakmann/objectives-fine-tuning
Objectives fine-tuning
2014-09-20 14:22:36 +02:00
Matthias Mailänder
9601f8b833 Merge pull request #6511 from steelphase-forks/bleed
Creation of Mods.Common.
2014-09-20 14:05:58 +02:00
obrakmann
6e349d3052 Merge pull request #6510 from pchote/fix-inaccuracy-crash
Move inaccuracy modifier queries outside the projectile ctors.
2014-09-20 12:24:57 +02:00
Oliver Brakmann
09bda8b709 Remove stats button from end-game dialog in mission-type maps
Still available for skirmish games and replays.
2014-09-20 12:17:53 +02:00
Oliver Brakmann
928ee9c625 Add a chat tab to end-game window
Fixes #6422
2014-09-20 12:17:53 +02:00
Paul Chote
caecf2d82a Move inaccuracy modifier queries outside the projectile ctors. Fixes #6449. 2014-09-20 21:43:00 +12:00
Paul Chote
5fb2475b3c Merge pull request #6505 from abcdefg30/beaconfix
Remove beacons when the badgers get shot down
2014-09-20 21:20:35 +12:00
Oliver Brakmann
1db6388bd4 Update existing maps 2014-09-20 10:42:40 +02:00
Oliver Brakmann
6f538e0180 Add more functions for objectives management to Lua API 2014-09-20 10:42:40 +02:00
abcdefg30
4f0b18a3dc Remove beacons when the badgers get shot down 2014-09-20 09:32:42 +02:00
Matthias Mailänder
f5a1122c6d Merge pull request #6513 from steelphase-forks/windows-dll-update
Fixes #6508
2014-09-20 09:24:45 +02:00
steelphase
35b7493641 Update third party Windows DLLs
http://kcat.strangesoft.net/openal-soft-1.16.0-bin.zip
2014-09-19 22:29:10 -04:00
steelphase
3a72153a3d Create Mods.Common
Create a small base for Mods.Common and update solution and makefile to use it
2014-09-19 22:05:45 -04:00
Paul Chote
83dd4db909 Merge pull request #6506 from abcdefg30/beaconcancel
Allow canceling beacons with right click
2014-09-20 08:34:12 +12:00
abcdefg30
c34719e597 Allow canceling beacons with right click 2014-09-19 13:36:17 +02:00
Oliver Brakmann
97ce246a27 Prevent already failed objectives from being marked as completed
The same change was not and must not be done in the reverse case. It
should be and is possible to mark an already completed objective as
failed.

Consider a case where a player is supposed to capture, but not destroy,
a building.  He captures it, the objective is complete.  However, later
in the game that building gets destroyed. In this case, the objective
should be changed to failed.
2014-09-18 18:32:52 +02:00
Paul Chote
6c399e50a8 Merge pull request #6492 from LipkeGu/patch-7
Added my Name "Guido Lipke" under Section "Thanks to"
2014-09-18 22:09:28 +12:00
LipkeGu
181f9cdea4 Added me to Thanks list :)
Added my Name "Guido Lipke" under Section "Thanks to"
2014-09-18 11:50:54 +02:00
Paul Chote
3b5751b181 Merge pull request #6467 from Mailaender/zeus-miss-unscale
Fixed a glitch at the tech center on map Zeus
2014-09-18 21:17:14 +12:00
Paul Chote
bd682ceebc Merge pull request #6489 from LipkeGu/patch-5
Added return values for "Timeout" and "DNS" Errors
2014-09-18 21:09:28 +12:00
Paul Chote
09fb31721d Merge pull request #6490 from LipkeGu/patch-6
[TS] Fix Shroud revealing on Structures (PROC, GALIGHT)
2014-09-18 21:07:12 +12:00
Paul Chote
dbba609cba Merge pull request #6487 from reaperrr/td-explo-cleanup
Removed obsolete legacy explosion sequences from TD mod
2014-09-18 21:03:17 +12:00
LipkeGu
be38c873bf PROC: Fix Shroud revealing use "6c0" instead of "6"
- PROC doesnt reveal shroud, because all Buildings have Xc0 as Value and PROC has only "6" instead of "6c0"
- GALIGHT (Civillian Light post): increase Shroud reveal from "0c0" up to "2c0"
2014-09-18 09:16:16 +02:00
LipkeGu
06f852070c Added return values for "Timeout" and "DNS" Errors
Added Return value for:
- WebExceptionStatus.NameResolutionFailure : "DNS lookup failed"
- case WebExceptionStatus.Timeout: "Connection timeout"
2014-09-18 00:07:11 +02:00
Chris Forbes
6ca6588798 Merge pull request #6471 from reaperrr/missile-lockon
Added functionality and descriptions to Missile projectile
2014-09-18 09:12:21 +12:00
reaperrr
e9d3397abd Removes obsolete legacy explosion sequences from TD mod. 2014-09-17 23:03:06 +02:00
jonathanmiles
b9867004cb AI no longer calls support power on things it can't target (e.g. cloaked stealth tanks) 2014-09-17 21:52:08 +01:00
Matthias Mailänder
843c139edd Merge pull request #6485 from LipkeGu/patch-3
Use the current selected terrain Palette from the selected Map.
2014-09-17 22:27:29 +02:00
LipkeGu
b956759480 Use the current selected terrain Palette from the selected Map.
Use the current selected terrain Palette from the defined Tileset in the Map. 
- The Tileset is defined in "map.yaml" at "Tileset:"
- The color palette is defined in the "<Tileset>.yaml" at "Palette:"
2014-09-17 22:12:22 +02:00
Matthias Mailänder
52610ab1d5 Merge pull request #6482 from LipkeGu/patch-1
Assign Audio files to the "NoBuild", "DisablePower", "EnablePower" and  "ReinforcementsArrived" events
2014-09-17 21:35:27 +02:00
LipkeGu
51d0d7c3b5 Update notifications.yaml
Assigned Audio files to Sound-Notification event:
- 00-i232 (Building offline) to DisablePower
- 00-i230 (Building online) to EnablePower 

Assigned Audio files to Speech-Notification event:
- 00-i064 (cannot comply, building in progress) to NoBuild:
- 00-i038 (Reinforcements have arrived) to ReinforcementsArrived:
2014-09-17 20:22:03 +02:00
reaperrr
3c6dc5650e Merge pull request #6462 from Mailaender/ts-silo
Added all the Tiberian Sun silo sequences
2014-09-17 19:29:29 +02:00
obrakmann
cbf4203525 Merge pull request #6479 from reaperrr/visc-death-fix
Disabled WithDeathAnimation for TS visceroids
2014-09-17 17:47:58 +02:00
obrakmann
b4beb0ff54 Merge pull request #6474 from jonathanmiles/fix-stealth-tank-cloak
Fix for stealth tanks needing cloak upgrade
2014-09-17 17:27:57 +02:00
reaperrr
5703539acd Disable WithDeathAnimation for TS visceroids.
Fixes #6476.
2014-09-17 12:57:59 +02:00
s1ww
b8d683a3bd poland-raid map file 2014-09-16 23:12:54 +02:00
s1ww
a17628b562 Updating outdated maps 2014-09-16 21:31:16 +02:00
reaperrr
3276db5f92 Use new missile features on TS Bazooka. 2014-09-16 16:14:15 +02:00
reaperrr
eb732572ba If we cache world anyway, might as well use it everywhere. 2014-09-16 16:14:14 +02:00
reaperrr
5cda0853b6 Adds LockOnProbability to missiles.
Turns CloseEnough from a hack into a feature.
Adds some descriptions.
Caches args.SourceActor.World.
2014-09-16 16:14:13 +02:00
jonathanmiles
b51df8a93c Fix for stealth tanks needing cloak upgrade 2014-09-15 22:52:26 +01:00
Matthias Mailänder
14709135d4 fix a syntax error 2014-09-14 17:05:39 +02:00
Matthias Mailänder
0e00bbe6e7 fix a bib rendering problem due to manual sprite scaling 2014-09-14 17:05:05 +02:00
Matthias Mailänder
01f83b8d4a Merge pull request #6463 from MatthijsBenschop/Apollo-map-tiles-fix
Tile misplacement in zeus and apollo map.
2014-09-14 16:59:21 +02:00
Matthias Mailänder
d4a3a3f97f setup all the silo sequences 2014-09-14 15:38:46 +02:00
Matthijs Benschop
fdc0f23bab Tile misplacement in zeus and apollo map.
Fixes #6443
2014-09-14 15:24:07 +02:00
Matthias Mailänder
6de603bc42 Merge pull request #6342 from Phrohdoh/TibSunAI
TS TestAI and more.
2014-09-14 15:23:15 +02:00
Taryn Hill
80ca506e74 Fix GAPOWR.
Fix PROC.
Add Guard/Guardable to ^Helicopter.
Add GASILO.
Add TS Test AI

^Building now has FrozenUnderFog.
2014-09-14 08:11:48 -05:00
Matthias Mailänder
204d9b0450 Merge pull request #6459 from reaperrr/ima-aud-style
Renamed AdpcmLoader to ImaAdpcmLoader
2014-09-14 14:12:07 +02:00
reaperrr
7589e010c3 Back-port some style fixes from ImaAdpcmLoader to AudLoader. 2014-09-14 13:32:37 +02:00
reaperrr
fec5eb178c Rename Adpcm to ImaAdpcm everywhere.
To avoid confusion with Microsoft ADPCM and other ADPCMs.
2014-09-14 13:27:46 +02:00
Matthias Mailänder
bf02d60e30 Merge pull request #6283 from reaperrr/sprite-barrel
Adds WithBarrel trait
2014-09-14 12:54:09 +02:00
Matthias Mailänder
c7c816f22e Merge pull request #6455 from reaperrr/blocksbullets
Renamed Wall to BlocksBullets
2014-09-14 12:51:44 +02:00
reaperrr
e8b9397e1a Update Bullet & Missile descriptions for Wall->BlocksBullets 2014-09-14 11:53:26 +02:00
Matthias Mailänder
53f926b792 Merge pull request #6442 from pchote/no-mission-replays
Closes #6210
2014-09-14 08:54:36 +02:00
Matthias Mailänder
960ca678e6 Merge pull request #6451 from reaperrr/td-civcap
Closes #4487
2014-09-14 08:49:49 +02:00
Matthias Mailänder
9ea3caccaa Merge pull request #6452 from pchote/more-osx-launcher
More OSX launcher tweaks
2014-09-14 08:47:05 +02:00
Matthias Mailänder
819ad44d93 Merge pull request #6453 from reaperrr/wda-followup
Follow-up to #6396 (WithDeathAnimation)
2014-09-14 08:43:51 +02:00
reaperrr
0116bf169a Upgrade rule for Wall -> BlocksBullets + Crushable transition 2014-09-14 01:33:49 +02:00
reaperrr
8c1ab03623 Wall -> Crushable + BlocksBullets yaml changes 2014-09-14 01:33:48 +02:00
reaperrr
60eae9f229 Replace Wall trait with BlocksBullets 2014-09-14 01:33:47 +02:00
reaperrr
4b94d964ca Adds WithBarrel trait. 2014-09-14 01:24:42 +02:00
reaperrr
c451b07c05 Fixes wrong palette for crushed death anim. 2014-09-14 01:03:37 +02:00
Paul Chote
eab8e2e6e2 Merge pull request #6396 from reaperrr/with-deathanim
Added WithDeathAnimation
2014-09-14 10:37:07 +12:00
Paul Chote
59a7351cdd More OSX launcher tweaks:
* Require a framework install of Mono, as our .config files reference dylibs installed to the frameworks dir.
* Bump the minimum Mono version to 3.2, which included the SGen GC.
* Update download link for the new mono website.
* Reference the MRE package to reduce potential confusion.
2014-09-14 10:18:52 +12:00
Matthias Mailänder
054cdf13c0 Merge pull request #6450 from obrakmann/fix6444
Prevent a NullReferenceException in GameInfoStatsLogic
2014-09-13 18:52:56 +02:00
reaperrr
1b19ac09aa Adds "Civilian building captured" notification to TD. 2014-09-13 18:35:49 +02:00
reaperrr
f0705f532b Remove duplicate death sequences from dinos and ants.
Fixes stegosaur death anim palette (no longer shows team color).
2014-09-13 17:22:28 +02:00
reaperrr
46bc3418ea InfDeath -> DeathType upgrade rule fix 2014-09-13 17:21:31 +02:00
reaperrr
1b2ae9b4d4 Upgrade rules for WithDeathAnimation and Crushable renaming 2014-09-13 17:21:30 +02:00
reaperrr
409d6a046d Rename CrushableInfantry to Crushable, adapt to WithDeathAnimation.
Make Crushable compatible with non-mobile actors.

Change RA, TD and TS infantry die-crushed sequence ZOffsets in preparation
for future engine changes.

Add descriptions and CrushedByFriendlies to Crushable.

Adapt code to factor in whether the palette is a player palette.
2014-09-13 17:21:30 +02:00
reaperrr
257c953089 WithDeathAnimation yaml changes 2014-09-13 15:57:14 +02:00
reaperrr
3dd5fe988d Move SpawnsCorpse functionality from RenderInfantry into its own WithDeathAnimation trait.
Add descriptions and player palette booleans to WithDeathAnimation.
2014-09-13 15:57:06 +02:00
Matthias Mailänder
636e1b5102 Merge pull request #6441 from pchote/paste
Support pasting clipboard text into TextFields.
2014-09-13 15:02:15 +02:00
Oliver Brakmann
6a9a70d7b9 Fix #6444 2014-09-13 14:03:17 +02:00
obrakmann
006f11ccf4 Merge pull request #6446 from Mailaender/server-joined-game
Polished status message wording in the lobby
2014-09-13 12:11:26 +02:00
Matthias Mailänder
f4b3a73af6 remove duplicated "Server: ... the server" wording 2014-09-13 11:22:09 +02:00
ScottNZ
b1132fae44 Remove weird "package manifest" line from ra's voices.yaml 2014-09-13 20:22:47 +12:00
Matthias Mailänder
6fe3800268 Merge pull request #6437 from pchote/fix-crate-crash
Fixes #5953
Fixes #6427
2014-09-13 08:25:32 +02:00
Paul Chote
b1de14bc70 Disable replay saving for campaign missions. 2014-09-13 18:08:14 +12:00
Matthias Mailänder
2aabc2686c Merge pull request #6440 from pchote/authors
Update the current developers in AUTHORS.
2014-09-13 07:58:43 +02:00
Matthias Mailänder
a50e27b754 Merge pull request #6438 from pchote/avoid-3point8-fail
Add a symlink to libgdiplus in the OS X package.
2014-09-13 07:57:22 +02:00
ImagoTrigger
eb2124bb89 Adds ability to paste text (ctrl/cmd+v) into chat. 2014-09-13 09:41:59 +12:00
Paul Chote
359dc90a27 Update the current developers in AUTHORS. 2014-09-13 09:12:16 +12:00
Paul Chote
aebb6f6918 Merge pull request #6418 from Mailaender/d2k-idle-stand
Cleaned up Dune 2000 infantry sequences
2014-09-13 08:42:49 +12:00
Paul Chote
eddcfd7362 Merge pull request #6426 from obrakmann/fix6421
Fix a number or bugs wrt shroud/selection interaction in observer mode
2014-09-13 08:34:22 +12:00
Paul Chote
750b3b019f Add a symlink to libgdiplus in the OS X package. Closes #6413. 2014-09-12 21:31:57 +12:00
Paul Chote
b009913e64 Clean up DuplicateUnitCrateAction. 2014-09-12 20:06:52 +12:00
Paul Chote
e95974153d Unify the code style across crate actions. 2014-09-12 20:06:52 +12:00
Paul Chote
8ec8f82178 Destroy a paradropped crate if it lands on something that can’t collect it. Fixes #5953, #6427. 2014-09-12 20:06:52 +12:00
Matthias Mailänder
6e5d1da468 Merge pull request #6425 from obrakmann/mission-polish
Mission follow-up
2014-09-09 21:07:41 +02:00
Oliver Brakmann
1201a628d6 Replace pre-placed Nod units with reinforcements 2014-09-09 19:00:19 +02:00
Matthias Mailänder
bdbf0a7290 Merge pull request #6432 from TWaalen/upstream/luadocs-null-placeholder
Fixes #6078
2014-09-08 22:06:17 +02:00
Thijs Waalen
2da4a53155 Replace the empty defaults caused by a null default with nil 2014-09-08 21:59:58 +02:00
Matthias Mailänder
c204e185bc Merge pull request #6388 from DeadlySurprise/bleed
Closes #6198
2014-09-08 06:03:50 +02:00
Matthias Mailänder
0de4c233cf Merge pull request #6428 from reaperrr/landing-craft-fix
Closes #6419
2014-09-07 18:51:19 +02:00
reaperrr
e071cd017b Fixes that only turrets of exiting units are drawn on top of landing craft. 2014-09-07 16:21:26 +02:00
Matthias Mailänder
9c3baabb6e Merge pull request #6423 from TWaalen/upstream/fix-spelling-luadocs
LuaDocs/Desc attributes spelling fixes
2014-09-07 08:37:01 +02:00
Oliver Brakmann
44582ae647 Fix another shroud/selection bug in observer mode
In a player view, enemy units would not be unselected when they entered
the shroud.
2014-09-07 01:10:52 +02:00
Oliver Brakmann
bc50e1b0e2 Reset selection when switching player shroud in observer mode
The selection will be reset when switching from any shroud view to a
player shroud view. The selection will be kept when switching from any
view to either 'All players' or 'Shroud disabled' view.
2014-09-07 00:55:23 +02:00
Oliver Brakmann
eff54a614b Fix selection glitch in observer mode
Fixes #6421.
2014-09-07 00:52:55 +02:00
Thijs Waalen
de66e947e0 Changed "the player" to "this player" for the mission objective properties 2014-09-07 00:21:38 +02:00
obrakmann
d56c1fa450 Merge pull request #6378 from Mailaender/desert-shellmap-lua-cleaning
Desert shellmap Lua maintenance
2014-09-06 23:14:09 +02:00
Thijs Waalen
3a80ee27cd Fix spelling for Actor.Create description 2014-09-06 21:56:33 +02:00
Thijs Waalen
4f4bdf249b Fix wrong changes of possessive 2014-09-06 21:42:19 +02:00
Thijs Waalen
f47fe75970 LuaDocs consistency fixes 2014-09-06 19:29:38 +02:00
Thijs Waalen
eb959c5858 LuaDocs punctuation fixes 2014-09-06 19:29:37 +02:00
Thijs Waalen
a9b5e1d911 LuaDocs spelling fixes 2014-09-06 19:29:37 +02:00
DeadlySurprise
7183c52a2e Adds damage debug overlay 2014-09-06 16:16:36 +02:00
Matthias Mailänder
8e4b5af352 Merge pull request #6414 from ScottNZ/balance
Some RA balance work
2014-09-06 14:13:43 +02:00
Matthias Mailänder
2a16fe0d6d Merge pull request #6399 from DeadlySurprise/dlPolish
Fixes #6186
2014-09-06 13:57:11 +02:00
Matthias Mailänder
64cf785103 Merge pull request #6397 from obrakmann/cnc-stats
Enable viewing game stats after the game ends
2014-09-06 13:52:16 +02:00
Matthias Mailänder
52aba46b10 Merge pull request #6392 from ingemaradahl/debug-symbols
Copy mod .mdb symbol file together with .dll
2014-09-06 13:40:59 +02:00
Matthias Mailänder
c090c0fe69 remove duplicate bazooka stand sequences 2014-09-06 12:27:55 +02:00
Matthias Mailänder
1183ab8e0d add missing grenadier idle animation 2014-09-06 12:27:43 +02:00
Matthias Mailänder
6f3df2611e remove fake idle animations 2014-09-06 12:27:35 +02:00
Matthias Mailänder
a823b9e5ed Merge pull request #6417 from pchote/fix-infantry-animations
Fixes #6416. Reopens #5884.
2014-09-06 12:21:58 +02:00
Oliver Brakmann
b1ff492ac9 make gdi04c a bit easier 2014-09-06 12:13:32 +02:00
Oliver Brakmann
001ea9a30d Fix mission accomplished notifications and video playback 2014-09-06 12:13:11 +02:00
Oliver Brakmann
bf9a63ff95 Rename widgets 2014-09-06 11:18:47 +02:00
Oliver Brakmann
c61516c55e Add stats button to end game dialog
Also adds the statistics window to TD.  There is no button for it in
observer mode, though, but it is available from the end game dialog.

Fixes #6312.
2014-09-06 11:18:47 +02:00
Paul Chote
6fb4963a57 Revert "fix infantry without idle anim staying in fire animation state"
This reverts commit 1c65b29a30.
2014-09-06 20:42:25 +12:00
ScottNZ
48fe6cccc7 Remove MustBeDestroyed from ra support structures 2014-09-06 19:47:04 +12:00
ScottNZ
4098ad8f98 Remove MustBeDestroyed from cnc support structures 2014-09-06 19:32:44 +12:00
Paul Chote
05f2a06204 Merge pull request #6325 from obrakmann/gdi04c
Port gdi04c to New Lua
2014-09-06 10:55:17 +12:00
Paul Chote
4cd14690f6 Merge pull request #6328 from obrakmann/nod03b
Port nod03b to New Lua
2014-09-06 10:39:16 +12:00
Paul Chote
60c0f47fb3 Merge pull request #6327 from obrakmann/nod03a
Port nod03a to New Lua
2014-09-06 10:28:26 +12:00
Paul Chote
538af31b54 Merge pull request #6398 from obrakmann/pr6303_addendum
Fix an omission from #6303
2014-09-06 10:09:12 +12:00
Paul Chote
ede046cc0c Merge pull request #6331 from Mailaender/infantry-noidle-fix
Fixed Dune 2000 infantry not showing the waiting animation when ordered to stop firing
2014-09-06 09:30:55 +12:00
Oliver Brakmann
da454de398 Complete ArmorModifier->DamageModifier rename
PR #6303 neglected to rename the "armor" upgrade to "damage" in all
necessary places, as mentioned in
https://github.com/OpenRA/OpenRA/pull/6303#issuecomment-53312209
2014-09-05 19:52:35 +02:00
Matthias Mailänder
9b6a5320a4 paradrop zombies instead of ants 2014-09-05 15:42:54 +02:00
Matthias Mailänder
128b2b8b67 rename the boolean 2014-09-05 15:42:38 +02:00
Matthias Mailänder
60d31e643e remove reference to non-existing idle sequences 2014-09-05 15:29:43 +02:00
Matthias Mailänder
2ccc6f63e0 Merge pull request #6362 from atlimit8/SellingSounds
Moved SellSounds from Building to Sellable & added upgrade to rules
2014-09-05 15:17:13 +02:00
obrakmann
efcf66206e Merge pull request #6344 from reaperrr/accuracy-modifier
Added InaccuracyModifier
2014-09-04 22:43:01 +02:00
atlimit8
cc9c253419 Moved SellSounds from Building to Sellable & added upgrade to rules. 2014-09-04 15:25:19 -05:00
reaperrr
9bb9f870d7 Improve accuracy on level-up. 2014-09-04 20:28:34 +02:00
reaperrr
5e9b0a964f Adds InaccuracyModifier. 2014-09-04 20:28:34 +02:00
ScottNZ
4212d04f10 Double projectile speed of AA gun so it misses less often 2014-09-04 17:16:08 +12:00
ScottNZ
6bde85beda Increase prices of yak and hind from $1000 to $1350 (Implicit build time increase as well). 2014-09-04 16:57:02 +12:00
ScottNZ
7e5664b48c Hind and Longbow were a bit too tanky, so reduced their HP levels from 150 to 100 and 150 to 120 respectively. 2014-09-04 16:56:56 +12:00
ScottNZ
ba7a017489 Remove C4 target type from ra vehicles - Tanya was a bit too strong C4ing vehicles 2014-09-04 16:18:04 +12:00
ScottNZ
dc12dff351 Add cloak detection abilities to all ra defenses
(not hbox because it already has cloak detection)
2014-09-04 16:18:03 +12:00
DeadlySurprise
df1df7dedb Improved download progress formatting 2014-09-04 00:12:04 +02:00
Oliver Brakmann
49adf023bb Remove unused usings and arguments 2014-09-03 22:05:06 +02:00
obrakmann
3f23930121 Merge pull request #6347 from mizipzor/tab-completion
Improves tab completion in chat.
2014-09-03 18:43:14 +02:00
Alexander Fast
16965d5797 Improves tab completion in chat.
Pressing tab after completion now cycles to the next candidate.
2014-09-03 11:43:26 +02:00
Paul Chote
f9255ecc49 Merge pull request #6360 from huwpascoe/clientstatus
Player connection status report.
2014-09-03 19:20:23 +12:00
Paul Chote
674998c0ee Merge pull request #6335 from obrakmann/fix6311
Fix end game window conflicting with ingame menu
2014-09-03 18:54:51 +12:00
Paul Chote
31e0ed7001 Merge pull request #6371 from reaperrr/d2k-death-sequences
Fixed D2k infantry death sequences
2014-09-03 08:35:59 +12:00
Ingemar Ådahl
03815a1c8d Copy mod .mdb symbol file together with .dll
Allows for MonoDevelop to debug execution in mod library properly.
2014-09-02 21:15:47 +02:00
Matthias Mailänder
99156451c0 bring back Chinook infantry insertion 2014-08-31 20:38:19 +02:00
Matthias Mailänder
0b8ae4088e use the new reinforcements methods 2014-08-31 20:38:19 +02:00
Matthias Mailänder
03afd1db5d avoid magic numbers 2014-08-31 20:38:19 +02:00
Matthias Mailänder
a7389a0e45 make this a seasonal easter egg 2014-08-31 20:38:16 +02:00
huwpascoe
ffd17af363 Disconnected clients now listed as '(Gone)'. 2014-08-31 18:25:23 +01:00
Matthias Mailänder
5b12ba1c21 refactor and move ShipUnitTypes to the top 2014-08-31 14:45:11 +02:00
Matthias Mailänder
154f6ba297 remove bogus space tabs 2014-08-31 14:29:24 +02:00
Oliver Brakmann
e0af4cf671 Port nod03b to New Lua 2014-08-31 12:53:56 +02:00
Oliver Brakmann
e50b8fafb0 Fix a typo in gdi02 2014-08-31 12:37:28 +02:00
Oliver Brakmann
105a928195 Port nod03a to New Lua 2014-08-31 12:36:24 +02:00
Paul Chote
9ed9096551 Merge pull request #6324 from obrakmann/gdi02
Port gdi02 to New Lua
2014-08-31 21:57:57 +12:00
Paul Chote
c2d748e711 Merge pull request #6326 from obrakmann/nod01
Port nod01 to New Lua
2014-08-31 21:54:12 +12:00
Oliver Brakmann
62baed1c5f Port gdi02 to New Lua 2014-08-31 11:50:41 +02:00
obrakmann
a23cdc6178 Merge pull request #6369 from Mailaender/nickname-change-message
Added a server message about nickname changes
2014-08-31 11:40:17 +02:00
obrakmann
7b8e774b08 Merge pull request #6319 from abcdefg30/fortlonestar
Small cleanup on fort-lonestar map
2014-08-31 11:30:39 +02:00
Matthias Mailänder
a81ce5f318 replace bogus tab with space 2014-08-31 09:23:10 +02:00
Matthias Mailänder
981fff95e1 add missing TakeCover trait 2014-08-31 09:23:10 +02:00
Matthias Mailänder
1c65b29a30 fix infantry without idle anim staying in fire animation state
closes #5884
2014-08-31 09:23:10 +02:00
Matthias Mailänder
52de40f252 remove bogus tab 2014-08-31 09:23:05 +02:00
Matthias Mailänder
44441bf20e remove unused duplicate stand sequences 2014-08-31 09:16:39 +02:00
Matthias Mailänder
4fd4089e54 self-document and un-hardcode the prone sequence prefix 2014-08-31 09:16:39 +02:00
Matthias Mailänder
c867d04986 inform players about nickname changes in the lobby 2014-08-31 09:11:24 +02:00
reaperrr
d438f0efde Fix wrong sequence lengths 2014-08-31 00:33:48 +02:00
reaperrr
80b03dc624 Fix D2k infantry death sequences. 2014-08-31 00:05:14 +02:00
obrakmann
c72bca68ea Merge pull request #6372 from reaperrr/infdeath-to-deathtype
Renamed InfDeath to DeathType
2014-08-30 23:40:48 +02:00
Paul Chote
479b8e13d6 Merge pull request #5891 from Mailaender/d2k-captureable-tech
Added captureable tech for Dune 2000
2014-08-31 09:10:35 +12:00
abcdefg30
5b97076769 Readd correct buildingspeed modifier 2014-08-30 18:24:17 +02:00
Matthias Mailänder
911f79e86f fix production queues and prerequisites 2014-08-30 18:16:36 +02:00
abcdefg30
9a87a7cd10 moved mediamessage to avoid spam 2014-08-30 18:16:36 +02:00
abcdefg30
2e431bb95b removed unused buildable: owner: ... 2014-08-30 18:16:35 +02:00
abcdefg30
adcfdbd391 added ftur and removed hbox 2014-08-30 18:16:35 +02:00
abcdefg30
1e3804b729 unit -> units to avoid crashes 2014-08-30 18:16:34 +02:00
reaperrr
c17b284051 UpgradeRules for InfDeath -> DeathType renaming. 2014-08-30 18:06:07 +02:00
reaperrr
3725ce4f7b InfDeath -> DeathType renaming. 2014-08-30 18:06:05 +02:00
Matthias Mailänder
c1ca55b303 Merge pull request #6208 from atlimit8/FixUnloadCargo
Fixed UnloadCargo stacking using new subcell API exposure
2014-08-30 14:38:17 +02:00
Matthias Mailänder
afe3560fc5 Merge pull request #6346 from abcdefg30/dropzones
Updated dropzone maps
2014-08-30 14:13:50 +02:00
Matthias Mailänder
0470118f2a Merge pull request #6351 from abcdefg30/fixshore
Fixes #6195
2014-08-30 14:03:41 +02:00
reaperrr
0cd244641a Merge pull request #6368 from Mailaender/squishy-unhardcode
Removed hard-coded squishy sounds to avoid confusion
2014-08-30 12:53:51 +02:00
obrakmann
0181347141 Merge pull request #6304 from pchote/fix-laser-vis
Don’t display LaserZap if source and dest are hidden.
2014-08-30 12:02:49 +02:00
atlimit8
8ad1140921 Reduce ICrushable trait lookup & drop -SubCell suffix.
Replace `a.HasTrait<ICrushable>()` with a.TraitsImplementing<ICrushable>().Any() or equivalent.
2014-08-30 04:43:57 -05:00
Matthias Mailänder
db1e9b9c24 don't hard-code sounds for one mod to avoid confusion 2014-08-30 10:32:57 +02:00
Matthias Mailänder
fb1a33da1d Merge pull request #6366 from reaperrr/sound-cleanup
Minor sound fixes for RA and TS
2014-08-30 10:13:23 +02:00
Matthias Mailänder
a92dd17d92 Merge pull request #6279 from mizipzor/new-dialong-png-fix
Fix for blinking vivid red color on unread news
2014-08-30 10:04:22 +02:00
Matthias Mailänder
1ffa88a750 Merge pull request #6162 from UberWaffe/WeaponDiplomacyCheck
Closes #5618
2014-08-30 09:39:05 +02:00
Matthias Mailänder
dadc0903be Merge pull request #6239 from TiagoMLSousa/ISSUE2820_DisableSimilarColors
Issue #2820 - Disable similar colors
2014-08-30 09:21:18 +02:00
atlimit8
e29b9edfc1 Changes to map.cs, rename IPositionable.IsLeaving{ => Cell}, add IPositionable.GetValidSubCell 2014-08-29 23:30:16 -05:00
atlimit8
63c28ee4d7 Refactored in new enum SubCell 2014-08-29 23:00:53 -05:00
atlimit8
27ad5208fb Fixed Mobile.SetPosition & other FixUnloadCargo touch-ups
Fixed Mobile.SetPosition
Finally removed old SubCell enum
Folded MobileInfo.CanEnterCell overloads into one
Renamed IPositionable.{IsMovingFrom => IsLeaving}
Changed Crate.IsLeaving to use crate lifetime
2014-08-29 23:00:53 -05:00
atlimit8
b2c9064545 Refactored [sub-]cell availability logic in IPositionable & ActorMap
Moved the logic from IPositionable.CanEnterCell & integrated sub-cell selection.
Added IPositionable.IsMovingFrom(CPos location, int subCell = -1) - to detect transient actors
Renamed IPositionable.{GetDesiredSubcell => GetAvailableSubcell} - since it checks for available sub-cells
Reduced IPositionable.CanEnterCell to one method that usually uses IPositionable.GetAvailableSubcell
Added actor checking to ActorMap.{HasFreeSubCell, FreeSubCell, AnyUnitsAt} - used by [sub-]cell availability logic
2014-08-29 23:00:53 -05:00
atlimit8
ff7ad53dee Fixed UnloadCargo stacking using new subcell API exposure 2014-08-29 23:00:53 -05:00
atlimit8
9efcf231e1 Refactor MobileInfo.CanEnterCell 2014-08-29 23:00:53 -05:00
atlimit8
fe57417aa8 Added int subCell = -1 to IMove.MoveIntoWorld & IPositionable.SetPosition(Actor self, CPos cell) 2014-08-29 23:00:53 -05:00
Tiago Sousa
ce68d67f0b Disallow same/similar colors (fixes #2820) 2014-08-30 01:53:38 +01:00
reaperrr
b3e0f9b989 Fix TS CrushSounds.
squish2.aud doesn't exist in TS, and Cyborgs aren't crushable anyway.
2014-08-30 02:28:06 +02:00
reaperrr
498b2dd028 Fix Parachutable GroundImpactSound.
squishy2.aud only exists in ts.
2014-08-30 02:27:04 +02:00
Paul Chote
921d77f825 Merge pull request #6202 from ScottNZ/spyabilities
Add power sabotage ability to spy
2014-08-30 10:26:09 +12:00
obrakmann
d9933e9be0 Merge pull request #6358 from huwpascoe/bleed
Cloaked APCs are no longer unstoppable harrassment machines.
2014-08-29 21:05:38 +02:00
huwpascoe
330cb0c488 UncloakOnUnload is now on by default. 2014-08-29 19:57:45 +01:00
abcdefg30
b51a2263b3 Fixed sh31 tile 2014-08-27 12:27:30 +02:00
Paul Chote
0db079ea94 Merge pull request #6321 from Mailaender/less-nervous-clicksounds
Fixed double click sound on Tiberian Dawn production tabs
2014-08-27 18:45:51 +12:00
ScottNZ
cc15d859e2 Have AI account for power outages 2014-08-27 18:45:09 +12:00
ScottNZ
b70395e27c Refactor more power and infiltration stuff. Create new power sabotage ability for spies in ra and ts. 2014-08-27 18:45:09 +12:00
Paul Chote
84cb5f14f5 Merge pull request #6318 from Mailaender/log-session-deserialize-exception
Fixed Session.Deserialize exceptions not throwing properly
2014-08-27 18:39:56 +12:00
reaperrr
4fa199fb10 Merge pull request #6320 from Mailaender/smudge-offset
Unhardcoded and self-documented more resource/smudge parameters
2014-08-26 22:25:32 +02:00
obrakmann
e1eb5a0927 Merge pull request #6340 from cjshmyr/fix6214
Add missing INotifyRemovedFromWorld impl to GlobalUpgradable
2014-08-26 16:42:47 +02:00
abcdefg30
1850794518 'Cleaned away' some unused traits 2014-08-26 12:57:42 +02:00
abcdefg30
b5bdb73447 Fixed crates spawning on inaccessable terrain 2014-08-26 12:52:48 +02:00
abcdefg30
ed5648f873 Disabled wrong crateactions 2014-08-26 12:51:06 +02:00
abcdefg30
2c2424d10e unit -> units to avoid crashes 2014-08-26 11:44:31 +02:00
UberWaffe
1fbcdfc3c3 AffectsParent defaulted to false. 2014-08-25 20:44:21 +02:00
UberWaffe
81cb26116f Ioncannon changed to limited Spread. (1000, 250, 100 damage in 1c1, 2c1, 2c512) 2014-08-25 20:44:21 +02:00
Curtis Shmyr
02a6c6ab77 Add missing INotifyRemovedFromWorld impl to GlobalUpgradable 2014-08-24 13:18:30 -06:00
Oliver Brakmann
fcd5a43659 Port gdi04c to New Lua 2014-08-24 18:49:29 +02:00
Oliver Brakmann
2f4c81b7c9 Fix end game window conflicting with ingame menu
Fixes #6311
2014-08-24 17:00:18 +02:00
Matthias Mailänder
8ebe6345aa Merge pull request #6323 from pchote/tib-craters
Render smudges beneath resources.
2014-08-24 16:50:28 +02:00
Matthias Mailänder
e6a1a2632e add captureable tech for Dune 2000 2014-08-24 08:41:54 +02:00
Matthias Mailänder
97b97a4dd2 bring back click sound for TAB and PageUp/Down 2014-08-24 08:29:19 +02:00
Matthias Mailänder
8649475b91 document engine limitations 2014-08-24 08:16:59 +02:00
Matthias Mailänder
5b4f8d1446 unhardcode and self-document more resource/smudge parameters 2014-08-24 08:13:40 +02:00
Paul Chote
944cfd83e2 Merge pull request #6281 from mizipzor/tab-completion
Added tab completion to in-game and lobby chat.
2014-08-24 17:29:38 +12:00
UberWaffe
e3e5e9eb00 Adds Diplomacy keywords for ValidTarget checks.
Changes:

Allows diplomacy stance checks to be done on warheads and weapons, using keywords in ValidTargets and InvalidTargets.
2014-08-24 07:00:21 +02:00
Paul Chote
ef7d198ca8 Merge pull request #6244 from havok13888/PalaceStarPortBib
Fixes #6013 D2K - Tiles that should unmoveable at Palaces bib
2014-08-24 11:51:52 +12:00
Paul Chote
e4b9872f82 Merge pull request #6291 from UberWaffe/ImpactTarget
Changes Weapon.Impact() to use Target (from WPos).
2014-08-24 09:38:15 +12:00
Paul Chote
966c933cd3 Render smudges beneath resources. Fixes #6270. 2014-08-24 09:15:41 +12:00
Paul Chote
ae0e456565 Merge pull request #6224 from cjshmyr/renderinfantry
RenderInfantry refactoring
2014-08-24 08:59:34 +12:00
Curtis Shmyr
083592e194 Add an update rule to replace RenderInfantryProne and RenderInfantryPanic with RenderInfantry 2014-08-23 14:44:05 -06:00
Curtis Shmyr
fa8229d53b Implement IRenderInfantrySequenceModifier for ScaredyCat and TakeCover 2014-08-23 14:42:55 -06:00
Curtis Shmyr
345e88d75a Add IRenderInfantrySequenceModifier 2014-08-23 14:42:16 -06:00
Oliver Brakmann
ccd6540e13 Port nod01 to New Lua 2014-08-23 22:14:17 +02:00
Matthias Mailänder
ac1544e8bd remove double click sound when switching production tabs
closes #5863
2014-08-23 21:45:55 +02:00
Matthias Mailänder
749314d04e tab to space 2014-08-23 21:44:57 +02:00
Matthias Mailänder
093fe1776f missing tab 2014-08-23 21:44:50 +02:00
Alexander Fast
af0efda6f5 Changes how the playerNames collection is created.
It's now extracted from the orderManager, like it's done in LobbyLogic.
This is to increase consistency.
2014-08-23 21:18:54 +02:00
Alexander Fast
38ab05aa3c Adds newsbutton style. 2014-08-23 20:58:07 +02:00
Alexander Fast
e820c32e35 Fixes button style. 2014-08-23 20:57:01 +02:00
Matthias Mailänder
12876c23a2 fix tried logging to non-existant channel exception
closes #6168
2014-08-23 19:15:46 +02:00
Matthias Mailänder
f0fc63b15d Merge pull request #6274 from abcdefg30/falsekillstats
Fixes #6223
2014-08-23 18:50:44 +02:00
abcdefg30
a3928bfcf0 Fixed displaying false stats 2014-08-23 18:04:24 +02:00
Matthias Mailänder
bc4c344cb0 Merge pull request #6284 from obrakmann/gdi01-touchup
More Lua API enhancements
2014-08-23 16:28:36 +02:00
Oliver Brakmann
d85b5d5a4f Replace explicit Dispose() calls with using statements in ScriptTrigger.cs 2014-08-23 16:21:40 +02:00
Oliver Brakmann
e434011487 Adjust gdi01 to use new functions 2014-08-23 16:21:40 +02:00
Oliver Brakmann
74c45d5d21 Add reinforcements functions to Lua API 2014-08-23 16:21:40 +02:00
Oliver Brakmann
882f3f34c2 Add a number of small helper functions to Lua API 2014-08-23 16:21:40 +02:00
Oliver Brakmann
d23707b5f7 Add OnCapture, OnAddedToWorld and OnRemovedFromWorld triggers to Lua API
This brings the new Lua API up to feature-parity with the old API in the
trigger department.
2014-08-23 16:21:40 +02:00
Oliver Brakmann
1c8a56d197 Make ScriptContext available in Actor- and PlayerProperty classes
Needed to return non-native types to Lua
2014-08-23 16:21:40 +02:00
Oliver Brakmann
1e7f04105d Fix OnObjective(Completed|Failed) not being called for secondary objectives 2014-08-23 16:21:39 +02:00
Oliver Brakmann
56466e312f Ensure that all combatants have a defined WinState at the end of the game 2014-08-23 16:21:39 +02:00
Oliver Brakmann
e6887503af Remove unused method 2014-08-23 16:21:39 +02:00
Matthias Mailänder
7cb7685d62 Merge pull request #6266 from huwpascoe/uiscaling
Cursor Doubling
2014-08-23 16:14:13 +02:00
Matthias Mailänder
08adfcd855 Merge pull request #6300 from pchote/fix-font-freeze
Disable fontconfig in packaged OSX build.
2014-08-23 15:29:18 +02:00
Matthias Mailänder
8e56b527b3 Merge pull request #6309 from pchote/fix-minelayer-exploit
Don’t leak information about hidden actors.
2014-08-23 14:46:50 +02:00
Matthias Mailänder
086d8704d2 Merge pull request #5867 from UberWaffe/AI-MetaData
Closes #2926
Closes #5830
Closes #6207
2014-08-23 14:29:58 +02:00
UberWaffe
a1e51b71d6 AI Support Power Meta Data implemented.
Changes included:
Decision can be defined for the AI support powers, governing their targeting.
Each decision can be made up of multiple considerations.
2014-08-23 12:01:30 +02:00
UberWaffe
76ccb0cf00 Changes Weapon.Impact() to use Target (from WPos). 2014-08-23 11:23:34 +02:00
Matthias Mailänder
60a3196bb2 Merge pull request #6301 from Phrohdoh/TibSunFixes
Tiberian Sun visual fixes.
2014-08-23 11:19:31 +02:00
Matthias Mailänder
152aad9cf9 Merge pull request #6315 from MustaphaTR/d2k-three-orni
D2k - 3 Ornithopter
2014-08-23 11:00:56 +02:00
obrakmann
022c1ae4d1 Merge pull request #6310 from pchote/shroud-reset-fix
Fix shroud hash updating.
2014-08-23 10:43:56 +02:00
Mustafa Alperen Seki
c6196ceb43 Update atreides.yaml 2014-08-23 11:35:52 +03:00
Mustafa Alperen Seki
3ae9c1d796 Added 3 orni. 2014-08-23 11:34:51 +03:00
Matthias Mailänder
c25c3441fb Merge pull request #6305 from pchote/fix-shroud-clear
Don’t clear shroud outside the map.
2014-08-23 10:34:47 +02:00
Matthias Mailänder
6bb392be11 Merge pull request #6303 from obrakmann/fix6263
Fixed invulnerable infantry
2014-08-23 10:28:15 +02:00
Oliver Brakmann
5c15fa2631 Fix a bad merge in UpgradeRules.cs 2014-08-23 10:15:13 +02:00
Paul Chote
3ad9144866 Merge pull request #6313 from Mailaender/CS0067-workaround
Fixed bogus warning as error CS0067 The event is never used
2014-08-23 20:08:01 +12:00
Matthias Mailänder
97cb527a8f Merge pull request #6306 from obrakmann/fix6298
Add creeps to scripted missions
2014-08-23 10:07:47 +02:00
Matthias Mailänder
a4ed71bf84 workaroud warning as error CS0067 The event is never used
closes #6101
2014-08-23 09:53:12 +02:00
Matthias Mailänder
834bc3ba24 Merge pull request #6265 from pchote/warhead-intification
Warhead cleanups
2014-08-23 09:31:41 +02:00
Paul Chote
32e099d60a Fix inner range filtering in HealthPercentageDamageWarhead. 2014-08-23 17:14:12 +12:00
Paul Chote
db1df48466 Increase falloff accuracy for large damage amounts. 2014-08-23 17:14:12 +12:00
Paul Chote
fa3e7b5e1b Convert versus to integers. 2014-08-23 17:14:12 +12:00
Paul Chote
50fea12a80 Remove now-redundant AbsoluteSpreadDamageWarhead. 2014-08-23 17:14:11 +12:00
Paul Chote
97c28e1353 Remove fp calculations from SpreadDamageWarhead. 2014-08-23 17:14:11 +12:00
Paul Chote
d002a23d67 Change EffectivenessAgainst to CanTargetActor. 2014-08-23 17:14:10 +12:00
Paul Chote
227a523878 Further warhead streamlining. 2014-08-23 17:14:10 +12:00
Paul Chote
57ba1b54b4 Convert weapon plumbing to use integer damage modifiers. 2014-08-23 17:14:10 +12:00
Paul Chote
8e8e02dae8 Move warheads into mod code. 2014-08-23 17:14:10 +12:00
Paul Chote
34ca30c9f1 Remove more unnecessary plumbing. 2014-08-23 17:14:10 +12:00
Paul Chote
1261d5891d Move common DoImpact(Target) method into DamageWarhead. 2014-08-23 17:14:09 +12:00
Paul Chote
531e3cfaf3 Fix shroud hash updating. Fixes #6308.
This ensures that multiple Invalidations() in one tick will each update the shroud rendering.
2014-08-23 15:25:39 +12:00
Taryn Hill
4abee8682f Visual fixes for TS structures and units. 2014-08-22 19:01:01 -05:00
Paul Chote
a781e44509 Don’t leak information about hidden actors. Fixes #6125. 2014-08-23 11:19:49 +12:00
Paul Chote
2acfc23f18 Account for map edges in Shroud.IsExploredCore. 2014-08-23 10:54:01 +12:00
obrakmann
af9c182d30 Merge pull request #6307 from pchote/osx-bundle-version
Set the package version in the OS X .app
2014-08-23 00:39:11 +02:00
Paul Chote
af1c9aca30 Set the package version in the OS X .app. 2014-08-23 10:08:28 +12:00
Christopher Grant
774c8121c2 Fixed invulnerable infantry
Closes #6263
2014-08-23 00:04:16 +02:00
Oliver Brakmann
5325fa7bae Add creeps to scripted missions
Fixes #6298
2014-08-23 00:00:40 +02:00
Paul Chote
80c4870a0f Don’t clear shroud outside the map. Fixes #6097. 2014-08-23 09:53:27 +12:00
Paul Chote
fc6d266278 Don’t display LaserZap if source and dest are hidden.
Closes #6146.
2014-08-23 09:47:46 +12:00
Paul Chote
aa71f59688 Disable fontconfig under OSX. Fixes #4785. 2014-08-22 23:33:23 +12:00
huwpascoe
baecedc7b8 Cursor Doubling
Cursor now doubles with pixel doubling, enabled by a new checkbox in the
settings menu.
2014-08-21 20:08:38 +01:00
huwpascoe
7d96a6ac96 Fixed SpriteRenderer offset bug. 2014-08-21 20:08:33 +01:00
obrakmann
6fcd4c3605 Merge pull request #6109 from WolfGaming/RemoveOnPrereq
Added a trait that removes an actor when prereqs are met, with delay.
2014-08-21 20:50:29 +02:00
WolfGaming
d619fbfbbe Added a trait that removes an actor when prereqs are met, with delay. 2014-08-21 18:42:37 +00:00
Alexander Fast
e934df374d Fixes double auto completion in in-game chat. 2014-08-21 13:12:29 +02:00
Alexander Fast
a73898d441 Fixes double auto completion.
Pressing tab twice would auto complete (the same name) twice.
Auto completion is now disabled when last character in sentence is a
space.
2014-08-21 13:05:04 +02:00
Alexander Fast
bab7f765dd Replaced GetPlayerNames method with simpler linq.
Bonus feature: it now auto complete bot names as well.
2014-08-21 13:02:17 +02:00
Alexander Fast
0c6f180f56 Replaced ForEach with loop, moved Trim outside. 2014-08-21 12:39:53 +02:00
Paul Chote
2bc17aee1f Merge pull request #6296 from mizipzor/fix-license
Fixes year numbers in license text in file headers.
2014-08-21 21:36:30 +12:00
Alexander Fast
070d00c678 Fixes year numbers in license text in file headers. 2014-08-21 11:27:52 +02:00
obrakmann
87e4d6b422 Merge pull request #6079 from reaperrr/rof-modifier
Adds ReloadDelay modifier & renames ROF to ReloadDelay
2014-08-21 00:27:39 +02:00
Paul Chote
a3a838cb3f Merge pull request #6089 from reaperrr/wavlength
Add WavSoundLength to show track length in music player
2014-08-20 23:56:02 +12:00
Alexander Fast
e9d488fd9c Update AUTHORS
Added myself as requested by Mailaender.
2014-08-20 12:45:49 +02:00
reaperrr
3e3f1394d9 Adds length display support for PCM & IMA music. 2014-08-20 08:22:40 +02:00
havok13888
d44e01e232 Fixed starport and palace 2014-08-19 18:24:46 -05:00
Alexander Fast
8b7f2e0321 Fixes outdated dialog.png in Tiberian Sun mod. 2014-08-19 22:51:49 +02:00
Alexander Fast
3160fa40f6 Added tab completion to lobby chat.
Also fixes accidental reversion of one word logic during cleanup.
Fields that could be readonly are now readonly.
2014-08-19 22:48:51 +02:00
Alexander Fast
ab61830d0f Code cleanup based on code review.
Fixes multiple enumeration of IEnumerable.
Fixes return value of pure method not used.
Converted OnTabKey and OnClick handlers to method groups.
Removed one set of redundant parenthesis.
Replaced explicit type with var.
2014-08-19 21:27:39 +02:00
Alexander Fast
034625c2ea Added tab completion to in-game chat.
Both player names and chat commands can be completed.
Names of local players and bots are not candidates for completion.
If a completed name is the first word ": " is appended to the end.
The hotkey for toggling team/all chat has been moved to left Alt.
2014-08-19 17:19:32 +02:00
Alexander Fast
bb88fddb0f Manual merge of dialog.png
The new file inclused both the black box and the new vivid red colors.
2014-08-19 09:36:46 +02:00
Sebastien Kerguen
12b2f45d2b Trying to fix Settings buttons 2014-08-19 09:26:39 +02:00
Sebastien Kerguen
dee2f1e67c fixed the Battlefield News button 2014-08-19 09:26:38 +02:00
Sebastien Kerguen
d9a8d09fbe chrome.yaml fixes 2014-08-19 09:26:37 +02:00
reaperrr
f588b07f56 Upgrade rule for ROF > ReloadDelay renaming. 2014-08-19 02:59:51 +02:00
reaperrr
d6ef37a750 ReloadModifier & ROF -> ReloadDelay yaml changes 2014-08-19 02:59:50 +02:00
reaperrr
4469b5f5ca Introduces ReloadModifier
and renames ROF -> ReloadDelay
2014-08-19 02:59:50 +02:00
Paul Chote
520df8242d Merge pull request #6217 from Mailaender/starting-units-classname
Fixed lobby start unit notifications not showing class names
2014-08-19 10:15:12 +12:00
obrakmann
f161d87d07 Merge pull request #6271 from pchote/map-kick-fix
Avoid sending the map change order when selecting the same map.
2014-08-18 20:01:15 +02:00
Paul Chote
774e516106 Suppress map change order when selecting the same map. Fixes #6206. 2014-08-19 00:13:48 +12:00
Paul Chote
fce732b060 Merge pull request #6255 from ScottNZ/generals
Add support for C&C Generals .big archive files
2014-08-18 22:21:21 +12:00
Matthias Mailänder
fa2b2bea0b beautify starting unit notification when joining server
move LobbySettingsNotification into it's own ServerTrait
2014-08-17 07:39:34 +02:00
ScottNZ
009dc79222 Add support for C&C Generals .big archive files 2014-08-17 17:02:38 +12:00
Paul Chote
e2ede4ec24 Merge pull request #6201 from cjshmyr/morelua
Add more Lua functions
2014-08-17 12:54:30 +12:00
Paul Chote
d9dc514d37 Merge pull request #6262 from Mailaender/silo-placement-loop-glitch-fix
Fixed silo fullness animations loop during building placement
2014-08-17 12:36:17 +12:00
Matthias Mailänder
da7caa6105 Merge pull request #6183 from UberWaffe/6030Fix_UpgradeRules
Closes #6177
Closes #6222
Closes #6240
Closes #6245
2014-08-16 18:07:56 +02:00
Matthias Mailänder
df09d16a1c Merge pull request #6218 from pchote/percentmods
Change attribute modifiers to use integers.
2014-08-16 17:28:37 +02:00
Matthias Mailänder
29dc1b574c fix silo animations playing during building placement
closes #6258
2014-08-16 17:17:25 +02:00
UberWaffe
256f6bdd7b Fixed custom weapon rules in maps. 2014-08-16 10:58:04 +02:00
UberWaffe
0ebe1c2c6a Made Effect, Resource and Smudge warheads return 0% effective against actors. 2014-08-16 10:58:04 +02:00
UberWaffe
fb2b63c7f8 #6030 regression fix. Added EffectivenessAgainst <= 0 check to IsvalidAgainst for Warhead. 2014-08-16 10:58:03 +02:00
UberWaffe
390ca380bd Fixed Warhead ValidTargets and InvalidTargets. 2014-08-16 10:58:02 +02:00
UberWaffe
0904b6a1a4 Fixed UpgradeRules for #6030. 2014-08-16 10:58:01 +02:00
Curtis Shmyr
cb4bd52fc0 Added more Lua functions 2014-08-15 19:51:02 -06:00
Paul Chote
c8b3628852 Merge pull request #6219 from Mailaender/auto-lua-update
Fixed the automatic wiki documentation update
2014-08-16 12:21:07 +12:00
Paul Chote
46e133d2c6 Merge pull request #6257 from Mailaender/d2k-light-offset
Fixed sprite offset for light vehicle factory roofs
2014-08-16 12:18:15 +12:00
Paul Chote
02a85b5474 Merge pull request #6173 from reaperrr/jamslater-ima-adpcm
Implement IMA ADPCM WAV file support
2014-08-16 11:20:03 +12:00
Paul Chote
c80a12f99c Merge pull request #5937 from reaperrr/explosions2
Implements more sophisticated explosion animation/sound system
2014-08-16 01:58:11 +12:00
Matthias Mailänder
f8f73e7ba7 Merge pull request #6250 from UberWaffe/#6149_AIRepair
Closes #6149
2014-08-15 06:23:47 +02:00
Matthias Mailänder
d3fbed8faa fix offset for light vehicle factories 2014-08-15 06:17:58 +02:00
Matthias Mailänder
1937e66cca Merge pull request #6248 from reaperrr/d2k-roof-fix
Fix D2k heavy factories roof ZOffset
2014-08-15 06:14:58 +02:00
Matthias Mailänder
53372b7f9d Merge pull request #6256 from jfinkels/patch-1
Fixes incorrect package name in INSTALL.md
2014-08-15 06:11:53 +02:00
jfinkels
79ac45814f Fixes incorrect package name in INSTALL.md
No package `libmono-winforms4.0-cil` exists in Debian or Ubuntu. The correct package name is `libmono-system-windows-forms4.0-cil`.
2014-08-14 23:47:10 -04:00
UberWaffe
1375e56a32 Fixes D2K AI constantly repairing weather damage. 2014-08-13 16:13:34 +02:00
reaperrr
42acb78aba Fixes D2k heavy factory roof displaying below exiting units.
Closes #6236.
2014-08-13 14:19:21 +02:00
James Slater
a5978b5c55 Implement IMA ADPCM WAV file support
Closes #4628
2014-08-13 13:25:28 +02:00
reaperrr
ef54f011bb Change ImpactTypes from array to bitfield approach. 2014-08-13 11:45:58 +02:00
ScottNZ
68712a89c5 Merge pull request #6226 from Mailaender/shroud-updatedregion-nre
Fixed a crash when there are no actors to reveal shroud on the map.
2014-08-12 23:05:23 +12:00
Matthias Mailänder
50ab941d1f avoid NullReferenceException in updatedRegion
fixes #6166
2014-08-12 06:19:34 +02:00
Paul Chote
7fb31dd3aa Upgrade mod rules. 2014-08-12 11:47:01 +12:00
Paul Chote
7e92ba9fdd Rename ProneSpeed to SpeedModifier in TakeCover. 2014-08-12 11:43:24 +12:00
Paul Chote
01cd6efbd0 Convert firepower modifiers to integer percentages. 2014-08-12 11:41:09 +12:00
Paul Chote
84d3497e96 Convert speed modifiers to integer percentages. 2014-08-12 11:41:09 +12:00
Paul Chote
0425416ce2 Convert damage modifiers to integer percentages. 2014-08-12 11:41:09 +12:00
Paul Chote
c5519a7f3b Merge pull request #6220 from obrakmann/fix6211
Make background of FMVPlayers in TD and RA black
2014-08-12 11:16:55 +12:00
obrakmann
63f8f19d1a Merge pull request #6230 from havok13888/AdvancedPowePlant
#5936 Advanced Power Plant have a different layout in the original
2014-08-11 23:16:27 +02:00
havok13888
9ea169b2c8 5936 Advanced Power Plant have a different layout in the original 2014-08-10 23:06:11 -05:00
Oliver Brakmann
0d85b7ee71 Make FMVPlayer in RA use a completely black background 2014-08-10 12:38:55 +02:00
Oliver Brakmann
1aafe0d4b3 Make FMVPlayer in TD use a completely black background
Fixes #6211.
2014-08-10 12:38:54 +02:00
Paul Chote
780fd0df29 Merge pull request #6215 from Mailaender/poland-raid-bots
Disabled bots on maps with separate land masses between destructible bridges
2014-08-10 12:30:03 +12:00
Matthias Mailänder
e4b96c9101 use the new orabot account 2014-08-09 19:22:42 +02:00
Matthias Mailänder
32be7df07c bring back the automatic wiki update
closes #5900
2014-08-09 14:12:35 +02:00
Matthias Mailänder
24a3fd3196 show a user friendly description of the starting unit template
closes #6209
2014-08-09 13:34:03 +02:00
Curtis Shmyr
381505cd19 Merge pull request #6189 from UberWaffe/6066_CratePrerequisites
6066 Crate Prerequisites
2014-08-08 23:14:58 -06:00
Curtis Shmyr
9bca508dd7 Merge pull request #6213 from ScottNZ/balance
Update crushing values for ra vehicles
2014-08-08 22:46:17 -06:00
Matthias Mailänder
97fffb43b0 Merge pull request #6212 from pchote/mapimport
Fix legacy map importer.
2014-08-09 06:24:24 +02:00
Matthias Mailänder
c51750d90b Update CONTRIBUTING.md 2014-08-09 06:09:53 +02:00
Matthias Mailänder
ca79ea9666 disallow bots on burlesca 2014-08-09 05:43:09 +02:00
Matthias Mailänder
e150172d0f disallow bots on poland raid 2014-08-09 05:40:51 +02:00
ScottNZ
578b587679 Let ra apc and minelayers crush infantry too 2014-08-09 13:37:46 +12:00
Paul Chote
4fa55e6c49 Fix legacy map importer. Fixes #6143. 2014-08-09 13:14:25 +12:00
ScottNZ
bfc4adf0c7 Make ra light tanks be able to crush infantry to improve usefulness
and be consistent with the rest of the ra tanks and ra1's light tank
2014-08-09 13:08:50 +12:00
Paul Chote
58b39616f6 Merge pull request #6193 from obrakmann/fix6045
Fix breakage of --upgrade-map in OpenRA.Utility
2014-08-09 12:52:15 +12:00
Paul Chote
54fa8e4d30 Merge pull request #6182 from obrakmann/fix6172
Fix observer widgets not showing up when a player loses
2014-08-09 12:45:54 +12:00
Paul Chote
d15dbb2332 Merge pull request #6059 from obrakmann/mission-objectives
Mission objectives
2014-08-09 12:39:12 +12:00
UberWaffe
30e675a306 Added YamlException to GiveUnitCrateAction if no units are defined. 2014-08-08 17:00:04 +02:00
UberWaffe
9756132006 Update mods (only d2k and RA affected) crate actions to take tech levels and prerequisites into account. 2014-08-08 17:00:04 +02:00
UberWaffe
0ff9332844 Crate actions can now define required prerequisites. 2014-08-08 17:00:03 +02:00
Oliver Brakmann
c9ee475ca9 Added upgrade rules 2014-08-08 13:35:50 +02:00
Oliver Brakmann
00fcf5f969 Convert gdi01 to new Lua 2014-08-08 13:35:50 +02:00
Oliver Brakmann
8c43ffb802 Add some Media functions to new Lua API 2014-08-08 13:35:50 +02:00
Oliver Brakmann
d673520d82 Remove inconsistencies w.r.t the Surrender order
* Surrendering is now possible even in maps that do not use
  ConquestVictoryConditions.
* The Surrender button is greyed out instead of hidden when it cannot be
  used.
2014-08-08 13:35:50 +02:00
Oliver Brakmann
dc33e0e1b0 Make necessary changes to existing maps 2014-08-08 13:35:50 +02:00
Oliver Brakmann
819eb64011 Add end game dialog 2014-08-08 13:35:49 +02:00
Oliver Brakmann
8cec848a0f Add a mission objectives GUI panel 2014-08-08 13:35:49 +02:00
Oliver Brakmann
2c22e5099f Copy checkbox markings from TD to the other mods 2014-08-08 13:35:49 +02:00
Oliver Brakmann
7546e8237e Make CheckboxWidget honour GetText() 2014-08-08 13:35:49 +02:00
Oliver Brakmann
cca6646927 Add mission objectives to Lua interface 2014-08-08 13:35:43 +02:00
Oliver Brakmann
a448ba29a8 Move trigger lists into a dictionary for easier access and enumeration 2014-08-08 13:34:47 +02:00
Oliver Brakmann
6e3000ab0e Make Conquest- and StrategicVictoryConditions use objectives backend
Note: 3rd party KotH maps will need to be modified to work correctly
with this change.  Previously, StrategicVictoryConditions was a
supplement to ConquestVictoryConditions.  After this change, each works
by itself.  So KotH maps will need to remove the ConquestVictoryConditions
trait from the player definitions, or both victory conditions will have
to be satisfied to win the game.
2014-08-07 16:56:17 +02:00
Oliver Brakmann
a3bf3e7403 Add support for mission objectives
Objectives can be either primary or secondary objectives. Primary ones
influence the outcome of the game.  If all primary objectives are
completed the game is won, and lost when any of them fails.

Objectives can be added at any stage during the game, allowing to react
dynamically to game events.

The objectives backend only contains the information about the
objectives themselves. It does not check if objectives are completed or
failed.  Instead, the state of objectives must be manually marked. The
backend, however, does check whether the game is won or lost.
2014-08-07 16:56:17 +02:00
Curtis Shmyr
09652dad23 Merge pull request #6110 from pchote/unit-upgrades
Add an actor upgrade system (+ overhauls veterancy and crates)
2014-08-07 07:59:57 -06:00
Paul Chote
1a4f476ffa Replace CloakCrateAction with upgrades. 2014-08-07 20:44:30 +12:00
Paul Chote
2d062b790b Add FriendlyFire property to GivesExperience. 2014-08-07 20:44:29 +12:00
Paul Chote
de775e2f56 Reimplement unit levels using IUpgradable. 2014-08-07 20:44:28 +12:00
Paul Chote
0ca5336072 Reimplement UnitUpgradeCrate using IUpgradable. 2014-08-07 20:43:27 +12:00
Paul Chote
bf5da145b0 Introduce IUpgradable and purchasable unit upgrades. 2014-08-07 20:40:47 +12:00
Paul Chote
4cf822cd00 Support production of actors without IFacing. 2014-08-07 20:40:47 +12:00
obrakmann
2512bc52f8 Merge pull request #6134 from Mailaender/lobby-notify-followup
Made the lobby notifications less spammy and added some more cases
2014-08-06 19:58:15 +02:00
obrakmann
8efc8ccd4d Merge pull request #6151 from Mailaender/disable-idle-overlay-during-transform
Fixed idle overlays being displayed during actor transformations
2014-08-06 19:31:12 +02:00
obrakmann
42d8a9fe29 Merge pull request #6150 from Mailaender/disable-music-install-during-games
Disabled music installation during matches
2014-08-06 16:47:11 +02:00
Taryn Hill
5627fad797 Merge pull request #6194 from obrakmann/fix6192
Fix Apache's guns being blocked by walls in TD.
2014-08-06 09:23:42 -05:00
Oliver Brakmann
53b02b05ca Fix Apache's guns being blocked by walls in TD.
Closes #6192.
2014-08-06 14:00:05 +02:00
Oliver Brakmann
229f17ab85 Fix breakage of --upgrade-map in OpenRA.Utility
Closes #6045
2014-08-06 13:39:28 +02:00
Igor Popov
55729891de Merge pull request #6188 from cjshmyr/luaparse
Log reason why a Lua script fails to parse
2014-08-06 11:39:27 +04:00
Curtis Shmyr
b572c9b5eb Add an ingame message if a Lua FatalError call occurs 2014-08-05 22:37:00 -06:00
Curtis Shmyr
2d93918469 Log reason why a Lua script fails to parse 2014-08-05 22:36:42 -06:00
reaperrr
09b887abf2 Streamline isValid check. 2014-08-05 13:19:26 +02:00
reaperrr
8be7f127d9 Fix descriptions. 2014-08-05 13:11:30 +02:00
Oliver Brakmann
b85d5a9193 Fix observer widgets not showing up when a player loses
Fixes #6172.
2014-08-05 12:52:04 +02:00
Matthias Mailänder
cacb9fee64 Merge pull request #6100 from atlimit8/Implement6086
Closes #6086
2014-08-05 06:36:11 +02:00
atlimit8
b669029194 reverted mod.yaml in cnc, d2k, & ra 2014-08-04 18:12:14 -05:00
atlimit8
898bf4959a Remove sub-cell offset bounds checking 2014-08-04 18:09:26 -05:00
atlimit8
9b30c21f93 Load subcells and default subcell index from mod.yaml 2014-08-04 18:09:26 -05:00
atlimit8
4b7537bb13 Moved MobileInfo.SubCellOffsets to Map (dropping static) & added Map.SubCellsDefaultIndex 2014-08-04 18:09:26 -05:00
atlimit8
43478dd500 enum SubCell => int & Dictionary<SubCell, WVec> => WVec[] 2014-08-04 18:09:26 -05:00
reaperrr
7513380e08 New explosion system yaml changes. 2014-08-04 23:24:52 +02:00
reaperrr
8798658b35 New Explosion system code changes. 2014-08-04 23:24:51 +02:00
reaperrr
e3d85f29c9 Merge pull request #6169 from UberWaffe/CWRegressFix
#6030 Regression fix: CreateEffectWarhead
2014-08-04 20:59:13 +02:00
Matthias Mailänder
050d55397d Merge pull request #6156 from UberWaffe/MinorFixes
Closes #6128
2014-08-04 20:01:40 +02:00
Matthias Mailänder
b2b1b38044 Merge pull request #6158 from Phrohdoh/DocPrintRequires
Write trait requirements in documentation.
2014-08-04 19:54:53 +02:00
UberWaffe
0f8023217d #6030 Regression fix. CreateEffectWarhead effect location and water impact sound. 2014-08-04 18:09:52 +02:00
UberWaffe
4055d8178d Bridge can now define DemolishWeapon. Defaults to previous "Demolish". 2014-08-04 16:13:21 +02:00
UberWaffe
4f18cb5fc0 IonCannonPower can now define how many ticks into animation the weapon impact happens (as opposed to at the end of the animation). 2014-08-04 16:12:18 +02:00
Taryn Hill
c3c5cd04cc Write trait requirements in documentation. 2014-08-03 21:37:37 -05:00
Chris Forbes
c482e97060 Merge pull request #6152 from Mailaender/money-crate
Added money crates to be spawned by destroyed supply trucks
2014-08-04 10:39:29 +12:00
Taryn Hill
31a7678473 Merge pull request #6163 from Mailaender/shrapnel-lowercase-weapon
Fixed ThrowsShrapnel not using lower case weapon names.
2014-08-03 15:20:30 -05:00
Matthias Mailänder
54e36ecf30 use ToLowerInvariant for all weapon rules 2014-08-03 22:14:00 +02:00
Matthias Mailänder
dd2981a3b4 Merge pull request #6155 from Phoib/sonicbeam
Sonic Tank offset
2014-08-03 21:41:37 +02:00
Matthias Mailänder
aa74046403 Merge pull request #6160 from cjshmyr/returntobase
Remove TakeOff activity from ReturnToBase
2014-08-03 21:11:16 +02:00
Curtis Shmyr
ed08bafd54 Remove TakeOff activity from ReturnToBase 2014-08-03 12:50:01 -06:00
Matthias Mailänder
33655afe21 Merge pull request #6127 from cjshmyr/attackcharge
Fixes #5568
2014-08-03 17:51:28 +02:00
Phoib
59936ab834 Sonic Tank offset 2014-08-03 17:42:47 +02:00
Taryn Hill
b6fd757672 Merge pull request #6030 from UberWaffe/CustomWarheads
Custom Warheads refactor
2014-08-03 10:35:36 -05:00
UberWaffe
c972b39687 Custom Warheads refactor
Changes included:

Warhead code split out of weapon code and refactored.
Warhead functionality now split into several classes, each handling one effect/impact.

Additional custom warheads can now be defined and called via yaml.
Custom warheads inherit the abstract class Warhead,
which provides target check functions.

Custom warheads have to define their own impact functions,
and can also define their own replacement for check
functions.
2014-08-03 17:10:44 +02:00
Matthias Mailänder
98106e2ff7 ContainsCrate is redundant to LeavesHusk 2014-08-03 16:30:45 +02:00
Matthias Mailänder
57463f249c let supply trucks spawn money crates upon destruction 2014-08-03 16:30:41 +02:00
Matthias Mailänder
aa8ce199c2 self-document CrushClass of crates 2014-08-03 16:26:19 +02:00
Matthias Mailänder
91b612fa47 ITeleportable does not exist anymore 2014-08-03 16:26:18 +02:00
Matthias Mailänder
611c803a3a don't display idle overlays during actor transformations
fixes #6018
2014-08-03 15:02:30 +02:00
Matthias Mailänder
282b16e3fc disable music installation during a game
closes #6058
2014-08-03 14:38:47 +02:00
Matthias Mailänder
658ae241dc notify about difficulty level changes 2014-08-03 14:20:09 +02:00
Matthias Mailänder
ed2e4eef17 make the change notifications more natural 2014-08-03 14:19:46 +02:00
Matthias Mailänder
0502d90a05 Merge pull request #6084 from pchote/renderpreview
Improve actor preview rendering
2014-08-03 12:51:21 +02:00
Matthias Mailänder
7305216f7b Merge pull request #6129 from pchote/production-hotkeys
Closes #3915
Closes #4142
Closes #4181
Closes #6031
2014-08-03 12:28:54 +02:00
Matthias Mailänder
56765d5ca2 remove unneccessary build-top sequences. 2014-08-03 22:23:49 +12:00
Paul Chote
b5e4e0e074 Add support for voxels in actor previews. 2014-08-03 22:23:49 +12:00
Paul Chote
3903b9b2b5 Add support for rotors in actor previews. 2014-08-03 22:23:49 +12:00
Paul Chote
7c434507f1 Add support for idle overlays in actor previews. 2014-08-03 22:23:49 +12:00
Paul Chote
c6b6b5d153 Add support for turrets in actor previews. 2014-08-03 22:23:49 +12:00
Paul Chote
9b3a73860c Account for infantry in actor previews. 2014-08-03 22:23:48 +12:00
Paul Chote
79dabe01e8 Account for walls in actor previews. 2014-08-03 22:23:48 +12:00
Paul Chote
b91fe10cad Account for building turret facing in actor previews. 2014-08-03 22:23:48 +12:00
Paul Chote
7fb106e54a Introduce actor previews for PBOG and the editor. 2014-08-03 22:23:47 +12:00
Paul Chote
103cc65b5b Change legacy menu button labels. 2014-08-03 22:21:31 +12:00
Matthias Mailänder
061ab42896 announce kicks and bans 2014-08-03 09:41:23 +02:00
Matthias Mailänder
65049f6212 announce map changes 2014-08-03 09:38:15 +02:00
Matthias Mailänder
b382c0339f only notify when the lobby settings differ from the default 2014-08-03 09:31:25 +02:00
Paul Chote
e827b343ab Disable multiple-queuing from the keyboard. 2014-08-03 19:28:10 +12:00
Paul Chote
0006f4dd2f Remaining hotkey changes. 2014-08-03 19:28:10 +12:00
Paul Chote
5d90b2016f Change status bar hotkeys to match C&C3. 2014-08-03 19:28:10 +12:00
Paul Chote
8b5fd454df Change unit selection hotkeys to match C&C3. 2014-08-03 19:28:10 +12:00
Paul Chote
9626654f87 Redefine orderbutton and menu hotkeys. 2014-08-03 19:28:09 +12:00
Paul Chote
6f19290aeb Add queue hotkeys to RA, and make TD consistent with C&C3. Fixes #6031. 2014-08-03 19:28:09 +12:00
Paul Chote
f64cdc52e1 Remove obsolete key definitions. 2014-08-03 19:28:09 +12:00
Paul Chote
43bd8a361e Implement new production hotkeys. Fixes #3915, #4142, #4181. 2014-08-03 19:28:07 +12:00
Paul Chote
ef2f909f65 Reorganize IBodyOrientation. 2014-08-03 19:20:40 +12:00
Paul Chote
8579ae956a ToLowerInvariant RenderSprites.GetImage.
Some mods (d2k) define bogus-case sequence names.
2014-08-03 19:20:39 +12:00
Paul Chote
61b7e63e77 Merge pull request #6133 from ScottNZ/power
Move Power out of Building and into its own trait
2014-08-03 19:09:42 +12:00
ScottNZ
692e3a9c88 Move Power out of Building and into its own trait
Conflicts:
	mods/ts/rules/structures.yaml
2014-08-03 18:53:51 +12:00
Paul Chote
9527d7c2f4 Merge pull request #6136 from ScottNZ/infiltration
Infiltration refactor
2014-08-03 18:29:23 +12:00
Paul Chote
5b8a70728d Merge pull request #6069 from atlimit8/LineBuild-1x1Only
Makes LineBuild logic require building dimensions of 1x1
2014-08-03 16:16:56 +12:00
ScottNZ
8e062864ce Merge pull request #6135 from pchote/support-fix
Fix instant-use and AllowMultiple support powers.
2014-08-03 16:12:50 +12:00
Paul Chote
2bfd1aa56a Merge pull request #6022 from Phrohdoh/MoveToShroud
Locomotion MovesToShroud bool.
2014-08-03 12:58:06 +12:00
Curtis Shmyr
52aedf4b75 Fix AttackCharge not picking a new target if the current became invalid 2014-08-02 12:26:06 -06:00
ScottNZ
ca4b947037 Rename IAcceptInfiltrator to INotifyInfiltrated 2014-08-02 22:36:44 +12:00
ScottNZ
058185754e Remove Infiltratable trait and refactor surrounding code to use target types 2014-08-02 22:31:46 +12:00
Paul Chote
efebb500f0 Fix instant-use and AllowMultiple support powers.
Fixes #2185, #6090.
2014-08-02 21:30:29 +12:00
Matthias Mailänder
9422285aa2 Merge pull request #6108 from havok13888/LobbyInfoNotification
Closes #6012
2014-08-02 07:19:23 +02:00
Taryn Hill
d6931f1d05 Added flag to Mobile/AircraftInfo: MoveIntoShroud.
Does not change the audio feedback given.
2014-08-01 20:43:29 -05:00
havok13888
65c77677d4 Inform client about changes in lobby options 2014-08-01 15:41:02 -05:00
atlimit8
0a9f54e0ab Makes LineBuild logic require building dimensions of 1x1 2014-07-31 16:47:44 -05:00
Matthias Mailänder
f84b1c145e Merge pull request #6098 from pchote/select-hotkey
Fix unit selection hotkeys for players.
2014-07-31 19:25:58 +02:00
Matthias Mailänder
6ef315217a Merge pull request #6113 from atlimit8/FieldLoadWVecArray
Load WVec[] from MiniYaml
2014-07-31 19:21:56 +02:00
Matthias Mailänder
5618960329 Merge pull request #6121 from ScottNZ/bleed
Add ITraitInfo constraint to Requires<T>
2014-07-31 19:08:18 +02:00
Taryn Hill
738c80bb2a Merge pull request #6102 from ihptru/masterplayers
send player names to master server
2014-07-31 06:59:25 -05:00
ScottNZ
9f2e0e181f Add ITraitInfo constraint to Requires<T> 2014-07-31 22:43:37 +12:00
Igor Popov
78c9585fbe Merge pull request #6111 from abcdefg30/fixmaptiles
Fixed 'seven-stairs' and 'room-warzone'
2014-07-31 09:08:29 +04:00
atlimit8
d1b0dce751 Applied VWec[] yaml loader 2014-07-30 22:59:15 -05:00
ihptru
b76d9ed2e4 send player names to master server 2014-07-30 23:42:34 +04:00
atlimit8
d79ab8070d Added the abiltity to load WVec[] from MiniYaml 2014-07-30 14:34:28 -05:00
abcdefg30
c4f37344a0 Fixed 'seven-stairs' and 'room-warzone' 2014-07-30 13:13:23 +02:00
Curtis Shmyr
de1c80af88 Merge pull request #6105 from WolfGaming/FixTech
Fixes Maps not being able to force tech levels
2014-07-29 20:33:45 -06:00
WolfGaming
d44a5226f5 Fixes Maps not being able to force tech levels 2014-07-29 22:08:36 +00:00
Paul Chote
13656710ca Fix unit selection hotkeys for players. Fixes #5753.
This also explicitly disables them for spectators.
2014-07-29 23:32:47 +12:00
Paul Chote
e3d2104fe3 Merge pull request #6070 from ScottNZ/kenneltech
Move dog to kenn and make kenn buildable
2014-07-29 23:14:17 +12:00
Paul Chote
a9a7f1e5b2 Merge pull request #6088 from obrakmann/fix5939
Remove a spot harvesters had trouble accessing in Sea & Cake map
2014-07-29 22:54:28 +12:00
Oliver Brakmann
19de147551 Remove a spot harvesters had trouble accessing in Sea & Cake map
Fixes #5939
2014-07-29 07:45:10 +02:00
obrakmann
d96c3747be Merge pull request #6085 from UberWaffe/AIRepairFix
Fix AI not repairing buildings if struck by support powers.
2014-07-29 00:46:36 +02:00
Taryn Hill
40d1327939 Merge pull request #6087 from ScottNZ/planerepulsion
Add plane repulsion
2014-07-28 17:25:52 -05:00
Chris Forbes
031c58c10e Merge pull request #6094 from cjshmyr/madfix
Prevent MAD tanks executing multiple StartDetonationSequence activities
2014-07-29 09:42:29 +12:00
Curtis Shmyr
1afdd4d0ac don't let MAD tanks run multiple StartDetionationSequence activities 2014-07-28 15:31:15 -06:00
Matthias Mailänder
56dcba5e47 Merge pull request #6091 from pchote/fixup-d2k-logo
New D2K mod logo (fixed)
2014-07-28 19:35:39 +02:00
ScottNZ
4d355d381d Remove repulsion from ra badgers, adjust mig and yak balance to compensate for new repulsion 2014-07-29 00:18:22 +12:00
ScottNZ
de29b41103 Remove repulsion from d2k planes 2014-07-29 00:18:22 +12:00
ScottNZ
d6fd507b04 Remove repulsion from a10 and c17 2014-07-29 00:18:21 +12:00
ScottNZ
16a30fd6b1 Add plane repulsion logic 2014-07-29 00:18:13 +12:00
Sebastien Kerguen
c540495abf new D2K mod logo 2014-07-28 16:52:22 +12:00
Paul Chote
8de8e67423 Merge pull request #5845 from Mailaender/new-lua-chatline
Added Media.AddChatLine to the new Lua API
2014-07-28 16:42:29 +12:00
UberWaffe
b67a17add0 Fix AI not repairing buildings if struck by support powers. 2014-07-27 12:58:52 +02:00
Matthias Mailänder
e488365f85 add a simple test case 2014-07-27 07:34:31 +02:00
Matthias Mailänder
405d21d797 add Game.AddChatLine to the new Lua API 2014-07-27 07:34:24 +02:00
ScottNZ
88ea7f1c7e Take BuiltAt overrides into account when calculating speedup - prevent kennels contributing to rifle infantry speedup for example 2014-07-27 14:33:55 +12:00
Matthias Mailänder
a57c9c5cf3 Merge pull request #6074 from deniz1a/chrono-curtain-select
Fixes #5166
2014-07-26 17:41:30 +02:00
Deniz Ayıkol
943848e853 Fix support power selector revealing cloaked enemy units.
Delete unnecessary using line.

Fix spacing.
2014-07-26 18:38:25 +03:00
Matthias Mailänder
c67414c4f1 Merge pull request #5993 from obrakmann/fix5651_take2
More aircraft/shroud interaction fixes
2014-07-26 15:43:16 +02:00
Oliver Brakmann
e97efc89cb Make aircraft not waste their missiles by firing from outside the map
Fixes #6001.

This obviously affects Yaks as well as Migs, even though Yaks had no
trouble with attacking from outside the map.
2014-07-26 11:05:41 +02:00
Oliver Brakmann
ad2327828d Make actors outside map borders selectable for their owner
PR #5967 only made planes not lose their selection when they strayed
outside the map border. This PR makes it possible to select them when
they already are outside the map.  It also ensures that the selection
decorations are drawn.  Rank designations, however, will disappear when
a unit leaves the map.

Fixes #5651 for real, then.
2014-07-26 11:05:41 +02:00
Matthias Mailänder
2d02e3f04a Merge pull request #5972 from pchote/new-ra-ui
Closes #2394
Closes #2385
Closes #4980
Closes #5108
2014-07-26 10:22:03 +02:00
ScottNZ
b21f0eaf20 Fix dog breakage in Intervention 2014-07-26 20:19:29 +12:00
Paul Chote
f9c7d2735c Replace source art with a more portable psd. 2014-07-26 19:26:03 +12:00
Paul Chote
d88b27745b Fix observer buttons. 2014-07-26 19:26:03 +12:00
Matthias Mailänder
2637c99d25 Merge pull request #5991 from obrakmann/fix5976
Make sure actors are removed from control groups when captured
2014-07-26 09:25:19 +02:00
Paul Chote
f9fcded77c Add icons to the production tooltip. 2014-07-26 18:20:10 +12:00
Paul Chote
7c9223caea Add tooltips for the power and cash displays. 2014-07-26 18:20:10 +12:00
Paul Chote
f7f01cc08e Add hotkey support to ProductionPaletteWidget. 2014-07-26 18:20:10 +12:00
Paul Chote
fa0b33a1ea Re-enable the ready colour blinking. 2014-07-26 18:20:10 +12:00
Paul Chote
0c607ffff2 Move legacy widgets into D2K project. 2014-07-26 18:20:10 +12:00
Paul Chote
92c0520d9c Add tab click sounds to RA. 2014-07-26 18:20:10 +12:00
Paul Chote
a0e5554aaa Overhaul the RA sidebar UI. 2014-07-26 18:20:09 +12:00
Paul Chote
f779606433 Split TS ingame chrome. 2014-07-26 18:20:09 +12:00
Paul Chote
8f05e04a1f Add icon glyphs for naval, powerdown and diplomacy (for use in RA). 2014-07-26 18:20:09 +12:00
Paul Chote
c1e83d9415 Support trimmed production icon rectangles. 2014-07-26 18:20:09 +12:00
Paul Chote
6d96d46081 Move ProductionQueueFromSelection into RA and generalize. 2014-07-26 18:20:09 +12:00
Paul Chote
17d601113e Move SupportPowersWidget into RA and generalize. 2014-07-26 18:20:08 +12:00
Paul Chote
ae9a3075a9 Add a logic class for faction-specific backgrounds. 2014-07-26 18:20:08 +12:00
Paul Chote
cbfc8e0b27 Blink the power display red when low power. 2014-07-26 18:20:08 +12:00
Paul Chote
dee6a9bac4 Support fading the area behind the radar to black. 2014-07-26 18:20:08 +12:00
Paul Chote
fda3ae2fb0 Make the diplomacy panel consistent with cheats and menu. 2014-07-26 18:20:08 +12:00
Paul Chote
9e2b3ce0b8 Unify cheats -> debug and adjust plumbing for new RA UI. 2014-07-26 18:20:08 +12:00
Paul Chote
e7ae615ac9 Split the last TD UI logic into reuseable chunks. 2014-07-26 18:20:07 +12:00
Paul Chote
ef00411931 Add support for single-line time display. 2014-07-26 18:20:07 +12:00
Paul Chote
2de9d3780b Extract ProductionPalette background drawing into logic code. 2014-07-26 18:20:07 +12:00
Paul Chote
54b5da3460 Don’t crash if there are no production icons. Fixes #5543. 2014-07-26 18:20:07 +12:00
Paul Chote
1e76baf070 Move TD production widgets into the RA project. 2014-07-26 18:20:07 +12:00
Paul Chote
ba21428276 Hide invalid hotkey from button tooltips. 2014-07-26 18:20:06 +12:00
Paul Chote
90403ad40b Fix mouseover filtering in cloned widgets. 2014-07-26 18:20:06 +12:00
Paul Chote
4fb9e59402 Allow ImageWidget to filter mouse events. 2014-07-26 18:20:06 +12:00
Paul Chote
d8b6eac64e Fix mouse event filtering in BackgroundWidget. 2014-07-26 18:20:06 +12:00
Matthias Mailänder
1d0538526d Merge pull request #6040 from pchote/more-renderables
Convert RenderAfterWorld to use Renderables.
2014-07-26 07:28:53 +02:00
ScottNZ
2a4d8a33b9 Move dog to kenn and make kenn buildable 2014-07-26 16:29:23 +12:00
Matthias Mailänder
5e02042629 Merge pull request #6061 from MustaphaTR/d2k-starting-units
Added grenadier as Atreides starting unit
2014-07-26 06:11:45 +02:00
Paul Chote
fffffb8c7c Merge pull request #6014 from atlimit8/FixBuildingsLockedOnWorldLoad
Fix buildings locked on world load
2014-07-26 16:01:28 +12:00
Paul Chote
b55e15f37f Merge pull request #6065 from atlimit8/SellNonBuildings
Sell non buildings
2014-07-26 15:52:33 +12:00
atlimit8
4d23b71f2c Fixed D2K turrets. 2014-07-25 19:53:23 -05:00
atlimit8
0ba1fdcea3 Allow actors that are not buildings to be sold.
The more humane way to refund units (as opposed the grinding them).
2014-07-25 18:00:50 -05:00
atlimit8
72a30e2157 Appears to fix sticky locking of preplaced buildings 2014-07-25 17:07:15 -05:00
atlimit8
0319b8cbda INotifyCreated 2014-07-25 17:07:15 -05:00
atlimit8
027887aa13 AUTHORS 2014-07-25 17:03:05 -05:00
obrakmann
478168cac7 Merge pull request #6062 from ihptru/masterphp
remove .php prefixes related to master server
2014-07-25 19:24:15 +02:00
ihptru
3ef8d76bfe remove .php prefixes related to master server 2014-07-25 19:55:54 +04:00
Mustafa Alperen Seki
a7a65bf213 Added Grenadier as Atreides starting unit 2014-07-25 16:51:55 +03:00
Paul Chote
0884722c4b Change IOrderGenerator.RenderAfterWorld to return Renderables. 2014-07-25 21:14:39 +12:00
Paul Chote
da6ecbf92e Change IPostRenderSelection and IPlaceBuildingDecoration to return renderables. 2014-07-25 21:14:39 +12:00
Paul Chote
8ac9477cd9 Add UISpriteRenderable for screen-space decorations. 2014-07-25 21:14:39 +12:00
Paul Chote
1beff77c6a Split selectable rendering into *Renderables. 2014-07-25 21:14:39 +12:00
Paul Chote
c4bcf0af46 Introduce RangeCircleRenderable. 2014-07-25 21:14:39 +12:00
Paul Chote
48bbac5c6f Merge pull request #5910 from Phrohdoh/CloningVats
Added cloning trait pair for RA2-style Cloning Vats.
2014-07-25 17:53:54 +12:00
Taryn Hill
b4cecff74e ClonesProductionUnits:
string[] CloneableTypes	checks Cloneable.Types

Cloneable:
	string[] Types checked by ClonesProductionUnits.CloneableTypes

Added INotifyOtherProduction
	for notifying self when another actor
	produces a unit.
2014-07-24 19:08:08 -05:00
Matthias Mailänder
e24b9323c8 Merge pull request #6053 from deniz1a/chat-focus
Closes #4722
2014-07-24 22:40:42 +02:00
Matthias Mailänder
79a9b531ea Merge pull request #5941 from reaperrr/spread-upgrade
Added MaxSpread for more control over maximum area of damage
2014-07-24 22:18:03 +02:00
Matthias Mailänder
bc8a9d754c Merge pull request #6035 from pchote/merge-air-queues
Merge RA aircraft queues
2014-07-24 22:04:50 +02:00
Matthias Mailänder
d756d5b0c8 Merge pull request #6052 from deniz1a/mcv-pri
Increase MCV selection priority
2014-07-24 21:51:02 +02:00
Deniz Ayıkol
f08c463181 Cnc: Increase MCV selection priority. 2014-07-24 15:18:37 +03:00
Deniz Ayıkol
17ea6e1ec2 Make lobby chat field have keyboard focus by default. 2014-07-24 14:59:11 +03:00
Deniz Ayıkol
7780862bdd Increase MCV selection priority. 2014-07-24 13:58:55 +03:00
Paul Chote
2a5d7b73f6 Add BuildAtProductionType to boats/subs. 2014-07-24 21:04:35 +12:00
Paul Chote
90d310690b Merge the RA aircraft queues. Closes #5961. 2014-07-24 20:45:28 +12:00
Paul Chote
c164ec8c8c Add Buildable.BuildAtProduction.
This allows actors to be restricted to specific production structures.
2014-07-24 20:45:28 +12:00
Paul Chote
8837b3453c Merge pull request #6036 from Mailaender/trait-export-decimal-separators
Fixed country specific decimal separators in the traits documentation
2014-07-24 20:42:12 +12:00
Paul Chote
b2e7cf8edb Merge pull request #5853 from RoosterDragon/actormap-perf
Sped up ActorMap.ActorsInBox.
2014-07-24 20:40:15 +12:00
Paul Chote
51f69110d0 Merge pull request #6046 from ihptru/masterserver
send 'spectators' and 'protected' to master server
2014-07-24 20:31:35 +12:00
Paul Chote
a7fc41b87e Merge pull request #5943 from pavlos256/fieldloader
Fieldloader and non-public fields
2014-07-24 20:29:25 +12:00
Paul Chote
a2e6feac2a Merge pull request #5850 from pavlos256/game-loop
Improve the game loop
2014-07-24 20:24:08 +12:00
ihptru
26a6f45b8f send 'spectators' and 'protected' to master server; fixes #6041 2014-07-23 23:41:46 +04:00
Matthias Mailänder
93e34a10f0 Merge pull request #6042 from MustaphaTR/bleed
Fixed Atreides Barracks Make Anim.
2014-07-23 19:51:39 +02:00
Matthias Mailänder
20a052d16b Merge pull request #6044 from UberWaffe/CrateMultiUnitsFix
Regression and UpgradeRules fix for #5921.
2014-07-23 19:10:33 +02:00
UberWaffe
2b73fa027b Fixes as per comments. (+1 squashed commits)
Squashed commits:

[c3abf4b] Fixes as per comments. (+1 squashed commits)

Squashed commits:

[a289d17] Regression and UpgradeRules fix for #5921.
2014-07-23 16:47:15 +02:00
Chris Forbes
51316a76cc Merge pull request #6037 from Mailaender/component-tower-walls
Fixed walls not visually attaching to component towers
2014-07-23 21:24:19 +12:00
Chris Forbes
8f42b65f86 Merge pull request #6038 from Mailaender/idle-fly-doc
Documented FlyAwayOnIdle and ReturnOnIdle
2014-07-23 21:23:55 +12:00
Mustafa Alperen Seki
6700ac273e Fixed Atreides Barracks Make Anim. 2014-07-23 09:29:57 +03:00
Matthias Mailänder
778931f650 document ReturnOnIdle 2014-07-23 07:09:07 +02:00
Matthias Mailänder
249be6d9a7 separate and document FlyAwayOnIdle 2014-07-23 07:09:07 +02:00
Matthias Mailänder
d830a0a7ae Merge pull request #6029 from pchote/gametomods
Move *Renderables and Render* out of Game.
2014-07-23 06:54:42 +02:00
Matthias Mailänder
cefc848ee8 visually attach component towers to walls 2014-07-23 06:45:07 +02:00
Matthias Mailänder
8ce65f7310 same for double 2014-07-23 06:33:52 +02:00
Matthias Mailänder
32a4bedd6e don't use country specific decimal separators for decimals 2014-07-23 06:19:45 +02:00
Paul Chote
cffb1f27e4 Merge pull request #6002 from Mailaender/ts-wall-tower-attachment
Allowed walls to attach to component towers
2014-07-23 12:18:26 +12:00
Paul Chote
6b1cecc6b4 Add a workaround for the legacy map editor. 2014-07-23 11:40:30 +12:00
Paul Chote
1d77cd5391 Merge pull request #5851 from RoosterDragon/shroud-perf
Speed up shroud checks
2014-07-23 11:02:27 +12:00
Paul Chote
dab94bcc00 Merge pull request #5904 from ScottNZ/c4-flashtarget
Add target flashing for C4.
2014-07-23 10:36:54 +12:00
Chris Forbes
945455f15e Merge pull request #5973 from reaperrr/renderinf-unhardcode
Unhardcoded RenderInfantry sequence names
2014-07-23 09:58:07 +12:00
Chris Forbes
58ac641578 Merge pull request #5985 from RoosterDragon/random-try-collection
Improve Exts.Random
2014-07-23 09:57:23 +12:00
Chris Forbes
f68de0bbd8 Merge pull request #5921 from UberWaffe/CrateMultiUnits
Crate updates.
2014-07-23 09:50:54 +12:00
Chris Forbes
e023ad6a36 Merge pull request #5999 from Mailaender/trait-documentation-update-july-2014
Updated the trait documentation for modders
2014-07-23 09:49:02 +12:00
Chris Forbes
25d377770d Merge pull request #6007 from MustaphaTR/d2k-ai-improve
Improved D2K AI
2014-07-23 09:46:58 +12:00
Chris Forbes
c8f295a814 Merge pull request #5997 from reaperrr/compress-shps
Compressed shps of all currently shipping mods
2014-07-23 09:46:30 +12:00
Chris Forbes
72c92491a7 Merge pull request #6009 from psydev/patch-2
Nerf flame tank
2014-07-23 09:45:49 +12:00
Chris Forbes
90d5a76443 Merge pull request #6026 from MustaphaTR/d2k-map+tilefix
Added "Pasty Mesa" map and some tile fixes
2014-07-23 09:42:59 +12:00
Chris Forbes
707eefefc4 Merge pull request #6010 from psydev/patch-3
Minor balance tweaks for TD
2014-07-23 09:39:47 +12:00
Mustapha
8b0eb279c3 Added "Pasty Mesa" map and some tile fixes 2014-07-22 16:48:57 +03:00
ScottNZ
ad5e1cbe3a Merge pull request #6027 from OpenRA/revert-5763-build-shift+keypress
Revert "Make Shift+<Hotkey> queue five units/buildings. Fixes #5544."
2014-07-22 22:36:43 +12:00
Paul Chote
3744a1af25 Revert "Make Shift+<Hotkey> queue five units/buildings. Fixes #5544." 2014-07-22 20:16:47 +12:00
Paul Chote
029da5116b Move VoxelRenderable into Mods.RA. 2014-07-22 16:43:39 +12:00
Paul Chote
4589e93180 Move TextRenderable into Mods.RA. 2014-07-22 16:43:39 +12:00
Paul Chote
1cb6026c38 Move ContrailRenderable into Mods.RA. 2014-07-22 16:43:39 +12:00
Paul Chote
6005262992 Move BeamRenderable into Mods.RA. 2014-07-22 16:43:39 +12:00
Paul Chote
51abbad5ff Move RenderSprites and RenderSimple into Mods.RA. 2014-07-22 16:43:39 +12:00
Chris Forbes
3780a70045 Merge pull request #6021 from pchote/gtwr-fix
Give GTWR back to both factions.
2014-07-22 11:25:08 +12:00
Paul Chote
5d0282188c Give GTWR back to both factions. 2014-07-22 10:19:20 +12:00
Paul Chote
f62bec0530 Remove bogus Require<>s. 2014-07-21 23:50:15 +12:00
Mustafa Alperen Seki
7abde5fd32 Improved AI 2014-07-21 08:51:50 +03:00
Chris Forbes
8174cbc88f Merge pull request #5994 from deniz1a/prod_order
Reordered production palette according to prerequisites.
2014-07-21 13:50:49 +12:00
psydev
38937e4caa Reduce BikeRockets' speed a bit
Bike spam is quite effective, and seems almost too good at silencing opposition. After playtesting, it was found that reducing the speed of rockets gives whoever they are engaging a chance to fire back before dying.
(RangeLimit increased to compensate for speed change, to keep it above 6).
2014-07-20 18:26:15 -07:00
psydev
29208fbf5f Nerf Mobile SAM damage a bit
The Mobile SAM has been shown to be exceptionally powerful in small groups, being able to annihilate large groups of helis. While the cost could be increased, it seems like a few changes for now would be good and mitigate some of the OPness.

Changes:
-Replace quick-firing 2-burst and replace it with 1 shot per second.
-Reduce damage to 32. This will make it kill Apaches in 4 shots instead of 3.
-Reduce missile speed from 426 to 341. (This will also effectively reduce range limit from 12.5 cells to 10).
2014-07-20 18:11:48 -07:00
psydev
3aa3097f8a Reduce RangeLimit of Stealth Tank Missiles
Note: the "Range" value of the Stealth Tank remains the same. 

It has been noticed that the missiles of the stealth tank seem to go on for forever (~11.5 cells), making them inescapable; their range is 7, so this is a large difference. Their range limit is being reduced so they will travel only 8.3 cells now.
2014-07-20 18:01:52 -07:00
psydev
62fa566dce Reduce Stealth damage vs. infantry 35% -> 25%
Playtesting has shown that the Stealth Tank is a little bit too good against infantry, which are supposed to be its (soft) natural counter. They are the only units which can detect the stealth tanks, so it's important that they not die too easily. Right now it seems that stealth tanks are able to sit and fight infantry very easily, especially since they outrange them. This change will discourage stealth tanks from engaging infantry without care.
2014-07-20 17:45:37 -07:00
psydev
d38c722082 Reduce Flame Tank damage from 90 -> 75
As mentioned earlier, the reduction of the flame tank cost from $800 to $600 made it a bit too powerful. Playtesting with damage reduced to this level seemed to be reasonable.

The reason for reducing the cost to $600 was that few people were playing with the flame tank, since it costed a lot more than other units like the light tank. It seemed to be too much of a specialist and the added construction time (and cost) didn't appear to be worth it to players. It also seemed that people were not interested in risking the unit in battlefield offensives due to its cost. Part of the changes to the unit (increased damage vs. light, heavier armor, lower cost) were to make it more accessible for use against light vehicles (such as artillery), which it can destroy quickly, but which often result in its own death. A lower cost made the unit more usable in most mixed forces.
2014-07-20 17:40:01 -07:00
psydev
75293ba1ea Reduce Flame Tank HP
In playtesting, the Flame Tank has shown to be too powerful, especially when combined en masse with recon bikes. This is because its cost was reduced to $600 from $800. Reducing a few traits in further playtesting has made it more balanced.
2014-07-20 17:34:28 -07:00
psydev
554412d8e0 Reduce Flame Tank speed
It is a bit too fast, especially given that its armor was upgraded. Still faster than medium tank.
2014-07-20 17:32:42 -07:00
UberWaffe
cb6a724e48 Rename Race to ValidRaces. 2014-07-20 21:40:10 +02:00
UberWaffe
94b1f53ebf Rebased. (+1 squashed commits)
Squashed commits:

[43010a0] Fixes. (+1 squashed commits)

Squashed commits:

[94ee90e] Fixes. (+1 squashed commits)

Squashed commits:

[ef827c7] Style cop updates. Updates to LevelUp, Cloak, and UnitUpgrade to allow multiple units within range, plus maximum extra unit limit. (+1 squashed commits)

Squashed commits:

[2103b01] Dupe crate action updates and fixes. (+2 squashed commit)

Squashed commit:

[0f4df4a] Added DuplicateUnitCrateAction.

[2787fa1] Clarity update. (+1 squashed commits)

Squashed commits:

[93ddc3b] Crate updates.
+Multiple units per crate allowed.
+Allow time delay on crate actions.
2014-07-20 21:37:40 +02:00
Matthias Mailänder
2405ce3251 allow walls to attach to component towers 2014-07-20 19:00:04 +02:00
Matthias Mailänder
7d0f4a261f don't break apart when using empty IReadOnlyDictionary 2014-07-20 14:50:38 +02:00
Matthias Mailänder
1071a94d1d document traits 2014-07-20 14:50:37 +02:00
Matthias Mailänder
907188ccba configurable and self-documenting font name 2014-07-20 14:31:15 +02:00
Matthias Mailänder
547730c195 don't just repeat the name of the trait, but explain 2014-07-20 14:31:15 +02:00
Matthias Mailänder
40d0e20fe1 configurable and self-documenting idle sequence name 2014-07-20 14:31:13 +02:00
Matthias Mailänder
eec36b6d0c configurable and self-documenting color 2014-07-20 13:54:52 +02:00
Matthias Mailänder
ea478e8e7f configurable and self-documenting BuildPaletteWidgetName 2014-07-20 13:54:29 +02:00
Matthias Mailänder
1f7b6f431a fix trait info documentation not being displayed 2014-07-20 13:53:44 +02:00
Matthias Mailänder
7901c06e4c differentiate new/old Lua APIs 2014-07-20 13:53:12 +02:00
Matthias Mailänder
ef5178407c add spaces for proper linebreaks in trait documentation tables 2014-07-20 13:52:00 +02:00
reaperrr
582c1016e9 Merge pull request #5998 from Mailaender/ts-bibs
Added bibs to Tiberian Sun refinery and factories
2014-07-20 12:48:53 +02:00
Matthias Mailänder
702b3f7d20 these are already fixed with the addition of isometry 2014-07-20 11:29:12 +02:00
Matthias Mailänder
dbe64f496b add bibs to refinery and factories 2014-07-20 11:28:06 +02:00
Oliver Brakmann
ff90a7559d Make sure actors are removed from control groups when captured
Fixes #5976.
2014-07-20 02:49:58 +02:00
reaperrr
be1bd215c7 Compress/re-compress custom shps of D2k mod with XCC Mixer to reduce size. 2014-07-19 23:01:20 +02:00
reaperrr
811c6df291 Compress/re-compress custom RA mod shps with XCC Mixer to reduce size. 2014-07-19 22:59:43 +02:00
reaperrr
2a15dc313b Compress/re-compress several custom shps of TD mod with XCC Mixer to reduce size. 2014-07-19 22:56:55 +02:00
Deniz Ayıkol
686c043151 Put Minelayer.AT before Minelayer.AP 2014-07-19 20:16:34 +03:00
Deniz Ayıkol
6e8a002dad Reordered production palette according to prerequisites. 2014-07-19 19:36:36 +03:00
Matthias Mailänder
6c1efac235 Merge pull request #5977 from pchote/oi-keep-moving
Don’t cancel MoveAdjacentTo / MoveWithinRange when target becomes invalid
2014-07-19 09:39:32 +02:00
Matthias Mailänder
d2aa97c1d1 Merge pull request #5990 from pchote/repair-fix
Play the correct race notification when repairing an ally’s structure.
2014-07-19 08:08:05 +02:00
Paul Chote
850fcd5100 Fix a typo. 2014-07-19 18:03:21 +12:00
Paul Chote
5b0cee78cf Calculate a new path (and possibly new target cell) if the original path is blocked. 2014-07-19 18:03:21 +12:00
Paul Chote
e805461be7 Don’t cancel MoveAdjacentTo / MoveWithinRange when target becomes invalid.
Move to the last known position instead.  Fixes #5968.
2014-07-19 15:42:52 +12:00
Paul Chote
c2ba2fe12b Play the correct race notification when repairing an ally’s structure. 2014-07-19 15:33:06 +12:00
obrakmann
312041b9c8 Merge pull request #5988 from pchote/shellmap-paradrop
Fix scripted paradrops.
2014-07-19 05:01:27 +02:00
Oliver Brakmann
0cf49ad49f Fix old-lua paradrop too. 2014-07-19 14:42:36 +12:00
Paul Chote
87e425042f Fix scripted paradrops. 2014-07-19 14:40:29 +12:00
obrakmann
54191039a9 Merge pull request #5989 from pchote/frozen-target-fix
Fix frozen actors being targetable under shroud.
2014-07-19 04:16:56 +02:00
Paul Chote
bcc32d15ed Fix frozen actors being targetable under shroud. Fixes #5979, #5978. 2014-07-19 12:56:52 +12:00
Paul Chote
0f03d6bee8 Merge pull request #5987 from reaperrr/gem-mine-palette
Fixes gem mine desert palette
2014-07-19 12:00:49 +12:00
reaperrr
a447e35695 Fixes gem mine desert palette. 2014-07-18 22:47:11 +02:00
RoosterDragon
c672ac5bad Improve Exts.Random by testing if the input sequence is a collection, thus avoiding the need to create a copy to get the count.
Using the ElementAt method also means that if the sequence is a list too, then the selection can be done via the indexer rather the enumerating the elements.
2014-07-18 20:58:50 +01:00
Paul Chote
58abd45ed9 Merge pull request #5967 from obrakmann/fix5651
Fix aircraft losing selection outside the map borders
2014-07-18 20:36:02 +12:00
Paul Chote
8a65632851 Merge pull request #5965 from WolfGaming/CustomPrereqChange
Adds the RequiresPrerequisites field into ProvidesCustomPrerequisite
2014-07-18 20:29:11 +12:00
Oliver Brakmann
42f963d687 Fix aircraft losing selection outside the map borders
Fixes #5651
2014-07-18 10:03:57 +02:00
WolfGaming
7b10da6bde Adds the RequiresPrerequisites field into ProvidesCustomPrerequisite and all the logic behind it. 2014-07-18 06:11:03 +00:00
Chris Forbes
62820430de Merge pull request #5974 from pchote/cratefix
Fix unit collection crates and drop-zone maps.
2014-07-18 12:58:24 +12:00
abcdefg30
8f60b9b652 Fixed drop-zone units 2014-07-18 11:39:43 +12:00
reaperrr
1ba41a9af5 Unhardcodes RenderInfantry sequence names. 2014-07-17 20:59:08 +02:00
ScottNZ
04cd99cd75 Add target flashing for C4. Closes #4659 2014-07-15 16:06:38 +12:00
Paul Chote
e3dae2edd0 Replace the obsolete race check from GiveUnitCrateAction. 2014-07-15 10:15:35 +12:00
Paul Chote
8bce37710b Merge pull request #5955 from Squiggles211/production_cancel_fix
Restored PlaceBuilding order's ProductionQueue checks.
2014-07-14 20:06:50 +12:00
Chris Forbes
709f29184a Merge pull request #5954 from abcdefg30/fixhijacker
Made Hijacker buildable by soviets
2014-07-14 08:45:51 +12:00
Squiggles211
006f7b888a Restored production queue current item checks
Fixes regression #5948 where you could freely build any building by
canceling the production before deploying by restoring the currentItem
checks in the PlaceBuilding order to ensure that the production is still
valid.
2014-07-13 14:06:30 -05:00
abcdefg30
1ef3099910 Hijacker again buildable by soviets 2014-07-13 20:39:54 +02:00
Matthias Mailänder
aca0b9d7dd Merge pull request #5932 from MustaphaTR/d2k-only-inf-fix
D2K - Fixed some tiles should be only infantry
2014-07-13 08:34:06 +02:00
Chris Forbes
e7cd4e07f9 Merge pull request #5946 from Phrohdoh/MoreTraitDocs
Added some trait [Desc()]s.
2014-07-13 17:51:55 +12:00
Taryn Hill
da001385ae Added some trait [Desc()]s. 2014-07-12 13:31:14 -05:00
reaperrr
56eca3a5e3 Ion Cannon now scorches the whole hit area, and uses higher Spread + low
MaxSpread to increase damage within the hit area, but keep area of effect
itself relatively low.
Additionally increased damage to make it less inferior to Nukes.
2014-07-12 16:31:53 +02:00
reaperrr
eb96b72878 Add MaxSpread to Warhead to allow setting a specific area of effect. 2014-07-12 12:14:56 +02:00
Matthias Mailänder
a03d607878 Merge pull request #5930 from MustaphaTR/ra-oil-explode
RA - Explosive Oil Derricks
2014-07-12 11:25:30 +02:00
Chris Forbes
d8df332d97 Merge pull request #5940 from Mailaender/fort-lonestar-tech-disable
Fixed unbuildable high-tech on Fort Lonestar
2014-07-12 20:28:56 +12:00
Matthias Mailänder
e512799eeb disable tech properly 2014-07-12 09:47:42 +02:00
Matthias Mailänder
8afddd9497 Merge pull request #5938 from abcdefg30/fortlonestar
Fixed a bug in Fort Lonestar
2014-07-12 09:45:00 +02:00
Pavlos Touboulidis
dcb7a44aa2 Use available TypeConverters to serialize and deserialize types 2014-07-12 04:46:45 +03:00
Pavlos Touboulidis
451426bc3f Trivial typo in exception message 2014-07-12 04:35:31 +03:00
Pavlos Touboulidis
e9dd0b0fab Make FieldLoader/FieldSaver able to work with private fields
* Unify the FieldLoader-related attributes (Ignore, LoadUsing,
FieldFromYamlKey) into a new 'Serialize' attribute. Keep the
previous attributes as shortcuts/aliases to the new attribute.

* Add 'YamlName' field to the new 'Serialize' attribute to allow
yaml names different from the field names. Example:
    [Serialize(YamlName = "Width")]
    private int widthExpression = "0";

* The FieldLoader will treat private fields like public now and
will try to load their values. The FieldSaver gets an optional
parameter specifying whether to save private fields by default.
The 'Serialize' attribute can be used to fine-tune individual
fields.

* Updated the traits documentation exporter to write the yaml
name if it has been overriden.
2014-07-12 04:33:36 +03:00
abcdefg30
b87ea6ddef Update fort-lonestar.lua 2014-07-11 23:47:02 +02:00
Mustafa Alperen Seki
70af7f3595 Changed some tiles types 2014-07-11 16:34:16 +03:00
Mustafa Alperen Seki
b6a39c5993 Explosive Oil Derricks 2014-07-11 15:08:41 +03:00
Matthias Mailänder
a357bceb35 Merge pull request #5926 from pchote/ra-tabs
Fixes #5915
2014-07-11 13:42:21 +02:00
Matthias Mailänder
43242245b8 Merge pull request #5927 from MustaphaTR/ra-building-sort
Fixes #5914
2014-07-11 13:34:11 +02:00
Mustafa Alperen Seki
5fa4a5fa20 Sort Changes 2014-07-11 12:56:45 +03:00
Paul Chote
393702fe67 Fix bogus inconsistencies in the ra tab images:
- Soviet-normal tab glyphs were off by 1px.
- Allied-selected tabs had random semi-transparent pixels.
- Most tabs had a discoloured pixel near the left edge.
2014-07-11 20:04:03 +12:00
Paul Chote
1aacb21b04 Enable correct tab images for helicopters and aircraft. 2014-07-11 18:27:35 +12:00
Paul Chote
fc882437f0 Fix incorrect soviet tab image coordinates. 2014-07-11 18:26:00 +12:00
Daniel Hernandez
bac2b4f28e Add opposing-faction tab art for aircraft and navy, 2014-07-11 18:11:40 +12:00
Paul Chote
ee27b248d8 Remove bitrotted tab source artwork. 2014-07-11 18:09:32 +12:00
Paul Chote
fd2254f9db Merge pull request #5924 from Cr0s/patch-1
Fixed typo in HackyAI building placement code
2014-07-11 18:07:32 +12:00
Paul Chote
be2357f509 Merge pull request #5917 from pavlos256/deterministic-sort
Make tiles sorting deterministic in all cases
2014-07-11 17:53:08 +12:00
Cr0s
0f363d4c0f Fixed typo in HackAI building placement code 2014-07-11 05:44:45 +04:00
Matthias Mailänder
efeba3ec4f Merge pull request #5898 from MustaphaTR/d2k-techlevel
D2k Tech Level
2014-07-10 19:05:35 +02:00
Mustafa Alperen Seki
ec69e05433 Added D2K Tech Levels 2014-07-10 17:17:11 +03:00
Matthias Mailänder
6af834c436 Merge pull request #5901 from ScottNZ/techlevel
Add tech levels to ra
2014-07-10 15:07:46 +02:00
Matthias Mailänder
e8a7d4d93a Merge pull request #5911 from pchote/concrete-fix
Add AllowInvalidPlacement check to IsCellBuildable.
2014-07-10 13:41:02 +02:00
Pavlos Touboulidis
f45d063f1e Make tiles sorting deterministic in all cases
This may fix issue #5916.

In any case, it's wanted because this kind of sort is "unstable".
According to the docs:

    "This implementation performs an unstable sort; that is, if two
    elements are equal, their order might not be preserved."
2014-07-10 12:40:38 +03:00
Paul Chote
c6ed6dbeb9 Remove redundant overload and return early if outside map. 2014-07-10 20:34:17 +12:00
Matthias Mailänder
17310b7234 Merge pull request #5912 from pchote/powr-fix
Allow NormalizeSequence to remove existing damage prefixes.
2014-07-10 09:37:31 +02:00
Matthias Mailänder
d3128463c0 Merge pull request #5907 from reaperrr/misc-ts-fixes
More TS fixes & tuning
2014-07-10 09:04:22 +02:00
Paul Chote
2e9e4cff5c Allow NormalizeSequence to remove existing damage prefixes. Fixes #5909. 2014-07-10 17:16:46 +12:00
Paul Chote
05e1841e0e Add AllowInvalidPlacement check to IsCellBuildable. Fixes #5902. 2014-07-10 17:06:57 +12:00
Pavlos Touboulidis
b88b87b899 Improve game loop
Environment.TickCount was replaced with Game.RunTime that's based on
Stopwatch for increased accuracy.
2014-07-10 04:06:29 +03:00
reaperrr
69077629a7 Reduce infantry sequence tick values, fix Cyborg Commando idle shadow. 2014-07-09 20:14:21 +02:00
reaperrr
b09a301bb3 Added ^Tank default, adjusted movement penalties on terrain types. 2014-07-09 20:14:20 +02:00
reaperrr
1600b30fde Doubles Refinery storage capacity. 2014-07-09 20:14:19 +02:00
reaperrr
1973208694 Fixes Light Post. Closes #5903. 2014-07-09 20:13:38 +02:00
RoosterDragon
ffd2e8ea9d Sped up ActorMap.ActorsInBox.
- By ensuring both the add and remove actor lists are sets, we ensure the partitioning bins will contain only distinct actors. We can remove the HashSet and Distinct in ActorsInBox and ActorsInWorld which provides a nice speedup for queries. ActorsInBox sees nearly a 3x speedup in the RA shellmap.
2014-07-09 18:43:40 +01:00
ScottNZ
f8ad69889c Add tech levels to ra 2014-07-10 01:23:29 +12:00
Matthias Mailänder
fd68c81b15 Update .travis.yml
remove failing auto-wiki-update
2014-07-09 14:11:01 +02:00
Matthias Mailänder
5f1a0ddb99 Merge pull request #5899 from obrakmann/blinky-blinky
Change the colour of the blinking READY to gold
2014-07-09 13:09:46 +02:00
Oliver Brakmann
ab4a9388ce Change defaults for the production palette's ready sign
Default is now to blink alternating between white and gold.
2014-07-09 12:09:44 +02:00
Matthias Mailänder
a816956b5e Merge pull request #5897 from pchote/disable-green
Restore blinking ready label in RA.
2014-07-09 11:37:04 +02:00
Paul Chote
8b01ed034b Restore blinking ready label in RA. 2014-07-09 21:08:00 +12:00
Paul Chote
4471891cae Merge pull request #5896 from Mailaender/d2k-parachute-corpse
Fixed missing parachute corpses in Dune 2000
2014-07-09 21:00:28 +12:00
Paul Chote
2524ead1c4 Merge pull request #5892 from Mailaender/destroyed-repair-building-nre
Added a check if the rearm host building is gone
2014-07-09 20:55:20 +12:00
Paul Chote
15ec2b40f2 Merge pull request #5890 from Mailaender/negative-spawns-crash-fix
Made GetSpawnOccupants more robust against invalid list queries
2014-07-09 20:48:12 +12:00
Matthias Mailänder
dc2880e047 bring it in line with Rearm 2014-07-09 09:35:36 +02:00
Matthias Mailänder
26ed4c24be check if the host building is gone
fixes #5670
2014-07-09 09:25:06 +02:00
Matthias Mailänder
befb11ce69 add parachute corpses
fixes #5893
2014-07-09 09:16:27 +02:00
Matthias Mailänder
971ec55679 Merge pull request #5833 from pchote/cnc-techlevels
Closes #3221
2014-07-09 08:51:29 +02:00
Matthias Mailänder
3491d3b9f8 Merge pull request #5894 from pchote/warhead-nre
Fix NRE if a unit is damaged without a warhead.
2014-07-09 08:12:08 +02:00
Paul Chote
83b559befc Fix NRE if a unit is damaged without a warhead. 2014-07-09 18:02:27 +12:00
Paul Chote
4e1f7dedba Fix the bogus D2K AI definitions. 2014-07-09 17:50:14 +12:00
Paul Chote
a46baeaf2b Reorganise AI base building logic.
- Now obeys defined structure percentages and limits.
- Faster.
- More readable and maintainable code.
2014-07-09 17:50:14 +12:00
Paul Chote
c8bd8336f7 Remove super-spammy debug messages. 2014-07-09 17:50:14 +12:00
Paul Chote
ff78b0f7ea Add tech levels to TD. 2014-07-09 17:50:14 +12:00
Matthias Mailänder
5a891daa59 make GetSpawnOccupants more robust against invalid list queries
fixes #5588
2014-07-09 06:21:59 +02:00
Paul Chote
5e96bb3f8c Merge pull request #5824 from reaperrr/pronedamage
Moved ProneDamage to Warhead
2014-07-09 11:02:02 +12:00
Paul Chote
e5b863f926 Merge pull request #5698 from Mailaender/sonar
Added the sonar pulse to reveal sub marines
2014-07-09 10:44:47 +12:00
Chris Forbes
c70087fdb2 Merge pull request #5885 from Mailaender/ra-capture-tech-oversights
Fixed captureable tech oversights in the Red Alert mod
2014-07-09 08:05:35 +12:00
Matthias Mailänder
c4dffa02da fix chronosphere being visible to soviets 2014-07-08 21:30:09 +02:00
Matthias Mailänder
5740faef21 fix Tanya being available to soviets 2014-07-08 21:27:34 +02:00
Matthias Mailänder
63d4df76a8 Merge pull request #5874 from pchote/revert-desyncs
Revert TickRender and PauseState changes
2014-07-08 21:21:49 +02:00
reaperrr
fa98eae2c3 Applies most TS prone damage values to TS mod. 2014-07-08 21:05:43 +02:00
reaperrr
fabca5dca6 Move ProneDamage modifier from TakeCover to Warhead.
Rename it to ProneModifier and convert it to integer.
2014-07-08 21:05:42 +02:00
Matthias Mailänder
b12c630e63 Merge pull request #5883 from reaperrr/ts-tib-heal
Fixes #5877
2014-07-08 21:03:50 +02:00
Matthias Mailänder
db7b7742a3 Merge pull request #5880 from MustaphaTR/ra-capturable-bio
Capturable Bio Lab
2014-07-08 20:54:53 +02:00
reaperrr
b765d5238c Add TiberiumHeal weapon and use it for healing mutants, cyborgs & critters. 2014-07-08 18:04:20 +02:00
reaperrr
343de6a244 Fix palette and add inaccuracy to Tiberian Fiend's weapon. 2014-07-08 18:02:44 +02:00
Mustafa Alperen Seki
101e57eade Capturable Bio Lab 2014-07-08 11:51:29 +03:00
Matthias Mailänder
1a81016bdc Merge pull request #5869 from reaperrr/ts-blue-tib
Added blue tiberium and blue large crystal to TS mod.
2014-07-08 08:12:12 +02:00
Paul Chote
3918c992c4 Fix D2K turret placement crash. 2014-07-08 17:12:51 +12:00
Paul Chote
1b222958d6 Don’t override custom animations if damaged. 2014-07-08 17:12:36 +12:00
Paul Chote
c639339a62 Remove the crumble overlay after it has completed. 2014-07-08 17:11:59 +12:00
Paul Chote
2b91a2363b Fix make animations. 2014-07-08 16:56:09 +12:00
Paul Chote
5650d5fc98 Revert "use TickRender() for RenderSprites and PaletteModifier"
This reverts commit 87fd576b26.
2014-07-08 11:09:54 +12:00
Paul Chote
802b6a652c Revert "new PauseState to differentiate game and editor pausing"
This reverts commit d1e18cad7a.
2014-07-08 10:42:00 +12:00
Paul Chote
18c9a25232 Revert "freeze animations during pause to visualize it better"
This reverts commit 960248fe44.
2014-07-08 10:40:06 +12:00
Paul Chote
3c2d9910e3 Revert "Undo changes to World::SetLocalPauseState to unbreak Lua"
This reverts commit 77e3d17527.
2014-07-08 10:39:18 +12:00
reaperrr
b279de1edb Fixes tiberium tree shadow frames, adds large blue crystal. 2014-07-07 22:53:24 +02:00
reaperrr
e27e7ce87c Adds blue tiberium to TS mod. 2014-07-07 22:51:00 +02:00
reaperrr
a3cb5d2d1d Renames interior tileset to temperate and adds BlueTiberium terrain type. 2014-07-07 22:49:50 +02:00
Matthias Mailänder
dfc722847a Merge pull request #5862 from obrakmann/fix-lua-pausestate
Old Lua: use the correct method to set the pause state
2014-07-07 21:57:14 +02:00
Oliver Brakmann
77e3d17527 Undo changes to World::SetLocalPauseState to unbreak Lua
Fixes #5864.
2014-07-07 21:50:37 +02:00
Matthias Mailänder
d2adc28a00 Merge pull request #5865 from obrakmann/fix5861
Fix RepairBuilding not working for AI and Lua scripts
2014-07-07 20:54:03 +02:00
Oliver Brakmann
33b916a713 Fix RepairBuilding not working for AI and Lua scripts
Fixes #5861
2014-07-07 19:43:52 +02:00
RoosterDragon
a512d9ad0a Sped up shroud rendering.
- Only update shroud within the visible screen area, rather than the whole map. This improves performance on larger maps significantly when scrolling around since large portions of the shroud do not need to be updated.
- Provide methods in Shroud to return delegates to check for explored/visibility for tiles within a certain region. This allows it to return more efficient delegates whenever the region is within the map bounds, or shroud/fog is disabled. In the typical case where the region is in bounds and shroud/fog is enabled, the fast check is almost twice as fast as the slow check.
- Use the Shroud delegate functions in shroud rendering, frozen actors, minimap rendering and resource layer areas to provide a speedup since these areas of code can often take advantage of the fact they perform checks within the map boundary.
- Cache current element in CellRegionEnumerator to prevent repeated work if the element is accessed more than once.
- Decrease the size of elements in some arrays in hopes of reducing memory needs and improving cache hits.
2014-07-07 17:34:31 +01:00
RoosterDragon
2351c43237 Refactoring pass.
- Extract an enum for edges rather than using magic numbers for everything.
- Remove duplicated code between FoggedEdges and ShroudedEdges by hosting the visibility function into a delegate.
- Make minimap methods more readable.
- Tidy formatting.
- Make some fields readonly.
- Remove unused usings.
2014-07-07 17:34:25 +01:00
Matthias Mailänder
91a076728d generalize into SpawnActorPower
closes #5724
2014-07-07 15:27:54 +02:00
Matthias Mailänder
f60fefd5f5 add a ripple animation based on the move flash 2014-07-07 15:26:07 +02:00
Matthias Mailänder
43bca0e73d add the sonar pulse
closes #4729
2014-07-07 15:26:07 +02:00
Matthias Mailänder
5cdf0e6a67 generalize MoveFlash as parametrized SpriteEffect 2014-07-07 15:23:14 +02:00
Matthias Mailänder
4fb38c955b Merge pull request #5859 from pchote/paratrooper-cleanup
Improve paratroopers.
2014-07-07 15:19:41 +02:00
Paul Chote
e4f8816486 Fix the crate drop. 2014-07-08 00:30:55 +12:00
Paul Chote
ab26d4b0ad Overhaul ParatroopersPower:
- Adds support for multiple drop planes.
- Adds support a beacon and camera.
- Prevents the plane from circling if it can’t unload.
2014-07-08 00:30:38 +12:00
Matthias Mailänder
b8756d9de7 Merge pull request #5860 from pchote/news-fix
News fixes
2014-07-07 13:25:25 +02:00
Paul Chote
470dfa941a Merge pull request #5840 from Mailaender/map-download-isometry-nre
Fixed a NullReferenceException in auto map download.
2014-07-07 22:31:25 +12:00
Paul Chote
d0a972f3b7 Merge pull request #5835 from Squiggles211/wall-damage
Removed false damage states which caused invisible walls.  Fixes #5654
2014-07-07 22:27:25 +12:00
Paul Chote
ad375c5734 Reorganize news parsing. Fixes #5647. 2014-07-07 22:23:04 +12:00
Paul Chote
c352ff644f Use a shared url for news updates. Fixes #5603. 2014-07-07 21:48:07 +12:00
Matthias Mailänder
fa83507a62 Merge pull request #5854 from pchote/ra-poster
Add beacons to the RA spy plane and parabombs
2014-07-07 10:15:03 +02:00
Matthias Mailänder
17e41a7b79 Merge pull request #5856 from MustaphaTR/d2k-footprints
D2k Some Footprint Fixes
2014-07-07 09:33:41 +02:00
Mustafa Alperen Seki
96988fe563 Fixed ref and palace footprints. 2014-07-07 10:20:12 +03:00
Matthias Mailänder
d4627479b5 fix a NullReferenceException in preview.Map 2014-07-07 09:18:24 +02:00
Paul Chote
38a08c0967 Add a spy plane beacon, and quantise facings. 2014-07-07 17:40:51 +12:00
Paul Chote
59bea931a5 Use AirstrikePower for spy planes. 2014-07-07 17:40:51 +12:00
Paul Chote
a4ba7f7158 Remove the obsolete flare definition from AirstrikePower. 2014-07-07 17:40:51 +12:00
Paul Chote
c6299892e0 Remove obsolete BeaconDuration definitions. 2014-07-07 17:40:50 +12:00
Paul Chote
6f7816b653 Add beacon to parabombs, and quantise facings. 2014-07-07 17:40:44 +12:00
Paul Chote
e3e5de2b59 Merge pull request #5844 from Mailaender/ts-blossom-trees
Added Blossom Trees to Tiberian Sun
2014-07-07 11:23:04 +12:00
Chris Forbes
43ce9274e1 Merge pull request #5847 from Mailaender/sietch-bib
Fixed the sietch crashing the game when placed on a map
2014-07-07 09:42:06 +12:00
Chris Forbes
e3100171f0 Merge pull request #5848 from Mailaender/shellmap-category
Categorized shellmaps
2014-07-07 09:39:05 +12:00
Chris Forbes
c2a659f4d2 Merge pull request #5849 from Mailaender/active-animation-pause
Fixed active animations playing during paused games
2014-07-07 09:34:44 +12:00
Matthias Mailänder
dc63171e0e pause active animations 2014-07-06 23:11:56 +02:00
Matthias Mailänder
4fb7d4ef41 fix Unit sietch does not have a sequence named bib2x 2014-07-06 22:55:27 +02:00
Matthias Mailänder
a550febc94 categorize shellmaps 2014-07-06 21:04:03 +02:00
Matthias Mailänder
dac2314051 add blossom trees to Tiberian Sun 2014-07-06 19:00:43 +02:00
Matthias Mailänder
0262a946be add FrozenActorLayer to Tiberian Sun 2014-07-06 19:00:25 +02:00
Matthias Mailänder
b466a066a9 Merge pull request #5839 from ihptru/downloadingstatus
depend on proper status in auto-downloading
2014-07-06 17:46:04 +02:00
ihptru
305f76e300 depend on proper status in auto-downloading 2014-07-06 19:17:38 +04:00
Paul Chote
6ad5c99815 Merge pull request #5806 from Mailaender/seeds-resources-cleanup
Fixed SeedsResources messing with make animation
2014-07-07 01:05:17 +12:00
Matthias Mailänder
82a8fd329e don't play active animation when we sell it 2014-07-06 14:58:29 +02:00
Matthias Mailänder
69209cd340 split WithActiveAnimation from SeedsResource
closes #5300
2014-07-06 14:58:29 +02:00
Matthias Mailänder
59dcd297f5 Merge pull request #5828 from reaperrr/missile-shadow
Re-implement Shadow support for Missiles
2014-07-06 14:55:51 +02:00
Paul Chote
06039ce818 Merge pull request #5304 from Mailaender/music-downloads
Added Music downloads
2014-07-07 00:52:05 +12:00
reaperrr
5a645adb2d TS changes to improve missile test cases. 2014-07-06 14:46:07 +02:00
reaperrr
a69f5857e6 Removes Missile-shadow-related bitrot. 2014-07-06 14:46:05 +02:00
reaperrr
cb216aa345 Reimplement Shadow toggle for Missile projectile.
Enable Shadow by default.
2014-07-06 14:46:04 +02:00
Matthias Mailänder
fe41ac7fa3 @pchote breaks all the things 2014-07-06 14:45:05 +02:00
Matthias Mailänder
443b46ca64 fix Tiberian Sun installation from CD 2014-07-06 14:04:26 +02:00
Paul Chote
3f7293b206 Let FieldLoader do the hard work of loading fields. 2014-07-06 14:04:26 +02:00
Matthias Mailänder
352067eb48 consistent size for all install panels 2014-07-06 14:04:26 +02:00
Matthias Mailänder
038146abb3 prevent flickering 2014-07-06 14:04:26 +02:00
Matthias Mailänder
6a0c158ffa rename gameinit to install for consistency 2014-07-06 14:04:26 +02:00
Matthias Mailänder
585264d3ad remove non-existing "INIT_SETUP" chrome widget reference 2014-07-06 14:04:26 +02:00
Matthias Mailänder
a67e2290d1 fix the music list not being populated after CD asset install 2014-07-06 14:04:26 +02:00
Matthias Mailänder
1f4b780450 save a redirect 2014-07-06 14:04:26 +02:00
Matthias Mailänder
2f55768c1b restart the game instead of unmounting on the fly
avoid more redundancy between the load screens
2014-07-06 14:04:26 +02:00
Matthias Mailänder
334605287c Intro/Map music is also split across several files here 2014-07-06 14:04:26 +02:00
Matthias Mailänder
b2517b2c87 don't test for scores.mix as it is optional 2014-07-06 14:04:26 +02:00
Matthias Mailänder
178bf0643f don't check for general.mix as it stays unmounted
however still extract it
2014-07-06 14:04:26 +02:00
Matthias Mailänder
7b5e072994 unmount all to avoid write permission problems
fight the new caching mechanism and M$ WindowsTM file systems
2014-07-06 14:04:25 +02:00
Matthias Mailänder
dbb4132b66 add TrimOrEmpty to avoid NREs 2014-07-06 14:04:25 +02:00
Matthias Mailänder
cc64b41246 fix Tiberian Dawn CD rip logic
closes #4424
2014-07-06 14:04:25 +02:00
Matthias Mailänder
57a631c284 rebase bit rot crap 2014-07-06 14:04:25 +02:00
Matthias Mailänder
7783e988a7 unify music install and add a download option
closes #4759
2014-07-06 14:04:25 +02:00
Matthias Mailänder
14f71c55bf unify install from CD logic 2014-07-06 14:04:25 +02:00
Matthias Mailänder
351c759793 separate content install from loadscreen 2014-07-06 14:04:25 +02:00
Paul Chote
08b1c989d6 Merge pull request #5640 from Mailaender/editor-tick
Separated Tick and TickRender more cleanly
2014-07-07 00:03:04 +12:00
Matthias Mailänder
7e496f8db9 StyleCop and avoid redundancy 2014-07-06 12:48:47 +02:00
Matthias Mailänder
bf1743ac6e Merge pull request #5838 from obrakmann/fix5378
Fix non-infantry support units starting on subcells. Fixes #5378
2014-07-06 12:09:01 +02:00
Oliver Brakmann
bb38521d70 Add myself to AUTHORS 2014-07-06 12:04:15 +02:00
Oliver Brakmann
cb8ed251b2 Fix non-infantry support units starting on subcells.
Fixes #5378
2014-07-06 12:04:15 +02:00
Matthias Mailänder
cde7ec1948 disallow building placement when the game is paused
touches the most glitchy case of #3277
2014-07-06 09:39:16 +02:00
Matthias Mailänder
565ea05bd7 fix problem with cnc nuke leaking the long idle sequence Tick
and avoid magic numbers
2014-07-06 09:23:31 +02:00
Squiggles211
52bc05c1b5 Fixes #5654 by removing false damage states which caused invisible walls
Removes final set of 16 sequences for all walls as it appears that these
are not actually supposed to be used as damage states for the actual
wall, but as end pieces for each wall.  One of the pieces in particular
caused a single wall to be seen as invisible.  Fixes #5654
2014-07-06 02:09:10 -05:00
Matthias Mailänder
960248fe44 freeze animations during pause to visualize it better 2014-07-06 08:24:08 +02:00
Matthias Mailänder
d1e18cad7a new PauseState to differentiate game and editor pausing 2014-07-06 08:24:08 +02:00
Matthias Mailänder
d580ca6417 ActorMap is updated in Tick
so we can't search for adjacent actors in TickRender
2014-07-06 08:24:08 +02:00
Matthias Mailänder
394d635dae new trait WithMakeAnimation 2014-07-06 08:24:08 +02:00
Matthias Mailänder
87fd576b26 use TickRender() for RenderSprites and PaletteModifier 2014-07-06 08:24:08 +02:00
Matthias Mailänder
58cb603803 Merge pull request #5834 from Squiggles211/heli-turn
Increase Chinook landing speed and removed turn before landing.
2014-07-06 08:19:44 +02:00
Matthias Mailänder
9be8f4ce29 Merge pull request #5832 from obrakmann/fix-old-lua-breakage
Fix breakage of the old Lua API due to recent changes
2014-07-06 07:55:34 +02:00
Squiggles211
ebc6515d73 Fixes #5054 by removing chinook's turn before landing and increasing ascend/descend speed
Allows for any helicopter to enable or disable the turn before landing
but sets it to default off for the chinook.  (may be desireable for
single player missions visual effect like Allies01?)  Also gives the
chinook a faster ascend/descend speed.  Fixes #5054
2014-07-06 00:52:43 -05:00
Oliver Brakmann
3a67b3dec3 Fix breakage of the old Lua API due to recent changes
Specifically, the CPos::CenterPosition -> Map::CenterOfCell rename (#5758),
as well as the additional argument to Paradrop::SetLZ (#5695).
2014-07-06 01:21:22 +02:00
Chris Forbes
ee2dc60eb3 Merge pull request #5822 from Mailaender/voxel-walker-move
Moved specialized voxel render traits to Mods.TS library.
2014-07-06 10:52:35 +12:00
Chris Forbes
636f926184 Merge pull request #5821 from Mailaender/bye-scott
Removed Scott from the active maintainer list
2014-07-06 10:22:01 +12:00
Chris Forbes
1ca218182a Merge pull request #5831 from pchote/repair-crashfix
Don’t try to render the repair indicator if there are no repairers.
2014-07-06 10:19:36 +12:00
Paul Chote
cc14f5ef17 Don’t try to render the repair indicator if there are no repairers. Fixes #5823 2014-07-06 10:05:56 +12:00
Matthias Mailänder
b9d84cb422 Merge pull request #5829 from reaperrr/ts-fiendshard
Fixes TS FiendShard using wrong projectile
2014-07-05 18:14:29 +02:00
reaperrr
0d33aec9d9 Fix TS FiendShard using wrong projectile. 2014-07-05 17:30:39 +02:00
Matthias Mailänder
b5a514d868 move WithVoxelUnloadBody 2014-07-05 12:13:47 +02:00
Matthias Mailänder
07c75b5e27 move WithVoxelWalkerBody to Mods.TS 2014-07-05 12:12:56 +02:00
Matthias Mailänder
a0a5d10e4b remove Scott from the active maintainer list 2014-07-05 11:57:19 +02:00
Paul Chote
8743f39a79 Merge pull request #5814 from Mailaender/vamos-vamos
Fixed units not moving to the RallyPoint
2014-07-05 20:00:47 +12:00
Paul Chote
88cd454ce1 Merge pull request #5695 from Mailaender/parachute-dangers
Added the possibility for paratroopers to die on impact
2014-07-05 19:49:15 +12:00
Paul Chote
da66a9a6b3 Merge pull request #5797 from Mailaender/ts-harvester
Fixed the Tiberian Sun harvester
2014-07-05 19:14:47 +12:00
Matthias Mailänder
5e7e677ca9 fix shadow sprite not being rendered on the ground 2014-07-05 09:13:52 +02:00
Matthias Mailänder
8cdd7dce6c make the fallrate customizable 2014-07-05 09:13:52 +02:00
Matthias Mailänder
4a7687d7e4 add a customizable parachute shadow
closes #3335
2014-07-05 09:13:52 +02:00
Matthias Mailänder
18a77e0039 make the parachute palettes configurable 2014-07-05 09:13:52 +02:00
Matthias Mailänder
ef01fb289b make the parachute animation optional
instead of hard-coding default sprite sequences
2014-07-05 09:13:52 +02:00
Matthias Mailänder
ff1be8daea merge ParachuteAttachment and Parachutable 2014-07-05 09:13:52 +02:00
Matthias Mailänder
e04ff18060 @pchote's quest against legacy truth value definitions 2014-07-05 09:13:51 +02:00
Matthias Mailänder
a38d43019a new setting to allow unlucky paratroopers 2014-07-05 09:13:51 +02:00
Matthias Mailänder
2907273ef2 new trait Parachtuable that decides on the fate upon landing 2014-07-05 09:13:51 +02:00
Matthias Mailänder
1a0bb726e6 document for modders 2014-07-05 09:13:51 +02:00
Matthias Mailänder
8f805248ca StyleCop 2014-07-05 09:13:51 +02:00
Matthias Mailänder
d6c60f6436 tweak the DockOffset a bit 2014-07-05 09:08:50 +02:00
Matthias Mailänder
f4f127e3d1 spaces to tabs 2014-07-05 09:08:50 +02:00
Matthias Mailänder
7385fcbf3f fix VoxelAnimation.DisableFunc being ignored 2014-07-05 09:08:49 +02:00
Matthias Mailänder
6734cd96a4 add a voxel harvester unload animation 2014-07-05 09:08:47 +02:00
Matthias Mailänder
1e2e7bcf42 StyleCop 2014-07-05 09:00:20 +02:00
Matthias Mailänder
7b5f000ba0 stop pretending this is configurable and use MoveTo
fixes #5682
2014-07-05 08:58:21 +02:00
Matthias Mailänder
4fed3371d0 avoid an unneccessary conversion FieldLoader can do 2014-07-05 08:58:21 +02:00
Matthias Mailänder
9199cf4669 get to work automatically 2014-07-05 08:45:37 +02:00
Matthias Mailänder
270975a590 fix crash when docking with a voxel harvester 2014-07-05 08:45:34 +02:00
Paul Chote
bf50372f85 Merge pull request #5787 from Mailaender/input-sound-render-split
Sound and Input cleanup
2014-07-05 18:41:11 +12:00
Matthias Mailänder
b1ac961adc StyleCop 2014-07-05 08:35:38 +02:00
Matthias Mailänder
cf6f32fb96 split Sound.cs in smaller chunks 2014-07-05 08:35:38 +02:00
Matthias Mailänder
8cce30d472 sort into sub-folders Input and Graphics 2014-07-05 08:35:32 +02:00
Paul Chote
dbfd1eaaa3 Merge pull request #5808 from reaperrr/td-bluetib
Replaces glitchy blue tiberium art with TS-style remapable tiberium art
2014-07-05 18:34:18 +12:00
Paul Chote
6250c9df12 Merge pull request #5696 from Mailaender/emit-cargo-on-sell
Finished EmitCargoOnSell
2014-07-05 12:30:29 +12:00
Paul Chote
15d8fadb60 Merge pull request #5801 from Mailaender/building-influence-crash
Fixed a crash when trying to capture husks that have been destroyed.
2014-07-05 11:36:54 +12:00
Paul Chote
31aaaf26b5 Merge pull request #5812 from Mailaender/rallypoint-test-building-hack-removal
Fixed the AI choosing rallypoints on land for shipyards
2014-07-05 11:22:00 +12:00
Paul Chote
6deadd7658 Merge pull request #5798 from Mailaender/td-production-tooltip-nre
Fixed a crash in Tiberian Dawn when a production tooltip is being rendered while the last accompanying production queue is destroyed.
2014-07-05 10:58:13 +12:00
Paul Chote
8d6cd143d6 Merge pull request #5807 from Mailaender/building-influence-reslayer
Fixed resources growing on building bibs and behind trees
2014-07-05 10:53:10 +12:00
obrakmann
80f1dc6a56 Merge pull request #5818 from UberWaffe/bleed
Corrected d2k.sardaukar prone-shoot animation.
2014-07-04 22:08:01 +02:00
obrakmann
6d3edb8725 Merge pull request #5817 from Mailaender/chat-command-nre
Fixed chat commands crashing replays
2014-07-04 21:57:12 +02:00
UberWaffe
29df6866d0 Corrected d2k.sardaukar prone-shoot animation. 2014-07-04 20:10:40 +02:00
Matthias Mailänder
13e0dac141 execute chat commands only locally
fixes #5755
2014-07-04 18:18:33 +02:00
Matthias Mailänder
0572220cc3 Merge pull request #5768 from pchote/multirepair
Closes #3748
2014-07-04 16:12:46 +02:00
Matthias Mailänder
7428776e90 Merge pull request #5813 from pavlos256/asset-browser-search
Instant filtering by file name in the asset browser
2014-07-04 16:01:01 +02:00
Matthias Mailänder
65d61dff3e Merge pull request #5767 from pchote/isqrt
Add Exts.ISqrt to avoid fp sqrt calculations.
2014-07-04 15:48:20 +02:00
Pavlos Touboulidis
d1251d412f Instant filtering by file name in the asset browser 2014-07-04 16:33:26 +03:00
Matthias Mailänder
79dd9a9c6b get rid of the RallypointTestBuilding hack 2014-07-04 14:57:34 +02:00
Matthias Mailänder
7824564a44 fix System.Reflection.ReflectionTypeLoadException 2014-07-04 14:34:34 +02:00
Matthias Mailänder
3c502117a5 Merge pull request #5804 from MustaphaTR/d2k-shellmap
Better Shellmap to D2K
2014-07-04 11:44:17 +02:00
Mustapha
c842f1cbc1 High Resolution Fix 2014-07-04 12:37:47 +03:00
Matthias Mailänder
0feb5a7bdc check for building influence when growing resources
closes #5556
2014-07-04 09:22:14 +02:00
Ishan Bhargava
16df8322c6 Added repair bonus for multiple players
More than one player can now contribute to repairing a building.
Base repair amount is multiplied by value of array
Players who can't afford to contribute are ignored
Repair indicator cycles between each player's color.
2014-07-04 10:40:26 +12:00
Paul Chote
9e11e38005 Merge pull request #5781 from pavlos256/format80-write-rle
Implement Format80 RLE compression
2014-07-04 10:34:01 +12:00
Paul Chote
ce99f02ba6 Merge pull request #5678 from pavlos256/find-tiles-in-circle
Fix and optimize FindTilesInCircle
2014-07-04 10:27:37 +12:00
Matthias Mailänder
ae8b2cec74 Merge pull request #5792 from reaperrr/tib-tree-fixes
TD Tiberium tree fixes
2014-07-03 22:35:34 +02:00
reaperrr
7b5078c4f2 Remove bluetib.mix package. 2014-07-03 22:31:34 +02:00
reaperrr
739865062a Replaces glitchy blue tiberium art with TS-style remapable tiberium art. 2014-07-03 22:28:36 +02:00
reaperrr
9e8c7ee145 Remove duplicate split sequence.
Make blue tib tree more centered on cell (fixes #5744).

Remove obsolete splitblue art.
2014-07-03 22:17:01 +02:00
reaperrr
6fa3f4207a Fix editor position of TD tiberium trees. 2014-07-03 21:52:18 +02:00
Matthias Mailänder
b02ca7695f StyleCop 2014-07-03 18:35:11 +02:00
Pavlos Touboulidis
daed053a57 Fix and optimize FindTilesInCircle 2014-07-03 18:11:28 +03:00
Pavlos Touboulidis
f5de0101fe Implement Format80 RLE compression 2014-07-03 17:53:48 +03:00
Paul Chote
0ffe88753c Merge pull request #5789 from Mailaender/render-trait-documentation
Documented the various overlay and animation change traits
2014-07-03 23:54:13 +12:00
Paul Chote
a4083f4597 Merge pull request #5794 from Mailaender/lint-map-cordons
Added a new Lint check for invalid map cordons
2014-07-03 23:43:41 +12:00
Paul Chote
1a88769c12 Merge pull request #5795 from Mailaender/ts-harvester-tiberium-explosion
Added Tiberium explosions to destroyed harvesters in Tiberian Sun
2014-07-03 23:39:39 +12:00
Paul Chote
d92dc70a2f Merge pull request #5712 from RoosterDragon/sheet-release-buffer
Release sheet buffers
2014-07-03 22:57:56 +12:00
Matthias Mailänder
884fbc0ea9 add a new lint check for invalid map cordons 2014-07-03 10:56:59 +02:00
Matthias Mailänder
e666c75883 don't capture dead actors 2014-07-03 10:33:41 +02:00
Matthias Mailänder
6097b3eb19 document the various overlay and animation change traits 2014-07-03 09:50:10 +02:00
Matthias Mailänder
8a89accab6 Merge pull request #5805 from MustaphaTR/mount-idaho
Mount Idaho Map
2014-07-03 09:37:42 +02:00
Matthias Mailänder
04f1ebe969 abort change owner when the actor is destroyed
fixes #5638
2014-07-03 09:19:51 +02:00
Matthias Mailänder
3c3f85a272 add documentation 2014-07-03 09:05:22 +02:00
Matthias Mailänder
68a97b079b spurious tab 2014-07-03 09:05:22 +02:00
Mustapha
432638dcfa added mount idaho map 2014-07-03 09:59:07 +03:00
Mustapha
e13f8873c0 New Shellmap 2014-07-03 09:51:36 +03:00
RoosterDragon
3a30748f05 Reduce working set by releasing buffers for sheets.
Sheets carry a managed buffer of data that allows updates to be made without having to constantly fetch and set data to the texture memory of the video card. This is useful for things like SheetBuilder which make small progressive changes to sheets.

However these buffers are often large and are kept alive because sheets are referenced by the sprites that use them. If this buffer is explicitly null'ed when it is no longer needed then the GC can reclaim it. Sometimes a buffer need not even be created because the object using the sheet only works on the texture directly anyway.

In practise, this reduced memory consumed by such buffers from ~165 MiB to ~112 MiB (at the start of a new RA skirmish mission).
2014-07-02 17:25:56 +01:00
Matthias Mailänder
30edee01c2 check if palette.CurrentQueue is null to avoid a crash
fixes #5624
2014-07-02 12:18:47 +02:00
Matthias Mailänder
d011438ff3 let the harvester splatter Tiberium on destruction 2014-07-02 09:42:15 +02:00
Paul Chote
0d61a1d19a Merge pull request #5786 from Mailaender/shp-ts-offset-fix
Fixed Tiberian Sun construction yard flickering
2014-07-02 17:14:03 +12:00
Paul Chote
9a167317dd Merge pull request #5742 from tomlane/sniperChurches
Remove ability for Sniper to capture churches.
2014-07-02 17:05:06 +12:00
Matthias Mailänder
ea86aac089 replace EmitCargoOnSell with Cargo.EjectOnSell 2014-07-01 22:11:44 +02:00
Matthias Mailänder
6adf453ad1 finished EmitCargoOnSell
closes #2424
2014-07-01 22:07:15 +02:00
Matthias Mailänder
e8bccc33c6 StyleCop 2014-07-01 22:07:15 +02:00
Matthias Mailänder
392b77647d this does not make any sense
with 0 HP you also can not a single dude
2014-07-01 22:07:15 +02:00
Matthias Mailänder
40cd491bff Merge pull request #5778 from pchote/isometric
Add support for diamond cell grids
2014-07-01 16:59:22 +02:00
Tom Lane
eca4504006 Remove invalid sniper actor from Poseidon map. 2014-07-01 13:23:36 +01:00
Taryn Hill
249c522c00 Merge pull request #5785 from Mailaender/ts-high-fix
Fixed Tiberian Sun artillery not shooting over walls.
2014-07-01 07:02:56 -05:00
Matthias Mailänder
f5b749e9ce fix a rounding problem in SHP(TS) offset floating point math
closes #5765
2014-07-01 13:40:00 +02:00
Matthias Mailänder
de64b31aa4 allow the RPG tower to shoot over walls 2014-07-01 11:30:16 +02:00
Matthias Mailänder
78e4e7a440 allow artillery to shoot over walls 2014-07-01 11:30:12 +02:00
Paul Chote
cf7bd75dad Merge pull request #5759 from Mailaender/ra-tech-capture
Added capturable tech to Red Alert
2014-07-01 19:24:23 +12:00
Matthias Mailänder
38dd3bbdc9 remove pill boxes and hijacker from Allies02 2014-07-01 09:12:13 +02:00
Matthias Mailänder
7cd259d2b8 add a missing space for multi line property documentation 2014-07-01 09:12:13 +02:00
Matthias Mailänder
b05e4217cf document SelfHealing prerequisites 2014-07-01 09:12:11 +02:00
Matthias Mailänder
362c86764f document the buildable and country trait 2014-07-01 09:08:08 +02:00
Matthias Mailänder
a42ac640e4 remove unused copy pasta from TD 2014-07-01 09:03:33 +02:00
Matthias Mailänder
5602e49179 capturable production queues 2014-07-01 09:03:19 +02:00
Matthias Mailänder
6436088cdb Use Prerequisites: ~disabled for unbuildable actors. 2014-07-01 09:02:41 +02:00
reaperrr
5a7dbb6529 Fix TS refinery and repair pad using snow gfx
Until we support TS theater-specific graphics, we should stick to one of the theaters, temperate in this case.
2014-07-01 01:10:55 +02:00
Igor Popov
cefe26349f Merge pull request #5780 from Mailaender/master.openra.net
Changed master server URL to openra.net subdomain
2014-06-30 19:32:08 +04:00
Matthias Mailänder
5bd3a21d34 master server has been migrated to new machine and DNS
closes #5748
2014-06-30 16:09:00 +02:00
Paul Chote
0d625b6af6 Fix sprite overlap outside the map border. 2014-07-01 00:40:42 +12:00
Paul Chote
96c9de2b96 Enable isometric perspective in TS. 2014-06-30 23:44:23 +12:00
Paul Chote
0866903f20 remove blank-testmap. 2014-06-30 23:44:23 +12:00
Paul Chote
68969203bb Extract TS blank-conquest map. 2014-06-30 23:44:23 +12:00
Paul Chote
a30c8b53a7 Add support for diamond cell grids. 2014-06-30 23:44:23 +12:00
Matthias Mailänder
43dccee1b6 Merge pull request #5779 from MustaphaTR/bleed
Level Up from Crate at D2K
2014-06-30 13:41:50 +02:00
Mustafa Alperen Seki
68f8b5073a LevelUpCrate 2014-06-30 10:51:40 +03:00
Paul Chote
af0e948a67 Use map.Contains for the observer shroud check.
Checking against the bounds directly is no longer valid.
2014-06-30 11:24:41 +12:00
obrakmann
3682bc7069 Merge pull request #5772 from pchote/d2k-parachute-fix
Fix D2K paratroopers.
2014-06-29 13:32:57 +02:00
Paul Chote
52af0d2c81 Merge pull request #5771 from Mailaender/hackyai-mcv-cleanup
Cleaned up HackyAI MCV deployment
2014-06-29 13:00:21 +12:00
Matthias Mailänder
5130723fcd remove the overly complicated configurable MCV actor name hack 2014-06-28 15:17:06 +02:00
Matthias Mailänder
aae428be2b throw with a more helpful error than NullReferenceException
closes #5622
2014-06-28 15:17:05 +02:00
Paul Chote
e6a501bb66 Fix D2K paratroopers. 2014-06-28 22:57:12 +12:00
Paul Chote
1c511ea6eb Merge pull request #5769 from Mailaender/actor-lint
Added a new OpenRA.Lint check for invalid actor definitions
2014-06-28 22:00:40 +12:00
Paul Chote
281423c8f4 Merge pull request #5766 from RoosterDragon/read-only-frames
Make sprite frames read-only lists.
2014-06-28 21:54:30 +12:00
Matthias Mailänder
dcaef3b0e9 explain the strange console message 2014-06-28 10:38:51 +02:00
Matthias Mailänder
a5ac1aa581 tell us what you are doing 2014-06-28 10:38:33 +02:00
Matthias Mailänder
95c43132c7 only display lint check name when something goes wrong 2014-06-28 10:38:14 +02:00
Matthias Mailänder
492abc0853 don't spam passed checks 2014-06-28 10:37:38 +02:00
Matthias Mailänder
f9d5a439d8 and another hit for invalid players 2014-06-28 09:52:00 +02:00
Matthias Mailänder
59c12c2a31 now that we check actors and players we can't exclude them 2014-06-28 09:51:50 +02:00
Matthias Mailänder
a6ad359914 remove legacy actors as a test case 2014-06-28 09:51:12 +02:00
Matthias Mailänder
ba1fa7cd81 new check for undefined actors 2014-06-28 09:50:50 +02:00
Matthias Mailänder
7fa51712ec Merge pull request #5758 from pchote/cell-world-conversions
Generalize cell/world coordinate conversions.
2014-06-28 08:27:18 +02:00
Paul Chote
2431c34ca9 Merge pull request #5752 from Mailaender/tank-paradrop
Removed the tank paradrop icon
2014-06-28 16:17:15 +12:00
Paul Chote
d0c3fae1a2 Merge pull request #5406 from RoosterDragon/palette-efficiency
Changed HardwarePalette.ApplyModifiers to be more efficient.
2014-06-28 16:11:43 +12:00
Paul Chote
4216f66ca4 Add Exts.ISqrt to avoid fp sqrt calculations. 2014-06-28 15:48:53 +12:00
RoosterDragon
7030d8b2b6 Changed HardwarePalette.ApplyModifiers to be more efficient.
- Add separate ImmutablePalette and MutablePalette classes since the distinction is extremely important to HardwarePalette.
- Keep a cache of palettes in HardwarePalette to avoid reallocation them every time ApplyModifiers is called.
- Palettes that are not allowed to be modified are copied to the buffer once when added, rather than every time ApplyModifiers is called.
- The AdjustPalette method now takes a read-only dictionary to prevent the dictionary being messed with.
- Added a constant for the palette size to remove its usage as a magic number in several areas.
- The ColorPreviewManagerWidget is annoying in that it needs to actually permanently update a palette after it has been added. To allow this, HardwarePalette now allows a palette to be replaced after initialization. The WorldRenderer therefore now also updates the PaletteReference it created earlier with the new palette to prevent stale data being used elsewhere.
2014-06-28 01:11:48 +01:00
RoosterDragon
19072775d4 Changes ISpriteSource.Frames to be of type IReadOnlyList<ISpriteFrame>.
- Updated implementations to return a ReadOnlyList around an array (to reduce wasted memory from exposing lists or lazy enumerators around lists).
- Protect non-public ISpriteFrame classes by making them inner classes to prevent casting.
- Added an AsReadOnly extension method for lists.
2014-06-27 23:38:34 +01:00
Chris Forbes
5c82fff0ef Merge pull request #5751 from RoosterDragon/map-cache-tileset
Cache tileset lookup in Map
2014-06-28 09:27:27 +12:00
Matthias Mailänder
000768dd4f Merge pull request #5762 from obrakmann/fix-tech-capture-fallout
Fix fallout from tech-capture changes
2014-06-27 22:24:00 +02:00
Matthias Mailänder
7fa8cc10e9 Merge pull request #5763 from obrakmann/build-shift+keypress
Make Shift+<Hotkey> queue five units/buildings. Fixes #5544.
2014-06-27 22:18:50 +02:00
Oliver Brakmann
f7e32aac60 Fix fallout from tech-capture changes 2014-06-27 21:50:03 +02:00
RoosterDragon
bcbd1c2577 Cache tileset lookup in map so GetTerrainIndex and GetTerrainInfo need not repeat it every time.
The lookup accounts for ~50-60% of the time spent in GetTerrainIndex and GetTerrainInfo, and these methods themselves can account for up to 1.3% of total CPU used so this is a small but measurable win.
2014-06-27 19:52:57 +01:00
Matthias Mailänder
e9ee4a1e15 Update ShroudRenderer.cs
fix typo
2014-06-27 13:30:57 +02:00
Paul Chote
d7f1b1c9e2 Remove CVec -> WVec conversion. 2014-06-27 23:30:41 +12:00
Paul Chote
a256e722d5 Remove conversions between legacy and world types. 2014-06-27 23:30:41 +12:00
Paul Chote
9487f49cd5 Replace WPos.ToCPos -> Map.CellContaining. 2014-06-27 23:30:40 +12:00
Paul Chote
4bc09692e0 Remove WVec.ToCVec. 2014-06-27 23:30:40 +12:00
Paul Chote
7b52fa52b6 Replace CPos.CenterPosition -> Map.CenterOfCell. 2014-06-27 23:30:40 +12:00
Paul Chote
b6d1d26eeb Add World parameter to Util.BetweenCells. 2014-06-27 23:30:40 +12:00
Paul Chote
086ec07eb6 Add World parameter to Target.FromCell. 2014-06-27 23:30:40 +12:00
Paul Chote
e4ea012b9e Add World parameter to Target.FromOrder. 2014-06-27 23:30:40 +12:00
Paul Chote
b52cdd4b45 Remove redundant FindActorsInBox helpers. 2014-06-27 23:30:40 +12:00
Matthias Mailänder
0989a5ea08 Merge pull request #5757 from pchote/tsshroud
Use TS shroud sprites.
2014-06-27 13:29:10 +02:00
Paul Chote
8cd6f05b71 Use TS shroud artwork. 2014-06-27 22:28:33 +12:00
Paul Chote
8f046c7c5a Support split sprites for fog/shroud. 2014-06-27 22:28:33 +12:00
Paul Chote
8c4dcb7fe0 Configurable ShroudRenderer palettes and readonly state. 2014-06-27 22:28:33 +12:00
Matthias Mailänder
c60f19aee0 Merge pull request #5629 from pchote/celllayers
Introduce CellLayer and CellRegion abstractions.
2014-06-27 12:27:30 +02:00
Paul Chote
78f8c94df8 Make PathDistance struct immutable. 2014-06-27 22:07:03 +12:00
Paul Chote
5560f276ca Map: Rename IsInMap -> Contains. 2014-06-27 22:07:03 +12:00
Paul Chote
e0df669de9 Bridgelayer: Keys.Contains -> ContainsKey. 2014-06-27 22:07:03 +12:00
Paul Chote
fd4d3b40d0 Simplify shroud range checks. 2014-06-27 22:07:03 +12:00
Paul Chote
2a466d08c3 Remove the now-unused ExploredBounds optimization. 2014-06-27 22:07:03 +12:00
Paul Chote
441971f6d7 Use CellLayer for pathfinding. 2014-06-27 22:07:03 +12:00
Paul Chote
435f47158f Remove unused Map.IsInMap(x,y) overload. 2014-06-27 22:07:03 +12:00
Paul Chote
c5a13d4e65 Remove CellBounds from BuildableTerrainLayer and SmudgeLayer 2014-06-27 22:07:03 +12:00
Paul Chote
997216aef0 Use CellLayer for terrain. 2014-06-27 22:07:02 +12:00
Paul Chote
ad730a44c3 Use CellLayer for resources. 2014-06-27 22:07:02 +12:00
Paul Chote
ce331a28e8 Use CellLayer for custom terrain. 2014-06-27 22:07:02 +12:00
Paul Chote
c5b4d643af Use CellLayer for BridgeLayer. 2014-06-27 22:07:02 +12:00
Paul Chote
fb3477d630 Use CellLayer for BuildingInfluence. 2014-06-27 22:07:02 +12:00
Paul Chote
7c463c414c Use CellLayer for DomainIndex. 2014-06-27 22:07:02 +12:00
Paul Chote
8dc0967d2e Use CellLayer for ActorMap. 2014-06-27 22:07:02 +12:00
Paul Chote
baf27bc4cd Use CellLayers for shroud. 2014-06-27 22:07:02 +12:00
Paul Chote
295af5741f Use CellLayers for ResourceLayer. 2014-06-27 22:07:01 +12:00
Matthias Mailänder
e733ee0434 remove tank paradrop icon 2014-06-27 09:20:55 +02:00
Paul Chote
5a00757eab Use CellLayers for pathfinder debug. 2014-06-27 19:20:46 +12:00
Paul Chote
386b71de82 Integrate CellRegion with Map, Viewport. 2014-06-27 19:20:46 +12:00
Paul Chote
52ab8f3ca1 Add CellRegion and CellLayer classes to simplify map overlays. 2014-06-27 19:20:46 +12:00
Paul Chote
97a61273dd Bring PathSearch in line with the current code style. 2014-06-27 19:20:46 +12:00
Paul Chote
2026747f2a Use Map.IsInMap(CPos) for things that are checking CPos. 2014-06-27 19:20:46 +12:00
Paul Chote
e825205542 Stylecop BridgeLayer. 2014-06-27 19:20:46 +12:00
Paul Chote
bbd1331536 Clean up actor selection in WorldInteractionControllerWidget. 2014-06-27 19:20:44 +12:00
Matthias Mailänder
ea6f76e4f6 Merge pull request #5749 from MustaphaTR/bleed
Some fixes at TS
2014-06-27 08:33:30 +02:00
Matthias Mailänder
2ad6af6801 Merge pull request #5685 from pchote/race-restriction
Add capturable technology support. Fixes #2129
2014-06-27 08:23:59 +02:00
Mustafa Alperen Seki
9a4b4f5841 Infantry Hotkeys 2014-06-26 17:43:05 +03:00
Mustafa Alperen Seki
d70e4a9e32 Defence Hotkeys 2014-06-26 17:36:11 +03:00
Mustafa Alperen Seki
02c7d727d1 Hotkeys 2014-06-26 16:41:49 +03:00
Mustafa Alperen Seki
9ddc4ddc6b Hotkeys 2014-06-26 16:29:36 +03:00
Mustafa Alperen Seki
9ddc53e3fc Harv. Spawn point 2014-06-26 16:16:55 +03:00
Paul Chote
a9635e8c4a Refund the *old* player when a production structure is captured. 2014-06-26 23:14:14 +12:00
Paul Chote
4db2cf6b2b Propagate race to produced actors. 2014-06-26 23:14:14 +12:00
Paul Chote
4b2663015b Fix CanBuild not checking DeveloperMode.AllTech. 2014-06-26 23:14:14 +12:00
Paul Chote
749a947d3f Avoid repeated queries of DeveloperMode. 2014-06-26 23:14:14 +12:00
Paul Chote
2af123034d Use ExtraData for SetStance and SetUnitStance. 2014-06-26 23:14:13 +12:00
Paul Chote
7d24053f52 Introduce Order.SuppressVisualFeedback to cleanly disable flashes. 2014-06-26 23:14:13 +12:00
Paul Chote
32e0bf3edf Fix captured tech unlocking in TD. 2014-06-26 23:14:13 +12:00
Paul Chote
d318d7c5e3 Add HackyAI support for multiple structure queues. 2014-06-26 23:14:13 +12:00
Matthias Mailänder
74be133e40 Use Prerequisites: ~disabled for unbuildable actors. 2014-06-26 23:14:13 +12:00
Paul Chote
ca082e3cec Allow ProductionQueue to filter by race. 2014-06-26 23:14:13 +12:00
Paul Chote
d9e0559c7a Remove some long-dead code. 2014-06-26 23:14:13 +12:00
Paul Chote
66d9629520 Fix remaining tech tree issues. 2014-06-26 23:14:12 +12:00
Paul Chote
7b3a0ebeb5 Tidy production traits. 2014-06-26 23:14:10 +12:00
Paul Chote
f46f71217e Pass initial race to husks and transformed actors. 2014-06-26 23:12:23 +12:00
Paul Chote
7dfc822d76 Tidy transformation trait/activity. 2014-06-26 23:12:23 +12:00
Paul Chote
6536f92b12 Allow custom prerequisites to be restricted by race. 2014-06-26 23:12:23 +12:00
Paul Chote
d4227fa13e Fix production tooltip display. 2014-06-26 23:12:23 +12:00
Paul Chote
a5cc68efee Allow production ownership test to be disabled. 2014-06-26 23:12:23 +12:00
Paul Chote
c5089db19c Allow actors to exist in multiple building queues. 2014-06-26 23:12:22 +12:00
Paul Chote
d43acfe94b Merge pull request #5679 from RoosterDragon/main-loop-alloc
Reduce memory allocation in the main loop
2014-06-26 23:10:56 +12:00
Mustafa Alperen Seki
3c891f7c45 Hervaster collects tiberium 2014-06-26 12:29:42 +03:00
Tom Lane
8d6d06fc5f Remove ability for Sniper to capture churches. 2014-06-25 21:44:50 +01:00
Matthias Mailänder
48bd67b735 Merge pull request #5735 from pavlos256/always-save-replay
Properly save replay even when the game crashes (fixes #5610)
2014-06-25 20:17:39 +02:00
Matthias Mailänder
36c910fcae Merge pull request #5731 from RoosterDragon/sequence-initialize-fix
Fix #5452
2014-06-25 20:15:08 +02:00
Paul Chote
492513a89a Merge pull request #5706 from Mailaender/lint-players
Added a new OpenRA.Lint check for invalid player definitions
2014-06-25 11:30:34 +12:00
Pavlos Touboulidis
e19dae8eec Properly save replay even when the game crashes (fixes #5610) 2014-06-24 22:40:20 +03:00
Oliver Brakmann
0ff66949fb Make Shift+<Hotkey> queue five units/buildings. Fixes #5544. 2014-06-24 19:41:20 +02:00
Matthias Mailänder
66325f4941 Merge pull request #5733 from MustaphaTR/bleed
Heavy Support + Ordos Raider for light
2014-06-24 18:42:33 +02:00
RoosterDragon
3c9f589b5e Move try-catch during creation of sequences into the function rather than around the lazy initialization.
This fixes an issue with VS breaking on the exception because it thinks it will go unhandled, even though it will be handled.
2014-06-24 17:21:41 +01:00
Mustapha
50d12ee22e Update AUTHORS 2014-06-24 16:49:14 +03:00
Mustapha
b297bb7e75 Heavy Support + Ordos Raider for light 2014-06-24 16:43:09 +03:00
Matthias Mailänder
4018da3481 Merge pull request #5732 from MustaphaTR/bleed
Closes #5726
2014-06-24 09:39:40 +02:00
Mustapha
315fad8db7 Light Unit Support for D2K. 2014-06-24 09:30:39 +03:00
obrakmann
04dbe9fc2a Merge pull request #5687 from Mailaender/missile-out-of-map
Added a check for IsInMap(cell) to missiles.
2014-06-23 20:24:28 +02:00
Matthias Mailänder
378dd66622 Merge pull request #5701 from pavlos256/dev-crash
Add /crash dev command
2014-06-23 19:42:32 +02:00
obrakmann
07fc446520 Merge pull request #5697 from Mailaender/classic-minelay
Added a classic minelay order
2014-06-23 19:01:37 +02:00
Matthias Mailänder
7f8e84848d Merge pull request #5722 from MustaphaTR/bleed
Some description changes
2014-06-23 17:38:38 +02:00
Paul Chote
177dd02cd1 Merge pull request #5628 from pavlos256/smooth-scrolling
Add smooth scrolling to the ScrollPanelWidget
2014-06-23 21:46:50 +12:00
Paul Chote
0f115b0468 Merge pull request #5330 from Mailaender/jungle
Added the JUNGLE terrain
2014-06-23 21:42:26 +12:00
Chris Forbes
87ff787f26 Merge pull request #5721 from RoosterDragon/stylecop-small-projects
Run StyleCop on the smaller projects.
2014-06-23 19:09:04 +12:00
Mustapha
2d8f0ce96e Engineer's description changes. 2014-06-23 10:02:54 +03:00
Chris Forbes
3b99e79fd0 Merge pull request #5720 from pchote/revert-fail
Revert Utility changes
2014-06-23 19:01:35 +12:00
Mustapha
4159aa4bba Trike's weaknesses. 2014-06-23 09:56:15 +03:00
RoosterDragon
38617dc0a9 Run StyleCop on the smaller projects.
Also add a copy of the rules to the CrashDialog and Irc projects.
2014-06-23 00:03:37 +01:00
Paul Chote
7cf2a32a2a Revert "export health, cost and damage per section into a CSV file"
This reverts commit 8249012e4b.

Conflicts:
	OpenRA.Utility/Command.cs
2014-06-23 09:31:40 +12:00
obrakmann
e41791568d Merge pull request #5702 from Mailaender/reslayer-cell-full
Fixed exploding harvesters spawning resources on full cells
2014-06-22 18:57:57 +02:00
Matthias Mailänder
379686a64d Merge pull request #5711 from obrakmann/flyattack-fix
Fix FlyAttack discarding the activity queue upon completion
2014-06-22 18:49:00 +02:00
RoosterDragon
8a60880cf1 Tackle the last of the low hanging fruit for memory allocations in the main game loop.
- Avoid calling string.Split twice in SprintFont.Measure.
- Change ActorsInBox method of ActorMap and ScreenMap to avoid allocating and intermediate list. As a bonus this allows the sequence to be lazily consumed. Also avoid LINQ in these methods.
- In FrozenUnderFog.TickRender, the method exits early if no players are visible so the attempt at lazy generation was not needed.
- Unwrap a LINQ Any call in ClassicProductionQueue.Tick.
- Merge some successive Where calls in ProximityCapturable into single predicates.
2014-06-22 17:29:45 +01:00
Matthias Mailänder
a5d765e100 Merge pull request #5713 from RoosterDragon/game-project-config
Fix debug info regression from #5673
2014-06-22 17:55:03 +02:00
RoosterDragon
927b0499da Produce debug output for OpenRA.Game. 2014-06-22 16:38:05 +01:00
Oliver Brakmann
cf2fad673d Fix issue with capturing enemy buildings in 'Intervention' mission
The onDamaged event handler would still fire after an enemy building had
been captured. Fixed by checking the owner before starting repairs.

Thanks to Microbit for showing me that people actually did that.
2014-06-22 14:03:57 +02:00
Oliver Brakmann
c12527e866 Remove workaround for #4482 from 'Intervention' mission 2014-06-22 14:03:57 +02:00
Oliver Brakmann
aa91020790 Do not discard activity queue when FlyAttack completes. Fixes #4482. 2014-06-22 14:03:44 +02:00
Matthias Mailänder
4587ce6cd2 fix remaining errors spotted by new player lint check 2014-06-22 13:34:09 +02:00
Matthias Mailänder
6eabd080b8 StyleCop 2014-06-22 13:30:35 +02:00
Matthias Mailänder
b70c56927f add a new Lint check for map players 2014-06-22 13:30:35 +02:00
Matthias Mailänder
2e4749680c Merge pull request #5703 from abcdefg30/mapyamls-update
Fixed non-existing enemies in mini-games.
2014-06-22 13:02:29 +02:00
abcdefg30
3260590c59 updated training-camp mapyaml 2014-06-22 12:08:57 +02:00
abcdefg30
0daf8c173e updated drop-zone mapyaml 2014-06-22 12:07:48 +02:00
abcdefg30
fad98df605 updated bomber-john mapyaml 2014-06-22 12:07:02 +02:00
Matthias Mailänder
05609399eb don't try to spawn resources when the cell is already full
fixes #5699
2014-06-22 11:49:40 +02:00
Pavlos Touboulidis
98471092f6 Add /crash dev command
Throws an exception and crashes the game. Useful to test the
shutdown sequence.
2014-06-22 12:18:13 +03:00
Matthias Mailänder
48a5c69ab8 allow to lay single mines similiar to the original
closes #5467
2014-06-22 08:31:40 +02:00
Matthias Mailänder
d3d74c4e5f StyleCop 2014-06-22 08:31:36 +02:00
reaperrr
775f707e03 Made TD jungle terrain slightly less blueish. 2014-06-21 19:13:31 +02:00
Matthias Mailänder
52e2b83069 add the JUNGLE terrain to Tiberian Dawn
http://cnc-comm.com/community/index.php?topic=2880.0
2014-06-21 19:13:31 +02:00
Matthias Mailänder
69ddcf3fee Merge pull request #5692 from obrakmann/fix5681
Fix size of force-start lobby dialogs. Fixes #5681.
2014-06-21 18:04:10 +02:00
Pavlos Touboulidis
628c524494 Add smooth scrolling to the ScrollPanelWidget 2014-06-21 16:41:56 +03:00
Oliver Brakmann
235acea70a Fix size of force-start lobby dialogs. Fixes #5681. 2014-06-21 13:55:12 +02:00
Matthias Mailänder
8bff7baf4b destroy missiles leaving the map
fixes #5582
2014-06-21 13:28:09 +02:00
Matthias Mailänder
f48b53d5b1 Merge pull request #5690 from obrakmann/fix5686
Fix breakage of old Lua api. Fixes #5686.
2014-06-21 13:26:46 +02:00
Oliver Brakmann
f8e5217b11 Fix breakage of old Lua api. Fixes #5686. 2014-06-21 13:04:31 +02:00
Paul Chote
3ed0f75ecc Merge pull request #5689 from Mailaender/ts-domainindex
Added missing DomainIndex to Tiberian Sun
2014-06-21 22:57:23 +12:00
Paul Chote
2e605ba0f7 Merge pull request #5683 from Mailaender/autotarget-stance-documentation
Documented the AutoTarget stances system
2014-06-21 22:51:16 +12:00
Matthias Mailänder
ea4cde0da8 document DomainIndex 2014-06-21 12:37:04 +02:00
Matthias Mailänder
f13c5e20b4 add missing DomainIndex to Tiberian Sun 2014-06-21 12:31:38 +02:00
Matthias Mailänder
46b08273e0 Merge pull request #5680 from pchote/lobby-fixup
Clean up MapPreviewWidget.
2014-06-21 11:32:38 +02:00
Paul Chote
5760e665d3 Clean up map previews. Fixes #5665. 2014-06-21 21:15:11 +12:00
Matthias Mailänder
b85aaa7bfa document the stance system 2014-06-21 08:34:58 +02:00
Paul Chote
5cac1ed066 Merge pull request #5674 from abcdefg30/bleed
updated drop-zone-battle-of-tikiaki map.yaml
2014-06-21 13:39:51 +12:00
Paul Chote
444380b3cf Merge pull request #5676 from pavlos256/fix-rng-division-by-zero
Fix #5675
2014-06-21 12:57:49 +12:00
Pavlos Touboulidis
b9542e0f3f Fix #5675 2014-06-20 22:54:56 +03:00
abcdefg30
b592063a26 updated drop-zone-battle-of-tikiaki map.yaml
Replaced 7x "Multi17" (not existing) with "Multi7" and 1x "Multi11" (also not existing) with "Multi1"
2014-06-20 21:00:39 +02:00
Matthias Mailänder
53930fdc81 Merge pull request #5673 from RoosterDragon/solution-config
Clean up project settings
2014-06-20 20:58:05 +02:00
RoosterDragon
e0d8d8cf80 Clean up project settings.
- Create single platform config named x86 and have all projects target x86.
- Remove Release config (broken anyway).
- For the Debug config, ensure TRACE and DEBUG constants are set and unsafe code is allowed for all projects (same as the makefile).
- Warn level 4 and optimizations off were removed from the config automatically by VS (it assumes these values by default, and these match the makefile).
- The CrashDialog project can reuse the icon from the Game project as long as the path is set correctly.
- Fix TS project so it builds (I know it's going but its annoying that the project must be unloaded).
2014-06-20 19:29:54 +01:00
Paul Chote
bc92bc1774 Merge pull request #5649 from Mailaender/upnp-polish
Made the Mono.NAT integration more robust
2014-06-21 01:31:33 +12:00
Paul Chote
57280e3eab Merge pull request #5660 from Mailaender/document-traits
Documented some order related traits
2014-06-21 01:27:11 +12:00
Paul Chote
a6cb60e583 Merge pull request #5646 from Mailaender/replay-dropdown-polish
Polished the Replay Browser dropdowns
2014-06-21 01:23:33 +12:00
Paul Chote
fd78848de2 Merge pull request #5645 from Mailaender/travis-update-wiki
Added ./update-wiki.sh to Travis CI deployment
2014-06-21 01:20:29 +12:00
Paul Chote
c8c05ea19c Merge pull request #5451 from Mailaender/csv-dps
Added CSV rule export to OpenRA.Utility.exe
2014-06-21 01:18:12 +12:00
Paul Chote
f481c04ce6 Merge pull request #5305 from Mailaender/harvester-splatter-resoures
Added resource splattering to destroyed harvesters
2014-06-21 01:15:22 +12:00
Matthias Mailänder
e607c04cce let harvester splatter resources when exploding
closes #2346
2014-06-20 11:11:31 +02:00
Matthias Mailänder
3e627d2eba rename ore to the more generic name resources everywhere 2014-06-20 11:11:31 +02:00
Matthias Mailänder
30fa8f35d8 Update AttackGarrisoned.cs
closes #5264
2014-06-20 09:01:51 +02:00
Matthias Mailänder
0e1f98c2a9 Merge pull request #5600 from RoosterDragon/auto-restart
Offer user quick restart if settings change
2014-06-20 08:56:08 +02:00
Matthias Mailänder
6e97c51530 Merge pull request #5667 from noyanbaykal/bleed
Fixed #5664
2014-06-20 08:11:26 +02:00
Matthias Mailänder
ef2e02d008 document ScaredyCat 2014-06-19 21:21:16 +02:00
Matthias Mailänder
8ff5d9ef9b document Guard 2014-06-19 21:21:16 +02:00
Matthias Mailänder
d88fc7c3f2 document CanPowerDown 2014-06-19 21:21:16 +02:00
Matthias Mailänder
cf3f79bf29 document AttackWander 2014-06-19 21:21:16 +02:00
Matthias Mailänder
1c719cb34f document D2kResourceLayer 2014-06-19 21:21:16 +02:00
Matthias Mailänder
18805779a8 document RejectsOrders 2014-06-19 21:21:14 +02:00
noyanbaykal
54e53a1306 Changed spaces to tabs 2014-06-19 13:20:55 -04:00
noyanbaykal
0ad767a05e Fixed #5664
Mission description scrolls to the top whenever a new mission is
selected to avoid out-of-bounds scrollbar
2014-06-19 13:12:12 -04:00
Matthias Mailänder
e8473990ef Merge pull request #5658 from RoosterDragon/formatting-cleanup
Remove & sort usings
2014-06-19 08:36:57 +02:00
RoosterDragon
22abf9b4c4 Remove and sort usings. 2014-06-18 21:43:35 +01:00
RoosterDragon
e8111e8ac6 Restart the process rather than reloading a new AppDomain. 2014-06-18 21:36:59 +01:00
RoosterDragon
52b09bdfe8 If changed settings require a restart, offer the user to do it now.
Add a dialog when closing the settings screen asking the user if they would like to restart the game now in order to apply any settings that are only applied after restarting the game. The game is reloaded in-process by spinning up a new AppDomain in order to reset state.
2014-06-18 21:36:56 +01:00
Matthias Mailänder
6d2f180cd4 Merge pull request #5635 from RoosterDragon/traits
TraitDictionary cleanup
2014-06-18 11:09:50 +02:00
RoosterDragon
85734defec Improve trait enumeration speed for All and GetMultiple.
Use a hand-rolled enumerators to avoid the overhead from compiler generated enumerable blocks. This trades terseness for some minor performance gains.
2014-06-17 22:11:23 +01:00
RoosterDragon
909c5c7037 Some minor cleanup in TraitDictionary and affected callsites. 2014-06-17 22:10:41 +01:00
Paul Chote
50d3929862 Merge pull request #5616 from RoosterDragon/syncreport-simplify
Rewrite SyncReport for clarity and performance
2014-06-17 22:54:48 +12:00
Matthias Mailänder
3be26e4cda Merge pull request #5617 from pchote/attack-moveadjacent
Improve unit-attack movement
2014-06-17 10:03:49 +02:00
Matthias Mailänder
1f7b0ad5d4 time limit the port forwarding if possible 2014-06-16 16:42:06 +02:00
Matthias Mailänder
a8c029f130 check if we really found a UPnP compatible NAT device 2014-06-16 16:35:33 +02:00
Matthias Mailänder
4d2412f4b8 this can't throw 2014-06-16 16:34:44 +02:00
Matthias Mailänder
d25fd654bc NatUtility.DeviceLost is never fired 2014-06-16 16:33:57 +02:00
Matthias Mailänder
db319f8f0b this will never happen 2014-06-16 16:33:16 +02:00
Matthias Mailänder
521ca70254 set the git user and email to avoid problems 2014-06-16 10:30:14 +02:00
Matthias Mailänder
83e33b99e8 StyleCop 2014-06-16 10:22:10 +02:00
Matthias Mailänder
88480e0dc2 make it clear that this does not need to match content height 2014-06-16 10:17:30 +02:00
Matthias Mailänder
44ab94f03a limit replay browser dropdown box height to something sane
closes #5641
2014-06-16 10:16:54 +02:00
Matthias Mailänder
6928a828e8 pushd and popd is safer here to not confuse Travis 2014-06-16 09:34:17 +02:00
Matthias Mailänder
eb27c9ef9d run ./update-wiki.sh again after release deployment
closes #5643
2014-06-16 09:29:17 +02:00
Matthias Mailänder
1d276e4186 add a pure data export for non-spreadsheet applications 2014-06-15 20:13:14 +02:00
Matthias Mailänder
6d2dfabb41 factor in burst delay 2014-06-15 20:12:47 +02:00
Matthias Mailänder
e0ba2046b5 add weapon name 2014-06-15 20:12:24 +02:00
Matthias Mailänder
de005c284c add armor types and move calculation into spreadsheet 2014-06-15 20:11:41 +02:00
Matthias Mailänder
8249012e4b export health, cost and damage per section into a CSV file
closes #3855
2014-06-15 20:10:51 +02:00
Matthias Mailänder
60d973aab4 Merge pull request #5634 from pchote/supportpower-prereqs
Allow support powers to require tech prerequisites.
2014-06-15 13:10:39 +02:00
Paul Chote
a220182c9e Remove cruft from RA airfield rules. 2014-06-15 22:51:42 +12:00
Paul Chote
1db1a1b324 Fix a typo in ITechTreeElement. 2014-06-15 22:49:52 +12:00
Paul Chote
2180e1f3f1 Allow support powers to require tech prerequisites. 2014-06-15 22:49:52 +12:00
Paul Chote
afa3fc8143 Simplify MoveAdjacentTo pathfinding. 2014-06-15 22:48:44 +12:00
Paul Chote
2141656460 Only inset range for mobile targets. 2014-06-15 22:48:43 +12:00
Paul Chote
58c3f9ad0c Use MoveWithinRange for attack activities.
Fixes #2104. Fixes #2923. Fixes #4455.
2014-06-15 22:48:43 +12:00
Paul Chote
64ab0a77a9 Added MoveWithinRange activity for Mobile units. 2014-06-15 22:48:43 +12:00
Paul Chote
887a515e14 Add MinRange plumbing to attack activities. 2014-06-15 22:48:43 +12:00
Paul Chote
f5a44f3c41 Merge pull request #5633 from ScottNZ/refactor
Some R# refactoring
2014-06-15 22:33:30 +12:00
ScottNZ
90894aa03e Use var everywhere 2014-06-15 22:17:34 +12:00
ScottNZ
dbffce81a6 Remove unused usings 2014-06-15 22:16:40 +12:00
ScottNZ
23f0e00bcc Now that we're on .NET 4 again, reintroduce optional parameter for RegisterNewSquad 2014-06-15 22:14:40 +12:00
ScottNZ
5e641750aa Use Any() instead of Count() == 0 2014-06-15 22:14:39 +12:00
ScottNZ
831b9b3ca3 Remove some stray semicolons 2014-06-15 22:14:39 +12:00
ScottNZ
6b85660d7d Compact lambda expressions in some (not all) places 2014-06-15 22:14:38 +12:00
ScottNZ
375fc1c5f1 Remove redundant constructors 2014-06-15 22:14:38 +12:00
ScottNZ
91bc1acca3 Fixed selectedAuthor in ModBrowserLogic not being the correct value if mod.Author is null 2014-06-15 22:14:37 +12:00
Paul Chote
1169211893 Merge pull request #5579 from Mailaender/frozen-C4
Fixed C4 target inconsistencies with Fog of War and Husks
2014-06-15 22:01:04 +12:00
Paul Chote
cc3e9b55a8 Merge pull request #5596 from Mailaender/opengl-version
Fixed crash when OpenGL version parse fails
2014-06-15 21:45:32 +12:00
Paul Chote
91236b2ca0 Merge pull request #5639 from Mailaender/editor-stylecop
Fixed some minor StyleCop issues
2014-06-15 21:39:29 +12:00
Matthias Mailänder
8f64835898 StyleCop 2014-06-15 10:51:57 +02:00
Matthias Mailänder
0679940c77 Merge pull request #5637 from pchote/ready-blink
Restore the blinking ready text in TD.
2014-06-14 13:58:49 +02:00
Paul Chote
3ee54fd00a Restore the blinking ready text in TD. 2014-06-14 22:37:44 +12:00
Matthias Mailänder
88757eccfa Merge pull request #5517 from deniz1a/blink-ready
New alternating colors blink option for build palette widget
2014-06-14 12:00:26 +02:00
Matthias Mailänder
dac12839fd Merge pull request #5630 from pavlos256/map-helpers
Move map helpers from WorldUtils to Map
2014-06-14 11:49:19 +02:00
Matthias Mailänder
fe0d7ab00e Merge pull request #5627 from pchote/frozen-cloak-fix
Invalidate FrozenActors that don’t have any sprites.
2014-06-14 11:41:49 +02:00
Matthias Mailänder
b3a2f81706 Merge pull request #5470 from Kanar/AirfieldRP
Closes #5592
2014-06-14 11:03:17 +02:00
Matthias Mailänder
1ebfc6bb06 Merge pull request #5631 from pavlos256/dev-iddqd
Add "/all" dev command
2014-06-14 10:27:58 +02:00
Matthias Mailänder
ee0df9c1cb make C4 Demolition frozen actor aware 2014-06-14 09:35:38 +02:00
Matthias Mailänder
fa0e4c3d0d what if there is no vendor info to remove from version string 2014-06-14 08:25:46 +02:00
Matthias Mailänder
2cc1d34078 remove redundant OpenGL version check to avoid NREs 2014-06-14 08:25:46 +02:00
Matthias Mailänder
7b5476aca7 don't crash there yet when OpenGL version parsing fails
closes #5595
2014-06-14 08:25:26 +02:00
Paul Chote
479feadef3 Merge pull request #5469 from Mailaender/fort-lonestar-lua
Ported Fort Lonestar to Lua
2014-06-14 17:47:06 +12:00
Matthias Mailänder
525a0c4ff1 port Fort Lonestar to Lua 2014-06-14 07:40:52 +02:00
Matthias Mailänder
b7ca65fb7b update Lua project files 2014-06-14 07:32:47 +02:00
Matthias Mailänder
473ca13b17 dos2unix 2014-06-14 07:32:47 +02:00
Paul Chote
c58d737400 Merge pull request #5597 from Happy0/mouse_window_focus
Removing requirement to restart game after applying changes to mouse focus option
2014-06-14 17:30:02 +12:00
Paul Chote
f115dda5df Merge pull request #5550 from pavlos256/reload-chrome
Add developer shortcut to reload chrome files
2014-06-14 17:25:18 +12:00
Paul Chote
5e986b3079 Merge pull request #5615 from RoosterDragon/minor-alloc
Minor allocation tweaks
2014-06-14 12:26:39 +12:00
Pavlos Touboulidis
ee4f3e5642 Always allow cheats on single player games 2014-06-13 17:18:12 +03:00
Pavlos Touboulidis
d22658011b Add "/all" dev command 2014-06-13 16:26:48 +03:00
Pavlos Touboulidis
3f2425f1d6 StyleCop 2014-06-13 15:55:48 +03:00
Pavlos Touboulidis
86febed0ce Move ChooseRandomEdgeCell from WorldUtils to Map 2014-06-13 14:31:01 +03:00
Pavlos Touboulidis
060d5326ed Move FindTilesInCircle from WorldUtils to Map 2014-06-13 14:24:53 +03:00
Pavlos Touboulidis
03b8096807 Move DistanceToMapEdge from WorldUtils to Map 2014-06-13 14:04:36 +03:00
Pavlos Touboulidis
f0c672b70c Move ChooseRandomCell from WorldUtils to Map 2014-06-13 14:02:51 +03:00
Pavlos Touboulidis
77fb188585 Move ClampToWorld from WorldUtils to Map 2014-06-13 13:59:40 +03:00
Pavlos Touboulidis
c282fa1077 Move GetTerrainIndex/Info from WorldUtils to Map 2014-06-13 13:57:32 +03:00
Paul Chote
0cf2d608e4 Merge pull request #5463 from pavlos256/perf-terrain-movement
Change terrain type from string based dictionaries to arrays
2014-06-13 21:19:29 +12:00
Paul Chote
96477b7c1a Invalidate FrozenActors that don’t have any sprites. Fixes #4809. 2014-06-13 21:07:39 +12:00
Pavlos Touboulidis
db53f8e648 Add developer shortcut to reload chrome files
Hitting Ctrl+Shift+C will re-initialize the chrome provider,
reloading all chrome files instantly. Useful when changing the
UI.

Note: A new "RootWidget" was created to trap top-level (global)
shortcuts instead of putting everything in Widget.
2014-06-13 11:31:09 +03:00
Pavlos Touboulidis
092352729f Change terrain type from string based dictionaries to arrays 2014-06-13 11:20:54 +03:00
Paul Chote
ea276d466d Merge pull request #5621 from chrisforbes/travis-update-before-installing
Adjust travis config to update package lists before installing dependencies
2014-06-13 10:45:11 +12:00
Chris Forbes
83fc5085e3 Adjust travis config to update package lists before installing dependencies 2014-06-13 10:29:22 +12:00
Gordon Martin
89c9499909 Removing requirement to restart game after applying changes to mouse focus option. The setting now defaults to 'false' as it is likely to be disruptive to players who are used to the usual behaviour in windowed mode. 2014-06-12 22:57:25 +01:00
RoosterDragon
6f5fbeceb1 Use expressions to generate fast member access code rather than using the slower reflection based methods. 2014-06-12 08:32:26 +01:00
RoosterDragon
3e24e89477 Rewrite SyncReport for clarity and performance.
- Drop the impressive but inscrutable dynamically generated code in favour of some plain old code.
- Cache type information so costly reflection need not be performed each time.
- Only capture values from a sync object into an array rather than a dictionary lookup of both names and values for efficiency.
- Throw if the sync attribute is used on a property that cannot be read or that uses index parameters.
2014-06-12 08:30:27 +01:00
Paul Chote
b8cdb224d1 Merge pull request #5540 from RoosterDragon/begin-frame-cache-viewport
Avoid redundancy in BeginFrame.
2014-06-12 18:15:47 +12:00
Paul Chote
f6f366c4b3 Merge pull request #5401 from RoosterDragon/nodesdict
Changed MiniYaml.NodesDict property into a method.
2014-06-12 17:34:59 +12:00
RoosterDragon
b8b8b1e2df Minor changes to reduce allocation.
- Cache a predicate in ActorMap.
- Use short circuiting to skip a call to HasTrait in AttackBase.
- In AutoTarget.ScanForTarget, move the check for the scan time above the calculations since we can skip them if it's not time yet.
- In AutoTarget.ChooseTarget, merge four Where calls into one.
2014-06-12 05:32:44 +01:00
Paul Chote
e0c59511fb Merge pull request #5152 from Mailaender/auto-l10n
Automated translation string extraction
2014-06-12 10:31:07 +12:00
Chris Forbes
1c5c2b576c Merge pull request #5601 from RoosterDragon/sheet-perf
Speed up some loops with Marshal.Copy
2014-06-12 10:07:29 +12:00
Chris Forbes
ecb7b5056c Merge pull request #5602 from RoosterDragon/perfsample-streamline
Streamline PerfSample
2014-06-12 10:05:31 +12:00
RoosterDragon
4ce8a4a648 Use Marshal.Copy for faster array copying.
- Rewrite several methods to use Marshal.Copy to copy data faster and more succinctly compared to doing it manually.
- Rewrite Sheet.AsBitmap(TextureChannel, Palette) with a faster and more self descriptive loop.
2014-06-11 05:02:38 +01:00
RoosterDragon
783fd8eb32 Streamline PerfSample.
- Avoid memory allocations by making PerfSample a struct, and tracking ticks manually rather than creating a Stopwatch instance.
2014-06-11 03:52:16 +01:00
Paul Chote
e347cdfb32 Merge pull request #5410 from RoosterDragon/IDisposable
Disposable fixup
2014-06-11 10:55:44 +12:00
RoosterDragon
a2ed4fd5f9 Avoid redundantly setting viewport parameters in BeginFrame.
- Cache the old resolution, scroll and zoom in BeginFrame, and don't bother updating the viewport parameters again until they change.
- Pass around scroll as an int2 to reduce the number of back-and-forth casts.
2014-06-10 17:06:25 +01:00
Kanar
6fdb9e688a Adds RallyPoint to Airfield, queues TakeOff 2014-06-10 18:02:04 +02:00
Paul Chote
ccb34adb04 Merge pull request #5503 from RoosterDragon/map-preview-perf
Faster map preview generation.
2014-06-11 00:05:10 +12:00
RoosterDragon
9dbbc23967 Make map preview generation fast.
- Change Map.LoadMapTiles and Map.LoadResourceTiles to read the whole stream into memory before processing individual bytes. This removes the cost of significant overhead from repeated calls to ReadUInt8/16.
- Remove significant UI jank caused by the map chooser by not including the placeholder widget. The maps render fast enough that it is no longer worthwhile and it was causing a lot of flushes which were the source of the jank.
- Trigger async generation for all maps when the chooser is loaded. This means in practice all previews will be ready by the time the user begins to scroll the selection. Since generation is fast, there is no issue with scrolling straight to the bottom and having to wait for the backlog to clear.
2014-06-10 11:46:39 +01:00
RoosterDragon
a598a01108 Fixed IDisposable implementation and usage.
- Implement IDisposable interface correctly, with sealed classes where possible for simplicity.
- Add using statement around undisposed local variables.
2014-06-10 11:23:55 +01:00
deniz1a
1821c52db0 Make "Ready" text alternate between red and white
Make color of "Ready" text alternate between red and white.

Made the code cleaner.

Whitespace correction.

Whitespace correction again.

Change color from red to green and make it moddable

Use enum for ReadyTextStyle

Use enum for cnc

Made variables public and simplified if statements

fix enum

fix enum and )

ReadyText settings in ra yaml

ReadyText settings in cnc yaml

Move values from code to ra yaml

Move values from code to cnc yaml

revert code changes cnc

revert code changes ra

move around a bit in ra yaml

move around a bit in cnc yaml

Add values to d2k yaml
2014-06-10 12:00:57 +03:00
Matthias Mailänder
8093942913 fix bogus label descriptors 2014-06-10 09:24:35 +02:00
Matthias Mailänder
69d86cfcf2 add automated language string extraction to utility 2014-06-10 09:24:28 +02:00
Matthias Mailänder
c9a49538d6 translatable tooltips 2014-06-10 09:18:46 +02:00
Paul Chote
ee7573d01c Merge pull request #5484 from RoosterDragon/startup-efficiency
Improved efficiency of startup methods.
2014-06-10 18:28:25 +12:00
Paul Chote
373529e110 Merge pull request #5505 from pavlos256/map-preview-generation
Map preview generation
2014-06-10 17:56:21 +12:00
Chris Forbes
00b95f754f Merge pull request #5593 from RobotCaleb/misc_fixes
Expanded credits window a bit
2014-06-10 10:39:50 +12:00
Caleb Anderson
3b9f1ed43c expand credits window a bit to fit the text better. 2014-06-09 16:06:45 -06:00
Caleb Anderson
49def655c9 add sublime text project/workspace to ignore 2014-06-09 16:06:44 -06:00
Matthias Mailänder
9df00ad8f9 Merge pull request #5590 from Happy0/sd2windowgrab
Closes #4977
2014-06-09 20:29:29 +02:00
Gordon Martin
5eab479c34 Adding SDL2 window grab on loading the game. Made this behaviour configurable in the 'Input' tab of the Settings menu
Updated settings file for TD to expose the new 'Lock mouse to window' display configuration option

A text label notes that modifying the 'Lock mouse' check box requires a restart
2014-06-09 19:10:05 +01:00
RoosterDragon
e63f330717 Improved efficiency of startup methods.
- ShpReader will copy the input stream into memory just once rather than for every header.
- ShpReader.CopyImageData switched to use Array.Copy since that uses some unsafe magic for speed.
- In ActorInfo, cache a GetType call and prevent needless materialization in PrerequisitesOf.
- In ObjectCreator, cache type and ctor lookups since these are expensive and often repeated.
- Implement IReadOnlyDictionary<T, U> on Cache<T, U> to provide some supplementary functions.
- In TechTree.GatherOwnedPrerequisites, rearrange a Boolean 'and' expression to evaluate expensive functions later in the chain, and use ContainsKey to speed up name check.
2014-06-09 17:13:01 +01:00
RoosterDragon
2e992a7310 Changed MiniYaml.NodesDict property into a method.
Method is now called ToDictionary.
- Cached a few invocations into locals which should prevent some redundant evaluation.
- Added ToDictionary overloads that take projection functions for the keys and elements, since several callsites were doing a subsequent Linq.ToDictionary call to get this.
2014-06-09 17:06:42 +01:00
Matthias Mailänder
334a210231 Merge pull request #5564 from Kanar/MinibibsRework
Adds/reworks some minibibs
2014-06-09 16:54:35 +02:00
Matthias Mailänder
13fad65c19 Merge pull request #5539 from deniz1a/repair-pause
Closes #5322
2014-06-09 16:24:34 +02:00
Matthias Mailänder
7216688baf Merge pull request #5567 from ScottNZ/perf
Refactor AutoTarget scan and GPS interaction
2014-06-09 12:01:05 +02:00
Paul Chote
decdcf44d4 Merge pull request #5504 from RoosterDragon/frozen-fog-lookup-locals
Cache some dictionary lookups
2014-06-09 17:50:38 +12:00
Paul Chote
d8e5177a36 Merge pull request #5405 from RoosterDragon/min-max
Added MinBy, MaxBy, etc.
2014-06-09 17:42:01 +12:00
Chris Forbes
033f631f28 Merge pull request #5508 from pavlos256/read-only-list
Add IReadOnlyList
2014-06-09 17:36:40 +12:00
Paul Chote
1c8a8ca6ff Merge pull request #5400 from RoosterDragon/equatable
Implemented IEquatable<T>
2014-06-09 17:32:17 +12:00
Paul Chote
ea9601b128 Merge pull request #5509 from RoosterDragon/stream-exts-fixes
Fixes to StreamExts.
2014-06-09 17:25:25 +12:00
Chris Forbes
1051728790 Merge pull request #5541 from RoosterDragon/enumerate-armaments-once
Avoid repeated work in AttackBase.
2014-06-09 17:07:51 +12:00
Matthias Mailänder
799966d376 don't target or demolish oil derrick husks 2014-06-08 11:18:14 +02:00
Matthias Mailänder
a35d84bf5a don't remove and add a trait at the same time 2014-06-08 11:17:10 +02:00
Matthias Mailänder
80a4f33730 document MoveIntoWorld 2014-06-08 11:12:05 +02:00
Kanar
bf47543a0a Adds/reworks some minibibs 2014-06-07 09:24:08 +02:00
ScottNZ
7e6f7c51e1 Refactor AutoTarget scan and GPS interaction, and cache trait lookup for a slight performance boost 2014-06-07 12:01:50 +12:00
RoosterDragon
531e3b7861 Fixes to StreamExts.
- Almost all calls to Stream.Read were broken. These have been patched to all go through ReadBytes which itself has been fixed to function correctly. The key thing to note is that Stream.Read is very much allowed to return less than the requested number of bytes. If this happens and you're not checking the return result, you'll be working with partially initialized arrays and really bad stuff happens when you do that.
- Call CopyTo rather than copying between streams manually.
- Peek and ReadUInt8 have been changed to avoid a pointless array allocation which is significant overhead for such simple calls.
2014-06-07 00:49:25 +01:00
Deniz Ayıkol
5055764e04 Make repair animation pause if player has no money.
use anim.Paused

removed the using line
2014-06-04 22:15:18 +03:00
RoosterDragon
0027434fbd Avoid multiple enumerations of armaments in AttackBase.
- Avoid enumerating the collection more than once in a method as it is not trivial.
2014-06-04 02:17:44 +01:00
Pavlos Touboulidis
7d352fdad1 MapCache performance improvements 2014-05-31 23:49:04 +03:00
RoosterDragon
f180f44542 Cache some dictionary lookups in FrozenUnderFog.Tick.
Since FrozenUnderFog.Tick gets called a lot, these dictionary lookups were actually getting repeated a fair amount. Avoiding the repeated work is a minor performance improvement.
2014-05-31 18:29:31 +01:00
Pavlos Touboulidis
e083b392ba Add IReadOnlyList 2014-05-31 18:37:03 +03:00
Pavlos Touboulidis
441d602a6d Fix thread synchronization problem with Sheet.dirty 2014-05-31 17:26:24 +03:00
RoosterDragon
b1d5f4edd9 Also implemented on the Bits<T> struct. 2014-05-23 13:53:56 +01:00
RoosterDragon
0ea3509ee4 Added MinBy, MaxBy, MinByOrDefault and MaxByOrDefault methods and replaced calls of the style OrderBy[Descending]().First[OrDefault]() which is not as performant. 2014-05-23 08:23:42 +01:00
RoosterDragon
67594b844a Implemented IEquatable<T> to speed up equality comparisons.
Actor, CPos, CVec, WAngle, WPos, WRange, WRot and WVec structs now implement IEquatable<T> which means unboxing/casting costs can be eliminated.

Also simplified the ToString method by concatenating components directly rather than using a format string since the overhead is a bit high for simple cases like this.
2014-05-23 08:04:43 +01:00
2171 changed files with 132856 additions and 79655 deletions

2
.gitattributes vendored
View File

@@ -1,4 +1,6 @@
# Enforce LF normalization on Windows
*.yaml eol=lf
*.lua eol=lf
* text=lf
# Custom for Visual Studio

29
.gitignore vendored
View File

@@ -12,6 +12,12 @@ obj
*.lastcodeanalysissucceeded
_ReSharper.*/
# movies
*.vqa
# archives
*.mix
# binaries
mods/*/*.dll
mods/*/*.mdb
@@ -22,6 +28,22 @@ mods/*/*.mdb
/*.pdb
/*.mdb
/*.exe
thirdparty/StyleCop*
thirdparty/ICSharpCode.SharpZipLib.dll*
thirdparty/MaxMind*
thirdparty/RestSharp*
thirdparty/Newtonsoft.Json*
thirdparty/SharpFont*
thirdparty/windows/freetype6.dll
thirdparty/nunit*
thirdparty/windows/SDL2.dll
thirdparty/Mono.Nat.dll
thirdparty/Moq.dll
thirdparty/nuget.exe
thirdparty/windows/lua51.dll
thirdparty/windows/zlib1.dll
thirdparty/windows/soft_oal.dll
thirdparty/FuzzyLogicLibrary.dll
# backup files by various editors
*~
@@ -56,4 +78,9 @@ Lua-API.md
*.html
# StyleCop
*.Cache
*.Cache
StyleCopViolations.xml
# SublimeText
*.sublime-project
*.sublime-workspace

View File

@@ -1,21 +1,28 @@
# Travis-CI Build for OpenRA
# see travis-ci.org for details
# Mono/.NET are not officially supported. The following is a workaround.
language: c
language: csharp
# Make sure build dependencies are installed.
install:
- sudo apt-get install mono-gmcs cli-common-dev libgl1-mesa-glx libopenal1 libfreetype6
# Use the Docker-based infrastructure
sudo: false
cache: apt
# Environment variables
env:
secure: "C0+Hlfa0YGErxUuWV00Tj6p45otC/D3YwYFuLpi2mj1rDFn/4dgh5WRngjvdDBVbXJ3duaZ78jPHWm1jr7vn2jqj9yETsCIK9psWd38ep/FEBM0SDr6MUD89OuXk/YyvxJAE+UXF6bXg7giey09g/CwBigjMW7ynET3wNAWPHPs="
# Run the build script
# call RALint to check for YAML errors
script:
- make dependencies
- travis_retry make cli-dependencies
- make all
- make check
- make test
# Automatically update the trait documentation and Lua API
after_success:
- test $TRAVIS_PULL_REQUEST == "false" && make docs && cd packaging && ./update-wiki.sh $TRAVIS_BRANCH; cd ..
# Only watch the development branch and tagged release.
branches:
only:
@@ -35,12 +42,7 @@ notifications:
skip_join: true
before_deploy:
- sudo apt-get install nsis markdown dpkg rpm libarchive-dev m4 fakeroot bsdtar
- wget ftp://ftp.archlinux.org/other/pacman/pacman-4.0.3.tar.gz -O /tmp/pacman-4.0.3.tar.gz
- pushd /tmp
- tar -xzvf pacman-4.0.3.tar.gz
- cd pacman-4.0.3 && ./configure --disable-doc --prefix=/usr && make && sudo make install
- popd
- export PATH=$PATH:$HOME/usr/bin
- DOTVERSION=`echo ${TRAVIS_TAG} | sed "s/-/\\./g"`
- cd packaging
- mkdir build
@@ -48,13 +50,10 @@ before_deploy:
deploy:
provider: releases
api_key:
secure: "cMC68erxuf0jb4Pe0sOH4m1f7I2LWPUatD9BC0WeZ9PwTnWOzrm0hnjZIES4TTKVo8WIfZIiCfxpdAFeoh6bomG2MsKwSKMc8qHGhfNGqPnyzYh6zdPZaA+4Q3TDQI3DrziyDnQUFeH1h/7UZLDLxtDrOtcYcGdNg5VjvV9fJ7g="
secure: "g/LU11f+mjqv+lj0sR1UliHwogXL4ofJUwoG5Dbqlvdf5UTLWytw/OWSCv8RGyuh10miyWeaoqHh1cn2C1IFhUEqN1sSeKKKOWOTvJ2FR5mzi9uH3d/MOBzG5icQ7Qh0fZ1YPz5RaJJhYu6bmfvA/1gD49GoaX2kxQL4J5cEBgg="
file:
- build/OpenRA-${TRAVIS_TAG}.exe
- build/OpenRA-${TRAVIS_TAG}.zip
- build/openra_${DOTVERSION}_all.deb
- build/openra-${DOTVERSION}-1-any.pkg.tar.gz
- build/openra-${DOTVERSION}-1.noarch.rpm
skip_cleanup: true
on:
all_branches: true

42
AUTHORS
View File

@@ -5,6 +5,7 @@ The OpenRA developers are:
* Chris Forbes (chrisf)
* Curtis Shmyr (hamb)
* Matthias Mailänder (Mailaender)
* Oliver Brakmann (obrakmann)
* Paul Chote (pchote)
* ScottNZ
@@ -17,27 +18,46 @@ Previous developers included:
* Robert Pepperell (ytinasni)
Also thanks to:
* Adam Valy (Tschokky)
* Akseli Virtanen (RAGEQUIT)
* Alexander Fast (mizipzor)
* Allen262
* Andrew Aldridge (i80and)
* Andrew Perkins
* Andrew Riedi
* Andreas Beck (baxtor)
* Ang Soon Li (asl97)
* Arik Lirette (Angusm3)
* Barnaby Smith (mvi)
* Bellator
* Braxton Williams (Buddytex)
* Bugra Cuhadaroglu (BugraC)
* Christer Ulfsparre (Holloweye)
* Chris Grant (Unit158)
* Cody Brittain (Generalcamo)
* D2k Sardaukar
* Daniel Derejvanik (Harisson)
* Danny Keary (Dan9550)
* David Jiménez (Rydra)
* David Russell (DavidARussell)
* DeadlySurprise
* Erasmus Schroder (rasco)
* Eric Bajumpaa (SteelPhase)
* Fahrradkette
* Frank Razenberg (zzattack)
* Gareth Needham (Ripley`)
* Glenn Martin Jensen (Baxxster)
* Gordon Martin (Happy0)
* Guido Lipke (LipkeGu)
* Huw Pascoe
* Ian T. Jacobsen (Smilex)
* Igor Popov (ihptru)
* Imago
* Iran
* Jacob Dufault (jacobdufault)
* James Dunne (jsd)
* Jan-Willem Buurlage (jwbuurlage)
* Jason (atlimit8)
* Jeff Harris (jeff_1amstudios)
* Jes
* Joakim Lindberg (booom3)
@@ -47,12 +67,18 @@ Also thanks to:
* Kyrre Soerensen (zypres)
* Lawrence Wang
* Lesueur Benjamin (Valkirie)
* Lukas Franke (abcdefg30)
* Maarten Meuris (Nyerguds)
* Mark Olson (markolson)
* Matija Hustic (matija-hustic)
* Matthew Gatland (mgatland)
* Matthew Uzzell (MUzzell)
* Matthijs Benschop (Nerdie)
* Max621
* Max Ugrumov (katzsmile)
* Michael Sztolcman (s1w_)
* Mustafa Alperen Seki (MustaphaTR)
* Neil Shivkar (havok13888)
* Nukem
* Okunev Yu Dmitry (xaionaro)
* Olaf van der Spek
@@ -68,16 +94,20 @@ Also thanks to:
* Rikhardur Bjarni Einarsson (WolfGaming)
* Sascha Biedermann (bidifx)
* Sebastien Kerguen (xanax)
* Shawn Collins (UberWaffe)
* Simon Verbeke (Saticmotion)
* Taryn Hill (Phrohdoh)
* Teemu Nieminen (Temeez)
* Tim Mylemans (gecko)
* Tirili
* Tom Roostan (RoosterDragon)
* Tristan Keating (Kilkakon)
* Tristan Mühlbacher (MicroBit)
* Vladimir Komarov (VrKomarov)
* Wuschel
* Ian T. Jacobsen (Smilex)
Using GNU FreeFont distributed under the GNU GPL
terms.
Using Simple DirectMedia Layer distributed under
the terms of the zlib license.
@@ -93,13 +123,6 @@ the Apache 2.0 license.
Using GeoLite2 data created by MaxMind and
distributed under the CC BY-SA 3.0 license.
Using KopiLua created by Mark Feldman and
maintained by Vinicius Jarina and distributed
under the MIT license.
Using NLua created by Vinicius Jarina and
distributed under the MIT license.
Using SharpFont created by Robert Rouhani and
distributed under the MIT license.
@@ -109,6 +132,9 @@ MIT license.
Using SDL2# created by Ethan Lee and released
under the zlib license.
Using Eluant created by Chris Howie and released
under the MIT license.
Using FuzzyLogicLibrary (fuzzynet) by Dmitry
Kaluzhny and released under the GNU GPL terms.

View File

@@ -18,4 +18,6 @@ Don't forget to add youself to [AUTHORS](https://github.com/OpenRA/OpenRA/blob/b
Please propose a [CHANGELOG](https://github.com/OpenRA/OpenRA/wiki/CHANGELOG) entry in the pull-request comments.
While your pull-request is in review it will be helpful if you join [IRC](irc://chat.freenode.net/openra) to discuss the changes.
While your pull-request is in review it will be helpful if you join [IRC](irc://chat.freenode.net/openra) to discuss the changes.
See also the in-depth guide on [contributing](https://github.com/OpenRA/OpenRA/wiki/Contributing) to the OpenRA project.

Binary file not shown.

View File

@@ -6,26 +6,24 @@ The following lists per-platform dependencies required to build from source.
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)
* [SDL 2 (included)](http://www.libsdl.org/download-2.0.php)
* [FreeType (included)](http://gnuwin32.sourceforge.net/packages/freetype.htm)
* [zlib (included)](http://gnuwin32.sourceforge.net/packages/zlib.htm)
* [OpenAL (included)](http://kcat.strangesoft.net/openal.html)
* [liblua 5.1 (included)](http://luabinaries.sourceforge.net/download.html)
* [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)
* [OpenAL](http://kcat.strangesoft.net/openal.html) (included)
* [liblua 5.1](http://luabinaries.sourceforge.net/download.html) (included)
To compile OpenRA, open the `OpenRA.sln` solution in the main folder,
or build it from the command-line with MSBuild.
You need to fetch the thirdparty dependencies using [NuGet](http://www.nuget.org) and place them at the appropriate places by typing `make dependencies` in a command terminal.
Copy both the native DLLs from `.\thirdparty\windows`
and the CLI images from `.\thirdparty` to the main folder.
To compile OpenRA, open the `OpenRA.sln` solution in the main folder, build it from the command-line with MSBuild or use the Makefile analogue command `make all` scripted in PowerShell syntax.
Run the game with `OpenRA.Game.exe Game.Mod=ra` for Red Alert
or `OpenRA.Game.exe Game.Mod=cnc` for Tiberian Dawn.
Run the game with `OpenRA.Game.exe Game.Mod=ra` for Red Alert or `OpenRA.Game.exe Game.Mod=cnc` for Tiberian Dawn.
Linux
=====
Run `./configure` to map the native libraries to your system.
Use `make dependencies` to map the native libraries to your system, fetch the remaining CLI dependencies using [NuGet](http://www.nuget.org) and place them at the appropriate places.
To compile OpenRA, run `make all` from the command line.
@@ -37,7 +35,8 @@ Debian/Ubuntu
-------------
* mono-dmcs
* libmono-winforms4.0-cil
* libmono-system-windows-forms4.0-cil
* nuget
* cli-common-dev (>= 2.10)
* libfreetype6
* libopenal1
@@ -50,6 +49,7 @@ openSUSE
--------
* mono-devel
* nuget
* openal
* freetype2
* SDL2
@@ -62,6 +62,7 @@ Gentoo
* dev-lang/mono
* dev-dotnet/libgdiplus
* dev-dotnet/nuget
* media-libs/freetype:2
* media-libs/libsdl2
* media-libs/openal

196
Makefile
View File

@@ -9,6 +9,9 @@
# to check the official mods for erroneous yaml files, run:
# make test
#
# to check the official mod dlls for StyleCop violations, run:
# make check
#
# to generate documentation aimed at modders, run:
# make docs
#
@@ -37,7 +40,7 @@
CSC = dmcs
CSFLAGS = -nologo -warn:4 -debug:full -optimize- -codepage:utf8 -unsafe -warnaserror
DEFINE = DEBUG;TRACE
COMMON_LIBS = System.dll System.Core.dll System.Drawing.dll System.Xml.dll thirdparty/ICSharpCode.SharpZipLib.dll thirdparty/FuzzyLogicLibrary.dll thirdparty/Mono.Nat.dll thirdparty/MaxMind.Db.dll thirdparty/MaxMind.GeoIP2.dll thirdparty/Eluant.dll
COMMON_LIBS = System.dll System.Core.dll System.Data.dll System.Data.DataSetExtensions.dll System.Drawing.dll System.Xml.dll thirdparty/ICSharpCode.SharpZipLib.dll thirdparty/FuzzyLogicLibrary.dll thirdparty/Mono.Nat.dll thirdparty/MaxMind.Db.dll thirdparty/MaxMind.GeoIP2.dll thirdparty/Eluant.dll
@@ -67,9 +70,8 @@ INSTALL_PROGRAM = $(INSTALL) -m755
INSTALL_DATA = $(INSTALL) -m644
# program targets
CORE = rsdl2 rnull game utility irc ralint
TOOLS = editor tsbuild crashdialog
CORE = rsdl2 rnull game utility
TOOLS = editor crashdialog
VERSION = $(shell git name-rev --name-only --tags --no-undefined HEAD 2>/dev/null || echo git-`git rev-parse --short HEAD`)
@@ -86,14 +88,6 @@ game_FLAGS = -win32icon:OpenRA.Game/OpenRA.ico
PROGRAMS += game
game: $(game_TARGET)
irc_SRCS := $(shell find OpenRA.Irc/ -iname '*.cs')
irc_TARGET = OpenRA.Irc.dll
irc_KIND = library
irc_DEPS = $(game_TARGET)
irc_LIBS = $(COMMON_LIBS) $(irc_DEPS)
PROGRAMS += irc
irc: $(irc_TARGET)
# Renderer dlls
rsdl2_SRCS := $(shell find OpenRA.Renderer.Sdl2/ -iname '*.cs')
rsdl2_TARGET = OpenRA.Renderer.Sdl2.dll
@@ -109,17 +103,26 @@ rnull_LIBS = $(COMMON_LIBS) $(rnull_DEPS)
PROGRAMS += rsdl2 rnull
renderers: $(rsdl2_TARGET) $(rnull_TARGET)
# Mods Common
mod_common_SRCS := $(shell find OpenRA.Mods.Common/ -iname '*.cs')
mod_common_TARGET = mods/common/OpenRA.Mods.Common.dll
mod_common_KIND = library
mod_common_DEPS = $(game_TARGET)
mod_common_LIBS = $(COMMON_LIBS) $(STD_MOD_LIBS) thirdparty/StyleCop.dll thirdparty/StyleCop.CSharp.dll thirdparty/StyleCop.CSharp.Rules.dll
PROGRAMS += mod_common
mod_common: $(mod_common_TARGET)
##### Official Mods #####
STD_MOD_LIBS = $(game_TARGET) thirdparty/KopiLua.dll thirdparty/NLua.dll
STD_MOD_DEPS = $(STD_MOD_LIBS) $(ralint_TARGET)
STD_MOD_LIBS = $(game_TARGET)
STD_MOD_DEPS = $(STD_MOD_LIBS)
# Red Alert
mod_ra_SRCS := $(shell find OpenRA.Mods.RA/ -iname '*.cs')
mod_ra_TARGET = mods/ra/OpenRA.Mods.RA.dll
mod_ra_KIND = library
mod_ra_DEPS = $(STD_MOD_DEPS) $(irc_TARGET)
mod_ra_LIBS = $(COMMON_LIBS) $(STD_MOD_LIBS) $(irc_TARGET)
mod_ra_DEPS = $(STD_MOD_DEPS) $(mod_common_TARGET)
mod_ra_LIBS = $(COMMON_LIBS) $(STD_MOD_LIBS) $(mod_common_TARGET)
PROGRAMS += mod_ra
mod_ra: $(mod_ra_TARGET)
@@ -127,8 +130,8 @@ mod_ra: $(mod_ra_TARGET)
mod_cnc_SRCS := $(shell find OpenRA.Mods.Cnc/ -iname '*.cs')
mod_cnc_TARGET = mods/cnc/OpenRA.Mods.Cnc.dll
mod_cnc_KIND = library
mod_cnc_DEPS = $(STD_MOD_DEPS) $(mod_ra_TARGET)
mod_cnc_LIBS = $(COMMON_LIBS) $(STD_MOD_LIBS) $(mod_ra_TARGET)
mod_cnc_DEPS = $(STD_MOD_DEPS) $(mod_common_TARGET) $(mod_ra_TARGET)
mod_cnc_LIBS = $(COMMON_LIBS) $(STD_MOD_LIBS) $(mod_common_TARGET) $(mod_ra_TARGET)
PROGRAMS += mod_cnc
mod_cnc: $(mod_cnc_TARGET)
@@ -136,8 +139,8 @@ mod_cnc: $(mod_cnc_TARGET)
mod_d2k_SRCS := $(shell find OpenRA.Mods.D2k/ -iname '*.cs')
mod_d2k_TARGET = mods/d2k/OpenRA.Mods.D2k.dll
mod_d2k_KIND = library
mod_d2k_DEPS = $(STD_MOD_DEPS) $(mod_ra_TARGET) $(mod_cnc_TARGET)
mod_d2k_LIBS = $(COMMON_LIBS) $(STD_MOD_LIBS) $(mod_ra_TARGET)
mod_d2k_DEPS = $(STD_MOD_DEPS) $(mod_common_TARGET) $(mod_ra_TARGET) $(mod_cnc_TARGET)
mod_d2k_LIBS = $(COMMON_LIBS) $(STD_MOD_LIBS) $(mod_common_TARGET) $(mod_ra_TARGET)
PROGRAMS += mod_d2k
mod_d2k: $(mod_d2k_TARGET)
@@ -145,8 +148,8 @@ mod_d2k: $(mod_d2k_TARGET)
mod_ts_SRCS := $(shell find OpenRA.Mods.TS/ -iname '*.cs')
mod_ts_TARGET = mods/ts/OpenRA.Mods.TS.dll
mod_ts_KIND = library
mod_ts_DEPS = $(STD_MOD_DEPS) $(mod_ra_TARGET)
mod_ts_LIBS = $(COMMON_LIBS) $(STD_MOD_LIBS) $(mod_ra_TARGET)
mod_ts_DEPS = $(STD_MOD_DEPS) $(mod_common_TARGET) $(mod_ra_TARGET)
mod_ts_LIBS = $(COMMON_LIBS) $(STD_MOD_LIBS) $(mod_common_TARGET) $(mod_ra_TARGET)
PROGRAMS += mod_ts
mod_ts: $(mod_ts_TARGET)
@@ -156,7 +159,7 @@ mod_ts: $(mod_ts_TARGET)
editor_SRCS := $(shell find OpenRA.Editor/ -iname '*.cs')
editor_TARGET = OpenRA.Editor.exe
editor_KIND = winexe
editor_DEPS = $(game_TARGET)
editor_DEPS = $(game_TARGET) $(mod_common_TARGET)
editor_LIBS = System.Windows.Forms.dll System.Data.dll System.Drawing.dll $(editor_DEPS) thirdparty/Eluant.dll
editor_EXTRA = -resource:OpenRA.Editor.Form1.resources -resource:OpenRA.Editor.MapSelect.resources
editor_FLAGS = -win32icon:OpenRA.Editor/OpenRA.Editor.Icon.ico
@@ -168,52 +171,69 @@ OpenRA.Editor.Form1.resources:
resgen2 OpenRA.Editor/Form1.resx OpenRA.Editor.Form1.resources 1> /dev/null
editor: OpenRA.Editor.MapSelect.resources OpenRA.Editor.Form1.resources $(editor_TARGET)
# Analyses mod yaml for easy to detect errors
ralint_SRCS := $(shell find OpenRA.Lint/ -iname '*.cs')
ralint_TARGET = OpenRA.Lint.exe
ralint_KIND = exe
ralint_DEPS = $(game_TARGET)
ralint_LIBS = $(COMMON_LIBS) $(ralint_DEPS)
PROGRAMS += ralint
ralint: $(ralint_TARGET)
check: utility mods
@echo
@echo "Checking for code style violations in OpenRA.Game..."
@mono --debug OpenRA.Utility.exe ra --check-code-style OpenRA.Game
@echo
@echo "Checking for code style violations in OpenRA.Renderer.Null..."
@mono --debug OpenRA.Utility.exe ra --check-code-style OpenRA.Renderer.Null
@echo
@echo "Checking for code style violations in OpenRA.GameMonitor..."
@mono --debug OpenRA.Utility.exe ra --check-code-style OpenRA.GameMonitor
@echo
@echo "Checking for code style violations in OpenRA.Mods.Common..."
@mono --debug OpenRA.Utility.exe ra --check-code-style OpenRA.Mods.Common
@echo
@echo "Checking for code style violations in OpenRA.Mods.RA..."
@mono --debug OpenRA.Utility.exe ra --check-code-style OpenRA.Mods.RA
@echo
@echo "Checking for code style violations in OpenRA.Mods.Cnc..."
@mono --debug OpenRA.Utility.exe ra --check-code-style OpenRA.Mods.Cnc
@echo
@echo "Checking for code style violations in OpenRA.Mods.D2k..."
@mono --debug OpenRA.Utility.exe ra --check-code-style OpenRA.Mods.D2k
@echo
@echo "Checking for code style violations in OpenRA.Mods.TS..."
@mono --debug OpenRA.Utility.exe ra --check-code-style OpenRA.Mods.TS
@echo
@echo "Checking for code style violations in OpenRA.Editor..."
@mono --debug OpenRA.Utility.exe ra --check-code-style OpenRA.Editor
@echo
@echo "Checking for code style violations in OpenRA.Renderer.Sdl2..."
@mono --debug OpenRA.Utility.exe ra --check-code-style OpenRA.Renderer.Sdl2
@echo
@echo "Checking for code style violations in OpenRA.Utility..."
@mono --debug OpenRA.Utility.exe ra --check-code-style OpenRA.Utility
@echo
@echo "Checking for code style violations in OpenRA.Test..."
@mono --debug OpenRA.Utility.exe ra --check-code-style OpenRA.Test
test:
@echo "OpenRA.Lint: checking Red Alert mod MiniYAML..."
@mono --debug OpenRA.Lint.exe --verbose ra
@echo "OpenRA.Lint: checking Tiberian Dawn mod MiniYAML..."
@mono --debug OpenRA.Lint.exe --verbose cnc
@echo "OpenRA.Lint: checking Dune 2000 mod MiniYAML..."
@mono --debug OpenRA.Lint.exe --verbose d2k
@echo "OpenRA.Lint: checking Tiberian Sun mod MiniYAML..."
@mono --debug OpenRA.Lint.exe --verbose ts
# Builds and exports tilesets from a bitmap
tsbuild_SRCS := $(shell find OpenRA.TilesetBuilder/ -iname '*.cs')
tsbuild_TARGET = OpenRA.TilesetBuilder.exe
tsbuild_KIND = winexe
tsbuild_DEPS = $(game_TARGET)
tsbuild_LIBS = $(COMMON_LIBS) $(tsbuild_DEPS) System.Windows.Forms.dll
tsbuild_EXTRA = -resource:OpenRA.TilesetBuilder.FormBuilder.resources -resource:OpenRA.TilesetBuilder.FormNew.resources -resource:OpenRA.TilesetBuilder.Surface.resources
PROGRAMS += tsbuild
OpenRA.TilesetBuilder.FormBuilder.resources:
resgen2 OpenRA.TilesetBuilder/FormBuilder.resx OpenRA.TilesetBuilder.FormBuilder.resources 1> /dev/null
OpenRA.TilesetBuilder.FormNew.resources:
resgen2 OpenRA.TilesetBuilder/frmNew.resx OpenRA.TilesetBuilder.FormNew.resources 1> /dev/null
OpenRA.TilesetBuilder.Surface.resources:
resgen2 OpenRA.TilesetBuilder/Surface.resx OpenRA.TilesetBuilder.Surface.resources 1> /dev/null
tsbuild: OpenRA.TilesetBuilder.FormBuilder.resources OpenRA.TilesetBuilder.FormNew.resources OpenRA.TilesetBuilder.Surface.resources $(tsbuild_TARGET)
test: utility mods
@echo
@echo "Testing Tiberian Sun mod MiniYAML..."
@mono --debug OpenRA.Utility.exe ts --check-yaml
@echo
@echo "Testing Dune 2000 mod MiniYAML..."
@mono --debug OpenRA.Utility.exe d2k --check-yaml
@echo
@echo "Testing Tiberian Dawn mod MiniYAML..."
@mono --debug OpenRA.Utility.exe cnc --check-yaml
@echo
@echo "Testing Red Alert mod MiniYAML..."
@mono --debug OpenRA.Utility.exe ra --check-yaml
##### Launchers / Utilities #####
crashdialog_SRCS := $(shell find OpenRA.CrashDialog/ -iname '*.cs')
crashdialog_TARGET = OpenRA.CrashDialog.exe
crashdialog_KIND = exe
crashdialog_DEPS = $(game_TARGET)
crashdialog_LIBS = $(COMMON_LIBS) $(crashdialog_DEPS) System.Windows.Forms.dll
crashdialog_FLAGS = -win32icon:OpenRA.Game/OpenRA.ico
PROGRAMS += crashdialog
crashdialog: $(crashdialog_TARGET)
gamemonitor_SRCS := $(shell find OpenRA.GameMonitor/ -iname '*.cs')
gamemonitor_TARGET = OpenRA.exe
gamemonitor_KIND = winexe
gamemonitor_DEPS = $(game_TARGET)
gamemonitor_LIBS = $(COMMON_LIBS) $(gamemonitor_DEPS) System.Windows.Forms.dll
gamemonitor_FLAGS = -win32icon:OpenRA.Game/OpenRA.ico
PROGRAMS += gamemonitor
gamemonitor: $(gamemonitor_TARGET)
# Backend for the launcher apps - queries game/mod info and applies actions to an install
utility_SRCS := $(shell find OpenRA.Utility/ -iname '*.cs')
@@ -224,7 +244,6 @@ utility_LIBS = $(COMMON_LIBS) $(utility_DEPS) thirdparty/ICSharpCode.SharpZipLib
PROGRAMS += utility
utility: $(utility_TARGET)
# Patches binary headers to work around a mono bug
fixheader.exe: packaging/fixheader.cs
@echo CSC fixheader.exe
@@ -254,13 +273,13 @@ $(foreach prog,$(PROGRAMS),$(eval $(call BUILD_ASSEMBLY,$(prog))))
#
default: cli-dependencies core
core: game renderers mods utility ralint
core: game renderers mods utility
tools: editor tsbuild crashdialog
tools: editor gamemonitor
package: dependencies core editor crashdialog docs version
package: cli-dependencies core editor gamemonitor docs version
mods: mod_ra mod_cnc mod_d2k mod_ts
mods: mod_common mod_ra mod_cnc mod_d2k mod_ts
all: cli-dependencies core tools
@@ -270,19 +289,18 @@ clean:
distclean: clean
platformdeps = "linux"
ifeq ($(shell uname),Darwin)
platformdeps = "osx"
endif
dependencies: cli-dependencies native-dependencies
windows-dependencies:
cd thirdparty && ./fetch-thirdparty-deps-windows.sh && cd ..
cli-dependencies:
cd thirdparty && ./fetch-thirdparty-deps.sh && cd ..
@ $(CP_R) thirdparty/*.dll .
@ $(CP_R) thirdparty/*.dll.config .
native-dependencies:
@ $(CP_R) thirdparty/${platformdeps}/* .
@./configure
version: mods/ra/mod.yaml mods/cnc/mod.yaml mods/d2k/mod.yaml mods/modchooser/mod.yaml
@for i in $? ; do \
@@ -291,9 +309,9 @@ version: mods/ra/mod.yaml mods/cnc/mod.yaml mods/d2k/mod.yaml mods/modchooser/mo
done
# Documentation (d2k depends on all mod libraries)
docs: utility
@mono --debug OpenRA.Utility.exe --docs d2k > DOCUMENTATION.md
@mono --debug OpenRA.Utility.exe --lua-docs ra > Lua-API.md
docs: utility mods
@mono --debug OpenRA.Utility.exe d2k --docs > DOCUMENTATION.md
@mono --debug OpenRA.Utility.exe ra --lua-docs > Lua-API.md
install: install-core
@@ -307,6 +325,7 @@ install-core: default
@$(INSTALL_PROGRAM) $(foreach prog,$(CORE),$($(prog)_TARGET)) "$(DATA_INSTALL_DIR)"
@$(INSTALL_DIR) "$(DATA_INSTALL_DIR)/mods"
@$(CP_R) mods/common "$(DATA_INSTALL_DIR)/mods/"
@$(INSTALL_PROGRAM) $(mod_common_TARGET) "$(DATA_INSTALL_DIR)/mods/common"
@$(CP_R) mods/cnc "$(DATA_INSTALL_DIR)/mods/"
@$(INSTALL_PROGRAM) $(mod_cnc_TARGET) "$(DATA_INSTALL_DIR)/mods/cnc"
@$(CP_R) mods/ra "$(DATA_INSTALL_DIR)/mods/"
@@ -322,7 +341,6 @@ install-core: default
@$(CP_R) glsl "$(DATA_INSTALL_DIR)"
@$(CP_R) lua "$(DATA_INSTALL_DIR)"
@$(CP) *.ttf "$(DATA_INSTALL_DIR)"
@$(CP) SDL2-CS* "$(DATA_INSTALL_DIR)"
@$(CP) Eluant* "$(DATA_INSTALL_DIR)"
@$(INSTALL_PROGRAM) ICSharpCode.SharpZipLib.dll "$(DATA_INSTALL_DIR)"
@@ -330,8 +348,6 @@ install-core: default
@$(INSTALL_PROGRAM) SharpFont.dll "$(DATA_INSTALL_DIR)"
@$(CP) SharpFont.dll.config "$(DATA_INSTALL_DIR)"
@$(INSTALL_PROGRAM) Mono.Nat.dll "$(DATA_INSTALL_DIR)"
@$(INSTALL_PROGRAM) KopiLua.dll "$(DATA_INSTALL_DIR)"
@$(INSTALL_PROGRAM) NLua.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)"
@@ -345,6 +361,7 @@ install-tools: tools
@-echo "Installing OpenRA tools to $(DATA_INSTALL_DIR)"
@$(INSTALL_DIR) "$(DATA_INSTALL_DIR)"
@$(INSTALL_PROGRAM) $(foreach prog,$(TOOLS),$($(prog)_TARGET)) "$(DATA_INSTALL_DIR)"
@$(RM) $(DATA_INSTALL_DIR)/OpenRA.TilesetBuilder.exe # TODO: won't work outside the source tree
install-linux-icons:
@$(INSTALL_DIR) "$(DESTDIR)$(datadir)/icons/"
@@ -355,10 +372,24 @@ install-linux-desktop:
@$(INSTALL_DATA) packaging/linux/openra.desktop "$(DESTDIR)$(datadir)/applications"
@$(INSTALL_DATA) packaging/linux/openra-editor.desktop "$(DESTDIR)$(datadir)/applications"
install-linux-mime:
@$(INSTALL_DIR) "$(DESTDIR)$(datadir)/mime/packages/"
@$(INSTALL_DATA) packaging/linux/openra-mimeinfo.xml "$(DESTDIR)$(datadir)/mime/packages/openra.xml"
@$(INSTALL_DIR) "$(DESTDIR)$(datadir)/applications"
@$(INSTALL_DATA) packaging/linux/openra-replays.desktop "$(DESTDIR)$(datadir)/applications"
install-linux-scripts:
@echo "#!/bin/sh" > openra
@echo 'cd "$(gameinstalldir)"' >> openra
@echo 'exec mono OpenRA.Game.exe "$$@"' >> openra
@echo 'mono OpenRA.Game.exe "$$@"' >> openra
@echo 'if [ $$? != 0 -a $$? != 1 ]' >> openra
@echo 'then' >> openra
@echo 'ZENITY=`which zenity` || echo "OpenRA needs zenity installed to display a graphical error dialog. See ~/.openra. for log files."' >> openra
@echo '$$ZENITY --question --title "OpenRA" --text "OpenRA has encountered a fatal error.\nLog Files are available in ~/.openra." --ok-label "Quit" --cancel-label "View FAQ" || xdg-open https://github.com/OpenRA/OpenRA/wiki/FAQ' >> openra
@echo 'exit 1' >> openra
@echo 'fi' >> openra
@$(INSTALL_DIR) "$(BIN_INSTALL_DIR)"
@$(INSTALL_PROGRAM) -m +rx openra "$(BIN_INSTALL_DIR)"
@-$(RM) openra
@@ -383,6 +414,7 @@ uninstall:
@-$(RM_F) "$(DESTDIR)$(datadir)/icons/hicolor/48x48/apps/openra-editor.png"
@-$(RM_F) "$(DESTDIR)$(datadir)/icons/hicolor/64x64/apps/openra.png"
@-$(RM_F) "$(DESTDIR)$(datadir)/icons/hicolor/128x128/apps/openra.png"
@-$(RM_F) "$(DESTDIR)$(datadir)/mime/packages/openra.xml"
help:
@echo to compile, run:

Binary file not shown.

Before

Width:  |  Height:  |  Size: 264 KiB

View File

@@ -1,4 +1,4 @@
namespace OpenRA.Editor
namespace OpenRA.Editor
{
partial class ActorPropertiesDialog
{

View File

@@ -1,6 +1,6 @@
#region Copyright & License Information
#region Copyright & License Information
/*
* Copyright 2007-2011 The OpenRA Developers (see AUTHORS)
* 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,
@@ -11,7 +11,6 @@
using System;
using System.Drawing;
using System.Windows.Forms;
using OpenRA.FileFormats;
namespace OpenRA.Editor
{

View File

@@ -1,6 +1,6 @@
#region Copyright & License Information
#region Copyright & License Information
/*
* Copyright 2007-2011 The OpenRA Developers (see AUTHORS)
* 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,

View File

@@ -1,6 +1,6 @@
#region Copyright & License Information
#region Copyright & License Information
/*
* Copyright 2007-2011 The OpenRA Developers (see AUTHORS)
* 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,
@@ -9,8 +9,6 @@
#endregion
using System.Linq;
using OpenRA.FileFormats;
using SGraphics = System.Drawing.Graphics;
namespace OpenRA.Editor

View File

@@ -1,6 +1,6 @@
#region Copyright & License Information
#region Copyright & License Information
/*
* Copyright 2007-2011 The OpenRA Developers (see AUTHORS)
* 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,
@@ -11,8 +11,6 @@
using System;
using System.Collections.Generic;
using System.Windows.Forms;
using OpenRA.FileFormats;
using SGraphics = System.Drawing.Graphics;
namespace OpenRA.Editor
@@ -39,16 +37,15 @@ namespace OpenRA.Editor
for (var u = 0; u < template.Size.X; u++)
for (var v = 0; v < template.Size.Y; v++)
{
if (surface.Map.IsInMap(new CVec(u, v) + pos))
var cell = pos + new CVec(u, v);
if (surface.Map.Contains(cell))
{
var z = u + v * template.Size.X;
if (tile[z].Length > 0)
surface.Map.MapTiles.Value[u + pos.X, v + pos.Y] =
new TileReference<ushort, byte>
{
Type = brushTemplate.N,
Index = template.PickAny ? (byte)((u + pos.X) % 4 + ((v + pos.Y) % 4) * 4) : (byte)z,
};
if (tile != null && tile[z].Length > 0)
{
var index = template.PickAny ? (byte)((u + pos.X) % 4 + ((v + pos.Y) % 4) * 4) : (byte)z;
surface.Map.MapTiles.Value[cell] = new TerrainTile(brushTemplate.N, index);
}
var ch = new int2((pos.X + u) / Surface.ChunkSize, (pos.Y + v) / Surface.ChunkSize);
if (surface.Chunks.ContainsKey(ch))
@@ -64,7 +61,7 @@ namespace OpenRA.Editor
{
g.DrawImage(brushTemplate.Bitmap,
surface.TileSetRenderer.TileSize * surface.GetBrushLocation().X * surface.Zoom + surface.GetOffset().X,
surface.TileSetRenderer.TileSize * surface.GetBrushLocation().Y * surface.Zoom + surface.GetOffset().Y,
surface.TileSetRenderer.TileSize * surface.GetBrushLocation().Y * surface.Zoom + surface.GetOffset().Y,
brushTemplate.Bitmap.Width * surface.Zoom,
brushTemplate.Bitmap.Height * surface.Zoom);
}
@@ -72,14 +69,15 @@ namespace OpenRA.Editor
void FloodFillWithBrush(Surface s, CPos pos)
{
var queue = new Queue<CPos>();
var replace = s.Map.MapTiles.Value[pos.X, pos.Y];
var replace = s.Map.MapTiles.Value[pos];
var touched = new bool[s.Map.MapSize.X, s.Map.MapSize.Y];
Action<int, int> maybeEnqueue = (x, y) =>
{
if (s.Map.IsInMap(x, y) && !touched[x, y])
var c = new CPos(x, y);
if (s.Map.Contains(c) && !touched[x, y])
{
queue.Enqueue(new CPos(x, y));
queue.Enqueue(c);
touched[x, y] = true;
}
};
@@ -88,7 +86,7 @@ namespace OpenRA.Editor
while (queue.Count > 0)
{
var p = queue.Dequeue();
if (s.Map.MapTiles.Value[p.X, p.Y].Type != replace.Type)
if (s.Map.MapTiles.Value[p].Type != replace.Type)
continue;
var a = FindEdge(s, p, new CVec(-1, 0), replace);
@@ -96,10 +94,10 @@ namespace OpenRA.Editor
for (var x = a.X; x <= b.X; x++)
{
s.Map.MapTiles.Value[x, p.Y] = new TileReference<ushort, byte> { Type = brushTemplate.N, Index = (byte)0 };
if (s.Map.MapTiles.Value[x, p.Y - 1].Type == replace.Type)
s.Map.MapTiles.Value[new CPos(x, p.Y)] = new TerrainTile(brushTemplate.N, (byte)0);
if (s.Map.MapTiles.Value[new CPos(x, p.Y - 1)].Type == replace.Type)
maybeEnqueue(x, p.Y - 1);
if (s.Map.MapTiles.Value[x, p.Y + 1].Type == replace.Type)
if (s.Map.MapTiles.Value[new CPos(x, p.Y + 1)].Type == replace.Type)
maybeEnqueue(x, p.Y + 1);
}
}
@@ -109,13 +107,13 @@ namespace OpenRA.Editor
s.Chunks.Clear();
}
static CPos FindEdge(Surface s, CPos p, CVec d, TileReference<ushort, byte> replace)
static CPos FindEdge(Surface s, CPos p, CVec d, TerrainTile replace)
{
for (;;)
{
var q = p + d;
if (!s.Map.IsInMap(q)) return p;
if (s.Map.MapTiles.Value[q.X, q.Y].Type != replace.Type) return p;
if (!s.Map.Contains(q)) return p;
if (s.Map.MapTiles.Value[q].Type != replace.Type) return p;
p = q;
}
}

View File

@@ -1,6 +1,6 @@
#region Copyright & License Information
#region Copyright & License Information
/*
* Copyright 2007-2011 The OpenRA Developers (see AUTHORS)
* 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,

View File

@@ -1,6 +1,6 @@
#region Copyright & License Information
#region Copyright & License Information
/*
* Copyright 2007-2011 The OpenRA Developers (see AUTHORS)
* 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,

View File

@@ -1,6 +1,6 @@
#region Copyright & License Information
#region Copyright & License Information
/*
* Copyright 2007-2013 The OpenRA Developers (see AUTHORS)
* 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,

View File

@@ -1,6 +1,6 @@
#region Copyright & License Information
/*
* Copyright 2007-2014 The OpenRA Developers (see AUTHORS)
* 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,
@@ -46,11 +46,12 @@ namespace OpenRA.Editor
miniMapBox.Image = null;
currentMod = toolStripComboBox1.SelectedItem as string;
Game.modData = new ModData(currentMod);
GlobalFileSystem.LoadFromManifest(Game.modData.Manifest);
Program.Rules = Game.modData.RulesetCache.LoadDefaultRules();
Game.InitializeSettings(Arguments.Empty);
Game.ModData = new ModData(currentMod);
GlobalFileSystem.LoadFromManifest(Game.ModData.Manifest);
Program.Rules = Game.ModData.RulesetCache.LoadDefaultRules();
var mod = Game.modData.Manifest.Mod;
var mod = Game.ModData.Manifest.Mod;
Text = "{0} Mod Version: {1} - OpenRA Editor".F(mod.Title, mod.Version);
loadedMapName = null;
@@ -86,10 +87,17 @@ namespace OpenRA.Editor
// TODO: make this work properly
foreach (var init in Program.Rules.Actors[kv.Value.Type].GetInitKeys())
apd.AddRow(init.First,
{
var initName = init.First;
apd.AddRow(initName,
apd.MakeEditorControl(init.Second,
() => objSaved.NodesDict.ContainsKey(init.First) ? objSaved.NodesDict[init.First].Value : null,
() =>
{
var nodesDict = objSaved.ToDictionary();
return nodesDict.ContainsKey(initName) ? nodesDict[initName].Value : null;
},
_ => { }));
}
apd.ShowDialog();
@@ -121,7 +129,7 @@ namespace OpenRA.Editor
if (map.Players.Count == 0)
map.MakeDefaultPlayers();
PrepareMapResources(Game.modData, map);
PrepareMapResources(Game.ModData, map);
// Calculate total net worth of resources in cash
cashToolStripStatusLabel.Text = CalculateTotalResource().ToString();
@@ -136,7 +144,7 @@ namespace OpenRA.Editor
resourcePalette.Controls.Clear();
loadedMapName = null;
PrepareMapResources(Game.modData, map);
PrepareMapResources(Game.ModData, map);
MakeDirty();
}
@@ -149,11 +157,11 @@ namespace OpenRA.Editor
tileset = Program.Rules.TileSets[map.Tileset];
tilesetRenderer = new TileSetRenderer(tileset, modData.Manifest.TileSize);
var shadowIndex = new int[] { 3, 4 };
var palette = new Palette(GlobalFileSystem.Open(tileset.Palette), shadowIndex);
var palette = new ImmutablePalette(GlobalFileSystem.Open(tileset.Palette), shadowIndex);
// required for desert terrain in RA
var playerPalette = tileset.PlayerPalette ?? tileset.Palette;
var shadowedPalette = new Palette(GlobalFileSystem.Open(playerPalette), shadowIndex);
var shadowedPalette = new ImmutablePalette(GlobalFileSystem.Open(playerPalette), shadowIndex);
surface1.Bind(map, tileset, tilesetRenderer, palette, shadowedPalette);
@@ -162,7 +170,7 @@ namespace OpenRA.Editor
foreach (var p in palettes) { p.Visible = false; p.SuspendLayout(); }
var templateOrder = tileset.EditorTemplateOrder ?? new string[] { };
foreach (var tc in tileset.Templates.GroupBy(t => t.Value.Category).OrderBy(t => templateOrder.ToList().IndexOf(t.Key)))
foreach (var tc in tileset.Templates.GroupBy(t => t.Value.Category).OrderBy(t => templateOrder.IndexOf(t.Key)))
{
var category = tc.Key ?? "(Uncategorized)";
var categoryHeader = new Label
@@ -196,13 +204,13 @@ namespace OpenRA.Editor
Height = bitmap.Height / 2,
SizeMode = PictureBoxSizeMode.StretchImage
};
var brushTemplate = new BrushTemplate { Bitmap = bitmap, N = t.Key };
ibox.Click += (_, e) => surface1.SetTool(new BrushTool(brushTemplate));
var template = t.Value;
tilePalette.Controls.Add(ibox);
tt.SetToolTip(ibox, "{1}:{0} ({2}x{3})".F(template.Image, template.Id, template.Size.X, template.Size.Y));
tt.SetToolTip(ibox, "{1}:{0} ({2}x{3})".F(template.Images[0], template.Id, template.Size.X, template.Size.Y));
}
catch { }
}
@@ -215,7 +223,7 @@ namespace OpenRA.Editor
try
{
var info = Program.Rules.Actors[a];
if (!info.Traits.Contains<RenderSimpleInfo>()) continue;
if (!info.Traits.Contains<ILegacyEditorRenderInfo>()) continue;
var etf = info.Traits.GetOrDefault<EditorTilesetFilterInfo>();
if (etf != null && etf.ExcludeTilesets != null
@@ -224,13 +232,15 @@ namespace OpenRA.Editor
&& !etf.RequireTilesets.Contains(tileset.Id)) continue;
var templatePalette = shadowedPalette;
var rsi = info.Traits.GetOrDefault<RenderSimpleInfo>();
var rsi = info.Traits.GetOrDefault<ILegacyEditorRenderInfo>();
// exception for desert buildings
if (rsi != null && rsi.Palette != null && rsi.Palette.Contains("terrain"))
if (rsi != null && rsi.EditorPalette != null && rsi.EditorPalette.Contains("terrain"))
templatePalette = palette;
var template = RenderUtils.RenderActor(info, tileset, templatePalette);
var race = Program.Rules.Actors["world"].Traits.WithInterface<CountryInfo>().First().Race;
var sequenceProvider = Program.Rules.Sequences[tileset.Id];
var template = RenderUtils.RenderActor(info, sequenceProvider, tileset, templatePalette, race);
var ibox = new PictureBox
{
Image = template.Bitmap,
@@ -259,7 +269,7 @@ namespace OpenRA.Editor
{
try
{
var template = RenderUtils.RenderResourceType(a, tileset.Extensions, shadowedPalette);
var template = RenderUtils.RenderResourceType(a, tileset, shadowedPalette);
var ibox = new PictureBox
{
Image = template.Bitmap,
@@ -418,8 +428,7 @@ namespace OpenRA.Editor
pd.TitleBox.Text = surface1.Map.Title;
pd.DescBox.Text = surface1.Map.Description;
pd.AuthorBox.Text = surface1.Map.Author;
pd.SelectableCheckBox.Checked = surface1.Map.Selectable;
pd.ShellmapCheckBox.Checked = surface1.Map.UseAsShellmap;
pd.MapVisibilityComboBox.SelectedIndex = pd.MapVisibilityComboBox.FindStringExact(Enum.GetName(typeof(MapVisibility), surface1.Map.Visibility));
if (DialogResult.OK != pd.ShowDialog())
return;
@@ -427,8 +436,7 @@ namespace OpenRA.Editor
surface1.Map.Title = pd.TitleBox.Text;
surface1.Map.Description = pd.DescBox.Text;
surface1.Map.Author = pd.AuthorBox.Text;
surface1.Map.Selectable = pd.SelectableCheckBox.Checked;
surface1.Map.UseAsShellmap = pd.ShellmapCheckBox.Checked;
surface1.Map.Visibility = (MapVisibility)Enum.Parse(typeof(MapVisibility), pd.MapVisibilityComboBox.SelectedItem.ToString());
}
}
@@ -456,7 +464,7 @@ namespace OpenRA.Editor
void ExportMinimap(object sender, EventArgs e)
{
using (var sfd = new SaveFileDialog()
{
{
InitialDirectory = Path.Combine(Environment.CurrentDirectory, "maps"),
DefaultExt = "*.png",
Filter = "PNG Image (*.png)|*.png",
@@ -464,9 +472,8 @@ namespace OpenRA.Editor
FileName = Path.ChangeExtension(loadedMapName, ".png"),
RestoreDirectory = true
})
if (DialogResult.OK == sfd.ShowDialog())
miniMapBox.Image.Save(sfd.FileName);
if (DialogResult.OK == sfd.ShowDialog())
miniMapBox.Image.Save(sfd.FileName);
}
void ShowActorNamesClicked(object sender, EventArgs e)
@@ -570,10 +577,11 @@ namespace OpenRA.Editor
void AboutToolStripMenuItemClick(object sender, EventArgs e)
{
MessageBox.Show("OpenRA and OpenRA Editor are Free/Libre Open Source Software released under the GNU General Public License version 3. See AUTHORS and COPYING for details.",
"About",
MessageBoxButtons.OK,
MessageBoxIcon.Asterisk);
MessageBox.Show(
"OpenRA and OpenRA Editor are Free/Libre Open Source Software released under the GNU General Public License version 3. See AUTHORS and COPYING for details.",
"About",
MessageBoxButtons.OK,
MessageBoxIcon.Asterisk);
}
void HelpToolStripButton_Click(object sender, EventArgs e)
@@ -630,29 +638,33 @@ namespace OpenRA.Editor
{
ShowGridClicked(sender, e);
}
public int CalculateTotalResource()
{
int totalResource = 0;
for (int i = 0; i < surface1.Map.MapSize.X; i++)
for (int j = 0; j < surface1.Map.MapSize.Y; j++)
var totalResource = 0;
for (var i = 0; i < surface1.Map.MapSize.X; i++)
for (var j = 0; j < surface1.Map.MapSize.Y; j++)
{
if (surface1.Map.MapResources.Value[i, j].Type != 0)
var cell = new CPos(i, j);
if (surface1.Map.MapResources.Value[cell].Type != 0)
totalResource += GetResourceValue(i, j);
}
return totalResource;
}
int GetAdjecentCellsWith(int resourceType, int x, int y)
{
int sum = 0;
var sum = 0;
for (var u = -1; u < 2; u++)
for (var v = -1; v < 2; v++)
{
if (!surface1.Map.IsInMap(new CPos(x + u, y + v)))
var cell = new CPos(x + u, y + v);
if (!surface1.Map.Contains(cell))
continue;
if (surface1.Map.MapResources.Value[x + u, y + v].Type == resourceType)
if (surface1.Map.MapResources.Value[cell].Type == resourceType)
++sum;
}
@@ -661,15 +673,15 @@ namespace OpenRA.Editor
int GetResourceValue(int x, int y)
{
int imageLength = 0;
int type = surface1.Map.MapResources.Value[x, y].Type;
var imageLength = 0;
var type = surface1.Map.MapResources.Value[new CPos(x, y)].Type;
var template = surface1.ResourceTemplates.FirstOrDefault(a => a.Value.Info.ResourceType == type).Value;
if (type == 1)
imageLength = 12;
else if (type == 2)
imageLength = 3;
int density = (GetAdjecentCellsWith(type, x, y) * imageLength - 1) / 9;
int value = template.Info.ValuePerUnit;
var density = (GetAdjecentCellsWith(type, x, y) * imageLength - 1) / 9;
var value = template.Info.ValuePerUnit;
return density * value;
}

View File

@@ -1,6 +1,6 @@
#region Copyright & License Information
#region Copyright & License Information
/*
* Copyright 2007-2011 The OpenRA Developers (see AUTHORS)
* 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,

View File

@@ -1,6 +1,6 @@
#region Copyright & License Information
#region Copyright & License Information
/*
* Copyright 2007-2011 The OpenRA Developers (see AUTHORS)
* 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,

View File

@@ -1,6 +1,6 @@
#region Copyright & License Information
#region Copyright & License Information
/*
* Copyright 2007-2014 The OpenRA Developers (see AUTHORS)
* 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,
@@ -27,8 +27,7 @@ namespace OpenRA.Editor
public MapSelect(string currentMod)
{
MapFolderPath = new string[] { Platform.SupportDir, "maps", currentMod }
.Aggregate(Path.Combine);
MapFolderPath = Platform.ResolvePath("^", "maps", currentMod);
if (!Directory.Exists(MapFolderPath))
Directory.CreateDirectory(MapFolderPath);
@@ -47,7 +46,7 @@ namespace OpenRA.Editor
foreach (var map in MapCache.FindMapsIn(MapFolderPath))
{
ListViewItem map1 = new ListViewItem();
var map1 = new ListViewItem();
map1.Tag = map;
map1.Text = Path.GetFileNameWithoutExtension(map);
map1.ImageIndex = 0;

View File

@@ -1,6 +1,6 @@
#region Copyright & License Information
#region Copyright & License Information
/*
* Copyright 2007-2011 The OpenRA Developers (see AUTHORS)
* 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,

View File

@@ -1,6 +1,6 @@
#region Copyright & License Information
#region Copyright & License Information
/*
* Copyright 2007-2011 The OpenRA Developers (see AUTHORS)
* 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,

View File

@@ -32,30 +32,17 @@
<UseApplicationTrust>false</UseApplicationTrust>
<BootstrapperEnabled>true</BootstrapperEnabled>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x86'">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>..\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<PlatformTarget>x86</PlatformTarget>
<UseVSHostingProcess>false</UseVSHostingProcess>
<CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<UseVSHostingProcess>false</UseVSHostingProcess>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
</PropertyGroup>
<ItemGroup>
<Reference Include="System" />
<Reference Include="System.Core">
@@ -73,6 +60,7 @@
<Reference Include="System.Xml" />
<Reference Include="Eluant">
<HintPath>..\thirdparty\Eluant.dll</HintPath>
<Private>False</Private>
</Reference>
</ItemGroup>
<ItemGroup>
@@ -172,6 +160,12 @@
<ProjectReference Include="..\OpenRA.Game\OpenRA.Game.csproj">
<Project>{0DFB103F-2962-400F-8C6D-E2C28CCBA633}</Project>
<Name>OpenRA.Game</Name>
<Private>False</Private>
</ProjectReference>
<ProjectReference Include="..\OpenRA.Mods.Common\OpenRA.Mods.Common.csproj">
<Project>{FE6C8CC0-2F07-442A-B29F-17617B3B7FC6}</Project>
<Name>OpenRA.Mods.Common</Name>
<Private>False</Private>
</ProjectReference>
</ItemGroup>
<ItemGroup>

View File

@@ -1,6 +1,6 @@
#region Copyright & License Information
#region Copyright & License Information
/*
* Copyright 2007-2014 The OpenRA Developers (see AUTHORS)
* 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,
@@ -10,10 +10,7 @@
using System;
using System.Globalization;
using System.IO;
using System.Linq;
using System.Windows.Forms;
using OpenRA.FileFormats;
namespace OpenRA.Editor
{

View File

@@ -1,4 +1,4 @@
//------------------------------------------------------------------------------
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:4.0.30319.269

View File

@@ -1,4 +1,4 @@
//------------------------------------------------------------------------------
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:4.0.30319.269

View File

@@ -1,6 +1,6 @@
#region Copyright & License Information
#region Copyright & License Information
/*
* Copyright 2007-2011 The OpenRA Developers (see AUTHORS)
* 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,
@@ -43,10 +43,10 @@ namespace OpenRA.Editor
this.TitleBox = new System.Windows.Forms.TextBox();
this.label2 = new System.Windows.Forms.Label();
this.DescBox = new System.Windows.Forms.TextBox();
this.SelectableCheckBox = new System.Windows.Forms.CheckBox();
this.label3 = new System.Windows.Forms.Label();
this.AuthorBox = new System.Windows.Forms.TextBox();
this.ShellmapCheckBox = new System.Windows.Forms.CheckBox();
this.MapVisibilityComboBox = new System.Windows.Forms.ComboBox();
this.label4 = new System.Windows.Forms.Label();
this.SuspendLayout();
//
// button2
@@ -103,16 +103,6 @@ namespace OpenRA.Editor
this.DescBox.Size = new System.Drawing.Size(286, 20);
this.DescBox.TabIndex = 17;
//
// selectable
//
this.SelectableCheckBox.AutoSize = true;
this.SelectableCheckBox.Location = new System.Drawing.Point(118, 138);
this.SelectableCheckBox.Name = "selectable";
this.SelectableCheckBox.Size = new System.Drawing.Size(130, 17);
this.SelectableCheckBox.TabIndex = 18;
this.SelectableCheckBox.Text = "Show in Map Chooser";
this.SelectableCheckBox.UseVisualStyleBackColor = true;
//
// label3
//
this.label3.AutoSize = true;
@@ -129,16 +119,27 @@ namespace OpenRA.Editor
this.AuthorBox.Size = new System.Drawing.Size(286, 20);
this.AuthorBox.TabIndex = 17;
//
// checkBox1
//
this.ShellmapCheckBox.AutoSize = true;
this.ShellmapCheckBox.Location = new System.Drawing.Point(118, 161);
this.ShellmapCheckBox.Name = "checkBox1";
this.ShellmapCheckBox.Size = new System.Drawing.Size(105, 17);
this.ShellmapCheckBox.TabIndex = 18;
this.ShellmapCheckBox.Text = "Use as Shellmap";
this.ShellmapCheckBox.UseVisualStyleBackColor = true;
//
// mapVisibilityComboBox
//
this.MapVisibilityComboBox.FormattingEnabled = true;
this.MapVisibilityComboBox.Items.AddRange(new object[] {
"Lobby",
"Shellmap",
"MissionSelector"});
this.MapVisibilityComboBox.Location = new System.Drawing.Point(150, 137);
this.MapVisibilityComboBox.Name = "mapVisibilityComboBox";
this.MapVisibilityComboBox.Size = new System.Drawing.Size(121, 21);
this.MapVisibilityComboBox.TabIndex = 19;
//
// label4
//
this.label4.AutoSize = true;
this.label4.Location = new System.Drawing.Point(90, 140);
this.label4.Name = "label4";
this.label4.Size = new System.Drawing.Size(58, 13);
this.label4.TabIndex = 20;
this.label4.Text = "Map class:";
// PropertiesDialog
//
this.AcceptButton = this.button2;
@@ -146,8 +147,8 @@ namespace OpenRA.Editor
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.CancelButton = this.button1;
this.ClientSize = new System.Drawing.Size(370, 228);
this.Controls.Add(this.ShellmapCheckBox);
this.Controls.Add(this.SelectableCheckBox);
this.Controls.Add(this.label4);
this.Controls.Add(this.MapVisibilityComboBox);
this.Controls.Add(this.AuthorBox);
this.Controls.Add(this.label3);
this.Controls.Add(this.DescBox);
@@ -173,9 +174,9 @@ namespace OpenRA.Editor
public System.Windows.Forms.TextBox TitleBox;
private System.Windows.Forms.Label label2;
public System.Windows.Forms.TextBox DescBox;
public System.Windows.Forms.CheckBox SelectableCheckBox;
private System.Windows.Forms.Label label3;
public System.Windows.Forms.TextBox AuthorBox;
public System.Windows.Forms.CheckBox ShellmapCheckBox;
public System.Windows.Forms.ComboBox MapVisibilityComboBox;
private System.Windows.Forms.Label label4;
}
}

View File

@@ -1,6 +1,6 @@
#region Copyright & License Information
#region Copyright & License Information
/*
* Copyright 2007-2011 The OpenRA Developers (see AUTHORS)
* 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,

View File

@@ -1,6 +1,6 @@
#region Copyright & License Information
#region Copyright & License Information
/*
* Copyright 2007-2011 The OpenRA Developers (see AUTHORS)
* 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,
@@ -8,21 +8,21 @@
*/
#endregion
using System.Collections;
using System.Drawing;
using System.Drawing.Imaging;
using System.Linq;
using OpenRA.FileFormats;
using OpenRA.FileSystem;
using OpenRA.Graphics;
using OpenRA.Primitives;
using OpenRA.Mods.Common.Graphics;
using OpenRA.Mods.Common.SpriteLoaders;
using OpenRA.Traits;
namespace OpenRA.Editor
{
static class RenderUtils
{
static Bitmap RenderShp(ISpriteSource shp, Palette p)
static Bitmap RenderShp(ShpTDSprite shp, IPalette p)
{
var frame = shp.Frames.First();
@@ -35,7 +35,7 @@ namespace OpenRA.Editor
unsafe
{
byte* q = (byte*)data.Scan0.ToPointer();
var q = (byte*)data.Scan0.ToPointer();
var stride2 = data.Stride;
for (var i = 0; i < frame.Size.Width; i++)
@@ -47,28 +47,30 @@ namespace OpenRA.Editor
return bitmap;
}
public static ActorTemplate RenderActor(ActorInfo info, TileSet tileset, Palette p)
static readonly string[] LegacyExtensions = new[] { ".shp", ".tem", "" };
static string ResolveFilename(string name, TileSet tileSet)
{
var image = RenderSprites.GetImage(info);
var ssl = Game.ModData.SpriteSequenceLoader as TilesetSpecificSpriteSequenceLoader;
var extensions = ssl != null ? new[] { ssl.TilesetExtensions[tileSet.Id], ssl.DefaultSpriteExtension }.Append(LegacyExtensions) :
LegacyExtensions.AsEnumerable();
using (var s = GlobalFileSystem.OpenWithExts(image, tileset.Extensions))
foreach (var e in extensions)
if (GlobalFileSystem.Exists(name + e))
return name + e;
return name;
}
public static ActorTemplate RenderActor(ActorInfo info, SequenceProvider sequenceProvider, TileSet tileset, IPalette p, string race)
{
var image = info.Traits.Get<ILegacyEditorRenderInfo>().EditorImage(info, sequenceProvider, race);
image = ResolveFilename(image, tileset);
using (var s = GlobalFileSystem.Open(image))
{
var shp = new ShpReader(s);
var shp = new ShpTDSprite(s);
var bitmap = RenderShp(shp, p);
try
{
using (var s2 = GlobalFileSystem.OpenWithExts(image + "2", tileset.Extensions))
{
var shp2 = new ShpReader(s2);
var roofBitmap = RenderShp(shp2, p);
using (var g = System.Drawing.Graphics.FromImage(bitmap))
g.DrawImage(roofBitmap, 0, 0);
}
}
catch { }
return new ActorTemplate
{
Bitmap = bitmap,
@@ -78,13 +80,13 @@ namespace OpenRA.Editor
}
}
public static ResourceTemplate RenderResourceType(ResourceTypeInfo info, string[] exts, Palette p)
public static ResourceTemplate RenderResourceType(ResourceTypeInfo info, TileSet tileset, IPalette p)
{
var image = info.EditorSprite;
using (var s = GlobalFileSystem.OpenWithExts(image, exts))
var image = ResolveFilename(info.EditorSprite, tileset);
using (var s = GlobalFileSystem.Open(image))
{
// TODO: Do this properly
var shp = new ShpReader(s) as ISpriteSource;
var shp = new ShpTDSprite(s);
var frame = shp.Frames.Last();
var bitmap = new Bitmap(frame.Size.Width, frame.Size.Height, PixelFormat.Format8bppIndexed);
@@ -94,7 +96,7 @@ namespace OpenRA.Editor
unsafe
{
byte* q = (byte*)data.Scan0.ToPointer();
var q = (byte*)data.Scan0.ToPointer();
var stride = data.Stride;
for (var i = 0; i < frame.Size.Width; i++)
@@ -103,7 +105,7 @@ namespace OpenRA.Editor
}
bitmap.UnlockBits(data);
return new ResourceTemplate { Bitmap = bitmap, Info = info, Value = shp.Frames.Count() - 1 };
return new ResourceTemplate { Bitmap = bitmap, Info = info, Value = shp.Frames.Count - 1 };
}
}
}

View File

@@ -1,6 +1,6 @@
#region Copyright & License Information
#region Copyright & License Information
/*
* Copyright 2007-2011 The OpenRA Developers (see AUTHORS)
* 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,

View File

@@ -1,6 +1,6 @@
#region Copyright & License Information
#region Copyright & License Information
/*
* Copyright 2007-2011 The OpenRA Developers (see AUTHORS)
* 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,

View File

@@ -1,6 +1,6 @@
#region Copyright & License Information
#region Copyright & License Information
/*
* Copyright 2007-2011 The OpenRA Developers (see AUTHORS)
* 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,
@@ -9,8 +9,6 @@
#endregion
using System;
using OpenRA.FileFormats;
using SGraphics = System.Drawing.Graphics;
namespace OpenRA.Editor
@@ -23,12 +21,9 @@ namespace OpenRA.Editor
public void Apply(Surface surface)
{
surface.Map.MapResources.Value[surface.GetBrushLocation().X, surface.GetBrushLocation().Y]
= new TileReference<byte, byte>
{
Type = (byte)resourceTemplate.Info.ResourceType,
Index = (byte)random.Next(resourceTemplate.Info.MaxDensity)
};
var type = (byte)resourceTemplate.Info.ResourceType;
var index = (byte)random.Next(resourceTemplate.Info.MaxDensity);
surface.Map.MapResources.Value[surface.GetBrushLocation()] = new ResourceTile(type, index);
var ch = new int2(surface.GetBrushLocation().X / Surface.ChunkSize,
surface.GetBrushLocation().Y / Surface.ChunkSize);

View File

@@ -1,344 +0,0 @@
<StyleCopSettings Version="105">
<Analyzers>
<Analyzer AnalyzerId="StyleCop.CSharp.DocumentationRules">
<Rules>
<Rule Name="ElementsMustBeDocumented">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="PartialElementsMustBeDocumented">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="EnumerationItemsMustBeDocumented">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="DocumentationMustContainValidXml">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="ElementDocumentationMustHaveSummary">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="PartialElementDocumentationMustHaveSummary">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="ElementDocumentationMustHaveSummaryText">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="PartialElementDocumentationMustHaveSummaryText">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="ElementDocumentationMustNotHaveDefaultSummary">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="ElementParametersMustBeDocumented">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="ElementParameterDocumentationMustMatchElementParameters">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="ElementParameterDocumentationMustDeclareParameterName">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="ElementParameterDocumentationMustHaveText">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="ElementReturnValueMustBeDocumented">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="ElementReturnValueDocumentationMustHaveText">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="VoidReturnValueMustNotBeDocumented">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="GenericTypeParametersMustBeDocumented">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="GenericTypeParametersMustBeDocumentedPartialClass">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="GenericTypeParameterDocumentationMustMatchTypeParameters">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="GenericTypeParameterDocumentationMustDeclareParameterName">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="GenericTypeParameterDocumentationMustHaveText">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="PropertySummaryDocumentationMustMatchAccessors">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="PropertySummaryDocumentationMustOmitSetAccessorWithRestrictedAccess">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="ElementDocumentationMustNotBeCopiedAndPasted">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="SingleLineCommentsMustNotUseDocumentationStyleSlashes">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="DocumentationTextMustNotBeEmpty">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="DocumentationTextMustContainWhitespace">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="DocumentationMustMeetCharacterPercentage">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="ConstructorSummaryDocumentationMustBeginWithStandardText">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="DestructorSummaryDocumentationMustBeginWithStandardText">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="DocumentationHeadersMustNotContainBlankLines">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="IncludedDocumentationXPathDoesNotExist">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="IncludeNodeDoesNotContainValidFileAndPath">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="InheritDocMustBeUsedWithInheritingClass">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="ElementDocumentationMustBeSpelledCorrectly">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="FileMustHaveHeader">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="FileHeaderMustShowCopyright">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="FileHeaderMustHaveCopyrightText">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="FileHeaderMustContainFileName">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="FileHeaderFileNameDocumentationMustMatchFileName">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="FileHeaderMustHaveValidCompanyText">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="FileHeaderFileNameDocumentationMustMatchTypeName">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
</Rules>
<AnalyzerSettings />
</Analyzer>
<Analyzer AnalyzerId="StyleCop.CSharp.SpacingRules">
<Rules>
<Rule Name="TabsMustNotBeUsed">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
</Rules>
<AnalyzerSettings />
</Analyzer>
<Analyzer AnalyzerId="StyleCop.CSharp.LayoutRules">
<Rules>
<Rule Name="CurlyBracketsForMultiLineStatementsMustNotShareLine">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="StatementMustNotBeOnSingleLine">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="ElementMustNotBeOnSingleLine">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="CurlyBracketsMustNotBeOmitted">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="ElementsMustBeSeparatedByBlankLine">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
</Rules>
<AnalyzerSettings />
</Analyzer>
<Analyzer AnalyzerId="StyleCop.CSharp.OrderingRules">
<Rules>
<Rule Name="UsingDirectivesMustBePlacedWithinNamespace">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="ElementsMustAppearInTheCorrectOrder">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="ElementsMustBeOrderedByAccess">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
</Rules>
<AnalyzerSettings />
</Analyzer>
<Analyzer AnalyzerId="StyleCop.CSharp.ReadabilityRules">
<Rules>
<Rule Name="CodeMustNotContainMultipleStatementsOnOneLine">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="UseStringEmptyForEmptyStrings">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="PrefixLocalCallsWithThis">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="PrefixCallsCorrectly">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="ParametersMustBeOnSameLineOrSeparateLines">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="ParameterMustFollowComma">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="SplitParametersMustStartOnLineAfterDeclaration">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
</Rules>
<AnalyzerSettings />
</Analyzer>
<Analyzer AnalyzerId="StyleCop.CSharp.MaintainabilityRules">
<Rules>
<Rule Name="AccessModifierMustBeDeclared">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="FieldsMustBePrivate">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="FileMayOnlyContainASingleClass">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="ArithmeticExpressionsMustDeclarePrecedence">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
</Rules>
<AnalyzerSettings />
</Analyzer>
</Analyzers>
</StyleCopSettings>

View File

@@ -1,6 +1,6 @@
#region Copyright & License Information
/*
* Copyright 2007-2014 The OpenRA Developers (see AUTHORS)
* 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,
@@ -14,7 +14,6 @@ using System.Drawing;
using System.Drawing.Imaging;
using System.Linq;
using System.Windows.Forms;
using OpenRA.FileSystem;
using OpenRA.Graphics;
using OpenRA.Primitives;
using OpenRA.Traits;
@@ -27,7 +26,7 @@ namespace OpenRA.Editor
{
public static CPos Location(this ActorReference ar)
{
return (CPos)ar.InitDict.Get<LocationInit>().value;
return (CPos)ar.InitDict.Get<LocationInit>().Value(null);
}
public static void DrawStringContrast(this SGraphics g, Font f, string s, int x, int y, Brush fg, Brush bg)
@@ -46,8 +45,8 @@ namespace OpenRA.Editor
public Map Map { get; private set; }
public TileSet TileSet { get; private set; }
public TileSetRenderer TileSetRenderer { get; private set; }
public Palette Palette { get; private set; }
public Palette PlayerPalette { get; private set; }
public IPalette Palette { get; private set; }
public IPalette PlayerPalette { get; private set; }
public int2 Offset;
public int2 GetOffset() { return Offset; }
@@ -63,8 +62,8 @@ namespace OpenRA.Editor
public bool ShowRuler;
public bool IsPaste { get { return TileSelection != null && ResourceSelection != null; } }
public TileReference<ushort, byte>[,] TileSelection;
public TileReference<byte, byte>[,] ResourceSelection;
public TerrainTile[,] TileSelection;
public ResourceTile[,] ResourceSelection;
public CPos SelectionStart;
public CPos SelectionEnd;
@@ -82,7 +81,7 @@ namespace OpenRA.Editor
public Keys GetModifiers() { return ModifierKeys; }
public void Bind(Map m, TileSet ts, TileSetRenderer tsr, Palette p, Palette pp)
public void Bind(Map m, TileSet ts, TileSetRenderer tsr, IPalette p, IPalette pp)
{
Map = m;
TileSet = ts;
@@ -207,9 +206,9 @@ namespace OpenRA.Editor
var key = Map.Actors.Value.FirstOrDefault(a => a.Value.Location() == brushLocation);
if (key.Key != null) Map.Actors.Value.Remove(key.Key);
if (Map.MapResources.Value[brushLocation.X, brushLocation.Y].Type != 0)
if (Map.MapResources.Value[brushLocation].Type != 0)
{
Map.MapResources.Value[brushLocation.X, brushLocation.Y] = new TileReference<byte, byte>();
Map.MapResources.Value[brushLocation] = new ResourceTile(0, 0);
var ch = new int2(brushLocation.X / ChunkSize, brushLocation.Y / ChunkSize);
if (Chunks.ContainsKey(ch))
{
@@ -266,27 +265,34 @@ namespace OpenRA.Editor
unsafe
{
int* p = (int*)data.Scan0.ToPointer();
var p = (int*)data.Scan0.ToPointer();
var stride = data.Stride >> 2;
for (var i = 0; i < ChunkSize; i++)
for (var j = 0; j < ChunkSize; j++)
{
var tr = Map.MapTiles.Value[u * ChunkSize + i, v * ChunkSize + j];
var ui = u * ChunkSize + i;
var vj = v * ChunkSize + j;
var uv = new MPos(ui, vj);
var tr = Map.MapTiles.Value[uv];
var tile = TileSetRenderer.Data(tr.Type);
var index = (tr.Index < tile.Count) ? tr.Index : (byte)0;
if (tile == null)
continue;
var index = (tr.Index < tile.Length) ? tr.Index : (byte)0;
var rawImage = tile[index];
for (var x = 0; x < TileSetRenderer.TileSize; x++)
for (var y = 0; y < TileSetRenderer.TileSize; y++)
p[(j * TileSetRenderer.TileSize + y) * stride + i * TileSetRenderer.TileSize + x] = Palette.GetColor(rawImage[x + TileSetRenderer.TileSize * y]).ToArgb();
p[(j * TileSetRenderer.TileSize + y) * stride + i * TileSetRenderer.TileSize + x] =
Palette.GetColor(rawImage[x + TileSetRenderer.TileSize * y]).ToArgb();
if (Map.MapResources.Value[u * ChunkSize + i, v * ChunkSize + j].Type != 0)
if (Map.MapResources.Value[uv].Type != 0)
{
var resourceImage = ResourceTemplates[Map.MapResources.Value[u * ChunkSize + i, v * ChunkSize + j].Type].Bitmap;
var resourceImage = ResourceTemplates[Map.MapResources.Value[uv].Type].Bitmap;
var srcdata = resourceImage.LockBits(resourceImage.Bounds(),
ImageLockMode.ReadOnly, PixelFormat.Format32bppArgb);
int* q = (int*)srcdata.Scan0.ToPointer();
var q = (int*)srcdata.Scan0.ToPointer();
var srcstride = srcdata.Stride >> 2;
for (var x = 0; x < TileSetRenderer.TileSize; x++)
@@ -308,13 +314,14 @@ namespace OpenRA.Editor
{
using (var g = SGraphics.FromImage(bitmap))
{
var ts = Game.modData.Manifest.TileSize;
var ts = Game.ModData.Manifest.TileSize;
var rect = new Rectangle(0, 0, bitmap.Width, bitmap.Height);
ControlPaint.DrawGrid(g, rect, new Size(2, ts.Height), Color.DarkRed);
ControlPaint.DrawGrid(g, rect, new Size(ts.Width, 2), Color.DarkRed);
ControlPaint.DrawGrid(g, rect, new Size(ts.Width, ts.Height), Color.Red);
}
}
return bitmap;
}
@@ -329,8 +336,9 @@ namespace OpenRA.Editor
{
var vX = (int)Math.Floor((mousePos.X - Offset.X) / Zoom);
var vY = (int)Math.Floor((mousePos.Y - Offset.Y) / Zoom);
return new CPos((vX + TileSetRenderer.TileSize - 1) / TileSetRenderer.TileSize,
(vY + TileSetRenderer.TileSize - 1) / TileSetRenderer.TileSize);
return new CPos(
(vX + TileSetRenderer.TileSize - 1) / TileSetRenderer.TileSize,
(vY + TileSetRenderer.TileSize - 1) / TileSetRenderer.TileSize);
}
public void DrawActor(SGraphics g, CPos p, ActorTemplate t, ColorPalette cp)
@@ -345,10 +353,10 @@ namespace OpenRA.Editor
float2 GetDrawPosition(CPos location, Bitmap bmp, bool centered)
{
float offsetX = centered ? bmp.Width / 2 - TileSetRenderer.TileSize / 2 : 0;
float drawX = TileSetRenderer.TileSize * location.X * Zoom + Offset.X - offsetX;
var drawX = TileSetRenderer.TileSize * location.X * Zoom + Offset.X - offsetX;
float offsetY = centered ? bmp.Height / 2 - TileSetRenderer.TileSize / 2 : 0;
float drawY = TileSetRenderer.TileSize * location.Y * Zoom + Offset.Y - offsetY;
var drawY = TileSetRenderer.TileSize * location.Y * Zoom + Offset.Y - offsetY;
return new float2(drawX, drawY);
}
@@ -381,7 +389,7 @@ namespace OpenRA.Editor
var pr = Map.Players[name];
var pcpi = Program.Rules.Actors["player"].Traits.Get<PlayerColorPaletteInfo>();
var remap = new PlayerColorRemap(pcpi.RemapIndex, pr.Color, pcpi.Ramp);
return new Palette(PlayerPalette, remap).AsSystemPalette();
return new ImmutablePalette(PlayerPalette, remap).AsSystemPalette();
}
Cache<string, ColorPalette> playerPalettes;
@@ -418,8 +426,8 @@ namespace OpenRA.Editor
var drawX = TileSetRenderer.TileSize * (float)ChunkSize * (float)x.X * Zoom + Offset.X;
var drawY = TileSetRenderer.TileSize * (float)ChunkSize * (float)x.Y * Zoom + Offset.Y;
RectangleF sourceRect = new RectangleF(0, 0, bmp.Width, bmp.Height);
RectangleF destRect = new RectangleF(drawX, drawY, bmp.Width * Zoom, bmp.Height * Zoom);
var sourceRect = new RectangleF(0, 0, bmp.Width, bmp.Height);
var destRect = new RectangleF(drawX, drawY, bmp.Width * Zoom, bmp.Height * Zoom);
e.Graphics.DrawImage(bmp, destRect, sourceRect, GraphicsUnit.Pixel);
}
@@ -468,20 +476,20 @@ namespace OpenRA.Editor
if (ShowRuler && Zoom > 0.2)
{
for (int i = Map.Bounds.Left; i <= Map.Bounds.Right; i += 8)
for (var i = Map.Bounds.Left; i <= Map.Bounds.Right; i += 8)
{
if (i % 8 == 0)
{
PointF point = new PointF(i * TileSetRenderer.TileSize * Zoom + Offset.X, (Map.Bounds.Top - 8) * TileSetRenderer.TileSize * Zoom + Offset.Y);
var point = new PointF(i * TileSetRenderer.TileSize * Zoom + Offset.X, (Map.Bounds.Top - 8) * TileSetRenderer.TileSize * Zoom + Offset.Y);
e.Graphics.DrawString((i - Map.Bounds.Left).ToString(), MarkerFont, TextBrush, point);
}
}
for (int i = Map.Bounds.Top; i <= Map.Bounds.Bottom; i += 8)
for (var i = Map.Bounds.Top; i <= Map.Bounds.Bottom; i += 8)
{
if (i % 8 == 0)
{
PointF point = new PointF((Map.Bounds.Left - 8) * TileSetRenderer.TileSize * Zoom + Offset.X, i * TileSetRenderer.TileSize * Zoom + Offset.Y);
var point = new PointF((Map.Bounds.Left - 8) * TileSetRenderer.TileSize * Zoom + Offset.X, i * TileSetRenderer.TileSize * Zoom + Offset.Y);
e.Graphics.DrawString((i - Map.Bounds.Left).ToString(), MarkerFont, TextBrush, point);
}
}
@@ -506,19 +514,20 @@ namespace OpenRA.Editor
if (start == end) return;
int width = Math.Abs((start - end).X);
int height = Math.Abs((start - end).Y);
var width = Math.Abs((start - end).X);
var height = Math.Abs((start - end).Y);
TileSelection = new TileReference<ushort, byte>[width, height];
ResourceSelection = new TileReference<byte, byte>[width, height];
TileSelection = new TerrainTile[width, height];
ResourceSelection = new ResourceTile[width, height];
for (int x = 0; x < width; x++)
for (var x = 0; x < width; x++)
{
for (int y = 0; y < height; y++)
for (var y = 0; y < height; y++)
{
// TODO: crash prevention
TileSelection[x, y] = Map.MapTiles.Value[start.X + x, start.Y + y];
ResourceSelection[x, y] = Map.MapResources.Value[start.X + x, start.Y + y];
var cell = new CPos(start.X + x, start.Y + y);
TileSelection[x, y] = Map.MapTiles.Value[cell];
ResourceSelection[x, y] = Map.MapResources.Value[cell];
}
}
}
@@ -529,16 +538,17 @@ namespace OpenRA.Editor
var width = Math.Abs((SelectionStart - SelectionEnd).X);
var height = Math.Abs((SelectionStart - SelectionEnd).Y);
for (int x = 0; x < width; x++)
for (var x = 0; x < width; x++)
{
for (int y = 0; y < height; y++)
for (var y = 0; y < height; y++)
{
var mapX = loc.X + x;
var mapY = loc.Y + y;
var cell = new CPos(mapX, mapY);
// TODO: crash prevention for outside of bounds
Map.MapTiles.Value[mapX, mapY] = TileSelection[x, y];
Map.MapResources.Value[mapX, mapY] = ResourceSelection[x, y];
Map.MapTiles.Value[cell] = TileSelection[x, y];
Map.MapResources.Value[cell] = ResourceSelection[x, y];
var ch = new int2(mapX / ChunkSize, mapY / ChunkSize);
if (Chunks.ContainsKey(ch))

View File

@@ -1,6 +1,6 @@
#region Copyright & License Information
/*
* Copyright 2007-2013 The OpenRA Developers (see AUTHORS)
* 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,
@@ -12,7 +12,6 @@ using System;
using System.Collections.Generic;
using System.Drawing;
using System.Drawing.Imaging;
using System.IO;
using System.Linq;
using OpenRA.FileSystem;
using OpenRA.Graphics;
@@ -21,9 +20,9 @@ namespace OpenRA.Editor
{
public class TileSetRenderer
{
public TileSet TileSet;
Dictionary<ushort, List<byte[]>> templates;
public readonly int TileSize;
public TileSet TileSet;
Dictionary<ushort, byte[][]> templates;
// Extract a square tile that the editor can render
byte[] ExtractSquareTile(ISpriteFrame frame)
@@ -45,45 +44,22 @@ namespace OpenRA.Editor
return data;
}
List<byte[]> LoadTemplate(string filename, string[] exts, Dictionary<string, ISpriteSource> sourceCache, int[] frames)
{
ISpriteSource source;
if (!sourceCache.ContainsKey(filename))
{
using (var s = GlobalFileSystem.OpenWithExts(filename, exts))
source = SpriteSource.LoadSpriteSource(s, filename);
if (source.CacheWhenLoadingTileset)
sourceCache.Add(filename, source);
}
else
source = sourceCache[filename];
if (frames != null)
{
var ret = new List<byte[]>();
var srcFrames = source.Frames.ToArray();
foreach (var i in frames)
ret.Add(ExtractSquareTile(srcFrames[i]));
return ret;
}
return source.Frames.Select(f => ExtractSquareTile(f)).ToList();
}
public TileSetRenderer(TileSet tileset, Size tileSize)
{
this.TileSet = tileset;
this.TileSize = Math.Min(tileSize.Width, tileSize.Height);
templates = new Dictionary<ushort, List<byte[]>>();
var sourceCache = new Dictionary<string, ISpriteSource>();
foreach (var t in TileSet.Templates)
templates.Add(t.Key, LoadTemplate(t.Value.Image, tileset.Extensions, sourceCache, t.Value.Frames));
templates = new Dictionary<ushort, byte[][]>();
var frameCache = new FrameCache(Game.ModData.SpriteLoaders);
foreach (var t in tileset.Templates)
{
var allFrames = frameCache[t.Value.Images[0]];
var frames = t.Value.Frames != null ? t.Value.Frames.Select(f => allFrames[f]).ToArray() : allFrames;
templates.Add(t.Value.Id, frames.Select(f => ExtractSquareTile(f)).ToArray());
}
}
public Bitmap RenderTemplate(ushort id, Palette p)
public Bitmap RenderTemplate(ushort id, IPalette p)
{
var template = TileSet.Templates[id];
var templateData = templates[id];
@@ -126,9 +102,16 @@ namespace OpenRA.Editor
return bitmap;
}
public List<byte[]> Data(ushort id)
public byte[][] Data(ushort id)
{
return templates[id];
byte[][] template;
if (!templates.TryGetValue(id, out template))
{
Console.WriteLine("warning: Unknown tile template {0}", id);
return null;
}
return template;
}
}
}

View File

@@ -1,6 +1,6 @@
#region Copyright & License Information
#region Copyright & License Information
/*
* Copyright 2007-2011 The OpenRA Developers (see AUTHORS)
* 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,
@@ -10,31 +10,32 @@
using System.Collections.Generic;
using System.Linq;
using OpenRA.Traits;
namespace OpenRA.Traits
namespace OpenRA.Activities
{
public abstract class Activity
{
public Activity NextActivity { get; set; }
protected bool IsCanceled { get; private set; }
public abstract Activity Tick( Actor self );
public abstract Activity Tick(Actor self);
public virtual void Cancel( Actor self )
public virtual void Cancel(Actor self)
{
IsCanceled = true;
NextActivity = null;
}
public virtual void Queue( Activity activity )
public virtual void Queue(Activity activity)
{
if( NextActivity != null )
NextActivity.Queue( activity );
if (NextActivity != null)
NextActivity.Queue(activity);
else
NextActivity = activity;
}
public virtual IEnumerable<Target> GetTargets( Actor self )
public virtual IEnumerable<Target> GetTargets(Actor self)
{
yield break;
}
@@ -42,12 +43,12 @@ namespace OpenRA.Traits
public static class ActivityExts
{
public static IEnumerable<Target> GetTargetQueue( this Actor self )
public static IEnumerable<Target> GetTargetQueue(this Actor self)
{
return self.GetCurrentActivity()
.Iterate( u => u.NextActivity )
.TakeWhile( u => u != null )
.SelectMany( u => u.GetTargets( self ) );
.Iterate(u => u.NextActivity)
.TakeWhile(u => u != null)
.SelectMany(u => u.GetTargets(self));
}
}
}

View File

@@ -1,6 +1,6 @@
#region Copyright & License Information
/*
* Copyright 2007-2011 The OpenRA Developers (see AUTHORS)
* 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,
@@ -9,9 +9,8 @@
#endregion
using System;
using OpenRA.Traits;
namespace OpenRA.Mods.RA.Activities
namespace OpenRA.Activities
{
public class CallFunc : Activity
{

View File

@@ -1,6 +1,6 @@
#region Copyright & License Information
/*
* Copyright 2007-2014 The OpenRA Developers (see AUTHORS)
* 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,
@@ -14,6 +14,7 @@ using System.Drawing;
using System.Linq;
using Eluant;
using Eluant.ObjectBinding;
using OpenRA.Activities;
using OpenRA.Graphics;
using OpenRA.Primitives;
using OpenRA.Scripting;
@@ -21,22 +22,54 @@ using OpenRA.Traits;
namespace OpenRA
{
public class Actor : IScriptBindable, IScriptNotifyBind, ILuaTableBinding, ILuaEqualityBinding, ILuaToStringBinding
public interface IActor
{
ActorInfo Info { get; }
IWorld World { get; }
uint ActorID { get; }
Player Owner { get; set; }
T TraitOrDefault<T>();
T Trait<T>();
IEnumerable<T> TraitsImplementing<T>();
IEnumerable<IRenderable> Render(WorldRenderer wr);
}
public class Actor : IScriptBindable, IScriptNotifyBind, ILuaTableBinding, ILuaEqualityBinding, ILuaToStringBinding, IEquatable<Actor>, IActor
{
public readonly ActorInfo Info;
ActorInfo IActor.Info { get { return this.Info; } }
public readonly World World;
public readonly uint ActorID;
public Lazy<Rectangle> Bounds;
IWorld IActor.World { get { return World; } }
Lazy<IOccupySpace> occupySpace;
public readonly uint ActorID;
uint IActor.ActorID { get { return this.ActorID; } }
[Sync] public Player Owner { get; set; }
public bool IsInWorld { get; internal set; }
public bool Destroyed { get; private set; }
Activity currentActivity;
public Group Group;
public int Generation;
Lazy<Rectangle> bounds;
Lazy<IFacing> facing;
Lazy<Health> health;
Lazy<IOccupySpace> occupySpace;
Lazy<IEffectiveOwner> effectiveOwner;
public Rectangle Bounds { get { return bounds.Value; } }
public IOccupySpace OccupiesSpace { get { return occupySpace.Value; } }
public IEffectiveOwner EffectiveOwner { get { return effectiveOwner.Value; } }
public bool IsIdle { get { return currentActivity == null; } }
public bool IsDead { get { return Destroyed || (health.Value == null ? false : health.Value.IsDead); } }
public CPos Location { get { return occupySpace.Value.TopLeft; } }
public WPos CenterPosition { get { return occupySpace.Value.CenterPosition; } }
@@ -50,11 +83,8 @@ namespace OpenRA
}
}
[Sync] public Player Owner;
Activity currentActivity;
public Group Group;
public int Generation;
readonly IEnumerable<IRenderModifier> traitsImplementingRenderModifier;
readonly IEnumerable<IRender> traitsImplementingRender;
internal Actor(World world, string name, TypeDictionary initDict)
{
@@ -69,10 +99,12 @@ namespace OpenRA
if (name != null)
{
if (!world.Map.Rules.Actors.ContainsKey(name.ToLowerInvariant()))
throw new NotImplementedException("No rules definition for unit {0}".F(name.ToLowerInvariant()));
name = name.ToLowerInvariant();
Info = world.Map.Rules.Actors[name.ToLowerInvariant()];
if (!world.Map.Rules.Actors.ContainsKey(name))
throw new NotImplementedException("No rules definition for unit " + name);
Info = world.Map.Rules.Actors[name];
foreach (var trait in Info.TraitsInConstructOrder())
AddTrait(trait.Create(init));
}
@@ -81,7 +113,7 @@ namespace OpenRA
health = Exts.Lazy(() => TraitOrDefault<Health>());
effectiveOwner = Exts.Lazy(() => TraitOrDefault<IEffectiveOwner>());
Bounds = Exts.Lazy(() =>
bounds = Exts.Lazy(() =>
{
var si = Info.Traits.GetOrDefault<SelectableInfo>();
var size = (si != null && si.Bounds != null) ? new int2(si.Bounds[0], si.Bounds[1]) :
@@ -93,39 +125,36 @@ namespace OpenRA
return new Rectangle(offset.X, offset.Y, size.X, size.Y);
});
traitsImplementingRenderModifier = TraitsImplementing<IRenderModifier>();
traitsImplementingRender = TraitsImplementing<IRender>();
}
public void Tick()
{
var wasIdle = IsIdle;
currentActivity = Traits.Util.RunActivity(this, currentActivity);
if (!wasIdle && IsIdle)
foreach (var n in TraitsImplementing<INotifyBecomingIdle>())
n.OnBecomingIdle(this);
}
public bool IsIdle
{
get { return currentActivity == null; }
}
public IEnumerable<IRenderable> Render(WorldRenderer wr)
{
var renderables = Renderables(wr);
foreach (var modifier in TraitsImplementing<IRenderModifier>())
foreach (var modifier in traitsImplementingRenderModifier)
renderables = modifier.ModifyRender(this, wr, renderables);
return renderables;
}
IEnumerable<IRenderable> Renderables(WorldRenderer wr)
{
foreach (var render in TraitsImplementing<IRender>())
foreach (var render in traitsImplementingRender)
foreach (var renderable in render.Render(this, wr))
yield return renderable;
}
public bool IsInWorld { get; internal set; }
public void QueueActivity(bool queued, Activity nextActivity)
{
if (!queued)
@@ -160,50 +189,62 @@ namespace OpenRA
public override bool Equals(object obj)
{
var o = obj as Actor;
return o != null && o.ActorID == ActorID;
return o != null && Equals(o);
}
public bool Equals(Actor other)
{
return ActorID == other.ActorID;
}
public override string ToString()
{
return "{0} {1}{2}".F(Info.Name, ActorID, IsInWorld ? "" : " (not in world)");
var name = Info.Name + " " + ActorID;
if (!IsInWorld)
name += " (not in world)";
return name;
}
public T Trait<T>()
{
return World.traitDict.Get<T>(this);
return World.TraitDict.Get<T>(this);
}
public T TraitOrDefault<T>()
{
return World.traitDict.GetOrDefault<T>(this);
return World.TraitDict.GetOrDefault<T>(this);
}
public IEnumerable<T> TraitsImplementing<T>()
{
return World.traitDict.WithInterface<T>(this);
return World.TraitDict.WithInterface<T>(this);
}
public bool HasTrait<T>()
{
return World.traitDict.Contains<T>(this);
return World.TraitDict.Contains<T>(this);
}
public void AddTrait(object trait)
{
World.traitDict.AddTrait(this, trait);
World.TraitDict.AddTrait(this, trait);
}
public bool Destroyed { get; private set; }
public void Destroy()
{
World.AddFrameEndTask(w =>
{
if (Destroyed) return;
if (Destroyed)
return;
World.Remove(this);
World.traitDict.RemoveActor(this);
if (IsInWorld)
World.Remove(this);
World.TraitDict.RemoveActor(this);
Destroyed = true;
if (luaInterface != null)
luaInterface.Value.OnActorDestroyed();
});
}
@@ -212,6 +253,9 @@ namespace OpenRA
{
World.AddFrameEndTask(w =>
{
if (Destroyed)
return;
var oldOwner = Owner;
// momentarily remove from world so the ownership queries don't get confused
@@ -225,19 +269,6 @@ namespace OpenRA
});
}
public bool IsDead()
{
if (Destroyed)
return true;
return (health.Value == null) ? false : health.Value.IsDead;
}
public bool IsDisguised()
{
return effectiveOwner.Value != null && effectiveOwner.Value.Disguised;
}
public void Kill(Actor attacker)
{
if (health.Value == null)
@@ -251,7 +282,8 @@ namespace OpenRA
Lazy<ScriptActorInterface> luaInterface;
public void OnScriptBind(ScriptContext context)
{
luaInterface = Exts.Lazy(() => new ScriptActorInterface(context, this));
if (luaInterface == null)
luaInterface = Exts.Lazy(() => new ScriptActorInterface(context, this));
}
public LuaValue this[LuaRuntime runtime, LuaValue keyValue]

View File

@@ -1,6 +1,6 @@
#region Copyright & License Information
/*
* Copyright 2007-2011 The OpenRA Developers (see AUTHORS)
* 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,
@@ -9,14 +9,13 @@
#endregion
using System;
using System.Drawing;
using Eluant;
using Eluant.ObjectBinding;
using OpenRA.Scripting;
namespace OpenRA
{
public struct CPos : IScriptBindable, ILuaAdditionBinding, ILuaSubtractionBinding, ILuaEqualityBinding, ILuaTableBinding
public struct CPos : IScriptBindable, ILuaAdditionBinding, ILuaSubtractionBinding, ILuaEqualityBinding, ILuaTableBinding, IEquatable<CPos>
{
public readonly int X, Y;
@@ -28,37 +27,45 @@ namespace OpenRA
public static CPos operator +(CVec a, CPos b) { return new CPos(a.X + b.X, a.Y + b.Y); }
public static CPos operator +(CPos a, CVec b) { return new CPos(a.X + b.X, a.Y + b.Y); }
public static CPos operator -(CPos a, CVec b) { return new CPos(a.X - b.X, a.Y - b.Y); }
public static CVec operator -(CPos a, CPos b) { return new CVec(a.X - b.X, a.Y - b.Y); }
public static bool operator ==(CPos me, CPos other) { return (me.X == other.X && me.Y == other.Y); }
public static bool operator ==(CPos me, CPos other) { return me.X == other.X && me.Y == other.Y; }
public static bool operator !=(CPos me, CPos other) { return !(me == other); }
public static CPos Max(CPos a, CPos b) { return new CPos(Math.Max(a.X, b.X), Math.Max(a.Y, b.Y)); }
public static CPos Min(CPos a, CPos b) { return new CPos(Math.Min(a.X, b.X), Math.Min(a.Y, b.Y)); }
public float2 ToFloat2() { return new float2(X, Y); }
public int2 ToInt2() { return new int2(X, Y); }
public WPos CenterPosition { get { return new WPos(1024 * X + 512, 1024 * Y + 512, 0); } }
public WPos TopLeft { get { return new WPos(1024 * X, 1024 * Y, 0); } }
public WPos BottomRight { get { return new WPos(1024 * X + 1023, 1024 * Y + 1023, 0); } }
public CPos Clamp(Rectangle r)
{
return new CPos(Math.Min(r.Right, Math.Max(X, r.Left)),
Math.Min(r.Bottom, Math.Max(Y, r.Top)));
}
public override int GetHashCode() { return X.GetHashCode() ^ Y.GetHashCode(); }
public override bool Equals(object obj)
public bool Equals(CPos other) { return X == other.X && Y == other.Y; }
public override bool Equals(object obj) { return obj is CPos && Equals((CPos)obj); }
public override string ToString() { return X + "," + Y; }
public MPos ToMPos(Map map)
{
var o = obj as CPos?;
return o != null && o == this;
return ToMPos(map.TileShape);
}
public override string ToString() { return "{0},{1}".F(X, Y); }
public MPos ToMPos(TileShape shape)
{
if (shape == TileShape.Rectangle)
return new MPos(X, Y);
// Convert from diamond cell (x, y) position to rectangular map position (u, v)
// - The staggered rows make this fiddly (hint: draw a diagram!)
// (a) Consider the relationships:
// - +1x (even -> odd) adds (0, 1) to (u, v)
// - +1x (odd -> even) adds (1, 1) to (u, v)
// - +1y (even -> odd) adds (-1, 1) to (u, v)
// - +1y (odd -> even) adds (0, 1) to (u, v)
// (b) Therefore:
// - ax + by adds (a - b)/2 to u (only even increments count)
// - ax + by adds a + b to v
var u = (X - Y) / 2;
var v = X + Y;
return new MPos(u, v);
}
#region Scripting interface
@@ -111,16 +118,4 @@ namespace OpenRA
#endregion
}
public static class RectangleExtensions
{
public static CPos TopLeftAsCPos(this Rectangle r) { return new CPos(r.Left, r.Top); }
public static CPos BottomRightAsCPos(this Rectangle r) { return new CPos(r.Right, r.Bottom); }
}
public static class WorldCoordinateExtensions
{
public static CPos ToCPos(this WPos a) { return new CPos(a.X / 1024, a.Y / 1024); }
public static CVec ToCVec(this WVec a) { return new CVec(a.X / 1024, a.Y / 1024); }
}
}

View File

@@ -1,6 +1,6 @@
#region Copyright & License Information
/*
* Copyright 2007-2011 The OpenRA Developers (see AUTHORS)
* 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,
@@ -16,18 +16,13 @@ using OpenRA.Scripting;
namespace OpenRA
{
public struct CVec : IScriptBindable, ILuaAdditionBinding, ILuaSubtractionBinding, ILuaUnaryMinusBinding, ILuaEqualityBinding, ILuaTableBinding
public struct CVec : IScriptBindable, ILuaAdditionBinding, ILuaSubtractionBinding, ILuaUnaryMinusBinding, ILuaEqualityBinding, ILuaTableBinding, IEquatable<CVec>
{
public readonly int X, Y;
public CVec(int x, int y) { X = x; Y = y; }
public CVec(Size p) { X = p.Width; Y = p.Height; }
public static readonly CVec Zero = new CVec(0, 0);
public static explicit operator CVec(int2 a) { return new CVec(a.X, a.Y); }
public static explicit operator CVec(float2 a) { return new CVec((int)a.X, (int)a.Y); }
public static CVec operator +(CVec a, CVec b) { return new CVec(a.X + b.X, a.Y + b.Y); }
public static CVec operator -(CVec a, CVec b) { return new CVec(a.X - b.X, a.Y - b.Y); }
public static CVec operator *(int a, CVec b) { return new CVec(a * b.X, a * b.Y); }
@@ -36,7 +31,7 @@ namespace OpenRA
public static CVec operator -(CVec a) { return new CVec(-a.X, -a.Y); }
public static bool operator ==(CVec me, CVec other) { return (me.X == other.X && me.Y == other.Y); }
public static bool operator ==(CVec me, CVec other) { return me.X == other.X && me.Y == other.Y; }
public static bool operator !=(CVec me, CVec other) { return !(me == other); }
public static CVec Max(CVec a, CVec b) { return new CVec(Math.Max(a.X, b.X), Math.Max(a.Y, b.Y)); }
@@ -47,31 +42,23 @@ namespace OpenRA
public CVec Sign() { return new CVec(Math.Sign(X), Math.Sign(Y)); }
public CVec Abs() { return new CVec(Math.Abs(X), Math.Abs(Y)); }
public int LengthSquared { get { return X * X + Y * Y; } }
public int Length { get { return (int)Math.Sqrt(LengthSquared); } }
public float2 ToFloat2() { return new float2(X, Y); }
public int2 ToInt2() { return new int2(X, Y); }
public WVec ToWVec() { return new WVec(X*1024, Y*1024, 0); }
public int Length { get { return Exts.ISqrt(LengthSquared); } }
public CVec Clamp(Rectangle r)
{
return new CVec(
Math.Min(r.Right, Math.Max(X, r.Left)),
Math.Min(r.Bottom, Math.Max(Y, r.Top))
);
Math.Min(r.Bottom, Math.Max(Y, r.Top)));
}
public override int GetHashCode() { return X.GetHashCode() ^ Y.GetHashCode(); }
public override bool Equals(object obj)
{
var o = obj as CVec?;
return o != null && o == this;
}
public bool Equals(CVec other) { return other == this; }
public override bool Equals(object obj) { return obj is CVec && Equals((CVec)obj); }
public override string ToString() { return "{0},{1}".F(X, Y); }
public override string ToString() { return X + "," + Y; }
public static readonly CVec[] directions =
public static readonly CVec[] Directions =
{
new CVec(-1, -1),
new CVec(-1, 0),
@@ -125,7 +112,6 @@ namespace OpenRA
{
case "X": return X;
case "Y": return Y;
case "Facing": return Traits.Util.GetFacing(this, 0);
default: throw new LuaException("CVec does not define a member '{0}'".F(key));
}
}

View File

@@ -1,6 +1,6 @@
#region Copyright & License Information
/*
* Copyright 2007-2011 The OpenRA Developers (see AUTHORS)
* 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,
@@ -8,15 +8,12 @@
*/
#endregion
using OpenRA.Traits;
namespace OpenRA.Mods.RA
namespace OpenRA
{
class DetectCloakedInfo : TraitInfo<DetectCloaked>
public interface ICacheStorage<T>
{
public readonly string[] CloakTypes = { "Cloak" };
public readonly int Range = 5;
void Remove(string key);
void Store(string key, T data);
T Retrieve(string key);
}
class DetectCloaked {}
}
}

View File

@@ -1,6 +1,6 @@
#region Copyright & License Information
/*
* Copyright 2007-2011 The OpenRA Developers (see AUTHORS)
* 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,
@@ -28,7 +28,9 @@ namespace OpenRA
switch (ex.Status)
{
case WebExceptionStatus.NameResolutionFailure:
return "DNS lookup failed";
case WebExceptionStatus.Timeout:
return "Connection timeout";
case WebExceptionStatus.ConnectFailure:
return "Cannot connect to remote server";
case WebExceptionStatus.ProtocolError:
@@ -70,7 +72,8 @@ namespace OpenRA
{
Game.OnQuit -= Cancel;
wc.CancelAsync();
wc.Dispose();
cancelled = true;
}
}
}
}

View File

@@ -0,0 +1,38 @@
#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 OpenRA.Graphics;
namespace OpenRA.Effects
{
public class AsyncAction : IEffect
{
Action a;
IAsyncResult ar;
public AsyncAction(IAsyncResult ar, Action a)
{
this.a = a;
this.ar = ar;
}
public void Tick(World world)
{
if (ar.IsCompleted)
{
world.AddFrameEndTask(w => { w.Remove(this); a(); });
}
}
public IEnumerable<IRenderable> Render(WorldRenderer r) { yield break; }
}
}

View File

@@ -1,6 +1,6 @@
#region Copyright & License Information
#region Copyright & License Information
/*
* Copyright 2007-2011 The OpenRA Developers (see AUTHORS)
* 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,

View File

@@ -1,6 +1,6 @@
#region Copyright & License Information
#region Copyright & License Information
/*
* Copyright 2007-2011 The OpenRA Developers (see AUTHORS)
* 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,
@@ -18,17 +18,18 @@ namespace OpenRA.Effects
{
Actor target;
Player player;
int remainingTicks = 4;
int remainingTicks;
public FlashTarget(Actor target)
: this(target, null) { }
public FlashTarget(Actor target, Player asPlayer)
public FlashTarget(Actor target, Player asPlayer = null, int ticks = 4)
{
this.target = target;
player = asPlayer;
foreach (var e in target.World.Effects.OfType<FlashTarget>().Where(a => a.target == target).ToArray())
target.World.Remove(e);
remainingTicks = ticks;
target.World.RemoveAll(effect =>
{
var flashTarget = effect as FlashTarget;
return flashTarget != null && flashTarget.target == target;
});
}
public void Tick(World world)

View File

@@ -1,6 +1,6 @@
#region Copyright & License Information
#region Copyright & License Information
/*
* Copyright 2007-2011 The OpenRA Developers (see AUTHORS)
* 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,

View File

@@ -1,6 +1,6 @@
#region Copyright & License Information
/*
* Copyright 2007-2013 The OpenRA Developers (see AUTHORS)
* 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,
@@ -13,15 +13,17 @@ using OpenRA.Graphics;
namespace OpenRA.Effects
{
public class MoveFlash : IEffect
public class SpriteEffect : IEffect
{
string palette;
Animation anim;
WPos pos;
public MoveFlash(WPos pos, World world)
public SpriteEffect(WPos pos, World world, string sprite, string palette)
{
this.pos = pos;
anim = new Animation(world, "moveflsh");
this.palette = palette;
anim = new Animation(world, sprite);
anim.PlayThen("idle", () => world.AddFrameEndTask(w => w.Remove(this)));
}
@@ -32,7 +34,7 @@ namespace OpenRA.Effects
public IEnumerable<IRenderable> Render(WorldRenderer wr)
{
return anim.Render(pos, WVec.Zero, 0, wr.Palette("moveflash"), 1f / wr.Viewport.Zoom);
return anim.Render(pos, WVec.Zero, 0, wr.Palette(palette), 1f / wr.Viewport.Zoom);
}
}
}

View File

@@ -1,6 +1,6 @@
#region Copyright & License Information
#region Copyright & License Information
/*
* Copyright 2007-2014 The OpenRA Developers (see AUTHORS)
* 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,
@@ -15,11 +15,17 @@ using System.Globalization;
using System.Linq;
using System.Reflection;
using OpenRA.Support;
using OpenRA.Traits;
namespace OpenRA
{
public static class Exts
{
public static bool IsUppercase(this string str)
{
return string.Compare(str.ToUpperInvariant(), str, false) == 0;
}
public static string F(this string fmt, params object[] args)
{
return string.Format(fmt, args);
@@ -81,12 +87,34 @@ namespace OpenRA
return r.Contains(p.ToPointF());
}
static int WindingDirectionTest(int2 v0, int2 v1, int2 p)
{
return (v1.X - v0.X) * (p.Y - v0.Y) - (p.X - v0.X) * (v1.Y - v0.Y);
}
public static bool PolygonContains(this int2[] polygon, int2 p)
{
var windingNumber = 0;
for (var i = 0; i < polygon.Length; i++)
{
var tv = polygon[i];
var nv = polygon[(i + 1) % polygon.Length];
if (tv.Y <= p.Y && nv.Y > p.Y && WindingDirectionTest(tv, nv, p) > 0)
windingNumber++;
else if (tv.Y > p.Y && nv.Y <= p.Y && WindingDirectionTest(tv, nv, p) < 0)
windingNumber--;
}
return windingNumber != 0;
}
public static bool HasModifier(this Modifiers k, Modifiers mod)
{
return (k & mod) == mod;
}
public static V GetOrAdd<K, V>(this Dictionary<K, V> d, K k)
where V : new()
{
@@ -101,18 +129,34 @@ namespace OpenRA
return ret;
}
public static int IndexOf<T>(this T[] array, T value)
{
return Array.IndexOf(array, value);
}
public static T Random<T>(this IEnumerable<T> ts, MersenneTwister r)
{
var xs = ts.ToArray();
return xs[r.Next(xs.Length)];
return Random(ts, r, true);
}
public static T RandomOrDefault<T>(this IEnumerable<T> ts, MersenneTwister r)
{
if (!ts.Any())
return default(T);
return Random(ts, r, false);
}
return ts.Random(r);
static T Random<T>(IEnumerable<T> ts, MersenneTwister r, bool throws)
{
var xs = ts as ICollection<T>;
xs = xs ?? ts.ToList();
if (xs.Count == 0)
{
if (throws)
throw new ArgumentException("Collection must not be empty.", "ts");
else
return default(T);
}
else
return xs.ElementAt(r.Next(xs.Count));
}
public static float Product(this IEnumerable<float> xs)
@@ -131,6 +175,55 @@ namespace OpenRA
for (;;) { yield return t; t = f(t); }
}
public static T MinBy<T, U>(this IEnumerable<T> ts, Func<T, U> selector)
{
return ts.CompareBy(selector, 1, true);
}
public static T MaxBy<T, U>(this IEnumerable<T> ts, Func<T, U> selector)
{
return ts.CompareBy(selector, -1, true);
}
public static T MinByOrDefault<T, U>(this IEnumerable<T> ts, Func<T, U> selector)
{
return ts.CompareBy(selector, 1, false);
}
public static T MaxByOrDefault<T, U>(this IEnumerable<T> ts, Func<T, U> selector)
{
return ts.CompareBy(selector, -1, false);
}
static T CompareBy<T, U>(this IEnumerable<T> ts, Func<T, U> selector, int modifier, bool throws)
{
var comparer = Comparer<U>.Default;
T t;
U u;
using (var e = ts.GetEnumerator())
{
if (!e.MoveNext())
if (throws)
throw new ArgumentException("Collection must not be empty.", "ts");
else
return default(T);
t = e.Current;
u = selector(t);
while (e.MoveNext())
{
var nextT = e.Current;
var nextU = selector(nextT);
if (comparer.Compare(nextU, u) * modifier < 0)
{
t = nextT;
u = nextU;
}
}
return t;
}
}
public static int NextPowerOf2(int v)
{
--v;
@@ -149,6 +242,89 @@ namespace OpenRA
public static Size NextPowerOf2(this Size s) { return new Size(NextPowerOf2(s.Width), NextPowerOf2(s.Height)); }
public enum ISqrtRoundMode { Floor, Nearest, Ceiling }
public static int ISqrt(int number, ISqrtRoundMode round = ISqrtRoundMode.Floor)
{
if (number < 0)
throw new InvalidOperationException("Attempted to calculate the square root of a negative integer: {0}".F(number));
return (int)ISqrt((uint)number, round);
}
public static uint ISqrt(uint number, ISqrtRoundMode round = ISqrtRoundMode.Floor)
{
var divisor = 1U << 30;
var root = 0U;
var remainder = number;
// Find the highest term in the divisor
while (divisor > number)
divisor >>= 2;
// Evaluate the root, two bits at a time
while (divisor != 0)
{
if (root + divisor <= remainder)
{
remainder -= root + divisor;
root += 2 * divisor;
}
root >>= 1;
divisor >>= 2;
}
// Adjust for other rounding modes
if (round == ISqrtRoundMode.Nearest && remainder > root)
root += 1;
else if (round == ISqrtRoundMode.Ceiling && root * root < number)
root += 1;
return root;
}
public static long ISqrt(long number, ISqrtRoundMode round = ISqrtRoundMode.Floor)
{
if (number < 0)
throw new InvalidOperationException("Attempted to calculate the square root of a negative integer: {0}".F(number));
return (long)ISqrt((ulong)number, round);
}
public static ulong ISqrt(ulong number, ISqrtRoundMode round = ISqrtRoundMode.Floor)
{
var divisor = 1UL << 62;
var root = 0UL;
var remainder = number;
// Find the highest term in the divisor
while (divisor > number)
divisor >>= 2;
// Evaluate the root, two bits at a time
while (divisor != 0)
{
if (root + divisor <= remainder)
{
remainder -= root + divisor;
root += 2 * divisor;
}
root >>= 1;
divisor >>= 2;
}
// Adjust for other rounding modes
if (round == ISqrtRoundMode.Nearest && remainder > root)
root += 1;
else if (round == ISqrtRoundMode.Ceiling && root * root < number)
root += 1;
return root;
}
public static string JoinWith<T>(this IEnumerable<T> ts, string j)
{
return string.Join(j, ts);
@@ -159,12 +335,21 @@ namespace OpenRA
return ts.Concat(moreTs);
}
public static Dictionary<TKey, TSource> ToDictionaryWithConflictLog<TSource, TKey>(this IEnumerable<TSource> source, Func<TSource, TKey> keySelector, string debugName, Func<TKey, string> logKey, Func<TSource, string> logValue)
public static HashSet<T> ToHashSet<T>(this IEnumerable<T> source)
{
return new HashSet<T>(source);
}
public static Dictionary<TKey, TSource> ToDictionaryWithConflictLog<TSource, TKey>(
this IEnumerable<TSource> source, Func<TSource, TKey> keySelector,
string debugName, Func<TKey, string> logKey, Func<TSource, string> logValue)
{
return ToDictionaryWithConflictLog(source, keySelector, x => x, debugName, logKey, logValue);
}
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)
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)
{
// Fall back on ToString() if null functions are provided:
logKey = logKey ?? (s => s.ToString());
@@ -175,8 +360,8 @@ namespace OpenRA
var d = new Dictionary<TKey, TElement>();
foreach (var item in source)
{
TKey key = keySelector(item);
TElement element = elementSelector(item);
var key = keySelector(item);
var element = elementSelector(item);
// Check for a key conflict:
if (d.ContainsKey(key))
@@ -201,7 +386,7 @@ namespace OpenRA
// If any duplicates were found, throw a descriptive error
if (dupKeys.Count > 0)
{
var badKeysFormatted = string.Join(", ", dupKeys.Select(p => "{0}: [{1}]".F(logKey(p.Key), string.Join(",", p.Value.ToArray()))).ToArray());
var badKeysFormatted = string.Join(", ", dupKeys.Select(p => "{0}: [{1}]".F(logKey(p.Key), string.Join(",", p.Value))));
var msg = "{0}, duplicate values found for the following keys: {1}".F(debugName, badKeysFormatted);
throw new ArgumentException(msg);
}
@@ -221,8 +406,8 @@ namespace OpenRA
public static T[] MakeArray<T>(int count, Func<int, T> f)
{
T[] result = new T[count];
for (int i = 0; i < count; i++)
var result = new T[count];
for (var i = 0; i < count; i++)
result[i] = f(i);
return result;
@@ -232,9 +417,18 @@ namespace OpenRA
{
var result = new T[width, height];
for (var i = 0; i < width; i++)
{
for (var j = 0; j < height; j++)
result[i, j] = i <= ts.GetUpperBound(0) && j <= ts.GetUpperBound(1)
? ts[i, j] : t;
{
// Workaround for broken ternary operators in certain versions of mono
// (3.10 and certain versions of the 3.8 series): https://bugzilla.xamarin.com/show_bug.cgi?id=23319
if (i <= ts.GetUpperBound(0) && j <= ts.GetUpperBound(1))
result[i, j] = ts[i, j];
else
result[i, j] = t;
}
}
return result;
}
@@ -263,6 +457,16 @@ namespace OpenRA
{
return int.TryParse(s, NumberStyles.Integer, NumberFormatInfo.InvariantInfo, out i);
}
public static bool IsTraitEnabled(this object trait)
{
return trait as IDisabledTrait == null || !(trait as IDisabledTrait).IsTraitDisabled;
}
public static bool IsTraitEnabled<T>(T t)
{
return IsTraitEnabled(t as object);
}
}
public static class Enum<T>

View File

@@ -1,6 +1,6 @@
#region Copyright & License Information
/*
* Copyright 2007-2014 The OpenRA Developers (see AUTHORS)
* 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,
@@ -10,6 +10,7 @@
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Globalization;
using System.Linq;
@@ -34,38 +35,44 @@ namespace OpenRA
public static void Load(object self, MiniYaml my)
{
var loadDict = typeLoadInfo[self.GetType()];
var loadInfo = typeLoadInfo[self.GetType()];
foreach (var kv in loadDict)
Dictionary<string, MiniYaml> md = null;
foreach (var fli in loadInfo)
{
object val;
if (kv.Value != null)
val = kv.Value(kv.Key.Name, kv.Key.FieldType, my);
else if (!TryGetValueFromYaml(kv.Key, my, out val))
continue;
kv.Key.SetValue(self, val);
if (fli.Loader != null)
val = fli.Loader(my);
else
{
if (md == null)
md = my.ToDictionary();
if (!TryGetValueFromYaml(fli.YamlName, fli.Field, md, out val))
continue;
}
fli.Field.SetValue(self, val);
}
}
static bool TryGetValueFromYaml(FieldInfo field, MiniYaml yaml, out object ret)
static bool TryGetValueFromYaml(string yamlName, FieldInfo field, Dictionary<string, MiniYaml> md, out object ret)
{
ret = null;
var n = yaml.Nodes.Where(x => x.Key == field.Name).ToList();
if (n.Count == 0)
MiniYaml yaml;
if (!md.TryGetValue(yamlName, out yaml))
return false;
if (n.Count == 1 && n[0].Value.Nodes.Count == 0)
if (yaml.Nodes.Count == 0)
{
ret = GetValue(field.Name, field.FieldType, n[0].Value.Value, field);
ret = GetValue(field.Name, field.FieldType, yaml.Value, field);
return true;
}
else if (n.Count > 1)
{
throw new InvalidOperationException("The field {0} has multiple definitions:\n{1}"
.F(field.Name, n.Select(m => "\t- " + m.Location).JoinWith("\n")));
}
throw new InvalidOperationException("TryGetValueFromYaml: unable to load field {0} (of type {1})".F(field.Name, field.FieldType));
throw new InvalidOperationException("TryGetValueFromYaml: unable to load field {0} (of type {1})".F(yamlName, field.FieldType));
}
public static T Load<T>(MiniYaml y) where T : new()
@@ -76,27 +83,31 @@ namespace OpenRA
}
static readonly object[] NoIndexes = { };
public static void LoadField(object self, string key, string value)
public static void LoadField(object target, string key, string value)
{
var field = self.GetType().GetField(key.Trim());
const BindingFlags Flags = BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.Instance;
key = key.Trim();
var field = target.GetType().GetField(key, Flags);
if (field != null)
{
if (!field.HasAttribute<FieldFromYamlKeyAttribute>())
field.SetValue(self, GetValue(field.Name, field.FieldType, value, field));
var sa = field.GetCustomAttributes<SerializeAttribute>(false).DefaultIfEmpty(SerializeAttribute.Default).First();
if (!sa.FromYamlKey)
field.SetValue(target, GetValue(field.Name, field.FieldType, value, field));
return;
}
var prop = self.GetType().GetProperty(key.Trim());
var prop = target.GetType().GetProperty(key, Flags);
if (prop != null)
{
if (!prop.HasAttribute<FieldFromYamlKeyAttribute>())
prop.SetValue(self, GetValue(prop.Name, prop.PropertyType, value, prop), NoIndexes);
var sa = prop.GetCustomAttributes<SerializeAttribute>(false).DefaultIfEmpty(SerializeAttribute.Default).First();
if (!sa.FromYamlKey)
prop.SetValue(target, GetValue(prop.Name, prop.PropertyType, value, prop), NoIndexes);
return;
}
UnknownFieldAction(key.Trim(), self.GetType());
UnknownFieldAction(key, target.GetType());
}
public static T GetValue<T>(string field, string value)
@@ -120,7 +131,6 @@ namespace OpenRA
return res;
return InvalidValueAction(value, fieldType, fieldName);
}
else if (fieldType == typeof(ushort))
{
ushort res;
@@ -136,7 +146,6 @@ namespace OpenRA
return res;
return InvalidValueAction(value, fieldType, fieldName);
}
else if (fieldType == typeof(float))
{
float res;
@@ -144,22 +153,19 @@ namespace OpenRA
return res * (value.Contains('%') ? 0.01f : 1f);
return InvalidValueAction(value, fieldType, fieldName);
}
else if (fieldType == typeof(decimal))
{
decimal res;
if (decimal.TryParse(value.Replace("%", ""), NumberStyles.Float, NumberFormatInfo.InvariantInfo, out res))
if (decimal.TryParse(value.Replace("%", ""), NumberStyles.Float, NumberFormatInfo.InvariantInfo, out res))
return res * (value.Contains('%') ? 0.01m : 1m);
return InvalidValueAction(value, fieldType, fieldName);
}
else if (fieldType == typeof(string))
{
if (field != null && field.HasAttribute<TranslateAttribute>())
return Regex.Replace(value, "@[^@]+@", m => Translate(m.Value.Substring(1, m.Value.Length - 2)), RegexOptions.Compiled);
return value;
}
else if (fieldType == typeof(Color))
{
var parts = value.Split(',');
@@ -176,7 +182,26 @@ namespace OpenRA
Exts.ParseIntegerInvariant(parts[3]).Clamp(0, 255));
return InvalidValueAction(value, fieldType, fieldName);
}
else if (fieldType == typeof(Color[]))
{
var parts = value.Split(',');
if (parts.Length % 4 != 0)
return InvalidValueAction(value, fieldType, fieldName);
var colors = new Color[parts.Length / 4];
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));
}
return colors;
}
else if (fieldType == typeof(HSLColor))
{
var parts = value.Split(',');
@@ -190,7 +215,6 @@ namespace OpenRA
return InvalidValueAction(value, fieldType, fieldName);
}
else if (fieldType == typeof(Hotkey))
{
Hotkey res;
@@ -199,7 +223,6 @@ namespace OpenRA
return InvalidValueAction(value, fieldType, fieldName);
}
else if (fieldType == typeof(WRange))
{
WRange res;
@@ -208,7 +231,6 @@ namespace OpenRA
return InvalidValueAction(value, fieldType, fieldName);
}
else if (fieldType == typeof(WVec))
{
var parts = value.Split(',');
@@ -221,7 +243,26 @@ namespace OpenRA
return InvalidValueAction(value, fieldType, fieldName);
}
else if (fieldType == typeof(WVec[]))
{
var parts = value.Split(',');
if (parts.Length % 3 != 0)
return InvalidValueAction(value, fieldType, fieldName);
var vecs = new WVec[parts.Length / 3];
for (var i = 0; i < vecs.Length; ++i)
{
WRange rx, ry, rz;
if (WRange.TryParse(parts[3 * i], out rx)
&& WRange.TryParse(parts[3 * i + 1], out ry)
&& WRange.TryParse(parts[3 * i + 2], out rz))
vecs[i] = new WVec(rx, ry, rz);
}
return vecs;
}
else if (fieldType == typeof(WPos))
{
var parts = value.Split(',');
@@ -234,7 +275,6 @@ namespace OpenRA
return InvalidValueAction(value, fieldType, fieldName);
}
else if (fieldType == typeof(WAngle))
{
int res;
@@ -242,7 +282,6 @@ namespace OpenRA
return new WAngle(res);
return InvalidValueAction(value, fieldType, fieldName);
}
else if (fieldType == typeof(WRot))
{
var parts = value.Split(',');
@@ -252,12 +291,11 @@ namespace OpenRA
if (Exts.TryParseIntegerInvariant(value, out rr)
&& Exts.TryParseIntegerInvariant(value, out rp)
&& Exts.TryParseIntegerInvariant(value, out ry))
return new WRot(new WAngle(rr), new WAngle(rp), new WAngle(ry));
return new WRot(new WAngle(rr), new WAngle(rp), new WAngle(ry));
}
return InvalidValueAction(value, fieldType, fieldName);
}
else if (fieldType == typeof(CPos))
{
var parts = value.Split(new char[] { ',' }, StringSplitOptions.RemoveEmptyEntries);
@@ -265,7 +303,6 @@ namespace OpenRA
Exts.ParseIntegerInvariant(parts[0]),
Exts.ParseIntegerInvariant(parts[1]));
}
else if (fieldType == typeof(CVec))
{
var parts = value.Split(new char[] { ',' }, StringSplitOptions.RemoveEmptyEntries);
@@ -273,7 +310,6 @@ namespace OpenRA
Exts.ParseIntegerInvariant(parts[0]),
Exts.ParseIntegerInvariant(parts[1]));
}
else if (fieldType.IsEnum)
{
try
@@ -285,10 +321,8 @@ namespace OpenRA
return InvalidValueAction(value, fieldType, fieldName);
}
}
else if (fieldType == typeof(bool))
return ParseYesNo(value, fieldType, fieldName);
else if (fieldType.IsArray)
{
if (value == null)
@@ -297,11 +331,10 @@ namespace OpenRA
var parts = value.Split(new char[] { ',' }, StringSplitOptions.RemoveEmptyEntries);
var ret = Array.CreateInstance(fieldType.GetElementType(), parts.Length);
for (int i = 0; i < parts.Length; i++)
for (var i = 0; i < parts.Length; i++)
ret.SetValue(GetValue(fieldName, fieldType.GetElementType(), parts[i].Trim(), field), i);
return ret;
}
else if (fieldType == typeof(Size))
{
var parts = value.Split(new char[] { ',' }, StringSplitOptions.RemoveEmptyEntries);
@@ -309,7 +342,6 @@ namespace OpenRA
Exts.ParseIntegerInvariant(parts[0]),
Exts.ParseIntegerInvariant(parts[1]));
}
else if (fieldType == typeof(int2))
{
var parts = value.Split(new char[] { ',' }, StringSplitOptions.RemoveEmptyEntries);
@@ -317,7 +349,6 @@ namespace OpenRA
Exts.ParseIntegerInvariant(parts[0]),
Exts.ParseIntegerInvariant(parts[1]));
}
else if (fieldType == typeof(float2))
{
var parts = value.Split(new char[] { ',' }, StringSplitOptions.RemoveEmptyEntries);
@@ -330,7 +361,6 @@ namespace OpenRA
yy = res * (parts[1].Contains('%') ? 0.01f : 1f);
return new float2(xx, yy);
}
else if (fieldType == typeof(Rectangle))
{
var parts = value.Split(new char[] { ',' }, StringSplitOptions.RemoveEmptyEntries);
@@ -340,7 +370,6 @@ namespace OpenRA
Exts.ParseIntegerInvariant(parts[2]),
Exts.ParseIntegerInvariant(parts[3]));
}
else if (fieldType.IsGenericType && fieldType.GetGenericTypeDefinition() == typeof(Bits<>))
{
var parts = value.Split(new char[] { ',' }, StringSplitOptions.RemoveEmptyEntries);
@@ -348,14 +377,12 @@ namespace OpenRA
var argValues = new object[] { parts };
return fieldType.GetConstructor(argTypes).Invoke(argValues);
}
else if (fieldType.IsGenericType && fieldType.GetGenericTypeDefinition() == typeof(Nullable<>))
{
var innerType = fieldType.GetGenericArguments().First();
var innerValue = GetValue("Nullable<T>", innerType, value, field);
return fieldType.GetConstructor(new[] { innerType }).Invoke(new[] { innerValue });
}
else if (fieldType == typeof(DateTime))
{
DateTime dt;
@@ -363,6 +390,21 @@ namespace OpenRA
return dt;
return InvalidValueAction(value, fieldType, fieldName);
}
else
{
var conv = TypeDescriptor.GetConverter(fieldType);
if (conv.CanConvertFrom(typeof(string)))
{
try
{
return conv.ConvertFromInvariantString(value);
}
catch
{
return InvalidValueAction(value, fieldType, fieldName);
}
}
}
UnknownFieldAction("[Type] {0}".F(value), fieldType);
return null;
@@ -378,49 +420,101 @@ namespace OpenRA
return InvalidValueAction(p, fieldType, field);
}
static Cache<Type, Dictionary<FieldInfo, Func<string, Type, MiniYaml, object>>> typeLoadInfo = new Cache<Type, Dictionary<FieldInfo, Func<string, Type, MiniYaml, object>>>(GetTypeLoadInfo);
static Dictionary<FieldInfo, Func<string, Type, MiniYaml, object>> GetTypeLoadInfo(Type type)
public sealed class FieldLoadInfo
{
var ret = new Dictionary<FieldInfo, Func<string, Type, MiniYaml, object>>();
public readonly FieldInfo Field;
public readonly SerializeAttribute Attribute;
public readonly string YamlName;
public readonly Func<MiniYaml, object> Loader;
foreach (var ff in type.GetFields())
internal FieldLoadInfo(FieldInfo field, SerializeAttribute attr, string yamlName, Func<MiniYaml, object> loader = null)
{
Field = field;
Attribute = attr;
YamlName = yamlName;
Loader = loader;
}
}
public static IEnumerable<FieldLoadInfo> GetTypeLoadInfo(Type type, bool includePrivateByDefault = false)
{
return typeLoadInfo[type].Where(fli => includePrivateByDefault || fli.Field.IsPublic || (fli.Attribute.Serialize && !fli.Attribute.IsDefault));
}
static Cache<Type, List<FieldLoadInfo>> typeLoadInfo = new Cache<Type, List<FieldLoadInfo>>(BuildTypeLoadInfo);
static List<FieldLoadInfo> BuildTypeLoadInfo(Type type)
{
var ret = new List<FieldLoadInfo>();
foreach (var ff in type.GetFields(BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.Instance))
{
var field = ff;
var ignore = field.GetCustomAttributes<IgnoreAttribute>(false);
var loadUsing = field.GetCustomAttributes<LoadUsingAttribute>(false);
var fromYamlKey = field.GetCustomAttributes<FieldFromYamlKeyAttribute>(false);
if (loadUsing.Length != 0)
ret[field] = (_1, fieldType, yaml) => loadUsing[0].LoaderFunc(field)(yaml);
else if (fromYamlKey.Length != 0)
ret[field] = (f, ft, yaml) => GetValue(f, ft, yaml.Value, field);
else if (ignore.Length == 0)
ret[field] = null;
var sa = field.GetCustomAttributes<SerializeAttribute>(false).DefaultIfEmpty(SerializeAttribute.Default).First();
if (!sa.Serialize)
continue;
var yamlName = string.IsNullOrEmpty(sa.YamlName) ? field.Name : sa.YamlName;
var loader = sa.GetLoader(type);
if (loader == null && sa.FromYamlKey)
loader = (yaml) => GetValue(yamlName, field.FieldType, yaml.Value, field);
var fli = new FieldLoadInfo(field, sa, yamlName, loader);
ret.Add(fli);
}
return ret;
}
[AttributeUsage(AttributeTargets.Field)]
public sealed class IgnoreAttribute : Attribute { }
public sealed class IgnoreAttribute : SerializeAttribute
{
public IgnoreAttribute()
: base(false) { }
}
[AttributeUsage(AttributeTargets.Field)]
public sealed class LoadUsingAttribute : Attribute
public sealed class LoadUsingAttribute : SerializeAttribute
{
Func<MiniYaml, object> loaderFuncCache;
public readonly string Loader;
public LoadUsingAttribute(string loader)
{
Loader = loader;
}
}
internal Func<MiniYaml, object> LoaderFunc(FieldInfo field)
[AttributeUsage(AttributeTargets.Field)]
public class SerializeAttribute : Attribute
{
public static readonly SerializeAttribute Default = new SerializeAttribute(true);
public bool IsDefault { get { return this == Default; } }
public readonly bool Serialize;
public string YamlName;
public string Loader;
public bool FromYamlKey;
public SerializeAttribute(bool serialize = true)
{
const BindingFlags BindingFlag = BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.Static;
if (loaderFuncCache == null)
loaderFuncCache = (Func<MiniYaml, object>)Delegate.CreateDelegate(typeof(Func<MiniYaml, object>), field.DeclaringType.GetMethod(Loader, BindingFlag));
return loaderFuncCache;
Serialize = serialize;
}
internal Func<MiniYaml, object> GetLoader(Type type)
{
const BindingFlags Flags = BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.Static | BindingFlags.FlattenHierarchy;
if (!string.IsNullOrEmpty(Loader))
{
var method = type.GetMethod(Loader, Flags);
if (method == null)
throw new InvalidOperationException("{0} does not specify a loader function '{1}'".F(type.Name, Loader));
return (Func<MiniYaml, object>)Delegate.CreateDelegate(typeof(Func<MiniYaml, object>), method);
}
return null;
}
}
@@ -442,7 +536,14 @@ namespace OpenRA
[AttributeUsage(AttributeTargets.Field | AttributeTargets.Property)]
public sealed class TranslateAttribute : Attribute { }
public sealed class FieldFromYamlKeyAttribute : Attribute { }
[AttributeUsage(AttributeTargets.Field)]
public sealed class FieldFromYamlKeyAttribute : FieldLoader.SerializeAttribute
{
public FieldFromYamlKeyAttribute()
{
FromYamlKey = true;
}
}
// mirrors DescriptionAttribute from System.ComponentModel but we dont want to have to use that everywhere.
public sealed class DescAttribute : Attribute

View File

@@ -1,6 +1,6 @@
#region Copyright & License Information
#region Copyright & License Information
/*
* Copyright 2007-2013 The OpenRA Developers (see AUTHORS)
* 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,
@@ -10,6 +10,7 @@
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Globalization;
using System.Linq;
@@ -19,31 +20,33 @@ namespace OpenRA
{
public static class FieldSaver
{
public static MiniYaml Save(object o)
public static MiniYaml Save(object o, bool includePrivateByDefault = false)
{
var nodes = new List<MiniYamlNode>();
string root = null;
foreach (var f in o.GetType().GetFields(BindingFlags.Public | BindingFlags.Instance))
foreach (var info in FieldLoader.GetTypeLoadInfo(o.GetType(), includePrivateByDefault))
{
if (f.HasAttribute<FieldFromYamlKeyAttribute>())
root = FormatValue(o, f);
if (info.Attribute.FromYamlKey)
root = FormatValue(o, info.Field);
else
nodes.Add(new MiniYamlNode(f.Name, FormatValue(o, f)));
nodes.Add(new MiniYamlNode(info.YamlName, FormatValue(o, info.Field)));
}
return new MiniYaml(root, nodes);
}
public static MiniYaml SaveDifferences(object o, object from)
public static MiniYaml SaveDifferences(object o, object from, bool includePrivateByDefault = false)
{
if (o.GetType() != from.GetType())
throw new InvalidOperationException("FieldLoader: can't diff objects of different types");
var fields = o.GetType().GetFields(BindingFlags.Public | BindingFlags.Instance)
.Where(f => FormatValue(o, f) != FormatValue(from, f));
var fields = FieldLoader.GetTypeLoadInfo(o.GetType(), includePrivateByDefault)
.Where(info => FormatValue(o, info.Field) != FormatValue(from, info.Field));
return new MiniYaml(null, fields.Select(f => new MiniYamlNode(f.Name, FormatValue(o, f))).ToList());
return new MiniYaml(
null,
fields.Select(info => new MiniYamlNode(info.YamlName, FormatValue(o, info.Field))).ToList());
}
public static MiniYamlNode SaveField(object o, string field)
@@ -66,9 +69,13 @@ namespace OpenRA
((int)c.B).Clamp(0, 255));
}
// Don't save floats in settings.yaml using country-specific decimal separators which can be misunderstood as group seperators.
// Don't save using country-specific decimal separators which can be misunderstood as group seperators.
if (t == typeof(float))
return ((float)v).ToString(CultureInfo.InvariantCulture);
if (t == typeof(decimal))
return ((decimal)v).ToString(CultureInfo.InvariantCulture);
if (t == typeof(double))
return ((double)v).ToString(CultureInfo.InvariantCulture);
if (t == typeof(Rectangle))
{
@@ -79,12 +86,28 @@ namespace OpenRA
if (t.IsArray)
{
var elems = ((Array)v).OfType<object>();
return elems.JoinWith(",");
return elems.JoinWith(", ");
}
if (t.IsGenericType && t.GetGenericTypeDefinition() == typeof(OpenRA.Primitives.Cache<,>))
return ""; // TODO
if (t == typeof(DateTime))
return ((DateTime)v).ToString("yyyy-MM-dd HH-mm-ss", CultureInfo.InvariantCulture);
// Try the TypeConverter
var conv = TypeDescriptor.GetConverter(t);
if (conv.CanConvertTo(typeof(string)))
{
try
{
return conv.ConvertToInvariantString(v);
}
catch
{
}
}
return v.ToString();
}

View File

@@ -1,6 +1,6 @@
#region Copyright & License Information
/*
* Copyright 2007-2011 The OpenRA Developers (see AUTHORS)
* 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,
@@ -36,7 +36,7 @@ namespace OpenRA.FileFormats
Chunk c;
c.CompressedSize = s.ReadUInt16();
c.OutputSize = s.ReadUInt16();
if (0xdeaf != s.ReadUInt32())
if (s.ReadUInt32() != 0xdeaf)
throw new InvalidDataException("Chunk header is bogus");
return c;
}
@@ -45,17 +45,19 @@ namespace OpenRA.FileFormats
public static class AudLoader
{
static int[] indexAdjust = { -1, -1, -1, -1, 2, 4, 6, 8 };
static int[] stepTable = {
7, 8, 9, 10, 11, 12, 13, 14, 16,
17, 19, 21, 23, 25, 28, 31, 34, 37,
41, 45, 50, 55, 60, 66, 73, 80, 88,
97, 107, 118, 130, 143, 157, 173, 190, 209,
230, 253, 279, 307, 337, 371, 408, 449, 494,
544, 598, 658, 724, 796, 876, 963, 1060, 1166,
1282, 1411, 1552, 1707, 1878, 2066, 2272, 2499, 2749,
3024, 3327, 3660, 4026, 4428, 4871, 5358, 5894, 6484,
7132, 7845, 8630, 9493, 10442, 11487, 12635, 13899, 15289,
16818, 18500, 20350, 22385, 24623, 27086, 29794, 32767 };
static int[] stepTable =
{
7, 8, 9, 10, 11, 12, 13, 14, 16,
17, 19, 21, 23, 25, 28, 31, 34, 37,
41, 45, 50, 55, 60, 66, 73, 80, 88,
97, 107, 118, 130, 143, 157, 173, 190, 209,
230, 253, 279, 307, 337, 371, 408, 449, 494,
544, 598, 658, 724, 796, 876, 963, 1060, 1166,
1282, 1411, 1552, 1707, 1878, 2066, 2272, 2499, 2749,
3024, 3327, 3660, 4026, 4428, 4871, 5358, 5894, 6484,
7132, 7845, 8630, 9493, 10442, 11487, 12635, 13899, 15289,
16818, 18500, 20350, 22385, 24623, 27086, 29794, 32767
};
static short DecodeSample(byte b, ref int index, ref int current)
{
@@ -131,7 +133,7 @@ namespace OpenRA.FileFormats
while (dataSize > 0)
{
var chunk = Chunk.Read(s);
for (int n = 0; n < chunk.CompressedSize; n++)
for (var n = 0; n < chunk.CompressedSize; n++)
{
var b = s.ReadUInt8();

View File

@@ -1,6 +1,6 @@
#region Copyright & License Information
/*
* Copyright 2007-2011 The OpenRA Developers (see AUTHORS)
* 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,
@@ -66,7 +66,7 @@ namespace OpenRA.FileFormats
if (coded < 0 || coded > 1)
throw new NotImplementedException("Invalid datastream");
var EncodedLiterals = coded == 1;
var encodedLiterals = coded == 1;
// log2(dictionary size) - 6
var dict = br.ReadBits(8);
@@ -92,7 +92,7 @@ namespace OpenRA.FileFormats
// Magic number for "done"
if (len == 519)
{
for (int i = 0; i < next; i++)
for (var i = 0; i < next; i++)
ms.WriteByte(outBuffer[i]);
break;
}
@@ -135,21 +135,21 @@ namespace OpenRA.FileFormats
// Flush window to outstream
if (next == MAXWIN)
{
for (int i = 0; i < next; i++)
for (var i = 0; i < next; i++)
ms.WriteByte(outBuffer[i]);
next = 0;
first = false;
}
} while (len != 0);
}
// literal value
else
{
var symbol = EncodedLiterals ? Decode(litcode, br) : br.ReadBits(8);
// literal value
var symbol = encodedLiterals ? Decode(litcode, br) : br.ReadBits(8);
outBuffer[next++] = (byte)symbol;
if (next == MAXWIN)
{
for (int i = 0; i < next; i++)
for (var i = 0; i < next; i++)
ms.WriteByte(outBuffer[i]);
next = 0;
first = false;
@@ -236,21 +236,20 @@ namespace OpenRA.FileFormats
var s = 0; // current symbol
// convert compact repeat counts into symbol bit length list
foreach (byte code in rep)
foreach (var code in rep)
{
var num = (code >> 4) + 1; // Number of codes (top four bits plus 1)
var len = (byte)(code & 15); // Code length (low four bits)
do
{
length[s++] = len;
} while (--num > 0);
while (--num > 0);
}
n = s;
// count number of codes of each length
Count = new short[Blast.MAXBITS + 1];
for (int i = 0; i < n; i++)
for (var i = 0; i < n; i++)
Count[length[i]]++;
// no codes!
@@ -259,7 +258,7 @@ namespace OpenRA.FileFormats
// check for an over-subscribed or incomplete set of lengths
var left = 1; // one possible code of zero length
for (int len = 1; len <= Blast.MAXBITS; len++)
for (var len = 1; len <= Blast.MAXBITS; len++)
{
left <<= 1; // one more bit, double codes left
left -= Count[len]; // deduct count from possible codes
@@ -269,7 +268,7 @@ namespace OpenRA.FileFormats
// generate offsets into symbol table for each length for sorting
var offs = new short[Blast.MAXBITS + 1];
for (int len = 1; len < Blast.MAXBITS; len++)
for (var len = 1; len < Blast.MAXBITS; len++)
offs[len + 1] = (short)(offs[len] + Count[len]);
// put symbols in table sorted by length, by symbol order within each length

View File

@@ -1,6 +1,6 @@
#region Copyright & License Information
/*
* Copyright 2007-2011 The OpenRA Developers (see AUTHORS)
* 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,
@@ -21,42 +21,42 @@ namespace OpenRA.FileFormats
uint c = key[j++ % key.Length];
uint d = key[j++ % key.Length];
m_p[i] ^= a << 24 | b << 16 | c << 8 | d;
lookupMfromP[i] ^= a << 24 | b << 16 | c << 8 | d;
}
uint l = 0, r = 0;
for (int i = 0; i < 18; )
for (var i = 0; i < 18;)
{
Encrypt(ref l, ref r);
m_p[i++] = l;
m_p[i++] = r;
lookupMfromP[i++] = l;
lookupMfromP[i++] = r;
}
for (int i = 0; i < 4; ++i)
for (int j = 0; j < 256; )
for (var i = 0; i < 4; ++i)
for (var j = 0; j < 256;)
{
Encrypt(ref l, ref r);
m_s[i, j++] = l;
m_s[i, j++] = r;
lookupMfromS[i, j++] = l;
lookupMfromS[i, j++] = r;
}
}
public uint[] Encrypt(uint[] data) { return RunCipher(data, Encrypt); }
public uint[] Decrypt(uint[] data) { return RunCipher(data, Decrypt); }
delegate void CipherFunc( ref uint a, ref uint b );
delegate void CipherFunc(ref uint a, ref uint b);
static uint[] RunCipher(uint[] data, CipherFunc f)
{
uint[] result = new uint[data.Length];
var result = new uint[data.Length];
int size = data.Length / 2;
int i = 0;
var size = data.Length / 2;
var i = 0;
while (size-- > 0)
{
uint a = SwapBytes(data[i]);
uint b = SwapBytes(data[i+1]);
var a = SwapBytes(data[i]);
var b = SwapBytes(data[i + 1]);
f(ref a, ref b);
@@ -69,55 +69,57 @@ namespace OpenRA.FileFormats
void Encrypt(ref uint a, ref uint b)
{
uint _a = a, _b = b;
_a ^= m_p[0];
uint tempA = a, tempB = b;
tempA ^= lookupMfromP[0];
bool x = false;
for( int i = 1; i <= 16; i++, x ^= true)
var x = false;
for (var i = 1; i <= 16; i++, x ^= true)
{
if (x)
Round(ref _a, _b, i);
Round(ref tempA, tempB, i);
else
Round(ref _b, _a, i);
Round(ref tempB, tempA, i);
}
_b ^= m_p[17];
a = _b;
b = _a;
tempB ^= lookupMfromP[17];
a = tempB;
b = tempA;
}
void Decrypt(ref uint a, ref uint b)
{
uint _a = a, _b = b;
_a ^= m_p[17];
uint tempA = a, tempB = b;
tempA ^= lookupMfromP[17];
bool x = false;
for (int i = 16; i >= 1; i--, x ^= true)
var x = false;
for (var i = 16; i >= 1; i--, x ^= true)
{
if (x)
Round(ref _a, _b, i);
Round(ref tempA, tempB, i);
else
Round(ref _b, _a, i);
Round(ref tempB, tempA, i);
}
_b ^= m_p[0];
a = _b;
b = _a;
tempB ^= lookupMfromP[0];
a = tempB;
b = tempA;
}
uint S(uint x, int i)
{
return m_s[i, (x >> ((3 - i) << 3)) & 0xff];
return lookupMfromS[i, (x >> ((3 - i) << 3)) & 0xff];
}
uint bf_f(uint x)
uint ConvertBFtoF(uint x)
{
return ((S(x, 0) + S(x, 1)) ^ S(x, 2)) + S(x, 3);
}
void Round(ref uint a, uint b, int n)
{
a ^= bf_f(b) ^ m_p[n];
a ^= ConvertBFtoF(b) ^ lookupMfromP[n];
}
static uint SwapBytes(uint i)
@@ -127,7 +129,7 @@ namespace OpenRA.FileFormats
return i;
}
uint[] m_p = new uint[] {
uint[] lookupMfromP = new uint[] {
0x243f6a88, 0x85a308d3, 0x13198a2e, 0x03707344,
0xa4093822, 0x299f31d0, 0x082efa98, 0xec4e6c89,
0x452821e6, 0x38d01377, 0xbe5466cf, 0x34e90c6c,
@@ -135,7 +137,7 @@ namespace OpenRA.FileFormats
0x9216d5d9, 0x8979fb1b
};
uint[,] m_s = new uint[,] {
uint[,] lookupMfromS = new uint[,] {
{
0xd1310ba6, 0x98dfb5ac, 0x2ffd72db, 0xd01adfb7,
0xb8e1afed, 0x6a267e96, 0xba7c9045, 0xf12c7f99,
@@ -400,7 +402,6 @@ namespace OpenRA.FileFormats
0x90d4f869, 0xa65cdea0, 0x3f09252d, 0xc208e69f,
0xb74e6132, 0xce77e25b, 0x578fdfe3, 0x3ac372e6
}
};
}
}

View File

@@ -1,6 +1,6 @@
#region Copyright & License Information
#region Copyright & License Information
/*
* Copyright 2007-2011 The OpenRA Developers (see AUTHORS)
* 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,
@@ -13,35 +13,36 @@ using System.Linq;
namespace OpenRA.FileFormats
{
/* possibly the fugliest C# i've ever seen. */
/* TODO: Convert this direct C port into readable code. */
class BlowfishKeyProvider
{
const string pubkeyStr = "AihRvNoIbTn85FZRYNZRcT+i6KpU+maCsEqr3Q5q+LDB5tH7Tz2qQ38V";
const string PublicKeyString = "AihRvNoIbTn85FZRYNZRcT+i6KpU+maCsEqr3Q5q+LDB5tH7Tz2qQ38V";
class PublicKey
{
public uint[] key1 = new uint[64];
public uint[] key2 = new uint[64];
public uint len;
public uint[] KeyOne = new uint[64];
public uint[] KeyTwo = new uint[64];
public uint Len;
}
PublicKey pubkey = new PublicKey();
uint[] glob1 = new uint[64];
uint glob1_bitlen, glob1_len_x2;
uint[] glob2 = new uint[130];
uint[] glob1_hi = new uint[4];
uint[] glob1_hi_inv = new uint[4];
uint glob1_hi_bitlen;
uint glob1_hi_inv_lo, glob1_hi_inv_hi;
uint[] globOne = new uint[64];
uint globOneBitLen, globOneLenXTwo;
uint[] globTwo = new uint[130];
uint[] globOneHigh = new uint[4];
uint[] globOneHighInv = new uint[4];
uint globOneHighBitLen;
uint globOneHighInvLow, globOneHighInvHigh;
static void init_bignum(uint[] n, uint val, uint len)
static void InitBigNum(uint[] n, uint val, uint len)
{
for (int i = 0; i < len; i++) n[i] = 0;
for (var i = 0; i < len; i++) n[i] = 0;
n[0] = val;
}
static void move_key_to_big(uint[] n, byte[] key, uint klen, uint blen)
static void MoveKeyToBig(uint[] n, byte[] key, uint klen, uint blen)
{
byte sign;
@@ -50,22 +51,22 @@ namespace OpenRA.FileFormats
unsafe
{
fixed (uint* _pn = &n[0])
fixed (uint* tempPn = &n[0])
{
byte* pn = (byte*)_pn;
uint i = blen * 4;
var pn = (byte*)tempPn;
var i = blen * 4;
for (; i > klen; i--) pn[i - 1] = (byte)sign;
for (; i > 0; i--) pn[i - 1] = key[klen - i];
}
}
}
static void key_to_bignum(uint[] n, byte[] key, uint len)
static void KeyToBigNum(uint[] n, byte[] key, uint len)
{
uint keylen;
int i;
int j = 0;
var j = 0;
if (key[j] != 2) return;
j++;
@@ -81,11 +82,12 @@ namespace OpenRA.FileFormats
keylen = key[j];
j++;
}
if (keylen <= len * 4)
move_key_to_big(n, key.Skip(j).ToArray(), keylen, len);
MoveKeyToBig(n, key.Skip(j).ToArray(), keylen, len);
}
static uint len_bignum(uint[] n, uint len)
static uint LenBigNum(uint[] n, uint len)
{
uint i;
i = len - 1;
@@ -93,10 +95,10 @@ namespace OpenRA.FileFormats
return i + 1;
}
static uint bitlen_bignum(uint[] n, uint len)
static uint BitLenBigNum(uint[] n, uint len)
{
uint ddlen, bitlen, mask;
ddlen = len_bignum(n, len);
ddlen = LenBigNum(n, len);
if (ddlen == 0) return 0;
bitlen = ddlen * 32;
mask = 0x80000000;
@@ -105,43 +107,44 @@ namespace OpenRA.FileFormats
mask >>= 1;
bitlen--;
}
return bitlen;
}
void init_pubkey()
void InitPublicKey()
{
init_bignum(pubkey.key2, 0x10001, 64);
InitBigNum(pubkey.KeyTwo, 0x10001, 64);
key_to_bignum(pubkey.key1, Convert.FromBase64String(pubkeyStr), 64);
pubkey.len = bitlen_bignum(pubkey.key1, 64) - 1;
KeyToBigNum(pubkey.KeyOne, Convert.FromBase64String(PublicKeyString), 64);
pubkey.Len = BitLenBigNum(pubkey.KeyOne, 64) - 1;
}
uint len_predata()
uint LenPreData()
{
uint a = (pubkey.len - 1) / 8;
var a = (pubkey.Len - 1) / 8;
return (55 / a + 1) * (a + 1);
}
static int cmp_bignum(uint[] n1, uint[] n2, uint len)
static int CompareBigNum(uint[] n1, uint[] n2, uint len)
{
while (len > 0)
{
--len;
if (n1[len] < n2[len]) return -1;
if (n1[len] > n2[len]) return 1;
}
return 0;
}
static void mov_bignum(uint[] dest, uint[] src, uint len)
static void MoveBigNum(uint[] dest, uint[] src, uint len)
{
Array.Copy(src, dest, len);
}
static void shr_bignum(uint[] n, int bits, int len)
static void ShrBigNum(uint[] n, int bits, int len)
{
int i; int i2 = bits / 32;
int i; var i2 = bits / 32;
if (i2 > 0)
{
@@ -149,13 +152,13 @@ namespace OpenRA.FileFormats
for (; i < len; i++) n[i] = 0;
bits = bits % 32;
}
if (bits == 0) return;
for (i = 0; i < len - 1; i++) n[i] = (n[i] >> bits) | (n[i + 1] << (32 -
bits));
for (i = 0; i < len - 1; i++) n[i] = (n[i] >> bits) | (n[i + 1] << (32 - bits));
n[i] = n[i] >> bits;
}
static void shl_bignum(uint[] n, int bits, int len)
static void ShlBigNum(uint[] n, int bits, int len)
{
int i, i2;
@@ -166,26 +169,26 @@ namespace OpenRA.FileFormats
for (; i > 0; i--) n[i] = 0;
bits = bits % 32;
}
if (bits == 0) return;
for (i = len - 1; i > 0; i--) n[i] = (n[i] << bits) | (n[i - 1] >> (32 -
bits));
for (i = len - 1; i > 0; i--) n[i] = (n[i] << bits) | (n[i - 1] >> (32 - bits));
n[0] <<= bits;
}
static uint sub_bignum(uint[] dest, uint[] src1, uint[] src2, uint carry, int len)
static uint SubBigNum(uint[] dest, uint[] src1, uint[] src2, uint carry, int len)
{
uint i1, i2;
len += len;
unsafe
{
fixed (uint* _ps1 = &src1[0])
fixed (uint* _ps2 = &src2[0])
fixed (uint* _pd = &dest[0])
fixed (uint* tempPs1 = &src1[0])
fixed (uint* tempPs2 = &src2[0])
fixed (uint* tempPd = &dest[0])
{
ushort* ps1 = (ushort*)_ps1;
ushort* ps2 = (ushort*)_ps2;
ushort* pd = (ushort*)_pd;
var ps1 = (ushort*)tempPs1;
var ps2 = (ushort*)tempPs2;
var pd = (ushort*)tempPd;
while (--len != -1)
{
@@ -196,18 +199,19 @@ namespace OpenRA.FileFormats
}
}
}
return carry;
}
static unsafe uint sub_bignum(uint* dest, uint* src1, uint* src2, uint carry, int len)
static unsafe uint SubBigNum(uint* dest, uint* src1, uint* src2, uint carry, int len)
{
uint i1, i2;
len += len;
ushort* ps1 = (ushort*)src1;
ushort* ps2 = (ushort*)src2;
ushort* pd = (ushort*)dest;
var ps1 = (ushort*)src1;
var ps2 = (ushort*)src2;
var pd = (ushort*)dest;
while (--len != -1)
{
@@ -215,36 +219,37 @@ namespace OpenRA.FileFormats
i2 = *ps2++;
*pd++ = (ushort)(i1 - i2 - carry);
if (((i1 - i2 - carry) & 0x10000) != 0) carry = 1; else carry = 0;
}
return carry;
}
static void inv_bignum(uint[] n1, uint[] n2, uint len)
static void InvertBigNum(uint[] n1, uint[] n2, uint len)
{
uint[] n_tmp = new uint[64];
uint n2_bytelen, bit;
int n2_bitlen;
var nTmp = new uint[64];
uint nTwoByteLen, bit;
int nTwoBitLen;
int j = 0;
var j = 0;
init_bignum(n_tmp, 0, len);
init_bignum(n1, 0, len);
n2_bitlen = (int)bitlen_bignum(n2, len);
bit = ((uint)1) << (n2_bitlen % 32);
j = ((n2_bitlen + 32) / 32) - 1;
n2_bytelen = (uint)((n2_bitlen - 1) / 32) * 4;
n_tmp[n2_bytelen / 4] |= ((uint)1) << ((n2_bitlen - 1) & 0x1f);
InitBigNum(nTmp, 0, len);
InitBigNum(n1, 0, len);
nTwoBitLen = (int)BitLenBigNum(n2, len);
bit = ((uint)1) << (nTwoBitLen % 32);
j = ((nTwoBitLen + 32) / 32) - 1;
nTwoByteLen = (uint)((nTwoBitLen - 1) / 32) * 4;
nTmp[nTwoByteLen / 4] |= ((uint)1) << ((nTwoBitLen - 1) & 0x1f);
while (n2_bitlen > 0)
while (nTwoBitLen > 0)
{
n2_bitlen--;
shl_bignum(n_tmp, 1, (int)len);
if (cmp_bignum(n_tmp, n2, len) != -1)
nTwoBitLen--;
ShlBigNum(nTmp, 1, (int)len);
if (CompareBigNum(nTmp, n2, len) != -1)
{
sub_bignum(n_tmp, n_tmp, n2, 0, (int)len);
SubBigNum(nTmp, nTmp, n2, 0, (int)len);
n1[j] |= bit;
}
bit >>= 1;
if (bit == 0)
{
@@ -252,44 +257,46 @@ namespace OpenRA.FileFormats
bit = 0x80000000;
}
}
init_bignum(n_tmp, 0, len);
InitBigNum(nTmp, 0, len);
}
static void inc_bignum(uint[] n, uint len)
static void IncrementBigNum(uint[] n, uint len)
{
int i = 0;
var i = 0;
while ((++n[i] == 0) && (--len > 0)) i++;
}
void init_two_dw(uint[] n, uint len)
void InitTwoDw(uint[] n, uint len)
{
mov_bignum(glob1, n, len);
glob1_bitlen = bitlen_bignum(glob1, len);
glob1_len_x2 = (glob1_bitlen + 15) / 16;
mov_bignum(glob1_hi, glob1.Skip((int)len_bignum(glob1, len) - 2).ToArray(), 2);
glob1_hi_bitlen = bitlen_bignum(glob1_hi, 2) - 32;
shr_bignum(glob1_hi, (int)glob1_hi_bitlen, 2);
inv_bignum(glob1_hi_inv, glob1_hi, 2);
shr_bignum(glob1_hi_inv, 1, 2);
glob1_hi_bitlen = (glob1_hi_bitlen + 15) % 16 + 1;
inc_bignum(glob1_hi_inv, 2);
if (bitlen_bignum(glob1_hi_inv, 2) > 32)
MoveBigNum(globOne, n, len);
globOneBitLen = BitLenBigNum(globOne, len);
globOneLenXTwo = (globOneBitLen + 15) / 16;
MoveBigNum(globOneHigh, globOne.Skip((int)LenBigNum(globOne, len) - 2).ToArray(), 2);
globOneHighBitLen = BitLenBigNum(globOneHigh, 2) - 32;
ShrBigNum(globOneHigh, (int)globOneHighBitLen, 2);
InvertBigNum(globOneHighInv, globOneHigh, 2);
ShrBigNum(globOneHighInv, 1, 2);
globOneHighBitLen = (globOneHighBitLen + 15) % 16 + 1;
IncrementBigNum(globOneHighInv, 2);
if (BitLenBigNum(globOneHighInv, 2) > 32)
{
shr_bignum(glob1_hi_inv, 1, 2);
glob1_hi_bitlen--;
ShrBigNum(globOneHighInv, 1, 2);
globOneHighBitLen--;
}
glob1_hi_inv_lo = (ushort)glob1_hi_inv[0];
glob1_hi_inv_hi = (ushort)(glob1_hi_inv[0] >> 16);
globOneHighInvLow = (ushort)globOneHighInv[0];
globOneHighInvHigh = (ushort)(globOneHighInv[0] >> 16);
}
static unsafe void mul_bignum_word(ushort* pn1, uint[] n2, uint mul, uint len)
static unsafe void MulBignumWord(ushort* pn1, uint[] n2, uint mul, uint len)
{
uint i, tmp;
unsafe
{
fixed (uint* _pn2 = &n2[0])
fixed (uint* tempPn2 = &n2[0])
{
ushort* pn2 = (ushort*)_pn2;
var pn2 = (ushort*)tempPn2;
tmp = 0;
for (i = 0; i < len; i++)
@@ -305,131 +312,134 @@ namespace OpenRA.FileFormats
}
}
static void mul_bignum(uint[] dest, uint[] src1, uint[] src2, uint len)
static void MulBigNum(uint[] dest, uint[] src1, uint[] src2, uint len)
{
uint i;
uint i;
unsafe
{
fixed( uint * _psrc2 = &src2[0] )
fixed(uint* _pdest = &dest[0])
{
ushort* psrc2 = (ushort*)_psrc2;
ushort* pdest = (ushort*)_pdest;
init_bignum(dest, 0, len * 2);
for (i = 0; i < len * 2; i++)
mul_bignum_word(pdest++, src1, *psrc2++, len * 2);
}
}
}
static void not_bignum(uint[] n, uint len)
{
uint i;
for (i = 0; i < len; i++) n[i] = ~n[i];
}
static void neg_bignum(uint[] n, uint len)
{
not_bignum(n, len);
inc_bignum(n, len);
}
unsafe uint get_mulword(uint* n)
{
ushort* wn = (ushort*)n;
uint i = (uint)((((((((((*(wn - 1) ^ 0xffff) & 0xffff) * glob1_hi_inv_lo + 0x10000) >> 1)
+ (((*(wn - 2) ^ 0xffff) * glob1_hi_inv_hi + glob1_hi_inv_hi) >> 1) + 1)
>> 16) + ((((*(wn - 1) ^ 0xffff) & 0xffff) * glob1_hi_inv_hi) >> 1) +
(((*wn ^ 0xffff) * glob1_hi_inv_lo) >> 1) + 1) >> 14) + glob1_hi_inv_hi
* (*wn ^ 0xffff) * 2) >> (int)glob1_hi_bitlen);
if (i > 0xffff) i = 0xffff;
return i & 0xffff;
}
static void dec_bignum(uint[] n, uint len)
{
int i = 0;
while ((--n[i] == 0xffffffff) && (--len > 0))
i++;
}
void calc_a_bignum(uint[] n1, uint[] n2, uint[] n3, uint len)
{
uint g2_len_x2, len_diff;
unsafe
{
fixed( uint* g1 = &glob1[0])
fixed (uint* g2 = &glob2[0])
fixed (uint* tempSrc2 = &src2[0])
fixed (uint* tempPdest = &dest[0])
{
mul_bignum(glob2, n2, n3, len);
glob2[len * 2] = 0;
g2_len_x2 = len_bignum(glob2, len * 2 + 1) * 2;
if (g2_len_x2 >= glob1_len_x2)
{
inc_bignum(glob2, len * 2 + 1);
neg_bignum(glob2, len * 2 + 1);
len_diff = g2_len_x2 + 1 - glob1_len_x2;
ushort* esi = ((ushort*)g2) + (1 + g2_len_x2 - glob1_len_x2);
ushort* edi = ((ushort*)g2) + (g2_len_x2 + 1);
for (; len_diff != 0; len_diff--)
{
edi--;
uint tmp = get_mulword((uint*)edi);
esi--;
if (tmp > 0)
{
mul_bignum_word(esi, glob1, tmp, 2 * len);
if ((*edi & 0x8000) == 0)
{
if (0 != sub_bignum((uint*)esi, (uint*)esi, g1, 0, (int)len)) (*edi)--;
}
}
}
neg_bignum(glob2, len);
dec_bignum(glob2, len);
}
mov_bignum(n1, glob2, len);
var psrc2 = (ushort*)tempSrc2;
var pdest = (ushort*)tempPdest;
InitBigNum(dest, 0, len * 2);
for (i = 0; i < len * 2; i++)
MulBignumWord(pdest++, src1, *psrc2++, len * 2);
}
}
}
void clear_tmp_vars(uint len)
static void NotBigNum(uint[] n, uint len)
{
init_bignum(glob1, 0, len);
init_bignum(glob2, 0, len);
init_bignum(glob1_hi_inv, 0, 4);
init_bignum(glob1_hi, 0, 4);
glob1_bitlen = 0;
glob1_hi_bitlen = 0;
glob1_len_x2 = 0;
glob1_hi_inv_lo = 0;
glob1_hi_inv_hi = 0;
uint i;
for (i = 0; i < len; i++) n[i] = ~n[i];
}
void calc_a_key(uint[] n1, uint[] n2, uint[] n3, uint[] n4, uint len)
static void NegBigNum(uint[] n, uint len)
{
uint[] n_tmp = new uint[64];
NotBigNum(n, len);
IncrementBigNum(n, len);
}
unsafe uint GetMulWord(uint* n)
{
var wn = (ushort*)n;
var i = (uint)((((((((((*(wn - 1) ^ 0xffff) & 0xffff) * globOneHighInvLow + 0x10000) >> 1)
+ (((*(wn - 2) ^ 0xffff) * globOneHighInvHigh + globOneHighInvHigh) >> 1) + 1)
>> 16) + ((((*(wn - 1) ^ 0xffff) & 0xffff) * globOneHighInvHigh) >> 1) +
(((*wn ^ 0xffff) * globOneHighInvLow) >> 1) + 1) >> 14) + globOneHighInvHigh
* (*wn ^ 0xffff) * 2) >> (int)globOneHighBitLen);
if (i > 0xffff) i = 0xffff;
return i & 0xffff;
}
static void DecBigNum(uint[] n, uint len)
{
var i = 0;
while ((--n[i] == 0xffffffff) && (--len > 0))
i++;
}
void CalcBigNum(uint[] n1, uint[] n2, uint[] n3, uint len)
{
uint globTwoXtwo, lenDiff;
unsafe
{
fixed (uint* g1 = &globOne[0])
fixed (uint* g2 = &globTwo[0])
{
MulBigNum(globTwo, n2, n3, len);
globTwo[len * 2] = 0;
globTwoXtwo = LenBigNum(globTwo, len * 2 + 1) * 2;
if (globTwoXtwo >= globOneLenXTwo)
{
IncrementBigNum(globTwo, len * 2 + 1);
NegBigNum(globTwo, len * 2 + 1);
lenDiff = globTwoXtwo + 1 - globOneLenXTwo;
var esi = ((ushort*)g2) + (1 + globTwoXtwo - globOneLenXTwo);
var edi = ((ushort*)g2) + (globTwoXtwo + 1);
for (; lenDiff != 0; lenDiff--)
{
edi--;
var tmp = GetMulWord((uint*)edi);
esi--;
if (tmp > 0)
{
MulBignumWord(esi, globOne, tmp, 2 * len);
if ((*edi & 0x8000) == 0)
{
if (0 != SubBigNum((uint*)esi, (uint*)esi, g1, 0, (int)len))
(*edi)--;
}
}
}
NegBigNum(globTwo, len);
DecBigNum(globTwo, len);
}
MoveBigNum(n1, globTwo, len);
}
}
}
void ClearTempVars(uint len)
{
InitBigNum(globOne, 0, len);
InitBigNum(globTwo, 0, len);
InitBigNum(globOneHighInv, 0, 4);
InitBigNum(globOneHigh, 0, 4);
globOneBitLen = 0;
globOneHighBitLen = 0;
globOneLenXTwo = 0;
globOneHighInvLow = 0;
globOneHighInvHigh = 0;
}
void CalcKey(uint[] n1, uint[] n2, uint[] n3, uint[] n4, uint len)
{
var n_tmp = new uint[64];
uint n3_len, n4_len;
int n3_bitlen;
uint bit_mask;
unsafe
{
fixed (uint* _pn3 = &n3[0])
fixed (uint* tempPn3 = &n3[0])
{
uint* pn3 = _pn3;
var pn3 = tempPn3;
init_bignum(n1, 1, len);
n4_len = len_bignum(n4, len);
init_two_dw(n4, n4_len);
n3_bitlen = (int)bitlen_bignum(n3, n4_len);
InitBigNum(n1, 1, len);
n4_len = LenBigNum(n4, len);
InitTwoDw(n4, n4_len);
n3_bitlen = (int)BitLenBigNum(n3, n4_len);
n3_len = (uint)((n3_bitlen + 31) / 32);
bit_mask = (((uint)1) << ((n3_bitlen - 1) % 32)) >> 1;
pn3 += n3_len - 1;
n3_bitlen--;
mov_bignum(n1, n2, n4_len);
MoveBigNum(n1, n2, n4_len);
while (--n3_bitlen != -1)
{
if (bit_mask == 0)
@@ -437,39 +447,41 @@ namespace OpenRA.FileFormats
bit_mask = 0x80000000;
pn3--;
}
calc_a_bignum(n_tmp, n1, n1, n4_len);
CalcBigNum(n_tmp, n1, n1, n4_len);
if ((*pn3 & bit_mask) != 0)
calc_a_bignum(n1, n_tmp, n2, n4_len);
CalcBigNum(n1, n_tmp, n2, n4_len);
else
mov_bignum(n1, n_tmp, n4_len);
MoveBigNum(n1, n_tmp, n4_len);
bit_mask >>= 1;
}
init_bignum(n_tmp, 0, n4_len);
clear_tmp_vars(len);
InitBigNum(n_tmp, 0, n4_len);
ClearTempVars(len);
}
}
}
static unsafe void memcpy(byte* dest, byte* src, int len)
static unsafe void Memcopy(byte* dest, byte* src, int len)
{
while (len-- != 0) *dest++ = *src++;
}
unsafe void process_predata(byte* pre, uint pre_len, byte *buf)
unsafe void ProcessPredata(byte* pre, uint pre_len, byte* buf)
{
uint[] n2 = new uint[64];
uint[] n3 = new uint[64];
var n2 = new uint[64];
var n3 = new uint[64];
uint a = (pubkey.len - 1) / 8;
var a = (pubkey.Len - 1) / 8;
while (a + 1 <= pre_len)
{
init_bignum(n2, 0, 64);
fixed( uint * pn2 = &n2[0] )
memcpy((byte *)pn2, pre, (int)a + 1);
calc_a_key(n3, n2, pubkey.key2, pubkey.key1, 64);
InitBigNum(n2, 0, 64);
fixed (uint* pn2 = &n2[0])
Memcopy((byte*)pn2, pre, (int)a + 1);
CalcKey(n3, n2, pubkey.KeyTwo, pubkey.KeyOne, 64);
fixed( uint * pn3 = &n3[0] )
memcpy(buf, (byte *)pn3, (int)a);
fixed (uint* pn3 = &n3[0])
Memcopy(buf, (byte*)pn3, (int)a);
pre_len -= a + 1;
pre += a + 1;
@@ -479,15 +491,16 @@ namespace OpenRA.FileFormats
public byte[] DecryptKey(byte[] src)
{
init_pubkey();
byte[] dest = new byte[256];
InitPublicKey();
var dest = new byte[256];
unsafe
{
fixed (byte* pdest = &dest[0])
fixed (byte* psrc = &src[0])
process_predata(psrc, len_predata(), pdest);
ProcessPredata(psrc, LenPreData(), pdest);
}
return dest.Take(56).ToArray();
}
}

View File

@@ -1,6 +1,6 @@
#region Copyright & License Information
/*
* Copyright 2007-2013 The OpenRA Developers (see AUTHORS)
* 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,
@@ -10,7 +10,6 @@
namespace OpenRA.FileFormats
{
/// <summary>
/// Static class that uses a lookup table to calculates CRC32
/// checksums of input strings.
@@ -98,12 +97,13 @@ namespace OpenRA.FileFormats
/// </returns>
public static uint Calculate(byte[] data, uint polynomial)
{
uint crc = polynomial;
for (int i = 0; i < data.Length; i++)
var crc = polynomial;
for (var i = 0; i < data.Length; i++)
crc = (crc >> 8) ^ lookUp[(crc & 0xFF) ^ data[i]];
crc ^= polynomial;
return crc;
}
public static uint Calculate(byte[] data)
{
return Calculate(data, 0xFFFFFFFF);
@@ -119,12 +119,13 @@ namespace OpenRA.FileFormats
/// <returns>The calculated checksum.</returns>
public static unsafe uint Calculate(byte* data, uint len, uint polynomial)
{
uint crc = polynomial;
for (int i = 0; i < len; i++)
var crc = polynomial;
for (var i = 0; i < len; i++)
crc = (crc >> 8) ^ lookUp[(crc & 0xFF) ^ *data++];
crc ^= polynomial;
return crc;
}
public static unsafe uint Calculate(byte* data, uint len)
{
return Calculate(data, len, 0xFFFFFFFF);

View File

@@ -1,6 +1,6 @@
#region Copyright & License Information
#region Copyright & License Information
/*
* Copyright 2007-2011 The OpenRA Developers (see AUTHORS)
* 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,

View File

@@ -1,6 +1,6 @@
#region Copyright & License Information
/*
* Copyright 2007-2011 The OpenRA Developers (see AUTHORS)
* 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,
@@ -12,58 +12,58 @@ namespace OpenRA.FileFormats
{
public static class Format40
{
public static int DecodeInto( byte[] src, byte[] dest )
public static int DecodeInto(byte[] src, byte[] dest, int srcOffset)
{
var ctx = new FastByteReader(src);
int destIndex = 0;
var ctx = new FastByteReader(src, srcOffset);
var destIndex = 0;
while( true )
while (true)
{
byte i = ctx.ReadByte();
if( ( i & 0x80 ) == 0 )
var i = ctx.ReadByte();
if ((i & 0x80) == 0)
{
int count = i & 0x7F;
if( count == 0 )
var count = i & 0x7F;
if (count == 0)
{
// case 6
count = ctx.ReadByte();
byte value = ctx.ReadByte();
for( int end = destIndex + count ; destIndex < end ; destIndex++ )
dest[ destIndex ] ^= value;
var value = ctx.ReadByte();
for (var end = destIndex + count; destIndex < end; destIndex++)
dest[destIndex] ^= value;
}
else
{
// case 5
for( int end = destIndex + count ; destIndex < end ; destIndex++ )
for (var end = destIndex + count; destIndex < end; destIndex++)
dest[destIndex] ^= ctx.ReadByte();
}
}
else
{
int count = i & 0x7F;
if( count == 0 )
var count = i & 0x7F;
if (count == 0)
{
count = ctx.ReadWord();
if( count == 0 )
if (count == 0)
return destIndex;
if( ( count & 0x8000 ) == 0 )
if ((count & 0x8000) == 0)
{
// case 2
destIndex += ( count & 0x7FFF );
destIndex += count & 0x7FFF;
}
else if( ( count & 0x4000 ) == 0 )
else if ((count & 0x4000) == 0)
{
// case 3
for( int end = destIndex + ( count & 0x3FFF ) ; destIndex < end ; destIndex++ )
for (var end = destIndex + (count & 0x3FFF); destIndex < end; destIndex++)
dest[destIndex] ^= ctx.ReadByte();
}
else
{
// case 4
byte value = ctx.ReadByte();
for( int end = destIndex + ( count & 0x3FFF ) ; destIndex < end ; destIndex++ )
dest[ destIndex ] ^= value;
var value = ctx.ReadByte();
for (var end = destIndex + (count & 0x3FFF); destIndex < end; destIndex++)
dest[destIndex] ^= value;
}
}
else

View File

@@ -1,6 +1,6 @@
#region Copyright & License Information
/*
* Copyright 2007-2013 The OpenRA Developers (see AUTHORS)
* 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,
@@ -16,11 +16,12 @@ namespace OpenRA.FileFormats
class FastByteReader
{
readonly byte[] src;
int offset = 0;
int offset;
public FastByteReader(byte[] src)
public FastByteReader(byte[] src, int offset = 0)
{
this.src = src;
this.offset = offset;
}
public bool Done() { return offset >= src.Length; }
@@ -59,11 +60,10 @@ namespace OpenRA.FileFormats
}
}
public static int DecodeInto(byte[] src, byte[] dest)
public static int DecodeInto(byte[] src, byte[] dest, int srcOffset = 0, bool reverse = false)
{
var ctx = new FastByteReader(src);
var ctx = new FastByteReader(src, srcOffset);
var destIndex = 0;
while (true)
{
var i = ctx.ReadByte();
@@ -103,7 +103,7 @@ namespace OpenRA.FileFormats
{
// case 5
var count = ctx.ReadWord();
var srcIndex = ctx.ReadWord();
var srcIndex = reverse ? destIndex - ctx.ReadWord() : ctx.ReadWord();
if (srcIndex >= destIndex)
throw new NotImplementedException("srcIndex >= destIndex {0} {1}".F(srcIndex, destIndex));
@@ -114,7 +114,7 @@ namespace OpenRA.FileFormats
{
// case 3
var count = count3 + 3;
var srcIndex = ctx.ReadWord();
var srcIndex = reverse ? destIndex - ctx.ReadWord() : ctx.ReadWord();
if (srcIndex >= destIndex)
throw new NotImplementedException("srcIndex >= destIndex {0} {1}".F(srcIndex, destIndex));
@@ -125,26 +125,79 @@ namespace OpenRA.FileFormats
}
}
static int CountSame(byte[] src, int offset, int maxCount)
{
maxCount = Math.Min(src.Length - offset, maxCount);
if (maxCount <= 0)
return 0;
var first = src[offset++];
var count = 1;
while (count < maxCount && src[offset++] == first)
count++;
return count;
}
static void WriteCopyBlocks(byte[] src, int offset, int count, MemoryStream output)
{
while (count > 0)
{
var writeNow = Math.Min(count, 0x3F);
output.WriteByte((byte)(0x80 | writeNow));
output.Write(src, offset, writeNow);
count -= writeNow;
offset += writeNow;
}
}
// Quick and dirty Format80 encoder version 2
// Uses raw copy and RLE compression
public static byte[] Encode(byte[] src)
{
/* quick & dirty format80 encoder -- only uses raw copy operator, terminated with a zero-run. */
/* this does not produce good compression, but it's valid format80 */
var ctx = new FastByteReader(src);
var ms = new MemoryStream();
do
using (var ms = new MemoryStream())
{
var len = Math.Min(ctx.Remaining(), 0x3F);
ms.WriteByte((byte)(0x80 | len));
while (len-- > 0)
ms.WriteByte(ctx.ReadByte());
var offset = 0;
var left = src.Length;
var blockStart = 0;
while (offset < left)
{
var repeatCount = CountSame(src, offset, 0xFFFF);
if (repeatCount >= 4)
{
// Write what we haven't written up to now
WriteCopyBlocks(src, blockStart, offset - blockStart, ms);
// Command 4: Repeat byte n times
ms.WriteByte(0xFE);
// Low byte
ms.WriteByte((byte)(repeatCount & 0xFF));
// High byte
ms.WriteByte((byte)(repeatCount >> 8));
// Value to repeat
ms.WriteByte(src[offset]);
offset += repeatCount;
blockStart = offset;
}
else
offset++;
}
// Write what we haven't written up to now
WriteCopyBlocks(src, blockStart, offset - blockStart, ms);
// Write terminator
ms.WriteByte(0x80);
return ms.ToArray();
}
while (!ctx.Done());
ms.WriteByte(0x80); // terminator -- 0-length run.
return ms.ToArray();
}
}
}

View File

@@ -1,6 +1,6 @@
#region Copyright & License Information
/*
* Copyright 2007-2013 The OpenRA Developers (see AUTHORS)
* 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,
@@ -22,28 +22,28 @@ namespace OpenRA.FileFormats
public HvaReader(Stream s)
{
// Index swaps for transposing a matrix
var ids = new byte[]{0,4,8,12,1,5,9,13,2,6,10,14};
var ids = new byte[] { 0, 4, 8, 12, 1, 5, 9, 13, 2, 6, 10, 14 };
s.Seek(16, SeekOrigin.Begin);
FrameCount = s.ReadUInt32();
LimbCount = s.ReadUInt32();
// Skip limb names
s.Seek(16*LimbCount, SeekOrigin.Current);
Transforms = new float[16*FrameCount*LimbCount];
s.Seek(16 * LimbCount, SeekOrigin.Current);
Transforms = new float[16 * FrameCount * LimbCount];
for (var j = 0; j < FrameCount; j++)
for (var i = 0; i < LimbCount; i++)
{
// Convert to column-major matrices and add the final matrix row
var c = 16*(LimbCount*j + i);
Transforms[c + 3] = 0;
Transforms[c + 7] = 0;
Transforms[c + 11] = 0;
Transforms[c + 15] = 1;
{
// Convert to column-major matrices and add the final matrix row
var c = 16 * (LimbCount * j + i);
Transforms[c + 3] = 0;
Transforms[c + 7] = 0;
Transforms[c + 11] = 0;
Transforms[c + 15] = 1;
for (var k = 0; k < 12; k++)
Transforms[c + ids[k]] = s.ReadFloat();
}
for (var k = 0; k < 12; k++)
Transforms[c + ids[k]] = s.ReadFloat();
}
}
public static HvaReader Load(string filename)

View File

@@ -0,0 +1,44 @@
#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 System.IO;
using OpenRA.FileSystem;
namespace OpenRA.FileFormats
{
public class IdxReader
{
public readonly int SoundCount;
public List<IdxEntry> Entries;
public IdxReader(Stream s)
{
s.Seek(0, SeekOrigin.Begin);
var id = s.ReadASCII(4);
if (id != "GABA")
throw new InvalidDataException("Unable to load Idx file, did not find magic id, found {0} instead".F(id));
var two = s.ReadInt32();
if (two != 2)
throw new InvalidDataException("Unable to load Idx file, did not find magic number 2, found {0} instead".F(two));
SoundCount = s.ReadInt32();
Entries = new List<IdxEntry>();
for (var i = 0; i < SoundCount; i++)
Entries.Add(new IdxEntry(s));
}
}
}

View File

@@ -0,0 +1,99 @@
#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.IO;
namespace OpenRA.FileFormats
{
struct ImaAdpcmChunk
{
public int CompressedSize;
public int OutputSize;
public static ImaAdpcmChunk Read(Stream s)
{
ImaAdpcmChunk c;
c.CompressedSize = s.ReadUInt16();
c.OutputSize = s.ReadUInt16();
if (s.ReadUInt32() != 0xdeaf)
throw new InvalidDataException("Chunk header is bogus");
return c;
}
}
public static class ImaAdpcmLoader
{
static readonly int[] IndexAdjust = { -1, -1, -1, -1, 2, 4, 6, 8 };
static readonly int[] StepTable =
{
7, 8, 9, 10, 11, 12, 13, 14, 16,
17, 19, 21, 23, 25, 28, 31, 34, 37,
41, 45, 50, 55, 60, 66, 73, 80, 88,
97, 107, 118, 130, 143, 157, 173, 190, 209,
230, 253, 279, 307, 337, 371, 408, 449, 494,
544, 598, 658, 724, 796, 876, 963, 1060, 1166,
1282, 1411, 1552, 1707, 1878, 2066, 2272, 2499, 2749,
3024, 3327, 3660, 4026, 4428, 4871, 5358, 5894, 6484,
7132, 7845, 8630, 9493, 10442, 11487, 12635, 13899, 15289,
16818, 18500, 20350, 22385, 24623, 27086, 29794, 32767
};
static short DecodeImaAdpcmSample(byte b, ref int index, ref int current)
{
var sb = (b & 8) != 0;
b &= 7;
var delta = (StepTable[index] * b) / 4 + StepTable[index] / 8;
if (sb) delta = -delta;
current += delta;
if (current > short.MaxValue) current = short.MaxValue;
if (current < short.MinValue) current = short.MinValue;
index += IndexAdjust[b];
if (index < 0) index = 0;
if (index > 88) index = 88;
return (short)current;
}
public static byte[] LoadImaAdpcmSound(byte[] raw, ref int index)
{
var currentSample = 0;
return LoadImaAdpcmSound(raw, ref index, ref currentSample);
}
public static byte[] LoadImaAdpcmSound(byte[] raw, ref int index, ref int currentSample)
{
var s = new MemoryStream(raw);
var dataSize = raw.Length;
var outputSize = raw.Length * 4;
var output = new byte[outputSize];
var offset = 0;
while (dataSize-- > 0)
{
var b = s.ReadUInt8();
var t = DecodeImaAdpcmSample(b, ref index, ref currentSample);
output[offset++] = (byte)t;
output[offset++] = (byte)(t >> 8);
t = DecodeImaAdpcmSample((byte)(b >> 4), ref index, ref currentSample);
output[offset++] = (byte)t;
output[offset++] = (byte)(t >> 8);
}
return output;
}
}
}

View File

@@ -1,6 +1,6 @@
#region Copyright & License Information
/*
* Copyright 2007-2011 The OpenRA Developers (see AUTHORS)
* 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,
@@ -33,7 +33,7 @@ namespace OpenRA.FileFormats
public void Load(Stream s)
{
StreamReader reader = new StreamReader(s);
var reader = new StreamReader(s);
IniSection currentSection = null;
while (!reader.EndOfStream)
@@ -44,9 +44,9 @@ namespace OpenRA.FileFormats
switch (line[0])
{
case ';': break;
case '[': currentSection = ProcessSection(line); break;
default: ProcessEntry(line, currentSection); break;
case ';': break;
case '[': currentSection = ProcessSection(line); break;
default: ProcessEntry(line, currentSection); break;
}
}
}
@@ -55,10 +55,10 @@ namespace OpenRA.FileFormats
IniSection ProcessSection(string line)
{
Match m = sectionPattern.Match(line);
var m = sectionPattern.Match(line);
if (!m.Success)
return null;
string sectionName = m.Groups[1].Value.ToLowerInvariant();
var sectionName = m.Groups[1].Value.ToLowerInvariant();
IniSection ret;
if (!sections.TryGetValue(sectionName, out ret))
@@ -78,11 +78,11 @@ namespace OpenRA.FileFormats
var key = line;
var value = "";
int eq = line.IndexOf('=');
var eq = line.IndexOf('=');
if (eq >= 0)
{
key = line.Substring(0, eq);
value = line.Substring(eq + 1, line.Length - eq - 1);
key = line.Substring(0, eq).Trim();
value = line.Substring(eq + 1, line.Length - eq - 1).Trim();
}
if (currentSection == null)

View File

@@ -1,6 +1,6 @@
#region Copyright & License Information
#region Copyright & License Information
/*
* Copyright 2007-2010 The OpenRA Developers (see AUTHORS)
* 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,
@@ -39,9 +39,9 @@ namespace OpenRA.FileFormats
Bitmap bitmap = null;
Color[] palette = null;
List<byte> data = new List<byte>();
var data = new List<byte>();
for (; ; )
for (;;)
{
var length = IPAddress.NetworkToHostOrder(br.ReadInt32());
var type = Encoding.UTF8.GetString(br.ReadBytes(4));
@@ -54,7 +54,6 @@ namespace OpenRA.FileFormats
{
case "IHDR":
{
var width = IPAddress.NetworkToHostOrder(cr.ReadInt32());
var height = IPAddress.NetworkToHostOrder(cr.ReadInt32());
var bitDepth = cr.ReadByte();
@@ -67,8 +66,8 @@ namespace OpenRA.FileFormats
if (interlace != 0) throw new InvalidDataException("Interlacing not supported");
bitmap = new Bitmap(width, height, MakePixelFormat(bitDepth, colorType));
}
break;
case "PLTE":
@@ -80,6 +79,7 @@ namespace OpenRA.FileFormats
palette[i] = Color.FromArgb(r, g, b);
}
}
break;
case "tRNS":
@@ -87,12 +87,14 @@ namespace OpenRA.FileFormats
for (var i = 0; i < length; i++)
palette[i] = Color.FromArgb(cr.ReadByte(), palette[i]);
}
break;
case "IDAT":
{
data.AddRange(content);
}
break;
case "IEND":
@@ -168,8 +170,8 @@ namespace OpenRA.FileFormats
}
[Flags]
enum PngColorType { Indexed = 1, Color = 2, Alpha = 4 };
enum PngFilter { None, Sub, Up, Average, Paeth };
enum PngColorType { Indexed = 1, Color = 2, Alpha = 4 }
enum PngFilter { None, Sub, Up, Average, Paeth }
static PixelFormat MakePixelFormat(byte bitDepth, PngColorType colorType)
{

View File

@@ -1,79 +0,0 @@
#region Copyright & License Information
/*
* Copyright 2007-2013 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;
using System.Collections.Generic;
using System.Drawing;
using System.IO;
using System.Linq;
using OpenRA.Graphics;
namespace OpenRA.FileFormats
{
class R8Image : ISpriteFrame
{
public Size Size { get; private set; }
public Size FrameSize { get; private set; }
public float2 Offset { get; private set; }
public byte[] Data { get; set; }
public R8Image(Stream s)
{
// Scan forward until we find some data
var type = s.ReadUInt8();
while (type == 0)
type = s.ReadUInt8();
var width = s.ReadInt32();
var height = s.ReadInt32();
var x = s.ReadInt32();
var y = s.ReadInt32();
Size = new Size(width, height);
Offset = new int2(width/2 - x, height/2 - y);
/*var imageOffset = */s.ReadInt32();
var paletteOffset = s.ReadInt32();
var bpp = s.ReadUInt8();
if (bpp != 8)
throw new InvalidDataException("Error: {0} bits per pixel are not supported.".F(bpp));
var frameHeight = s.ReadUInt8();
var frameWidth = s.ReadUInt8();
FrameSize = new Size(frameWidth, frameHeight);
// Skip alignment byte
s.ReadUInt8();
Data = s.ReadBytes(width*height);
// Ignore palette
if (type == 1 && paletteOffset != 0)
s.Seek(520, SeekOrigin.Current);
}
}
public class R8Reader : ISpriteSource
{
readonly List<ISpriteFrame> frames = new List<ISpriteFrame>();
public IEnumerable<ISpriteFrame> Frames { get { return frames; } }
public bool CacheWhenLoadingTileset { get { return true; } }
public readonly int ImageCount;
public R8Reader(Stream stream)
{
while (stream.Position < stream.Length)
{
frames.Add(new R8Image(stream));
ImageCount++;
}
}
}
}

View File

@@ -1,6 +1,6 @@
#region Copyright & License Information
/*
* Copyright 2007-2014 The OpenRA Developers (see AUTHORS)
* 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,
@@ -11,7 +11,6 @@
using System;
using System.IO;
using System.Text;
using OpenRA.Network;
namespace OpenRA.FileFormats
{
@@ -47,7 +46,7 @@ namespace OpenRA.FileFormats
throw new NotSupportedException("Metadata version {0} is not supported".F(version));
// Read game info (max 100K limit as a safeguard against corrupted files)
string data = fs.ReadString(Encoding.UTF8, 1024 * 100);
var data = fs.ReadString(Encoding.UTF8, 1024 * 100);
GameInfo = GameInformation.Deserialize(data);
}
@@ -58,7 +57,7 @@ namespace OpenRA.FileFormats
writer.Write(MetaVersion);
// Write data
int dataLength = 0;
var dataLength = 0;
{
// Write lobby info data
writer.Flush();
@@ -72,7 +71,7 @@ namespace OpenRA.FileFormats
public void RenameFile(string newFilenameWithoutExtension)
{
var newPath = Path.Combine(Path.GetDirectoryName(FilePath), newFilenameWithoutExtension) + ".rep";
var newPath = Path.Combine(Path.GetDirectoryName(FilePath), newFilenameWithoutExtension) + ".orarep";
File.Move(FilePath, newPath);
FilePath = newPath;
}

View File

@@ -1,115 +0,0 @@
#region Copyright & License Information
/*
* Copyright 2007-2013 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;
using System.Collections.Generic;
using System.Drawing;
using System.IO;
using System.Linq;
using OpenRA.Graphics;
namespace OpenRA.FileFormats
{
[Flags] enum FormatFlags : int
{
PaletteTable = 1,
SkipFormat80 = 2,
VariableLengthTable = 4
}
class Frame : ISpriteFrame
{
public Size Size { get; private set; }
public Size FrameSize { get { return Size; } }
public float2 Offset { get { return float2.Zero; } }
public byte[] Data { get; set; }
public Frame(Stream s)
{
var flags = (FormatFlags)s.ReadUInt16();
s.Position += 1;
var width = s.ReadUInt16();
var height = s.ReadUInt8();
Size = new Size(width, height);
// Subtract header size
var dataLeft = s.ReadUInt16() - 10;
var dataSize = s.ReadUInt16();
byte[] table;
if ((flags & FormatFlags.PaletteTable) != 0)
{
var n = (flags & FormatFlags.VariableLengthTable) != 0 ? s.ReadUInt8() : (byte)16;
table = new byte[n];
for (var i = 0; i < n; i++)
table[i] = s.ReadUInt8();
dataLeft -= n;
}
else
{
table = new byte[256];
for (var i = 0; i < 256; i++)
table[i] = (byte)i;
table[1] = 0x7f;
table[2] = 0x7e;
table[3] = 0x7d;
table[4] = 0x7c;
}
Data = new byte[width * height];
// Decode image data
var compressed = s.ReadBytes(dataLeft);
if ((flags & FormatFlags.SkipFormat80) == 0)
{
var temp = new byte[dataSize];
Format80.DecodeInto(compressed, temp);
compressed = temp;
}
Format2.DecodeInto(compressed, Data, 0);
// Lookup values in lookup table
for (var j = 0; j < Data.Length; j++)
Data[j] = table[Data[j]];
}
}
public class ShpD2Reader : ISpriteSource
{
readonly List<ISpriteFrame> frames = new List<ISpriteFrame>();
public IEnumerable<ISpriteFrame> Frames { get { return frames; } }
public bool CacheWhenLoadingTileset { get { return false; } }
public ShpD2Reader(Stream s)
{
var imageCount = s.ReadUInt16();
// Last offset is pointer to end of file.
var offsets = new uint[imageCount + 1];
var temp = s.ReadUInt32();
// If fourth byte in file is non-zero, the offsets are two bytes each.
var twoByteOffset = (temp & 0xFF0000) > 0;
s.Position = 2;
for (var i = 0; i < imageCount + 1; i++)
offsets[i] = (twoByteOffset ? s.ReadUInt16() : s.ReadUInt32()) + 2;
for (var i = 0; i < imageCount; i++)
{
s.Position = offsets[i];
frames.Add(new Frame(s));
}
}
}
}

View File

@@ -1,203 +0,0 @@
#region Copyright & License Information
/*
* Copyright 2007-2013 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;
using System.IO;
using System.Linq;
using OpenRA.Graphics;
namespace OpenRA.FileFormats
{
enum Format { Format20 = 0x20, Format40 = 0x40, Format80 = 0x80 }
class ImageHeader : ISpriteFrame
{
public Size Size { get { return reader.Size; } }
public Size FrameSize { get { return reader.Size; } }
public float2 Offset { get { return float2.Zero; } }
public byte[] Data { get; set; }
public uint FileOffset;
public Format Format;
public uint RefOffset;
public Format RefFormat;
public ImageHeader RefImage;
ShpReader reader;
// Used by ShpWriter
public ImageHeader() { }
public ImageHeader(Stream stream, ShpReader reader)
{
this.reader = reader;
var data = stream.ReadUInt32();
FileOffset = data & 0xffffff;
Format = (Format)(data >> 24);
RefOffset = stream.ReadUInt16();
RefFormat = (Format)stream.ReadUInt16();
}
public void WriteTo(BinaryWriter writer)
{
writer.Write(FileOffset | ((uint)Format << 24));
writer.Write((ushort)RefOffset);
writer.Write((ushort)RefFormat);
}
}
public class ShpReader : ISpriteSource
{
readonly List<ImageHeader> headers = new List<ImageHeader>();
Lazy<IEnumerable<ISpriteFrame>> spriteFrames;
public IEnumerable<ISpriteFrame> Frames { get { return spriteFrames.Value; } }
public bool CacheWhenLoadingTileset { get { return false; } }
public readonly Size Size;
int recurseDepth = 0;
readonly int imageCount;
public ShpReader(Stream stream)
{
imageCount = stream.ReadUInt16();
stream.Position += 4;
var width = stream.ReadUInt16();
var height = stream.ReadUInt16();
Size = new Size(width, height);
stream.Position += 4;
for (var i = 0; i < imageCount; i++)
headers.Add(new ImageHeader(stream, this));
// Skip eof and zero headers
stream.Position += 16;
var offsets = headers.ToDictionary(h => h.FileOffset, h => h);
for (var i = 0; i < imageCount; i++)
{
var h = headers[i];
if (h.Format == Format.Format20)
h.RefImage = headers[i - 1];
else if (h.Format == Format.Format40 && !offsets.TryGetValue(h.RefOffset, out h.RefImage))
throw new InvalidDataException("Reference doesnt point to image data {0}->{1}".F(h.FileOffset, h.RefOffset));
}
foreach (var h in headers)
Decompress(stream, h);
spriteFrames = Exts.Lazy(() => headers.Cast<ISpriteFrame>());
}
static byte[] ReadCompressedData(Stream stream, ImageHeader h)
{
stream.Position = h.FileOffset;
// Actually, far too big. There's no length field with the correct length though :(
var compressedLength = (int)(stream.Length - stream.Position);
var compressedBytes = new byte[compressedLength];
stream.Read(compressedBytes, 0, compressedLength);
return compressedBytes;
}
void Decompress(Stream stream, ImageHeader h)
{
// No extra work is required for empty frames
if (h.Size.Width == 0 || h.Size.Height == 0)
return;
if (recurseDepth > imageCount)
throw new InvalidDataException("Format20/40 headers contain infinite loop");
switch (h.Format)
{
case Format.Format20:
case Format.Format40:
{
if (h.RefImage.Data == null)
{
++recurseDepth;
Decompress(stream, h.RefImage);
--recurseDepth;
}
h.Data = CopyImageData(h.RefImage.Data);
Format40.DecodeInto(ReadCompressedData(stream, h), h.Data);
break;
}
case Format.Format80:
{
var imageBytes = new byte[Size.Width * Size.Height];
Format80.DecodeInto(ReadCompressedData(stream, h), imageBytes);
h.Data = imageBytes;
break;
}
default:
throw new InvalidDataException();
}
}
byte[] CopyImageData(byte[] baseImage)
{
var imageData = new byte[Size.Width * Size.Height];
for (var i = 0; i < Size.Width * Size.Height; i++)
imageData[i] = baseImage[i];
return imageData;
}
public static ShpReader Load(string filename)
{
using (var s = File.OpenRead(filename))
return new ShpReader(s);
}
public static void Write(Stream s, Size size, IEnumerable<byte[]> frames)
{
var compressedFrames = frames.Select(f => Format80.Encode(f)).ToArray();
// note: end-of-file and all-zeroes headers
var dataOffset = 14 + (compressedFrames.Length + 2) * 8;
using (var bw = new BinaryWriter(s))
{
bw.Write((ushort)compressedFrames.Length);
bw.Write((ushort)0);
bw.Write((ushort)0);
bw.Write((ushort)size.Width);
bw.Write((ushort)size.Height);
bw.Write((uint)0);
foreach (var f in compressedFrames)
{
var ih = new ImageHeader { Format = Format.Format80, FileOffset = (uint)dataOffset };
dataOffset += f.Length;
ih.WriteTo(bw);
}
var eof = new ImageHeader { FileOffset = (uint)dataOffset };
eof.WriteTo(bw);
var allZeroes = new ImageHeader { };
allZeroes.WriteTo(bw);
foreach (var f in compressedFrames)
bw.Write(f);
}
}
}
}

View File

@@ -1,104 +0,0 @@
#region Copyright & License Information
/*
* Copyright 2007-2013 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;
using System.IO;
using System.Linq;
using OpenRA.Graphics;
namespace OpenRA.FileFormats
{
class FrameHeader : ISpriteFrame
{
public Size Size { get; private set; }
public Size FrameSize { get; private set; }
public float2 Offset { get; private set; }
public byte[] Data { get; set; }
public readonly uint FileOffset;
public readonly byte Format;
public FrameHeader(Stream stream, Size frameSize)
{
var x = stream.ReadUInt16();
var y = stream.ReadUInt16();
var width = stream.ReadUInt16();
var height = stream.ReadUInt16();
Offset = new float2(x + 0.5f * (width - frameSize.Width), y + 0.5f * (height - frameSize.Height));
Size = new Size(width, height);
FrameSize = frameSize;
Format = stream.ReadUInt8();
stream.Position += 11;
FileOffset = stream.ReadUInt32();
}
}
public class ShpTSReader : ISpriteSource
{
readonly List<FrameHeader> frames = new List<FrameHeader>();
Lazy<IEnumerable<ISpriteFrame>> spriteFrames;
public IEnumerable<ISpriteFrame> Frames { get { return spriteFrames.Value; } }
public bool CacheWhenLoadingTileset { get { return false; } }
public ShpTSReader(Stream stream)
{
stream.ReadUInt16();
var width = stream.ReadUInt16();
var height = stream.ReadUInt16();
var size = new Size(width, height);
var frameCount = stream.ReadUInt16();
for (var i = 0; i < frameCount; i++)
frames.Add(new FrameHeader(stream, size));
for (var i = 0; i < frameCount; i++)
{
var f = frames[i];
if (f.FileOffset == 0)
continue;
stream.Position = f.FileOffset;
// Uncompressed
if (f.Format == 1 || f.Format == 0)
f.Data = stream.ReadBytes(f.Size.Width * f.Size.Height);
// Uncompressed scanlines
else if (f.Format == 2)
{
f.Data = new byte[f.Size.Width * f.Size.Height];
for (var j = 0; j < f.Size.Height; j++)
{
var length = stream.ReadUInt16() - 2;
stream.Read(f.Data, f.Size.Width * j, length);
}
}
// RLE-zero compressed scanlines
else if (f.Format == 3)
{
f.Data = new byte[f.Size.Width * f.Size.Height];
for (var j = 0; j < f.Size.Height; j++)
{
var length = stream.ReadUInt16() - 2;
Format2.DecodeInto(stream.ReadBytes(length), f.Data, j * f.Size.Width);
}
}
}
spriteFrames = Exts.Lazy(() => frames.Cast<ISpriteFrame>());
}
}
}

View File

@@ -1,51 +0,0 @@
#region Copyright & License Information
/*
* Copyright 2007-2013 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 System.Drawing;
using System.IO;
using System.Linq;
using OpenRA.Graphics;
namespace OpenRA.FileFormats
{
public class TmpRAReader : ISpriteSource
{
readonly List<ISpriteFrame> tiles = new List<ISpriteFrame>();
public IEnumerable<ISpriteFrame> Frames { get { return tiles; } }
public bool CacheWhenLoadingTileset { get { return false; } }
public TmpRAReader(Stream s)
{
var width = s.ReadUInt16();
var height = s.ReadUInt16();
var size = new Size(width, height);
s.Position += 12;
var imgStart = s.ReadUInt32();
s.Position += 8;
var indexEnd = s.ReadInt32();
s.Position += 4;
var indexStart = s.ReadInt32();
s.Position = indexStart;
foreach (byte b in s.ReadBytes(indexEnd - indexStart))
{
if (b != 255)
{
s.Position = imgStart + b * width * height;
tiles.Add(new TmpTile(s.ReadBytes(width * height), size));
}
else
tiles.Add(new TmpTile(null, size));
}
}
}
}

View File

@@ -1,69 +0,0 @@
#region Copyright & License Information
/*
* Copyright 2007-2013 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 System.Drawing;
using System.Linq;
using System.IO;
using OpenRA.Graphics;
namespace OpenRA.FileFormats
{
public class TmpTile : ISpriteFrame
{
public Size Size { get; private set; }
public Size FrameSize { get; private set; }
public float2 Offset { get { return float2.Zero; } }
public byte[] Data { get; set; }
public TmpTile(byte[] data, Size size)
{
FrameSize = size;
Data = data;
if (data == null)
Data = new byte[0];
else
Size = size;
}
}
public class TmpTDReader : ISpriteSource
{
readonly List<ISpriteFrame> tiles = new List<ISpriteFrame>();
public IEnumerable<ISpriteFrame> Frames { get { return tiles; } }
public bool CacheWhenLoadingTileset { get { return false; } }
public TmpTDReader(Stream s)
{
var width = s.ReadUInt16();
var height = s.ReadUInt16();
var size = new Size(width, height);
s.Position += 8;
var imgStart = s.ReadUInt32();
s.Position += 8;
var indexEnd = s.ReadInt32();
var indexStart = s.ReadInt32();
s.Position = indexStart;
foreach (byte b in s.ReadBytes(indexEnd - indexStart))
{
if (b != 255)
{
s.Position = imgStart + b * width * height;
tiles.Add(new TmpTile(s.ReadBytes(width * height), size));
}
else
tiles.Add(new TmpTile(null, size));
}
}
}
}

View File

@@ -1,76 +0,0 @@
#region Copyright & License Information
/*
* Copyright 2007-2013 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;
using System.IO;
using System.Linq;
using OpenRA.Graphics;
namespace OpenRA.FileFormats
{
public class TmpTSTile : ISpriteFrame
{
public Size Size { get; private set; }
public Size FrameSize { get { return Size; } }
public float2 Offset { get { return float2.Zero; } }
public byte[] Data { get; set; }
public TmpTSTile(Stream s, Size size)
{
Size = size;
// Ignore tile header for now
s.Position += 52;
Data = new byte[size.Width * size.Height];
// Unpack tile data
var width = 4;
for (var i = 0; i < size.Height; i++)
{
var start = i * size.Width + (size.Width - width) / 2;
for (var j = 0; j < width; j++)
Data[start + j] = s.ReadUInt8();
width += (i < size.Height / 2 - 1? 1 : -1) * 4;
}
// Ignore Z-data for now
// Ignore extra data for now
}
}
public class TmpTSReader : ISpriteSource
{
readonly List<ISpriteFrame> tiles = new List<ISpriteFrame>();
public IEnumerable<ISpriteFrame> Frames { get { return tiles; } }
public bool CacheWhenLoadingTileset { get { return false; } }
public TmpTSReader(Stream s)
{
var templateWidth = s.ReadUInt32();
var templateHeight = s.ReadUInt32();
var tileWidth = s.ReadInt32();
var tileHeight = s.ReadInt32();
var size = new Size(tileWidth, tileHeight);
var offsets = new uint[templateWidth * templateHeight];
for (var i = 0; i < offsets.Length; i++)
offsets[i] = s.ReadUInt32();
for (var i = 0; i < offsets.Length; i++)
{
s.Position = offsets[i];
tiles.Add(new TmpTSTile(s, size));
}
}
}
}

View File

@@ -1,6 +1,6 @@
#region Copyright & License Information
/*
* Copyright 2007-2011 The OpenRA Developers (see AUTHORS)
* 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,
@@ -25,16 +25,28 @@ namespace OpenRA.FileFormats
ushort numColors;
ushort blockWidth;
ushort blockHeight;
byte cbParts;
byte chunkBufferParts;
int2 blocks;
UInt32[] offsets;
uint[] offsets;
uint[] palette;
uint videoFlags; // if 0x10 is set the video is a 16 bit hq video (ts and later)
int sampleRate;
int sampleBits;
int audioChannels;
// Stores a list of subpixels, referenced by the VPTZ chunk
byte[] cbf;
byte[] cbp;
int cbChunk = 0;
int cbOffset = 0;
byte[] cbfBuffer;
// Buffer for loading file subchunks, the maximum chunk size of a file is not defined
// and the header definition for the size of the biggest chunks (color data) isn't accurate.
// But 256k is large enough for all TS videos(< 200k).
byte[] fileBuffer = new byte[256000];
int maxCbfzSize = 256000;
int vtprSize = 0;
int currentChunkBuffer = 0;
int chunkBufferOffset = 0;
// Top half contains block info, bottom half contains references to cbf array
byte[] origData;
@@ -42,9 +54,14 @@ namespace OpenRA.FileFormats
// Final frame output
uint[,] frameData;
byte[] audioData; // audio for this frame: 22050Hz 16bit mono pcm, uncompressed.
bool hasAudio;
public byte[] AudioData { get { return audioData; } }
public int CurrentFrame { get { return currentFrame; } }
public int SampleRate { get { return sampleRate; } }
public int SampleBits { get { return sampleBits; } }
public int AudioChannels { get { return audioChannels; } }
public bool HasAudio { get { return hasAudio; } }
public VqaReader(Stream stream)
{
@@ -53,14 +70,14 @@ namespace OpenRA.FileFormats
// Decode FORM chunk
if (stream.ReadASCII(4) != "FORM")
throw new InvalidDataException("Invalid vqa (invalid FORM section)");
/*var length = */ stream.ReadUInt32();
/*var length = */stream.ReadUInt32();
if (stream.ReadASCII(8) != "WVQAVQHD")
throw new InvalidDataException("Invalid vqa (not WVQAVQHD)");
/* var length = */stream.ReadUInt32();
/*var length2 = */stream.ReadUInt32();
/*var version = */stream.ReadUInt16();
/*var flags = */stream.ReadUInt16();
videoFlags = stream.ReadUInt16();
Frames = stream.ReadUInt16();
Width = stream.ReadUInt16();
Height = stream.ReadUInt16();
@@ -68,7 +85,7 @@ namespace OpenRA.FileFormats
blockWidth = stream.ReadUInt8();
blockHeight = stream.ReadUInt8();
Framerate = stream.ReadUInt8();
cbParts = stream.ReadUInt8();
chunkBufferParts = stream.ReadUInt8();
blocks = new int2(Width / blockWidth, Height / blockHeight);
numColors = stream.ReadUInt16();
@@ -77,31 +94,54 @@ namespace OpenRA.FileFormats
/*var unknown2 = */stream.ReadUInt32();
// Audio
/*var freq = */stream.ReadUInt16();
/*var channels = */stream.ReadByte();
/*var bits = */stream.ReadByte();
/*var unknown3 = */stream.ReadBytes(14);
sampleRate = stream.ReadUInt16();
audioChannels = stream.ReadByte();
sampleBits = stream.ReadByte();
/*var unknown3 =*/stream.ReadUInt32();
/*var unknown4 =*/stream.ReadUInt16();
/*maxCbfzSize =*/stream.ReadUInt32(); // Unreliable
/*var unknown5 =*/stream.ReadUInt32();
var frameSize = Exts.NextPowerOf2(Math.Max(Width, Height));
cbf = new byte[Width*Height];
cbp = new byte[Width*Height];
palette = new uint[numColors];
origData = new byte[2*blocks.X*blocks.Y];
frameData = new uint[frameSize, frameSize];
var type = stream.ReadASCII(4);
if (type != "FINF")
if (IsHqVqa)
{
stream.Seek(27, SeekOrigin.Current);
type = stream.ReadASCII(4);
cbfBuffer = new byte[maxCbfzSize];
cbf = new byte[maxCbfzSize * 3];
origData = new byte[maxCbfzSize];
}
else
{
cbfBuffer = new byte[Width * Height];
cbf = new byte[Width * Height];
cbp = new byte[Width * Height];
origData = new byte[2 * blocks.X * blocks.Y];
}
palette = new uint[numColors];
frameData = new uint[frameSize, frameSize];
var type = stream.ReadASCII(4);
while (type != "FINF")
{
// Sub type is a file tag
if (type[3] == 'F')
{
var jmp = int2.Swap(stream.ReadUInt32());
stream.Seek(jmp, SeekOrigin.Current);
type = stream.ReadASCII(4);
}
else
throw new NotSupportedException("Vqa uses unknown Subtype: {0}".F(type));
}
/*var length = */stream.ReadUInt16();
/*var unknown4 = */stream.ReadUInt16();
// Frame offsets
offsets = new UInt32[Frames];
for (int i = 0; i < Frames; i++)
offsets = new uint[Frames];
for (var i = 0; i < Frames; i++)
{
offsets[i] = stream.ReadUInt32();
if (offsets[i] > 0x40000000)
@@ -116,16 +156,16 @@ namespace OpenRA.FileFormats
public void Reset()
{
currentFrame = cbOffset = cbChunk = 0;
currentFrame = chunkBufferOffset = currentChunkBuffer = 0;
LoadFrame();
}
void CollectAudioData()
{
var ms = new MemoryStream();
var audio1 = new MemoryStream(); // left channel / mono
var audio2 = new MemoryStream(); // right channel
var adpcmIndex = 0;
bool compressed = false;
var compressed = false;
for (var i = 0; i < Frames; i++)
{
stream.Seek(offsets[i], SeekOrigin.Begin);
@@ -134,15 +174,33 @@ namespace OpenRA.FileFormats
while (stream.Position < end)
{
var type = stream.ReadASCII(4);
if (type == "SN2J")
{
var jmp = int2.Swap(stream.ReadUInt32());
stream.Seek(jmp, SeekOrigin.Current);
type = stream.ReadASCII(4);
}
var length = int2.Swap(stream.ReadUInt32());
switch (type)
{
case "SND0":
case "SND2":
var rawAudio = stream.ReadBytes((int)length);
ms.Write(rawAudio);
compressed = (type == "SND2");
if (audioChannels == 1)
{
var rawAudio = stream.ReadBytes((int)length);
audio1.Write(rawAudio);
}
else
{
var rawAudio = stream.ReadBytes((int)length / 2);
audio1.Write(rawAudio);
rawAudio = stream.ReadBytes((int)length / 2);
audio2.Write(rawAudio);
}
compressed = type == "SND2";
break;
default:
stream.ReadBytes((int)length);
@@ -154,7 +212,37 @@ namespace OpenRA.FileFormats
}
}
audioData = (compressed) ? AudLoader.LoadSound(ms.ToArray(), ref adpcmIndex) : ms.ToArray();
if (audioChannels == 1)
audioData = compressed ? AudLoader.LoadSound(audio1.ToArray(), ref adpcmIndex) : audio1.ToArray();
else
{
byte[] leftData, rightData;
if (!compressed)
{
leftData = audio1.ToArray();
rightData = audio2.ToArray();
}
else
{
adpcmIndex = 0;
leftData = AudLoader.LoadSound(audio1.ToArray(), ref adpcmIndex);
adpcmIndex = 0;
rightData = AudLoader.LoadSound(audio2.ToArray(), ref adpcmIndex);
}
audioData = new byte[rightData.Length + leftData.Length];
var rightIndex = 0;
var leftIndex = 0;
for (var i = 0; i < audioData.Length;)
{
audioData[i++] = leftData[leftIndex++];
audioData[i++] = leftData[leftIndex++];
audioData[i++] = rightData[rightIndex++];
audioData[i++] = rightData[rightIndex++];
}
}
hasAudio = audioData.Length > 0;
}
public void AdvanceFrame()
@@ -170,18 +258,41 @@ namespace OpenRA.FileFormats
// Seek to the start of the frame
stream.Seek(offsets[currentFrame], SeekOrigin.Begin);
var end = (currentFrame < Frames - 1) ? offsets[currentFrame+1] : stream.Length;
var end = (currentFrame < Frames - 1) ? offsets[currentFrame + 1] : stream.Length;
while (stream.Position < end)
{
var type = stream.ReadASCII(4);
var length = int2.Swap(stream.ReadUInt32());
var length = 0U;
if (type == "SN2J")
{
var jmp = int2.Swap(stream.ReadUInt32());
stream.Seek(jmp, SeekOrigin.Current);
type = stream.ReadASCII(4);
if (type == "SND2")
{
length = int2.Swap(stream.ReadUInt32());
stream.Seek(length, SeekOrigin.Current);
type = stream.ReadASCII(4);
}
else
throw new NotSupportedException();
}
switch(type)
length = int2.Swap(stream.ReadUInt32());
switch (type)
{
case "VQFR":
DecodeVQFR(stream);
break;
break;
case "\0VQF":
stream.ReadByte();
DecodeVQFR(stream);
break;
case "VQFL":
DecodeVQFR(stream, "VQFL");
break;
default:
// Don't parse sound here.
stream.ReadBytes((int)length);
@@ -194,61 +305,102 @@ namespace OpenRA.FileFormats
}
// VQA Frame
public void DecodeVQFR(Stream s)
public void DecodeVQFR(Stream s, string parentType = "VQFR")
{
while (true)
{
// Chunks are aligned on even bytes; may be padded with a single null
if (s.Peek() == 0) s.ReadByte();
var type = s.ReadASCII(4);
int subchunkLength = (int)int2.Swap(s.ReadUInt32());
var subchunkLength = (int)int2.Swap(s.ReadUInt32());
switch(type)
switch (type)
{
// Full frame-modifier
case "CBFZ":
Format80.DecodeInto(s.ReadBytes(subchunkLength), cbf);
break;
var decodeMode = s.Peek() == 0;
s.ReadBytes(fileBuffer, 0, subchunkLength);
Array.Clear(cbf, 0, cbf.Length);
Array.Clear(cbfBuffer, 0, cbfBuffer.Length);
var decodeCount = 0;
decodeCount = Format80.DecodeInto(fileBuffer, cbfBuffer, decodeMode ? 1 : 0, decodeMode);
if ((videoFlags & 0x10) == 16)
{
var p = 0;
for (var i = 0; i < decodeCount; i += 2)
{
var packed = cbfBuffer[i + 1] << 8 | cbfBuffer[i];
/* 15 bit 0
0rrrrrgg gggbbbbb
HI byte LO byte*/
cbf[p++] = (byte)((packed & 0x7C00) >> 7);
cbf[p++] = (byte)((packed & 0x3E0) >> 2);
cbf[p++] = (byte)((packed & 0x1f) << 3);
}
}
else
{
cbf = cbfBuffer;
}
if (parentType == "VQFL")
return;
break;
case "CBF0":
cbf = s.ReadBytes(subchunkLength);
break;
break;
// frame-modifier chunk
case "CBP0":
case "CBPZ":
// Partial buffer is full; dump and recreate
if (cbChunk == cbParts)
if (currentChunkBuffer == chunkBufferParts)
{
if (type == "CBP0")
cbf = (byte[])cbp.Clone();
else
Format80.DecodeInto(cbp, cbf);
cbOffset = cbChunk = 0;
chunkBufferOffset = currentChunkBuffer = 0;
}
var bytes = s.ReadBytes(subchunkLength);
bytes.CopyTo(cbp,cbOffset);
cbOffset += subchunkLength;
cbChunk++;
break;
bytes.CopyTo(cbp, chunkBufferOffset);
chunkBufferOffset += subchunkLength;
currentChunkBuffer++;
break;
// Palette
case "CPL0":
for (int i = 0; i < numColors; i++)
for (var i = 0; i < numColors; i++)
{
byte r = (byte)(s.ReadUInt8() << 2);
byte g = (byte)(s.ReadUInt8() << 2);
byte b = (byte)(s.ReadUInt8() << 2);
var r = (byte)(s.ReadUInt8() << 2);
var g = (byte)(s.ReadUInt8() << 2);
var b = (byte)(s.ReadUInt8() << 2);
palette[i] = (uint)((255 << 24) | (r << 16) | (g << 8) | b);
}
break;
break;
// Frame data
case "VPTZ":
Format80.DecodeInto(s.ReadBytes(subchunkLength), origData);
// This is the last subchunk
return;
case "VPRZ":
Array.Clear(origData, 0, origData.Length);
s.ReadBytes(fileBuffer, 0, subchunkLength);
if (fileBuffer[0] != 0)
vtprSize = Format80.DecodeInto(fileBuffer, origData);
else
Format80.DecodeInto(fileBuffer, origData, 1, true);
return;
case "VPTR":
Array.Clear(origData, 0, origData.Length);
s.ReadBytes(origData, 0, subchunkLength);
vtprSize = subchunkLength;
return;
default:
throw new InvalidDataException("Unknown sub-chunk {0}".F(type));
}
@@ -260,19 +412,76 @@ namespace OpenRA.FileFormats
void DecodeFrameData()
{
cachedFrame = currentFrame;
for (var y = 0; y < blocks.Y; y++)
for (var x = 0; x < blocks.X; x++)
if (IsHqVqa)
{
/* The VP?? chunks of the video file contains an array of instructions for
* how the blocks of the finished frame will be filled with color data blocks
* contained in the CBF? chunks.
*/
var p = 0;
for (var y = 0; y < blocks.Y;)
{
var px = origData[x + y*blocks.X];
var mod = origData[x + (y + blocks.Y)*blocks.X];
for (var j = 0; j < blockHeight; j++)
for (var i = 0; i < blockWidth; i++)
for (var x = 0; x < blocks.X;)
{
if (y >= blocks.Y)
break;
// The first 3 bits of the short determine the type of instruction with the rest being one or two parameters.
var val = (int)origData[p++];
val |= origData[p++] << 8;
var para_A = val & 0x1fff;
var para_B1 = val & 0xFF;
var para_B2 = (((val / 256) & 0x1f) + 1) * 2;
switch (val >> 13)
{
var cbfi = (mod*256 + px)*8 + j*blockWidth + i;
byte color = (mod == 0x0f) ? px : cbf[cbfi];
frameData[y*blockHeight + j, x*blockWidth + i] = palette[color];
case 0:
x += para_A;
break;
case 1:
WriteBlock(para_B1, para_B2, ref x, ref y);
break;
case 2:
WriteBlock(para_B1, 1, ref x, ref y);
for (var i = 0; i < para_B2; i++)
WriteBlock(origData[p++], 1, ref x, ref y);
break;
case 3:
WriteBlock(para_A, 1, ref x, ref y);
break;
case 5:
WriteBlock(para_A, origData[p++], ref x, ref y);
break;
default:
throw new NotSupportedException();
}
}
y++;
}
if (p != vtprSize)
throw new IndexOutOfRangeException();
}
else
{
for (var y = 0; y < blocks.Y; y++)
{
for (var x = 0; x < blocks.X; x++)
{
var px = origData[x + y * blocks.X];
var mod = origData[x + (y + blocks.Y) * blocks.X];
for (var j = 0; j < blockHeight; j++)
{
for (var i = 0; i < blockWidth; i++)
{
var cbfi = (mod * 256 + px) * 8 + j * blockWidth + i;
var color = (mod == 0x0f) ? px : cbf[cbfi];
frameData[y * blockHeight + j, x * blockWidth + i] = palette[color];
}
}
}
}
}
}
public uint[,] FrameData
@@ -285,5 +494,33 @@ namespace OpenRA.FileFormats
return frameData;
}
}
bool IsHqVqa { get { return (videoFlags & 0x10) == 16; } }
void WriteBlock(int blockNumber, int count, ref int x, ref int y)
{
for (var i = 0; i < count; i++)
{
var frameX = x * blockWidth;
var frameY = y * blockHeight;
var offset = blockNumber * blockHeight * blockWidth * 3;
for (var by = 0; by < blockHeight; by++)
for (var bx = 0; bx < blockWidth; bx++)
{
var p = (bx + by * blockWidth) * 3;
frameData[frameY + by, frameX + bx] = (uint)(0xFF << 24 | cbf[offset + p] << 16 | cbf[offset + p + 1] << 8 | cbf[offset + p + 2]);
}
x++;
if (x >= blocks.X)
{
x = 0;
y++;
if (y >= blocks.Y && i != count - 1)
throw new IndexOutOfRangeException();
}
}
}
}
}

View File

@@ -1,6 +1,6 @@
#region Copyright & License Information
/*
* Copyright 2007-2013 The OpenRA Developers (see AUTHORS)
* 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,
@@ -38,15 +38,15 @@ namespace OpenRA.FileFormats
public readonly uint LimbCount;
public VxlLimb[] Limbs;
uint BodySize;
uint bodySize;
static void ReadVoxelData(Stream s, VxlLimb l)
{
var baseSize = l.Size[0]*l.Size[1];
var baseSize = l.Size[0] * l.Size[1];
var colStart = new int[baseSize];
for (var i = 0; i < baseSize; i++)
colStart[i] = s.ReadInt32();
s.Seek(4*baseSize, SeekOrigin.Current);
s.Seek(4 * baseSize, SeekOrigin.Current);
var dataStart = s.Position;
// Count the voxels in this limb
@@ -65,12 +65,12 @@ namespace OpenRA.FileFormats
var count = s.ReadUInt8();
z += count;
l.VoxelCount += count;
s.Seek(2*count + 1, SeekOrigin.Current);
s.Seek(2 * count + 1, SeekOrigin.Current);
} while (z < l.Size[2]);
}
// Read the data
l.VoxelMap = new Dictionary<byte, VxlElement>[l.Size[0],l.Size[1]];
l.VoxelMap = new Dictionary<byte, VxlElement>[l.Size[0], l.Size[1]];
for (var i = 0; i < baseSize; i++)
{
// Empty column
@@ -79,10 +79,10 @@ namespace OpenRA.FileFormats
s.Seek(dataStart + colStart[i], SeekOrigin.Begin);
byte x = (byte)(i % l.Size[0]);
byte y = (byte)(i / l.Size[0]);
var x = (byte)(i % l.Size[0]);
var y = (byte)(i / l.Size[0]);
byte z = 0;
l.VoxelMap[x,y] = new Dictionary<byte, VxlElement>();
l.VoxelMap[x, y] = new Dictionary<byte, VxlElement>();
do
{
z += s.ReadUInt8();
@@ -93,9 +93,10 @@ namespace OpenRA.FileFormats
v.Color = s.ReadUInt8();
v.Normal = s.ReadUInt8();
l.VoxelMap[x,y].Add(z, v);
l.VoxelMap[x, y].Add(z, v);
z++;
}
// Skip duplicate count
s.ReadUInt8();
} while (z < l.Size[2]);
@@ -104,14 +105,13 @@ namespace OpenRA.FileFormats
public VxlReader(Stream s)
{
if (!s.ReadASCII(16).StartsWith("Voxel Animation"))
throw new InvalidDataException("Invalid vxl header");
s.ReadUInt32();
LimbCount = s.ReadUInt32();
s.ReadUInt32();
BodySize = s.ReadUInt32();
bodySize = s.ReadUInt32();
s.Seek(770, SeekOrigin.Current);
// Read Limb headers
@@ -124,12 +124,12 @@ namespace OpenRA.FileFormats
}
// Skip to the Limb footers
s.Seek(802 + 28*LimbCount + BodySize, SeekOrigin.Begin);
s.Seek(802 + 28 * LimbCount + bodySize, SeekOrigin.Begin);
var LimbDataOffset = new uint[LimbCount];
var limbDataOffset = new uint[LimbCount];
for (var i = 0; i < LimbCount; i++)
{
LimbDataOffset[i] = s.ReadUInt32();
limbDataOffset[i] = s.ReadUInt32();
s.Seek(8, SeekOrigin.Current);
Limbs[i].Scale = s.ReadFloat();
s.Seek(48, SeekOrigin.Current);
@@ -143,7 +143,7 @@ namespace OpenRA.FileFormats
for (var i = 0; i < LimbCount; i++)
{
s.Seek(802 + 28*LimbCount + LimbDataOffset[i], SeekOrigin.Begin);
s.Seek(802 + 28 * LimbCount + limbDataOffset[i], SeekOrigin.Begin);
ReadVoxelData(s, Limbs[i]);
}
}

View File

@@ -1,6 +1,6 @@
#region Copyright & License Information
/*
* Copyright 2007-2013 The OpenRA Developers (see AUTHORS)
* 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,
@@ -26,9 +26,13 @@ namespace OpenRA.FileFormats
public readonly int BlockAlign;
public readonly int BitsPerSample;
public readonly int UncompressedSize;
public readonly int DataSize;
public readonly byte[] RawOutput;
public enum WaveType { Pcm = 0x1, ImaAdpcm = 0x11 }
public static WaveType Type { get; private set; }
public WavLoader(Stream s)
{
while (s.Position < s.Length)
@@ -47,16 +51,25 @@ namespace OpenRA.FileFormats
break;
case "fmt ":
FmtChunkSize = s.ReadInt32();
if (FmtChunkSize != 16)
throw new NotSupportedException("{0} fmt chunk size is not a supported encoding scheme.".F(FmtChunkSize));
AudioFormat = s.ReadInt16();
if (AudioFormat != 1)
throw new NotSupportedException("Non-PCM compression is not supported.");
Type = (WaveType)AudioFormat;
if (Type != WaveType.Pcm && Type != WaveType.ImaAdpcm)
throw new NotSupportedException("Compression type is not supported.");
Channels = s.ReadInt16();
SampleRate = s.ReadInt32();
ByteRate = s.ReadInt32();
BlockAlign = s.ReadInt16();
BitsPerSample = s.ReadInt16();
s.ReadBytes(FmtChunkSize - 16);
break;
case "fact":
{
var chunkSize = s.ReadInt32();
UncompressedSize = s.ReadInt32();
s.ReadBytes(chunkSize - 4);
}
break;
case "data":
DataSize = s.ReadInt32();
@@ -64,11 +77,104 @@ namespace OpenRA.FileFormats
break;
default:
// Ignore unknown chunks
var chunkSize = s.ReadInt32();
s.ReadBytes(chunkSize);
{
var chunkSize = s.ReadInt32();
s.ReadBytes(chunkSize);
}
break;
}
}
if (Type == WaveType.ImaAdpcm)
{
RawOutput = DecodeImaAdpcmData();
BitsPerSample = 16;
}
}
public static float WaveLength(Stream s)
{
s.Position = 12;
var fmt = s.ReadASCII(4);
if (fmt != "fmt ")
return 0;
s.Position = 22;
var channels = s.ReadInt16();
var sampleRate = s.ReadInt32();
s.Position = 34;
var bitsPerSample = s.ReadInt16();
var length = s.Length * 8;
return length / (channels * sampleRate * bitsPerSample);
}
public byte[] DecodeImaAdpcmData()
{
var s = new MemoryStream(RawOutput);
var numBlocks = DataSize / BlockAlign;
var blockDataSize = BlockAlign - (Channels * 4);
var outputSize = UncompressedSize * Channels * 2;
var outOffset = 0;
var output = new byte[outputSize];
var predictor = new int[Channels];
var index = new int[Channels];
// Decode each block of IMA ADPCM data in RawOutput
for (var block = 0; block < numBlocks; block++)
{
// Each block starts with a initial state per-channel
for (var c = 0; c < Channels; c++)
{
predictor[c] = s.ReadInt16();
index[c] = s.ReadUInt8();
/* unknown/reserved */ s.ReadUInt8();
// Output first sample from input
output[outOffset++] = (byte)predictor[c];
output[outOffset++] = (byte)(predictor[c] >> 8);
if (outOffset >= outputSize)
return output;
}
// Decode and output remaining data in this block
var blockOffset = 0;
while (blockOffset < blockDataSize)
{
for (var c = 0; c < Channels; c++)
{
// Decode 4 bytes (to 16 bytes of output) per channel
var chunk = s.ReadBytes(4);
var decoded = ImaAdpcmLoader.LoadImaAdpcmSound(chunk, ref index[c], ref predictor[c]);
// Interleave output, one sample per channel
var outOffsetChannel = outOffset + (2 * c);
for (var i = 0; i < decoded.Length; i += 2)
{
var outOffsetSample = outOffsetChannel + i;
if (outOffsetSample >= outputSize)
return output;
output[outOffsetSample] = decoded[i];
output[outOffsetSample + 1] = decoded[i + 1];
outOffsetChannel += 2 * (Channels - 1);
}
blockOffset += 4;
}
outOffset += 16 * Channels;
}
}
return output;
}
}
}

View File

@@ -1,6 +1,6 @@
#region Copyright & License Information
/*
* Copyright 2007-2013 The OpenRA Developers (see AUTHORS)
* 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,
@@ -34,7 +34,7 @@ namespace OpenRA.FileFormats
entries.Add(new string(chars.ToArray()));
// Skip comment
while ((c = reader.ReadChar()) != 0);
while ((c = reader.ReadChar()) != 0) { }
}
}

View File

@@ -1,6 +1,6 @@
#region Copyright & License Information
/*
* Copyright 2007-2013 The OpenRA Developers (see AUTHORS)
* 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,
@@ -47,9 +47,9 @@ namespace OpenRA.FileFormats
using (var writer = new BinaryWriter(data))
{
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(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)(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)
@@ -64,4 +64,4 @@ namespace OpenRA.FileFormats
return data.ToArray();
}
}
}
}

View File

@@ -0,0 +1,192 @@
#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.Globalization;
using System.IO;
using System.Linq;
using System.Text;
using OpenRA.FileFormats;
using OpenRA.Primitives;
namespace OpenRA.FileSystem
{
public sealed class BagFile : IFolder, IDisposable
{
static readonly uint[] Nothing = { };
readonly string bagFilename;
readonly Stream s;
readonly int bagFilePriority;
readonly Dictionary<uint, IdxEntry> index;
public BagFile(string filename, int priority)
{
bagFilename = filename;
bagFilePriority = priority;
// A bag file is always accompanied with an .idx counterpart
// For example: audio.bag requires the audio.idx file
var indexFilename = Path.ChangeExtension(filename, ".idx");
s = GlobalFileSystem.Open(filename);
// Build the index and dispose the stream, it is no longer needed after this
List<IdxEntry> entries;
using (var indexStream = GlobalFileSystem.Open(indexFilename))
{
var reader = new IdxReader(indexStream);
entries = reader.Entries;
}
index = entries.ToDictionaryWithConflictLog(x => x.Hash,
"{0} (bag format)".F(filename),
null, x => "(offs={0}, len={1})".F(x.Offset, x.Length));
}
public int Priority { get { return 1000 + bagFilePriority; } }
public string Name { get { return bagFilename; } }
public Stream GetContent(uint hash)
{
IdxEntry entry;
if (!index.TryGetValue(hash, out entry))
return null;
s.Seek(entry.Offset, SeekOrigin.Begin);
var waveHeaderMemoryStream = new MemoryStream();
var channels = (entry.Flags & 1) > 0 ? 2 : 1;
if ((entry.Flags & 2) > 0)
{
// PCM
waveHeaderMemoryStream.Write(Encoding.ASCII.GetBytes("RIFF"));
waveHeaderMemoryStream.Write(BitConverter.GetBytes(entry.Length + 36));
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)channels));
waveHeaderMemoryStream.Write(BitConverter.GetBytes(entry.SampleRate));
waveHeaderMemoryStream.Write(BitConverter.GetBytes(2 * channels * entry.SampleRate));
waveHeaderMemoryStream.Write(BitConverter.GetBytes((short)(2 * channels)));
waveHeaderMemoryStream.Write(BitConverter.GetBytes((short)16));
waveHeaderMemoryStream.Write(Encoding.ASCII.GetBytes("data"));
waveHeaderMemoryStream.Write(BitConverter.GetBytes(entry.Length));
}
if ((entry.Flags & 8) > 0)
{
// IMA ADPCM
var samplesPerChunk = (2 * (entry.ChunkSize - 4)) + 1;
var bytesPerSec = (int)Math.Floor(((double)(2 * entry.ChunkSize) / samplesPerChunk) * ((double)entry.SampleRate / 2));
var chunkSize = entry.ChunkSize > entry.Length ? entry.Length : entry.ChunkSize;
waveHeaderMemoryStream.Write(Encoding.ASCII.GetBytes("RIFF"));
waveHeaderMemoryStream.Write(BitConverter.GetBytes(entry.Length + 52));
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)channels));
waveHeaderMemoryStream.Write(BitConverter.GetBytes(entry.SampleRate));
waveHeaderMemoryStream.Write(BitConverter.GetBytes(bytesPerSec));
waveHeaderMemoryStream.Write(BitConverter.GetBytes((short)chunkSize));
waveHeaderMemoryStream.Write(BitConverter.GetBytes((short)4));
waveHeaderMemoryStream.Write(BitConverter.GetBytes((short)2));
waveHeaderMemoryStream.Write(BitConverter.GetBytes((short)samplesPerChunk));
waveHeaderMemoryStream.Write(Encoding.ASCII.GetBytes("fact"));
waveHeaderMemoryStream.Write(BitConverter.GetBytes(4));
waveHeaderMemoryStream.Write(BitConverter.GetBytes(4 * entry.Length));
waveHeaderMemoryStream.Write(Encoding.ASCII.GetBytes("data"));
waveHeaderMemoryStream.Write(BitConverter.GetBytes(entry.Length));
}
waveHeaderMemoryStream.Seek(0, SeekOrigin.Begin);
// Construct a merged stream
var mergedStream = new MergedStream(waveHeaderMemoryStream, s);
mergedStream.SetLength(waveHeaderMemoryStream.Length + entry.Length);
return mergedStream;
}
uint? FindMatchingHash(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");
}
public void Dispose()
{
if (s != null)
s.Dispose();
}
}
}

View File

@@ -0,0 +1,111 @@
#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;
namespace OpenRA.FileSystem
{
public class BigFile : IFolder
{
public string Name { get; private set; }
public int Priority { get; private set; }
readonly Dictionary<string, Entry> entries = new Dictionary<string, Entry>();
public BigFile(string filename, int priority)
{
Name = filename;
Priority = priority;
var s = GlobalFileSystem.Open(filename);
if (s.ReadASCII(4) != "BIGF")
throw new InvalidDataException("Header is not BIGF");
// Total archive size.
s.ReadUInt32();
var entryCount = s.ReadUInt32();
if (BitConverter.IsLittleEndian)
entryCount = int2.Swap(entryCount);
// First entry offset? This is apparently bogus for EA's .big files
// and we don't have to try seeking there since the entries typically start next in EA's .big files.
s.ReadUInt32();
for (var i = 0; i < entryCount; i++)
{
var entry = new Entry(s);
entries.Add(entry.Path, entry);
}
}
class Entry
{
readonly Stream s;
readonly uint offset;
readonly uint size;
public readonly string Path;
public Entry(Stream s)
{
this.s = s;
offset = s.ReadUInt32();
size = s.ReadUInt32();
if (BitConverter.IsLittleEndian)
{
offset = int2.Swap(offset);
size = int2.Swap(size);
}
Path = s.ReadASCIIZ();
}
public Stream GetData()
{
s.Position = offset;
return new MemoryStream(s.ReadBytes((int)size));
}
}
public Stream GetContent(string filename)
{
return entries[filename].GetData();
}
public bool Exists(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();
}
}
}

View File

@@ -1,6 +1,6 @@
#region Copyright & License Information
/*
* Copyright 2007-2013 The OpenRA Developers (see AUTHORS)
* 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,
@@ -56,10 +56,7 @@ namespace OpenRA.FileSystem
return null;
s.Seek(e.Offset, SeekOrigin.Begin);
var data = new byte[e.Length];
s.Read(data, 0, (int)e.Length);
return new MemoryStream(data);
return new MemoryStream(s.ReadBytes((int)e.Length));
}
public Stream GetContent(string filename)
@@ -79,7 +76,7 @@ namespace OpenRA.FileSystem
public string Name { get { return filename; } }
public int Priority { get { return 1000 + priority; }}
public int Priority { get { return 1000 + priority; } }
public IEnumerable<uint> ClassicHashes()
{

View File

@@ -1,6 +1,6 @@
#region Copyright & License Information
/*
* Copyright 2007-2011 The OpenRA Developers (see AUTHORS)
* 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,
@@ -39,7 +39,7 @@ namespace OpenRA.FileSystem
public Stream GetContent(string filename)
{
try { return File.OpenRead( Path.Combine( path, filename ) ); }
try { return File.OpenRead(Path.Combine(path, filename)); }
catch { return null; }
}
@@ -75,8 +75,8 @@ namespace OpenRA.FileSystem
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);
using (var writer = new BinaryWriter(dataStream))
writer.Write(file.Value);
}
}
}

View File

@@ -1,6 +1,6 @@
#region Copyright & License Information
/*
* Copyright 2007-2011 The OpenRA Developers (see AUTHORS)
* 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,
@@ -62,56 +62,58 @@ namespace OpenRA.FileSystem
{
if (filename.EndsWith(".mix", StringComparison.InvariantCultureIgnoreCase))
return new MixFile(filename, order, content);
else if (filename.EndsWith(".zip", StringComparison.InvariantCultureIgnoreCase))
if (filename.EndsWith(".zip", StringComparison.InvariantCultureIgnoreCase))
return new ZipFile(filename, order, content);
else if (filename.EndsWith(".oramap", StringComparison.InvariantCultureIgnoreCase))
if (filename.EndsWith(".oramap", StringComparison.InvariantCultureIgnoreCase))
return new ZipFile(filename, order, content);
else if (filename.EndsWith(".RS", StringComparison.InvariantCultureIgnoreCase))
throw new NotImplementedException("Creating .RS archives is unsupported");
else if (filename.EndsWith(".Z", StringComparison.InvariantCultureIgnoreCase))
throw new NotImplementedException("Creating .Z archives is unsupported");
else if (filename.EndsWith(".PAK", StringComparison.InvariantCultureIgnoreCase))
throw new NotImplementedException("Creating .PAK archives is unsupported");
else
return new Folder(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");
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);
var type = string.IsNullOrEmpty(annotation)
? PackageHashType.Classic
: FieldLoader.GetValue<PackageHashType>("(value)", annotation);
return new MixFile(filename, type, order);
}
else if (filename.EndsWith(".zip", StringComparison.InvariantCultureIgnoreCase))
if (filename.EndsWith(".zip", StringComparison.InvariantCultureIgnoreCase))
return new ZipFile(filename, order);
else if (filename.EndsWith(".oramap", StringComparison.InvariantCultureIgnoreCase))
if (filename.EndsWith(".oramap", StringComparison.InvariantCultureIgnoreCase))
return new ZipFile(filename, order);
else if (filename.EndsWith(".RS", StringComparison.InvariantCultureIgnoreCase))
if (filename.EndsWith(".RS", StringComparison.InvariantCultureIgnoreCase))
return new D2kSoundResources(filename, order);
else if (filename.EndsWith(".Z", StringComparison.InvariantCultureIgnoreCase))
if (filename.EndsWith(".Z", StringComparison.InvariantCultureIgnoreCase))
return new InstallShieldPackage(filename, order);
else if (filename.EndsWith(".PAK", StringComparison.InvariantCultureIgnoreCase))
if (filename.EndsWith(".PAK", StringComparison.InvariantCultureIgnoreCase))
return new PakFile(filename, order);
else
return new Folder(filename, order);
if (filename.EndsWith(".big", StringComparison.InvariantCultureIgnoreCase))
return new BigFile(filename, order);
if (filename.EndsWith(".bag", StringComparison.InvariantCultureIgnoreCase))
return new BagFile(filename, order);
return new Folder(filename, order);
}
public static void Mount(string name)
{
Mount(name, null);
}
public static void Mount(string name, string annotation)
public static void Mount(string name, string annotation = null)
{
var optional = name.StartsWith("~");
if (optional)
name = name.Substring(1);
// paths starting with ^ are relative to the support dir
if (name.StartsWith("^"))
name = Platform.SupportDir + name.Substring(1);
name = Platform.ResolvePath(name);
FolderPaths.Add(name);
Action a = () => MountInner(OpenPackage(name, annotation, order++));
@@ -156,8 +158,7 @@ namespace OpenRA.FileSystem
var index = type == PackageHashType.CRC32 ? crcHashIndex : classicHashIndex;
var folder = index[PackageEntry.HashFilename(filename, type)]
.Where(x => x.Exists(filename))
.OrderBy(x => x.Priority)
.FirstOrDefault();
.MinByOrDefault(x => x.Priority);
if (folder != null)
return folder.GetContent(filename);
@@ -165,45 +166,38 @@ namespace OpenRA.FileSystem
return null;
}
public static Stream Open(string filename) { return OpenWithExts(filename, ""); }
public static Stream OpenWithExts(string filename, params string[] exts)
public static Stream Open(string filename)
{
Stream s;
if (!TryOpenWithExts(filename, exts, out s))
if (!TryOpen(filename, out s))
throw new FileNotFoundException("File not found: {0}".F(filename), filename);
return s;
}
public static bool TryOpenWithExts(string filename, string[] exts, out Stream s)
public static bool TryOpen(string filename, out Stream s)
{
// Check the cache for a quick lookup
if (filename.IndexOfAny(new char[] { '/', '\\' }) == -1)
{
foreach (var ext in exts)
{
s = GetFromCache(PackageHashType.Classic, filename + ext);
if (s != null)
return true;
s = GetFromCache(PackageHashType.Classic, filename);
if (s != null)
return true;
s = GetFromCache(PackageHashType.CRC32, filename + ext);
if (s != null)
return true;
}
s = GetFromCache(PackageHashType.CRC32, filename);
if (s != null)
return true;
}
foreach (var ext in exts)
{
var folder = MountedFolders
.Where(x => x.Exists(filename + ext))
.OrderByDescending(x => x.Priority)
.FirstOrDefault();
// Ask each package individually
var folder = MountedFolders
.Where(x => x.Exists(filename))
.MaxByOrDefault(x => x.Priority);
if (folder != null)
{
s = folder.GetContent(filename + ext);
return true;
}
if (folder != null)
{
s = folder.GetContent(filename);
return true;
}
s = null;
@@ -230,8 +224,7 @@ namespace OpenRA.FileSystem
if (Exists(filename))
using (var s = Open(filename))
{
var buf = new byte[s.Length];
s.Read(buf, 0, buf.Length);
var buf = s.ReadBytes((int)s.Length);
a = Assembly.Load(buf);
assemblyCache.Add(filename, a);
return a;

View File

@@ -0,0 +1,94 @@
#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 System.IO;
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 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');
if (pos != 0)
asciiname = asciiname.Substring(0, pos);
Name = asciiname;
Extension = DefaultExtension;
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);
}
}
}

View File

@@ -1,6 +1,6 @@
#region Copyright & License Information
/*
* Copyright 2007-2011 The OpenRA Developers (see AUTHORS)
* 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,
@@ -32,8 +32,8 @@ namespace OpenRA.FileSystem
s = GlobalFileSystem.Open(filename);
// Parse package header
BinaryReader reader = new BinaryReader(s);
uint signature = reader.ReadUInt32();
var reader = new BinaryReader(s);
var signature = reader.ReadUInt32();
if (signature != 0x8C655D13)
throw new InvalidDataException("Not an Installshield package");
@@ -42,58 +42,58 @@ namespace OpenRA.FileSystem
reader.ReadBytes(4);
/*var ArchiveSize = */reader.ReadUInt32();
reader.ReadBytes(19);
var TOCAddress = reader.ReadInt32();
var tocAddress = reader.ReadInt32();
reader.ReadBytes(4);
var DirCount = reader.ReadUInt16();
var dirCount = reader.ReadUInt16();
// Parse the directory list
s.Seek(TOCAddress, SeekOrigin.Begin);
BinaryReader TOCreader = new BinaryReader(s);
s.Seek(tocAddress, SeekOrigin.Begin);
var tocReader = new BinaryReader(s);
var fileCountInDirs = new List<uint>();
// Parse directories
for (var i = 0; i < DirCount; i++)
fileCountInDirs.Add(ParseDirectory(TOCreader));
for (var i = 0; i < dirCount; i++)
fileCountInDirs.Add(ParseDirectory(tocReader));
// Parse files
foreach (var fileCount in fileCountInDirs)
for (var i = 0; i < fileCount; i++)
ParseFile(reader);
}
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));
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;
reader.ReadBytes(chunkSize - nameLength - 6);
return fileCount;
}
uint AccumulatedData = 0;
uint accumulatedData = 0;
void ParseFile(BinaryReader reader)
{
reader.ReadBytes(7);
var CompressedSize = reader.ReadUInt32();
var compressedSize = reader.ReadUInt32();
reader.ReadBytes(12);
var ChunkSize = reader.ReadUInt16();
var chunkSize = reader.ReadUInt16();
reader.ReadBytes(4);
var NameLength = reader.ReadByte();
var FileName = new String(reader.ReadChars(NameLength));
var nameLength = reader.ReadByte();
var fileName = new string(reader.ReadChars(nameLength));
var hash = PackageEntry.HashFilename(FileName, PackageHashType.Classic);
var hash = PackageEntry.HashFilename(fileName, PackageHashType.Classic);
if (!index.ContainsKey(hash))
index.Add(hash, new PackageEntry(hash,AccumulatedData, CompressedSize));
filenames.Add(FileName);
AccumulatedData += CompressedSize;
index.Add(hash, new PackageEntry(hash, accumulatedData, compressedSize));
filenames.Add(fileName);
accumulatedData += compressedSize;
// Skip to the end of the chunk
reader.ReadBytes(ChunkSize - NameLength - 30);
reader.ReadBytes(chunkSize - nameLength - 30);
}
public Stream GetContent(uint hash)
@@ -103,8 +103,7 @@ namespace OpenRA.FileSystem
return null;
s.Seek(dataStart + e.Offset, SeekOrigin.Begin);
var data = new byte[e.Length];
s.Read(data, 0, (int)e.Length);
var data = s.ReadBytes((int)e.Length);
return new MemoryStream(Blast.Decompress(data));
}
@@ -134,7 +133,7 @@ namespace OpenRA.FileSystem
return index.ContainsKey(PackageEntry.HashFilename(filename, PackageHashType.Classic));
}
public int Priority { get { return 2000 + priority; }}
public int Priority { get { return 2000 + priority; } }
public string Name { get { return filename; } }
public void Write(Dictionary<string, byte[]> contents)

View File

@@ -1,6 +1,6 @@
#region Copyright & License Information
/*
* Copyright 2007-2013 The OpenRA Developers (see AUTHORS)
* 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,
@@ -17,7 +17,7 @@ using OpenRA.FileFormats;
namespace OpenRA.FileSystem
{
public class MixFile : IFolder
public sealed class MixFile : IFolder, IDisposable
{
readonly Dictionary<uint, PackageEntry> index;
readonly long dataStart;
@@ -68,9 +68,8 @@ namespace OpenRA.FileSystem
entries = ParseHeader(s, isCncMix ? 0 : 4, out dataStart);
index = 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)
);
"{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));
}
static List<PackageEntry> ParseHeader(Stream s, long offset, out long headerEnd)
@@ -83,7 +82,7 @@ namespace OpenRA.FileSystem
for (var i = 0; i < numFiles; i++)
items.Add(new PackageEntry(s));
headerEnd = offset + 6 + numFiles*PackageEntry.Size;
headerEnd = offset + 6 + numFiles * PackageEntry.Size;
return items;
}
@@ -101,8 +100,8 @@ namespace OpenRA.FileSystem
var numFiles = ms.ReadUInt16();
// Decrypt the full header - round bytes up to a full block
var blockCount = (13 + numFiles*PackageEntry.Size)/8;
headerEnd = offset + 80 + blockCount*8;
var blockCount = (13 + numFiles * PackageEntry.Size) / 8;
headerEnd = offset + 80 + blockCount * 8;
return Decrypt(ReadBlocks(s, offset + 80, blockCount), fish);
}
@@ -113,7 +112,7 @@ namespace OpenRA.FileSystem
var ms = new MemoryStream();
var writer = new BinaryWriter(ms);
foreach(var t in decrypted)
foreach (var t in decrypted)
writer.Write(t);
writer.Flush();
@@ -126,7 +125,7 @@ namespace OpenRA.FileSystem
s.Seek(offset, SeekOrigin.Begin);
// A block is a single encryption unit (represented as two 32-bit integers)
var ret = new uint[2*count];
var ret = new uint[2 * count];
for (var i = 0; i < ret.Length; i++)
ret[i] = s.ReadUInt32();
@@ -157,8 +156,7 @@ namespace OpenRA.FileSystem
return null;
s.Seek(dataStart + e.Offset, SeekOrigin.Begin);
var data = new byte[e.Length];
s.Read(data, 0, (int)e.Length);
var data = s.ReadBytes((int)e.Length);
return new MemoryStream(data);
}
@@ -168,7 +166,7 @@ namespace OpenRA.FileSystem
return hash.HasValue ? GetContent(hash.Value) : null;
}
static readonly uint[] Nothing = {};
static readonly uint[] Nothing = { };
public IEnumerable<uint> ClassicHashes()
{
if (type == PackageHashType.Classic)
@@ -220,7 +218,7 @@ namespace OpenRA.FileSystem
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
@@ -259,5 +257,11 @@ namespace OpenRA.FileSystem
s.Write(file.Value);
}
}
public void Dispose()
{
if (s != null)
s.Dispose();
}
}
}

View File

@@ -1,6 +1,6 @@
#region Copyright & License Information
/*
* Copyright 2007-2013 The OpenRA Developers (see AUTHORS)
* 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,
@@ -20,6 +20,7 @@ namespace OpenRA.FileSystem
public class PackageEntry
{
public const int Size = 12;
public readonly uint Hash;
public readonly uint Offset;
public readonly uint Length;
@@ -48,7 +49,7 @@ namespace OpenRA.FileSystem
public override string ToString()
{
string filename;
if (Names.TryGetValue(Hash, out 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);
@@ -56,55 +57,54 @@ namespace OpenRA.FileSystem
public static uint HashFilename(string name, PackageHashType type)
{
switch(type)
switch (type)
{
case PackageHashType.Classic:
{
name = name.ToUpperInvariant();
if (name.Length % 4 != 0)
name = name.PadRight(name.Length + (4 - name.Length % 4), '\0');
MemoryStream ms = new MemoryStream(Encoding.ASCII.GetBytes(name));
BinaryReader reader = new BinaryReader(ms);
int len = name.Length >> 2;
uint result = 0;
while (len-- != 0)
result = ((result << 1) | (result >> 31)) + reader.ReadUInt32();
return result;
}
case PackageHashType.CRC32:
{
name = name.ToUpperInvariant();
var l = name.Length;
int a = l >> 2;
if ((l & 3) != 0)
case PackageHashType.Classic:
{
name += (char)(l - (a << 2));
int i = 3 - (l & 3);
while (i-- != 0)
name += name[a << 2];
}
return CRC32.Calculate(Encoding.ASCII.GetBytes(name));
}
name = name.ToUpperInvariant();
if (name.Length % 4 != 0)
name = name.PadRight(name.Length + (4 - name.Length % 4), '\0');
default: throw new NotImplementedException("Unknown hash type `{0}`".F(type));
var ms = new MemoryStream(Encoding.ASCII.GetBytes(name));
var reader = new BinaryReader(ms);
var len = name.Length >> 2;
uint result = 0;
while (len-- != 0)
result = ((result << 1) | (result >> 31)) + reader.ReadUInt32();
return result;
}
case PackageHashType.CRC32:
{
name = name.ToUpperInvariant();
var l = name.Length;
var a = l >> 2;
if ((l & 3) != 0)
{
name += (char)(l - (a << 2));
var i = 3 - (l & 3);
while (i-- != 0)
name += name[a << 2];
}
return CRC32.Calculate(Encoding.ASCII.GetBytes(name));
}
default: throw new NotImplementedException("Unknown hash type `{0}`".F(type));
}
}
static Dictionary<uint, string> Names = new Dictionary<uint,string>();
static Dictionary<uint, string> names = new Dictionary<uint, string>();
public static void AddStandardName(string s)
{
uint hash = HashFilename(s, PackageHashType.Classic); // RA1 and TD
Names.Add(hash, s);
uint crcHash = HashFilename(s, PackageHashType.CRC32); // TS
Names.Add(crcHash, s);
var hash = HashFilename(s, PackageHashType.Classic); // RA1 and TD
names.Add(hash, s);
var crcHash = HashFilename(s, PackageHashType.CRC32); // TS
names.Add(crcHash, s);
}
public const int Size = 12;
}
}

View File

@@ -1,6 +1,6 @@
#region Copyright & License Information
#region Copyright & License Information
/*
* Copyright 2007-2013 The OpenRA Developers (see AUTHORS)
* 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,
@@ -59,8 +59,7 @@ namespace OpenRA.FileSystem
return null;
stream.Seek(entry.Offset, SeekOrigin.Begin);
var data = new byte[entry.Length];
stream.Read(data, 0, (int)entry.Length);
var data = stream.ReadBytes((int)entry.Length);
return new MemoryStream(data);
}

View File

@@ -1,6 +1,6 @@
#region Copyright & License Information
#region Copyright & License Information
/*
* Copyright 2007-2011 The OpenRA Developers (see AUTHORS)
* 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,
@@ -8,6 +8,7 @@
*/
#endregion
using System;
using System.Collections.Generic;
using System.IO;
using System.Text;
@@ -16,7 +17,7 @@ using SZipFile = ICSharpCode.SharpZipLib.Zip.ZipFile;
namespace OpenRA.FileSystem
{
public class ZipFile : IFolder
public sealed class ZipFile : IFolder, IDisposable
{
string filename;
SZipFile pkg;
@@ -60,11 +61,7 @@ namespace OpenRA.FileSystem
using (var z = pkg.GetInputStream(pkg.GetEntry(filename)))
{
var ms = new MemoryStream();
int bufSize = 2048;
byte[] buf = new byte[bufSize];
while ((bufSize = z.Read(buf, 0, buf.Length)) > 0)
ms.Write(buf, 0, bufSize);
z.CopyTo(ms);
ms.Seek(0, SeekOrigin.Begin);
return ms;
}
@@ -109,6 +106,12 @@ namespace OpenRA.FileSystem
pkg.Close();
pkg = new SZipFile(new MemoryStream(File.ReadAllBytes(filename)));
}
public void Dispose()
{
if (pkg != null)
pkg.Close();
}
}
class StaticMemoryDataSource : IStaticDataSource

View File

@@ -1,6 +1,6 @@
#region Copyright & License Information
/*
* Copyright 2007-2014 The OpenRA Developers (see AUTHORS)
* 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,
@@ -9,15 +9,14 @@
#endregion
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Drawing;
using System.IO;
using System.Linq;
using System.Net;
using OpenRA.FileSystem;
using System.Threading;
using MaxMind.GeoIP2;
using OpenRA.GameRules;
using OpenRA.FileSystem;
using OpenRA.Graphics;
using OpenRA.Network;
using OpenRA.Primitives;
@@ -28,13 +27,16 @@ namespace OpenRA
{
public static class Game
{
public static MouseButtonPreference mouseButtonPreference = new MouseButtonPreference();
public const int NetTickScale = 3; // 120 ms net tick for 40 ms local tick
public const int Timestep = 40;
public const int TimestepJankThreshold = 250; // Don't catch up for delays larger than 250ms
public static ModData modData;
public static ModData ModData;
public static Settings Settings;
public static ICursor Cursor;
static WorldRenderer worldRenderer;
internal static OrderManager orderManager;
internal static OrderManager OrderManager;
static Server.Server server;
public static MersenneTwister CosmeticRandom = new MersenneTwister(); // not synced
@@ -44,10 +46,13 @@ namespace OpenRA
public static DatabaseReader GeoIpDatabase;
public static OrderManager JoinServer(string host, int port, string password)
public static OrderManager JoinServer(string host, int port, string password, bool recordReplay = true)
{
var om = new OrderManager(host, port, password,
new ReplayRecorderConnection(new NetworkConnection(host, port), ChooseReplayFilename));
IConnection connection = new NetworkConnection(host, port);
if (recordReplay)
connection = new ReplayRecorderConnection(connection, ChooseReplayFilename);
var om = new OrderManager(host, port, password, connection);
JoinInner(om);
return om;
}
@@ -59,10 +64,10 @@ namespace OpenRA
static void JoinInner(OrderManager om)
{
if (orderManager != null) orderManager.Dispose();
orderManager = om;
if (OrderManager != null) OrderManager.Dispose();
OrderManager = om;
lastConnectionState = ConnectionState.PreConnecting;
ConnectionStateChanged(orderManager);
ConnectionStateChanged(OrderManager);
}
public static void JoinReplay(string replayFile)
@@ -75,21 +80,28 @@ namespace OpenRA
JoinInner(new OrderManager("<no server>", -1, "", new EchoConnection()));
}
public static int RenderFrame = 0;
public static int NetFrameNumber { get { return orderManager.NetFrameNumber; } }
public static int LocalTick { get { return orderManager.LocalFrameNumber; } }
public const int NetTickScale = 3; // 120 ms net tick for 40 ms local tick
public const int Timestep = 40;
public const int TimestepJankThreshold = 250; // Don't catch up for delays larger than 250ms
// More accurate replacement for Environment.TickCount
static Stopwatch stopwatch = Stopwatch.StartNew();
public static int RunTime { get { return (int)Game.stopwatch.ElapsedMilliseconds; } }
public static int RenderFrame = 0;
public static int NetFrameNumber { get { return OrderManager.NetFrameNumber; } }
public static int LocalTick { get { return OrderManager.LocalFrameNumber; } }
public static event Action<string, int> OnRemoteDirectConnect = (a, b) => { };
public static event Action<OrderManager> ConnectionStateChanged = _ => { };
static ConnectionState lastConnectionState = ConnectionState.PreConnecting;
public static int LocalClientId { get { return orderManager.Connection.LocalClientId; } }
public static int LocalClientId { get { return OrderManager.Connection.LocalClientId; } }
public static void RemoteDirectConnect(string host, int port)
{
OnRemoteDirectConnect(host, port);
}
// Hacky workaround for orderManager visibility
public static Widget OpenWindow(World world, string widget)
{
return Ui.OpenWindow(widget, new WidgetArgs() { { "world", world }, { "orderManager", orderManager }, { "worldRenderer", worldRenderer } });
return Ui.OpenWindow(widget, new WidgetArgs() { { "world", world }, { "orderManager", OrderManager }, { "worldRenderer", worldRenderer } });
}
// Who came up with the great idea of making these things
@@ -98,8 +110,8 @@ namespace OpenRA
{
return Ui.OpenWindow(widget, new WidgetArgs(args)
{
{ "world", worldRenderer.world },
{ "orderManager", orderManager },
{ "world", worldRenderer.World },
{ "orderManager", OrderManager },
{ "worldRenderer", worldRenderer },
});
}
@@ -107,76 +119,294 @@ namespace OpenRA
// Load a widget with world, orderManager, worldRenderer args, without adding it to the widget tree
public static Widget LoadWidget(World world, string id, Widget parent, WidgetArgs args)
{
return modData.WidgetLoader.LoadWidget(new WidgetArgs(args)
return ModData.WidgetLoader.LoadWidget(new WidgetArgs(args)
{
{ "world", world },
{ "orderManager", orderManager },
{ "orderManager", OrderManager },
{ "worldRenderer", worldRenderer },
}, parent, id);
}
public static event Action LobbyInfoChanged = () => { };
internal static void SyncLobbyInfo()
{
LobbyInfoChanged();
}
public static event Action BeforeGameStart = () => { };
internal static void StartGame(string mapUID, WorldType type)
{
Cursor.SetCursor(null);
BeforeGameStart();
Map map;
using (new PerfTimer("PrepareMap"))
map = ModData.PrepareMap(mapUID);
using (new PerfTimer("NewWorld"))
{
OrderManager.World = new World(map, OrderManager, type);
OrderManager.World.Timestep = Timestep;
}
if (worldRenderer != null)
worldRenderer.Dispose();
worldRenderer = new WorldRenderer(OrderManager.World);
using (new PerfTimer("LoadComplete"))
OrderManager.World.LoadComplete(worldRenderer);
if (OrderManager.GameStarted)
return;
Ui.MouseFocusWidget = null;
Ui.KeyboardFocusWidget = null;
OrderManager.LocalFrameNumber = 0;
OrderManager.LastTickTime = RunTime;
OrderManager.StartGame();
worldRenderer.RefreshPalette();
Cursor.SetCursor("default");
GC.Collect();
}
public static bool IsHost
{
get
{
var id = OrderManager.Connection.LocalClientId;
var client = OrderManager.LobbyInfo.ClientWithIndex(id);
return client != null && client.IsAdmin;
}
}
static Modifiers modifiers;
public static Modifiers GetModifierKeys() { return modifiers; }
internal static void HandleModifierKeys(Modifiers mods) { modifiers = mods; }
public static void InitializeSettings(Arguments args)
{
Settings = new Settings(Platform.ResolvePath("^", "settings.yaml"), args);
}
internal static void Initialize(Arguments args)
{
Console.WriteLine("Platform is {0}", Platform.CurrentPlatform);
AppDomain.CurrentDomain.AssemblyResolve += GlobalFileSystem.ResolveAssembly;
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");
if (Settings.Server.DiscoverNatDevices)
UPnP.TryNatDiscovery();
else
{
Settings.Server.NatDeviceAvailable = false;
Settings.Server.AllowPortForward = false;
}
try
{
GeoIpDatabase = new DatabaseReader("GeoLite2-Country.mmdb");
}
catch (Exception e)
{
Log.Write("geoip", "DatabaseReader failed: {0}", e);
}
GlobalFileSystem.Mount(Platform.GameDir); // Needed to access shaders
var renderers = new[] { Settings.Graphics.Renderer, "Sdl2", 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;
try
{
Renderer = new Renderer(Settings.Graphics, Settings.Server);
break;
}
catch (Exception e)
{
Log.Write("graphics", "{0}", e);
Console.WriteLine("Renderer initialization failed. Fallback in place. Check graphics.log for details.");
}
}
try
{
Sound.Create(Settings.Sound.Engine);
}
catch (Exception e)
{
Log.Write("sound", "{0}", e);
Console.WriteLine("Creating the sound engine failed. Fallback in place. Check sound.log for details.");
Settings.Sound.Engine = "Null";
Sound.Create(Settings.Sound.Engine);
}
Console.WriteLine("Available mods:");
foreach (var mod in ModMetadata.AllMods)
Console.WriteLine("\t{0}: {1} ({2})", mod.Key, mod.Value.Title, mod.Value.Version);
InitializeMod(Settings.Game.Mod, args);
if (Settings.Server.DiscoverNatDevices)
RunAfterDelay(Settings.Server.NatDiscoveryTimeout, UPnP.StoppingNatDiscovery);
}
public static void InitializeMod(string mod, Arguments args)
{
// Clear static state if we have switched mods
LobbyInfoChanged = () => { };
ConnectionStateChanged = om => { };
BeforeGameStart = () => { };
OnRemoteDirectConnect = (a, b) => { };
delayedActions = new ActionQueue();
Ui.ResetAll();
if (worldRenderer != null)
worldRenderer.Dispose();
worldRenderer = null;
if (server != null)
server.Shutdown();
if (OrderManager != null)
OrderManager.Dispose();
if (ModData != null)
ModData.Dispose();
ModData = null;
// Fall back to default if the mod doesn't exist
if (!ModMetadata.AllMods.ContainsKey(mod))
mod = new GameSettings().Mod;
Console.WriteLine("Loading mod: {0}", mod);
Settings.Game.Mod = mod;
Sound.StopMusic();
Sound.StopVideo();
Sound.Initialize();
ModData = new ModData(mod, !Settings.Server.Dedicated);
ModData.InitializeLoaders();
if (!Settings.Server.Dedicated)
Renderer.InitializeFonts(ModData.Manifest);
using (new PerfTimer("LoadMaps"))
ModData.MapCache.LoadMaps();
if (Settings.Graphics.HardwareCursors)
{
try
{
Cursor = new HardwareCursor(ModData.CursorProvider);
}
catch (Exception e)
{
Log.Write("debug", "Failed to initialize hardware cursors. Falling back to software cursors.");
Log.Write("debug", "Error was: " + e.Message);
Console.WriteLine("Failed to initialize hardware cursors. Falling back to software cursors.");
Console.WriteLine("Error was: " + e.Message);
Cursor = new SoftwareCursor(ModData.CursorProvider);
Settings.Graphics.HardwareCursors = false;
}
}
else
Cursor = new SoftwareCursor(ModData.CursorProvider);
PerfHistory.Items["render"].HasNormalTick = false;
PerfHistory.Items["batches"].HasNormalTick = false;
PerfHistory.Items["render_widgets"].HasNormalTick = false;
PerfHistory.Items["render_flip"].HasNormalTick = false;
JoinLocal();
if (Settings.Server.Dedicated)
{
while (true)
{
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;
}
Environment.Exit(0);
}
else
ModData.LoadScreen.StartGame(args);
}
public static void LoadShellMap()
{
var shellmap = ChooseShellmap();
using (new PerfTimer("StartGame"))
StartGame(shellmap, WorldType.Shellmap);
}
static string ChooseShellmap()
{
var shellmaps = ModData.MapCache
.Where(m => m.Status == MapStatus.Available && m.Map.Visibility.HasFlag(MapVisibility.Shellmap))
.Select(m => m.Uid);
if (!shellmaps.Any())
throw new InvalidDataException("No valid shellmaps available");
return shellmaps.Random(CosmeticRandom);
}
static RunStatus state = RunStatus.Running;
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.
static ActionQueue delayedActions = new ActionQueue();
public static void RunAfterTick(Action a) { delayedActions.Add(a); }
public static void RunAfterDelay(int delay, Action a) { delayedActions.Add(a, delay); }
static float cursorFrame = 0f;
static void Tick(OrderManager orderManager)
static void InnerLogicTick(OrderManager orderManager)
{
if (orderManager.Connection.ConnectionState != lastConnectionState)
{
lastConnectionState = orderManager.Connection.ConnectionState;
ConnectionStateChanged(orderManager);
}
var tick = RunTime;
TickInner(orderManager);
if (worldRenderer != null && orderManager.world != worldRenderer.world)
TickInner(worldRenderer.world.orderManager);
var world = orderManager.World;
using (new PerfSample("render"))
{
++RenderFrame;
// worldRenderer is null during the initial install/download screen
if (worldRenderer != null)
{
Renderer.BeginFrame(worldRenderer.Viewport.TopLeft.ToFloat2(), worldRenderer.Viewport.Zoom);
Sound.SetListenerPosition(worldRenderer.Position(worldRenderer.Viewport.CenterLocation));
worldRenderer.Draw();
}
else
Renderer.BeginFrame(float2.Zero, 1f);
using (new PerfSample("render_widgets"))
{
Ui.Draw();
if (modData != null && modData.CursorProvider != null)
{
var cursorName = Ui.Root.GetCursorOuter(Viewport.LastMousePos) ?? "default";
modData.CursorProvider.DrawCursor(Renderer, cursorName, Viewport.LastMousePos, (int)cursorFrame);
}
}
using (new PerfSample("render_flip"))
{
Renderer.EndFrame(new DefaultInputHandler(orderManager.world));
}
}
PerfHistory.items["render"].Tick();
PerfHistory.items["batches"].Tick();
PerfHistory.items["render_widgets"].Tick();
PerfHistory.items["render_flip"].Tick();
delayedActions.PerformActions();
}
static void TickInner(OrderManager orderManager)
{
var tick = Environment.TickCount;
var world = orderManager.world;
var uiTickDelta = tick - Ui.LastTickTime;
if (uiTickDelta >= Timestep)
{
@@ -187,19 +417,19 @@ namespace OpenRA
Viewport.TicksSinceLastMove += uiTickDelta / Timestep;
Sync.CheckSyncUnchanged(world, Ui.Tick);
cursorFrame += 0.5f;
Cursor.Tick();
}
var worldTimestep = world == null ? Timestep : world.Timestep;
var worldTickDelta = (tick - orderManager.LastTickTime);
var worldTickDelta = tick - orderManager.LastTickTime;
if (worldTimestep != 0 && worldTickDelta >= worldTimestep)
{
using (new PerfSample("tick_time"))
{
// Tick the world to advance the world time to match real time:
// If dt < TickJankThreshold then we should try and catch up by repeatedly ticking
// If dt >= TickJankThreshold then we should accept the jank and progress at the normal rate
// dt is rounded down to an integer tick count in order to preserve fractional tick components.
var integralTickTimestep = (worldTickDelta / worldTimestep) * worldTimestep;
orderManager.LastTickTime += integralTickTimestep >= TimestepJankThreshold ? integralTickTimestep : worldTimestep;
@@ -231,251 +461,171 @@ namespace OpenRA
}
else
if (orderManager.NetFrameNumber == 0)
orderManager.LastTickTime = Environment.TickCount;
orderManager.LastTickTime = RunTime;
Sync.CheckSyncUnchanged(world, () => world.TickRender(worldRenderer));
}
}
}
public static event Action LobbyInfoChanged = () => { };
internal static void SyncLobbyInfo()
{
LobbyInfoChanged();
}
public static event Action BeforeGameStart = () => { };
internal static void StartGame(string mapUID, bool isShellmap)
{
BeforeGameStart();
Map map;
using (new PerfTimer("PrepareMap"))
map = modData.PrepareMap(mapUID);
using (new PerfTimer("NewWorld"))
{
orderManager.world = new World(map, orderManager, isShellmap);
orderManager.world.Timestep = Timestep;
}
worldRenderer = new WorldRenderer(orderManager.world);
using (new PerfTimer("LoadComplete"))
orderManager.world.LoadComplete(worldRenderer);
if (orderManager.GameStarted)
return;
Ui.MouseFocusWidget = null;
Ui.KeyboardFocusWidget = null;
orderManager.LocalFrameNumber = 0;
orderManager.LastTickTime = Environment.TickCount;
orderManager.StartGame();
worldRenderer.RefreshPalette();
}
public static bool IsHost
{
get
{
var id = orderManager.Connection.LocalClientId;
var client = orderManager.LobbyInfo.ClientWithIndex(id);
return client != null && client.IsAdmin;
}
}
static Modifiers modifiers;
public static Modifiers GetModifierKeys() { return modifiers; }
internal static void HandleModifierKeys(Modifiers mods) { modifiers = mods; }
internal static void Initialize(Arguments args)
static void LogicTick()
{
Console.WriteLine("Platform is {0}", Platform.CurrentPlatform);
delayedActions.PerformActions();
AppDomain.CurrentDomain.AssemblyResolve += GlobalFileSystem.ResolveAssembly;
Settings = new Settings(Platform.SupportDir + "settings.yaml", args);
Log.LogPath = Platform.SupportDir + "Logs" + Path.DirectorySeparatorChar;
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");
if (Settings.Server.DiscoverNatDevices)
UPnP.TryNatDiscovery();
else
if (OrderManager.Connection.ConnectionState != lastConnectionState)
{
Settings.Server.NatDeviceAvailable = false;
Settings.Server.AllowPortForward = false;
lastConnectionState = OrderManager.Connection.ConnectionState;
ConnectionStateChanged(OrderManager);
}
try
{
GeoIpDatabase = new DatabaseReader("GeoLite2-Country.mmdb");
}
catch (Exception e)
{
Log.Write("geoip", "DatabaseReader failed: {0}", e);
}
InnerLogicTick(OrderManager);
if (worldRenderer != null && OrderManager.World != worldRenderer.World)
InnerLogicTick(worldRenderer.World.OrderManager);
}
GlobalFileSystem.Mount("."); // Needed to access shaders
var renderers = new[] { Settings.Graphics.Renderer, "Sdl2", null };
foreach (var r in renderers)
static void RenderTick()
{
using (new PerfSample("render"))
{
if (r == null)
throw new InvalidOperationException("No suitable renderers were found. Check graphics.log for details.");
++RenderFrame;
Settings.Graphics.Renderer = r;
try
// worldRenderer is null during the initial install/download screen
if (worldRenderer != null)
{
Renderer.Initialize(Settings.Graphics.Mode);
break;
Renderer.BeginFrame(worldRenderer.Viewport.TopLeft, worldRenderer.Viewport.Zoom);
Sound.SetListenerPosition(worldRenderer.Viewport.CenterPosition);
worldRenderer.Draw();
}
catch (Exception e)
else
Renderer.BeginFrame(int2.Zero, 1f);
using (new PerfSample("render_widgets"))
{
Log.Write("graphics", "{0}", e);
Console.WriteLine("Renderer initialization failed. Fallback in place. Check graphics.log for details.");
}
}
Game.Renderer.WorldVoxelRenderer.BeginFrame();
Ui.PrepareRenderables();
Game.Renderer.WorldVoxelRenderer.EndFrame();
Renderer = new Renderer();
Ui.Draw();
try
{
Sound.Create(Settings.Sound.Engine);
}
catch (Exception e)
{
Log.Write("sound", "{0}", e);
Console.WriteLine("Creating the sound engine failed. Fallback in place. Check sound.log for details.");
Settings.Sound.Engine = "Null";
Sound.Create(Settings.Sound.Engine);
}
Console.WriteLine("Available mods:");
foreach (var mod in ModMetadata.AllMods)
Console.WriteLine("\t{0}: {1} ({2})", mod.Key, mod.Value.Title, mod.Value.Version);
InitializeWithMod(Settings.Game.Mod, args.GetValue("Launch.Replay", null));
if (Settings.Server.DiscoverNatDevices)
RunAfterDelay(Settings.Server.NatDiscoveryTimeout, UPnP.TryStoppingNatDiscovery);
}
public static void InitializeWithMod(string mod, string replay)
{
// Clear static state if we have switched mods
LobbyInfoChanged = () => { };
AddChatLine = (a, b, c) => { };
ConnectionStateChanged = om => { };
BeforeGameStart = () => { };
Ui.ResetAll();
worldRenderer = null;
if (server != null)
server.Shutdown();
if (orderManager != null)
orderManager.Dispose();
// Fall back to default if the mod doesn't exist
if (!ModMetadata.AllMods.ContainsKey(mod))
mod = new GameSettings().Mod;
Console.WriteLine("Loading mod: {0}", mod);
Settings.Game.Mod = mod;
Sound.StopMusic();
Sound.StopVideo();
Sound.Initialize();
modData = new ModData(mod);
Renderer.InitializeFonts(modData.Manifest);
modData.InitializeLoaders();
using (new PerfTimer("LoadMaps"))
modData.MapCache.LoadMaps();
PerfHistory.items["render"].hasNormalTick = false;
PerfHistory.items["batches"].hasNormalTick = false;
PerfHistory.items["render_widgets"].hasNormalTick = false;
PerfHistory.items["render_flip"].hasNormalTick = false;
JoinLocal();
if (Settings.Server.Dedicated)
{
while (true)
{
Settings.Server.Map = WidgetUtils.ChooseInitialMap(Settings.Server.Map);
Settings.Save();
CreateServer(new ServerSettings(Settings.Server));
while (true)
if (ModData != null && ModData.CursorProvider != null)
{
System.Threading.Thread.Sleep(100);
Cursor.SetCursor(Ui.Root.GetCursorOuter(Viewport.LastMousePos) ?? "default");
Cursor.Render(Renderer);
}
}
if (server.State == Server.ServerState.GameStarted && server.Conns.Count < 1)
{
Console.WriteLine("No one is playing, shutting down...");
server.Shutdown();
break;
}
using (new PerfSample("render_flip"))
Renderer.EndFrame(new DefaultInputHandler(OrderManager.World));
}
PerfHistory.Items["render"].Tick();
PerfHistory.Items["batches"].Tick();
PerfHistory.Items["render_widgets"].Tick();
PerfHistory.Items["render_flip"].Tick();
}
static void Loop()
{
// The game loop mainly does two things: logic updates and
// drawing on the screen.
// ---
// We ideally want the logic to run every 'Timestep' ms and
// rendering to be done at 'MaxFramerate', so 1000 / MaxFramerate ms.
// Any additional free time is used in 'Sleep' so we don't
// consume more CPU/GPU resources than necessary.
// ---
// In case logic or rendering takes more time than the ideal
// and we're getting behind, we can skip rendering some frames
// but there's a fail-safe minimum FPS to make sure the screen
// gets updated at least that often.
// ---
// TODO: Separate world/UI rendering
// It would be nice to separate the world rendering from the UI rendering
// so that we can update the UI more often than the world. This would
// help make the game playable (mouse/controls) even in low world
// framerates.
// It's not possible at the moment because the render buffer is cleared
// before rendering and we don't keep the last rendered world buffer.
// When the logic has fallen behind by this much, skip the pending
// updates and start fresh.
// For example, if we want to update logic every 10 ms but each loop
// temporarily takes 100 ms, the 'nextLogic' timestamp will be too low
// and the current timestamp ('now') will have moved on. Even if the
// update time returns to normal, it will take a long time to catch up
// (if ever).
// This also means that the 'logicInterval' cannot be longer than this
// value.
const int MaxLogicTicksBehind = 250;
// Try to maintain at least this many FPS during replays, even if it slows down logic.
// However, if the user has enabled a framerate limit that is even lower
// than this, then that limit will be used.
const int MinReplayFps = 10;
// Timestamps for when the next logic and rendering should run
var nextLogic = RunTime;
var nextRender = RunTime;
var forcedNextRender = RunTime;
while (state == RunStatus.Running)
{
// 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;
// Ideal time between screen updates
var maxFramerate = Settings.Graphics.CapFramerate ? Settings.Graphics.MaxFramerate.Clamp(1, 1000) : 1000;
var renderInterval = 1000 / maxFramerate;
var now = RunTime;
// If the logic has fallen behind too much, skip it and catch up
if (now - nextLogic > MaxLogicTicksBehind)
nextLogic = now;
// When's the next update (logic or render)
var nextUpdate = Math.Min(nextLogic, nextRender);
if (now >= nextUpdate)
{
var forceRender = now >= forcedNextRender;
if (now >= nextLogic)
{
nextLogic += logicInterval;
LogicTick();
// Force at least one render per tick during regular gameplay
if (OrderManager.World != null && !OrderManager.World.IsReplay)
forceRender = true;
}
if (Settings.Server.DedicatedLoop)
var haveSomeTimeUntilNextLogic = now < nextLogic;
var isTimeToRender = now >= nextRender;
if ((isTimeToRender && haveSomeTimeUntilNextLogic) || forceRender)
{
Console.WriteLine("Starting a new server instance...");
modData.MapCache.LoadMaps();
continue;
nextRender = now + renderInterval;
// Pick the minimum allowed FPS (the lower between 'minReplayFPS'
// and the user's max frame rate) and convert it to maximum time
// allowed between screen updates.
// We do this before rendering to include the time rendering takes
// in this interval.
var maxRenderInterval = Math.Max(1000 / MinReplayFps, renderInterval);
forcedNextRender = now + maxRenderInterval;
RenderTick();
}
break;
}
Environment.Exit(0);
}
else
{
modData.LoadScreen.StartGame();
Settings.Save();
if (!string.IsNullOrEmpty(replay))
Game.JoinReplay(replay);
else
Thread.Sleep(nextUpdate - now);
}
}
public static void LoadShellMap()
{
var shellmap = ChooseShellmap();
using (new PerfTimer("StartGame"))
StartGame(shellmap, true);
}
static string ChooseShellmap()
{
var shellmaps = modData.MapCache
.Where(m => m.Status == MapStatus.Available && m.Map.UseAsShellmap)
.Select(m => m.Uid);
if (!shellmaps.Any())
throw new InvalidDataException("No valid shellmaps available");
return shellmaps.Random(CosmeticRandom);
}
static bool quit;
public static event Action OnQuit = () => { };
static double idealFrameTime;
public static void SetIdealFrameTime(int fps)
{
idealFrameTime = 1.0 / fps;
}
internal static void Run()
internal static RunStatus Run()
{
if (Settings.Graphics.MaxFramerate < 1)
{
@@ -483,34 +633,42 @@ namespace OpenRA
Settings.Graphics.CapFramerate = false;
}
SetIdealFrameTime(Settings.Graphics.MaxFramerate);
while (!quit)
try
{
if (Settings.Graphics.CapFramerate)
{
var sw = Stopwatch.StartNew();
Tick(orderManager);
var waitTime = Math.Min(idealFrameTime - sw.Elapsed.TotalSeconds, 1);
if (waitTime > 0)
System.Threading.Thread.Sleep(TimeSpan.FromSeconds(waitTime));
}
else
Tick(orderManager);
Loop();
}
finally
{
// Ensure that the active replay is properly saved
if (OrderManager != null)
OrderManager.Dispose();
}
// Ensure that the active replay is properly saved
if (orderManager != null)
orderManager.Dispose();
if (worldRenderer != null)
worldRenderer.Dispose();
ModData.Dispose();
ChromeProvider.Deinitialize();
Renderer.Dispose();
OnQuit();
return state;
}
public static void Exit() { quit = true; }
public static void Exit()
{
state = RunStatus.Success;
}
public static Action<Color, string, string> AddChatLine = (c, n, s) => { };
public static void Restart()
{
state = RunStatus.Restart;
}
public static void AddChatLine(Color color, string name, string text)
{
OrderManager.AddChatLine(color, name, text);
}
public static void Debug(string s, params object[] args)
{
@@ -519,10 +677,10 @@ namespace OpenRA
public static void Disconnect()
{
if (orderManager.world != null)
orderManager.world.traitDict.PrintReport();
if (OrderManager.World != null)
OrderManager.World.TraitDict.PrintReport();
orderManager.Dispose();
OrderManager.Dispose();
CloseServer();
JoinLocal();
}
@@ -535,12 +693,12 @@ namespace OpenRA
public static T CreateObject<T>(string name)
{
return modData.ObjectCreator.CreateObject<T>(name);
return ModData.ObjectCreator.CreateObject<T>(name);
}
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);
}
public static int CreateLocalServer(string map)
@@ -553,14 +711,14 @@ 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);
return server.Port;
}
public static bool IsCurrentWorld(World world)
{
return orderManager != null && orderManager.world == world;
return OrderManager != null && OrderManager.World == world;
}
}
}

View File

@@ -1,6 +1,6 @@
#region Copyright & License Information
/*
* Copyright 2007-2014 The OpenRA Developers (see AUTHORS)
* 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,
@@ -18,9 +18,14 @@ namespace OpenRA
{
public class GameInformation
{
public string Mod;
public string Version;
public string MapUid;
public string MapTitle;
public DateTime StartTimeUtc;
// Game end timestamp (when the recoding stopped).
public DateTime EndTimeUtc;
@@ -28,7 +33,7 @@ namespace OpenRA
// replay recording stopped.
public TimeSpan Duration { get { return EndTimeUtc > StartTimeUtc ? EndTimeUtc - StartTimeUtc : TimeSpan.Zero; } }
public IList<Player> Players { get; private set; }
public MapPreview MapPreview { get { return Game.modData.MapCache[MapUid]; } }
public MapPreview MapPreview { get { return Game.ModData.MapCache[MapUid]; } }
public IEnumerable<Player> HumanPlayers { get { return Players.Where(p => p.IsHuman); } }
public bool IsSinglePlayer { get { return HumanPlayers.Count() == 1; } }
@@ -78,7 +83,7 @@ namespace OpenRA
nodes.Add(new MiniYamlNode("Root", FieldSaver.Save(this)));
for (var i=0; i<Players.Count; i++)
for (var i = 0; i < Players.Count; i++)
nodes.Add(new MiniYamlNode("Player@{0}".F(i), FieldSaver.Save(Players[i])));
return nodes.WriteToString();
@@ -113,7 +118,7 @@ namespace OpenRA
Color = runtimePlayer.Color,
Team = client.Team,
SpawnPoint = runtimePlayer.SpawnPoint,
IsRandomFaction = runtimePlayer.Country.Race != client.Country,
IsRandomFaction = runtimePlayer.Country.Race != client.Race,
IsRandomSpawnPoint = runtimePlayer.SpawnPoint != client.SpawnPoint
};
@@ -133,34 +138,36 @@ namespace OpenRA
public class Player
{
//
// Start-up information
//
// Start-up information
public int ClientIndex;
// The player name, not guaranteed to be unique.
public string Name;
public bool IsHuman;
public bool IsBot;
// The faction name (aka Country)
public string FactionName;
// The faction id (aka Country, aka Race)
public string FactionId;
public HSLColor Color;
// The team id on start-up, or 0 if the player is not part of the team.
public int Team;
public int SpawnPoint;
// True if the faction was chosen at random; otherwise, false
public bool IsRandomFaction;
// True if the spawn point was chosen at random; otherwise, false.</summary>
public bool IsRandomSpawnPoint;
//
// Information gathered at a later stage
//
// The game outcome for this player
public WinState Outcome;
// The time when this player won or lost the game
public DateTime OutcomeTimestampUtc;
}

View File

@@ -1,6 +1,6 @@
#region Copyright & License Information
/*
* Copyright 2007-2011 The OpenRA Developers (see AUTHORS)
* 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,
@@ -11,13 +11,12 @@
using System;
using System.Collections.Generic;
using System.Linq;
using OpenRA.FileFormats;
using OpenRA.Primitives;
using OpenRA.Traits;
namespace OpenRA
{
//TODO: This is not exported into the documentation yet.
// TODO: This is not exported into the documentation yet.
[Desc("A unit/building inside the game. Every rules starts with one and adds trait to it.",
"Special actors like world or player are usually defined in system.yaml and affect everything.")]
public class ActorInfo
@@ -28,12 +27,13 @@ namespace OpenRA
"You can remove inherited traits by adding a - infront of them as in -TraitName: to inherit everything, but this trait.")]
public readonly string Name;
public readonly TypeDictionary Traits = new TypeDictionary();
List<ITraitInfo> constructOrderCache = null;
public ActorInfo( string name, MiniYaml node, Dictionary<string, MiniYaml> allUnits )
public ActorInfo(string name, MiniYaml node, Dictionary<string, MiniYaml> allUnits)
{
try
{
var mergedNode = MergeWithParent(node, allUnits).NodesDict;
var mergedNode = MergeWithParent(node, allUnits).ToDictionary();
Name = name;
foreach (var t in mergedNode)
@@ -46,15 +46,15 @@ namespace OpenRA
}
}
static MiniYaml GetParent( MiniYaml node, Dictionary<string, MiniYaml> allUnits )
static MiniYaml GetParent(MiniYaml node, Dictionary<string, MiniYaml> allUnits)
{
MiniYaml inherits;
node.NodesDict.TryGetValue( "Inherits", out inherits );
if( inherits == null || string.IsNullOrEmpty( inherits.Value ) )
node.ToDictionary().TryGetValue("Inherits", out inherits);
if (inherits == null || string.IsNullOrEmpty(inherits.Value))
return null;
MiniYaml parent;
allUnits.TryGetValue( inherits.Value, out parent );
allUnits.TryGetValue(inherits.Value, out parent);
if (parent == null)
throw new InvalidOperationException(
"Bogus inheritance -- actor type {0} does not exist".F(inherits.Value));
@@ -62,9 +62,9 @@ namespace OpenRA
return parent;
}
static MiniYaml MergeWithParent( MiniYaml node, Dictionary<string, MiniYaml> allUnits )
static MiniYaml MergeWithParent(MiniYaml node, Dictionary<string, MiniYaml> allUnits)
{
var parent = GetParent( node, allUnits );
var parent = GetParent(node, allUnits);
if (parent != null)
{
var result = MiniYaml.MergeStrict(node, MergeWithParent(parent, allUnits));
@@ -73,6 +73,7 @@ namespace OpenRA
result.Nodes.RemoveAll(a => a.Key.StartsWith("-"));
return result;
}
return node;
}
@@ -88,37 +89,56 @@ namespace OpenRA
public IEnumerable<ITraitInfo> TraitsInConstructOrder()
{
var ret = new List<ITraitInfo>();
var t = Traits.WithInterface<ITraitInfo>().ToList();
int index = 0;
while (t.Count != 0)
if (constructOrderCache != null)
return constructOrderCache;
var source = Traits.WithInterface<ITraitInfo>().Select(i => new
{
var prereqs = PrerequisitesOf(t[index]);
var unsatisfied = prereqs.Where(n => !ret.Any(x => x.GetType() == n || n.IsAssignableFrom(x.GetType())));
if (!unsatisfied.Any())
Trait = i,
Type = i.GetType(),
Dependencies = PrerequisitesOf(i).ToList()
}).ToList();
var resolved = source.Where(s => !s.Dependencies.Any()).ToList();
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
while (more.Any())
resolved.AddRange(more);
if (unresolved.Any())
{
var exceptionString = "ActorInfo(\"" + Name + "\") failed to initialize because of the following:\r\n";
var missing = unresolved.SelectMany(u => u.Dependencies.Where(d => !source.Any(s => testResolve(d, s.Type)))).Distinct();
exceptionString += "Missing:\r\n";
foreach (var m in missing)
exceptionString += m + " \r\n";
exceptionString += "Unresolved:\r\n";
foreach (var u in unresolved)
{
ret.Add(t[index]);
t.RemoveAt(index);
index = 0;
var deps = u.Dependencies.Where(d => !resolved.Exists(r => r.Type == d));
exceptionString += u.Type + ": { " + string.Join(", ", deps) + " }\r\n";
}
else if (++index >= t.Count)
throw new InvalidOperationException("Trait prerequisites not satisfied (or prerequisite loop) Actor={0} Unresolved={1} Missing={2}".F(
Name,
t.Select(x => x.GetType().Name).JoinWith(","),
unsatisfied.Select(x => x.Name).JoinWith(",")));
throw new Exception(exceptionString);
}
return ret;
constructOrderCache = resolved.Select(r => r.Trait).ToList();
return constructOrderCache;
}
static List<Type> PrerequisitesOf(ITraitInfo info)
static IEnumerable<Type> PrerequisitesOf(ITraitInfo info)
{
return info
.GetType()
.GetInterfaces()
.Where( t => t.IsGenericType && t.GetGenericTypeDefinition() == typeof( Requires<> ) )
.Select( t => t.GetGenericArguments()[ 0 ] )
.ToList();
.Where(t => t.IsGenericType && t.GetGenericTypeDefinition() == typeof(Requires<>))
.Select(t => t.GetGenericArguments()[0]);
}
public IEnumerable<Pair<string, Type>> GetInitKeys()
@@ -128,11 +148,11 @@ namespace OpenRA
.Where(i => i.IsGenericType && i.GetGenericTypeDefinition() == typeof(UsesInit<>))
.Select(i => i.GetGenericArguments()[0])).ToList();
inits.Add( typeof(OwnerInit) ); /* not exposed by a trait; this is used by the Actor itself */
inits.Add(typeof(OwnerInit)); /* not exposed by a trait; this is used by the Actor itself */
return inits.Select(
i => Pair.New(
i.Name.Replace( "Init", "" ), i ));
i.Name.Replace("Init", ""), i));
}
}
}

View File

@@ -0,0 +1,86 @@
#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.Effects;
using OpenRA.Traits;
namespace OpenRA.GameRules
{
public abstract class DamageWarhead : Warhead
{
[Desc("How much (raw) damage to deal")]
public readonly int Damage = 0;
[Desc("Infantry death animation to use")]
public readonly string DeathType = "1";
[Desc("Whether we should prevent prone response for infantry.")]
public readonly bool PreventProne = false;
[Desc("By what percentage should damage be modified against prone infantry.")]
public readonly int ProneModifier = 50;
[FieldLoader.LoadUsing("LoadVersus")]
[Desc("Damage percentage versus each armortype. 0% = can't target.")]
public readonly Dictionary<string, int> Versus;
public static object LoadVersus(MiniYaml yaml)
{
var nd = yaml.ToDictionary();
return nd.ContainsKey("Versus")
? nd["Versus"].ToDictionary(my => FieldLoader.GetValue<int>("(value)", my.Value))
: new Dictionary<string, int>();
}
public int DamageVersus(ActorInfo victim)
{
var armor = victim.Traits.GetOrDefault<ArmorInfo>();
if (armor != null && armor.Type != null)
{
int versus;
if (Versus.TryGetValue(armor.Type, out versus))
return versus;
}
return 100;
}
// TODO: This can be removed after the legacy and redundant 0% = not targetable
// assumption has been removed from the yaml definitions
public override bool CanTargetActor(ActorInfo victim, Actor firedBy)
{
var health = victim.Traits.GetOrDefault<HealthInfo>();
if (health == null)
return false;
return DamageVersus(victim) > 0;
}
public override void DoImpact(Target target, Actor firedBy, IEnumerable<int> damageModifiers)
{
// Used by traits that damage a single actor, rather than a position
if (target.Type == TargetType.Actor)
DoImpact(target.Actor, firedBy, damageModifiers);
else if (target.Type != TargetType.Invalid)
DoImpact(target.CenterPosition, firedBy, damageModifiers);
}
public abstract void DoImpact(WPos pos, Actor firedBy, IEnumerable<int> damageModifiers);
public virtual void DoImpact(Actor victim, Actor firedBy, IEnumerable<int> damageModifiers)
{
var damage = Util.ApplyPercentageModifiers(Damage, damageModifiers.Append(DamageVersus(victim.Info)));
victim.InflictDamage(firedBy, damage, this);
}
}
}

View File

@@ -1,6 +1,6 @@
#region Copyright & License Information
/*
* Copyright 2007-2011 The OpenRA Developers (see AUTHORS)
* 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,
@@ -20,18 +20,22 @@ namespace OpenRA.GameRules
public int Length { get; private set; } // seconds
public bool Exists { get; private set; }
public MusicInfo( string key, MiniYaml value )
public MusicInfo(string key, MiniYaml value)
{
Title = value.Value;
var nd = value.NodesDict;
var nd = value.ToDictionary();
var ext = nd.ContainsKey("Extension") ? nd["Extension"].Value : "aud";
Filename = (nd.ContainsKey("Filename") ? nd["Filename"].Value : key)+"."+ext;
Filename = (nd.ContainsKey("Filename") ? nd["Filename"].Value : key) + "." + ext;
if (!GlobalFileSystem.Exists(Filename))
return;
Exists = true;
Length = (int)AudLoader.SoundLength(GlobalFileSystem.Open(Filename));
using (var s = GlobalFileSystem.Open(Filename))
if (Filename.ToLowerInvariant().EndsWith("wav"))
Length = (int)WavLoader.WaveLength(s);
else
Length = (int)AudLoader.SoundLength(s);
}
public void Reload()
@@ -40,7 +44,11 @@ namespace OpenRA.GameRules
return;
Exists = true;
Length = (int)AudLoader.SoundLength(GlobalFileSystem.Open(Filename));
using (var s = GlobalFileSystem.Open(Filename))
if (Filename.ToLowerInvariant().EndsWith("wav"))
Length = (int)WavLoader.WaveLength(s);
else
Length = (int)AudLoader.SoundLength(s);
}
}
}

View File

@@ -1,6 +1,6 @@
#region Copyright & License Information
/*
* Copyright 2007-2014 The OpenRA Developers (see AUTHORS)
* 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,
@@ -8,7 +8,6 @@
*/
#endregion
using System;
using System.Collections.Generic;
using System.Linq;
using OpenRA.GameRules;
@@ -23,7 +22,6 @@ namespace OpenRA
public readonly IReadOnlyDictionary<string, SoundInfo> Voices;
public readonly IReadOnlyDictionary<string, SoundInfo> Notifications;
public readonly IReadOnlyDictionary<string, MusicInfo> Music;
public readonly IReadOnlyDictionary<string, string> Movies;
public readonly IReadOnlyDictionary<string, TileSet> TileSets;
public readonly IReadOnlyDictionary<string, SequenceProvider> Sequences;
@@ -33,7 +31,6 @@ namespace OpenRA
IDictionary<string, SoundInfo> voices,
IDictionary<string, SoundInfo> notifications,
IDictionary<string, MusicInfo> music,
IDictionary<string, string> movies,
IDictionary<string, TileSet> tileSets,
IDictionary<string, SequenceProvider> sequences)
{
@@ -42,7 +39,6 @@ namespace OpenRA
Voices = new ReadOnlyDictionary<string, SoundInfo>(voices);
Notifications = new ReadOnlyDictionary<string, SoundInfo>(notifications);
Music = new ReadOnlyDictionary<string, MusicInfo>(music);
Movies = new ReadOnlyDictionary<string, string>(movies);
TileSets = new ReadOnlyDictionary<string, TileSet>(tileSets);
Sequences = new ReadOnlyDictionary<string, SequenceProvider>(sequences);
}

View File

@@ -1,6 +1,6 @@
#region Copyright & License Information
/*
* Copyright 2007-2014 The OpenRA Developers (see AUTHORS)
* 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,
@@ -11,14 +11,13 @@
using System;
using System.Collections.Generic;
using System.Linq;
using OpenRA.FileFormats;
using OpenRA.GameRules;
using OpenRA.Graphics;
using OpenRA.Support;
namespace OpenRA
{
public class RulesetCache
public sealed class RulesetCache : IDisposable
{
readonly ModData modData;
@@ -27,7 +26,6 @@ namespace OpenRA
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, string> movieCache = new Dictionary<string, string>();
readonly Dictionary<string, TileSet> tileSetCache = new Dictionary<string, TileSet>();
readonly Dictionary<string, SequenceCache> sequenceCaches = new Dictionary<string, SequenceCache>();
@@ -57,7 +55,6 @@ namespace OpenRA
Dictionary<string, SoundInfo> voices;
Dictionary<string, SoundInfo> notifications;
Dictionary<string, MusicInfo> music;
Dictionary<string, string> movies;
Dictionary<string, TileSet> tileSets;
using (new PerfTimer("Actors"))
@@ -70,14 +67,12 @@ namespace OpenRA
notifications = LoadYamlRules(notificationCache, m.Notifications, map.NotificationDefinitions, (k, _) => new SoundInfo(k.Value));
using (new PerfTimer("Music"))
music = LoadYamlRules(musicCache, m.Music, new List<MiniYamlNode>(), (k, _) => new MusicInfo(k.Key, k.Value));
using (new PerfTimer("Movies"))
movies = LoadYamlRules(movieCache, m.Movies, new List<MiniYamlNode>(), (k, v) => k.Value.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, movies, tileSets, sequences);
return new Ruleset(actors, weapons, voices, notifications, music, tileSets, sequences);
}
Dictionary<string, T> LoadYamlRules<T>(
@@ -138,5 +133,12 @@ namespace OpenRA
return items;
}
public void Dispose()
{
foreach (var cache in sequenceCaches.Values)
cache.Dispose();
sequenceCaches.Clear();
}
}
}

View File

@@ -1,6 +1,6 @@
#region Copyright & License Information
/*
* Copyright 2007-2011 The OpenRA Developers (see AUTHORS)
* 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,
@@ -11,43 +11,41 @@
using System;
using System.Collections.Generic;
using System.Linq;
using OpenRA.FileFormats;
namespace OpenRA.GameRules
{
public class SoundInfo
{
[FieldLoader.Ignore] public readonly Dictionary<string,string[]> Variants;
[FieldLoader.Ignore] public readonly Dictionary<string,string[]> Prefixes;
[FieldLoader.Ignore] public readonly Dictionary<string,string[]> Voices;
[FieldLoader.Ignore] public readonly Dictionary<string,string[]> Notifications;
public readonly string DefaultVariant = ".aud" ;
public readonly string DefaultPrefix = "" ;
[FieldLoader.Ignore] public readonly Dictionary<string, string[]> Variants;
[FieldLoader.Ignore] public readonly Dictionary<string, string[]> Prefixes;
[FieldLoader.Ignore] public readonly Dictionary<string, string[]> Voices;
[FieldLoader.Ignore] public readonly Dictionary<string, string[]> Notifications;
public readonly string DefaultVariant = ".aud";
public readonly string DefaultPrefix = "";
public readonly string[] DisableVariants = { };
public readonly string[] DisablePrefixes = { };
static Dictionary<string, string[]> Load(MiniYaml y, string name)
{
return y.NodesDict.ContainsKey(name)
? y.NodesDict[name].NodesDict.ToDictionary(
a => a.Key,
a => FieldLoader.GetValue<string[]>("(value)", a.Value.Value))
var nd = y.ToDictionary();
return nd.ContainsKey(name)
? nd[name].ToDictionary(my => FieldLoader.GetValue<string[]>("(value)", my.Value))
: new Dictionary<string, string[]>();
}
public readonly Lazy<Dictionary<string, SoundPool>> VoicePools;
public readonly Lazy<Dictionary<string, SoundPool>> NotificationsPools;
public SoundInfo( MiniYaml y )
public SoundInfo(MiniYaml y)
{
FieldLoader.Load( this, y );
FieldLoader.Load(this, y);
Variants = Load(y, "Variants");
Prefixes = Load(y, "Prefixes");
Voices = Load(y, "Voices");
Notifications = Load(y, "Notifications");
VoicePools = Exts.Lazy(() => Voices.ToDictionary(a => a.Key, a => new SoundPool(a.Value)));
NotificationsPools = Exts.Lazy(() => Notifications.ToDictionary( a => a.Key, a => new SoundPool(a.Value) ));
NotificationsPools = Exts.Lazy(() => Notifications.ToDictionary(a => a.Key, a => new SoundPool(a.Value)));
}
}

View File

@@ -0,0 +1,120 @@
#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 System.Linq;
using OpenRA.Effects;
using OpenRA.Traits;
namespace OpenRA.GameRules
{
[Desc("Base warhead class. This can be used to derive other warheads from.")]
public abstract class Warhead
{
[Desc("What types of targets are affected.")]
public readonly string[] ValidTargets = { "Ground", "Water" };
[Desc("What types of targets are unaffected.", "Overrules ValidTargets.")]
public readonly string[] InvalidTargets = { };
[Desc("What diplomatic stances are affected.")]
public readonly Stance ValidStances = Stance.Ally | Stance.Neutral | Stance.Enemy;
[Desc("Can this warhead affect the actor that fired it.")]
public readonly bool AffectsParent = false;
[Desc("Delay in ticks before applying the warhead effect.", "0 = instant (old model).")]
public readonly int Delay = 0;
HashSet<string> validTargetSet;
HashSet<string> invalidTargetSet;
public bool IsValidTarget(IEnumerable<string> targetTypes)
{
if (validTargetSet == null)
validTargetSet = new HashSet<string>(ValidTargets);
if (invalidTargetSet == null)
invalidTargetSet = new HashSet<string>(InvalidTargets);
return validTargetSet.Overlaps(targetTypes) && !invalidTargetSet.Overlaps(targetTypes);
}
/// <summary>Applies the warhead's effect against the target.</summary>
public abstract void DoImpact(Target target, Actor firedBy, IEnumerable<int> damageModifiers);
/// <summary>Checks if the warhead is valid against (can do something to) the target.</summary>
public bool IsValidAgainst(Target target, World world, Actor firedBy)
{
if (target.Type == TargetType.Actor)
return IsValidAgainst(target.Actor, firedBy);
if (target.Type == TargetType.FrozenActor)
return IsValidAgainst(target.FrozenActor, firedBy);
if (target.Type == TargetType.Terrain)
{
var cell = world.Map.CellContaining(target.CenterPosition);
if (!world.Map.Contains(cell))
return false;
var cellInfo = world.Map.GetTerrainInfo(cell);
if (!IsValidTarget(cellInfo.TargetTypes))
return false;
return true;
}
return false;
}
// TODO: This can be removed after the legacy and redundant 0% = not targetable
// assumption has been removed from the yaml definitions
public virtual bool CanTargetActor(ActorInfo victim, Actor firedBy) { return false; }
/// <summary>Checks if the warhead is valid against (can do something to) the actor.</summary>
public bool IsValidAgainst(Actor victim, Actor firedBy)
{
if (!CanTargetActor(victim.Info, firedBy))
return false;
if (!AffectsParent && victim == firedBy)
return false;
var stance = firedBy.Owner.Stances[victim.Owner];
if (!ValidStances.HasFlag(stance))
return false;
// A target type is valid if it is in the valid targets list, and not in the invalid targets list.
var targetable = victim.TraitOrDefault<ITargetable>();
if (targetable == null || !IsValidTarget(targetable.TargetTypes))
return false;
return true;
}
/// <summary>Checks if the warhead is valid against (can do something to) the frozen actor.</summary>
public bool IsValidAgainst(FrozenActor victim, Actor firedBy)
{
if (!CanTargetActor(victim.Info, firedBy))
return false;
// AffectsParent checks do not make sense for FrozenActors, so skip to stance checks
var stance = firedBy.Owner.Stances[victim.Owner];
if (!ValidStances.HasFlag(stance))
return false;
// A target type is valid if it is in the valid targets list, and not in the invalid targets list.
var targetable = victim.Info.Traits.GetOrDefault<ITargetableInfo>();
if (targetable == null || !IsValidTarget(targetable.GetTargetTypes()))
return false;
return true;
}
}
}

View File

@@ -1,6 +1,6 @@
#region Copyright & License Information
/*
* Copyright 2007-2014 The OpenRA Developers (see AUTHORS)
* 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,
@@ -8,90 +8,19 @@
*/
#endregion
using System;
using System.Collections.Generic;
using System.Linq;
using OpenRA.Effects;
using OpenRA.FileFormats;
using OpenRA.Traits;
namespace OpenRA.GameRules
{
public class WarheadInfo
{
[Desc("Distance from the explosion center at which damage is 1/2.")]
public readonly WRange Spread = new WRange(43);
[FieldLoader.LoadUsing("LoadVersus")]
[Desc("Damage vs each armortype. 0% = can't target.")]
public readonly Dictionary<string, float> Versus;
[Desc("Can this damage ore?")]
public readonly bool Ore = false;
[Desc("Explosion effect to use.")]
public readonly string Explosion = null;
[Desc("Palette to use for explosion effect.")]
public readonly string ExplosionPalette = "effect";
[Desc("Explosion effect on hitting water (usually a splash).")]
public readonly string WaterExplosion = null;
[Desc("Palette to use for effect on hitting water (usually a splash).")]
public readonly string WaterExplosionPalette = "effect";
[Desc("Type of smudge to apply to terrain.")]
public readonly string[] SmudgeType = { };
[Desc("Size of the explosion. provide 2 values for a ring effect (outer/inner).")]
public readonly int[] Size = { 0, 0 };
[Desc("Infantry death animation to use")]
public readonly string InfDeath = "1";
[Desc("Sound to play on impact.")]
public readonly string ImpactSound = null;
[Desc("Sound to play on impact with water")]
public readonly string WaterImpactSound = null;
[Desc("How much (raw) damage to deal")]
public readonly int Damage = 0;
[Desc("Delay in ticks before dealing the damage, 0 = instant (old model).")]
public readonly int Delay = 0;
[Desc("Which damage model to use.")]
public readonly DamageModel DamageModel = DamageModel.Normal;
[Desc("Whether we should prevent prone response for infantry.")]
public readonly bool PreventProne = false;
public float EffectivenessAgainst(ActorInfo ai)
{
var health = ai.Traits.GetOrDefault<HealthInfo>();
if (health == null)
return 0f;
var armor = ai.Traits.GetOrDefault<ArmorInfo>();
if (armor == null || armor.Type == null)
return 1;
float versus;
return Versus.TryGetValue(armor.Type, out versus) ? versus : 1;
}
public WarheadInfo(MiniYaml yaml)
{
FieldLoader.Load(this, yaml);
}
static object LoadVersus(MiniYaml y)
{
return y.NodesDict.ContainsKey("Versus")
? y.NodesDict["Versus"].NodesDict.ToDictionary(
a => a.Key,
a => FieldLoader.GetValue<float>("(value)", a.Value.Value))
: new Dictionary<string, float>();
}
}
public enum DamageModel
{
Normal, // classic RA damage model: point actors, distance-based falloff
PerCell, // like RA's "nuke damage"
HealthPercentage // for MAD Tank
}
public class ProjectileArgs
{
public WeaponInfo Weapon;
public float FirepowerModifier = 1.0f;
public IEnumerable<int> DamageModifiers;
public IEnumerable<int> InaccuracyModifiers;
public int Facing;
public WPos Source;
public Actor SourceActor;
@@ -101,32 +30,54 @@ namespace OpenRA.GameRules
public interface IProjectileInfo { IEffect Create(ProjectileArgs args); }
public class WeaponInfo
public sealed class WeaponInfo
{
[Desc("The maximum range the weapon can fire.")]
public readonly WRange Range = WRange.Zero;
[Desc("The sound played when the weapon is fired.")]
public readonly string[] Report = null;
[Desc("Rate of Fire")]
public readonly int ROF = 1;
[Desc("Delay in ticks between reloading ammo magazines.")]
public readonly int ReloadDelay = 1;
[Desc("Number of shots in a single ammo magazine.")]
public readonly int Burst = 1;
public readonly bool Charges = false;
public readonly string Palette = "effect";
[Desc("What types of targets are affected.")]
public readonly string[] ValidTargets = { "Ground", "Water" };
[Desc("What types of targets are unaffected.", "Overrules ValidTargets.")]
public readonly string[] InvalidTargets = { };
[Desc("Delay in ticks between firing shots from the same ammo magazine.")]
public readonly int BurstDelay = 5;
[Desc("The minimum range the weapon can fire.")]
public readonly WRange MinRange = WRange.Zero;
[FieldLoader.LoadUsing("LoadProjectile")] public IProjectileInfo Projectile;
[FieldLoader.LoadUsing("LoadWarheads")] public List<WarheadInfo> Warheads;
[FieldLoader.LoadUsing("LoadProjectile")]
public readonly IProjectileInfo Projectile;
[FieldLoader.LoadUsing("LoadWarheads")]
public readonly List<Warhead> Warheads = new List<Warhead>();
readonly HashSet<string> validTargetSet;
readonly HashSet<string> invalidTargetSet;
public WeaponInfo(string name, MiniYaml content)
{
FieldLoader.Load(this, content);
validTargetSet = new HashSet<string>(ValidTargets);
invalidTargetSet = new HashSet<string>(InvalidTargets);
}
static object LoadProjectile(MiniYaml yaml)
{
MiniYaml proj;
if (!yaml.NodesDict.TryGetValue("Projectile", out proj))
if (!yaml.ToDictionary().TryGetValue("Projectile", out proj))
return null;
var ret = Game.CreateObject<IProjectileInfo>(proj.Value + "Info");
FieldLoader.Load(ret, proj);
@@ -135,57 +86,39 @@ namespace OpenRA.GameRules
static object LoadWarheads(MiniYaml yaml)
{
var ret = new List<WarheadInfo>();
foreach (var w in yaml.Nodes)
if (w.Key.Split('@')[0] == "Warhead")
ret.Add(new WarheadInfo(w.Value));
var retList = new List<Warhead>();
foreach (var node in yaml.Nodes.Where(n => n.Key.StartsWith("Warhead")))
{
var ret = Game.CreateObject<Warhead>(node.Value.Value + "Warhead");
FieldLoader.Load(ret, node.Value);
retList.Add(ret);
}
return ret;
return retList;
}
public bool IsValidAgainst(Actor a)
public bool IsValidTarget(IEnumerable<string> targetTypes)
{
var targetable = a.TraitOrDefault<ITargetable>();
if (targetable == null || !ValidTargets.Intersect(targetable.TargetTypes).Any()
|| InvalidTargets.Intersect(targetable.TargetTypes).Any())
return false;
if (Warheads.All(w => w.EffectivenessAgainst(a.Info) <= 0))
return false;
return true;
return validTargetSet.Overlaps(targetTypes) && !invalidTargetSet.Overlaps(targetTypes);
}
public bool IsValidAgainst(FrozenActor a)
{
var targetable = a.Info.Traits.GetOrDefault<ITargetableInfo>();
if (targetable == null || !ValidTargets.Intersect(targetable.GetTargetTypes()).Any()
|| InvalidTargets.Intersect(targetable.GetTargetTypes()).Any())
return false;
if (Warheads.All(w => w.EffectivenessAgainst(a.Info) <= 0))
return false;
return true;
}
public bool IsValidAgainst(Target target, World world)
/// <summary>Checks if the weapon is valid against (can target) the target.</summary>
public bool IsValidAgainst(Target target, World world, Actor firedBy)
{
if (target.Type == TargetType.Actor)
return IsValidAgainst(target.Actor);
return IsValidAgainst(target.Actor, firedBy);
if (target.Type == TargetType.FrozenActor)
return IsValidAgainst(target.FrozenActor);
return IsValidAgainst(target.FrozenActor, firedBy);
if (target.Type == TargetType.Terrain)
{
var cell = target.CenterPosition.ToCPos();
if (!world.Map.IsInMap(cell))
var cell = world.Map.CellContaining(target.CenterPosition);
if (!world.Map.Contains(cell))
return false;
var cellInfo = world.GetTerrainInfo(cell);
if (!ValidTargets.Intersect(cellInfo.TargetTypes).Any()
|| InvalidTargets.Intersect(cellInfo.TargetTypes).Any())
var cellInfo = world.Map.GetTerrainInfo(cell);
if (!IsValidTarget(cellInfo.TargetTypes))
return false;
return true;
@@ -193,5 +126,46 @@ namespace OpenRA.GameRules
return false;
}
/// <summary>Checks if the weapon is valid against (can target) the actor.</summary>
public bool IsValidAgainst(Actor victim, Actor firedBy)
{
var targetable = victim.TraitOrDefault<ITargetable>();
if (targetable == null || !IsValidTarget(targetable.TargetTypes))
return false;
if (!Warheads.Any(w => w.IsValidAgainst(victim, firedBy)))
return false;
return true;
}
/// <summary>Checks if the weapon is valid against (can target) the frozen actor.</summary>
public bool IsValidAgainst(FrozenActor victim, Actor firedBy)
{
var targetable = victim.Info.Traits.GetOrDefault<ITargetableInfo>();
if (targetable == null || !IsValidTarget(targetable.GetTargetTypes()))
return false;
if (!Warheads.Any(w => w.IsValidAgainst(victim, firedBy)))
return false;
return true;
}
/// <summary>Applies all the weapon's warheads to the target.</summary>
public void Impact(Target target, Actor firedBy, IEnumerable<int> damageModifiers)
{
foreach (var warhead in Warheads)
{
var wh = warhead; // force the closure to bind to the current warhead
Action a = () => wh.DoImpact(target, firedBy, damageModifiers);
if (wh.Delay > 0)
firedBy.World.AddFrameEndTask(w => w.Add(new DelayedAction(wh.Delay, a)));
else
a();
}
}
}
}

View File

@@ -1,6 +1,6 @@
#region Copyright & License Information
/*
* Copyright 2007-2014 The OpenRA Developers (see AUTHORS)
* 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,
@@ -15,7 +15,8 @@ namespace OpenRA.Graphics
{
public class Animation
{
public Sequence CurrentSequence { get; private set; }
readonly int defaultTick = 40; // 25 fps == 40 ms
public ISpriteSequence CurrentSequence { get; private set; }
public bool IsDecoration = false;
public Func<bool> Paused;
@@ -23,9 +24,11 @@ namespace OpenRA.Graphics
int frame = 0;
bool backwards = false;
bool tickAlways;
string name;
bool tickAlways;
public string Name { get { return name; } }
readonly SequenceProvider sequenceProvider;
@@ -40,7 +43,7 @@ namespace OpenRA.Graphics
{
this.sequenceProvider = sequenceProvider;
this.name = name.ToLowerInvariant();
this.tickFunc = () => {};
this.tickFunc = () => { };
this.facingFunc = facingFunc;
}
@@ -76,6 +79,8 @@ namespace OpenRA.Graphics
backwards = false;
tickAlways = false;
CurrentSequence = sequenceProvider.GetSequence(name, sequenceName);
timeUntilNextFrame = CurrentSequence != null ? CurrentSequence.Tick : defaultTick;
frame = 0;
tickFunc = () =>
{
@@ -91,6 +96,8 @@ namespace OpenRA.Graphics
return false;
CurrentSequence = sequenceProvider.GetSequence(name, sequenceName);
var tick = CurrentSequence != null ? CurrentSequence.Tick : defaultTick;
timeUntilNextFrame = Math.Min(tick, timeUntilNextFrame);
frame %= CurrentSequence.Length;
return true;
}
@@ -100,6 +107,8 @@ namespace OpenRA.Graphics
backwards = false;
tickAlways = false;
CurrentSequence = sequenceProvider.GetSequence(name, sequenceName);
timeUntilNextFrame = CurrentSequence != null ? CurrentSequence.Tick : defaultTick;
frame = 0;
tickFunc = () =>
{
@@ -124,6 +133,8 @@ namespace OpenRA.Graphics
backwards = false;
tickAlways = true;
CurrentSequence = sequenceProvider.GetSequence(name, sequenceName);
timeUntilNextFrame = CurrentSequence != null ? CurrentSequence.Tick : defaultTick;
frame = func();
tickFunc = () => frame = func();
}
@@ -149,7 +160,7 @@ namespace OpenRA.Graphics
while (timeUntilNextFrame <= 0)
{
tickFunc();
timeUntilNextFrame += CurrentSequence != null ? CurrentSequence.Tick : 40; // 25 fps == 40 ms
timeUntilNextFrame += CurrentSequence != null ? CurrentSequence.Tick : defaultTick;
}
}
}
@@ -166,7 +177,7 @@ namespace OpenRA.Graphics
}
}
public Sequence GetSequence(string sequenceName)
public ISpriteSequence GetSequence(string sequenceName)
{
return sequenceProvider.GetSequence(name, sequenceName);
}

View File

@@ -1,6 +1,6 @@
#region Copyright & License Information
/*
* Copyright 2007-2011 The OpenRA Developers (see AUTHORS)
* 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,
@@ -50,5 +50,4 @@ namespace OpenRA.Graphics
return new AnimationWithOffset(a, null, null, null, null);
}
}
}
}

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