Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/MeoMix/symbiants
/ functions
Functions
394 in github.com/MeoMix/symbiants
⨍
Functions
394
◇
Types & classes
132
↓ 1 callers
Function
calculate_direction_to_target
( position: &Position, orientation: &CraterOrientation, target_position: &Position, ant_name:
simulation/src/crater_simulation/ant/follow_pheromone.rs:147
↓ 1 callers
Function
calculate_positions_in_halfcircle
This relies on an implicit field-of-view of 180 degrees. Its implementation is inspired by https://www.redblobgames.com/grids/circle-drawing/ If dynam
simulation/src/crater_simulation/ant/follow_pheromone.rs:191
↓ 1 callers
Function
can_finish_nesting
Returns true if ant is at a valid position to settle down and begin giving birth. This requires four things: 1) The ant must be underground. 2) The an
simulation/src/nest_simulation/ant/nesting.rs:248
↓ 1 callers
Function
can_start_nesting
Returns true if ant is at a valid position to begin digging out a nest chamber. This requires six things: 1) The ant must not already be creating a ne
simulation/src/nest_simulation/ant/nesting.rs:178
↓ 1 callers
Function
color32_to_bevy_color
(color: egui::Color32)
ui/src/story/settings_menu.rs:153
↓ 1 callers
Method
consume_action
This is very intentionally kept private. Movement must be consumed with action. Otherwise, systems lose their "source of truth" as to whether actions
simulation/src/common/ant/initiative.rs:49
↓ 1 callers
Function
create_save_snapshot
(world: &mut World)
simulation/src/save/save_web.rs:78
↓ 1 callers
Function
decimal_hours_to_hours_minutes
(decimal_hours: f32)
ui/src/story/settings_menu.rs:171
↓ 1 callers
Function
decimal_hours_to_hours_minutes
(decimal_hours: f32)
simulation/src/story_time.rs:355
↓ 1 callers
Method
despawn_pheromone
( &mut self, pheromone_entity: Entity, position: Position, zone: PhantomData<Z
simulation/src/common/pheromone/commands.rs:42
↓ 1 callers
Method
expires_at
(&self)
rendering/src/nest/ant/emote.rs:39
↓ 1 callers
Function
finish_digging_nest
Finish digging a nest by removing the Nesting instinct and adding the Birthing instinct. Also, drop anything the ant is carrying so that they can eat
simulation/src/nest_simulation/ant/nesting.rs:295
↓ 1 callers
Method
get_above_delta
(&self)
simulation/src/nest_simulation/ant/mod.rs:189
↓ 1 callers
Method
get_angle
(&self)
simulation/src/nest_simulation/ant/mod.rs:100
↓ 1 callers
Method
get_behind_delta
(&self)
simulation/src/nest_simulation/ant/mod.rs:185
↓ 1 callers
Method
get_below_delta
(&self)
simulation/src/nest_simulation/ant/mod.rs:181
↓ 1 callers
Function
get_element_fall_position
Search for a valid position for an element to fall into by searching to the bottom left/center/right of a given position. Prioritize falling straight
simulation/src/nest_simulation/gravity.rs:40
↓ 1 callers
Method
get_perpendicular
(&self)
simulation/src/crater_simulation/ant/mod.rs:32
↓ 1 callers
Function
get_pointer_pressed_position
( window: &Window, mouse_input: &Res<ButtonInput<MouseButton>>, touches: &Res<Touches>, )
rendering/src/common/pointer.rs:178
↓ 1 callers
Function
get_pointer_released_position
( window: &Window, mouse_input: &Res<ButtonInput<MouseButton>>, touches: &Res<Touches>, )
rendering/src/common/pointer.rs:192
↓ 1 callers
Function
get_random_name
(rng: &mut Mut<GlobalRng>)
simulation/src/common/ant/name_list.rs:7
↓ 1 callers
Method
increment
(&mut self, percent: f32)
simulation/src/common/ant/digestion.rs:44
↓ 1 callers
Method
is_at_crater
(&self)
simulation/src/nest_simulation/nest/mod.rs:29
↓ 1 callers
Method
is_at_nest
(&self)
simulation/src/nest_simulation/nest/mod.rs:25
↓ 1 callers
Method
is_full
(&self)
simulation/src/common/ant/hunger.rs:48
↓ 1 callers
Method
is_ready
(&self)
simulation/src/nest_simulation/ant/birthing.rs:47
↓ 1 callers
Method
is_starved
(&self)
simulation/src/common/ant/hunger.rs:64
↓ 1 callers
Method
is_starving
(&self)
simulation/src/common/ant/hunger.rs:60
↓ 1 callers
Method
is_within_schedule_window
(&self)
simulation/src/story_time.rs:115
↓ 1 callers
Method
max
(&self)
simulation/src/common/pheromone/mod.rs:42
↓ 1 callers
Function
pointer_action_to_simulation_event
( pointer_action: PointerAction, position: Position, zone: Z, )
rendering/src/common/pointer.rs:30
↓ 1 callers
Method
remaining
(&self)
simulation/src/story_time.rs:192
↓ 1 callers
Method
reset
(&mut self)
simulation/src/nest_simulation/ant/birthing.rs:51
↓ 1 callers
Method
rotate_clockwise
(&self)
simulation/src/crater_simulation/ant/mod.rs:83
↓ 1 callers
Method
rotate_counterclockwise
(&self)
simulation/src/crater_simulation/ant/mod.rs:92
↓ 1 callers
Method
set_value
(&mut self, value: f32)
simulation/src/common/ant/hunger.rs:40
↓ 1 callers
Function
spawn_food
( settings: &Settings, rng: &mut ResMut<GlobalRng>, commands: &mut Commands, )
simulation/src/crater_simulation/crater/mod.rs:95
↓ 1 callers
Function
start_digging_nest
Start digging a nest by digging its entrance underneath the ant's current position TODO: `commands.dig` could fail (conceptually, if worker ants exist
simulation/src/nest_simulation/ant/nesting.rs:217
↓ 1 callers
Method
tick
(&mut self)
simulation/src/story_time.rs:184
↓ 1 callers
Method
tick
(&mut self)
simulation/src/nest_simulation/ant/birthing.rs:43
↓ 1 callers
Method
tick
(&mut self)
simulation/src/common/ant/hunger.rs:44
↓ 1 callers
Method
tick
(&mut self)
simulation/src/common/ant/digestion.rs:48
↓ 1 callers
Function
try_dig
( ant_entity: &Entity, dig_position: &Position, grid_query: &Query<&Grid, With<AtNest>>, grid_
simulation/src/nest_simulation/ant/chambering.rs:159
↓ 1 callers
Function
try_dig
( ant_entity: Entity, ant_role: &AntRole, dig_position: Position, ants_query: &Query<
simulation/src/nest_simulation/ant/dig.rs:68
↓ 1 callers
Method
turn_around
(&self)
simulation/src/crater_simulation/ant/mod.rs:101
↓ 1 callers
Function
world_to_grid_position
(grid: &Grid, world_position: Vec2)
rendering/src/common/visible_grid.rs:39
Method
all_orientations
()
simulation/src/nest_simulation/ant/mod.rs:212
Method
all_orientations
()
simulation/src/crater_simulation/ant/mod.rs:39
Function
ants_add_chamber_pheromone
Apply chambering to ants which walk over tiles covered in chamber pheromone. Chambering is set to Chambering(3). This encourages ants to dig for the n
simulation/src/nest_simulation/ant/chambering.rs:90
Function
ants_add_tunnel_pheromone
Apply tunneling to ants which walk over tiles covered in tunnel pheromone. Tunneling is set to Tunneling(8). This encourages ants to prioritize diggin
simulation/src/nest_simulation/ant/tunneling.rs:179
Function
ants_birthing
( mut ants_birthing_query: Query< ( &mut Birthing, &Position,
simulation/src/nest_simulation/ant/birthing.rs:60
Function
ants_chamber_pheromone_act
If covered in Chamber pheromone then the following things need to occur: 1) Look forward in the direction the ant is facing - if something is diggable
simulation/src/nest_simulation/ant/chambering.rs:29
Function
ants_dig
( ants_query: Query< ( &NestOrientation, &AntInventory, &Initi
simulation/src/nest_simulation/ant/dig.rs:16
Function
ants_dig
( mut ants_query: Query< ( &mut CraterOrientation, &AntInventory,
simulation/src/crater_simulation/ant/dig.rs:16
Function
ants_digestion
TODO: This is (relatively) expensive to perform for the amount of value the concept adds to the user. Each tick, each ant processes any food it has in
simulation/src/common/ant/digestion.rs:58
Function
ants_drop
( ants_query: Query< ( &NestOrientation, &AntInventory, &Initi
simulation/src/nest_simulation/ant/drop.rs:16
Function
ants_emit_pheromone
( mut ants_query: Query< ( Entity, &Position, &Initiative,
simulation/src/crater_simulation/ant/emit_pheromone.rs:24
Function
ants_fade_chamber_pheromone
TODO: This is kinda weird - maybe should just diminish naturally Whenever an ant takes a step it loses 1 Chambering pheromone.
simulation/src/nest_simulation/ant/chambering.rs:127
Function
ants_fade_tunnel_pheromone
Whenever an ant takes a step it loses 1 Tunneling pheromone.
simulation/src/nest_simulation/ant/tunneling.rs:219
Function
ants_follow_pheromone
TODO: Need to make this logic more robust still. If there's stuff blocking the path between ant and strongest pheromone they'll get stuck. At time of
simulation/src/crater_simulation/ant/follow_pheromone.rs:32
Function
ants_hunger_act
( mut ants_hunger_query: Query< ( Entity, &Hunger, &mut Digest
simulation/src/common/ant/hunger.rs:82
Function
ants_hunger_regurgitate
Step 1: Find all ants which are hungry or worse. Step 2: For each hungry-or-worse ant, look at the position directly in front of it. Step 3: If there
simulation/src/common/ant/hunger.rs:154
Function
ants_hunger_tick
TODO: Ants stop getting hungry while asleep which isn't really intended, but I haven't thought through Initative removal enough clearly because someti
simulation/src/common/ant/hunger.rs:74
Function
ants_initiative
Each ant maintains an internal timer that determines when it will act next. This adds a little realism by varying when movements occur and allows for
simulation/src/common/ant/initiative.rs:61
Function
ants_nest_expansion
A worker ant may randomly decide to dig a tunnel in a tunnel east/west/south of the nest under the following conditions: 1) The ant must not be hungry
simulation/src/nest_simulation/ant/nest_expansion.rs:21
Function
ants_nesting_action
( mut ants_query: Query< ( &mut Nesting, &NestOrientation, &An
simulation/src/nest_simulation/ant/nesting.rs:103
Function
ants_nesting_movement
Ants that are building the initial nest (usually just a queen) should prioritize making it back to the nest quickly rather than wandering aimlessly on
simulation/src/nest_simulation/ant/nesting.rs:52
Function
ants_nesting_start
TODO: perf - prefer to query directly for Queen rather than filtering through all workers
simulation/src/nest_simulation/ant/nesting.rs:38
Function
ants_remove_chamber_pheromone
Ants lose Chambering when they begin carrying anything because they've fulfilled the pheromones action. Ants lose Chambering when they emerge on the s
simulation/src/nest_simulation/ant/chambering.rs:138
Function
ants_remove_tunnel_pheromone
Ants lose Tunneling when they begin carrying anything because they've fulfilled the pheromones action. Ants lose Tunneling when they emerge on the sur
simulation/src/nest_simulation/ant/tunneling.rs:230
Function
ants_set_pheromone_emitter
( ants_query: Query<(Entity, Ref<AntInventory>), With<AtCrater>>, mut commands: Commands, )
simulation/src/crater_simulation/ant/set_pheromone_emitter.rs:6
Function
ants_sleep
( ants_query: Query< (Entity, &Position, &NestOrientation, &AntInventory), (With<Initiativ
simulation/src/nest_simulation/ant/sleep.rs:20
Function
ants_sleep_emote
Periodically show sleeping emotes above sleeping ants.
rendering/src/nest/ant/emote.rs:160
Function
ants_stabilize_footing_movement
Ants walking vertically may have the ground beneath their feet disappear. Usually, this means gravity will take over and they'll fall downward, but so
simulation/src/nest_simulation/ant/wander.rs:19
Function
ants_travel_to_crater
If an ant is on the surface, and it's facing the edge of the nest, and it's not carrying anything then it is able to leave the nest and go out into th
simulation/src/nest_simulation/ant/travel.rs:24
Function
ants_travel_to_nest
If an ant walks into the "Nest Entrance" area of the crater then it is able to enter into the nest TODO: Need to more intelligently find a place to pu
simulation/src/crater_simulation/ant/travel.rs:23
Function
ants_tunnel_pheromone_act
( ants_query: Query< ( &NestOrientation, &AntInventory, &Initi
simulation/src/nest_simulation/ant/tunneling.rs:110
Function
ants_tunnel_pheromone_move
"Whenever ant walks over tile with nesting pheromone, they gain "Nesting: 8". Then, they attempt to take a step forward and decrement Nesting to 7. If
simulation/src/nest_simulation/ant/tunneling.rs:33
Function
ants_wake
( ants_query: Query<Entity, (With<Asleep>, With<AtNest>)>, mut commands: Commands, story_time: Res
simulation/src/nest_simulation/ant/sleep.rs:48
Function
ants_wander
Update the position and orientation of all ants. Does not affect the external environment.
simulation/src/nest_simulation/ant/wander.rs:46
Function
ants_wander
Wandering is a low-priority task which occurs if ants aren't following pheromones. Ant will generally try to walk forward unless it is blocked. If it'
simulation/src/crater_simulation/ant/wander.rs:16
Method
apply
(self, world: &mut World)
simulation/src/common/element/commands.rs:82
Method
apply
Spawn a new Pheromone entity and update the associate PheromoneMap cache. Performed in a custom command to provide a transactional wrapper around issu
simulation/src/common/pheromone/commands.rs:66
Method
apply_seed
(&self, world: &mut World, snapshot: &Snapshot)
simulation/src/save/save_web.rs:231
Function
begin_story
(mut next_app_state: ResMut<NextState<AppState>>)
simulation/src/app_state.rs:37
Function
bind_save_onbeforeunload
()
simulation/src/save/save_os.rs:6
Function
bind_save_onbeforeunload
()
simulation/src/save/save_web.rs:136
Method
build
(&self, app: &mut App)
src/lib.rs:10
Method
build
(&self, app: &mut App)
ui/src/lib.rs:15
Method
build
(&self, app: &mut App)
ui/src/main_menu/mod.rs:12
Method
build
(&self, app: &mut App)
ui/src/story/mod.rs:20
Method
build
(&self, app: &mut App)
simulation/src/lib.rs:47
Method
build
(&self, app: &mut App)
simulation/src/nest_simulation/mod.rs:55
Method
build
(&self, app: &mut App)
simulation/src/crater_simulation/mod.rs:39
Method
build
(&self, app: &mut App)
rendering/src/lib.rs:12
Method
build
(&self, app: &mut App)
rendering/src/nest/mod.rs:46
Method
build
(&self, app: &mut App)
rendering/src/crater/mod.rs:36
Method
build
(&self, app: &mut App)
rendering/src/common/mod.rs:150
Method
build
(&self, app: &mut App)
rendering/src/common/camera/mod.rs:122
Method
build
(&self, app: &mut App)
rendering/src/common/camera/pancam.rs:27
← previous
next →
101–200 of 394, ranked by callers