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 newIDE/app/src/AiGeneration/Utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ export const useRefreshLimits = (

// All requests are made in orchestrator mode, and sub-agents (explorer, edit)
// are created server-side with the same tools version as the orchestrator.
export const AI_ORCHESTRATOR_TOOLS_VERSION = 'v4';
export const AI_ORCHESTRATOR_TOOLS_VERSION = 'v5';

/**
* A pending request for the user to approve (or refuse) a project-modifying
Expand Down
16 changes: 16 additions & 0 deletions newIDE/app/src/EditorFunctions/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -4566,9 +4566,16 @@ const createScene: EditorFunction = {
args,
'background_color'
);
const is_first_scene = SafeExtractor.extractBooleanProperty(
args,
'is_first_scene'
);

if (project.hasLayoutNamed(scene_name)) {
const scene = project.getLayout(scene_name);
if (is_first_scene) {
project.setFirstLayout(scene_name);
}
if (include_ui_layer && !scene.hasLayerNamed('UI')) {
scene.insertNewLayer('UI', scene.getLayersCount());
addDefaultLightToLayer(scene.getLayer('UI'));
Expand All @@ -4592,6 +4599,9 @@ const createScene: EditorFunction = {
scene.setBackgroundColor(colorAsRgb[0], colorAsRgb[1], colorAsRgb[2]);
}
addDefaultLightToAllLayers(scene);
if (is_first_scene) {
project.setFirstLayout(scene_name);
}

return {
success: true,
Expand Down Expand Up @@ -4702,6 +4712,7 @@ const inspectScenePropertiesLayersEffects: EditorFunction = {
scene.getBackgroundColorBlue()
),
stopSoundsOnStartup: scene.stopSoundsOnStartup(),
isFirstScene: project.getFirstLayout() === scene.getName(),

// Also include some project related properties:
gameResolutionWidth: project.getGameResolutionWidth(),
Expand Down Expand Up @@ -4936,6 +4947,11 @@ const changeScenePropertiesLayersEffectsGroups: EditorFunction = {
} else if (isFuzzyMatch(propertyName, 'gameName')) {
project.setName(newValue);
changes.push(`Set game name to "${newValue}".`);
} else if (isFuzzyMatch(propertyName, 'isFirstScene')) {
if (newValue.toLowerCase() === 'true') {
project.setFirstLayout(scene_name);
changes.push(`Set "${scene_name}" as the first (startup) scene.`);
}
} else {
warnings.push(`Unknown scene property: "${propertyName}". Skipped.`);
}
Expand Down
Loading