resource: rename BlockColor to Color

The same struct will be used for biomes.
This commit is contained in:
Matthias Schiffer 2023-04-05 20:05:59 +02:00
parent f2b7808e84
commit e462e17ee2
Signed by: neocturne
GPG key ID: 16EF3F64CB201D9C
3 changed files with 941 additions and 941 deletions

View file

@ -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

View file

@ -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 {