@@ -275,7 +275,7 @@ DFhackCExport command_result plugin_enable(color_ostream& out, bool enable) {
275275 }
276276
277277 if (enable != autoclothing_enabled) {
278- auto enabled = World::GetPersistentData (" autoclothing/enabled" );
278+ auto enabled = World::GetPersistentSiteData (" autoclothing/enabled" );
279279 autoclothing_enabled = enable;
280280 DEBUG (report, out).print (" %s from the API; persisting\n " ,
281281 autoclothing_enabled ? " enabled" : " disabled" );
@@ -695,7 +695,7 @@ static void cleanup_state(color_ostream &out)
695695
696696static void init_state (color_ostream &out)
697697{
698- auto enabled = World::GetPersistentData (" autoclothing/enabled" );
698+ auto enabled = World::GetPersistentSiteData (" autoclothing/enabled" );
699699 if (enabled.isValid () && enabled.ival (0 ) == 1 )
700700 {
701701 out << " autoclothing enabled" << endl;
@@ -708,7 +708,7 @@ static void init_state(color_ostream &out)
708708
709709 // Parse constraints
710710 vector<PersistentDataItem> items;
711- World::GetPersistentData (&items, " autoclothing/clothingItems" );
711+ World::GetPersistentSiteData (&items, " autoclothing/clothingItems" );
712712
713713 for (auto & item : items)
714714 {
@@ -723,21 +723,21 @@ static void init_state(color_ostream &out)
723723
724724static void save_state (color_ostream &out)
725725{
726- auto enabled = World::GetPersistentData (" autoclothing/enabled" );
726+ auto enabled = World::GetPersistentSiteData (" autoclothing/enabled" );
727727 if (!enabled.isValid ())
728- enabled = World::AddPersistentData (" autoclothing/enabled" );
728+ enabled = World::AddPersistentSiteData (" autoclothing/enabled" );
729729 enabled.ival (0 ) = autoclothing_enabled;
730730
731731 for (auto & order : clothingOrders)
732732 {
733- auto orderSave = World::AddPersistentData (" autoclothing/clothingItems" );
733+ auto orderSave = World::AddPersistentSiteData (" autoclothing/clothingItems" );
734734 orderSave.val () = order.Serialize ();
735735 }
736736
737737
738738 // Parse constraints
739739 vector<PersistentDataItem> items;
740- World::GetPersistentData (&items, " autoclothing/clothingItems" );
740+ World::GetPersistentSiteData (&items, " autoclothing/clothingItems" );
741741
742742 for (size_t i = 0 ; i < items.size (); i++)
743743 {
@@ -752,7 +752,7 @@ static void save_state(color_ostream &out)
752752 }
753753 for (size_t i = items.size (); i < clothingOrders.size (); i++)
754754 {
755- auto item = World::AddPersistentData (" autoclothing/clothingItems" );
755+ auto item = World::AddPersistentSiteData (" autoclothing/clothingItems" );
756756 item.val () = clothingOrders[i].Serialize ();
757757 }
758758}
0 commit comments