mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-24 05:30:05 +01:00
* Wendigo Mob Abilities (#83325) ## About The Pull Request Converts wendigo's abilities into mob abilities, behavior should be almost identical to how it was before. Also gave megafauna the same night vision as normal lavaland mobs since controlling them and being unable to see was difficult while testing. Wendigo's scream and slam were made into global procs so they could be used across these abilities, but if there's a better way to do that I'm open to it. ## Why It's Good For The Game More refactoring to make way for converting these all to basic megafauna. ## Changelog 🆑 refactor: Wendigos abilities have been changed into actions that can be added to any mob. /🆑 * Wendigo Mob Abilities --------- Co-authored-by: Whoneedspacee <yougotreallyowned@gmail.com>
26 lines
1009 B
Plaintext
26 lines
1009 B
Plaintext
/datum/action/cooldown/mob_cooldown/teleport
|
|
name = "Teleport"
|
|
button_icon = 'icons/mob/actions/actions_items.dmi'
|
|
button_icon_state = "sniper_zoom"
|
|
desc = "Allows you to teleport a certain distance away from a position in a random direction."
|
|
cooldown_time = 10 SECONDS
|
|
/// The distance from the target
|
|
var/radius = 6
|
|
|
|
/datum/action/cooldown/mob_cooldown/teleport/Activate(atom/target_atom)
|
|
disable_cooldown_actions()
|
|
teleport_to(target_atom)
|
|
StartCooldown()
|
|
enable_cooldown_actions()
|
|
return TRUE
|
|
|
|
/// Handles randomly teleporting the owner around the target in view
|
|
/datum/action/cooldown/mob_cooldown/teleport/proc/teleport_to(atom/teleport_target)
|
|
var/list/possible_ends = view(radius, teleport_target.loc) - view(radius - 1, teleport_target.loc)
|
|
for(var/turf/closed/cant_teleport_turf in possible_ends)
|
|
possible_ends -= cant_teleport_turf
|
|
if(!possible_ends.len)
|
|
return
|
|
var/turf/end = pick(possible_ends)
|
|
do_teleport(owner, end, 0, channel=TELEPORT_CHANNEL_BLUESPACE, forced = TRUE)
|