diff --git a/code/datums/components/riding/riding.dm b/code/datums/components/riding/riding.dm index f89557f0e2a..8e5f1eab52f 100644 --- a/code/datums/components/riding/riding.dm +++ b/code/datums/components/riding/riding.dm @@ -32,6 +32,8 @@ var/override_allow_spacemove = FALSE /// can anyone other than the rider unbuckle the rider? var/can_force_unbuckle = TRUE + /// Like last_bumped for mobs, but for vehicles. Exists to allow the door bump cooldown while also passing door openings through Bumped() + var/vehicle_last_bumped = 0 /** * Ride check flags defined for the specific riding component types, so we know if we need arms, legs, or whatever. @@ -270,10 +272,12 @@ /// So we can check all occupants when we bump a door to see if anyone has access /datum/component/riding/proc/vehicle_bump(atom/movable/movable_parent, obj/machinery/door/possible_bumped_door) SIGNAL_HANDLER - if(!istype(possible_bumped_door)) + if(!istype(possible_bumped_door) || world.time - vehicle_last_bumped <= 0.3 SECONDS) return - for(var/occupant in movable_parent.buckled_mobs) - INVOKE_ASYNC(possible_bumped_door, TYPE_PROC_REF(/obj/machinery/door/, bumpopen), occupant) + for(var/mob/living/occupant in movable_parent.buckled_mobs) + vehicle_last_bumped = world.time + occupant.last_bumped = 0 + INVOKE_ASYNC(possible_bumped_door, TYPE_PROC_REF(/atom, Bumped), occupant) /datum/component/riding/proc/Unbuckle(atom/movable/M) addtimer(CALLBACK(parent, TYPE_PROC_REF(/atom/movable/, unbuckle_mob), M), 0, TIMER_UNIQUE) diff --git a/code/game/machinery/doors/door.dm b/code/game/machinery/doors/door.dm index 2288eae191e..48c7b78fbc8 100644 --- a/code/game/machinery/doors/door.dm +++ b/code/game/machinery/doors/door.dm @@ -63,7 +63,7 @@ /// Whether or not the door can crush mobs. var/can_crush = TRUE - /// Whether or not the door can be opened by hand (used for blast doors and shutters) + /// Whether or not the door can be opened by hand (used for blast doors, shutters & firelocks primarily) var/can_open_with_hands = TRUE /// Whether or not this door can be opened through a door remote, ever var/opens_with_door_remote = FALSE diff --git a/code/game/machinery/doors/firedoor.dm b/code/game/machinery/doors/firedoor.dm index 7f4fffac25b..ae6a3e002ee 100644 --- a/code/game/machinery/doors/firedoor.dm +++ b/code/game/machinery/doors/firedoor.dm @@ -21,7 +21,7 @@ closingLayer = CLOSED_FIREDOOR_LAYER armor_type = /datum/armor/door_firedoor interaction_flags_machine = INTERACT_MACHINE_WIRES_IF_OPEN | INTERACT_MACHINE_ALLOW_SILICON | INTERACT_MACHINE_OPEN_SILICON | INTERACT_MACHINE_REQUIRES_SILICON | INTERACT_MACHINE_OPEN - + can_open_with_hands = FALSE COOLDOWN_DECLARE(activation_cooldown) ///X offset for the overlay lights, so that they line up with the thin border firelocks @@ -472,9 +472,6 @@ return ..() return FALSE -/obj/machinery/door/firedoor/bumpopen(mob/living/user) - return FALSE //No bumping to open, not even in mechs - /obj/machinery/door/firedoor/proc/on_power_loss() SIGNAL_HANDLER diff --git a/code/modules/vehicles/sealed.dm b/code/modules/vehicles/sealed.dm index b1af55c67e9..4b69d990762 100644 --- a/code/modules/vehicles/sealed.dm +++ b/code/modules/vehicles/sealed.dm @@ -41,7 +41,7 @@ if(istype(A, /obj/machinery/door)) var/obj/machinery/door/conditionalwall = A for(var/mob/occupant as anything in return_controllers_with_flag(access_provider_flags)) - if(conditionalwall.try_safety_unlock(occupant)) + if(conditionalwall.try_safety_unlock(occupant) || !conditionalwall.can_open_with_hands) return conditionalwall.bumpopen(occupant)