Build menu: traps, doors, steel walls and siege engines; new tools unlock by mission

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Richard ZinkandClaude Opus 5.5 committed 2026-11-06 08:43:49 +01:00
1 parent d4c2260822
commit 0eebf47530
21 files changed
+30 -22

No files matched your search

+3 -3
View File
@@ -446,9 +446,9 @@ pub const CATS: [(&str, &[usize]); 7] = [
("cat.hand", &[1]),
("cat.rooms", &[2, 3, 4, 5, 6, 12, 40, 13, 18, 21, 41, 42, 43, 44, 17, 47, 49]),
("cat.towers", &[14, 15, 16, 20]),
("cat.traps", &[22, 23, 24, 25, 26, 27, 28, 29, 30, 31]),
("cat.traps", &[22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 19, 50, 51]),
("cat.spells", &[9, 10, 11, 32, 33, 34, 35, 36, 37, 38, 39, 48]),
("cat.orders", &[8, 45, 46, 7, 19, 50, 51]),
("cat.orders", &[8, 45, 46, 7]),
];
#[derive(Clone, Copy, PartialEq, Debug)]
@@ -1156,7 +1156,7 @@ impl Ui {
hover_tool = Some(i);
}
let key = if touch_ui() { "" } else { keys[i].as_str() };
let r = tool_button(bx, by, bw, ti.icon, key, &ti.label, self.tool == TOOLS[i], hovered, !g.tool_allowed(i));
let r = tool_button(bx, by, bw, ti.icon, key, &ti.label, self.tool == TOOLS[i], hovered, !g.tool_allowed(i) || (matches!(TOOLS[i], Tool::Siege(_)) && g.forge_tiles() == 0));
self.touch_btns.push((r, TBtn::Tool(i)));
}
popup_top = py0;