summaryrefslogtreecommitdiff
path: root/src/to_clt
diff options
context:
space:
mode:
authorLizzy Fleckenstein <eliasfleckenstein@web.de>2023-05-08 17:47:28 +0200
committerLizzy Fleckenstein <eliasfleckenstein@web.de>2023-05-08 17:47:28 +0200
commit2bf4f75254ddfca9ef13c6a1b2a8e6210f298ab5 (patch)
tree0b847431923bad5638e6d099cfb3f3fcefdd749c /src/to_clt
parent85d55e42119ea80cd1cd9e9e34c05ea7d07b3a88 (diff)
downloadmt_net-2bf4f75254ddfca9ef13c6a1b2a8e6210f298ab5.tar.xz
Add 'custom' field to TileDef texture
Diffstat (limited to 'src/to_clt')
-rw-r--r--src/to_clt/media.rs10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/to_clt/media.rs b/src/to_clt/media.rs
index 93f9f6c..46cf6f7 100644
--- a/src/to_clt/media.rs
+++ b/src/to_clt/media.rs
@@ -105,10 +105,18 @@ enum TileFlagInternal {
Align,
}
+#[mt_derive(to = "clt")]
+pub struct Texture {
+ pub name: String,
+ /// set to zero. use this field however you like
+ #[mt(map_ser = "|_| Ok(())", map_des = "|_: ()| Ok(0)")]
+ pub custom: usize,
+}
+
#[mt_derive(to = "clt", custom)]
pub struct TileDef {
// #[mt(const_before = "6u8")]
- pub texture: String,
+ pub texture: Texture,
pub animation: TileAnim,
pub flags: EnumSet<TileFlag>,
pub color: Option<[u8; 3]>,