Skip to content

Commit 8892e1a

Browse files
committed
fog of war game config
1 parent 9b01e4b commit 8892e1a

File tree

5 files changed

+17
-1
lines changed

5 files changed

+17
-1
lines changed

c/uwapi/uwapi/modules/components.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -140,6 +140,7 @@ extern "C"
140140
UwPlayerStateFlags_Loaded = 1 << 2,
141141
UwPlayerStateFlags_Pause = 1 << 3,
142142
UwPlayerStateFlags_SkipCutscene = 1 << 4,
143+
UwPlayerStateFlags_Cheater = 1 << 5,
143144
} UwPlayerStateFlags;
144145
typedef enum UwPlayerConnectionClassEnum
145146
{

c/uwapi/uwapi/modules/game.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,8 @@ extern "C"
1818
{
1919
bool ranked;
2020
bool diplomacy;
21+
bool fogOfWar;
22+
bool automaticColors;
2123
bool lockedSpeed;
2224
bool cheats;
2325
} UwGameConfig;

csharp/uwapi/interop.cs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -586,6 +586,7 @@ public enum UwPlayerStateFlags
586586
Loaded = 1 << 2,
587587
Pause = 1 << 3,
588588
SkipCutscene = 1 << 4,
589+
Cheater = 1 << 5,
589590
}
590591

591592
public enum UwPlayerConnectionClassEnum
@@ -701,6 +702,10 @@ public struct UwGameConfig
701702
[MarshalAs(UnmanagedType.I1)]
702703
public bool diplomacy;
703704
[MarshalAs(UnmanagedType.I1)]
705+
public bool fogOfWar;
706+
[MarshalAs(UnmanagedType.I1)]
707+
public bool automaticColors;
708+
[MarshalAs(UnmanagedType.I1)]
704709
public bool lockedSpeed;
705710
[MarshalAs(UnmanagedType.I1)]
706711
public bool cheats;

python/uwapi/bots.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -347,6 +347,7 @@ typedef enum UwPlayerStateFlags
347347
UwPlayerStateFlags_Loaded = 1 << 2,
348348
UwPlayerStateFlags_Pause = 1 << 3,
349349
UwPlayerStateFlags_SkipCutscene = 1 << 4,
350+
UwPlayerStateFlags_Cheater = 1 << 5,
350351
} UwPlayerStateFlags;
351352
typedef enum UwPlayerConnectionClassEnum
352353
{
@@ -425,6 +426,8 @@ typedef struct UwGameConfig
425426
{
426427
bool ranked;
427428
bool diplomacy;
429+
bool fogOfWar;
430+
bool automaticColors;
428431
bool lockedSpeed;
429432
bool cheats;
430433
} UwGameConfig;

python/uwapi/interop.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,7 @@ class UwPlayerStateFlags(IntFlag):
9696
Loaded = 1 << 2
9797
Pause = 1 << 3
9898
SkipCutscene = 1 << 4
99+
Cheater = 1 << 5
99100

100101
class UwPlayerConnectionClassEnum(Enum):
101102
Nothing = 0
@@ -321,6 +322,8 @@ class UwDiplomacyProposalComponent:
321322
class UwGameConfig:
322323
ranked: bool
323324
diplomacy: bool
325+
fogOfWar: bool
326+
automaticColors: bool
324327
lockedSpeed: bool
325328
cheats: bool
326329

@@ -1328,12 +1331,14 @@ def _UwDiplomacyProposalComponent_ctopy(self, val) -> UwDiplomacyProposalCompone
13281331
return UwDiplomacyProposalComponent(int(val.offeror), int(val.offeree), UwForeignPolicyEnum(val.proposal))
13291332

13301333
def _UwGameConfig_ctopy(self, val) -> UwGameConfig:
1331-
return UwGameConfig(bool(val.ranked), bool(val.diplomacy), bool(val.lockedSpeed), bool(val.cheats))
1334+
return UwGameConfig(bool(val.ranked), bool(val.diplomacy), bool(val.fogOfWar), bool(val.automaticColors), bool(val.lockedSpeed), bool(val.cheats))
13321335

13331336
def _UwGameConfig_pytoc(self, val: UwGameConfig):
13341337
r = self._ffi.new("UwGameConfig *")
13351338
r.ranked = val.ranked
13361339
r.diplomacy = val.diplomacy
1340+
r.fogOfWar = val.fogOfWar
1341+
r.automaticColors = val.automaticColors
13371342
r.lockedSpeed = val.lockedSpeed
13381343
r.cheats = val.cheats
13391344
return r

0 commit comments

Comments
 (0)