Commit Graph

526 Commits

Author SHA1 Message Date
ScottNZ
831b9b3ca3 Remove some stray semicolons 2014-06-15 22:14:39 +12:00
ScottNZ
6b85660d7d Compact lambda expressions in some (not all) places 2014-06-15 22:14:38 +12:00
ScottNZ
91bc1acca3 Fixed selectedAuthor in ModBrowserLogic not being the correct value if mod.Author is null 2014-06-15 22:14:37 +12:00
Paul Chote
c58d737400 Merge pull request #5597 from Happy0/mouse_window_focus
Removing requirement to restart game after applying changes to mouse focus option
2014-06-14 17:30:02 +12:00
Pavlos Touboulidis
db53f8e648 Add developer shortcut to reload chrome files
Hitting Ctrl+Shift+C will re-initialize the chrome provider,
reloading all chrome files instantly. Useful when changing the
UI.

Note: A new "RootWidget" was created to trap top-level (global)
shortcuts instead of putting everything in Widget.
2014-06-13 11:31:09 +03:00
Gordon Martin
89c9499909 Removing requirement to restart game after applying changes to mouse focus option. The setting now defaults to 'false' as it is likely to be disruptive to players who are used to the usual behaviour in windowed mode. 2014-06-12 22:57:25 +01:00
Paul Chote
f6f366c4b3 Merge pull request #5401 from RoosterDragon/nodesdict
Changed MiniYaml.NodesDict property into a method.
2014-06-12 17:34:59 +12:00
RoosterDragon
9dbbc23967 Make map preview generation fast.
- Change Map.LoadMapTiles and Map.LoadResourceTiles to read the whole stream into memory before processing individual bytes. This removes the cost of significant overhead from repeated calls to ReadUInt8/16.
- Remove significant UI jank caused by the map chooser by not including the placeholder widget. The maps render fast enough that it is no longer worthwhile and it was causing a lot of flushes which were the source of the jank.
- Trigger async generation for all maps when the chooser is loaded. This means in practice all previews will be ready by the time the user begins to scroll the selection. Since generation is fast, there is no issue with scrolling straight to the bottom and having to wait for the backlog to clear.
2014-06-10 11:46:39 +01:00
Gordon Martin
5eab479c34 Adding SDL2 window grab on loading the game. Made this behaviour configurable in the 'Input' tab of the Settings menu
Updated settings file for TD to expose the new 'Lock mouse to window' display configuration option

