Skip to content

Commit 7a6b574

Browse files
committed
add default values for material and mat_index in reaction_reagentst and reaction_productst child classes
fixes #847
1 parent fc6dcd5 commit 7a6b574

File tree

2 files changed

+7
-6
lines changed

2 files changed

+7
-6
lines changed

changelog.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ Template for new versions:
1919
# Future
2020

2121
## Structures
22+
- added default values for ``material`` and ``mat_index`` in ``reaction_reagentst`` and ``reaction_productst`` child classes
2223

2324
# 52.03-r1.1
2425

df.reaction.xml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -55,8 +55,8 @@
5555
<class-type type-name='reaction_reagent_itemst' inherits-from='reaction_reagent'>
5656
<enum base-type='int16_t' name='item_type' type-name='item_type'/>
5757
<int16_t name='item_subtype' refers-to='(item-subtype-target $$._parent.item_type $)'/>
58-
<int16_t name='mat_type' ref-target='material' aux-value='$$.mat_index'/>
59-
<int16_t name='mat_index'/>
58+
<int16_t name='mat_type' ref-target='material' aux-value='$$.mat_index' default-value='-1'/>
59+
<int16_t name='mat_index' default-value='-1'/>
6060

6161
<stl-string name='reaction_class'/>
6262
<stl-string name='has_material_reaction_product'/>
@@ -131,8 +131,8 @@
131131
<class-type type-name='reaction_product_itemst' inherits-from='reaction_product'>
132132
<enum base-type='int16_t' name='item_type' type-name='item_type'/>
133133
<int16_t name='item_subtype' refers-to='(item-subtype-target $$._parent.item_type $)'/>
134-
<int16_t name='mat_type' ref-target='material' aux-value='$$.mat_index'/>
135-
<int32_t name='mat_index'/>
134+
<int16_t name='mat_type' ref-target='material' aux-value='$$.mat_index' default-value='-1'/>
135+
<int32_t name='mat_index' default-value='-1'/>
136136

137137
<int16_t name='probability'/>
138138
<int16_t name='count'/>
@@ -161,8 +161,8 @@
161161
<enum name='improvement_type' type-name='improvement_type'/>
162162
<enum base-type='int32_t' name='improvement_specific_type' type-name='itemimprovement_specific_type'/>
163163

164-
<int16_t name='mat_type' ref-target='material' aux-value='$$.mat_index'/>
165-
<int32_t name='mat_index'/>
164+
<int16_t name='mat_type' ref-target='material' aux-value='$$.mat_index' default-value='-1'/>
165+
<int32_t name='mat_index' default-value='-1'/>
166166

167167
<int16_t name='probability'/>
168168

0 commit comments

Comments
 (0)