tangled
alpha
login
or
join now
altagos.dev
/
space
0
fork
atom
A SpaceTraders Agent
0
fork
atom
overview
issues
pulls
pipelines
fix spelling mistake + add default values
altagos.dev
4 months ago
961129c8
c99618d8
verified
This commit was signed with the committer's
known signature
.
altagos.dev
SSH Key Fingerprint:
SHA256:UbTjEcCZlc6GzQWLCuDK3D//HESWD2xFPkzue9XMras=
+14
-14
2 changed files
expand all
collapse all
unified
split
src
st
models
contracts.zig
factions.zig
+10
-10
src/st/models/contracts.zig
···
1
1
pub const Contract = struct {
2
2
-
id: u64,
2
2
+
id: []const u8,
3
3
factionSymbol: []const u8,
4
4
-
type: Type,
5
5
-
terms: Terms,
6
6
-
accepted: bool,
7
7
-
fullfilled: bool,
4
4
+
type: Type = .PROCUREMENT,
5
5
+
terms: Terms = .{},
6
6
+
accepted: bool = false,
7
7
+
fullfilled: bool = false,
8
8
deadlineToAccept: []const u8,
9
9
};
10
10
···
15
15
};
16
16
17
17
pub const Terms = struct {
18
18
-
deadline: []const u8,
19
19
-
payment: Payment,
20
20
-
deliver: []Deliver,
18
18
+
deadline: []const u8 = "",
19
19
+
payment: Payment = .{},
20
20
+
deliver: []Deliver = &.{},
21
21
};
22
22
23
23
pub const Payment = struct {
24
24
-
onAccepted: u64,
25
25
-
onFulfilled: u64,
24
24
+
onAccepted: u64 = 0,
25
25
+
onFulfilled: u64 = 0,
26
26
};
27
27
28
28
pub const Deliver = struct {
+4
-4
src/st/models/factions.zig
···
89
89
};
90
90
91
91
pub const Faction = struct {
92
92
-
symbol: Symbol,
92
92
+
symbol: Symbol = .COSMIC,
93
93
name: []const u8,
94
94
-
desciption: []const u8,
94
94
+
description: []const u8,
95
95
headquarters: []const u8,
96
96
-
traits: []Trait,
97
97
-
isRecruiting: bool,
96
96
+
traits: []Trait = &.{},
97
97
+
isRecruiting: bool = false,
98
98
};