mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-07-09 15:15:34 +01:00
Kickflip action for skateboards (#70613)
## About The Pull Request port of https://github.com/BeeStation/BeeStation-Hornet/pull/7507 New hud icon for skateboard while mounted, letting you "kickflip" to put the skateboard in your hand instantly. ## Why It's Good For The Game Its really hard to pick up your skateboard, which goes against the "fast but dangerous" concept of using the skateboard and just slowing the game down as you try to target the thin sprite. This gives you an option to quickly get off, while still keeping the difficulty if you get unmounted. 🆑 add: kickflip skateboard /🆑 Co-authored-by: etherware-novice <candy@notarealaddr.com> Co-authored-by: tralezab <40974010+tralezab@users.noreply.github.com> Co-authored-by: Candycaneannihalator <candycane@thisisnotarealaddr.com> Co-authored-by: Mothblocks <35135081+Mothblocks@users.noreply.github.com>
This commit is contained in:
@@ -72,6 +72,7 @@
|
||||
/obj/vehicle/ridden/scooter/skateboard/generate_actions()
|
||||
. = ..()
|
||||
initialize_controller_action_type(/datum/action/vehicle/ridden/scooter/skateboard/ollie, VEHICLE_CONTROL_DRIVE)
|
||||
initialize_controller_action_type(/datum/action/vehicle/ridden/scooter/skateboard/kickflip, VEHICLE_CONTROL_DRIVE)
|
||||
|
||||
/obj/vehicle/ridden/scooter/skateboard/post_buckle_mob(mob/living/M)//allows skateboards to be non-dense but still allows 2 skateboarders to collide with each other
|
||||
set_density(TRUE)
|
||||
|
||||
@@ -354,7 +354,7 @@
|
||||
addtimer(CALLBACK(vehicle, TYPE_PROC_REF(/obj/vehicle/ridden/scooter/skateboard/, grind)), 2)
|
||||
else
|
||||
vehicle.obj_flags &= ~BLOCK_Z_OUT_DOWN
|
||||
rider.spin(4, 1)
|
||||
rider.spin(spintime = 4, speed = 1)
|
||||
animate(rider, pixel_y = -6, time = 4)
|
||||
animate(vehicle, pixel_y = -6, time = 3)
|
||||
playsound(vehicle, 'sound/vehicles/skateboard_ollie.ogg', 50, TRUE)
|
||||
@@ -364,6 +364,48 @@
|
||||
passtable_off(rider, VEHICLE_TRAIT)
|
||||
vehicle.pass_flags &= ~PASSTABLE
|
||||
|
||||
/datum/action/vehicle/ridden/scooter/skateboard/kickflip
|
||||
name = "Kickflip"
|
||||
desc = "Kick your board up and catch it."
|
||||
button_icon_state = "skateboard_ollie"
|
||||
check_flags = AB_CHECK_CONSCIOUS
|
||||
|
||||
/datum/action/vehicle/ridden/scooter/skateboard/kickflip/Trigger(trigger_flags)
|
||||
var/obj/vehicle/ridden/scooter/skateboard/board = vehicle_target
|
||||
var/mob/living/rider = owner
|
||||
|
||||
rider.adjustStaminaLoss(board.instability)
|
||||
if (rider.getStaminaLoss() >= 100)
|
||||
playsound(src, 'sound/effects/bang.ogg', 20, vary = TRUE)
|
||||
board.unbuckle_mob(rider)
|
||||
rider.Paralyze(50)
|
||||
if(prob(15))
|
||||
rider.visible_message(
|
||||
span_userdanger("You smack against the board, hard."),
|
||||
span_danger("[rider] misses the landing and falls on [rider.p_their()] face!)"),
|
||||
)
|
||||
rider.emote("scream")
|
||||
rider.adjustBruteLoss(10) // thats gonna leave a mark
|
||||
return
|
||||
rider.visible_message(
|
||||
span_userdanger("You fall flat onto the board!"),
|
||||
span_danger("[rider] misses the landing and falls on [rider.p_their()] face!"),
|
||||
)
|
||||
return
|
||||
|
||||
rider.visible_message(
|
||||
span_notice("[rider] does a sick kickflip and catches [rider.p_their()] board in midair."),
|
||||
span_notice("You do a sick kickflip, catching the board in midair! Stylish."),
|
||||
)
|
||||
playsound(board, 'sound/vehicles/skateboard_ollie.ogg', 50, vary = TRUE)
|
||||
rider.spin(spintime = 4, speed = 1)
|
||||
animate(rider, pixel_y = -6, time = 0.4 SECONDS)
|
||||
animate(board, pixel_y = -6, time = 0.3 SECONDS)
|
||||
board.unbuckle_mob(rider)
|
||||
addtimer(CALLBACK(board, /obj/vehicle/ridden/scooter/skateboard/proc/pick_up_board, rider), 1 SECONDS) // so the board can still handle "picking it up"
|
||||
|
||||
|
||||
|
||||
//VIM ACTION DATUMS
|
||||
|
||||
/datum/action/vehicle/sealed/climb_out/vim
|
||||
|
||||
Reference in New Issue
Block a user