feat: command types list

This commit is contained in:
Ilia Denisov
2026-02-10 07:49:12 +02:00
parent d9c8de27e5
commit 83bcdcbc49
15 changed files with 184 additions and 163 deletions
+2 -2
View File
@@ -10,7 +10,7 @@ import (
"github.com/iliadenisov/galaxy/internal/util"
)
func (c *Cache) CreateScience(ri int, name string, drive, weapons, shileds, cargo float64) error {
func (c *Cache) ScienceCreate(ri int, name string, drive, weapons, shileds, cargo float64) error {
c.validateRaceIndex(ri)
n, ok := util.ValidateTypeName(name)
if !ok {
@@ -47,7 +47,7 @@ func (c *Cache) CreateScience(ri int, name string, drive, weapons, shileds, carg
return nil
}
func (c *Cache) DeleteScience(ri int, name string) error {
func (c *Cache) ScienceRemove(ri int, name string) error {
c.validateRaceIndex(ri)
sc := slices.IndexFunc(c.g.Race[ri].Sciences, func(s game.Science) bool { return s.Name == name })
if sc < 0 {