Skip to content

Commit c47c70d

Browse files
committed
2.0.4
1 parent ec36ef0 commit c47c70d

File tree

7 files changed

+15
-11
lines changed

7 files changed

+15
-11
lines changed

addon_base/default.png

3.96 KB
Loading

addon_base/drawing-plugin/plugin.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,8 @@ const PLUGIN_CLASS = SDK.Plugins[ADDON_ID] = class LostDrawingPlugin extends SDK
2121
this._info.SetIsResizable(CONFIG.IsResizable);
2222
this._info.SetIsRotatable(CONFIG.IsRotatable);
2323
this._info.SetIs3D(CONFIG.Is3D || false);
24-
this._info.SetHasImage(CONFIG.HasImage || false);
24+
this._info.SetHasImage(true);
25+
this._info.SetDefaultImageURL('default.png');
2526
this._info.SetIsTiled(CONFIG.IsTiled || false);
2627
this._info.SetSupportsZElevation(CONFIG.SupportsZElevation);
2728
this._info.SetSupportsColor(CONFIG.SupportsColor);

cli.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import { Colors } from "./deps.ts";
66
import { build } from "./cli/main.ts";
77
import { serveAddon } from './cli/serve-addon.ts';
88

9-
const VERSION = '2.0.3'
9+
const VERSION = '2.0.4'
1010

1111
type LostCommand = 'none' | 'help' | 'version' | 'build' | 'create' | 'serve';
1212

cli/drawing-plugin/create-addon-drawing-plugin-structure.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,8 @@ export async function createAddonDrawingPluginStructure(
4242
await Deno.mkdir(BUILD_PATH);
4343
await Deno.mkdir(`${BUILD_PATH}/c3runtime`);
4444
await Deno.mkdir(`${BUILD_PATH}/lang`);
45+
await Deno.mkdir(`${BUILD_PATH}/assets`);
46+
4547
if (SCRIPTS.length > 0) {
4648
await Deno.mkdir(`${BUILD_PATH}/scripts`);
4749
let destinationPath: string;
@@ -104,6 +106,9 @@ export async function createAddonDrawingPluginStructure(
104106
await Deno.writeTextFile(`${BUILD_PATH}/c3runtime/type.js`, typeFileData);
105107

106108
if (!localBase) {
109+
110+
await Deno.copyFile(`${Deno.cwd()}/Addon/Assets/default.png`, `${BUILD_PATH}/assets/default.png`);
111+
107112
if (!ICON.isDefault) {
108113
await Deno.copyFile(ICON.path, `${BUILD_PATH}/${ICON.filename}`);
109114
} else {

cli/plugin/create-addon-plugin-json.ts

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,12 +30,12 @@ export async function createAddonPluginJSON({ CONFIG, ICON, SCRIPTS, FILES, MODU
3030
"documentation": CONFIG.DocsURL,
3131
"description": CONFIG.AddonDescription,
3232
"editor-scripts": [
33-
`${(CONFIG.Type === 'plugin') ? 'plugin.js' : 'behavior.js'}`,
33+
`${(CONFIG.Type === 'plugin' || CONFIG.Type === 'drawing-plugin') ? 'plugin.js' : 'behavior.js'}`,
3434
"type.js",
3535
"instance.js"
3636
],
3737
"file-list": [
38-
`${(CONFIG.Type === 'plugin') ? 'c3runtime/plugin.js' : 'c3runtime/behavior.js'}`,
38+
`${(CONFIG.Type === 'plugin' || CONFIG.Type === 'drawing-plugin') ? 'c3runtime/plugin.js' : 'c3runtime/behavior.js'}`,
3939
"c3runtime/type.js",
4040
"c3runtime/instance.js",
4141
"c3runtime/conditions.js",
@@ -45,13 +45,15 @@ export async function createAddonPluginJSON({ CONFIG, ICON, SCRIPTS, FILES, MODU
4545
"lang/en-US.json",
4646
"aces.json",
4747
"addon.json",
48-
`${(CONFIG.Type === 'plugin') ? 'plugin.js' : 'behavior.js'}`,
48+
`${(CONFIG.Type === 'plugin' || CONFIG.Type === 'drawing-plugin') ? 'plugin.js' : 'behavior.js'}`,
4949
"instance.js",
5050
"type.js",
5151
`${ICON.filename}`
5252
]
5353
};
54-
54+
if (CONFIG.Type === 'drawing-plugin') {
55+
AddonJSON['file-list'].push('assets/default.png');
56+
}
5557
SCRIPTS.forEach(script => AddonJSON['file-list'].push(`scripts${script.relativePath}`));
5658
FILES.forEach(file => AddonJSON['file-list'].push(`files/${file.filename}`));
5759
MODULES.forEach(module => AddonJSON['file-list'].push(`c3runtime/Modules/${module.filename}`));

deno.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@lost-c3/lib",
3-
"version": "2.0.3",
3+
"version": "2.0.4",
44
"exports": {
55
".": "./mod.ts",
66
"./cli": "./cli.ts"

lib/config/Config.ts

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -221,10 +221,6 @@ interface DrawingPluginConfig extends ConfigBase {
221221
* @description This will cause the presence of the plugin in a project to enable 3D rendering when the project Rendering mode property is set to Auto (which is the default setting).
222222
*/
223223
Is3D?: boolean;
224-
/**
225-
* Optional. Default is **False**. Pass true to add a single editable image, such as used by the Tiled Background plugin.
226-
*/
227-
HasImage?: boolean;
228224
/**
229225
* Optional. Default is **False**. Pass true to indicate that the image is intended to be tiled.
230226
* @description This adjusts the texture wrapping mode when Construct creates a texture for its image.

0 commit comments

Comments
 (0)