Function dfhack_remote::connect
source · pub fn connect() -> Result<Client>
Expand description
Connect to Dwarf Fortress using the default settings
It will try to connect to 127.0.0.1:5000
, DFHack default address.
The port can be overriden with DFHACK_PORT
, which is also taken in account by DFHack.
For remote connexion, see connect_to.
§Examples
use dfhack_remote;
let mut dfhack = dfhack_remote::connect().unwrap();
let df_version = dfhack.core().get_df_version().unwrap();
println!("DwarfFortress {}", df_version);