mirror of
https://github.com/VolmitSoftware/Iris.git
synced 2026-11-30 01:34:04 +00:00
Take only patches on their own and leave bigger module updates to the update commands
A pack used to take every newer module on load, and a major update can change the blocks it places or stop its settings from loading. Now a load takes patches only. A module with a new minor or major version stays as it is, and Iris warns that it is out of date and names the new version. /iris std update <pack> now only updates the pack's module jars, for its author to run before checking the settings against the new versions. It no longer writes the VSCode workspace; studio hotload picks up the new jars and refreshes the workspace. /iris pack update does the same for a running world, which loads the new jars at the next server start.
This commit is contained in:
1 parent
6e96c6b71e
commit
0d18637128
36 files changed
+282
-292
No files matched your search
@@ -95,7 +95,7 @@ public class CommandPack implements DirectorExecutor {
|
||||
persistValidationCache(packsRoot);
|
||||
}
|
||||
|
||||
@Director(description = "Take the module updates a world kept because they change its terrain", descriptionKey = "iris.director.commandpack.director.take_kept_module_updates")
|
||||
@Director(description = "Update the modules a world kept back", descriptionKey = "iris.director.commandpack.director.take_kept_module_updates")
|
||||
public void update(
|
||||
@Param(name = "world", description = "The Iris world whose modules to update", descriptionKey = "iris.director.commandpack.param.world_take_module_updates", contextual = true, contextualOverride = true)
|
||||
World world
|
||||
@@ -104,7 +104,7 @@ public class CommandPack implements DirectorExecutor {
|
||||
sender().sendMessage(IrisLanguage.text(BukkitCommandMessagesExtended.COMMAND_STUDIO_YOU_NEED_BE_SPECIFY_IRIS_GENERATED_WORLD));
|
||||
return;
|
||||
}
|
||||
KeptModuleUpdates.take(IrisToolbelt.access(world).getEngine().getData()).forEach(sender()::sendMessage);
|
||||
KeptModuleUpdates.takeForWorld(IrisToolbelt.access(world).getEngine().getData()).forEach(sender()::sendMessage);
|
||||
}
|
||||
|
||||
@Director(description = "Preview or apply unused-resource cleanup", descriptionKey = "iris.director.commandpack.director.preview_apply_unused_resource_cleanup", aliases = {"c"})
|
||||
|
||||
+4
-9
@@ -23,6 +23,7 @@ import art.arcane.iris.platform.bukkit.BukkitPlatform;
|
||||
import art.arcane.iris.core.IrisSettings;
|
||||
import art.arcane.iris.core.gui.ImageMapStudioGUI;
|
||||
import art.arcane.iris.core.loader.IrisData;
|
||||
import art.arcane.iris.core.modules.KeptModuleUpdates;
|
||||
import art.arcane.iris.core.modules.PackModulesListing;
|
||||
import art.arcane.iris.core.localization.IrisMessages;
|
||||
import art.arcane.iris.core.studio.bridge.StudioBridge;
|
||||
@@ -30,7 +31,6 @@ import art.arcane.iris.core.studio.bridge.StudioBridges;
|
||||
import art.arcane.iris.core.studio.bridge.StudioWindow;
|
||||
import art.arcane.iris.core.pack.PackDownloader;
|
||||
import art.arcane.iris.core.project.IrisProject;
|
||||
import art.arcane.iris.core.project.IrisCodeWorkspace;
|
||||
import art.arcane.iris.core.project.StudioEditor;
|
||||
import art.arcane.iris.core.project.StudioEditorLauncher;
|
||||
import art.arcane.iris.core.localization.RuntimeUiMessages;
|
||||
@@ -684,17 +684,12 @@ public class CommandStudio implements DirectorExecutor {
|
||||
});
|
||||
}
|
||||
|
||||
@Director(description = "Update your dimension projects VSCode workspace", descriptionKey = "iris.director.commandstudio.director.update_your_dimension_projects_vscode_workspace")
|
||||
@Director(description = "Update a pack's modules to the versions this Iris ships", descriptionKey = "iris.director.commandstudio.director.update_pack_modules")
|
||||
public void update(
|
||||
@Param(description = "The dimension to update the workspace of", descriptionKey = "iris.director.commandstudio.param.dimension_update_workspace", contextual = true, contextualOverride = true, defaultValue = "default", customHandler = DimensionHandler.class)
|
||||
@Param(description = "The pack to update", descriptionKey = "iris.director.commandstudio.param.dimension_update_modules", contextual = true, contextualOverride = true, defaultValue = "default", customHandler = DimensionHandler.class)
|
||||
IrisDimension dimension
|
||||
) {
|
||||
sender().sendMessage(IrisLanguage.text(BukkitCommandMessagesExtended.COMMAND_STUDIO_UPDATING_CODE_WORKSPACE, MessageArgument.untrusted("value", dimension.getName())));
|
||||
if (new IrisCodeWorkspace(new IrisProject(dimension.getLoader().getDataFolder())).updateWorkspace()) {
|
||||
sender().sendMessage(IrisLanguage.text(BukkitCommandMessagesExtended.COMMAND_STUDIO_UPDATED_CODE_WORKSPACE, MessageArgument.untrusted("value", dimension.getName())));
|
||||
} else {
|
||||
sender().sendMessage(IrisLanguage.text(BukkitCommandMessagesExtended.COMMAND_STUDIO_INVALID_PROJECT_TRY_DELETING_CODE_WORKSPACE_FILE_TRY_AGAIN, MessageArgument.untrusted("value", dimension.getName())));
|
||||
}
|
||||
KeptModuleUpdates.takeForPack(dimension.getLoader()).forEach(sender()::sendMessage);
|
||||
}
|
||||
|
||||
@Director(aliases = "find-objects", description = "Capture an IGenData chunk report for nearby chunks", descriptionKey = "iris.director.commandstudio.director.capture_igendata_chunk_report_nearby_chunks", origin = DirectorOrigin.PLAYER)
|
||||
|
||||
Reference in new issue
Block a user