Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion ide/vscode/src/version.ts
Original file line number Diff line number Diff line change
@@ -1 +1 @@
export const Version = "9.0.31";
export const Version = "9.0.32";
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { OffsetWord } from 'bc-minecraft-bedrock-shared';
import { Text } from 'bc-minecraft-bedrock-project';
import { Errors } from '../..';
import { DiagnosticsBuilder } from '../../../types';
import { check_definition_value } from '../../definitions';
Expand All @@ -7,7 +8,7 @@ export function diagnose_structure_implementation(
id: OffsetWord | string,
diagnoser: DiagnosticsBuilder,
): boolean {
const strId = typeof id === 'string' ? id : id.text;
const strId = Text.UnQuote(typeof id === 'string' ? id : id.text);

const data = diagnoser.context.getProjectData().projectData;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,18 @@ describe("BehaviorPack", () => {
diagnoser.expectEmpty();
});

it("quoted structure name is looked up unquoted", () => {
data.behaviorPacks.packs[0].structures.set({
id: "mystructure:house",
documentation: "",
location: { position: 0, uri: "" },
});

diagnose_structure_implementation({ offset: 0, text: '"mystructure:house"' }, diagnoser);

diagnoser.expectEmpty();
});

it("missing structure reports error", () => {
diagnose_structure_implementation({ offset: 0, text: "puff:coin1" }, diagnoser);

Expand Down