Commit Graph

166 Commits

Author SHA1 Message Date
teinarss
d60c05eff3 Change to use pattern matching 2021-03-27 17:29:20 +01:00
Matthias Mailänder
bbbed49f82 Add a lint check for cursor definitions. 2021-03-20 17:37:16 +01:00
abcdefg30
1d4891b017 Rename several MP traits 2020-12-31 12:09:56 +01:00
Paul Chote
2518a353af Add lint test for invalid map tiles. 2020-12-19 13:07:01 +01:00
abcdefg30
538623c835 Add a lint check for player counts 2020-10-24 10:09:22 +02:00
Paul Chote
7f7bce50dc Add dictionary support for ActorReference. 2020-09-15 09:27:50 +02:00
Paul Chote
94180f6a0a Add SequenceReference support for dictionaries. 2020-09-12 17:52:46 +02:00
Paul Chote
7803686aec Rewrite sequence linting / missing file handling.
- Distinguish between missing sequences and missing sprites
- Lint default sequences as well as maps
- Improved performance
- Correctly handle null images
2020-09-12 17:52:46 +02:00
Paul Chote
b985edbc29 Add ModData to ILintRulesPass.Run. 2020-09-12 17:52:46 +02:00
Paul Chote
ffdb3f86d7 Move mod-specific lint attributes to Mods.Common. 2020-09-12 17:52:46 +02:00
teinarss
27f1a7ab27 Use out var syntax 2020-08-19 18:11:07 +01:00
teinarss
19b02875c7 Use Tuple syntax 2020-08-15 10:37:10 +01:00
Matthias Mailänder
3a427c3630 Add a sequence reference attribute to label fallbacks. 2020-08-02 22:15:13 +02:00
Matthias Mailänder
336656e8f7 Remove superflous warning as null is a valid value here. 2020-08-02 22:15:13 +02:00
Andre Mohren
006a87692a Removed unused imports. 2020-07-28 18:22:51 +02:00
Paul Chote
c6c3a8c60d Make ActorPreview and EditorActorPreview wrap ActorReference. 2020-06-19 17:57:56 +02:00
Paul Chote
7c6ec577dc Rewrite ActorInit queries. 2020-05-28 19:04:53 +02:00
Paul Chote
86f61298e6 Replace ITraitInfo interface with TraitInfo class. 2020-05-21 13:01:04 +02:00
atlimit8
259c8d2c98 Merge ConditionManager trait directly into Actor 2020-05-09 15:46:11 +02:00
Mustafa Alperen Seki
5b34af0f12 Change all instances of ToLower() to ToLowerInvariant() 2020-04-17 17:01:42 -05:00
Paul Chote
73a78eadb1 Move Interactable and Selectable to Mods.Common. 2020-03-24 00:07:10 -05:00
Paul Chote
09a019f9c6 Add a lint check for LockFaction on mission players. 2020-02-16 20:51:29 +01:00
abcdefg30
23b3c237b7 Update the year numbers in all license headers to 2020 2020-01-05 17:00:34 +00:00
Paul Chote
fb075dc803 Improve linting of weapon and trait yaml removals. 2019-05-31 20:55:38 +02:00
abcdefg30
cadbd0d9ab Change the year number in all cs headers from 2018 to 2019 2019-01-26 23:15:21 +01:00
reaperrr
10e51db236 Remove hardcoded mpspawn owner lint check
Use RequiresSpecificOwner to enforce the owner
that owns the world instead.

Require 'Neutral' in the official mods accordingly.
2018-11-21 22:29:55 +00:00
reaperrr
fcb09d069b Add RequiresSpecificOwners trait
To enforce specific owners via Lint rules,
and possibly other means later.
This is for cases where accidentally setting an
unfitting owner via editor could cause issues.

