Prevented building mode from working if delete mode keybind is being

held
This commit is contained in:
2026-04-26 13:24:40 +02:00
parent b31bbd9391
commit 73f9dc0092

View File

@@ -37,10 +37,11 @@ handle_mouse_input :: proc(self: ^Simulator, pos: rl.Vector2) {
// Handles left click functionality // Handles left click functionality
@(private="file") @(private="file")
left_click_event :: proc(self: ^Simulator, pos: rl.Vector2) { left_click_event :: proc(self: ^Simulator, pos: rl.Vector2) {
if road, ok := self.highlighted_road.?; ok && self.delete_mode { if self.delete_mode {
delete_road(self, road) if road, ok := self.highlighted_road.?; ok do delete_road(self, road)
return return
} }
create_road(self, pos) create_road(self, pos)
} }