Add a new "rechargeable" flag to items
A way to set this flag is not yet exposed in the scenario editor. The flag is intended only for non-stackable items, but this currently isn't enforced. Items now have a maximum number of charges, which is equal to their default number set in the item record. Enchanted items with charges are now rechargeable.
This commit is contained in:
@@ -464,6 +464,7 @@ void writeItemsToXml(ticpp::Printer&& data, cScenario& scenario) {
|
||||
if(item.cursed) data.PushElement("cursed", "true");
|
||||
if(item.concealed) data.PushElement("concealed", "true");
|
||||
if(item.enchanted) data.PushElement("enchanted", "true");
|
||||
if(item.rechargeable) data.PushElement("rechargeable", "true");
|
||||
if(item.unsellable) data.PushElement("unsellable", "true");
|
||||
data.CloseElement("properties");
|
||||
|
||||
|
Reference in New Issue
Block a user