A text label notes that modifying the 'Lock mouse' check box requires a restart
2014-06-09 19:10:05 +01:00
RoosterDragon
2e992a7310 Changed MiniYaml.NodesDict property into a method.
Method is now called ToDictionary.
- Cached a few invocations into locals which should prevent some redundant evaluation.
- Added ToDictionary overloads that take projection functions for the keys and elements, since several callsites were doing a subsequent Linq.ToDictionary call to get this.
2014-06-09 17:06:42 +01:00
RoosterDragon
0c8bdff5be Formatting fixes.
Spaces to tabs, indents, etc.
2014-05-26 18:10:59 +01:00
Chris Forbes
5eb61dbdd2 Merge pull request #5411 from RoosterDragon/general-clean
General Cleanup
2014-05-25 11:03:03 +12:00
Matthias Mailänder
ca0fe59c41 make sure replays is always initialized
fixes #5431
2014-05-24 17:10:13 +02:00
Paul Chote
932765d0c4 Adjust news dialog layout. 2014-05-24 20:08:48 +12:00
RoosterDragon
b733465f33 General uncontroversial cleanup:
- Made private methods static where possible (runtime can elide checking the object for null).
- Declared attribute classes as sealed (allows reflection on attributes to complete faster).
- Moved some static cctor's into field initializers (static cctor's are slower than static field initializers).
- Made classes static if they contained only static methods (can't create instances of useless objects).
- Use inferable Exts.Lazy and not new Lazy<T>().
- Added required STAThread attribute to CrashDialog.
- Removed unused parameters in private methods.
- Added Serializable attribute to exceptions.
- Added parameter name in calls to ArgumentNullException.
- Use of as operator instead of is + cast.
- Changed (x as Foo).Bar anti-pattern into ((Foo)x).Bar. Results in sensible cast exceptions on error rather than null dereferences.
- Removed unused method in NullShader.
2014-05-23 15:50:54 +01:00
Squiggles211
7e2599c898 Fixes #5394 Spawnpoint dropdown count
Fixes where the spawn point dropdown would show the same number of spawn
points as the number of players rather than the actual number of
available spawn points.
2014-05-23 02:14:16 -05:00
Pavlos Touboulidis
b8bbd55598 Misc changes
* Use Pair instead of KeyValuePair
* double -> var
* Butcher XML comments
* Change WinState default to Undefined and use it instead of the new GameOutcome
* Other changes
2014-05-22 21:57:07 +03:00
Pavlos Touboulidis
f4c52eefae Change date labels
Change "Last Week" to "Last 7 days" and "Last Month" to "Last 30 days".
Also added a "Last 14 days" option.
2014-05-22 21:54:15 +03:00
Pavlos Touboulidis
de0a5ebd43 Improve replay metadata and the replay browser
List of changes:

* Better and more filters with new layout, for both mods.

* Rename/Delete/Detele all functionality.

* Simplified ReplayMetadata class considerably by introducing a new
GameInformation data object. The new GameInformation class contains
more information than previously available so the new solution is not
compatible with old replays, meaning it can't read old replays.

* Better and cleaner game information gathering in order to be written
at the end of the replay file.

* Revert changes to ReplayConnection, no longer necessary.

* Better exception message on missing sprites and fonts.

* New "SpawnOccupant" class that holds all the information needed by the
MapPreviewWidget to visualize a spawn point. It was using Session.Client
before and it was necessary to separate it to be able to show information
not available at lobby time.

* Fix keyboard focus UI bug when closing a window would not remove focus.
2014-05-22 21:54:14 +03:00
Pavlos Touboulidis
ce8c42b552 Style & nit fixes 2014-05-22 21:54:14 +03:00
Pavlos Touboulidis
a80c4f086a Add filters to the replay browser dialog
This closes issue #2152. The filters added are:

* Game type (singleplayer / multiplayer)
* Date
* Duration
* Outcome
* Player name

Other changes:

* Added a 'CollapseHiddenChildren' option to the ScrollPanelWidget to
make hidden children take up no space.
* Removed the extension (.rep) from the replay filenames in the
replay browser.
2014-05-22 21:54:14 +03:00
Pavlos Touboulidis
98a05b61b3 Add metadata block to replays
The replay files are just streams all network communication so to
get any info out of them it is necessary to play back the stream
until the wanted information is reached.

This introduces a new metadata block placed at the end of the
replay files and logic to read the new block, or fall back to
playing back the stream for older files.

The replay browser is also updated to use the metadata information
instead of reading the replay stream directly.
2014-05-22 21:54:14 +03:00
Matthias Mailänder
e80eb7e0ee Merge pull request #5353 from pchote/map-validation
Disable maps with invalid rules
2014-05-22 09:55:06 +02:00
Paul Chote
72095c7fef Merge pull request #5280 from WolfGaming/techleveltraits
TechTreeTrait system has been made
2014-05-20 12:35:26 +12:00
Matthias Mailänder
111fcdb86e Merge pull request #5354 from pchote/fading
Add TD fade to/from black behavior to other mods.
2014-05-19 08:11:44 +02:00
WolfGaming
00698cefff Added in code for Tech Levels using prereqs
and fixed up some kinks of the old system
2014-05-19 03:29:25 +00:00
Paul Chote
cfdbc06a31 Add fade in/out effects to RA and TS.
The palette effect interacts badly with the multiplicative blending in D2K.
2014-05-19 10:32:51 +12:00
Paul Chote
05eb56b1e2 Simplify MenuPaletteEffect activation. 2014-05-19 10:24:09 +12:00
Matthias Mailänder
187362e80e rename OpenRA.Support.Random aka XRandom to MersenneTwister 2014-05-18 21:53:21 +02:00
Paul Chote
69e87b0057 Disable maps with broken rules in the lobby. Fixes #4334. 2014-05-18 17:41:36 +12:00
Squiggles211
5a60dc6a56 Fixes crash when joining multiplayer lobby
Fixes crash when joining a multiplayer lobby caused by recent spawn
choice changes.
2014-05-17 23:37:54 -05:00
Pavlos Touboulidis
e0628b5f24 Change IngameChatLogic & MusicPlayerLogic to use the mod's rules, not the map's 2014-05-17 14:33:17 +03:00
Pavlos Touboulidis
49ec533481 Better distinction between Widgets using the mod's DefaultRules or the map's Rules 2014-05-17 14:33:16 +03:00
Pavlos Touboulidis
d9db1c1854 Revert replacing generic Ui.OpenWindow with static method in MusicPlayerLogic 2014-05-17 14:33:16 +03:00
Pavlos Touboulidis
10b8093d5a Rename ModInformation to ModMetadata 2014-05-17 14:33:16 +03:00
Pavlos Touboulidis
44c01bbaa2 Remove TileSetData and separate TileSet from Sequences 2014-05-17 14:33:16 +03:00
Pavlos Touboulidis
750fc4e02c Merge ModRuleset and MapRuleset into Ruleset 2014-05-17 14:33:16 +03:00
Pavlos Touboulidis
63ec6d60e7 Refactoring to remove static Rules & SequenceProvider 2014-05-17 14:32:03 +03:00
Paul Chote
0458b932a0 Merge pull request #5115 from Mailaender/split-lobby-sync
Splitted LobbyInfo updates into smaller chunks
2014-05-17 18:37:36 +12:00
Paul Chote
28c0310357 Merge pull request #5192 from matija-hustic/spawnchoice
Spawnchoice
2014-05-17 17:53:00 +12:00
Saticmotion
1bf3f3e03e The engine now uses the SDL2.0 scroll events properly.
Scroll speed is now a user preference.
2014-05-16 13:56:22 +02:00
matija-hustic
6eac7a3e05 Smaller spawns+letters. Map dialog width. Unavailable spawns disabled. 2014-05-16 11:23:23 +01:00
Matthias Mailänder
f68a6bbd76 split latency from Client into ClientPing
closes #4282
2014-05-15 10:04:21 +02:00
Paul Chote
14df5a3bc3 Merge pull request #5279 from ScottNZ/news
Add news
2014-05-15 00:20:35 +12:00
ScottNZ
c7d8024522 Add a news panel to each mod 2014-05-14 23:51:41 +12:00
Pavlos Touboulidis
03a5be4f0d Fixes #3036
See also #5149, #5191
2014-05-13 23:08:00 +03:00
Paul Chote
b4298982a0 Merge pull request #5262 from Mailaender/parse-invariant-culture
Added checks for NumberFormatInfo.InvariantInfo everywhere
2014-05-14 00:20:35 +12:00
Matthias Mailänder
59ace5d01b new shorthand Exts.(Try)ParseIntegerInvariant 2014-05-13 14:16:41 +02:00
Chicken man
fa4b157b42 Added ConsoleCommand, and an example to go with it 2014-05-12 16:30:53 -04:00
Matthias Mailänder
1124d55224 OpenRA.Thirdparty is now OpenRA.Support 2014-05-09 10:04:16 +02:00