mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-29 08:08:49 +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:
@@ -114,7 +114,7 @@
|
||||
if(client) //Clientless mobs can just go ahead and point
|
||||
if(ismovable(pointing_at))
|
||||
var/atom/movable/pointed_movable = pointing_at
|
||||
if(pointed_movable.flags_1 & IS_ONTOP_1)
|
||||
if(HAS_TRAIT(pointed_movable, TRAIT_SKIP_BASIC_REACH_CHECK) || pointing_at.loc.IsContainedAtomAccessible(pointing_at, src))
|
||||
pointing_at = pointed_movable.loc
|
||||
|
||||
if(!(pointing_at in view(client.view, src)))
|
||||
|
||||
Reference in New Issue
Block a user