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

+25
View File
@@ -0,0 +1,25 @@
package common
import (
"encoding/json"
"fmt"
)
func ReadWarpUnlockMode() (*int, error) {
root, err := readCurrencyWarsPersistentRoot()
if err != nil {
return nil, err
}
raw, ok := root["warp_unlock_mode"]
if !ok {
return nil, nil
}
var mode int
if err := json.Unmarshal(raw, &mode); err != nil {
return nil, err
}
if mode < 0 || mode > 3 {
return nil, fmt.Errorf("invalid saved Warp visibility mode")
}
return &mode, nil
}