chiark
/
gitweb
/
~ianmdlvl
/
otter.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
e2cb1a3
)
Provide load_inert for SimplePieceSpec
author
Ian Jackson
<ijackson@chiark.greenend.org.uk>
Fri, 15 Apr 2022 17:38:00 +0000
(18:38 +0100)
committer
Ian Jackson
<ijackson@chiark.greenend.org.uk>
Fri, 15 Apr 2022 17:39:13 +0000
(18:39 +0100)
This will let us use these as backgrounds for dice.
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
src/pieces.rs
patch
|
blob
|
history
diff --git
a/src/pieces.rs
b/src/pieces.rs
index 37297dc8a21fc510310cba6a5cd637ad160d9d9e..ab38f3c53b82d1b1e7ce48da1a78f9c1a261622a 100644
(file)
--- a/
src/pieces.rs
+++ b/
src/pieces.rs
@@
-365,6
+365,15
@@
macro_rules! impl_PieceSpec_for_SimplePieceSpec { { $ty:ty } => {
occultable: None,
}
}
+
+ #[throws(SpecError)]
+ fn load_inert(&self, _ig: &Instance, _:SpecDepth)
+ -> SpecLoaded<dyn InertPieceTrait> {
+ SpecLoaded {
+ p: Box::new(self.load_raw()?.0) as _,
+ occultable: None
+ }
+ }
}
} }