Implement TestClient world commands (#93)
Some checks failed
Native code generation / deterministic (push) Failing after 31s
Imaging and meshing gate / native (push) Successful in 5m30s
JPEG 2000 feature / linux (push) Successful in 2m47s
Native Rust workspace compile / compile (push) Successful in 22m56s
Skia feature / linux (push) Successful in 31m28s
Some checks failed
Native code generation / deterministic (push) Failing after 31s
Imaging and meshing gate / native (push) Successful in 5m30s
JPEG 2000 feature / linux (push) Successful in 2m47s
Native Rust workspace compile / compile (push) Successful in 22m56s
Skia feature / linux (push) Successful in 31m28s
This commit is contained in:
@@ -222,18 +222,23 @@ pub(super) struct MutationPolicy(u8);
|
||||
impl MutationPolicy {
|
||||
const MUTATIONS: u8 = 1;
|
||||
const SPENDING: u8 = 1 << 1;
|
||||
const ESTATE: u8 = 1 << 2;
|
||||
|
||||
pub(super) const fn new(mutations: bool, spending: bool) -> Self {
|
||||
Self((mutations as u8) | ((spending as u8) << 1))
|
||||
pub(super) const fn new(mutations: bool, spending: bool, estate: bool) -> Self {
|
||||
Self((mutations as u8) | ((spending as u8) << 1) | ((estate as u8) << 2))
|
||||
}
|
||||
|
||||
const fn mutations(self) -> bool {
|
||||
pub(super) const fn mutations(self) -> bool {
|
||||
self.0 & Self::MUTATIONS != 0
|
||||
}
|
||||
|
||||
const fn spending(self) -> bool {
|
||||
pub(super) const fn spending(self) -> bool {
|
||||
self.0 & Self::SPENDING != 0
|
||||
}
|
||||
|
||||
pub(super) const fn estate(self) -> bool {
|
||||
self.0 & Self::ESTATE != 0
|
||||
}
|
||||
}
|
||||
|
||||
pub(super) struct State {
|
||||
@@ -1662,7 +1667,7 @@ fn decode_tga(bytes: &[u8]) -> Result<ManagedImage, String> {
|
||||
Ok(image)
|
||||
}
|
||||
|
||||
fn encode_tga(image: &ManagedImage) -> Result<Vec<u8>, String> {
|
||||
pub(super) fn encode_tga(image: &ManagedImage) -> Result<Vec<u8>, String> {
|
||||
image
|
||||
.validate()
|
||||
.map_err(|_| "Invalid decoded image layout")?;
|
||||
|
||||
3661
programs/src/test_client/world.rs
Normal file
3661
programs/src/test_client/world.rs
Normal file
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user