Skip to content

Instantly share code, notes, and snippets.

@oferchen
Created December 8, 2025 20:19
Show Gist options
  • Select an option

  • Save oferchen/07da95ea9fd2ef0f4966a09909b0d724 to your computer and use it in GitHub Desktop.

Select an option

Save oferchen/07da95ea9fd2ef0f4966a09909b0d724 to your computer and use it in GitHub Desktop.
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