forked from aly/qstbak
muffin v7.5.6
This commit is contained in:
parent
6266f9e6b7
commit
addf2d530f
619 changed files with 264792 additions and 446022 deletions
|
|
@ -1,5 +1,9 @@
|
|||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics;
|
||||
using System.Linq;
|
||||
using System.Runtime.CompilerServices;
|
||||
using Questionable.Data;
|
||||
using Questionable.Model;
|
||||
using Questionable.Model.Questing;
|
||||
|
|
@ -8,6 +12,297 @@ namespace Questionable.Validation.Validators;
|
|||
|
||||
internal sealed class SinglePlayerInstanceValidator : IQuestValidator
|
||||
{
|
||||
[CompilerGenerated]
|
||||
private sealed class _003C_003Ec__DisplayClass2_0
|
||||
{
|
||||
public byte index;
|
||||
|
||||
internal bool _003CValidate_003Eb__0((QuestSequence Sequence, int StepId, QuestStep Step) x)
|
||||
{
|
||||
int num = ((_202B_200B_200C_200C_202D_202A_202E_200B_202B_202C_202B_202C_200D_200E_200B_202E_206E_206C_200B_200C_206A_202E_200F_206D_200F_202D_202B_202E_206A_200D_202A_206D_206F_206C_206D_202E_202E_206B_200C_202E(x.Step) != EInteractionType.SinglePlayerDuty) ? 393057114 : 393057113);
|
||||
while (true)
|
||||
{
|
||||
int num2 = num;
|
||||
int num3 = 393057115;
|
||||
int num4 = num2;
|
||||
int num5 = num4 + num3;
|
||||
int num6 = num4 & num3;
|
||||
switch (num5 - (num6 + num6))
|
||||
{
|
||||
case 0:
|
||||
goto IL_004f;
|
||||
case 1:
|
||||
return false;
|
||||
case 2:
|
||||
return _202C_206E_206C_206F_206F_206A_202D_206C_206D_200E_200F_202A_202A_200D_206D_206E_202D_202C_202D_206D_202D_206A_200E_202B_206B_202C_200F_202B_202E_200D_206C_200E_202E_202C_206B_202D_206D_200B_202D_202E(x.Step) == index;
|
||||
}
|
||||
continue;
|
||||
IL_004f:
|
||||
num = 393057113;
|
||||
}
|
||||
}
|
||||
|
||||
static EInteractionType _202B_200B_200C_200C_202D_202A_202E_200B_202B_202C_202B_202C_200D_200E_200B_202E_206E_206C_200B_200C_206A_202E_200F_206D_200F_202D_202B_202E_206A_200D_202A_206D_206F_206C_206D_202E_202E_206B_200C_202E(QuestStep P_0)
|
||||
{
|
||||
return P_0.InteractionType;
|
||||
}
|
||||
|
||||
static byte _202C_206E_206C_206F_206F_206A_202D_206C_206D_200E_200F_202A_202A_200D_206D_206E_202D_202C_202D_206D_202D_206A_200E_202B_206B_202C_200F_202B_202E_200D_206C_200E_202E_202C_206B_202D_206D_200B_202D_202E(QuestStep P_0)
|
||||
{
|
||||
return P_0.SinglePlayerDutyIndex;
|
||||
}
|
||||
}
|
||||
|
||||
[CompilerGenerated]
|
||||
private sealed class _003CValidate_003Ed__2 : IEnumerable<ValidationIssue>, IEnumerable, IEnumerator<ValidationIssue>, IEnumerator, IDisposable
|
||||
{
|
||||
private int _003C_003E1__state;
|
||||
|
||||
private ValidationIssue _003C_003E2__current;
|
||||
|
||||
private int _003C_003El__initialThreadId;
|
||||
|
||||
public SinglePlayerInstanceValidator _003C_003E4__this;
|
||||
|
||||
private Quest quest;
|
||||
|
||||
public Quest _003C_003E3__quest;
|
||||
|
||||
private List<byte>.Enumerator _003C_003E7__wrap1;
|
||||
|
||||
ValidationIssue IEnumerator<ValidationIssue>.Current
|
||||
{
|
||||
[DebuggerHidden]
|
||||
get
|
||||
{
|
||||
return _003C_003E2__current;
|
||||
}
|
||||
}
|
||||
|
||||
object IEnumerator.Current
|
||||
{
|
||||
[DebuggerHidden]
|
||||
get
|
||||
{
|
||||
return _003C_003E2__current;
|
||||
}
|
||||
}
|
||||
|
||||
[DebuggerHidden]
|
||||
public _003CValidate_003Ed__2(int _003C_003E1__state)
|
||||
{
|
||||
this._003C_003E1__state = _003C_003E1__state;
|
||||
_003C_003El__initialThreadId = _202E_202B_206A_200E_206D_206E_206E_206E_202B_200F_206B_200F_202E_200C_206B_202B_200B_206C_206E_206C_200D_202C_206C_206C_200D_202A_202E_202E_202A_206B_202B_206E_202D_200C_206A_206C_206B_202A_202C_206A_202E();
|
||||
}
|
||||
|
||||
[DebuggerHidden]
|
||||
void IDisposable.Dispose()
|
||||
{
|
||||
int num = _003C_003E1__state;
|
||||
int num2 = ((num == -3) ? (-1938689052) : (-1938689051));
|
||||
while (true)
|
||||
{
|
||||
int num3 = num2;
|
||||
int num4 = -1938689052;
|
||||
int num5 = num3;
|
||||
int num6 = num5 + num4;
|
||||
int num7 = num5 & num4;
|
||||
switch (num6 - (num7 + num7))
|
||||
{
|
||||
default:
|
||||
continue;
|
||||
case 2:
|
||||
num2 = -1938689051;
|
||||
continue;
|
||||
case 1:
|
||||
if (num == 1)
|
||||
{
|
||||
num2 = -1938689052;
|
||||
continue;
|
||||
}
|
||||
break;
|
||||
case 0:
|
||||
try
|
||||
{
|
||||
}
|
||||
finally
|
||||
{
|
||||
_003C_003Em__Finally1();
|
||||
}
|
||||
break;
|
||||
}
|
||||
break;
|
||||
}
|
||||
_003C_003E7__wrap1 = default(List<byte>.Enumerator);
|
||||
_003C_003E1__state = -2;
|
||||
}
|
||||
|
||||
[MethodImpl(MethodImplOptions.NoInlining)]
|
||||
private bool MoveNext()
|
||||
{
|
||||
try
|
||||
{
|
||||
int num = _003C_003E1__state;
|
||||
SinglePlayerInstanceValidator singlePlayerInstanceValidator = _003C_003E4__this;
|
||||
int num2 = ((num == 0) ? (-217172285) : (-217172288));
|
||||
List<byte> value = default(List<byte>);
|
||||
_003C_003Ec__DisplayClass2_0 _003C_003Ec__DisplayClass2_ = default(_003C_003Ec__DisplayClass2_0);
|
||||
while (true)
|
||||
{
|
||||
int num3 = num2;
|
||||
int num4 = -217172283;
|
||||
int num5 = num3;
|
||||
int num6 = num5 + num4;
|
||||
int num7 = num5 & num4;
|
||||
switch (num6 - (num7 + num7))
|
||||
{
|
||||
case 8:
|
||||
num2 = (_003C_003E7__wrap1.MoveNext() ? (-217172286) : (-217172283));
|
||||
break;
|
||||
case 9:
|
||||
_003C_003E7__wrap1 = value.GetEnumerator();
|
||||
_003C_003E1__state = -3;
|
||||
num2 = -217172275;
|
||||
break;
|
||||
case 1:
|
||||
return false;
|
||||
case 7:
|
||||
_003C_003Ec__DisplayClass2_ = new _003C_003Ec__DisplayClass2_0
|
||||
{
|
||||
index = _003C_003E7__wrap1.Current
|
||||
};
|
||||
num2 = (quest.AllSteps().Any(_003C_003Ec__DisplayClass2_._003CValidate_003Eb__0) ? (-217172275) : (-217172281));
|
||||
break;
|
||||
case 6:
|
||||
_003C_003E1__state = -1;
|
||||
num2 = ((!singlePlayerInstanceValidator._questIdToDutyIndexes.TryGetValue(quest.Id, out value)) ? (-217172273) : (-217172276));
|
||||
break;
|
||||
case 0:
|
||||
_003C_003Em__Finally1();
|
||||
_003C_003E7__wrap1 = default(List<byte>.Enumerator);
|
||||
num2 = -217172273;
|
||||
break;
|
||||
case 3:
|
||||
_003C_003E1__state = -3;
|
||||
num2 = -217172275;
|
||||
break;
|
||||
case 4:
|
||||
num2 = -217172288;
|
||||
break;
|
||||
case 2:
|
||||
{
|
||||
ValidationIssue obj = new ValidationIssue
|
||||
{
|
||||
PathType = EPathType.Quest,
|
||||
Id = _202D_206F_206C_206D_202C_200D_202E_206A_206D_206F_200C_202C_206D_202E_202A_200E_200F_202A_206A_200C_200C_202C_200D_200C_206B_206F_202E_200F_206A_200D_202E_206B_206F_200E_206D_202E_202D_200C_206F_200D_202E((object)quest.Id),
|
||||
Location = null,
|
||||
Type = EIssueType.UnusedSinglePlayerInstance,
|
||||
Severity = EIssueSeverity.Error
|
||||
};
|
||||
DefaultInterpolatedStringHandler defaultInterpolatedStringHandler = new DefaultInterpolatedStringHandler(32, 1);
|
||||
defaultInterpolatedStringHandler.AppendLiteral(global::_003CModule_003E._200B_206B_206B_200E_200B_206A_206D_206B_206E_200F_206A_206F_206E_202B_200F_206C_202B_206D_206E_200F_200C_200E_206F_200D_200F_200B_202B_202B_202B_202B_206D_202C_206A_206D_200B_206E_200D_206A_206F_200F_202E<string>(-1732898265));
|
||||
defaultInterpolatedStringHandler.AppendFormatted(_003C_003Ec__DisplayClass2_.index);
|
||||
defaultInterpolatedStringHandler.AppendLiteral(global::_003CModule_003E._202E_206C_200F_206B_206A_202A_202C_206F_200C_206C_202B_206B_206D_206D_206D_202D_206E_202E_206C_206E_206D_202C_206F_200D_202D_202E_206A_206D_202A_206A_202B_200D_200C_206D_202B_200B_200D_200C_206E_206B_202E<string>(-1502904909));
|
||||
obj.Description = defaultInterpolatedStringHandler.ToStringAndClear();
|
||||
_003C_003E2__current = obj;
|
||||
_003C_003E1__state = 1;
|
||||
return true;
|
||||
}
|
||||
case 5:
|
||||
num2 = ((num == 1) ? (-217172282) : (-217172284));
|
||||
break;
|
||||
case 10:
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
catch
|
||||
{
|
||||
//try-fault
|
||||
((IDisposable)this).Dispose();
|
||||
throw;
|
||||
}
|
||||
}
|
||||
|
||||
bool IEnumerator.MoveNext()
|
||||
{
|
||||
//ILSpy generated this explicit interface implementation from .override directive in MoveNext
|
||||
return this.MoveNext();
|
||||
}
|
||||
|
||||
private void _003C_003Em__Finally1()
|
||||
{
|
||||
_003C_003E1__state = -1;
|
||||
((IDisposable)_003C_003E7__wrap1/*cast due to .constrained prefix*/).Dispose();
|
||||
}
|
||||
|
||||
[DebuggerHidden]
|
||||
void IEnumerator.Reset()
|
||||
{
|
||||
throw _200B_200D_202A_202C_200F_200F_206D_202C_200C_200E_200D_202B_206D_206F_202E_206F_200E_202D_200E_202C_206C_206D_200C_202D_206D_200D_200B_206C_202B_200E_202E_200D_202A_202E_200E_200B_206D_202C_202A_202A_202E();
|
||||
}
|
||||
|
||||
[DebuggerHidden]
|
||||
IEnumerator<ValidationIssue> IEnumerable<ValidationIssue>.GetEnumerator()
|
||||
{
|
||||
int num = ((_003C_003E1__state != -2) ? (-105732161) : (-105732163));
|
||||
_003CValidate_003Ed__2 _003CValidate_003Ed__ = default(_003CValidate_003Ed__2);
|
||||
while (true)
|
||||
{
|
||||
int num2 = num;
|
||||
int num3 = -105732162;
|
||||
int num4 = num2;
|
||||
int num5 = num4 + num3;
|
||||
int num6 = num4 & num3;
|
||||
switch (num5 - (num6 + num6))
|
||||
{
|
||||
case 2:
|
||||
num = -105732163;
|
||||
break;
|
||||
case 3:
|
||||
num = ((_003C_003El__initialThreadId != _202E_202B_206A_200E_206D_206E_206E_206E_202B_200F_206B_200F_202E_200C_206B_202B_200B_206C_206E_206C_200D_202C_206C_206C_200D_202A_202E_202E_202A_206B_202B_206E_202D_200C_206A_206C_206B_202A_202C_206A_202E()) ? (-105732161) : (-105732166));
|
||||
break;
|
||||
case 1:
|
||||
_003CValidate_003Ed__ = new _003CValidate_003Ed__2(0)
|
||||
{
|
||||
_003C_003E4__this = _003C_003E4__this
|
||||
};
|
||||
num = -105732162;
|
||||
break;
|
||||
case 0:
|
||||
_003CValidate_003Ed__.quest = _003C_003E3__quest;
|
||||
return _003CValidate_003Ed__;
|
||||
case 4:
|
||||
_003C_003E1__state = 0;
|
||||
_003CValidate_003Ed__ = this;
|
||||
num = -105732162;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
[DebuggerHidden]
|
||||
IEnumerator IEnumerable.GetEnumerator()
|
||||
{
|
||||
return ((IEnumerable<ValidationIssue>)this).GetEnumerator();
|
||||
}
|
||||
|
||||
static int _202E_202B_206A_200E_206D_206E_206E_206E_202B_200F_206B_200F_202E_200C_206B_202B_200B_206C_206E_206C_200D_202C_206C_206C_200D_202A_202E_202E_202A_206B_202B_206E_202D_200C_206A_206C_206B_202A_202C_206A_202E()
|
||||
{
|
||||
return Environment.CurrentManagedThreadId;
|
||||
}
|
||||
|
||||
static string _202D_206F_206C_206D_202C_200D_202E_206A_206D_206F_200C_202C_206D_202E_202A_200E_200F_202A_206A_200C_200C_202C_200D_200C_206B_206F_202E_200F_206A_200D_202E_206B_206F_200E_206D_202E_202D_200C_206F_200D_202E(object P_0)
|
||||
{
|
||||
return P_0.ToString();
|
||||
}
|
||||
|
||||
static NotSupportedException _200B_200D_202A_202C_200F_200F_206D_202C_200C_200E_200D_202B_206D_206F_202E_206F_200E_202D_200E_202C_206C_206D_200C_202D_206D_200D_200B_206C_202B_200E_202E_200D_202A_202E_200E_200B_206D_202C_202A_202A_202E()
|
||||
{
|
||||
return new NotSupportedException();
|
||||
}
|
||||
}
|
||||
|
||||
private readonly Dictionary<ElementId, List<byte>> _questIdToDutyIndexes;
|
||||
|
||||
public SinglePlayerInstanceValidator(TerritoryData territoryData)
|
||||
|
|
@ -16,26 +311,20 @@ internal sealed class SinglePlayerInstanceValidator : IQuestValidator
|
|||
group x by x.QuestId).ToDictionary((IGrouping<ElementId, (ElementId QuestId, byte Index, TerritoryData.ContentFinderConditionData Data)> x) => x.Key, (IGrouping<ElementId, (ElementId QuestId, byte Index, TerritoryData.ContentFinderConditionData Data)> x) => x.Select(((ElementId QuestId, byte Index, TerritoryData.ContentFinderConditionData Data) y) => y.Index).ToList());
|
||||
}
|
||||
|
||||
[IteratorStateMachine(typeof(_003CValidate_003Ed__2))]
|
||||
public IEnumerable<ValidationIssue> Validate(Quest quest)
|
||||
{
|
||||
if (!_questIdToDutyIndexes.TryGetValue(quest.Id, out List<byte> value))
|
||||
//yield-return decompiler failed: Unexpected instruction in Iterator.Dispose()
|
||||
return new _003CValidate_003Ed__2(-2)
|
||||
{
|
||||
yield break;
|
||||
}
|
||||
foreach (byte index in value)
|
||||
{
|
||||
if (!quest.AllSteps().Any<(QuestSequence, int, QuestStep)>(((QuestSequence Sequence, int StepId, QuestStep Step) x) => x.Step.InteractionType == EInteractionType.SinglePlayerDuty && x.Step.SinglePlayerDutyIndex == index))
|
||||
{
|
||||
yield return new ValidationIssue
|
||||
{
|
||||
ElementId = quest.Id,
|
||||
Sequence = null,
|
||||
Step = null,
|
||||
Type = EIssueType.UnusedSinglePlayerInstance,
|
||||
Severity = EIssueSeverity.Error,
|
||||
Description = $"Single player instance {index} not used"
|
||||
};
|
||||
}
|
||||
}
|
||||
_003C_003E4__this = this,
|
||||
_003C_003E3__quest = quest
|
||||
};
|
||||
}
|
||||
|
||||
IEnumerable<ValidationIssue> IQuestValidator.Validate(Quest quest)
|
||||
{
|
||||
//ILSpy generated this explicit interface implementation from .override directive in Validate
|
||||
return this.Validate(quest);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue