track fish; use new go tooling

This commit is contained in:
41666 2025-04-01 19:59:44 -07:00
parent 7332fd6fad
commit 2bfd19339c
6 changed files with 51 additions and 47 deletions

View file

@ -32,7 +32,7 @@ func (eh *EventHandler) HandleEvent(ctx context.Context, event types.ESSEvent) {
return
}
if event.EventName == "Death" || event.EventName == "VehicleDestroy" {
if event.EventName == "Death" || event.EventName == "VehicleDestroy" || event.EventName == "FishScan" {
go eh.HandleDeath(ctx, event)
} else if event.EventName == "GainExperience" {
go eh.HandleExperience(ctx, event)

View file

@ -16,7 +16,7 @@ func getEventNames() []string {
events := util.Map(experienceIDs, func(i int) string {
return fmt.Sprintf("GainExperience_experience_id_%d", i)
})
events = append(events, "Death", "VehicleDestroy")
events = append(events, "Death", "VehicleDestroy", "FishScan")
return events
}

View file

@ -85,7 +85,7 @@ func (wsm *WebsocketManager) Start() {
log.Fatalln("wsm: read failed:", err)
}
// log.Printf("raw event: %s", string(data))
log.Printf("raw event: %s", string(data))
err = json.Unmarshal(data, &event)
if err != nil {