undo clear items
This commit is contained in:
@@ -268,3 +268,10 @@ void cTown::set_item_taken(size_t i, bool val) {
|
||||
if(i >= item_taken.size()) item_taken.resize(i + 1);
|
||||
item_taken.set(i, val);
|
||||
}
|
||||
|
||||
bool cTown::any_items() const {
|
||||
for(cItem item: preset_items){
|
||||
if(item.code >= 0) return true;
|
||||
}
|
||||
return false;
|
||||
}
|
@@ -115,6 +115,7 @@ public:
|
||||
void set_up_lights();
|
||||
short light_obscurity(short x,short y) const; // Obscurity function used for calculating lighting
|
||||
bool is_cleaned_out() const;
|
||||
bool any_items() const;
|
||||
|
||||
explicit cTown(cScenario& scenario, size_t dim);
|
||||
void import_legacy(legacy::town_record_type& old);
|
||||
|
Reference in New Issue
Block a user