Created
December 8, 2025 20:19
-
-
Save oferchen/07da95ea9fd2ef0f4966a09909b0d724 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| fn can_send_tentacle_part( | |
| tentacle_part: Entity, | |
| query: &Query<(&DwellerTentacleState, &Transform)>, | |
| target_location: Vec2, | |
| safe_width: f32, | |
| blocking_tiles: &BlockingTiles, | |
| orbs_raycast_blockers: &OrbsRaycastBlockers, | |
| ) -> bool { | |
| let (tentacle_state, tentacle_transform) = match query.get(tentacle_part) { | |
| Ok(components) => components, | |
| Err(_) => return false, | |
| }; | |
| if !matches!(tentacle_state, DwellerTentacleState::Idle) { | |
| return false; | |
| } | |
| let tentacle_origin = tentacle_transform.translation().truncate(); | |
| tentacle_part_may_be_sent( | |
| tentacle_origin, | |
| target_location, | |
| safe_width, | |
| blocking_tiles, | |
| orbs_raycast_blockers, | |
| ) | |
| } | |
| if can_send_tentacle_part( | |
| tentacle_part, | |
| &main_tentacle_parts_query, | |
| target_location, | |
| safe_width, | |
| &blocking_tiles, | |
| &orbs_raycast_blockers, | |
| ) { ... } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment