Skip to content

Commit

Permalink
v1.1.3
Browse files Browse the repository at this point in the history
  • Loading branch information
dakln committed Oct 28, 2024
1 parent f22c5ff commit 997122d
Show file tree
Hide file tree
Showing 35 changed files with 264 additions and 539 deletions.
43 changes: 22 additions & 21 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
<div align="center">
<h3>
Lost for easy making Construct 3 Addons. <br />
v1.1.3
</h3>
</div>

Expand Down Expand Up @@ -75,15 +76,15 @@ lost build
│ ├── Types/ # Addon scripts folder
│ ├── ts-defs/ # Construct 3 declaration files
│ └── global.d.ts # Declaration file for your purposes
│ ├── Instance.ts # Addon Instance class
│ ├── icon.svg # Your .svg OR .png addon icon
│ └── PluginProperties.ts # Plugin properties file
│ ├── icon.svg # Your .svg OR .png addon icon
│ └── Instance.ts # Addon Instance class
├── Builds/ # Builds folder
│ ├── Source/ # Final Construct 3 addon folder
│ └── ...
│ └── AddonId_Version.c3addon # Final .c3addon file
├── deno.json # deno.json file for Deno enviroment
├── lost.config.ts # Addon config file
├── properties.ts # Plugin properties file
```

## ⚙️ Addon config setup
Expand Down Expand Up @@ -152,8 +153,8 @@ export default Config;

## ⚙️ Specifying plugin properties

Use _`PluginProperties.ts`_ file to specify any plugin properties for your
addon. That file located in following path: `./Addon/PluginProperties.ts`.
Use _`properties.ts`_ file to specify any plugin properties for your
addon. That file located in following path: `./properties.ts`.

List of available plugin property types:

Expand All @@ -175,65 +176,65 @@ List of available plugin property types:
Example

```typescript
import { PluginProperty } from 'jsr:@lost-c3/lib';
import { Property } from 'jsr:@lost-c3/lib';

const PluginProperties: PluginProperty[] = [
new PluginProperty(
const Properties: Property[] = [
new Property(
{
Type: 'integer',
Id: 'integerProperty',
Name: 'Integer',
InitialValue: 0,
},
),
new PluginProperty(
new Property(
{
Type: 'float',
Id: 'floatProperty',
Name: 'Float',
InitialValue: 0,
},
),
new PluginProperty(
new Property(
{
Type: 'percent',
Id: 'percentProperty',
Name: 'Percent',
InitialValue: 1,
},
),
new PluginProperty(
new Property(
{
Type: 'text',
Id: 'textProperty',
Name: 'Text',
InitialValue: '...',
},
),
new PluginProperty(
new Property(
{
Type: 'longtext',
Id: 'longtextProperty',
Name: 'Long Text',
InitialValue: '',
},
),
new PluginProperty(
new Property(
{
Type: 'check',
Id: 'checkProperty',
Name: 'Check',
InitialValue: true,
},
),
new PluginProperty(
new Property(
{
Type: 'font',
Id: 'fontProperty',
Name: 'Font',
},
),
new PluginProperty(
new Property(
{
Type: 'combo',
Id: 'comboProperty',
Expand All @@ -244,28 +245,28 @@ const PluginProperties: PluginProperty[] = [
],
},
),
new PluginProperty(
new Property(
{
Type: 'color',
Id: 'colorProperty',
Name: 'Color',
},
),
new PluginProperty(
new Property(
{
Type: 'object',
Id: 'objectProperty',
Name: 'Object',
},
),
new PluginProperty(
new Property(
{
Type: 'group',
Id: 'groupProperty',
Name: 'Awesome Group',
},
),
new PluginProperty(
new Property(
{
Type: 'info',
Id: 'infoProperty',
Expand All @@ -275,7 +276,7 @@ const PluginProperties: PluginProperty[] = [
),
];

export default PluginProperties;
export default Properties;
```

## 📁 Creating category
Expand Down Expand Up @@ -311,7 +312,7 @@ export default class MyCategory {
### ⚡️ Create action

To create actions for your addon you should use _`@Action()`_ method decorator
To create actions for your addon you should use _`@Action`_ method decorator
in your category class.

Example
Expand Down
124 changes: 0 additions & 124 deletions addon_base/behavior/behavior.js

This file was deleted.

7 changes: 0 additions & 7 deletions addon_base/behavior/c3runtime/behavior.js

This file was deleted.

8 changes: 0 additions & 8 deletions addon_base/behavior/c3runtime/type.js

This file was deleted.

12 changes: 0 additions & 12 deletions addon_base/behavior/instance.js

This file was deleted.

9 changes: 0 additions & 9 deletions addon_base/behavior/type.js

This file was deleted.

3 changes: 3 additions & 0 deletions addon_base/plugin/c3runtime/actions.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
const ADDON_ID = "";
const C3 = globalThis.C3;
C3.Plugins[ADDON_ID].Acts = {};
3 changes: 3 additions & 0 deletions addon_base/plugin/c3runtime/conditions.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
const ADDON_ID = "";
const C3 = globalThis.C3;
C3.Plugins[ADDON_ID].Cnds = {};
3 changes: 3 additions & 0 deletions addon_base/plugin/c3runtime/expressions.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
const ADDON_ID = "";
const C3 = globalThis.C3;
C3.Plugins[ADDON_ID].Cnds = {};
2 changes: 1 addition & 1 deletion addon_base/plugin/c3runtime/type.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
const ADDON_ID = "";
const C3 = globalThis.C3;
C3.Plugins[ADDON_ID].Type = class LostPluginObjectType extends globalThis.ISDKObjectTypeBase {
C3.Plugins[ADDON_ID].Type = class LType extends globalThis.ISDKObjectTypeBase {
constructor() {
super();
}
Expand Down
Loading

0 comments on commit 997122d

Please sign in to comment.