umadump/replay: start of race replay json decoding
This commit is contained in:
@@ -0,0 +1,29 @@
|
||||
// Code generated by "stringer -type RaceTime -trimprefix Time"; DO NOT EDIT.
|
||||
|
||||
package replay
|
||||
|
||||
import "strconv"
|
||||
|
||||
func _() {
|
||||
// An "invalid array index" compiler error signifies that the constant values have changed.
|
||||
// Re-run the stringer command to generate them again.
|
||||
var x [1]struct{}
|
||||
_ = x[TimeMin-0]
|
||||
_ = x[TimeMorning-1]
|
||||
_ = x[TimeDaytime-2]
|
||||
_ = x[TimeEvening-3]
|
||||
_ = x[TimeNight-4]
|
||||
_ = x[TimeMax-5]
|
||||
}
|
||||
|
||||
const _RaceTime_name = "MinMorningDaytimeEveningNightMax"
|
||||
|
||||
var _RaceTime_index = [...]uint8{0, 3, 10, 17, 24, 29, 32}
|
||||
|
||||
func (i RaceTime) String() string {
|
||||
idx := int(i) - 0
|
||||
if i < 0 || idx >= len(_RaceTime_index)-1 {
|
||||
return "RaceTime(" + strconv.FormatInt(int64(i), 10) + ")"
|
||||
}
|
||||
return _RaceTime_name[_RaceTime_index[idx]:_RaceTime_index[idx+1]]
|
||||
}
|
||||
Reference in New Issue
Block a user