refactor: duplicate identifier error
This commit is contained in:
@@ -21,7 +21,7 @@ func (c *Cache) ShipClassCreate(ri int, typeName string, drive float64, ammo int
|
||||
return e.NewEntityTypeNameValidationError("%q", n)
|
||||
}
|
||||
if st := slices.IndexFunc(c.g.Race[ri].ShipTypes, func(st game.ShipType) bool { return st.Name == typeName }); st >= 0 {
|
||||
return e.NewEntityTypeNameDuplicateError("ship type %q", c.g.Race[ri].ShipTypes[st].Name)
|
||||
return e.NewEntityDuplicateIdentifierError("ship class %q", c.g.Race[ri].ShipTypes[st].Name)
|
||||
}
|
||||
c.g.Race[ri].ShipTypes = append(c.g.Race[ri].ShipTypes, game.ShipType{
|
||||
ID: uuid.New(),
|
||||
|
||||
Reference in New Issue
Block a user