Handle losing fixed design state better.

This commit is contained in:
Ottermandias 2023-07-16 02:45:47 +02:00
parent 0d8ccd43b7
commit 58b867bd1e
5 changed files with 78 additions and 52 deletions

View file

@ -77,4 +77,13 @@ public class ActorState
public ref StateChanged.Source this[MetaIndex index]
=> ref _sources[(int)index];
public void RemoveFixedDesignSources()
{
for (var i = 0; i < _sources.Length; ++i)
{
if (_sources[i] is StateChanged.Source.Fixed)
_sources[i] = StateChanged.Source.Manual;
}
}
}