Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

**Added Get_List_Length_MOD, Updated JSON things to be more clear** #1040

Merged
merged 28 commits into from
Jun 6, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
b67f90f
Updated with 2 things
thekingofspace Apr 15, 2024
a6a0b26
Updated these with lint
thekingofspace Apr 19, 2024
051774d
Updated these with lint
thekingofspace Apr 19, 2024
6ab1d23
Updated canvas_create_primitive_MOD.js
thekingofspace Apr 24, 2024
3ae7fbd
Added json_read_MOD
thekingofspace Jun 3, 2024
d13cc98
Merge branch 'master' into master
thekingofspace Jun 3, 2024
b31b481
Added json_read_MOD
thekingofspace Jun 3, 2024
448684a
Merge remote-tracking branch 'origin/master'
thekingofspace Jun 3, 2024
00cf7e4
Added json_read_MOD
thekingofspace Jun 3, 2024
88b9f75
Added json_read_MOD
thekingofspace Jun 3, 2024
918a269
Fixed lint issue I hope
thekingofspace Jun 3, 2024
5d2c22b
Fixed lint issue I hope
thekingofspace Jun 3, 2024
6044bff
Fixed prettier issues
thekingofspace Jun 3, 2024
a744bcb
Added json random
thekingofspace Jun 4, 2024
a3e1010
**Changelog**
thekingofspace Jun 6, 2024
09b92e5
Merge branch 'master' into master
thekingofspace Jun 6, 2024
f4c7c7c
**Changelog**
thekingofspace Jun 6, 2024
99d6330
Merge remote-tracking branch 'origin/master'
thekingofspace Jun 6, 2024
fc97572
**Changelog**
thekingofspace Jun 6, 2024
2c24c47
**Changelog**
thekingofspace Jun 6, 2024
3bb0c99
**Changelog**
thekingofspace Jun 6, 2024
a471aa6
**Changelog**
thekingofspace Jun 6, 2024
60cf3af
**Changelog**
thekingofspace Jun 6, 2024
ead3a35
**Changelog**
thekingofspace Jun 6, 2024
b0d3620
**Changelog**
thekingofspace Jun 6, 2024
2756ffe
**Changelog**
thekingofspace Jun 6, 2024
48f73f3
Fixed Title
thekingofspace Jun 6, 2024
9c89e5c
Merge branch 'master' into master
thekingofspace Jun 6, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
62 changes: 62 additions & 0 deletions actions/get_list_length_MOD.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
module.exports = {
name: 'Get List Length MOD',
section: 'Lists and Loops',

subtitle(data, presets) {
const list = presets.lists;
return `Get ${list[parseInt(data.list, 10)]} Length`;
},

variableStorage(data, varType) {
const type = parseInt(data.storage, 10);
if (type !== varType) return;
return [data.varName2, 'Number'];
},

meta: { version: '2.1.7', preciseCheck: true, author: null, authorUrl: null, downloadUrl: null },

fields: ['list', 'varName', 'storage', 'varName2'],

html(isEvent, data) {
return `
<div>
<div style="float: left; width: 35%;">
Source List:<br>
<select id="list" class="round" onchange="glob.listChange(this, 'varNameContainer')">
${data.lists[isEvent ? 1 : 0]}
</select>
</div>
<div id="varNameContainer" style="display: none; float: right; width: 60%;">
Variable Name:<br>
<input id="varName" class="round" type="text" list="variableList"><br>
</div>
</div>

<br><br><br>

<store-in-variable style="padding-top: 8px;" dropdownLabel="Store In" selectId="storage" variableContainerId="varNameContainer2" variableInputId="varName2"></store-in-variable>`;
},

init() {
const { glob, document } = this;
glob.listChange(document.getElementById('list'), 'varNameContainer');
},

async action(cache) {
const data = cache.actions[cache.index];
const list = await this.getListFromData(data.list, data.varName, cache);
const varName2 = this.evalMessage(data.varName2, cache);
const storage2 = parseInt(data.storage, 10);

if (Array.isArray(list)) {
const length = list.length > 0 ? list.length : 'undefined';
this.storeValue(length, storage2, varName2, cache);
} else {
this.storeValue('undefined', storage2, varName2, cache);
}

this.callNextAction(cache);
},

mod() {},
};
4 changes: 2 additions & 2 deletions actions/json_check_MOD.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ module.exports = {
return `
<div style="padding: 10px;">
<span class="dbminputlabel">File Path</span>
<input id="filepath" class="round" type="text" placeholder="./data.json">
<input id="filepath" class="round" type="text" placeholder="[EXAMPLE]: ./data.json">
</div>
<div style="padding: 10px;">
<span class="dbminputlabel">Check Type</span><br>
Expand All @@ -39,7 +39,7 @@ module.exports = {
</div>
<div id="contentTitleSection" style="padding: 10px; display: none;">
<span class="dbminputlabel">Content Title</span>
<input id="contentTitle" class="round" type="text" placeholder="Content Title">
<input id="contentTitle" class="round" type="text" placeholder="Content Title (Use / to check content inside content)">
</div>
<conditional-input id="branch" style="padding-top: 8px;"></conditional-input>`;
},
Expand Down
2 changes: 1 addition & 1 deletion actions/json_random_MOD.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ module.exports = {
<div>
<div style="padding: 10px;">
<span class="dbminputlabel">File Path</span>
<input id="filepath" class="round" type="text" placeholder="./data.json">
<input id="filepath" class="round" type="text" placeholder="[EXAMPLE]: ./data.json">
</div>
<div style="padding: 10px;">
<span class="dbminputlabel">Title</span>
Expand Down
4 changes: 2 additions & 2 deletions actions/json_read_MOD.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,15 +26,15 @@ module.exports = {
<div>
<div style="padding: 10px;">
<span class="dbminputlabel">File Path</span>
<input id="filepath" class="round" type="text" placeholder="./data.json">
<input id="filepath" class="round" type="text" placeholder="[EXAMPLE]: ./data.json">
</div>
<div style="padding: 10px;">
<span class="dbminputlabel">Title</span>
<input id="title" class="round" type="text" placeholder="Title">
</div>
<div style="padding: 10px;">
<span class="dbminputlabel">Content Title</span>
<input id="contentTitle" class="round" type="text" placeholder="Content Title">
<input id="contentTitle" class="round" type="text" placeholder="Content Title (Use / to check content inside content)">
</div>
<div style="padding: 10px;">
<store-in-variable dropdownLabel="Store Result In" selectId="storage" variableContainerId="varNameContainer" variableInputId="varName"></store-in-variable>
Expand Down
4 changes: 2 additions & 2 deletions actions/json_write_MOD.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ module.exports = {
<div>
<div style="padding: 10px;">
<span class="dbminputlabel">File Path</span>
<input id="filepath" class="round" type="text" placeholder="./data.json">
<input id="filepath" class="round" type="text" placeholder="[EXAMPLE]: ./data.json">
</div>
<div style="padding: 10px;">
<span class="dbminputlabel">Action</span>
Expand All @@ -40,7 +40,7 @@ module.exports = {
</div>
<div id="contentSection" style="padding: 10px; display: none;">
<span class="dbminputlabel">Content Title</span>
<input id="contentTitle" class="round" type="text">
<input id="contentTitle" class="round" type="text" placeholder="Content Title (Use / to check content inside content)">
<br>
<span class="dbminputlabel">Content Text</span>
<input id="contentText" class="round" type="text">
Expand Down
Loading