Compare commits

...

2746 Commits

Author SHA1 Message Date
Oliver Brakmann
bd6bcda6d0 Merge pull request #9993 from pchote/nsprocess-fix
Switch to a (hopefully) working NSProcess url.
2015-11-14 22:52:56 +01:00
Paul Chote
f12deca9ca Switch to a (hopefully) working NSProcess url. 2015-11-14 21:47:21 +00:00
Oliver Brakmann
5ea82b4e5e Increase range of flak truck against air targets
From 6 cells to 8 cells
2015-11-14 22:10:40 +01:00
DArcy Rush
2d210a97df Rebalance Tesla Tank.
Allow attacking of target regardless of facing.
2015-11-14 22:10:40 +01:00
DArcy Rush
f03a100115 Rebalance phase transport.
Passengers increased to 4, speed and LoS increased.
2015-11-14 22:10:40 +01:00
DArcy Rush
1e30684782 Reduce chronotank charge time.
Chronotank charge decreased from 20s to 12s.
2015-11-14 22:10:40 +01:00
Curtis Shmyr
abb45197b1 lower InfiltrateForPowerOutage time from 30->20sec 2015-11-14 19:34:37 +00:00
Paul Chote
a7935f6166 Check deploy location at the time of transform. 2015-11-14 16:46:18 +01:00
Oliver Brakmann
7b75a9c2f7 Fix reinforcements appearing in soviet04a/b despite killed radar dome 2015-11-14 15:01:51 +02:00
reaperrr
9b694f6044 Fix spice bloom editor visibility 2015-11-14 12:09:07 +00:00
Biofreak1987
0a75019aa0 Fix ai building in soviet04/06 missions despite killed construction yard 2015-11-13 20:53:26 +01:00
Biofreak1987
d3e41b6d50 Fix nod05 airstrike Lua crash and update map rules
- Fix airstrike Lua crash when there are no targets
- Increased harvester search range
- Hide owner row from husks and walls

Changes to make it closer to the original:
- Added e3 and sandbag production
- Made airstrikes gdi only
- Limited airstrike squadsize to 1
- Allow to attack civilian buildings
2015-11-12 22:52:38 +01:00
Oliver Brakmann
18f3e1f57b Merge pull request #9971 from pchote/tooltip-fix
Fix map editor crash
2015-11-12 19:32:02 +01:00
Paul Chote
1760f8acd6 Fix tooltip colour definition. 2015-11-11 23:15:33 +00:00
Pavel Penev
4154553318 Validate player color when changing slots in the lobby 2015-11-11 22:59:48 +00:00
Oliver Brakmann
e5e8e64ace Fix bogus owner check in Lua API production code 2015-11-11 22:24:05 +00:00
OmegaBolt
0ae58c10ad D2k thumper worm attraction balance 2015-11-11 23:01:53 +02:00
Paul Chote
89ea810cbe Truncate player name in replay browser. 2015-11-11 22:40:00 +02:00
Paul Chote
f6cf35c99c Truncate player name in observer stats and diplomacy panels. 2015-11-11 22:39:52 +02:00
Paul Chote
5fbaeabb6d Truncate player name in ingame menu stats. 2015-11-11 22:39:37 +02:00
Paul Chote
581907f53a Prevent frozen actors leaking through shroud. 2015-11-11 22:33:16 +02:00
Paul Chote
7cf4be9d78 Add copy/paste to the map editor. 2015-11-11 01:02:16 +02:00
Paul Chote
bdf9f5e201 Make editor brushes disposable. 2015-11-11 01:02:09 +02:00
Pavel Penev
b26b1f410f Enable AutoTarget to aquire targets under fog if GPS is present 2015-11-10 22:27:40 +01:00
OmegaBolt
ce69abe1f2 D2k fixed armour & AI typos 2015-11-10 22:04:09 +01:00
atlimit8
b3d2b36875 Make ActorSelector tooltips better match actor tooltips in map editor 2015-11-10 21:08:53 +01:00
atlimit8
f28b37323f Made editor actor preview tooltip easier to read 2015-11-10 21:08:53 +01:00
atlimit8
7c82ab60e8 Multiline support for SimpleTooltipLogic 2015-11-10 21:08:53 +01:00
Zimmermann Gyula
d14fbd0f84 Fix observer GUI showing disabled support powers. 2015-11-09 21:07:19 +01:00
OmegaBolt
c567f5cbdd D2k super weapon timers 2015-11-09 21:51:02 +02:00
OmegaBolt
51a9831fc2 D2k Ornithopter bomb damage increase 2015-11-09 19:58:36 +01:00
OmegaBolt
4d5777cbc9 D2k, fixed infantry moving slow on dunes and rough 2015-11-08 21:59:07 +02:00
Paul Chote
a6a835d95f Truncate long player names in lobby. 2015-11-08 17:24:24 +02:00
Paul Chote
e16be14ec7 Truncate long server names in MP browser. 2015-11-08 17:24:19 +02:00
Paul Chote
11939d3af1 Truncate long map name in replay browser. 2015-11-08 17:24:13 +02:00
Paul Chote
feb133c2eb Truncate long map name / mod version in MP panel. 2015-11-08 17:24:02 +02:00
Paul Chote
f6361b031b Truncate long map name / author in map chooser. 2015-11-08 17:23:56 +02:00
Paul Chote
36967951e6 Truncate long map name / author in lobby. 2015-11-08 17:23:39 +02:00
Paul Chote
012a9d71ba Add helpers for truncating long labels. 2015-11-08 17:23:31 +02:00
Paul Chote
cff369850c Set the default map location to the support dir. 2015-11-08 14:49:38 +02:00
DArcy Rush
136b4c0fa9 Add self to AUTHORS. 2015-11-08 11:40:37 +00:00
DArcy Rush
aae2459d0b Move blossom trees south one cell in cnc64gdi01. 2015-11-08 11:40:27 +00:00
teees
d47ba1d135 only change editor brushes on mouseup
let other uses of the right mouse button bubble up
2015-11-08 11:30:25 +00:00
teees
133cffff24 Handle mouse up event in default editor brush 2015-11-08 11:30:08 +00:00
Oliver Brakmann
52f6c993d5 Fix lint warning in gdi06 2015-11-08 11:17:22 +00:00
Biofreak1987
21eecb048d Fix soviet06 prerequisites 2015-11-08 09:48:47 +01:00
Oliver Brakmann
b97398a671 Fix typo in WeatherOverlayInfo 2015-11-08 09:14:22 +01:00
Curtis Shmyr
a285c908db Added 3 Lua player API properties 2015-11-08 08:53:15 +01:00
reaperrr
35b39162ff Fix spice debris target cell randomization 2015-11-07 18:32:21 +01:00
reaperrr
0b5b6adc7c Improve SpiceExplosion and add BloomExplosion
Fixes angle and loudness of spice debris, adds BloomExplosion to add proper animation and damage crushing actors.
2015-11-07 18:32:14 +01:00
reaperrr
5357eb6f29 Increase variation and average of spice bloom growth 2015-11-07 18:32:04 +01:00
reaperrr
e274ac5ff8 Make sure that a spice bloom spawns at least the minimum of pieces 2015-11-07 18:31:59 +01:00
reaperrr
f8e39bd142 Reduce spawned spice per piece 2015-11-07 18:31:56 +01:00
Pavel Penev
48881f4e73 Fix repair pad reference in units' Repairable trait 2015-11-07 18:31:52 +01:00
Pavel Penev
d2eb56183d Buff D2k repair pads 2015-11-07 18:10:40 +01:00
reaperrr
afd75c7f55 Fix WithSpriteRotorOverlay upgrade rule to account for @ separator 2015-11-07 16:18:29 +02:00
reaperrr
6d1551c9fd Change engineVersion for upgrade rules of changes made between 20150808 and 20150919
Those changes were merged after the feature-freeze, but predate the stable release. Changing the engine version to the day after release makes it easier for modders to upgrade without using bogus engine dates.
2015-11-07 16:18:18 +02:00
Paul Chote
a015b0990b Fetch battlefield news once per game launch. 2015-11-07 14:13:31 +02:00
Paul Chote
6dd08bbc98 Fix global chat line margins. 2015-11-07 12:43:14 +01:00
Paul Chote
343616e924 Add unread message count to lobby chat tabs. 2015-11-07 12:43:03 +01:00
Paul Chote
91242a832f Add Tick method to ChromeLogic. 2015-11-07 12:43:03 +01:00
OmegaBolt
1c53bfed11 D2k crate balance
- Fixed prerequisites.
- Added more infantry crates.
- Upped the create explosion damage, though it is still very little. Takes about a third health off a Trike.
2015-11-06 19:47:34 +01:00
RoosterDragon
e5e7d037a3 Remove event handler when disposed in MainMenuLogic.
Removes a static event handler to Game.OnRemoteDirectConnect which allow the GC to reclaim the MainMenuLogic class after it has been disposed.
2015-11-05 22:49:25 +01:00
RoosterDragon
2a301392c6 Remove event handlers to CellEntryChanged when done.
Several classes would attach event handlers to the Map which would live longer then they did. Detaching them when no longer needed allows the GC to reclaim them.
2015-11-05 22:49:25 +01:00
RoosterDragon
e35bb8ea95 Detach event handlers on dispose in TerrainSpriteLayer.
The WorldRenderer outlives the TerrainSpriteLayer and thus keeps it alive longer than expected via the event handler. We detach it to allow the GC to reclaim it.
2015-11-05 22:49:25 +01:00
Pavel Penev
7a4002ff08 Fix the C17 delivery plane doing a steep dive when trying to land 2015-11-05 19:49:04 +00:00
RoosterDragon
523fe20255 Work around a hang on shutdown caused by IRC.
Our IRC client doesn't shut down properly - but we only need to shut it down when we're about to close the game anyway, so we just don't bother since it won't hurt anybody.
2015-11-05 20:42:15 +01:00
Zimmermann Gyula
31e0c8b2e3 Fix (HealthPercentage)DamageWarheads ignoring stances/TargetTypes.
Moves the IsValidAgainst check from SpreadDamage level to Damage level
and adds a duplication to HealthPercentageDamageWarhead.
2015-11-04 22:34:48 +00:00
Pavel Penev
7c37d1cfcc Fix server filter width 2015-11-04 22:31:27 +01:00
Oliver Brakmann
8e76a109bd Fix viceroids being spawned by crushed infantry 2015-11-03 10:33:40 +00:00
Michael Rätzel
ba9b18ccb7 reset RallyPoint Location after capture. resolves #9163. 2015-10-31 21:59:03 +01:00
Oliver Brakmann
c61d028069 Merge pull request #9829 from pchote/fixup-install
Add IRC library to the install rules.
2015-10-31 20:44:47 +01:00
Paul Chote
bcebba3a2f Add IRC library to the install rules. 2015-10-31 19:39:59 +00:00
Pavel Penev
ef1e217a2a Merge pull request #9825 from reaperrr/d2k-stealth-det
Add infantry stealth detection to D2k
2015-10-31 20:18:15 +02:00
reaperrr
82d00c22b2 Merge pull request #9821 from abcdefg30/hijackerspeed
Increase the speed of HIJACKER
2015-10-31 18:09:16 +01:00
Pavel Penev
499eba944a Merge pull request #9822 from reaperrr/fix-ts-sensor
Fix TS sensor array DetectCloaked range
2015-10-31 18:52:51 +02:00
reaperrr
124989c6c6 Add stealth detection to D2k infantry 2015-10-31 17:39:10 +01:00
reaperrr
283e864f73 Fix TS sensor array DetectCloaked range 2015-10-31 16:29:05 +01:00
abcdefg30
16dbdebb72 Increase the speed of HIJACKER 2015-10-31 16:08:16 +01:00
Pavel Penev
9ae4114d26 Merge pull request #9771 from reaperrr/d2k-thumper
Implement D2k thumper
2015-10-31 15:47:33 +02:00
Pavel Penev
0ca370e2ae Merge pull request #9813 from atlimit8/FixRallyPointColor
RallyPoint palette tracks owner
2015-10-31 15:12:45 +02:00
Pavel Penev
a263f18824 Merge pull request #9812 from obrakmann/fix9811_missing-production-bar-after-capture
Fix missing production bar on captured factories
2015-10-31 15:04:48 +02:00
reaperrr
2e0a8ef9c4 Make sandworms not eat infantry 2015-10-31 13:44:00 +01:00
reaperrr
f220a18fef Align thumper-sand overlay with thump anim 2015-10-31 13:43:59 +01:00
reaperrr
dbaf7e9d12 Add D2k thumper sound 2015-10-31 13:43:58 +01:00
reaperrr
bbf5a4a06d Make AmbientSound upgradable and add customisable interval 2015-10-31 13:43:57 +01:00
reaperrr
85de71514d Merge pull request #9818 from pchote/fix-latency
Fix singleplayer game latency.
2015-10-31 12:44:33 +01:00
Paul Chote
64498b1ea7 Fix singleplayer game latency. 2015-10-31 11:36:32 +00:00
atlimit8
faa1a49604 RallyPoint palette tracks owner 2015-10-30 20:09:39 -05:00
Oliver Brakmann
b1e6916838 Add missing Requires<> to ProductionBar 2015-10-31 00:24:41 +01:00
Oliver Brakmann
9843d10dbd Fix production bars not being visible on captured factories 2015-10-31 00:00:08 +01:00
reaperrr
b6229fd456 Implement D2k thumper 2015-10-30 14:23:37 +01:00
atlimit8
168dab9707 Merge pull request #9706 from reaperrr/block-height
Add Height property to BlocksProjectiles
2015-10-29 23:51:14 -05:00
abcdefg30
a1f27c6133 Merge pull request #9796 from obrakmann/fix9784_missing-base-range-circle
Fix base range circle not being shown during building placement
2015-10-29 21:58:48 +01:00
Oliver Brakmann
e7e4f2f825 Fix base range circle not being shown during building placement 2015-10-29 11:00:59 +01:00
Oliver Brakmann
0997f5b52f Merge pull request #9773 from Mailaender/musictab-dereference
Fixed musicTab = null return value from GetOrNull<ButtonWidget>
2015-10-28 21:53:59 +01:00
Oliver Brakmann
bdf71eabf3 Merge pull request #9777 from teees/repulsion-fix
calculate correct altitude with terrain elevation offset (aircraft repulsion)
2015-10-28 20:56:53 +01:00
Oliver Brakmann
c89bced9f0 Merge pull request #9782 from atlimit8/AircraftIsMovingAboveGround
Fix Aircaft.IsMoving Check
2015-10-28 20:45:15 +01:00
Oliver Brakmann
f69ab464af Merge pull request #9785 from abcdefg30/upgradeExit
Fix upgrades in d2k not being producible
2015-10-27 21:36:24 +01:00
abcdefg30
687f459fbc Merge pull request #9611 from obrakmann/fix3285_default-stance-defend
Change the default stance to Defend for human players
2015-10-27 21:21:43 +01:00
abcdefg30
f72dd97844 Fix upgrades in d2k not being producible 2015-10-27 21:17:53 +01:00
Oliver Brakmann
a0fdfc3f79 Add testcase for StanceInit 2015-10-27 19:41:49 +01:00
Oliver Brakmann
b096671acb Add an ActorInit for unit stances 2015-10-27 19:41:49 +01:00
Oliver Brakmann
1a879009f1 Change InitialStance to Defend for human players 2015-10-27 19:41:49 +01:00
atlimit8
2772ddbab4 Fix Aircaft.IsMoving Check 2015-10-27 10:45:45 -05:00
teees
3f718ae7d5 calculate correct altitude with terrain elevation offset 2015-10-27 11:19:56 +01:00
atlimit8
549f8a9e7c Merge pull request #9760 from pchote/fix-teleporting-harvesters
Fix harvesters teleporting through doors
2015-10-26 23:42:51 -05:00
Matthias Mailänder
d2ce79e580 avoid a possible null return value musicTab 2015-10-26 21:45:40 +01:00
Oliver Brakmann
8b2245ad4e Merge pull request #9772 from Mailaender/multiplayer-dereference
Fixed filtersButton = null return value from GetOrNull<DropDownButtonWidget>
2015-10-26 21:30:45 +01:00
Matthias Mailänder
e435864531 don't dereference null return value 2015-10-26 21:21:47 +01:00
Oliver Brakmann
bfdac57138 Merge pull request #9676 from reaperrr/d2k-falloff
Tweaked D2k warhead falloffs
2015-10-26 21:12:45 +01:00
Oliver Brakmann
2723ca1a1f Merge pull request #9615 from reaperrr/d2k-rest1
Remaining D2k changes to restore original balancing/gameplay
2015-10-26 21:03:12 +01:00
Oliver Brakmann
d07ac08dff Merge pull request #9458 from reaperrr/d2k-sight
Change D2k shroud revealing ranges to match original
2015-10-26 20:49:52 +01:00
reaperrr
f166fd9525 Merge pull request #9526 from penev92/tileShapes
Rename TileShape to fit its role better
2015-10-26 15:41:09 +01:00
reaperrr
ce43d02dbc Reduce range and number of D2k building debris
Fix debris warhead falloff
2015-10-26 15:14:11 +01:00
reaperrr
0d990d2818 Calculate D2k building visibility around center instead of footprint 2015-10-26 15:14:10 +01:00
reaperrr
3ce1ee24ae Make only light infantry come out of destroyed D2k buildings 2015-10-26 15:14:09 +01:00
reaperrr
0d2c9725ea Tweak D2k infantry bounds 2015-10-26 15:14:08 +01:00
reaperrr
793b72b3ba Tone down D2k veterancy stat gains 2015-10-26 15:14:07 +01:00
reaperrr
d469e073bc Disable D2k capturing of husks, make husks explode 2015-10-26 15:14:06 +01:00
reaperrr
e37729f634 Tweak D2k worm disappear chance, spawn interval and minimum 2015-10-26 15:14:05 +01:00
reaperrr
7fdc8f9ad9 Make D2k constr. yard explicit prerequisite
In preparation for moving Upgrades to the player actor in the future.

Additionally remove unnecessary Exit trait from construction yard.
2015-10-26 15:12:16 +01:00
abcdefg30
91fda29f84 Merge pull request #9769 from RoosterDragon/fix-replay-2-the-fixining
Fix replay freeze 2
2015-10-26 12:19:38 +01:00
abcdefg30
86df9f66e8 Merge pull request #9718 from penev92/hvaException
Check HVA files validity at load time
2015-10-26 12:14:28 +01:00
Pavel Penev
905d46bd99 Merge pull request #9723 from evgeniysergeev/fix_sprite
flip or mirror sprites with negative width and height
2015-10-26 01:31:15 +02:00
Pavel Penev
5f7ecbe0af Merge pull request #9767 from obrakmann/fix-cnc-plane-max-pitch
Change aircraft's maximum pitch in TD to match the increased cruise altitude
2015-10-26 01:21:19 +02:00
Pavel Penev
b16ebd480b Rename MapGridType.Diamond to MapGridType.RectangularIsometric 2015-10-26 00:42:30 +02:00
Pavel Penev
0e417a3cf3 Rename MapGridType.Rectangle to MapGridType.Rectangular 2015-10-26 00:41:26 +02:00
Pavel Penev
bb3aea338a Rename enum TileShape to MapGridType 2015-10-26 00:41:21 +02:00
Pavel Penev
84db36d3e8 Check HVA files validity at load time 2015-10-26 00:25:28 +02:00
RoosterDragon
36a1715e5c Ensure replays end when the recorder disconnects.
When ReplayConnection fixes up disconnection packets, this allows the game to continue past the point of a player disconnecting. Unfortunately this also applies to the player who actually disconnected which means the replay continues in an invalid manner. To fix this - we now explicitly don't replace their packet in order to ensure such replays end at the correct time.
2015-10-25 21:22:44 +00:00
RoosterDragon
0ca1805ea7 Merge pull request #9389 from Herve-M/fix-replay
Fix replay freeze
2015-10-25 21:20:11 +00:00
Oliver Brakmann
744d66955a Merge pull request #9749 from RoosterDragon/delay-toctou-fixes
Fix TOCTOU issues when calling Game.RunAfterDelay
2015-10-25 21:16:15 +01:00
RoosterDragon
7c889c5ef0 Fix TOCTOU issues when calling Game.RunAfterDelay.
Since the action runs after a delay, the state of the game may no longer be the same and it may no longer be valid to run the action. Anything that references the world now calls IsCurrentWorld to ensure the world hasn't changed or been disposed.
2015-10-25 19:44:21 +00:00
Oliver Brakmann
8eb2a380f7 Change aircraft's maximum pitch in TD to match the increased cruise altitude 2015-10-25 20:01:55 +01:00
abcdefg30
d10dd5c9d9 Merge pull request #9758 from reaperrr/fix-barrel-seldeco
Fix #9751 - Replace Selectable with CustomSelectionSize on RA barrels
2015-10-25 18:51:02 +01:00
abcdefg30
f5ab218c4f Merge pull request #9766 from obrakmann/fix-d2k-missing-replaybrowser
Add replaybrowser yaml file back to d2k manifest.
2015-10-25 18:43:58 +01:00
atlimit8
10aca92bef Merge pull request #9720 from penev92/fixUtility
Fix a crash in CheckPlayers when an actor doesn't define an Owner
2015-10-25 12:41:50 -05:00
Matthias Mailänder
e0dffe773c Merge pull request #9550 from clemty/gdi06
Add gdi06
2015-10-25 18:27:33 +01:00
Matthias Mailänder
d4016ae6f0 Merge pull request #9716 from teees/hover-fix
Disable hovering for landed aircraft
2015-10-25 18:01:29 +01:00
Oliver Brakmann
356b50fb18 Add replaybrowser yaml file back to d2k manifest. 2015-10-25 18:00:02 +01:00
reaperrr
bdfbbb540b Misc D2k visibility changes
- Make structure reveal range centered around CenterPosition.
- Change camera range
2015-10-25 17:38:00 +01:00
reaperrr
2c88015bb3 Change D2k vehicle shroud reveal ranges to original values 2015-10-25 17:37:59 +01:00
reaperrr
3ce670998a Change D2k shroud reveal ranges to original values 2015-10-25 17:37:57 +01:00
reaperrr
63aeb6b2d5 Change D2k infantry shroud reveal ranges to match original 2015-10-25 17:37:55 +01:00
Matthias Mailänder
86ddcf05a1 Merge pull request #9764 from Biofreak1987/fix_soviet06
Fix unit production in soviet06
2015-10-25 17:37:31 +01:00
Pavel Penev
0487ec0d08 Fix a crash in CheckPlayers when an actor doesn't define an Owner 2015-10-25 17:11:51 +02:00
Pavel Penev
06ba175fde Merge pull request #9762 from obrakmann/fix7926_fix_td_sams_not_closing
Fix TD SAM sites not closing after killing a target.
2015-10-25 16:12:37 +02:00
atlimit8
7c1e93a880 Merge pull request #9730 from r34ch/fake-structures-detonate
Fake structures detonate to mask health difference.
2015-10-25 09:12:02 -05:00
Biofreak1987
454ac1edaf Fix soviet06 unit production 2015-10-25 14:55:56 +01:00
reaperrr
02fcdb80d6 Re-increase siege tank and grenadier area of effect
Siege Tank:
- 'Stretches' each Spread step by 1 pixel (from 12 to 13), increasing total area of effect from 48 pixels (1.5 cells) to 52 pixels (1.625 cells)
- increases falloff damage by 5 percentage points

Grenadier:
- same Falloff as Siege Tank
2015-10-25 14:05:23 +01:00
DArcy Rush
60ad19b625 Fake structures use 'DamageThreshold' under 'Explodes'.
This change means that fake structures take damage at the same
rate as their real counterparts, but explode at 90% of their
max health.

MSLF and PDOF have been given a health buff as only one fake
version of each can be built.

Also fixed mission Monster Tank Madness. Actor v19.Husk required
HealthInfo.
2015-10-25 11:51:27 +00:00
Pavel Penev
82144ce975 Merge pull request #9738 from abcdefg30/loadimport
Fix the legacy map importer not working
2015-10-25 13:41:29 +02:00
Oliver Brakmann
3d4500a86e Fix TD SAM sites not closing after killing a target.
This fix will not make the SAM close if the target is still alive and got out of range.
2015-10-25 12:40:09 +01:00
abcdefg30
7210883e71 Merge pull request #9754 from atlimit8/LuaArraysToTables
Convert Lua array-like structures to use named entries.
2015-10-25 11:43:13 +01:00
Paul Chote
68bdedb9ba Make the production exit wait uncancellable. 2015-10-25 10:41:17 +00:00
reaperrr
80e6e024d8 Replace Selectable with CustomSelectionSize on RA barrels
This still allows targeting them, but you neither see their health bar on mouse-over, nor can you select them (effectively making their health bar and selection box invisible).
2015-10-25 10:01:14 +01:00
Matthias Mailänder
8e6c5cef74 Merge pull request #9757 from Biofreak1987/add_to_authors
Add myself to AUTHORS
2015-10-25 09:22:00 +01:00
reaperrr
1c98dc9a62 Remove SpiceExplosion impact sound
Way too annoying, and the original didn't have this either.
2015-10-25 09:16:20 +01:00
reaperrr
fe85458dde Fix animations and sounds of explosions
Animation for small and medium explosion was reversed, sounds were wrong compared to original.
2015-10-25 09:15:36 +01:00
reaperrr
943e43a738 Remove unnecessary D2k ValidTargets entries 2015-10-25 09:15:35 +01:00
reaperrr
2a6a46f120 Remove redundant 100% versus values from D2k warheads 2015-10-25 09:15:34 +01:00
reaperrr
064a008f3e Make D2k bazooka and quad rocket more inaccurate 2015-10-25 09:15:33 +01:00
reaperrr
64b4e92ab2 Tweaked D2k warhead falloffs 2015-10-25 09:15:32 +01:00
Biofreak1987
f02d87fa35 Add myself to AUTHORS 2015-10-25 09:15:15 +01:00
atlimit8
128574723a Merge pull request #9753 from RoosterDragon/better-actor-lookups
Improve some actor queries
2015-10-25 02:38:21 -05:00
Matthias Mailänder
40a7ab5a6a Merge pull request #9628 from abcdefg30/luatime
Fix Utils.FormatTime not working properly on different game speeds
2015-10-25 07:49:01 +01:00
Matthias Mailänder
3dc765f7c1 Merge pull request #9744 from pchote/serverbrowser
Redesign the MP server browser.
2015-10-25 07:32:04 +01:00
Matthias Mailänder
83399277b5 Merge pull request #9717 from teees/emp-disable-extensions
Let emp effect buildings and cyborgs too
2015-10-25 07:20:26 +01:00
atlimit8
f79ac636f2 Convert Lua array-like structures to use named entries 2015-10-25 00:36:04 -05:00
RoosterDragon
30aee56d78 Improve some actor queries.
Use ActorsWithTrait if possible to avoid querying all actors in the world.
2015-10-25 01:19:29 +01:00
DArcy Rush
c0850e44f4 Explodes trait has new 'DamageThreshold' property.
An actor will explode when its health is below the
defined percentage of its max health.
2015-10-24 23:02:42 +01:00
abcdefg30
e65465c539 Fix Utils.FormatTime not working properly on different game speeds 2015-10-24 23:42:32 +02:00
Paul Chote
e0177d7798 Merge pull request #9494 from abcdefg30/luabackground
Add lua support for playing background music
2015-10-24 22:25:35 +01:00
Paul Chote
be37717e6d Account for cross-mod tile shapes in map previews. 2015-10-24 22:02:46 +01:00
Paul Chote
c0f42904f0 Overhaul the server browser. 2015-10-24 21:58:31 +01:00
Paul Chote
2a210a7314 Fix some lobby yaml nits. 2015-10-24 21:38:09 +01:00
Paul Chote
c87c2270ca Merge pull request #9668 from abcdefg30/balanceRA
RA-Balance changes for the next playtest
2015-10-24 21:16:52 +01:00
Oliver Brakmann
c62d1a395b Merge pull request #9748 from pchote/map-metadata-lint
Add a lint pass for map format/author/title.
2015-10-24 22:13:49 +02:00
Paul Chote
347eb6410c Add a lint pass for map metadata. 2015-10-24 20:36:38 +01:00
Paul Chote
f425323965 Merge pull request #9702 from reaperrr/d2k-airspeed
Increase D2k aircraft speed
2015-10-24 20:35:19 +01:00
abcdefg30
90968022cb Merge pull request #9703 from reaperrr/fix-tanya9673
Fix Tanya's Colt targeting buildings
2015-10-24 21:21:03 +02:00
abcdefg30
caaa779da4 Merge pull request #9736 from obrakmann/fix9693_lua-attack-broken
Fix broken scripted attacks in some missions
2015-10-24 21:18:45 +02:00
Oliver Brakmann
63c687cdce Merge pull request #9746 from matija-hustic/missile_submarine
Revert missile explosion condition to strictly less than zero
2015-10-24 20:11:50 +02:00
Matija Hustić
8f4543c1e1 Changed TD Advanced Guard Tower's firing height 2015-10-24 19:54:36 +02:00
RoosterDragon
bf7aace592 Merge pull request #9714 from Phrohdoh/fix_9713
Fix misleading Utility message.
2015-10-24 18:22:55 +01:00
Matija Hustić
7ca8d85771 Revert explosion condition to strictly less than zero 2015-10-24 18:20:18 +02:00
reaperrr
663de1a6ea Merge pull request #9731 from obrakmann/fix9647_9727_remove_tesla_boost_from_ra
Remove tesla boost from RA
2015-10-24 12:33:57 +02:00
reaperrr
b5cdde6c5d Fix RA building TargetTypes 2015-10-24 08:45:30 +02:00
Taryn Hill
9ab5eacdee Cache the command entered in a variable in Utility.Program.cs for easier reading. 2015-10-23 20:55:18 -05:00
Taryn Hill
780f905959 Fix misleading Utility message
We were reporting that the entered command did not exist
by assuming that any ArgumentException indicated this.

Now we will throw and catch a NoSuchCommandException.
2015-10-23 20:55:13 -05:00
abcdefg30
69496c2f16 Fix the legacy map importer not working 2015-10-24 00:59:14 +02:00
Oliver Brakmann
42d2e016ed Fix broken scripted attacks in some missions
In all three cases, the failure came down to the targets not being declared as enemies to the attackers.

Recent changes to the attack code made it impossible to attack friendly or neutral things with the Lua API's Attack() method. Changing the allegiance of affected parties fixed it, or, in the case of Soviet 02a, using force-attack.
2015-10-24 00:36:09 +02:00
Oliver Brakmann
6420a6ec8a Allow force-attacking things with the Lua API's Attack() method 2015-10-24 00:27:23 +02:00
abcdefg30
f6d1e51050 Merge pull request #9708 from r34ch/chronotank-extra-bar
Charge now using ticks and fixed extra bar time formula.
2015-10-23 23:29:20 +02:00
DArcy Rush
1e2101fab9 Add an upgrade rule. 2015-10-23 22:22:55 +01:00
Oliver Brakmann
206f644949 Merge pull request #9672 from penev92/fixAutoTarget
Fix a series of visibility/targeting bugs
2015-10-23 20:53:03 +02:00
Oliver Brakmann
9c75079b2e Remove tesla boost from RA 2015-10-23 19:51:39 +02:00
abcdefg30
fcd27707d7 Merge pull request #9705 from reaperrr/misc-cleanup
Misc yaml formatting cleanup
2015-10-23 14:38:44 +02:00
abcdefg30
60d7880b77 Merge pull request #9719 from penev92/d2kTimer
Bring back the observer clock for D2k
2015-10-23 14:29:57 +02:00
abcdefg30
ff02644ea1 Merge pull request #9725 from atlimit8/InvalidOperationException-to-YamlException-in-Warhead-RulesetLoaded
Replace InvalidOperationException with YamlException in SpreadDamageWarhead
2015-10-23 14:11:21 +02:00
atlimit8
6992decad0 InvalidOperationException => YamlException in SpreadDamageWarhead 2015-10-23 02:37:39 -05:00
reaperrr
d0c9d743cf Merge pull request #9722 from teees/cursor-fix
use right cursor for ion and nuke
2015-10-23 09:04:52 +02:00
teees
43eda007d6 disable buildings and cyborgs with emp 2015-10-23 08:52:41 +02:00
teees
dfb1c7a357 shutdown power when buildings get emp disabled 2015-10-23 08:52:40 +02:00
atlimit8
173f85319a Merge pull request #9715 from teees/mouseovereditor
Show owner and faction of units in map editor tooltips
2015-10-22 20:10:33 -05:00
atlimit8
7de98ad6d8 Merge pull request #9635 from RoosterDragon/occupy-space-perf
Speed up checks for IOccupySpace trait
2015-10-22 18:28:57 -05:00
Pavel Penev
35b926705c Bring back the observer clock for D2k 2015-10-23 01:04:49 +03:00
Pavel Penev
a69f26b705 Fix players being able to manually attack invisible structures 2015-10-23 00:27:46 +03:00
Pavel Penev
000c701414 Fix actors ignoring Disguise 2015-10-23 00:27:43 +03:00
Pavel Penev
8c7bdae617 Fix AutoTarget acquiring targets under fog/shroud 2015-10-23 00:27:42 +03:00
RoosterDragon
b30fc2c725 Merge pull request #9696 from RoosterDragon/vs-sln
Allow VS2015 to format solution file
2015-10-22 21:04:01 +01:00
Oliver Brakmann
b739151eaf Merge pull request #9711 from penev92/fixMapEditor
Fix D2kEditorResourceLayer starting NetWorth
2015-10-22 19:56:57 +02:00
evgeniysergeev
907df4800a flip or/and mirror sprites with negative width and heigth 2015-10-22 20:53:15 +03:00
abcdefg30
ac95dc65dd Clean SONAR up 2015-10-22 17:21:44 +02:00
abcdefg30
64931db796 Add camera.spyplane and let camera.paradrop inherit CAMERA 2015-10-22 17:21:43 +02:00
abcdefg30
234796ef6f Remove ProximityCaptor from CAMERA and camera.paradrop 2015-10-22 16:46:22 +02:00
abcdefg30
6eb5dcb6cf Remove DetectCloaked from CAMERA 2015-10-22 16:43:12 +02:00
abcdefg30
7c2d3682b0 Reduce the range of FLAK-23 from 8c0 to 6c0 2015-10-22 16:43:11 +02:00
abcdefg30
f675c17640 Remove junk values (5c0 is the default) 2015-10-22 16:43:11 +02:00
abcdefg30
1a7a184730 Add cloak to HIJACKER 2015-10-22 16:43:10 +02:00
abcdefg30
065386f134 Increase Crushable: WarnProbability: to 95 for HIJACKERs 2015-10-22 16:43:09 +02:00
abcdefg30
3f7a65e1bc Reduce chinook sight range 2015-10-22 16:43:08 +02:00
teees
326f82242d use right cursor for ion and nuke 2015-10-22 14:40:00 +02:00
reaperrr
f7b8eaf1ac Add height visualization to CombatDebugOverlay 2015-10-22 13:21:57 +02:00
reaperrr
c1b805ce42 Lower TS wall blocking height
Allows Tick Tanks to shoot over them from certain angles/distances, like in the original.
2015-10-22 12:19:43 +02:00
reaperrr
9b2cdd4457 Add Height property to BlocksProjectiles 2015-10-22 12:19:42 +02:00
teees
9292219d3b hover only when airborne 2015-10-22 10:30:33 +02:00
teees
36753b5d99 change hovers trait to be upgradeable 2015-10-22 10:29:26 +02:00
teees
f9c3446849 Added owner name and faction to map editor tooltips 2015-10-22 09:43:06 +02:00
teees
7f96ee4589 Multi line simple tooltips 2015-10-22 09:42:50 +02:00
Pavel Penev
f7a63ab2f8 Fix D2kEditorResourceLayer starting NetWorth 2015-10-22 01:10:16 +03:00
Pavel Penev
ccddc37c08 Merge pull request #9701 from pchote/widget-baseclass
Add a common ChromeLogic base class and lint verification.
2015-10-22 00:39:43 +03:00
Oliver Brakmann
a0816b7dea Merge pull request #9692 from pchote/lobby-irc
Integrate global chat with the lobby.
2015-10-21 21:04:54 +02:00
Paul Chote
8e59c4a106 Make the lobby buttons consistent across mods. 2015-10-21 19:38:28 +01:00
Paul Chote
fa2b10b269 Integrate global chat with the server lobby. 2015-10-21 19:38:28 +01:00
Paul Chote
3d7d7ff2a5 Allow chrome yaml to define disabled text fields. 2015-10-21 19:38:28 +01:00
Paul Chote
d6c75844bf Add a lint pass to check chrome logic validity. 2015-10-21 19:35:35 +01:00
Paul Chote
b6f463729b Add a ChromeLogic base class for chrome logic. 2015-10-21 19:35:35 +01:00
Pavel Penev
f68da6ada7 Small refactoring to AutoTarget
- Move a check for AutoTargetIgnore up the chain
 - Simplify some LINQs to a single .FirstOrDefault()
 - Rename local variable
2015-10-21 21:09:26 +03:00
atlimit8
1e890a921f Merge pull request #9709 from reaperrr/unitsat-actorsat
Rename ActorMap *UnitsAt* occurences to *ActorsAt*
2015-10-21 09:56:41 -05:00
DArcy Rush
0111f0d750 Charge now using ticks and fixed extra bar time formula.
ChargeTime has been changed to ChargeDelay and is
measured in ticks rather than seconds.

The formula for working out the extra bar time has
been fixed to work properly at different charge delays.
2015-10-21 12:08:44 +01:00
atlimit8
5f3d735864 Merge pull request #9700 from r34ch/chronotank-extra-bar
Use support power like charge bar for Chronotank instead of pips.
2015-10-21 03:32:59 -05:00
reaperrr
78def7330e Make TS laser weapon names more descriptive and remove comments 2015-10-21 10:07:50 +02:00
reaperrr
5615719d28 Fix WithMuzzleOverlay upgrade rule to properly cover cases with @ separator 2015-10-21 10:07:49 +02:00
reaperrr
8e6d5bd603 Misc yaml formatting/style fixes 2015-10-21 10:07:48 +02:00
reaperrr
1a08e6de77 Add Music trait to maps (applied upgrade rule) 2015-10-21 08:20:48 +02:00
Pavel Penev
8c32f7ff9f Merge pull request #9697 from RoosterDragon/irc-no-force-copy
Don't force SmarIrc4net to be copied to output
2015-10-21 07:58:57 +03:00
reaperrr
6f2292d14b Increase D2k aircraft speed 2015-10-21 06:55:31 +02:00
DArcy Rush
ecccc8bc68 Chronotank uses extra bar when charging.
The two blue pips have been replaced by
a magenta charge bar.
2015-10-20 23:14:08 +01:00
RoosterDragon
983032205f Merge pull request #9593 from huwpascoe/HealthTrait
Moved Health to OpenRA.Mods.Common
2015-10-20 20:59:04 +01:00
RoosterDragon
557731bc6b Don't force SmarIrc4net to be copied to output.
Instead, it will be implicitly included since it is a reference. This avoids pulling in the documentary .xml file.
2015-10-20 20:06:44 +01:00
Oliver Brakmann
03e47a9cb7 Merge pull request #9682 from pchote/polish-mapchooser
Polish mapchoosers
2015-10-20 20:38:07 +02:00
RoosterDragon
9049ae7bfc Allow VS2015 to format solution file. 2015-10-20 19:17:24 +01:00
Oliver Brakmann
a547f55c6f Merge pull request #9646 from matija-hustic/missile_fixup
Temporary fix for missiles launched from zero height
2015-10-20 20:16:59 +02:00
Pavel Penev
dc47288ce2 Merge pull request #9695 from RoosterDragon/fix-sln
Fix solution file
2015-10-20 21:14:35 +03:00
RoosterDragon
7448093b12 Fix solution file. 2015-10-20 19:08:05 +01:00
Oliver Brakmann
72a0f7e69c Merge pull request #9633 from Mailaender/movement-class-logs
Added the movement classes of the domain index to the debug logs
2015-10-20 20:01:10 +02:00
Pavel Penev
11210109f4 Merge pull request #9675 from abcdefg30/missionprefixes
Remove the prefixes of all red alert missions
2015-10-20 17:05:32 +03:00
abcdefg30
7d97f22f11 Merge pull request #9681 from pchote/fix-d2k-refinery
Fix D2K refinery flames.
2015-10-19 21:49:14 +02:00
abcdefg30
30e03b5d0b Align the titles of all ra missions 2015-10-19 21:40:13 +02:00
Paul Chote
f53cdbfb35 Polish RA map chooser. 2015-10-19 18:36:37 +01:00
Paul Chote
9c3d278853 Polish TD map chooser. 2015-10-19 18:02:14 +01:00
Paul Chote
8c50f444ec Fix refinery flame animation. 2015-10-19 17:54:05 +01:00
Paul Chote
a9424d0fa7 Hide the docking animation when it is not active. 2015-10-19 17:43:27 +01:00
abcdefg30
b64e4886a7 Remove the prefixes of all red alert missions 2015-10-18 21:59:07 +02:00
Matthias Mailänder
ec56d2ec88 Merge pull request #9674 from OpenRA/fixFremen
Fix a typo on the Fremen Select voices
2015-10-18 21:47:16 +02:00
Pavel Penev
fd577f4b7c Fix a typo on the Fremen Select voices 2015-10-18 22:24:14 +03:00
abcdefg30
919ba7762c Merge pull request #9657 from Biofreak1987/soviet-06b
Add soviet-06b
2015-10-18 21:19:45 +02:00
Biofreak1987
4b7f5f2c1f Add soviet-06b 2015-10-18 21:12:57 +02:00
clemty
2dfa39bdfb Add gdi06 2015-10-18 21:01:11 +02:00
abcdefg30
ce95ff074a Add checks for missing music tracks 2015-10-18 20:43:47 +02:00
abcdefg30
0c373cc8c4 Remove an unused using 2015-10-18 20:43:46 +02:00
abcdefg30
4afef8868e Add lua support for playing background music 2015-10-18 20:43:45 +02:00
abcdefg30
76ada5176f Merge pull request #9656 from Biofreak1987/soviet-06a
Add soviet-06a
2015-10-18 20:26:25 +02:00
Biofreak1987
7fcde4a7c9 Add soviet-06a 2015-10-18 20:17:44 +02:00
Oliver Brakmann
27e898f4ee Merge pull request #9512 from abcdefg30/atreides02b
Add atreides02b
2015-10-18 20:07:18 +02:00
abcdefg30
8caa5511c3 Fix the Enemies: entries in all d2k missions 2015-10-18 19:53:41 +02:00
abcdefg30
6eb4ba2a7c Add bricks to the harkonnen base in atreides02a 2015-10-18 19:53:40 +02:00
abcdefg30
7347278d79 Add atreides02b.lua to OpenRA.sln 2015-10-18 19:53:40 +02:00
abcdefg30
2467c3a76f Fix the description of atreides02a 2015-10-18 19:53:39 +02:00
abcdefg30
08ee4fe02d Adjust the descriptions of the atreides01 missions 2015-10-18 19:53:38 +02:00
abcdefg30
4cc73ab9a7 Add atreides02b 2015-10-18 19:53:37 +02:00
Matthias Mailänder
742aa01284 Merge pull request #9666 from pchote/fix-startingmusic-clash
Fix map StartingMusic overriding BackgroundMusic initialization.
2015-10-18 19:36:39 +02:00
Oliver Brakmann
c1dda97836 Merge pull request #9586 from pchote/irc-common
Overhaul IRC in preparation for the global chat UI
2015-10-18 19:31:07 +02:00
abcdefg30
674b1672f5 Merge pull request #9488 from atlimit8/MapMusic
Map Music
2015-10-18 17:47:26 +02:00
atlimit8
63513af027 Load music after mounting map 2015-10-18 09:53:39 -05:00
atlimit8
90bdeb1e92 Move external Fort Lonestar assets into map directory 2015-10-18 09:53:39 -05:00
Oliver Brakmann
d216362a56 Merge pull request #9655 from Biofreak1987/soviet-02b
Add soviet-02b
2015-10-18 14:47:36 +02:00
Biofreak1987
dc90a35aa0 Add soviet-02b 2015-10-18 14:41:07 +02:00
abcdefg30
f4d937094d Merge pull request #9664 from reaperrr/td-aggreg-seq
Use aggregate sequences for all TD flame/chem muzzles
2015-10-18 12:37:45 +02:00
Pavel Penev
9d76c61b8b Merge pull request #9660 from abcdefg30/factionalign
Fix the faction in the lobby being misaligned
2015-10-18 12:57:40 +03:00
Paul Chote
fb631367ea Fix map StartingMusic overriding BackgroundMusic. 2015-10-18 09:56:12 +01:00
Matthias Mailänder
b14f5ca608 Merge pull request #9661 from pchote/editor-preview-fix
Update the UID stored in the map file after saving.
2015-10-18 08:27:22 +02:00
reaperrr
48babec519 Use aggregate sequences for all TD flame/chem muzzles 2015-10-18 03:23:05 +02:00
reaperrr
380f30ed13 Merge pull request #9547 from pchote/aggregate-sequences
Add support for aggregate sequences
2015-10-18 02:23:23 +02:00
Pavel Penev
6c94eef763 Merge pull request #9662 from reaperrr/color_remap2
Fix hardcoded player color ramp Lerp
2015-10-18 02:29:56 +03:00
reaperrr
51aca8de9a Fix hardcoded player color ramp Lerp 2015-10-18 01:21:59 +02:00
reaperrr
d2f656737b Merge pull request #9654 from evgeniysergeev/color_remap
fix player color remap to handle RemapIndex: with any number of entri…
2015-10-18 01:05:11 +02:00
Paul Chote
cf875c3db6 Update the UID stored in the map file after saving. 2015-10-17 23:25:52 +01:00
Pavel Penev
3db724e6dd Merge pull request #9640 from abcdefg30/luaSLN
Add the missing lua files to OpenRA.sln
2015-10-18 01:11:31 +03:00
abcdefg30
e76bb593a2 Fix the faction in the lobby being misaligned 2015-10-18 00:01:00 +02:00
abcdefg30
4daf22e759 Merge pull request #9634 from pchote/fix-bridge-huts
Fix bridge destruction and repair.
2015-10-17 23:51:14 +02:00
Paul Chote
940bc310c3 Use aggregate sequences for TD flame muzzle. 2015-10-17 22:50:22 +01:00
Paul Chote
9ce8544e34 Add support for aggregate sequences. 2015-10-17 22:50:22 +01:00
abcdefg30
bc9abdb3db Merge pull request #9476 from pchote/depthbuffer
Make the TS terrain depth data available for use by shaders.
2015-10-17 23:45:31 +02:00
abcdefg30
501a965c63 Add the missing lua files to OpenRA.sln 2015-10-17 23:38:49 +02:00
abcdefg30
5cc69d7877 Rename some lua files 2015-10-17 23:38:47 +02:00
Paul Chote
83949b250a Add a visualisation mode for depth sprites.
For now this displays the raw sprites.  It will
eventually be repurposed for rendering the proper
depth data.
2015-10-17 22:35:47 +01:00
Paul Chote
b08adbeb61 Add support for boolean uniforms. 2015-10-17 22:35:47 +01:00
Paul Chote
3665d8f19b Send TS terrain depth data to the GPU. 2015-10-17 22:35:07 +01:00
Paul Chote
9a5483fea7 Send TS terrain depth data to the GPU. 2015-10-17 22:34:46 +01:00
Paul Chote
d5fd8e5828 Use varyings for masks instead of overloading gl_TexCoord. 2015-10-17 22:28:19 +01:00
Paul Chote
e819ff832b Record the SheetType in each Sheet. 2015-10-17 22:28:19 +01:00
Matthias Mailänder
8d0d789e40 fix bridge hut selection priority 2015-10-17 22:23:44 +01:00
Paul Chote
4226370495 Fix bridge destruction and repair. 2015-10-17 22:23:44 +01:00
Paul Chote
a3fe2b3d35 Overhaul the IRC implementation.
* Simplified UI plumbing.
* Improves handling of errors and kicks.
* Persists chat history between session.
* Fixes leaks of the old widget tree when exiting.
* A few small UI polish improvements.
2015-10-17 22:13:22 +01:00
Paul Chote
386f252736 Implement ObservableList collection. 2015-10-17 22:13:22 +01:00
Paul Chote
4ba78f65b9 Add Dispose support to widget logic objects. 2015-10-17 22:13:22 +01:00
evgeniysergeev
0830e4a2c0 fix player color remap to handle RemapIndex: with any number of entries, not only 16 colors 2015-10-17 22:47:03 +03:00
Matthias Mailänder
426e187a4c Merge pull request #9515 from Biofreak1987/soviet03
Add soviet03
2015-10-17 17:05:20 +02:00
Matthias Mailänder
eab5e474cb Merge pull request #9637 from abcdefg30/newTDdelay
Reduce InitialSpawnDelay for crates in TD
2015-10-17 15:15:54 +02:00
Biofreak1987
628e75d484 Add Soviet03 2015-10-17 12:46:25 +02:00
Matthias Mailänder
66a2512c21 Merge pull request #9638 from JoppyFurr/bleed
Change mouse cursors while joystick scrolling
2015-10-17 09:07:56 +02:00
reaperrr
5778d1621a Merge pull request #8987 from Mailaender/spiceblooms
Added spice blooms
2015-10-16 19:38:21 +02:00
Pavel Penev
3abf2af9ff Merge pull request #9649 from r34ch/balance-mcv-crate
Balance mcv crate
2015-10-16 18:41:56 +03:00
DArcy Rush
2cc3cafdd2 Rebalance MCV crate in TS mod
Completely removes the chance of getting an MCV from a crate
in the TS mod unless the player has no base remaining.
2015-10-16 16:23:17 +01:00
DArcy Rush
e6417abb51 Rebalance MCV crate in RA mod
Completely removes the chance of getting an MCV from a crate
in the RA mod unless the player has no base remaining.
2015-10-16 16:22:37 +01:00
abcdefg30
d5a6d9949c Remove the now unnecessary InitialSpawnDelay: 0 from the dropzone maps 2015-10-16 14:44:48 +02:00
abcdefg30
7624256001 Set InitialSpawnDelay to 0
and set the value to 1500 in the default mods.
2015-10-16 14:42:11 +02:00
Matija Hustić
5fe7c4af4d Temporary fix for missiles launched from zero height 2015-10-16 10:22:58 +02:00
Pavel Penev
8cbb132764 Merge pull request #9644 from hypercube33/patch-1
Update gdi-vehicles.yaml
2015-10-16 10:32:42 +03:00
hypercube33
093aea81c4 Update gdi-vehicles.yaml 2015-10-15 20:40:33 -05:00
Joppy Furr
6ded247d0c Change mouse cursors while joystick scrolling
This patch adds mouse cursors to the joystick scrolling feature.

On Tiberian Sun, which itself had joystick scrolling, the same cursors are
used as in the original game.

As the older games did not have joystick scrolling, I've had to make a
best-effort guess as to what were suitable cursors.
  -> When scrolling in all directions is available, the default arrow
     cursor is used.
  -> When a direction is blocked, the edge-scrolling blocked direction
     cursor is used.
2015-10-16 11:53:53 +13:00
reaperrr
2f69711341 Rename ActorMap *UnitsAt* occurences to *ActorsAt*
These enumerate actors in general, not just mobile actors (which the term 'unit' usually refers to).
2015-10-16 00:07:06 +02:00
abcdefg30
fd37869a88 Merge pull request #9636 from RoosterDragon/ai-mcv-perf
Remove a redundant check
2015-10-15 12:21:49 +02:00
RoosterDragon
a4338d9350 Remove a redundant check in FindAndDeployBackupMcv.
This avoids enumerating the mcvs twice.
2015-10-14 21:06:37 +01:00
RoosterDragon
262ab408b5 Speed up checks for IOccupySpace trait.
Eagerly load the trait (if it exists) in Actor, and use this reference to avoid having to perform self.Info.HasTraitInfo<IOccupySpaceInfo>() checks.
2015-10-14 20:46:15 +01:00
Matthias Mailänder
e0fa63ae19 also mention the movement class of the domain index in logs 2015-10-14 20:34:20 +02:00
Oliver Brakmann
410f121a1e Merge pull request #8717 from matija-hustic/missile
Some work on the missile projectile
2015-10-13 19:02:25 +02:00
Pavel Penev
b161c58bbc Merge pull request #9622 from DSUK/test_fix
Fixed TFD Installation.
2015-10-13 10:48:42 +03:00
Pavel Penev
d070971272 Merge pull request #9618 from abcdefg30/cncplanes
Increase planes' CruiseAltitude in cnc
2015-10-13 09:52:52 +03:00
James
5000369463 Fixed TFD Not Creating Install Directory 2015-10-12 19:52:49 +01:00
James
b071bcf28c Added myself to AUTHORS 2015-10-12 19:52:49 +01:00
abcdefg30
5242bc88f7 Increase planes' CruiseAltitude in cnc 2015-10-12 17:26:28 +02:00
Huw Pascoe
c95fc793e4 Moved Health trait to OpenRA.Mods.Common
In preparation for custom hitboxes.
2015-10-12 01:56:00 +01:00
Huw Pascoe
5a81d5dfa7 Created IHealth interface and cleanup.
To decouple the Health trait from OpenRA.Traits.
DisplayHp renamed to DisplayHP and HealthExts moved
moved next to Actor.Kill() for consistency.
2015-10-12 01:55:59 +01:00
Matija Hustić
cd8a15271c Downward lookahead.
Added downward lookahead capability.
2015-10-11 22:15:30 +02:00
Matija Hustić
12b4f8ccf4 Programatic YAML upgrade 2015-10-11 22:03:06 +02:00
Matija Hustić
b9e57d33c3 Added lookahead, launch speed & angle computation.
The missiles should be more intelligent, avoiding cliffs,
surmounting inclines and flexibly selecting appropriate
launch speed and angle to avoid a close incline or miss
a close target.
2015-10-11 22:02:02 +02:00
Matija Hustić
41f57f2a15 Missile projectile refactor.
Introduces:

Vertical rate of turn
Customizable vertical launch angle
Delayed activation of the homing mechanism / propulsion
Freefall while propulsion deactivated
Customizable explosion altitude (for airburst)
Customizable cruise altitude (when target out of range)
Height checks for terrain impact and shadow rendering
Acceleration (instead of constant speed from launch to impact)
2015-10-11 22:02:01 +02:00
Matthias Mailänder
a79b71c608 Merge pull request #9581 from matija-hustic/attackmove_defendstance
Gets AttackMove to work with 'Defend' stance
2015-10-11 21:28:35 +02:00
Matthias Mailänder
40eb7fa074 Merge pull request #9588 from pchote/fix-recoil
Fix sprite turret recoil.
2015-10-11 21:21:48 +02:00
abcdefg30
9e24d4ec79 Merge pull request #9590 from pchote/fix-debug-case
Fix debug menu terminology.
2015-10-11 20:45:13 +02:00
Herve-M
4366593b33 2 pass replay loader (fix freeze) close #6241 2015-10-11 20:21:19 +02:00
Matthias Mailänder
4437bce132 Merge pull request #9459 from reaperrr/d2k-power-misc
Change D2k power draw and various other aspects to match original
2015-10-11 19:48:41 +02:00
Matthias Mailänder
770afd520b let the crusher take damage on spice explosions 2015-10-11 19:30:28 +02:00
Matthias Mailänder
1887875413 make Devastators crush walls 2015-10-11 19:30:28 +02:00
Matthias Mailänder
c6eff7023a add spice blooms 2015-10-11 19:30:28 +02:00
Matthias Mailänder
f2663c18a3 add an empty sprite 2015-10-11 19:30:28 +02:00
Christopher Grant
246f85413f document ThrowsShrapnel 2015-10-11 19:30:24 +02:00
Matthias Mailänder
6107eb389b Merge pull request #9600 from abcdefg30/tanyadamage
Fix tanya not being able to damage barrels
2015-10-11 19:26:27 +02:00
Matija Hustić
1ba81d7c97 Fixes bad comment in UpgradeRules
https://github.com/OpenRA/OpenRA/pull/8768/files#r41694572
2015-10-11 19:23:10 +02:00
Matija Hustić
2a0a7541ba Gets AttackMove to work with 'Defend' stance 2015-10-11 19:23:08 +02:00
Christopher Grant
a378abe7c1 Moved RandomWalk to OpenRA.Traits.Util 2015-10-11 18:59:11 +02:00
reaperrr
5646f4118f Make D2k infantry no longer attract worms 2015-10-11 16:28:41 +02:00
reaperrr
0629cde10f D2k implement classic engineer capturing, reduce Fremen cloak delay, add cloak to Saboteur 2015-10-11 16:27:39 +02:00
reaperrr
efde2ab8ff Enable Carryall self-healing 2015-10-11 16:27:36 +02:00
reaperrr
a94b8f5f0c Enable self-healing on D2k MCV, Harvester and Devastator to match original
Additionally change harvester PipCount and Capacity to match original.
2015-10-11 16:27:35 +02:00
reaperrr
5d20a9e4f2 Tweak emitted infantry types of D2k construction yard 2015-10-11 16:27:34 +02:00
reaperrr
4292a05470 Tweak D2k barracks RallyPoint offset 2015-10-11 16:27:33 +02:00
reaperrr
6dd5e3b77a Reduce D2k wall line build range 2015-10-11 16:27:32 +02:00
reaperrr
e8defccd95 Remove stealth detection from D2k buildings 2015-10-11 16:27:30 +02:00
reaperrr
70163e9c86 Change D2k building power draw/output to original values 2015-10-11 16:27:29 +02:00
Oliver Brakmann
421b15cad1 Merge pull request #9562 from Biofreak1987/soviet07-fix
Fix early game over in soviet07
2015-10-11 15:43:26 +02:00
Oliver Brakmann
42b04b8a6f Merge pull request #9450 from atlimit8/SpreadDamageWarheadRangeOnRulesetLoaded
SpreadDamageWarhead Range on ruleset loaded
2015-10-11 15:28:19 +02:00
Oliver Brakmann
244093834c Merge pull request #9447 from atlimit8/CacheFireportsForAttackGarrisoned
Cache AttackGarrisoned fire ports using IRulesetLoaded
2015-10-11 15:26:38 +02:00
Oliver Brakmann
63d1158f94 Merge pull request #8563 from matija-hustic/tesla_boost
Tesla boost for RA2 mod
2015-10-11 14:33:13 +02:00
Biofreak1987
4e36ce2050 Soviet07 fix game over and add healthcrate
-Fix game over
-Add healthcrate
2015-10-11 14:32:51 +02:00
abcdefg30
6aa8f9772a Fix tanya not being able to damage barrels 2015-10-11 14:24:03 +02:00
abcdefg30
b0c1f95ef2 Merge pull request #9486 from reaperrr/fix-9403
Fix AI queueing structure build orders twice at higher game speeds due to lag
2015-10-11 13:51:02 +02:00
reaperrr
3711ef8eb5 Fix AI queueing build orders twice at higher game speeds due to lag
Fixes #9403.
2015-10-11 01:53:25 +02:00
Paul Chote
08df5b9d7d Fix the server reporting for Debug Menu. 2015-10-10 21:41:27 +01:00
Paul Chote
f40dea41d6 Fix capitalisation in Debug menu. 2015-10-10 21:38:53 +01:00
Paul Chote
7e1dfa96be Merge pull request #9584 from obrakmann/fix-d2k-sequence-crash
Fix case sensitivity issue in d2k sequence definitions
2015-10-10 20:46:11 +01:00
Paul Chote
6c0a4e0722 Merge pull request #9453 from reaperrr/d2k-cost
Change D2k Cost and CustomBuildValues to match original
2015-10-10 20:44:33 +01:00
Paul Chote
ad3714e9ec Merge pull request #9406 from reaperrr/d2k-weapon-offsets
Fixed D2k armament offsets and some cleanup
2015-10-10 20:34:02 +01:00
Paul Chote
8954ac585c Merge pull request #9442 from Mailaender/ai-world-check
Fixed AI bots trying to assign orders to units not in the world
2015-10-10 20:21:10 +01:00
Paul Chote
d70fbdf6ce Fix sprite turret recoil. 2015-10-10 19:31:28 +01:00
Matthias Mailänder
4579e8af06 don't let the AI assign orders to units not in the world 2015-10-10 19:06:20 +02:00
Matthias Mailänder
f1b1df1428 Merge pull request #9537 from penev92/fixLaunch
Fix crash when launching the game directly into a mod with missing assets
2015-10-10 18:59:19 +02:00
Matthias Mailänder
dd90d6929f Merge pull request #9567 from abcdefg30/soviet02ownerrow
Hide the owner row of FCOM
2015-10-10 18:50:57 +02:00
Matthias Mailänder
d677192bea Merge pull request #9578 from penev92/deployOnRamps
Add a CanDeployOnRamps property to DeployToUpgrade
2015-10-10 18:44:42 +02:00
Oliver Brakmann
a26e1a1d52 Fix case sensitivity issue in d2k sequence definitions
Game would crash on systems with case-sensitive filesystems when a support-power beacon appeared.
2015-10-10 14:19:02 +02:00
Matija Hustić
c55141c91c Enabled multiple timed upgrades from single source.
This makes the UpgradeManager support requests to grant a timed
upgrade multiple times from a single source.
GrantUpgradeWarhead modified to take advantage of this.
2015-10-09 22:41:23 +02:00
Matija Hustić
03c80fb9c6 Added tesla boost capabilities.
Shock troopers and tesla tanks standing near a tesla coil
will charge it up, enhancing its range, modifying the zap
animation and allowing it to work even when player's power
is down.
The sound for charger weapons edited from
https://www.freesound.org/people/JoelAudio/sounds/136542/
2015-10-09 22:41:21 +02:00
Pavel Penev
db609b12a0 Add a CanDeployOnRamps property to DeployToUpgrade 2015-10-09 17:15:54 +03:00
Pavel Penev
6e1f461e9b Move mod asset validation from BlankLoadScreen.StartGame() to Game.InitializeMod()
This fixes a crash that happens when you try to launch a mod directly while its assets aren't installed.
Additionally should reduce the overhead for dedicated servers (in theory).
2015-10-09 12:34:58 +03:00
Pavel Penev
50679cd6c4 Merge pull request #9576 from obrakmann/fix-broken-infiltration
Fix inverted TargetTypes test in Infiltrates order resolution logic
2015-10-09 01:37:32 +03:00
Oliver Brakmann
6274f2a47e Merge pull request #8768 from matija-hustic/attackbase_refactor
Some work on Attack*
2015-10-08 21:56:22 +02:00
Oliver Brakmann
d741c86ed8 Merge pull request #9549 from pchote/lobby-music
Add a music player to the game lobby.
2015-10-08 21:40:04 +02:00
Oliver Brakmann
784f2425bf Fix inverted TargetTypes test in Infiltrates order resolution logic 2015-10-08 21:21:15 +02:00
Matthias Mailänder
d199ba5048 Merge pull request #9520 from obrakmann/make-scroll-keys-remappable
Add hotkey configuration for scroll keys
2015-10-08 20:15:55 +02:00
Matthias Mailänder
1318a11ed2 Merge pull request #9551 from clemty/editorwindow
Editor: Increase size of editor tile/actor list widget
2015-10-08 20:05:23 +02:00
abcdefg30
4db2704f45 Merge pull request #9568 from reaperrr/fix-chinook-box
Fix RA Chinook selection box size
2015-10-08 16:08:31 +02:00
reaperrr
247bbeb869 Fix RA Chinook selection box size 2015-10-07 22:26:11 +02:00
abcdefg30
ae805726b0 Merge pull request #9563 from HenrytheSlav/polish
Map polish
2015-10-07 22:05:30 +02:00
HenrytheSlav
f120c65b0f Polish for maps Monster tank madness and Arctic triangle affair 2015-10-07 22:02:14 +02:00
Oliver Brakmann
92d8c358b1 Merge pull request #9521 from pchote/produce-support
Implement actor-producing support powers
2015-10-07 21:41:36 +02:00
abcdefg30
c339df6b72 Merge pull request #9564 from pchote/more-maps
Add more TD maps.
2015-10-07 21:31:48 +02:00
abcdefg30
17225c732b Hide the owner row of FCOM 2015-10-07 21:23:15 +02:00
Oliver Brakmann
de5e37539b Merge pull request #9506 from AoAGeneral/upstream/myfeature
TD Additional Balance Changes Revamped
2015-10-07 20:11:00 +02:00
clemty
a4eafa9a15 Increase size of editor tile/actor list widget 2015-10-07 19:38:27 +02:00
Oliver Brakmann
783928f20e Merge pull request #9545 from abcdefg30/selectcrash
Fix a possible crash in WorldInteractionControllerWidget
2015-10-07 19:32:14 +02:00
Paul Chote
f35ea28dfc Add new 2v2 and 3v3 maps. 2015-10-06 23:28:43 +01:00
Paul Chote
51fd1fac75 Restore Deterring Democracy map. 2015-10-06 23:19:43 +01:00
Oliver Brakmann
7eb2c48a1e Merge pull request #9471 from abcdefg30/luaprereq
Add a lua function to check for prerequisites
2015-10-06 22:20:19 +02:00
abcdefg30
be50adbed3 Add a lua function to check for prerequisites 2015-10-06 22:14:23 +02:00
Oliver Brakmann
cd62044a3a Merge pull request #9462 from abcdefg30/sovietfix
Fix a crash in the soviet04 missions
2015-10-06 20:27:16 +02:00
Oliver Brakmann
d4863badb6 Merge pull request #9397 from Herve-M/feat-utility-polish
Add basic arguments validation
2015-10-06 19:23:23 +02:00
Matija Hustić
69696fc154 UpgradeRules YAMLs 2015-10-06 02:00:39 +02:00
Matija Hustić
d94c645046 First step in the attack mechanism's refactor.
Enabled firing multiple armaments at a target simultaneously.
Each armament defines own cursor for targeting.
The force attack modifier influences armament choice for target.
Autotargeting modified to handle firing multiple armaments simultaneously.
As a consequence, healers (medics) no longer require separate Heal
activity and AttackMedic and AutoHeal traits.
2015-10-06 01:46:55 +02:00
Paul Chote
73adfe0bfc Add music player to lobby. 2015-10-05 22:43:19 +01:00
Chris Forbes
72ea009042 Merge pull request #9546 from pchote/lobby-panels
Add panel-transparent to TD
2015-10-06 10:27:25 +13:00
Paul Chote
6dce8a1385 Implement Hunter-seeker support power. 2015-10-05 22:05:02 +01:00
Paul Chote
213ac2d554 Fix Hunter-seeker rules. 2015-10-05 22:05:02 +01:00
Paul Chote
8ae01cf73b Move fremen and saboteur to palace powers. 2015-10-05 22:05:02 +01:00
Paul Chote
b43f9bc524 Add ProduceActorsPower trait. 2015-10-05 22:05:01 +01:00
Paul Chote
9b6dba02a8 Improve customisation of support power targeting. 2015-10-05 22:05:01 +01:00
Paul Chote
cade56084a Don’t render transparent overlays. 2015-10-05 19:15:03 +01:00
Paul Chote
ca5b08968d Add panel-transparent background to TD. 2015-10-05 19:15:02 +01:00
abcdefg30
d7c0d4197c Fix a possible crash in WorldInteractionControllerWidget 2015-10-05 17:23:42 +02:00
abcdefg30
36b7524d37 Merge pull request #9491 from cjshmyr/gameinprogress
Fix incorrect "In progress" time shown in server browser
2015-10-05 16:34:13 +02:00
Curtis Shmyr
2b3432e68e Fix incorrect gametime in progress shown in server browser 2015-10-04 17:08:10 -06:00
abcdefg30
efa8f3f59e Merge pull request #9534 from pchote/refresh-cnc-1v1-maps
Refresh TD 1v1 map choices
2015-10-04 22:08:19 +02:00
gitTerebi
86c57a270b Add hotkey configuration for scroll keys 2015-10-04 22:04:44 +02:00
abcdefg30
c1e1a32010 Merge pull request #9532 from atlimit8/CacheWeaponInfoLookups
Cache WeaponInfo Look-ups
2015-10-04 21:46:27 +02:00
Matthias Mailänder
93dc472020 Merge pull request #9528 from abcdefg30/seedsoutofbounds
Fix a possible crash in ResourceLayer
2015-10-04 21:40:39 +02:00
Matthias Mailänder
243bbe1981 Merge pull request #9527 from abcdefg30/halfsietch
Fix the sietch being DamagedWithoutFoundation
2015-10-04 21:02:24 +02:00
abcdefg30
dcd1638455 Merge pull request #9523 from penev92/fixWalls
Fix TS component towers
2015-10-04 21:01:47 +02:00
Matthias Mailänder
01fc961bd3 Merge pull request #9539 from pchote/lobby-prep
Prepare for lobby layout overhaul.
2015-10-04 20:58:30 +02:00
abcdefg30
e5dca60f5c Merge pull request #9542 from reaperrr/WithRotorOverlay
Rename WithRotor to WithSpriteRotorOverlay
2015-10-04 20:50:59 +02:00
Matthias Mailänder
1a8ec3745b Merge pull request #9540 from obrakmann/fix9530
Fix H and Home keys not working when the shroud debug option is enabled
2015-10-04 20:49:53 +02:00
reaperrr
b722aa6721 Rename WithRotor to WithSpriteRotorOverlay 2015-10-04 20:22:46 +02:00
Oliver Brakmann
f98a55c72f Fix H and Home keys not working when the shroud debug option is enabled 2015-10-04 18:46:05 +02:00
Paul Chote
fba879b954 Add four new 1v1 TD maps, and remove two older ones. 2015-10-04 17:31:13 +01:00
Paul Chote
d5721af91e Inherit map bin size from the root. 2015-10-04 17:26:44 +01:00
Paul Chote
c6740b1bcb Inherit lobby bin size from the root. 2015-10-04 17:26:38 +01:00
Paul Chote
b73f775ef2 Move the player bin header to lobby-players.yaml. 2015-10-04 17:26:32 +01:00
Paul Chote
fb5a6d8ec0 Reorganise the lobby chrome files. 2015-10-04 17:26:25 +01:00
Pavel Penev
044e562457 Merge pull request #9533 from pchote/fix-d2k-assets
Copy palette.bin from disk and check it exists.
2015-10-04 15:20:22 +03:00
Pavel Penev
828c53cd26 Merge pull request #9518 from JoppyFurr/bleed
Tiberian Sun style right-click-and-drag scrolling implementation
2015-10-04 14:45:21 +03:00
Paul Chote
020cce5414 Copy palette.bin from disk and check it exists. 2015-10-04 09:50:06 +01:00
atlimit8
49d7604bd9 Cache WeaponInfo look-ups 2015-10-03 22:29:40 -05:00
Joppy Furr
447049c495 Update AUTHORS 2015-10-04 16:23:07 +13:00
Joppy Furr
07273fa666 Add support for Tiberian Sun style right-click-and-drag scrolling
This patch introduces support for the right-click-and-drag scrolling that
is available in Tiberian Sun and Red Alert 2. It can be enabled by
selecting "Joystick" scrolling in the Input settings.

The speed of the scroll is proportional to the product of the distance of
the drag, and the Scroll Speed selected in the Input settings menu.

A side-effect of this is that events previously tied to right clicks on
the world are now based on the release of the click rather than the press.

The "Middle-Mouse Scrolling:" option is renamed
to "Mouse Scrolling Method:"
2015-10-04 16:22:55 +13:00
Pavel Penev
8b83fac306 Fix WithWallSpriteBody hijacking WithSpriteBody's DefaultAnimation before/during the "make" animation 2015-10-04 04:02:40 +03:00
abcdefg30
e291606dad Fix a possible crash in ResourceLayer 2015-10-04 00:18:38 +02:00
abcdefg30
3ad4aafcef Fix the sietch being DamagedWithoutFoundation 2015-10-03 23:15:33 +02:00
Herve-M
1485dd1675 Add basic arguments validation 2015-10-03 17:21:21 +02:00
Pavel Penev
f2f2fd8871 Merge pull request #9514 from abcdefg30/02aPreview
Fix the preview of atreides02a
2015-10-03 16:38:05 +03:00
Oliver Brakmann
9940efd3cb Merge pull request #9483 from reaperrr/cleanup-assets
Clean up assets
2015-10-03 12:37:55 +02:00
abcdefg30
acdb9a67f6 Fix the preview of atreides02a 2015-10-03 12:31:24 +02:00
atlimit8
a000bf7805 Merge pull request #9400 from reaperrr/fix-airefplaceperf
Fixed massive AI base builder performance issue
2015-10-02 23:18:10 -05:00
reaperrr
2ae0694385 Merge pull request #9054 from penev92/bleed_aircraft
Merge Plane and Helicopter traits
2015-10-03 01:52:30 +02:00
atlimit8
e86eea383a SpreadDamageWarhead.Range loading 2015-10-02 13:42:26 -05:00
atlimit8
dc54841bad cache AttackGarrisoned fire ports using IRulesetLoaded 2015-10-02 13:40:21 -05:00
atlimit8
079cff0a7a IRulesetLoaded Warhead support and better error messages. 2015-10-02 13:40:21 -05:00
reaperrr
87d6b3c7f2 Remove d2k.pal from D2k bits
And use palette.bin instead.
2015-10-02 18:13:49 +02:00
AoAGeneral
f2ca1d272b TD Additional Balance Changes Revamped
Infantry stealth detection: Increase sight range of stealth detection to
2 from 1.

MLRS: Reduce price to 1000 from 1200

Repair pad: Power remains at 30. Repair speed increased. (Interval 15
from 0)

Blue Tiberium: Reduce the value income to 75-90% from 110% (60 from 75)

Infantry evade chance: 75 from 67

Samsites: cost reduced to 700 from 750. Reduced build time (2000 from
2160)

Airstrikes: Increase cool down timer to 3:30 from 3:00.
2015-10-02 03:22:30 -07:00
atlimit8
22183fd5c7 Merge pull request #9465 from huwpascoe/CombatOverlay
Added warhead visualization to combat debug overlay.
2015-10-01 22:14:18 -05:00
Huw Pascoe
cfd179b0c6 Added warhead visualization to combat debug overlay. 2015-10-02 02:48:21 +01:00
Pavel Penev
c33371226c Merge pull request #9435 from ABrandau/bleed
Create disable movement trait
2015-10-02 04:30:22 +03:00
atlimit8
dc1e48556d Merge pull request #9464 from clemty/playername
TD: Lua replace GDI/Nod player reference variables with player/enemy variables
2015-10-01 17:57:27 -05:00
Oliver Brakmann
07d7df0345 Merge pull request #9485 from clemty/n64gdi01fix
Fix crash in cnc64gdi01
2015-10-01 23:38:01 +02:00
clemty
6a3b558227 Fix crash in cnc64gdi01
apparently helicopters can't .Hunt()
I introduced the bug late in testing, so it didn't trigger in review
on the plus side, AI will now attack you from a random direction
2015-10-01 23:00:01 +02:00
Oliver Brakmann
77ed5454dd Merge pull request #9402 from abcdefg30/atreides02a
Add atreides02a
2015-10-01 22:43:48 +02:00
abcdefg30
e9c8ab8d6b Add atreides02a 2015-10-01 21:46:57 +02:00
Oliver Brakmann
3f32730143 Merge pull request #9478 from clemty/pngcrush
PNG file size reduction
2015-10-01 20:18:21 +02:00
Pavel Penev
0ee38de4bb Rename HeliReturn
Rename HeliReturn to HeliReturnToBase to keep somewhat with the convention established for Plane- against Heli- oriented traits.
2015-10-01 20:15:50 +03:00
Pavel Penev
15a5bde7e7 Don't stop rearming if ordered to "Stop" while rearming
This one actually fixes a bug.
2015-10-01 20:15:47 +03:00
Pavel Penev
1ab2a781f1 Add an upgrade rule for Helicopter removal 2015-10-01 20:15:45 +03:00
Pavel Penev
d55541c5f8 Add an upgrade rule for Plane removal 2015-10-01 20:15:43 +03:00
Pavel Penev
8a44366667 Merge Plane and Helicopter into Aircraft 2015-10-01 20:15:41 +03:00
Pavel Penev
0ee1ad3fa4 Add a default value to ReturnToBase's constructor for non-Lua usages 2015-10-01 20:09:16 +03:00
Pavel Penev
4e3d6bde4f Split AircraftMoveOrderTargeter to its own file 2015-10-01 20:09:12 +03:00
Pavel Penev
ce52c62639 Merge pull request #9270 from reaperrr/upgradable-blockproj
Made BlocksProjectiles upgradable
2015-10-01 01:52:00 +03:00
reaperrr
4cf27fc207 Replace duplicate BlockedByActor with BlocksProjectiles.AnyBlockingActorAt 2015-09-30 23:54:21 +02:00
reaperrr
7e1f29d4c5 Made BlocksProjectiles upgradable 2015-09-30 21:54:35 +02:00
RoosterDragon
1b1e4f1dd2 Merge pull request #9174 from reaperrr/radius-explode
Customizable impact victim scan radius
2015-09-30 20:28:17 +01:00
atlimit8
f6180d7fa4 Include add/replace playlist entries support using map.yaml 2015-09-30 10:31:49 -05:00
Pavel Penev
0ed3ef0eb8 Merge pull request #9219 from deniz1a/hide-map-crate
Adds IncludeAllies option to hide-map crate.
2015-09-30 16:15:26 +03:00
Pavel Penev
a31302116c Merge pull request #9475 from clemty/yaml-cleanup
TD mission yaml fixes
2015-09-30 16:09:44 +03:00
Pavel Penev
356fa9d847 Merge pull request #9457 from Phrohdoh/fix#ai
Fix NullReferenceException in HackyAI.BuildUnit
2015-09-30 16:07:57 +03:00
reaperrr
85eba9da1c Remove mouse.shp and mousepal.pal from TS bits 2015-09-30 01:56:13 +02:00
reaperrr
4fd95ee2b2 Remove cursor.pal and mouse.shp from RA bits 2015-09-30 01:56:12 +02:00
reaperrr
3049fa07e0 Remove cursor.pal from TD bits 2015-09-30 01:56:11 +02:00
reaperrr
95709f1157 Remove obsolete mount hack 2015-09-30 01:56:10 +02:00
reaperrr
74308c245c Add AI MinBaseRadius to give more control over and slightly increase performance of AI building placement checks 2015-09-29 22:19:21 +02:00
reaperrr
2b0920398f Add AI MaxResourceCellsToCheck for refinery placement decision 2015-09-29 22:19:20 +02:00
clemty
76de14b6f5 PNG file size reduction
run pngcrush -brute on *.png

before:
 70 File(s)      3.455.140 bytes

after:
 70 File(s)      2.616.088 bytes
2015-09-29 20:47:36 +02:00
reaperrr
17ff3864e8 Merge pull request #9441 from Mailaender/d2k-mouse
Removed the included MOUSE.R8
2015-09-29 20:22:14 +02:00
reaperrr
258d2e2222 Merge pull request #9469 from obrakmann/fix-aircraft-husk-crash-velocity
Fix aircraft husk crash velocity
2015-09-29 20:05:29 +02:00
Nolt
7994d08702 Create #9435 DisableMovementOnUpgrade, rename DisableUpgrade to DisableOnUpgrade and Fixed not showing the blocked move cursor when movement is disabled. 2015-09-28 21:32:00 -03:00
Oliver Brakmann
8c6872fff0 Merge pull request #9387 from pchote/mission-gamespeed
Add game speed dropdown to the mission browser.
2015-09-28 21:05:30 +02:00
clemty
43590e5a67 TD yaml fixes 2015-09-28 20:18:06 +02:00
Taryn Hill
3d7e49655d Fix NullReferenceException in HackyAI.BuildUnit
HackyAIInfo grew a UnitLimits Dictionary that was not null-checked.
Also null-check UnitsToBuild.
2015-09-28 13:17:19 -05:00
Oliver Brakmann
ebfe5a3fd7 Merge pull request #9474 from obrakmann/pr9217
Ensure that we have a working OpenGL context.
2015-09-28 18:26:51 +02:00
Guido L
d0447fd97e Ensure that we have a working OpenGL context. 2015-09-28 18:20:35 +02:00
abcdefg30
7a0a618169 Merge pull request #9309 from reaperrr/missile-airfix
Add margin to CreateEffectWarhead air check
2015-09-28 17:33:46 +02:00
Oliver Brakmann
2f66fc98b9 Merge pull request #9118 from clemty/n64-01
N64 Special Ops - GDI 1
2015-09-27 23:12:57 +02:00
Oliver Brakmann
05e18fe682 Fix aircraft husk crash velocity
This fixes the long glide time aircraft husks had when they were shot down. They are falling down to earth much faster now and the distance covered matches that from release-20150614
2015-09-27 22:53:01 +02:00
clemty
62bad226e5 N64 Special Ops - GDI 1 2015-09-27 22:41:15 +02:00
Oliver Brakmann
8f0ce91f63 Merge pull request #9090 from Mailaender/cloak-reveal
Fixed cloaked units getting revealed by tooltips
2015-09-27 21:26:09 +02:00
clemty
6e315a815c replace GDI/Nod player reference variables with player/enemy
fixes unit production in nod02a and nod02b (killed infantry wouldn't get rebuilt)
2015-09-27 21:18:10 +02:00
abcdefg30
3a68364bc5 Fix a crash in the soviet04 missions 2015-09-27 19:04:38 +02:00
Pavel Penev
7fa7ebe657 Merge pull request #9384 from Mailaender/lint-player-palettes
Added a lint check for player palette references.
2015-09-27 18:44:55 +03:00
atlimit8
8495c1e2a4 Merge pull request #9448 from abcdefg30/oiltip
Don't show "Oil Pump" owner in campaign mission tooltips.
2015-09-27 09:39:17 -05:00
atlimit8
30985ff9c9 Merge pull request #9342 from penev92/mapGrid
Organize map data in Manifest
2015-09-27 09:18:39 -05:00
Matthias Mailänder
f4bb55113c fix cloak getting revealed by frozen actor tooltips 2015-09-27 15:05:07 +02:00
Paul Chote
d1f437e944 Adjust the d2k mission browser layout. 2015-09-27 13:58:57 +01:00
Matthias Mailänder
defba7aece lint check player palette reference
and tell which actor is affected when a problem is found
2015-09-27 14:57:58 +02:00
Paul Chote
36b5eb651e Rename Default game speed to Normal. 2015-09-27 10:28:34 +01:00
Paul Chote
3322f34e7b Add game speed option for missions. 2015-09-27 10:28:34 +01:00
reaperrr
74bcbcc9a8 D2k original starport prerequisites 2015-09-27 04:57:27 +02:00
reaperrr
bccfc33859 D2k original queue build speeds 2015-09-27 04:56:39 +02:00
reaperrr
9cdaf6114d D2k original cost and build speed 2015-09-27 04:56:38 +02:00
Pavel Penev
642468ce0c Add MapGrid class
MapGrid is a mod Manifest field which includes (and thus makes redundant) TileSize, TileShape, SubCells info and MaximumTerrainHeight.
2015-09-27 04:14:43 +03:00
atlimit8
699a7f8227 Merge pull request #9302 from RoosterDragon/alloc-tweaks
Reduce allocations for shroud checks and lost actors.
2015-09-26 15:31:57 -05:00
RoosterDragon
108f2e9b6e Tweak some AI methods to avoid allocations. 2015-09-26 21:12:07 +01:00
RoosterDragon
d70eea5adc Refactor occupied cells visibility checks.
Provide some common extension methods to reduce code duplication, and also use loops instead of LINQ to reduce allocations and provide a minor speedup.
2015-09-26 21:12:05 +01:00
atlimit8
49d351bf22 Merge pull request #9417 from clemty/topleft
Reduce use of Map.Topleft and Map.Bottomright
2015-09-26 14:36:22 -05:00
atlimit8
5e4e085a85 Merge pull request #9445 from RoosterDragon/activity-early-bail
Provide an early exit in RunActivity when there is no activity
2015-09-26 14:02:14 -05:00
RoosterDragon
e016227ddf Merge pull request #9327 from Mailaender/bridge-render-sizes
Fixed bridge rendering glitches
2015-09-26 19:54:43 +01:00
Oliver Brakmann
d667271ab7 Merge pull request #9262 from RoosterDragon/frozen-unify-dict
Speed up FrozenUnderFog.Tick
2015-09-26 20:45:58 +02:00
reaperrr
4c41f8f656 Lint check for SpreadDamageWarhead victim scan radius bonus 2015-09-26 17:46:28 +02:00
reaperrr
33dc50d29c Fix Bullet to consider DistanceAboveTerrain 2015-09-26 17:46:27 +02:00
abcdefg30
512faddb3e Hide the OwnerRow of the "Oil Pump"s tooltip in campaign missions 2015-09-26 17:45:02 +02:00
RoosterDragon
285a3eab2e Merge pull request #8760 from atlimit8/RangeMultiplier
Added [I]RangeMultiplier & made UpgradeMultiplierTraitInfo implement ITraitInfo
2015-09-26 16:24:17 +01:00
abcdefg30
fb97dd9481 Merge pull request #9407 from reaperrr/d2k-nsfremen
Added no stealth map creep fremen to d2k
2015-09-26 17:04:14 +02:00
reaperrr
5ad9eb852c Fix massive AI base builder performance issue
Previously, the Refinery placement check would first collect all cells
with resources inside the MaxBaseRadius, then perform a full findPos check
for each cell until one of them would not return null. The problem was
that if all of the cells returned null (for example if there wasn't enough
space between base center and resource, or if all suitable space was
otherwise occupied), it would basically check all tiles with resources
only to fail finding a suitable position and fall back to the normal
findPos check.

Since nearbyResources already performs a shuffle, I simply made the check
use the first cell from the list and use the basic findPos fallback if
that cell is null.

Closes #4717.
2015-09-26 16:48:03 +02:00
RoosterDragon
faaf1ea1e1 Provide an early exit in RunActivity when there is no activity. 2015-09-26 15:32:26 +01:00
reaperrr
e913fbcb3f Enable no-stealth fremen in map importer 2015-09-26 15:17:19 +02:00
reaperrr
73a07a5e19 Add no stealth map creep fremen to d2k 2015-09-26 15:17:18 +02:00
Matthias Mailänder
64dbaf8e76 Merge pull request #9444 from atlimit8/ModChooserMetricsExtraLine
Remove overridden ButtonBaseLine line in mods/modchooser/metrics.yaml
2015-09-26 14:54:23 +02:00
Matthias Mailänder
3e0330ab8b fix a crash when cloaking trains 2015-09-26 14:48:59 +02:00
atlimit8
361501c40c Remove overridden ButtonBaseLine line in mods/modchooser/metrics.yaml 2015-09-26 07:31:54 -05:00
Matthias Mailänder
9088a58756 Merge pull request #9408 from reaperrr/d2k-debris
Added original D2k debris
2015-09-26 13:56:51 +02:00
Matthias Mailänder
76b53ce9d7 Merge pull request #9288 from RoosterDragon/action-queue-order
Fix ActionQueue ordering
2015-09-26 13:42:56 +02:00
Matthias Mailänder
3884a31550 Merge pull request #9313 from RoosterDragon/actor-eager
Eagerly cache traits in Actor
2015-09-26 13:18:05 +02:00
Matthias Mailänder
83a17710a1 Merge pull request #9418 from reaperrr/d2k-speed
Apply original D2k actor speed
2015-09-26 13:07:49 +02:00
Matthias Mailänder
7063a4a8bb use the supplied MOUSE.R8 2015-09-26 12:42:39 +02:00
Paul Chote
9aa5828155 Merge pull request #9307 from obrakmann/fix6174_beacon-key-in-replays
Make some navigation keys available to spectators
2015-09-26 11:30:50 +01:00
Paul Chote
7ceb283034 Merge pull request #9263 from penev92/assetInstallation
Move asset installation to the ModChooser
2015-09-26 10:40:04 +01:00
Oliver Brakmann
c7cfd40f65 Merge pull request #9060 from abcdefg30/cratespawndelay
Add a InitialSpawnDelay to CrateSpawner
2015-09-26 01:26:41 +02:00
Oliver Brakmann
3e2102192e Merge pull request #9437 from pchote/fix-bogus-memory-copy
Rewrite BlowfishKeyProvider.ProcessPredata using safe code.
2015-09-26 00:47:22 +02:00
Paul Chote
7dcb896f3d Rewrite BlowfishKeyProvider.ProcessPredata using safe code.
Fixes #2441.  This error would occur when the memory
regions were allocated at particular addresses when
running a mono-compiled binary on a .net runtime.

The data would be copied to the pointer returned
from a fixed() statement, but the managed array
would *not* be updated with the new data.  This
caused DecryptKey to silently return a bogus key
full of zeros, and the mix file header decryption
would subsequently fail.
2015-09-25 22:13:55 +01:00
abcdefg30
4c52d10aaf Fix an oversight in ConvertFloatToIntPercentage 2015-09-25 17:00:08 +02:00
abcdefg30
ccf184413e Add an upgrade rule for the float to int percentage change 2015-09-25 17:00:07 +02:00
abcdefg30
589e673aa9 Replace the float WaterChance by an integer percentage 2015-09-25 17:00:06 +02:00
abcdefg30
e7c62b070b Add an upgrade rule for the seconds -> ticks change
and update the default mods
2015-09-25 17:00:06 +02:00
abcdefg30
277f9acb89 Replace seconds by ticks 2015-09-25 16:53:45 +02:00
abcdefg30
7fd3ae7db9 Adjust the dropzone maps 2015-09-25 16:53:44 +02:00
abcdefg30
10c2a897f4 Small code cleanup 2015-09-25 16:53:44 +02:00
abcdefg30
a2af88da21 Add a InitialSpawnDelay to CrateSpawner 2015-09-25 16:53:43 +02:00
Oliver Brakmann
0e9257abcf Merge pull request #9239 from penev92/clearFootprint
Move actors outside of the desired footprint when placing a building
2015-09-25 15:34:38 +02:00
Pavel Penev
059769de76 Merge pull request #9346 from reaperrr/fix-silo-preview
Fixed silo placement preview
2015-09-25 16:26:21 +03:00
Pavel Penev
b26e622bee Merge pull request #9284 from clemty/newtiles
TD: Add additional desert tiles (work originally by psydev)
2015-09-25 16:20:05 +03:00
reaperrr
74da2a2c72 Add TargetExtraSearchRadius to SpreadDamageWarhead
Allows to customize the victim scan radius. Necessary to ensure that actors where health radius is close enough, but CenterPosition isn't, properly receive damage.
2015-09-25 15:11:06 +02:00
abcdefg30
8a0023b40a Merge pull request #9248 from r34ch/ra-balance-changes
Lower shocktrooper health
2015-09-25 14:50:39 +02:00
reaperrr
010d8e8147 Upgrade rule 2015-09-25 14:30:15 +02:00
reaperrr
59a96ab0ef Make sure silo animation is properly updated on owner change 2015-09-25 14:26:22 +02:00
reaperrr
522e7d5d04 Add custom sequence support to WithSiloAnimation
Additionally add description to Stages property, and remove unnecessary var (information is only needed once anyway).
2015-09-25 14:26:21 +02:00
Pavel Penev
e67bd7cffe Merge pull request #9425 from abcdefg30/chosecrash
Fix possible crashes in the MapChooserLogic
2015-09-25 12:38:57 +03:00
atlimit8
558eea0bd5 Merge pull request #9390 from reaperrr/rename-flashoverlay
Renamed WithMuzzleFlash to WithMuzzleOverlay
2015-09-24 20:04:13 -05:00
atlimit8
74a9dc6793 Added IRangeMultiplier 2015-09-24 16:37:43 -05:00
atlimit8
65c1d2f5c1 Add IRulesetLoaded for late binding in trait info getting all rules 2015-09-24 16:26:42 -05:00
atlimit8
a8106a9999 Made UpgradeMultiplierTraitInfo implement ITraitInfo 2015-09-24 16:17:06 -05:00
atlimit8
527675db8d Attack activities use armaments directly through constructor 2015-09-24 16:17:06 -05:00
clemty
d4e1b1ba48 reduce use of Map.Topleft and Map.Bottomright as requested in #8549 2015-09-24 21:03:36 +02:00
reaperrr
5b5164211e Rename WithMuzzleFlash to WithMuzzleOverlay 2015-09-24 20:23:31 +02:00
abcdefg30
e989ce2ef2 Fix possible crashes in the MapChooserLogic 2015-09-24 16:57:03 +02:00
reaperrr
e8f18d2c3f Remove incorrect anti-air capability from quad rocket 2015-09-24 14:43:03 +02:00
reaperrr
3ce18834ed Fix siege tank weapon explosion sound 2015-09-24 14:43:02 +02:00
reaperrr
1b39936e80 Use both firing offsets for missile tank and missile tower
Remove missile tank FireDelay. Fix Report of missile tank weapon. Fix and explosion animation of both missile weapons and use less audible explosion sound (had no sound at all in the original).
2015-09-24 14:43:01 +02:00
reaperrr
63344aafcb Remove duplicate d2k explosion sequences, increase explosion tick, fix deviator explosion offset 2015-09-24 14:43:00 +02:00
reaperrr
03508c7bda Fix d2k bazooka explosion
to match original.
2015-09-24 14:42:59 +02:00
reaperrr
3fb1ec91b8 Tweak d2k armament offsets of some actors 2015-09-24 14:42:58 +02:00
Pavel Penev
cdd4590ece Merge pull request #8839 from RoosterDragon/test-sync-implementations
Test sync implementations
2015-09-24 15:17:33 +03:00
Pavel Penev
c41446e022 Merge pull request #9139 from Mailaender/editor-cash-counter
Added a total resource cash counter to the map editor
2015-09-24 15:07:15 +03:00
reaperrr
2b867c99b4 Original d2k terrain speeds 2015-09-24 13:46:07 +02:00
reaperrr
f762bcb252 Fix D2k aircraft HP and armor
This seems to have been overlooked or lost during rebase.
2015-09-24 13:46:06 +02:00
Pavel Penev
2c27452a44 Merge pull request #9386 from atlimit8/FinishWrappingActorInfoTraits
Finish wrapping ActorInfo.Traits
2015-09-24 14:40:07 +03:00
Pavel Penev
32ed7ca416 Merge pull request #9257 from reaperrr/incr-harv-radius
Increased harvester search radii
2015-09-24 12:32:53 +03:00
Pavel Penev
a5f1293c69 Merge pull request #9413 from abcdefg30/new_d2k_flags
Add new flags for d2k
2015-09-24 12:27:23 +03:00
atlimit8
1f247a0a51 Merge pull request #9220 from GraionDilach/observer-clocks
Add customizable properties to observer clocks.
2015-09-23 21:07:01 -05:00
atlimit8
8e0f5bb943 Merge pull request #9361 from visav/player-count-map-filter
Extends MapChooserLogic.mapFilter to match against PlayerCount
2015-09-23 18:46:45 -05:00
reaperrr
f955e83797 Apply original D2k base speeds
10.666667 in OpenRA with 32x32px tiles equals 1 in original RA1 and 64 in original D2k (ground actors).
For aircraft, I applied original D2k speed / 64 * 7, which should be correct for 32x32px.
2015-09-23 20:51:49 +02:00
reaperrr
685be50168 Added original D2k debris 2015-09-23 19:07:07 +02:00
Pavel Penev
f942ab1389 Move any mobile actors that block the building's desired footprint when placing a building 2015-09-23 19:41:21 +03:00
Pavel Penev
02be188d14 Add ActorExts.ClosestCell() 2015-09-23 19:13:34 +03:00
abcdefg30
d47ebc4dd6 Add definitions for the new flags 2015-09-23 16:14:47 +02:00
x-a-n-a-x
b257d4001a Add new flags for factions in d2k 2015-09-23 15:17:21 +02:00
Pavel Penev
60fee57f75 Remove obsolete installation UI YAML files from the official mods 2015-09-23 15:33:08 +03:00
Pavel Penev
50ea12723c Streamline mod changing after installation
- Don't return to the ModChooser after a successful installation.
 - Don't reload the ModChooser after a cancelled installation.
2015-09-23 15:33:06 +03:00
Pavel Penev
4401e1aa0c Pipe mod music installation through the ModChooser 2015-09-23 15:33:03 +03:00
Pavel Penev
0e7122acad Enable mod asset installation from CD from the modchooser 2015-09-23 15:33:00 +03:00
Pavel Penev
bdcb0fee58 Enable mod asset package downloading from the modchooser 2015-09-23 15:32:57 +03:00
Pavel Penev
f0a2e58ccd Add content installation dialogs to modchooser 2015-09-23 15:32:51 +03:00
Pavel Penev
cb0ccbac50 Add paths to TestFiles
File checks for existing files don't work otherwise.
2015-09-23 15:32:41 +03:00
Pavel Penev
fbfb2cfda1 Remove asset handling from BlankLoadScreen 2015-09-23 15:32:40 +03:00
Pavel Penev
d472805fc6 Add mod asset checks to ModBrowserLogic 2015-09-23 15:32:37 +03:00
Pavel Penev
4314fae77a Move ContentInstaller to OpenRA.Game from Mods.Common 2015-09-23 15:32:35 +03:00
Pavel Penev
82bf66a9be Generalise progress bars 2015-09-23 15:32:33 +03:00
Pavel Penev
19388fd773 Add ButtonBaseLine metric 2015-09-23 15:32:29 +03:00
Pavel Penev
1e57f13ecd Fix ModChooser UI 2015-09-23 15:32:26 +03:00
Pavel Penev
863814105b Move D2k tilesets to the root asset directory 2015-09-23 15:32:24 +03:00
abcdefg30
95d2f7c461 Merge pull request #9412 from simon-v/patch-1
Allies-02: Fix mission timer on medium difficulty
2015-09-23 14:10:57 +02:00
Simon Volpert
c1b8ded79b Allies-02: Fix mission timer on medium difficulty 2015-09-23 13:21:15 +03:00
Zimmermann Gyula
1358024b38 Add customizable properties to observer clocks. 2015-09-22 23:30:48 +02:00
Pavel Penev
0ac0fed15c Merge pull request #9340 from reaperrr/d2k-bal-weapons
Changed D2k health, armor types and weapon stats to match original
2015-09-22 23:55:25 +03:00
RoosterDragon
3a63a427e6 Improved sync lint pass.
Now also checks for classes with Sync members lacking the ISync interface.
2015-09-21 22:17:09 +01:00
RoosterDragon
6b62aa1ad5 Add missing sync interfaces. 2015-09-21 22:17:06 +01:00
RoosterDragon
593d913f55 Remove sync on actor - as it doesn't currently work. 2015-09-21 22:16:03 +01:00
atlimit8
9cef739dd5 Make ActorInfo.{Traits => traits} private 2015-09-21 15:50:57 -05:00
atlimit8
b889675c83 ActorInfoTest fixup with new ActorInfo ctor 2015-09-21 15:50:57 -05:00
atlimit8
9acf121eb1 Replace ActorInfo.Traits.WithInterface with ActorInfo.TraitInfos<T>() 2015-09-21 15:50:57 -05:00
atlimit8
6e39a5e264 Replace .WithInterface<T>().Any() => .HasTraitInfo<T>() 2015-09-21 15:50:57 -05:00
atlimit8
b38b6eadd0 Add IEnumerable<ITraitInfo> ActorInfo.TraitInfos() replacing actorInfo.traits enumeration 2015-09-21 15:50:57 -05:00
RoosterDragon
7decfc83ea Fix ActionQueue ordering.
This enforces a well defined ordering for ActionQueue to ensure it runs actions in the the order one would expect.
2015-09-20 23:20:51 +01:00
RoosterDragon
bbdd597917 Merge pull request #9394 from pchote/unstatic-sound
Unstatic the Sound class.
2015-09-20 22:58:00 +01:00
Paul Chote
7f4663f606 Pull out a temporary variable in ProductionQueue. 2015-09-20 22:46:07 +01:00
Paul Chote
d112083c44 Clean up sound devices on game exit. 2015-09-20 22:46:07 +01:00
RoosterDragon
6b9bd1cbbc Eagerly cache traits in Actor.
In this case, removing the lazy generation buys us more performance in removing the overhead of accessing these values than we lose from avoided computation when these values are never accessed.
2015-09-20 22:36:21 +01:00
Oliver Brakmann
28c78f6085 Make a number of navigation keys available to spectators
This will make the following keys available to spectators and in replays:

* Center screen on last event/beacon [Space]
* Center screen on current selection [Home]
* Cycle construction yards [H]
* Cycle production buildings [Tab]

The latter two need a player view to work, the former two work in all
views.
2015-09-20 22:39:06 +02:00
Oliver Brakmann
379b5a181f Make (Harvester|Base)AttackNotifiers visible to team mates and spectators 2015-09-20 22:37:34 +02:00
Visa Varjus
b9f7fb4ebc adds map filtering by PlayerCount 2015-09-20 22:06:46 +03:00
Paul Chote
ef55d646f7 Unstatic the Sound class. 2015-09-20 14:11:06 +01:00
Matthias Mailänder
c3dce785a5 add custom selection sizes to aid the renderer 2015-09-20 14:58:39 +02:00
Matthias Mailänder
7845577553 Add descriptions to the SelectionSize traits. 2015-09-20 14:58:23 +02:00
Paul Chote
ff10fe3e07 Merge pull request #9377 from reaperrr/fix-bldplace-overlay
Fixed TS crane overlay's last frame hiding idle overlay
2015-09-20 12:13:52 +01:00
Paul Chote
141575fc45 Merge pull request #9339 from reaperrr/sbag-fence
Makes only concrete walls block fire
2015-09-20 11:57:04 +01:00
Pavel Penev
db11b81c13 Merge pull request #9371 from reaperrr/maketest-order
Changed make.ps1 test order
2015-09-20 03:15:53 +03:00
Matthias Mailänder
c79f5a20a5 Merge pull request #9369 from RoosterDragon/cross-thread-checks
Added thread-affinity checks to SDL2 renderer
2015-09-19 21:09:08 +02:00
reaperrr
5ec1f8f8a0 Merge pull request #9379 from atlimit8/DanglingActorInfoTraitsContains
Changed missed ActorInfo.Traits.Contains => ActorInfo.HasTraitInfo
2015-09-19 20:55:16 +02:00
reaperrr
e36e4f97bb Fix Grenadier projectile 2015-09-19 20:47:27 +02:00
reaperrr
4aaa62845d Fix TS repair depot idle overlay
This was an idle animation in the original, and this and "platform" cannot be displayed at the same time anyway.
Also increased Tick rate to match idle light.
2015-09-19 20:37:59 +02:00
reaperrr
58e474ec80 Make repair overlay invisible when not repairing 2015-09-19 20:37:58 +02:00
reaperrr
e99c951a0c Hide WithBuildingPlacedOverlay after it has been played
Fixes #9319.
2015-09-19 20:37:57 +02:00
Paul Chote
7dfd5ade3a Merge pull request #9301 from atlimit8/WDistTraitRangeFields
Make Range WDist for all traits with circular ranges.
2015-09-19 19:10:34 +01:00
Paul Chote
3fec4c2032 Merge pull request #9298 from atlimit8/AffectsShroud
Create abstract class AffectsShroud[Info] with RevealsShroud core logic also used by CreatesShroud
2015-09-19 18:46:23 +01:00
atlimit8
131084d129 Changed missed ActorInfo.Traits.Contains => ActorInfo.HasTraitInfo 2015-09-19 12:06:37 -05:00
Matthias Mailänder
fea59346a5 add a total resource cash counter to the map editor 2015-09-19 18:21:07 +02:00
atlimit8
de7f5a4288 Make Range WDist for all traits with circular ranges. 2015-09-19 11:02:28 -05:00
reaperrr
654c66ddd0 Split Trike and Raider muzzle flash to its own weapon
Allows to show 3 muzzle flashes while only playing report, explosion effect and applying damage once
2015-09-19 17:40:02 +02:00
reaperrr
8e737d09c1 Temporary work-around for D2k deviator missile
The lint check doesn't handle player palettes properly yet.
2015-09-19 17:40:01 +02:00
reaperrr
ec277be9b6 Missile tank weapon renamed 2015-09-19 17:40:00 +02:00
reaperrr
ad9bc30c7e D2k added Grenadier and Sardaukar explosions 2015-09-19 17:39:59 +02:00
reaperrr
ab5a07fa5c D2k weapon targeting validity changes 2015-09-19 17:39:58 +02:00
reaperrr
03413b9875 D2k weapon warhead changes 2015-09-19 17:39:57 +02:00
abcdefg30
97346e1833 Merge pull request #9355 from ChaoticMind/socket_crash
Catch exception when hosting server on busy port
2015-09-19 17:27:11 +02:00
abcdefg30
6cbcd66b87 Merge pull request #9215 from LipkeGu/upnp_externalip_fix
Move NAT Logic from ClientTooltipLogic into its own Function at LobbyUtils.
2015-09-19 17:22:02 +02:00
reaperrr
d77839bb3d Merge pull request #9332 from atlimit8/TraitInfoAccess_1
TraitInfo through ActorInfo and HasTrait Removal
2015-09-19 17:06:10 +02:00
atlimit8
09984683a7 Add ActorInfo.TraitInfo[OrDefault]<T>() requiring ITraitIfo types 2015-09-19 09:56:14 -05:00
reaperrr
0ce36b6648 D2k weapon projectile changes
speed, trails, rate of turn, projectile type etc.
2015-09-19 16:55:20 +02:00
atlimit8
6970959ef1 .Trait[OrDefault]<Trait> => .Info.Traits.Get[OrDefault]<TraitInfo> where applicable 2015-09-19 09:49:24 -05:00
atlimit8
8162fa27ab Add ActorInfo.HasTraitInfo<T>() requiring ITraitInfo types 2015-09-19 09:49:24 -05:00
atlimit8
85fab45451 Remove Actor.HasTrait<T>() 2015-09-19 09:49:23 -05:00
reaperrr
d62460cfa1 Reorder yaml testing in make.ps1 to match makefile 2015-09-19 14:28:20 +02:00
reaperrr
959914779f Merge pull request #9376 from pchote/fix-news-panel-width
Make the news panel dropdown consistent across mods.
2015-09-19 14:20:38 +02:00
Paul Chote
55dee63b55 Make the news panel dropdown consistent across mods. 2015-09-19 12:46:07 +01:00
Matthias Mailänder
c0dd9c4566 Merge pull request #9359 from RoosterDragon/fix-pathfinder-layer-pooling
Fixed pooling of layers used for pathfinding
2015-09-19 13:07:33 +02:00
Matthias Mailänder
b5a5dfdb54 Merge pull request #9365 from atlimit8/HealUnitsCrateAction_use_ActorsWithTrait
HealUnitsCrateAction.Activate() use ActorsWithTrait<Health>()
2015-09-19 12:53:25 +02:00
Matthias Mailänder
6c26251b41 Merge pull request #9368 from atlimit8/Harvester_linq_syntax
Replace only use of Linq syntax
2015-09-19 12:03:19 +02:00
RoosterDragon
fc436f1aab Added thread-affinity checks to SDL2 renderer.
If a call is made into a graphics resource that has thread-affinity, from a thread other than the one that created the graphics device, an exception will now be thrown to make debugging easier.
2015-09-18 21:04:21 +01:00
atlimit8
be010249d7 Replace only use of Linq syntax 2015-09-18 10:31:41 -05:00
atlimit8
1d9d28b540 HealUnitsCrateAction.Activate() use ActorsWithTrait<Health>() 2015-09-17 23:55:38 -05:00
reaperrr
4fa20e78fa Merge pull request #9304 from atlimit8/Fix_AttackBase_GetMinimumRange
Make AttackBase.GetMinimumRange() return WDist.Zero if there are no available armaments
2015-09-18 01:26:35 +02:00
reaperrr
ef451ad4a7 Merge pull request #9356 from atlimit8/RemoveIBodyOrientation
Remove redundant IBodyOrientation[Info] & replace with BodyOrientation[Info]
2015-09-18 01:11:54 +02:00
reaperrr
1c759427b5 Merge pull request #9358 from abcdefg30/ts_stnk
Fix a crash when the stnk of TS is cloaking
2015-09-18 01:05:18 +02:00
reaperrr
4d85081577 D2k weapon changes to reload, burst and range 2015-09-17 22:08:40 +02:00
Kevin Azzam
f4461b292e Generalize error message when creating a server fails 2015-09-17 20:03:05 +02:00
RoosterDragon
519be4374c Fixed pooling of layers used for pathfinding.
The previous implementation:
- Was failing to dispose of pooled layers.
- Was using a finalizer to allow undisposed layers to be reused.

This means all pooled layers are kept alive indefinitely until the map changes. If the finalizer is slow for any reason then the pathfiinder will allocate new layers when the pool runs out. Since these new layers are eventually stuffed back into the pool when the finalizer does run, this can theoretically leak unbounded memory until the pool goes out of scope. In practice it would leak tens of megabytes.

The new implementation ensures layers are disposed and pooled correctly to allow proper memory reuse. It also introduces some safeguards against memory leaks:
- A cap is set on the number of pooled layers. If more concurrent layers are needed than this, then the excess layers will not be pooled but instead be allowed to be garbage collected.
- No finalizer. An implementation that fails to call dispose simply allows the layer to be garbage collected instead.
2015-09-16 21:25:46 +01:00
abcdefg30
a5b9442170 Fix a crash when the stnk of TS is cloaking 2015-09-16 17:54:06 +02:00
reaperrr
6b0816d68f Increase default harvester resource search radius
While this slightly decreases performance per search, it reduces the
chance of search-fail-repeat loops on human-controlled and singleplayer AI
harvesters as well as the chance of the more expensive fallback search on skirmish bot harvesters.
2015-09-16 17:37:24 +02:00
Kevin Azzam
89f2a479bf Catch exception when hosting server on busy port
Closes #9354
2015-09-16 13:08:23 +02:00
atlimit8
45112cfa76 Remove redundant IBodyOrientation[Info] & replace with BodyOrientation[Info] 2015-09-15 22:57:08 -05:00
reaperrr
886f366926 Clean up TS wall default
- don't give experience
- don't update player statistics
- don't count it as structure that must be destroyed
2015-09-16 00:51:44 +02:00
reaperrr
b5bf9ec605 Make TS sandbags not block fire anymore 2015-09-16 00:51:43 +02:00
reaperrr
81b8754ffa Make only concrete walls block fire in RA 2015-09-16 00:51:42 +02:00
reaperrr
42a4722ebc Make only concrete walls block fire in TD 2015-09-16 00:51:40 +02:00
Matthias Mailänder
59edf85513 Merge pull request #9344 from reaperrr/fix-ra-water
Fixed RotationPaletteEffect tileset validity check
2015-09-15 21:10:37 +02:00
Guido L
8a1a6945f1 Fix and move Logic into its own Function in LobbyUtils 2015-09-14 23:19:50 +02:00
reaperrr
6613db7a15 Fix RotationPaletteEffect tileset validity check
If Tilesets was empty but ExcludeTilesets was not, it would always return false even though that combination is supposed to mean only the excluded tileset(s) is/are not valid for this effect.
2015-09-14 16:36:56 +02:00
reaperrr
605ec81c55 Merge pull request #9203 from Mailaender/tunnel-rendering
Added tunnel top rendering
2015-09-14 15:42:14 +02:00
reaperrr
642497a5b7 Merge pull request #9323 from abcdefg30/d2k_rock
Fixed a wrong tileset definition in d2k
2015-09-14 15:17:09 +02:00
Pavel Penev
3fc41238d8 Merge pull request #9333 from atlimit8/DuplicateUnitCrateAction_EnabledTargetting
Make DuplicateUnitCrateAction only check enabled targetability
2015-09-14 02:45:19 +03:00
reaperrr
472191c634 Changed d2k vehicle HP and armor types to their original values 2015-09-14 00:03:36 +02:00
reaperrr
98137c514e Changed d2k structure HP and armor types to their original values 2015-09-14 00:03:35 +02:00
reaperrr
6d24006a7f Changed d2k infantry HP to their original values 2015-09-14 00:03:34 +02:00
Pavel Penev
4fad418db5 Merge pull request #9341 from reaperrr/d2k-cleanup1
Some D2k cleanup
2015-09-14 00:27:33 +03:00
reaperrr
ce8554b94a Make ornithopters targetable by anti-air weapons 2015-09-13 22:46:07 +02:00
reaperrr
6c828f90ad Remove unused airborne upgrade from unlandable d2k aircraft 2015-09-13 22:46:06 +02:00
reaperrr
ac9db803e0 Make Carryalls targetable as in original D2k 2015-09-13 22:35:12 +02:00
reaperrr
82b57165e7 Remove Parachutable from d2k infantry default 2015-09-13 22:33:06 +02:00
Pavel Penev
3e542d1039 Merge pull request #9338 from reaperrr/d2k-paradrop
Removes paradrop and carryall.infantry from D2k
2015-09-13 22:56:30 +03:00
reaperrr
ab603827ca Remove paradrop remnants from D2k 2015-09-13 21:49:24 +02:00
reaperrr
3fc11c4555 Remove carryall.infantry
No longer used since paradrops were removed.
2015-09-13 21:49:23 +02:00
reaperrr
be28da2a64 Remove paradrop power from Ix Lab 2015-09-13 21:49:22 +02:00
Pavel Penev
c41e3025c1 Merge pull request #9337 from reaperrr/d2k-orni
Removes unused ornithopter definition and renames ornithopter.bomber
2015-09-13 22:37:43 +03:00
reaperrr
7aaa31774d Rename ornithopter.bomber to just ornithopter 2015-09-13 19:41:41 +02:00
reaperrr
1d197da5ac Remove unused ornithopter definition 2015-09-13 19:39:38 +02:00
reaperrr
a580e6846e Merge pull request #9328 from Mailaender/ai-common-names
Fixed BuildingCommonNames magic
2015-09-13 18:53:37 +02:00
abcdefg30
48ecc717b2 Merge pull request #8996 from Mailaender/alpha-cloak
Added pre-multiplied alpha palettes for cloak effects
2015-09-13 18:53:17 +02:00
abcdefg30
47f07a47bd Merge pull request #9330 from clemty/buildtool
make: don't assume luac is installed
2015-09-13 17:47:29 +02:00
Matthias Mailänder
9df86f031b Merge pull request #9278 from pchote/rename-d2k-actors
Rename d2k actors to match original game rules.
2015-09-13 17:44:15 +02:00
abcdefg30
f78aea4f90 Merge pull request #8636 from Mailaender/irc
Added the in-game IRC client again
2015-09-13 17:14:36 +02:00
abcdefg30
4fc07c55b9 Merge pull request #9260 from Mailaender/tileset-import-fixes
Fixed the legacy isometric tileset importer
2015-09-13 17:07:24 +02:00
Matthias Mailänder
59142d7782 terrain sprite definition MiniYaml changed to plural form, too 2015-09-13 15:01:15 +02:00
Matthias Mailänder
d65600352b Merge pull request #9325 from Mailaender/ai-editor
Fixed HackyAI crashing the map editor
2015-09-13 13:48:36 +02:00
Matthias Mailänder
a7235d84e9 document the hidden keys 2015-09-13 08:30:17 +02:00
atlimit8
578a92370b Make DuplicateUnitCrateAction only check enabled targetability 2015-09-12 21:30:35 -05:00
clemty
378fff75bf don't assume luac is installed 2015-09-12 20:27:51 +02:00
Matthias Mailänder
f903cfea96 don't throw as we are checking for null later 2015-09-12 10:27:22 +02:00
Matthias Mailänder
39b79f5347 don't load the AI routines in the map editor 2015-09-12 08:40:40 +02:00
Matthias Mailänder
b4d22c2eb0 setup tunnel top rendering 2015-09-12 08:24:02 +02:00
abcdefg30
c79f416461 Fix a wrong tileset definition 2015-09-12 02:18:50 +02:00
reaperrr
4108b6da46 Merge pull request #9256 from Mailaender/ai-harv-search
Added AI search for new resource patches avoiding enemies
2015-09-11 23:25:59 +02:00
abcdefg30
0af5b45cb9 Merge pull request #9211 from Mailaender/railroad
Added Tiberian Sun railroad track rendering
2015-09-11 21:25:36 +02:00
abcdefg30
5660b45690 Merge pull request #9267 from clemty/luadocs
Lua API documentation cleanup
2015-09-11 20:32:48 +02:00
reaperrr
0b9fb4420b Add margin to CreateEffectWarhead isAir check 2015-09-11 16:20:25 +02:00
reaperrr
f0129838d7 Merge pull request #9016 from OmegaBolt/hmlrs-orca-wep-expl
TS vanilla rocket explosions
2015-09-11 16:06:42 +02:00
reaperrr
8cae4ee982 Merge pull request #9280 from clemty/nod05build
Nod05: fix unit production
2015-09-11 15:06:07 +02:00
abcdefg30
7573b53c7f Merge pull request #9300 from Mailaender/bot-debug-production
Removed a redundant bot production debug message
2015-09-11 14:40:34 +02:00
Matthias Mailänder
958f305520 Merge pull request #9314 from baxxxster/patch-1
Update soviet01.lua
2015-09-11 07:35:55 +02:00
Pavel Penev
0494ffa120 Update the D2k map importer 2015-09-10 19:26:56 +01:00
Pavel Penev
d74d50df52 Add an upgrade rule for D2k actor renaming 2015-09-10 19:26:52 +01:00
Pavel Penev
a23ea17c2d Update mission Lua scipts 2015-09-10 19:23:06 +01:00
Paul Chote
96b8b8c1ce Rename actors to match original game rules. 2015-09-10 19:23:05 +01:00
reaperrr
181e934ee8 Merge pull request #9311 from atlimit8/Fix9310
DeathType Count check in Explodes
2015-09-10 17:57:26 +02:00
Glenn Martin Jensen
e201e390ff Update soviet01.lua 2015-09-10 15:49:12 +02:00
atlimit8
33915fb271 DeathType Count check in Explodes 2015-09-09 18:35:55 -05:00
Matthias Mailänder
4b1bedd7dd use pre-multiplied alpha for cloak effects 2015-09-09 23:07:24 +02:00
Matthias Mailänder
dae3b62d2a add a simple in-game IRC client 2015-09-09 20:56:05 +02:00
Matthias Mailänder
e06970d942 add railroad tracks 2015-09-09 20:52:26 +02:00
Pavel Penev
4bc8a60fb9 Merge pull request #9231 from reaperrr/bye-rendersimple4
Remove RenderSimple
2015-09-09 18:51:08 +03:00
Pavel Penev
20fe9a9ff2 Merge pull request #9255 from pchote/gamespeed
Add a game speed dropdown to the lobby options.
2015-09-09 18:14:05 +03:00
Pavel Penev
14defdea6c Merge pull request #9258 from Mailaender/editor-mousewheel
Added stepless mouse wheel actor rotation to the editor
2015-09-09 17:33:52 +03:00
Pavel Penev
9e6c664f30 Merge pull request #9290 from RoosterDragon/fix-tileset-dispose
Dispose earlier in FixClassicTilesets.
2015-09-09 17:23:50 +03:00
Pavel Penev
7d7e3a8e0e Merge pull request #9294 from RoosterDragon/remove-shroud-tests
Remove Shroud.IsVisibleTest and IsExploredTest
2015-09-09 17:22:00 +03:00
Pavel Penev
f65a049e61 Merge pull request #9296 from RoosterDragon/can-view-actor-perf
Speed up Player.CanViewActor
2015-09-09 14:14:06 +03:00
atlimit8
6ab32d75bf Make AttackBase.GetMinimumRange() return WDist.Zero if there are no available armaments 2015-09-08 23:36:05 -05:00
atlimit8
b6ffcb8279 Add WDist.MaxValue 2015-09-08 23:25:48 -05:00
atlimit8
3e211232a3 Create abstract class AffectsShroud[Info] with RevealsShroud core logic also used by CreatesShroud 2015-09-08 17:24:49 -05:00
reaperrr
c2a0ca49a6 Cut yaml duplication between anti-actor mines 2015-09-09 00:16:23 +02:00
reaperrr
c272e790e5 Remove RenderSimple
All traits inheriting from it have been removed, and WithSpriteBody can
now take its place.
2015-09-09 00:16:21 +02:00
deniz1a
07c0f489e3 Adds IncludeAllies option to hide-map crate. 2015-09-08 04:06:15 +03:00
reaperrr
7c7506fafb Merge pull request #9096 from deniz1a/hide-crate
Hides crates under fog.
2015-09-07 22:35:46 +02:00
Matthias Mailänder
088f56d181 remove redundant bot debug message 2015-09-07 20:58:52 +02:00
Matthias Mailänder
c53126513e Merge pull request #9295 from reaperrr/hashhash
Use HashSets for AI
2015-09-07 20:55:17 +02:00
RoosterDragon
d1960258db Speed up Player.CanViewActor.
Create Actor.CanBeViewedByPlayer and simply call this instead. The actor can cache all trait lookups on construction to avoid them being repeated for every visibility check.
2015-09-06 23:29:09 +01:00
reaperrr
60359cc6f5 Use HashSets for AI 2015-09-06 22:59:49 +02:00
RoosterDragon
ebf113dfb7 Remove Shroud.IsVisibleTest and IsExploredTest.
These are no longer any faster than the regular checks, so there's no need to keep them.
2015-09-06 21:13:32 +01:00
Pavel Penev
aae3c8ef7d Merge pull request #9293 from RoosterDragon/repair-render-perf
Speed up RepairIndicator.Render.
2015-09-06 23:13:28 +03:00
RoosterDragon
a1f6b83653 Speed up RepairIndicator.Render.
Check repairer count first, as this is quicker than checking fog visibility.
2015-09-06 21:06:02 +01:00
Matthias Mailänder
a8d4bc2cef Merge pull request #9292 from obrakmann/fix-silo-infinite-loop
Fix an infinite loop that occurs when a silo is captured
2015-09-06 21:54:14 +02:00
Oliver Brakmann
caa0e1678e Fix an infinite loop that occurs when a silo is captured 2015-09-06 21:46:20 +02:00
RoosterDragon
662077a47e Merge pull request #9103 from reaperrr/water-rot
Refactored WaterPaletteRotation into RotationPaletteEffect
2015-09-06 20:19:09 +01:00
reaperrr
fabdefeaf1 Use HashSets for tileset checks, check in constructor for better performance 2015-09-06 20:58:24 +02:00
RoosterDragon
286372fedf Dispose earlier in FixClassicTilesets.
Ensure we dispose the stream we opened right away to avoid leaving it open when an exception occurs.
2015-09-06 19:55:00 +01:00
OmegaBolt
55d55b3723 removed ImpactTypes changes 2015-09-06 19:47:16 +01:00
RoosterDragon
1e22762a16 Merge pull request #8766 from TheRaffy/WeatherOverlay
Added a WeatherOverlay
2015-09-06 19:35:00 +01:00
TheRaffy
1fc2158f2e Added a WeatherOverlay 2015-09-06 20:25:29 +02:00
reaperrr
ea7811a076 Rename temp to rotationBuffer and remove comment 2015-09-06 19:28:16 +02:00
reaperrr
cd9effaa35 Added positive palette/tileset properties to RotationPaletteEffect 2015-09-06 19:28:15 +02:00
reaperrr
96c7d4345e Renamed WaterPaletteRotation to RotationPaletteEffect 2015-09-06 19:25:12 +02:00
reaperrr
ca055eb7bb Refactored WaterPaletteRotation
Moved RotationBase from tileset definition to WaterPaletteRotation effect.
Unhardcoded rotation range and rotation rate.
Added possibility to exclude Tilesets from effect.

Fixed RA water palette rotation for actors on desert maps (#8872).
2015-09-06 19:25:10 +02:00
Paul Chote
1109ec53d1 Update UI timers for variable game speed. 2015-09-06 17:48:42 +01:00
Paul Chote
301b698c81 Add game speed dropdown to the lobby. 2015-09-06 17:48:41 +01:00
Paul Chote
257c043e58 Add Timestep property to GlobalSettings. 2015-09-06 17:48:26 +01:00
Matthias Mailänder
0df8b3ba39 bring back AI search for new resource patches avoiding enemies 2015-09-06 12:56:23 +02:00
clemty
bc13ae7ff0 Add missing desert tiles (work originally by psydev) 2015-09-06 12:39:19 +02:00
Pavel Penev
7912e3c7ff Merge pull request #9283 from reaperrr/d2k-weapon-names
Changed D2k weapon names to match original
2015-09-06 13:29:14 +03:00
Pavel Penev
5b93146279 Merge pull request #9273 from clemty/tileset
TD: make cliffs unbuildable
2015-09-06 12:54:39 +03:00
Pavel Penev
8262591cc4 Merge pull request #9282 from reaperrr/d2k-nobounty
Removed bounties from D2k
2015-09-06 12:37:27 +03:00
Matthias Mailänder
c206bebb7f Merge pull request #9274 from pchote/fix-sound-engine
Don’t create multiple sound contexts.
2015-09-06 11:35:50 +02:00
Matthias Mailänder
0e5fcc1756 Merge pull request #9279 from atlimit8/SemanticallySets
More HashSet trait fields & Lint support
2015-09-06 10:23:20 +02:00
Matthias Mailänder
154225d9ee rotate actors freely with mouse wheel and remove the facing hack 2015-09-06 08:54:14 +02:00
Matthias Mailänder
d20e93495e Merge pull request #9272 from pchote/remove-dps-table
Remove the broken actor stats export command.
2015-09-06 08:24:55 +02:00
reaperrr
5e6d30c3f5 D2k - switch stats of UnitExplodeSmall and UnitExplodeMed to match name 2015-09-06 05:08:45 +02:00
reaperrr
a321b41c72 D2k - remove unused UnitExplode 2015-09-06 05:08:44 +02:00
reaperrr
3b2d69df18 D2k - change position and name of ChainGun
To reduce conflicts with stats changes
2015-09-06 05:08:43 +02:00
reaperrr
b9377c49a9 D2k - remove unused ParaBomb 2015-09-06 05:08:40 +02:00
reaperrr
fe2491dd50 Add 80mm_O cannon for Ordos tank
To reduce conflicts with upcoming stats changes.
2015-09-06 05:08:39 +02:00
reaperrr
d3e8ffceb2 D2k weapon renamings 2015-09-06 05:08:38 +02:00
reaperrr
f857f49c10 Remove bounties from d2k 2015-09-06 02:37:28 +02:00
clemty
3bf31c99da Nod05: fix unit production
closes #9277
2015-09-06 00:24:30 +02:00
RoosterDragon
6b14d400ce Merge pull request #9259 from atlimit8/AI_countsAllAircraftRearmBuildings
AI counts all aircraft rearm buildings
2015-09-05 23:17:28 +01:00
atlimit8
8250f223c4 More HashSet trait fields & Lint support 2015-09-05 16:59:30 -05:00
clemty
23c6baa57d TD: make cliffs unbuildable
fixes #9265
2015-09-05 22:41:37 +02:00
Paul Chote
886d489766 Don’t create multiple sound contexts. 2015-09-05 18:29:14 +01:00
Paul Chote
a11ffa5135 Remove the bitrotted actor stats command. 2015-09-05 18:01:32 +01:00
RoosterDragon
592004e738 Unify the player dictionaries in FrozenUnderFog.
This improves the performance of FrozenUnderFog.Tick as only one lookup needs to be done rather than two.
2015-09-05 16:10:00 +01:00
reaperrr
e74c0d6c13 Merge pull request #9141 from RoosterDragon/pathfinder-perf
Improve pathfinder performance (paths may change)
2015-09-05 16:49:51 +02:00
clemty
ea71620f47 Lua API documentation cleanup
also reduces amount of headings with only a single entry

SendAirStrike() - now listed under "Support Powers"
Guard() - now listed under "Combat"
FindResources() - now listed under "Movement"
Deploy() - now listed under "General"
SendParaTroopers() - now listed under "Support Powers"
Paradrop() - no listed under "Transports"

Teleport() should probably be listd under "Movement", but I don't know how to change that (currently listed under "General").

note that I changed "ScriptGlobal" to "ScriptPropertyGroup" for SendAirStrike() - I hope that does not screw up anything
2015-09-05 15:01:14 +02:00
reaperrr
e0e31d89b1 Merge pull request #9264 from penev92/appearsOnRadar
Make AppearsOnRadar implement INotifyCreated
2015-09-05 00:39:33 +02:00
Pavel Penev
c323046ed0 Make AppearsOnRadar implement INotifyCreated
Cache the IRadarColorModifier so we don't look for it on every render tick.
2015-09-05 01:18:45 +03:00
RoosterDragon
e44342daa0 Merge pull request #9250 from reaperrr/fix-deco-visibility
Make rocks and trees HiddenUnderShroud instead of FrozenUnderFog
2015-09-04 18:15:34 +01:00
atlimit8
dbae16b7a0 AI counts all aircraft rearm buildings 2015-09-04 10:45:58 -05:00
reaperrr
543dc8e5d0 Make rocks and trees HiddenUnderShroud instead of FrozenUnderFog
This improves performance significantly when many trees and rocks are on the map and shroud/fog are enabled.
2015-09-04 17:15:16 +02:00
deniz1a
fb87bf0b90 Hides crates under fog of war. 2015-09-04 13:01:01 +03:00
Matthias Mailänder
91c7d7893e Merge pull request #9238 from deniz1a/asymmetric
Red Alert: Corrects spelling in "Asymetric Battle" map.
2015-09-04 10:50:25 +02:00
Matthias Mailänder
f785c5d03f Merge pull request #9246 from RoosterDragon/array-to-set
Change some arrays to sets
2015-09-04 08:56:44 +02:00
Matthias Mailänder
02460a16b4 Merge pull request #9240 from penev92/fixAnims
Fix crash when aircraft is rearming at a helipad in TS
2015-09-04 08:46:23 +02:00
Matthias Mailänder
266a1eac8d Merge pull request #9241 from reaperrr/streamline-bo-yaml
Added ^SpriteActor and fixed remaining BodyOrientation regressions
2015-09-04 08:25:14 +02:00
reaperrr
31bcbeb789 Added ^SpriteActor and streamlined TS defaults
To avoid BodyOrientation issues.
2015-09-03 22:40:02 +02:00
reaperrr
89a115466c Added ^SpriteActor and streamlined D2k defaults
To reduce risk of BodyOrientation issues.
2015-09-03 22:40:01 +02:00
reaperrr
ec48c411f0 Added ^SpriteActor and streamlined TD defaults
To fix BodyOrientation regressions and reduce risk of future regressions.
2015-09-03 22:40:00 +02:00
reaperrr
0fc9507930 Clean and fix RA maps to avoid BodyOrientation-related crashes 2015-09-03 22:39:59 +02:00
reaperrr
6b9a511bd5 Added ^SpriteActor and streamlined RA defaults
To fix potential BodyOrientation issues and reduce risk of future
regressions.
2015-09-03 22:39:57 +02:00
reaperrr
fc4fadbd8d Merge pull request #9237 from Mailaender/allies-03-prison-orientation
Fixed BodyOrientation in 3rd Allies mission
2015-09-03 22:33:08 +02:00
DArcy Rush
f9a011d657 lower shocktrooper health 2015-09-03 20:51:54 +01:00
RoosterDragon
901e604cf3 Replace arrays with sets.
In places where arrays were being treated as a set, just create a set directly. This reveals the intention of such collections better, and also improves performance by allowing set based methods to be used.
2015-09-03 20:09:24 +01:00
Pavel Penev
4f4bab2cdf Merge pull request #9245 from atlimit8/WarheadTargetHashSets
Load HashSets in OpenRA.Mods.Common/Warheads/Warhead.cs directly from MiniYaml
2015-09-03 21:35:59 +03:00
atlimit8
7e31a249ab Load HashSets in OpenRA.Mods.Common/Warheads/Warhead.cs directly from MiniYaml 2015-09-03 13:27:58 -05:00
Pavel Penev
27e16d0730 Don't try to play a rearming animation if it doesn't exist 2015-09-03 15:55:20 +03:00
deniz1a
650cc8fb51 Red Alert: Corrects spelling in "Asymetric Battle" map.
Changes map name to "Asymmetric Battle".
2015-09-03 12:29:59 +03:00
Matthias Mailänder
4f0f5cdee7 remove BodyOrientation for invisible actor 2015-09-03 07:42:21 +02:00
Matthias Mailänder
119023c485 Merge pull request #8727 from atlimit8/MultipleTargetableTraits
TargetTypes by Upgrade and Replacement of Targetable* by Targetable and ITargetablePositions
2015-09-03 07:41:34 +02:00
atlimit8
5f079f2463 Add MinAirborneAltitude to Aircraft trait to set airborne threshold 2015-09-02 23:19:00 -05:00
atlimit8
b789739352 Allies 03 - kill prisoners with barrels 2015-09-02 23:19:00 -05:00
atlimit8
fadfd179cb Cache FrozenActor ITargetable.TargetTypes union 2015-09-02 23:19:00 -05:00
atlimit8
6986cd9f0e Remove TargetableAircraft 2015-09-02 23:19:00 -05:00
atlimit8
97ce4766f3 Grant upgrades while aircraft is airborne 2015-09-02 23:19:00 -05:00
atlimit8
a6cd770dcf Remove TargetableSubmarine 2015-09-02 23:14:41 -05:00
atlimit8
ecc15d9ae6 Grant upgrades while cloaked 2015-09-02 23:14:40 -05:00
atlimit8
23d0424437 Add ITargetablePositions seperating it from ITargetable 2015-09-02 23:14:40 -05:00
atlimit8
f5c3575c5a Support multiple ITargetable traits 2015-09-02 23:14:40 -05:00
Taryn Hill
4bd34e3ed3 Merge pull request #9236 from atlimit8/FixAircraftTraitIndent
Fix indentation in OpenRA.Mods.Common/Traits/Air/Aircraft.cs
2015-09-02 23:07:57 -05:00
atlimit8
5bfa3afd88 Fix indentation in OpenRA.Mods.Common/Traits/Air/Aircraft.cs 2015-09-02 22:54:05 -05:00
Paul Chote
2f759abddc Merge pull request #9159 from penev92/bleed_plugInit
Add PlugInit
2015-09-03 04:18:29 +01:00
Matthias Mailänder
8114a53760 Merge pull request #9222 from GraionDilach/hackyai-unitlimits
Implement HackyAI->UnitLimits.
2015-09-02 21:14:13 +02:00
Matthias Mailänder
8e382cf598 Merge pull request #9218 from deniz1a/badger-satellite
Red Alert: Adds satellite icons to badger planes.
2015-09-02 21:00:46 +02:00
Matthias Mailänder
735bb06c48 Merge pull request #9229 from pchote/fix-building-offsets
Fix TS building artwork offsets.
2015-09-02 20:45:15 +02:00
Pavel Penev
2042fccefd Merge pull request #9189 from reaperrr/bye-rendersimple3
Remove RenderBuilding
2015-09-02 19:21:01 +03:00
reaperrr
032bef7d71 Merge pull request #9124 from penev92/bleed_deployToUpgrade
Make use of DeployToUpgrade
2015-09-02 18:15:14 +02:00
reaperrr
0785bdbcf1 Move WithSpriteBody pause check to constructor 2015-09-02 17:55:03 +02:00
reaperrr
2031df965c Clarify TODO on TS missile silo sequences 2015-09-02 17:51:43 +02:00
reaperrr
45e6c62ec9 Cache WithSpriteBody in Refinery constructor 2015-09-02 17:51:19 +02:00
Paul Chote
7063d785a3 Fix Nod stealth generator offsets. 2015-09-02 16:22:24 +01:00
Paul Chote
291ba0e664 Fix GDI upgrade center offset. 2015-09-02 16:18:37 +01:00
Paul Chote
abce4678ca Fix Nod advanced power plant offset. 2015-09-02 16:18:27 +01:00
Paul Chote
04c61727f7 Don’t sample map height when calculating building centers. 2015-09-02 16:06:05 +01:00
Pavel Penev
495a99991c Add turret plugs to the TS shellmap 2015-09-02 16:13:27 +03:00
Pavel Penev
8f42cff550 Introduce PlugsInit 2015-09-02 16:13:23 +03:00
Pavel Penev
c4bf92870b Merge pull request #9083 from Mailaender/lint-cleanup
Cleaned up the ILint boiler plate code
2015-09-02 15:49:43 +03:00
Pavel Penev
59aded844f Merge pull request #9204 from reaperrr/bleed-rendertweaks1
Fix TD tower selection boxes and improve TS sequence offsets
2015-09-02 15:45:31 +03:00
Pavel Penev
8fbe35d156 Merge pull request #9228 from penev92/buildFix
Fix the build after a bad merge
2015-09-02 15:29:03 +03:00
Pavel Penev
a3633671a9 Fix the build after a bad merge
Merging #9187 without rebasing it on post-#9182 bleed was a bad idea.
2015-09-02 15:22:14 +03:00
Pavel Penev
ba9abc9e0a Merge pull request #9187 from RoosterDragon/field-saver-culture
Fix culture in FieldSaver for collections
2015-09-02 15:14:42 +03:00
Pavel Penev
b7192ffa14 Merge pull request #9207 from Mailaender/ctdam-animations
Added damaged, light and water animations to the Tiberian Sun hydroelectric dam
2015-09-02 15:08:49 +03:00
Pavel Penev
1679ac5a91 Merge pull request #9208 from Mailaender/kodiak-lights
Added Tiberian Sun Kodiak positional lights
2015-09-02 15:04:57 +03:00
Pavel Penev
325e974a94 Merge pull request #9209 from Mailaender/nod-lights
Added lights to the Nod Montauk and Pyramid
2015-09-02 14:58:19 +03:00
Pavel Penev
acd11d4521 Merge pull request #9212 from OpenRA/trucka
Added the unloaded truck to Tiberian Sun
2015-09-02 14:53:10 +03:00
Pavel Penev
995926b572 Merge pull request #9226 from GraionDilach/d2k-bo
Fix misc D2k BodyOrientation-regressions.
2015-09-02 14:42:44 +03:00
Pavel Penev
800b77e137 Merge pull request #9007 from reaperrr/armor-upgradable
Made Armor upgradable
2015-09-02 14:19:30 +03:00
Pavel Penev
8e2fca6f46 Merge pull request #9225 from LipkeGu/Namespace_Is_Wrong
Fix Namespace definition
2015-09-02 13:42:01 +03:00
Zimmermann Gyula
7ce1b89ba9 Fix misc D2k BodyOrientation-regressions. 2015-09-02 10:39:12 +02:00
Guido L
7181519fe4 Fix Namespace definition 2015-09-02 08:11:27 +02:00
Zimmermann Gyula
11c5144cb4 Restore AI kennel usage, limit AI harvesters and dogs. 2015-09-01 23:32:22 +02:00
Zimmermann Gyula
0a79109d01 Implement HackyAI->UnitLimits. 2015-09-01 23:32:13 +02:00
RoosterDragon
509a0e54a2 Merge pull request #9182 from penev92/bleed_dicts
Add support for Dictionary to FieldLoader and FieldSaver
2015-09-01 21:28:24 +01:00
Pavel Penev
256929073c Clean up some trait info loading code
Remove some methods that traits define to load their YAML values on their own.
2015-09-01 22:52:22 +03:00
Pavel Penev
8ddbabbfde Add Dictionary<,> support to FieldSaver 2015-09-01 22:52:20 +03:00
Pavel Penev
341b3395c8 Add Dictionary<,> support to FieldLoader 2015-09-01 22:52:18 +03:00
Pavel Penev
821e09877d Remove an assumption from FieldLoader.TryGetValueFromYaml() about the current value not having subnodes.
FieldLoader assumed the YAML that is being loaded is a simple value with no subnodes and threw an exception otherwise. This explicitly excluded the possibility of trying to load a Dictionary or another more complex object.
2015-09-01 22:52:04 +03:00
Matthias Mailänder
2df76ad962 add an overload that doesn't use string.Format 2015-09-01 20:59:14 +02:00
Matthias Mailänder
d17d68f894 Merge pull request #9221 from GraionDilach/fix-veinhole
Fix veinholes.
2015-09-01 20:38:46 +02:00
Pavel Penev
606a8c1639 Convert the Mobile Sensor Array to use DeployToUpgrade
Stop using Transforms.
2015-09-01 20:24:45 +03:00
Pavel Penev
899ea7e16d Add a description to DisableUpgrade 2015-09-01 20:19:31 +03:00
Pavel Penev
cdedfe6931 Don't get stuck in deployed mode because of an impossible move order 2015-09-01 20:19:29 +03:00
Pavel Penev
7668e0a30c Add deploy and undeploy sounds to DeployToUpgrade 2015-09-01 20:19:27 +03:00
Pavel Penev
21f9547fed Add facing to DeployToUpgrade
Make the actor turn to a desired facing before starting to deploy (and before granting the upgrade).
2015-09-01 20:19:25 +03:00
Pavel Penev
7d59aaa00c Add a deploy animation to DeployToUpgrade
Play a "deploy"/"undeploy" animation
2015-09-01 20:19:23 +03:00
Pavel Penev
3678e146cf Make WithVoxelBody upgradable 2015-09-01 20:19:21 +03:00
RoosterDragon
ac55c5bf09 Fix pathfinding using PriorityQueue incorrectly.
By providing a comparer that could change over time (as estimated costs on the graph were updated), this meant the priority queue could have its heap property invalidated and thus not maintain a correct ordering. Instead we store elements into the queue with their estimations at the time. This preserves the heap property and thus ensures the queue returns properly ordered results, although it may contain out of date estimations.

This also improves performance. The fixed comparer need not perform expensive lookups into the graph, but can instead use the readily available value. This speeds up adds and removes on the queue significantly.
2015-09-01 17:29:36 +01:00
RoosterDragon
77923a27c1 Tweak IPathSearch to avoid exposing the OpenQueue directly. 2015-09-01 17:29:36 +01:00
RoosterDragon
774992c246 Cache only unit paths in the pathfinder.
The path caching works on the assumption that the time saved from reusing a cached path outweights the cost of caching it in the first place.

For unit paths, this assumption holds. For path searchs, we spend more time caching them then we save when we get to reuse these cached paths. This is because they are reused less often, and calculating their key is more expensive in comparison.
2015-09-01 17:29:35 +01:00
Zimmermann Gyula
1410a3d405 Fix veinholes. 2015-09-01 17:14:41 +02:00
reaperrr
7f7031d5c8 Update outdated description 2015-09-01 13:52:09 +02:00
Zimmermann Gyula
4aba64cc0f Fix armors. 2015-09-01 13:52:08 +02:00
reaperrr
0f9ef4036e Merge pull request #9140 from RoosterDragon/safe-pathfinder-perf
Improve pathfinder performance
2015-09-01 13:02:29 +02:00
reaperrr
a154410307 Merge pull request #9214 from Mailaender/ts-trains
Fixed the TS mod crashing on startup and oh trains!
2015-09-01 13:00:14 +02:00
deniz1a
d065c9f202 Red Alert: Adds satellite icons to badger planes.
They drop crates, paratroopers and parabombs.
2015-09-01 10:15:37 +03:00
Matthias Mailänder
2ed240527e add train locomotive and waggons 2015-08-31 22:22:49 +02:00
Matthias Mailänder
b3bed529d2 fix 'nawall' does not define a quantized body orientation 2015-08-31 22:14:17 +02:00
RoosterDragon
0739fc80a3 Cache the speed modifiers enumerable, not just the traits, in Mobile. 2015-08-31 20:45:34 +01:00
RoosterDragon
d9dd96ca35 Speed up Map.ContainsAllProjectedCellsCovering on flat maps.
This method gets called often via Contains calls. We can significantly speed up the method for flat maps since we know the projection and it is trivial to perform. This avoids an expensive projection lookup.
2015-08-31 20:45:32 +01:00
RoosterDragon
76303e9699 In PathGraph.GetConnections, return a List of neighbors directly, rather than a LinkedList typed an IEnumerable.
The caller can enumerate the list more efficiently without the IEnumerable indirection, and the reduced memory allocation is marginally faster than allocating a linked list and several nodes.
2015-08-31 20:45:31 +01:00
RoosterDragon
7d44eb953e Reduce size of GraphConnection for allocation efficiency. 2015-08-31 20:45:29 +01:00
RoosterDragon
be59d045ce Only enumerate crushable traits once in MobileInfo.IsBlockedBy. 2015-08-31 20:45:25 +01:00
RoosterDragon
dab53f403d Provide a hand-written enumerator for ActorMap.GetUnitsAt(CPos). 2015-08-31 20:43:19 +01:00
RoosterDragon
18478646d4 Avoid multiple ToMPos calls in ActorMap. 2015-08-31 20:43:18 +01:00
RoosterDragon
ac1658c9ce Refactor movement cost method to avoid repeated terrain information lookups.
As the world tileset is fixed, the pathfinder can look up the terrain information for that tileset on creation. This is implemented by the WorldMovementInfo struct. When calculating node costs, this allows the pathfinder to avoid having to repeat this expensive dictionary lookup on every node.
2015-08-31 20:43:18 +01:00
RoosterDragon
4eacb6e5c9 Transparently cache results of GetTerrainIndex in Map.
This method performs an expensive calculation and is called often during pathfinding. We create a cache of the terrain indicies for the map to vastly reduce the cost.
2015-08-31 20:43:17 +01:00
RoosterDragon
fa87befeff Add missing CellEntryChanged checks. 2015-08-31 20:43:16 +01:00
Matthias Mailänder
f65c356399 add Kodiak positional lights 2015-08-31 20:20:47 +02:00
Matthias Mailänder
ee8cac25d0 add lights to the Nod pyramid 2015-08-31 20:18:14 +02:00
reaperrr
3175ef4d67 Merge pull request #9193 from Mailaender/quanbo-fixup
Fixed BodyOrientation refactor regressions
2015-08-31 20:12:53 +02:00
Matthias Mailänder
252b102886 add the unloaded truck 2015-08-31 18:30:22 +02:00
Matthias Mailänder
6137a44123 add lights to the Montauk 2015-08-30 18:51:00 +02:00
Matthias Mailänder
f60080e0ac Merge pull request #9186 from LavenderMoon/bleed
Combine Shrapnel into Bullet
2015-08-30 18:40:26 +02:00
Matthias Mailänder
47b581d8c0 be more concise 2015-08-30 17:42:56 +02:00
Matthias Mailänder
19801b6cc3 add damaged, light and water animations 2015-08-30 17:40:54 +02:00
reaperrr
10ab4cbe61 Fixed production overlay ZOffsets 2015-08-30 15:45:01 +02:00
reaperrr
c39c7cdc4e Fix d2k NukePower sequence requirement 2015-08-30 15:45:00 +02:00
reaperrr
9da56f51e2 Remove RenderBuilding 2015-08-30 15:44:59 +02:00
reaperrr
df29ee1e19 Improved TS sequence offsets for gaplug and naapwr
Fixes #9003.
2015-08-30 15:38:03 +02:00
reaperrr
6c2eb1b0a8 Fixed TD obelisk and adv. guard tower visual selection boxes 2015-08-30 15:38:02 +02:00
Pavel Penev
5e55cef02c Merge pull request #8699 from deniz1a/disguise-owner
Shows real owner of disguised units to allies.
2015-08-30 14:32:34 +03:00
Matthias Mailänder
0b8d7708ef add more lint interfaces to reduce boiler plate 2015-08-30 13:12:25 +02:00
Lavender Moon
81e5b7866b Combine Shrapnel into Bullet 2015-08-30 06:37:38 -04:00
Matthias Mailänder
838faa4ae3 Merge pull request #9200 from penev92/bleed_upgradableResources
Make SeedsResource upgradable
2015-08-30 11:41:12 +02:00
Matthias Mailänder
24a5c37d5b Merge pull request #9199 from reaperrr/fix-td-shell-mamm
Fixed TD shellmap mammoth turrets drawn below body
2015-08-30 11:11:37 +02:00
Pavel Penev
55045d691a Make SeedsResource upgradable 2015-08-30 02:13:56 +03:00
Pavel Penev
43809b7fc5 Merge pull request #9194 from Mailaender/emitError-sequences
Fixed undefined sequence lint checks not emitting errors
2015-08-30 01:29:20 +03:00
reaperrr
bf51e0600d RenderBuildingWall -> WithWallSpriteBody 2015-08-30 00:22:53 +02:00
reaperrr
21186c10b6 RenderBuildingTurreted -> WithTurretedSpriteBody 2015-08-30 00:22:52 +02:00
reaperrr
dddb49e095 Fix TD shellmap mammoth turrets 2015-08-29 23:59:16 +02:00
reaperrr
69d062495c RenderBuildingSilo -> WithSiloAnimation 2015-08-29 23:33:18 +02:00
reaperrr
2df318cd3e RenderBuildingCharge -> WithChargeAnimation 2015-08-29 23:33:17 +02:00
reaperrr
bc2b60be05 Extend WithSpriteBody funtionality
Move building placement range circle to PlaceBuilding, add
PauseAnimationWhenDisabled.
2015-08-29 23:10:22 +02:00
Matthias Mailänder
539e25920c add missing spaces 2015-08-29 21:24:58 +02:00
Pavel Penev
8d1e46dc54 Merge pull request #9195 from Mailaender/map-preview-leak
Fixed a resource leak in MapPreview
2015-08-29 20:36:48 +03:00
Matthias Mailänder
25a0143b46 avoid unnecessary trait lookups 2015-08-29 18:58:30 +02:00
Matthias Mailänder
1dfb982d6f fix paradrop camera not defining a body orientation 2015-08-29 18:49:51 +02:00
Matthias Mailänder
72dffe3391 dispose res properly 2015-08-29 18:47:10 +02:00
Matthias Mailänder
5fc8a413e6 emitError for undefined sequences 2015-08-29 08:18:52 +02:00
Matthias Mailänder
da0c80dc3d fix bridges not defining body orientation 2015-08-29 08:15:17 +02:00
Matthias Mailänder
45f7526967 fix dereference after null check 2015-08-29 08:05:00 +02:00
Matthias Mailänder
fda39f7136 add missing ISync 2015-08-29 08:04:37 +02:00
Matthias Mailänder
589cb4cd0a Merge pull request #9191 from reaperrr/fix-qffs
Fix TS regression from #9004
2015-08-29 07:12:21 +02:00
reaperrr
c3ff298572 Fix TS regression from #9004 2015-08-29 02:41:26 +02:00
Matthias Mailänder
9c1eeafa08 Merge pull request #9004 from reaperrr/quanbo
Introduce QuantizeFacingsFromSequence
2015-08-28 22:46:29 +02:00
Pavel Penev
c793ac565e Merge pull request #9188 from RoosterDragon/friendly-name-hashset
Friendly name for HashSet in docs
2015-08-28 23:03:15 +03:00
Matthias Mailänder
a0bdce9ad8 Merge pull request #9185 from reaperrr/d2k-fixes
D2k fix for cliff passability
2015-08-28 21:51:03 +02:00
Matthias Mailänder
88df5057b6 Merge pull request #9175 from penev92/bleed_maxMind
Update MaxMind.GeoIP2 version to 2.3.1
2015-08-28 21:48:19 +02:00
RoosterDragon
637a87c33b Use a better name for HashSet in ExtractTraitDocsCommand.FriendlyTypeName. 2015-08-28 19:55:25 +01:00
RoosterDragon
d11e60474a Ensure the elements of arrays and sets are formatted correctly in FormatValue.
We call FormatValue on each element to ensure correct culture and other formatting that would otherwise not be applied.
2015-08-28 19:39:25 +01:00
RoosterDragon
243763f570 Remove redundant invariant culture handling for float, decimal, double.
This is already handled by the type converter portion of the code.
2015-08-28 19:33:59 +01:00
reaperrr
a4bac0ab29 Fix ground type of some D2k cliffs 2015-08-28 17:37:14 +02:00
reaperrr
f62bc3c226 Merge pull request #9172 from Mailaender/fix-withcargo-desync
Fixed a desync involving WithCargo
2015-08-28 15:05:55 +02:00
Pavel Penev
d1a3bf97a6 Merge pull request #9105 from RoosterDragon/cmfi-refactor-perf
Mobile Blocking Refactor
2015-08-28 15:35:49 +03:00
Pavel Penev
3d76f76c26 Merge pull request #9181 from RoosterDragon/field-loader-hashsets
Support HashSet in FieldLoader/FieldSaver
2015-08-28 01:13:33 +03:00
RoosterDragon
2f9ca36506 Update WeaponInfo to use HashSets for some fields directly. 2015-08-27 21:48:12 +01:00
RoosterDragon
5a177a889c Add ability to load and save HashSets. 2015-08-27 21:48:09 +01:00
RoosterDragon
6d183b6d63 Merge pull request #9178 from LavenderMoon/bleed
Move duplicate Tick() code from Plane and Helicopter to Aircraft.
2015-08-27 21:42:18 +01:00
RoosterDragon
410b97823a Ensure our array handling only accepts single dimensional arrays. 2015-08-27 21:31:24 +01:00
RoosterDragon
42123d5653 Merge pull request #9143 from LipkeGu/mod_loadscreen_crash
LoadScreen: Do not crash when Image or Text is not defined.
2015-08-27 21:25:26 +01:00
Lavender Moon
4649c03260 Move duplicate Tick() code from Plane and Helicopter to Aircraft. 2015-08-27 16:21:51 -04:00
Pavel Penev
353d9215c6 Update MaxMind.GeoIP2 version to 2.3.1
Fixes an "Operation did not complete successfully because the file contains a virus." message when making dependencies.
2015-08-27 21:43:47 +03:00
Paul Chote
8730a7f223 Fix WithCargo desync. 2015-08-26 19:35:18 +02:00
Guido L
bc39fcda98 LoadScreen: Add fallback message when no Text or Image is specified. 2015-08-25 20:44:38 +02:00
reaperrr
508c99655c Made Armor upgradable 2015-08-25 20:12:37 +02:00
Pavel Penev
d5e0bf2169 Merge pull request #9006 from reaperrr/remove-cantarget
Remove legacy 0% = not targetable assumption
2015-08-25 20:03:31 +03:00
reaperrr
aff1e5afe7 Upgrade notice 2015-08-25 18:54:01 +02:00
reaperrr
050a9076ed Fix TS medic heal target validation 2015-08-25 18:54:00 +02:00
reaperrr
cb95eeb914 Fix RA target validation
0% versus no longer means cannot target
2015-08-25 18:53:59 +02:00
reaperrr
6161b72f3e TD target validation
This mod already implements ValidTargets as intended, but grounded helicopters should count as vehicles for target validation.
2015-08-25 18:53:58 +02:00
reaperrr
468b0b4223 Fix D2k target validation
0% versus no longer means not targetable.
2015-08-25 18:53:57 +02:00
abcdefg30
1ddab69025 Merge pull request #9131 from Mailaender/ts-logo
Added a Tiberian Sun loadscreen and shellmap logo
2015-08-25 11:53:59 +02:00
Pavel Penev
d48cf695f3 Merge pull request #9144 from Mailaender/opt-find-resource
Optimized FindResources worse case scenario path finding
2015-08-25 04:24:05 +03:00
abcdefg30
d5680f0ee0 Merge pull request #8952 from Mailaender/ts-debris-variation
Added more variation to Tiberian Sun debris
2015-08-24 22:02:13 +02:00
abcdefg30
67966ad704 Merge pull request #8731 from deniz1a/simplify-lobby-logic
Simplifies Start button logic in lobby
2015-08-24 21:27:05 +02:00
reaperrr
18b8eb30a3 Merge pull request #9134 from clemty/docs
minor LUA and trait documentation fixes, whitespace fixes
2015-08-24 21:26:20 +02:00
abcdefg30
b9f4431ed0 Merge pull request #9151 from penev92/bleed_summaries
Add a bit of code documentation
2015-08-24 21:18:11 +02:00
Pavel Penev
ae43d813ad Merge pull request #9024 from atlimit8/consolidateDefenseDeployedVehicle
Consolidate rules into ^Defense (all) & ^DeployedVehicle (ts)
2015-08-24 22:08:38 +03:00
Matthias Mailänder
5c2849a08f add a simple projectile with random sequences for debris effects 2015-08-24 21:05:37 +02:00
Matthias Mailänder
2a21c7d1f2 don't let bots do 2x the amount of path searches 2015-08-24 21:03:46 +02:00
Matthias Mailänder
7108344501 bail out early before trying impossible paths 2015-08-24 21:03:46 +02:00
clemty
2bbc1fcda4 LUA and trait documentation fixes
- Typo in documentation ("proximitry").
- Add spaces between sentences.
- Remove most occurrences of "  " (two spaces) unless clearly used as indendation
- Punctuation (although no fullstop after filenames like "notifications.yaml").
2015-08-24 19:41:15 +02:00
reaperrr
64bbfe4121 Merge pull request #9129 from Mailaender/ts-build-palette
Fixed black dots on Tiberian Sun build palette icons
2015-08-24 17:46:02 +02:00
reaperrr
7f928477f9 Merge pull request #9130 from Mailaender/gdi4-shellmap
Replaced the blank shellmap with something more interesting
2015-08-24 17:29:22 +02:00
Matthias Mailänder
6132ec6558 Merge pull request #9150 from penev92/bleed_dedicatedSound
Make lower-level Sound not require the server state directly
2015-08-24 06:44:51 +02:00
atlimit8
f45358c36d Consolidate defense rules into ^Defense & ^DeployedVehicle for ts mod 2015-08-23 22:42:10 -05:00
atlimit8
a83806d90c Consolidate defense structure rules into ^Defense for d2k mod 2015-08-23 22:39:13 -05:00
atlimit8
68ee859666 Consolidate defense structure rules into ^Defense for cnc mod 2015-08-23 22:39:13 -05:00
atlimit8
59cd477e3e Consolidate defense structure rules into ^Defense for ra mod 2015-08-23 22:39:13 -05:00
Pavel Penev
02dd5afbd9 Merge pull request #9058 from RoosterDragon/reduce-alloc
Reduce allocations in the main game loop
2015-08-24 02:11:08 +03:00
reaperrr
3821729744 Upgrade rule 2015-08-24 00:49:01 +02:00
reaperrr
ed81eaaac2 TS yaml changes 2015-08-24 00:49:00 +02:00
reaperrr
542d88245d D2k yaml changes 2015-08-24 00:48:59 +02:00
reaperrr
9780bb26c2 RA yaml changes 2015-08-24 00:48:58 +02:00
reaperrr
2293494c56 TD yaml changes 2015-08-24 00:48:57 +02:00
reaperrr
006e66a3c3 Refactored IQuantizeBodyOrientation implementation
Moved BodyOrientation and related interfaces from Game to Mods.Common.
Introduced QuantizeFacingsFromSequence trait.
With*Body render traits no longer implement IQuantizeBodyOrientation
themselves.
2015-08-24 00:48:56 +02:00
Pavel Penev
09a41d8bde Add a bit of code documentation 2015-08-24 01:47:35 +03:00
Pavel Penev
49e9ad2c7c Make lower-level Sound not require the server state directly 2015-08-24 01:36:56 +03:00
Pavel Penev
1d3cfcf378 Merge pull request #8632 from Mailaender/openra-platform
Removed the OpenAL/OpenGL/SDL2 dependency from the game engine
2015-08-24 00:45:27 +03:00
Pavel Penev
535863ea83 Merge pull request #9147 from Mailaender/exception-log-map
Added the current map to the exception.log
2015-08-24 00:29:52 +03:00
Matthias Mailänder
0fba872b73 replace blank shellmap with something more interesting 2015-08-23 22:49:17 +02:00
Matthias Mailänder
001d2cde30 add the map to the exception.log 2015-08-23 22:27:00 +02:00
Pavel Penev
d64f5f29a4 Merge pull request #9075 from deniz1a/fix-crate
Removes LocalPlayer check from HideMapCrateAction and RevealMapCrateAction.
2015-08-23 23:17:28 +03:00
Matthias Mailänder
bec209085b Merge pull request #7873 from penev92/bleed_raceToFaction
Replace old "country" and "race" name in the code with the generic "faction"
2015-08-23 17:49:40 +02:00
Matthias Mailänder
f7b0454b9e avoid an unnecessary overload 2015-08-23 07:58:07 +02:00
Matthias Mailänder
4059f83b7e remove redundant namespace repetition 2015-08-23 07:58:06 +02:00
Matthias Mailänder
bfc7013ba4 avoid magic numbers 2015-08-23 07:58:06 +02:00
Matthias Mailänder
6abd21e71d explicitly set the OpenTK GL context 2015-08-23 07:58:06 +02:00
Matthias Mailänder
17f3466451 untie the engine from SDL2 and MiniTK 2015-08-23 07:58:03 +02:00
Pavel Penev
60eea5a507 Merge pull request #8840 from deniz1a/dropdown-gap
Removes spacing between dropdown menu items.
2015-08-23 01:32:53 +03:00
Pavel Penev
dec2696e76 Change "Change faction" lobby command 2015-08-22 23:34:40 +03:00
Pavel Penev
05e081043b Rename last usages of "race" in UI YAML files 2015-08-22 23:34:38 +03:00
Pavel Penev
09f67d18bb Some internal "race" to "faction" renaming 2015-08-22 23:34:36 +03:00
Pavel Penev
a83fc81571 Merge pull request #9126 from LipkeGu/RadarWidget_crash
Add Cell check to RadarWidget
2015-08-22 22:58:19 +03:00
Pavel Penev
b1b576c41b Merge pull request #8797 from abcdefg30/gpsvanish
Add a GpsRemoveFrozenActor trait
2015-08-22 22:47:57 +03:00
abcdefg30
87580d0aab Add a GpsRemoveFrozenActor trait 2015-08-22 21:36:30 +02:00
abcdefg30
429e6145cb Merge pull request #9073 from pchote/remove-production-duplication
Minor Production trait cleanups.
2015-08-22 20:39:10 +02:00
Pavel Penev
6d0d5b52fe Merge pull request #9133 from abcdefg30/interiorsmudge
Fix smudges/scorches being displayed on interior clear ground
2015-08-22 21:27:24 +03:00
abcdefg30
0f599bfc10 Fix smudges/scorches being displayed on interior clear ground 2015-08-22 18:26:10 +02:00
Matthias Mailänder
79f38802be replace Tiberian Dawn artwork for consistency 2015-08-22 17:37:13 +02:00
Matthias Mailänder
2917d28545 set up original build click palette to fix dark pixel errors 2015-08-22 16:18:19 +02:00
reaperrr
8e9da7f897 unhardcode palettes and sequences 2015-08-22 16:09:07 +02:00
Matthias Mailänder
1c45ca75a7 Merge pull request #9034 from Biofreak1987/soviet07
Add Soviet07
2015-08-22 14:12:56 +02:00
deniz1a
3b36ddfc54 Removes LocalPlayer check from HideMapCrateAction and RevealMapCrateAction.
Fixes #9063.
Fixes #9127.
2015-08-22 14:37:39 +03:00
Matthias Mailänder
f325463204 Merge pull request #9117 from GraionDilach/infiltrate-fix
Prevent infiltrating allied targets.
2015-08-22 12:54:42 +02:00
Guido L
9bad84e117 Add Cell check to RadarWidget. 2015-08-22 09:31:09 +02:00
deniz1a
347143ba87 Adds TopBottomSpacing to GridLayout. 2015-08-22 04:04:05 +03:00
deniz1a
90897481f9 Adds TopBottomSpacing values to yaml files. 2015-08-22 03:51:07 +03:00
deniz1a
a534290dc5 Removes spacing between dropdown menu items. 2015-08-22 03:51:07 +03:00
Zimmermann Gyula
3670c003a4 Prevent infiltrating allied targets unless explicitly set. 2015-08-22 00:35:41 +02:00
Pavel Penev
b7af5f5291 Merge pull request #9018 from Mailaender/cnc-maps
Added high quality Tiberian Dawn community maps
2015-08-22 01:13:01 +03:00
abcdefg30
8783905c51 Merge pull request #8773 from dan9550/ts-yaml
Alter install logic to convert case of file names
2015-08-21 21:53:48 +02:00
Dan9550
a559f6d4ac Modified mod.yaml to respect case sensitive file names
Modified mod.yaml to respect case sensitive file names

Modified install logic to convert case of files on install

Revert initial changes
2015-08-21 23:42:10 +10:00
Pavel Penev
174bde57f1 Merge pull request #9123 from clemty/authors
add myself to AUTHORS
2015-08-21 13:38:28 +03:00
clemty
447326c328 add myself to AUTHORS 2015-08-21 12:06:32 +02:00
Pavel Penev
d803a06a1e Merge pull request #8995 from reaperrr/vxl-upgrades1
Made WithVoxelTurret and WithVoxelBarrel upgradable
2015-08-21 00:33:42 +03:00
Biofreak1987
2242ae8937 Add Soviet07 2015-08-20 22:41:52 +02:00
Matthias Mailänder
9a861bdfba Merge pull request #8700 from deniz1a/rename-disable-shroud
Renames "Disable Shroud & Fog" debug option to "Observer view".
2015-08-20 20:41:01 +02:00
Matthias Mailänder
913871f171 Merge pull request #9097 from LipkeGu/rules_terrainType_fixes
Fix TerrainTypes for walls and crates
2015-08-20 20:37:12 +02:00
Pavel Penev
20193f086f Merge pull request #8942 from reaperrr/explodes2
Add specific exception message when Explodes cannot find a weapon
2015-08-20 13:03:37 +03:00
Matthias Mailänder
59a7d743cb Merge pull request #9047 from clemty/tooltips
TD tooltip fixes
2015-08-19 22:08:53 +02:00
Matthias Mailänder
cafad9f843 Merge pull request #9092 from penev92/bleed_rename
Some more renaming from "race" to "faction"
2015-08-19 22:03:01 +02:00
abcdefg30
7612f60b22 Merge pull request #8939 from Mailaender/lint-map-scripts
Added checks for syntax errors in Lua scripts
2015-08-19 21:36:34 +02:00
abcdefg30
7e7e3723dc Add "check-scripts" to make.ps1 2015-08-19 21:21:01 +02:00
Matthias Mailänder
5a3e61a902 check the .lua scripts for syntax error 2015-08-19 21:21:01 +02:00
clemty
4351094bd7 TD tooltip fixes
- mention Apache being strong vs aircraft
- mention engineers will damage buildings, not just capture them

reverted:
- Sentences are now (mostly) lowercase, end with full-stop
- Changed "defence" tab tooltip to "defense"
2015-08-19 12:53:08 +02:00
RoosterDragon
3d94c4b216 Minor formatting fix in Mobile.cs. 2015-08-18 22:03:14 +01:00
RoosterDragon
7eab7220ff In CanMoveFreelyInto, check if transient actor checks are needed at the start.
When transient actors checks are not needed, all control flows in the method return true. Therefore, we can return true directly in this case. Checking this condition is cheaper than checking for a free sub-cell, so this allows us a faster exit when we don't need to check for transient actors.
2015-08-18 22:03:13 +01:00
RoosterDragon
ca75b5af30 Factor logic for determining if an actor blocks movement into IsBlockedBy. 2015-08-18 22:03:11 +01:00
RoosterDragon
6414743f8e Introduce HasCellCondition to avoid HasFlag overhead. 2015-08-18 22:03:09 +01:00
RoosterDragon
d415d3ba4e Reduce allocations in the main game loop.
- Cache the shroud projection even for flat maps to avoid allocating single element arrays.
- Avoid LINQ in shroud and map projection queries to avoid enumerator allocations.
- Avoid LINQ in calculation of sync values.
- Cache enumerables in ProductionQueue.
- Cache delegate in HackyAI.
2015-08-18 21:17:28 +01:00
abcdefg30
83b310713d Merge pull request #8905 from atlimit8/WithProductionOverlay_accept_OnOwnerChanged
WithProductionOverlay: replace ITick => INotifyCreated & add INotifyOwnerChanged
2015-08-18 21:17:00 +02:00
abcdefg30
ee09dd41bc Merge pull request #8957 from Mailaender/ts-decorations
Added Tiberian Sun decorational actors
2015-08-18 21:15:28 +02:00
reaperrr
e057a97217 Remove bogus ShadowIndex from TS cameo palette 2015-08-18 18:33:46 +02:00
Pavel Penev
663c9239df Mop up remaining "race" private variables 2015-08-18 00:26:11 +03:00
Pavel Penev
2b359b54c7 Add an upgrade rule for renaming crates' ValidRaces 2015-08-18 00:26:09 +03:00
Pavel Penev
1a95e7a9f1 Rename crates' ValidRaces 2015-08-18 00:26:07 +03:00
Pavel Penev
b6b107de46 Rename RenderSpritesInfo.RaceImages 2015-08-18 00:26:05 +03:00
Pavel Penev
1e817fad76 Merge pull request #9089 from Mailaender/editor-coordinate
Added a coordinate display to the map editor
2015-08-18 00:12:10 +03:00
Pavel Penev
3d292d8200 Merge pull request #8749 from Mailaender/lint-palettes
Added a lint rule for palette references
2015-08-17 23:09:53 +03:00
Matthias Mailänder
4f05681707 Merge pull request #8912 from reaperrr/ts-icons1
Added the Nod repair bay icon
2015-08-17 21:46:20 +02:00
Matthias Mailänder
322358ff3d also check shroud sequences 2015-08-17 21:36:55 +02:00
Matthias Mailänder
118782a85e check palette references 2015-08-17 21:36:45 +02:00
Matthias Mailänder
41698ab8bb show the current coordinate at the top 2015-08-17 21:21:52 +02:00
Matthias Mailänder
ba8e292b71 Merge pull request #9022 from RoosterDragon/less-sync
Sync only once per tick
2015-08-17 21:13:55 +02:00
abcdefg30
0c021770f0 Merge pull request #9076 from Mailaender/resource-sequences
Added missing check yaml references
2015-08-17 21:13:32 +02:00
Paul Chote
eae41b1750 Fix LST queue type. 2015-08-17 19:37:24 +01:00
reaperrr
4e633b21f6 Fixed D2k grenadier to not explode violently when reloading
Removed redundant Chance (default is 100 anyway).
2015-08-17 20:11:57 +02:00
reaperrr
3ae75f870c Add Explodes safeguards
Accept both null and empty string to disable explosion weapons.

Throw specific exception if weapon was not found.
Require Weapon (EmptyWeapon stays optional).
2015-08-17 20:11:38 +02:00
Pavel Penev
17b2a37e97 Merge pull request #9051 from abcdefg30/creepssetting
Fix the creeps setting being ignored
2015-08-17 18:57:06 +03:00
abcdefg30
0c4e691008 Rename HuskActor to Actor 2015-08-17 17:38:07 +02:00
abcdefg30
3dc5515d16 Remove references to 'husk' in the descriptions 2015-08-17 17:38:06 +02:00
abcdefg30
5967b06189 Remove the 'workaround' in gdi05 2015-08-17 17:38:05 +02:00
abcdefg30
b24c1845fb Adjust the upgrade rule for SpawnActorOnDeath 2015-08-17 17:38:04 +02:00
abcdefg30
9f5a8a6d1f Fix the creeps setting being ignored 2015-08-17 17:38:03 +02:00
Guido L
ce9bbd2a52 Fix TerrainTypes for walls and crates 2015-08-17 16:44:20 +02:00
Pavel Penev
71c5d69dc5 Merge pull request #8938 from abcdefg30/heliheigth
Have flying actors account for terrain height
2015-08-17 13:53:39 +03:00
Pavel Penev
ac46a356f4 Merge pull request #9057 from Mailaender/map-tilset-sequence-nre
Fixed a likely null reference exception when checking mod sequence definitions
2015-08-17 13:44:06 +03:00
abcdefg30
e05ba2454c Merge pull request #9084 from Mailaender/sonar-shroud
Fixed sonar pulse revealing shroud
2015-08-16 23:58:09 +02:00
Matthias Mailänder
51fabae106 change editor tooltip to actor: description (type) 2015-08-16 21:58:17 +02:00
Pavel Penev
4600d1c62b Merge pull request #9071 from pchote/fix-shroud-healthbars
Fix visibility queries when fog is disabled.
2015-08-16 19:19:16 +03:00
Matthias Mailänder
61cba78d62 rebalance sonar to not reveal any shroud 2015-08-16 13:32:26 +02:00
Matthias Mailänder
e3194ed35a Merge pull request #9080 from pchote/fix-spy-overlay
Replace icon veterancy overlay with new artwork.
2015-08-16 09:33:47 +02:00
Paul Chote
78391e7c65 Replace icon veterancy overlay with new artwork.
New shp includes frames for higher level veterancy
for potential future use.
2015-08-15 20:59:52 +01:00
Paul Chote
0b13a173ae Merge pull request #9053 from abcdefg30/dropzone-w-shroudrange
Fix a crash in dropzone-w
2015-08-15 10:25:45 +01:00
Paul Chote
a4c4cec4ee Merge pull request #9050 from GraionDilach/fix-td-shippedost
Increase ShippedSoundtracks of the TD mod.
2015-08-15 10:15:04 +01:00
Paul Chote
b7d549e2d2 Merge pull request #9062 from clemty/renamedefencetab
TD: renames tooltip on "Defence" tab to "Support"
2015-08-15 10:04:35 +01:00
Matthias Mailänder
37b6dc1603 add maps from the resource site 2015-08-15 11:03:45 +02:00
Matthias Mailänder
dc477c3ced add missing sequence reference 2015-08-15 09:59:53 +02:00
Matthias Mailänder
d0634d9bb7 add missing weapon reference 2015-08-15 09:57:42 +02:00
Matthias Mailänder
299e5881b3 Merge pull request #9072 from pchote/fix-shroud-option-case
Fix capitalisation of the "Explored Map" option.
2015-08-14 23:26:14 +02:00
Paul Chote
30d0ce2dee Remove bogus property from d2k conyard. 2015-08-14 19:44:24 +01:00
Paul Chote
8dfd42b30e Make Production.Info readonly. 2015-08-14 19:44:24 +01:00
Paul Chote
086467020e Simplify IOccupySpace check. 2015-08-14 19:44:24 +01:00
Paul Chote
d730b4ee50 Remove duplicated DoProduction from Production. 2015-08-14 19:35:48 +01:00
Paul Chote
1d5644476a Fix capitalisation of the "Explored Map" option. 2015-08-14 19:29:04 +01:00
Paul Chote
738a500876 Fix visibility queries when fog is disabled. 2015-08-14 19:26:01 +01:00
clemty
31fe6b7e9d TD: renames tooltip on "Defence" tab to "Support" as suggested in #9047#issuecomment-130350382 2015-08-14 00:04:26 +02:00
Matthias Mailänder
9dabf9019f Merge pull request #9026 from baxxxster/bleed
Changed TimestampFormat for server logs
2015-08-13 21:16:23 +02:00
Matthias Mailänder
e13f983946 Merge pull request #9038 from penev92/bleed_rename
Some more renaming from "race" to "faction"
2015-08-13 21:13:31 +02:00
Matthias Mailänder
c5b1e6be5f fix a null reference exception at map (tileset) 2015-08-13 20:28:52 +02:00
abcdefg30
92c41aedb6 Fix a crash in dropzone-w
We don't need RevealsShroud here anyway,
as the map disabled Shroud and Fog.
2015-08-12 23:34:39 +02:00
abcdefg30
dae70321c2 Merge pull request #8792 from deniz1a/reveal-shroud
Changes shroud lobby setting from disabling shroud to revealing it.
2015-08-12 22:04:15 +02:00
abcdefg30
032ea2a377 Merge pull request #9032 from deniz1a/fix-8935
Fixes observer widgets being loaded multiple times at game end.
2015-08-12 20:47:39 +02:00
Zimmermann Gyula
e29a103e32 Increase ShippedSoundtracks of the TD mod. 2015-08-12 17:45:01 +02:00
abcdefg30
15f22c32b3 Merge pull request #8886 from atimoschenkow/fly-queue
Fix queue commands for Plane/Heli
2015-08-12 00:50:43 +02:00
abcdefg30
7e5b4f61eb Merge pull request #9036 from reaperrr/heli-reserve
Improve aircraft unreserving of structures
2015-08-11 23:36:32 +02:00
reaperrr
d97d4c82a3 Plane style fixes 2015-08-11 15:49:06 +02:00
reaperrr
9cbc16b6a3 If aircraft has FallsToEarth, return instead of just skipping reservation. 2015-08-11 15:47:45 +02:00
reaperrr
6fc8de69ac Unreserve aircraft when removed from world 2015-08-11 15:02:31 +02:00
deniz1a
e59cd78322 Fixes observer widgets being loaded multiple times at game end. 2015-08-11 12:31:23 +03:00
Pavel Penev
4d11195989 Rename MPStartUnitsInfo.Races to Factions
Also add an upgrade rule.
2015-08-11 04:00:08 +03:00
Pavel Penev
fd01e95d6c Rename EmitInfantryOnSellInfo.Races to Factions
Also rename the rest of "race" in that file.
2015-08-11 03:46:12 +03:00
Pavel Penev
8b58f3a1d8 Rename ProductionQueue.Race to Faction 2015-08-11 03:29:49 +03:00
Pavel Penev
6e9b5ed2c9 Rename ProductionQueueInfo.Race to Factions
Also add an upgrade rule.
2015-08-11 03:27:12 +03:00
Pavel Penev
a6dae8e854 Merge pull request #9017 from reaperrr/lower-rank1
Rebalanced stat gains from rank-up
2015-08-11 02:36:01 +03:00
Pavel Penev
c99dcb3f24 Merge pull request #9023 from RoosterDragon/actor-lookup
Add a method to look up actors by ID.
2015-08-11 02:28:36 +03:00
abcdefg30
923c5405d2 Merge pull request #8965 from Mailaender/rallypoint-polish
Fixed the RallyPoint trait for Tiberian Sun polish
2015-08-10 22:03:13 +02:00
Matthias Mailänder
27016367c7 use more appropriate waypoint art for rally points 2015-08-10 21:35:21 +02:00
Matthias Mailänder
df206ddb18 unhardcode rallypoint sprites 2015-08-10 21:35:21 +02:00
Matthias Mailänder
b536e677fb rename RallyPoint.RallyPoint to RallyPoint.Offset 2015-08-10 21:35:21 +02:00
reaperrr
f11331a7cd Merge pull request #8989 from Mailaender/ts-light-cloak
Removed cloak effect from light posts
2015-08-10 19:14:21 +02:00
Glenn Martin Jensen
441f23d1e6 Changed TimestampFormat for server logs
Changed TimestampFormat for server logs
2015-08-10 16:53:51 +02:00
abcdefg30
22184a6791 Merge pull request #8934 from Mailaender/travis-mono4
Updated Travis to use Mono 4.0
2015-08-09 22:16:25 +02:00
abcdefg30
797b9d18c8 Merge pull request #8915 from Mailaender/cpos-mpos-test
Added a unit test for MPos conversions
2015-08-09 22:01:33 +02:00
RoosterDragon
89f5a23077 When dumping the sync report, log all the orders issued in the frame that desynced. 2015-08-09 20:59:59 +01:00
RoosterDragon
709befda08 Sync only once per tick, rather than once per tick and once per order.
This greatly improves performance by not syncing the world state for every single order processed as this becomes very expensive, at the cost of being unable to directly pinpoint the order that causes a desync. Instead the granularity of detecting desyncs is reduced to the tick level.
2015-08-09 20:58:20 +01:00
Matthias Mailänder
4d360a66ed Merge pull request #8979 from penev92/bleed_production
Remove producer-is-in-world assumptions from Production
2015-08-09 21:29:29 +02:00
RoosterDragon
a0117a3890 Add a method to look up actors by ID.
This can be used to speed up some methods.
2015-08-09 20:25:34 +01:00
Matthias Mailänder
021b344532 Merge pull request #8988 from reaperrr/fix-moveanim
Fix for WithAttackAnimation breaking WithMoveAnimation
2015-08-09 21:21:33 +02:00
Matthias Mailänder
84fdd97f94 Merge pull request #8744 from abcdefg30/viceroidhusk
Merge SpawnViceroid into LeavesHusk
2015-08-09 21:07:32 +02:00
Matthias Mailänder
9efc3b377b Merge pull request #9020 from abcdefg30/clearscreenshot
Fix shroud outside map bounds being transparent
2015-08-09 20:55:23 +02:00
abcdefg30
e8477b1b5a Rename LeavesHusk to SpawnActorOnDeath 2015-08-09 19:24:14 +02:00
abcdefg30
1a1e1e08d7 Fix shroud outside map bounds being transparent 2015-08-09 18:55:13 +02:00
reaperrr
d8ca66bec5 Merge pull request #9014 from Mailaender/immobile-groundcheck
Fixed ground level checks for immobile actors
2015-08-09 15:48:50 +02:00
Pavel Penev
03cc69538e Merge pull request #9015 from Mailaender/publishcoverity-0.11
Fixed automatic Coverity build submissions
2015-08-09 13:52:34 +03:00
reaperrr
fdeb901da6 Rebalance TS rankups 2015-08-09 12:47:26 +02:00
reaperrr
05b82dbc02 Rebalance D2k rankups 2015-08-09 12:47:11 +02:00
reaperrr
cd41ecaa78 Rebalance TD rankups 2015-08-09 12:46:55 +02:00
reaperrr
b5352c24a0 Rebalance RA rankups 2015-08-09 12:46:41 +02:00
Matthias Mailänder
bf53f981d4 fix path for PublishCoverity 0.11.0 2015-08-09 11:50:15 +02:00
Matthias Mailänder
208cfa9542 fix IsAtGroundLevel always being false for immobile actors 2015-08-09 11:45:25 +02:00
reaperrr
277ac04f85 Remove legacy 0% = not targetable assumption 2015-08-09 01:11:10 +02:00
abcdefg30
abf5047072 Add an upgrade rule and update the default mods 2015-08-08 23:23:32 +02:00
abcdefg30
538723f8fb Merge SpawnViceroid into LeavesHusk 2015-08-08 23:23:31 +02:00
abcdefg30
1bc84275fd Merge pull request #9000 from reaperrr/fix-misl-shadow
Fixed missile shadow on elevated terrain
2015-08-08 23:20:23 +02:00
reaperrr
433eac34b5 Fixes missile shadow on elevated terrain 2015-08-08 20:14:05 +02:00
reaperrr
e527513cbd Made voxel turret and barrel traits upgradable. 2015-08-08 18:13:27 +02:00
Matthias Mailänder
7f42664b23 don't cloak light posts 2015-08-08 17:32:58 +02:00
reaperrr
281a87acbc Fix WithAttackAnimation breaking WithMoveAnimation 2015-08-08 17:00:38 +02:00
Matthias Mailänder
4e101afb6d Merge pull request #8838 from reaperrr/withbarrel2
Fixed WithBarrel and made it upgradable
2015-08-08 16:50:42 +02:00
Matthias Mailänder
88b98fa8ef Merge pull request #8975 from penev92/bleed_rename
Some more renaming from "country" and "race" to "faction"
2015-08-08 16:13:16 +02:00
Pavel Penev
3cb707ad3c Remove producer-is-in-world assumptions from Production
D2k upgrades need to be actors that never actor the world, produced by the PlayerActor, who is also not in the world, but the Production trait expects the producer to be in the world even if it has Exit.MoveIntoWorld = False, allowing the producees to not enter the world.
2015-08-08 16:36:24 +03:00
Paul Chote
309e3ac99e Merge pull request #8936 from Mailaender/lint-perf
Improved the --check-yaml performance
2015-08-08 10:57:57 +01:00
Matthias Mailänder
bc1a8d4b64 Merge pull request #8983 from Mailaender/freetype260-mscv9
Updated to latest FreeType6 version for Windows while downgrading the dependency to MSVC++ 2008
2015-08-08 11:42:58 +02:00
Matthias Mailänder
f416dfaca3 Merge pull request #8985 from pchote/fix-cnc-map-tabs
Fix padding at the top of the cnc map chooser.
2015-08-08 11:34:14 +02:00
Paul Chote
f60b80a935 Fix padding at the top of the cnc map chooser. 2015-08-08 10:05:21 +01:00
atimoschenkow
b1c51cc910 Fix for #6161 queue commands for Plane/Heli (do not ignore Order.Queued in ResolveOrder()) 2015-08-07 23:41:03 +02:00
Matthias Mailänder
e430f313a7 remove the warning in the make script 2015-08-07 20:09:59 +02:00
Matthias Mailänder
0f9b87269e get latest FreeType6 for Windows
downgrade dependency to MSVC++ 2008
2015-08-07 20:09:56 +02:00
abcdefg30
520a32143d Merge pull request #8976 from Mailaender/pizza-maps
Added 3 new maps from PizzaAtomica
2015-08-07 14:21:26 +02:00
Matthias Mailänder
2ab883686d add 3 new maps from PizzaAtomica 2015-08-07 09:54:15 +02:00
Matthias Mailänder
d358c495c5 test the coordinate system conversions 2015-08-07 00:31:58 +02:00
Matthias Mailänder
ddb01b6ae5 fix warnings about unused local variables 2015-08-07 00:31:24 +02:00
abcdefg30
c9837280b9 Merge pull request #8971 from Mailaender/chmod-x
Removed executable bits from random files in the repository
2015-08-06 18:17:22 +02:00
Matthias Mailänder
fd7bbc3ce6 remove executable bits from binary data files 2015-08-06 18:16:01 +02:00
Matthias Mailänder
e428e6d8cc remove executable bits from source code 2015-08-06 18:05:50 +02:00
abcdefg30
cf9ec29708 Merge pull request #8964 from Mailaender/human-observers
Fixed neutral actors being visible in the All Players observer shroud mode
2015-08-06 14:13:18 +02:00
abcdefg30
8cb9dd5f25 Merge pull request #8969 from Mailaender/script-error-polish
Fixed the script error UI not shutting down the game properly
2015-08-06 14:06:37 +02:00
Matthias Mailänder
7a466890e5 hide tabs when script errors occur 2015-08-06 12:51:07 +02:00
Matthias Mailänder
d4a0bfe2a5 disable menu buttons when script errors occur 2015-08-06 12:49:35 +02:00
Matthias Mailänder
f1b9b31f07 remove duplicated line 2015-08-06 12:49:35 +02:00
Pavel Penev
55479435ef Merge pull request #8963 from Mailaender/ra-observer-dropdown-separator
Fixed red DropDown separator on black observer UI
2015-08-06 12:10:24 +03:00
Matthias Mailänder
02b2360909 Merge pull request #8945 from pchote/fix-missing-resources
Reveal the initial resources if shroud is disabled.
2015-08-06 10:42:49 +02:00
Matthias Mailänder
6c45763d75 avoid observers being allied to world owning neutral players 2015-08-05 22:35:28 +02:00
Paul Chote
155d0cc97d Reveal the initial resources if shroud is disabled.
Fixes #8943.
2015-08-05 20:27:36 +01:00
Matthias Mailänder
798086cd9d fix the red separator being used on black observer UI parts 2015-08-05 21:21:50 +02:00
Matthias Mailänder
987fdab042 unhardcode the chrome definition keys 2015-08-05 21:19:09 +02:00
Matthias Mailänder
8aac12ffb4 add palettes (decorational sprites) 2015-08-05 18:27:13 +02:00
Matthias Mailänder
1685dce28f add drums 2015-08-05 18:22:00 +02:00
Matthias Mailänder
6c3b668a86 add boxes (decorational crates) 2015-08-05 18:18:47 +02:00
Pavel Penev
10aee9ffa9 Rid Transforms and Transform of "race" 2015-08-05 18:15:11 +03:00
Pavel Penev
faf0da6994 Rename Session.Slot.LockRace 2015-08-05 18:11:10 +03:00
Pavel Penev
2f38239f32 Clean up LobbyUtils from "race" a bit 2015-08-05 18:07:26 +03:00
Pavel Penev
5eaf5b5b51 Rename Session.Client.Race 2015-08-05 17:45:56 +03:00
Pavel Penev
50f4508123 Rid SpawnSelectorTooltipLogic from "Country" 2015-08-05 17:35:07 +03:00
Pavel Penev
957af9ac5e Rename SpawnOccupant.Country 2015-08-05 17:31:00 +03:00
Pavel Penev
0325f803ab Merge pull request #8956 from Mailaender/simple-things
Added missing lint references
2015-08-05 16:59:21 +03:00
Matthias Mailänder
3b47aff61c correct the namespace according to file location 2015-08-05 15:31:07 +02:00
Matthias Mailänder
281699baea add missing weapon reference 2015-08-05 15:30:51 +02:00
Matthias Mailänder
78b200d26a add missing sprite sequence and image references 2015-08-05 15:30:39 +02:00
abcdefg30
e1e166e0ad Merge pull request #8914 from Mailaender/fixed-scientists
Fixed scientist sprite shadow on frame 25 for both Red Alert and Tiberian Dawn
2015-08-05 14:23:54 +02:00
abcdefg30
668b46c297 Merge pull request #8946 from pchote/fix-faction-tooltips
Fix orphaned tooltips when dismissing a dropdown.
2015-08-05 14:02:13 +02:00
abcdefg30
abd08ac4fb Merge pull request #8953 from pchote/support-flying-mcv
Force helicopters to land before transforming.
2015-08-05 13:57:48 +02:00
Paul Chote
de4fbfd47a Reset tooltips when dismissing a DropDownButtonWidget. 2015-08-05 09:11:19 +01:00
Paul Chote
710a32d1ce Extract ScrollPanel tooltip workaround into common code. 2015-08-05 09:11:19 +01:00
Paul Chote
1aa5852a5b Force helicopters to land before transforming. 2015-08-05 08:59:32 +01:00
Matthias Mailänder
c6cb9db0dd Merge pull request #8948 from pchote/fix-shroud-edge-reveal
Prevent shroud from being revealed outside the map cordon.
2015-08-05 08:46:06 +02:00
Paul Chote
c1fcd5fb47 Prevent shroud from being revealed outside the map cordon.
Fixes #8947.
2015-08-04 23:12:19 +01:00
Paul Chote
3ed40090f7 Merge pull request #8941 from abcdefg30/revert-sync-inherited
Revert "Sync inherited members."
2015-08-04 22:15:53 +01:00
abcdefg30
ed78e3aa9c Merge pull request #8923 from reaperrr/prj-shadow
Made projectile shadows heightmap-aware
2015-08-04 20:32:02 +02:00
abcdefg30
58c4312675 Revert "Add tests to verify sync hashing mechanism."
This reverts commit 9f32eb76cd.
2015-08-04 20:03:19 +02:00
abcdefg30
0ecc5e388d Merge pull request #8881 from atlimit8/FixAircraftGetActorBelowAltitudeChecking
Fix Aircraft.GetActorBelow() altitude checking
2015-08-04 18:08:32 +02:00
abcdefg30
3ec874db31 Revert "Sync inherited members."
This reverts commit cfd2f265d5.
2015-08-04 17:24:59 +02:00
deniz1a
2ca949dbd2 Renames Shroud lobby option to Explored map. 2015-08-04 17:31:07 +03:00
deniz1a
7efbf0633e Changes shroud lobby setting from disabling shroud to revealing it. 2015-08-04 17:31:06 +03:00
abcdefg30
a94e35163a Have flying actors account for terrain height 2015-08-04 15:48:03 +02:00
abcdefg30
582c93dda5 Merge pull request #8784 from Mailaender/heli-drop-sounds
Added helicopter takeoff and landing sound
2015-08-04 14:53:00 +02:00
Matthias Mailänder
fb22c9a1e5 test unchanged miniyaml rules only once 2015-08-04 14:20:52 +02:00
abcdefg30
d0fb08a48c Merge pull request #8920 from pchote/fix-map-border
Account for disabled shroud/fog in ShroudRenderer.
2015-08-04 12:27:26 +02:00
abcdefg30
6183691828 Merge pull request #8894 from pchote/fix-projection-init
Lazily initialize cell projection mapping.
2015-08-04 12:13:37 +02:00
Matthias Mailänder
9170db9642 update Travis to use Mono 4 2015-08-04 12:00:45 +02:00
Matthias Mailänder
6a1f7fd55a Merge pull request #8892 from pchote/fix-lonestar-audio
Use background music for Fort Lonestar rain.
2015-08-04 11:49:34 +02:00
Pavel Penev
958e996004 Merge pull request #8922 from pchote/fix-tabcomplete-crash
Fix a divide by zero crash in TabCompletionLogic.
2015-08-04 00:44:50 +03:00
reaperrr
efc7915f4f Made projectile shadows heightmap-aware. 2015-08-03 23:36:16 +02:00
Paul Chote
0aca03158c Fix a divide by zero crash in TabCompletionLogic. 2015-08-03 21:42:30 +01:00
Paul Chote
71576f9ab1 Merge pull request #8858 from RoosterDragon/sync-inherited
Sync members of base classes
2015-08-03 21:15:46 +01:00
Paul Chote
800fe5ff8d Merge pull request #8902 from deniz1a/dropdown-autoscroll
Makes dropdown menus auto-scroll to selected item.
2015-08-03 21:13:41 +01:00
reaperrr
dff3201eca Use Nod variant of repair bay icon 2015-08-03 22:12:27 +02:00
Paul Chote
ab5b912697 Merge pull request #8913 from reaperrr/fix-ts-water
Fixed bright dots on TS temperate terrain water
2015-08-03 21:09:57 +01:00
Paul Chote
0b4543919d Account for disabled shroud/fog in ShroudRenderer.
Fixes #8827.
2015-08-03 21:07:02 +01:00
Pavel Penev
3961f3d6c7 Merge pull request #8908 from Mailaender/fix-spectating-desync
Fixed a desync when a player surrenders
2015-08-03 22:57:41 +03:00
abcdefg30
34bf5b5810 Merge pull request #8911 from reaperrr/random-wbe
Allowed WithBuildingExplosion to randomly select from multiple sequences
2015-08-03 17:02:00 +02:00
atlimit8
d785c50c3e WithProductionOverlay: replace ITick => INotifyCreated & add INotifyOwnerChanged 2015-08-03 10:00:33 -05:00
Matthias Mailänder
34a228406f fix shadow on frame 25
via http://cnc-comm.com/community/index.php?topic=4069.0
2015-08-03 16:44:35 +02:00
reaperrr
1ca4ec1749 Fixed bright dots on TS temperate terrain water
Temperate water tiles use palette index #1, which is also used for shadow on SHPs.
2015-08-03 16:42:20 +02:00
reaperrr
94f6dd5e56 Allow WithBuildingExplosion to randomly select from multiple sequences
Necessary for TS/RA2-style building explosions.
2015-08-03 16:35:58 +02:00
abcdefg30
d1375a224f Merge pull request #8910 from Mailaender/ts-crush-palette
Fixed Tiberian Sun infantry crush palette
2015-08-03 13:32:28 +02:00
abcdefg30
b384bcfe74 Merge pull request #8907 from Mailaender/ts-minigun-sounds
Added more variation to the Tiberian Sun light infantry gun
2015-08-03 13:12:32 +02:00
Matthias Mailänder
87db0c97c5 fix infantry crush palette 2015-08-03 11:33:12 +02:00
Matthias Mailänder
e50f42672d Merge pull request #8903 from GraionDilach/ts-fixwatereffects
Fix TS water effect palettes.
2015-08-03 11:13:46 +02:00
Matthias Mailänder
bbb186d9c8 fix marking player as spectator going through unsynced code 2015-08-03 10:28:32 +02:00
Matthias Mailänder
d2cc61e165 add more variation to the light infantry gun 2015-08-03 08:20:22 +02:00
RoosterDragon
9f32eb76cd Add tests to verify sync hashing mechanism. 2015-08-02 22:36:56 +01:00
Zimmermann Gyula
4521157901 Fix TS water effect palettes.
Also copied over the waterpiffs from RA because TS equvivalent has no
fitting palette/only singular piff exists - w_piffs didn't.
2015-08-02 23:30:51 +02:00
deniz1a
53329b7068 Makes dropdown menus auto-scroll to selected item. 2015-08-02 23:27:54 +03:00
Matthias Mailänder
1eb46d4922 Merge pull request #8895 from abcdefg30/napulsturr
Fix napuls sequences
2015-08-02 19:33:38 +02:00
atlimit8
a209e9db4c Fix Aircraft.GetActorBelow() altitude checking 2015-08-02 11:51:34 -05:00
abcdefg30
dcb3b11bb3 Fix napuls sequences 2015-08-02 18:36:11 +02:00
Paul Chote
3d65ba39f6 Lazily initialize cell projection mapping. 2015-08-02 17:15:39 +01:00
Paul Chote
f888886c35 Merge pull request #8891 from Mailaender/make-ts-version
Fixed Tiberian Sun mod not being versioned
2015-08-02 16:44:21 +01:00
Pavel Penev
e022a0a7ba Merge pull request #8799 from Mailaender/differentiate-ts-mixes
Added support to specify the package/folder in the virtual file system for Tiberian Sun Cabal/EVA voices and Nod/GDI icons
2015-08-02 18:39:30 +03:00
Matthias Mailänder
8d7a9c6b50 remove non-existing sprites 2015-08-02 17:29:44 +02:00
Matthias Mailänder
894f75fb3b provide a more helpful exception 2015-08-02 17:29:44 +02:00
Matthias Mailänder
a0c02d5710 use different Nod/GDI icons for shared actors 2015-08-02 17:29:44 +02:00
Matthias Mailänder
68b7359664 enable Cabal voice 2015-08-02 17:29:44 +02:00
Matthias Mailänder
245d7904fe allow to specify the folder directly in the virtual file system
using folder:file syntax
2015-08-02 17:29:41 +02:00
Matthias Mailänder
b5df1222bd Merge pull request #8893 from Phrohdoh/lua#fix-default-lighting
LightingGlobal default of 1d.
2015-08-02 17:28:19 +02:00
Taryn Hill
7656ad3d12 Use a default of 1d instead of 0d in LightingGlobal if the necessary trait doesn't exist 2015-08-02 10:26:15 -05:00
Paul Chote
2c138e7691 Use background music for Fort Lonestar rain. 2015-08-02 16:19:47 +01:00
Matthias Mailänder
7c9a333ac4 also use the combined mod for Lua API doc generation 2015-08-02 17:12:06 +02:00
Matthias Mailänder
f2073d18aa fix documentation not being versioned on Windows 2015-08-02 17:11:47 +02:00
Matthias Mailänder
a37e6a3625 fix TS mod not being versioned 2015-08-02 17:10:20 +02:00
Paul Chote
fb5db60d9d Merge pull request #8865 from Phrohdoh/lua#effects-rgba
Rename EffectGlobal to LightingGlobal and expose individual channels.
2015-08-02 16:05:27 +01:00
Taryn Hill
2f452d88b3 Rename EffectsGlobal to LightingGlobal
Remove ChangeLighting in favor of individual channels
Change RA's fort-lonestar to use Lighting instead of Effect
2015-08-02 10:03:39 -05:00
Oliver Brakmann
7298c21e75 Merge pull request #8882 from Mailaender/ts-decoration-radar-color
Fixed undefined white decoration radar colors
2015-08-02 16:46:22 +02:00
Paul Chote
a0c256173b Merge pull request #8851 from penev92/bleed_rename
Some more renaming from "race" to "faction"
2015-08-02 15:34:41 +01:00
Pavel Penev
a75f8f63be Add an upgrade rule for BuildableInfo.ForceRace rename 2015-08-02 17:19:46 +03:00
Oliver Brakmann
43a3717659 Merge pull request #8888 from deniz1a/fix-assetbrowser
Revert "Improves filter text field in asset browser."
2015-08-02 16:12:21 +02:00
Oliver Brakmann
1a83304f28 Merge pull request #8765 from reaperrr/arty-expl
Improved Explodes trait and how artillery explodes
2015-08-02 16:00:09 +02:00
Oliver Brakmann
9e2f06aa2d Merge pull request #8876 from pchote/music
Refine the music playlist code.
2015-08-02 15:49:13 +02:00
reaperrr
a06cb8fccb Tweaked RA and TD artillery explosion
Renamed RA UnitExplode to AmmoExplode, added new UnitExplode with 1/10
damage.
Reduced TD UnitExplode damage to 1/10 of old value.

Now artillery always explodes, but there's only a 75% chance it explodes
violently and only when it has ammo.
If either condition isn't met, it explodes with the (now less violent) UnitExplode.
2015-08-02 15:18:30 +02:00
deniz1a
37ac08ecfe Revert "Improves filter text field in asset browser."
This reverts commit 4fcf73921f.
2015-08-02 16:17:48 +03:00
Oliver Brakmann
4b6c37f90f Merge pull request #8878 from pchote/fix-cratebadger-spawn
Fix crate drop aircraft spawn height.
2015-08-02 14:51:42 +02:00
Oliver Brakmann
2b1f1cc031 Merge pull request #8880 from pchote/fix-radar-mouse
Fix radar pixel <-> cell conversions.
2015-08-02 14:46:24 +02:00
Oliver Brakmann
84cf1e4240 Merge pull request #8873 from pchote/remove-clone-crate
Remove the balance-breaking unit duplication crate.
2015-08-02 12:45:56 +02:00
Pavel Penev
dc3cfa35c6 Merge pull request #8874 from reaperrr/fix-e2-prone
Fixed RA grenadier prone-stand sequences
2015-08-02 13:45:09 +03:00
Matthias Mailänder
0efb8fc6f4 Merge pull request #8883 from pchote/remove-ts-proximitycaptor
Remove ProximityCaptor from TS camera.
2015-08-02 10:47:01 +02:00
Paul Chote
0109bb17be Remove ProximityCaptor from TS camera. 2015-08-02 09:33:28 +01:00
Paul Chote
5f2c62634c Merge pull request #8817 from penev92/bleed_cleanups
Touch up a few files
2015-08-02 09:30:43 +01:00
Matthias Mailänder
8a6b5d1b8d define radar color for rocks 2015-08-02 08:44:45 +02:00
Matthias Mailänder
6d20d4b2db define radar color for trees 2015-08-02 08:44:45 +02:00
Paul Chote
1d307bfe07 Disable music auto-play unless tracks are installed. 2015-08-01 23:05:09 +01:00
Paul Chote
9b3ef9e7f7 Move MusicPlaylist to Mods.Common. 2015-08-01 22:56:07 +01:00
Zimmermann Gyula
c6e246102e Hide the songs which were hidden in the base games. 2015-08-01 22:42:27 +01:00
Zimmermann Gyula
1d80c37fda Add support for hiding music tracks. 2015-08-01 22:41:25 +01:00
deniz1a
2abd1b5350 Renames "Disable Shroud & Fog" debug option to "Disable visibility checks". 2015-08-02 00:30:42 +03:00
Paul Chote
21254db120 Add background music to RA shellmap. 2015-08-01 22:24:40 +01:00
Matthias Mailänder
25ee5f7287 add the takeoff and landing sound 2015-08-01 22:46:06 +02:00
Matthias Mailänder
9c67e46226 make Orca Transport buildable with developer cheats 2015-08-01 22:37:54 +02:00
Pavel Penev
244ca10242 Merge pull request #8862 from pchote/fix-rotation-hack
Disable legacy coordinate hack in TS.
2015-08-01 23:04:08 +03:00
Paul Chote
a8ddc4e360 Always start the game with a random song.
This fixes the issue where games will always start
with shellmap theme.
2015-08-01 20:52:20 +01:00
Paul Chote
5952d8c979 Fix crash when opening music player from TD lobby. 2015-08-01 20:52:20 +01:00
Paul Chote
fb0e2c5cc3 Introduce background music concept. 2015-08-01 20:52:20 +01:00
Paul Chote
a2517b42bb Fix 4tnk muzzle offsets. 2015-08-01 20:41:30 +01:00
Paul Chote
3a8a18499e Fix radar pixel <-> cell conversions.
Fixes #8869.
2015-08-01 20:19:20 +01:00
Paul Chote
180f6e83d4 Fix crate drop aircraft spawn height. 2015-08-01 20:01:45 +01:00
reaperrr
72d67de414 Fixed WithBarrel and made it upgradable.
Fixed missing Requires<ArmamentInfo>.
Removed now-redundant Barrel property (has been unused since RenderSprites animation keys were removed).
Made trait classes public.
Made ctor-cached trait lookups readonly.
2015-08-01 19:31:59 +02:00
reaperrr
2d3bf3f664 Merge pull request #8875 from pchote/remove-ts-bounty
Remove bounties from the TS mod.
2015-08-01 19:23:17 +02:00
Paul Chote
5921ea2601 Remove bounties from the TS mod. 2015-08-01 18:10:00 +01:00
Paul Chote
cfe1aaaddd Remove the balance-breaking unit duplication crate. 2015-08-01 18:06:54 +01:00
reaperrr
ff3af5d071 Fixed RA grenadier prone-stand sequences 2015-08-01 19:05:08 +02:00
Paul Chote
583b4f92b6 Merge pull request #8866 from Phrohdoh/feat#terrain-height-at
Implement DistanceAboveTerrain
2015-08-01 17:54:31 +01:00
Taryn Hill
22ffeb2a12 Use DistanceAboveTerrain in CreateEffectWarhead 2015-08-01 11:48:50 -05:00
Taryn Hill
6fa1f757b0 Add Map.DistanceAboveTerrain(WPos) and Actor.IsAtGroundLevel() extension method 2015-08-01 11:48:47 -05:00
Matthias Mailänder
7066254887 Merge pull request #8814 from reaperrr/ssm-tur
Implement ammo-dependent turret art for TD Mobile SAM
2015-08-01 18:06:36 +02:00
reaperrr
ac0a92888e Implement ammo-dependent art for Mobile SAM turret 2015-08-01 17:15:35 +02:00
reaperrr
c3d996cb62 Adds WithReloadingTurret render trait to TD mod 2015-08-01 17:15:34 +02:00
abcdefg30
1b20807677 Merge pull request #8870 from obrakmann/fix-ai-using-shared-random
Fix AI using SharedRandom values
2015-08-01 16:39:32 +02:00
Oliver Brakmann
c539b9fcb4 Fix AI using SharedRandom values
The AI code runs on only one hosts, so by having the AI use SharedRandom values, the host's random gets out of sync with the other players' and crashes the game.
2015-08-01 15:59:12 +02:00
Matthias Mailänder
97192dd8b2 Merge pull request #8868 from pchote/readonly-traits
Make trait fields readonly
2015-08-01 15:58:42 +02:00
Paul Chote
3dda305524 Make NukePower fields readonly. 2015-08-01 14:19:12 +01:00
Paul Chote
6f60b16f06 Make SmokeTrailWhenDamaged fields readonly. 2015-08-01 14:19:12 +01:00
Paul Chote
60305face7 Make WithVoxelBody fields readonly. 2015-08-01 14:19:11 +01:00
Paul Chote
a127c6b050 Make WithVoxelBarrel fields readonly. 2015-08-01 14:19:11 +01:00
Paul Chote
322d941332 Make WithProductionOverlay fields readonly. 2015-08-01 14:19:11 +01:00
Paul Chote
038e8018b9 Make WithBuildingPlacedOverlay fields readonly. 2015-08-01 14:19:11 +01:00
Paul Chote
4e27ac9aac Make WithTurret fields readonly. 2015-08-01 14:19:10 +01:00
Paul Chote
d20819735c Make WithRotor fields readonly. 2015-08-01 14:19:10 +01:00
Paul Chote
f91b28a2a0 Make WithRepairOverlay fields readonly. 2015-08-01 14:19:10 +01:00
Paul Chote
bb092ec07b Make WithRepairAnimation fields readonly. 2015-08-01 14:19:10 +01:00
Paul Chote
c5becaab9b Make WithIdleOverlay fields readonly. 2015-08-01 14:19:10 +01:00
Paul Chote
a2d069ce55 Make WithHarvestOverlay fields readonly. 2015-08-01 14:19:09 +01:00
Paul Chote
8e6b764284 Make WithBuildingPlacedAnimation fields readonly. 2015-08-01 14:19:09 +01:00
Paul Chote
0065d27c68 Make WithBuildingExplosion fields readonly. 2015-08-01 14:19:09 +01:00
Paul Chote
eeb101c040 Make Contrail fields readonly. 2015-08-01 14:19:09 +01:00
reaperrr
1e96e7720d Merge pull request #8867 from abcdefg30/fixload
Fix a crash in LaunchArguments when switching mods
2015-08-01 14:54:57 +02:00
Paul Chote
6a586fe501 Make RenderVoxels fields readonly. 2015-08-01 13:28:56 +01:00
Paul Chote
c6ecd772c4 Make RenderRangeCircle fields readonly. 2015-08-01 13:28:19 +01:00
Paul Chote
4b4cc52aa0 Make RenderDetectionCircle fields readonly. 2015-08-01 13:27:57 +01:00
Paul Chote
080f1880b9 Make RenderBuildingTurreted fields readonly. 2015-08-01 13:27:40 +01:00
Paul Chote
ef619a186c Make ExternalCapturableBar fields readonly. 2015-08-01 13:27:09 +01:00
abcdefg30
5e3d600408 Fix a crash in LaunchArguments when switching mods 2015-08-01 13:45:41 +02:00
reaperrr
4934d6c035 Merge pull request #8859 from pchote/coords-fixup
Fix WPos <-> CPos conversions.
2015-08-01 12:23:26 +02:00
Paul Chote
82abd5a016 Merge pull request #8808 from deniz1a/leavemap-cleanup
Removes unnecessary code from IngameChatLogic.cs.
2015-08-01 11:21:15 +01:00
Paul Chote
bdf3c0694d Merge pull request #8812 from abcdefg30/mechanical
Fix TS Repair weapons versus values
2015-08-01 11:13:26 +01:00
Paul Chote
a0e92093a1 Fix the WPos <-> CPos conversion.
Fixes #8463.
2015-08-01 11:09:07 +01:00
abcdefg30
b8372984b0 Merge pull request #8247 from Mailaender/man-openra
Added a UNIX man page
2015-08-01 12:06:14 +02:00
reaperrr
a8c09f4035 Merge pull request #8846 from pchote/ingame-map-previews
Improve radar minimap on isometric maps.
2015-08-01 11:59:21 +02:00
Matthias Mailänder
7c86519242 organize launch arguments in it's own class 2015-08-01 11:56:45 +02:00
Matthias Mailänder
baa798d831 autogenerate and install a UNIX man page 2015-08-01 11:56:43 +02:00
Matthias Mailänder
ec7912eaac remove unused variable 2015-08-01 11:55:46 +02:00
Matthias Mailänder
88e16a890d extract Launch args for automatic manpage creation 2015-08-01 11:55:46 +02:00
abcdefg30
9d32667d15 Merge pull request #8860 from pchote/heightmap-placebuilding-footprint
Align the footprint tiles with the building preview.
2015-08-01 10:32:57 +02:00
Paul Chote
bffbd2fc66 Fixes MMKII weapon offsets. 2015-08-01 00:42:59 +01:00
Paul Chote
9a64b8724c Disable local -> world offset hack in TS. 2015-08-01 00:42:59 +01:00
Paul Chote
aebca2bdae Align the footprint tiles with the building preview. 2015-07-31 23:36:40 +01:00
RoosterDragon
cfd2f265d5 Sync inherited members. 2015-07-31 22:04:43 +01:00
Pavel Penev
33e779f4c0 Merge pull request #8856 from reaperrr/wpdo
Fix WithProductionDoorOverlay namespace
2015-07-31 22:33:03 +03:00
reaperrr
5941914ced Fix WithProductionDoorOverlay namespace 2015-07-31 21:08:25 +02:00
Oliver Brakmann
b249347898 Merge pull request #8545 from HenrytheSlav/soviet4s
Add Soviet04a and Soviet04b
2015-07-31 20:11:19 +02:00
Pavel Penev
c304229987 Merge pull request #8847 from pchote/heightmap-borders
Heightmap-aware map helper functions.
2015-07-31 16:14:12 +03:00
Paul Chote
d29519fca1 Implement height-aware map.ChooseClosestEdgeCell(). 2015-07-31 08:38:07 +01:00
Paul Chote
05f41a0182 Implement height-aware map.DistanceToEdge(). 2015-07-31 08:38:07 +01:00
Paul Chote
318d6aaa73 Implement height-aware map.ChooseRandomEdgeCell(). 2015-07-31 08:38:07 +01:00
Paul Chote
e337710221 Implement height-aware map.ChooseRandomCell(). 2015-07-31 08:38:06 +01:00
Paul Chote
ed359c8aeb Improve radar display for isometric maps. 2015-07-31 08:34:16 +01:00
Paul Chote
372d93994c Account for heightmaps in choosing the minimap bounds. 2015-07-31 08:34:16 +01:00
Pavel Penev
10c5b82ef0 Rename BuildableInfo.ForceRace 2015-07-31 05:41:19 +03:00
Pavel Penev
720cb062b6 Add an upgrade rule for ProvidesPrerequisite.Race rename 2015-07-31 05:40:59 +03:00
Pavel Penev
a8dae72409 Clean ProvidesPrerequisite.cs of "race" 2015-07-31 05:38:49 +03:00
Pavel Penev
1e9cc50805 Clean Production.cs of "race" 2015-07-31 05:38:43 +03:00
Pavel Penev
6379ee9394 Clean ObserverShroudSelectorLogic.cs of "race" 2015-07-31 05:38:27 +03:00
reaperrr
715a89468a Clean up RA vehicles.yaml since UnitExplodeSmall is inherited from defaults 2015-07-30 21:23:56 +02:00
reaperrr
c205afcf4d Add descriptions and LoadedChance to Explodes trait
'Chance' only allows to control whether the actor explodes at all.
'LoadedChance' allows to control how likely the actor will explode violently using Weapon, and otherwise falls back to EmptyWeapon.
2015-07-30 21:23:55 +02:00
abcdefg30
c2cbf7c79d Merge pull request #8842 from GraionDilach/replace-thunder
Replace ambient sounds from unknown sources with CC0 licensed ones
2015-07-30 20:06:09 +02:00
Zimmermann Gyula
befdac8237 Replace ambient sounds from unknown sources with CC0 licensed ones
Sample sources:
rain https://www.freesound.org/people/vibe_crc/sounds/50058/
thunder1 https://www.freesound.org/people/netaj/sounds/193170/
thunder2 thunder-ambient
https://www.freesound.org/people/hifijohn/sounds/242735/
thunder3 https://www.freesound.org/people/sarson/sounds/195522/
thunder4 https://www.freesound.org/people/FenrirFangs/sounds/234737/
thunder5 https://www.freesound.org/people/Xythe/sounds/37299/
2015-07-30 19:36:12 +02:00
Pavel Penev
ab1c7ebb09 Merge pull request #8845 from obrakmann/remove-clamping-testcase
Revert "HACK: Testcase for edge clamping."
2015-07-30 17:40:42 +03:00
Oliver Brakmann
439bc4ab34 Revert "HACK: Testcase for edge clamping."
This reverts commit fb84f1157e.
2015-07-30 16:36:40 +02:00
Oliver Brakmann
74570e5998 Merge pull request #8824 from pchote/heightmap-clamp
Implement heightmap-aware bounds clamping.
2015-07-30 16:20:27 +02:00
Paul Chote
fb84f1157e HACK: Testcase for edge clamping.
Remove before merging!
2015-07-30 08:18:45 +01:00
Paul Chote
13e0527f7c Implement height-aware map.Clamp(MPos). 2015-07-30 08:18:45 +01:00
Paul Chote
2c00019715 Revert "Temporarily work around RadarWidget corruption."
This reverts commit 4bc75f1ed6.
2015-07-30 08:18:45 +01:00
Paul Chote
66f4e1d775 Render the full map to the radar backing sheet. 2015-07-30 08:18:39 +01:00
Oliver Brakmann
90d3a9078f Merge pull request #8825 from pchote/lobby-map-previews
Fix TS lobby map previews
2015-07-29 21:54:46 +02:00
Paul Chote
54a80ed035 Include additional preview to prevent cutoff.
Fun fact: The original TS sidestepped this issue
by rendering everything outside the cordon, which
looks much worse than what we do here.
2015-07-29 20:44:44 +01:00
Paul Chote
af69370c17 Improve lobby minimap display for isometric maps.
Also extracts a trait query from inside a tight loop to save unnecessary work.
2015-07-29 20:44:44 +01:00
reaperrr
6db91ccec1 Merge pull request #8796 from Mailaender/travis-docker-take2
Enabled the container based Travis CI architecture
2015-07-29 20:55:13 +02:00
abcdefg30
fa3ad6347b Merge pull request #8836 from reaperrr/atk-sync
Removed redundant ISync and ITick from Attack* traits
2015-07-29 19:37:24 +02:00
reaperrr
398f02c5db Remove redundant ISync and ITick from Attack* traits
ISync is implemented by AttackBase, so there's no need for other Attack traits to implement it again.
AttackTurreted inherits AttackFollow, which already implements ITick.
2015-07-29 17:45:30 +02:00
Matthias Mailänder
c660d32051 Merge pull request #8833 from obrakmann/fix8826_trait-from-dead-crate-crash
Fix crates dying while not in the world
2015-07-29 15:30:07 +02:00
Matthias Mailänder
8eb5698d57 Merge pull request #8170 from DSUK/master
TFD Installer for Tiberian dawn, Red Alert and Tiberian Sun
2015-07-29 15:25:59 +02:00
Pavel Penev
df46f83e38 Merge pull request #8834 from obrakmann/fix-basebuilder-nre
Fix potential NRE in AI BaseBuilder
2015-07-29 16:07:34 +03:00
Oliver Brakmann
1b9367ae4b Fix potential NRE in AI BaseBuilder
Detected by Coverity
2015-07-29 14:53:15 +02:00
abcdefg30
4a42591369 Fix TS Repair weapons versus values 2015-07-29 14:49:05 +02:00
Oliver Brakmann
eada254ad3 Fix crates dying while not in the world
On large maps, it can take the delivery aircraft longer than the crate's
lifetime to reach the paradrop location, so the crate will be destroyed while it's still in the aircraft, leading to an attempt to get a trait from a destroyed object in the Paradrop trait.

This fixes the lifetime logic of crates so that the lifetime will only be increased when the crate is actually in the world. This will probably also better reflect the intention behind the Lifetime property, which I assume was meant to be the time the crate would be on the map available for pickup, rather than the lifetime of the actor itself.
2015-07-29 12:35:58 +02:00
James
1d3f4d6f12 added The First Decade Installation Logic 2015-07-29 08:18:26 +01:00
James
8468ce5fe6 added InstallShield CAB Extractor 2015-07-29 08:18:26 +01:00
Matthias Mailänder
0ba54b425e Merge pull request #8759 from reaperrr/ai-bldgcheck
Improved AI BaseBuilder
2015-07-28 22:32:21 +02:00
reaperrr
d8e458d028 Added TODOs for foundation of checked water cells
Fix description style issues
2015-07-28 22:03:53 +02:00
reaperrr
91178d6f62 Improved naval placement check
Moved water checks before --waitTicks.
Use Water enum instead of multiple booleans.
Check for BaseProvider rather than BaseBuilding.
Move expensive ClosEnoughToWater check to last position for naval
production override.
2015-07-28 22:03:52 +02:00
Matthias Mailänder
b9c52acefc Merge pull request #8809 from reaperrr/ra-ai
Improved RA mod AI (yaml tweaks)
2015-07-28 21:25:33 +02:00
Matthias Mailänder
e127e55792 Merge pull request #8777 from pchote/base-key
Fall back to oldest building if no BaseBuildings exist.
2015-07-28 20:35:12 +02:00
reaperrr
ed1a55df83 Fixed AI soviet paratrooper target evaluation so it doesn't always fail 2015-07-28 19:26:43 +02:00
Pavel Penev
fb2a4265bd Merge pull request #8811 from abcdefg30/die3
Use HeadshotDeath instead of BulletDeath for Umagon's rifle
2015-07-28 19:16:24 +03:00
Pavel Penev
2a166edb72 Merge pull request #8820 from obrakmann/fix8722-allies03-jail-breakage
Revert "Allies 03 Cloak->TargetableUnit"
2015-07-28 18:23:48 +03:00
reaperrr
5f9834d250 Shifted Turtle AI priority more from adv. power plants to defenses
This will work better once #8759 is merged (due to improved low power check).
2015-07-28 17:05:20 +02:00
reaperrr
793a9e4f20 Disable dog kennels for AI
I saw the AI build kennels early and waste cash on an army of dogs quite a
few times, putting that AI at severe disadvantage.
2015-07-28 17:04:05 +02:00
Oliver Brakmann
b7c444713e Revert "Allies 03 Cloak->TargetableUnit"
This reverts commit acc4b307b6.
2015-07-28 15:42:18 +02:00
Oliver Brakmann
dff56f6c20 Merge pull request #8781 from pchote/heightmap-shroud
Add plumbing for heighmap-aware shroud and map bounds checks.
2015-07-28 15:35:51 +02:00
Pavel Penev
7701980b76 Simple code style cleanups 2015-07-28 14:21:17 +03:00
Pavel Penev
9801d89e75 Merge pull request #8813 from pchote/fix-bounds-checks
Replace map.Contains with proper array bounds checks.
2015-07-28 04:27:53 +03:00
deniz1a
e3c2dced36 Removes unnecessary code from IngameChatLogic.cs.
Cleanup after #8105.
2015-07-27 23:22:30 +03:00
Matthias Mailänder
9fefc1f7b7 Merge pull request #8816 from reaperrr/common-armor
Moved Armor trait to Mods.Common
2015-07-27 22:04:29 +02:00
Paul Chote
4bc75f1ed6 Temporarily work around RadarWidget corruption. 2015-07-27 20:20:01 +01:00
reaperrr
89f3718aa7 Move Armor trait to Mods.Common 2015-07-27 21:12:03 +02:00
Paul Chote
86ba26e013 Convert shroud calculations and rendering to PPos. 2015-07-27 19:34:50 +01:00
Paul Chote
e8794032e0 Introduce initial PPos plumbing.
PPos is best thought of as a cell grid applied in
screen space.  Multiple cells with different
terrain heights may be projected to the same PPos,
or to multiple PPos if they do not align with the
screen grid.

PPos coordinates are used primarily for map edge
checks and shroud / visibility queries.
2015-07-27 19:34:49 +01:00
Paul Chote
fb5bcd3889 Extract MapCoordsRegion from CellRegion. 2015-07-27 19:34:39 +01:00
Paul Chote
a8c6a1aa97 Correct Contains check in DomainIndex. 2015-07-27 19:06:20 +01:00
Paul Chote
3a7300810c Correct Contains check in BridgeLayer. 2015-07-27 19:06:20 +01:00
Paul Chote
0b5b612757 Correct Contains check in BuildingInfluence. 2015-07-27 18:43:51 +01:00
Paul Chote
2b3c65334d Correct Contains check in ActorMap. 2015-07-27 18:43:51 +01:00
Matthias Mailänder
3b25a2029a Merge pull request #8805 from obrakmann/fix8802_enemy-unit-selection
Fix not being able to select enemy units
2015-07-27 19:38:37 +02:00
abcdefg30
adfa2af4bc Merge pull request #8800 from Mailaender/ts-deployed-units
Fixed deployed vehicles being treated as buildings
2015-07-27 18:53:48 +02:00
abcdefg30
7c14f54ca3 Added soviet04a and soviet04b 2015-07-27 18:10:09 +02:00
abcdefg30
88466473dd Use HeadshotDeath instead of BulletDeath for Umagon's rifle 2015-07-27 17:34:12 +02:00
reaperrr
e1ef6967f6 Sniper isn't buildable anymore 2015-07-27 16:00:53 +02:00
Oliver Brakmann
a2a0059f7f Fix chronoshift duration being visible to enemy players 2015-07-27 13:32:51 +02:00
reaperrr
76f2145db2 Added random factor to building production delay
Early game AI usually follows the same build order (power plant first, then refinery), which also means they all start producing them at the same tick. This adds a random factor to the production delay, so not all AIs produce on the same tick.
2015-07-27 13:28:07 +02:00
reaperrr
c7af9c180e Further improved building placement failure check
Since naval structures have their own safety measures now and therefore shouldn't count towards failCount under normal circumstances, we can now assume that 3 consecutive placement failures mean lack of space. Therefore, rather than unconditionally resetting the failCount and retry every N ticks, we now cache the number of buildings and construction yards at the time of the 3rd consecutive failure and if the number of buildings hasn't decreased and number of construction yards not increased, we assume there is still not enough space and reset the retry delay instead.
2015-07-27 13:28:06 +02:00
reaperrr
65a6489ef1 Avoid consecutive attempts to build naval structures
If not enough water space can be found inside the base perimeter, stop the AI from trying to build naval production buildings permanently until it deploys another construction yard.

If enough water is available within the base perimeter, check whether any
building that provides buildable area (for adjacency) is close enough to
water, otherwise don't even start producing this naval structure.
2015-07-27 13:28:05 +02:00
reaperrr
0a5b812bb7 Check for consecutive failures to place a structure.
After 3 consecutive failed attempts, wait one minute before resetting the counter and trying again.
2015-07-27 13:21:58 +02:00
Oliver Brakmann
618ba6342c Fix not being able to select enemy units 2015-07-27 13:07:07 +02:00
reaperrr
6ff394991d Fixed AI BaseBuilder low power check.
This was extremely borked:
The priority overrides for refinery, production and silo ignored power completely and never checked whether the structure might drive the AI into low power state; whereas the check for regular building checked whether the structure's power -exceeded- MinimumExcessPower (previously just 0). The catch is that power draw is represented by negative numbers, so the only buildings that would trigger this were - power plants.
Now it checks whether the sum of building power draw (negative) and AI's current power level are lower than MinimumExcessPower, if not, build the structure, if yes, build a power plant instead.
Additionally, this check is now performed for the early-game priority overrides as well.

Last but not least the AI would not(!) give power plants priority if it was already low on power. This has been fixed as well.
2015-07-27 13:06:18 +02:00
Matthias Mailänder
a3eac88e36 Merge pull request #8774 from atlimit8/v19husk_noRenderBuilding
Add StartSequence to WithIdleOverlay & change V19.Husk
2015-07-27 07:50:18 +02:00
Matthias Mailänder
00017a9b4e Merge pull request #8770 from RoosterDragon/ai-order-throttle
Throttle AI order speed to prevent lag spikes
2015-07-27 07:37:01 +02:00
Matthias Mailänder
5800c07602 don't define deployed vehicles as buildings 2015-07-26 21:17:25 +02:00
atlimit8
4976f9fec9 Add StartSequence to WithIdleOverlay & change V19.Husk 2015-07-26 12:53:09 -05:00
Matthias Mailänder
1748588ec8 remove redundant push/pop with nothing in between 2015-07-26 14:05:22 +02:00
RoosterDragon
942ce6b5a6 Throttle the issuing of orders by the AI.
To prevent the AI generating lag spikes by issuing too many orders in a single tick, it is now limited in how many orders can be issued per tick. Extra orders are queued. This allows the performance hit of issuing multiple orders to be spread out over several ticks.
2015-07-26 12:57:19 +01:00
Matthias Mailänder
f3490dd8e4 double quote to prevent globbing and word splitting
detected by http://www.shellcheck.net/
2015-07-26 13:03:01 +02:00
Matthias Mailänder
0c2934a536 switch to the new container based infrastructure 2015-07-26 13:02:14 +02:00
Matthias Mailänder
03ace48031 remove the thirdparty nsProcess plugin 2015-07-26 12:33:02 +02:00
Paul Chote
d9d37d54c8 Merge pull request #8782 from Mailaender/ts-tmpl
Added the Tiberian Sun Temple of Nod
2015-07-26 11:07:29 +01:00
Paul Chote
3dfd6360ac Merge pull request #8793 from atlimit8/SandwormNoLzay
Remove unnecessary Lazy<>s from Sandworm.cs
2015-07-26 11:06:44 +01:00
Oliver Brakmann
bb40d57944 Merge pull request #8791 from penev92/bleed_cancelActivity
Fix an NRE when cancelling repair orders on units at the wrong time
2015-07-26 11:09:56 +02:00
Matthias Mailänder
4d81cc262c Merge pull request #8783 from obrakmann/reenable-mission-replays
Re-enable mission replays
2015-07-26 09:44:19 +02:00
Matthias Mailänder
2119b26e18 Merge pull request #8790 from pchote/restore-aircraft-height
Revert "Lower aircraft altitude"
2015-07-26 08:51:31 +02:00
atlimit8
cc3b286fa6 Remove unnecessary Lazy<>s from Sandworm.cs 2015-07-25 23:10:42 -05:00
Pavel Penev
cccf5c5931 Check if the inner activity is null before trying to cancel it 2015-07-26 02:15:38 +03:00
Paul Chote
04a71f4dc5 Revert "Fix fallrates for parachutable things to match lowered release altitude"
This reverts commit f7a02eeca5.
2015-07-25 23:31:38 +01:00
Paul Chote
2a93a95245 Revert "Lower aircraft altitude"
This reverts commit d53cfafde9.
2015-07-25 23:27:06 +01:00
deniz1a
f2ac6c9980 Some yaml cleanups. 2015-07-25 23:03:15 +03:00
deniz1a
ac6e915839 Simplifies Start button logic in lobby. 2015-07-25 23:03:14 +03:00
Oliver Brakmann
b749548e76 Re-enable replays for missions 2015-07-25 20:51:39 +02:00
Oliver Brakmann
4de03e991c Remove revealing views from observer mode in missions 2015-07-25 20:51:39 +02:00
Matthias Mailänder
a56ecc3f6b add Temple of Nod 2015-07-25 20:30:41 +02:00
Oliver Brakmann
808bbb8d2e Merge pull request #8105 from deniz1a/scrollafterend
Removes LeaveMap window.
2015-07-25 18:13:57 +02:00
Oliver Brakmann
a77e9c0d87 Delay loading the observer UI until the game is actually over 2015-07-25 18:56:25 +03:00
Oliver Brakmann
a725d63b0c Remove World.ObserveAfterWinOrLose
Fixes RenderPlayer for "All Players" view.
2015-07-25 18:56:24 +03:00
deniz1a
5546298866 Merges LeaveMapLogic into GameInfoLogic.
Opens options menu when game ends.

Closes settings or music window before opening options menu.

Moves game end video playback logic from GameInfoLogic to
LoadIngamePlayerOrObserverUILogic.

Improves menu buttons.

Stop video from playing on fatal lua script error
2015-07-25 18:56:24 +03:00
deniz1a
ef143e5f8a Freezes map after game ends.
Adds newline.

Disables keyboard hotkeys for units after game ends.
2015-07-25 18:56:23 +03:00
Pavel Penev
ea3a680eda Merge pull request #8725 from reaperrr/bye-rendersimple-pr1
Step towards removing RenderSimple and its derivatives (Part 1)
2015-07-25 18:43:13 +03:00
Oliver Brakmann
8c766a4a79 Merge pull request #8721 from penev92/bleed_rename
Some more Country -> Faction renaming
2015-07-25 17:10:35 +02:00
reaperrr
65c95eb2ee Adapted WithHarvestAnimation to account for damage stages 2015-07-25 16:17:08 +02:00
Paul Chote
537c252e83 Merge pull request #8779 from GraionDilach/fix-gameover
Fix Observers/players using the nofogcheat crashing during win/lose the game.
2015-07-25 14:47:28 +01:00
penev92
4616828b28 Deprecate PlayerProperties.Race 2015-07-25 16:43:34 +03:00
Pavel Penev
4ad9067f51 Merge pull request #8776 from pchote/editor-path-fix
Create the user map directory if required.
2015-07-25 16:36:24 +03:00
Zimmermann Gyula
8f43ae96ae Fix Observers crashing during win/lose the game. 2015-07-25 14:04:47 +02:00
Oliver Brakmann
229a059e06 Merge pull request #8771 from deniz1a/support-power-bounds
Aligns observer support power timers to the left edge of the screen.
2015-07-25 13:13:00 +02:00
Paul Chote
655f4d30ff Merge pull request #8769 from obrakmann/lobby-esc-hotkey
Remove ESC hotkey from lobby 'Back' button
2015-07-25 10:12:50 +01:00
bryanwilbur
09472c3275 Update AUTHORS 2015-07-25 10:04:15 +01:00
bryanwilbur
031109d766 The 'Jump to base' hotkey is useless if the Construction Yard is destroyed #3318
Now works like original Red Alert.  When there are no more Construction Yards the 'Jump to base' hotkey goes to the oldest undestroyed building.
2015-07-25 10:04:14 +01:00
Paul Chote
c70ebfab74 Create the user map directory if required.
Fixes #8772.
2015-07-25 09:36:29 +01:00
reaperrr
2e9a4b78a3 Refactor RenderEditorOnly into RenderSpritesEditorOnly + WithSpriteBody 2015-07-25 10:28:07 +02:00
reaperrr
fe346e5401 Replace RenderBuilding where already possible 2015-07-25 10:28:06 +02:00
reaperrr
74b948342e Fix WithSpriteBody PlayCustomAnimationRepeating
Lacked damage stage awareness.
2015-07-25 10:28:05 +02:00
deniz1a
32e2a06743 Aligns observer support power timers to the left edge of the screen. 2015-07-25 03:20:44 +03:00
Pavel Penev
ded5a2b16a Merge pull request #8742 from abcdefg30/withpalettedeath
Support multiple WithDeathAnimation traits
2015-07-25 03:10:43 +03:00
penev92
7c1ef2231d Rename RaceInit to FactionInit 2015-07-25 00:39:31 +03:00
penev92
b34810c1d3 Rename AddRaceSuffixLogic to AddFactionSuffixLogic 2015-07-25 00:39:29 +03:00
penev92
9a36bf6bcd Rename CountryTooltipLogic to FactionTooltipLogic 2015-07-25 00:20:59 +03:00
penev92
dc30e5a46d Rename LobbyCountry to LobbyFaction 2015-07-25 00:20:58 +03:00
Oliver Brakmann
6467593124 Remove ESC hotkey from lobby 'Back' button 2015-07-24 23:09:30 +02:00
Oliver Brakmann
7d56209f3b Merge pull request #8680 from deniz1a/textfields
Some text field improvements.
2015-07-24 23:00:12 +02:00
RoosterDragon
6b9dd9670a Avoid multiple AIs all issuing orders in exactly the same tick.
Randomize the initial tick used for each AI so they don't cause lag but all flooding the same tick with orders, but instead (try) and use a different tick for each AI. Order processing is expensive due to the need to sync world state, so it is best to spread out the performance cost of issuing these orders over different ticks.
2015-07-24 21:29:11 +01:00
deniz1a
f5b4befc75 Resets chat text field in lobby when Esc is pressed. 2015-07-24 23:21:37 +03:00
deniz1a
7337afcfeb Improves player name text field in game lobby.
Esc key resets text field to unmodified value and yields focus.
2015-07-24 23:13:17 +03:00
deniz1a
a51cc27fb5 Improves frame limit and player name text fields in settings menu.
Esc key resets text field to unedited value and yields focus.
2015-07-24 23:09:16 +03:00
deniz1a
4fcf73921f Improves filter text field in asset browser.
Text field takes keyboard focus by default.
Esc key resets filter or closes window if text field is empty.
2015-07-24 23:09:15 +03:00
deniz1a
d8c996f74a Fixes spelling in comment. 2015-07-24 23:09:15 +03:00
Paul Chote
34ffb3772f Merge pull request #8728 from reaperrr/wgb
Replaced RenderGunboat with WithGunboatBody
2015-07-24 20:54:55 +01:00
Paul Chote
6fb60f4d99 Merge pull request #8762 from RoosterDragon/filesystem-dispose
Release file handles when unmounting file system
2015-07-24 20:46:35 +01:00
Paul Chote
0c360b5bd0 Merge pull request #8743 from GraionDilach/remove-outtakes
Remove Outtakes (the blooper song) from C&C.
2015-07-24 20:20:06 +01:00
RoosterDragon
ce73bb909e Make IFolder interface inherently IDisposable.
Fix up implementations to ensure they dispose any stream they acquire, and ensure the constructor will not leave a stream open if it fails. Dispose folders when unmounting them in GlobalFileSystem.
2015-07-23 22:31:20 +01:00
Oliver Brakmann
1e7da8514a Merge pull request #8735 from reaperrr/safe-pf-changes
Minor pathfinder-related changes (preparation for mobile refactor)
2015-07-22 14:42:52 +02:00
Oliver Brakmann
5a1b6bb644 Merge pull request #8622 from reaperrr/hv-refactor2
Refactored harvester resource search
2015-07-22 14:26:31 +02:00
reaperrr
711ec0c600 Minor pathfinder changes 2015-07-22 06:36:00 +02:00
reaperrr
3b1607883d Fix D2k harvesters getting stuck on spice field after drop by carryall 2015-07-22 05:10:19 +02:00
reaperrr
61c0b5d59b Make refinery unblock cell customisable 2015-07-22 02:31:29 +02:00
reaperrr
62e05cf618 Fix for potential infinite loop freeze 2015-07-22 02:31:28 +02:00
David Jiménez
787609d51e Improved the performance and intelligence of resource harvesting by
refactoring the Harvesters' pathfinding. Now they in first place assess
which is the closest resource inside their search area and then a path is
calculated

Changed the way harvesters find resources by always trying to find the
closest resource to their refinery.

Changed the strategy of finding to find resources in Annulus.
2015-07-22 02:31:26 +02:00
reaperrr
bd73783cef Merge pull request #8685 from Mailaender/lint-projectile-sprites
Added projectile sprite testing to the CheckYaml lint rules
2015-07-21 01:56:58 +02:00
Matthias Mailänder
a0dc38c252 Merge pull request #8752 from obrakmann/optional-target-lines
Added option to turn off rendering of target lines in the settings
2015-07-20 22:05:05 +02:00
Matthias Mailänder
c6c6a9ff89 Merge pull request #8754 from atlimit8/00To0
Modify upgrade rules to match #8658 for rules older than 2015-07-11
2015-07-20 21:58:16 +02:00
Matthias Mailänder
0296d4e6c7 Merge pull request #8720 from abcdefg30/parashadow
Use the correct ShadowPalette for d2k paradrops
2015-07-20 21:56:50 +02:00
abcdefg30
69328af96d Merge pull request #8756 from atlimit8/FixUpgradableMultiplierTrait
Fix #8751 - IndexOutOfRangeException when UpgradeMultiplierTrait is pre-enabled
2015-07-20 13:23:48 +02:00
atlimit8
96cafccb8d Fix #8751 - IndexOutOfRangeException when UpgradeMultiplierTrait is pre-enabled 2015-07-20 02:51:45 -05:00
atlimit8
1f3ba22a55 Modify upgrade rules to match #8658 for rules older than 2015-07-11 2015-07-19 19:45:11 -05:00
figrita
ab3ab6f230 Added option to turn off rendering of target lines in the settings 2015-07-20 00:05:29 +02:00
Oliver Brakmann
30696ea23d Merge pull request #8693 from abcdefg30/difficultyA02
Add different difficulties for allies02
2015-07-19 23:33:29 +02:00
reaperrr
a4a4ac1d5b Merge pull request #8741 from obrakmann/d2k-remove-shellmap-script
Remove shellmap script from d2k
2015-07-19 23:13:21 +02:00
Oliver Brakmann
68ac49b172 Merge pull request #8672 from pchote/more-terrainlayers
Convert remaining terrain layers to use TerrainSpriteLayer
2015-07-19 23:01:44 +02:00
Oliver Brakmann
e4521c7e15 Remove shellmap script from d2k 2015-07-19 19:40:44 +02:00
Matthias Mailänder
1f69a0f6ed make projectile sprite sequences lint testable 2015-07-19 19:24:18 +02:00
Matthias Mailänder
d1db675af5 fix the linter not printing any helpful stacktraces (doh!) 2015-07-19 19:24:18 +02:00
Matthias Mailänder
c8c0cc52b6 add missing sequence references and add spaces for readability 2015-07-19 19:24:18 +02:00
Matthias Mailänder
50d5f1f161 unhardcode and reference tesla zap sprite sequences 2015-07-19 19:24:17 +02:00
abcdefg30
a5f921e843 Merge pull request #8726 from GraionDilach/d2k-menumusic
Restore the original setup of the menu and score musics in the D2k mod.
2015-07-19 13:48:21 +02:00
abcdefg30
df1cdca0dc Add die4 and "fix" ExplosionDeath 2015-07-19 11:30:15 +02:00
abcdefg30
4cf045bdd8 Fix TS death animation palettes 2015-07-19 11:30:14 +02:00
abcdefg30
1518dc9145 Support multiple WithDeathAnimation traits 2015-07-19 11:30:13 +02:00
Zimmermann Gyula
40f116a452 Remove Outtakes (the blooper song) from C&C. 2015-07-19 11:28:31 +02:00
Oliver Brakmann
d5c65b59b0 Fix scripted paradrops
A recent PR changed ParaDrop from an Effect to an Activity. Idle triggers in the mission scripts however have already queued activities for the paradropped units, so the ParaDrop activity would only run once the first activity had finished (which could never happen).
2015-07-18 21:22:40 +02:00
abcdefg30
3e7134ae6b Fix bogus paradropping in survival01 2015-07-18 21:22:39 +02:00
abcdefg30
df02604a9a Fix WithParachute on ^Vehicle 2015-07-18 21:22:39 +02:00
abcdefg30
ef6da3d0b3 Replace the default value of ShadowPalette with "shadow". 2015-07-18 21:22:38 +02:00
Oliver Brakmann
c8a258faa0 Merge pull request #8683 from Mailaender/serverbrowser-color
Fixed hard-coded and hard to read colors in ServerBrowser
2015-07-18 18:26:12 +02:00
reaperrr
abec89fa26 Replaced RenderGunboat with WithGunboatBody
Based on WithSpriteBody.
2015-07-18 18:21:10 +02:00
Matthias Mailänder
d174d0065e choose a color with better contrast against background 2015-07-18 17:23:45 +02:00
Matthias Mailänder
860bfdadc4 extract server browser colors to configurable yaml 2015-07-18 17:22:39 +02:00
David Jiménez
5109848215 Changes to improve understandability of code 2015-07-18 15:05:12 +02:00
Paul Chote
17308c7643 Merge pull request #8690 from Mailaender/sdl2-cs-upstream
Updated SDL2-CS to use current upstream version
2015-07-18 12:35:30 +01:00
Paul Chote
bea021a069 Merge pull request #8729 from RoosterDragon/alloc-reductions
Reduce allocations
2015-07-18 12:28:07 +01:00
Paul Chote
794c317687 Unhardcode BuildableTerrainLayer palette. 2015-07-18 12:14:23 +01:00
Paul Chote
ce4bdced47 Use a TerrainSpriteLayer for smudges. 2015-07-18 12:14:23 +01:00
Paul Chote
fe41ee0346 Clean up SmudgeLayer init. 2015-07-18 12:14:23 +01:00
Paul Chote
bf08bbc357 Use a TerrainSpriteLayer for buildable terrain. 2015-07-18 12:14:22 +01:00
Paul Chote
1f0f8c953b Use TerrainSpriteLayers for editor resources. 2015-07-18 12:14:13 +01:00
Matthias Mailänder
60792abad8 Merge pull request #8737 from atlimit8/FixQuickReloadTimeMultiplierReloadDelayMultiplier
Fix quick ReloadTimeMultiplier => ReloadDelayMultiplier rename
2015-07-18 08:13:37 +02:00
atlimit8
ef955c4b5a Fix quick ReloadTimeMultiplier => ReloadDelayMultiplier rename 2015-07-17 22:45:13 -05:00
reaperrr
0b0fe3ca20 Merge pull request #8732 from Phrohdoh/polish#unhardcode-bullet
Unhardcode some things in Bullet.
2015-07-17 02:42:58 +02:00
Taryn Hill
847ce0d3a7 Add some descriptions to BulletInfo. Unhardcode a sequence and a palette in Bullet. 2015-07-16 19:19:28 -05:00
Taryn Hill
b8973cd5e7 Add some newlines to BulletInfo for readability. 2015-07-16 19:10:43 -05:00
Zimmermann Gyula
2de5bbe02b Restore the original setup of the menu and score musics in the D2k mod. 2015-07-16 16:56:04 +02:00
RoosterDragon
ccad451060 Add WorldRenderer.ScreenVectorComponents.
This allows the components to be returned via out parameters, avoiding the need to allocate an array for most callers.
2015-07-15 21:24:01 +01:00
RoosterDragon
92389916a6 Cache the simpler delegates used in IShader.Render calls. 2015-07-15 21:09:11 +01:00
RoosterDragon
3a0eb5554e Provide HasStance extension method for Stance enum, to avoid overhead of HasFlag method. 2015-07-15 20:40:38 +01:00
RoosterDragon
6113892276 Cache rotation matrices used by WorldRenderer.DrawRangeCircle. 2015-07-15 20:40:36 +01:00
RoosterDragon
7dc654a5ad Cache Orders in Passenger to avoid several repeated allocations when orders must be determined. 2015-07-15 20:40:35 +01:00
RoosterDragon
218712f5d3 Avoid allocating a compiler generated enumerator in WithDecoration.Render. 2015-07-15 20:40:35 +01:00
Oliver Brakmann
1d9c6251c0 Merge pull request #8658 from matija-hustic/higher_level_timed_upgrades
Higher level timed upgrades
2015-07-15 20:51:51 +02:00
Oliver Brakmann
98c2870cf1 Merge pull request #8716 from penev92/bleed_fixLaunch
Explicitly set current working directory
2015-07-15 18:24:29 +02:00
Oliver Brakmann
2f82c2f9dc Merge pull request #8713 from deniz1a/server-filter
Fixes Empty filter in server browser.
2015-07-15 18:15:18 +02:00
abcdefg30
8236673939 Merge pull request #8718 from penev92/bleed_renamePlayer
Rename Country to Faction in Player.cs
2015-07-15 12:53:41 +02:00
abcdefg30
c50c9a2427 Merge pull request #8719 from matija-hustic/paradrop_regression_fix
Fixes D2K not finding paratrooper shadow sequence
2015-07-15 12:29:26 +02:00
Matija Hustić
25ce915a0c Fixes D2K regression due to unspecified sprite file name. 2015-07-15 10:32:42 +01:00
penev92
479eb307d6 Remove unused parameter from Player's constructor 2015-07-15 04:58:50 +03:00
penev92
317576a9bb Touch up Player.cs 2015-07-15 04:22:57 +03:00
penev92
b8aa92c4be Rename Player.DisplayCountry to Player.DisplayFaction 2015-07-15 04:10:13 +03:00
penev92
bb648decc3 Rename Player.Country to Player.Faction 2015-07-15 04:06:52 +03:00
penev92
fb0b60dddf Explicitly set current working directory
Avoids issues when launching the game from a URL
2015-07-15 00:32:04 +03:00
Oliver Brakmann
2e1c1533a5 Merge pull request #8339 from matija-hustic/paradrop_activity
Step in the direction of RA2 paratroopers
2015-07-14 22:29:02 +02:00
Oliver Brakmann
c8c564fac5 Merge pull request #8714 from matija-hustic/spy_veterancy_leftovers
Spy veterancy leftovers
2015-07-14 22:17:11 +02:00
Matija Hustić
2f01c389cf Manually upgraded YAMLs. 2015-07-14 20:39:09 +01:00
Matija Hustić
71d73ac738 Automatically upgraded YAMLs. 2015-07-14 20:39:08 +01:00
Matija Hustić
72e8e08f48 Step in the direction of RA2 paratroopers. 2015-07-14 20:39:06 +01:00
Oliver Brakmann
f7327418e4 Merge pull request #8712 from Phrohdoh/fix#rename-pwl
Rename ProduceableWithLevel to ProducibleWithLevel.
2015-07-14 21:22:57 +02:00
Matija Hustić
881f24c1cc Rank+1 displays only on levelup. 2015-07-14 20:14:25 +01:00
Oliver Brakmann
2a248471a9 Merge pull request #8715 from abcdefg30/ownerrow
Remove OwnerRow from explosive barrels
2015-07-14 21:14:00 +02:00
abcdefg30
5ddf94e624 HIJACKER can not be build by allies 2015-07-14 21:12:41 +02:00
abcdefg30
384a67def5 Add different difficulties to allies02 2015-07-14 21:12:40 +02:00
abcdefg30
4556a6ebb3 Adjust the objectives in allies02 2015-07-14 21:12:40 +02:00
abcdefg30
958d839802 Remove Ukraine from allies02 2015-07-14 21:12:39 +02:00
Matija Hustić
0a1a53bb4b Disables veterancy when infiltrating war factory in Allies05. 2015-07-14 20:11:34 +01:00
Oliver Brakmann
380cf22477 Merge pull request #8661 from penev92/bleed_renameCountry
Rename the Country trait to Faction
2015-07-14 21:05:52 +02:00
Oliver Brakmann
4ed7a4ce8a Merge pull request #8659 from penev92/bleed_playerReference
Rename PlayerReference.Race to Faction
2015-07-14 20:15:56 +02:00
abcdefg30
a273e2fc99 Remove OwnerRow from explosive barrels 2015-07-14 19:16:03 +02:00
penev92
0e871a4b6b Touch up CheckSequences.cs 2015-07-14 18:50:46 +03:00
penev92
830b7eee70 Touch up CheckPlayers.cs 2015-07-14 18:50:44 +03:00
penev92
0f0497b74d Add an upgrade rule for Country -> Faction 2015-07-14 18:50:41 +03:00
penev92
2e04fb5ddd Rename Faction trait members
Rename Faction.Race to Faction.InternalName
2015-07-14 18:50:39 +03:00
penev92
a1af5386e0 Rename the Country trait to Faction 2015-07-14 18:50:31 +03:00
deniz1a
a4d77a42d5 Fixes Empty filter in server browser.
Now, Waiting doesn't filter empty servers.
2015-07-14 10:51:21 +03:00
Matija Hustić
b2a26c57bc Adjusted other users of timed upgrades. 2015-07-14 03:08:48 +01:00
Taryn Hill
a3d740aa44 Rename ProduceableWithLevel to ProducibleWithLevel. 2015-07-13 21:04:26 -05:00
Matija Hustić
6f54fe7e5d Upgrade granting warheads register as sources. 2015-07-14 02:54:42 +01:00
Matija Hustić
58472bf090 Timed upgrades track sources. 2015-07-14 02:54:40 +01:00
Oliver Brakmann
b58d1037ea Merge pull request #8666 from GraionDilach/revert-emp-targeting
Reverted friendly units' immunity to EMP.
2015-07-13 22:24:08 +02:00
Oliver Brakmann
9415ced6ff Merge pull request #8664 from Mailaender/unduplicate-mobile
Removed code duplication from Mobile.cs
2015-07-13 22:17:37 +02:00
Oliver Brakmann
9722502a4b Merge pull request #8710 from GraionDilach/victory-music
Implements victory and defeat music.
2015-07-13 22:01:20 +02:00
Oliver Brakmann
8f48065176 Merge pull request #8708 from reaperrr/harv-caching
Improved caching in harvester activities
2015-07-13 17:43:39 +02:00
abcdefg30
a70e66f3fd Merge pull request #8572 from atlimit8/MultiplierTraits
Added multiplier modifier traits, removing GainsStatUpgrades, InvulnerabilityUpgrade, & Invulnerable.
2015-07-13 16:58:30 +02:00
atlimit8
daec860192 Added multiplier modifier traits, removing GainsStatUpgrades, InvulnerabilityUpgrade, & Invulnerable. 2015-07-13 09:24:50 -05:00
abcdefg30
b4031c6e9b Merge pull request #8703 from atlimit8/RequireInMiniYaml
Require trait properties in MiniYaml
2015-07-13 15:50:06 +02:00
Zimmermann Gyula
64e8d53541 List and add the previously unlisted tracks to the C&C mod. 2015-07-13 15:42:21 +02:00
Zimmermann Gyula
57e684d1d9 Implements victory and defeat music. 2015-07-13 15:42:13 +02:00
abcdefg30
ea5ef1c500 Merge pull request #8662 from atlimit8/UpgradableTargetableUnit
Upgradable TargetableUnit & apply to Allies 03
2015-07-13 15:40:28 +02:00
atlimit8
acc4b307b6 Allies 03 Cloak->TargetableUnit 2015-07-13 08:13:51 -05:00
abcdefg30
4297d06ba3 Merge pull request #8701 from obrakmann/fix8591_bldg-placement-nre
Fix an NRE during building placement under rare circumstances
2015-07-13 14:24:53 +02:00
abcdefg30
db4f1ad025 Merge pull request #8663 from Mailaender/disguise-stand2-crash
Fixed a crash when disguising the spy as infantry without stand2
2015-07-13 13:39:19 +02:00
abcdefg30
ce9b818600 Merge pull request #8684 from Mailaender/globalpalette-effect-lua
Exposed GlobalPaletteEffect to the Lua API for day/night cycles
2015-07-13 13:20:37 +02:00
abcdefg30
d35eb48612 Merge pull request #8688 from Phrohdoh/unhardcode-placebuilding
Unhardcode sound and delay in PlaceBuilding.
2015-07-13 12:50:42 +02:00
atlimit8
9905f217ef Make TargetableUnit upgradable 2015-07-12 19:41:29 -05:00
reaperrr
0ef5312931 Minor cosmetic cleanups for Harvester and BasePathSearch 2015-07-12 23:36:59 +02:00
reaperrr
ba2181e523 Make delay for re-checking for available refinery customisable and increase default 2015-07-12 23:36:58 +02:00
reaperrr
8fdeb04569 Extract HarvestResource into own file and cache trait lookups in
constructor
2015-07-12 23:36:57 +02:00
reaperrr
c8661ca2f9 Cache FindResources trait lookups in constructor 2015-07-12 23:36:56 +02:00
Zimmermann Gyula
b1de45bdcd Reverted friendly units' immunity to EMP and the explicit enemy vehicle targeting. 2015-07-12 23:04:15 +02:00
reaperrr
8253573ced Cache lookups in DeliverResources constructor
Only re-check for refinery every 5 seconds instead of every second.
2015-07-12 22:36:24 +02:00
Matthias Mailänder
41b488779a fix crash when disguising the spy as infantry without stand2 2015-07-12 22:20:52 +02:00
Matthias Mailänder
9ec2b8aac0 simulate dawn on the Dune 2000 shellmap 2015-07-12 22:13:40 +02:00
Matthias Mailänder
25d14d87e1 add Effect.ChangeLighting(red, green, blue, ambient) to Lua API 2015-07-12 22:12:38 +02:00
atlimit8
429a9380e8 Ignore trait property requirements for abstract actor types 2015-07-12 12:44:30 -05:00
atlimit8
1bcc07ce69 Add property requirements to safe traits 2015-07-12 12:44:30 -05:00
atlimit8
7881ff40bf Added FieldLoader.SerializeAttribute.Required to require fields in MiniYaml 2015-07-12 12:44:22 -05:00
reaperrr
27c6f5d6d6 Cached Mobile in constructor
...and removed redundant 'var harv'.
2015-07-12 19:19:32 +02:00
Oliver Brakmann
2fe98905a0 Merge pull request #8562 from GraionDilach/music-refactor
Refactors the music player.
2015-07-12 17:45:08 +02:00
Zimmermann Gyula
32c29e7dd6 Removes the MapMusic checkbox. 2015-07-12 17:27:12 +02:00
Zimmermann Gyula
e875f675b8 Updates all base mods with the MusicPlaylist trait. 2015-07-12 17:27:11 +02:00
Zimmermann Gyula
60fafaa5a7 Refactors the music player. 2015-07-12 17:27:02 +02:00
Matthias Mailänder
f5d7df621f Merge pull request #8698 from atlimit8/GainsExperienceDefaultsToMiniYaml
Make GainsExperience upgrades explicit in MiniYaml.
2015-07-11 17:12:15 +02:00
Oliver Brakmann
dd89aa1d48 Fix an NRE during building placement under rare circumstances
Happens when the last conyard vanishes at the same time a building
is picked up for placement.
2015-07-11 11:50:52 +02:00
deniz1a
1a968588b6 Shows real owner of disguised units to allies. 2015-07-10 23:00:04 +03:00
atlimit8
5513030627 Make GainsExperience upgrades explicit. 2015-07-09 23:54:11 -05:00
Oliver Brakmann
bd12a742f1 Merge pull request #8691 from Mailaender/wrange-renamings
Renamed WRange to WDist in the Lua API and documentation
2015-07-09 23:03:45 +02:00
Matthias Mailänder
56e9bcd96e rename RangeSquard to LengthSquared 2015-07-09 21:16:01 +02:00
Matthias Mailänder
cae889fb67 leave a warning for thirdparty scripters 2015-07-09 21:15:57 +02:00
Taryn Hill
c1abc0dfbb Unhardcode sound and delay in PlaceBuilding. 2015-07-09 13:52:42 -05:00
Oliver Brakmann
4792ff336b Merge pull request #8674 from reaperrr/rem-initact
Removed InitialActivity from FreeActor and Buildable
2015-07-09 18:47:13 +02:00
abcdefg30
0835504c53 Merge pull request #8686 from Mailaender/ts-debris
Added debris to Tiberian Sun
2015-07-09 17:09:04 +02:00
abcdefg30
cb7df540c4 Merge pull request #8682 from Mailaender/abomb-activation-crash
Fixed a crash when activating a nuke during sudden powerdown
2015-07-09 13:24:01 +02:00
Matthias Mailänder
95b7da904c add debris to Tiberian Sun 2015-07-09 13:07:49 +02:00
Matthias Mailänder
ec9f0a4634 move ThrowsShrapnel to Mods.Commons 2015-07-09 13:07:49 +02:00
Matthias Mailänder
43ddf14998 rename internal API for consistency 2015-07-09 12:41:52 +02:00
Matthias Mailänder
8d8d7ab8ea rename WRange to WDist in documentation 2015-07-09 12:36:29 +02:00
Matthias Mailänder
ff7fe2bab5 rename WRange to WDist in the Lua API 2015-07-09 12:36:15 +02:00
Matthias Mailänder
31892dd104 fix copy paste error 2015-07-09 12:32:03 +02:00
Pavel Penev
559d6cb84b Merge pull request #8667 from Mailaender/wdist
Renamed WRange to WDist
2015-07-09 13:15:51 +03:00
Matthias Mailänder
ee7ccf10e8 update auto-documentation 2015-07-09 10:56:59 +02:00
Matthias Mailänder
413baf9d8b rename WDist.Range to WDist.Length 2015-07-09 10:55:38 +02:00
Matthias Mailänder
7447e0bf93 rename WRange to WDist 2015-07-09 10:55:38 +02:00
Matthias Mailänder
a91d43d7ce update SDL2-CS 2015-07-09 10:03:39 +02:00
Pavel Penev
54e1cf866c Merge pull request #8681 from Mailaender/gdi-upgrade-center-prereq
Fixed GDI upgrade center being visible in Nod build palette
2015-07-08 12:46:11 +03:00
Matthias Mailänder
d0bbe7da0d don't crash when it becomes disabled after activation 2015-07-08 10:00:40 +02:00
Matthias Mailänder
d9bda311ce fix GDI upgrade center being visible in Nod build palette 2015-07-08 09:54:29 +02:00
reaperrr
a29516656f Upgrade rule for InitialActivity removal 2015-07-08 02:14:45 +02:00
reaperrr
1baae6653c Remove InitialActivity 2015-07-08 02:14:44 +02:00
Matthias Mailänder
efe5ac26b9 Merge pull request #8679 from reaperrr/ai-tweaks1
Added configurable MinimumExcessPower to HackyAI
2015-07-07 23:48:48 +02:00
reaperrr
27ffd4967a AI base builder power tweaks 2015-07-07 22:22:59 +02:00
reaperrr
9594dd7e30 RA AI cleanups 2015-07-07 22:14:30 +02:00
reaperrr
bbf9596530 Merge pull request #8635 from penev92/bleed_warheads
Move Warheads from the engine to Mods.Common
2015-07-07 18:32:45 +02:00
Paul Chote
08c6f02b9e Merge pull request #8656 from Mailaender/credit-active-devs
Updated the list of active developers participating in maintenance and code review
2015-07-07 09:00:16 +01:00
Pavel Penev
69c49c0139 Merge pull request #8669 from RoosterDragon/settings-safe-load
Ensure FieldLoader is left in its original state when loading Settings
2015-07-06 23:24:20 +03:00
Pavel Penev
939ba67642 Merge pull request #8649 from pchote/resource-layer
Render resources using TerrainSpriteLayers
2015-07-06 22:54:29 +03:00
Paul Chote
d2b7d42cca Use TerrainSpriteLayer for rendering resources. 2015-07-06 20:36:29 +01:00
penev92
c3fcd9a8a1 Some cleanups 2015-07-06 22:24:50 +03:00
penev92
41cdc57ea5 Fix traits implementing INotifyKilled 2015-07-06 22:24:41 +03:00
penev92
351cf254e7 Fix DamageModifiers 2015-07-06 22:24:30 +03:00
penev92
fe94b7686e Introduce IWarhead and move Warhead to Mods.Common 2015-07-06 22:24:20 +03:00
Paul Chote
971d1c1388 Fix a NRE in TerrainSpriteLayer. 2015-07-06 19:54:44 +01:00
Paul Chote
7c0d3f4e40 Use a HashSet for ResourceLayer dirty cells. 2015-07-06 19:54:44 +01:00
Paul Chote
f93ad2a9c1 Expose TerrainSpriteLayer.Sheet and BlendMode. 2015-07-06 19:54:43 +01:00
Paul Chote
ae0d9c0e7d Move ResourceLayer init into the constructor.
Stylecop rules force renaming content and render.
2015-07-06 19:54:43 +01:00
RoosterDragon
101eadf345 Ensure FieldLoader is left in its original state when loading Settings. 2015-07-06 19:10:20 +01:00
Pavel Penev
53f00a7930 Merge pull request #8665 from Mailaender/warhead-duplication
Removed unused duplicated code in Warhead.cs
2015-07-06 12:09:36 +03:00
Matthias Mailänder
3f38d063a9 remove code duplication 2015-07-06 11:06:55 +02:00
Matthias Mailänder
5b122eae6c remove unused duplicated code 2015-07-06 10:58:34 +02:00
Matthias Mailänder
4acb096416 Merge pull request #8210 from matija-hustic/ra2_veterancy_icon
Veteran unit production & unlocking through spies.
2015-07-06 09:38:09 +02:00
Matthias Mailänder
d9ac97a967 Merge pull request #8660 from penev92/bleed_fixServer
Fix a bug in Server
2015-07-06 08:53:02 +02:00
penev92
0648b7edaa Fix a bug in Server 2015-07-06 00:59:30 +03:00
Pavel Penev
f221a70e40 Merge pull request #8652 from Mailaender/custom-rule-warning
Added a warning about custom game rules
2015-07-06 00:32:44 +03:00
penev92
6fc9abe599 Upgrade TS maps 2015-07-06 00:17:08 +03:00
Matija Hustić
27e95eaa59 TS Upgrade YAMLs. 2015-07-05 22:15:54 +01:00
penev92
7873a326cd Upgrade RA maps 2015-07-06 00:05:07 +03:00
penev92
8ecc6ffbf6 Upgrade TD maps 2015-07-05 23:55:36 +03:00
penev92
624002be63 Upgrade D2k maps 2015-07-05 23:50:05 +03:00
penev92
bbb162190f Add an upgrade rule 2015-07-05 23:49:26 +03:00
penev92
1d49c23af0 Rename PlayerReference.Race and LockRace to Faction and LockFaction 2015-07-05 23:08:49 +03:00
Matthias Mailänder
1c36f20009 update the active developers list 2015-07-05 21:32:27 +02:00
Oliver Brakmann
c899606a6f Merge pull request #7872 from Mailaender/storm-effects
Unified FlashPaletteEffect and exposed it to Lua
2015-07-05 21:08:04 +02:00
Matthias Mailänder
5378b6225c unhardcode and increase the exit delay 2015-07-05 20:50:31 +02:00
Oliver Brakmann
5fffd9e0dd Merge pull request #8435 from Mailaender/resharper
Added ReShaper dupFinder scans
2015-07-05 20:10:32 +02:00
Matthias Mailänder
b61dcbdf76 Merge pull request #8417 from abcdefg30/newlua_disguise
Added DisguiseAs and DisguiseAsType functions to lua
2015-07-05 20:04:00 +02:00
Pavel Penev
b4c1625f1c Merge pull request #8653 from abcdefg30/botsettings
Fix Team set in PlayerReference being ignored for unplayable players
2015-07-05 20:44:41 +03:00
abcdefg30
85345d83c6 Add teams to fort lonestar 2015-07-05 19:32:56 +02:00
abcdefg30
cc03e64b37 Fix Team set in PlayerReference being ignored for unplayable players 2015-07-05 19:32:48 +02:00
Pavel Penev
da3bf9bf8d Merge pull request #8654 from pchote/max-terrain-height
Move maximum terrain height definition to mod.yaml.
2015-07-05 20:31:47 +03:00
Matthias Mailänder
3b03abc4e3 scan for duplicates 2015-07-05 19:07:42 +02:00
Paul Chote
19c777a922 Move maximum terrain height definition to mod.yaml. 2015-07-05 17:49:56 +01:00
abcdefg30
6afc6a879e Update the ActorInfo summary 2015-07-05 18:43:10 +02:00
abcdefg30
d72fd39d61 Make use of the new DisguiseAsType function in allies05a
and remove the cloak hack
2015-07-05 18:43:09 +02:00
abcdefg30
20ac129433 Add DisguiseAs and DisguiseAsType functions to lua 2015-07-05 18:43:08 +02:00
Matthias Mailänder
e957ae37df Merge pull request #8528 from clemty/upstream/scriptfix
TD mission script fixes
2015-07-05 18:41:10 +02:00
Matthias Mailänder
f6ae27b4b7 add thunderstorm effects to fort lonestar 2015-07-05 18:15:29 +02:00
Matthias Mailänder
ed7b54a21e add a Lua controllable flash palette trait 2015-07-05 18:15:12 +02:00
Matthias Mailänder
a0c3a3adaa sort globals alphabetically 2015-07-05 18:14:05 +02:00
Matthias Mailänder
1eeedf9bb4 radar LightPaletteRotator is actually RA95 exclusive 2015-07-05 18:07:11 +02:00
Matthias Mailänder
2768fc88e7 stop all sounds on map change 2015-07-05 18:07:11 +02:00
Matthias Mailänder
06f92c5b94 add sound file playing to the Lua API 2015-07-05 18:07:11 +02:00
Matthias Mailänder
24444d4af3 fix a crash in AmbientSound 2015-07-05 18:07:11 +02:00
Oliver Brakmann
54c2db3804 Merge pull request #8629 from penev92/bleed_serverLog
Touch up Server.cs
2015-07-05 17:51:21 +02:00
penev92
907265a64c Random refactoring and beautifying of Server.cs 2015-07-05 18:39:13 +03:00
penev92
502db0b462 Add logging on exception to Server.ValidateClient() 2015-07-05 18:39:10 +03:00
Matthias Mailänder
e86ff94a20 don't display game join notifications during missions 2015-07-05 17:17:14 +02:00
Matthias Mailänder
8c92839e0b warn about custom rules 2015-07-05 17:16:43 +02:00
Pavel Penev
3a3d628947 Merge pull request #8625 from RoosterDragon/type-dict-refactor
Refactor TypeDictionary
2015-07-05 17:56:09 +03:00
Pavel Penev
1ed4d55363 Merge pull request #8624 from RoosterDragon/hotkey-perf
Improve hotkey resolution performance
2015-07-05 17:39:54 +03:00
Oliver Brakmann
a753a114a0 Merge pull request #8645 from Mailaender/fieldloader-nre-coverity
Fixed missing null checks in FieldLoader
2015-07-05 16:25:39 +02:00
Pavel Penev
bf7a96d6de Merge pull request #8650 from pchote/editor-overlay
Render the terrain geometry over all visible terrain.
2015-07-05 17:14:38 +03:00
Pavel Penev
e9ccceec8f Merge pull request #8639 from pchote/projected-bounds
A few map / bounds cleanups.
2015-07-05 17:08:58 +03:00
Paul Chote
7d62ac2b12 Merge RulesetCache.LoadDefaultRules and LoadMapRules. 2015-07-05 14:58:00 +01:00
Paul Chote
86bf9086d9 Rename WorldRenderer.Position -> ProjectedPosition. 2015-07-05 14:57:59 +01:00
Paul Chote
e10cb5cd9c Fix an incorrect coordinate check. 2015-07-05 14:57:59 +01:00
Paul Chote
26ce7b5e1c Fix incorrect uses of Map.Bounds. 2015-07-05 14:57:58 +01:00
Paul Chote
b8b27f11af Remove stub map constructor. 2015-07-05 14:57:58 +01:00
Paul Chote
0dbbc00d0a Simplify editor/importer map creation. 2015-07-05 14:57:58 +01:00
Paul Chote
41fa77d12a Fix projected world coordinate calculation for Lua API. 2015-07-05 14:57:58 +01:00
Paul Chote
78838c715a Render the terrain geometry over all visible terrain. 2015-07-05 14:52:38 +01:00
Pavel Penev
f05b71ada2 Merge pull request #8642 from reaperrr/fix-lst
Added separate CloseSequence to WithLandingCraftAnimation
2015-07-05 14:55:51 +03:00
Pavel Penev
5187a958ff Merge pull request #8646 from pchote/radar-cleanup
Remove unused/duplicated minimap code.
2015-07-05 14:48:05 +03:00
Oliver Brakmann
3746c0e295 Merge pull request #8648 from Mailaender/coverity-mail
Changed the Coverity results contact to a mailing list
2015-07-05 13:43:06 +02:00
Matthias Mailänder
c4ba78e73b change the Coverity results address to a mailing list 2015-07-05 13:36:04 +02:00
Oliver Brakmann
ae4759ac4b Merge pull request #8637 from suvjunmd/utility
Updated the utility
2015-07-05 13:33:49 +02:00
Pavel Penev
7918181442 Merge pull request #8641 from suvjunmd/dps
Added exception handling to ExportCharacterSeparatedRules
2015-07-05 14:26:08 +03:00
Pavel Penev
0574843b58 Merge pull request #8643 from reaperrr/crate-select
Removed bogus Selectable from RA crate
2015-07-05 14:25:05 +03:00
Pavel Penev
89d17f0a96 Merge pull request #8644 from Mailaender/upgrade-rule-nesting
Fixed missing braces breaking the upgrade rules
2015-07-05 13:29:34 +03:00
Paul Chote
7a4c461692 Remove unused code from Minimap.cs. 2015-07-05 11:15:14 +01:00
Paul Chote
f1e6f01e44 Use the standard radar shroud updating when switching to observer. 2015-07-05 11:14:59 +01:00
Matthias Mailänder
aab6d6d170 add addititional value null checks 2015-07-05 08:47:05 +02:00
Matthias Mailänder
5549bab073 fix nesting level does not match indentation 2015-07-05 08:30:15 +02:00
Dmitri Suvorov
d625cbe1de Updated commands layout 2015-07-05 02:38:09 +03:00
Dmitri Suvorov
2bc6bd74be Display commands in alphabetical order 2015-07-05 02:37:55 +03:00
Dmitri Suvorov
0457e58fe9 Added exception handling to ExportCharacterSeparatedRules 2015-07-05 02:32:24 +03:00
reaperrr
b8014b7d4d Increased CustomSelectionSize of crates to make them easier to target 2015-07-05 00:48:54 +02:00
reaperrr
9af2dcfaba Removed Selectable from RA ^Crate default 2015-07-05 00:47:50 +02:00
reaperrr
26a202600d Make WithAttackAnimation work with WithSpriteBody as well 2015-07-05 00:17:01 +02:00
reaperrr
8ae541339b Make WithMoveAnimation work with WithSpriteBody as well 2015-07-05 00:09:46 +02:00
reaperrr
632d8cd898 Allow setting separate close sequence for landing crafts 2015-07-05 00:09:15 +02:00
Matija Hustić
fe2c0b3b08 RA Upgrade YAMLs. 2015-07-04 22:25:13 +01:00
unknown
206ed8ebb8 Veteran unit production & unlocking through spies. 2015-07-04 22:25:12 +01:00
abcdefg30
a77e0782cf Merge pull request #8640 from Mailaender/unarmed-delphi
Fixed Warning: Sprite image delphi from actor DELPHI does not define sequence shoot
2015-07-04 23:23:14 +02:00
Matthias Mailänder
87a847b4e9 DELPHI is actually unarmed 2015-07-04 22:47:01 +02:00
Pavel Penev
8ee26738a9 Merge pull request #8553 from reaperrr/rem-renderunit
Removed RenderHarvester, RenderLandingCraft and RenderUnit
2015-07-04 23:23:06 +03:00
reaperrr
2be06e610a Removed RenderUnit
Used this opportunity to unhardcode several sandworm-related sequences.
2015-07-04 22:08:07 +02:00
reaperrr
76aaafe37c Added WithHarvestAnimation + WithDockingAnimation
Removed RenderHarvester.
2015-07-04 22:08:06 +02:00
reaperrr
de72db83db Added WithLandingCraftAnimation and removed RenderLandingCraft 2015-07-04 22:08:05 +02:00
reaperrr
1abe7ab2dc Renamed WithHarvestAnimation to WithHarvestOverlay 2015-07-04 22:08:04 +02:00
reaperrr
cd6c96db82 Fixed WithAttackAnimation namespace 2015-07-04 22:08:03 +02:00
Pavel Penev
a871a28ece Merge pull request #8527 from pchote/split-vis-origins
Introduce new options for shroud visibility and revealing.
2015-07-04 23:00:42 +03:00
Matthias Mailänder
3cb4ac49e9 Merge pull request #8634 from obrakmann/fix-allies01-lua-crash
Fix issues with civilian infantry in RA
2015-07-04 21:48:56 +02:00
clemty
26c271f80d TD: various map and script fixes 2015-07-04 19:05:46 +02:00
Paul Chote
e87e8ae632 Add a lint rule for VisibilityType. 2015-07-04 17:07:08 +01:00
Paul Chote
6bc4fae084 Upgrade RA rules. 2015-07-04 17:07:07 +01:00
Paul Chote
250481657e Upgrade TD rules. 2015-07-04 17:07:07 +01:00
Paul Chote
abdd6ca1d7 Upgrade D2K rules. 2015-07-04 17:07:06 +01:00
Paul Chote
0ac64da55a Upgrade TS rules. 2015-07-04 17:07:06 +01:00
Paul Chote
0bbfeb5653 Add upgrade rules. 2015-07-04 17:07:06 +01:00
Paul Chote
8206c3c453 Enable VisibilityType for shroud revealing.
VisibilityType.Footprint reveals from each footprint cell.

VisibilityType.CenterPosition reveals from the
actor’s CenterPosition only (as the original
games did).
2015-07-04 17:07:05 +01:00
Dmitri Suvorov
6e4ab810d8 Fixed multiple enumeration of IEnumerable 2015-07-04 18:22:28 +03:00
Oliver Brakmann
3b79f7b64b Fix Lua script crash in Allies01 2015-07-04 17:21:41 +02:00
Dmitri Suvorov
ad97fe850f Removed redundant using 2015-07-04 18:18:11 +03:00
Dmitri Suvorov
88ffa3836e Removed unused method GetNamedArg 2015-07-04 18:16:31 +03:00
Paul Chote
7053e59acb Expose a parameter for reveal behaviour.
VisibilityType.CenterPosition reveals the actor
only if its CenterPosition is inside a cell that
is visible.

VisibilityType.Footprint reveals the actor if any
of its footprint cells are visible (this includes
Mobile actors moving between two cells).
2015-07-04 16:14:47 +01:00
Oliver Brakmann
27f492b793 Merge pull request #8631 from Mailaender/parseyesno-nre
Fixed a null reference exception in FieldLoader.ParseYesNo
2015-07-04 15:36:47 +02:00
Oliver Brakmann
51f05f2f2e Fix wrong attack sequence being used for civilian infantry 2015-07-04 15:29:39 +02:00
Matthias Mailänder
10d76da61b fix a null reference exception 2015-07-04 09:43:31 +02:00
Paul Chote
af6f1ef675 Merge pull request #8628 from GraionDilach/fix-ps1
Fix make.ps1.
2015-07-03 23:13:05 +01:00
Zimmermann Gyula
c111836ae3 Fix make.ps1. 2015-07-04 00:09:37 +02:00
RoosterDragon
54e7c0bf44 Refactor TypeDictionary.
- When removing entries, ensure the dictionary entry is removed is the list is emptied, to prevent incorrect lookups later.
- Prevent NRE when calling GetOrDefault<T> where T is a value type and the default is returned.
- Use a single dictionary for simplicity and improved lookup performance (since there is only one dictionary to check).
- De-duplicate code in Get and GetOrDefault.
2015-07-03 20:54:34 +01:00
RoosterDragon
3f39744a9a Create delegates to access hotkeys, to avoid reflection during gameplay. 2015-07-03 20:28:47 +01:00
Paul Chote
5056e7bfc3 Merge pull request #8460 from Mailaender/make-debug
Enabled and documented DEBUG option on Unix startup scripts
2015-07-03 19:10:24 +01:00
Pavel Penev
00b2f0a4b5 Merge pull request #8581 from GraionDilach/emp-sparkles
Enable the EMP overlay animation in TS.
2015-07-03 20:14:40 +03:00
Paul Chote
d3c193e199 Merge pull request #8610 from Mailaender/hotkey-tryparse-nre
Fixed a possible NRE in Hotkey.TryParse
2015-07-03 17:10:55 +01:00
Zimmermann Gyula
4933a88c64 Enable the EMP overlay animation in TS. 2015-07-03 18:05:23 +02:00
Pavel Penev
fc5e5022d5 Merge pull request #8614 from abcdefg30/newlua_capture
Added a Capture function to lua
2015-07-03 02:50:15 +03:00
Pavel Penev
52c1d8b242 Merge pull request #8618 from RoosterDragon/color-widget-red-fix
Generate the selection bitmap when opening the ColorMixerWidget
2015-07-03 02:44:00 +03:00
Pavel Penev
cf137fafec Merge pull request #8615 from abcdefg30/soviet05fix
Fix a crash in soviet05
2015-07-03 02:07:54 +03:00
Pavel Penev
082b1ab1c9 Merge pull request #8558 from GraionDilach/grantupgrade-warhead-checkvalidity
Add target validation to GrantUpgrade warheads.
2015-07-02 23:34:28 +03:00
Matthias Mailänder
a73edfd4a5 Merge pull request #8598 from abcdefg30/minigame
Adjust the minigames' lobby settings
2015-07-02 21:58:43 +02:00
abcdefg30
57cea5aba1 Added a Capture function to lua 2015-07-02 21:48:30 +02:00
Pavel Penev
fd5023abe3 Merge pull request #8621 from Mailaender/rm-mobileinfo-lookup
Fixed an unneccessary and frequent trait lookup
2015-07-02 22:46:19 +03:00
abcdefg30
5c721d4169 Fix the-hot-box lobby settings 2015-07-02 21:30:09 +02:00
abcdefg30
2cf9db271e Fix the lobby settings of all ra minigames 2015-07-02 21:30:08 +02:00
abcdefg30
7a6b823233 Fix the lobby settings of the dropzone maps 2015-07-02 21:06:06 +02:00
Matthias Mailänder
e86b8d0dde avoid an unneccessary and frequent trait lookup 2015-07-02 20:22:36 +02:00
Pavel Penev
13a909eb59 Merge pull request #8616 from Mailaender/counter-intel
Added counter intelligence to spies
2015-07-02 21:14:31 +03:00
Pavel Penev
08a890491b Merge pull request #8609 from Mailaender/bad-lock-2
Fixed another bad choice of lock objects in ColorMixerWidget
2015-07-02 21:12:46 +03:00
RoosterDragon
4c2b7469f9 Generate the selection bitmap when opening the ColorMixerWidget.
Fixes a bug where opening the widget with a red color (i.e. hue = 0) would not generate this bitmap when opening the widget as that would not cause the selection bitmap to be refreshed.
2015-07-02 17:32:08 +01:00
Matthias Mailänder
499667eab5 remove unnecessary lock object 2015-07-02 06:33:14 +02:00
Matthias Mailänder
c1b7a4d4ae add counter intelligence to spies 2015-07-01 22:59:57 +02:00
Matthias Mailänder
79d00b2b7c Merge pull request #8359 from abcdefg30/difficulty
Added two new difficulties to allies-05a
2015-07-01 22:03:31 +02:00
abcdefg30
a486ba9371 Fix a crash in soviet05 2015-07-01 19:10:26 +02:00
abcdefg30
ae955a2340 Added two new difficulties to allies-05a 2015-07-01 19:00:45 +02:00
abcdefg30
39a297d575 Add MustBeDestroyed: to FCOM 2015-07-01 18:59:45 +02:00
Matthias Mailänder
44bf3aed2e Merge pull request #8416 from abcdefg30/newlua_capture_infiltrate
Added an Infiltrate function to lua
2015-07-01 18:53:39 +02:00
abcdefg30
6a92212864 Make use of the new Infiltrate function in allies05a 2015-07-01 18:21:01 +02:00
abcdefg30
ea151542de Added an Infiltrate function to lua 2015-07-01 18:21:01 +02:00
Pavel Penev
faaa484956 Merge pull request #8611 from Mailaender/pngloader-nre-2
Fixed another null reference exception in PngLoader
2015-07-01 14:49:06 +03:00
reaperrr
2a998e4414 Merge pull request #8612 from Mailaender/muzzle-nre
Fixed possible NREs in WithMuzzleFlash
2015-06-30 23:07:24 +02:00
Matthias Mailänder
f431c14ab7 fix possible NREs 2015-06-30 22:36:52 +02:00
Matthias Mailänder
605f95294c fix a null reference exception 2015-06-30 22:31:11 +02:00
Matthias Mailänder
d6efab185d fix a null reference exception 2015-06-30 22:26:53 +02:00
Oliver Brakmann
0492d57439 Merge pull request #8607 from penev92/bleed_disposeWorld
Dispose of the old world before creating a new one
2015-06-30 19:25:59 +02:00
penev92
d2058fbcbc Dispose of the old world before creating a new one 2015-06-30 14:49:47 +03:00
Pavel Penev
ff2a5ef68b Merge pull request #8514 from reaperrr/clean-td-rules
Cleaned C&C yaml rules
2015-06-30 13:06:15 +03:00
Pavel Penev
923a6a6074 Merge pull request #8605 from chrisforbes/drop-inotify
Remove unused INotify interface
2015-06-30 12:27:22 +03:00
Chris Forbes
76b4d702e3 Remove unused INotify interface
Signed-off-by: Chris Forbes <chrisf@ijw.co.nz>
2015-06-30 15:11:50 +12:00
Pavel Penev
9ed9d746a1 Merge pull request #8516 from reaperrr/clean-d2k-rules
Cleaned up D2k yaml rules
2015-06-30 01:32:16 +03:00
Pavel Penev
b5799b9883 Merge pull request #8515 from reaperrr/clean-ra-rules
Cleaned RA yaml rules
2015-06-30 00:37:21 +03:00
Matthias Mailänder
6582a0e096 Merge pull request #8589 from obrakmann/fix8543_range-circles-in-replays
Make range circles visible to observers
2015-06-29 23:10:28 +02:00
Matthias Mailänder
fc34aa7e4f Merge pull request #8602 from suvjunmd/authors
Updated AUTHORS to include myself
2015-06-29 23:07:12 +02:00
Dmitri Suvorov
c0de0314ad Updated AUTHORS to include myself 2015-06-29 23:25:11 +03:00
reaperrr
450749f388 Fix Fort Lonestar and Monster Tank Madness 2015-06-29 22:18:54 +02:00
reaperrr
f9fc60a3be Cleaned RA yaml rules.
Sanitized defaults.
2015-06-29 22:15:15 +02:00
Oliver Brakmann
f9d584f891 Merge pull request #8585 from suvjunmd/install
Modified the text inside "Install Required" dialogs to be consistent across all mods
2015-06-29 20:57:01 +02:00
Oliver Brakmann
f8eb2fadf7 Merge pull request #8582 from Mailaender/hide-ui-hotkey
Added a hide UI hotkey
2015-06-29 20:16:40 +02:00
reaperrr
f0905c5fe2 Temporary fix for TD shellmap
Can be removed once "Requires<WithSpriteBody>" has been added to WithTurret (not possible until RenderBuilding has been replaced with With*Body, due to d2k & TS defense turrets).
2015-06-29 20:02:11 +02:00
reaperrr
1814c4c4cc Cleaned up TD yaml rules.
Streamlined defaults, removed duplications.
2015-06-29 20:02:10 +02:00
abcdefg30
699822cd51 Merge pull request #8590 from obrakmann/objectives-polish
Objectives polish
2015-06-29 18:52:34 +02:00
Oliver Brakmann
562d08dbd5 Merge pull request #8313 from Mailaender/appveyor-coverity
Automatized Coverity Scan with AppVeyor
2015-06-29 18:50:11 +02:00
Dmitri Suvorov
8ce5d208c2 Modified the text inside "Install Required" dialogs to be consistent across all mods 2015-06-29 19:23:49 +03:00
Oliver Brakmann
82221f780f Make range circles visible to observers 2015-06-29 18:11:52 +02:00
Oliver Brakmann
fc8a34a7a2 Match all kinds of spectators in Player::IsAlliedWith() 2015-06-29 18:11:52 +02:00
abcdefg30
ec892a7c16 Merge pull request #8594 from GraionDilach/fix-modchooser
Make modchooser's loadscreen consistent
2015-06-29 18:11:16 +02:00
Pavel Penev
6ed7e46162 Merge pull request #8398 from Mailaender/ping-order-nre
Fixed NREs in LobbyCommands PingFromClient
2015-06-29 01:55:54 +03:00
reaperrr
b193d5195d Cleaned up d2k yaml rules.
Sanitized defaults.
2015-06-29 00:45:38 +02:00
Zimmermann Gyula
6e8f3c6755 Fix modchooser. 2015-06-28 22:20:57 +02:00
Matthias Mailänder
f65df39e36 Merge pull request #8586 from atlimit8/UpgradeManagerAfterIUpgradables
UpgradeManager after IUpgradables
2015-06-28 20:41:28 +02:00
Matthias Mailänder
7616fd1a07 Merge pull request #8574 from reaperrr/fix-ts-civ-offsets
Fixed TS civilian structures and map decorations
2015-06-28 20:16:13 +02:00
Pavel Penev
10da8027b2 Merge pull request #8084 from obrakmann/lose_targets
Actors will lose targets and AI won't follow indefinitely
2015-06-28 20:26:51 +03:00
pevers
6ed0273656 Actors will lose targets and AI won't follow indefinitely 2015-06-28 19:11:53 +02:00
Oliver Brakmann
4e010bd6e6 Change *VictoryConditions to use customizable objective descriptions 2015-06-28 19:08:37 +02:00
Oliver Brakmann
34f382ec57 Prevent unnecessary blinking of the options button in non-mission type games
The options button starts blinking when a new objective is added, which happens in all game modes, even skirmish and koth.  This change prevents the button from blinking in the latter two cases.

This prevents 1) confusion on part of the players, and 2) an unnecessary announcement of the objective since in skirmish and koth it is always the same.
2015-06-28 17:58:32 +02:00
atlimit8
a9908bffb4 UpgradeManager after IUpgradables 2015-06-28 10:24:00 -05:00
Pavel Penev
f27d010535 Merge pull request #8554 from Mailaender/package-entry-dispose
Dispose of a MemoryStream in PackageEntry Take 2
2015-06-28 17:55:13 +03:00
Matthias Mailänder
5c0c300c53 add a hotkey to hide the UI widgets 2015-06-28 16:29:25 +02:00
Pavel Penev
84808d25e9 Merge pull request #8583 from reaperrr/fix-attackmove-req
Fixed potential AttackMove crash
2015-06-28 17:16:19 +03:00
reaperrr
5db7492452 Fixes potential AttackMove crash 2015-06-28 16:06:39 +02:00
Matthias Mailänder
9d6a5d626f fix developer hotkey display being cut off 2015-06-28 15:48:11 +02:00
Pavel Penev
8b4d5c7fb2 Merge pull request #7930 from Mailaender/screenshot
Added a hotkey to take screenshots
2015-06-28 15:37:07 +03:00
Matthias Mailänder
8a07c0b969 build, store and publish to Coverity scans 2015-06-28 14:28:51 +02:00
Matthias Mailänder
13fa477638 Merge pull request #8580 from GraionDilach/contributor-update
Add myself to the contributor list.
2015-06-28 13:42:17 +02:00
Matthias Mailänder
3fd49b87d3 Merge pull request #8556 from suvjunmd/tooltips
Modified actor tooltips to include friendly name and internal name
2015-06-28 13:35:37 +02:00
Zimmermann Gyula
317a3b2a4f Add myself to the contributor list. 2015-06-28 13:23:24 +02:00
Dmitri Suvorov
1fb03ad656 Modified actor tooltips to include friendly name and internal name 2015-06-28 14:16:37 +03:00
Matthias Mailänder
e4b3515663 Merge pull request #8478 from GraionDilach/disguise-pip
Closes #7466
2015-06-28 13:09:36 +02:00
Zimmermann Gyula
32eed88de5 Implements an AcknowledgesUpgrade method in UpgradeManager to allow checking for truly applicable upgrades - AcceptsUpgrade returns false if the upgrade has reached max level. 2015-06-28 12:58:50 +02:00
Zimmermann Gyula
8a94caab3c Implements a disguise decoration to Spies. Deprecates WithDecorationDisguised in favor of a refactor in Disguise. 2015-06-28 12:58:41 +02:00
Matthias Mailänder
ae59198363 Merge pull request #8418 from abcdefg30/newlua_other_cool_stuff
Added even more lua functions
2015-06-28 12:37:06 +02:00
Matthias Mailänder
a24deed426 Merge pull request #8576 from abcdefg30/newlua_demolish
Add a Demolish function to lua
2015-06-28 12:24:14 +02:00
abcdefg30
f3f889814b Make use of the new demolish function in allies05a 2015-06-28 12:17:33 +02:00
abcdefg30
4b39064661 Add a Demolish function to lua 2015-06-28 01:25:55 +02:00
abcdefg30
db0b20f5f8 Use the new Beacon function in survival 01 and 02 2015-06-28 01:25:38 +02:00
abcdefg30
a4fd34558d Add a lua function for beacons 2015-06-28 01:25:37 +02:00
abcdefg30
31986469a9 Use the new EnterTransport function in soviet05 2015-06-28 01:25:37 +02:00
abcdefg30
e1c674aeca Add EnterTransport function to lua 2015-06-28 01:25:36 +02:00
reaperrr
b10ab733cd Fixed tree and rock offsets 2015-06-27 22:44:30 +02:00
reaperrr
c2aa0983a8 Fixes offsets for all civilian structures
Adds critical damage stage to snow-exclusive aban** buildings (the art isn't really suited for damaged/50% damage stage)
2015-06-27 22:44:29 +02:00
reaperrr
01a241d394 Fixed bogus temperate exclusivity from ca00** civ buildings and crash sites
- ...and fixed their snow palette via TilesetCode.
- Fixed palette via TilesetCode for several other structures as well.
- Removed redundant junk from civilian structure sequences.
2015-06-27 22:44:28 +02:00
Matthias Mailänder
be99ba7d61 Merge pull request #8285 from abcdefg30/soviet02a
Added Soviet02a
2015-06-27 21:53:26 +02:00
Matthias Mailänder
3e8894964f Merge pull request #8513 from reaperrr/clean-ts-rules
Cleaned TS yaml rules
2015-06-27 21:42:26 +02:00
Matthias Mailänder
41215fe021 document the new DEBUG option 2015-06-27 18:43:53 +02:00
Matthias Mailänder
2b834b54fb enable debug start scripts 2015-06-27 18:43:53 +02:00
abcdefg30
c6c12ee4ac Merge pull request #8561 from clemty/upstream/nod05
nod05: change objective
2015-06-27 18:08:52 +02:00
abcdefg30
79191ae280 Added soviet02a
Thanks to the basic work from @Computerfreaked
2015-06-27 17:55:39 +02:00
abcdefg30
6527d7751b Expose a Attack method to lua 2015-06-27 17:55:38 +02:00
Matthias Mailänder
87c2e68973 Merge pull request #8321 from penev92/bleed_lintUpgrades
Add a lint check for actor upgrades
2015-06-27 16:41:04 +02:00
Matthias Mailänder
2763e26d23 add a take screenshot hotkey 2015-06-27 16:29:33 +02:00
reaperrr
3734e67b80 Merge pull request #8568 from Mailaender/dipsose-world-music
Fixed music and video leaking after world disposal
2015-06-27 14:21:39 +02:00
reaperrr
97d760cd8c Several fixes
Fixed TS building repairability to match original.
Civilian structures can now only be repaired with engineers.

Removed ProximityCaptor.

Various other fixes.
2015-06-27 13:20:45 +02:00
Matthias Mailänder
e58ce7d59b stop music and video when disposing the world 2015-06-27 11:00:06 +02:00
clemty
f2d5d6cb86 nod05: change objective
- only buildings need to be destroyed for primary objective (#8531)
- GDI airstrikes also stop when GDI tech center is captured
2015-06-25 23:50:11 +02:00
Zimmermann Gyula
d222cd1c7a Removes unneeded dummy warhead from TS EMP. 2015-06-25 16:06:43 +02:00
Zimmermann Gyula
0e3ba0c72e Add target validation to GrantUpgrade warheads. 2015-06-25 16:06:35 +02:00
Pavel Penev
2c8437f80d Merge pull request #8483 from matija-hustic/selectall_fixed
Fixes regression with selection classes
2015-06-25 16:51:13 +03:00
Pavel Penev
f161a620e6 Merge pull request #7851 from Mailaender/dedicated-console-log
Added status messages to console output for dedicated servers
2015-06-25 01:45:49 +03:00
Pavel Penev
55128b8f78 Merge pull request #8508 from reaperrr/damaged-sprites
Added support for damage stages to WithSpriteBody and WithTurret
2015-06-25 00:35:05 +03:00
Matthias Mailänder
e4f3a17477 Merge pull request #8550 from obrakmann/fix7327_nuke-affects-parent
Make all of mininuke's SpreadDamage warheads affect the parent
2015-06-24 07:31:05 +02:00
Matthias Mailänder
e93faeaa04 dispose the memory stream and avoid the binary reader 2015-06-24 07:15:59 +02:00
Chris Forbes
3bbb5e1f7e Merge pull request #8548 from OpenRA/revert-8501-bleed_streams
Revert "Dispose of a MemoryStream in PackageEntry"
2015-06-24 11:14:30 +12:00
Oliver Brakmann
3f7ab07c2d Make all of mininuke's SpreadDamage warheads affect the parent 2015-06-23 18:54:10 +02:00
Oliver Brakmann
a572044497 Revert "Dispose of a MemoryStream in PackageEntry" 2015-06-23 17:37:35 +02:00
reaperrr
1389a4e414 Fixed Carryall and Mammoth Mk.II selection boxes.
Removed now-redundant custom selection boxes from Wolverine and Titan.
2015-06-22 23:23:28 +02:00
Oliver Brakmann
8dc0e79dc2 Merge pull request #8501 from penev92/bleed_streams
Dispose of a MemoryStream in PackageEntry
2015-06-22 22:11:28 +02:00
penev92
04cc54c392 Get rid of an undisposed MemoryStream in PackageEntry
And a BinaryReader
2015-06-22 20:06:36 +03:00
abcdefg30
70754b72f5 Merge pull request #8529 from pchote/fix-mission-quit-desync
Use INotifyActorDisposing to dispose LuaScript as part of the world disposal.
2015-06-21 21:35:02 +02:00
abcdefg30
7e374b53e3 Merge pull request #8536 from obrakmann/fix8526
Do not fire script triggers while the world is being destroyed
2015-06-21 21:32:06 +02:00
Matija Hustić
34d0518b29 Fixed regression from last PR. 2015-06-21 20:15:06 +01:00
reaperrr
4ef293b5e3 Fixed veinhole sequence offset 2015-06-21 20:48:00 +02:00
Paul Chote
f8205d3d22 Clean up after LuaScript when tearing down the world. 2015-06-21 18:48:54 +01:00
Oliver Brakmann
fbd5938f3f Do not fire script triggers while the world is being destroyed 2015-06-21 19:37:25 +02:00
Pavel Penev
e269a74b3e Merge pull request #8479 from pchote/merge-shroud-traits
Move more shroud logic to RevealsShroud / GeneratesShroud
2015-06-21 19:16:42 +03:00
Paul Chote
7d8ee64ce5 Reorganize shroud cell queries.
This is in preparation for a future PR that will
remove GetVisOrigins.
2015-06-21 17:01:45 +01:00
Paul Chote
01dc7edbe9 Remove duplication between CreatesShroud and RevealsShroud. 2015-06-21 17:01:44 +01:00
Paul Chote
2c3198dc27 Move shroud traits to Mods.Common. 2015-06-21 16:58:07 +01:00
Paul Chote
10716f8979 Move shrouded/revealed tile calculation outside Shroud. 2015-06-21 16:58:07 +01:00
Paul Chote
b5550102db Move world state tracking to Creates/RevealsShroud. 2015-06-21 16:58:06 +01:00
reaperrr
8da5f5b7ab Cleaned TS yaml rules.
Streamlined actor defaults, removed a lot of duplication.
2015-06-21 17:07:29 +02:00
abcdefg30
1cbde65a08 Merge pull request #8509 from clemty/strings
More script string fixes
2015-06-21 16:22:32 +02:00
reaperrr
affbb07983 Merge pull request #8506 from pchote/fix-ts-maps
Fix TS maps.
2015-06-21 16:14:43 +02:00
Oliver Brakmann
01cda29eef Merge pull request #8524 from pchote/remove-enemy-notifications
Remove "Enemy Unit Detected" announcements
2015-06-21 15:17:52 +02:00
Oliver Brakmann
bc5a38525d Merge pull request #8518 from pchote/renderbounds
Fix screen bounds calculations
2015-06-21 15:01:16 +02:00
Oliver Brakmann
e15d4e7407 Merge pull request #8519 from pchote/editor-save-fix
Save maps with the correct MapClassification.
2015-06-21 14:51:42 +02:00
Paul Chote
53e9692dbe Fix scissoring in the editor. 2015-06-21 13:47:20 +01:00
Paul Chote
198a51e5e0 Fix VisibleCellsInsideBounds. 2015-06-21 13:41:39 +01:00
Paul Chote
40d018aaf3 Rewrite and document the visible cells calculation. 2015-06-21 13:41:38 +01:00
Paul Chote
a401333316 Fix Monster Tank Madness. 2015-06-21 13:40:25 +01:00
Paul Chote
ea31b5f393 Only invalidate metadata when overwriting map. 2015-06-21 13:07:45 +01:00
Paul Chote
096ce36d7b Remove "Enemy Unit Detected" announcements from D2K. 2015-06-21 12:54:00 +01:00
Paul Chote
fede1a1e4b Remove "Enemy Unit Detected" announcements from RA. 2015-06-21 12:53:25 +01:00
Matthias Mailänder
e696e9c53a Merge pull request #8424 from moviuro/freebsd-rcd-script
openra: introduce a FreeBSD rc.d script
2015-06-21 13:00:49 +02:00
Matthias Mailänder
aa91a8e7de Merge pull request #8497 from reaperrr/inf-fix
Fixed infantry prone sequences
2015-06-21 12:50:13 +02:00
Paul Chote
544609dc2c Remove legacy test map. 2015-06-21 11:04:08 +01:00
Paul Chote
e1084d28fc Import "Hot Springs". 2015-06-21 11:04:08 +01:00
Paul Chote
aa27be2aa3 Import "River Raid". 2015-06-21 11:04:08 +01:00
Paul Chote
edf5f49709 Reimport "Tread Lightly".
Adds tiberium and rocks.
2015-06-21 11:04:07 +01:00
Paul Chote
0005c04813 Reimport "A River Runs Near It".
Adds proper tiberium, vines, and rocks.
2015-06-21 11:04:07 +01:00
Paul Chote
a8aaf04f14 Implement placeholder Veins. 2015-06-21 11:04:03 +01:00
Paul Chote
9e18d3cceb Work around an unsynced code check. 2015-06-21 10:34:37 +01:00
reaperrr
77803b2ecd Remove now redundant work-around from D2k infantry rules 2015-06-21 11:06:14 +02:00
reaperrr
5acc103242 Fixes infantry sequence modifier for good 2015-06-21 11:03:52 +02:00
reaperrr
6455d30310 Fix TD prone stand sequences 2015-06-21 11:03:51 +02:00
reaperrr
fcbecb611e Fixed RA prone stand sequences 2015-06-21 11:03:50 +02:00
reaperrr
11ce57523c Fixes d2k rifle infantry prone sequence 2015-06-21 11:03:49 +02:00
Paul Chote
a6d38c9260 Fix temperate tileset naming. 2015-06-21 09:31:22 +01:00
penev92
696680bad5 Add lint check for actor upgrades 2015-06-21 11:12:15 +03:00
Matthias Mailänder
7bb95a1658 Add LintExt and move GetFieldValues() 2015-06-21 11:06:53 +03:00
penev92
2647811a13 Add UpgradeUsedReferenceAttribute 2015-06-21 11:06:50 +03:00
penev92
fbbd9a7eaa Add UpgradeGrantedReferenceAttribute 2015-06-21 11:06:35 +03:00
penev92
2ab7abcee4 Add ScriptUpgradesCache class to enable maps to explicitly declare what upgrades their Lua scripts will use 2015-06-21 11:00:18 +03:00
penev92
f1ec71b17d Document GlobalUpgradable 2015-06-21 11:00:17 +03:00
penev92
74abf58f3e Remove redundant crate definition from D2k (no actor accepts a cloak upgrade) 2015-06-21 11:00:15 +03:00
Oliver Brakmann
2d920c43fb Merge pull request #8511 from Mailaender/rm-openra-editor
Dropped the legacy WinForms map editor
2015-06-20 23:35:23 +02:00
Paul Chote
6aeebe697f Default new maps to oramap. 2015-06-20 22:32:18 +01:00
Paul Chote
b2050ae1aa Use the map save dialog to set new map properties. 2015-06-20 22:32:14 +01:00
clemty
6b6cf8bb48 More script string fixes
This fixes spelling, punctuation and grammar in TD and RA missions.
2015-06-20 23:22:59 +02:00
Oliver Brakmann
b50ea207f1 Merge pull request #7709 from Mailaender/lint-sequences
Added checks for missing sequence entries
2015-06-20 23:19:55 +02:00
Paul Chote
cd1fdb9b36 Update the MapCache with the correct UID. 2015-06-20 21:38:28 +01:00
Matthias Mailänder
7faebe874a check for missing sequence entries using lint 2015-06-20 22:22:59 +02:00
Matthias Mailänder
7424f32b2f document Country trait 2015-06-20 22:22:59 +02:00
Oliver Brakmann
fc7df415d7 Merge pull request #8394 from Mailaender/map-container-nre
Fixed a null reference exception in Map.Save
2015-06-20 21:06:00 +02:00
Paul Chote
17d759c9be Save maps with the correct MapClassification. 2015-06-20 19:00:59 +01:00
Matthias Mailänder
45dc314b23 print server status messages to the console 2015-06-20 16:47:32 +02:00
Matthias Mailänder
6b20b3266d fix indentions 2015-06-20 16:44:02 +02:00
abcdefg30
5a74495432 Merge pull request #8484 from HenrytheSlav/soviet05
Added soviet05
2015-06-20 16:33:30 +02:00
HenrytheSlav
197015f056 Added soviet05 2015-06-20 16:27:00 +02:00
Matthias Mailänder
330982310c avoid a null reference exception 2015-06-20 15:56:26 +02:00
Matthias Mailänder
e228601a5c fix NullReferenceExceptions during client pings 2015-06-20 15:54:23 +02:00
Oliver Brakmann
ea051644a3 Merge pull request #8412 from Mailaender/lint-voices
Added a lint rule to detect missing voice definitions
2015-06-20 15:46:10 +02:00
Matthias Mailänder
ac970cdb44 remove the WinForms map editor 2015-06-20 13:45:44 +02:00
Matthias Mailänder
4681e22bdc miniyaml junk removal and add missing new lines 2015-06-20 12:13:22 +02:00
Matthias Mailänder
430126c711 fix missing braces 2015-06-20 12:12:05 +02:00
Matthias Mailänder
0f8d22c9a6 rename for consistency 2015-06-20 12:11:45 +02:00
Matthias Mailänder
50e5e9df24 check voice actor references 2015-06-20 12:09:58 +02:00
Matthias Mailänder
264a63e58c move GetFieldValues to shared LintExts 2015-06-20 10:47:28 +02:00
Pavel Penev
dcae3c9dca Merge pull request #8357 from Mailaender/fix-colorpicker-nre
Fixed a crash in color picker logic when using the in-game editor
2015-06-20 10:43:40 +03:00
Matthias Mailänder
26a8ffb91d set the world owner for color picker logic 2015-06-20 08:19:06 +02:00
Oliver Brakmann
24f1599122 Merge pull request #8477 from pchote/actor-visibility
Move actor visibility checks out of Shroud
2015-06-19 23:38:23 +02:00
Paul Chote
0677c309f3 Move Shroud.IsTargetable to Player. 2015-06-19 22:02:08 +01:00
Paul Chote
1eb1841f2b Hide TD C17 (which has no sight) under fog. 2015-06-19 22:02:08 +01:00
Paul Chote
9715139b8f Hide D2K aircraft (which have no sight) under fog. 2015-06-19 22:02:08 +01:00
Paul Chote
6762e033e2 Add lint rule. 2015-06-19 22:02:07 +01:00
Paul Chote
34f5482d26 Update RA rules. 2015-06-19 22:02:07 +01:00
Paul Chote
0fdc0f9bc2 Update TD rules. 2015-06-19 22:02:07 +01:00
Paul Chote
6dae4da8f1 Update D2K rules. 2015-06-19 22:02:06 +01:00
Paul Chote
983951c290 Update TS rules. 2015-06-19 22:02:06 +01:00
Paul Chote
b887d2bfd7 Introduce IDefaultVisibility. 2015-06-19 22:02:06 +01:00
Paul Chote
0a2757d0e0 Remove Shroud.IsExplored(Actor) and IsVisible(Actor). 2015-06-19 22:01:48 +01:00
reaperrr
248e6b0e18 Adds support for damage-stage-based sequences to WithSpriteBody and WithTurret 2015-06-19 21:16:39 +02:00
Pavel Penev
e7a64ffec4 Merge pull request #8388 from reaperrr/selectable-refactor1
Selectable bounds/selection box refactor
2015-06-19 13:43:30 +03:00
reaperrr
3e57145cfa Updated upgrade rules
Now all they do is remove the Selectable trait when the Selectable boolean is false, and just remove the boolean if it's true.
2015-06-19 12:27:30 +02:00
reaperrr
61ea21005a Update CustomSelectionSize description 2015-06-19 12:27:28 +02:00
reaperrr
3bcf0aab00 Move SelectionDecorations to Traits\Render 2015-06-19 12:27:27 +02:00
reaperrr
f5771571c1 Fix Selectable style nits and description
Silence Travis
2015-06-19 12:26:19 +02:00
reaperrr
f2d8e32b01 Selection box size now defaults to Selectable.Bounds if VisualBounds are null 2015-06-19 12:26:16 +02:00
Matthias Mailänder
87325d96a9 Merge pull request #8413 from moviuro/better-launch-scripts
launch-dedicated.sh: Support passing args from CLI
2015-06-19 07:23:38 +02:00
abcdefg30
5a47beeb64 Merge pull request #8453 from clemty/upstream/mapfix
fix mapping errors in shipped maps
2015-06-18 22:18:27 +02:00
clemty
d7ec296e8a fixes mapping errors in shipped maps 2015-06-18 21:21:02 +02:00
abcdefg30
63554cfddb Merge pull request #8502 from pchote/cross-mod-state
Don’t switch mods from inside button click handlers.
2015-06-18 17:34:16 +02:00
Paul Chote
75210b692e Don’t switch mods from inside button click handlers.
Fixes screen flickering and desyncs when returning to the mod chooser.
2015-06-17 21:55:48 +01:00
Pavel Penev
86af468ee4 Merge pull request #8400 from Mailaender/dedicated-validatecommand-nre
Fixed a NullReferenceException in LobbyCommands.ValidateCommand
2015-06-17 23:54:49 +03:00
reaperrr
2986277490 Improved SelectionDecoration description & removed ISelectionDecoration interface 2015-06-17 21:37:24 +02:00
Paul Chote
e3ad118249 Merge pull request #8387 from RoosterDragon/one-temp-buffer
Create only one scratch vertex buffer for rendering
2015-06-17 18:19:28 +00:00
reaperrr
b6bbd11c83 Fix crate tooltips 2015-06-17 20:14:02 +02:00
reaperrr
a1fa43966b Newlines to improve readability of SelectionDecorations. 2015-06-17 20:14:01 +02:00
reaperrr
875d8bac06 Move debug target path rendering to SelectionDecorations 2015-06-17 20:14:00 +02:00
reaperrr
c23ee1be2e Remove Selectable boolean from Selectable trait
Add work-around for ta/td bridge huts since they need actor Bounds to
be targetable by C4/engineer repair.
2015-06-17 20:13:59 +02:00
reaperrr
2afa3cfa3a Slightly changed D2k barracks footprint
Makes upper-left barracks cell impassable. It might look passable on Atreides' barracks, but not Harkonnen barracks, for example.
2015-06-17 20:13:58 +02:00
reaperrr
a9477ddc2d Changed back TD power plant footprints to 2x2 impassable
Reason 1: The art doesn't really look like that cell should be passable.
Reason 2: This falls within Selectable Bounds and can therefore be exploited to protect turrets and towers, while making it impossible to collect crates or squish infantry on this cell.
2015-06-17 20:13:57 +02:00
reaperrr
e30ede3971 Change Bounds/add VisualBounds in TS mod 2015-06-17 20:13:56 +02:00
reaperrr
332b7a374e Changed Bounds/added VisualBounds in TD mod
Where necessary/applicable.

Tweaked Refinery Offsets.
2015-06-17 20:13:55 +02:00
reaperrr
f709a6f6c4 Changed Bounds/added VisualBounds in D2k mod 2015-06-17 20:13:54 +02:00
reaperrr
0ff22b8cbc Changed Bounds/added VisualBounds in RA mod 2015-06-17 20:13:53 +02:00
reaperrr
a3bd007ac7 Moved SelectionDecorations to Mods.Common
And added more settings.

Moved SelectionBoxRenderable to Mods.Common, too.
2015-06-17 20:13:52 +02:00
reaperrr
d6fb05ce68 Introduced VisualBounds on SelectionDecorations
To allow visual selection boxes to be independent from Selectable.Bounds.
2015-06-17 20:13:51 +02:00
Pavel Penev
f72a14faea Merge pull request #8395 from Mailaender/pause-world-nre
Fixed null reference exception when processing the Pause order
2015-06-17 18:05:51 +03:00
Matthias Mailänder
6f6602dece Merge pull request #8472 from penev92/bleed_dropDown
Change DropDownButtonWidget separator to an image
2015-06-16 20:36:03 +02:00
Matthias Mailänder
96884210b3 Merge pull request #8119 from penev92/bleed_d2kVideos
Rework mod content installation directories and add D2k videos
2015-06-16 18:37:50 +02:00
abcdefg30
e1904274d8 Merge pull request #8491 from Mailaender/rm-artsrc
Removed the artsrc directory
2015-06-16 17:00:33 +02:00
Pavel Penev
0868f2da47 Merge pull request #8474 from pchote/remove-shroud-tests
Remove region assumptions from fast shroud tests
2015-06-16 12:08:08 +03:00
Paul Chote
c44afc0722 Remove viewport editor-mode assumptions. 2015-06-16 08:16:49 +01:00
Oliver Brakmann
78a1dadba0 Merge pull request #8470 from Mailaender/upgrade-nres
Fixed NullReferenceExceptions in UpgradeActorRules
2015-06-15 22:07:00 +02:00
Matthias Mailänder
218d2834cb remove artsrc 2015-06-15 21:36:28 +02:00
Paul Chote
6738b8b977 Undo an invalid optimisation.
Fixes a regression from #7746.
2015-06-15 18:06:43 +01:00
Paul Chote
2156a234db Render shroud outside map bounds.
Fixes a regression from #8337.
2015-06-15 18:06:43 +01:00
Paul Chote
aee951c86f Remove region assumptions from fast shroud tests. 2015-06-15 18:06:42 +01:00
Paul Chote
da3abb4e2e Tweak shroud revealing logic
The per-actor visibility now tracks all cells
inside the map area (including those outside the
currently visible bounds), but the shroud/fog is
only cleared if the cell is inside the currently
visible bounds.
2015-06-15 18:06:42 +01:00
Pavel Penev
6e052d19d9 Merge pull request #8157 from abcdefg30/atreides01b
Added atreides-01b
2015-06-15 19:58:44 +03:00
abcdefg30
439c82fb60 Add the map pngs for atreides01a and b 2015-06-15 17:39:33 +02:00
abcdefg30
4f462fb988 Make use of tables for different difficulties 2015-06-15 17:39:32 +02:00
abcdefg30
b282dffbaf Added atreides-01b 2015-06-15 17:39:32 +02:00
penev92
c93c0488c3 Change DropDownButtonWidget separator to an image 2015-06-15 03:15:19 +03:00
Pavel Penev
b1ef76d099 Merge pull request #8485 from obrakmann/fix-makefile-typo
Fix stupid typo in the Makefile
2015-06-15 01:08:38 +03:00
Oliver Brakmann
1f29bb6faa Fix stupid typo in the Makefile 2015-06-14 23:29:31 +02:00
Oliver Brakmann
ae8b146d2d Merge pull request #8325 from Mailaender/foundations-zero-tiles
Fixed a division through zero
2015-06-14 23:04:09 +02:00
Oliver Brakmann
28422f3e38 Merge pull request #8481 from obrakmann/build_prep_on_travis
Build prep branches on Travis, too
2015-06-14 13:44:00 +02:00
Oliver Brakmann
0d656e94ab Merge pull request #8482 from pchote/fix-d2k-tooltips
Fix d2k tooltips.
2015-06-14 13:40:16 +02:00
Paul Chote
f41acf56e6 Fix d2k tooltips. 2015-06-14 11:24:25 +01:00
Oliver Brakmann
553f9af1ba Build prep branches on Travis, too 2015-06-14 11:18:51 +02:00
Oliver Brakmann
7bc012be8d Merge pull request #8475 from abcdefg30/makeclean
Fix OpenRA.Game.exe.config being removed by 'make clean'
2015-06-14 10:26:45 +02:00
Matthias Mailänder
1a690bae9e Update README.md
separate buttons (different height)
2015-06-14 07:25:41 +02:00
abcdefg30
0244f394fd Fix OpenRA.Game.exe.config being removed by 'make clean' 2015-06-13 15:54:28 +02:00
abcdefg30
93ed8fbdd1 Merge pull request #8415 from deniz1a/make-utility-check
Adds checks for OpenRA.Utility.exe in make.cmd.
2015-06-13 15:27:40 +02:00
abcdefg30
981ff2dddf Merge pull request #8469 from Mailaender/empty-font-height
Fixed Sprite.Measure returning a 0 height
2015-06-13 14:53:18 +02:00
Pavel Penev
02834adfd9 Merge pull request #8471 from Mailaender/name-length-nre
Fixed a NullReferenceException in SanitizedPlayerName
2015-06-13 14:06:38 +03:00
penev92
6c75d1dde3 Fix video playback to work with D2k VQAs 2015-06-13 12:43:35 +03:00
penev92
be609c6033 Move D2k tilesets to a separate directory 2015-06-13 12:43:33 +03:00
penev92
a442c6c932 Add videos to D2k's assets 2015-06-13 12:43:30 +03:00
penev92
c8ab1e8370 Add Dictionary support to InstallUtils and fix D2k locking asset files;
Also fix D2k assets locations
2015-06-13 12:43:23 +03:00
Matthias Mailänder
b58988c623 move the null check to avoid a crash 2015-06-13 11:01:55 +02:00
Matthias Mailänder
1bf2bfadb4 update the engine version as the merge was delayed 2015-06-13 10:54:03 +02:00
Matthias Mailänder
d7e63ec28a fix a NullReferenceException 2015-06-13 10:53:48 +02:00
Matthias Mailänder
0816251bcd fix a null reference exception in parentKey 2015-06-13 10:52:23 +02:00
Pavel Penev
5226e1ad26 Merge pull request #8468 from Phrohdoh/fix-maped
Replace Get with GetOrNull in MapEditorLogic.
2015-06-13 11:36:34 +03:00
Matthias Mailänder
50f9724e34 fix a NullReferenceException 2015-06-13 10:36:07 +02:00
Moviuro
9df6b3c15f launch-dedicated.sh: add a tiny comment/usage 2015-06-13 10:23:24 +02:00
Moviuro
392cc90695 launch-dedicated.sh: Default to advertize Online 2015-06-13 10:19:05 +02:00
Moviuro
e24b4dbd8a launch-dedicated.sh: add AllowPortForward directive 2015-06-13 10:18:30 +02:00
Matthias Mailänder
bb6d4388df always return a default height based on font size 2015-06-13 08:36:37 +02:00
Taryn Hill
8fd82f0998 Remove unused using directives from MapEditorLogic. 2015-06-12 23:00:57 -05:00
Taryn Hill
6c3e127469 Replace a problematic Get with GetOrNull in MapEditorLogic. 2015-06-12 23:00:43 -05:00
abcdefg30
b98d98c6d6 Merge pull request #8212 from matija-hustic/selectable_classes
Added selection classes
2015-06-13 01:53:32 +02:00
Pavel Penev
e96e3fd3da Merge pull request #8277 from abcdefg30/radesc
Update all ra tooltips
2015-06-13 01:10:20 +03:00
Matthias Mailänder
6c7d2095b9 Merge pull request #8464 from GraionDilach/customcameopal
Closes #8434
2015-06-12 21:10:12 +02:00
Zimmermann Gyula
d5a5640f52 Adds an IconPalette property to Buildable and SupportPower traits. 2015-06-12 20:33:58 +02:00
Pavel Penev
649409e2ce Merge pull request #8430 from pchote/editor-cordon
Display and support editing the area outside the map bounds
2015-06-12 17:49:10 +03:00
Pavel Penev
ef7b1cf914 Merge pull request #8296 from Mailaender/lint-sprites
Moved the sequence image check to RenderSprites level
2015-06-12 04:43:47 +03:00
Paul Chote
ba2d499e5d Fix a bug in Map/CellLayer.Contains. 2015-06-11 21:27:35 +01:00
Paul Chote
6e09c62fdd Allow resource placement outside the map cordon. 2015-06-11 21:27:35 +01:00
Paul Chote
55cea73cf4 Allow actor placement outside the map cordon. 2015-06-11 21:27:34 +01:00
Paul Chote
f10d876429 Allow tile placement outside the map cordon. 2015-06-11 21:27:34 +01:00
Paul Chote
3d352563a8 Allow scrolling to the map edges in the editor. 2015-06-11 21:27:34 +01:00
Paul Chote
293c7fb840 Disable shroud in the map editor. 2015-06-11 21:27:33 +01:00
Paul Chote
486bf14669 Relax screen clipping bounds.
Fixes missing tiles in TS.
2015-06-11 21:27:33 +01:00
Paul Chote
d21b63ca04 Add some more coordinate utility functions. 2015-06-11 20:59:35 +01:00
Matthias Mailänder
e2e9ce9d7e check sequence image at RenderSprites level 2015-06-11 21:18:25 +02:00
Pavel Penev
b7567fa5fa Merge pull request #8399 from Mailaender/mix-readblock-guards
Fixed EndOfStreamException in MixFile.ReadBlocks
2015-06-11 17:38:35 +03:00
Pavel Penev
a4f85c6201 Merge pull request #8300 from matija-hustic/withrank_trait
Rank effect moved to new trait
2015-06-11 04:54:08 +03:00
Matija Hustić
a4ac3ecd5f Rank moved to new trait. 2015-06-11 02:41:29 +01:00
Oliver Brakmann
d24d2909ce Merge pull request #8282 from RoosterDragon/release-config
Enable compiler optimizations
2015-06-10 23:14:38 +02:00
Oliver Brakmann
afb939b159 Merge pull request #8457 from Mailaender/spritefont-measure-nre
Fixed a common NullReferenceException at SpriteFont.Measure
2015-06-10 22:54:10 +02:00
Oliver Brakmann
6e74bceaa9 Merge pull request #8425 from Mailaender/colormixer-badlock
Fixed a bad choice of lock objects in ColorMixerWidget
2015-06-10 22:50:02 +02:00
Oliver Brakmann
0ac78ef6a2 Merge pull request #8423 from Mailaender/hashfrozenactor-nre
Fixed a NullReferenceException in Sync.HashTarget
2015-06-10 22:19:37 +02:00
Matthias Mailänder
9f8d5bc12e Merge pull request #8375 from 42foobar42/nod06bfix
Closes #8297
2015-06-10 22:05:53 +02:00
Oliver Brakmann
0ff5e0078d Merge pull request #8393 from Mailaender/zipfile-nre
Fixed a dereference null return value in ZipFile.GetContent
2015-06-10 21:47:30 +02:00
Oliver Brakmann
398baa593e Merge pull request #8391 from Mailaender/pngloader-null-bitmap
Catched an explicit null dereference in PngLoader
2015-06-10 21:44:23 +02:00
Matthias Mailänder
07711f01b3 add exceptions for debugging 2015-06-10 20:41:34 +02:00
Pavel Penev
5097137b95 Merge pull request #8402 from obrakmann/fix8041_undeployable_conyard
Fix WithBuildingPlacedAnimation interrupting WithMakeAnimation
2015-06-10 14:55:22 +03:00
Matthias Mailänder
e53b1d16dd Merge pull request #8447 from pchote/ts-shroud-offset
Offset the TS shroud sequences.
2015-06-10 07:14:20 +02:00
Matthias Mailänder
9261f685a7 fix a null reference exception 2015-06-10 06:48:10 +02:00
Matthias Mailänder
bac11e23f6 avoid an often forgotten NullReferenceException 2015-06-10 06:39:54 +02:00
Matthias Mailänder
fb4b306553 avoid a bad choice of lock objects 2015-06-10 06:36:46 +02:00
Matthias Mailänder
51a17095a8 Merge pull request #8455 from Phrohdoh/dated-makefile
Remove old dependencies from Makefile.
2015-06-10 06:29:04 +02:00
Pavel Penev
f75da37ebf Merge pull request #8401 from Mailaender/playercolor-dictionary-exploit
Fixed an exploit where choosing another players color crashes the game
2015-06-10 01:56:23 +03:00
Taryn Hill
96bbc876ee Remove old dependencies from Makefile. 2015-06-09 16:30:43 -05:00
Oliver Brakmann
561fba46d3 Merge pull request #8431 from jbeich/unix_quirks
A few minor portability fixes
2015-06-09 22:53:52 +02:00
Oliver Brakmann
1a9f4f8a1b Allow switching off debug compilation in the Makefile
Debug mode stays enabled by default. Turn it off by passing a DEBUG flag into make, eg.:

$ make DEBUG=0
2015-06-09 18:06:32 +01:00
RoosterDragon
272a0d8691 Added a release config. 2015-06-09 18:06:31 +01:00
Pavel Penev
8ccb55734d Merge pull request #8449 from Mailaender/allow-long-servernames
Fixed long server names being sanitized
2015-06-09 15:03:21 +03:00
Matthias Mailänder
ba7059ab0b allow long server names 2015-06-09 06:58:58 +02:00
Paul Chote
c87ebce759 Offset the TS shroud sequences.
This corrects the 1px offsets in the sprites.
2015-06-08 23:02:51 +01:00
Oliver Brakmann
e5f89c2339 Merge pull request #8428 from moviuro/silent-get-function
thirdparty/fetch-thirdparty-deps.sh: silence the nuget check
2015-06-08 21:22:26 +02:00
Oliver Brakmann
2f578c80da Merge pull request #8422 from Mailaender/perfitem-div0
Fixed a division through zero in PerfItem.Average
2015-06-08 21:09:33 +02:00
Oliver Brakmann
5f45de1fe1 Merge pull request #8380 from reaperrr/color-valid-tweak
Less permissive color validator
2015-06-08 19:50:02 +02:00
Oliver Brakmann
d1ffb57e4e Merge pull request #8433 from Mailaender/namespace-doc-toc
Added the namespace headers to the trait documentation table of contents
2015-06-08 19:28:57 +02:00
Oliver Brakmann
2683da17d9 Merge pull request #8440 from OpenRA/avoid-duplicate-overcrowded-bugs
Expanded the bug reporting guidelines
2015-06-08 19:15:08 +02:00
Matthias Mailänder
f9c2b50ab5 Update CONTRIBUTING.md
please don't submit duplicates and keep it one issue per issue
2015-06-08 19:09:32 +02:00
deniz1a
b8c3a7a30d Adds checks for OpenRA.Utility.exe in make.cmd.
It displays a message now instead of file not found error.
2015-06-08 18:56:24 +03:00
Matija Hustić
e965a0d3f0 Touched up selection functionality. 2015-06-08 15:03:09 +01:00
Matthias Mailänder
854117d1d9 Merge pull request #8426 from obrakmann/ra-map-import-ships
Fixed missing ships when importing legacy RA maps
2015-06-08 09:03:38 +02:00
Matthias Mailänder
e5d06278ad Merge pull request #8427 from moviuro/comment-posix
thirdparty/*.sh: add comments on POSIX-compliant scripts
2015-06-08 08:57:28 +02:00
reaperrr
621cdeb996 Make color validator less permissive and increase minimum color lumination.
Closes #7902.
2015-06-08 03:07:51 +02:00
Pavel Penev
21f0d5c5a0 Merge pull request #8420 from Mailaender/unitordergen-nre
Fixed a dereference after null check in UnitOrderGenerator.CheckSameOrder
2015-06-08 01:06:49 +03:00
Oliver Brakmann
ce1eed6bcc Merge pull request #8432 from pchote/shroud-wpos
Add WPos shroud visibility queries.
2015-06-07 21:57:39 +02:00
Oliver Brakmann
747d762681 Merge pull request #8370 from penev92/bleed_newsDownload
Expand Battlefield News when a new news post has been downloaded
2015-06-07 21:23:37 +02:00
Matthias Mailänder
f084322162 also add namespaces to the toc 2015-06-07 21:07:37 +02:00
abcdefg30
10629b54ee Update all ra tooltips 2015-06-07 20:59:08 +02:00
Paul Chote
3994e1eec9 Use FogObscures(WPos). 2015-06-07 19:50:03 +01:00
Paul Chote
66dd3c553c Introduce WPos versions of FogObscures and ShroudObscures. 2015-06-07 19:50:02 +01:00
Oliver Brakmann
588cb7a959 Merge pull request #8337 from pchote/shroud-vertexbuffer
Simplify and improve shroud rendering performance.
2015-06-07 20:26:22 +02:00
Paul Chote
ec576558c0 Generate shroud cells outside the map. 2015-06-07 19:15:11 +01:00
Pavel Penev
07aa575c6b Merge pull request #8382 from LipkeGu/visualc_check
Check also for 2012 and 2013 Visual C runtimes libaries
2015-06-07 21:02:50 +03:00
Matthias Mailänder
dbc3d28c1a Merge pull request #7940 from Unit158/AttackTurreted-fix
Fixed turrets not firing at fast moving targets.
2015-06-07 19:05:17 +02:00
Christopher Grant
e94435ceaf Fixed turrets not firing at fast moving targets. 2015-06-07 12:54:56 -04:00
Jan Beich
fc7edb536d build/install: fall back to Unix desktop
Instead of enumerating every Unix assume Freedesktop-compliant behavior.
In future Android may want to define its own flavor like OSX.
2015-06-07 19:42:29 +03:00
Jan Beich
5483384e44 install: work around historical BSD cp(1) behavior
Strip ending / (slash) of the source when copying hicolor directory to
avoid installing icons under a theme with empty name. This should
unbreak expanding Icon in .desktop file by gtk_icon_theme_lookup_icon()
on DragonFly and FreeBSD.

|cp -R foo/ bar| == |cp -R foo/. bar| was disabled by NetBSD and OpenBSD
years ago to match POSIX. Other cp(1) implementations aren't affected.
2015-06-07 19:35:01 +03:00
Jan Beich
01dbbb72fa install: crashdialog_TARGET no longer exists after 307eaec 2015-06-07 19:35:01 +03:00
Paul Chote
cac7ec39f4 Rework shroud rendering using TerrainSpriteLayer. 2015-06-07 17:02:56 +01:00
Matthias Mailänder
9882a6e34d Merge pull request #8171 from reaperrr/withunitbody1
Introduce WithFacingSpriteBody and related With*Animation traits
2015-06-07 17:11:48 +02:00
Moviuro
1f0c884654 thirdparty/fetch-thirdparty-deps.sh: silence the nuget check 2015-06-07 17:08:36 +02:00
Moviuro
0525bebc80 thirdparty/*.sh: add comments on POSIX-compliant scripts 2015-06-07 16:32:46 +02:00
Oliver Brakmann
e445cc4fce Merge pull request #8408 from Mailaender/make-bsd-detect
Added a generic BSD detection to the Makefile
2015-06-07 15:56:56 +02:00
Oliver Brakmann
8442dc4bf0 Fixed missing ships when importing legacy RA maps 2015-06-07 15:45:16 +02:00
Moviuro
7375ad11db packaging/freebsd/openra: fix word splitting
Allow spaces in ServerName
2015-06-07 14:54:23 +02:00
Moviuro
1678a3a274 packaging/freebsd/openra: set AdvertiseOnline to True by default 2015-06-07 14:37:04 +02:00
Moviuro
9224030376 packaging/freebsd/openra: update comments, fix typos 2015-06-07 14:20:13 +02:00
Moviuro
56fc53b1e6 openra: introduce a FreeBSD rc.d script
Requires screen
2015-06-07 14:05:18 +02:00
Matthias Mailänder
47a92c4511 fix a NullReferenceException 2015-06-07 13:41:29 +02:00
Matthias Mailänder
47b0b4f143 fix a division through zero 2015-06-07 13:38:04 +02:00
Matthias Mailänder
8381fbd712 fix dereference after null check 2015-06-07 13:17:33 +02:00
abcdefg30
5c734b7031 Merge pull request #8411 from Unit158/shrapnel-polish
Added shrapnel sequences.
2015-06-07 12:50:16 +02:00
Pavel Penev
c4b48aaafb Merge pull request #8390 from OpenRA/coverity-badge
Added a Coverity Scan Badge to the README file
2015-06-07 13:19:10 +03:00
Moviuro
68cc00447c launch-dedicated.sh: Support passing args from CLI 2015-06-06 22:03:54 +02:00
Matthias Mailänder
c460e4ac4d avoid word splitting 2015-06-06 19:20:54 +02:00
Christopher Grant
81f05e7556 Added shrapnel sequences. 2015-06-06 13:18:09 -04:00
Matthias Mailänder
363e84157f add BSD detection to the Makefile 2015-06-06 18:36:40 +02:00
Oliver Brakmann
52179e802e Merge pull request #8405 from moviuro/posix-compliance
POSIX compliance
2015-06-06 17:42:26 +02:00
Moviuro
992d8396c6 thirdparty/configure-linux-native-deps.sh: == is not POSIX
Replaced it with =
2015-06-06 16:56:39 +02:00
Matthias Mailänder
99c9841274 don't log to which player the duplicate color belonged 2015-06-06 16:50:44 +02:00
Oliver Brakmann
929df0a4c7 Merge pull request #8356 from clemty/upstream/missionobj
make TD mission objective punctuation consistent
2015-06-06 16:31:36 +02:00
Moviuro
753f268593 thirdparty/configure-linux-native-deps.sh: POSIX compliant
Also works on FreeBSD
I didn't fix the MakeFile, though
2015-06-06 16:25:52 +02:00
Moviuro
fbf0cb676f *.sh: POSIX compliance when needed 2015-06-06 16:16:30 +02:00
Oliver Brakmann
a9339d91ea Fix WithBuildingPlacedAnimation interrupting WithMakeAnimation
The bug happens when a second (or third, fourth etc.) Conyard deploys while a building is placed from the first Conyard.

The `WithMakeAnimation` running on the second CY uses `Animation::PlayThen` to call `Building::Unlock` in a delegate.

`WithBuildingPlacedAnimation::BuildingPlaced` runs when a building placed and replaces the delegate from `WithMakeAnimation` with its own before it has a chance to run, and so the new Conyard never gets unlocked.

The fix is then to simply not run `BuildingPlaced` on conyards that haven't completed the make animation yet.
2015-06-06 15:13:22 +02:00
Matthias Mailänder
667646a984 fix null reference exception 2015-06-06 12:52:38 +02:00
Alexander Boll
4430267a60 fixed picture position 2015-06-06 12:16:25 +02:00
Matthias Mailänder
e7a023edce catch an explicit null dereference 2015-06-06 11:12:37 +02:00
Matthias Mailänder
b7a4552346 Update README.md
add a Coverity Scan Badge
2015-06-06 11:02:39 +02:00
bean601
730cec3974 Expand Battlefield News when a new news post has been downloaded 2015-06-06 10:41:31 +03:00
RoosterDragon
1e60a0ca76 Create only one scratch vertex buffer for rendering.
Previously several buffers were created but only one was ever used.
2015-06-05 21:32:07 +01:00
Pavel Penev
1651bd817b Merge pull request #8385 from abcdefg30/mentat
Add the "Mentat" prefix to the messages in atreides01a
2015-06-05 22:31:15 +03:00
abcdefg30
4561a73240 Add the "Mentat" prefix to the messages in atreides01a 2015-06-05 15:00:34 +02:00
Guido L
48c60589d4 [MSVCRT] check also for 2012 and 2013 2015-06-05 08:34:17 +01:00
Taryn Hill
0dd6f54a11 Merge pull request #8090 from penev92/bleed_upgradableTraits
Make some traits upgradable.
2015-06-04 12:04:07 -05:00
reaperrr
d52906117e Upgrade TS to replace RenderUnit with WithFacingSpriteBody
+RenderSprites + AutoSelectionSize.
2015-06-04 14:46:12 +02:00
reaperrr
6fdbd0e447 Replace RenderUnit in D2k with WithFacingSpriteBody
+RenderSprites + AutoSelectionSize, where possible.
2015-06-04 14:44:20 +02:00
reaperrr
7147ffc812 Replace RenderUnit in RA mod with WithFacingSpriteBody
+RenderSprites + AutoSelectionSize.

Change MadTank dependency from RenderUnit to WithFacingSpriteBody.
2015-06-04 14:44:19 +02:00
reaperrr
2c139f326a Upgrade TD to replace RenderUnit with WithFacingSpriteBody
+RenderSprites + AutoSelectionSize.
2015-06-04 14:44:18 +02:00
reaperrr
75b3ccfad0 TS wolverine changed to use WithFacingSpriteBody
...in conjunction with WithMoveAnimation and WithAttackAnimation,
replacing WithInfantryBody.
2015-06-04 14:42:12 +02:00
reaperrr
733b7fc0b0 Added WithMoveAnimation trait
RenderUnitFlying -> WithUnitBody + WithMoveAnimation upgrade rule

Make TD Orca use WithMoveAnimation
Remove RenderUnitFlying
2015-06-04 14:42:11 +02:00
reaperrr
4d79cce491 Added WithAttackAnimation trait
Interacts with WithUnitBody.

Upgrade rule for RenderUnitReload -> RenderSprites + WithUnitBody + WithAttackAnimation

Use WithAttackAnimation for RA V2 launcher
Remove RenderUnitReload
2015-06-04 14:42:10 +02:00
reaperrr
b21ca9b7e7 Add deprecation notices to RenderUnit and RenderSimple 2015-06-04 14:42:09 +02:00
reaperrr
0e3a53bec7 Added WithFacingSpriteBody trait.
Extracted AutoSelectionSize into its own trait.

RenderUnit -> RenderSprites + WithFacingSpriteBody upgrade rule

Remove RenderSimple dependencies of ThrowsParticle
and WithHarvestAnimation.
2015-06-04 14:42:08 +02:00
clemty
3bb9f0170a adds punctuation to all mission objectives 2015-06-04 10:20:05 +02:00
Matthias Mailänder
9b52bff87d Merge pull request #8303 from AoAGeneral/upstream/myfeature
TD Balance Changes
2015-06-04 06:42:52 +02:00
Matthias Mailänder
1944f352b2 Merge pull request #8072 from reaperrr/clean-selectable
Cleaned up infantry rules (part 1)
2015-06-04 06:04:09 +02:00
abcdefg30
fcd9759eac Merge pull request #8290 from penev92/bleed_d2kMissionBrowser
Give D2k its own mission browser
2015-06-03 16:48:28 +02:00
Pavel Penev
c22f15de55 Merge pull request #8299 from pchote/map-visiblecells
Distinguish between all map cells and cells inside map bounds.
2015-06-03 14:59:21 +03:00
Pavel Penev
707c403cc3 Merge pull request #8342 from LipkeGu/editor-crash-colorpicker
Allow changing of player Color/Name only on main menu
2015-06-03 14:08:30 +03:00
Guido L
a1fc77980d Allow changing of player color/Name only on main menu to Allow changing of player Color/Name ONLY on main menu 2015-06-03 07:24:41 +01:00
Matthias Mailänder
e12dc1904e Merge pull request #8349 from abcdefg30/protectharvester
Fix a potential crash in allies05a
2015-06-03 07:21:57 +02:00
Matthias Mailänder
9e4c926b8f Merge pull request #8350 from abcdefg30/timer02
Fix the timer in allies02
2015-06-03 07:00:35 +02:00
Paul Chote
bf4722fb9f Distinguish between all map cells and cells inside map bounds. 2015-06-02 21:53:25 +01:00
Oliver Brakmann
6650e3d9c7 Merge pull request #8319 from Mailaender/hacky-currentstate-nre
Fixed possible NREs in AI.StateMachine
2015-06-02 22:35:49 +02:00
Oliver Brakmann
05e9b22af7 Merge pull request #8329 from Mailaender/worldtooltip-owner-nre
Fixed a NullReferenceException in WorldTooltipLogic
2015-06-02 22:22:10 +02:00
Matthias Mailänder
cab701e8f5 Merge pull request #8360 from penev92/bleed_checkVC2010
Check for dependencies of dependencies
2015-06-02 22:18:57 +02:00
Matthias Mailänder
cd5c0eca79 fix possible null reference exceptions 2015-06-02 22:16:16 +02:00
Matthias Mailänder
a4f7daf47a avoid a division through zero 2015-06-02 22:12:48 +02:00
Matthias Mailänder
06106b09ed fix NRE 2015-06-02 22:04:34 +02:00
Matthias Mailänder
5fafc65885 Merge pull request #8348 from obrakmann/fix8343_8344_nod06a
Fix actor placement and typo in nod06a
2015-06-02 20:48:25 +02:00
Oliver Brakmann
206c33ed41 Merge pull request #8226 from pchote/actor-disposal
Dispose traits when destroying an actor.
2015-06-02 19:33:22 +02:00
Oliver Brakmann
62aee92185 Merge pull request #8221 from pchote/terrain-spritelayer
Introduce a class for efficient tiled sprite rendering.
2015-06-02 18:16:05 +02:00
penev92
4fc6ac3a15 Check for MS VC++ 2010 2015-06-02 18:04:55 +03:00
abcdefg30
04ea348764 Merge pull request #8336 from reaperrr/fix-d2k-attackvoice
Fixed D2k attack voices and adds 4th variant for fremen voices
2015-06-02 14:46:39 +02:00
reaperrr
9f1abd04e8 Cleaned and fixed TS infantry rules a little.
Moved Selectable Bounds to infantry default and tweaked them to better
match art size.
Gave Viceroids their own default. They don't share cells anymore, either.
Fixed JumJet voice.
Disabled RevealsShroud on Tiberian Fiend.
Cleaned up TakeCover definitions.
Tweaked selection bounds of TS cyborgs.
Changed TS engineer trait order to fix prone animations not showing up.
2015-06-01 23:27:50 +02:00
reaperrr
64fb38bd3e Cleaned and fixed D2k infantry rules a little
Moved Selectable Bounds to infantry default, fixed vertical offset.
Removed some TakeCover duplication.
Added engineer and medic/thumper prone sequences.
Made sure that TakeCover/WithInfantryBody sequence modifiers are applied
properly.

Fixed d2k grenadier sequences offset to match other infantry.
2015-06-01 23:27:49 +02:00
reaperrr
f88ada8648 Cleaned and fixed TD infantry rules a little
Fixes TD infantry not going visually prone.
2015-06-01 23:27:47 +02:00
reaperrr
e8cd833058 Cleaned RA infantry rules a little 2015-06-01 23:27:46 +02:00
reaperrr
d3c146f707 Enabled saboteur demolish voice. 2015-06-01 23:17:25 +02:00
Oliver Brakmann
d8844b5e6f Merge pull request #8352 from abcdefg30/missionwatch
Disable EnemyWatcher in all ra missions
2015-06-01 21:50:25 +02:00
Pavel Penev
d7a7dc9219 Merge pull request #8331 from Mailaender/replay-utility-nre
Added more useful exceptions to the command line utility replay parser
2015-06-01 20:04:11 +03:00
Pavel Penev
0e81615902 Merge pull request #8351 from abcdefg30/genericdog
Adjust the dogs generic name
2015-06-01 19:32:54 +03:00
abcdefg30
8a5cdfa9fb Disable EnemyWatcher in all ra missions 2015-06-01 18:21:22 +02:00
Oliver Brakmann
56e0af67fa Merge pull request #8328 from Mailaender/desc-label-nre
Made the tech description label optional
2015-06-01 17:18:42 +02:00
Oliver Brakmann
c1835e9214 Merge pull request #8327 from Mailaender/swallow-ammopool-nre
Fixed an explicit NRE from SwallowActor.WormAttack
2015-06-01 17:14:37 +02:00
Oliver Brakmann
60b1424585 Fix actor placement and typo in nod06a 2015-06-01 17:11:24 +02:00
Pavel Penev
32f420976e Merge pull request #8261 from Mailaender/cyborgs
Added the Tiberian Sun cyborg logic
2015-06-01 11:58:51 +03:00
Matthias Mailänder
031dc1c1ff provide more useful exceptions 2015-06-01 09:03:32 +02:00
Matthias Mailänder
8dbe9804fc add the Cyborg rendering logic 2015-06-01 07:58:34 +02:00
AoAGeneral
194d62f70c Update vehicles.yaml 2015-05-31 17:29:21 -07:00
Pavel Penev
53f26adb88 Merge pull request #8309 from Mailaender/lint-neutral
Added a lint rule to check if Neutral is set up correctly
2015-06-01 02:06:06 +03:00
Pavel Penev
926900d3f9 Merge pull request #8330 from Mailaender/gametimer-nre
Fixed a NullReferenceException in GameTimeLogic
2015-06-01 01:59:32 +03:00
Pavel Penev
c11214f697 Merge pull request #8332 from Mailaender/language-extract-nre
Fixed an explicit NullReferenceException in ExtractLanguageStringsCommand
2015-06-01 01:58:28 +03:00
Pavel Penev
e7c795e56f Merge pull request #8338 from Mailaender/long-wrange-squared
Fixed all squared range related integer overflows
2015-06-01 01:57:27 +03:00
Pavel Penev
b12204f99f Merge pull request #8335 from Mailaender/editor-onpaint-base
Fixed a missing call to base clase in OpenRA.Editor.OnPaint
2015-06-01 01:43:21 +03:00
Matthias Mailänder
ea5003cd2d add new long WRange.RangeSquared to avoid integer overflows 2015-05-31 23:51:30 +02:00
Matthias Mailänder
aab2afd407 fix a missing call to base clase 2015-05-31 22:38:21 +02:00
reaperrr
db162e9b51 Fixes D2k attack voices and adds 4th variant for fremen voices. 2015-05-31 22:38:02 +02:00
Matthias Mailänder
060e83b35d fix an explicit NRE 2015-05-31 22:13:07 +02:00
Matthias Mailänder
14a4b876e3 fix a possible NRE 2015-05-31 21:10:56 +02:00
Matthias Mailänder
7efdd6820f make the description label optional 2015-05-31 20:59:11 +02:00
Matthias Mailänder
1fd25a3d3a fix an explicit NRE from SwallowActor.WormAttack 2015-05-31 20:47:08 +02:00
Matthias Mailänder
98afa922ac Random is already in the race list 2015-05-31 20:33:29 +02:00
Oliver Brakmann
79edf648a7 Merge pull request #8308 from Mailaender/lint-owners
Added a lint check for invalid owners
2015-05-31 20:25:00 +02:00
Matthias Mailänder
44691831ad check for invalid owners 2015-05-31 18:33:23 +02:00
Oliver Brakmann
1dc1155ad7 Merge pull request #8316 from Mailaender/dispose-blank-loadscreen
Added missing disposings of the *LoadScreen base class
2015-05-31 18:13:19 +02:00
Oliver Brakmann
4d4ee90ac8 Merge pull request #8322 from Mailaender/demolish-warhead-damagemod-nre
Fixed an explicit NRE in TerrainModifiesDamage
2015-05-31 17:54:42 +02:00
Oliver Brakmann
f25300c703 Merge pull request #8320 from Mailaender/flyattack-tick-nre
Fixed a possible NRE in FlyAttack.Tick
2015-05-31 17:39:36 +02:00
Oliver Brakmann
b5bae91bb0 Merge pull request #8318 from Mailaender/hackyai-nre-attacker
Fixed possible NREs in HackyAI.Damaged
2015-05-31 17:07:33 +02:00
Oliver Brakmann
e4fcb65808 Merge pull request #8315 from Mailaender/health-attacker-nre
Fixed a possible NRE in Health.InflictDamage debug logging
2015-05-31 17:04:09 +02:00
Oliver Brakmann
c30a483ee5 Merge pull request #8292 from Mailaender/fix-atreides01-color
Fixed the Atreides house color in the first mission
2015-05-31 16:32:02 +02:00
Oliver Brakmann
48b9e0b39f Merge pull request #8307 from wenzeslaus/ts-infantry-palette-order
reorder infantry build palette in TS mod
2015-05-31 16:23:53 +02:00
Matthias Mailänder
8fe57e80df fix an explicit NRE from Demolish.OnInside 2015-05-31 16:07:55 +02:00
Matthias Mailänder
723c2d82c8 fix a possible NRE 2015-05-31 15:58:55 +02:00
Pavel Penev
7ea0de0435 Merge pull request #8312 from Mailaender/pngloader-null-palette
Fixed a cryptic error message when feeding non-paletted PNGs into the command line utility
2015-05-31 16:49:39 +03:00
abcdefg30
3a9067db4d Fix the timer in allies02
... still ticking even when the convoy already approached
2015-05-31 15:41:36 +02:00
Matthias Mailänder
f171b23a1b move the null check up further to catch everything 2015-05-31 15:36:48 +02:00
Matthias Mailänder
a3c8d4691a add a missing dispose of the base class 2015-05-31 15:31:22 +02:00
Matthias Mailänder
aade0197ff fix a possible NRE 2015-05-31 15:24:06 +02:00
abcdefg30
203978ed1b Adjust the dogs generic name 2015-05-31 15:16:58 +02:00
Pavel Penev
03e377f107 Merge pull request #8310 from Mailaender/wrange-nre
Fixed a possible NRE in WRange.TryParse
2015-05-31 16:15:12 +03:00
abcdefg30
1fe68a8ef4 Don't crash when trying to protect a harvester against a dead (not in world) enemy 2015-05-31 15:08:59 +02:00
Matthias Mailänder
2b0421f692 throw before triggering an NRE by accessing a null array 2015-05-31 10:19:49 +02:00
Matthias Mailänder
87a4e3da26 avoid a possible NRE 2015-05-31 10:00:39 +02:00
Matthias Mailänder
3167ca48ff check if the neutral player is set up correctly 2015-05-31 09:44:50 +02:00
Matthias Mailänder
7186f654d7 avoid an unneeded loop 2015-05-31 09:43:35 +02:00
Matthias Mailänder
a12e6a191b Merge pull request #8302 from obrakmann/fix-nod05-invalid-owner
Fix an invalid owner init entry in nod05.
2015-05-31 09:14:50 +02:00
Matthias Mailänder
bb30a3c75a Merge pull request #8295 from obrakmann/fix8291_tesla_zap_in_fog
Fix tesla zaps being visible under the fog
2015-05-31 09:00:36 +02:00
Matthias Mailänder
bb9cd56f3d Merge pull request #8304 from penev92/bleed_speedModifier
Fix Mobile not using ISpeedModifier properly
2015-05-31 08:50:33 +02:00
Vaclav Petras
371f784d43 reorder infantry build palette in TS mod
The order is not the same as the original one (influenced by dependencies) but the main point is to have standard infantry (E1) first, E2 second, ENGINEER third, and the special units on last places. The biggest difference to the original is GDI MEDIC as last (which also applies when both GDI and NOD units are available).
2015-05-30 22:55:49 -04:00
penev92
fcd9906683 Make speedModifiers Lazy 2015-05-31 00:24:12 +03:00
Pavel Penev
3666fabf1e Merge pull request #8137 from Mailaender/sanitize-player-name
Added a client side player name sanitation
2015-05-30 22:21:32 +03:00
AoAGeneral
c72e89bb32 TD Balance Changes
http://www.sleipnirstuff.com/forum/viewtopic.php?f=82&t=17430

List of changes on forums.
2015-05-30 12:03:04 -07:00
penev92
5b00fddfc9 Make AttractsWorms upgradable 2015-05-30 20:01:47 +03:00
penev92
afb97ac4b4 Make WithInfantryBody upgradable 2015-05-30 20:01:38 +03:00
Oliver Brakmann
25b9c6f5f0 Fix an invalid owner init entry in nod05. 2015-05-30 18:51:11 +02:00
Oliver Brakmann
b56280e785 Merge pull request #8293 from MustaphaTR/d2k-stealth-raider-prerequisite
D2K - Fix Prerequisite of Stealth Raider
2015-05-30 13:03:34 +02:00
Oliver Brakmann
72b6feb186 Fix tesla zaps being visible under the fog 2015-05-30 11:22:00 +02:00
Mustafa Alperen Seki
6f8b062020 Add hightech to Prerequisite of Stealth Raider 2015-05-30 10:06:23 +02:00
Matthias Mailänder
fefad25d9d don't change player names without necessity 2015-05-30 09:20:44 +02:00
Matthias Mailänder
5a29e47f7c fix the Atreides color 2015-05-30 09:11:32 +02:00
Matthias Mailänder
eba0b263d3 Merge pull request #8288 from obrakmann/fix8287_ugly_mission_preview
Update gdi05a mission preview image.
2015-05-30 08:02:15 +02:00
abcdefg30
8b8ff92122 Merge pull request #8286 from penev92/bleed_lintDeathTypes
Add a lint check for DeathAnimations
2015-05-29 23:58:08 +02:00
abcdefg30
e26194686d Merge pull request #8289 from RoosterDragon/fast-case-premultiply
Speed up PremultiplyAlpha
2015-05-29 23:14:02 +02:00
penev92
6b4bf10227 Add lint rule for Death Types 2015-05-29 23:41:56 +03:00
penev92
f55573d37c Give D2k its own mission browser 2015-05-29 23:24:12 +03:00
Pavel Penev
c4d349ef2c Merge pull request #8117 from abcdefg30/atreides01
Added atreides-01a
2015-05-29 21:57:37 +03:00
RoosterDragon
1a89e91630 Fast case PremultiplyAlpha for opaque colors. 2015-05-29 19:50:33 +01:00
Paul Chote
8ae3afa3c5 Properly clean up traits that used to hook only death. 2015-05-29 19:21:35 +01:00
Paul Chote
4ff309811f Dispose actors when tearing down the world. 2015-05-29 19:21:34 +01:00
Paul Chote
585a43fd8f Rename Actor.Destroy/Destroyed to Dispose/Disposed. 2015-05-29 19:08:38 +01:00
Paul Chote
629f877032 Extract terrain vertex buffer into a reusable class. 2015-05-29 19:06:11 +01:00
Paul Chote
b1f4bd85d6 Accept an IntPtr for VertexBuffer.SetData. 2015-05-29 19:06:11 +01:00
Paul Chote
4df64eb18f Expose vertex components. 2015-05-29 19:06:11 +01:00
abcdefg30
4c72b0066c Merge pull request #8283 from obrakmann/fix8266_missing_damangetype_in_missions
Add a missing DamageType to missions which re-define weapons
2015-05-29 18:07:35 +02:00
Oliver Brakmann
33d67ceb01 Merge pull request #8070 from Phrohdoh/support-power-cursor
Move Cursor field to SupportPower.
2015-05-29 17:14:41 +02:00
Oliver Brakmann
5c42fb0dd0 Update gdi05a mission preview image. 2015-05-29 17:13:20 +02:00
Taryn Hill
4f222acf61 Upgrade rule for moving Cursor to SupportPower. 2015-05-29 09:47:09 -05:00
Taryn Hill
17a16ac8e0 Restore correct SupportPower cursors in yaml. 2015-05-29 09:47:09 -05:00
Taryn Hill
26a72fff5b Move Cursor field to SupportPower. 2015-05-29 09:47:05 -05:00
Oliver Brakmann
46f871c352 Add missing DamageType to deviator weapon 2015-05-29 14:48:23 +02:00
Oliver Brakmann
8b6c4a5b13 Merge pull request #8248 from Mailaender/premultiplied-geometric-renderers
Fixed transparency breakage on quad and line rendering
2015-05-29 14:11:28 +02:00
Oliver Brakmann
16a9b9284b Merge pull request #8167 from deniz1a/fix-sat-icon
Prevents satellite icons from being drawn over frozen actors.
2015-05-29 13:56:37 +02:00
Oliver Brakmann
311ec55190 Merge pull request #8154 from Mailaender/lint-spawn
Added lint rules to detect bad spawn points in maps.
2015-05-29 13:24:36 +02:00
Oliver Brakmann
c61b893e11 Add a missing DamageType to missions which re-define weapons 2015-05-28 22:23:59 +02:00
abcdefg30
66b2c539a2 Added atreides-01a 2015-05-28 21:16:12 +02:00
abcdefg30
ac1c8e68c4 Remove the redundant timer in d2k 2015-05-28 17:31:28 +02:00
Matthias Mailänder
6e6c8abc74 Merge pull request #8265 from abcdefg30/healanim
Don't skip the heal animation
2015-05-28 06:54:52 +02:00
abcdefg30
12966129a4 Merge pull request #8216 from Phrohdoh/fix-spy-exploit
Fix Disguise oversight.
2015-05-28 02:11:23 +02:00
Oliver Brakmann
3f320d0bf1 Merge pull request #8250 from 42foobar42/nod06c
added mission 6c nod
2015-05-28 00:31:30 +02:00
Oliver Brakmann
2ce9af41d3 Merge pull request #8275 from abcdefg30/FacingGlobal
Add default facings to lua
2015-05-27 23:51:10 +02:00
Oliver Brakmann
e25a6ed275 Merge pull request #8273 from abcdefg30/luaUI
Use the new lua UserInterface in the missions
2015-05-27 23:30:56 +02:00
Matthias Mailänder
34f3d2d5f1 avoid code duplication 2015-05-27 22:17:42 +02:00
Matthias Mailänder
05229e79ce use the new facing global 2015-05-27 22:17:42 +02:00
abcdefg30
59a5eb4937 Add default facings to lua 2015-05-27 22:17:41 +02:00
Matthias Mailänder
dec7ad1ee2 Merge pull request #8268 from obrakmann/fix8262_d2k_double_remove_from_world
Fix potentially removing actors twice from world in Actor::ChangeOwner
2015-05-27 22:03:43 +02:00
abcdefg30
91f62b5741 Expose more PlayerProperties to lua 2015-05-27 16:51:28 +02:00
abcdefg30
27db5851e2 Add default colors to HSLColorGlobal 2015-05-27 16:51:27 +02:00
abcdefg30
5aa9d50551 Use the new lua UserInterface in the missions 2015-05-27 16:51:26 +02:00
Oliver Brakmann
7ddf11433b Merge pull request #8243 from abcdefg30/capturecontrol
Fixed captured buildings producing bot controled units
2015-05-27 14:55:55 +02:00
abcdefg30
f88c1fd569 Merge pull request #8271 from obrakmann/fix8263_gdi05b_nod_attacks_world
Fix Nod attacking the world in gdi05b
2015-05-27 00:01:31 +02:00
Taryn Hill
70c61817d9 Fix oversight where disguising SpyA as a disguised SpyB uses the image and tooltip for SpyB instead of SpyB’s disguise. 2015-05-26 13:50:07 -05:00
Oliver Brakmann
75c2e7c12c Fix Nod attacking the world in gdi05b 2015-05-26 19:45:08 +02:00
Oliver Brakmann
7b3b2f85f8 Fix potentially removing actors twice from world in Actor::ChangeOwner 2015-05-26 17:16:56 +02:00
Oliver Brakmann
d3bda15bdc Merge pull request #8056 from penev92/bleed_carryalls
Added unit repair via order button with optional Carryall transport
2015-05-26 12:14:02 +02:00
abcdefg30
a39f966a11 Don't skip the heal animation 2015-05-26 12:00:10 +02:00
penev92
3bd8377154 Update D2k rules
Make use of WithDecorationCarryable
2015-05-26 12:44:20 +03:00
penev92
463ac0ddc2 Enable Repairable actors to call for transport to the repair pad 2015-05-26 12:44:18 +03:00
penev92
97e150e757 Introduce ICallForTransport + carryall code fixes 2015-05-26 12:43:35 +03:00
penev92
070e5109f5 Issue repair orders to Repairable units via RepairOrderGenerator 2015-05-26 12:43:34 +03:00
abcdefg30
3bf149222e Merge pull request #8192 from OpenRA/desktop-l10n
Added a German translation for the Linux desktop entry
2015-05-26 10:48:34 +02:00
Oliver Brakmann
641213696f Merge pull request #8191 from abcdefg30/luawidget
Add a custom text display to lua
2015-05-26 00:03:08 +02:00
Oliver Brakmann
8e9cab0079 Merge pull request #8257 from Mailaender/dereference-before-null-check
Removed an unnecessary (too late) null check at EditorResourceBrush.AllowResourceAt
2015-05-25 19:24:40 +02:00
Oliver Brakmann
efdd8198d9 Merge pull request #8259 from Mailaender/newsbutton-nre
Made the main menu news button optional
2015-05-25 19:18:28 +02:00
Oliver Brakmann
2b1c7f90a4 Merge pull request #8256 from Mailaender/voxel-fbo-nre
Fixed a dereference of an explicit null value in VoxelRenderer
2015-05-25 18:51:03 +02:00
Alexander Boll
5108975125 added mission 6c nod 2015-05-25 18:36:48 +02:00
Matthias Mailänder
fa8b4e67a3 made the news button optional 2015-05-25 18:29:36 +02:00
Matthias Mailänder
113bcebf35 remove unneccesary null check 2015-05-25 17:46:34 +02:00
Oliver Brakmann
0d8876a1de Merge pull request #8253 from Mailaender/editor-resource-brush-nre
Fixed a potential null reference exception during in-game editor resource placement
2015-05-25 17:42:28 +02:00
Matthias Mailänder
1b16a51021 fix a dereference of an explicit null value 2015-05-25 17:41:55 +02:00
abcdefg30
93d9398a64 Merge pull request #8255 from Mailaender/maptitle-nre
Fixed a NullReferenceException when not using the optional MAP LabelWidget
2015-05-25 17:04:42 +02:00
abcdefg30
0a60b78bec Merge pull request #8254 from Mailaender/colorpicker-preview-nre
Fixed a null reference exception in ColorPickerLogic when deciding not to use a ActorPreviewWidget
2015-05-25 17:00:38 +02:00
abcdefg30
d5ceb2623b Make use of the new lua UserInterface in survival02 2015-05-25 16:57:16 +02:00
abcdefg30
a5c9bc9a2c Expose an HSL color parameter to lua 2015-05-25 16:57:16 +02:00
abcdefg30
35374d168f Add support for custom mission timers: UserInterfaceGlobal 2015-05-25 16:57:15 +02:00
abcdefg30
852ea87daa Add lua support for nullables 2015-05-25 16:54:42 +02:00
Matthias Mailänder
015a083ced fix a possible NRE (copy and paste error) 2015-05-25 16:44:56 +02:00
Oliver Brakmann
9ec7f00635 Merge pull request #8252 from Mailaender/legacy-map-dispose-stream
Fixed missing dispose on stream in LegacyMapImporter
2015-05-25 16:42:41 +02:00
Oliver Brakmann
a060675951 Merge pull request #8251 from Mailaender/ini-stream-dispose
Fixed a resource leak in IniFile
2015-05-25 16:35:37 +02:00
Matthias Mailänder
a7cc11f625 fix a potential NRE 2015-05-25 16:35:02 +02:00
Matthias Mailänder
dd5eca7d1d fix a potential NRE 2015-05-25 16:26:14 +02:00
Matthias Mailänder
b4a67f412e fix missing dispose on stream in LegacyMapImporter 2015-05-25 16:08:52 +02:00
Matthias Mailänder
70fdb73127 fix missing dispose on stream in IniFile 2015-05-25 16:07:21 +02:00
abcdefg30
b771b3fd86 Disable hijackers in monster tank madness 2015-05-25 15:38:16 +02:00
abcdefg30
dcffbc3f11 Fixed captured buildings producing bot controled units 2015-05-25 15:29:55 +02:00
Matthias Mailänder
96e2c9bb79 use premultiplied alpha on geometric renderers
to fix transparency again
2015-05-25 13:39:38 +02:00
Oliver Brakmann
adf1bf30b6 Merge pull request #8199 from 42foobar42/nod06b
added mission 6b nod
2015-05-25 13:04:40 +02:00
Alexander Boll
e77123316e added mission 6b nod 2015-05-25 12:39:41 +02:00
Paul Chote
c7dc3737b1 Merge pull request #8237 from Mailaender/appveyor-geoip-copy
Fixed make dependencies not copying the cached GeoLite2-Country.mmdb.gz into the root.
2015-05-25 10:39:19 +01:00
Matthias Mailänder
cefa5013ad Merge pull request #8246 from jacobdufault/remove-unused-usings
Remove some unused using statements
2015-05-25 11:17:20 +02:00
Jacob Dufault
d9b39d15d4 Remove some unused using statements 2015-05-25 02:00:45 -07:00
deniz1a
106286da23 Prevents satellite icons from being drawn over frozen actors. 2015-05-25 06:31:04 +03:00
abcdefg30
ed4b3f9970 Merge pull request #8239 from Mailaender/playtest-20150524-CS0219
Fixed the build of playtest-20150524 on Mono 2.10
2015-05-25 01:33:36 +02:00
Oliver Brakmann
9b4095ee55 Merge pull request #8240 from pchote/fix-nuke-flashes
Fix nuke flashes
2015-05-24 21:42:21 +02:00
Paul Chote
dae5703c71 Add nuke flash to D2K. 2015-05-24 18:39:51 +01:00
Paul Chote
322285ef66 Update NukePaletteEffect for premultiplied alpha. 2015-05-24 18:32:42 +01:00
Matthias Mailänder
04be567813 fix error CS0219:
The variable `zoom' is assigned but its value is never used
2015-05-24 19:12:51 +02:00
Matthias Mailänder
fbef65bae9 copy it in the make dependencies step 2015-05-24 17:28:47 +02:00
Paul Chote
2cc125a3fa Merge pull request #8236 from Mailaender/win-geoip-gz
Fixed a GeoLite2-Country DB filename in Windows fetch scripts.
2015-05-24 15:37:38 +01:00
Matthias Mailänder
f2124f7ebe fix file name 2015-05-24 16:17:43 +02:00
Oliver Brakmann
a507b7d567 Merge pull request #8196 from Mailaender/stylecop-mono-4
Fixed StyleCop on Mono 4
2015-05-24 16:02:13 +02:00
Pavel Penev
902cd124ba Merge pull request #8149 from Mailaender/fetch-geoip-db
Automatized GeoIP database download
2015-05-24 16:43:22 +03:00
Paul Chote
767a63d43e Merge pull request #8235 from obrakmann/map-chooser-delete-unpacked-maps
Fix inability to delete unpacked maps
2015-05-24 13:53:27 +01:00
Oliver Brakmann
331ad217c2 Fix inability to delete unpacked maps 2015-05-24 14:32:46 +02:00
Paul Chote
c5614d4c3a Merge pull request #8223 from Mailaender/fix-sequences
Fixed several broken YAML sequences
2015-05-24 13:12:22 +01:00
Pavel Penev
9ed7ef10b9 Merge pull request #8227 from obrakmann/fix8219_rise_of_the_undead_bridges
Fix broken bridges being initialized with a non-zero HP value
2015-05-24 15:05:29 +03:00
Paul Chote
8483152a3c Merge pull request #8222 from Mailaender/water-troopers
Fixed the AI not avoiding boats when searching for viable paradrop targets
2015-05-24 12:54:48 +01:00
Pavel Penev
3ebb6573a4 Merge pull request #8228 from Mailaender/render-trait-doc
Added render trait documentation
2015-05-24 14:41:44 +03:00
Matthias Mailänder
5b5b0c02dd add trait documentation 2015-05-24 13:37:04 +02:00
Matthias Mailänder
5838dc39fc Merge pull request #8231 from obrakmann/map-chooser-addendum
Fix map chooser crashing the server creation dialog in cnc
2015-05-24 13:32:27 +02:00
Matthias Mailänder
472de004ed Merge pull request #8232 from obrakmann/fix_game.exe.config_removal
Fix OpenRA.Game.exe.config issues
2015-05-24 13:30:14 +02:00
Oliver Brakmann
c6c9863681 Merge pull request #8176 from pchote/fix-palette-alpha
Load textures using premultiplied alpha.
2015-05-24 13:15:54 +02:00
Oliver Brakmann
88d448bf40 Merge pull request #8229 from Mailaender/noget
Added a NuGet replacement script as fallback
2015-05-24 12:18:58 +02:00
Oliver Brakmann
fac0991901 Fix OpenRA.Game.exe.config not being copied to the built dir during packaging 2015-05-24 12:17:43 +02:00
Oliver Brakmann
29efb0675d Fix OpenRA.Game.exe.config being removed by 'make clean' 2015-05-24 12:08:30 +02:00
Oliver Brakmann
00bf032a8f Fix custom map tab offset in cnc mod 2015-05-24 11:45:37 +02:00
Oliver Brakmann
6f0e155afb Fix map chooser crashing the server creation dialog in cnc 2015-05-24 11:40:33 +02:00
Pavel Penev
f2abf10670 Merge pull request #8230 from reaperrr/grav-bomb-fix
Made projectiles accept empty to disable image or sequence
2015-05-24 11:32:48 +03:00
Matthias Mailänder
b2fc8585e0 unify the spelling towards the official one 2015-05-24 10:24:47 +02:00
Matthias Mailänder
c4deaef163 remove nuget until the connectivity problems are resolved 2015-05-24 10:24:22 +02:00
Matthias Mailänder
dd19d9127b add a fallback if nuget is not available on the system 2015-05-24 10:24:19 +02:00
reaperrr
6ab73fa982 Made projectile effects accept empty values to disable/negate image or sequence.
In addition to accepting null.
2015-05-24 10:02:53 +02:00
Matthias Mailänder
cc34463019 require DetectCloaked as it is useless otherwise 2015-05-24 09:06:03 +02:00
Matthias Mailänder
d0b3e5fb8b Merge pull request #8114 from penev92/bleed_d2kUpgrades
Add D2k building upgrades
2015-05-24 08:23:28 +02:00
Matthias Mailänder
d87d3e5283 Merge pull request #8220 from abcdefg30/bombletcrash
Fix a crash in the ParaBomb weapon defintion
2015-05-24 08:10:23 +02:00
Pavel Penev
9e0e866199 Merge pull request #8207 from obrakmann/map-chooser-overhaul
Split maps into system and custom maps in the map chooser
2015-05-24 04:12:23 +03:00
Oliver Brakmann
d9f0ca362f Fix broken bridges being initialized with a non-zero HP value 2015-05-24 02:02:20 +02:00
Oliver Brakmann
dc08b7a90a Add buttons for map file management to map chooser 2015-05-24 01:49:30 +02:00
abcdefg30
8c59016853 Merge pull request #8066 from penev92/bleed_warheads
Remove DeathType from DamageWarhead
2015-05-24 01:33:44 +02:00
Oliver Brakmann
1854d994fd Split map chooser in system- and user-installed map lists 2015-05-24 01:28:22 +02:00
Oliver Brakmann
72c0f9b8dc Allow non-hosts to open the map chooser 2015-05-23 23:38:30 +02:00
penev92
9ea78285fa Add an upgrade rule for DeathSounds.DeathTypes 2015-05-24 00:16:26 +03:00
penev92
1c44fcbad4 Add upgrade rules to remove DamageWarhead.DeathType
and replace it with proper DamageTypes
2015-05-24 00:15:09 +03:00
penev92
b5e4876b7f Add DeathTypes to WithDeathAnimation 2015-05-24 00:15:08 +03:00
penev92
32bb70abca Remove DamageWarhead.DeathType in favor of DamageWarhead.DamageTypes 2015-05-24 00:15:07 +03:00
Matthias Mailänder
a2c553478d fetch GeoLite2-Country.mmdb.gz after 30 days of file age 2015-05-23 22:45:31 +02:00
Matthias Mailänder
c76fb51b14 Merge pull request #8208 from penev92/bleed_registerFileTypes
Register .orarep file type and openra:// URI scheme on Windows
2015-05-23 22:27:41 +02:00
penev92
b1c36246cf Clean Windows registry on uninstall 2015-05-23 23:15:51 +03:00
Matthias Mailänder
486c7527c9 Merge pull request #8012 from reaperrr/voiceset
Extracted actor Voices from Selectable into own Voiced trait
2015-05-23 21:59:34 +02:00
Pavel Penev
54e806568a Merge pull request #7934 from Mailaender/mime-join
Registered the openra:// protocol to join games on Linux
2015-05-23 22:39:17 +03:00
Matthias Mailänder
44a4c0600e redirect Microsoft.Build.Framework.dll on Mono 4 2015-05-23 18:30:12 +02:00
Matthias Mailänder
9773cca214 rename and fix unused sequences 2015-05-23 16:10:55 +02:00
Matthias Mailänder
47927963a7 fix misnamed TakeCover sequence 2015-05-23 16:10:55 +02:00
Matthias Mailänder
13a8f6f5bd remove duplicate and unused land animation 2015-05-23 16:10:55 +02:00
Matthias Mailänder
c88daef3b3 fix missing make and crumble animation 2015-05-23 16:10:52 +02:00
Matthias Mailänder
a424440cd2 fix missing aim sequence 2015-05-23 16:10:29 +02:00
Matthias Mailänder
861ebd61b7 fix missing make animation for civilian buildings 2015-05-23 16:10:26 +02:00
Matthias Mailänder
add0cc565a don't paradrop units near boats 2015-05-23 16:05:56 +02:00
Matthias Mailänder
8e919d3215 move GeoIP functions into it's own class
extract the geoip database .gz in-game
2015-05-23 16:00:46 +02:00
Matthias Mailänder
edca755540 also sanitize server names 2015-05-23 15:07:18 +02:00
Matthias Mailänder
736b169319 sanitize player names 2015-05-23 15:07:13 +02:00
reaperrr
a99f69035c Made AnnounceOnKill and AnnounceOnBuild voices customisable. 2015-05-23 13:53:38 +02:00
reaperrr
3777a8bca9 Moved Voice-related extensions to VoiceExts.
Note: This is a work-around until Selectable can be moved to Mods.Common, which is when the voice extensions should be moved back to ActorExts.

Pulled phrase check before foreach in PlayVoice ActorExts.
Removed superflous actor parameter from PlayVoice/PlayVoiceLocal.

Simplified PlayVoice extensions.

variant is no longer customisable, as all current usages use self.Owner.Country.Race anyway.
2015-05-23 13:46:01 +02:00
abcdefg30
b5b2a6bdcb Fix a crash in the ParaBomb weapon defintion
in Fort Lonestar and Survival02
2015-05-23 13:31:45 +02:00
Paul Chote
80a54fe4fe Fix repair depot lights. 2015-05-23 08:50:29 +01:00
Paul Chote
5532ed4fc9 Remove now-redundant blend code. 2015-05-23 08:50:28 +01:00
Paul Chote
4eb76046f4 Fix deviator gas blending. 2015-05-23 08:50:28 +01:00
Paul Chote
26fd858fc7 Use premultiplied alpha for all textures and blending. 2015-05-23 08:50:28 +01:00
Matthias Mailänder
78f1e9fb2f Merge pull request #8215 from abcdefg30/raflare
Removed bogus traits from ra FLARE
2015-05-23 08:50:21 +02:00
abcdefg30
89db7bbf05 Add a tooltip to FLARE 2015-05-22 23:25:42 +02:00
Oliver Brakmann
e75e6fee0e Remove superfluous traits from crate actor definitions 2015-05-22 22:29:07 +02:00
abcdefg30
bc55748e81 Removed bogus traits from FLARE 2015-05-22 22:29:06 +02:00
penev92
42af5f0939 Fix how OpenRA.exe launches OpenRA.Game.exe 2015-05-22 20:38:45 +03:00
penev92
cffc01ab28 Register .orarep file type and openra:// URI scheme on Windows 2015-05-22 20:38:41 +03:00
Pavel Penev
fe45a85349 Merge pull request #8187 from Mailaender/travis-windows-deploy
Brought back the Windows setup deployment via Travis CI
2015-05-22 20:03:28 +03:00
Pavel Penev
0d33fdb5e1 Merge pull request #8200 from RoosterDragon/sheet-fixes
Sheet fixes
2015-05-22 18:30:13 +03:00
Pavel Penev
686e01c6cc Merge pull request #8193 from RoosterDragon/line-render-perf
Improve performance of line rendering
2015-05-22 17:51:11 +03:00
Pavel Penev
bd7838bdb6 Merge pull request #8211 from obrakmann/fix8175_ext-editor-breakage
Fix legacy editor
2015-05-22 17:19:59 +03:00
Pavel Penev
beb1481107 Merge pull request #8195 from obrakmann/fix8181_reveal_fakes_with_unit_selection_key
Fix revealing fakes by double-clicking a building
2015-05-22 17:09:00 +03:00
reaperrr
b9e8406aeb Fix Unload definition in voice sets. 2015-05-22 01:51:56 +02:00
reaperrr
5e2c781c8a Adds PlayVoice, PlayVoiceLocal and HasVoice to ActorExts.
Makes Cargo unload voice customisable.
2015-05-22 01:51:55 +02:00
reaperrr
5f68516070 Cleaned up IVoiced-related code.
Added Volume control and descriptions to Voiced.

Streamline voice checks in WorldUtils and DeathSounds.
2015-05-22 01:51:54 +02:00
reaperrr
251d3e6864 Move PlayVoice and PlayVoiceLocal from Sound to Voiced.
Move HasVoice, HasVoices and GetVoices from WorldUtils to Voiced.
2015-05-22 01:51:53 +02:00
reaperrr
037bd6794c Upgrade rules for moving Voice to Voiced trait 2015-05-22 01:51:52 +02:00
reaperrr
0d05fdefbb Extract actor voice set into Voiced trait 2015-05-22 01:51:51 +02:00
Oliver Brakmann
f8774dd575 Adjust legacy editor after moving player palettes to the World actor 2015-05-21 21:30:35 +02:00
Oliver Brakmann
b35491d609 Fixed reading past the bounds of the map when rendering in the legacy editor 2015-05-21 21:29:59 +02:00
Pavel Penev
66f99704a8 Merge pull request #8209 from Mailaender/mono2-CS0172
Fixed a compilation error on Mono 2.10
2015-05-21 22:06:54 +03:00
Matthias Mailänder
31d1f0bcf9 fix error CS0172 2015-05-21 20:43:45 +02:00
Pavel Penev
21d1348ea3 Merge pull request #8202 from deniz1a/revert-8097
Reverts #8097.
2015-05-21 21:38:10 +03:00
Matthias Mailänder
b518e5949c register the openra:// protocol to join games 2015-05-21 20:33:42 +02:00
Matthias Mailänder
da2b7e687c add a new Launch.URI parameter 2015-05-21 20:33:36 +02:00
Oliver Brakmann
d46cf70b00 Make d2k AI aware of buildings upgrades 2015-05-21 21:26:16 +03:00
OmegaBolt
8b5353e39b Fix D2k tech tree
- Added upgrades for the Con Yard, Barracks, Light, Heavy and High Tech Factory (last one is Atreides only)
- Updated the prerequisites of all structures, infantry and vehicles to use the upgrades
- Fixed the Ix Research building to use vanilla Dune 2000 prerequisites
- Renamed High Tech Facility to High Tech Factory like vanilla Dune 2000
- Given the Air Strike power to the High Tech Factory Upgrade like vanilla
2015-05-21 21:26:14 +03:00
OmegaBolt
340c8dad21 Add D2k building upgrades 2015-05-21 21:26:12 +03:00
OmegaBolt
f3ec07d4e4 Add Upgrade production queue to D2k 2015-05-21 21:26:10 +03:00
Matthias Mailänder
81608a3282 remove unused replay launch script 2015-05-21 18:45:57 +02:00
abcdefg30
0b09b82254 Merge pull request #8198 from Mailaender/net40-thirdparty-dll
Fixed SystemNotSupportedException caused by thirdparty mod DLLs on .NET > 4.0
2015-05-21 17:20:42 +02:00
Oliver Brakmann
5c95c7e157 Merge pull request #8130 from Mailaender/tileset-filters
Fixed glitchy remap errors of non-fitting actors on certain tilesets
2015-05-21 16:27:37 +02:00
Matthias Mailänder
07fb7f921f bring back system markdown 2015-05-21 11:54:21 +02:00
Matthias Mailänder
f079b1980f switch back to the old Travis infrastructure 2015-05-21 11:53:47 +02:00
Igor Popov
28e1eccf29 Merge pull request #8206 from baxxxster/bleed
Added possibility to use spaces in Server.Name
2015-05-21 12:25:25 +03:00
Glenn Martin Jensen
615c22f158 Added possibility to use spaces in Server.Name
This way it's easier for others to set a servername with spaces in it by
default
2015-05-21 09:49:04 +02:00
Matthias Mailänder
27cbfd9bb1 Merge pull request #8204 from reaperrr/group-sel-bug
Fixes bug that selection voices are played twice when selecting groups
2015-05-21 08:04:18 +02:00
reaperrr
75a0ff7702 Fixes the bug that selection voices are played twice when selecting groups
via 0-9 hotkeys.

Problem was that the voice was played for both KeyUp and KeyDown events.

Closes #8121.
2015-05-21 03:01:13 +02:00
deniz1a
e290975952 Reverts #8097.
It caused units not targeting enemies under fog even with satellite.
2015-05-21 00:24:27 +03:00
Oliver Brakmann
1f17ec4d4f Merge pull request #8201 from Mailaender/isometric-editor-sprites
Fixed Tiberian Sun multiplayer spawn and waypoints
2015-05-20 21:56:07 +02:00
Matthias Mailänder
d9b0e00b41 isometric waypoints 2015-05-20 21:17:20 +02:00
Matthias Mailänder
ca73b9612a isometric spawn points 2015-05-20 21:17:14 +02:00
RoosterDragon
b48b994f16 Remove half-baked thread-safety mechanisms from Sheet.
Sheet is now thread-unsafe, rather than attempting to expose a dodgy thread safety model.
2015-05-20 18:50:28 +01:00
RoosterDragon
d42c3a9740 Allow a sheet buffer to be released without error, even if unbuffered. 2015-05-20 18:35:24 +01:00
Matthias Mailänder
9e81a05f86 allow 3rd-party mod DLLs on .NET > 4.0 2015-05-20 19:32:19 +02:00
Oliver Brakmann
da16142412 Enable unit selection keys for spectators and in replays.
Only work in per-player views.
2015-05-20 18:56:14 +02:00
Oliver Brakmann
9895aee6f2 Disable unit selection by double-clicking for enemy units 2015-05-20 18:28:34 +02:00
Oliver Brakmann
5db63ba7aa Merge pull request #8123 from 42foobar42/nod06a
added mission 6a nod
2015-05-20 17:12:39 +02:00
abcdefg30
e725732f69 Merge pull request #8078 from Mailaender/make-all-docs
Fixed the trait documentation
2015-05-20 17:05:46 +02:00
Alexander Boll
da3d177c60 added mission 6a nod 2015-05-20 16:29:58 +02:00
Matthias Mailänder
9c53ff1403 Merge pull request #8103 from RoosterDragon/mapcache-better-threading
Fix graphical glitches & crashes related to map loading
2015-05-20 13:11:44 +02:00
Matthias Mailänder
1e7e2aa1e0 Merge pull request #8085 from abcdefg30/funpark
Add funpark01 - Take #3
2015-05-20 13:01:36 +02:00
RoosterDragon
b9ebeaadca Improve performance of line rendering.
- Create an overload that renders a line in one color, as this allows most existing calls to be simplified. This also allows a slight performance improvement by only normalizing the components once.
- Introduce a DrawLineStrip method. This improves performance by allowing the color components to be normalized once for the whole strip, and only needing to calculate vertices once per point rather than twice since we can reuse the last result.
2015-05-19 21:41:50 +01:00
Matthias Mailänder
1fa70b959d Update openra.desktop
translate the generic name to German
2015-05-19 22:00:07 +02:00
Oliver Brakmann
9397749118 Merge pull request #8097 from deniz1a/cloaked-targetability
Fixes location of phase transport being revealed by attack line.
2015-05-18 23:04:09 +02:00
Matthias Mailänder
6f3c11da1d remove actors without palette glitches, but non-sensical 2015-05-18 19:41:47 +02:00
Matthias Mailänder
2fbe7b0013 filter actors with glitchy remap errors on certain tilesets 2015-05-18 19:12:20 +02:00
Matthias Mailänder
fd85b208fa update documentation 2015-05-18 18:54:53 +02:00
Matthias Mailänder
2eac646929 deploy Windows setup with Travis CI only 2015-05-18 18:54:41 +02:00
Pavel Penev
a47235d162 Merge pull request #8065 from pchote/ingame-map-editor
Add the new map editor.
2015-05-18 19:16:16 +03:00
Pavel Penev
5d593de09d Merge pull request #8183 from Mailaender/unused-tilestart
Fixed the build for Mono 2.10 again
2015-05-17 22:02:15 +03:00
Matthias Mailänder
ffffe0089a fix error CS0219:
The variable `tileStart' is assigned but its value is never used
2015-05-17 20:34:47 +02:00
Pavel Penev
53af3df3ee Merge pull request #8174 from abcdefg30/formattime
Added a FormatTime function to UtilsGlobal.cs
2015-05-17 17:48:23 +03:00
Pavel Penev
d978fff982 Merge pull request #8106 from reaperrr/cnc-fixes
Several TD mod fixes
2015-05-17 17:39:33 +03:00
Pavel Penev
d718a5a5ca Merge pull request #8094 from reaperrr/hackyai-tweaks
Make HackyAI squad creation a little more flexible and controllable
2015-05-17 17:28:02 +03:00
Pavel Penev
2230daee14 Merge pull request #8179 from Mailaender/ts-skirmish-stats
Added skirmish stats to Tiberian Sun
2015-05-17 15:38:50 +03:00
Paul Chote
09e4c5c5ab Merge pull request #8109 from reaperrr/fix-idleoverlay
Fixes WithIdleOverlay to start with first frame after make animation
2015-05-17 13:06:44 +01:00
Paul Chote
60f96fcb7b Overhaul save panel. 2015-05-17 12:09:41 +01:00
Paul Chote
445c0d76a2 Fix create map panel geometry. 2015-05-17 12:09:40 +01:00
Matthias Mailänder
0638f1ce7d add skirmish stats
fixes #7728
2015-05-17 10:37:49 +02:00
deniz1a
db38f52721 Fixes location of phase transport being revealed by attack line. 2015-05-16 15:20:07 +03:00
abcdefg30
d50ed6ec2f Replace a bogus tab 2015-05-16 13:19:46 +02:00
abcdefg30
2fd91c53f2 Remove trailing spaces from nod04b map.yaml 2015-05-16 13:19:45 +02:00
abcdefg30
57dbdd097d Add a FormatTime function to UtilsGlobal.cs 2015-05-16 13:19:44 +02:00
Paul Chote
469f47aeea Add new map editor UI. 2015-05-15 17:09:27 +01:00
Paul Chote
d211fe9fe1 Add the world components of the new editor. 2015-05-15 17:09:20 +01:00
Matthias Mailänder
1f024a8695 Add menu plumbing for the new map editor. 2015-05-15 17:08:33 +01:00
Paul Chote
444c02a498 Add ClickThrough property to ContainerWidget. 2015-05-15 17:08:32 +01:00
Paul Chote
b1dc5012c3 Don’t crash if IQBO isn’t present on an actor. 2015-05-15 17:08:32 +01:00
Paul Chote
038847cc4c Force the first template variant in TTPW. 2015-05-15 17:08:32 +01:00
Paul Chote
443bc63fa7 Render terrain grid above actors, too. 2015-05-15 17:08:31 +01:00
Paul Chote
b889101ba1 Make sure that ScreenMap is initialized before other traits. 2015-05-15 17:08:31 +01:00
Paul Chote
9e5e1f1a89 Add methods to IOccupySpaceInfo. 2015-05-15 17:08:31 +01:00
Paul Chote
5754de141d Add Remove support to TypeDictionary. 2015-05-15 17:08:30 +01:00
abcdefg30
f65d9ab584 Merge pull request #8166 from Mailaender/win-dedicated-launcher
Added a Windows dedicated server launch script
2015-05-15 17:36:48 +02:00
Glen Anderson
71c42f5b38 add a Windows dedicated server launch script 2015-05-15 17:12:03 +02:00
Pavel Penev
29c4b646e3 Merge pull request #8144 from abcdefg30/lowfakepower
Add a low power overlay to fake structures
2015-05-15 15:40:35 +03:00
abcdefg30
70e7b33fd7 Merge pull request #7979 from Mailaender/d2k-sand-blendmode
Fixed the Dune 2000 harvester sand out animation
2015-05-14 19:21:06 +02:00
abcdefg30
48a9807273 Merge pull request #8164 from Mailaender/common-render-voxel
Moved the generic voxel rendering traits to Mods.Common
2015-05-14 17:38:06 +02:00
Matthias Mailänder
7e1c3047f6 move generic Voxel render traits to Mods.Common 2015-05-14 17:02:47 +02:00
abcdefg30
96767bab5d Add funpark01 2015-05-14 16:57:30 +02:00
abcdefg30
db3f84e361 Merge pull request #8158 from deniz1a/nodogspy
Removes Spy's ability to disguise as Attack Dog or Giant Ant.
2015-05-14 16:49:23 +02:00
Matthias Mailänder
e8144e1194 Merge pull request #8161 from LipkeGu/ts_music_installer
Allow music download for TS
2015-05-14 16:21:01 +02:00
abcdefg30
e338c63203 Add attack sounds for dinos 2015-05-14 14:07:18 +02:00
abcdefg30
4d864c9aaf Add selection boxes for dinos 2015-05-14 14:07:17 +02:00
Guido L
004c7316fc Allow music download 2015-05-14 13:51:03 +02:00
reaperrr
e190093ac4 Fix WithIdleOverlay to start with first frame after make animation 2015-05-13 23:18:59 +02:00
reaperrr
0d3dd28a3f Unharcode squad randomization, add minimum delay for creating attack force 2015-05-13 22:50:23 +02:00
Deniz Ayikol
153bac4602 Removes Spy's ability to disguise as Attack Dog and Giant Ant. 2015-05-13 20:03:26 +03:00
Matthias Mailänder
a943fbc94e check for duplicate spawn point locations 2015-05-13 15:28:19 +02:00
Matthias Mailänder
bb08537c44 check for too few/many spawn points/player definitions 2015-05-13 15:27:11 +02:00
Pavel Penev
7154ce4a2f Merge pull request #8147 from DeadlySurprise/vqaAudioFix
Fixed gdi3lose.vqa crash
2015-05-13 03:50:45 +03:00
Oliver Brakmann
1c75d62d4c Merge pull request #8150 from penev92/bleed_factionDescriptions
Add faction description tooltips to TD
2015-05-12 21:26:43 +02:00
penev92
c352e5309d Add faction description tooltips to TD 2015-05-12 22:07:47 +03:00
Matthias Mailänder
e80641940b Merge pull request #8151 from abcdefg30/armordropAI
ArmorDrop has been removed
2015-05-12 19:14:00 +02:00
abcdefg30
d62b01d294 Merge pull request #7538 from cjshmyr/teamhealth
Give ally players a yellow health bar (team health colors)
2015-05-12 18:01:27 +02:00
abcdefg30
e9884b740b ArmorDrop has been removed 2015-05-12 13:53:08 +02:00
Pavel Penev
5fc452412a Merge pull request #8148 from Mailaender/thanks-ihptru
Moved ihptru on top of the Credits
2015-05-11 23:33:50 +03:00
Matthias Mailänder
9f3008456e move ihptru up front 2015-05-11 22:08:41 +02:00
DeadlySurprise
35445775c2 Fixed crash 2015-05-11 18:19:06 +02:00
abcdefg30
5553f55705 Merge pull request #8087 from 42foobar42/nod5
added mission 5 nod
2015-05-11 17:03:50 +02:00
abcdefg30
e55364dd0f Add a low power overlay to fake structures 2015-05-11 16:35:17 +02:00
Pavel Penev
648dc31e24 Merge pull request #8131 from obrakmann/fix8129_hotkey_input_lose_focus
Fix HotkeyEntryWidget keeping keyboard focus after receiving input
2015-05-11 03:42:30 +03:00
Pavel Penev
ffd45e9b04 Merge pull request #7982 from Mailaender/ts-obelisk
Added the Tiberian Sun Nod Obelisk charge animation
2015-05-11 03:30:48 +03:00
Matthias Mailänder
69ce877a89 Merge pull request #8083 from obrakmann/separate_download_dir
Closes #8069
2015-05-10 21:30:38 +02:00
Alexander Boll
6a2b9fc41b added mission 5 nod
Update nod05
2015-05-10 19:43:42 +02:00
Curtis Shmyr
6ca51e47c1 Give ally players a yellow hp bar for team health colors 2015-05-10 11:12:10 -06:00
Matthias Mailänder
4b50f34c46 Merge pull request #7849 from penev92/bleed_notifications
Add new enemy detection voice notifications to RA and D2k
2015-05-10 18:32:13 +02:00
Oliver Brakmann
7ef14f56e2 Fix HotkeyEntryWidget keeping keyboard focus after receiving input 2015-05-10 17:46:39 +02:00
Oliver Brakmann
0f7aaf3445 Merge pull request #8125 from pchote/player-palettes
Reorganize palette loading.
2015-05-10 17:35:34 +02:00
Oliver Brakmann
53995bf3f3 Merge pull request #7938 from Mailaender/appdata
Added Linux app store data metadata
2015-05-10 16:02:43 +02:00
Matthias Mailänder
3d23897af0 install Linux app store data metadata 2015-05-10 15:38:01 +02:00
Matthias Mailänder
0e987137a2 Merge pull request #8124 from pchote/actorpreview-owners
Remove Owner from ActorPreviews.
2015-05-10 14:21:44 +02:00
Paul Chote
889360d4c6 Regenerate cached texture indices when the palette size changes. 2015-05-10 00:59:15 +01:00
Paul Chote
c0282bdff9 Remove Owner from ActorPreviews. 2015-05-10 00:01:43 +01:00
Paul Chote
7eae157ad8 Rework player palette loading. 2015-05-10 00:01:14 +01:00
Paul Chote
1d835edfca Split PaletteReference into its own file. 2015-05-09 22:36:28 +01:00
Matthias Mailänder
d99ae3bcb9 split render building/overlay and play sound for charge
to add the Tiberian Sun Nod Obelisk

tick slightly faster

tweak the local offsets
2015-05-09 19:56:15 +02:00
Oliver Brakmann
d3f76f13a1 Merge pull request #8048 from 42foobar42/nod4b
added nod4b
2015-05-09 12:56:01 +02:00
Alexander Boll
912ab4d1b8 added nod4b 2015-05-09 12:10:35 +02:00
Scott
c9d6760972 Merge pull request #8104 from penev92/bleed_factionDescriptions
Add D2k faction description tooltips
2015-05-09 13:13:22 +12:00
Oliver Brakmann
0c1b825877 Adjust travis-ci caching
1. Removes the APT caching, since it's not available on the docker infrastructure.
2. Enables caching for the dependency download directory.
2015-05-08 20:59:45 +02:00
Oliver Brakmann
71857be388 Make packaging less noisy, + random cleanups 2015-05-08 20:59:45 +02:00
Oliver Brakmann
f251813f89 Keep downloaded files in a separate directory
As a side effect, this re-enables building the Windows installer on Linux hosts.
2015-05-08 20:59:24 +02:00
Oliver Brakmann
14886bc3f7 Merge pull request #8101 from penev92/bleed_references
Cleanup unused DLL references
2015-05-08 20:41:37 +02:00
penev92
873c47127a Add "Enemy detected" notification to RA 2015-05-08 20:07:08 +03:00
penev92
606f69ed7c Add "Enemy units detected" notifications to D2k 2015-05-08 20:06:56 +03:00
penev92
8e730c264f Revert removal of EnemyWatcher and AnnounceOnSeen traits from RA and D2k 2015-05-08 20:06:52 +03:00
Paul Chote
ba131fcf0a Merge pull request #7805 from penev92/bleed_prerequisites
Make buildings explicitly provide their names as prerequisites
2015-05-08 17:29:22 +01:00
Pavel Penev
0d759eee2a Merge pull request #8061 from Phrohdoh/with-decoration
Implement WithDecoration and subtraits.
2015-05-08 18:02:13 +03:00
Taryn Hill
cace31f5e9 Implement WithDecorationCarryable. 2015-05-08 09:55:40 -05:00
Taryn Hill
dd1cc4eb2f Implement WithDecorationDisguised. 2015-05-08 09:55:40 -05:00
Taryn Hill
d57d7c522f Implement WithDecoration. 2015-05-08 09:55:31 -05:00
Pavel Penev
3eb556258d Merge pull request #8021 from sinf/quickbuild
Added quick build feature
2015-05-08 17:53:57 +03:00
abcdefg30
4d0fb8b931 Merge pull request #8102 from RoosterDragon/objective-size
Fix objectives window
2015-05-08 15:24:29 +02:00
reaperrr
89845272e0 Add two previously unused voices to Commando voice set 2015-05-08 02:59:08 +02:00
reaperrr
f7c69b4801 Split radar dish from Nod airfield and make it an idle overlay 2015-05-08 02:59:07 +02:00
reaperrr
d441d9bd6e Converted rank and levelup art to cnc palette 2015-05-08 02:59:06 +02:00
reaperrr
c88ee0f56a Tweaked Break of Day and Chokepoint
Break of Day:
- fixed tiberium tree positions
- fixed a minor tile error near a river

Chokepoint:
- replaced temperate tree groups with large desert tree
2015-05-08 02:59:05 +02:00
reaperrr
fe0c21aa91 Significantly improved Rogue States
- fixed most, possibly all cliff errors
- fixed many river, shore and road errors
- hid a few remaining shore errors behind trees/rocks
- fixed positions of all tiberium trees (1 cell down)
- replaced temperate tree groups with large desert tree
- tweaked position of some buildings at the border of the map so they're more visible (instead of half-hidden below shroud edge)
2015-05-08 02:59:03 +02:00
reaperrr
9a23ef2ac5 Significantly improved Necessary Illusions
- fixed all cliff tile errors
- fixed most noticable river errors
- fixed some noticable road errors
- fixed position of all tiberium trees (regression from #5198)
2015-05-08 02:59:01 +02:00
penev92
58ecf9cbac Add D2k faction descriptions to the lobby 2015-05-08 01:54:11 +03:00
RoosterDragon
a42b69bd98 Give objectives proper sizing.
This gives the container an actual size, which prevents the scroll panel logic skipping rendering in the belief that it is not visible.
2015-05-07 21:07:35 +01:00
RoosterDragon
3b5a672848 Always access the SheetBuilder from the main thread in MapCache.
Not doing this can occasionally this can result in a cross thread call to the backing texture which leads to bad things. This stops trying to be clever regarding the thread safety invariants exposed by SheetBuilder and does things simply and safely: All updates happen on the main thread.
2015-05-07 20:58:59 +01:00
Matthias Mailänder
4dbdd365de also version the all helper mod 2015-05-07 21:25:32 +02:00
Oliver Brakmann
2e11b5d809 Merge pull request #8099 from pchote/scrollpanel-move-regression
Only issue a MouseMove event if the scroll offset actually changed.
2015-05-07 19:23:45 +02:00
Oliver Brakmann
1fe8b98415 Merge pull request #8095 from penev92/bleed_tiles
Add one more D2k tile definition
2015-05-07 19:10:47 +02:00
penev92
bb51657e40 Cleanup unused DLL references 2015-05-07 18:59:01 +03:00
penev92
dc3ae39db1 Rename ProvidesCustomPrerequisite to ProvidesPrerequisite 2015-05-07 03:04:11 +03:00
Paul Chote
88221423b6 Only issue a MouseMove event if the scroll offset actually changed. Fixes #8098. 2015-05-06 21:51:24 +01:00
penev92
95eb8b27b5 Add tile BLOXTREE-345 2015-05-06 17:11:25 +03:00
Paul Chote
e170140084 Merge pull request #8091 from penev92/bleed_someRandomFix
Don't do trait lookups for Health on each processed order
2015-05-05 23:40:00 +01:00
penev92
ea9d49e2b7 Don't do trait lookups for Health on each processed order 2015-05-05 19:41:45 +03:00
penev92
834e4bfe9c Fix building prerequisites in TS 2015-05-04 01:58:56 +03:00
penev92
352c28314b Fix building prerequisites in D2k 2015-05-04 01:58:55 +03:00
penev92
1154e109d3 Fix building prerequisites in RA 2015-05-04 01:58:54 +03:00
penev92
75687ba271 Fix building prerequisites in Cnc 2015-05-04 01:58:51 +03:00
penev92
e3e6bcaf2a Add an upgrade rule for explicit prerequisite providing by buildings 2015-05-04 01:58:49 +03:00
penev92
50fb6f1d25 Make buildings grant prerequisites explicitly 2015-05-04 01:39:32 +03:00
Oliver Brakmann
a310411bcc Merge pull request #8013 from penev92/bleed_wormSound
Add sandworm attack sound
2015-05-03 23:23:11 +02:00
Oliver Brakmann
62b3592bd4 Merge pull request #7998 from Mailaender/ts-proc-dock
Added the Tiberian Sun docking overlays
2015-05-03 22:50:16 +02:00
Oliver Brakmann
622685c8f4 Merge pull request #7968 from pchote/ts-tileset-depth
Load depth data from tmp(ts) sprites.
2015-05-03 22:31:27 +02:00
Oliver Brakmann
536d80a7f3 Merge pull request #7917 from RoosterDragon/replay-browser-load-perf
Faster replay browser loading
2015-05-03 20:13:13 +02:00
Oliver Brakmann
3ae7d51feb Merge pull request #7871 from Mailaender/ambient-sound
Added a looping sound trait
2015-05-03 16:46:36 +02:00
Oliver Brakmann
b9f2caa0cf Merge pull request #8082 from Mailaender/more-dependency-fixes
Moved configure native dependencies
2015-05-03 16:07:08 +02:00
penev92
76a3b9c3b7 Add sandworm attack sound 2015-05-03 12:55:32 +03:00
Matthias Mailänder
4818efe036 Merge pull request #8080 from abcdefg30/upgrademaps
Run the utility on all maps
2015-05-03 11:23:22 +02:00
abcdefg30
cd9af39662 Merge pull request #8044 from penev92/bleed_withSpriteBody
Retire RenderFlare and WithFire traits
2015-05-03 11:19:02 +02:00
abcdefg30
3f7fc18ee7 Run the utility on all maps and polish stuff 2015-05-03 11:00:50 +02:00
penev92
c5dead9098 Introduce WithSpriteBody trait
Add upgrade rules

Add ISpriteBody
2015-05-03 11:54:27 +03:00
Matthias Mailänder
d999617a3c add the flame animation 2015-05-03 08:50:06 +02:00
Matthias Mailänder
2db26c93ff fix an overlap when the harvester exits to the north 2015-05-03 08:45:35 +02:00
Paul Chote
2682dc4228 Move native deps script into thirdparty to avoid confusion. 2015-05-03 07:47:17 +02:00
Paul Chote
a11e9e348b Configure native dependencies from the makefile. 2015-05-03 07:47:15 +02:00
Paul Chote
89a1bdd4f1 Merge pull request #7475 from abcdefg30/perhealth
Convert the float health percentage to an int percentage
2015-05-03 08:35:58 +12:00
Matthias Mailänder
10e9c774a8 Merge pull request #8079 from penev92/bleed_make
Fix the Windows Make script
2015-05-02 18:45:51 +02:00
penev92
ccd5a56fdb Fix the Windows Make script 2015-05-02 14:04:29 +03:00
Matthias Mailänder
3bd4a97d11 Merge pull request #8068 from Phrohdoh/spawn-actors-power
SpawnActorPower no longer forces removal of the spawned actor.
2015-05-02 12:30:54 +02:00
Matthias Mailänder
cdc98013f7 readonly 2015-05-02 12:14:46 +02:00
Matthias Mailänder
84e247f1eb separate with newlines for readability 2015-05-02 12:14:46 +02:00
Matthias Mailänder
34cd717349 Merge pull request #8071 from pchote/remove-trait-test-plumbing
Remove plumbing for trait unit tests.
2015-05-02 11:34:54 +02:00
Oliver Brakmann
0cfa1d3b1e Merge pull request #8077 from Mailaender/appveyor-improve-cache
Improved AppVeyor build cache
2015-05-02 10:51:12 +02:00
Matthias Mailänder
ebfd6eb8f6 fix trait documentation leaving out certain namespaces 2015-05-02 10:09:22 +02:00
Matthias Mailänder
50ae255395 don't hardcode hidden mods 2015-05-02 10:07:26 +02:00
Matthias Mailänder
a3b5f5a9a2 separate docs by namespace 2015-05-02 10:06:33 +02:00
Matthias Mailänder
0b1c2135db don't redownload cached files 2015-05-02 08:07:41 +02:00
Matthias Mailänder
b87fcacf46 catch all nuget CLI downloads 2015-05-02 08:02:47 +02:00
Matthias Mailänder
7cbdc07ca3 add a looping sound trait 2015-05-02 06:59:57 +02:00
Paul Chote
9edc0675f0 Merge pull request #7953 from Mailaender/github-release-thirdparty
Removed all remaining binaries from thirdparty
2015-05-02 08:57:44 +12:00
Matthias Mailänder
7cef5cfbfd clean Windows dependencies as well 2015-05-01 21:49:13 +02:00
Matthias Mailänder
30a0eb6082 remove non-existent DLL from list 2015-05-01 21:49:13 +02:00
Matthias Mailänder
753045ca65 clean the thirdparty directory, too 2015-05-01 21:49:13 +02:00
Matthias Mailänder
a43d303eb7 use curl everywhere to run out of the box on Mac 2015-05-01 21:49:11 +02:00
Oliver Brakmann
3cda61a13a Merge pull request #8014 from abcdefg30/hijacksurvival
Fix a problem with hijackers in the survival maps
2015-05-01 15:58:47 +02:00
Matthias Mailänder
7be62f3bbb Merge pull request #7986 from abcdefg30/mtm
Updated Monster Tank Madness
2015-05-01 14:30:23 +02:00
abcdefg30
51433e7c64 Updated all maps with the utility 2015-05-01 14:16:21 +02:00
abcdefg30
95e3713b69 Add an upgrade rule 2015-05-01 14:16:20 +02:00
abcdefg30
8d2307db83 Convert the float health percentage to an int one 2015-05-01 14:16:19 +02:00
Matthias Mailänder
8a514ee143 remove outdated documentation 2015-05-01 11:45:12 +02:00
Matthias Mailänder
78588753e8 fetch Eluant from GitHub 2015-05-01 11:45:12 +02:00
Matthias Mailänder
adddf1245b fetch SDL2-CS from GitHub 2015-05-01 11:45:12 +02:00
Matthias Mailänder
732001f3f3 Merge pull request #7696 from Robmaister/bleed
Updated SharpFont to 3.0.0, adjusted font rendering code for new fixed-point types
2015-05-01 11:41:20 +02:00
Pavel Penev
dacf094956 Merge pull request #7981 from Mailaender/ts-apc
Added the amphibious mode to the Tiberian Sun APC
2015-05-01 11:52:27 +03:00
Matthias Mailänder
fa0ce88f70 change voxel image on water terrain type for APC 2015-05-01 10:37:17 +02:00
Paul Chote
b1e285f243 Remove Moq dependency. 2015-05-01 16:29:31 +12:00
David Jiménez
044b51742f Remove plumbing for trait unit tests. 2015-05-01 16:24:14 +12:00
Paul Chote
8d0acaaa4f Merge pull request #8053 from reaperrr/fix-td-bluetib-editor
Fixes blue tiberium not appearing in legacy editor (TD)
2015-05-01 14:10:54 +12:00
Paul Chote
68eb73fe34 Merge pull request #8063 from Phrohdoh/silent-curl
Silence curl output for OS X native dependencies.
2015-05-01 14:05:30 +12:00
Taryn Hill
7a4076630f SpawnActorPower no longer forces removal of the spawned actor. 2015-04-30 18:35:06 -05:00
sinf
5991a9b439 Added quick build feature 2015-05-01 01:40:26 +03:00
Pavel Penev
f9baa38169 Merge pull request #8067 from Phrohdoh/terms-sprite-effect
Correct terminology and add readonly modifiers in SpriteEffect.
2015-05-01 01:27:04 +03:00
Taryn Hill
d279e1dcee Correct terminology and add readonly modifiers in SpriteEffect. 2015-04-30 17:19:13 -05:00
abcdefg30
e6828aa1ff Fix a problem with hijackers in the survival maps 2015-04-30 22:37:43 +02:00
Oliver Brakmann
583b89eb17 Merge pull request #8001 from RoosterDragon/hardware-cursor-fixes
Hardware cursor fixes
2015-04-30 20:24:19 +02:00
Chris Forbes
16c61cb929 Merge pull request #8017 from pchote/map-definitions
Remove magic ActorReference/SmudgeReference parsing
2015-04-30 10:46:27 +12:00
Chris Forbes
1c0809962e Merge pull request #7898 from Phrohdoh/unload-terrain-types
Add UnloadTerrainTypes to Cargo.
2015-04-30 10:36:14 +12:00
Taryn Hill
af78370506 Silence curl output for OS X native dependencies. 2015-04-29 16:58:36 -05:00
Pavel Penev
2d5517fc23 Merge pull request #8057 from RoosterDragon/location-fix
Safer country lookup
2015-04-29 23:57:20 +03:00
Pavel Penev
bf0ee862b2 Merge pull request #8004 from pchote/remove-owner
Remove deprecated Buildable.Owner field.
2015-04-29 23:01:41 +03:00
Paul Chote
d255a3989e Upgrade mod rules. 2015-04-30 07:35:27 +12:00
Paul Chote
97b4509607 Remove deprecated Buildable.Owner field. 2015-04-30 07:35:27 +12:00
Matthias Mailänder
b1dd380db1 Merge pull request #8055 from pchote/scroll-mouseover
Update widget mouseover when scrolling panels.
2015-04-29 21:07:21 +02:00
Paul Chote
981f782cf9 Add a stub for upgrading map actors. 2015-04-30 07:06:14 +12:00
Paul Chote
4b1f541f34 Reorganize actor and smudge loading.
The actor and smudge definitions are now stored
as raw MiniYamlNodes in the map.  It is now the
responsibility of the consumers to parse these
into real objects.
2015-04-30 07:06:14 +12:00
Paul Chote
cd12dcc2ff Update widget mouseover when scrolling panels. 2015-04-30 07:01:52 +12:00
RoosterDragon
748b37ede7 Ensure we never return a null string from LookupCountry. 2015-04-29 19:27:49 +01:00
Oliver Brakmann
ea679d4557 Merge pull request #8054 from pchote/terrain-console
Separate terrain geometry visualization from DevMode.
2015-04-29 20:16:25 +02:00
Matthias Mailänder
f4ba56912f Merge pull request #8043 from pchote/exit-delays
Polish TS war factories.
2015-04-28 22:22:29 +02:00
Matthias Mailänder
6921cb904f Merge pull request #8052 from Phrohdoh/desc-cargo
Add Cargo descriptions.
2015-04-28 21:59:01 +02:00
Taryn Hill
92ba61b149 Add descriptions to CargoInfo members. 2015-04-28 13:48:44 -05:00
Paul Chote
f46e15c63e Separate terrain geometry visualization from DevMode.
Also adds a “terrainoverlay" console command.
2015-04-29 05:26:50 +12:00
reaperrr
365e7a9584 Fix blue tiberium not appearing in legacy editor (TD) 2015-04-28 16:20:08 +02:00
Paul Chote
413eaadb06 Polish TD weapons factory. Fixes #6651. 2015-04-28 19:34:24 +12:00
Paul Chote
dac9431ca3 Polish TS war factories. 2015-04-28 19:25:41 +12:00
Paul Chote
8e9a7fd08b Add an ExitDelay field to allow doors to open before exiting. 2015-04-28 19:18:44 +12:00
Paul Chote
ccf9d8fe97 Merge pull request #8047 from OpenRA/travis-mono-3.12
Updated Travis CI configuration to enforce Mono 3
2015-04-28 18:50:27 +12:00
Matthias Mailänder
c4bc974eb6 Update .travis.yml
define the mono version
2015-04-27 22:01:15 +02:00
Matthias Mailänder
4e950024d3 Merge pull request #8046 from obrakmann/fix_missing_infantry_in_legacy_editor
Fix missing infantry in the legacy editor
2015-04-27 21:28:43 +02:00
Matthias Mailänder
f9fa5cc9b0 Merge pull request #8038 from pchote/resource-slopes
Prevent resources from spawning on ramps.
2015-04-27 21:24:09 +02:00
Taryn Hill
f6a34aab9c Add UnloadTerrainTypes restriction to Cargo. 2015-04-27 12:23:29 -05:00
Oliver Brakmann
d92f4cedc5 Merge pull request #8045 from abcdefg30/fakeweap
Use WithProductionDoorOverlay on fake weap
2015-04-27 19:00:34 +02:00
Oliver Brakmann
22cd68e8f9 Fix missing infantry in the legacy editor
The editor is looking for actor types that implement ILegacyEditorRender, but infantry units don't anymore since #7638.

This moves ILegacyEditorRender to the root of the Render* inheritance tree, so that all actor types have access to it.
2015-04-27 17:52:14 +02:00
abcdefg30
a2c1993561 Merge pull request #7980 from pchote/animation-keys
Remove RenderSprites animation keys.
2015-04-27 17:48:41 +02:00
abcdefg30
cc61f904e0 Use WithProductionDoorOverlay on fake weap 2015-04-27 17:42:58 +02:00
Paul Chote
94f22638be Add an upgrade rule. 2015-04-27 19:47:12 +12:00
Paul Chote
614f96046c Remove RenderSprites animation keys. 2015-04-27 19:38:23 +12:00
Paul Chote
937d2070cc Add a palette for previewing depth info in the asset browser. 2015-04-27 19:21:55 +12:00
Paul Chote
b62d1cae78 Load tmp(ts) depth data. 2015-04-27 19:21:55 +12:00
Paul Chote
8b7453070a Include all the relevant palettes in the asset browser. 2015-04-27 19:21:55 +12:00
Paul Chote
098d69f120 Prevent resources from spawning on ramps. 2015-04-27 19:21:12 +12:00
abcdefg30
c4a63eee30 Merge pull request #7875 from penev92/bleed_exposePlayerReferences
Add upgrade rules support for map PlayerReferences
2015-04-26 22:53:42 +02:00
Oliver Brakmann
d6963567d9 Merge pull request #8034 from pchote/chrome-logic
Some chrome logic cleanups
2015-04-26 22:19:28 +02:00
penev92
2402b56da7 Reorganize PlayerReference loading to enable upgrade rules for them.
The PlayerReference definitions are now stored
as raw MiniYamlNodes in the map.
2015-04-26 23:16:20 +03:00
Oliver Brakmann
a6b8bdf978 Merge pull request #8027 from pchote/update-terrain-vertexbuffer
Update terrain layer when the terrain data changes.
2015-04-26 21:15:45 +02:00
Oliver Brakmann
354b45add7 Merge pull request #8025 from pchote/radar-updates
Use the correct (tile-based) radar color when updating the radar.
2015-04-26 20:30:54 +02:00
Oliver Brakmann
e7cbd5a41b Merge pull request #7937 from pchote/some-editor-prereqs
A collection of ActorPreview improvements.
2015-04-26 18:46:26 +02:00
Paul Chote
bf8e5169f6 Fix colorpicker preview. 2015-04-27 04:14:09 +12:00
Oliver Brakmann
db170f75e5 Merge pull request #8037 from OpenRA/osx-github-usercontent
Fixed Mac OS X dependencies pointing to a redirect
2015-04-26 18:06:38 +02:00
Oliver Brakmann
3ac12323db Merge pull request #8032 from OpenRA/ts-offline-speech-fix
Fixed "building online" played by power off and vice versa on Tiberian Sun
2015-04-26 17:26:12 +02:00
Matthias Mailänder
9bbed8adec Update configure
Fixes #8036
2015-04-26 17:24:49 +02:00
Matthias Mailänder
6653322096 Merge pull request #8011 from penev92/bleed_fixTakeCover
Move prone-related logic from DamageWarhead to TakeCover
2015-04-26 16:20:27 +02:00
Matthias Mailänder
fccbde3c36 Merge pull request #7534 from 42foobar42/nod4a
added mission nod4a
2015-04-26 16:10:31 +02:00
Matthias Mailänder
67c9df62c3 Merge pull request #7829 from sinf/hotkeys
Closes #7369
2015-04-26 16:02:08 +02:00
penev92
36abf2ac41 Add an upgrade rule for TakeCover 2015-04-26 14:29:12 +03:00
penev92
ea01439377 Add an upgrade rule for DamageWarheads 2015-04-26 14:29:10 +03:00
penev92
aa57d5f956 Move prone-related logic from DamageWarhead to TakeCover
Add DamageTypes to DamageWarhead and DamageTypeModifiers to TakeCover
2015-04-26 14:29:08 +03:00
Paul Chote
e0ac3df373 Split perf widgets into their own file. 2015-04-26 23:21:02 +12:00
Paul Chote
da70683c03 Split OrderButtonsChromeLogic into smaller classes. 2015-04-26 23:21:02 +12:00
Alexander Boll
0f0c400657 added mission nod4a
Polish nod04a a bit
2015-04-26 12:59:23 +02:00
Paul Chote
f4987f7258 Add support for multiple logic objects on a widget. 2015-04-26 19:30:28 +12:00
Matthias Mailänder
45ffac350f fix d2k harvester sand overlay 2015-04-26 09:22:23 +02:00
Matthias Mailänder
996445a178 fix the Multiply blend mode 2015-04-26 09:22:23 +02:00
Matthias Mailänder
63e4d40770 add alpha channel to every possible blend mode 2015-04-26 09:22:19 +02:00
Matthias Mailänder
a84345f5d3 add water wakes to APC 2015-04-26 08:54:10 +02:00
Paul Chote
1b31001661 Merge pull request #7974 from Mailaender/ts-hover-wakes
Added the Hovercraft wake animation
2015-04-26 18:50:42 +12:00
Paul Chote
57db20da5d Merge pull request #8028 from RoosterDragon/cache-traits
Cache traits
2015-04-26 18:23:15 +12:00
Paul Chote
8a171bb452 Don’t export certain Init types. 2015-04-26 18:12:21 +12:00
Matthias Mailänder
b5ff247fa5 fix the cnc mpspawn and waypoint palettes 2015-04-26 18:12:21 +12:00
Paul Chote
a2af79ff98 Add support for wall preview neighbours. 2015-04-26 18:12:20 +12:00
Paul Chote
76202a9f6a Fix turret preview z-offsets. 2015-04-26 18:12:20 +12:00
Paul Chote
d5541accda Fix custom palettes in actor previews. 2015-04-26 18:12:20 +12:00
Paul Chote
1256ddc6a6 Account for bibs in ActorPreviews. 2015-04-26 18:12:19 +12:00
Paul Chote
56bf0f36a8 Fix crate actor previews. 2015-04-26 18:12:19 +12:00
Paul Chote
09bad3f0ef Account for damage state in ActorPreviews. 2015-04-26 18:12:19 +12:00
Matthias Mailänder
6d03eef998 Update sounds-generic.yaml
switch building online/offline
2015-04-26 07:31:51 +02:00
Pavel Penev
ef55cb6528 Merge pull request #7862 from Mailaender/ts-factory-doors
Fixed the Tiberian Sun weapon factory doors
2015-04-26 01:12:11 +03:00
Paul Chote
8f93d7b5d7 Simplify and fix animation glitches. 2015-04-25 22:52:14 +02:00
Matthias Mailänder
75624560d2 remove trailing tabs 2015-04-25 22:52:14 +02:00
Matthias Mailänder
b07d125d18 add an upgrade rule 2015-04-25 22:52:14 +02:00
Matthias Mailänder
8c8b9b1cc3 deprecate RenderBuildingWarFactory 2015-04-25 22:52:14 +02:00
Matthias Mailänder
9a37e77d1a fix the weapon factory door opening animation 2015-04-25 22:52:14 +02:00
Matthias Mailänder
9c20de7d98 readonly and don't sync cosmetic traits 2015-04-25 22:52:14 +02:00
RoosterDragon
fb0cab7481 Cache results of TraitsImplementing calls.
If a class is caching the TraitsImplementing enumerable, instead cache the results of enumerating it to an array. The avoids having to enumerate the sequence each time it is needed.
2015-04-25 20:42:27 +01:00
RoosterDragon
2937a31463 Make IsDisabled a method on Actor.
This allows us to cache the disabled traits, which simplifies life for some callers since we relieve them of having to cache it, as well as improving perf for all IsDisabled calls.
2015-04-25 20:42:26 +01:00
RoosterDragon
500a33b590 Cache some trait lookups that occur frequently. 2015-04-25 20:41:49 +01:00
RoosterDragon
6125d7c117 Rename existing fields that are caching TraitsImplementing calls for consistency. 2015-04-25 20:41:48 +01:00
Paul Chote
7df12cb3e9 Update terrain layer when the terrain data changes. 2015-04-26 07:35:07 +12:00
Paul Chote
acee680083 Use the correct (tile-based) radar color when updating the radar. 2015-04-26 07:19:57 +12:00
RoosterDragon
087b407f46 Avoid ScrollPanelWidget drawing invisible child items.
If child items in a scroll panel will be outside the scissor area, then we can avoid drawing them at all. If a scroll panel has many items, this reduces to the draw cost closer to those visible in the panel, rather than costing for all the items.
2015-04-25 18:55:47 +01:00
RoosterDragon
60238a858d Load replays asynchronously and in parallel.
This prevents the UI blocking, and also speeds up loading time for getting all the replays displayed.
2015-04-25 18:55:46 +01:00
RoosterDragon
d2d2f4a838 Made FieldLoader thread-safe, and cache some expensive reflection calls. 2015-04-25 18:55:46 +01:00
RoosterDragon
109ccbb0b0 Added ConcurrentCache, a thread-safe Cache. 2015-04-25 18:55:45 +01:00
Oliver Brakmann
a48a878a71 Merge pull request #7983 from pchote/radar-colors
Adjust IRadarSignature to support per-cell colors.
2015-04-25 16:38:28 +02:00
Robert Rouhani
5d4ca1d52f Fixed bug where the SDL2 directory wouldn't be deleted 2015-04-25 10:33:20 -04:00
Robert Rouhani
d3528d6ed8 Removed zlib from NSIS script 2015-04-25 10:30:01 -04:00
Robert Rouhani
7ccd5521e0 Removed zlib dependency and chose a specific version of SharpFont.Dependencies. 2015-04-25 10:30:00 -04:00
Robert Rouhani
4987a6b24c Updated SharpFont to 3.0.0, adjusted font rendering code for new fixed-point types. 2015-04-25 10:26:41 -04:00
abcdefg30
2a80642c6a Add a new line at the end of descriptions for better readability 2015-04-25 15:47:18 +02:00
abcdefg30
100a58e12c Use OnPlayerDiscovered instead of OnEnteredFootprint
in Monster Tank Madness
2015-04-25 15:47:17 +02:00
Oliver Brakmann
bc7fd81297 Merge pull request #7840 from sinf/fix7838
Fixed parsing of hotkeys with no name (such as tilde)
2015-04-25 14:19:25 +02:00
sinf
5e86e63b37 Fixed parsing of hotkeys with no name (such as tilde) 2015-04-25 15:01:00 +03:00
Matthias Mailänder
175e9a14b7 Merge pull request #8000 from pchote/bogus-yaml-removals
Fix yaml merging
2015-04-25 13:42:18 +02:00
Matthias Mailänder
14777e46c4 Merge pull request #7933 from pchote/new-osx-launcher
New OSX launcher
2015-04-25 12:41:28 +02:00
Oliver Brakmann
ed5e8beedd Merge pull request #7978 from pchote/orca
Fix orca’s flying sequences.
2015-04-25 12:30:40 +02:00
sinf
9250c61473 Added Hotkeys for support powers 2015-04-25 13:15:06 +03:00
Paul Chote
722f4725d5 Fix orca’s flying sequences. 2015-04-25 22:06:02 +12:00
Matthias Mailänder
70db0fa784 add the Hovercraft wake animation 2015-04-25 11:26:59 +02:00
Oliver Brakmann
76ff0eddb9 Merge pull request #7908 from penev92/bleed_minimapCheat
Add a DevCommand for enabling the minimap
2015-04-25 11:13:23 +02:00
Matthias Mailänder
1476a0eb70 Merge pull request #7847 from RoosterDragon/screen-map-refactor-perf
Refactored ScreenMap & improved perf of updates, removals and region lookups
2015-04-25 10:12:52 +02:00
Paul Chote
6b79af4d62 Merge pull request #7957 from Mailaender/ts-powerdown-indicator-palette
Fixed Tiberian Sun building repair and power down indicator palette
2015-04-25 19:50:21 +12:00
Matthias Mailänder
a5f60deedd fix TS repair indicator palette 2015-04-25 09:36:20 +02:00
Paul Chote
d8f24adcc7 Merge pull request #7853 from Mailaender/alpha-experiments
Added AlphaImage support
2015-04-25 19:03:25 +12:00
Paul Chote
e452aba9e4 Merge pull request #7850 from Mailaender/appveyor-cache
Tried to cache AppVeyor downloads
2015-04-25 18:57:57 +12:00
Paul Chote
1e30fdb333 Merge pull request #7909 from reaperrr/projectile-cleanup2
Projectiles cleanup Part 2
2015-04-25 18:41:06 +12:00
Paul Chote
27127dd1a9 Merge pull request #7907 from rneatherway/nuget-version-fix
Remove version information from NuGet folder names
2015-04-25 18:28:45 +12:00
Paul Chote
69fed6a688 Merge pull request #7865 from Phrohdoh/deploy-to-upgrade
Implement DeployToUpgrade.
2015-04-25 18:11:34 +12:00
Paul Chote
4116da7c01 Merge pull request #7857 from sinf/glgl
Print GLSL info log if shader compilation fails
2015-04-25 17:56:32 +12:00
Paul Chote
ddc3bd3a1f Merge pull request #7887 from Mailaender/unhardcode-render-sequence
Unhardcoded and self-documented render sequences
2015-04-25 17:35:07 +12:00
Pavel Penev
479e81d7f5 Merge pull request #7944 from LunaticEdit/bleed
EndOfStream first chance exceptions on server
2015-04-25 07:17:24 +03:00
Pavel Penev
6d64217769 Merge pull request #7863 from Mailaender/global-palette-effect
Added a global palette effect for day/night lighting
2015-04-25 07:11:01 +03:00
Pavel Penev
f759530964 Merge pull request #7854 from sinf/tsnotifications
Add more TS notification sounds
2015-04-25 07:06:57 +03:00
Pavel Penev
f372f0c466 Merge pull request #7726 from Phrohdoh/prevent-eod
Prevent EjectOnDeath.
2015-04-25 07:03:00 +03:00
Pavel Penev
c9e89cc7f5 Merge pull request #7832 from Phrohdoh/cleanup
Another cleanup.
2015-04-25 06:53:16 +03:00
Pavel Penev
494d2f274a Merge pull request #7463 from Smith00101010/gdi05b
Added CnC: gdi05b
2015-04-25 06:48:06 +03:00
reaperrr
b100091ad1 Merge pull request #7967 from abcdefg30/tsfixes
Add descriptions to all TS units
2015-04-25 01:25:26 +02:00
abcdefg30
158659abcf Add descriptions for all buildable actors 2015-04-24 16:32:15 +02:00
RoosterDragon
09dc1db651 Refactored ScreenMap & improved perf of updates, removals and region lookups.
Reduce code duplication by extracting a common class to deal with spatial partitioning of actors, and use some (cached) delegates to reduce duplication further without affecting performance too much.

Speed up updates and removal of actors by caching their location so we only need to update or remove them from bins they are actually in (typically very few), compared to having to check every bin for removals which is much more work in comparison.

Speed up checking for actors inside a region by checking if items are located entirely within the bin they are located in. If so, we don't need to add them to the hash-set for de-duplication purposes which is fairly expensive.
2015-04-23 21:06:09 +01:00
Paul Chote
8a1f9261c3 Convert hidden [Desc] to a <summary>. 2015-04-22 21:24:48 +12:00
Paul Chote
44f2dd5a3d Extract common inherits in ra defaults.yaml. 2015-04-22 21:24:47 +12:00
Paul Chote
2cbe269c1e Support multiple inheritance for actor rules. 2015-04-22 21:24:47 +12:00
Paul Chote
8de497925d Fix map yaml removals. 2015-04-22 21:24:47 +12:00
Paul Chote
7dd51663b6 Fix the MiniYaml unit tests. Fixes #7999. 2015-04-22 19:58:10 +12:00
Paul Chote
29b7bc4d79 Restore RallyPoint removal in soviet-01. 2015-04-22 19:58:10 +12:00
Paul Chote
0a43b3da72 Rewrite yaml merging block removal.
Fixes #2922, #6818.
2015-04-22 19:58:10 +12:00
RoosterDragon
13078c820b Retry hardware cursor creation.
On Windows, a spurious error sometimes occur when creating cursors. We retry a few times before before having to give up and fall back to software cursors.
2015-04-21 20:46:22 +01:00
RoosterDragon
c963806dae Prevent leaking of hardware cursors.
Added the lacking finialization machinery, ensured disposal under exceptional circumstances and also ensure the game calls dispose on old cursors before creating new ones.
2015-04-21 20:46:21 +01:00
Paul Chote
145f7b28f5 Adjust IRadarSignature to support per-cell colors. 2015-04-19 22:27:47 +12:00
Matthias Mailänder
e8493ab855 fix TS power down palette 2015-04-18 14:11:51 +02:00
reaperrr
dd689de0e6 Fixed alphatst.shp 2015-04-18 13:41:53 +02:00
Matthias Mailänder
fdf58b29e2 setup the alpha image lighting for the light spot 2015-04-18 13:41:53 +02:00
Matthias Mailänder
868e404b22 add 2 new blend modes: Multiplicative, DoubleMultiplicative 2015-04-18 13:41:53 +02:00
Matthias Mailänder
7157cc0a9f unhardcode and self-document render sequences 2015-04-18 08:44:43 +02:00
LunaticEdit
575b568c6a EndOfStream first chance exceptions on server
The server class reads the memory stream in a forever loop until an
EndOfStreamException occurs. This causes repeated first chance
exceptions due to EndOfStreamException. This change verifies that the
memory stream's reader position is not past the length of the memory
stream.
2015-04-13 19:09:32 -04:00
Moshe Schmidt
7d6f367d84 Added CnC: gdi05b 2015-04-13 22:31:51 +02:00
Taryn Hill
0717ca57ea Implement DeployToUpgrade.
Expose some deploy-related cursors to yaml.
2015-04-13 10:04:03 -05:00
Robin Neatherway
2dba45ebac Remove version information from NuGet folder names
This makes the names consistent and prevents changes in versions of
dependencies from breaking the build.
2015-04-13 15:41:17 +01:00
Paul Chote
03572ecb3a Remove binaries from thirdparty/osx dir. 2015-04-12 21:22:26 +01:00
Paul Chote
85cd7308b4 Replace OSX launcher with a native-code version.
- Binary files hosted externally.
- Fixes dialogs hijacking Finder.
- Fixes dock icon being lost when restarting.
- Adds openra:// url handling.
- Adds .orarep file handling.
- Minimum OS X version is now 10.6.
2015-04-12 21:21:46 +01:00
Matthias Mailänder
56405f42ab add a global palette effect for day/night ambient 2015-04-11 12:05:25 +02:00
penev92
e3012ae505 Enable minimap toggling via the DisableShroud dev command 2015-04-10 09:42:07 +03:00
reaperrr
6b7ffdc1b7 De-hardcoded GravityBomb idle and opening sequence
Avoid checking for sequence if Image is null.
2015-04-10 00:39:34 +02:00
reaperrr
b7bb719173 De-hardcoded LaserZap animation sequence 2015-04-10 00:39:32 +02:00
Taryn Hill
96d6ea79ce Remove explicit private.
Remove unnecessary delegate.
Use extension method syntax.
Fix HealthInfo.NotifyAppliedDamage’s desc.
Remove unused using directives.
Remove explicit type declaration in Manifest.
2015-04-09 13:59:20 -05:00
Taryn Hill
2bac9f6c64 Add interface IPreventsEjectOnDeath. 2015-04-07 14:02:27 -05:00
Paul Chote
27c4512ec7 Import lighting parameters for TS maps. 2015-04-06 08:50:08 +02:00
sinf
73ef8f855a Print GLSL info log if shader compilation fails 2015-04-05 11:03:28 +03:00
sinf
9ada9fb343 Add more TS notification sounds 2015-04-05 00:42:36 +03:00
Matthias Mailänder
109392e7f9 try to cache the native DLL dependencies 2015-04-04 12:01:13 +02:00
Matthias Mailänder
611067da7e try to cache build dependency downloads 2015-04-04 12:00:58 +02:00
1632 changed files with 74157 additions and 36031 deletions

19
.gitignore vendored
View File

@@ -28,22 +28,8 @@ 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
thirdparty/download/*
*.mmdb.gz
# backup files by various editors
*~
@@ -76,6 +62,7 @@ OpenRA.Launcher.Mac/OpenRA.xcodeproj/*.mode1v3
DOCUMENTATION.md
Lua-API.md
*.html
openra.6
# StyleCop
*.Cache

View File

@@ -2,21 +2,37 @@
# see travis-ci.org for details
language: csharp
mono: 4.0.0
# Use the Docker-based infrastructure
# http://docs.travis-ci.com/user/migrating-from-legacy
sudo: false
cache: apt
cache:
directories:
- thirdparty/download
addons:
apt:
packages:
- lua5.1
- nsis
- nsis-common
- dpkg
- markdown
# Environment variables
env:
secure: "C0+Hlfa0YGErxUuWV00Tj6p45otC/D3YwYFuLpi2mj1rDFn/4dgh5WRngjvdDBVbXJ3duaZ78jPHWm1jr7vn2jqj9yETsCIK9psWd38ep/FEBM0SDr6MUD89OuXk/YyvxJAE+UXF6bXg7giey09g/CwBigjMW7ynET3wNAWPHPs="
# Fetch dependencies
# Run the build script
# call RALint to check for YAML errors
# Check source code with StyleCop
# call OpenRA to check for YAML errors
script:
- travis_retry make cli-dependencies
- travis_retry make all-dependencies
- make all
- make check
- make check-scripts
- make test
# Automatically update the trait documentation and Lua API
@@ -29,6 +45,7 @@ branches:
- /^release-.*$/
- /^playtest-.*$/
- /^pkgtest-.*$/
- /^prep-.*$/
- bleed
# Notify developers when build passed/failed.
@@ -52,6 +69,7 @@ deploy:
api_key:
secure: "g/LU11f+mjqv+lj0sR1UliHwogXL4ofJUwoG5Dbqlvdf5UTLWytw/OWSCv8RGyuh10miyWeaoqHh1cn2C1IFhUEqN1sSeKKKOWOTvJ2FR5mzi9uH3d/MOBzG5icQ7Qh0fZ1YPz5RaJJhYu6bmfvA/1gD49GoaX2kxQL4J5cEBgg="
file:
- build/OpenRA-${TRAVIS_TAG}.exe
- build/OpenRA-${TRAVIS_TAG}.zip
- build/openra_${DOTVERSION}_all.deb
skip_cleanup: true

28
AUTHORS
View File

@@ -3,19 +3,24 @@ hard work of many contributors.
The OpenRA developers are:
* Chris Forbes (chrisf)
* Curtis Shmyr (hamb)
* Igor Popov (ihptru)
* Lukas Franke (abcdefg30)
* Matthias Mailänder (Mailaender)
* Oliver Brakmann (obrakmann)
* Paul Chote (pchote)
* ScottNZ
* Pavel Penev (penev92)
* Reaperrr
* Tom Roostan (RoosterDragon)
Previous developers included:
* Alli Witheford (alzeih)
* Caleb Anderson (RobotCaleb)
* Curtis Shmyr (hamb)
* Daniel Hernandez (Mancano)
* Megan Bowra-Dean (beedee)
* Mike Bundy (kehaar)
* Robert Pepperell (ytinasni)
* ScottNZ
Also thanks to:
* Adam Valy (Tschokky)
@@ -30,44 +35,53 @@ Also thanks to:
* Arik Lirette (Angusm3)
* Barnaby Smith (mvi)
* Bellator
* Biofreak
* Braxton Williams (Buddytex)
* Bryan Wilbur
* Bugra Cuhadaroglu (BugraC)
* Christer Ulfsparre (Holloweye)
* Chris Grant (Unit158)
* clem
* Cody Brittain (Generalcamo)
* D2k Sardaukar
* D'Arcy Rush (r34ch)
* Daniel Derejvanik (Harisson)
* Danny Keary (Dan9550)
* David Jiménez (Rydra)
* David Russell (DavidARussell)
* DeadlySurprise
* Dmitri Suvorov (suvjunmd)
* Erasmus Schroder (rasco)
* Eric Bajumpaa (SteelPhase)
* Evgeniy Sergeev (evgeniysergeev)
* Fahrradkette
* Frank Razenberg (zzattack)
* Gareth Needham (Ripley`)
* Glen Anderson (GlenAnderson)
* Glenn Martin Jensen (Baxxster)
* Gordon Martin (Happy0)
* Guido Lipke (LipkeGu)
* Gyula Zimmermann (Graion Dilach)
* Hervé Matysiak (Herve-M)
* Huw Pascoe
* Ian T. Jacobsen (Smilex)
* Igor Popov (ihptru)
* Imago
* Iran
* Jacob Dufault (jacobdufault)
* James Dunne (jsd)
* James Gilbert (DSUK)
* Jan-Willem Buurlage (jwbuurlage)
* Jason (atlimit8)
* Jeff Harris (jeff_1amstudios)
* Jes
* Joakim Lindberg (booom3)
* Joppy Furr
* Kanar
* Kenny Hoxworth (hoxworth)
* Krishnakanth Mallik
* Kyrre Soerensen (zypres)
* Lawrence Wang
* Lesueur Benjamin (Valkirie)
* Lukas Franke (abcdefg30)
* Maarten Meuris (Nyerguds)
* Mark Olson (markolson)
* Matija Hustic (matija-hustic)
@@ -85,13 +99,11 @@ Also thanks to:
* Olaf van der Spek
* Paolo Chiodi (paolochiodi)
* Paul Dovydaitis (pdovy)
* Pavel Penev (penev92)
* Pavlos Touboulidis (pav)
* Pizzaoverhead
* Psydev
* Raymond Bedrossian (Squiggles211)
* Raymond Martineau (mart0258)
* Reaperrr
* Riderr3
* Rikhardur Bjarni Einarsson (WolfGaming)
* Sascha Biedermann (bidifx)
@@ -102,7 +114,6 @@ Also thanks to:
* Teemu Nieminen (Temeez)
* Tim Mylemans (gecko)
* Tirili
* Tom Roostan (RoosterDragon)
* Tristan Keating (Kilkakon)
* Tristan Mühlbacher (MicroBit)
* Vladimir Komarov (VrKomarov)
@@ -146,6 +157,9 @@ Motmans and distributed under the MIT license.
Using ICSharpCode.SharpZipLib initially by Mike
Krueger and distributed under the GNU GPL terms.
Using SmartIrc4Net developed by Mirco Bauer
distributed under the LGPL version 2.1 or later.
Finally, special thanks goes to the original teams
at Westwood Studios and EA for creating the classic

View File

@@ -4,7 +4,10 @@
* Have you read the [FAQ](https://github.com/OpenRA/OpenRA/wiki/FAQ)?
* Add the appropriate log files on crashes.
* Mention the version you have tested against.
* Please be specific on how to reproduce the problem.
* Do not submit duplicate issues. Search first.
* Avoid including multiple requests/bugs into a single issue.
## Patches

Binary file not shown.

203
Makefile
View File

@@ -1,10 +1,10 @@
############################# INSTRUCTIONS #############################
#
# to compile, run:
# make
# make [DEBUG=false]
#
# to compile with development tools, run:
# make all
# make all [DEBUG=false]
#
# to check the official mods for erroneous yaml files, run:
# make test
@@ -22,7 +22,7 @@
# make [prefix=/foo] [bindir=/bar/bin] install-all
#
# to install Linux startup scripts, desktop files and icons:
# make install-linux-shortcuts
# make install-linux-shortcuts [DEBUG=false]
#
# to uninstall, run:
# make uninstall
@@ -38,9 +38,17 @@
############################## TOOLCHAIN ###############################
#
CSC = dmcs
CSFLAGS = -nologo -warn:4 -debug:full -optimize- -codepage:utf8 -unsafe -warnaserror
DEFINE = DEBUG;TRACE
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
CSFLAGS = -nologo -warn:4 -codepage:utf8 -unsafe -warnaserror
DEFINE = TRACE
COMMON_LIBS = System.dll System.Core.dll System.Data.dll System.Data.DataSetExtensions.dll System.Drawing.dll System.Xml.dll thirdparty/download/ICSharpCode.SharpZipLib.dll thirdparty/download/FuzzyLogicLibrary.dll thirdparty/download/Mono.Nat.dll thirdparty/download/MaxMind.Db.dll thirdparty/download/MaxMind.GeoIP2.dll thirdparty/download/Eluant.dll thirdparty/download/SmarIrc4net.dll
DEBUG = true
ifeq ($(DEBUG), $(filter $(DEBUG),false no n off 0))
CSFLAGS += -debug:pdbonly -optimize+
else
CSFLAGS += -debug:full -optimize-
DEFINE := DEBUG;$(DEFINE)
endif
@@ -50,6 +58,7 @@ COMMON_LIBS = System.dll System.Core.dll System.Data.dll System.Data.DataSetExte
prefix ?= /usr/local
datarootdir ?= $(prefix)/share
datadir ?= $(datarootdir)
mandir ?= $(datarootdir)/man/
bindir ?= $(prefix)/bin
libdir ?= $(prefix)/lib
gameinstalldir ?= $(libdir)/openra
@@ -70,10 +79,18 @@ INSTALL_PROGRAM = $(INSTALL) -m755
INSTALL_DATA = $(INSTALL) -m644
# program targets
CORE = rsdl2 rnull game utility
TOOLS = editor crashdialog
CORE = pdefault pnull game utility
TOOLS = gamemonitor
VERSION = $(shell git name-rev --name-only --tags --no-undefined HEAD 2>/dev/null || echo git-`git rev-parse --short HEAD`)
# dependencies
UNAME_S := $(shell uname -s)
ifeq ($(UNAME_S),Darwin)
os-dependencies = osx-dependencies
else
os-dependencies = linux-dependencies
endif
######################## PROGRAM TARGET RULES ##########################
@@ -83,32 +100,32 @@ VERSION = $(shell git name-rev --name-only --tags --no-undefined HEAD 2>/dev
game_SRCS := $(shell find OpenRA.Game/ -iname '*.cs')
game_TARGET = OpenRA.Game.exe
game_KIND = winexe
game_LIBS = $(COMMON_LIBS) $(game_DEPS) thirdparty/SDL2-CS.dll thirdparty/SharpFont.dll
game_LIBS = $(COMMON_LIBS) $(game_DEPS) thirdparty/download/SharpFont.dll
game_FLAGS = -win32icon:OpenRA.Game/OpenRA.ico
PROGRAMS += game
game: $(game_TARGET)
# Renderer dlls
rsdl2_SRCS := $(shell find OpenRA.Renderer.Sdl2/ -iname '*.cs')
rsdl2_TARGET = OpenRA.Renderer.Sdl2.dll
rsdl2_KIND = library
rsdl2_DEPS = $(game_TARGET)
rsdl2_LIBS = $(COMMON_LIBS) thirdparty/SDL2-CS.dll $(rsdl2_DEPS)
# Platform dlls
pdefault_SRCS := $(shell find OpenRA.Platforms.Default/ -iname '*.cs')
pdefault_TARGET = OpenRA.Platforms.Default.dll
pdefault_KIND = library
pdefault_DEPS = $(game_TARGET)
pdefault_LIBS = $(COMMON_LIBS) thirdparty/download/SDL2-CS.dll $(pdefault_DEPS)
rnull_SRCS := $(shell find OpenRA.Renderer.Null/ -iname '*.cs')
rnull_TARGET = OpenRA.Renderer.Null.dll
rnull_KIND = library
rnull_DEPS = $(game_TARGET)
rnull_LIBS = $(COMMON_LIBS) $(rnull_DEPS)
PROGRAMS += rsdl2 rnull
renderers: $(rsdl2_TARGET) $(rnull_TARGET)
pnull_SRCS := $(shell find OpenRA.Platforms.Null/ -iname '*.cs')
pnull_TARGET = OpenRA.Platforms.Null.dll
pnull_KIND = library
pnull_DEPS = $(game_TARGET)
pnull_LIBS = $(COMMON_LIBS) $(pnull_DEPS)
PROGRAMS += pdefault pnull
platforms: $(pdefault_TARGET) $(pnull_TARGET)
# 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
mod_common_LIBS = $(COMMON_LIBS) $(STD_MOD_LIBS) thirdparty/download/StyleCop.dll thirdparty/download/StyleCop.CSharp.dll thirdparty/download/StyleCop.CSharp.Rules.dll
PROGRAMS += mod_common
mod_common: $(mod_common_TARGET)
@@ -130,8 +147,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_common_TARGET) $(mod_ra_TARGET)
mod_cnc_LIBS = $(COMMON_LIBS) $(STD_MOD_LIBS) $(mod_common_TARGET) $(mod_ra_TARGET)
mod_cnc_DEPS = $(STD_MOD_DEPS) $(mod_common_TARGET)
mod_cnc_LIBS = $(COMMON_LIBS) $(STD_MOD_LIBS) $(mod_common_TARGET)
PROGRAMS += mod_cnc
mod_cnc: $(mod_cnc_TARGET)
@@ -139,8 +156,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_common_TARGET) $(mod_ra_TARGET) $(mod_cnc_TARGET)
mod_d2k_LIBS = $(COMMON_LIBS) $(STD_MOD_LIBS) $(mod_common_TARGET) $(mod_ra_TARGET)
mod_d2k_DEPS = $(STD_MOD_DEPS) $(mod_common_TARGET)
mod_d2k_LIBS = $(COMMON_LIBS) $(STD_MOD_LIBS) $(mod_common_TARGET)
PROGRAMS += mod_d2k
mod_d2k: $(mod_d2k_TARGET)
@@ -148,36 +165,27 @@ 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_common_TARGET) $(mod_ra_TARGET)
mod_ts_LIBS = $(COMMON_LIBS) $(STD_MOD_LIBS) $(mod_common_TARGET) $(mod_ra_TARGET)
mod_ts_DEPS = $(STD_MOD_DEPS) $(mod_common_TARGET)
mod_ts_LIBS = $(COMMON_LIBS) $(STD_MOD_LIBS) $(mod_common_TARGET)
PROGRAMS += mod_ts
mod_ts: $(mod_ts_TARGET)
##### Tools #####
# Map Editor
editor_SRCS := $(shell find OpenRA.Editor/ -iname '*.cs')
editor_TARGET = OpenRA.Editor.exe
editor_KIND = winexe
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
PROGRAMS += editor
OpenRA.Editor.MapSelect.resources:
resgen2 OpenRA.Editor/MapSelect.resx OpenRA.Editor.MapSelect.resources 1> /dev/null
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)
check-scripts:
@echo
@echo "Checking for Lua syntax errors..."
@luac -p $(shell find mods/*/maps/* -iname '*.lua')
@luac -p $(shell find lua/* -iname '*.lua')
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 "Checking for code style violations in OpenRA.Platforms.Default..."
@mono --debug OpenRA.Utility.exe ra --check-code-style OpenRA.Platforms.Default
@echo
@echo "Checking for code style violations in OpenRA.Platforms.Null..."
@mono --debug OpenRA.Utility.exe ra --check-code-style OpenRA.Platforms.Null
@echo
@echo "Checking for code style violations in OpenRA.GameMonitor..."
@mono --debug OpenRA.Utility.exe ra --check-code-style OpenRA.GameMonitor
@@ -197,12 +205,6 @@ check: utility mods
@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
@@ -240,7 +242,7 @@ utility_SRCS := $(shell find OpenRA.Utility/ -iname '*.cs')
utility_TARGET = OpenRA.Utility.exe
utility_KIND = exe
utility_DEPS = $(game_TARGET)
utility_LIBS = $(COMMON_LIBS) $(utility_DEPS) thirdparty/ICSharpCode.SharpZipLib.dll
utility_LIBS = $(COMMON_LIBS) $(utility_DEPS) thirdparty/download/ICSharpCode.SharpZipLib.dll
PROGRAMS += utility
utility: $(utility_TARGET)
@@ -271,47 +273,62 @@ $(foreach prog,$(PROGRAMS),$(eval $(call BUILD_ASSEMBLY,$(prog))))
########################## MAKE/INSTALL RULES ##########################
#
default: cli-dependencies core
default: core
core: game renderers mods utility
core: game platforms mods utility
tools: editor gamemonitor
tools: gamemonitor
package: cli-dependencies core editor gamemonitor docs version
package: all-dependencies core tools docs version
mods: mod_common mod_ra mod_cnc mod_d2k mod_ts
all: cli-dependencies core tools
all: dependencies core tools
clean:
@-$(RM_F) *.exe *.dll ./OpenRA*/*.dll ./OpenRA*/*.mdb *.mdb mods/**/*.dll mods/**/*.mdb *.resources
@-$(RM_F) *.exe *.dll *.dylib *.dll.config ./OpenRA*/*.dll ./OpenRA*/*.mdb *.mdb mods/**/*.dll mods/**/*.mdb *.resources
@-$(RM_RF) ./*/bin ./*/obj
@-$(RM_RF) ./thirdparty/download
distclean: clean
dependencies: cli-dependencies native-dependencies
cli-dependencies:
@./thirdparty/fetch-thirdparty-deps.sh
@ $(CP_R) thirdparty/download/*.dll .
@ $(CP_R) thirdparty/download/*.dll.config .
@ $(CP) thirdparty/SDL2-CS.dll.config .
linux-dependencies: cli-dependencies linux-native-dependencies
linux-native-dependencies:
@./thirdparty/configure-native-deps.sh
windows-dependencies:
cd thirdparty && ./fetch-thirdparty-deps-windows.sh && cd ..
@./thirdparty/fetch-thirdparty-deps-windows.sh
cli-dependencies:
cd thirdparty && ./fetch-thirdparty-deps.sh && cd ..
@ $(CP_R) thirdparty/*.dll .
@ $(CP_R) thirdparty/*.dll.config .
osx-dependencies: cli-dependencies
@./thirdparty/fetch-thirdparty-deps-osx.sh
@ $(CP_R) thirdparty/download/osx/*.dylib .
@ $(CP_R) thirdparty/download/osx/*.dll.config .
native-dependencies:
@./configure
dependencies: $(os-dependencies)
@./thirdparty/fetch-geoip-db.sh
@ $(CP) thirdparty/download/GeoLite2-Country.mmdb.gz .
version: mods/ra/mod.yaml mods/cnc/mod.yaml mods/d2k/mod.yaml mods/modchooser/mod.yaml
all-dependencies: cli-dependencies windows-dependencies osx-dependencies
version: mods/ra/mod.yaml mods/cnc/mod.yaml mods/d2k/mod.yaml mods/ts/mod.yaml mods/modchooser/mod.yaml mods/all/mod.yaml
@for i in $? ; do \
awk '{sub("Version:.*$$","Version: $(VERSION)"); print $0}' $${i} > $${i}.tmp && \
mv -f $${i}.tmp $${i} ; \
done
# Documentation (d2k depends on all mod libraries)
docs: utility mods version
@mono --debug OpenRA.Utility.exe d2k --docs > DOCUMENTATION.md
@mono --debug OpenRA.Utility.exe ra --lua-docs > Lua-API.md
@mono --debug OpenRA.Utility.exe all --docs > DOCUMENTATION.md
@mono --debug OpenRA.Utility.exe all --lua-docs > Lua-API.md
man-page: utility mods
@mono --debug OpenRA.Utility.exe all --man-page > openra.6
install: install-core
@@ -335,7 +352,7 @@ install-core: default
@$(CP_R) mods/modchooser "$(DATA_INSTALL_DIR)/mods/"
@$(INSTALL_DATA) "global mix database.dat" "$(DATA_INSTALL_DIR)/global mix database.dat"
@$(INSTALL_DATA) "GeoLite2-Country.mmdb" "$(DATA_INSTALL_DIR)/GeoLite2-Country.mmdb"
@$(INSTALL_DATA) "GeoLite2-Country.mmdb.gz" "$(DATA_INSTALL_DIR)/GeoLite2-Country.mmdb.gz"
@$(INSTALL_DATA) AUTHORS "$(DATA_INSTALL_DIR)/AUTHORS"
@$(INSTALL_DATA) COPYING "$(DATA_INSTALL_DIR)/COPYING"
@@ -352,8 +369,9 @@ install-core: default
@$(INSTALL_PROGRAM) MaxMind.GeoIP2.dll "$(DATA_INSTALL_DIR)"
@$(INSTALL_PROGRAM) Newtonsoft.Json.dll "$(DATA_INSTALL_DIR)"
@$(INSTALL_PROGRAM) RestSharp.dll "$(DATA_INSTALL_DIR)"
@$(INSTALL_PROGRAM) SmarIrc4net.dll "$(DATA_INSTALL_DIR)"
ifeq ($(shell uname),Linux)
ifneq ($(UNAME_S),Darwin)
@$(CP) *.sh "$(DATA_INSTALL_DIR)"
endif
@@ -364,24 +382,36 @@ install-tools: tools
install-linux-icons:
@$(INSTALL_DIR) "$(DESTDIR)$(datadir)/icons/"
@$(CP_R) packaging/linux/hicolor/ "$(DESTDIR)$(datadir)/icons"
@$(CP_R) packaging/linux/hicolor "$(DESTDIR)$(datadir)/icons/"
install-linux-desktop:
@$(INSTALL_DIR) "$(DESTDIR)$(datadir)/applications"
@$(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-join-servers.desktop "$(DESTDIR)$(datadir)/applications"
@$(INSTALL_DATA) packaging/linux/openra-replays.desktop "$(DESTDIR)$(datadir)/applications"
install-linux-appdata:
@$(INSTALL_DIR) "$(DESTDIR)$(datadir)/appdata/"
@$(INSTALL_DATA) packaging/linux/openra.appdata.xml "$(DESTDIR)$(datadir)/appdata/"
install-man-page: man-page
@$(INSTALL_DIR) "$(DESTDIR)$(mandir)/man6/"
@$(INSTALL_DATA) openra.6 "$(DESTDIR)$(mandir)/man6/"
install-linux-scripts:
@echo "#!/bin/sh" > openra
@echo 'cd "$(gameinstalldir)"' >> openra
ifeq ($(DEBUG), $(filter $(DEBUG),false no n off 0))
@echo 'mono OpenRA.Game.exe "$$@"' >> openra
else
@echo 'mono --debug OpenRA.Game.exe "$$@"' >> openra
endif
@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
@@ -393,34 +423,25 @@ install-linux-scripts:
@$(INSTALL_PROGRAM) -m +rx openra "$(BIN_INSTALL_DIR)"
@-$(RM) openra
@echo "#!/bin/sh" > openra-editor
@echo 'cd "$(gameinstalldir)"' >> openra-editor
@echo 'exec mono OpenRA.Editor.exe "$$@"' >> openra-editor
@$(INSTALL_DIR) "$(BIN_INSTALL_DIR)"
@$(INSTALL_PROGRAM) -m +rx openra-editor "$(BIN_INSTALL_DIR)"
@-$(RM) openra-editor
uninstall:
@-$(RM_R) "$(DATA_INSTALL_DIR)"
@-$(RM_F) "$(BIN_INSTALL_DIR)/openra"
@-$(RM_F) "$(BIN_INSTALL_DIR)/openra-editor"
@-$(RM_F) "$(DESTDIR)$(datadir)/applications/openra.desktop"
@-$(RM_F) "$(DESTDIR)$(datadir)/applications/openra-editor.desktop"
@-$(RM_F) "$(DESTDIR)$(datadir)/icons/hicolor/16x16/apps/openra.png"
@-$(RM_F) "$(DESTDIR)$(datadir)/icons/hicolor/32x32/apps/openra.png"
@-$(RM_F) "$(DESTDIR)$(datadir)/icons/hicolor/32x32/apps/openra-editor.png"
@-$(RM_F) "$(DESTDIR)$(datadir)/icons/hicolor/48x48/apps/openra.png"
@-$(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"
@-$(RM_F) "$(DESTDIR)$(datadir)/appdata/openra.appdata.xml"
@-$(RM_F) "$(DESTDIR)$(mandir)/man6/openra.6"
help:
@echo to compile, run:
@echo \ \ make
@echo \ \ make [DEBUG=false]
@echo
@echo to compile with development tools, run:
@echo \ \ make all
@echo \ \ make all [DEBUG=false]
@echo
@echo to check the official mods for erroneous yaml files, run:
@echo \ \ make test
@@ -435,7 +456,7 @@ help:
@echo \ \ make \[prefix=/foo\] \[bindir=/bar/bin\] install-all
@echo
@echo to install Linux startup scripts, desktop files and icons
@echo \ \ make install-linux-shortcuts
@echo \ \ make install-linux-shortcuts [DEBUG=false]
@echo
@echo to uninstall, run:
@echo \ \ make uninstall

View File

@@ -1,90 +0,0 @@
namespace OpenRA.Editor
{
partial class ActorPropertiesDialog
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
components.Dispose();
base.Dispose(disposing);
}
#region Windows Form Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
this.button1 = new System.Windows.Forms.Button();
this.button2 = new System.Windows.Forms.Button();
this.flowLayoutPanel1 = new System.Windows.Forms.FlowLayoutPanel();
this.SuspendLayout();
//
// button1
//
this.button1.DialogResult = System.Windows.Forms.DialogResult.Cancel;
this.button1.Location = new System.Drawing.Point(226, 333);
this.button1.Name = "button1";
this.button1.Size = new System.Drawing.Size(75, 23);
this.button1.TabIndex = 0;
this.button1.Text = "Cancel";
this.button1.UseVisualStyleBackColor = true;
//
// button2
//
this.button2.DialogResult = System.Windows.Forms.DialogResult.Cancel;
this.button2.Enabled = false;
this.button2.Location = new System.Drawing.Point(145, 333);
this.button2.Name = "button2";
this.button2.Size = new System.Drawing.Size(75, 23);
this.button2.TabIndex = 0;
this.button2.Text = "OK";
this.button2.UseVisualStyleBackColor = true;
//
// flowLayoutPanel1
//
this.flowLayoutPanel1.AutoScroll = true;
this.flowLayoutPanel1.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D;
this.flowLayoutPanel1.Location = new System.Drawing.Point(13, 13);
this.flowLayoutPanel1.Name = "flowLayoutPanel1";
this.flowLayoutPanel1.Size = new System.Drawing.Size(288, 314);
this.flowLayoutPanel1.TabIndex = 1;
//
// ActorPropertiesDialog
//
this.AcceptButton = this.button2;
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.CancelButton = this.button1;
this.ClientSize = new System.Drawing.Size(313, 368);
this.Controls.Add(this.flowLayoutPanel1);
this.Controls.Add(this.button2);
this.Controls.Add(this.button1);
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog;
this.MaximizeBox = false;
this.MinimizeBox = false;
this.Name = "ActorPropertiesDialog";
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
this.Text = "Actor Properties";
this.ResumeLayout(false);
}
#endregion
private System.Windows.Forms.Button button1;
private System.Windows.Forms.Button button2;
private System.Windows.Forms.FlowLayoutPanel flowLayoutPanel1;
}
}

View File

@@ -1,48 +0,0 @@
#region Copyright & License Information
/*
* Copyright 2007-2015 The OpenRA Developers (see AUTHORS)
* This file is part of OpenRA, which is free software. It is made
* available to you under the terms of the GNU General Public License
* as published by the Free Software Foundation. For more information,
* see COPYING.
*/
#endregion
using System;
using System.Drawing;
using System.Windows.Forms;
namespace OpenRA.Editor
{
public partial class ActorPropertiesDialog : Form
{
public ActorPropertiesDialog()
{
InitializeComponent();
}
public void AddRow(string name, Control c)
{
flowLayoutPanel1.Controls.Add(new Label
{
Text = name,
Width = flowLayoutPanel1.Width * 3 / 10,
Height = 25,
TextAlign = ContentAlignment.MiddleLeft,
});
c.Width = flowLayoutPanel1.Width * 6 / 10 - 25;
c.Height = 25;
flowLayoutPanel1.Controls.Add(c);
}
public Control MakeEditorControl(Type t, Func<object> getter, Action<object> setter)
{
var r = new TextBox();
r.Text = FieldSaver.FormatValue(getter(), t);
r.LostFocus += (e, _) => setter(FieldLoader.GetValue("<editor internals>", t, r.Text));
r.Enabled = false;
return r;
}
}
}

View File

@@ -1,120 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
</root>

View File

@@ -1,35 +0,0 @@
#region Copyright & License Information
/*
* Copyright 2007-2015 The OpenRA Developers (see AUTHORS)
* This file is part of OpenRA, which is free software. It is made
* available to you under the terms of the GNU General Public License
* as published by the Free Software Foundation. For more information,
* see COPYING.
*/
#endregion
using System.Drawing;
using OpenRA.Traits;
namespace OpenRA.Editor
{
class ActorTemplate
{
public Bitmap Bitmap;
public ActorInfo Info;
public EditorAppearanceInfo Appearance;
}
class BrushTemplate
{
public Bitmap Bitmap;
public ushort N;
}
class ResourceTemplate
{
public Bitmap Bitmap;
public ResourceTypeInfo Info;
public int Value;
}
}

View File

@@ -1,51 +0,0 @@
#region Copyright & License Information
/*
* Copyright 2007-2015 The OpenRA Developers (see AUTHORS)
* This file is part of OpenRA, which is free software. It is made
* available to you under the terms of the GNU General Public License
* as published by the Free Software Foundation. For more information,
* see COPYING.
*/
#endregion
using System.Linq;
using SGraphics = System.Drawing.Graphics;
namespace OpenRA.Editor
{
class ActorTool : ITool
{
ActorTemplate actorTemplate;
public ActorTool(ActorTemplate actor) { this.actorTemplate = actor; }
public void Preview(Surface surface, SGraphics g)
{
surface.DrawActor(g, surface.GetBrushLocation(), actorTemplate,
surface.GetPaletteForPlayer(surface.NewActorOwner));
}
public void Apply(Surface surface)
{
if (surface.Map.Actors.Value.Any(a => a.Value.Location() == surface.GetBrushLocation()))
return;
var owner = surface.NewActorOwner;
var id = NextActorName(surface);
surface.Map.Actors.Value[id] = new ActorReference(actorTemplate.Info.Name.ToLowerInvariant())
{
new LocationInit(surface.GetBrushLocation()),
new OwnerInit(owner)
};
}
static string NextActorName(Surface surface)
{
var id = 0;
for (;;)
{
var possible = "Actor{0}".F(id++);
if (!surface.Map.Actors.Value.ContainsKey(possible)) return possible;
}
}
}
}

View File

@@ -1,121 +0,0 @@
#region Copyright & License Information
/*
* Copyright 2007-2015 The OpenRA Developers (see AUTHORS)
* This file is part of OpenRA, which is free software. It is made
* available to you under the terms of the GNU General Public License
* as published by the Free Software Foundation. For more information,
* see COPYING.
*/
#endregion
using System;
using System.Collections.Generic;
using System.Windows.Forms;
using SGraphics = System.Drawing.Graphics;
namespace OpenRA.Editor
{
class BrushTool : ITool
{
BrushTemplate brushTemplate;
public BrushTool(BrushTemplate brush) { this.brushTemplate = brush; }
public void Apply(Surface surface)
{
// change the bits in the map
var template = surface.TileSet.Templates[brushTemplate.N];
var tile = surface.TileSetRenderer.Data(brushTemplate.N);
var pos = surface.GetBrushLocation();
if (surface.GetModifiers() == Keys.Shift)
{
FloodFillWithBrush(surface, pos);
return;
}
for (var u = 0; u < template.Size.X; u++)
for (var v = 0; v < template.Size.Y; v++)
{
var cell = pos + new CVec(u, v);
if (surface.Map.Contains(cell))
{
var z = u + v * template.Size.X;
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))
{
surface.Chunks[ch].Dispose();
surface.Chunks.Remove(ch);
}
}
}
}
public void Preview(Surface surface, SGraphics g)
{
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,
brushTemplate.Bitmap.Width * surface.Zoom,
brushTemplate.Bitmap.Height * surface.Zoom);
}
void FloodFillWithBrush(Surface s, CPos pos)
{
var queue = new Queue<CPos>();
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) =>
{
var c = new CPos(x, y);
if (s.Map.Contains(c) && !touched[x, y])
{
queue.Enqueue(c);
touched[x, y] = true;
}
};
queue.Enqueue(pos);
while (queue.Count > 0)
{
var p = queue.Dequeue();
if (s.Map.MapTiles.Value[p].Type != replace.Type)
continue;
var a = FindEdge(s, p, new CVec(-1, 0), replace);
var b = FindEdge(s, p, new CVec(1, 0), replace);
for (var x = a.X; x <= b.X; x++)
{
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[new CPos(x, p.Y + 1)].Type == replace.Type)
maybeEnqueue(x, p.Y + 1);
}
}
/* TODO: optimize */
foreach (var ch in s.Chunks.Values) ch.Dispose();
s.Chunks.Clear();
}
static CPos FindEdge(Surface s, CPos p, CVec d, TerrainTile replace)
{
for (;;)
{
var q = p + d;
if (!s.Map.Contains(q)) return p;
if (s.Map.MapTiles.Value[q].Type != replace.Type) return p;
p = q;
}
}
}
}

View File

@@ -1,98 +0,0 @@
#region Copyright & License Information
/*
* Copyright 2007-2015 The OpenRA Developers (see AUTHORS)
* This file is part of OpenRA, which is free software. It is made
* available to you under the terms of the GNU General Public License
* as published by the Free Software Foundation. For more information,
* see COPYING.
*/
#endregion
namespace OpenRA.Editor
{
partial class ErrorListDialog
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
components.Dispose();
base.Dispose(disposing);
}
#region Windows Form Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
this.label1 = new System.Windows.Forms.Label();
this.listBox1 = new System.Windows.Forms.ListBox();
this.button1 = new System.Windows.Forms.Button();
this.SuspendLayout();
//
// label1
//
this.label1.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.label1.Location = new System.Drawing.Point(10, 9);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(610, 23);
this.label1.TabIndex = 0;
this.label1.Text = "Your map import completed, but with errors:";
//
// listBox1
//
this.listBox1.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.listBox1.FormattingEnabled = true;
this.listBox1.Location = new System.Drawing.Point(13, 30);
this.listBox1.Name = "listBox1";
this.listBox1.Size = new System.Drawing.Size(607, 316);
this.listBox1.TabIndex = 1;
//
// button1
//
this.button1.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
this.button1.DialogResult = System.Windows.Forms.DialogResult.Cancel;
this.button1.Location = new System.Drawing.Point(545, 359);
this.button1.Name = "button1";
this.button1.Size = new System.Drawing.Size(75, 23);
this.button1.TabIndex = 2;
this.button1.Text = "Close";
this.button1.UseVisualStyleBackColor = true;
//
// ErrorListDialog
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(632, 394);
this.Controls.Add(this.button1);
this.Controls.Add(this.listBox1);
this.Controls.Add(this.label1);
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog;
this.Name = "ErrorListDialog";
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
this.Text = "Map Import Errors";
this.ResumeLayout(false);
}
#endregion
private System.Windows.Forms.Label label1;
private System.Windows.Forms.ListBox listBox1;
private System.Windows.Forms.Button button1;
}
}

File diff suppressed because it is too large Load Diff

View File

@@ -1,731 +0,0 @@
#region Copyright & License Information
/*
* Copyright 2007-2015 The OpenRA Developers (see AUTHORS)
* This file is part of OpenRA, which is free software. It is made
* available to you under the terms of the GNU General Public License
* as published by the Free Software Foundation. For more information,
* see COPYING.
*/
#endregion
using System;
using System.Collections.Generic;
using System.Drawing;
using System.IO;
using System.Linq;
using System.Windows.Forms;
using OpenRA.FileSystem;
using OpenRA.Graphics;
using OpenRA.Traits;
namespace OpenRA.Editor
{
public partial class Form1 : Form
{
public Form1(string[] args)
{
InitializeComponent();
AppDomain.CurrentDomain.AssemblyResolve += GlobalFileSystem.ResolveAssembly;
currentMod = args.FirstOrDefault() ?? "ra";
toolStripComboBox1.Items.AddRange(ModMetadata.AllMods.Keys.ToArray());
toolStripComboBox1.SelectedIndexChanged += (_, e) =>
{
tilePalette.SuspendLayout();
actorPalette.SuspendLayout();
resourcePalette.SuspendLayout();
tilePalette.Controls.Clear();
actorPalette.Controls.Clear();
resourcePalette.Controls.Clear();
tilePalette.ResumeLayout();
actorPalette.ResumeLayout();
resourcePalette.ResumeLayout();
surface1.Bind(null, null, null, null, null);
miniMapBox.Image = null;
currentMod = toolStripComboBox1.SelectedItem as string;
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;
Text = "{0} Mod Version: {1} - OpenRA Editor".F(mod.Title, mod.Version);
loadedMapName = null;
};
toolStripComboBox1.SelectedItem = currentMod;
surface1.AfterChange += OnMapChanged;
surface1.MousePositionChanged += s => toolStripStatusLabelMousePosition.Text = s;
surface1.ActorDoubleClicked += ActorDoubleClicked;
if (args.Length >= 2)
LoadMap(args[1]);
}
void OnMapChanged()
{
MakeDirty();
var tileSet = Program.Rules.TileSets[surface1.Map.Tileset];
miniMapBox.Image = Minimap.RenderMapPreview(tileSet, surface1.Map, true);
cashToolStripStatusLabel.Text = CalculateTotalResource().ToString();
}
void ActorDoubleClicked(KeyValuePair<string, ActorReference> kv)
{
using (var apd = new ActorPropertiesDialog())
{
var name = kv.Key;
apd.AddRow("(Name)", apd.MakeEditorControl(typeof(string), () => name, v => name = (string)v));
apd.AddRow("(Type)", apd.MakeEditorControl(typeof(string), () => kv.Value.Type, v => kv.Value.Type = (string)v));
var objSaved = kv.Value.Save();
// TODO: make this work properly
foreach (var init in Program.Rules.Actors[kv.Value.Type].GetInitKeys())
{
var initName = init.First;
apd.AddRow(initName,
apd.MakeEditorControl(init.Second,
() =>
{
var nodesDict = objSaved.ToDictionary();
return nodesDict.ContainsKey(initName) ? nodesDict[initName].Value : null;
},
_ => { }));
}
apd.ShowDialog();
// TODO: writeback
}
}
void MakeDirty() { dirty = true; }
string loadedMapName;
string currentMod = "ra";
TileSet tileset;
TileSetRenderer tilesetRenderer;
bool dirty = false;
void LoadMap(string mapname)
{
tilePalette.Controls.Clear();
actorPalette.Controls.Clear();
resourcePalette.Controls.Clear();
loadedMapName = mapname;
// load the map
var map = new Map(mapname);
// upgrade maps that have no player definitions. editor doesnt care,
// but this breaks the game pretty badly.
if (map.Players.Count == 0)
map.MakeDefaultPlayers();
PrepareMapResources(Game.ModData, map);
// Calculate total net worth of resources in cash
cashToolStripStatusLabel.Text = CalculateTotalResource().ToString();
dirty = false;
}
void NewMap(Map map)
{
tilePalette.Controls.Clear();
actorPalette.Controls.Clear();
resourcePalette.Controls.Clear();
loadedMapName = null;
PrepareMapResources(Game.ModData, map);
MakeDirty();
}
// this code is insanely stupid, and mostly my fault -- chrisf
void PrepareMapResources(ModData modData, Map map)
{
Program.Rules = map.Rules;
tileset = Program.Rules.TileSets[map.Tileset];
tilesetRenderer = new TileSetRenderer(tileset, modData.Manifest.TileSize);
var shadowIndex = new int[] { 3, 4 };
var palette = new ImmutablePalette(GlobalFileSystem.Open(tileset.Palette), shadowIndex);
// required for desert terrain in RA
var playerPalette = tileset.PlayerPalette ?? tileset.Palette;
var shadowedPalette = new ImmutablePalette(GlobalFileSystem.Open(playerPalette), shadowIndex);
surface1.Bind(map, tileset, tilesetRenderer, palette, shadowedPalette);
// construct the palette of tiles
var palettes = new[] { tilePalette, actorPalette, resourcePalette };
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.IndexOf(t.Key)))
{
var category = tc.Key ?? "(Uncategorized)";
var categoryHeader = new Label
{
BackColor = SystemColors.Highlight,
ForeColor = SystemColors.HighlightText,
Text = category,
AutoSize = false,
Height = 24,
TextAlign = ContentAlignment.MiddleLeft,
Width = tilePalette.ClientSize.Width,
};
// hook this manually, anchoring inside FlowLayoutPanel is flaky.
tilePalette.Resize += (_, e) => categoryHeader.Width = tilePalette.ClientSize.Width;
if (tilePalette.Controls.Count > 0)
tilePalette.SetFlowBreak(
tilePalette.Controls[tilePalette.Controls.Count - 1], true);
tilePalette.Controls.Add(categoryHeader);
foreach (var t in tc)
{
try
{
var bitmap = tilesetRenderer.RenderTemplate((ushort)t.Key, palette);
var ibox = new PictureBox
{
Image = bitmap,
Width = bitmap.Width / 2,
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.Images[0], template.Id, template.Size.X, template.Size.Y));
}
catch { }
}
}
var actorTemplates = new List<ActorTemplate>();
foreach (var a in Program.Rules.Actors.Keys)
{
try
{
var info = Program.Rules.Actors[a];
if (!info.Traits.Contains<ILegacyEditorRenderInfo>()) continue;
var etf = info.Traits.GetOrDefault<EditorTilesetFilterInfo>();
if (etf != null && etf.ExcludeTilesets != null
&& etf.ExcludeTilesets.Contains(tileset.Id)) continue;
if (etf != null && etf.RequireTilesets != null
&& !etf.RequireTilesets.Contains(tileset.Id)) continue;
var templatePalette = shadowedPalette;
var rsi = info.Traits.GetOrDefault<ILegacyEditorRenderInfo>();
// exception for desert buildings
if (rsi != null && rsi.EditorPalette != null && rsi.EditorPalette.Contains("terrain"))
templatePalette = palette;
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,
Width = 32,
Height = 32,
SizeMode = PictureBoxSizeMode.Zoom,
BorderStyle = BorderStyle.FixedSingle
};
ibox.Click += (_, e) => surface1.SetTool(new ActorTool(template));
actorPalette.Controls.Add(ibox);
tt.SetToolTip(ibox, "{0}".F(info.Name));
actorTemplates.Add(template);
}
catch { }
}
surface1.BindActorTemplates(actorTemplates);
var resourceTemplates = new List<ResourceTemplate>();
foreach (var a in Program.Rules.Actors["world"].Traits.WithInterface<ResourceTypeInfo>())
{
try
{
var template = RenderUtils.RenderResourceType(a, tileset, shadowedPalette);
var ibox = new PictureBox
{
Image = template.Bitmap,
Width = 32,
Height = 32,
SizeMode = PictureBoxSizeMode.Zoom,
BorderStyle = BorderStyle.FixedSingle
};
ibox.Click += (_, e) => surface1.SetTool(new ResourceTool(template));
resourcePalette.Controls.Add(ibox);
tt.SetToolTip(ibox, "{0}:{1}cr".F(template.Info.Name, template.Info.ValuePerUnit));
resourceTemplates.Add(template);
}
catch { }
}
surface1.BindResourceTemplates(resourceTemplates);
foreach (var p in palettes)
{
p.Visible = true;
p.ResumeLayout();
}
miniMapBox.Image = Minimap.RenderMapPreview(tileset, surface1.Map, true);
propertiesToolStripMenuItem.Enabled = true;
toolStripMenuItemProperties.Enabled = true;
resizeToolStripMenuItem.Enabled = true;
toolStripMenuItemResize.Enabled = true;
saveToolStripMenuItem.Enabled = true;
toolStripMenuItemSave.Enabled = true;
saveAsToolStripMenuItem.Enabled = true;
miniMapToPng.Enabled = true;
PopulateActorOwnerChooser();
}
void PopulateActorOwnerChooser()
{
actorOwnerChooser.Items.Clear();
actorOwnerChooser.Items.AddRange(surface1.Map.Players.Values.ToArray());
actorOwnerChooser.SelectedIndex = 0;
surface1.NewActorOwner = ((PlayerReference)actorOwnerChooser.SelectedItem).Name;
}
void ResizeClicked(object sender, EventArgs e)
{
using (var rd = new ResizeDialog())
{
rd.MapWidth.Value = surface1.Map.MapSize.X;
rd.MapHeight.Value = surface1.Map.MapSize.Y;
rd.CordonLeft.Value = surface1.Map.Bounds.Left;
rd.CordonTop.Value = surface1.Map.Bounds.Top;
rd.CordonRight.Value = surface1.Map.Bounds.Right;
rd.CordonBottom.Value = surface1.Map.Bounds.Bottom;
if (DialogResult.OK != rd.ShowDialog())
return;
surface1.Map.ResizeCordon((int)rd.CordonLeft.Value,
(int)rd.CordonTop.Value,
(int)rd.CordonRight.Value,
(int)rd.CordonBottom.Value);
if ((int)rd.MapWidth.Value != surface1.Map.MapSize.X || (int)rd.MapHeight.Value != surface1.Map.MapSize.Y)
{
surface1.Map.Resize((int)rd.MapWidth.Value, (int)rd.MapHeight.Value);
surface1.Bind(surface1.Map, surface1.TileSet, surface1.TileSetRenderer, surface1.Palette, surface1.PlayerPalette); // rebind it to invalidate all caches
}
surface1.Invalidate();
}
}
void SaveClicked(object sender, EventArgs e)
{
if (loadedMapName == null)
SaveAsClicked(sender, e);
else
{
surface1.Map.RequiresMod = currentMod;
surface1.Map.Save(loadedMapName);
dirty = false;
}
}
void SaveAsClicked(object sender, EventArgs e)
{
using (var nms = new MapSelect(currentMod))
{
nms.NewText.ReadOnly = false;
nms.ButtonOkay.Text = "Save";
nms.NewText.Text = "unnamed";
nms.PathOutText.ReadOnly = false;
if (DialogResult.OK == nms.ShowDialog())
{
if (nms.NewText.Text == "")
nms.NewText.Text = "unnamed";
// TODO: Allow the user to choose map format (directory vs oramap)
loadedMapName = Path.Combine(nms.MapFolderPath, nms.NewText.Text + ".oramap");
SaveClicked(sender, e);
}
}
}
void OpenClicked(object sender, EventArgs e)
{
using (var nms = new MapSelect(currentMod))
{
nms.NewText.ReadOnly = true;
nms.PathOutText.ReadOnly = true;
nms.ButtonOkay.Text = "Open";
if (DialogResult.OK == nms.ShowDialog())
LoadMap((string)nms.NewText.Tag);
}
}
void NewClicked(object sender, EventArgs e)
{
using (var nmd = new NewMapDialog())
{
nmd.TheaterBox.Items.Clear();
nmd.TheaterBox.Items.AddRange(Program.Rules.TileSets.Select(a => a.Value.Id).ToArray());
nmd.TheaterBox.SelectedIndex = 0;
if (DialogResult.OK == nmd.ShowDialog())
{
var tileset = Program.Rules.TileSets[nmd.TheaterBox.SelectedItem as string];
var map = Map.FromTileset(tileset);
map.Resize((int)nmd.MapWidth.Value, (int)nmd.MapHeight.Value);
map.ResizeCordon((int)nmd.CordonLeft.Value, (int)nmd.CordonTop.Value,
(int)nmd.CordonRight.Value, (int)nmd.CordonBottom.Value);
map.Players.Clear();
map.MakeDefaultPlayers();
map.FixOpenAreas(Program.Rules);
NewMap(map);
}
}
}
void PropertiesClicked(object sender, EventArgs e)
{
using (var pd = new PropertiesDialog())
{
pd.TitleBox.Text = surface1.Map.Title;
pd.DescBox.Text = surface1.Map.Description;
pd.AuthorBox.Text = surface1.Map.Author;
pd.MapVisibilityComboBox.SelectedIndex = pd.MapVisibilityComboBox.FindStringExact(Enum.GetName(typeof(MapVisibility), surface1.Map.Visibility));
if (DialogResult.OK != pd.ShowDialog())
return;
surface1.Map.Title = pd.TitleBox.Text;
surface1.Map.Description = pd.DescBox.Text;
surface1.Map.Author = pd.AuthorBox.Text;
surface1.Map.Visibility = (MapVisibility)Enum.Parse(typeof(MapVisibility), pd.MapVisibilityComboBox.SelectedItem.ToString());
}
}
void Form1_KeyDown(object sender, KeyEventArgs e) { if (e.KeyCode == Keys.Space) surface1.IsPanning = true; }
void Form1_KeyUp(object sender, KeyEventArgs e) { if (e.KeyCode == Keys.Space) surface1.IsPanning = false; }
void CloseClicked(object sender, EventArgs e)
{
Close();
}
void OnFormClosing(object sender, FormClosingEventArgs e)
{
if (!dirty) return;
switch (MessageBox.Show("The map has been modified since it was last saved. " + "\r\n" + "Save changes now?",
"Unsaved Changes", MessageBoxButtons.YesNoCancel, MessageBoxIcon.Exclamation))
{
case DialogResult.Yes: SaveClicked(null, EventArgs.Empty); break;
case DialogResult.No: break;
case DialogResult.Cancel: e.Cancel = true; break;
}
}
void ExportMinimap(object sender, EventArgs e)
{
using (var sfd = new SaveFileDialog()
{
InitialDirectory = Path.Combine(Environment.CurrentDirectory, "maps"),
DefaultExt = "*.png",
Filter = "PNG Image (*.png)|*.png",
Title = "Export Minimap to PNG",
FileName = Path.ChangeExtension(loadedMapName, ".png"),
RestoreDirectory = true
})
if (DialogResult.OK == sfd.ShowDialog())
miniMapBox.Image.Save(sfd.FileName);
}
void ShowActorNamesClicked(object sender, EventArgs e)
{
showActorNamesToolStripMenuItem.Checked ^= true;
toolStripMenuItemShowActorNames.Checked ^= true;
surface1.ShowActorNames = showActorNamesToolStripMenuItem.Checked;
}
void ShowGridClicked(object sender, EventArgs e)
{
showGridToolStripMenuItem.Checked ^= true;
toolStripMenuItemShowGrid.Checked ^= true;
surface1.ShowGrid = showGridToolStripMenuItem.Checked;
surface1.Chunks.Clear();
}
void FixOpenAreas(object sender, EventArgs e)
{
dirty = true;
surface1.Map.FixOpenAreas(Program.Rules);
surface1.Chunks.Clear();
surface1.Invalidate();
}
void SetupDefaultPlayers(object sender, EventArgs e)
{
dirty = true;
surface1.Map.Players.Clear();
surface1.Map.MakeDefaultPlayers();
surface1.Chunks.Clear();
surface1.Invalidate();
PopulateActorOwnerChooser();
}
void DrawPlayerListItem(object sender, DrawItemEventArgs e)
{
// color block
var player = e.Index >= 0 ? (PlayerReference)((ComboBox)sender).Items[e.Index] : null;
e.DrawBackground();
e.DrawFocusRectangle();
if (player == null)
return;
var color = player.Color.RGB;
using (var brush = new SolidBrush(color))
e.Graphics.FillRectangle(brush, e.Bounds.Left + 2, e.Bounds.Top + 2, e.Bounds.Height + 6, e.Bounds.Height - 4);
using (var foreBrush = new SolidBrush(e.ForeColor))
e.Graphics.DrawString(player.Name, e.Font, foreBrush, e.Bounds.Left + e.Bounds.Height + 12, e.Bounds.Top);
}
void OnSelectedPlayerChanged(object sender, EventArgs e)
{
var player = actorOwnerChooser.SelectedItem as PlayerReference;
surface1.NewActorOwner = player.Name;
}
void CopySelectionToolStripMenuItemClick(object sender, EventArgs e)
{
surface1.CopySelection();
}
void OpenRAWebsiteToolStripMenuItemClick(object sender, EventArgs e)
{
System.Diagnostics.Process.Start("http://www.openra.net");
}
void OpenRAResourcesToolStripMenuItemClick(object sender, EventArgs e)
{
System.Diagnostics.Process.Start("http://resource.openra.net");
}
void WikiDocumentationToolStripMenuItemClick(object sender, EventArgs e)
{
System.Diagnostics.Process.Start("http://wiki.openra.net");
}
void DiscussionForumsToolStripMenuItemClick(object sender, EventArgs e)
{
System.Diagnostics.Process.Start("http://www.sleipnirstuff.com/forum/viewforum.php?f=80");
}
void IssueTrackerToolStripMenuItemClick(object sender, EventArgs e)
{
System.Diagnostics.Process.Start("http://bugs.openra.net");
}
void DeveloperBountiesToolStripMenuItemClick(object sender, EventArgs e)
{
System.Diagnostics.Process.Start("https://www.bountysource.com/trackers/36085-openra");
}
void SourceCodeToolStripMenuItemClick(object sender, EventArgs e)
{
System.Diagnostics.Process.Start("http://github.com/OpenRA/OpenRA");
}
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);
}
void HelpToolStripButton_Click(object sender, EventArgs e)
{
System.Diagnostics.Process.Start("http://wiki.openra.net/Mapping");
}
void ToolStripMenuItemNewClick(object sender, EventArgs e)
{
NewClicked(sender, e);
}
void ToolStripMenuItemOpenClick(object sender, EventArgs e)
{
OpenClicked(sender, e);
}
void ToolStripMenuItemSaveClick(object sender, EventArgs e)
{
SaveClicked(sender, e);
}
void ToolStripMenuItemPropertiesClick(object sender, EventArgs e)
{
PropertiesClicked(sender, e);
}
void ToolStripMenuItemResizeClick(object sender, EventArgs e)
{
ResizeClicked(sender, e);
}
void ToolStripMenuItemShowActorNamesClick(object sender, EventArgs e)
{
ShowActorNamesClicked(sender, e);
}
void ToolStripMenuItemFixOpenAreasClick(object sender, EventArgs e)
{
FixOpenAreas(sender, e);
}
void ToolStripMenuItemSetupDefaultPlayersClick(object sender, EventArgs e)
{
SetupDefaultPlayers(sender, e);
}
void ToolStripMenuItemCopySelectionClick(object sender, EventArgs e)
{
CopySelectionToolStripMenuItemClick(sender, e);
}
void ToolStripMenuItemShowGridClick(object sender, EventArgs e)
{
ShowGridClicked(sender, e);
}
public int CalculateTotalResource()
{
var totalResource = 0;
for (var i = 0; i < surface1.Map.MapSize.X; i++)
for (var j = 0; j < surface1.Map.MapSize.Y; j++)
{
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)
{
var sum = 0;
for (var u = -1; u < 2; u++)
for (var v = -1; v < 2; v++)
{
var cell = new CPos(x + u, y + v);
if (!surface1.Map.Contains(cell))
continue;
if (surface1.Map.MapResources.Value[cell].Type == resourceType)
++sum;
}
return sum;
}
int GetResourceValue(int x, int y)
{
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;
var density = (GetAdjecentCellsWith(type, x, y) * imageLength - 1) / 9;
var value = template.Info.ValuePerUnit;
return density * value;
}
void ZoomInToolStripButtonClick(object sender, System.EventArgs e)
{
if (surface1.Map == null) return;
surface1.Zoom /= .75f;
surface1.Invalidate();
}
void ZoomOutToolStripButtonClick(object sender, System.EventArgs e)
{
if (surface1.Map == null) return;
surface1.Zoom *= .75f;
surface1.Invalidate();
}
void PanToolStripButtonClick(object sender, System.EventArgs e)
{
panToolStripButton.Checked ^= true;
surface1.IsPanning = panToolStripButton.Checked;
}
void ShowRulerToolStripMenuItemClick(object sender, EventArgs e)
{
showRulerToolStripMenuItem.Checked ^= true;
showRulerToolStripItem.Checked ^= true;
surface1.ShowRuler = showRulerToolStripMenuItem.Checked;
surface1.Chunks.Clear();
}
void ShowRulerToolStripItemClick(object sender, System.EventArgs e)
{
ShowRulerToolStripMenuItemClick(sender, e);
}
void EraserToolStripButtonClick(object sender, System.EventArgs e)
{
eraserToolStripButton.Checked ^= true;
surface1.IsErasing = eraserToolStripButton.Checked;
}
}
}

File diff suppressed because it is too large Load Diff

View File

@@ -1,20 +0,0 @@
#region Copyright & License Information
/*
* Copyright 2007-2015 The OpenRA Developers (see AUTHORS)
* This file is part of OpenRA, which is free software. It is made
* available to you under the terms of the GNU General Public License
* as published by the Free Software Foundation. For more information,
* see COPYING.
*/
#endregion
using SGraphics = System.Drawing.Graphics;
namespace OpenRA.Editor
{
interface ITool
{
void Apply(Surface surface);
void Preview(Surface surface, SGraphics g);
}
}

View File

@@ -1,319 +0,0 @@
#region Copyright & License Information
/*
* Copyright 2007-2015 The OpenRA Developers (see AUTHORS)
* This file is part of OpenRA, which is free software. It is made
* available to you under the terms of the GNU General Public License
* as published by the Free Software Foundation. For more information,
* see COPYING.
*/
#endregion
namespace OpenRA.Editor
{
partial class MapSelect
{
// TODO:
private System.ComponentModel.IContainer components = null;
// TODO:
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
// TODO:
private void InitializeComponent()
{
this.components = new System.ComponentModel.Container();
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(MapSelect));
this.MapList = new System.Windows.Forms.ListView();
this.ColumnMapName = new System.Windows.Forms.ColumnHeader("(none)");
this.MapIconsList = new System.Windows.Forms.ImageList(this.components);
this.ButtonCancel = new System.Windows.Forms.Button();
this.ButtonOkay = new System.Windows.Forms.Button();
this.NewLabel = new System.Windows.Forms.Label();
this.NewText = new System.Windows.Forms.TextBox();
this.MiniMapBox = new System.Windows.Forms.PictureBox();
this.BottomPanel = new System.Windows.Forms.Panel();
this.PathOutText = new System.Windows.Forms.TextBox();
this.PathOutLabel = new System.Windows.Forms.Label();
this.PathLabel = new System.Windows.Forms.Label();
this.SplitContainer1 = new System.Windows.Forms.SplitContainer();
this.MapListLabel = new System.Windows.Forms.Label();
this.DescTxt = new System.Windows.Forms.TextBox();
this.DescLabel = new System.Windows.Forms.Label();
this.TheaterText = new System.Windows.Forms.TextBox();
this.TheaterLabel = new System.Windows.Forms.Label();
this.AuthorText = new System.Windows.Forms.TextBox();
this.AuthorLabel = new System.Windows.Forms.Label();
this.TitleText = new System.Windows.Forms.TextBox();
this.MapNameLabel = new System.Windows.Forms.Label();
this.MiniMapLabel = new System.Windows.Forms.Label();
this.pictureBox1 = new System.Windows.Forms.PictureBox();
((System.ComponentModel.ISupportInitialize)this.MiniMapBox).BeginInit();
this.BottomPanel.SuspendLayout();
this.SplitContainer1.Panel1.SuspendLayout();
this.SplitContainer1.Panel2.SuspendLayout();
this.SplitContainer1.SuspendLayout();
((System.ComponentModel.ISupportInitialize)this.pictureBox1).BeginInit();
this.SuspendLayout();
this.MapList.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.MapList.Columns.AddRange(new System.Windows.Forms.ColumnHeader[] { this.ColumnMapName });
this.MapList.FullRowSelect = true;
this.MapList.HeaderStyle = System.Windows.Forms.ColumnHeaderStyle.None;
this.MapList.LargeImageList = this.MapIconsList;
this.MapList.Location = new System.Drawing.Point(15, 25);
this.MapList.MultiSelect = false;
this.MapList.Name = "MapList";
this.MapList.Size = new System.Drawing.Size(273, 294);
this.MapList.SmallImageList = this.MapIconsList;
this.MapList.StateImageList = this.MapIconsList;
this.MapList.TabIndex = 0;
this.MapList.UseCompatibleStateImageBehavior = false;
this.MapList.View = System.Windows.Forms.View.Details;
this.MapList.SelectedIndexChanged += new System.EventHandler(this.MapList_SelectedIndexChanged);
this.ColumnMapName.Text = "Map name";
this.ColumnMapName.Width = 240;
this.MapIconsList.ColorDepth = System.Windows.Forms.ColorDepth.Depth32Bit;
this.MapIconsList.ImageSize = new System.Drawing.Size(24, 24);
this.MapIconsList.TransparentColor = System.Drawing.Color.Transparent;
this.ButtonCancel.DialogResult = System.Windows.Forms.DialogResult.Cancel;
this.ButtonCancel.Location = new System.Drawing.Point(407, 35);
this.ButtonCancel.Name = "btnCancel";
this.ButtonCancel.Size = new System.Drawing.Size(75, 23);
this.ButtonCancel.TabIndex = 3;
this.ButtonCancel.Text = "Cancel";
this.ButtonCancel.UseVisualStyleBackColor = true;
this.ButtonOkay.DialogResult = System.Windows.Forms.DialogResult.OK;
this.ButtonOkay.Location = new System.Drawing.Point(326, 35);
this.ButtonOkay.Name = "btnOk";
this.ButtonOkay.Size = new System.Drawing.Size(75, 23);
this.ButtonOkay.TabIndex = 2;
this.ButtonOkay.Text = "Open";
this.ButtonOkay.UseVisualStyleBackColor = true;
this.NewLabel.AutoSize = true;
this.NewLabel.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, (byte)204);
this.NewLabel.Location = new System.Drawing.Point(12, 40);
this.NewLabel.Name = "lblNew";
this.NewLabel.Size = new System.Drawing.Size(69, 13);
this.NewLabel.TabIndex = 3;
this.NewLabel.Text = "Map name:";
this.NewText.BackColor = System.Drawing.SystemColors.Window;
this.NewText.Location = new System.Drawing.Point(88, 37);
this.NewText.Name = "txtNew";
this.NewText.ReadOnly = true;
this.NewText.Size = new System.Drawing.Size(232, 20);
this.NewText.TabIndex = 1;
this.MiniMapBox.BackColor = System.Drawing.Color.Black;
this.MiniMapBox.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D;
this.MiniMapBox.Location = new System.Drawing.Point(32, 25);
this.MiniMapBox.Name = "pbMinimap";
this.MiniMapBox.Size = new System.Drawing.Size(124, 124);
this.MiniMapBox.SizeMode = System.Windows.Forms.PictureBoxSizeMode.Zoom;
this.MiniMapBox.TabIndex = 5;
this.MiniMapBox.TabStop = false;
this.BottomPanel.Controls.Add(this.pictureBox1);
this.BottomPanel.Controls.Add(this.PathOutText);
this.BottomPanel.Controls.Add(this.PathOutLabel);
this.BottomPanel.Controls.Add(this.PathLabel);
this.BottomPanel.Controls.Add(this.ButtonCancel);
this.BottomPanel.Controls.Add(this.ButtonOkay);
this.BottomPanel.Controls.Add(this.NewText);
this.BottomPanel.Controls.Add(this.NewLabel);
this.BottomPanel.Dock = System.Windows.Forms.DockStyle.Bottom;
this.BottomPanel.Location = new System.Drawing.Point(0, 332);
this.BottomPanel.MaximumSize = new System.Drawing.Size(0, 70);
this.BottomPanel.Name = "pnlBottom";
this.BottomPanel.Size = new System.Drawing.Size(494, 70);
this.BottomPanel.TabIndex = 6;
this.PathOutText.BackColor = System.Drawing.SystemColors.Window;
this.PathOutText.Location = new System.Drawing.Point(55, 10);
this.PathOutText.Name = "txtPathOut";
this.PathOutText.ReadOnly = true;
this.PathOutText.Size = new System.Drawing.Size(265, 20);
this.PathOutText.TabIndex = 0;
this.PathOutText.TextChanged += new System.EventHandler(this.PathOutTextChanged);
this.PathOutLabel.AutoSize = true;
this.PathOutLabel.Location = new System.Drawing.Point(55, 13);
this.PathOutLabel.Name = "lblPathOut";
this.PathOutLabel.Size = new System.Drawing.Size(0, 13);
this.PathOutLabel.TabIndex = 6;
this.PathLabel.AutoSize = true;
this.PathLabel.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, (byte)204);
this.PathLabel.Location = new System.Drawing.Point(12, 13);
this.PathLabel.Name = "lblPath";
this.PathLabel.Size = new System.Drawing.Size(37, 13);
this.PathLabel.TabIndex = 5;
this.PathLabel.Text = "Path:";
this.SplitContainer1.Dock = System.Windows.Forms.DockStyle.Fill;
this.SplitContainer1.Location = new System.Drawing.Point(0, 0);
this.SplitContainer1.Name = "splitContainer1";
this.SplitContainer1.Panel1.Controls.Add(this.MapListLabel);
this.SplitContainer1.Panel1.Controls.Add(this.MapList);
this.SplitContainer1.Panel2.Controls.Add(this.DescTxt);
this.SplitContainer1.Panel2.Controls.Add(this.DescLabel);
this.SplitContainer1.Panel2.Controls.Add(this.TheaterText);
this.SplitContainer1.Panel2.Controls.Add(this.TheaterLabel);
this.SplitContainer1.Panel2.Controls.Add(this.AuthorText);
this.SplitContainer1.Panel2.Controls.Add(this.AuthorLabel);
this.SplitContainer1.Panel2.Controls.Add(this.TitleText);
this.SplitContainer1.Panel2.Controls.Add(this.MapNameLabel);
this.SplitContainer1.Panel2.Controls.Add(this.MiniMapLabel);
this.SplitContainer1.Panel2.Controls.Add(this.MiniMapBox);
this.SplitContainer1.Size = new System.Drawing.Size(494, 332);
this.SplitContainer1.SplitterDistance = 300;
this.SplitContainer1.TabIndex = 7;
this.MapListLabel.AutoSize = true;
this.MapListLabel.Location = new System.Drawing.Point(12, 9);
this.MapListLabel.Name = "lblMapList";
this.MapListLabel.Size = new System.Drawing.Size(81, 13);
this.MapListLabel.TabIndex = 1;
this.MapListLabel.Text = "Available maps:";
this.DescTxt.BackColor = System.Drawing.SystemColors.ButtonFace;
this.DescTxt.Location = new System.Drawing.Point(16, 289);
this.DescTxt.Name = "txtDesc";
this.DescTxt.ReadOnly = true;
this.DescTxt.Size = new System.Drawing.Size(162, 20);
this.DescTxt.TabIndex = 14;
this.DescLabel.AutoSize = true;
this.DescLabel.Location = new System.Drawing.Point(13, 273);
this.DescLabel.Name = "lblDesc";
this.DescLabel.Size = new System.Drawing.Size(63, 13);
this.DescLabel.TabIndex = 13;
this.DescLabel.Text = "Description:";
this.TheaterText.BackColor = System.Drawing.SystemColors.ButtonFace;
this.TheaterText.Location = new System.Drawing.Point(16, 252);
this.TheaterText.Name = "txtTheater";
this.TheaterText.ReadOnly = true;
this.TheaterText.Size = new System.Drawing.Size(162, 20);
this.TheaterText.TabIndex = 12;
this.TheaterLabel.AutoSize = true;
this.TheaterLabel.Location = new System.Drawing.Point(13, 236);
this.TheaterLabel.Name = "lblTheater";
this.TheaterLabel.Size = new System.Drawing.Size(47, 13);
this.TheaterLabel.TabIndex = 11;
this.TheaterLabel.Text = "Tileset:";
this.AuthorText.BackColor = System.Drawing.SystemColors.ButtonFace;
this.AuthorText.Location = new System.Drawing.Point(16, 214);
this.AuthorText.Name = "txtAuthor";
this.AuthorText.ReadOnly = true;
this.AuthorText.Size = new System.Drawing.Size(162, 20);
this.AuthorText.TabIndex = 10;
this.AuthorLabel.AutoSize = true;
this.AuthorLabel.Location = new System.Drawing.Point(13, 198);
this.AuthorLabel.Name = "lblAuthor";
this.AuthorLabel.Size = new System.Drawing.Size(41, 13);
this.AuthorLabel.TabIndex = 9;
this.AuthorLabel.Text = "Author:";
this.TitleText.BackColor = System.Drawing.SystemColors.ButtonFace;
this.TitleText.Location = new System.Drawing.Point(16, 177);
this.TitleText.Name = "txtTitle";
this.TitleText.ReadOnly = true;
this.TitleText.Size = new System.Drawing.Size(162, 20);
this.TitleText.TabIndex = 8;
this.MapNameLabel.AutoSize = true;
this.MapNameLabel.Location = new System.Drawing.Point(13, 161);
this.MapNameLabel.Name = "lblMapName";
this.MapNameLabel.Size = new System.Drawing.Size(30, 13);
this.MapNameLabel.TabIndex = 7;
this.MapNameLabel.Text = "Title:";
this.MiniMapLabel.AutoSize = true;
this.MiniMapLabel.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, (byte)204);
this.MiniMapLabel.Location = new System.Drawing.Point(29, 9);
this.MiniMapLabel.Name = "lblMinimap";
this.MiniMapLabel.Size = new System.Drawing.Size(71, 13);
this.MiniMapLabel.TabIndex = 6;
this.MiniMapLabel.Text = "Map preview:";
this.pictureBox1.Image = (System.Drawing.Image)resources.GetObject("pictureBox1.Image");
this.pictureBox1.Location = new System.Drawing.Point(336, -9);
this.pictureBox1.Name = "pictureBox1";
this.pictureBox1.Size = new System.Drawing.Size(54, 35);
this.pictureBox1.TabIndex = 7;
this.pictureBox1.TabStop = false;
this.pictureBox1.Visible = false;
this.AcceptButton = this.ButtonOkay;
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.CancelButton = this.ButtonCancel;
this.ClientSize = new System.Drawing.Size(494, 402);
this.Controls.Add(this.SplitContainer1);
this.Controls.Add(this.BottomPanel);
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog;
this.MaximizeBox = false;
this.MinimizeBox = false;
this.Name = "MapSelect";
this.ShowIcon = false;
this.ShowInTaskbar = false;
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
this.Text = "Select map";
this.Load += new System.EventHandler(this.MapSelect_Load);
((System.ComponentModel.ISupportInitialize)this.MiniMapBox).EndInit();
this.BottomPanel.ResumeLayout(false);
this.BottomPanel.PerformLayout();
this.SplitContainer1.Panel1.ResumeLayout(false);
this.SplitContainer1.Panel1.PerformLayout();
this.SplitContainer1.Panel2.ResumeLayout(false);
this.SplitContainer1.Panel2.PerformLayout();
this.SplitContainer1.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)this.pictureBox1).EndInit();
this.ResumeLayout(false);
}
public System.Windows.Forms.ListView MapList;
public System.Windows.Forms.Button ButtonCancel;
public System.Windows.Forms.Button ButtonOkay;
public System.Windows.Forms.Label NewLabel;
public System.Windows.Forms.TextBox NewText;
public System.Windows.Forms.ColumnHeader ColumnMapName;
public System.Windows.Forms.ImageList MapIconsList;
public System.Windows.Forms.PictureBox MiniMapBox;
public System.Windows.Forms.Panel BottomPanel;
public System.Windows.Forms.SplitContainer SplitContainer1;
public System.Windows.Forms.Label MiniMapLabel;
public System.Windows.Forms.TextBox TheaterText;
public System.Windows.Forms.Label TheaterLabel;
public System.Windows.Forms.TextBox AuthorText;
public System.Windows.Forms.Label AuthorLabel;
public System.Windows.Forms.TextBox TitleText;
public System.Windows.Forms.Label MapNameLabel;
public System.Windows.Forms.TextBox DescTxt;
public System.Windows.Forms.Label DescLabel;
public System.Windows.Forms.Label MapListLabel;
public System.Windows.Forms.Label PathOutLabel;
public System.Windows.Forms.Label PathLabel;
public System.Windows.Forms.TextBox PathOutText;
private System.Windows.Forms.PictureBox pictureBox1;
}
}

View File

@@ -1,92 +0,0 @@
#region Copyright & License Information
/*
* Copyright 2007-2015 The OpenRA Developers (see AUTHORS)
* This file is part of OpenRA, which is free software. It is made
* available to you under the terms of the GNU General Public License
* as published by the Free Software Foundation. For more information,
* see COPYING.
*/
#endregion
using System;
using System.IO;
using System.Linq;
using System.Windows.Forms;
using OpenRA.Graphics;
namespace OpenRA.Editor
{
public partial class MapSelect : Form
{
public string MapFolderPath;
public bool DirectoryIsEmpty(string path)
{
return !Directory.GetFileSystemEntries(path).Any();
}
public MapSelect(string currentMod)
{
MapFolderPath = Platform.ResolvePath("^", "maps", currentMod);
if (!Directory.Exists(MapFolderPath))
Directory.CreateDirectory(MapFolderPath);
InitializeComponent();
MapIconsList.Images.Add(pictureBox1.Image);
}
void MapSelect_Load(object sender, EventArgs e)
{
MapList.Items.Clear();
PathOutText.Text = MapFolderPath;
if (DirectoryIsEmpty(MapFolderPath))
return;
foreach (var map in MapCache.FindMapsIn(MapFolderPath))
{
var map1 = new ListViewItem();
map1.Tag = map;
map1.Text = Path.GetFileNameWithoutExtension(map);
map1.ImageIndex = 0;
MapList.Items.Add(map1);
}
// hack
if (NewText.Text != "unnamed")
MapList.Items[0].Selected = true;
}
void MapList_SelectedIndexChanged(object sender, EventArgs e)
{
if (MapList.SelectedItems.Count == 1)
{
NewText.Text = MapList.SelectedItems[0].Text;
NewText.Tag = MapList.SelectedItems[0].Tag;
var map = new Map((string)NewText.Tag);
TitleText.Text = map.Title;
AuthorText.Text = map.Author;
TheaterText.Text = map.Tileset;
DescTxt.Text = map.Description;
MiniMapBox.Image = null;
try
{
var tileset = Program.Rules.TileSets[map.Tileset];
MiniMapBox.Image = Minimap.RenderMapPreview(tileset, map, true);
}
catch (Exception ed)
{
Console.WriteLine("No map preview image found: {0}", ed);
}
}
}
void PathOutTextChanged(object sender, EventArgs e)
{
MapFolderPath = PathOutText.Text;
}
}
}

View File

@@ -1,177 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<metadata name="MapIconsList.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 17</value>
</metadata>
<assembly alias="System.Drawing" name="System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<data name="pictureBox1.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAArjSURBVFhHrVcJUFRXFmVpkE0Wg0ZEMoIBl8RodGSMmVES
R0NiChVxCyIIAmFfhe6maeh9AZodZHFpUFQWcQmKisiuLKLEKFFEcIuljtZMYmI5Uc/c14EZYyapmpq8
qlP/9/+/373v3HPu+19P7/cf+jSlEWHCOEuzZfNn2Yvo3Pj3D/PTjCwYAwtgyeFwFk163Tos2tvtWJZw
zeUjmYFP6vL9fhw31vRPI8/9LnmMrtCWZhtPcJ7hbC/W8DwfnS0LR0t5NKoFazHcqsaprE3YGbMQLrYW
W/7fBAxogjGEd5wcXuPK4jxa60qD75VrfIbKMrYMD7VlPX/Ul49rp8RoyPbFIaEnhpuU6NRGoVa2HKuX
zEj/X8vAVmlIsDY2Nna2sjBd+ee5b7Yq4tfgfm8a7pxNw60OFa6e4uFmhxr/uFSIexfz0VsZh7PaIJzb
F42u8hAcV2/ANz3KF8Hub52kucb+Fv+jAccbm5quWOfxYX5y6Mcnq/IDh1oreX/vOcx9drdbjTudUgye
Tsb1piT0H4/DACUw0JiEh33ZePhlFi7UxOCLtI1o2x6IW2cUqM/egLtdediV9MnjSTYm60bE+Ys8rMzN
zd1c3/vLgVRV3lN1XjkqyzNoNaEUjIvrLXwMtQsw1JqEy/UxuHg0DJcp+KXj8bh0IobOucSGDA8vpqE6
+VNINixBU0kQbp5JJ8jxDSXdeyAE5arlAxTZ/BfRra2tS8Tqwh9L9tQhq6gSabm7odLkoP8oF90V/rjR
LsRgExc32oS40ZFCiQgw2Mgj+gW42pBI4OPSsUh6Jgn1mX4ojXJH865IXDzCx50uDe6fV+P8oQQ4Tx6r
pOATmVteKgdjXu/Mhk1h328rO4TMwn3gp2YhmquEX7gAfYfjcb4qGH0HQ3D5WAiunU7ApfpofH0ymhIS
UwkSqQRb6VoYvm6IZvXG7W4VBVbjwQU1/tanIQZkGDqtwOmSjzHXxXaLsZnZpy85QpdAnfunax/mllRD
ma2FQJyHxORMJAqzwBVpUJgtRLF8E7bxlqKjzA991QEYaIijgFwMt6VggJK60hCFr46F4sqprbjbLaf6
S0icIh1rwy1i3OvNQff+GEgj3r87/c1JLIGfjX1LP/F6KJDlIy1vN4SyQohVRdAU7IVIXQxuSiZ8/OOw
JYyP8EiqfV04Lh2JoHIwMSbiwoFgtO1ah97aTSTMKGIjDl/WhONWl5jKlYrbZ9OJGRWVIg/+axf8SK5a
8WoC5fPm//l2qqIIOaVVECm3QZG5C7L0HZCklYJLTCQKNUiWFYAnykJYRDRaywNxrTGRyhKNKyciiIEY
dFd743z1ZioT6eJkHK41kXDbRFSKbHzTpcJwsxoHc71fTLGzyBix+L/zUFlaWX+VTcFZ4NzSamQXV1Lw
EggkeeBRAsnSfKgyy6DKKcNnxEahIgRfHg5B/7EoDDYn4ma7FD0VAThfG4Cemi3EDI90IKWVq3GbHHKz
nUpCbrh6QokEr5mPTEw4773MQij9aPZY5fNYrC6hEhRAnrkTjJEkcS5ieWokS/IhUZdCrtlJbGQiIjQQ
/YeD0VMVhoTVbmgs8iVBctG11xtdlUHkDGpQpIN7velUAhmG2+W43spclI6K9JWY6TyxlGKOGxWjG53s
5HBMBpZ7+iI6UY44vhoiVTH4ohxCLoTyArqu1OlBll6CZHE20mI9EOjuis3L5uFCbTh6D4Wgu8offYeC
qSRccgcPD/qyMEiBb55VYahFgSuNckhjlr2YaGMqH2ntOiKmEAQGBgbnNviGPg2LFSM4UoiAUD78ghLo
yEVojBhRiQqEx0nAI5sKiBH/z+OgVfuic7c/Lh+NwZndfughDfQdCtL1hKFmEW51ymn1EjpSAh1ytFCL
Pl+nhKebY8XLTYn16DWEgzY2ttdzyI6yjB06+uP4acRANokvhzRRjBR5oe4aN4WupeYgNCIWZ2vj0b17
I/UKf3Tt34jOis9otTyyILmkORUDTRKyqxj9DSI07Y0k26Yhes38Roo3YVQH7OVhGiGR0K7O0epEqCRB
shKwRIQkQrZqMelAIM6ncihII9uQSCXZEi2HSMjDXvVqXKSGdTLbg6z6OVkwGcfLQvHB4jkYbJMS/UL0
1aeSM6So1Hg/oljTR93AupEVYSXhGE+soZa8X+cIlgALzFhg5/HJ6YhIzACXVs9EKiHRMmckSfMQGx0G
rXIldU4/dJSvJx3EoSDZC7OszHByTxTOfZGEq00y9B3lo70iElamhp4Ujy1eN8wIrEOd0BRW6DpiWEwq
giKSdYiIl5IOUskRKh39AmKECZNP7Mg0O6Ci59Pzd4O/NQK7FBvQULyGOmMUpBsX4KqjGTL5qzHQIqJy
iNG6Px5dtYlY7jqhmeKxvUE32C7FGKiP58uf5W6v0ekgPkmNrYIMor4YqcoinQBFdGQrl2ZsB4/cwBJR
Zml/+k0sxcQnQZzgDWHIIni9NQHSHU5IS15EPSEN11ok6G9UQs1dh/lvv/GdkZHR3NEETOhkIUE7zvb1
wRRFwYv0vD3UBTORJCEdSHMhydgFCXVHVnuWEGvZrDewjqmzKbHDNjHmFl5KBlasWokiFwtop5nhyL6p
2JO/CN2HBdSgMpHJ88GH82c8s7b4T1vmUPA3CFxCp19QzBPdtpxdRqon2kkDKRSYXeOJcyBUFMI7IJ70
kYsEgRLTXGbgrzNnwmWqC2Y4OsLZZjx43El4ggXI1zohy24MAFd4u9tj8YLpmD71DTiMtwGHY1A7ygB7
52N29CLULV7qeT+HnFCoPairu87/RC9rTjE8JYJoY/p4lR8lVQAp7Rc+/pHY7OKE61NN8a21MbQpfwC+
m4fbQ7MQNdcCfWMMsTPWDi2yyRgyNkDhOGPYGhpeo97jP5oAcwJjYQ4hk3DOyzvwn9v3HtUJjHXAzSFc
RHHlCAznIyAsCZa2k56u3xT2gtHPmGHCdXtnHh47mKBqjS1K5Q7ITrCjlf8RqXPM0bDUCr3bp2C9nj70
DDinKMYSwmujCbAjY4G9ZrN3tyMLP/D4IT1vP/J21CBeoKaa55MTUhAeK8J7i91v0DMdxqZmgw7Oc74N
iFQ8T5YX6ZzisWI9Uiebo8rKCOcsjLAv1Z72BydUxE5ElcTuKf2P9RunEeGzmD8bTIzsI0I7wc7xdgyf
NiayWVoueZ1qz7zPT8l5McnBqZieYZsYO/a4zF7yaKWP4HlASMKLj9xX4WrXWzhdMxUFlkaI1tPDAZE9
Htc4wWuhOas5Y/oXgUezYDdZdmK2N6zzCfuB1V1GFkulNswT5cFllms73f+QMIWwjCDjGJnUW1rbfu2z
wvXJk85pUH5gieNJdugvd8QV7RSc0TjgiMwevkvH3np1xa/+ZplZE9jecNh14UcPmO8VmnLyfzGr/feU
mB/dY7VjybItdSZhrb6+fvEYY6PuMWOMn7ZbGeILfQNYmnN+mO1o/OBdCw74HAMsMjR8NjL/r+Yx+p3H
XhjKZs93uxMZr4Z/uOb54qWf3bGf4pw3EpC1UPYsS3g0EU9K4uBsI86zYHPOY3MOp4zuRRLyDfT1O941
Mrzvb86Bob4h+0r6zcEmdiFICA2vvT55kLFBYOJhnYt9or06TOmCJ7HTbGxgADpndmaJMU29QxAQKvTo
vhnHkN1nX12/OlgCNoT3CZsIvgRWc9ao2IT/bTD3+BID7N1/zisBWCKOBB/CagKf8PboJP8CoUmu3yhA
ga8AAAAASUVORK5CYII=
</value>
</data>
</root>

View File

@@ -1,295 +0,0 @@
#region Copyright & License Information
/*
* Copyright 2007-2015 The OpenRA Developers (see AUTHORS)
* This file is part of OpenRA, which is free software. It is made
* available to you under the terms of the GNU General Public License
* as published by the Free Software Foundation. For more information,
* see COPYING.
*/
#endregion
namespace OpenRA.Editor
{
partial class NewMapDialog
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
components.Dispose();
base.Dispose(disposing);
}
#region Windows Form Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
this.button2 = new System.Windows.Forms.Button();
this.button1 = new System.Windows.Forms.Button();
this.label3 = new System.Windows.Forms.Label();
this.label2 = new System.Windows.Forms.Label();
this.label1 = new System.Windows.Forms.Label();
this.CordonBottom = new System.Windows.Forms.NumericUpDown();
this.CordonTop = new System.Windows.Forms.NumericUpDown();
this.CordonRight = new System.Windows.Forms.NumericUpDown();
this.CordonLeft = new System.Windows.Forms.NumericUpDown();
this.MapHeight = new System.Windows.Forms.NumericUpDown();
this.MapWidth = new System.Windows.Forms.NumericUpDown();
this.label4 = new System.Windows.Forms.Label();
this.TheaterBox = new System.Windows.Forms.ComboBox();
((System.ComponentModel.ISupportInitialize)(this.CordonBottom)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.CordonTop)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.CordonRight)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.CordonLeft)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.MapHeight)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.MapWidth)).BeginInit();
this.SuspendLayout();
//
// button2
//
this.button2.DialogResult = System.Windows.Forms.DialogResult.OK;
this.button2.Location = new System.Drawing.Point(229, 160);
this.button2.Name = "button2";
this.button2.Size = new System.Drawing.Size(75, 23);
this.button2.TabIndex = 7;
this.button2.Text = "OK";
this.button2.UseVisualStyleBackColor = true;
//
// button1
//
this.button1.DialogResult = System.Windows.Forms.DialogResult.Cancel;
this.button1.Location = new System.Drawing.Point(310, 160);
this.button1.Name = "button1";
this.button1.Size = new System.Drawing.Size(75, 23);
this.button1.TabIndex = 8;
this.button1.Text = "Cancel";
this.button1.UseVisualStyleBackColor = true;
//
// label3
//
this.label3.AutoSize = true;
this.label3.Location = new System.Drawing.Point(31, 77);
this.label3.Name = "label3";
this.label3.Size = new System.Drawing.Size(107, 13);
this.label3.TabIndex = 9;
this.label3.Text = "Cordon Right/Bottom";
//
// label2
//
this.label2.AutoSize = true;
this.label2.Location = new System.Drawing.Point(31, 51);
this.label2.Name = "label2";
this.label2.Size = new System.Drawing.Size(86, 13);
this.label2.TabIndex = 11;
this.label2.Text = "Cordon Left/Top";
//
// label1
//
this.label1.AutoSize = true;
this.label1.Location = new System.Drawing.Point(31, 25);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(27, 13);
this.label1.TabIndex = 10;
this.label1.Text = "Size";
//
// cordonBottom
//
this.CordonBottom.Location = new System.Drawing.Point(280, 75);
this.CordonBottom.Maximum = new decimal(new int[] {
2048,
0,
0,
0});
this.CordonBottom.Name = "cordonBottom";
this.CordonBottom.Size = new System.Drawing.Size(105, 20);
this.CordonBottom.TabIndex = 5;
this.CordonBottom.Value = new decimal(new int[] {
112,
0,
0,
0});
this.CordonBottom.Enter += new System.EventHandler(this.SelectText);
//
// cordonTop
//
this.CordonTop.Location = new System.Drawing.Point(280, 49);
this.CordonTop.Maximum = new decimal(new int[] {
2048,
0,
0,
0});
this.CordonTop.Name = "cordonTop";
this.CordonTop.Size = new System.Drawing.Size(105, 20);
this.CordonTop.TabIndex = 3;
this.CordonTop.Value = new decimal(new int[] {
16,
0,
0,
0});
this.CordonTop.Enter += new System.EventHandler(this.SelectText);
//
// cordonRight
//
this.CordonRight.Location = new System.Drawing.Point(169, 75);
this.CordonRight.Maximum = new decimal(new int[] {
2048,
0,
0,
0});
this.CordonRight.Name = "cordonRight";
this.CordonRight.Size = new System.Drawing.Size(105, 20);
this.CordonRight.TabIndex = 4;
this.CordonRight.Value = new decimal(new int[] {
112,
0,
0,
0});
this.CordonRight.Enter += new System.EventHandler(this.SelectText);
//
// cordonLeft
//
this.CordonLeft.Location = new System.Drawing.Point(169, 49);
this.CordonLeft.Maximum = new decimal(new int[] {
2048,
0,
0,
0});
this.CordonLeft.Name = "cordonLeft";
this.CordonLeft.Size = new System.Drawing.Size(105, 20);
this.CordonLeft.TabIndex = 2;
this.CordonLeft.Value = new decimal(new int[] {
16,
0,
0,
0});
this.CordonLeft.Enter += new System.EventHandler(this.SelectText);
//
// height
//
this.MapHeight.Increment = new decimal(new int[] {
8,
0,
0,
0});
this.MapHeight.Location = new System.Drawing.Point(280, 23);
this.MapHeight.Maximum = new decimal(new int[] {
2048,
0,
0,
0});
this.MapHeight.Name = "height";
this.MapHeight.Size = new System.Drawing.Size(105, 20);
this.MapHeight.TabIndex = 1;
this.MapHeight.Value = new decimal(new int[] {
128,
0,
0,
0});
this.MapHeight.Enter += new System.EventHandler(this.SelectText);
//
// width
//
this.MapWidth.Increment = new decimal(new int[] {
8,
0,
0,
0});
this.MapWidth.Location = new System.Drawing.Point(169, 23);
this.MapWidth.Maximum = new decimal(new int[] {
2048,
0,
0,
0});
this.MapWidth.Name = "width";
this.MapWidth.Size = new System.Drawing.Size(105, 20);
this.MapWidth.TabIndex = 0;
this.MapWidth.Value = new decimal(new int[] {
128,
0,
0,
0});
this.MapWidth.Enter += new System.EventHandler(this.SelectText);
//
// label4
//
this.label4.AutoSize = true;
this.label4.Location = new System.Drawing.Point(31, 124);
this.label4.Name = "label4";
this.label4.Size = new System.Drawing.Size(44, 13);
this.label4.TabIndex = 14;
this.label4.Text = "Tileset";
//
// theater
//
this.TheaterBox.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
this.TheaterBox.FormattingEnabled = true;
this.TheaterBox.Location = new System.Drawing.Point(169, 121);
this.TheaterBox.Name = "theater";
this.TheaterBox.Size = new System.Drawing.Size(216, 21);
this.TheaterBox.TabIndex = 6;
//
// NewMapDialog
//
this.AcceptButton = this.button2;
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.CancelButton = this.button1;
this.ClientSize = new System.Drawing.Size(418, 210);
this.Controls.Add(this.TheaterBox);
this.Controls.Add(this.label4);
this.Controls.Add(this.button2);
this.Controls.Add(this.button1);
this.Controls.Add(this.label3);
this.Controls.Add(this.label2);
this.Controls.Add(this.label1);
this.Controls.Add(this.CordonBottom);
this.Controls.Add(this.CordonTop);
this.Controls.Add(this.CordonRight);
this.Controls.Add(this.CordonLeft);
this.Controls.Add(this.MapHeight);
this.Controls.Add(this.MapWidth);
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog;
this.Name = "NewMapDialog";
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
this.Text = "New Map";
((System.ComponentModel.ISupportInitialize)(this.CordonBottom)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.CordonTop)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.CordonRight)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.CordonLeft)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.MapHeight)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.MapWidth)).EndInit();
this.ResumeLayout(false);
this.PerformLayout();
}
#endregion
private System.Windows.Forms.Button button2;
private System.Windows.Forms.Button button1;
private System.Windows.Forms.Label label3;
private System.Windows.Forms.Label label2;
private System.Windows.Forms.Label label1;
public System.Windows.Forms.NumericUpDown CordonBottom;
public System.Windows.Forms.NumericUpDown CordonTop;
public System.Windows.Forms.NumericUpDown CordonRight;
public System.Windows.Forms.NumericUpDown CordonLeft;
public System.Windows.Forms.NumericUpDown MapHeight;
public System.Windows.Forms.NumericUpDown MapWidth;
private System.Windows.Forms.Label label4;
public System.Windows.Forms.ComboBox TheaterBox;
}
}

View File

@@ -1,28 +0,0 @@
#region Copyright & License Information
/*
* Copyright 2007-2015 The OpenRA Developers (see AUTHORS)
* This file is part of OpenRA, which is free software. It is made
* available to you under the terms of the GNU General Public License
* as published by the Free Software Foundation. For more information,
* see COPYING.
*/
#endregion
using System.Windows.Forms;
namespace OpenRA.Editor
{
public partial class NewMapDialog : Form
{
public NewMapDialog()
{
InitializeComponent();
}
void SelectText(object sender, System.EventArgs e)
{
var ud = sender as NumericUpDown;
ud.Select(0, ud.ToString().Length);
}
}
}

View File

@@ -1,120 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
</root>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 14 KiB

View File

@@ -1,199 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProductVersion>9.0.30729</ProductVersion>
<SchemaVersion>2.0</SchemaVersion>
<ProjectGuid>{00038B75-405B-44F5-8691-BD2546DBE224}</ProjectGuid>
<OutputType>WinExe</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>OpenRA.Editor</RootNamespace>
<AssemblyName>OpenRA.Editor</AssemblyName>
<FileAlignment>512</FileAlignment>
<ApplicationIcon>OpenRA.Editor.Icon.ico</ApplicationIcon>
<FileUpgradeFlags>
</FileUpgradeFlags>
<OldToolsVersion>3.5</OldToolsVersion>
<UpgradeBackupLocation />
<PublishUrl>publish\</PublishUrl>
<Install>true</Install>
<InstallFrom>Disk</InstallFrom>
<UpdateEnabled>false</UpdateEnabled>
<UpdateMode>Foreground</UpdateMode>
<UpdateInterval>7</UpdateInterval>
<UpdateIntervalUnits>Days</UpdateIntervalUnits>
<UpdatePeriodically>false</UpdatePeriodically>
<UpdateRequired>false</UpdateRequired>
<MapFileExtensions>true</MapFileExtensions>
<ApplicationRevision>0</ApplicationRevision>
<ApplicationVersion>1.0.0.%2a</ApplicationVersion>
<IsWebBootstrapper>false</IsWebBootstrapper>
<UseApplicationTrust>false</UseApplicationTrust>
<BootstrapperEnabled>true</BootstrapperEnabled>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x86'">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<OutputPath>..\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<PlatformTarget>x86</PlatformTarget>
<UseVSHostingProcess>false</UseVSHostingProcess>
<CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
</PropertyGroup>
<ItemGroup>
<Reference Include="System" />
<Reference Include="System.Core">
<RequiredTargetFramework>4.0</RequiredTargetFramework>
</Reference>
<Reference Include="System.Xml.Linq">
<RequiredTargetFramework>4.0</RequiredTargetFramework>
</Reference>
<Reference Include="System.Data.DataSetExtensions">
<RequiredTargetFramework>4.0</RequiredTargetFramework>
</Reference>
<Reference Include="System.Data" />
<Reference Include="System.Drawing" />
<Reference Include="System.Windows.Forms" />
<Reference Include="System.Xml" />
<Reference Include="Eluant">
<HintPath>..\thirdparty\Eluant.dll</HintPath>
<Private>False</Private>
</Reference>
</ItemGroup>
<ItemGroup>
<Compile Include="ActorPropertiesDialog.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="ActorPropertiesDialog.Designer.cs">
<DependentUpon>ActorPropertiesDialog.cs</DependentUpon>
</Compile>
<Compile Include="ActorTemplate.cs" />
<Compile Include="ActorTool.cs" />
<Compile Include="BrushTool.cs" />
<Compile Include="ErrorListDialog.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="ErrorListDialog.Designer.cs">
<DependentUpon>ErrorListDialog.cs</DependentUpon>
</Compile>
<Compile Include="Form1.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="Form1.Designer.cs">
<DependentUpon>Form1.cs</DependentUpon>
</Compile>
<Compile Include="ITool.cs" />
<Compile Include="MapSelect.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="MapSelect.Designer.cs">
<DependentUpon>MapSelect.cs</DependentUpon>
</Compile>
<Compile Include="NewMapDialog.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="NewMapDialog.Designer.cs">
<DependentUpon>NewMapDialog.cs</DependentUpon>
</Compile>
<Compile Include="Program.cs" />
<Compile Include="PropertiesDialog.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="PropertiesDialog.Designer.cs">
<DependentUpon>PropertiesDialog.cs</DependentUpon>
</Compile>
<EmbeddedResource Include="ActorPropertiesDialog.resx">
<DependentUpon>ActorPropertiesDialog.cs</DependentUpon>
<SubType>Designer</SubType>
</EmbeddedResource>
<EmbeddedResource Include="Form1.resx">
<DependentUpon>Form1.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="MapSelect.resx">
<DependentUpon>MapSelect.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="NewMapDialog.resx">
<DependentUpon>NewMapDialog.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="PropertiesDialog.resx">
<DependentUpon>PropertiesDialog.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Properties\Resources.resx">
<Generator>ResXFileCodeGenerator</Generator>
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
<SubType>Designer</SubType>
</EmbeddedResource>
<EmbeddedResource Include="ResizeDialog.resx">
<DependentUpon>ResizeDialog.cs</DependentUpon>
</EmbeddedResource>
<Compile Include="Properties\Resources.Designer.cs">
<AutoGen>True</AutoGen>
<DependentUpon>Resources.resx</DependentUpon>
<DesignTime>True</DesignTime>
</Compile>
<None Include="Properties\Settings.settings">
<Generator>SettingsSingleFileGenerator</Generator>
<LastGenOutput>Settings.Designer.cs</LastGenOutput>
</None>
<Compile Include="Properties\Settings.Designer.cs">
<AutoGen>True</AutoGen>
<DependentUpon>Settings.settings</DependentUpon>
<DesignTimeSharedInput>True</DesignTimeSharedInput>
</Compile>
<Compile Include="RenderUtils.cs" />
<Compile Include="ResizeDialog.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="ResizeDialog.Designer.cs">
<DependentUpon>ResizeDialog.cs</DependentUpon>
</Compile>
<Compile Include="ResourceTool.cs" />
<Compile Include="Surface.cs">
<SubType>Component</SubType>
</Compile>
<Compile Include="TileSetRenderer.cs" />
</ItemGroup>
<ItemGroup>
<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>
<Content Include="OpenRA.Editor.Icon.ico" />
</ItemGroup>
<ItemGroup>
<BootstrapperPackage Include="Microsoft.Net.Client.3.5">
<Visible>False</Visible>
<ProductName>.NET Framework 3.5 SP1 Client Profile</ProductName>
<Install>false</Install>
</BootstrapperPackage>
<BootstrapperPackage Include="Microsoft.Net.Framework.3.5.SP1">
<Visible>False</Visible>
<ProductName>.NET Framework 3.5 SP1</ProductName>
<Install>true</Install>
</BootstrapperPackage>
<BootstrapperPackage Include="Microsoft.Windows.Installer.3.1">
<Visible>False</Visible>
<ProductName>Windows Installer 3.1</ProductName>
<Install>true</Install>
</BootstrapperPackage>
</ItemGroup>
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
<Target Name="BeforeBuild">
</Target>
<Target Name="AfterBuild">
</Target>
-->
</Project>

View File

@@ -1,33 +0,0 @@
#region Copyright & License Information
/*
* Copyright 2007-2015 The OpenRA Developers (see AUTHORS)
* This file is part of OpenRA, which is free software. It is made
* available to you under the terms of the GNU General Public License
* as published by the Free Software Foundation. For more information,
* see COPYING.
*/
#endregion
using System;
using System.Globalization;
using System.Windows.Forms;
namespace OpenRA.Editor
{
static class Program
{
public static Ruleset Rules;
[STAThread]
static void Main(string[] args)
{
Log.AddChannel("perf", null);
Application.CurrentCulture = CultureInfo.InvariantCulture;
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
Application.Run(new Form1(args));
}
}
}

View File

@@ -1,63 +0,0 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:4.0.30319.269
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
namespace OpenRA.Editor.Properties {
using System;
/// <summary>
/// A strongly-typed resource class, for looking up localized strings, etc.
/// </summary>
// This class was auto-generated by the StronglyTypedResourceBuilder
// class via a tool like ResGen or Visual Studio.
// To add or remove a member, edit your .ResX file then rerun ResGen
// with the /str option, or rebuild your VS project.
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
internal class Resources {
private static global::System.Resources.ResourceManager resourceMan;
private static global::System.Globalization.CultureInfo resourceCulture;
[global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
internal Resources() {
}
/// <summary>
/// Returns the cached ResourceManager instance used by this class.
/// </summary>
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
internal static global::System.Resources.ResourceManager ResourceManager {
get {
if (object.ReferenceEquals(resourceMan, null)) {
global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("OpenRA.Editor.Properties.Resources", typeof(Resources).Assembly);
resourceMan = temp;
}
return resourceMan;
}
}
/// <summary>
/// Overrides the current thread's CurrentUICulture property for all
/// resource lookups using this strongly typed resource class.
/// </summary>
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
internal static global::System.Globalization.CultureInfo Culture {
get {
return resourceCulture;
}
set {
resourceCulture = value;
}
}
}
}

View File

@@ -1,117 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
</root>

View File

@@ -1,26 +0,0 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:4.0.30319.269
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
namespace OpenRA.Editor.Properties {
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "10.0.0.0")]
internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase {
private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
public static Settings Default {
get {
return defaultInstance;
}
}
}
}

View File

@@ -1,7 +0,0 @@
<?xml version='1.0' encoding='utf-8'?>
<SettingsFile xmlns="http://schemas.microsoft.com/VisualStudio/2004/01/settings" CurrentProfile="(Default)">
<Profiles>
<Profile Name="(Default)" />
</Profiles>
<Settings />
</SettingsFile>

View File

@@ -1,182 +0,0 @@
#region Copyright & License Information
/*
* Copyright 2007-2015 The OpenRA Developers (see AUTHORS)
* This file is part of OpenRA, which is free software. It is made
* available to you under the terms of the GNU General Public License
* as published by the Free Software Foundation. For more information,
* see COPYING.
*/
#endregion
namespace OpenRA.Editor
{
partial class PropertiesDialog
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
components.Dispose();
base.Dispose(disposing);
}
#region Windows Form Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
this.button2 = new System.Windows.Forms.Button();
this.button1 = new System.Windows.Forms.Button();
this.label1 = new System.Windows.Forms.Label();
this.TitleBox = new System.Windows.Forms.TextBox();
this.label2 = new System.Windows.Forms.Label();
this.DescBox = new System.Windows.Forms.TextBox();
this.label3 = new System.Windows.Forms.Label();
this.AuthorBox = new System.Windows.Forms.TextBox();
this.MapVisibilityComboBox = new System.Windows.Forms.ComboBox();
this.label4 = new System.Windows.Forms.Label();
this.SuspendLayout();
//
// button2
//
this.button2.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
this.button2.DialogResult = System.Windows.Forms.DialogResult.OK;
this.button2.Location = new System.Drawing.Point(196, 193);
this.button2.Name = "button2";
this.button2.Size = new System.Drawing.Size(75, 23);
this.button2.TabIndex = 14;
this.button2.Text = "OK";
this.button2.UseVisualStyleBackColor = true;
//
// button1
//
this.button1.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
this.button1.DialogResult = System.Windows.Forms.DialogResult.Cancel;
this.button1.Location = new System.Drawing.Point(277, 193);
this.button1.Name = "button1";
this.button1.Size = new System.Drawing.Size(75, 23);
this.button1.TabIndex = 15;
this.button1.Text = "Cancel";
this.button1.UseVisualStyleBackColor = true;
//
// label1
//
this.label1.AutoSize = true;
this.label1.Location = new System.Drawing.Point(12, 50);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(27, 13);
this.label1.TabIndex = 16;
this.label1.Text = "Title";
//
// title
//
this.TitleBox.Location = new System.Drawing.Point(66, 47);
this.TitleBox.Name = "title";
this.TitleBox.Size = new System.Drawing.Size(286, 20);
this.TitleBox.TabIndex = 17;
//
// label2
//
this.label2.AutoSize = true;
this.label2.Location = new System.Drawing.Point(12, 76);
this.label2.Name = "label2";
this.label2.Size = new System.Drawing.Size(32, 13);
this.label2.TabIndex = 16;
this.label2.Text = "Desc";
//
// desc
//
this.DescBox.Location = new System.Drawing.Point(66, 73);
this.DescBox.Name = "desc";
this.DescBox.Size = new System.Drawing.Size(286, 20);
this.DescBox.TabIndex = 17;
//
// label3
//
this.label3.AutoSize = true;
this.label3.Location = new System.Drawing.Point(12, 102);
this.label3.Name = "label3";
this.label3.Size = new System.Drawing.Size(38, 13);
this.label3.TabIndex = 16;
this.label3.Text = "Author";
//
// author
//
this.AuthorBox.Location = new System.Drawing.Point(66, 99);
this.AuthorBox.Name = "author";
this.AuthorBox.Size = new System.Drawing.Size(286, 20);
this.AuthorBox.TabIndex = 17;
//
//
// 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;
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.CancelButton = this.button1;
this.ClientSize = new System.Drawing.Size(370, 228);
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);
this.Controls.Add(this.label2);
this.Controls.Add(this.TitleBox);
this.Controls.Add(this.label1);
this.Controls.Add(this.button2);
this.Controls.Add(this.button1);
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog;
this.Name = "PropertiesDialog";
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
this.Text = "Map Properties";
this.ResumeLayout(false);
this.PerformLayout();
}
#endregion
private System.Windows.Forms.Button button2;
private System.Windows.Forms.Button button1;
private System.Windows.Forms.Label label1;
public System.Windows.Forms.TextBox TitleBox;
private System.Windows.Forms.Label label2;
public System.Windows.Forms.TextBox DescBox;
private System.Windows.Forms.Label label3;
public System.Windows.Forms.TextBox AuthorBox;
public System.Windows.Forms.ComboBox MapVisibilityComboBox;
private System.Windows.Forms.Label label4;
}
}

View File

@@ -1,120 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
</root>

View File

@@ -1,112 +0,0 @@
#region Copyright & License Information
/*
* Copyright 2007-2015 The OpenRA Developers (see AUTHORS)
* This file is part of OpenRA, which is free software. It is made
* available to you under the terms of the GNU General Public License
* as published by the Free Software Foundation. For more information,
* see COPYING.
*/
#endregion
using System.Drawing;
using System.Drawing.Imaging;
using System.Linq;
using OpenRA.FileFormats;
using OpenRA.FileSystem;
using OpenRA.Graphics;
using OpenRA.Mods.Common.Graphics;
using OpenRA.Mods.Common.SpriteLoaders;
using OpenRA.Traits;
namespace OpenRA.Editor
{
static class RenderUtils
{
static Bitmap RenderShp(ShpTDSprite shp, IPalette p)
{
var frame = shp.Frames.First();
var bitmap = new Bitmap(frame.Size.Width, frame.Size.Height, PixelFormat.Format8bppIndexed);
bitmap.Palette = p.AsSystemPalette();
var data = bitmap.LockBits(bitmap.Bounds(),
ImageLockMode.WriteOnly, PixelFormat.Format8bppIndexed);
unsafe
{
var q = (byte*)data.Scan0.ToPointer();
var stride2 = data.Stride;
for (var i = 0; i < frame.Size.Width; i++)
for (var j = 0; j < frame.Size.Height; j++)
q[j * stride2 + i] = frame.Data[i + frame.Size.Width * j];
}
bitmap.UnlockBits(data);
return bitmap;
}
static readonly string[] LegacyExtensions = new[] { ".shp", ".tem", "" };
static string ResolveFilename(string name, TileSet tileSet)
{
var ssl = Game.ModData.SpriteSequenceLoader as TilesetSpecificSpriteSequenceLoader;
var extensions = ssl != null ? new[] { ssl.TilesetExtensions[tileSet.Id], ssl.DefaultSpriteExtension }.Append(LegacyExtensions) :
LegacyExtensions.AsEnumerable();
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 ShpTDSprite(s);
var bitmap = RenderShp(shp, p);
return new ActorTemplate
{
Bitmap = bitmap,
Info = info,
Appearance = info.Traits.GetOrDefault<EditorAppearanceInfo>()
};
}
}
public static ResourceTemplate RenderResourceType(ResourceTypeInfo info, TileSet tileset, IPalette p)
{
var image = ResolveFilename(info.EditorSprite, tileset);
using (var s = GlobalFileSystem.Open(image))
{
// TODO: Do this properly
var shp = new ShpTDSprite(s);
var frame = shp.Frames.Last();
var bitmap = new Bitmap(frame.Size.Width, frame.Size.Height, PixelFormat.Format8bppIndexed);
bitmap.Palette = p.AsSystemPalette();
var data = bitmap.LockBits(bitmap.Bounds(),
ImageLockMode.WriteOnly, PixelFormat.Format8bppIndexed);
unsafe
{
var q = (byte*)data.Scan0.ToPointer();
var stride = data.Stride;
for (var i = 0; i < frame.Size.Width; i++)
for (var j = 0; j < frame.Size.Height; j++)
q[j * stride + i] = frame.Data[i + frame.Size.Width * j];
}
bitmap.UnlockBits(data);
return new ResourceTemplate { Bitmap = bitmap, Info = info, Value = shp.Frames.Count - 1 };
}
}
}
}

View File

@@ -1,235 +0,0 @@
#region Copyright & License Information
/*
* Copyright 2007-2015 The OpenRA Developers (see AUTHORS)
* This file is part of OpenRA, which is free software. It is made
* available to you under the terms of the GNU General Public License
* as published by the Free Software Foundation. For more information,
* see COPYING.
*/
#endregion
namespace OpenRA.Editor
{
partial class ResizeDialog
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
components.Dispose();
base.Dispose(disposing);
}
#region Windows Form Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
this.MapWidth = new System.Windows.Forms.NumericUpDown();
this.label1 = new System.Windows.Forms.Label();
this.label2 = new System.Windows.Forms.Label();
this.CordonLeft = new System.Windows.Forms.NumericUpDown();
this.CordonTop = new System.Windows.Forms.NumericUpDown();
this.CordonRight = new System.Windows.Forms.NumericUpDown();
this.CordonBottom = new System.Windows.Forms.NumericUpDown();
this.label3 = new System.Windows.Forms.Label();
this.button1 = new System.Windows.Forms.Button();
this.button2 = new System.Windows.Forms.Button();
this.MapHeight = new System.Windows.Forms.NumericUpDown();
((System.ComponentModel.ISupportInitialize)(this.MapWidth)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.CordonLeft)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.CordonTop)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.CordonRight)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.CordonBottom)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.MapHeight)).BeginInit();
this.SuspendLayout();
//
// width
//
this.MapWidth.Increment = new decimal(new int[] {
8,
0,
0,
0});
this.MapWidth.Location = new System.Drawing.Point(161, 18);
this.MapWidth.Maximum = new decimal(new int[] {
2048,
0,
0,
0});
this.MapWidth.Name = "width";
this.MapWidth.Size = new System.Drawing.Size(105, 20);
this.MapWidth.TabIndex = 0;
//
// label1
//
this.label1.AutoSize = true;
this.label1.Location = new System.Drawing.Point(23, 20);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(27, 13);
this.label1.TabIndex = 1;
this.label1.Text = "Size";
//
// label2
//
this.label2.AutoSize = true;
this.label2.Location = new System.Drawing.Point(23, 46);
this.label2.Name = "label2";
this.label2.Size = new System.Drawing.Size(86, 13);
this.label2.TabIndex = 1;
this.label2.Text = "Cordon Left/Top";
//
// cordonLeft
//
this.CordonLeft.Location = new System.Drawing.Point(161, 44);
this.CordonLeft.Maximum = new decimal(new int[] {
2048,
0,
0,
0});
this.CordonLeft.Name = "cordonLeft";
this.CordonLeft.Size = new System.Drawing.Size(105, 20);
this.CordonLeft.TabIndex = 0;
//
// cordonTop
//
this.CordonTop.Location = new System.Drawing.Point(272, 44);
this.CordonTop.Maximum = new decimal(new int[] {
2048,
0,
0,
0});
this.CordonTop.Name = "cordonTop";
this.CordonTop.Size = new System.Drawing.Size(105, 20);
this.CordonTop.TabIndex = 0;
//
// cordonRight
//
this.CordonRight.Location = new System.Drawing.Point(161, 70);
this.CordonRight.Maximum = new decimal(new int[] {
2048,
0,
0,
0});
this.CordonRight.Name = "cordonRight";
this.CordonRight.Size = new System.Drawing.Size(105, 20);
this.CordonRight.TabIndex = 0;
//
// cordonBottom
//
this.CordonBottom.Location = new System.Drawing.Point(272, 70);
this.CordonBottom.Maximum = new decimal(new int[] {
2048,
0,
0,
0});
this.CordonBottom.Name = "cordonBottom";
this.CordonBottom.Size = new System.Drawing.Size(105, 20);
this.CordonBottom.TabIndex = 0;
//
// label3
//
this.label3.AutoSize = true;
this.label3.Location = new System.Drawing.Point(23, 72);
this.label3.Name = "label3";
this.label3.Size = new System.Drawing.Size(107, 13);
this.label3.TabIndex = 1;
this.label3.Text = "Cordon Right/Bottom";
//
// button1
//
this.button1.DialogResult = System.Windows.Forms.DialogResult.Cancel;
this.button1.Location = new System.Drawing.Point(302, 111);
this.button1.Name = "button1";
this.button1.Size = new System.Drawing.Size(75, 23);
this.button1.TabIndex = 2;
this.button1.Text = "Cancel";
this.button1.UseVisualStyleBackColor = true;
//
// button2
//
this.button2.DialogResult = System.Windows.Forms.DialogResult.OK;
this.button2.Location = new System.Drawing.Point(221, 111);
this.button2.Name = "button2";
this.button2.Size = new System.Drawing.Size(75, 23);
this.button2.TabIndex = 2;
this.button2.Text = "OK";
this.button2.UseVisualStyleBackColor = true;
//
// height
//
this.MapHeight.Increment = new decimal(new int[] {
8,
0,
0,
0});
this.MapHeight.Location = new System.Drawing.Point(272, 18);
this.MapHeight.Maximum = new decimal(new int[] {
2048,
0,
0,
0});
this.MapHeight.Name = "height";
this.MapHeight.Size = new System.Drawing.Size(105, 20);
this.MapHeight.TabIndex = 0;
//
// ResizeDialog
//
this.AcceptButton = this.button2;
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.CancelButton = this.button1;
this.ClientSize = new System.Drawing.Size(409, 146);
this.Controls.Add(this.button2);
this.Controls.Add(this.button1);
this.Controls.Add(this.label3);
this.Controls.Add(this.label2);
this.Controls.Add(this.label1);
this.Controls.Add(this.CordonBottom);
this.Controls.Add(this.CordonTop);
this.Controls.Add(this.CordonRight);
this.Controls.Add(this.CordonLeft);
this.Controls.Add(this.MapHeight);
this.Controls.Add(this.MapWidth);
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog;
this.Name = "ResizeDialog";
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
this.Text = "Resize Map";
((System.ComponentModel.ISupportInitialize)(this.MapWidth)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.CordonLeft)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.CordonTop)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.CordonRight)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.CordonBottom)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.MapHeight)).EndInit();
this.ResumeLayout(false);
this.PerformLayout();
}
#endregion
private System.Windows.Forms.Label label1;
private System.Windows.Forms.Label label2;
private System.Windows.Forms.Label label3;
private System.Windows.Forms.Button button1;
private System.Windows.Forms.Button button2;
public System.Windows.Forms.NumericUpDown MapWidth;
public System.Windows.Forms.NumericUpDown CordonLeft;
public System.Windows.Forms.NumericUpDown CordonTop;
public System.Windows.Forms.NumericUpDown CordonRight;
public System.Windows.Forms.NumericUpDown CordonBottom;
public System.Windows.Forms.NumericUpDown MapHeight;
}
}

View File

@@ -1,22 +0,0 @@
#region Copyright & License Information
/*
* Copyright 2007-2015 The OpenRA Developers (see AUTHORS)
* This file is part of OpenRA, which is free software. It is made
* available to you under the terms of the GNU General Public License
* as published by the Free Software Foundation. For more information,
* see COPYING.
*/
#endregion
using System.Windows.Forms;
namespace OpenRA.Editor
{
public partial class ResizeDialog : Form
{
public ResizeDialog()
{
InitializeComponent();
}
}
}

View File

@@ -1,120 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
</root>

View File

@@ -1,45 +0,0 @@
#region Copyright & License Information
/*
* Copyright 2007-2015 The OpenRA Developers (see AUTHORS)
* This file is part of OpenRA, which is free software. It is made
* available to you under the terms of the GNU General Public License
* as published by the Free Software Foundation. For more information,
* see COPYING.
*/
#endregion
using System;
using SGraphics = System.Drawing.Graphics;
namespace OpenRA.Editor
{
class ResourceTool : ITool
{
ResourceTemplate resourceTemplate;
public ResourceTool(ResourceTemplate resource) { resourceTemplate = resource; }
public void Apply(Surface surface)
{
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);
if (surface.Chunks.ContainsKey(ch))
{
surface.Chunks[ch].Dispose();
surface.Chunks.Remove(ch);
}
}
public void Preview(Surface surface, SGraphics g)
{
surface.DrawImage(g, resourceTemplate.Bitmap, surface.GetBrushLocation(), false, null);
}
Random random = new Random();
}
}

View File

@@ -1,573 +0,0 @@
#region Copyright & License Information
/*
* Copyright 2007-2015 The OpenRA Developers (see AUTHORS)
* This file is part of OpenRA, which is free software. It is made
* available to you under the terms of the GNU General Public License
* as published by the Free Software Foundation. For more information,
* see COPYING.
*/
#endregion
using System;
using System.Collections.Generic;
using System.Drawing;
using System.Drawing.Imaging;
using System.Linq;
using System.Windows.Forms;
using OpenRA.Graphics;
using OpenRA.Primitives;
using OpenRA.Traits;
using SGraphics = System.Drawing.Graphics;
namespace OpenRA.Editor
{
static class ActorReferenceExts
{
public static CPos Location(this ActorReference ar)
{
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)
{
g.DrawString(s, f, bg, x - 1, y - 1);
g.DrawString(s, f, bg, x + 1, y - 1);
g.DrawString(s, f, bg, x - 1, y + 1);
g.DrawString(s, f, bg, x + 1, y + 1);
g.DrawString(s, f, fg, x, y);
}
}
class Surface : Control
{
public Map Map { get; private set; }
public TileSet TileSet { get; private set; }
public TileSetRenderer TileSetRenderer { get; private set; }
public IPalette Palette { get; private set; }
public IPalette PlayerPalette { get; private set; }
public int2 Offset;
public int2 GetOffset() { return Offset; }
public float Zoom = 1.0f;
ITool currentTool;
public bool IsPanning;
public bool IsErasing;
public bool ShowActorNames;
public bool ShowGrid;
public bool ShowRuler;
public bool IsPaste { get { return TileSelection != null && ResourceSelection != null; } }
public TerrainTile[,] TileSelection;
public ResourceTile[,] ResourceSelection;
public CPos SelectionStart;
public CPos SelectionEnd;
public string NewActorOwner;
public event Action AfterChange = () => { };
public event Action<string> MousePositionChanged = _ => { };
public event Action<KeyValuePair<string, ActorReference>> ActorDoubleClicked = _ => { };
Dictionary<string, ActorTemplate> actorTemplates = new Dictionary<string, ActorTemplate>();
public Dictionary<int, ResourceTemplate> ResourceTemplates = new Dictionary<int, ResourceTemplate>();
static readonly Font MarkerFont = new Font(FontFamily.GenericSansSerif, 12.0f, FontStyle.Regular);
static readonly SolidBrush TextBrush = new SolidBrush(Color.Red);
public Keys GetModifiers() { return ModifierKeys; }
public void Bind(Map m, TileSet ts, TileSetRenderer tsr, IPalette p, IPalette pp)
{
Map = m;
TileSet = ts;
TileSetRenderer = tsr;
Palette = p;
PlayerPalette = pp;
playerPalettes = null;
Chunks.Clear();
currentTool = null;
}
public void SetTool(ITool tool) { currentTool = tool; ClearSelection(); }
public void BindActorTemplates(IEnumerable<ActorTemplate> templates)
{
actorTemplates = templates.ToDictionary(a => a.Info.Name.ToLowerInvariant());
}
public void BindResourceTemplates(IEnumerable<ResourceTemplate> templates)
{
ResourceTemplates = templates.ToDictionary(a => a.Info.ResourceType);
}
public Dictionary<int2, Bitmap> Chunks = new Dictionary<int2, Bitmap>();
public Surface()
{
BackColor = Color.Black;
SetStyle(ControlStyles.OptimizedDoubleBuffer, true);
SetStyle(ControlStyles.ResizeRedraw, true);
UpdateStyles();
}
static readonly Pen SelectionPen = new Pen(Color.Blue);
static readonly Pen PastePen = new Pen(Color.Green);
static readonly Pen CordonPen = new Pen(Color.Red);
int2 mousePos;
public void Scroll(int2 dx)
{
Offset -= dx;
Invalidate();
}
protected override void OnDoubleClick(EventArgs e)
{
base.OnDoubleClick(e);
var x = Map.Actors.Value.FirstOrDefault(a => a.Value.Location() == GetBrushLocation());
if (x.Key != null)
ActorDoubleClicked(x);
}
protected override void OnMouseWheel(MouseEventArgs e)
{
base.OnMouseWheel(e);
if (Map == null) return;
Zoom *= e.Delta > 0 ? 4.0f / 3.0f : .75f;
Invalidate();
}
protected override void OnMouseLeave(EventArgs e)
{
base.OnMouseLeave(e);
this.Parent.Focus();
Invalidate();
}
protected override void OnMouseEnter(EventArgs e)
{
base.OnMouseLeave(e);
this.Focus();
Invalidate();
}
protected override void OnMouseMove(MouseEventArgs e)
{
base.OnMouseMove(e);
if (Map == null) return;
var oldMousePos = mousePos;
mousePos = new int2(e.Location);
MousePositionChanged(GetBrushLocation().ToString());
if (e.Button == MouseButtons.Middle || (e.Button != MouseButtons.None && IsPanning))
Scroll(oldMousePos - mousePos);
else
{
if (e.Button == MouseButtons.Right || (IsErasing && e.Button == MouseButtons.Left))
Erase();
if (e.Button == MouseButtons.Left && !IsErasing)
Draw();
Invalidate();
}
}
void Erase()
{
// Crash preventing
var brushLocation = GetBrushLocation();
if (Map == null || brushLocation.X >= Map.MapSize.X ||
brushLocation.Y >= Map.MapSize.Y ||
brushLocation.X < 0 ||
brushLocation.Y < 0)
return;
currentTool = null;
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].Type != 0)
{
Map.MapResources.Value[brushLocation] = new ResourceTile(0, 0);
var ch = new int2(brushLocation.X / ChunkSize, brushLocation.Y / ChunkSize);
if (Chunks.ContainsKey(ch))
{
Chunks[ch].Dispose();
Chunks.Remove(ch);
}
}
AfterChange();
ClearSelection();
}
void Draw()
{
if (currentTool != null)
{
currentTool.Apply(this);
AfterChange();
}
else if (IsPaste)
PasteSelection();
else
SelectionEnd = GetBrushLocationBR();
}
protected override void OnMouseDown(MouseEventArgs e)
{
base.OnMouseDown(e);
if (Map == null) return;
if (!IsPanning)
{
if (e.Button == MouseButtons.Right) Erase();
if (e.Button == MouseButtons.Left && !IsErasing)
{
Draw();
if (!IsPaste)
SelectionStart = SelectionEnd = GetBrushLocation();
}
}
Invalidate();
}
public const int ChunkSize = 8; // 8x8 chunks ==> 192x192 bitmaps.
Bitmap RenderChunk(int u, int v)
{
var bitmap = new Bitmap(ChunkSize * TileSetRenderer.TileSize, ChunkSize * TileSetRenderer.TileSize);
var data = bitmap.LockBits(bitmap.Bounds(),
ImageLockMode.WriteOnly, PixelFormat.Format32bppArgb);
unsafe
{
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 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);
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();
if (Map.MapResources.Value[uv].Type != 0)
{
var resourceImage = ResourceTemplates[Map.MapResources.Value[uv].Type].Bitmap;
var srcdata = resourceImage.LockBits(resourceImage.Bounds(),
ImageLockMode.ReadOnly, PixelFormat.Format32bppArgb);
var q = (int*)srcdata.Scan0.ToPointer();
var srcstride = srcdata.Stride >> 2;
for (var x = 0; x < TileSetRenderer.TileSize; x++)
for (var y = 0; y < TileSetRenderer.TileSize; y++)
{
var c = q[y * srcstride + x];
if ((c & 0xff000000) != 0) /* quick & dirty, i cbf doing real alpha */
p[(j * TileSetRenderer.TileSize + y) * stride + i * TileSetRenderer.TileSize + x] = c;
}
resourceImage.UnlockBits(srcdata);
}
}
}
bitmap.UnlockBits(data);
if (ShowGrid)
{
using (var g = SGraphics.FromImage(bitmap))
{
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;
}
public CPos GetBrushLocation()
{
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, vY / TileSetRenderer.TileSize);
}
public CPos GetBrushLocationBR()
{
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);
}
public void DrawActor(SGraphics g, CPos p, ActorTemplate t, ColorPalette cp)
{
var centered = t.Appearance == null || !t.Appearance.RelativeToTopLeft;
var actorPalette = cp;
if (t.Appearance != null && t.Appearance.UseTerrainPalette)
actorPalette = Palette.AsSystemPalette();
DrawImage(g, t.Bitmap, p, centered, actorPalette);
}
float2 GetDrawPosition(CPos location, Bitmap bmp, bool centered)
{
float offsetX = centered ? bmp.Width / 2 - TileSetRenderer.TileSize / 2 : 0;
var drawX = TileSetRenderer.TileSize * location.X * Zoom + Offset.X - offsetX;
float offsetY = centered ? bmp.Height / 2 - TileSetRenderer.TileSize / 2 : 0;
var drawY = TileSetRenderer.TileSize * location.Y * Zoom + Offset.Y - offsetY;
return new float2(drawX, drawY);
}
public void DrawImage(SGraphics g, Bitmap bmp, CPos location, bool centered, ColorPalette cp)
{
var drawPos = GetDrawPosition(location, bmp, centered);
var sourceRect = new RectangleF(0, 0, bmp.Width, bmp.Height);
var destRect = new RectangleF(drawPos.X, drawPos.Y, bmp.Width * Zoom, bmp.Height * Zoom);
var restorePalette = bmp.Palette;
if (cp != null) bmp.Palette = cp;
g.DrawImage(bmp, destRect, sourceRect, GraphicsUnit.Pixel);
if (cp != null) bmp.Palette = restorePalette;
}
void DrawActorBorder(SGraphics g, CPos p, ActorTemplate t)
{
var centered = t.Appearance == null || !t.Appearance.RelativeToTopLeft;
var drawPos = GetDrawPosition(p, t.Bitmap, centered);
g.DrawRectangle(CordonPen,
drawPos.X, drawPos.Y,
t.Bitmap.Width * Zoom, t.Bitmap.Height * Zoom);
}
ColorPalette GetPaletteForPlayerInner(string name)
{
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 ImmutablePalette(PlayerPalette, remap).AsSystemPalette();
}
Cache<string, ColorPalette> playerPalettes;
public ColorPalette GetPaletteForPlayer(string player)
{
if (playerPalettes == null)
playerPalettes = new Cache<string, ColorPalette>(GetPaletteForPlayerInner);
return playerPalettes[player];
}
ColorPalette GetPaletteForActor(ActorReference ar)
{
var ownerInit = ar.InitDict.GetOrDefault<OwnerInit>();
if (ownerInit == null)
return null;
return GetPaletteForPlayer(ownerInit.PlayerName);
}
protected override void OnPaint(PaintEventArgs e)
{
if (Map == null) return;
if (TileSet == null) return;
for (var u = 0; u < Map.MapSize.X; u += ChunkSize)
for (var v = 0; v < Map.MapSize.Y; v += ChunkSize)
{
var x = new int2(u / ChunkSize, v / ChunkSize);
if (!Chunks.ContainsKey(x)) Chunks[x] = RenderChunk(u / ChunkSize, v / ChunkSize);
var bmp = Chunks[x];
var drawX = TileSetRenderer.TileSize * (float)ChunkSize * (float)x.X * Zoom + Offset.X;
var drawY = TileSetRenderer.TileSize * (float)ChunkSize * (float)x.Y * Zoom + Offset.Y;
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);
}
e.Graphics.DrawRectangle(CordonPen,
Map.Bounds.Left * TileSetRenderer.TileSize * Zoom + Offset.X,
Map.Bounds.Top * TileSetRenderer.TileSize * Zoom + Offset.Y,
Map.Bounds.Width * TileSetRenderer.TileSize * Zoom,
Map.Bounds.Height * TileSetRenderer.TileSize * Zoom);
e.Graphics.DrawRectangle(SelectionPen,
(SelectionStart.X * TileSetRenderer.TileSize * Zoom) + Offset.X,
(SelectionStart.Y * TileSetRenderer.TileSize * Zoom) + Offset.Y,
(SelectionEnd - SelectionStart).X * TileSetRenderer.TileSize * Zoom,
(SelectionEnd - SelectionStart).Y * TileSetRenderer.TileSize * Zoom);
if (IsPaste)
{
var loc = GetBrushLocation();
var width = Math.Abs((SelectionStart - SelectionEnd).X);
var height = Math.Abs((SelectionStart - SelectionEnd).Y);
e.Graphics.DrawRectangle(PastePen,
(loc.X * TileSetRenderer.TileSize * Zoom) + Offset.X,
(loc.Y * TileSetRenderer.TileSize * Zoom) + Offset.Y,
width * (TileSetRenderer.TileSize * Zoom),
height * (TileSetRenderer.TileSize * Zoom));
}
foreach (var ar in Map.Actors.Value)
{
if (actorTemplates.ContainsKey(ar.Value.Type))
DrawActor(e.Graphics, ar.Value.Location(), actorTemplates[ar.Value.Type],
GetPaletteForActor(ar.Value));
else
Console.WriteLine("Warning: Unknown or excluded actor: {0}", ar.Value.Type);
}
if (ShowActorNames)
foreach (var ar in Map.Actors.Value)
if (!ar.Key.StartsWith("Actor")) // if it has a custom name
e.Graphics.DrawStringContrast(Font, ar.Key,
(int)(ar.Value.Location().X * TileSetRenderer.TileSize * Zoom + Offset.X),
(int)(ar.Value.Location().Y * TileSetRenderer.TileSize * Zoom + Offset.Y),
Brushes.White,
Brushes.Black);
if (ShowRuler && Zoom > 0.2)
{
for (var i = Map.Bounds.Left; i <= Map.Bounds.Right; i += 8)
{
if (i % 8 == 0)
{
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 (var i = Map.Bounds.Top; i <= Map.Bounds.Bottom; i += 8)
{
if (i % 8 == 0)
{
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);
}
}
}
if (currentTool != null)
currentTool.Preview(this, e.Graphics);
if (currentTool == null)
{
var x = Map.Actors.Value.FirstOrDefault(a => a.Value.Location() == GetBrushLocation());
if (x.Key != null && actorTemplates.ContainsKey(x.Value.Type))
DrawActorBorder(e.Graphics, x.Value.Location(), actorTemplates[x.Value.Type]);
}
}
public void CopySelection()
{
// Grab tiles and resources within selection (doesn't do actors)
var start = SelectionStart;
var end = SelectionEnd;
if (start == end) return;
var width = Math.Abs((start - end).X);
var height = Math.Abs((start - end).Y);
TileSelection = new TerrainTile[width, height];
ResourceSelection = new ResourceTile[width, height];
for (var x = 0; x < width; x++)
{
for (var y = 0; y < height; y++)
{
// TODO: crash prevention
var cell = new CPos(start.X + x, start.Y + y);
TileSelection[x, y] = Map.MapTiles.Value[cell];
ResourceSelection[x, y] = Map.MapResources.Value[cell];
}
}
}
void PasteSelection()
{
var loc = GetBrushLocation();
var width = Math.Abs((SelectionStart - SelectionEnd).X);
var height = Math.Abs((SelectionStart - SelectionEnd).Y);
for (var x = 0; x < width; x++)
{
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[cell] = TileSelection[x, y];
Map.MapResources.Value[cell] = ResourceSelection[x, y];
var ch = new int2(mapX / ChunkSize, mapY / ChunkSize);
if (Chunks.ContainsKey(ch))
{
Chunks[ch].Dispose();
Chunks.Remove(ch);
}
}
}
AfterChange();
}
void ClearSelection()
{
SelectionStart = CPos.Zero;
SelectionEnd = CPos.Zero;
TileSelection = null;
ResourceSelection = null;
}
}
}

View File

@@ -1,117 +0,0 @@
#region Copyright & License Information
/*
* Copyright 2007-2015 The OpenRA Developers (see AUTHORS)
* This file is part of OpenRA, which is free software. It is made
* available to you under the terms of the GNU General Public License
* as published by the Free Software Foundation. For more information,
* see COPYING.
*/
#endregion
using System;
using System.Collections.Generic;
using System.Drawing;
using System.Drawing.Imaging;
using System.Linq;
using OpenRA.FileSystem;
using OpenRA.Graphics;
namespace OpenRA.Editor
{
public class TileSetRenderer
{
public readonly int TileSize;
public TileSet TileSet;
Dictionary<ushort, byte[][]> templates;
// Extract a square tile that the editor can render
byte[] ExtractSquareTile(ISpriteFrame frame)
{
var data = new byte[TileSize * TileSize];
// Invalid tile size: return blank tile
if (frame.Size.Width < TileSize || frame.Size.Height < TileSize)
return new byte[0];
var frameData = frame.Data;
var xOffset = (frame.Size.Width - TileSize) / 2;
var yOffset = (frame.Size.Height - TileSize) / 2;
for (var y = 0; y < TileSize; y++)
for (var x = 0; x < TileSize; x++)
data[y * TileSize + x] = frameData[(yOffset + y) * frame.Size.Width + x + xOffset];
return data;
}
public TileSetRenderer(TileSet tileset, Size tileSize)
{
this.TileSet = tileset;
this.TileSize = Math.Min(tileSize.Width, tileSize.Height);
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, IPalette p)
{
var template = TileSet.Templates[id];
var templateData = templates[id];
var bitmap = new Bitmap(TileSize * template.Size.X, TileSize * template.Size.Y,
PixelFormat.Format8bppIndexed);
bitmap.Palette = p.AsSystemPalette();
var data = bitmap.LockBits(bitmap.Bounds(),
ImageLockMode.WriteOnly, PixelFormat.Format8bppIndexed);
unsafe
{
var q = (byte*)data.Scan0.ToPointer();
var stride = data.Stride;
for (var u = 0; u < template.Size.X; u++)
{
for (var v = 0; v < template.Size.Y; v++)
{
var rawImage = templateData[u + v * template.Size.X];
if (rawImage != null && rawImage.Length > 0)
{
for (var i = 0; i < TileSize; i++)
for (var j = 0; j < TileSize; j++)
q[(v * TileSize + j) * stride + u * TileSize + i] = rawImage[i + TileSize * j];
}
else
{
for (var i = 0; i < TileSize; i++)
for (var j = 0; j < TileSize; j++)
q[(v * TileSize + j) * stride + u * TileSize + i] = 0;
}
}
}
}
bitmap.UnlockBits(data);
return bitmap;
}
public byte[][] Data(ushort id)
{
byte[][] template;
if (!templates.TryGetValue(id, out template))
{
Console.WriteLine("warning: Unknown tile template {0}", id);
return null;
}
return template;
}
}
}

6
OpenRA.Game.exe.config Normal file
View File

@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<runtime>
<loadFromRemoteSources enabled="true" />
</runtime>
</configuration>

View File

@@ -22,69 +22,52 @@ using OpenRA.Traits;
namespace OpenRA
{
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 sealed class Actor : IScriptBindable, IScriptNotifyBind, ILuaTableBinding, ILuaEqualityBinding, ILuaToStringBinding, IEquatable<Actor>, IDisposable
{
public readonly ActorInfo Info;
ActorInfo IActor.Info { get { return this.Info; } }
public readonly World World;
IWorld IActor.World { get { return World; } }
public readonly uint ActorID;
uint IActor.ActorID { get { return this.ActorID; } }
[Sync] public Player Owner { get; set; }
public Player Owner { get; set; }
public bool IsInWorld { get; internal set; }
public bool Destroyed { get; private set; }
public bool Disposed { 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 Rectangle Bounds { get; private set; }
public Rectangle VisualBounds { get; private set; }
public IEffectiveOwner EffectiveOwner { get; private set; }
public IOccupySpace OccupiesSpace { get; private set; }
public bool IsIdle { get { return currentActivity == null; } }
public bool IsDead { get { return Destroyed || (health.Value == null ? false : health.Value.IsDead); } }
public bool IsDead { get { return Disposed || (health != null && health.IsDead); } }
public CPos Location { get { return occupySpace.Value.TopLeft; } }
public WPos CenterPosition { get { return occupySpace.Value.CenterPosition; } }
public CPos Location { get { return OccupiesSpace.TopLeft; } }
public WPos CenterPosition { get { return OccupiesSpace.CenterPosition; } }
public WRot Orientation
{
get
{
// TODO: Support non-zero pitch/roll in IFacing (IOrientation?)
var facingValue = facing.Value != null ? facing.Value.Facing : 0;
var facingValue = facing != null ? facing.Facing : 0;
return new WRot(WAngle.Zero, WAngle.Zero, WAngle.FromFacing(facingValue));
}
}
readonly IRenderModifier[] traitsImplementingRenderModifier;
readonly IRender[] traitsImplementingRender;
readonly IFacing facing;
readonly IHealth health;
readonly IRenderModifier[] renderModifiers;
readonly IRender[] renders;
readonly IDisable[] disables;
readonly IVisibilityModifier[] visibilityModifiers;
readonly IDefaultVisibility defaultVisibility;
internal Actor(World world, string name, TypeDictionary initDict)
{
@@ -95,8 +78,6 @@ namespace OpenRA
if (initDict.Contains<OwnerInit>())
Owner = init.Get<OwnerInit, Player>();
occupySpace = Exts.Lazy(() => TraitOrDefault<IOccupySpace>());
if (name != null)
{
name = name.ToLowerInvariant();
@@ -106,28 +87,54 @@ namespace OpenRA
Info = world.Map.Rules.Actors[name];
foreach (var trait in Info.TraitsInConstructOrder())
{
AddTrait(trait.Create(init));
// Some traits rely on properties provided by IOccupySpace in their initialization,
// so we must ready it now, we cannot wait until all traits have finished construction.
if (trait is IOccupySpaceInfo)
OccupiesSpace = Trait<IOccupySpace>();
}
}
facing = Exts.Lazy(() => TraitOrDefault<IFacing>());
health = Exts.Lazy(() => TraitOrDefault<Health>());
effectiveOwner = Exts.Lazy(() => TraitOrDefault<IEffectiveOwner>());
Bounds = DetermineBounds();
VisualBounds = DetermineVisualBounds();
EffectiveOwner = TraitOrDefault<IEffectiveOwner>();
facing = TraitOrDefault<IFacing>();
health = TraitOrDefault<IHealth>();
renderModifiers = TraitsImplementing<IRenderModifier>().ToArray();
renders = TraitsImplementing<IRender>().ToArray();
disables = TraitsImplementing<IDisable>().ToArray();
visibilityModifiers = TraitsImplementing<IVisibilityModifier>().ToArray();
defaultVisibility = Trait<IDefaultVisibility>();
}
bounds = Exts.Lazy(() =>
{
var si = Info.Traits.GetOrDefault<SelectableInfo>();
var size = (si != null && si.Bounds != null) ? new int2(si.Bounds[0], si.Bounds[1]) :
TraitsImplementing<IAutoSelectionSize>().Select(x => x.SelectionSize(this)).FirstOrDefault();
Rectangle DetermineBounds()
{
var si = Info.TraitInfoOrDefault<SelectableInfo>();
var size = (si != null && si.Bounds != null) ? new int2(si.Bounds[0], si.Bounds[1]) :
TraitsImplementing<IAutoSelectionSize>().Select(x => x.SelectionSize(this)).FirstOrDefault();
var offset = -size / 2;
if (si != null && si.Bounds != null && si.Bounds.Length > 2)
offset += new int2(si.Bounds[2], si.Bounds[3]);
var offset = -size / 2;
if (si != null && si.Bounds != null && si.Bounds.Length > 2)
offset += new int2(si.Bounds[2], si.Bounds[3]);
return new Rectangle(offset.X, offset.Y, size.X, size.Y);
});
return new Rectangle(offset.X, offset.Y, size.X, size.Y);
}
traitsImplementingRenderModifier = TraitsImplementing<IRenderModifier>().ToArray();
traitsImplementingRender = TraitsImplementing<IRender>().ToArray();
Rectangle DetermineVisualBounds()
{
var sd = Info.TraitInfoOrDefault<ISelectionDecorationsInfo>();
if (sd == null || sd.SelectionBoxBounds == null)
return Bounds;
var size = new int2(sd.SelectionBoxBounds[0], sd.SelectionBoxBounds[1]);
var offset = -size / 2;
if (sd.SelectionBoxBounds.Length > 2)
offset += new int2(sd.SelectionBoxBounds[2], sd.SelectionBoxBounds[3]);
return new Rectangle(offset.X, offset.Y, size.X, size.Y);
}
public void Tick()
@@ -143,14 +150,14 @@ namespace OpenRA
public IEnumerable<IRenderable> Render(WorldRenderer wr)
{
var renderables = Renderables(wr);
foreach (var modifier in traitsImplementingRenderModifier)
foreach (var modifier in renderModifiers)
renderables = modifier.ModifyRender(this, wr, renderables);
return renderables;
}
IEnumerable<IRenderable> Renderables(WorldRenderer wr)
{
foreach (var render in traitsImplementingRender)
foreach (var render in renders)
foreach (var renderable in render.Render(this, wr))
yield return renderable;
}
@@ -220,28 +227,26 @@ namespace OpenRA
return World.TraitDict.WithInterface<T>(this);
}
public bool HasTrait<T>()
{
return World.TraitDict.Contains<T>(this);
}
public void AddTrait(object trait)
{
World.TraitDict.AddTrait(this, trait);
}
public void Destroy()
public void Dispose()
{
World.AddFrameEndTask(w =>
{
if (Destroyed)
if (Disposed)
return;
if (IsInWorld)
World.Remove(this);
foreach (var t in TraitsImplementing<INotifyActorDisposing>())
t.Disposing(this);
World.TraitDict.RemoveActor(this);
Destroyed = true;
Disposed = true;
if (luaInterface != null)
luaInterface.Value.OnActorDestroyed();
@@ -253,28 +258,66 @@ namespace OpenRA
{
World.AddFrameEndTask(w =>
{
if (Destroyed)
if (Disposed)
return;
var oldOwner = Owner;
var wasInWorld = IsInWorld;
// momentarily remove from world so the ownership queries don't get confused
w.Remove(this);
if (wasInWorld)
w.Remove(this);
Owner = newOwner;
Generation++;
w.Add(this);
if (wasInWorld)
w.Add(this);
foreach (var t in this.TraitsImplementing<INotifyOwnerChanged>())
t.OnOwnerChanged(this, oldOwner, newOwner);
});
}
public void Kill(Actor attacker)
public DamageState GetDamageState()
{
if (health.Value == null)
if (Disposed)
return DamageState.Dead;
return (health == null) ? DamageState.Undamaged : health.DamageState;
}
public void InflictDamage(Actor attacker, int damage, IWarhead warhead)
{
if (Disposed || health == null)
return;
health.Value.InflictDamage(this, attacker, health.Value.MaxHP, null, true);
health.InflictDamage(this, attacker, damage, warhead, false);
}
public void Kill(Actor attacker)
{
if (Disposed || health == null)
return;
health.Kill(this, attacker);
}
public bool IsDisabled()
{
foreach (var disable in disables)
if (disable.Disabled)
return true;
return false;
}
public bool CanBeViewedByPlayer(Player player)
{
foreach (var visibilityModifier in visibilityModifiers)
if (!visibilityModifier.IsVisible(this, player))
return false;
return defaultVisibility.IsVisible(this, player);
}
#region Scripting interface

View File

@@ -44,15 +44,15 @@ namespace OpenRA
public MPos ToMPos(Map map)
{
return ToMPos(map.TileShape);
return ToMPos(map.Grid.Type);
}
public MPos ToMPos(TileShape shape)
public MPos ToMPos(MapGridType gridType)
{
if (shape == TileShape.Rectangle)
if (gridType == MapGridType.Rectangular)
return new MPos(X, Y);
// Convert from diamond cell (x, y) position to rectangular map position (u, v)
// Convert from RectangularIsometric 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)

View File

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

0
OpenRA.Game/Effects/DelayedAction.cs Executable file → Normal file
View File

0
OpenRA.Game/Effects/FlashTarget.cs Executable file → Normal file
View File

0
OpenRA.Game/Effects/IEffect.cs Executable file → Normal file
View File

View File

@@ -15,15 +15,15 @@ namespace OpenRA.Effects
{
public class SpriteEffect : IEffect
{
string palette;
Animation anim;
WPos pos;
readonly string palette;
readonly Animation anim;
readonly WPos pos;
public SpriteEffect(WPos pos, World world, string sprite, string palette)
public SpriteEffect(WPos pos, World world, string image, string palette)
{
this.pos = pos;
this.palette = palette;
anim = new Animation(world, sprite);
anim = new Animation(world, image);
anim.PlayThen("idle", () => world.AddFrameEndTask(w => w.Remove(this)));
}

View File

@@ -12,6 +12,7 @@ using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Drawing.Imaging;
using System.Globalization;
using System.Linq;
using System.Reflection;
@@ -23,9 +24,29 @@ namespace OpenRA
{
public static class FieldLoader
{
public class MissingFieldsException : YamlException
{
public readonly string[] Missing;
public readonly string Header;
public override string Message
{
get
{
return (string.IsNullOrEmpty(Header) ? "" : Header + ": ") + Missing[0]
+ string.Concat(Missing.Skip(1).Select(m => ", " + m));
}
}
public MissingFieldsException(string[] missing, string header = null, string headerSingle = null) : base(null)
{
Header = missing.Length > 1 ? header : headerSingle ?? header;
Missing = missing;
}
}
public static Func<string, Type, string, object> InvalidValueAction = (s, t, f) =>
{
throw new InvalidOperationException("FieldLoader: Cannot parse `{0}` into `{1}.{2}` ".F(s, f, t));
throw new YamlException("FieldLoader: Cannot parse `{0}` into `{1}.{2}` ".F(s, f, t));
};
public static Action<string, Type> UnknownFieldAction = (s, f) =>
@@ -33,9 +54,18 @@ namespace OpenRA
throw new NotImplementedException("FieldLoader: Missing field `{0}` on `{1}`".F(s, f.Name));
};
static readonly ConcurrentCache<Type, FieldLoadInfo[]> TypeLoadInfo =
new ConcurrentCache<Type, FieldLoadInfo[]>(BuildTypeLoadInfo);
static readonly ConcurrentCache<MemberInfo, bool> MemberHasTranslateAttribute =
new ConcurrentCache<MemberInfo, bool>(member => member.HasAttribute<TranslateAttribute>());
static readonly object TranslationsLock = new object();
static Dictionary<string, string> translations;
public static void Load(object self, MiniYaml my)
{
var loadInfo = typeLoadInfo[self.GetType()];
var loadInfo = TypeLoadInfo[self.GetType()];
var missing = new List<string>();
Dictionary<string, MiniYaml> md = null;
@@ -43,19 +73,33 @@ namespace OpenRA
{
object val;
if (md == null)
md = my.ToDictionary();
if (fli.Loader != null)
val = fli.Loader(my);
{
if (!fli.Attribute.Required || md.ContainsKey(fli.YamlName))
val = fli.Loader(my);
else
{
missing.Add(fli.YamlName);
continue;
}
}
else
{
if (md == null)
md = my.ToDictionary();
if (!TryGetValueFromYaml(fli.YamlName, fli.Field, md, out val))
{
if (fli.Attribute.Required)
missing.Add(fli.YamlName);
continue;
}
}
fli.Field.SetValue(self, val);
}
if (missing.Any())
throw new MissingFieldsException(missing.ToArray());
}
static bool TryGetValueFromYaml(string yamlName, FieldInfo field, Dictionary<string, MiniYaml> md, out object ret)
@@ -66,13 +110,8 @@ namespace OpenRA
if (!md.TryGetValue(yamlName, out yaml))
return false;
if (yaml.Nodes.Count == 0)
{
ret = GetValue(field.Name, field.FieldType, yaml.Value, field);
return true;
}
throw new InvalidOperationException("TryGetValueFromYaml: unable to load field {0} (of type {1})".F(yamlName, field.FieldType));
ret = GetValue(field.Name, field.FieldType, yaml, field);
return true;
}
public static T Load<T>(MiniYaml y) where T : new()
@@ -82,7 +121,6 @@ namespace OpenRA
return t;
}
static readonly object[] NoIndexes = { };
public static void LoadField(object target, string key, string value)
{
const BindingFlags Flags = BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.Instance;
@@ -103,7 +141,7 @@ namespace OpenRA
{
var sa = prop.GetCustomAttributes<SerializeAttribute>(false).DefaultIfEmpty(SerializeAttribute.Default).First();
if (!sa.FromYamlKey)
prop.SetValue(target, GetValue(prop.Name, prop.PropertyType, value, prop), NoIndexes);
prop.SetValue(target, GetValue(prop.Name, prop.PropertyType, value, prop), null);
return;
}
@@ -122,6 +160,12 @@ namespace OpenRA
public static object GetValue(string fieldName, Type fieldType, string value, MemberInfo field)
{
return GetValue(fieldName, fieldType, new MiniYaml(value), field);
}
public static object GetValue(string fieldName, Type fieldType, MiniYaml yaml, MemberInfo field)
{
var value = yaml.Value;
if (value != null) value = value.Trim();
if (fieldType == typeof(int))
@@ -149,69 +193,81 @@ namespace OpenRA
else if (fieldType == typeof(float))
{
float res;
if (float.TryParse(value.Replace("%", ""), NumberStyles.Float, NumberFormatInfo.InvariantInfo, out res))
if (value != null && float.TryParse(value.Replace("%", ""), NumberStyles.Float, NumberFormatInfo.InvariantInfo, out res))
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 (value != null && 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>())
if (field != null && MemberHasTranslateAttribute[field] && value != null)
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(',');
if (parts.Length == 3)
return Color.FromArgb(
Exts.ParseIntegerInvariant(parts[0]).Clamp(0, 255),
Exts.ParseIntegerInvariant(parts[1]).Clamp(0, 255),
Exts.ParseIntegerInvariant(parts[2]).Clamp(0, 255));
if (parts.Length == 4)
return Color.FromArgb(
Exts.ParseIntegerInvariant(parts[0]).Clamp(0, 255),
Exts.ParseIntegerInvariant(parts[1]).Clamp(0, 255),
Exts.ParseIntegerInvariant(parts[2]).Clamp(0, 255),
Exts.ParseIntegerInvariant(parts[3]).Clamp(0, 255));
if (value != null)
{
var parts = value.Split(',');
if (parts.Length == 3)
return Color.FromArgb(
Exts.ParseIntegerInvariant(parts[0]).Clamp(0, 255),
Exts.ParseIntegerInvariant(parts[1]).Clamp(0, 255),
Exts.ParseIntegerInvariant(parts[2]).Clamp(0, 255));
if (parts.Length == 4)
return Color.FromArgb(
Exts.ParseIntegerInvariant(parts[0]).Clamp(0, 255),
Exts.ParseIntegerInvariant(parts[1]).Clamp(0, 255),
Exts.ParseIntegerInvariant(parts[2]).Clamp(0, 255),
Exts.ParseIntegerInvariant(parts[3]).Clamp(0, 255));
}
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++)
if (value != null)
{
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));
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;
}
return colors;
return InvalidValueAction(value, fieldType, fieldName);
}
else if (fieldType == typeof(HSLColor))
{
var parts = value.Split(',');
if (value != null)
{
var parts = value.Split(',');
// Allow old ColorRamp format to be parsed as HSLColor
if (parts.Length == 3 || parts.Length == 4)
return new HSLColor(
(byte)Exts.ParseIntegerInvariant(parts[0]).Clamp(0, 255),
(byte)Exts.ParseIntegerInvariant(parts[1]).Clamp(0, 255),
(byte)Exts.ParseIntegerInvariant(parts[2]).Clamp(0, 255));
// Allow old ColorRamp format to be parsed as HSLColor
if (parts.Length == 3 || parts.Length == 4)
return new HSLColor(
(byte)Exts.ParseIntegerInvariant(parts[0]).Clamp(0, 255),
(byte)Exts.ParseIntegerInvariant(parts[1]).Clamp(0, 255),
(byte)Exts.ParseIntegerInvariant(parts[2]).Clamp(0, 255));
}
return InvalidValueAction(value, fieldType, fieldName);
}
@@ -223,54 +279,63 @@ namespace OpenRA
return InvalidValueAction(value, fieldType, fieldName);
}
else if (fieldType == typeof(WRange))
else if (fieldType == typeof(WDist))
{
WRange res;
if (WRange.TryParse(value, out res))
WDist res;
if (WDist.TryParse(value, out res))
return res;
return InvalidValueAction(value, fieldType, fieldName);
}
else if (fieldType == typeof(WVec))
{
var parts = value.Split(',');
if (parts.Length == 3)
if (value != null)
{
WRange rx, ry, rz;
if (WRange.TryParse(parts[0], out rx) && WRange.TryParse(parts[1], out ry) && WRange.TryParse(parts[2], out rz))
return new WVec(rx, ry, rz);
var parts = value.Split(',');
if (parts.Length == 3)
{
WDist rx, ry, rz;
if (WDist.TryParse(parts[0], out rx) && WDist.TryParse(parts[1], out ry) && WDist.TryParse(parts[2], out rz))
return new WVec(rx, ry, rz);
}
}
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)
if (value != null)
{
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);
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)
{
WDist rx, ry, rz;
if (WDist.TryParse(parts[3 * i], out rx) && WDist.TryParse(parts[3 * i + 1], out ry) && WDist.TryParse(parts[3 * i + 2], out rz))
vecs[i] = new WVec(rx, ry, rz);
}
return vecs;
}
return vecs;
return InvalidValueAction(value, fieldType, fieldName);
}
else if (fieldType == typeof(WPos))
{
var parts = value.Split(',');
if (parts.Length == 3)
if (value != null)
{
WRange rx, ry, rz;
if (WRange.TryParse(parts[0], out rx) && WRange.TryParse(parts[1], out ry) && WRange.TryParse(parts[2], out rz))
return new WPos(rx, ry, rz);
var parts = value.Split(',');
if (parts.Length == 3)
{
WDist rx, ry, rz;
if (WDist.TryParse(parts[0], out rx) && WDist.TryParse(parts[1], out ry) && WDist.TryParse(parts[2], out rz))
return new WPos(rx, ry, rz);
}
}
return InvalidValueAction(value, fieldType, fieldName);
@@ -284,31 +349,38 @@ namespace OpenRA
}
else if (fieldType == typeof(WRot))
{
var parts = value.Split(',');
if (parts.Length == 3)
if (value != null)
{
int rr, rp, ry;
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));
var parts = value.Split(',');
if (parts.Length == 3)
{
int rr, rp, ry;
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 InvalidValueAction(value, fieldType, fieldName);
}
else if (fieldType == typeof(CPos))
{
var parts = value.Split(new char[] { ',' }, StringSplitOptions.RemoveEmptyEntries);
return new CPos(
Exts.ParseIntegerInvariant(parts[0]),
Exts.ParseIntegerInvariant(parts[1]));
if (value != null)
{
var parts = value.Split(new char[] { ',' }, StringSplitOptions.RemoveEmptyEntries);
return new CPos(Exts.ParseIntegerInvariant(parts[0]), Exts.ParseIntegerInvariant(parts[1]));
}
return InvalidValueAction(value, fieldType, fieldName);
}
else if (fieldType == typeof(CVec))
{
var parts = value.Split(new char[] { ',' }, StringSplitOptions.RemoveEmptyEntries);
return new CVec(
Exts.ParseIntegerInvariant(parts[0]),
Exts.ParseIntegerInvariant(parts[1]));
if (value != null)
{
var parts = value.Split(new char[] { ',' }, StringSplitOptions.RemoveEmptyEntries);
return new CVec(Exts.ParseIntegerInvariant(parts[0]), Exts.ParseIntegerInvariant(parts[1]));
}
return InvalidValueAction(value, fieldType, fieldName);
}
else if (fieldType.IsEnum)
{
@@ -321,9 +393,32 @@ namespace OpenRA
return InvalidValueAction(value, fieldType, fieldName);
}
}
else if (fieldType == typeof(ImageFormat))
{
if (value != null)
{
switch (value.ToLowerInvariant())
{
case "bmp":
return ImageFormat.Bmp;
case "gif":
return ImageFormat.Gif;
case "jpg":
case "jpeg":
return ImageFormat.Jpeg;
case "tif":
case "tiff":
return ImageFormat.Tiff;
default:
return ImageFormat.Png;
}
}
return InvalidValueAction(value, fieldType, fieldName);
}
else if (fieldType == typeof(bool))
return ParseYesNo(value, fieldType, fieldName);
else if (fieldType.IsArray)
else if (fieldType.IsArray && fieldType.GetArrayRank() == 1)
{
if (value == null)
return Array.CreateInstance(fieldType.GetElementType(), 0);
@@ -335,47 +430,95 @@ namespace OpenRA
ret.SetValue(GetValue(fieldName, fieldType.GetElementType(), parts[i].Trim(), field), i);
return ret;
}
else if (fieldType.IsGenericType && fieldType.GetGenericTypeDefinition() == typeof(HashSet<>))
{
var set = Activator.CreateInstance(fieldType);
if (value == null)
return set;
var parts = value.Split(new char[] { ',' }, StringSplitOptions.RemoveEmptyEntries);
var addMethod = fieldType.GetMethod("Add", fieldType.GetGenericArguments());
for (var i = 0; i < parts.Length; i++)
addMethod.Invoke(set, new[] { GetValue(fieldName, fieldType.GetGenericArguments()[0], parts[i].Trim(), field) });
return set;
}
else if (fieldType.IsGenericType && fieldType.GetGenericTypeDefinition() == typeof(Dictionary<,>))
{
var dict = Activator.CreateInstance(fieldType);
var arguments = fieldType.GetGenericArguments();
var addMethod = fieldType.GetMethod("Add", arguments);
foreach (var node in yaml.Nodes)
{
var key = GetValue(fieldName, arguments[0], node.Key, field);
var val = GetValue(fieldName, arguments[1], node.Value, field);
addMethod.Invoke(dict, new[] { key, val });
}
return dict;
}
else if (fieldType == typeof(Size))
{
var parts = value.Split(new char[] { ',' }, StringSplitOptions.RemoveEmptyEntries);
return new Size(
Exts.ParseIntegerInvariant(parts[0]),
Exts.ParseIntegerInvariant(parts[1]));
if (value != null)
{
var parts = value.Split(new char[] { ',' }, StringSplitOptions.RemoveEmptyEntries);
return new Size(Exts.ParseIntegerInvariant(parts[0]), Exts.ParseIntegerInvariant(parts[1]));
}
return InvalidValueAction(value, fieldType, fieldName);
}
else if (fieldType == typeof(int2))
{
var parts = value.Split(new char[] { ',' }, StringSplitOptions.RemoveEmptyEntries);
return new int2(
Exts.ParseIntegerInvariant(parts[0]),
Exts.ParseIntegerInvariant(parts[1]));
if (value != null)
{
var parts = value.Split(new char[] { ',' }, StringSplitOptions.RemoveEmptyEntries);
return new int2(Exts.ParseIntegerInvariant(parts[0]), Exts.ParseIntegerInvariant(parts[1]));
}
return InvalidValueAction(value, fieldType, fieldName);
}
else if (fieldType == typeof(float2))
{
var parts = value.Split(new char[] { ',' }, StringSplitOptions.RemoveEmptyEntries);
float xx = 0;
float yy = 0;
float res;
if (float.TryParse(parts[0].Replace("%", ""), NumberStyles.Float, NumberFormatInfo.InvariantInfo, out res))
xx = res * (parts[0].Contains('%') ? 0.01f : 1f);
if (float.TryParse(parts[1].Replace("%", ""), NumberStyles.Float, NumberFormatInfo.InvariantInfo, out res))
yy = res * (parts[1].Contains('%') ? 0.01f : 1f);
return new float2(xx, yy);
if (value != null)
{
var parts = value.Split(new char[] { ',' }, StringSplitOptions.RemoveEmptyEntries);
float xx = 0;
float yy = 0;
float res;
if (float.TryParse(parts[0].Replace("%", ""), NumberStyles.Float, NumberFormatInfo.InvariantInfo, out res))
xx = res * (parts[0].Contains('%') ? 0.01f : 1f);
if (float.TryParse(parts[1].Replace("%", ""), NumberStyles.Float, NumberFormatInfo.InvariantInfo, out res))
yy = res * (parts[1].Contains('%') ? 0.01f : 1f);
return new float2(xx, yy);
}
return InvalidValueAction(value, fieldType, fieldName);
}
else if (fieldType == typeof(Rectangle))
{
var parts = value.Split(new char[] { ',' }, StringSplitOptions.RemoveEmptyEntries);
return new Rectangle(
Exts.ParseIntegerInvariant(parts[0]),
Exts.ParseIntegerInvariant(parts[1]),
Exts.ParseIntegerInvariant(parts[2]),
Exts.ParseIntegerInvariant(parts[3]));
if (value != null)
{
var parts = value.Split(new char[] { ',' }, StringSplitOptions.RemoveEmptyEntries);
return new Rectangle(
Exts.ParseIntegerInvariant(parts[0]),
Exts.ParseIntegerInvariant(parts[1]),
Exts.ParseIntegerInvariant(parts[2]),
Exts.ParseIntegerInvariant(parts[3]));
}
return InvalidValueAction(value, fieldType, fieldName);
}
else if (fieldType.IsGenericType && fieldType.GetGenericTypeDefinition() == typeof(Bits<>))
{
var parts = value.Split(new char[] { ',' }, StringSplitOptions.RemoveEmptyEntries);
var argTypes = new Type[] { typeof(string[]) };
var argValues = new object[] { parts };
return fieldType.GetConstructor(argTypes).Invoke(argValues);
if (value != null)
{
var parts = value.Split(new char[] { ',' }, StringSplitOptions.RemoveEmptyEntries);
var argTypes = new Type[] { typeof(string[]) };
var argValues = new object[] { parts };
return fieldType.GetConstructor(argTypes).Invoke(argValues);
}
return InvalidValueAction(value, fieldType, fieldName);
}
else if (fieldType.IsGenericType && fieldType.GetGenericTypeDefinition() == typeof(Nullable<>))
{
@@ -412,11 +555,15 @@ namespace OpenRA
static object ParseYesNo(string p, Type fieldType, string field)
{
if (string.IsNullOrEmpty(p))
return InvalidValueAction(p, fieldType, field);
p = p.ToLowerInvariant();
if (p == "yes") return true;
if (p == "true") return true;
if (p == "no") return false;
if (p == "false") return false;
return InvalidValueAction(p, fieldType, field);
}
@@ -438,12 +585,10 @@ namespace OpenRA
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));
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)
static FieldLoadInfo[] BuildTypeLoadInfo(Type type)
{
var ret = new List<FieldLoadInfo>();
@@ -459,13 +604,13 @@ namespace OpenRA
var loader = sa.GetLoader(type);
if (loader == null && sa.FromYamlKey)
loader = (yaml) => GetValue(yamlName, field.FieldType, yaml.Value, field);
loader = yaml => GetValue(yamlName, field.FieldType, yaml, field);
var fli = new FieldLoadInfo(field, sa, yamlName, loader);
ret.Add(fli);
}
return ret;
return ret.ToArray();
}
[AttributeUsage(AttributeTargets.Field)]
@@ -475,12 +620,20 @@ namespace OpenRA
: base(false) { }
}
[AttributeUsage(AttributeTargets.Field)]
public sealed class RequireAttribute : SerializeAttribute
{
public RequireAttribute()
: base(true, true) { }
}
[AttributeUsage(AttributeTargets.Field)]
public sealed class LoadUsingAttribute : SerializeAttribute
{
public LoadUsingAttribute(string loader)
public LoadUsingAttribute(string loader, bool required = false)
{
Loader = loader;
Required = required;
}
}
@@ -495,10 +648,13 @@ namespace OpenRA
public string YamlName;
public string Loader;
public bool FromYamlKey;
public bool DictionaryFromYamlKey;
public bool Required;
public SerializeAttribute(bool serialize = true)
public SerializeAttribute(bool serialize = true, bool required = false)
{
Serialize = serialize;
Required = required;
}
internal Func<MiniYaml, object> GetLoader(Type type)
@@ -520,17 +676,27 @@ namespace OpenRA
public static string Translate(string key)
{
if (Translations == null || string.IsNullOrEmpty(key))
if (string.IsNullOrEmpty(key))
return key;
string value;
if (!Translations.TryGetValue(key, out value))
return key;
lock (TranslationsLock)
{
if (translations == null)
return key;
return value;
string value;
if (!translations.TryGetValue(key, out value))
return key;
return value;
}
}
public static Dictionary<string, string> Translations = new Dictionary<string, string>();
public static void SetTranslations(IDictionary<string, string> translations)
{
lock (TranslationsLock)
FieldLoader.translations = new Dictionary<string, string>(translations);
}
}
[AttributeUsage(AttributeTargets.Field | AttributeTargets.Property)]
@@ -545,7 +711,19 @@ namespace OpenRA
}
}
// Special-cases FieldFromYamlKeyAttribute for use with Dictionary<K,V>.
[AttributeUsage(AttributeTargets.Field)]
public sealed class DictionaryFromYamlKeyAttribute : FieldLoader.SerializeAttribute
{
public DictionaryFromYamlKeyAttribute()
{
FromYamlKey = true;
DictionaryFromYamlKey = true;
}
}
// mirrors DescriptionAttribute from System.ComponentModel but we dont want to have to use that everywhere.
[AttributeUsage(AttributeTargets.All)]
public sealed class DescAttribute : Attribute
{
public readonly string[] Lines;

View File

@@ -12,6 +12,7 @@ using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Drawing.Imaging;
using System.Globalization;
using System.Linq;
using System.Reflection;
@@ -27,7 +28,18 @@ namespace OpenRA
foreach (var info in FieldLoader.GetTypeLoadInfo(o.GetType(), includePrivateByDefault))
{
if (info.Attribute.FromYamlKey)
if (info.Attribute.DictionaryFromYamlKey)
{
var dict = (System.Collections.IDictionary)info.Field.GetValue(o);
foreach (var kvp in dict)
{
var key = ((System.Collections.DictionaryEntry)kvp).Key;
var value = ((System.Collections.DictionaryEntry)kvp).Value;
nodes.Add(new MiniYamlNode(FormatValue(key), FormatValue(value)));
}
}
else if (info.Attribute.FromYamlKey)
root = FormatValue(o, info.Field);
else
nodes.Add(new MiniYamlNode(info.YamlName, FormatValue(o, info.Field)));
@@ -54,11 +66,13 @@ namespace OpenRA
return new MiniYamlNode(field, FormatValue(o, o.GetType().GetField(field)));
}
public static string FormatValue(object v, Type t)
public static string FormatValue(object v)
{
if (v == null)
return "";
var t = v.GetType();
// Color.ToString() does the wrong thing; force it to format as an array
if (t == typeof(Color))
{
@@ -69,13 +83,10 @@ namespace OpenRA
((int)c.B).Clamp(0, 255));
}
// 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(ImageFormat))
{
return ((ImageFormat)v).ToString();
}
if (t == typeof(Rectangle))
{
@@ -83,10 +94,33 @@ namespace OpenRA
return "{0},{1},{2},{3}".F(r.X, r.Y, r.Width, r.Height);
}
if (t.IsArray)
if (t.IsArray && t.GetArrayRank() == 1)
{
var elems = ((Array)v).OfType<object>();
return elems.JoinWith(", ");
return ((Array)v).Cast<object>().Select(FormatValue).JoinWith(", ");
}
if (t.IsGenericType && t.GetGenericTypeDefinition() == typeof(HashSet<>))
{
return ((System.Collections.IEnumerable)v).Cast<object>().Select(FormatValue).JoinWith(", ");
}
// This is only for documentation generation
if (t.IsGenericType && t.GetGenericTypeDefinition() == typeof(Dictionary<,>))
{
var result = "";
var dict = (System.Collections.IDictionary)v;
foreach (var kvp in dict)
{
var key = ((System.Collections.DictionaryEntry)kvp).Key;
var value = ((System.Collections.DictionaryEntry)kvp).Value;
var formattedKey = FormatValue(key);
var formattedValue = FormatValue(value);
result += "{0}: {1}{2}".F(formattedKey, formattedValue, Environment.NewLine);
}
return result;
}
if (t.IsGenericType && t.GetGenericTypeDefinition() == typeof(OpenRA.Primitives.Cache<,>))
@@ -113,7 +147,7 @@ namespace OpenRA
public static string FormatValue(object o, FieldInfo f)
{
return FormatValue(f.GetValue(o), f.FieldType);
return FormatValue(f.GetValue(o));
}
}
}

View File

@@ -119,12 +119,6 @@ namespace OpenRA.FileFormats
pubkey.Len = BitLenBigNum(pubkey.KeyOne, 64) - 1;
}
uint LenPreData()
{
var a = (pubkey.Len - 1) / 8;
return (55 / a + 1) * (a + 1);
}
static int CompareBigNum(uint[] n1, uint[] n2, uint len)
{
while (len > 0)
@@ -462,46 +456,37 @@ namespace OpenRA.FileFormats
}
}
static unsafe void Memcopy(byte* dest, byte* src, int len)
{
while (len-- != 0) *dest++ = *src++;
}
unsafe void ProcessPredata(byte* pre, uint pre_len, byte* buf)
byte[] ProcessPredata(byte[] src)
{
var dest = new byte[256];
var n2 = new uint[64];
var n3 = new uint[64];
var a = (pubkey.Len - 1) / 8;
var a = (int)((pubkey.Len - 1) / 8);
var pre_len = (55 / a + 1) * (a + 1);
var srcOffset = 0;
var destOffset = 0;
while (a + 1 <= pre_len)
{
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])
Memcopy(buf, (byte*)pn3, (int)a);
Buffer.BlockCopy(src, srcOffset, n2, 0, a + 1);
CalcKey(n3, n2, pubkey.KeyTwo, pubkey.KeyOne, 64);
Buffer.BlockCopy(n3, 0, dest, destOffset, a);
pre_len -= a + 1;
pre += a + 1;
buf += a;
srcOffset += a + 1;
destOffset += a;
}
return dest;
}
public byte[] DecryptKey(byte[] src)
{
InitPublicKey();
var dest = new byte[256];
unsafe
{
fixed (byte* pdest = &dest[0])
fixed (byte* psrc = &src[0])
ProcessPredata(psrc, LenPreData(), pdest);
}
return dest.Take(56).ToArray();
return ProcessPredata(src).Take(56).ToArray();
}
}
}

View File

@@ -74,6 +74,9 @@ namespace OpenRA.FileFormats
var count = ((i & 0x70) >> 4) + 3;
var rpos = ((i & 0xf) << 8) + secondByte;
if (destIndex + count > dest.Length)
return destIndex;
ReplicatePrevious(dest, destIndex, destIndex - rpos, count);
destIndex += count;
}

View File

@@ -9,7 +9,10 @@
#endregion
using System;
using System.IO;
using System.Linq;
using OpenRA.Graphics;
namespace OpenRA.FileFormats
{
@@ -19,7 +22,7 @@ namespace OpenRA.FileFormats
public readonly uint LimbCount;
public readonly float[] Transforms;
public HvaReader(Stream s)
public HvaReader(Stream s, string fileName)
{
// Index swaps for transposing a matrix
var ids = new byte[] { 0, 4, 8, 12, 1, 5, 9, 13, 2, 6, 10, 14 };
@@ -31,6 +34,8 @@ namespace OpenRA.FileFormats
// Skip limb names
s.Seek(16 * LimbCount, SeekOrigin.Current);
Transforms = new float[16 * FrameCount * LimbCount];
var testMatrix = new float[16];
for (var j = 0; j < FrameCount; j++)
for (var i = 0; i < LimbCount; i++)
{
@@ -43,13 +48,19 @@ namespace OpenRA.FileFormats
for (var k = 0; k < 12; k++)
Transforms[c + ids[k]] = s.ReadFloat();
Array.Copy(Transforms, 16 * (LimbCount * j + i), testMatrix, 0, 16);
if (Util.MatrixInverse(testMatrix) == null)
throw new InvalidDataException(
"The transformation matrix for HVA file `{0}` section {1} frame {2} is invalid because it is not invertible!"
.F(fileName, i, j));
}
}
public static HvaReader Load(string filename)
{
using (var s = File.OpenRead(filename))
return new HvaReader(s);
return new HvaReader(s, Path.GetFileName(filename));
}
}
}

View File

@@ -22,7 +22,8 @@ namespace OpenRA.FileFormats
public IniFile(Stream s)
{
Load(s);
using (s)
Load(s);
}
public IniFile(params Stream[] streams)

View File

@@ -84,6 +84,9 @@ namespace OpenRA.FileFormats
case "tRNS":
{
if (palette == null)
throw new InvalidDataException("Non-Palette indexed PNG are not supported.");
for (var i = 0; i < length; i++)
palette[i] = Color.FromArgb(cr.ReadByte(), palette[i]);
}
@@ -99,6 +102,9 @@ namespace OpenRA.FileFormats
case "IEND":
{
if (bitmap == null)
throw new InvalidDataException("Image header not found.");
var bits = bitmap.LockBits(bitmap.Bounds(),
ImageLockMode.WriteOnly, PixelFormat.Format8bppIndexed);
@@ -130,6 +136,9 @@ namespace OpenRA.FileFormats
bitmap.UnlockBits(bits);
if (palette == null)
throw new InvalidDataException("Non-Palette indexed PNG are not supported.");
using (var temp = new Bitmap(1, 1, PixelFormat.Format8bppIndexed))
{
var cp = temp.Palette;

View File

@@ -102,6 +102,10 @@ namespace OpenRA.FileFormats
{
return new ReplayMetadata(fs, path);
}
catch (YamlException ex)
{
Log.Write("debug", ex.ToString());
}
catch (InvalidOperationException ex)
{
Log.Write("debug", ex.ToString());

View File

@@ -187,7 +187,9 @@ namespace OpenRA.FileFormats
{
case "SND0":
case "SND2":
if (audioChannels == 1)
if (audioChannels == 0)
throw new NotSupportedException();
else if (audioChannels == 1)
{
var rawAudio = stream.ReadBytes((int)length);
audio1.Write(rawAudio);
@@ -198,11 +200,15 @@ namespace OpenRA.FileFormats
audio1.Write(rawAudio);
rawAudio = stream.ReadBytes((int)length / 2);
audio2.Write(rawAudio);
if (length % 2 != 0)
stream.ReadBytes(2);
}
compressed = type == "SND2";
break;
default:
if (length + stream.Position > stream.Length)
throw new NotSupportedException("Vqa uses unknown Subtype: {0}".F(type));
stream.ReadBytes((int)length);
break;
}

View File

@@ -19,7 +19,7 @@ using OpenRA.Primitives;
namespace OpenRA.FileSystem
{
public sealed class BagFile : IFolder, IDisposable
public sealed class BagFile : IFolder
{
static readonly uint[] Nothing = { };
@@ -37,20 +37,16 @@ namespace OpenRA.FileSystem
// 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;
}
entries = new IdxReader(indexStream).Entries;
index = entries.ToDictionaryWithConflictLog(x => x.Hash,
"{0} (bag format)".F(filename),
null, x => "(offs={0}, len={1})".F(x.Offset, x.Length));
s = GlobalFileSystem.Open(filename);
}
public int Priority { get { return 1000 + bagFilePriority; } }
@@ -185,8 +181,7 @@ namespace OpenRA.FileSystem
public void Dispose()
{
if (s != null)
s.Dispose();
s.Dispose();
}
}
}

View File

@@ -15,37 +15,45 @@ using System.Linq;
namespace OpenRA.FileSystem
{
public class BigFile : IFolder
public sealed class BigFile : IFolder
{
public string Name { get; private set; }
public int Priority { get; private set; }
readonly Dictionary<string, Entry> entries = new Dictionary<string, Entry>();
readonly Stream s;
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++)
s = GlobalFileSystem.Open(filename);
try
{
var entry = new Entry(s);
entries.Add(entry.Path, entry);
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);
}
}
catch
{
Dispose();
throw;
}
}
@@ -107,5 +115,10 @@ namespace OpenRA.FileSystem
{
throw new NotImplementedException();
}
public void Dispose()
{
s.Dispose();
}
}
}

View File

@@ -14,7 +14,7 @@ using System.IO;
namespace OpenRA.FileSystem
{
public class D2kSoundResources : IFolder
public sealed class D2kSoundResources : IFolder
{
readonly Stream s;
@@ -30,22 +30,28 @@ namespace OpenRA.FileSystem
this.priority = priority;
s = GlobalFileSystem.Open(filename);
s.Seek(0, SeekOrigin.Begin);
filenames = new List<string>();
var headerLength = s.ReadUInt32();
while (s.Position < headerLength + 4)
try
{
var name = s.ReadASCIIZ();
var offset = s.ReadUInt32();
var length = s.ReadUInt32();
filenames = new List<string>();
var hash = PackageEntry.HashFilename(name, PackageHashType.Classic);
if (!index.ContainsKey(hash))
index.Add(hash, new PackageEntry(hash, offset, length));
var headerLength = s.ReadUInt32();
while (s.Position < headerLength + 4)
{
var name = s.ReadASCIIZ();
var offset = s.ReadUInt32();
var length = s.ReadUInt32();
filenames.Add(name);
var hash = PackageEntry.HashFilename(name, PackageHashType.Classic);
if (!index.ContainsKey(hash))
index.Add(hash, new PackageEntry(hash, offset, length));
filenames.Add(name);
}
}
catch
{
Dispose();
throw;
}
}
@@ -92,5 +98,10 @@ namespace OpenRA.FileSystem
{
throw new NotImplementedException("Cannot save Dune 2000 Sound Resources.");
}
public void Dispose()
{
s.Dispose();
}
}
}

View File

@@ -13,7 +13,7 @@ using System.IO;
namespace OpenRA.FileSystem
{
public class Folder : IFolder
public sealed class Folder : IFolder
{
readonly string path;
readonly int priority;
@@ -78,5 +78,7 @@ namespace OpenRA.FileSystem
using (var writer = new BinaryWriter(dataStream))
writer.Write(file.Value);
}
public void Dispose() { }
}
}

View File

@@ -17,7 +17,7 @@ using OpenRA.Primitives;
namespace OpenRA.FileSystem
{
public interface IFolder
public interface IFolder : IDisposable
{
Stream GetContent(string filename);
bool Exists(string filename);
@@ -74,6 +74,8 @@ namespace OpenRA.FileSystem
throw new NotImplementedException("The creation of .PAK archives is unimplemented");
if (filename.EndsWith(".big", StringComparison.InvariantCultureIgnoreCase))
throw new NotImplementedException("The creation of .big archives is unimplemented");
if (filename.EndsWith(".cab", StringComparison.InvariantCultureIgnoreCase))
throw new NotImplementedException("The creation of .cab archives is unimplemented");
return new Folder(filename, order, content);
}
@@ -103,6 +105,8 @@ namespace OpenRA.FileSystem
return new BigFile(filename, order);
if (filename.EndsWith(".bag", StringComparison.InvariantCultureIgnoreCase))
return new BagFile(filename, order);
if (filename.EndsWith(".hdr", StringComparison.InvariantCultureIgnoreCase))
return new InstallShieldCABExtractor(filename, order);
return new Folder(filename, order);
}
@@ -127,6 +131,9 @@ namespace OpenRA.FileSystem
public static void UnmountAll()
{
foreach (var folder in MountedFolders)
folder.Dispose();
MountedFolders.Clear();
FolderPaths.Clear();
classicHashIndex = new Cache<uint, List<IFolder>>(_ => new List<IFolder>());
@@ -135,6 +142,9 @@ namespace OpenRA.FileSystem
public static bool Unmount(IFolder mount)
{
if (MountedFolders.Contains(mount))
mount.Dispose();
return MountedFolders.RemoveAll(f => f == mount) > 0;
}
@@ -175,10 +185,23 @@ namespace OpenRA.FileSystem
return s;
}
public static bool TryOpen(string filename, out Stream s)
public static bool TryOpen(string name, out Stream s)
{
// Check the cache for a quick lookup
if (filename.IndexOfAny(new char[] { '/', '\\' }) == -1)
var filename = name;
var foldername = string.Empty;
// Used for faction specific packages; rule out false positive on Windows C:\ drive notation
var explicitFolder = name.Contains(':') && !Directory.Exists(Path.GetDirectoryName(name));
if (explicitFolder)
{
var divide = name.Split(':');
foldername = divide.First();
filename = divide.Last();
}
// Check the cache for a quick lookup if the folder name is unknown
// TODO: This disables caching for explicit folder requests
if (filename.IndexOfAny(new char[] { '/', '\\' }) == -1 && !explicitFolder)
{
s = GetFromCache(PackageHashType.Classic, filename);
if (s != null)
@@ -190,9 +213,11 @@ namespace OpenRA.FileSystem
}
// Ask each package individually
var folder = MountedFolders
.Where(x => x.Exists(filename))
.MaxByOrDefault(x => x.Priority);
IFolder folder;
if (explicitFolder && !string.IsNullOrEmpty(foldername))
folder = MountedFolders.Where(x => x.Name == foldername).MaxByOrDefault(x => x.Priority);
else
folder = MountedFolders.Where(x => x.Exists(filename)).MaxByOrDefault(x => x.Priority);
if (folder != null)
{
@@ -204,7 +229,19 @@ namespace OpenRA.FileSystem
return false;
}
public static bool Exists(string filename) { return MountedFolders.Any(f => f.Exists(filename)); }
public static bool Exists(string name)
{
var explicitFolder = name.Contains(':') && !Directory.Exists(Path.GetDirectoryName(name));
if (explicitFolder)
{
var divide = name.Split(':');
var foldername = divide.First();
var filename = divide.Last();
return MountedFolders.Where(n => n.Name == foldername).Any(f => f.Exists(filename));
}
else
return MountedFolders.Any(f => f.Exists(name));
}
static Dictionary<string, Assembly> assemblyCache = new Dictionary<string, Assembly>();

View File

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

View File

@@ -15,7 +15,7 @@ using OpenRA.FileFormats;
namespace OpenRA.FileSystem
{
public class InstallShieldPackage : IFolder
public sealed class InstallShieldPackage : IFolder
{
readonly Dictionary<uint, PackageEntry> index = new Dictionary<uint, PackageEntry>();
readonly List<string> filenames;
@@ -28,38 +28,47 @@ namespace OpenRA.FileSystem
{
this.filename = filename;
this.priority = priority;
filenames = new List<string>();
s = GlobalFileSystem.Open(filename);
try
{
// Parse package header
var reader = new BinaryReader(s);
var signature = reader.ReadUInt32();
if (signature != 0x8C655D13)
throw new InvalidDataException("Not an Installshield package");
// Parse package header
var reader = new BinaryReader(s);
var signature = reader.ReadUInt32();
if (signature != 0x8C655D13)
throw new InvalidDataException("Not an Installshield package");
reader.ReadBytes(8);
/*var FileCount = */reader.ReadUInt16();
reader.ReadBytes(4);
/*var ArchiveSize = */reader.ReadUInt32();
reader.ReadBytes(19);
var tocAddress = reader.ReadInt32();
reader.ReadBytes(4);
var dirCount = reader.ReadUInt16();
reader.ReadBytes(8);
/*var FileCount = */reader.ReadUInt16();
reader.ReadBytes(4);
/*var ArchiveSize = */reader.ReadUInt32();
reader.ReadBytes(19);
var tocAddress = reader.ReadInt32();
reader.ReadBytes(4);
var dirCount = reader.ReadUInt16();
// Parse the directory list
s.Seek(tocAddress, SeekOrigin.Begin);
var tocReader = new BinaryReader(s);
// Parse the directory list
s.Seek(tocAddress, SeekOrigin.Begin);
var tocReader = new BinaryReader(s);
var fileCountInDirs = new List<uint>();
var fileCountInDirs = new List<uint>();
// Parse directories
for (var i = 0; i < dirCount; i++)
fileCountInDirs.Add(ParseDirectory(tocReader));
// Parse directories
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);
// Parse files
foreach (var fileCount in fileCountInDirs)
for (var i = 0; i < fileCount; i++)
ParseFile(reader);
}
catch
{
Dispose();
throw;
}
}
static uint ParseDirectory(BinaryReader reader)
@@ -140,5 +149,10 @@ namespace OpenRA.FileSystem
{
throw new NotImplementedException("Cannot save InstallShieldPackages.");
}
public void Dispose()
{
s.Dispose();
}
}
}

View File

@@ -17,7 +17,7 @@ using OpenRA.FileFormats;
namespace OpenRA.FileSystem
{
public sealed class MixFile : IFolder, IDisposable
public sealed class MixFile : IFolder
{
readonly Dictionary<uint, PackageEntry> index;
readonly long dataStart;
@@ -37,9 +37,17 @@ namespace OpenRA.FileSystem
File.Delete(filename);
s = File.Create(filename);
index = new Dictionary<uint, PackageEntry>();
contents.Add("local mix database.dat", new XccLocalDatabase(contents.Keys.Append("local mix database.dat")).Data());
Write(contents);
try
{
index = new Dictionary<uint, PackageEntry>();
contents.Add("local mix database.dat", new XccLocalDatabase(contents.Keys.Append("local mix database.dat")).Data());
Write(contents);
}
catch
{
Dispose();
throw;
}
}
public MixFile(string filename, PackageHashType type, int priority)
@@ -47,29 +55,36 @@ namespace OpenRA.FileSystem
this.filename = filename;
this.priority = priority;
this.type = type;
s = GlobalFileSystem.Open(filename);
// Detect format type
s.Seek(0, SeekOrigin.Begin);
var isCncMix = s.ReadUInt16() != 0;
// The C&C mix format doesn't contain any flags or encryption
var isEncrypted = false;
if (!isCncMix)
isEncrypted = (s.ReadUInt16() & 0x2) != 0;
List<PackageEntry> entries;
if (isEncrypted)
try
{
long unused;
entries = ParseHeader(DecryptHeader(s, 4, out dataStart), 0, out unused);
}
else
entries = ParseHeader(s, isCncMix ? 0 : 4, out dataStart);
// Detect format type
var isCncMix = s.ReadUInt16() != 0;
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));
// The C&C mix format doesn't contain any flags or encryption
var isEncrypted = false;
if (!isCncMix)
isEncrypted = (s.ReadUInt16() & 0x2) != 0;
List<PackageEntry> entries;
if (isEncrypted)
{
long unused;
entries = ParseHeader(DecryptHeader(s, 4, out dataStart), 0, out unused);
}
else
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));
}
catch (Exception)
{
Dispose();
throw;
}
}
static List<PackageEntry> ParseHeader(Stream s, long offset, out long headerEnd)
@@ -122,6 +137,15 @@ namespace OpenRA.FileSystem
static uint[] ReadBlocks(Stream s, long offset, int count)
{
if (offset < 0)
throw new ArgumentOutOfRangeException("offset", "Non-negative number required.");
if (count < 0)
throw new ArgumentOutOfRangeException("count", "Non-negative number required.");
if (offset + (count * 2) > s.Length)
throw new ArgumentException("Bytes to read {0} and offset {1} greater than stream length {2}.".F(count * 2, offset, s.Length));
s.Seek(offset, SeekOrigin.Begin);
// A block is a single encryption unit (represented as two 32-bit integers)
@@ -260,8 +284,7 @@ namespace OpenRA.FileSystem
public void Dispose()
{
if (s != null)
s.Dispose();
s.Dispose();
}
}
}

View File

@@ -65,16 +65,16 @@ namespace OpenRA.FileSystem
if (name.Length % 4 != 0)
name = name.PadRight(name.Length + (4 - name.Length % 4), '\0');
var ms = new MemoryStream(Encoding.ASCII.GetBytes(name));
var reader = new BinaryReader(ms);
using (var ms = new MemoryStream(Encoding.ASCII.GetBytes(name)))
{
var len = name.Length >> 2;
uint result = 0;
var len = name.Length >> 2;
uint result = 0;
while (len-- != 0)
result = ((result << 1) | (result >> 31)) + ms.ReadUInt32();
while (len-- != 0)
result = ((result << 1) | (result >> 31)) + reader.ReadUInt32();
return result;
return result;
}
}
case PackageHashType.CRC32:

View File

@@ -21,34 +21,42 @@ namespace OpenRA.FileSystem
public string Filename;
}
public class PakFile : IFolder
public sealed class PakFile : IFolder
{
string filename;
int priority;
Dictionary<string, Entry> index;
Stream stream;
readonly string filename;
readonly int priority;
readonly Dictionary<string, Entry> index;
readonly Stream stream;
public PakFile(string filename, int priority)
{
this.filename = filename;
this.priority = priority;
index = new Dictionary<string, Entry>();
stream = GlobalFileSystem.Open(filename);
index = new Dictionary<string, Entry>();
var offset = stream.ReadUInt32();
while (offset != 0)
try
{
var file = stream.ReadASCIIZ();
var next = stream.ReadUInt32();
var length = (next == 0 ? (uint)stream.Length : next) - offset;
index = new Dictionary<string, Entry>();
var offset = stream.ReadUInt32();
while (offset != 0)
{
var file = stream.ReadASCIIZ();
var next = stream.ReadUInt32();
var length = (next == 0 ? (uint)stream.Length : next) - offset;
// Ignore duplicate files
if (index.ContainsKey(file))
continue;
// Ignore duplicate files
if (index.ContainsKey(file))
continue;
index.Add(file, new Entry { Offset = offset, Length = length, Filename = file });
offset = next;
index.Add(file, new Entry { Offset = offset, Length = length, Filename = file });
offset = next;
}
}
catch
{
Dispose();
throw;
}
}
@@ -92,5 +100,10 @@ namespace OpenRA.FileSystem
public int Priority { get { return 1000 + priority; } }
public string Name { get { return filename; } }
public void Dispose()
{
stream.Dispose();
}
}
}

View File

@@ -17,11 +17,11 @@ using SZipFile = ICSharpCode.SharpZipLib.Zip.ZipFile;
namespace OpenRA.FileSystem
{
public sealed class ZipFile : IFolder, IDisposable
public sealed class ZipFile : IFolder
{
string filename;
readonly string filename;
readonly int priority;
SZipFile pkg;
int priority;
static ZipFile()
{
@@ -58,7 +58,11 @@ namespace OpenRA.FileSystem
public Stream GetContent(string filename)
{
using (var z = pkg.GetInputStream(pkg.GetEntry(filename)))
var entry = pkg.GetEntry(filename);
if (entry == null)
return null;
using (var z = pkg.GetInputStream(entry))
{
var ms = new MemoryStream();
z.CopyTo(ms);

View File

@@ -11,11 +11,12 @@
using System;
using System.Diagnostics;
using System.Drawing;
using System.Drawing.Imaging;
using System.IO;
using System.Linq;
using System.Net;
using System.Threading;
using MaxMind.GeoIP2;
using OpenRA.Chat;
using OpenRA.FileSystem;
using OpenRA.Graphics;
using OpenRA.Network;
@@ -42,22 +43,23 @@ namespace OpenRA
public static MersenneTwister CosmeticRandom = new MersenneTwister(); // not synced
public static Renderer Renderer;
public static Sound Sound;
public static bool HasInputFocus = false;
public static DatabaseReader GeoIpDatabase;
public static GlobalChat GlobalChat;
public static OrderManager JoinServer(string host, int port, string password, bool recordReplay = true)
{
IConnection connection = new NetworkConnection(host, port);
if (recordReplay)
connection = new ReplayRecorderConnection(connection, ChooseReplayFilename);
connection = new ReplayRecorderConnection(connection, TimestampedFilename);
var om = new OrderManager(host, port, password, connection);
JoinInner(om);
return om;
}
static string ChooseReplayFilename()
static string TimestampedFilename()
{
return DateTime.UtcNow.ToString("OpenRA-yyyy-MM-ddTHHmmssZ");
}
@@ -137,6 +139,10 @@ namespace OpenRA
public static event Action BeforeGameStart = () => { };
internal static void StartGame(string mapUID, WorldType type)
{
// Dispose of the old world before creating a new one.
if (worldRenderer != null)
worldRenderer.Dispose();
Cursor.SetCursor(null);
BeforeGameStart();
@@ -145,13 +151,7 @@ namespace OpenRA
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);
@@ -207,6 +207,7 @@ namespace OpenRA
Log.AddChannel("sound", "sound.log");
Log.AddChannel("graphics", "graphics.log");
Log.AddChannel("geoip", "geoip.log");
Log.AddChannel("irc", "irc.log");
if (Settings.Server.DiscoverNatDevices)
UPnP.TryNatDiscovery();
@@ -216,17 +217,10 @@ namespace OpenRA
Settings.Server.AllowPortForward = false;
}
try
{
GeoIpDatabase = new DatabaseReader("GeoLite2-Country.mmdb");
}
catch (Exception e)
{
Log.Write("geoip", "DatabaseReader failed: {0}", e);
}
GeoIP.Initialize();
GlobalFileSystem.Mount(Platform.GameDir); // Needed to access shaders
var renderers = new[] { Settings.Graphics.Renderer, "Sdl2", null };
var renderers = new[] { Settings.Graphics.Renderer, "Default", null };
foreach (var r in renderers)
{
if (r == null)
@@ -245,17 +239,9 @@ namespace OpenRA
}
}
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);
}
Sound = new Sound(Settings.Server.Dedicated ? "Null" : Settings.Sound.Engine);
GlobalChat = new GlobalChat();
Console.WriteLine("Available mods:");
foreach (var mod in ModMetadata.AllMods)
@@ -297,18 +283,37 @@ namespace OpenRA
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.Server.Dedicated)
{
RunDedicatedServer();
Environment.Exit(0);
}
var installData = ModData.Manifest.Get<ContentInstaller>();
var isModContentInstalled = installData.TestFiles.All(f => File.Exists(Platform.ResolvePath(f)));
// Mod assets are missing!
if (!isModContentInstalled)
{
InitializeMod("modchooser", new Arguments());
return;
}
ModData.MountFiles();
ModData.InitializeLoaders();
Renderer.InitializeFonts(ModData.Manifest);
if (Cursor != null)
Cursor.Dispose();
if (Settings.Graphics.HardwareCursors)
{
try
@@ -337,39 +342,43 @@ namespace OpenRA
JoinLocal();
if (Settings.Server.Dedicated)
ModData.LoadScreen.StartGame(args);
}
public static void RunDedicatedServer()
{
while (true)
{
Settings.Server.Map = WidgetUtils.ChooseInitialMap(Settings.Server.Map);
Settings.Save();
CreateServer(new ServerSettings(Settings.Server));
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)
{
Thread.Sleep(100);
if (server.State == Server.ServerState.GameStarted && server.Conns.Count < 1)
{
Console.WriteLine("No one is playing, shutting down...");
server.Shutdown();
break;
}
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);
if (Settings.Server.DedicatedLoop)
{
Console.WriteLine("Starting a new server instance...");
ModData.MapCache.LoadMaps();
continue;
}
break;
}
else
ModData.LoadScreen.StartGame(args);
}
public static void LoadEditor(string mapUid)
{
StartGame(mapUid, WorldType.Editor);
}
public static void LoadShellMap()
@@ -397,9 +406,38 @@ namespace OpenRA
// 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 volatile ActionQueue delayedActions = new ActionQueue();
public static void RunAfterTick(Action a) { delayedActions.Add(a, Game.RunTime); }
public static void RunAfterDelay(int delayMilliseconds, Action a) { delayedActions.Add(a, Game.RunTime + delayMilliseconds); }
static void TakeScreenshotInner()
{
Log.Write("debug", "Taking screenshot");
Bitmap bitmap;
using (new PerfTimer("Renderer.TakeScreenshot"))
bitmap = Renderer.Device.TakeScreenshot();
ThreadPool.QueueUserWorkItem(_ =>
{
var mod = ModData.Manifest.Mod;
var directory = Platform.ResolvePath("^", "Screenshots", mod.Id, mod.Version);
Directory.CreateDirectory(directory);
var filename = TimestampedFilename();
var format = Settings.Graphics.ScreenshotFormat;
var extension = ImageCodecInfo.GetImageEncoders().FirstOrDefault(x => x.FormatID == format.Guid)
.FilenameExtension.Split(';').First().ToLowerInvariant().Substring(1);
var destination = Path.Combine(directory, string.Concat(filename, extension));
using (new PerfTimer("Save Screenshot ({0})".F(format)))
bitmap.Save(destination, format);
bitmap.Dispose();
Game.RunAfterTick(() => Debug("Saved screenshot " + filename));
});
}
static void InnerLogicTick(OrderManager orderManager)
{
@@ -471,7 +509,7 @@ namespace OpenRA
static void LogicTick()
{
delayedActions.PerformActions();
delayedActions.PerformActions(Game.RunTime);
if (OrderManager.Connection.ConnectionState != lastConnectionState)
{
@@ -484,6 +522,8 @@ namespace OpenRA
InnerLogicTick(worldRenderer.World.OrderManager);
}
public static bool TakeScreenshot = false;
static void RenderTick()
{
using (new PerfSample("render"))
@@ -517,6 +557,12 @@ namespace OpenRA
using (new PerfSample("render_flip"))
Renderer.EndFrame(new DefaultInputHandler(OrderManager.World));
if (TakeScreenshot)
{
TakeScreenshot = false;
TakeScreenshotInner();
}
}
PerfHistory.Items["render"].Tick();
@@ -648,6 +694,9 @@ namespace OpenRA
worldRenderer.Dispose();
ModData.Dispose();
ChromeProvider.Deinitialize();
GlobalChat.Dispose();
Sound.Dispose();
Renderer.Dispose();
OnQuit();
@@ -718,7 +767,7 @@ namespace OpenRA
public static bool IsCurrentWorld(World world)
{
return OrderManager != null && OrderManager.World == world;
return OrderManager != null && OrderManager.World == world && !world.Disposing;
}
}
}

View File

@@ -24,20 +24,20 @@ namespace OpenRA
public string MapUid;
public string MapTitle;
/// <summary>Game start timestamp (when the recoding started).</summary>
public DateTime StartTimeUtc;
// Game end timestamp (when the recoding stopped).
/// <summary>Game end timestamp (when the recoding stopped).</summary>
public DateTime EndTimeUtc;
// Gets the game's duration, from the time the game started until the
// replay recording stopped.
/// <summary>Gets the game's duration, from the time the game started until the replay recording stopped.</summary>
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 IEnumerable<Player> HumanPlayers { get { return Players.Where(p => p.IsHuman); } }
public bool IsSinglePlayer { get { return HumanPlayers.Count() == 1; } }
Dictionary<OpenRA.Player, Player> playersByRuntime;
readonly Dictionary<OpenRA.Player, Player> playersByRuntime;
public GameInformation()
{
@@ -70,7 +70,7 @@ namespace OpenRA
return info;
}
catch (InvalidOperationException)
catch (YamlException)
{
Log.Write("debug", "GameInformation deserialized invalid MiniYaml:\n{0}".F(data));
throw;
@@ -79,9 +79,10 @@ namespace OpenRA
public string Serialize()
{
var nodes = new List<MiniYamlNode>();
nodes.Add(new MiniYamlNode("Root", FieldSaver.Save(this)));
var nodes = new List<MiniYamlNode>
{
new MiniYamlNode("Root", FieldSaver.Save(this))
};
for (var i = 0; i < Players.Count; i++)
nodes.Add(new MiniYamlNode("Player@{0}".F(i), FieldSaver.Save(Players[i])));
@@ -89,7 +90,7 @@ namespace OpenRA
return nodes.WriteToString();
}
// Adds the player information at start-up.
/// <summary>Adds the player information at start-up.</summary>
public void AddPlayer(OpenRA.Player runtimePlayer, Session lobbyInfo)
{
if (runtimePlayer == null)
@@ -113,12 +114,12 @@ namespace OpenRA
Name = runtimePlayer.PlayerName,
IsHuman = !runtimePlayer.IsBot,
IsBot = runtimePlayer.IsBot,
FactionName = runtimePlayer.Country.Name,
FactionId = runtimePlayer.Country.Race,
FactionName = runtimePlayer.Faction.Name,
FactionId = runtimePlayer.Faction.InternalName,
Color = runtimePlayer.Color,
Team = client.Team,
SpawnPoint = runtimePlayer.SpawnPoint,
IsRandomFaction = runtimePlayer.Country.Race != client.Race,
IsRandomFaction = runtimePlayer.Faction.InternalName != client.Faction,
IsRandomSpawnPoint = runtimePlayer.SpawnPoint != client.SpawnPoint
};
@@ -126,7 +127,7 @@ namespace OpenRA
Players.Add(player);
}
// Gets the player information for the specified runtime player instance.
/// <summary>Gets the player information for the specified runtime player instance.</summary>
public Player GetPlayer(OpenRA.Player runtimePlayer)
{
Player player;
@@ -138,38 +139,43 @@ namespace OpenRA
public class Player
{
// Start-up information
#region Start-up information
public int ClientIndex;
// The player name, not guaranteed to be unique.
/// <summary>The player name, not guaranteed to be unique.</summary>
public string Name;
public bool IsHuman;
public bool IsBot;
// The faction name (aka Country)
/// <summary>The faction's display name.</summary>
public string FactionName;
// The faction id (aka Country, aka Race)
/// <summary>The faction ID, a.k.a. the faction's internal name.</summary>
public string FactionId;
public HSLColor Color;
// The team id on start-up, or 0 if the player is not part of the team.
/// <summary>The team ID on start-up, or 0 if the player is not part of a team.</summary>
public int Team;
public int SpawnPoint;
// True if the faction was chosen at random; otherwise, false
/// <summary>True if the faction was chosen at random; otherwise, false.</summary>
public bool IsRandomFaction;
// True if the spawn point was chosen at random; otherwise, false.</summary>
/// <summary>True if the spawn point was chosen at random; otherwise, false.</summary>
public bool IsRandomSpawnPoint;
// Information gathered at a later stage
#endregion
// The game outcome for this player
#region
/// <summary>The game outcome for this player.</summary>
public WinState Outcome;
// The time when this player won or lost the game
/// <summary>The time when this player won or lost the game.</summary>
public DateTime OutcomeTimestampUtc;
#endregion
}
}
}

View File

@@ -16,29 +16,50 @@ using OpenRA.Traits;
namespace OpenRA
{
// 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.")]
/// <summary>
/// A unit/building inside the game. Every rules starts with one and adds trait to it.
/// </summary>
public class ActorInfo
{
[Desc("The actor name can be anything, but the sprites used in the Render*: traits default to this one.",
"If you add an ^ in front of the name, the engine will recognize this as a collection of traits",
"that can be inherited by others (using Inherits:) and not a real unit.",
"You can remove inherited traits by adding a - infront of them as in -TraitName: to inherit everything, but this trait.")]
/// <summary>
/// The actor name can be anything, but the sprites used in the Render*: traits default to this one.
/// If you add an ^ in front of the name, the engine will recognize this as a collection of traits
/// that can be inherited by others (using Inherits:) and not a real unit.
/// You can remove inherited traits by adding a - infront of them as in -TraitName: to inherit everything, but this trait.
/// </summary>
public readonly string Name;
public readonly TypeDictionary Traits = new TypeDictionary();
readonly TypeDictionary traits = new TypeDictionary();
List<ITraitInfo> constructOrderCache = null;
public ActorInfo(string name, MiniYaml node, Dictionary<string, MiniYaml> allUnits)
{
try
{
var mergedNode = MergeWithParent(node, allUnits).ToDictionary();
var allParents = new HashSet<string>();
var abstractActorType = name.StartsWith("^");
// Guard against circular inheritance
allParents.Add(name);
var mergedNode = MergeWithParents(node, allUnits, allParents).ToDictionary();
Name = name;
foreach (var t in mergedNode)
if (t.Key != "Inherits" && !t.Key.StartsWith("-"))
Traits.Add(LoadTraitInfo(t.Key.Split('@')[0], t.Value));
{
if (t.Key[0] == '-')
throw new YamlException("Bogus trait removal: " + t.Key);
if (t.Key != "Inherits" && !t.Key.StartsWith("Inherits@"))
try
{
traits.Add(LoadTraitInfo(t.Key.Split('@')[0], t.Value));
}
catch (FieldLoader.MissingFieldsException e)
{
if (!abstractActorType)
throw new YamlException(e.Message);
}
}
}
catch (YamlException e)
{
@@ -46,32 +67,38 @@ namespace OpenRA
}
}
static MiniYaml GetParent(MiniYaml node, Dictionary<string, MiniYaml> allUnits)
public ActorInfo(string name, params ITraitInfo[] traitInfos)
{
MiniYaml inherits;
node.ToDictionary().TryGetValue("Inherits", out inherits);
if (inherits == null || string.IsNullOrEmpty(inherits.Value))
return null;
MiniYaml parent;
allUnits.TryGetValue(inherits.Value, out parent);
if (parent == null)
throw new InvalidOperationException(
"Bogus inheritance -- actor type {0} does not exist".F(inherits.Value));
return parent;
Name = name;
foreach (var t in traitInfos)
traits.Add(t);
}
static MiniYaml MergeWithParent(MiniYaml node, Dictionary<string, MiniYaml> allUnits)
static Dictionary<string, MiniYaml> GetParents(MiniYaml node, Dictionary<string, MiniYaml> allUnits)
{
var parent = GetParent(node, allUnits);
if (parent != null)
return node.Nodes.Where(n => n.Key == "Inherits" || n.Key.StartsWith("Inherits@"))
.ToDictionary(n => n.Value.Value, n =>
{
var result = MiniYaml.MergeStrict(node, MergeWithParent(parent, allUnits));
MiniYaml i;
if (!allUnits.TryGetValue(n.Value.Value, out i))
throw new YamlException(
"Bogus inheritance -- parent type {0} does not exist".F(n.Value.Value));
// strip the '-'
result.Nodes.RemoveAll(a => a.Key.StartsWith("-"));
return result;
return i;
});
}
static MiniYaml MergeWithParents(MiniYaml node, Dictionary<string, MiniYaml> allUnits, HashSet<string> allParents)
{
var parents = GetParents(node, allUnits);
foreach (var kv in parents)
{
if (!allParents.Add(kv.Key))
throw new YamlException(
"Bogus inheritance -- duplicate inheritance of {0}.".F(kv.Key));
node = MiniYaml.MergeStrict(node, MergeWithParents(kv.Value, allUnits, allParents));
}
return node;
@@ -83,7 +110,16 @@ namespace OpenRA
throw new YamlException("Junk value `{0}` on trait node {1}"
.F(my.Value, traitName));
var info = Game.CreateObject<ITraitInfo>(traitName + "Info");
FieldLoader.Load(info, my);
try
{
FieldLoader.Load(info, my);
}
catch (FieldLoader.MissingFieldsException e)
{
var header = "Trait name " + traitName + ": " + (e.Missing.Length > 1 ? "Required properties missing" : "Required property missing");
throw new FieldLoader.MissingFieldsException(e.Missing, header);
}
return info;
}
@@ -92,7 +128,7 @@ namespace OpenRA
if (constructOrderCache != null)
return constructOrderCache;
var source = Traits.WithInterface<ITraitInfo>().Select(i => new
var source = traits.WithInterface<ITraitInfo>().Select(i => new
{
Trait = i,
Type = i.GetType(),
@@ -143,7 +179,7 @@ namespace OpenRA
public IEnumerable<Pair<string, Type>> GetInitKeys()
{
var inits = Traits.WithInterface<ITraitInfo>().SelectMany(
var inits = traits.WithInterface<ITraitInfo>().SelectMany(
t => t.GetType().GetInterfaces()
.Where(i => i.IsGenericType && i.GetGenericTypeDefinition() == typeof(UsesInit<>))
.Select(i => i.GetGenericArguments()[0])).ToList();
@@ -154,5 +190,10 @@ namespace OpenRA
i => Pair.New(
i.Name.Replace("Init", ""), i));
}
public bool HasTraitInfo<T>() where T : ITraitInfo { return traits.Contains<T>(); }
public T TraitInfo<T>() where T : ITraitInfo { return traits.Get<T>(); }
public T TraitInfoOrDefault<T>() where T : ITraitInfo { return traits.GetOrDefault<T>(); }
public IEnumerable<T> TraitInfos<T>() where T : ITraitInfo { return traits.WithInterface<T>(); }
}
}

View File

@@ -15,8 +15,10 @@ namespace OpenRA.GameRules
{
public class MusicInfo
{
public readonly string Filename = null;
public readonly string Title = null;
public readonly string Filename;
public readonly string Title;
public readonly bool Hidden;
public int Length { get; private set; } // seconds
public bool Exists { get; private set; }
@@ -25,30 +27,26 @@ namespace OpenRA.GameRules
Title = value.Value;
var nd = value.ToDictionary();
if (nd.ContainsKey("Hidden"))
bool.TryParse(nd["Hidden"].Value, out Hidden);
var ext = nd.ContainsKey("Extension") ? nd["Extension"].Value : "aud";
Filename = (nd.ContainsKey("Filename") ? nd["Filename"].Value : key) + "." + ext;
if (!GlobalFileSystem.Exists(Filename))
return;
Exists = true;
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()
public void Load()
{
if (!GlobalFileSystem.Exists(Filename))
return;
Exists = true;
using (var s = GlobalFileSystem.Open(Filename))
{
if (Filename.ToLowerInvariant().EndsWith("wav"))
Length = (int)WavLoader.WaveLength(s);
else
Length = (int)AudLoader.SoundLength(s);
}
}
}
}

View File

@@ -12,6 +12,7 @@ using System.Collections.Generic;
using System.Linq;
using OpenRA.GameRules;
using OpenRA.Graphics;
using OpenRA.Traits;
namespace OpenRA
{
@@ -41,6 +42,40 @@ namespace OpenRA
Music = new ReadOnlyDictionary<string, MusicInfo>(music);
TileSets = new ReadOnlyDictionary<string, TileSet>(tileSets);
Sequences = new ReadOnlyDictionary<string, SequenceProvider>(sequences);
foreach (var a in Actors.Values)
{
foreach (var t in a.TraitInfos<IRulesetLoaded>())
{
try
{
t.RulesetLoaded(this, a);
}
catch (YamlException e)
{
throw new YamlException("Actor type {0}: {1}".F(a.Name, e.Message));
}
}
}
foreach (var weapon in Weapons)
{
foreach (var warhead in weapon.Value.Warheads)
{
var cacher = warhead as IRulesetLoaded<WeaponInfo>;
if (cacher != null)
{
try
{
cacher.RulesetLoaded(this, weapon.Value);
}
catch (YamlException e)
{
throw new YamlException("Weapon type {0}: {1}".F(weapon.Key, e.Message));
}
}
}
}
}
public IEnumerable<KeyValuePair<string, MusicInfo>> InstalledMusic { get { return Music.Where(m => m.Value.Exists); } }

39
OpenRA.Game/GameRules/RulesetCache.cs Executable file → Normal file
View File

@@ -19,6 +19,8 @@ namespace OpenRA
{
public sealed class RulesetCache : IDisposable
{
static readonly List<MiniYamlNode> NoMapRules = new List<MiniYamlNode>();
readonly ModData modData;
readonly Dictionary<string, ActorInfo> actorCache = new Dictionary<string, ActorInfo>();
@@ -41,12 +43,11 @@ namespace OpenRA
this.modData = modData;
}
public Ruleset LoadDefaultRules()
{
return LoadMapRules(new Map());
}
public Ruleset LoadMapRules(Map map)
/// <summary>
/// Cache and return the Ruleset for a given map.
/// If a map isn't specified then return the default mod Ruleset.
/// </summary>
public Ruleset Load(Map map = null)
{
var m = modData.Manifest;
@@ -58,20 +59,34 @@ namespace OpenRA
Dictionary<string, TileSet> tileSets;
using (new PerfTimer("Actors"))
actors = LoadYamlRules(actorCache, m.Rules, map.RuleDefinitions, (k, y) => new ActorInfo(k.Key.ToLowerInvariant(), k.Value, y));
actors = LoadYamlRules(actorCache, m.Rules,
map != null ? map.RuleDefinitions : NoMapRules,
(k, y) => new ActorInfo(k.Key.ToLowerInvariant(), k.Value, y));
using (new PerfTimer("Weapons"))
weapons = LoadYamlRules(weaponCache, m.Weapons, map.WeaponDefinitions, (k, _) => new WeaponInfo(k.Key.ToLowerInvariant(), k.Value));
weapons = LoadYamlRules(weaponCache, m.Weapons,
map != null ? map.WeaponDefinitions : NoMapRules,
(k, _) => new WeaponInfo(k.Key.ToLowerInvariant(), k.Value));
using (new PerfTimer("Voices"))
voices = LoadYamlRules(voiceCache, m.Voices, map.VoiceDefinitions, (k, _) => new SoundInfo(k.Value));
voices = LoadYamlRules(voiceCache, m.Voices,
map != null ? map.VoiceDefinitions : NoMapRules,
(k, _) => new SoundInfo(k.Value));
using (new PerfTimer("Notifications"))
notifications = LoadYamlRules(notificationCache, m.Notifications, map.NotificationDefinitions, (k, _) => new SoundInfo(k.Value));
notifications = LoadYamlRules(notificationCache, m.Notifications,
map != null ? map.NotificationDefinitions : NoMapRules,
(k, _) => new SoundInfo(k.Value));
using (new PerfTimer("Music"))
music = LoadYamlRules(musicCache, m.Music, new List<MiniYamlNode>(), (k, _) => new MusicInfo(k.Key, k.Value));
music = LoadYamlRules(musicCache, m.Music,
map != null ? map.MusicDefinitions : NoMapRules,
(k, _) => new MusicInfo(k.Key, k.Value));
using (new PerfTimer("TileSets"))
tileSets = LoadTileSets(tileSetCache, sequenceCaches, m.TileSets);
var sequences = sequenceCaches.ToDictionary(kvp => kvp.Key, kvp => new SequenceProvider(kvp.Value, map));
return new Ruleset(actors, weapons, voices, notifications, music, tileSets, sequences);
}

View File

@@ -16,22 +16,14 @@ 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 Dictionary<string, string[]> Variants = new Dictionary<string, string[]>();
public readonly Dictionary<string, string[]> Prefixes = new Dictionary<string, string[]>();
public readonly Dictionary<string, string[]> Voices = new Dictionary<string, string[]>();
public readonly Dictionary<string, string[]> Notifications = new Dictionary<string, string[]>();
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)
{
var nd = y.ToDictionary();
return nd.ContainsKey(name)
? nd[name].ToDictionary(my => FieldLoader.GetValue<string[]>("(value)", my.Value))
: new Dictionary<string, string[]>();
}
public readonly HashSet<string> DisableVariants = new HashSet<string>();
public readonly HashSet<string> DisablePrefixes = new HashSet<string>();
public readonly Lazy<Dictionary<string, SoundPool>> VoicePools;
public readonly Lazy<Dictionary<string, SoundPool>> NotificationsPools;
@@ -39,10 +31,6 @@ namespace OpenRA.GameRules
public SoundInfo(MiniYaml 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)));

View File

@@ -19,8 +19,9 @@ namespace OpenRA.GameRules
public class ProjectileArgs
{
public WeaponInfo Weapon;
public IEnumerable<int> DamageModifiers;
public IEnumerable<int> InaccuracyModifiers;
public int[] DamageModifiers;
public int[] InaccuracyModifiers;
public int[] RangeModifiers;
public int Facing;
public WPos Source;
public Actor SourceActor;
@@ -33,7 +34,7 @@ namespace OpenRA.GameRules
public sealed class WeaponInfo
{
[Desc("The maximum range the weapon can fire.")]
public readonly WRange Range = WRange.Zero;
public readonly WDist Range = WDist.Zero;
[Desc("The sound played when the weapon is fired.")]
public readonly string[] Report = null;
@@ -47,31 +48,26 @@ namespace OpenRA.GameRules
public readonly bool Charges = false;
[Desc("What types of targets are affected.")]
public readonly string[] ValidTargets = { "Ground", "Water" };
public readonly HashSet<string> ValidTargets = new HashSet<string> { "Ground", "Water" };
[Desc("What types of targets are unaffected.", "Overrules ValidTargets.")]
public readonly string[] InvalidTargets = { };
public readonly HashSet<string> InvalidTargets = new HashSet<string>();
[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;
public readonly WDist MinRange = WDist.Zero;
[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 readonly List<IWarhead> Warheads = new List<IWarhead>();
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)
@@ -86,10 +82,10 @@ namespace OpenRA.GameRules
static object LoadWarheads(MiniYaml yaml)
{
var retList = new List<Warhead>();
var retList = new List<IWarhead>();
foreach (var node in yaml.Nodes.Where(n => n.Key.StartsWith("Warhead")))
{
var ret = Game.CreateObject<Warhead>(node.Value.Value + "Warhead");
var ret = Game.CreateObject<IWarhead>(node.Value.Value + "Warhead");
FieldLoader.Load(ret, node.Value);
retList.Add(ret);
}
@@ -99,7 +95,7 @@ namespace OpenRA.GameRules
public bool IsValidTarget(IEnumerable<string> targetTypes)
{
return validTargetSet.Overlaps(targetTypes) && !invalidTargetSet.Overlaps(targetTypes);
return ValidTargets.Overlaps(targetTypes) && !InvalidTargets.Overlaps(targetTypes);
}
/// <summary>Checks if the weapon is valid against (can target) the target.</summary>
@@ -130,8 +126,8 @@ namespace OpenRA.GameRules
/// <summary>Checks if the weapon is valid against (can target) the actor.</summary>
public bool IsValidAgainst(Actor victim, Actor firedBy)
{
var targetable = victim.TraitOrDefault<ITargetable>();
if (targetable == null || !IsValidTarget(targetable.TargetTypes))
var targetable = victim.TraitsImplementing<ITargetable>().Where(Exts.IsTraitEnabled);
if (!IsValidTarget(targetable.SelectMany(t => t.TargetTypes)))
return false;
if (!Warheads.Any(w => w.IsValidAgainst(victim, firedBy)))
@@ -143,8 +139,7 @@ namespace OpenRA.GameRules
/// <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()))
if (!IsValidTarget(victim.TargetTypes))
return false;
if (!Warheads.Any(w => w.IsValidAgainst(victim, firedBy)))

40
OpenRA.Game/GameSpeed.cs Normal file
View File

@@ -0,0 +1,40 @@
#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.Graphics;
namespace OpenRA
{
public class GameSpeed
{
[Translate]
public readonly string Name = "Default";
public readonly int Timestep = 40;
public readonly int OrderLatency = 3;
}
public class GameSpeeds : IGlobalModData
{
[FieldLoader.LoadUsing("LoadSpeeds")]
public readonly Dictionary<string, GameSpeed> Speeds;
static object LoadSpeeds(MiniYaml y)
{
var ret = new Dictionary<string, GameSpeed>();
foreach (var node in y.Nodes)
ret.Add(node.Key, FieldLoader.Load<GameSpeed>(node.Value));
return ret;
}
}
}

382
OpenRA.Game/GlobalChat.cs Normal file
View File

@@ -0,0 +1,382 @@
#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;
using System.Collections.Generic;
using System.Linq;
using System.Threading;
using Meebey.SmartIrc4net;
using OpenRA;
using OpenRA.Primitives;
namespace OpenRA.Chat
{
public enum ChatConnectionStatus { Disconnected, Connecting, Connected, Disconnecting, Joined, Error }
public enum ChatMessageType { Message, Notification }
public sealed class ChatUser
{
public readonly string Name;
public bool IsOp;
public bool IsVoiced;
public ChatUser(string name, bool isOp, bool isVoice)
{
Name = name;
IsOp = isOp;
IsVoiced = isVoice;
}
}
public sealed class ChatMessage
{
static long nextUID;
public readonly DateTime Time;
public readonly ChatMessageType Type;
public readonly string Nick;
public readonly string Message;
public readonly string UID;
public ChatMessage(DateTime time, ChatMessageType type, string nick, string message)
{
Time = time;
Type = type;
Nick = nick;
Message = message;
UID = Interlocked.Increment(ref nextUID).ToString();
}
public override string ToString()
{
var time = Time.ToString(Game.Settings.Chat.TimestampFormat);
if (Type == ChatMessageType.Notification)
return "{0} {1}".F(time, Message);
return "{0} {1}: {2}".F(time, Nick, Message);
}
}
public class GlobalChat : IDisposable
{
readonly IrcClient client = new IrcClient();
volatile Channel channel;
public readonly ObservableSortedDictionary<string, ChatUser> Users = new ObservableSortedDictionary<string, ChatUser>(StringComparer.InvariantCultureIgnoreCase);
public readonly ObservableList<ChatMessage> History = new ObservableList<ChatMessage>();
volatile string topic;
public string Topic { get { return topic; } }
volatile ChatConnectionStatus connectionStatus = ChatConnectionStatus.Disconnected;
public ChatConnectionStatus ConnectionStatus { get { return connectionStatus; } }
public GlobalChat()
{
client.Encoding = System.Text.Encoding.UTF8;
client.SendDelay = 100;
client.ActiveChannelSyncing = true;
client.OnConnecting += OnConnecting;
client.OnConnected += OnConnected;
client.OnDisconnecting += OnDisconnecting;
client.OnDisconnected += OnDisconnected;
client.OnError += OnError;
client.OnKick += OnKick;
client.OnRawMessage += (_, e) => Game.RunAfterTick(() => Log.Write("irc", e.Data.RawMessage));
client.OnJoin += OnJoin;
client.OnChannelActiveSynced += OnChannelActiveSynced;
client.OnTopic += (_, e) => topic = e.Topic;
client.OnTopicChange += (_, e) => topic = e.NewTopic;
client.OnNickChange += OnNickChange;
client.OnChannelMessage += (_, e) => AddMessage(e.Data.Nick, e.Data.Message);
client.OnOp += (_, e) => SetUserOp(e.Whom, true);
client.OnDeop += (_, e) => SetUserOp(e.Whom, false);
client.OnVoice += (_, e) => SetUserVoiced(e.Whom, true);
client.OnDevoice += (_, e) => SetUserVoiced(e.Whom, false);
client.OnPart += OnPart;
client.OnQuit += OnQuit;
}
void SetUserOp(string whom, bool isOp)
{
Game.RunAfterTick(() =>
{
ChatUser user;
if (Users.TryGetValue(whom, out user))
user.IsOp = isOp;
});
}
void SetUserVoiced(string whom, bool isVoiced)
{
Game.RunAfterTick(() =>
{
ChatUser user;
if (Users.TryGetValue(whom, out user))
user.IsVoiced = isVoiced;
});
}
public void Connect()
{
if (client.IsConnected)
return;
new Thread(() =>
{
try
{
client.Connect(Game.Settings.Chat.Hostname, Game.Settings.Chat.Port);
}
catch (Exception e)
{
connectionStatus = ChatConnectionStatus.Error;
AddNotification(e.Message);
Game.RunAfterTick(() => Log.Write("irc", e.ToString()));
return;
}
client.Listen();
}) { Name = "IrcListenThread", IsBackground = true }.Start();
}
void AddNotification(string text)
{
var message = new ChatMessage(DateTime.Now, ChatMessageType.Notification, null, text);
Game.RunAfterTick(() =>
{
History.Add(message);
Log.Write("irc", text);
});
}
void AddMessage(string nick, string text)
{
var message = new ChatMessage(DateTime.Now, ChatMessageType.Message, nick, text);
Game.RunAfterTick(() =>
{
History.Add(message);
Log.Write("irc", text);
});
}
void OnConnecting(object sender, EventArgs e)
{
AddNotification("Connecting to {0}:{1}...".F(Game.Settings.Chat.Hostname, Game.Settings.Chat.Port));
connectionStatus = ChatConnectionStatus.Connecting;
}
void OnConnected(object sender, EventArgs e)
{
AddNotification("Connected.");
connectionStatus = ChatConnectionStatus.Connected;
// Guard against settings.yaml modification
var nick = SanitizedName(Game.Settings.Chat.Nickname);
if (nick != Game.Settings.Chat.Nickname)
Game.RunAfterTick(() => Game.Settings.Chat.Nickname = nick);
client.Login(nick, "in-game IRC client", 0, "OpenRA");
client.RfcJoin("#" + Game.Settings.Chat.Channel);
}
void OnDisconnecting(object sender, EventArgs e)
{
if (connectionStatus != ChatConnectionStatus.Error)
connectionStatus = ChatConnectionStatus.Disconnecting;
}
void OnDisconnected(object sender, EventArgs e)
{
Game.RunAfterTick(Users.Clear);
// Keep the chat window open if there is an error
// It will be cleared by the Disconnect button
if (connectionStatus != ChatConnectionStatus.Error)
{
Game.RunAfterTick(History.Clear);
topic = null;
connectionStatus = ChatConnectionStatus.Disconnected;
}
}
void OnError(object sender, ErrorEventArgs e)
{
// Ignore any errors that happen during disconnect
if (connectionStatus != ChatConnectionStatus.Disconnecting)
{
connectionStatus = ChatConnectionStatus.Error;
AddNotification("Error: " + e.ErrorMessage);
}
}
void OnKick(object sender, KickEventArgs e)
{
Disconnect();
connectionStatus = ChatConnectionStatus.Error;
AddNotification("Error: You were kicked from the chat by {0}".F(e.Who));
}
void OnJoin(object sender, JoinEventArgs e)
{
if (e.Who == client.Nickname || e.Channel != channel.Name)
return;
AddNotification("{0} joined the chat.".F(e.Who));
Game.RunAfterTick(() => Users.Add(e.Who, new ChatUser(e.Who, false, false)));
}
void OnChannelActiveSynced(object sender, IrcEventArgs e)
{
channel = client.GetChannel(e.Data.Channel);
AddNotification("{0} users online".F(channel.Users.Count));
connectionStatus = ChatConnectionStatus.Joined;
foreach (DictionaryEntry user in channel.Users)
{
var u = (ChannelUser)user.Value;
Game.RunAfterTick(() => Users.Add(u.Nick, new ChatUser(u.Nick, u.IsOp, u.IsVoice)));
}
}
void OnNickChange(object sender, NickChangeEventArgs e)
{
AddNotification("{0} is now known as {1}.".F(e.OldNickname, e.NewNickname));
Game.RunAfterTick(() =>
{
ChatUser user;
if (!Users.TryGetValue(e.OldNickname, out user))
return;
Users.Remove(e.OldNickname);
Users.Add(e.NewNickname, new ChatUser(e.NewNickname, user.IsOp, user.IsVoiced));
});
}
void OnQuit(object sender, QuitEventArgs e)
{
AddNotification("{0} left the chat.".F(e.Who));
Game.RunAfterTick(() => Users.Remove(e.Who));
}
void OnPart(object sender, PartEventArgs e)
{
if (e.Data.Channel != channel.Name)
return;
AddNotification("{0} left the chat.".F(e.Who));
Game.RunAfterTick(() => Users.Remove(e.Who));
}
public string SanitizedName(string dirty)
{
if (string.IsNullOrEmpty(dirty))
return null;
// There is no need to mangle the nick if it is already valid
if (Rfc2812.IsValidNickname(dirty))
return dirty;
// TODO: some special chars are allowed as well, but not at every position
var clean = new string(dirty.Where(c => char.IsLetterOrDigit(c)).ToArray());
if (string.IsNullOrEmpty(clean))
return null;
if (char.IsDigit(clean[0]))
return SanitizedName(clean.Substring(1));
// Source: https://tools.ietf.org/html/rfc2812#section-1.2.1
if (clean.Length > 9)
clean = clean.Substring(0, 9);
return clean;
}
public bool IsValidNickname(string name)
{
return Rfc2812.IsValidNickname(name);
}
public void SendMessage(string text)
{
if (connectionStatus != ChatConnectionStatus.Joined)
return;
// Guard against a last-moment disconnection
try
{
client.SendMessage(SendType.Message, channel.Name, text);
AddMessage(client.Nickname, text);
}
catch (NotConnectedException) { }
}
public bool TrySetNickname(string nick)
{
// TODO: This is inconsistent with the other check
if (Rfc2812.IsValidNickname(nick))
{
client.RfcNick(nick);
Game.Settings.Chat.Nickname = nick;
return true;
}
return false;
}
public void Disconnect()
{
// Error is an alias for disconnect, but keeps the panel open
// so that clients can see the error
if (connectionStatus == ChatConnectionStatus.Error)
{
Game.RunAfterTick(History.Clear);
topic = null;
connectionStatus = ChatConnectionStatus.Disconnected;
}
else
connectionStatus = ChatConnectionStatus.Disconnecting;
if (!client.IsConnected)
return;
client.RfcQuit(Game.Settings.Chat.QuitMessage);
AddNotification("Disconnecting from {0}...".F(client.Address));
Game.RunAfterTick(() => Game.Settings.Chat.ConnectAutomatically = false);
}
public void Dispose()
{
// HACK: The IRC library we are using has terrible thread-handling code that relies on Thread.Abort.
// There is a thread reading from the network socket which is aborted, however on Windows this is inside
// native code so this abort call hangs until the network socket reads something and returns to managed
// code where it can then be aborted.
//
// This means we may hang for several seconds during shutdown (until we receive something over IRC!) before
// closing.
//
// Since our IRC client currently lives forever, the only time we call this Dispose method is during the
// shutdown of our process. Therefore, we can work around the problem by just not bothering to disconnect
// properly. Since our process is about to die anyway, it's not like anyone will care.
////if (client.IsConnected)
//// client.Disconnect();
}
}
}

View File

@@ -10,6 +10,8 @@
using System;
using System.Collections.Generic;
using System.Linq;
using OpenRA.Support;
namespace OpenRA.Graphics
{
@@ -47,7 +49,7 @@ namespace OpenRA.Graphics
this.facingFunc = facingFunc;
}
int CurrentFrame { get { return backwards ? CurrentSequence.Start + CurrentSequence.Length - frame - 1 : frame; } }
public int CurrentFrame { get { return backwards ? CurrentSequence.Start + CurrentSequence.Length - frame - 1 : frame; } }
public Sprite Image { get { return CurrentSequence.GetSprite(CurrentFrame, facingFunc()); } }
public IEnumerable<IRenderable> Render(WPos pos, WVec offset, int zOffset, PaletteReference palette, float scale)
@@ -139,6 +141,24 @@ namespace OpenRA.Graphics
tickFunc = () => frame = func();
}
public void PlayFetchDirection(string sequenceName, Func<int> direction)
{
tickAlways = false;
CurrentSequence = sequenceProvider.GetSequence(name, sequenceName);
timeUntilNextFrame = CurrentSequence != null ? CurrentSequence.Tick : defaultTick;
frame = 0;
tickFunc = () =>
{
var d = direction();
if (d > 0 && ++frame >= CurrentSequence.Length)
frame = 0;
if (d < 0 && --frame < 0)
frame = CurrentSequence.Length - 1;
};
}
int timeUntilNextFrame;
Action tickFunc;
@@ -181,5 +201,10 @@ namespace OpenRA.Graphics
{
return sequenceProvider.GetSequence(name, sequenceName);
}
public string GetRandomExistingSequence(string[] sequences, MersenneTwister random)
{
return sequences.Where(s => HasSequence(s)).RandomOrDefault(random);
}
}
}

View File

@@ -106,7 +106,7 @@ namespace OpenRA.Graphics
sheet = cachedSheets[mi.Src];
else
{
sheet = new Sheet(mi.Src);
sheet = new Sheet(SheetType.BGRA, mi.Src);
cachedSheets.Add(mi.Src, sheet);
}

View File

@@ -9,10 +9,11 @@
#endregion
using System.Drawing;
using OpenRA.Scripting;
namespace OpenRA.Graphics
{
public struct HSLColor
public struct HSLColor : IScriptBindable
{
public readonly byte H;
public readonly byte S;

View File

@@ -30,6 +30,11 @@ namespace OpenRA.Graphics
readOnlyModifiablePalettes = modifiablePalettes.AsReadOnly();
}
public bool Contains(string name)
{
return modifiablePalettes.ContainsKey(name) || palettes.ContainsKey(name);
}
public IPalette GetPalette(string name)
{
MutablePalette mutable;

17
OpenRA.Game/Graphics/IGraphicsDevice.cs Executable file → Normal file
View File

@@ -15,11 +15,11 @@ using OpenRA.Graphics;
namespace OpenRA
{
[AttributeUsage(AttributeTargets.Assembly)]
public sealed class RendererAttribute : Attribute
public sealed class PlatformAttribute : Attribute
{
public readonly Type Type;
public RendererAttribute(Type graphicsDeviceType)
public PlatformAttribute(Type graphicsDeviceType)
{
if (!typeof(IDeviceFactory).IsAssignableFrom(graphicsDeviceType))
throw new InvalidOperationException("Incorrect type in RendererAttribute");
@@ -29,7 +29,8 @@ namespace OpenRA
public interface IDeviceFactory
{
IGraphicsDevice Create(Size size, WindowMode windowMode);
IGraphicsDevice CreateGraphics(Size size, WindowMode windowMode);
ISoundEngine CreateSound();
}
public interface IHardwareCursor : IDisposable { }
@@ -41,10 +42,8 @@ namespace OpenRA
Additive,
Subtractive,
Multiply,
SoftAdditive,
Translucency25,
Translucency50,
Translucency75
Multiplicative,
DoubleMultiplicative
}
public interface IGraphicsDevice : IDisposable
@@ -59,6 +58,7 @@ namespace OpenRA
void Clear();
void Present();
Bitmap TakeScreenshot();
void PumpInput(IInputHandler inputHandler);
string GetClipboardText();
void DrawPrimitives(PrimitiveType type, int firstVertex, int numVertices);
@@ -83,10 +83,13 @@ namespace OpenRA
{
void Bind();
void SetData(T[] vertices, int length);
void SetData(T[] vertices, int start, int length);
void SetData(IntPtr data, int start, int length);
}
public interface IShader
{
void SetBool(string name, bool value);
void SetVec(string name, float x);
void SetVec(string name, float x, float y);
void SetVec(string name, float[] vec, int length);

View File

@@ -9,6 +9,7 @@
#endregion
using System;
using System.Collections.Generic;
using System.Drawing;
namespace OpenRA.Graphics
@@ -19,6 +20,7 @@ namespace OpenRA.Graphics
readonly Renderer renderer;
readonly IShader shader;
readonly Action renderAction;
readonly Vertex[] vertices;
int nv = 0;
@@ -30,6 +32,11 @@ namespace OpenRA.Graphics
this.renderer = renderer;
this.shader = shader;
vertices = new Vertex[renderer.TempBufferSize];
renderAction = () =>
{
renderer.SetLineWidth(LineWidth);
renderer.DrawBatch(vertices, nv, PrimitiveType.LineList);
};
}
public float LineWidth
@@ -53,14 +60,9 @@ namespace OpenRA.Graphics
if (nv > 0)
{
renderer.Device.SetBlendMode(BlendMode.Alpha);
shader.Render(() =>
{
var vb = renderer.GetTempVertexBuffer();
vb.SetData(vertices, nv);
renderer.SetLineWidth(LineWidth);
renderer.DrawBatch(vb, 0, nv, PrimitiveType.LineList);
});
shader.Render(renderAction);
renderer.Device.SetBlendMode(BlendMode.None);
nv = 0;
}
}
@@ -69,10 +71,26 @@ namespace OpenRA.Graphics
{
var tr = new float2(br.X, tl.Y);
var bl = new float2(tl.X, br.Y);
DrawLine(tl, tr, c, c);
DrawLine(tl, bl, c, c);
DrawLine(tr, br, c, c);
DrawLine(bl, br, c, c);
DrawLine(tl, tr, c);
DrawLine(tl, bl, c);
DrawLine(tr, br, c);
DrawLine(bl, br, c);
}
public void DrawLine(float2 start, float2 end, Color color)
{
renderer.CurrentBatchRenderer = this;
if (nv + 2 > renderer.TempBufferSize)
Flush();
color = Util.PremultiplyAlpha(color);
var r = color.R / 255.0f;
var g = color.G / 255.0f;
var b = color.B / 255.0f;
var a = color.A / 255.0f;
vertices[nv++] = new Vertex(start + Offset, r, g, b, a);
vertices[nv++] = new Vertex(end + Offset, r, g, b, a);
}
public void DrawLine(float2 start, float2 end, Color startColor, Color endColor)
@@ -82,19 +100,55 @@ namespace OpenRA.Graphics
if (nv + 2 > renderer.TempBufferSize)
Flush();
vertices[nv++] = new Vertex(start + Offset,
startColor.R / 255.0f, startColor.G / 255.0f,
startColor.B / 255.0f, startColor.A / 255.0f);
startColor = Util.PremultiplyAlpha(startColor);
var r = startColor.R / 255.0f;
var g = startColor.G / 255.0f;
var b = startColor.B / 255.0f;
var a = startColor.A / 255.0f;
vertices[nv++] = new Vertex(start + Offset, r, g, b, a);
vertices[nv++] = new Vertex(end + Offset,
endColor.R / 255.0f, endColor.G / 255.0f,
endColor.B / 255.0f, endColor.A / 255.0f);
endColor = Util.PremultiplyAlpha(endColor);
r = endColor.R / 255.0f;
g = endColor.G / 255.0f;
b = endColor.B / 255.0f;
a = endColor.A / 255.0f;
vertices[nv++] = new Vertex(end + Offset, r, g, b, a);
}
public void DrawLineStrip(IEnumerable<float2> points, Color color)
{
renderer.CurrentBatchRenderer = this;
color = Util.PremultiplyAlpha(color);
var r = color.R / 255.0f;
var g = color.G / 255.0f;
var b = color.B / 255.0f;
var a = color.A / 255.0f;
var first = true;
var prev = new Vertex();
foreach (var point in points)
{
if (first)
{
first = false;
prev = new Vertex(point + Offset, r, g, b, a);
continue;
}
if (nv + 2 > renderer.TempBufferSize)
Flush();
vertices[nv++] = prev;
prev = new Vertex(point + Offset, r, g, b, a);
vertices[nv++] = prev;
}
}
public void FillRect(RectangleF r, Color color)
{
for (var y = r.Top; y < r.Bottom; y++)
DrawLine(new float2(r.Left, y), new float2(r.Right, y), color, color);
DrawLine(new float2(r.Left, y), new float2(r.Right, y), color);
}
public void FillEllipse(RectangleF r, Color color)
@@ -106,7 +160,7 @@ namespace OpenRA.Graphics
for (var y = r.Top; y <= r.Bottom; y++)
{
var dx = a * (float)Math.Sqrt(1 - (y - yc) * (y - yc) / b / b);
DrawLine(new float2(xc - dx, y), new float2(xc + dx, y), color, color);
DrawLine(new float2(xc - dx, y), new float2(xc + dx, y), color);
}
}

View File

@@ -20,14 +20,23 @@ namespace OpenRA.Graphics
{
public static Bitmap TerrainBitmap(TileSet tileset, Map map, bool actualSize = false)
{
var isRectangularIsometric = map.Grid.Type == MapGridType.RectangularIsometric;
var b = map.Bounds;
// Fudge the heightmap offset by adding as much extra as we need / can.
// This tries to correct for our incorrect assumption that MPos == PPos
var heightOffset = Math.Min(map.Grid.MaximumTerrainHeight, map.MapSize.Y - b.Bottom);
var width = b.Width;
var height = b.Height;
var height = b.Height + heightOffset;
var bitmapWidth = width;
if (isRectangularIsometric)
bitmapWidth = 2 * bitmapWidth - 1;
if (!actualSize)
width = height = Exts.NextPowerOf2(Math.Max(b.Width, b.Height));
bitmapWidth = height = Exts.NextPowerOf2(Math.Max(bitmapWidth, height));
var terrain = new Bitmap(width, height);
var terrain = new Bitmap(bitmapWidth, height);
var bitmapData = terrain.LockBits(terrain.Bounds(),
ImageLockMode.ReadWrite, PixelFormat.Format32bppArgb);
@@ -38,16 +47,27 @@ namespace OpenRA.Graphics
{
var colors = (int*)bitmapData.Scan0;
var stride = bitmapData.Stride / 4;
for (var y = 0; y < b.Height; y++)
for (var y = 0; y < height; y++)
{
for (var x = 0; x < b.Width; x++)
for (var x = 0; x < width; x++)
{
var mapX = x + b.Left;
var mapY = y + b.Top;
var type = tileset.GetTileInfo(mapTiles[new MPos(mapX, mapY)]);
var color = type != null ? type.LeftColor : Color.Black;
var uv = new MPos(x + b.Left, y + b.Top);
var type = tileset.GetTileInfo(mapTiles[uv]);
var leftColor = type != null ? type.LeftColor : Color.Black;
colors[y * stride + x] = color.ToArgb();
if (isRectangularIsometric)
{
// Odd rows are shifted right by 1px
var dx = uv.V & 1;
var rightColor = type != null ? type.RightColor : Color.Black;
if (x + dx > 0)
colors[y * stride + 2 * x + dx - 1] = leftColor.ToArgb();
if (2 * x + dx < stride)
colors[y * stride + 2 * x + dx] = rightColor.ToArgb();
}
else
colors[y * stride + x] = leftColor.ToArgb();
}
}
}
@@ -61,8 +81,18 @@ namespace OpenRA.Graphics
static Bitmap AddStaticResources(TileSet tileset, Map map, Ruleset resourceRules, Bitmap terrainBitmap)
{
var terrain = new Bitmap(terrainBitmap);
var isRectangularIsometric = map.Grid.Type == MapGridType.RectangularIsometric;
var b = map.Bounds;
// Fudge the heightmap offset by adding as much extra as we need / can
// This tries to correct for our incorrect assumption that MPos == PPos
var heightOffset = Math.Min(map.Grid.MaximumTerrainHeight, map.MapSize.Y - b.Bottom);
var width = b.Width;
var height = b.Height + heightOffset;
var resources = resourceRules.Actors["world"].TraitInfos<ResourceTypeInfo>()
.ToDictionary(r => r.ResourceType, r => r.TerrainType);
var bitmapData = terrain.LockBits(terrain.Bounds(),
ImageLockMode.ReadWrite, PixelFormat.Format32bppArgb);
@@ -70,23 +100,31 @@ namespace OpenRA.Graphics
{
var colors = (int*)bitmapData.Scan0;
var stride = bitmapData.Stride / 4;
for (var y = 0; y < b.Height; y++)
for (var y = 0; y < height; y++)
{
for (var x = 0; x < b.Width; x++)
for (var x = 0; x < width; x++)
{
var mapX = x + b.Left;
var mapY = y + b.Top;
if (map.MapResources.Value[new MPos(mapX, mapY)].Type == 0)
var uv = new MPos(x + b.Left, y + b.Top);
if (map.MapResources.Value[uv].Type == 0)
continue;
var res = resourceRules.Actors["world"].Traits.WithInterface<ResourceTypeInfo>()
.Where(t => t.ResourceType == map.MapResources.Value[new MPos(mapX, mapY)].Type)
.Select(t => t.TerrainType).FirstOrDefault();
if (res == null)
string res;
if (!resources.TryGetValue(map.MapResources.Value[uv].Type, out res))
continue;
colors[y * stride + x] = tileset[tileset.GetTerrainIndex(res)].Color.ToArgb();
var color = tileset[tileset.GetTerrainIndex(res)].Color.ToArgb();
if (isRectangularIsometric)
{
// Odd rows are shifted right by 1px
var dx = uv.V & 1;
if (x + dx > 0)
colors[y * stride + 2 * x + dx - 1] = color;
if (2 * x + dx < stride)
colors[y * stride + 2 * x + dx] = color;
}
else
colors[y * stride + x] = color;
}
}
}
@@ -96,107 +134,6 @@ namespace OpenRA.Graphics
return terrain;
}
public static Bitmap CustomTerrainBitmap(World world)
{
var map = world.Map;
var b = map.Bounds;
var size = Exts.NextPowerOf2(Math.Max(b.Width, b.Height));
var bitmap = new Bitmap(size, size);
var bitmapData = bitmap.LockBits(bitmap.Bounds(),
ImageLockMode.ReadWrite, PixelFormat.Format32bppArgb);
unsafe
{
var colors = (int*)bitmapData.Scan0;
var stride = bitmapData.Stride / 4;
for (var y = 0; y < b.Height; y++)
{
for (var x = 0; x < b.Width; x++)
{
var mapX = x + b.Left;
var mapY = y + b.Top;
var custom = map.CustomTerrain[new MPos(mapX, mapY)];
if (custom == byte.MaxValue)
continue;
colors[y * stride + x] = world.TileSet[custom].Color.ToArgb();
}
}
}
bitmap.UnlockBits(bitmapData);
return bitmap;
}
public static Bitmap ActorsBitmap(World world)
{
var map = world.Map;
var b = map.Bounds;
var size = Exts.NextPowerOf2(Math.Max(b.Width, b.Height));
var bitmap = new Bitmap(size, size);
var bitmapData = bitmap.LockBits(bitmap.Bounds(),
ImageLockMode.ReadWrite, PixelFormat.Format32bppArgb);
unsafe
{
var colors = (int*)bitmapData.Scan0;
var stride = bitmapData.Stride / 4;
foreach (var t in world.ActorsWithTrait<IRadarSignature>())
{
if (!t.Actor.IsInWorld || world.FogObscures(t.Actor))
continue;
var color = t.Trait.RadarSignatureColor(t.Actor);
foreach (var cell in t.Trait.RadarSignatureCells(t.Actor))
{
var uv = cell.ToMPos(map);
if (b.Contains(uv.U, uv.V))
colors[(uv.V - b.Top) * stride + uv.U - b.Left] = color.ToArgb();
}
}
}
bitmap.UnlockBits(bitmapData);
return bitmap;
}
public static Bitmap ShroudBitmap(World world)
{
var map = world.Map;
var b = map.Bounds;
var size = Exts.NextPowerOf2(Math.Max(b.Width, b.Height));
var bitmap = new Bitmap(size, size);
if (world.RenderPlayer == null)
return bitmap;
var bitmapData = bitmap.LockBits(bitmap.Bounds(),
ImageLockMode.ReadWrite, PixelFormat.Format32bppArgb);
var shroud = Color.Black.ToArgb();
var fog = Color.FromArgb(128, Color.Black).ToArgb();
unsafe
{
var colors = (int*)bitmapData.Scan0;
var stride = bitmapData.Stride / 4;
var shroudObscured = world.ShroudObscuresTest(map.Cells);
var fogObscured = world.FogObscuresTest(map.Cells);
foreach (var uv in map.Cells.MapCoords)
{
var bitmapXy = new int2(uv.U - b.Left, uv.V - b.Top);
if (shroudObscured(uv))
colors[bitmapXy.Y * stride + bitmapXy.X] = shroud;
else if (fogObscured(uv))
colors[bitmapXy.Y * stride + bitmapXy.X] = fog;
}
}
bitmap.UnlockBits(bitmapData);
return bitmap;
}
public static Bitmap RenderMapPreview(TileSet tileset, Map map, bool actualSize)
{
return RenderMapPreview(tileset, map, map.Rules, actualSize);

View File

@@ -0,0 +1,37 @@
#region Copyright & License Information
/*
* Copyright 2007-2015 The OpenRA Developers (see AUTHORS)
* This file is part of OpenRA, which is free software. It is made
* available to you under the terms of the GNU General Public License
* as published by the Free Software Foundation. For more information,
* see COPYING.
*/
#endregion
using System;
using System.Collections.Generic;
using System.Drawing;
using System.Linq;
using OpenRA.Traits;
namespace OpenRA.Graphics
{
public sealed class PaletteReference
{
readonly float index;
readonly HardwarePalette hardwarePalette;
public readonly string Name;
public IPalette Palette { get; internal set; }
public float TextureIndex { get { return index / hardwarePalette.Height; } }
public float TextureMidIndex { get { return (index + 0.5f) / hardwarePalette.Height; } }
public PaletteReference(string name, int index, IPalette palette, HardwarePalette hardwarePalette)
{
Name = name;
Palette = palette;
this.index = index;
this.hardwarePalette = hardwarePalette;
}
}
}

11
OpenRA.Game/Graphics/PlayerColorRemap.cs Executable file → Normal file
View File

@@ -33,16 +33,17 @@ namespace OpenRA.Graphics
var c2 = new HSLColor(c.H, c.S, (byte)Math.Max(0, c.L - rampRange)).RGB;
var baseIndex = ramp[0];
var remapRamp = ramp.Select(r => r - ramp[0]);
var rampMaxIndex = ramp.Length - 1;
// reversed remapping
if (ramp[0] > ramp[15])
if (ramp[0] > ramp[rampMaxIndex])
{
baseIndex = ramp[15];
for (var i = 15; i > 0; i--)
remapRamp = ramp.Select(r => r - ramp[15]);
baseIndex = ramp[rampMaxIndex];
for (var i = rampMaxIndex; i > 0; i--)
remapRamp = ramp.Select(r => r - ramp[rampMaxIndex]);
}
remapColors = remapRamp.Select((x, i) => Pair.New(baseIndex + i, Exts.ColorLerp(x / 16f, c1, c2)))
remapColors = remapRamp.Select((x, i) => Pair.New(baseIndex + i, Exts.ColorLerp(x / (float)ramp.Length, c1, c2)))
.ToDictionary(u => u.First, u => u.Second);
}

View File

@@ -8,6 +8,7 @@
*/
#endregion
using System;
using System.Drawing;
namespace OpenRA.Graphics
@@ -16,6 +17,7 @@ namespace OpenRA.Graphics
{
readonly Renderer renderer;
readonly IShader shader;
readonly Action renderAction;
readonly Vertex[] vertices;
int nv = 0;
@@ -25,6 +27,7 @@ namespace OpenRA.Graphics
this.renderer = renderer;
this.shader = shader;
vertices = new Vertex[renderer.TempBufferSize];
renderAction = () => renderer.DrawBatch(vertices, nv, PrimitiveType.QuadList);
}
public void Flush()
@@ -32,12 +35,7 @@ namespace OpenRA.Graphics
if (nv > 0)
{
renderer.Device.SetBlendMode(BlendMode.Alpha);
shader.Render(() =>
{
var vb = renderer.GetTempVertexBuffer();
vb.SetData(vertices, nv);
renderer.DrawBatch(vb, 0, nv, PrimitiveType.QuadList);
});
shader.Render(renderAction);
renderer.Device.SetBlendMode(BlendMode.None);
nv = 0;
@@ -51,6 +49,7 @@ namespace OpenRA.Graphics
if (nv + 4 > renderer.TempBufferSize)
Flush();
color = Util.PremultiplyAlpha(color);
var r = color.R / 255.0f;
var g = color.G / 255.0f;
var b = color.B / 255.0f;

View File

@@ -65,30 +65,46 @@ namespace OpenRA.Graphics
var z = float2.Lerp(start, end, value);
var wlr = Game.Renderer.WorldLineRenderer;
wlr.DrawLine(start + p, end + p, c, c);
wlr.DrawLine(start + q, end + q, c2, c2);
wlr.DrawLine(start + r, end + r, c, c);
wlr.DrawLine(start + p, end + p, c);
wlr.DrawLine(start + q, end + q, c2);
wlr.DrawLine(start + r, end + r, c);
wlr.DrawLine(start + p, z + p, barColor2, barColor2);
wlr.DrawLine(start + q, z + q, barColor, barColor);
wlr.DrawLine(start + r, z + r, barColor2, barColor2);
wlr.DrawLine(start + p, z + p, barColor2);
wlr.DrawLine(start + q, z + q, barColor);
wlr.DrawLine(start + r, z + r, barColor2);
}
Color GetHealthColor(Health health)
Color GetHealthColor(IHealth health)
{
if (Game.Settings.Game.TeamHealthColors)
var player = actor.World.RenderPlayer ?? actor.World.LocalPlayer;
if (Game.Settings.Game.TeamHealthColors && player != null && !player.Spectating)
{
var isAlly = actor.Owner.IsAlliedWith(actor.World.LocalPlayer)
|| (actor.EffectiveOwner != null && actor.EffectiveOwner.Disguised
&& actor.World.LocalPlayer.IsAlliedWith(actor.EffectiveOwner.Owner));
return isAlly ? Color.LimeGreen : actor.Owner.NonCombatant ? Color.Tan : Color.Red;
var apparentOwner = actor.EffectiveOwner != null && actor.EffectiveOwner.Disguised
? actor.EffectiveOwner.Owner
: actor.Owner;
// For friendly spies, treat the unit's owner as the actual owner
if (actor.Owner.IsAlliedWith(actor.World.RenderPlayer))
apparentOwner = actor.Owner;
if (apparentOwner == player)
return Color.LimeGreen;
if (apparentOwner.IsAlliedWith(player))
return Color.Yellow;
if (apparentOwner.NonCombatant)
return Color.Tan;
return Color.Red;
}
else
return health.DamageState == DamageState.Critical ? Color.Red :
health.DamageState == DamageState.Heavy ? Color.Yellow : Color.LimeGreen;
}
void DrawHealthBar(WorldRenderer wr, Health health, float2 start, float2 end)
void DrawHealthBar(WorldRenderer wr, IHealth health, float2 start, float2 end)
{
if (health == null || health.IsDead)
return;
@@ -109,15 +125,15 @@ namespace OpenRA.Graphics
var z = float2.Lerp(start, end, (float)health.HP / health.MaxHP);
var wlr = Game.Renderer.WorldLineRenderer;
wlr.DrawLine(start + p, end + p, c, c);
wlr.DrawLine(start + q, end + q, c2, c2);
wlr.DrawLine(start + r, end + r, c, c);
wlr.DrawLine(start + p, end + p, c);
wlr.DrawLine(start + q, end + q, c2);
wlr.DrawLine(start + r, end + r, c);
wlr.DrawLine(start + p, z + p, healthColor2, healthColor2);
wlr.DrawLine(start + q, z + q, healthColor, healthColor);
wlr.DrawLine(start + r, z + r, healthColor2, healthColor2);
wlr.DrawLine(start + p, z + p, healthColor2);
wlr.DrawLine(start + q, z + q, healthColor);
wlr.DrawLine(start + r, z + r, healthColor2);
if (health.DisplayHp != health.HP)
if (health.DisplayHP != health.HP)
{
var deltaColor = Color.OrangeRed;
var deltaColor2 = Color.FromArgb(
@@ -125,11 +141,11 @@ namespace OpenRA.Graphics
deltaColor.R / 2,
deltaColor.G / 2,
deltaColor.B / 2);
var zz = float2.Lerp(start, end, (float)health.DisplayHp / health.MaxHP);
var zz = float2.Lerp(start, end, (float)health.DisplayHP / health.MaxHP);
wlr.DrawLine(z + p, zz + p, deltaColor2, deltaColor2);
wlr.DrawLine(z + q, zz + q, deltaColor, deltaColor);
wlr.DrawLine(z + r, zz + r, deltaColor2, deltaColor2);
wlr.DrawLine(z + p, zz + p, deltaColor2);
wlr.DrawLine(z + q, zz + q, deltaColor);
wlr.DrawLine(z + r, zz + r, deltaColor2);
}
}
@@ -139,10 +155,10 @@ namespace OpenRA.Graphics
if (!actor.IsInWorld || actor.IsDead)
return;
var health = actor.TraitOrDefault<Health>();
var health = actor.TraitOrDefault<IHealth>();
var screenPos = wr.ScreenPxPosition(pos);
var bounds = actor.Bounds;
var bounds = actor.VisualBounds;
bounds.Offset(screenPos.X, screenPos.Y);
var start = new float2(bounds.Left + 1, bounds.Top);

View File

@@ -120,7 +120,7 @@ namespace OpenRA.Graphics
public Sequences LoadSequences(Map map)
{
using (new Support.PerfTimer("LoadSequences"))
return Load(map.SequenceDefinitions);
return Load(map != null ? map.SequenceDefinitions : new List<MiniYamlNode>());
}
Sequences Load(List<MiniYamlNode> sequenceNodes)

View File

@@ -18,13 +18,14 @@ namespace OpenRA.Graphics
{
public sealed class Sheet : IDisposable
{
readonly object textureLock = new object();
bool dirty;
bool releaseBufferOnCommit;
ITexture texture;
byte[] data;
public readonly Size Size;
public readonly SheetType Type;
public byte[] GetData()
{
CreateBuffer();
@@ -33,66 +34,51 @@ namespace OpenRA.Graphics
public bool Buffered { get { return data != null || texture == null; } }
public Sheet(Size size)
public Sheet(SheetType type, Size size)
{
Type = type;
Size = size;
}
public Sheet(ITexture texture)
public Sheet(SheetType type, ITexture texture)
{
Type = type;
this.texture = texture;
Size = texture.Size;
}
public Sheet(string filename)
public Sheet(SheetType type, string filename)
{
using (var stream = GlobalFileSystem.Open(filename))
using (var bitmap = (Bitmap)Image.FromStream(stream))
{
Size = bitmap.Size;
data = new byte[4 * Size.Width * Size.Height];
var dataStride = 4 * Size.Width;
data = new byte[dataStride * Size.Height];
var bd = bitmap.LockBits(bitmap.Bounds(),
ImageLockMode.ReadOnly, PixelFormat.Format32bppArgb);
for (var y = 0; y < Size.Height; y++)
Marshal.Copy(IntPtr.Add(bd.Scan0, y * bd.Stride), data, y * dataStride, dataStride);
bitmap.UnlockBits(bd);
Util.FastCopyIntoSprite(new Sprite(this, bitmap.Bounds(), TextureChannel.Red), bitmap);
}
Type = type;
ReleaseBuffer();
}
public ITexture GetTexture()
{
// This is only called from the main thread but 'dirty'
// is set from other threads too via CommitData().
GenerateTexture();
return texture;
}
void GenerateTexture()
{
lock (textureLock)
if (texture == null)
{
if (texture == null)
{
texture = Game.Renderer.Device.CreateTexture();
dirty = true;
}
if (data != null)
{
if (dirty)
{
texture.SetData(data, Size.Width, Size.Height);
dirty = false;
if (releaseBufferOnCommit)
data = null;
}
}
texture = Game.Renderer.Device.CreateTexture();
dirty = true;
}
if (data != null && dirty)
{
texture.SetData(data, Size.Width, Size.Height);
dirty = false;
if (releaseBufferOnCommit)
data = null;
}
return texture;
}
public Bitmap AsBitmap()
@@ -141,42 +127,32 @@ namespace OpenRA.Graphics
public void CreateBuffer()
{
lock (textureLock)
{
if (data != null)
return;
if (texture == null)
data = new byte[4 * Size.Width * Size.Height];
else
data = texture.GetData();
releaseBufferOnCommit = false;
}
if (data != null)
return;
if (texture == null)
data = new byte[4 * Size.Width * Size.Height];
else
data = texture.GetData();
releaseBufferOnCommit = false;
}
public void CommitData()
public void CommitBufferedData()
{
CommitData(false);
if (!Buffered)
throw new InvalidOperationException(
"This sheet is unbuffered. You cannot call CommitBufferedData on an unbuffered sheet. " +
"If you need to completely replace the texture data you should set data into the texture directly. " +
"If you need to make only small changes to the texture data consider creating a buffered sheet instead.");
dirty = true;
}
public void ReleaseBuffer()
{
CommitData(true);
}
void CommitData(bool releaseBuffer)
{
lock (textureLock)
{
if (!Buffered)
throw new InvalidOperationException(
"This sheet is unbuffered. You cannot call CommitData on an unbuffered sheet. " +
"If you need to completely replace the texture data you should set data into the texture directly. " +
"If you need to make only small changes to the texture data consider creating a buffered sheet instead.");
dirty = true;
if (releaseBuffer)
releaseBufferOnCommit = true;
}
if (!Buffered)
return;
dirty = true;
releaseBufferOnCommit = true;
}
public void Dispose()

View File

@@ -40,16 +40,16 @@ namespace OpenRA.Graphics
int rowHeight = 0;
Point p;
public static Sheet AllocateSheet(int sheetSize)
public static Sheet AllocateSheet(SheetType type, int sheetSize)
{
return new Sheet(new Size(sheetSize, sheetSize));
return new Sheet(type, new Size(sheetSize, sheetSize));
}
public SheetBuilder(SheetType t)
: this(t, Game.Settings.Graphics.SheetSize) { }
public SheetBuilder(SheetType t, int sheetSize)
: this(t, () => AllocateSheet(sheetSize)) { }
: this(t, () => AllocateSheet(t, sheetSize)) { }
public SheetBuilder(SheetType t, Func<Sheet> allocateSheet)
{
@@ -70,7 +70,7 @@ namespace OpenRA.Graphics
var rect = Allocate(size, spriteOffset);
Util.FastCopyIntoChannel(rect, src);
current.CommitData();
current.CommitBufferedData();
return rect;
}
@@ -78,7 +78,7 @@ namespace OpenRA.Graphics
{
var rect = Allocate(src.Size);
Util.FastCopyIntoSprite(rect, src);
current.CommitData();
current.CommitBufferedData();
return rect;
}

View File

@@ -8,6 +8,7 @@
*/
#endregion
using System;
using System.Drawing;
namespace OpenRA.Graphics
@@ -24,12 +25,9 @@ namespace OpenRA.Graphics
public readonly float Top, Left, Bottom, Right;
public Sprite(Sheet sheet, Rectangle bounds, TextureChannel channel)
: this(sheet, bounds, float2.Zero, channel, BlendMode.Alpha) { }
: this(sheet, bounds, float2.Zero, channel) { }
public Sprite(Sheet sheet, Rectangle bounds, TextureChannel channel, BlendMode blendMode)
: this(sheet, bounds, float2.Zero, channel, blendMode) { }
public Sprite(Sheet sheet, Rectangle bounds, float2 offset, TextureChannel channel, BlendMode blendMode)
public Sprite(Sheet sheet, Rectangle bounds, float2 offset, TextureChannel channel, BlendMode blendMode = BlendMode.Alpha)
{
Sheet = sheet;
Bounds = bounds;
@@ -40,10 +38,10 @@ namespace OpenRA.Graphics
FractionalOffset = offset / Size;
Left = (float)bounds.Left / sheet.Size.Width;
Top = (float)bounds.Top / sheet.Size.Height;
Right = (float)bounds.Right / sheet.Size.Width;
Bottom = (float)bounds.Bottom / sheet.Size.Height;
Left = (float)Math.Min(bounds.Left, bounds.Right) / sheet.Size.Width;
Top = (float)Math.Min(bounds.Top, bounds.Bottom) / sheet.Size.Height;
Right = (float)Math.Max(bounds.Left, bounds.Right) / sheet.Size.Width;
Bottom = (float)Math.Max(bounds.Top, bounds.Bottom) / sheet.Size.Height;
}
}

View File

@@ -93,6 +93,9 @@ namespace OpenRA.Graphics
public int2 Measure(string text)
{
if (string.IsNullOrEmpty(text))
return new int2(0, size);
var lines = text.Split('\n');
return new int2((int)Math.Ceiling(lines.Max(lineWidth)), lines.Length * size);
}
@@ -102,18 +105,19 @@ namespace OpenRA.Graphics
face.LoadChar(c.First, LoadFlags.Default, LoadTarget.Normal);
face.Glyph.RenderGlyph(RenderMode.Normal);
var size = new Size((int)face.Glyph.Metrics.Width >> 6, (int)face.Glyph.Metrics.Height >> 6);
var size = new Size((int)face.Glyph.Metrics.Width, (int)face.Glyph.Metrics.Height);
var s = builder.Allocate(size);
var g = new GlyphInfo
{
Sprite = s,
Advance = (int)face.Glyph.Metrics.HorizontalAdvance / 64f,
Advance = (float)face.Glyph.Metrics.HorizontalAdvance,
Offset = new int2(face.Glyph.BitmapLeft, -face.Glyph.BitmapTop)
};
// A new bitmap is generated each time this property is accessed, so we do need to dispose it.
using (var bitmap = face.Glyph.Bitmap)
{
unsafe
{
var p = (byte*)bitmap.Buffer;
@@ -123,20 +127,25 @@ namespace OpenRA.Graphics
for (var j = 0; j < s.Size.Y; j++)
{
for (var i = 0; i < s.Size.X; i++)
{
if (p[i] != 0)
{
var q = destStride * (j + s.Bounds.Top) + 4 * (i + s.Bounds.Left);
dest[q] = c.Second.B;
dest[q + 1] = c.Second.G;
dest[q + 2] = c.Second.R;
dest[q + 3] = p[i];
var pmc = Util.PremultiplyAlpha(Color.FromArgb(p[i], c.Second));
dest[q] = pmc.B;
dest[q + 1] = pmc.G;
dest[q + 2] = pmc.R;
dest[q + 3] = pmc.A;
}
}
p += bitmap.Pitch;
}
}
}
s.Sheet.CommitData();
s.Sheet.CommitBufferedData();
return g;
}

View File

@@ -17,6 +17,7 @@ namespace OpenRA.Graphics
{
readonly Renderer renderer;
readonly IShader shader;
readonly Action renderAction;
readonly Vertex[] vertices;
Sheet currentSheet;
@@ -28,6 +29,7 @@ namespace OpenRA.Graphics
this.renderer = renderer;
this.shader = shader;
vertices = new Vertex[renderer.TempBufferSize];
renderAction = () => renderer.DrawBatch(vertices, nv, PrimitiveType.QuadList);
}
public void Flush()
@@ -37,12 +39,7 @@ namespace OpenRA.Graphics
shader.SetTexture("DiffuseTexture", currentSheet.GetTexture());
renderer.Device.SetBlendMode(currentBlend);
shader.Render(() =>
{
var vb = renderer.GetTempVertexBuffer();
vb.SetData(vertices, nv);
renderer.DrawBatch(vb, 0, nv, PrimitiveType.QuadList);
});
shader.Render(renderAction);
renderer.Device.SetBlendMode(BlendMode.None);
nv = 0;
@@ -54,7 +51,7 @@ namespace OpenRA.Graphics
{
renderer.CurrentBatchRenderer = this;
if (s.Sheet != currentSheet || s.BlendMode != currentBlend || nv + 4 > renderer.TempBufferSize)
if (s.BlendMode != currentBlend || s.Sheet != currentSheet || nv + 4 > renderer.TempBufferSize)
Flush();
currentBlend = s.BlendMode;
@@ -103,10 +100,10 @@ namespace OpenRA.Graphics
nv += 4;
}
public void DrawVertexBuffer(IVertexBuffer<Vertex> buffer, int start, int length, PrimitiveType type, Sheet sheet)
public void DrawVertexBuffer(IVertexBuffer<Vertex> buffer, int start, int length, PrimitiveType type, Sheet sheet, BlendMode blendMode)
{
shader.SetTexture("DiffuseTexture", sheet.GetTexture());
renderer.Device.SetBlendMode(BlendMode.Alpha);
renderer.Device.SetBlendMode(blendMode);
shader.Render(() => renderer.DrawBatch(buffer, start, length, type));
renderer.Device.SetBlendMode(BlendMode.None);
}
@@ -122,5 +119,10 @@ namespace OpenRA.Graphics
shader.SetVec("r1", zoom * 2f / screen.Width, -zoom * 2f / screen.Height);
shader.SetVec("r2", -1, 1);
}
public void SetDepthPreviewEnabled(bool enabled)
{
shader.SetBool("EnableDepthPreview", enabled);
}
}
}

View File

@@ -47,7 +47,7 @@ namespace OpenRA.Graphics
var a = first;
foreach (var b in waypoints.Skip(1).Select(pos => wr.ScreenPxPosition(pos)))
{
Game.Renderer.WorldLineRenderer.DrawLine(a, b, color, color);
Game.Renderer.WorldLineRenderer.DrawLine(a, b, color);
wr.DrawTargetMarker(color, b);
a = b;
}

View File

@@ -15,52 +15,44 @@ namespace OpenRA.Graphics
{
sealed class TerrainRenderer : IDisposable
{
readonly IVertexBuffer<Vertex> vertexBuffer;
readonly World world;
readonly Map map;
readonly TerrainSpriteLayer terrain;
readonly Theater theater;
readonly CellLayer<TerrainTile> mapTiles;
readonly CellLayer<byte> mapHeight;
public TerrainRenderer(World world, WorldRenderer wr)
{
this.world = world;
this.map = world.Map;
theater = wr.Theater;
mapTiles = world.Map.MapTiles.Value;
mapHeight = world.Map.MapHeight.Value;
var terrainPalette = wr.Palette("terrain").TextureIndex;
var vertices = new Vertex[4 * map.Bounds.Height * map.Bounds.Width];
var nv = 0;
terrain = new TerrainSpriteLayer(world, wr, theater.Sheet, BlendMode.Alpha,
wr.Palette("terrain"), wr.World.Type != WorldType.Editor);
foreach (var cell in map.Cells)
{
var tile = wr.Theater.TileSprite(map.MapTiles.Value[cell]);
var pos = wr.ScreenPosition(map.CenterOfCell(cell)) + tile.Offset - 0.5f * tile.Size;
Util.FastCreateQuad(vertices, pos, tile, terrainPalette, nv, tile.Size);
nv += 4;
}
foreach (var cell in world.Map.AllCells)
UpdateCell(cell);
vertexBuffer = Game.Renderer.Device.CreateVertexBuffer(vertices.Length);
vertexBuffer.SetData(vertices, nv);
mapTiles.CellEntryChanged += UpdateCell;
mapHeight.CellEntryChanged += UpdateCell;
}
public void UpdateCell(CPos cell)
{
terrain.Update(cell, theater.TileSprite(mapTiles[cell]));
}
public void Draw(WorldRenderer wr, Viewport viewport)
{
var verticesPerRow = 4 * map.Bounds.Width;
var cells = viewport.VisibleCells;
// Only draw the rows that are visible.
// VisibleCells is clamped to the map, so additional checks are unnecessary
var firstRow = cells.TopLeft.ToMPos(map).V - map.Bounds.Top;
var lastRow = cells.BottomRight.ToMPos(map).V - map.Bounds.Top + 1;
Game.Renderer.WorldSpriteRenderer.DrawVertexBuffer(
vertexBuffer, verticesPerRow * firstRow, verticesPerRow * (lastRow - firstRow),
PrimitiveType.QuadList, wr.Theater.Sheet);
foreach (var r in world.WorldActor.TraitsImplementing<IRenderOverlay>())
terrain.Draw(viewport);
foreach (var r in wr.World.WorldActor.TraitsImplementing<IRenderOverlay>())
r.Render(wr);
}
public void Dispose()
{
vertexBuffer.Dispose();
mapTiles.CellEntryChanged -= UpdateCell;
mapHeight.CellEntryChanged -= UpdateCell;
terrain.Dispose();
}
}
}

View File

@@ -0,0 +1,137 @@
#region Copyright & License Information
/*
* Copyright 2007-2015 The OpenRA Developers (see AUTHORS)
* This file is part of OpenRA, which is free software. It is made
* available to you under the terms of the GNU General Public License
* as published by the Free Software Foundation. For more information,
* see COPYING.
*/
#endregion
using System;
using System.Collections.Generic;
using System.Drawing;
using System.IO;
using System.Linq;
using OpenRA.Traits;
namespace OpenRA.Graphics
{
public sealed class TerrainSpriteLayer : IDisposable
{
public readonly Sheet Sheet;
public readonly BlendMode BlendMode;
readonly Sprite emptySprite;
readonly IVertexBuffer<Vertex> vertexBuffer;
readonly Vertex[] vertices;
readonly HashSet<int> dirtyRows = new HashSet<int>();
readonly int rowStride;
readonly bool restrictToBounds;
readonly WorldRenderer worldRenderer;
readonly Map map;
readonly PaletteReference palette;
public TerrainSpriteLayer(World world, WorldRenderer wr, Sheet sheet, BlendMode blendMode, PaletteReference palette, bool restrictToBounds)
{
worldRenderer = wr;
this.restrictToBounds = restrictToBounds;
Sheet = sheet;
BlendMode = blendMode;
this.palette = palette;
map = world.Map;
rowStride = 4 * map.MapSize.X;
vertices = new Vertex[rowStride * map.MapSize.Y];
vertexBuffer = Game.Renderer.Device.CreateVertexBuffer(vertices.Length);
emptySprite = new Sprite(sheet, Rectangle.Empty, TextureChannel.Alpha);
wr.PaletteInvalidated += UpdatePaletteIndices;
}
void UpdatePaletteIndices()
{
// Everything in the layer uses the same palette,
// so we can fix the indices in one pass
for (var i = 0; i < vertices.Length; i++)
{
var v = vertices[i];
vertices[i] = new Vertex(v.X, v.Y, v.Z, v.U, v.V, palette.TextureIndex, v.C);
}
for (var row = 0; row < map.MapSize.Y; row++)
dirtyRows.Add(row);
}
public void Update(CPos cell, Sprite sprite)
{
var pos = sprite == null ? float2.Zero :
worldRenderer.ScreenPosition(map.CenterOfCell(cell)) + sprite.Offset - 0.5f * sprite.Size;
Update(cell.ToMPos(map.Grid.Type), sprite, pos);
}
public void Update(MPos uv, Sprite sprite, float2 pos)
{
if (sprite != null)
{
if (sprite.Sheet != Sheet)
throw new InvalidDataException("Attempted to add sprite from a different sheet");
if (sprite.BlendMode != BlendMode)
throw new InvalidDataException("Attempted to add sprite with a different blend mode");
}
else
sprite = emptySprite;
var offset = rowStride * uv.V + 4 * uv.U;
Util.FastCreateQuad(vertices, pos, sprite, palette.TextureIndex, offset, sprite.Size);
dirtyRows.Add(uv.V);
}
public void Draw(Viewport viewport)
{
var cells = restrictToBounds ? viewport.VisibleCellsInsideBounds : viewport.AllVisibleCells;
// Only draw the rows that are visible.
var firstRow = cells.CandidateMapCoords.TopLeft.V.Clamp(0, map.MapSize.Y);
var lastRow = (cells.CandidateMapCoords.BottomRight.V + 1).Clamp(firstRow, map.MapSize.Y);
Game.Renderer.Flush();
// Flush any visible changes to the GPU
for (var row = firstRow; row <= lastRow; row++)
{
if (!dirtyRows.Remove(row))
continue;
var rowOffset = rowStride * row;
unsafe
{
// The compiler / language spec won't let us calculate a pointer to
// an offset inside a generic array T[], and so we are forced to
// calculate the start-of-row pointer here to pass in to SetData.
fixed (Vertex* vPtr = &vertices[0])
vertexBuffer.SetData((IntPtr)(vPtr + rowOffset), rowOffset, rowStride);
}
}
Game.Renderer.WorldSpriteRenderer.DrawVertexBuffer(
vertexBuffer, rowStride * firstRow, rowStride * (lastRow - firstRow),
PrimitiveType.QuadList, Sheet, BlendMode);
Game.Renderer.Flush();
}
public void Dispose()
{
worldRenderer.PaletteInvalidated -= UpdatePaletteIndices;
vertexBuffer.Dispose();
}
}
}

View File

@@ -43,16 +43,18 @@ namespace OpenRA.Graphics
{
this.tileset = tileset;
var allocated = false;
var type = tileset.EnableDepth ? SheetType.DualIndexed : SheetType.Indexed;
Func<Sheet> allocate = () =>
{
if (allocated)
throw new SheetOverflowException("Terrain sheet overflow. Try increasing the tileset SheetSize parameter.");
allocated = true;
return new Sheet(new Size(tileset.SheetSize, tileset.SheetSize));
return new Sheet(type, new Size(tileset.SheetSize, tileset.SheetSize));
};
sheetBuilder = new SheetBuilder(SheetType.Indexed, allocate);
sheetBuilder = new SheetBuilder(type, allocate);
random = new MersenneTwister();
var frameCache = new FrameCache(Game.ModData.SpriteLoaders);
@@ -63,8 +65,19 @@ namespace OpenRA.Graphics
foreach (var i in t.Value.Images)
{
var allFrames = frameCache[i];
var frames = t.Value.Frames != null ? t.Value.Frames.Select(f => allFrames[f]).ToArray() : allFrames;
variants.Add(frames.Select(f => sheetBuilder.Add(f)).ToArray());
var frameCount = tileset.EnableDepth ? allFrames.Length / 2 : allFrames.Length;
var indices = t.Value.Frames != null ? t.Value.Frames : Enumerable.Range(0, frameCount);
variants.Add(indices.Select(j =>
{
var f = allFrames[j];
var s = sheetBuilder.Allocate(f.Size, f.Offset);
Util.FastCopyIntoChannel(s, 0, f.Data);
if (tileset.EnableDepth)
Util.FastCopyIntoChannel(s, 1, allFrames[j + frameCount].Data);
return s;
}).ToArray());
}
var allSprites = variants.SelectMany(s => s);
@@ -82,7 +95,7 @@ namespace OpenRA.Graphics
Sheet.ReleaseBuffer();
}
public Sprite TileSprite(TerrainTile r)
public Sprite TileSprite(TerrainTile r, int? variant = null)
{
TheaterTemplate template;
if (!templates.TryGetValue(r.Type, out template))
@@ -91,11 +104,11 @@ namespace OpenRA.Graphics
if (r.Index >= template.Stride)
return missingTile;
var start = template.Variants > 1 ? random.Next(template.Variants) : 0;
var start = template.Variants > 1 ? variant.HasValue ? variant.Value : random.Next(template.Variants) : 0;
return template.Sprites[start * template.Stride + r.Index];
}
public Rectangle TemplateBounds(TerrainTemplateInfo template, Size tileSize, TileShape tileShape)
public Rectangle TemplateBounds(TerrainTemplateInfo template, Size tileSize, MapGridType mapGrid)
{
Rectangle? templateRect = null;
@@ -112,8 +125,8 @@ namespace OpenRA.Graphics
continue;
var sprite = TileSprite(tile);
var u = tileShape == TileShape.Rectangle ? x : (x - y) / 2f;
var v = tileShape == TileShape.Rectangle ? y : (x + y) / 2f;
var u = mapGrid == MapGridType.Rectangular ? x : (x - y) / 2f;
var v = mapGrid == MapGridType.Rectangular ? y : (x + y) / 2f;
var tl = new float2(u * tileSize.Width, (v - 0.5f * tileInfo.Height) * tileSize.Height) - 0.5f * sprite.Size;
var rect = new Rectangle((int)(tl.X + sprite.Offset.X), (int)(tl.Y + sprite.Offset.Y), (int)sprite.Size.X, (int)sprite.Size.Y);

View File

@@ -19,7 +19,7 @@ namespace OpenRA.Graphics
{
// yes, our channel order is nuts.
static readonly int[] ChannelMasks = { 2, 1, 0, 3 };
static readonly float[] ChannelSelect = { 0.75f, 0.25f, -0.25f, -0.75f };
static readonly float[] ChannelSelect = { 0.2f, 0.4f, 0.6f, 0.8f };
public static void FastCreateQuad(Vertex[] vertices, float2 o, Sprite r, float paletteTextureIndex, int nv, float2 size)
{
@@ -32,6 +32,8 @@ namespace OpenRA.Graphics
public static void FastCreateQuad(Vertex[] vertices, float2 a, float2 b, float2 c, float2 d, Sprite r, float paletteTextureIndex, int nv)
{
var attribC = ChannelSelect[(int)r.Channel];
if (r.Sheet.Type == SheetType.DualIndexed)
attribC *= -1;
vertices[nv] = new Vertex(a, r.Left, r.Top, paletteTextureIndex, attribC);
vertices[nv + 1] = new Vertex(b, r.Right, r.Top, paletteTextureIndex, attribC);
@@ -73,18 +75,37 @@ namespace OpenRA.Graphics
try
{
var data = dest.Sheet.GetData();
var dataStride = dest.Sheet.Size.Width * 4;
var x = dest.Bounds.Left * 4;
var width = dest.Bounds.Width * 4;
var y = dest.Bounds.Top;
var destData = dest.Sheet.GetData();
var destStride = dest.Sheet.Size.Width;
var width = dest.Bounds.Width;
var height = dest.Bounds.Height;
var bd = src.LockBits(src.Bounds(),
ImageLockMode.ReadWrite, src.PixelFormat);
for (var row = 0; row < height; row++)
Marshal.Copy(IntPtr.Add(bd.Scan0, row * bd.Stride), data, (y + row) * dataStride + x, width);
src.UnlockBits(bd);
var srcData = src.LockBits(src.Bounds(),
ImageLockMode.ReadWrite, PixelFormat.Format32bppArgb);
unsafe
{
var c = (int*)srcData.Scan0;
// Cast the data to an int array so we can copy the src data directly
fixed (byte* bd = &destData[0])
{
var data = (int*)bd;
var x = dest.Bounds.Left;
var y = dest.Bounds.Top;
for (var j = 0; j < height; j++)
{
for (var i = 0; i < width; i++)
{
var cc = Color.FromArgb(*(c + (j * srcData.Stride >> 2) + i));
data[(y + j) * destStride + x + i] = PremultiplyAlpha(cc).ToArgb();
}
}
}
}
src.UnlockBits(srcData);
}
finally
{
@@ -93,6 +114,26 @@ namespace OpenRA.Graphics
}
}
public static Color PremultiplyAlpha(Color c)
{
if (c.A == byte.MaxValue)
return c;
var a = c.A / 255f;
return Color.FromArgb(c.A, (byte)(c.R * a + 0.5f), (byte)(c.G * a + 0.5f), (byte)(c.B * a + 0.5f));
}
public static Color PremultipliedColorLerp(float t, Color c1, Color c2)
{
// Colors must be lerped in a non-multiplied color space
var a1 = 255f / c1.A;
var a2 = 255f / c2.A;
return PremultiplyAlpha(Color.FromArgb(
(int)(t * c2.A + (1 - t) * c1.A),
(int)((byte)(t * a2 * c2.R + 0.5f) + (1 - t) * (byte)(a1 * c1.R + 0.5f)),
(int)((byte)(t * a2 * c2.G + 0.5f) + (1 - t) * (byte)(a1 * c1.G + 0.5f)),
(int)((byte)(t * a2 * c2.B + 0.5f) + (1 - t) * (byte)(a1 * c1.B + 0.5f))));
}
public static float[] IdentityMatrix()
{
return Exts.MakeArray(16, j => (j % 5 == 0) ? 1.0f : 0);

View File

@@ -15,24 +15,19 @@ namespace OpenRA.Graphics
[StructLayout(LayoutKind.Sequential)]
public struct Vertex
{
// TODO Workaround for unused field warnings in mono 2.10
#pragma warning disable 414
float x, y, z, u, v;
float p, c;
#pragma warning restore
public readonly float X, Y, Z, U, V, P, C;
public Vertex(float2 xy, float u, float v, float p, float c)
{
this.x = xy.X; this.y = xy.Y; this.z = 0;
this.u = u; this.v = v;
this.p = p; this.c = c;
}
: this(xy.X, xy.Y, 0, u, v, p, c) { }
public Vertex(float[] xyz, float u, float v, float p, float c)
: this(xyz[0], xyz[1], xyz[2], u, v, p, c) { }
public Vertex(float x, float y, float z, float u, float v, float p, float c)
{
this.x = xyz[0]; this.y = xyz[1]; this.z = xyz[2];
this.u = u; this.v = v;
this.p = p; this.c = c;
X = x; Y = y; Z = z;
U = u; V = v;
P = p; C = c;
}
}
}

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