muffin v7.4.12

This commit is contained in:
alydev 2026-02-27 22:50:51 +10:00
parent e3e5a401c3
commit 0f9f445830
38 changed files with 13646 additions and 10442 deletions

View file

@ -0,0 +1,24 @@
<?xml version="1.0" encoding="utf-8"?>
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<AssemblyName>FatePaths</AssemblyName>
<GenerateAssemblyInfo>False</GenerateAssemblyInfo>
<TargetFramework>netcoreapp1.0</TargetFramework>
</PropertyGroup>
<PropertyGroup>
<LangVersion>12.0</LangVersion>
<AllowUnsafeBlocks>True</AllowUnsafeBlocks>
</PropertyGroup>
<PropertyGroup>
<RootNamespace />
</PropertyGroup>
<ItemGroup>
<None Remove="Questionable.FatePaths.FateDefinitionSchema" />
<EmbeddedResource Include="Questionable.FatePaths.FateDefinitionSchema" LogicalName="Questionable.FatePaths.FateDefinitionSchema" />
</ItemGroup>
<ItemGroup>
<Reference Include="Questionable.Model">
<HintPath>..\..\Questionable.Model.dll</HintPath>
</Reference>
</ItemGroup>
</Project>

View file

@ -0,0 +1,177 @@
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://github.com/WigglyMuffin/Questionable/raw/refs/heads/main/FatePaths/fatedefinition-v1.json",
"title": "FATE Definition V1",
"description": "A FATE farming definition",
"type": "object",
"properties": {
"$schema": {
"type": "string",
"const": "https://github.com/WigglyMuffin/Questionable/raw/refs/heads/main/FatePaths/fatedefinition-v1.json"
},
"Name": {
"description": "Display name of the FATE",
"type": "string"
},
"Description": {
"description": "Description of the FATE activity",
"type": "string"
},
"TerritoryId": {
"description": "Territory ID where the FATE takes place",
"type": "integer",
"minimum": 1
},
"Aetheryte": {
"description": "Nearest aetheryte for teleporting",
"$ref": "https://github.com/WigglyMuffin/Questionable/raw/refs/heads/main/Questionable.Model/common-aetheryte.json"
},
"Position": {
"description": "Position to navigate to for the FATE",
"$ref": "https://github.com/WigglyMuffin/Questionable/raw/refs/heads/main/Questionable.Model/common-vector3.json"
},
"Targets": {
"description": "List of FATE targets and actions to perform on them",
"type": "array",
"items": {
"type": "object",
"properties": {
"DataId": {
"type": "integer",
"minimum": 1
},
"Action": {
"type": "string"
}
},
"required": [
"DataId",
"Action"
],
"additionalProperties": false
},
"minItems": 1
},
"RequiredStatusId": {
"description": "Status effect required to participate in the FATE",
"type": "string"
},
"TransformNpcDataId": {
"description": "NPC to interact with to obtain the required status",
"type": "integer",
"minimum": 1
},
"TransformNpcPosition": {
"description": "Position of the transform NPC",
"$ref": "https://github.com/WigglyMuffin/Questionable/raw/refs/heads/main/Questionable.Model/common-vector3.json"
},
"EventExpiry": {
"description": "If this is a seasonal/event FATE, the date and time (in UTC) when it is no longer available. Date-only values are treated as ending at daily reset (14:59:59 UTC).",
"format": "date-time",
"type": [
"string",
"null"
]
},
"TransformDialogueChoices": {
"description": "Dialogue choices when interacting with the transform NPC",
"type": "array",
"items": {
"type": "object",
"properties": {
"Type": {
"type": "string",
"enum": [
"YesNo",
"List"
]
},
"ExcelSheet": {
"type": "string"
}
},
"required": [
"Type"
],
"allOf": [
{
"if": {
"properties": {
"Type": {
"const": "YesNo"
}
}
},
"then": {
"properties": {
"Prompt": {
"type": [
"string",
"integer"
]
},
"PromptIsRegularExpression": {
"type": "boolean"
},
"Yes": {
"type": "boolean",
"default": true
}
},
"required": [
"Prompt",
"Yes"
]
}
},
{
"if": {
"properties": {
"Type": {
"const": "List"
}
}
},
"then": {
"properties": {
"Prompt": {
"type": [
"string",
"integer",
"null"
]
},
"PromptIsRegularExpression": {
"type": "boolean"
},
"Answer": {
"type": [
"string",
"integer"
]
},
"AnswerIsRegularExpression": {
"type": "boolean"
}
},
"required": [
"Prompt",
"Answer"
]
}
}
]
}
}
},
"required": [
"$schema",
"Name",
"Description",
"TerritoryId",
"Aetheryte",
"Position",
"Targets"
],
"additionalProperties": false
}

