Steel walls: plate earth walls next to own ground with steel
- New tool Steel (key O, orders category; campaign from mission 11): 80 gold per earth wall, 40 for a reinforced wall; riveted iron plate texture - Heroes dig through steel 20 times slower than through earth and avoid it (path cost 300) - Selling turns a steel wall back into a reinforced wall and refunds half the plating - Texts EN/DE, test Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
f298e13d6e
commit
8853d84564
10 files changed
+156
-16
No files matched your search
+5
-3
@@ -68,7 +68,7 @@ struct Input {
|
||||
// Tile under the pointer for a tool: digging (and the hand) aim at walls too,
|
||||
// building and everything else only at the floor below the pointer
|
||||
fn tool_tile(cam: &Cam, map: &map::Map, tool: Tool, mx: f32, my: f32) -> Option<(i32, i32)> {
|
||||
if matches!(tool, Tool::Dig | Tool::Hand) {
|
||||
if matches!(tool, Tool::Dig | Tool::Hand | Tool::Steel) {
|
||||
return cam.pick_tile(map, mx, my).map(|(x, z, _)| (x, z));
|
||||
}
|
||||
let p = cam.ground_point(mx, my);
|
||||
@@ -81,7 +81,7 @@ fn tool_tile(cam: &Cam, map: &map::Map, tool: Tool, mx: f32, my: f32) -> Option<
|
||||
}
|
||||
|
||||
fn area_tool(t: Tool) -> bool {
|
||||
matches!(t, Tool::Dig | Tool::Room(_) | Tool::Sell | Tool::Bridge)
|
||||
matches!(t, Tool::Dig | Tool::Room(_) | Tool::Sell | Tool::Bridge | Tool::Steel)
|
||||
}
|
||||
|
||||
// Use the active tool on the world at (mx, my) (CSS pixels): a click, or a tap on touch screens
|
||||
@@ -94,7 +94,7 @@ fn world_action(app: &mut App, ui: &mut Ui, r3d: &R3d, inp: &mut Input, mx: f32,
|
||||
let ground = app.cam.ground_point(mx, my);
|
||||
let (wx, wy) = (ground.x, ground.y);
|
||||
match (ui.tool, tile) {
|
||||
(Tool::Dig | Tool::Room(_) | Tool::Sell | Tool::Bridge, Some(t)) => inp.ldown = Some(t),
|
||||
(Tool::Dig | Tool::Room(_) | Tool::Sell | Tool::Bridge | Tool::Steel, Some(t)) => inp.ldown = Some(t),
|
||||
(Tool::Hand, _) => {
|
||||
let j = r3d.pick_ent(&app.game, &app.cam, mx, my, false);
|
||||
if slap {
|
||||
@@ -127,6 +127,7 @@ fn finish_rect(app: &mut App, tool: Tool, start: (i32, i32), mx: f32, my: f32) {
|
||||
Tool::Room(r) => app.game.build_rect(r, sx, sy, ex, ey),
|
||||
Tool::Sell => app.game.sell_rect(sx, sy, ex, ey),
|
||||
Tool::Bridge => app.game.build_bridges(sx, sy, ex, ey),
|
||||
Tool::Steel => app.game.build_steel(sx, sy, ex, ey),
|
||||
_ => {}
|
||||
}
|
||||
}
|
||||
@@ -900,6 +901,7 @@ fn draw_frame(app: &mut App, gfx: &Gfx, r3d: &mut R3d, ui: &mut Ui, menu: &mut M
|
||||
Tool::Heal => (Color::new(0.4, 1.0, 0.5, 1.0), Some((ground.x, ground.y, 2.55))),
|
||||
Tool::Summon => (Color::new(0.8, 0.5, 1.0, 1.0), None),
|
||||
Tool::Bridge => (Color::new(0.9, 0.7, 0.4, 1.0), None),
|
||||
Tool::Steel => (Color::new(0.75, 0.8, 0.9, 1.0), None),
|
||||
Tool::Tower(_) => (Color::new(1.0, 0.6, 0.25, 1.0), None),
|
||||
};
|
||||
let ov = Overlay {
|
||||
|
||||
Reference in new issue
Block a user