Skip to content
Merged
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion src/proceduralItem/modifiers/restrictions/encased.zig
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,10 @@ pub fn satisfied(self: *const Encased, proceduralItem: *const ProceduralItem, x:
pub fn loadFromZon(allocator: NeverFailingAllocator, zon: ZonElement) *const Encased {
const result = allocator.create(Encased);
result.* = .{
.tag = main.Tag.find(zon.get([]const u8, "tag", "not specified")),
.tag = main.Tag.find(zon.get(?[]const u8, "tag", null) orelse blk: {
std.log.err("Could not find the tag for Encased restriction", .{});
Comment thread
Crepestrom marked this conversation as resolved.
Outdated
break :blk "not specified";
}),
.amount = zon.get(usize, "amount", 8),
};
return result;
Expand Down
Loading