Skip to content
This repository has been archived by the owner on Oct 25, 2024. It is now read-only.

Commit

Permalink
allow setting locked params
Browse files Browse the repository at this point in the history
  • Loading branch information
maxsupermanhd committed Sep 14, 2024
1 parent 93acc74 commit a34b80e
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions geninstance.go
Original file line number Diff line number Diff line change
Expand Up @@ -180,14 +180,14 @@ func geniPreset(inst *instance) error {
inst.BinPath = tryCfgGetD(tryGetStringGen("binary"), "warzone2100", inst.cfgs...)
preset := map[string]any{
"locked": map[string]any{
"power": true,
"alliances": false,
"teams": true,
"difficulty": true,
"ai": true,
"scavengers": false,
"position": false,
"bases": false,
"power": tryCfgGetD(tryGetBoolGen("locked", "power"), true, inst.cfgs...),
"alliances": tryCfgGetD(tryGetBoolGen("locked", "alliances"), false, inst.cfgs...),
"teams": tryCfgGetD(tryGetBoolGen("locked", "teams"), true, inst.cfgs...),
"difficulty": tryCfgGetD(tryGetBoolGen("locked", "difficulty"), true, inst.cfgs...),
"ai": tryCfgGetD(tryGetBoolGen("locked", "ai"), true, inst.cfgs...),
"scavengers": tryCfgGetD(tryGetBoolGen("locked", "scavengers"), false, inst.cfgs...),
"position": tryCfgGetD(tryGetBoolGen("locked", "position"), false, inst.cfgs...),
"bases": tryCfgGetD(tryGetBoolGen("locked", "bases"), false, inst.cfgs...),
},
"challenge": map[string]any{
"map": inst.Settings.MapName,
Expand Down

0 comments on commit a34b80e

Please sign in to comment.