mirror of
https://github.com/neocturne/MinedMap.git
synced 2025-03-04 17:23:33 +01:00
resource: rename BlockColor to Color
The same struct will be used for biomes.
This commit is contained in:
parent
f2b7808e84
commit
e462e17ee2
3 changed files with 941 additions and 941 deletions
|
@ -36,7 +36,7 @@ with open(sys.argv[2], 'w') as f:
|
||||||
flags.append('Water')
|
flags.append('Water')
|
||||||
flags = 'make_bitflags!(BlockFlag::{' + '|'.join(flags) + '})'
|
flags = 'make_bitflags!(BlockFlag::{' + '|'.join(flags) + '})'
|
||||||
|
|
||||||
print('\t("%s", BlockType { flags: %s, color: BlockColor([%u, %u, %u]) }),' % (
|
print('\t("%s", BlockType { flags: %s, color: Color([%u, %u, %u]) }),' % (
|
||||||
name,
|
name,
|
||||||
flags,
|
flags,
|
||||||
info['color']['r'],
|
info['color']['r'],
|
||||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -34,7 +34,7 @@ where
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug, Clone, Copy, Serialize, Deserialize)]
|
#[derive(Debug, Clone, Copy, Serialize, Deserialize)]
|
||||||
pub struct BlockColor(pub [u8; 3]);
|
pub struct Color(pub [u8; 3]);
|
||||||
|
|
||||||
#[derive(Debug, Clone, Copy, Serialize, Deserialize)]
|
#[derive(Debug, Clone, Copy, Serialize, Deserialize)]
|
||||||
pub struct BlockType {
|
pub struct BlockType {
|
||||||
|
@ -43,7 +43,7 @@ pub struct BlockType {
|
||||||
deserialize_with = "deserialize_block_flags"
|
deserialize_with = "deserialize_block_flags"
|
||||||
)]
|
)]
|
||||||
pub flags: BitFlags<BlockFlag>,
|
pub flags: BitFlags<BlockFlag>,
|
||||||
pub color: BlockColor,
|
pub color: Color,
|
||||||
}
|
}
|
||||||
|
|
||||||
impl BlockType {
|
impl BlockType {
|
||||||
|
|
Loading…
Add table
Reference in a new issue