A SpaceTraders Agent

fix spelling mistake + add default values

altagos.dev 961129c8 c99618d8

verified
+14 -14
+10 -10
src/st/models/contracts.zig
··· 1 1 pub const Contract = struct { 2 - id: u64, 2 + id: []const u8, 3 3 factionSymbol: []const u8, 4 - type: Type, 5 - terms: Terms, 6 - accepted: bool, 7 - fullfilled: bool, 4 + type: Type = .PROCUREMENT, 5 + terms: Terms = .{}, 6 + accepted: bool = false, 7 + fullfilled: bool = false, 8 8 deadlineToAccept: []const u8, 9 9 }; 10 10 ··· 15 15 }; 16 16 17 17 pub const Terms = struct { 18 - deadline: []const u8, 19 - payment: Payment, 20 - deliver: []Deliver, 18 + deadline: []const u8 = "", 19 + payment: Payment = .{}, 20 + deliver: []Deliver = &.{}, 21 21 }; 22 22 23 23 pub const Payment = struct { 24 - onAccepted: u64, 25 - onFulfilled: u64, 24 + onAccepted: u64 = 0, 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 - symbol: Symbol, 92 + symbol: Symbol = .COSMIC, 93 93 name: []const u8, 94 - desciption: []const u8, 94 + description: []const u8, 95 95 headquarters: []const u8, 96 - traits: []Trait, 97 - isRecruiting: bool, 96 + traits: []Trait = &.{}, 97 + isRecruiting: bool = false, 98 98 };