Add authentication server, dev CLI, Docker multi-service setup, and cross-platform improvements

This commit is contained in:
Ilya Groshev
2026-04-21 16:49:44 +03:00
parent 43d6527b42
commit a3fbb1aeba
121 changed files with 4523 additions and 2888 deletions
+5 -22
View File
@@ -6,23 +6,6 @@ import (
"lunar-tear/server/internal/utils"
)
type companionRow struct {
CompanionId int32 `json:"CompanionId"`
CompanionCategoryType int32 `json:"CompanionCategoryType"`
}
type companionCategoryRow struct {
CompanionCategoryType int32 `json:"CompanionCategoryType"`
EnhancementCostNumericalFunctionId int32 `json:"EnhancementCostNumericalFunctionId"`
}
type companionEnhancementMaterialRow struct {
CompanionCategoryType int32 `json:"CompanionCategoryType"`
Level int32 `json:"Level"`
MaterialId int32 `json:"MaterialId"`
Count int32 `json:"Count"`
}
type CompanionLevelKey struct {
CategoryType int32
Level int32
@@ -34,23 +17,23 @@ type CompanionMaterialCost struct {
}
type CompanionCatalog struct {
CompanionById map[int32]companionRow
CompanionById map[int32]EntityMCompanion
GoldCostByCategory map[int32]NumericalFunc
MaterialsByKey map[CompanionLevelKey]CompanionMaterialCost
}
func LoadCompanionCatalog() (*CompanionCatalog, error) {
companions, err := utils.ReadJSON[companionRow]("EntityMCompanionTable.json")
companions, err := utils.ReadTable[EntityMCompanion]("m_companion")
if err != nil {
return nil, fmt.Errorf("load companion table: %w", err)
}
categories, err := utils.ReadJSON[companionCategoryRow]("EntityMCompanionCategoryTable.json")
categories, err := utils.ReadTable[EntityMCompanionCategory]("m_companion_category")
if err != nil {
return nil, fmt.Errorf("load companion category table: %w", err)
}
materials, err := utils.ReadJSON[companionEnhancementMaterialRow]("EntityMCompanionEnhancementMaterialTable.json")
materials, err := utils.ReadTable[EntityMCompanionEnhancementMaterial]("m_companion_enhancement_material")
if err != nil {
return nil, fmt.Errorf("load companion enhancement material table: %w", err)
}
@@ -60,7 +43,7 @@ func LoadCompanionCatalog() (*CompanionCatalog, error) {
return nil, fmt.Errorf("load function resolver: %w", err)
}
companionById := make(map[int32]companionRow, len(companions))
companionById := make(map[int32]EntityMCompanion, len(companions))
for _, c := range companions {
companionById[c.CompanionId] = c
}