resource: split BlockType in Copy and !Copy parts

Preparation for actually adding !Copy fields to BlockType.

Only the Copy parts are added to the processed data, avoiding .clone()
for the most part.
This commit is contained in:
Matthias Schiffer 2023-12-30 01:42:17 +01:00
parent 1874d3082d
commit 8814dcff89
Signed by: neocturne
GPG key ID: 16EF3F64CB201D9C
6 changed files with 4073 additions and 2043 deletions

View file

@ -36,11 +36,13 @@ with open(sys.argv[2], 'w') as f:
flags.append('Water')
flags = 'make_bitflags!(BlockFlag::{' + '|'.join(flags) + '})'
print('\t("%s", BlockType { flags: %s, color: Color([%u, %u, %u]) }),' % (
name,
print('\t("%s", BlockType { ' % name, file=f)
print('\t\tblock_color: BlockColor { flags: %s, color: Color([%u, %u, %u]) },' % (
flags,
info['color']['r'],
info['color']['g'],
info['color']['b'],
), file=f)
print('}),', file=f)
print('];', file=f)