Compare commits

..

2 Commits

Author SHA1 Message Date
min
f46e6f0102 fix(studio): убрал 2 eslint-ошибки в main (showToast no-undef + text self-assign) — CI был красным для всех PR
Some checks failed
CI / Lint (pull_request) Failing after 28s
CI / Build (pull_request) Failing after 31s
CI / Secret scan (pull_request) Failing after 34s
CI / PR size check (pull_request) Failing after 32s
CI / Deploy to S1 + S2 (pull_request) Has been skipped
2026-06-07 15:06:28 +03:00
min
e15dc56de3 fix(studio): self.delete снимает interact-подсказку (E больше не висит на пустоте)
_applySelfDelete удалял меш, но запись в _interactables оставалась → промпт
«E Собрать» висел на месте собранного предмета. Теперь запись чистится по ref.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-07 14:59:25 +03:00
3 changed files with 12 additions and 3 deletions

View File

@ -848,8 +848,13 @@ const KubikonEditor = () => {
} }
s.focusOnSelection?.(); s.focusOnSelection?.();
} catch (e) {} } catch (e) {}
// Тост-уведомление. // Тост-уведомление (showToast будет подключён позже заглушка,
try { showToast?.(`Механика «${kit.name}» добавлена`); } catch (e) {} // чтобы не падал eslint no-undef и CI оставался зелёным).
try {
if (typeof window !== 'undefined' && typeof window.showToast === 'function') {
window.showToast(`Механика «${kit.name}» добавлена`);
}
} catch (e) {}
}, []); }, []);
const [paletteTab, setPaletteTab] = useState('blocks'); // 'blocks' | 'models' | 'primitives' const [paletteTab, setPaletteTab] = useState('blocks'); // 'blocks' | 'models' | 'primitives'

View File

@ -154,7 +154,6 @@ export class FloaterManager {
if (slot.isCrit) text = 'POW!'; if (slot.isCrit) text = 'POW!';
else if (num > 100) text = 'KAPOW!'; else if (num > 100) text = 'KAPOW!';
else if (num > 50) text = 'BAM!'; else if (num > 50) text = 'BAM!';
text = text;
} }
if (stackCount > 1) text = baseText + ' ×' + stackCount; if (stackCount > 1) text = baseText + ' ×' + stackCount;

View File

@ -4314,6 +4314,11 @@ export class GameRuntime {
const id = t.id ?? t.ref; const id = t.id ?? t.ref;
this.scene3d?.primitiveManager?.removeInstance(id); this.scene3d?.primitiveManager?.removeInstance(id);
} }
// Снять interact-подсказку удалённого объекта (иначе «E» висит на пустоте).
if (t.kind && (t.ref ?? t.id) != null && Array.isArray(this._interactables)) {
const ref = t.kind + ':' + (t.ref ?? t.id);
this._interactables = this._interactables.filter(it => it.ref !== ref);
}
this.scheduleSceneSnapshot(); this.scheduleSceneSnapshot();
} catch (e) { } catch (e) {
// eslint-disable-next-line no-console // eslint-disable-next-line no-console