This topic is for discussing my SuperSnap mod.
what features are you adding?
Whats new in v1.0.1:
- Flat design is now dark
How do you add a block?
So what would be the code to add a new block?
Read the document.
oh, ok.
I understand adding the block, but not making the block do something
maybe.... read..... the..... document..... like.... it...... says.
In objects .js
snip
SpriteMorph.prototype.initBlocks = function () {
SpriteMorph.prototype.blocks = {
// Motion
test: {
only: SpriteMorph,
type: 'command',
category: 'motion',
spec: 'log %n',
defaults: ['hello']
},
snip
In threads.js
snip
Process.prototype.test = function (bar) { console.log(bar); };
snip
but the block doesnt show up in motion
EDIT: @helicoptur ?
Edit SpriteMorph.prototype.blockTemplates
.
It's only been 30 minutes! This isn't an instant messaging service, for the hundred thousandth time.
Where is SpriteMorph.prototype.blockTemplates?
in memory, it's located at SpriteMorph.prototype.blockTemplates
.
I mean what js file?
I don't know for sure, though I'd assume it's at src/blocks.js
.
It's actually src/objects.js
AFAIK
Nevermind, I got it
im fixing it