aboutsummaryrefslogtreecommitdiff
path: root/codegen/lib/code/entity.py
diff options
context:
space:
mode:
Diffstat (limited to 'codegen/lib/code/entity.py')
-rw-r--r--codegen/lib/code/entity.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/codegen/lib/code/entity.py b/codegen/lib/code/entity.py
index 750b7ca3..250b7e70 100644
--- a/codegen/lib/code/entity.py
+++ b/codegen/lib/code/entity.py
@@ -162,14 +162,14 @@ impl From<EntityDataValue> for UpdateMetadataError {
metadata_type_data = metadata_types[type_id]
rust_type = metadata_type_data['type']
- code.append(f'#[derive(Component, Deref, DerefMut)]')
+ code.append(f'#[derive(Component, Deref, DerefMut, Clone)]')
code.append(f'pub struct {struct_name}(pub {rust_type});')
else:
# if it's a bitfield just make a struct for each bit
for mask, name in name_or_bitfield.items():
name = maybe_rename_field(name, index)
struct_name = upper_first_letter(to_camel_case(name))
- code.append(f'#[derive(Component, Deref, DerefMut)]')
+ code.append(f'#[derive(Component, Deref, DerefMut, Clone, Copy)]')
code.append(f'pub struct {struct_name}(pub bool);')
# add the entity struct and Bundle struct