mirror of
https://github.com/OpenDiablo2/OpenDiablo2
synced 2025-02-20 23:47:16 -05:00
d2tbl loader returns string lookup table (#725)
* fix glfw error in ci workflow * make the tbl loader return the string lookup table (for use in hellspawner)
This commit is contained in:
parent
77c358ed67
commit
3988bd7f1c
@ -3,7 +3,7 @@ package d2tbl
|
||||
import (
|
||||
"log"
|
||||
"strconv"
|
||||
|
||||
|
||||
"github.com/OpenDiablo2/OpenDiablo2/d2common/d2datautils"
|
||||
)
|
||||
|
||||
@ -35,7 +35,7 @@ func TranslateString(key string) string {
|
||||
}
|
||||
|
||||
// LoadTextDictionary loads the text dictionary from the given data
|
||||
func LoadTextDictionary(dictionaryData []byte) {
|
||||
func LoadTextDictionary(dictionaryData []byte) map[string]string {
|
||||
if lookupTable == nil {
|
||||
lookupTable = make(map[string]string)
|
||||
}
|
||||
@ -105,4 +105,6 @@ func LoadTextDictionary(dictionaryData []byte) {
|
||||
lookupTable[key] = value
|
||||
}
|
||||
}
|
||||
|
||||
return lookupTable
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user