Commit Graph

4330 Commits

Author SHA1 Message Date
Paul Chote
4f0aa89c01 Remove TileSet.Palette and PaletteFromCurrentTileset. 2018-04-08 21:14:29 +02:00
Joe Alam
7221c29d9b Added text selection and copy support to TextFieldWidget.
Use Shift and navigation key (cursor, home, end) to select a portion of
text, and replace/delete/cut as appropriate.
Also provides support for selection with mouse (click and drag)
2018-04-08 19:24:22 +02:00
Zimmermann Gyula
b5893d4c6d Implement GrantExternalConditionToCrusher. 2018-04-08 19:04:05 +02:00
Michael Silber
1b110b7833 Add Replaceable and Replacement traits to support wall overrides. 2018-04-07 23:32:24 +02:00
reaperrr
0c52ff3ae5 Cache TargetablePositions in Actor
To speed up Target.Positions.
2018-04-07 17:24:13 +01:00
reaperrr
4c16e51f92 Add EditorPlayer to all mods
To prevent the editor from loading unnecessary or even incompatible
player traits.
2018-04-06 20:46:47 +02:00
reaperrr
563c8ad302 HarvManager update rule 2018-04-06 20:16:36 +02:00
reaperrr
4f651c2f88 Remove HarvesterInfo look-up from HackyAI 2018-04-06 20:16:36 +02:00
reaperrr
5276636598 Extract a HarvesterManager from HackyAI
This takes action when AI harvesters don't find ore near the base or became idle for some other reason.
2018-04-06 20:16:36 +02:00
reaperrr
82867b6c3a Move some stuff from HackyAI to new AIUtils 2018-04-06 20:16:36 +02:00
RoosterDragon
c9b19ffe52 Prevent attack move crashing if selected actors die.
- Cancel attack move if all actors die.
- Command bar no longer shows available actions from any dead units.
2018-04-04 18:30:47 +02:00
Paul Chote
7be71eb381 Remove broken Server.ExternalPort setting. 2018-03-31 18:09:07 +02:00
IceReaper
12407ae995 Fix asset browser displaying wrong file
If multiple files with same filename are present.
2018-03-31 16:08:35 +02:00
Kanar
dc46dd1f26 Re-active Edge-Scrolling for inverted Mouse-Scrolling 2018-03-30 23:47:32 +01:00
Paul Chote
2400b152ea Process shared map includes as part of the mod rules.
This ensures that they are only updated once instead
of repeating the updates for every map that includes them.
2018-03-30 21:31:15 +02:00
Paul Chote
02f769964e Fix a crash in UpdateMapCommand. 2018-03-30 21:31:15 +02:00
Paul Chote
aa5b9401c3 Add Chrome update plumbing. 2018-03-30 17:35:30 +02:00
abcdefg30
910064dfe5 Fix FormatMessageList appending a new line at the end of the list 2018-03-30 12:57:18 +01:00
abcdefg30
207a355909 Fix map files being labeled as "<no filename available>" 2018-03-30 12:57:18 +01:00
abcdefg30
13b89b1c50 Add IgnoreAbstractActors.cs 2018-03-30 12:57:18 +01:00
abcdefg30
972255c6a6 Fix line endings in upgrade rules files
- Use unix line endings
- No "\n" at the end of a message
2018-03-30 12:57:18 +01:00
abcdefg30
d15b462350 Remove the deprecated Difficulty member from MapGlobal (lua) 2018-03-23 20:23:09 +01:00
Paul Chote
ea68f1abb9 Implement new mod/map updater framework. 2018-03-23 20:04:52 +01:00
Thomas Ze
7552afeb16 Fix ActorMap.RemoveInfluenceInner see #14939 (RemoveInfluenceInner(influenceNode.Next.Next) call on influenceNode.Actor == toRemove) 2018-03-23 04:43:03 -03:00
reaperrr
3069bbfa7d Fix infinite loop in HeliReturnToBase
This can happen if HeliAttack tells the heli to return to base when the player doesn't have any of the RearmBuildings available, because the activity queues itself after the HRTB, and the latter will, after a forced land, then queue back HeliAttack, which then immediately queues back HRTB and so on.

