Commit Graph

42 Commits

Author SHA1 Message Date
Paul Chote
430429f337 Fix WRot FieldLoader parsing. 2017-05-14 11:52:42 +01:00
atlimit8
b0187dd646 Added (Boolean|Integer)Expression subclasses of VariableExpression 2017-04-11 02:52:54 -05:00
atlimit8
e73d3922dd Rename ConditionExpression => VariableExpression 2017-04-11 01:26:38 -05:00
atlimit8
d83dae5587 Rename BooleanExpression => ConditionExpression 2017-02-22 08:54:50 -06:00
Paul Chote
27cd31879f Add FieldLoader.AllowEmptyEntries attribute. 2017-01-30 18:22:44 +00:00
Taryn Hill
43317e0f5d Update copyright notice year to 2017 2016-12-31 23:46:13 -06:00
Paul Chote
1cc7944437 Add FieldLoader and linter support for BooleanExpression. 2016-11-19 17:19:25 +00:00
Paul Chote
a8dda39a72 Introduce float3 type. 2016-04-10 09:41:01 -04:00
Paul Chote
e71225496b Clarify GPL version. 2016-02-21 16:30:48 +00:00
Paul Chote
b396965fd9 Update licence header year. 2016-02-21 16:27:31 +00:00
Paul Chote
8ade035049 Add support for loading CVec[] from yaml. 2016-01-25 09:14:00 +01:00
RoosterDragon
5f13fa0343 Fix serialization of custom exceptions. 2016-01-01 04:51:55 +00:00
RoosterDragon
bfe1804bf6 Fix some spellings. 2015-11-27 16:19:59 +00:00
atlimit8
dac15edce5 Load rgb[a] hex colors from MiniYaml (+ Lua) 2015-10-27 16:09:48 -05:00
atlimit8
079cff0a7a IRulesetLoaded Warhead support and better error messages. 2015-10-02 13:40:21 -05: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
RoosterDragon
5a177a889c Add ability to load and save HashSets. 2015-08-27 21:48:09 +01:00
RoosterDragon
410b97823a Ensure our array handling only accepts single dimensional arrays. 2015-08-27 21:31:24 +01:00
atlimit8
7881ff40bf Added FieldLoader.SerializeAttribute.Required to require fields in MiniYaml 2015-07-12 12:44:22 -05:00
Matthias Mailänder
7447e0bf93 rename WRange to WDist 2015-07-09 10:55:38 +02:00
Matthias Mailänder
aab6d6d170 add addititional value null checks 2015-07-05 08:47:05 +02:00
Matthias Mailänder
10d76da61b fix a null reference exception 2015-07-04 09:43:31 +02:00
Matthias Mailänder
2763e26d23 add a take screenshot hotkey 2015-06-27 16:29:33 +02:00
RoosterDragon
d2d2f4a838 Made FieldLoader thread-safe, and cache some expensive reflection calls. 2015-04-25 18:55:46 +01:00
abcdefg30
8ca61aa917 Updated all year numbers 2015-01-09 21:18:05 +01:00
RoosterDragon
a6cda967c2 Formatted all files.
Automatically formatted all files via VS. This generally corrects indentation, removes trailing whitespace and corrects misplaced tabs or spaces. Manually tweaked a few files where required.
2015-01-06 21:28:50 +00:00
Matthias Mailänder
44cd174a8d StyleCop clean OpenRA.Game 2015-01-03 19:00:48 +01:00
Hellhake
5a97a4b63b Fix StyleCop warnings in OpenRA.Game 2015-01-02 12:11:01 +01:00
Paul Chote
118275b376 Add terrain geometry visualisation. 2014-11-07 19:18:34 +13:00
UberWaffe
c972b39687 Custom Warheads refactor
Changes included:

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

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

Custom warheads have to define their own impact functions,
and can also define their own replacement for check
functions.
2014-08-03 17:10:44 +02:00
atlimit8
d79ab8070d Added the abiltity to load WVec[] from MiniYaml 2014-07-30 14:34:28 -05:00
Pavlos Touboulidis
dcb7a44aa2 Use available TypeConverters to serialize and deserialize types 2014-07-12 04:46:45 +03:00
Pavlos Touboulidis
e9dd0b0fab Make FieldLoader/FieldSaver able to work with private fields
* Unify the FieldLoader-related attributes (Ignore, LoadUsing,
FieldFromYamlKey) into a new 'Serialize' attribute. Keep the
previous attributes as shortcuts/aliases to the new attribute.

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

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

* Updated the traits documentation exporter to write the yaml
name if it has been overriden.
2014-07-12 04:33:36 +03:00
ScottNZ
90894aa03e Use var everywhere 2014-06-15 22:17:34 +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
ScottNZ
c7d8024522 Add a news panel to each mod 2014-05-14 23:51:41 +12:00
Matthias Mailänder
59ace5d01b new shorthand Exts.(Try)ParseIntegerInvariant 2014-05-13 14:16:41 +02:00
Matthias Mailänder
b19d286f56 parse with NumberFormatInfo.InvariantInfo everywhere
closes #5240
2014-05-06 18:31:48 +02:00
Taryn
e828541dc9 Allow multiple enum values to be parsed from yaml with the same syntax as a string[]. 2014-04-30 07:15:09 -05:00
Paul Chote
4935266945 Merge FileFormats dll into Game and reorganise namespaces. 2014-04-17 01:20:47 +12:00