Minor workshop fixes

This commit is contained in:
Anuken
2022-04-17 11:08:51 -04:00
parent 495250850e
commit 95c34996af
4 changed files with 26 additions and 14 deletions
+1
View File
@@ -359,6 +359,7 @@ map.publish.confirm = Are you sure you want to publish this map?\n\n[lightgray]M
workshop.menu = Select what you would like to do with this item.
workshop.info = Item Info
changelog = Changelog (optional):
updatedesc = Overwrite Title & Description
eula = Steam EULA
missing = This item has been deleted or moved.\n[lightgray]The workshop listing has now been automatically un-linked.
publishing = [accent]Publishing...
+10 -1
View File
@@ -348,10 +348,19 @@ public class MapEditorDialog extends Dialog implements Disposable{
Core.app.post(() -> ui.showErrorMessage("@editor.save.noname"));
}else{
Map map = maps.all().find(m -> m.name().equals(name));
if(map != null && !map.custom){
if(map != null && !map.custom && !map.workshop){
handleSaveBuiltin(map);
}else{
boolean workshop = false;
//try to preserve Steam ID
if(map != null && map.tags.containsKey("steamid")){
editor.tags.put("steamid", map.tags.get("steamid"));
workshop = true;
}
returned = maps.saveMap(editor.tags);
if(workshop){
returned.workshop = workshop;
}
ui.showInfoFade("@editor.saved");
}
}