Skip to content

Commit

Permalink
2.0.4
Browse files Browse the repository at this point in the history
  • Loading branch information
dakln committed Nov 14, 2024
1 parent ec36ef0 commit c47c70d
Show file tree
Hide file tree
Showing 7 changed files with 15 additions and 11 deletions.
Binary file added addon_base/default.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 2 additions & 1 deletion addon_base/drawing-plugin/plugin.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@ const PLUGIN_CLASS = SDK.Plugins[ADDON_ID] = class LostDrawingPlugin extends SDK
this._info.SetIsResizable(CONFIG.IsResizable);
this._info.SetIsRotatable(CONFIG.IsRotatable);
this._info.SetIs3D(CONFIG.Is3D || false);
this._info.SetHasImage(CONFIG.HasImage || false);
this._info.SetHasImage(true);
this._info.SetDefaultImageURL('default.png');
this._info.SetIsTiled(CONFIG.IsTiled || false);
this._info.SetSupportsZElevation(CONFIG.SupportsZElevation);
this._info.SetSupportsColor(CONFIG.SupportsColor);
Expand Down
2 changes: 1 addition & 1 deletion cli.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { Colors } from "./deps.ts";
import { build } from "./cli/main.ts";
import { serveAddon } from './cli/serve-addon.ts';

const VERSION = '2.0.3'
const VERSION = '2.0.4'

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

Expand Down
5 changes: 5 additions & 0 deletions cli/drawing-plugin/create-addon-drawing-plugin-structure.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,8 @@ export async function createAddonDrawingPluginStructure(
await Deno.mkdir(BUILD_PATH);
await Deno.mkdir(`${BUILD_PATH}/c3runtime`);
await Deno.mkdir(`${BUILD_PATH}/lang`);
await Deno.mkdir(`${BUILD_PATH}/assets`);

if (SCRIPTS.length > 0) {
await Deno.mkdir(`${BUILD_PATH}/scripts`);
let destinationPath: string;
Expand Down Expand Up @@ -104,6 +106,9 @@ export async function createAddonDrawingPluginStructure(
await Deno.writeTextFile(`${BUILD_PATH}/c3runtime/type.js`, typeFileData);

if (!localBase) {

await Deno.copyFile(`${Deno.cwd()}/Addon/Assets/default.png`, `${BUILD_PATH}/assets/default.png`);

if (!ICON.isDefault) {
await Deno.copyFile(ICON.path, `${BUILD_PATH}/${ICON.filename}`);
} else {
Expand Down
10 changes: 6 additions & 4 deletions cli/plugin/create-addon-plugin-json.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,12 +30,12 @@ export async function createAddonPluginJSON({ CONFIG, ICON, SCRIPTS, FILES, MODU
"documentation": CONFIG.DocsURL,
"description": CONFIG.AddonDescription,
"editor-scripts": [
`${(CONFIG.Type === 'plugin') ? 'plugin.js' : 'behavior.js'}`,
`${(CONFIG.Type === 'plugin' || CONFIG.Type === 'drawing-plugin') ? 'plugin.js' : 'behavior.js'}`,
"type.js",
"instance.js"
],
"file-list": [
`${(CONFIG.Type === 'plugin') ? 'c3runtime/plugin.js' : 'c3runtime/behavior.js'}`,
`${(CONFIG.Type === 'plugin' || CONFIG.Type === 'drawing-plugin') ? 'c3runtime/plugin.js' : 'c3runtime/behavior.js'}`,
"c3runtime/type.js",
"c3runtime/instance.js",
"c3runtime/conditions.js",
Expand All @@ -45,13 +45,15 @@ export async function createAddonPluginJSON({ CONFIG, ICON, SCRIPTS, FILES, MODU
"lang/en-US.json",
"aces.json",
"addon.json",
`${(CONFIG.Type === 'plugin') ? 'plugin.js' : 'behavior.js'}`,
`${(CONFIG.Type === 'plugin' || CONFIG.Type === 'drawing-plugin') ? 'plugin.js' : 'behavior.js'}`,
"instance.js",
"type.js",
`${ICON.filename}`
]
};

if (CONFIG.Type === 'drawing-plugin') {
AddonJSON['file-list'].push('assets/default.png');
}
SCRIPTS.forEach(script => AddonJSON['file-list'].push(`scripts${script.relativePath}`));
FILES.forEach(file => AddonJSON['file-list'].push(`files/${file.filename}`));
MODULES.forEach(module => AddonJSON['file-list'].push(`c3runtime/Modules/${module.filename}`));
Expand Down
2 changes: 1 addition & 1 deletion deno.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@lost-c3/lib",
"version": "2.0.3",
"version": "2.0.4",
"exports": {
".": "./mod.ts",
"./cli": "./cli.ts"
Expand Down
4 changes: 0 additions & 4 deletions lib/config/Config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -221,10 +221,6 @@ interface DrawingPluginConfig extends ConfigBase {
* @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).
*/
Is3D?: boolean;
/**
* Optional. Default is **False**. Pass true to add a single editable image, such as used by the Tiled Background plugin.
*/
HasImage?: boolean;
/**
* Optional. Default is **False**. Pass true to indicate that the image is intended to be tiled.
* @description This adjusts the texture wrapping mode when Construct creates a texture for its image.
Expand Down

0 comments on commit c47c70d

Please sign in to comment.