Example: AI might try to attack Creeps-owned trees
and get stuck.
2018-11-21 22:29:55 +00:00
Andre Mohren
89051d40e8 Remove utf8 BOM. 2018-11-17 17:23:22 +00:00
Andre Mohren
b1a44086a0 Removed unused using directives. 2018-11-17 17:23:22 +00:00
Paul Chote
81d53a4f1a Improve error message for children of removals. 2018-11-03 17:36:40 +01:00
Paul Chote
f05e3e871f Fix crash when Inherits has child nodes. 2018-11-03 17:36:40 +01:00
Andre Mohren
640078a2b1 Refactored Health usage to IHealth. 2018-09-29 18:12:40 +02:00
Paul Chote
09d8aafddf Add a lint test for audio notifications.
Only traits are linted - the UI still hardcodes
too many audio references for this to be worthwhile.
2018-09-26 13:57:05 +02:00
Mustafa Alperen Seki
c14c7653bc Make Prerequisite Lint Check use ITechTreePrerequisiteInfo 2018-07-26 12:34:26 +01:00
reaperrr
1c78073808 Lint check for distinct sprite body names 2018-07-01 13:16:07 +02:00
Paul Chote
707514572b Fix crlfs in CheckUnknown*Fields lint tests. 2018-07-01 00:25:56 +02:00
Paul Chote
51a2ca8253 Add CheckUnknownWeaponFields lint check. 2018-06-30 17:12:19 +01:00
Paul Chote
0a5016c803 Add CheckUnknownTraitFields lint check. 2018-06-30 17:12:19 +01:00
Paul Chote
d46278ab0e Add ModData parameter to ILintMapPass. 2018-06-30 17:12:19 +01:00
Paul Chote
4d664d4f74 Report custom map rule errors in the lint output. 2018-06-15 23:39:48 +02:00
Paul Chote
df95b90de2 Remove CheckDeathTypes lint test.
This causes false positive errors when mods use
SpawnActorOnDeath to implement special-case death
effects.
2018-06-04 23:12:07 +02:00
reaperrr
d6e0598bd0 Fix Locomotor lint check
It was missing from the project file (oops...) and missing a check for duplicate Locomotor names.
2018-05-04 19:20:39 +02:00
reaperrr
a52e83ca49 Add Locomotor lint check 2018-05-03 10:49:21 +02:00
Peter Antal
d2ff5b49fd Allow each caller on MergeOrDefault to discard nodes.
Use filtering ActorInfo's to drop template actors.
2018-03-21 12:10:31 +01:00
RoosterDragon
5bd5a384b7 Use a BitSet for representing target types.
- Rename Bits<T> to BitSet<T>.
- Implement set based helpers for BitSet<T>.
- When representing TargetTypes of ITargetable in various traits, use a BitSet<TargetableType> instead of HashSet<string> for better performance & reduced memory usage.
- Fix FieldLoader to trim input values when generating a BitSet<T>.
- Require T in BitSet<T> and BitSetAllocator<T> to be a class since it's just a marker value. This allows the JIT to instantiate generic code for these classes once, as they don't benefit from specialized code for T. (Typically JITs will generate shared code for all reference types, and unique code for every value type encountered).
2018-03-21 12:07:44 +01:00
Arular101
8a60918841 Update copyright notice year to 2018 2018-01-17 00:47:34 +01:00
RoosterDragon
c8c7629bce Convert some stray spaces to tabs. 2017-12-16 15:53:03 +00:00
Paul Chote
55b6084b60 Add a lint test for conflicting Interactable and Selectable. 2017-12-11 19:45:07 +01:00
RoosterDragon
5338784e45 Fix bad uses of FirstEnabledTraitOrDefault on TraitInfos.
These are not traits so this method does not work. We can use EnabledByDefault on the ConditionalTraitInfo instead.
2017-12-10 13:39:24 +00:00
RoosterDragon
7a7eed4fb7 Add FirstEnabledTraitOrDefault helper method.
This avoids the allocations caused by LINQ when using traits.FirstOrDefault(Exts.IsTraitEnabled). This is important in FrozenActorLayer.RefreshState which is called very often. We apply the new helper method to all areas using the old pattern. An overload that takes an array allows arrays to be enumerated without causing allocations.
2017-12-10 13:39:24 +00:00