diff --git a/game/src/edit/mod.rs b/game/src/edit/mod.rs index 445c0e20f7..8e55c0158a 100644 --- a/game/src/edit/mod.rs +++ b/game/src/edit/mod.rs @@ -3,6 +3,7 @@ mod stop_signs; mod traffic_signals; use self::lanes::{Brush, LaneEditor}; +pub use self::stop_signs::StopSignEditor; pub use self::traffic_signals::TrafficSignalEditor; use crate::common::{tool_panel, CommonState, Warping}; use crate::debug::DebugMode; @@ -128,9 +129,7 @@ impl State for EditMode { .per_obj .action(ctx, Key::E, format!("edit stop signs for {}", id)) { - return Transition::Push(Box::new(stop_signs::StopSignEditor::new( - id, ctx, ui, - ))); + return Transition::Push(Box::new(StopSignEditor::new(id, ctx, ui))); } else if ui .primary .map diff --git a/game/src/sandbox/mod.rs b/game/src/sandbox/mod.rs index 8ad73f92ad..4287874e6b 100644 --- a/game/src/sandbox/mod.rs +++ b/game/src/sandbox/mod.rs @@ -7,7 +7,7 @@ mod speed; pub use self::overlays::Overlays; use crate::common::{tool_panel, CommonState, Minimap}; use crate::debug::DebugMode; -use crate::edit::{apply_map_edits, save_edits, EditMode, TrafficSignalEditor}; +use crate::edit::{apply_map_edits, save_edits, EditMode, StopSignEditor, TrafficSignalEditor}; use crate::game::{State, Transition, WizardState}; use crate::helpers::ID; use crate::managed::Outcome; @@ -127,6 +127,14 @@ impl State for SandboxMode { Box::new(TrafficSignalEditor::new(i, ctx, ui, sim_copy)), ); } + if ui.primary.map.get_i(i).is_stop_sign() + && ui.per_obj.action(ctx, Key::E, "edit stop sign") + { + return Transition::PushTwice( + Box::new(EditMode::new(ctx, ui, self.gameplay.mode.clone())), + Box::new(StopSignEditor::new(i, ctx, ui)), + ); + } } if let Some(ID::BusStop(bs)) = ui.primary.current_selection { let routes = ui.primary.map.get_routes_serving_stop(bs);