-
Notifications
You must be signed in to change notification settings - Fork 0
/
icons.go
82 lines (75 loc) · 2.42 KB
/
icons.go
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
76
77
78
79
80
81
82
package main
import (
"strings"
aw "github.com/deanishe/awgo"
)
var (
// UpdateAvailable is an icon
UpdateAvailable = &aw.Icon{Value: "icons/update-available.png"}
// MonsterIconDefault is an icon for monsters of unknown type
MonsterIconDefault = &aw.Icon{Value: "icons/dnd/default.png"}
// MonsterIconAbberations is an icon
MonsterIconAbberations = &aw.Icon{Value: "icons/dnd/aberration.jpg"}
// MonsterIconBeasts is an icon
MonsterIconBeasts = &aw.Icon{Value: "icons/dnd/beast.jpg"}
// MonsterIconCelestials is an icon
MonsterIconCelestials = &aw.Icon{Value: "icons/dnd/celestial.jpg"}
// MonsterIconConstructs is an icon
MonsterIconConstructs = &aw.Icon{Value: "icons/dnd/construct.jpg"}
// MonsterIconDragons is an icon
MonsterIconDragons = &aw.Icon{Value: "icons/dnd/dragon.jpg"}
// MonsterIconElementals is an icon
MonsterIconElementals = &aw.Icon{Value: "icons/dnd/elemental.jpg"}
// MonsterIconFey is an icon
MonsterIconFey = &aw.Icon{Value: "icons/dnd/fey.jpg"}
// MonsterIconFiends is an icon
MonsterIconFiends = &aw.Icon{Value: "icons/dnd/fiend.jpg"}
// MonsterIconGiants is an icon
MonsterIconGiants = &aw.Icon{Value: "icons/dnd/giant.jpg"}
// MonsterIconHumanoids is an icon
MonsterIconHumanoids = &aw.Icon{Value: "icons/dnd/humanoid.jpg"}
// MonsterIconMonstrosities is an icon
MonsterIconMonstrosities = &aw.Icon{Value: "icons/dnd/monstrosity.jpg"}
// MonsterIconOozes is an icon
MonsterIconOozes = &aw.Icon{Value: "icons/dnd/ooze.jpg"}
// MonsterIconPlants is an icon
MonsterIconPlants = &aw.Icon{Value: "icons/dnd/plant.jpg"}
// MonsterIconUndead is an icon
MonsterIconUndead = &aw.Icon{Value: "icons/dnd/undead.jpg"}
)
func getIconForType(monsterType string) *aw.Icon {
var temp *aw.Icon
switch strings.ToLower(monsterType) {
case "aberration":
temp = MonsterIconAbberations
case "beast":
temp = MonsterIconBeasts
case "celestial":
temp = MonsterIconCelestials
case "construct":
temp = MonsterIconConstructs
case "dragon":
temp = MonsterIconDragons
case "elemental":
temp = MonsterIconElementals
case "fey":
temp = MonsterIconFey
case "fiend":
temp = MonsterIconFiends
case "giant":
temp = MonsterIconGiants
case "humanoid":
temp = MonsterIconHumanoids
case "monstrosity":
temp = MonsterIconMonstrosities
case "ooze":
temp = MonsterIconOozes
case "plant":
temp = MonsterIconPlants
case "undead":
temp = MonsterIconUndead
default:
temp = MonsterIconDefault
}
return temp
}