mirror of
https://github.com/scratchfoundation/scratch-vm.git
synced 2024-12-24 06:52:40 -05:00
Add opcode implementation for data_deletealloflist
This commit is contained in:
parent
250b164603
commit
f7aafe4d9c
1 changed files with 8 additions and 0 deletions
|
@ -23,6 +23,7 @@ class Scratch3DataBlocks {
|
||||||
data_listcontents: this.getListContents,
|
data_listcontents: this.getListContents,
|
||||||
data_addtolist: this.addToList,
|
data_addtolist: this.addToList,
|
||||||
data_deleteoflist: this.deleteOfList,
|
data_deleteoflist: this.deleteOfList,
|
||||||
|
data_deletealloflist: this.deleteAllOfList,
|
||||||
data_insertatlist: this.insertAtList,
|
data_insertatlist: this.insertAtList,
|
||||||
data_replaceitemoflist: this.replaceItemOfList,
|
data_replaceitemoflist: this.replaceItemOfList,
|
||||||
data_itemoflist: this.getItemOfList,
|
data_itemoflist: this.getItemOfList,
|
||||||
|
@ -136,6 +137,13 @@ class Scratch3DataBlocks {
|
||||||
list._monitorUpToDate = false;
|
list._monitorUpToDate = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
deleteAllOfList (args, util) {
|
||||||
|
const list = util.target.lookupOrCreateList(
|
||||||
|
args.LIST.id, args.LIST.name);
|
||||||
|
list.value = [];
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
insertAtList (args, util) {
|
insertAtList (args, util) {
|
||||||
const item = args.ITEM;
|
const item = args.ITEM;
|
||||||
const list = util.target.lookupOrCreateList(
|
const list = util.target.lookupOrCreateList(
|
||||||
|
|
Loading…
Reference in a new issue