From 961129c85f1e373dc4bc9ae3c70fd1a515109914 Mon Sep 17 00:00:00 2001 From: Altagos Date: Sat, 8 Nov 2025 17:59:36 +0100 Subject: [PATCH] fix spelling mistake + add default values --- src/st/models/contracts.zig | 20 ++++++++++---------- src/st/models/factions.zig | 8 ++++---- 2 files changed, 14 insertions(+), 14 deletions(-) diff --git a/src/st/models/contracts.zig b/src/st/models/contracts.zig index 2a48bb4..d1ba274 100644 --- a/src/st/models/contracts.zig +++ b/src/st/models/contracts.zig @@ -1,10 +1,10 @@ pub const Contract = struct { - id: u64, + id: []const u8, factionSymbol: []const u8, - type: Type, - terms: Terms, - accepted: bool, - fullfilled: bool, + type: Type = .PROCUREMENT, + terms: Terms = .{}, + accepted: bool = false, + fullfilled: bool = false, deadlineToAccept: []const u8, }; @@ -15,14 +15,14 @@ pub const Type = enum { }; pub const Terms = struct { - deadline: []const u8, - payment: Payment, - deliver: []Deliver, + deadline: []const u8 = "", + payment: Payment = .{}, + deliver: []Deliver = &.{}, }; pub const Payment = struct { - onAccepted: u64, - onFulfilled: u64, + onAccepted: u64 = 0, + onFulfilled: u64 = 0, }; pub const Deliver = struct { diff --git a/src/st/models/factions.zig b/src/st/models/factions.zig index b271545..81f02d2 100644 --- a/src/st/models/factions.zig +++ b/src/st/models/factions.zig @@ -89,10 +89,10 @@ pub const Trait = struct { }; pub const Faction = struct { - symbol: Symbol, + symbol: Symbol = .COSMIC, name: []const u8, - desciption: []const u8, + description: []const u8, headquarters: []const u8, - traits: []Trait, - isRecruiting: bool, + traits: []Trait = &.{}, + isRecruiting: bool = false, }; -- 2.51.2