mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-01-28 01:51:46 +00:00
## About The Pull Request <details> - renamed ai folder to announcer -- announcer -- - moved vox_fem to announcer - moved approachingTG to announcer - separated the ambience folder into ambience and instrumental -- ambience -- - created holy folder moved all related sounds there - created engineering folder and moved all related sounds there - created security folder and moved ambidet there - created general folder and moved ambigen there - created icemoon folder and moved all icebox-related ambience there - created medical folder and moved all medbay-related ambi there - created ruin folder and moves all ruins ambi there - created beach folder and moved seag and shore there - created lavaland folder and moved related ambi there - created aurora_caelus folder and placed its ambi there - created misc folder and moved the rest of the files that don't have a specific category into it -- instrumental -- - moved traitor folder here - created lobby_music folder and placed our songs there (title0 not used anywhere? - server-side modification?) -- items -- - moved secdeath to hailer - moved surgery to handling -- effects -- - moved chemistry into effects - moved hallucinations into effects - moved health into effects - moved magic into effects -- vehicles -- - moved mecha into vehicles created mobs folder -- mobs -- - moved creatures folder into mobs - moved voice into mobs renamed creatures to non-humanoids renamed voice to humanoids -- non-humanoids-- created cyborg folder created hiss folder moved harmalarm.ogg to cyborg -- humanoids -- -- misc -- moved ghostwhisper to misc moved insane_low_laugh to misc I give up trying to document this. </details> - [X] ambience - [x] announcer - [x] effects - [X] instrumental - [x] items - [x] machines - [x] misc - [X] mobs - [X] runtime - [X] vehicles - [ ] attributions ## Why It's Good For The Game This folder is so disorganized that it's vomit inducing, will make it easier to find and add new sounds, providng a minor structure to the sound folder. ## Changelog 🆑 grungussuss refactor: the sound folder in the source code has been reorganized, please report any oddities with sounds playing or not playing server: lobby music has been repathed to sound/music/lobby_music /🆑
63 lines
2.4 KiB
Plaintext
63 lines
2.4 KiB
Plaintext
/datum/action/cooldown/mob_cooldown/dash
|
|
name = "Dash"
|
|
button_icon = 'icons/mob/actions/actions_items.dmi'
|
|
button_icon_state = "sniper_zoom"
|
|
desc = "Allows you to dash towards a position."
|
|
cooldown_time = 1.5 SECONDS
|
|
/// The range of the dash
|
|
var/dash_range = 4
|
|
/// The distance you will be from the target after you dash
|
|
var/pick_range = 5
|
|
|
|
/datum/action/cooldown/mob_cooldown/dash/Activate(atom/target_atom)
|
|
disable_cooldown_actions()
|
|
dash_to(target_atom)
|
|
StartCooldown()
|
|
enable_cooldown_actions()
|
|
return TRUE
|
|
|
|
/datum/action/cooldown/mob_cooldown/dash/proc/dash_to(atom/dash_target)
|
|
var/list/accessable_turfs = list()
|
|
var/self_dist_to_target = 0
|
|
var/turf/own_turf = get_turf(owner)
|
|
if(!QDELETED(dash_target))
|
|
self_dist_to_target += get_dist(dash_target, own_turf)
|
|
for(var/turf/open/check_turf in RANGE_TURFS(dash_range, own_turf))
|
|
var/turf_dist_to_target = 0
|
|
if(!QDELETED(dash_target))
|
|
turf_dist_to_target += get_dist(dash_target, check_turf)
|
|
if(get_dist(owner, check_turf) >= dash_range && turf_dist_to_target <= self_dist_to_target && !islava(check_turf) && !ischasm(check_turf))
|
|
var/valid = TRUE
|
|
for(var/turf/T in get_line(own_turf, check_turf))
|
|
if(T.is_blocked_turf(TRUE))
|
|
valid = FALSE
|
|
continue
|
|
if(valid)
|
|
accessable_turfs[check_turf] = turf_dist_to_target
|
|
var/turf/target_turf
|
|
if(!QDELETED(dash_target))
|
|
var/closest_dist = dash_range
|
|
for(var/t in accessable_turfs)
|
|
if(accessable_turfs[t] < closest_dist)
|
|
closest_dist = accessable_turfs[t]
|
|
for(var/t in accessable_turfs)
|
|
if(accessable_turfs[t] != closest_dist)
|
|
accessable_turfs -= t
|
|
if(!LAZYLEN(accessable_turfs))
|
|
return
|
|
target_turf = pick(accessable_turfs)
|
|
var/turf/step_back_turf = get_step(target_turf, get_cardinal_dir(target_turf, own_turf))
|
|
var/turf/step_forward_turf = get_step(own_turf, get_cardinal_dir(own_turf, target_turf))
|
|
new /obj/effect/temp_visual/small_smoke/halfsecond(step_back_turf)
|
|
new /obj/effect/temp_visual/small_smoke/halfsecond(step_forward_turf)
|
|
var/obj/effect/temp_visual/decoy/fading/halfsecond/D = new (own_turf, owner)
|
|
owner.forceMove(step_back_turf)
|
|
playsound(own_turf, 'sound/items/weapons/punchmiss.ogg', 40, TRUE, -1)
|
|
owner.alpha = 0
|
|
animate(owner, alpha = 255, time = 5)
|
|
SLEEP_CHECK_DEATH(0.2 SECONDS, owner)
|
|
D.forceMove(step_forward_turf)
|
|
owner.forceMove(target_turf)
|
|
playsound(target_turf, 'sound/items/weapons/punchmiss.ogg', 40, TRUE, -1)
|
|
SLEEP_CHECK_DEATH(0.1 SECONDS, owner)
|