diff --git a/code/modules/vehicles/bike.dm b/code/modules/vehicles/bike.dm index 94861b2c255..8fbdde35430 100644 --- a/code/modules/vehicles/bike.dm +++ b/code/modules/vehicles/bike.dm @@ -1,7 +1,7 @@ /obj/vehicle/bike name = "space-bike" desc = "Space wheelies! Woo!" - desc_info = "Drag yourself onto the bike to mount it, toggle the engine to be able to drive around. Deploy the kickstand to prevent movement by driving and dragging. Drag it onto yourself to access its mounted storage. Resist to get off." + desc_info = "Drag yourself onto the bike to mount it, toggle the engine to be able to drive around. Deploy the kickstand to prevent movement by driving and dragging. Drag it onto yourself to access its mounted storage. Resist to get off. Use ctrl-click to quickly toggle the engine if you're adjacent (only when vehicle is stationary). Alt-click will similarly toggle the kickstand." icon = 'icons/obj/bike.dmi' icon_state = "bike_off" dir = SOUTH @@ -34,6 +34,12 @@ if(storage_type) storage_compartment = new storage_type(src) +/obj/vehicle/bike/CtrlClick(var/mob/user) + if(Adjacent(user) && anchored) + toggle() + else + return ..() + /obj/vehicle/bike/verb/toggle() set name = "Toggle Engine" set category = "Vehicle" @@ -49,6 +55,12 @@ turn_off() src.visible_message("\The [src] putters before turning off.", "You hear something putter slowly.") +/obj/vehicle/bike/AltClick(var/mob/user) + if(Adjacent(user)) + kickstand(user) + else + return ..() + /obj/vehicle/bike/verb/kickstand() set name = "Toggle Kickstand" set category = "Vehicle" diff --git a/code/modules/vehicles/cargo_train.dm b/code/modules/vehicles/cargo_train.dm index 4e220594ea9..d924176db1a 100644 --- a/code/modules/vehicles/cargo_train.dm +++ b/code/modules/vehicles/cargo_train.dm @@ -1,6 +1,7 @@ /obj/vehicle/train/cargo/engine name = "cargo train tug" desc = "A ridable electric car designed for pulling cargo trolleys." + desc_info = "Use ctrl-click to quickly toggle the engine if you're adjacent (only when vehicle is stationary). Alt-click will grab the keys, if present." icon = 'icons/obj/vehicles.dmi' icon_state = "cargo_engine" on = 0 @@ -199,6 +200,21 @@ to_chat(user, "The power light is [on ? "on" : "off"].\nThere are[key ? "" : " no"] keys in the ignition.") to_chat(user, "The charge meter reads [cell? round(cell.percent(), 0.01) : 0]%") +/obj/vehicle/train/cargo/engine/CtrlClick(var/mob/user) + if(Adjacent(user)) + if(on) + stop_engine() + else + start_engine() + else + return ..() + +/obj/vehicle/train/cargo/engine/AltClick(var/mob/user) + if(Adjacent(user)) + remove_key() + else + return ..() + /obj/vehicle/train/cargo/engine/verb/start_engine() set name = "Start engine" set category = "Vehicle" diff --git a/html/changelogs/geeves-vehicle_shortcuts.yml b/html/changelogs/geeves-vehicle_shortcuts.yml new file mode 100644 index 00000000000..494e94cd90d --- /dev/null +++ b/html/changelogs/geeves-vehicle_shortcuts.yml @@ -0,0 +1,8 @@ +author: Geeves + +delete-after: True + +changes: + - rscadd: "Added the ability to ctrl and alt click vehicles to perform some actions." + - rscadd: "Bike: Ctrl is Engine (only when kickstand is down), Alt is Kickstand" + - rscadd: "Train Engine / Pussywagon: Ctrl is Engine, Alt to take Keys" \ No newline at end of file