mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-21 12:08:55 +01:00
You can attach a bell to your wheelchair (#67821)
* Bells can now be attached to wheelchairs. Co-authored-by: Mothblocks <35135081+Mothblocks@users.noreply.github.com> Co-authored-by: John Willard <53777086+JohnFulpWillard@users.noreply.github.com>
This commit is contained in:
co-authored by
Mothblocks
John Willard
parent
c2a47aae89
commit
76e2a9c292
@@ -106,3 +106,18 @@
|
||||
/obj/structure/desk_bell/speed_demon
|
||||
desc = "The cornerstone of any customer service job. This one's been modified for hyper-performance."
|
||||
ring_cooldown_length = 0
|
||||
|
||||
/obj/structure/desk_bell/MouseDrop(obj/over_object, src_location, over_location)
|
||||
if(!istype(over_object, /obj/vehicle/ridden/wheelchair))
|
||||
return
|
||||
if(!Adjacent(over_object) || !Adjacent(usr))
|
||||
return
|
||||
var/obj/vehicle/ridden/wheelchair/target = over_object
|
||||
if(target.bell_attached)
|
||||
usr.balloon_alert(usr, "already has a bell!")
|
||||
return
|
||||
usr.balloon_alert(usr, "attaching bell...")
|
||||
if(!do_after(usr, 0.5 SECONDS))
|
||||
return
|
||||
target.attach_bell(src)
|
||||
return ..()
|
||||
|
||||
@@ -282,6 +282,19 @@
|
||||
owner.say("Thank you for the fun ride, [clown.name]!")
|
||||
clown_car.increment_thanks_counter()
|
||||
|
||||
/datum/action/vehicle/ridden/wheelchair/bell
|
||||
name = "Bell Ring"
|
||||
desc = "Ring the bell."
|
||||
icon_icon = 'icons/obj/bureaucracy.dmi'
|
||||
button_icon_state = "desk_bell"
|
||||
check_flags = AB_CHECK_CONSCIOUS
|
||||
var/bell_cooldown
|
||||
|
||||
/datum/action/vehicle/ridden/wheelchair/bell/Trigger(trigger_flags)
|
||||
if(TIMER_COOLDOWN_CHECK(src, bell_cooldown))
|
||||
return
|
||||
TIMER_COOLDOWN_START(src, bell_cooldown, 0.5 SECONDS)
|
||||
playsound(vehicle_ridden_target, 'sound/machines/microwave/microwave-end.ogg', 70)
|
||||
|
||||
/datum/action/vehicle/ridden/scooter/skateboard/ollie
|
||||
name = "Ollie"
|
||||
|
||||
@@ -14,6 +14,14 @@
|
||||
var/image/wheels_overlay
|
||||
///Determines the typepath of what the object folds into
|
||||
var/foldabletype = /obj/item/wheelchair
|
||||
///Bell attached to the wheelchair, if we have one.
|
||||
var/obj/structure/desk_bell/bell_attached
|
||||
|
||||
/obj/vehicle/ridden/wheelchair/generate_actions()
|
||||
. = ..()
|
||||
if(!bell_attached)
|
||||
return
|
||||
initialize_controller_action_type(/datum/action/vehicle/ridden/wheelchair/bell, VEHICLE_CONTROL_DRIVE)
|
||||
|
||||
/obj/vehicle/ridden/wheelchair/Initialize(mapload)
|
||||
. = ..()
|
||||
@@ -56,6 +64,9 @@
|
||||
. = ..()
|
||||
if(has_buckled_mobs())
|
||||
. += wheels_overlay
|
||||
if(bell_attached)
|
||||
. += "wheelchair_bell"
|
||||
|
||||
|
||||
/// I assign the ridable element in this so i don't have to fuss with hand wheelchairs and motor wheelchairs having different subtypes
|
||||
/obj/vehicle/ridden/wheelchair/proc/make_ridable()
|
||||
@@ -117,3 +128,28 @@
|
||||
var/obj/vehicle/ridden/wheelchair/wheelchair_unfolded = new unfolded_type(location)
|
||||
wheelchair_unfolded.add_fingerprint(user)
|
||||
qdel(src)
|
||||
|
||||
|
||||
///attaches bell to the wheelchair
|
||||
/obj/vehicle/ridden/wheelchair/proc/attach_bell(obj/structure/desk_bell/bell)
|
||||
bell_attached = bell
|
||||
bell.forceMove(src)
|
||||
generate_actions()
|
||||
update_appearance()
|
||||
|
||||
/obj/vehicle/ridden/wheelchair/examine(mob/user)
|
||||
. =..()
|
||||
if(bell_attached)
|
||||
. += span_notice("There is \a [bell_attached] attached to the handle.")
|
||||
|
||||
/obj/vehicle/ridden/wheelchair/Destroy()
|
||||
if(bell_attached)
|
||||
remove_bell()
|
||||
return ..()
|
||||
|
||||
/obj/vehicle/ridden/wheelchair/proc/remove_bell()
|
||||
bell_attached.forceMove(get_turf(src))
|
||||
usr.visible_message(span_notice("[bell_attached] falls off!"))
|
||||
bell_attached = null
|
||||
update_appearance()
|
||||
|
||||
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 78 KiB After Width: | Height: | Size: 78 KiB |
Reference in New Issue
Block a user