mirror of
https://github.com/YouHaveTrouble/DiscipleOfLand.git
synced 2026-05-12 06:26:56 +00:00
Initial commit
This commit is contained in:
@@ -0,0 +1,15 @@
|
||||
export enum Job {
|
||||
BOTANIST = "botanist",
|
||||
MINER = "miner",
|
||||
}
|
||||
|
||||
export function jobFromString(str: string): Job | null {
|
||||
switch (str.toLowerCase()) {
|
||||
case "botanist":
|
||||
return Job.BOTANIST;
|
||||
case "miner":
|
||||
return Job.MINER;
|
||||
default:
|
||||
return null;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
export enum NodeType {
|
||||
UNSPOILED = "unspoiled",
|
||||
LEGENDARY = "legendary",
|
||||
}
|
||||
|
||||
export function nodeTypeFromString(str: string): NodeType | null {
|
||||
switch (str.toLowerCase()) {
|
||||
case "unspoiled":
|
||||
return NodeType.UNSPOILED;
|
||||
case "legendary":
|
||||
return NodeType.LEGENDARY;
|
||||
default:
|
||||
return null;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user