forked from purrplingcat/QuestFramework
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathQuestType.cs
75 lines (72 loc) · 2.3 KB
/
QuestType.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
using StardewValley.Quests;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace QuestFramework
{
/// <summary>
/// Quest type (vanilla SDV types + one special custom)
/// </summary>
public enum QuestType
{
Custom,
Basic,
Building,
Crafting,
ItemDelivery,
ItemHarvest,
Location,
LostItem,
Monster,
SecretLostItem,
Social,
}
public static class QuestTypeId
{
public static int Basic => Quest.type_basic;
public static int Building => Quest.type_building;
public static int Crafting => Quest.type_crafting;
public static int ItemDelivery => Quest.type_itemDelivery;
public static int ItemHarvest => Quest.type_harvest;
public static int Location => Quest.type_location;
public static int LostItem => Quest.type_harvest;
public static int Monster => Quest.type_monster;
public static int SecretLostItem => Quest.type_harvest;
public static int Social => Quest.type_socialize;
/// <summary>
/// Returns quest type id in vanilla SDV quest coresponding for a quest class type.
/// </summary>
/// <param name="type"></param>
/// <returns></returns>
public static int ToVanillaTypeId(this QuestType type)
{
switch (type)
{
case QuestType.Basic:
return Basic;
case QuestType.Building:
return Building;
case QuestType.Crafting:
return Crafting;
case QuestType.ItemDelivery:
return ItemDelivery;
case QuestType.ItemHarvest:
return ItemHarvest;
case QuestType.Location:
return Location;
case QuestType.LostItem:
return LostItem;
case QuestType.Monster:
return Monster;
case QuestType.SecretLostItem:
return SecretLostItem;
case QuestType.Social:
return Social;
default:
return 0;
}
}
}
}