
im trying to create an editor plugin to remove blockclips. (to make nice transitions

the problem: either im doing something wrong or it isnt allowed to remove certain blocks.
using "RemoveBlock(someCoords);" only removes "normal" blocks.
using "Blocks.removekey(someKey);" throws an error, because Blocks is const.
is there any way to do this?
this is my code:
Code: Select all
#RequireContext CEditorPlugin
#Include "TextLib" as TextLib
main(){
log("ClipRemover stars.");
declare Integer i;
foreach(index => block in Blocks){
if(TextLib::SubString(block.BlockModel.Name,TextLib::Length(block.BlockModel.Name)-4,4)=="Clip"){
i+=1;
//what to do here? :D
//RemoveBlock(block.Coord);
//Blocks.removekey(index);
}
}
log(i^" Clips should have been removed.");
while(True){
yield;
}
}
tly