1
1
mirror of https://github.com/OpenDiablo2/OpenDiablo2 synced 2024-11-17 18:06:03 -05:00

d2enum: draw effect string

This commit is contained in:
M. Sz 2021-03-11 08:35:14 +01:00
parent e7ea9cacce
commit 36f356d0c3

View File

@ -37,3 +37,33 @@ func (i CompositeType) String() string {
} }
return _CompositeType_name[_CompositeType_index[i]:_CompositeType_index[i+1]] return _CompositeType_name[_CompositeType_index[i]:_CompositeType_index[i+1]]
} }
// Name returns a full name of layer
func (i CompositeType) Name() string {
strings := map[CompositeType]string{
CompositeTypeHead: "Head",
CompositeTypeTorso: "Torso",
CompositeTypeLegs: "Legs",
CompositeTypeRightArm: "Right Arm",
CompositeTypeLeftArm: "Left Arm",
CompositeTypeRightHand: "Right Hand",
CompositeTypeLeftHand: "Left Hand",
CompositeTypeShield: "Shield",
CompositeTypeSpecial1: "Special 1",
CompositeTypeSpecial2: "Special 2",
CompositeTypeSpecial3: "Special 3",
CompositeTypeSpecial4: "Special 4",
CompositeTypeSpecial5: "Special 5",
CompositeTypeSpecial6: "Special 6",
CompositeTypeSpecial7: "Special 7",
CompositeTypeSpecial8: "Special 8",
}
layerName, found := strings[i]
if !found {
return "Unknown"
}
return layerName
}