Skip to content

Commit f41b32f

Browse files
committed
fix(editor-state): small bugfixes
1 parent 74c9bd2 commit f41b32f

File tree

4 files changed

+9
-8
lines changed

4 files changed

+9
-8
lines changed

packages/editor/packages/editor-state/src/effects/codeBlocks/graphicHelper.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -113,6 +113,7 @@ const instructionsToHighlight = [
113113
'initBlockEnd',
114114
'concat',
115115
'call',
116+
'param',
116117
];
117118

118119
export default function graphicHelper(store: StateManager<State>, events: EventDispatcher) {

packages/editor/packages/editor-state/src/effects/compiler.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ export default async function compiler(store: StateManager<State>, events: Event
104104
events.on('deleteCodeBlock', onRecompile);
105105
store.subscribe('compiler.compilerOptions', onRecompile);
106106
store.subscribe('graphicHelper.selectedCodeBlock.code', () => {
107-
if (state.graphicHelper.selectedCodeBlock?.blockType !== 'module') {
107+
if (state.graphicHelper.selectedCodeBlock?.blockType === 'config') {
108108
return;
109109
}
110110
onRecompile();

packages/editor/packages/editor-state/src/impureHelpers/config/applyConfigToState.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,10 +29,6 @@ export function applyConfigToState(store: StateManager<State>, config: ConfigObj
2929
description: config.description || '',
3030
});
3131

32-
if (typeof config.memorySizeBytes === 'number') {
33-
store.set('compiler.compilerOptions.memorySizeBytes', config.memorySizeBytes);
34-
}
35-
3632
if (Array.isArray(config.runtimeSettings)) {
3733
const validRuntimeTypes = [
3834
'WebWorkerLogicRuntime',
@@ -61,4 +57,8 @@ export function applyConfigToState(store: StateManager<State>, config: ConfigObj
6157
});
6258
}
6359
}
60+
61+
if (typeof config.memorySizeBytes === 'number') {
62+
store.set('compiler.compilerOptions.memorySizeBytes', config.memorySizeBytes);
63+
}
6464
}

src/colorSchemes/redalert.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,13 +15,13 @@ export default {
1515
fill: {
1616
menuItemBackground: '#000000',
1717
menuItemBackgroundHighlighted: '#ff9999',
18-
background: '#220000',
18+
background: '#110000',
1919
backgroundDots: '#660000',
2020
backgroundDots2: '#660000',
2121
moduleBackground: '#220000',
2222
moduleBackgroundDragged: 'rgba(34,0,0,0.8)',
23-
wire: 'rgba(255,153,153,0.6)',
24-
wireHighlighted: '#ffcccc',
23+
wire: 'rgba(255,255,255,0.7)',
24+
wireHighlighted: '#ffffff',
2525
errorMessageBackground: '#cc0000',
2626
dialogBackground: '#000000',
2727
dialogDimmer: 'rgba(0,0,0,0.5)',

0 commit comments

Comments
 (0)