View file

@ -0,0 +1,109 @@
using System;
using System.Collections.Generic;
using System.IO;
using System.Numerics;
using System.Runtime.InteropServices;
using Questionable.Model.Common;
using Questionable.Model.Questing;
namespace Questionable.FatePaths;
public static class AssemblyFateDefinitionLoader
{
private static Dictionary<ushort, FateDefinition>? _definitions;
public static Stream FateDefinitionSchema => typeof(AssemblyFateDefinitionLoader).Assembly.GetManifestResourceStream("Questionable.FatePaths.FateDefinitionSchema");
public static IReadOnlyDictionary<ushort, FateDefinition> GetDefinitions()
{
if (_definitions == null)
{
_definitions = new Dictionary<ushort, FateDefinition>();
LoadDefinitions();
}
return _definitions ?? throw new InvalidOperationException("fate definition data is not initialized");
}
private static void AddDefinition(ushort id, FateDefinition definition)
{
_definitions[id] = definition;
}
private static void LoadDefinitions()
{
LoadDefinition0();
}
private static void LoadDefinition0()
{
FateDefinition obj = new FateDefinition
{
Name = "Little Ladies' Day (2026)",
Description = "Cheer Rhythm FATE in Ul'dah - Steps of Nald",
TerritoryId = 130,
Aetheryte = EAetheryteLocation.Uldah,
Position = new Vector3(-38.322124f, 3.9999998f, -144.23155f)
};
int num = 4;
List<FateActionTarget> list = new List<FateActionTarget>(num);
CollectionsMarshal.SetCount(list, num);
Span<FateActionTarget> span = CollectionsMarshal.AsSpan(list);
int num2 = 0;
span[num2] = new FateActionTarget
{
DataId = 18862u,
Action = EAction.CheerRhythmYellow
};
num2++;
span[num2] = new FateActionTarget
{
DataId = 18860u,
Action = EAction.CheerRhythmBlue
};
num2++;
span[num2] = new FateActionTarget
{
DataId = 18861u,
Action = EAction.CheerRhythmGreen
};
num2++;
span[num2] = new FateActionTarget
{
DataId = 18859u,
Action = EAction.CheerRhythmRed
};
obj.Targets = list;
obj.RequiredStatusId = EStatus.FaceInTheCrowd;
obj.TransformNpcDataId = 1055771u;
obj.TransformNpcPosition = new Vector3(-37.369385f, 5.0000005f, -130.14423f);
num2 = 3;
List<DialogueChoice> list2 = new List<DialogueChoice>(num2);
CollectionsMarshal.SetCount(list2, num2);
Span<DialogueChoice> span2 = CollectionsMarshal.AsSpan(list2);
num = 0;
span2[num] = new DialogueChoice
{
Type = EDialogChoiceType.List,
ExcelSheet = "custom/009/FesPdy2026FateDisguise_00951",
Prompt = new ExcelRef("TEXT_FESPDY2026FATEDISGUISE_00951_Q1_000_000"),
Answer = new ExcelRef("TEXT_FESPDY2026FATEDISGUISE_00951_A1_000_001")
};
num++;
span2[num] = new DialogueChoice
{
Type = EDialogChoiceType.List,
ExcelSheet = "custom/009/FesPdy2026FateDisguise_00951",
Prompt = new ExcelRef("TEXT_FESPDY2026FATEDISGUISE_00951_Q2_000_000"),
Answer = new ExcelRef("TEXT_FESPDY2026FATEDISGUISE_00951_A2_100_004")
};
num++;
span2[num] = new DialogueChoice
{
Type = EDialogChoiceType.YesNo,
ExcelSheet = "custom/009/FesPdy2026FateDisguise_00951",
Prompt = new ExcelRef("TEXT_FESPDY2026FATEDISGUISE_00951_CONFIRM_100_004")
};
obj.TransformDialogueChoices = list2;
AddDefinition(1, obj);
}
}