Skip to main content

Search

Trait Search 

Source
pub trait Search {
    // Required methods
    fn cell(&self, c: usize) -> i32;
    fn anywhere(&self, profession: usize) -> bool;
    fn priority(&self, workplace: usize) -> i32;
    fn reach(&mut self, cell: i32, workplace: usize) -> bool;
    fn rng(&mut self) -> &mut Random;
}
Expand description

What the workplace searches read.

Original: FUN_140115490, FUN_140115940, FUN_140115eb0.

Required Methods§

Source

fn cell(&self, c: usize) -> i32

Citizen c’s map cell.

Source

fn anywhere(&self, profession: usize) -> bool

Profession +0x4c (Professions::works_anywhere).

Source

fn priority(&self, workplace: usize) -> i32

The workplace’s work priority (Jobs entry +0x24, lower first).

Source

fn reach(&mut self, cell: i32, workplace: usize) -> bool

FUN_14011ada0: the workplace’s entrance can be reached from cell.

Source

fn rng(&mut self) -> &mut Random

The game’s random generator (the reachability test and the hiring draw from it).

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§

Source§

impl Search for TownSearch<'_, '_>