complete rename and init builder options

This commit is contained in:
ForestOfLight
2025-04-19 17:55:28 -07:00
Unverified
parent 818f2d0183
commit d6c9acdaab
33 changed files with 297 additions and 183 deletions
+3 -3
View File
@@ -1,7 +1,7 @@
import { forceShow } from '../utils';
import { structureCollection } from './StructureCollection';
import { MenuFormBuilder } from './MenuFormBuilder';
import { InstanceEditForm } from './InstanceEditForm';
import { InstanceForm } from './InstanceForm';
export class MenuForm {
constructor(player, { jumpToInstance = false, instanceName = void 0 } = {}) {
@@ -14,14 +14,14 @@ export class MenuForm {
if (!instanceName)
instanceName = structureCollection.getStructure(this.player.dimension.id, this.player.location, { useActiveLayer: false })?.getName();
if (structureCollection.get(instanceName)) {
new InstanceEditForm(this.player, instanceName);
new InstanceForm(this.player, instanceName);
return;
}
}
instanceName = await this.getInstanceNameFromForm();
if (!instanceName)
return;
new InstanceEditForm(this.player, instanceName);
new InstanceForm(this.player, instanceName);
}
async getInstanceNameFromForm() {