mirror of
https://github.com/neocturne/MinedMap.git
synced 2025-03-04 17:23:33 +01:00
resource: rename BlockFlags to BlockFlag
The enum only holds a single flag at a time.
This commit is contained in:
parent
102baa9197
commit
db289bc077
3 changed files with 906 additions and 906 deletions
|
@ -34,7 +34,7 @@ with open(sys.argv[2], 'w') as f:
|
||||||
flags.append('Spruce')
|
flags.append('Spruce')
|
||||||
if info['water']:
|
if info['water']:
|
||||||
flags.append('Water')
|
flags.append('Water')
|
||||||
flags = 'make_bitflags!(BlockFlags::{' + '|'.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: BlockColor(%u, %u, %u) }),' % (
|
||||||
name,
|
name,
|
||||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -10,7 +10,7 @@ pub use legacy_block_types::LEGACY_BLOCK_TYPES;
|
||||||
#[bitflags]
|
#[bitflags]
|
||||||
#[repr(u8)]
|
#[repr(u8)]
|
||||||
#[derive(Debug, Clone, Copy, PartialEq)]
|
#[derive(Debug, Clone, Copy, PartialEq)]
|
||||||
pub enum BlockFlags {
|
pub enum BlockFlag {
|
||||||
Opaque,
|
Opaque,
|
||||||
Grass,
|
Grass,
|
||||||
Foliage,
|
Foliage,
|
||||||
|
@ -24,7 +24,7 @@ pub struct BlockColor(pub u8, pub u8, pub u8);
|
||||||
|
|
||||||
#[derive(Debug, Clone, Copy)]
|
#[derive(Debug, Clone, Copy)]
|
||||||
pub struct BlockType {
|
pub struct BlockType {
|
||||||
pub flags: BitFlags<BlockFlags>,
|
pub flags: BitFlags<BlockFlag>,
|
||||||
pub color: BlockColor,
|
pub color: BlockColor,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue