docs & feat: add license & attribution notice (Apache-2.0 / GPL-3.0) and core system enhancements

This commit is contained in:
CAtlas0784 committed 2026-11-01 20:14:36 +07:00
1 parent 507836d367
commit ce6aabfc55
47 files changed
+5674 -724

No files matched your search

@@ -0,0 +1,23 @@
package gameserver
import (
"gac-hkrpg-go/internal/common"
"testing"
)
func TestSceneOfEntryForTeleportKeepsRequestedFloorWhenPointIsExternal(t *testing.T) {
res := &common.JsonConfig{LevelOutputConfigs: map[uint32]map[string]*common.LevelOutputConfig{
1: {
"P1_F10": {Scenes: map[uint32]common.SceneData{1: {Teleports: map[uint32]common.TeleportInfo{7: {}}}}},
"P1_F20": {Scenes: map[uint32]common.SceneData{}},
},
}}
name, _, ok := sceneOfEntryForTeleport(res, 1, 20, 7)
if !ok || name != "P1_F20" {
t.Fatalf("requested floor lost: %q, %t", name, ok)
}
name, _, ok = sceneOfEntryForTeleport(res, 1, 0, 7)
if !ok || name != "P1_F10" {
t.Fatalf("floor-less lookup failed: %q, %t", name, ok)
}
}