device templates exist now
This commit is contained in:
@@ -44,7 +44,7 @@ export class IC10Editor extends BaseElement {
|
||||
};
|
||||
sessions: Map<number, Ace.EditSession>;
|
||||
|
||||
@state() active_session: number = 0;
|
||||
@state() active_session: number = 1;
|
||||
|
||||
active_line_markers: Map<number, number | null> = new Map();
|
||||
languageProvider?: LanguageProvider;
|
||||
|
||||
@@ -74,7 +74,7 @@ export class Session extends EventTarget {
|
||||
this._programs = new Map();
|
||||
this._errors = new Map();
|
||||
this._save_timeout = undefined;
|
||||
this._activeIC = 0;
|
||||
this._activeIC = 1;
|
||||
this._activeLines = new Map();
|
||||
this.loadFromFragment();
|
||||
|
||||
@@ -201,7 +201,7 @@ export class Session extends EventTarget {
|
||||
async loadFromFragment() {
|
||||
const fragment = window.location.hash.slice(1);
|
||||
if (fragment === "demo") {
|
||||
this._programs = new Map([[0, demoCode]]);
|
||||
this._programs = new Map([[1, demoCode]]);
|
||||
this._fireOnLoad();
|
||||
return;
|
||||
}
|
||||
@@ -213,7 +213,7 @@ export class Session extends EventTarget {
|
||||
const data = getJson(txt);
|
||||
if (data === null) {
|
||||
// backwards compatible
|
||||
this._programs = new Map([[0, txt]]);
|
||||
this._programs = new Map([[1, txt]]);
|
||||
this, this._fireOnLoad();
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -2,7 +2,7 @@ import { property, state } from "lit/decorators.js";
|
||||
|
||||
import {
|
||||
DeviceRef,
|
||||
Fields,
|
||||
LogicFields,
|
||||
Reagents,
|
||||
Slot,
|
||||
Connection,
|
||||
@@ -25,7 +25,7 @@ export declare class VMDeviceMixinInterface {
|
||||
name: string | null;
|
||||
nameHash: number | null;
|
||||
prefabName: string | null;
|
||||
fields: Fields;
|
||||
fields: LogicFields;
|
||||
slots: Slot[];
|
||||
reagents: Reagents;
|
||||
connections: Connection[];
|
||||
@@ -53,7 +53,7 @@ export const VMDeviceMixin = <T extends Constructor<LitElement>>(
|
||||
@state() accessor name: string | null = null;
|
||||
@state() accessor nameHash: number | null = null;
|
||||
@state() accessor prefabName: string | null;
|
||||
@state() accessor fields: Fields;
|
||||
@state() accessor fields: LogicFields;
|
||||
@state() accessor slots: Slot[];
|
||||
@state() accessor reagents: Reagents;
|
||||
@state() accessor connections: Connection[];
|
||||
|
||||
Reference in New Issue
Block a user