mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-23 13:10:02 +01:00
Canreach refactor (#93165)
## About The Pull Request ports https://github.com/DaedalusDock/daedalusdock/pull/1144 ports https://github.com/DaedalusDock/daedalusdock/pull/1147 full credit to @Kapu1178 for the juice instead of `reacher.CanReach(target)` we now do `target.CanBeReachedBy(reacher)`, this allows us to give special behavior to atoms which we want to reach, which is exactly what I need for a feature I'm working on. ## Why It's Good For The Game allows us to be more flexible with reachability ## Changelog 🆑 refactor: refactored how reaching items works, report any oddities with being unable to reach something you should be able to! /🆑
This commit is contained in:
@@ -109,7 +109,7 @@
|
||||
|
||||
/datum/action/cooldown/mob_cooldown/exenterate/proc/slash_em(atom/caster)
|
||||
for(var/mob/living/victim in range(ability_range, caster))
|
||||
if(faction_check(victim.faction, immune_factions) && owner.CanReach(victim))
|
||||
if(faction_check(victim.faction, immune_factions) && victim.IsReachableBy(owner))
|
||||
continue
|
||||
to_chat(caster, span_warning("You slice [victim]!"))
|
||||
to_chat(victim, span_warning("You are cut by [caster]'s blades!"))
|
||||
|
||||
@@ -366,7 +366,7 @@
|
||||
update_bot_mode(new_mode = BOT_IDLE)
|
||||
return
|
||||
|
||||
if(CanReach(patient))
|
||||
if(patient.IsReachableBy(src))
|
||||
melee_attack(patient)
|
||||
|
||||
/datum/id_trim/medibot
|
||||
|
||||
Reference in New Issue
Block a user