shard: no longer panics if tdata/NPCs.json isn't found

This commit is contained in:
CPunch 2024-02-04 11:21:02 -06:00
parent 0a28dbcc3e
commit cd93a058ce

View File

@ -18,7 +18,8 @@ func (server *ShardServer) LoadNPCs() {
data, err := os.ReadFile(config.GetTDataPath() + "/NPCs.json") data, err := os.ReadFile(config.GetTDataPath() + "/NPCs.json")
if err != nil { if err != nil {
panic(err) log.Printf("Warning: failed to load NPCs: %v", err)
return
} }
// yes, we have to do it this way so our NPCs IDs will be incremented and unique // yes, we have to do it this way so our NPCs IDs will be incremented and unique