Prevented building mode from working if delete mode keybind is being
held
This commit is contained in:
@@ -37,10 +37,11 @@ handle_mouse_input :: proc(self: ^Simulator, pos: rl.Vector2) {
|
||||
// Handles left click functionality
|
||||
@(private="file")
|
||||
left_click_event :: proc(self: ^Simulator, pos: rl.Vector2) {
|
||||
if road, ok := self.highlighted_road.?; ok && self.delete_mode {
|
||||
delete_road(self, road)
|
||||
if self.delete_mode {
|
||||
if road, ok := self.highlighted_road.?; ok do delete_road(self, road)
|
||||
return
|
||||
}
|
||||
|
||||
create_road(self, pos)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user