punish v6.8.18.0

This commit is contained in:
alydev 2025-10-09 07:47:19 +10:00
commit 060278c1b7
317 changed files with 554155 additions and 0 deletions

View file

@ -0,0 +1,42 @@
using System;
using System.Numerics;
using System.Text.Json.Serialization;
using Questionable.Model.Common.Converter;
namespace Questionable.Model.Gathering;
public sealed class GatheringLocation
{
[JsonIgnore]
public Guid InternalId { get; } = Guid.NewGuid();
[JsonConverter(typeof(VectorConverter))]
public Vector3 Position { get; set; }
public int? MinimumAngle { get; set; }
public int? MaximumAngle { get; set; }
public float? MinimumDistance { get; set; }
public float? MaximumDistance { get; set; }
public bool IsCone()
{
if (MinimumAngle.HasValue)
{
return MaximumAngle.HasValue;
}
return false;
}
public float CalculateMinimumDistance()
{
return MinimumDistance ?? 1f;
}
public float CalculateMaximumDistance()
{
return MaximumDistance ?? 3f;
}
}

View file

@ -0,0 +1,12 @@
using System.Collections.Generic;
namespace Questionable.Model.Gathering;
public sealed class GatheringNode
{
public uint DataId { get; set; }
public bool? Fly { get; set; }
public List<GatheringLocation> Locations { get; set; } = new List<GatheringLocation>();
}

View file

@ -0,0 +1,8 @@
using System.Collections.Generic;
namespace Questionable.Model.Gathering;
public sealed class GatheringNodeGroup
{
public List<GatheringNode> Nodes { get; set; } = new List<GatheringNode>();
}

View file

@ -0,0 +1,77 @@
using System;
using System.Globalization;
namespace Questionable.Model.Gathering;
public class GatheringPointId : IComparable<GatheringPointId>, IEquatable<GatheringPointId>
{
public ushort Value { get; }
public GatheringPointId(ushort value)
{
Value = value;
}
public int CompareTo(GatheringPointId? other)
{
if ((object)this == other)
{
return 0;
}
if ((object)other == null)
{
return 1;
}
return Value.CompareTo(other.Value);
}
public bool Equals(GatheringPointId? other)
{
if ((object)other == null)
{
return false;
}
if ((object)this == other)
{
return true;
}
return Value == other.Value;
}
public override bool Equals(object? obj)
{
if (obj == null)
{
return false;
}
if (this == obj)
{
return true;
}
if (obj.GetType() != GetType())
{
return false;
}
return Equals((GatheringPointId)obj);
}
public override int GetHashCode()
{
return Value.GetHashCode();
}
public static bool operator ==(GatheringPointId? left, GatheringPointId? right)
{
return object.Equals(left, right);
}
public static bool operator !=(GatheringPointId? left, GatheringPointId? right)
{
return !object.Equals(left, right);
}
public static GatheringPointId FromString(string value)
{
return new GatheringPointId(ushort.Parse(value, CultureInfo.InvariantCulture));
}
}

View file

@ -0,0 +1,20 @@
using System.Collections.Generic;
using System.Text.Json.Serialization;
using Questionable.Model.Common.Converter;
using Questionable.Model.Questing;
namespace Questionable.Model.Gathering;
public sealed class GatheringRoot
{
[JsonConverter(typeof(StringListOrValueConverter))]
public List<string> Author { get; set; } = new List<string>();
public List<QuestStep> Steps { get; set; } = new List<QuestStep>();
public bool? FlyBetweenNodes { get; set; }
public List<uint> ExtraQuestItems { get; set; } = new List<uint>();
public List<GatheringNodeGroup> Groups { get; set; } = new List<GatheringNodeGroup>();
}