Instead, we now assume that if there is no base to return to, going to NextActivity is pointless and don't queue NextActivity.
RTB was likely ordered by HeliAttack due to lack of ammo, so resuming the attack would be pointless.
2018-03-22 22:50:50 +01:00
Paul Chote
d79d4479c7 Work around AI orders to invalid cells. 2018-03-22 13:52:41 +01:00
Paul Chote
7e94fa8c8a Fix multi-turreted actors not appearing in the map editor. 2018-03-22 12:21:34 +01:00
Michael Silber
6b24271a17 Pass ActorInfo through building-placement-validation code. 2018-03-21 12:53:50 +01:00
Paul Chote
8ea1da1046 Apply map upgrade rules without instantiating the Map object.
This avoids a crash that stops the maps from being updated
when the base mod ruleset is not valid (e.g. a trait is missing a
FieldLoader.Required property).  This also significantly improves the
upgrade performance.
2018-03-21 12:15:23 +01: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
e17ede34ef Add Int32Matrix4x4 struct.
This allows matrices to be represented as a value type, and additionally allows avoiding array allocations when calculating rotations.
2018-03-21 12:07:53 +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
reaperrr
f351f0346f Cache map option ShortGame at game load
To reduce MapOptions calls.
2018-03-21 01:49:52 -03:00
RoosterDragon
0555ce9321 Reduce allocations in AutoTarget.ChooseTarget.
- Cache active target query.
- Prefer .Count == 0 over Any when working with Lists.
- Use helper for GetEnabledTargetTypes.
- Don't declare target variable until actually needed.
2018-03-21 01:08:59 -03:00
RoosterDragon
986025ca76 Reuse HashSets for actors entered/exited in CellTrigger & ProximityTrigger.
Actors involved in the trigger are determined as actors move around near the trigger - and can be expensive in some maps. This allows us to avoid allocating new sets and the CPU hit required to set it up each time.
2018-03-21 01:01:48 -03:00
Mustafa Alperen Seki
9122aac555 Fix rendering of IProductionIconOverlay on Spec UI 2018-03-19 23:11:48 +01:00
Paul Chote
27d9a9e6ff Remove pre-20171014 upgrade rules. 2018-03-19 15:00:41 +01:00
David Wilson
9bc9ce4577 Color picker update with team color presets. Bots added will use available team color presets by default 2018-03-18 23:29:47 -03:00
RoosterDragon
d2f2029caf Add FirstNonEmptyBounds method for IDecorationBounds interface.
This provides a more efficient way of determining the bounds by avoiding LINQ. A helper that works directly on arrays prevents allocation of an enumerator when the collection is know to be an array.
2018-03-18 22:06:12 +01:00
RoosterDragon
b4609337f8 Reuse a HashSet for deduplicating footprints in AffectsShroud.
Shroud footprints are recalculated as actors move around the map, and thus this gets called quite often. This allows us to avoid allocating a new set and the CPU hit required to set it up each time.
2018-03-18 16:46:07 +01:00
RoosterDragon
63810220e4 Improve some usages of Aggregate. 2018-03-18 16:44:17 +01:00
RoosterDragon
adc4538c44 Prevent crash when invalid or not yet created LAN games are discovered. 2018-03-18 16:23:06 +01:00
RoosterDragon
f47595b780 Hide map preview when no replay is selected.
This prevents interaction with the widget than can cause crashes as no replay is selected yet.
2018-03-18 16:06:27 +01:00
Mustafa Alperen Seki
356f24b78c Add logic to disallowing On Hold on a queue. 2018-03-18 15:58:57 +01:00
Paul Chote
be96bafc69 Match missions using the unresolved path. 2018-03-11 16:32:10 +01:00
DESKTOP-7PLKRFC\jur_1
311cd521e3 Refinery spawned harvesters should prioritize lower ore #14827 2018-03-11 00:50:55 +01:00
xecollons
227cf35d5f Added TooltipDescription 2018-03-10 17:55:05 +01:00
Peter Antal
3ce2417a06 Create SupportDirPrefix and IsPathRelativeToSupportDirectory() as members on Platform class. 2018-03-10 12:54:01 +00:00
reaperrr
fd83cbf60f Fix WithTurretAimAnimation disabled handling
The old sequence was not recovering when this trait lost its required
condition while the aim anim was running.

Now it doesn't unconditionally return, but instead checks what the
current sequence is and resets to base turret sequence if AimAnim is
disabled.
2018-03-10 00:13:42 +01:00
Mustafa Alperen Seki
1d8b1906ef Add IsPlayerPalette support to WithDecoration 2018-03-10 00:12:56 +01:00