1 unstable release
new 0.1.0 | Dec 8, 2024 |
---|
#1302 in Parser implementations
55 downloads per month
65KB
2K
SLoC
terra-plr-xbox360
Library for reading and modifying terraria xbox 360 player files.
Examples
Change player max life to 300
let mut player = Player::read_player(File::open("PLAYER.PLR")?)?;
player.max_life = 300;
player.write_player(File::create("PLAYER2.PLR")?, *SUPPORTED_VERSIONS.end())?;
Set 999 dirt items to first inventory slot
let mut player = Player::read(File::open("PLAYER.PLR")?)?;
player.inventory[0][0] = Some(ItemSlot {
item: Item::DirtBlock,
prefix: None,
count: PositiveI16::new(999).expect("In bounds"),
});
player.write(File::create("PLAYER2.PLR")?, *SUPPORTED_VERSIONS.end())?;
Print player name
let mut player = Player::read(File::open("PLAYER.PLR")?)?;
println!("{}", player.name);
License
AGPL v3+ © Filip K.
Dependencies
~1.5–2.4MB
~59K SLoC