Skip to content

Commit

Permalink
Fixes after the #269 changes
Browse files Browse the repository at this point in the history
  • Loading branch information
stretchyboy committed Apr 18, 2014
1 parent 1c97ab8 commit 789fe90
Show file tree
Hide file tree
Showing 17 changed files with 59 additions and 79 deletions.
6 changes: 3 additions & 3 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -87,9 +87,9 @@ <h3>Scheme Playground</h3>
<a href="languages/scheme/" target="_tab"><img class="img-responsive" src="landing/images/Javascript.png"></a>
</div>
<div class="col-md-6">
<h3>Minecraft Playground</h3>
<a href="languages/minecraftjs/" target="_tab"><img class="img-responsive" src="landing/images/minecraft_js.png" ></a>
<p>To hack live minecraft at home please follow the <a href="https://github.com/EduMake/RPi-WaterbearNodeJS" target="_tab"><b>installation instructions</b></a></p>
<h3>Node JS Playground</h3>
<a href="languages/node/" target="_tab"><img class="img-responsive" src="landing/images/node.png" ></a>
<p>Especially useful for programming on Raspberry Pi and hacking the free Minecraft Pi Edition as well as playing with buttons and gadgets at home, please follow the <a href="https://github.com/EduMake/RPi-WaterbearNodeJS" target="_tab"><b>installation instructions</b></a></p>
</div>
</div>

Expand Down
Binary file added landing/images/node.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
30 changes: 10 additions & 20 deletions languages/node/blocks/array_blockmenu.js
Original file line number Diff line number Diff line change
Expand Up @@ -120,10 +120,8 @@
{
"name": "array",
"type": "array",
"value": null
},
{
"name": "length"
"value": null,
"suffix": "length"
}
]
},
Expand Down Expand Up @@ -156,10 +154,8 @@
{
"name": "array",
"type": "array",
"value": null
},
{
"name": "pop"
"value": null,
"suffix": "pop"
}
]
},
Expand All @@ -173,10 +169,8 @@
{
"name": "array",
"type": "array",
"value": null
},
{
"name": "shift"
"value": null,
"suffix": "shift"
}
]
},
Expand All @@ -190,10 +184,8 @@
{
"name": "array",
"type": "array",
"value": null
},
{
"name": "reversed"
"value": null,
"suffix": "reversed"
}
]
},
Expand Down Expand Up @@ -249,10 +241,8 @@
{
"name": "array",
"type": "array",
"value": null
},
{
"name": "for each"
"value": null,
"suffix": "for each"
}
]
}
Expand Down
18 changes: 6 additions & 12 deletions languages/node/blocks/control_blockmenu.js
Original file line number Diff line number Diff line change
Expand Up @@ -77,10 +77,8 @@
{
"name": "Repeat",
"type": "number",
"value": "2"
},
{
"name": "times a second"
"value": "2",
"suffix": "times a second"
}
]
},
Expand Down Expand Up @@ -108,10 +106,8 @@
{
"name": "Repeat every",
"type": "number",
"value": "10"
},
{
"name": "seconds"
"value": "10",
"suffix": "seconds"
}
]
},
Expand Down Expand Up @@ -167,10 +163,8 @@
{
"name": "Wait",
"type": "number",
"value": "1"
},
{
"name": "secs"
"value": "1",
"suffix": "secs"
}
]
},
Expand Down
18 changes: 6 additions & 12 deletions languages/node/blocks/math_blockmenu.js
Original file line number Diff line number Diff line change
Expand Up @@ -310,10 +310,8 @@
{
"name": "cosine of",
"type": "number",
"value": "10"
},
{
"name": "degrees"
"value": "10",
"suffix": "degrees"
}
]
},
Expand All @@ -327,10 +325,8 @@
{
"name": "sine of",
"type": "number",
"value": "10"
},
{
"name": "degrees"
"value": "10",
"suffix": "degrees"
}
]
},
Expand All @@ -344,10 +340,8 @@
{
"name": "tangent of",
"type": "number",
"value": "10"
},
{
"name": "degrees"
"value": "10",
"suffix": "degrees"
}
]
},
Expand Down
2 changes: 1 addition & 1 deletion languages/node/blocks/mc_blocks.css
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
.blocks, .blocks .holder{
.mcblocks, .mcblocks .holder{
border-color: hsl(195, 65%, 79%);
background-color: hsl(195, 62%, 89%);
}
Expand Down
2 changes: 1 addition & 1 deletion languages/node/blocks/mc_blocks_blockmenu.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
wb.menu(
{
"sectionkey": "mcblocks",
"name": "Blocks",
"name": "Minecraft Blocks",
"help": "Find and set Minecraft Blocks",
"blocks": [
{
Expand Down
2 changes: 1 addition & 1 deletion languages/node/blocks/mc_camera.css
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
.camera, .camera .holder{
.mccamera, .mccamera .holder{
border-color: hsl(164,65%,83%);
background-color: hsl(164, 65%, 93%);
}
Expand Down
2 changes: 1 addition & 1 deletion languages/node/blocks/mc_camera_blockmenu.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
wb.menu(
{
"sectionkey": "mccamera",
"name": "Camera",
"name": "Minecraft Camera",
"help": "Manipulating the Minecraft Camera",
"blocks": [

Expand Down
2 changes: 1 addition & 1 deletion languages/node/blocks/mc_game.css
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
.minecraftgame, .minecraftgame .holder{
.mcgame, .mcgame .holder{
border-color: hsl(156, 90%, 66%);
background-color: hsl(156, 85%, 70%);
}
Expand Down
26 changes: 17 additions & 9 deletions languages/node/blocks/mc_game_blockmenu.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
'use strict';
wb.menu(
{
"sectionkey": "minecraft",
"sectionkey": "mcgame",
"name": "Minecraft Game",
"help": "Blocks which connect to and manipulate Minecraft Pi Edition",
"blocks": [
Expand All @@ -18,24 +18,32 @@
"script": "var client = new Minecraft('localhost', 4711, function() {[[1]]});",
"help": "All Minecraft things in here"
},


{
"blocktype": "step",
"id": "9161dad6-2d90-4d70-b447-5cc61130350c",
"sockets": [
{
"name": "Say",
"type": "any",
"value": "hi"
},
"type": "string",
"value": "hi",
"suffix": "in chat"
}
],
"script": "client.chat({{1}});",
"help": "Send a message as chat"
},
{
"blocktype": "step",
"id": "aded8d3e-9815-41f2-8988-dec3cca30c72",
"sockets": [
{
"name": "in chat"
"name": "Send data to chat",
"type": "any",
"value": "0"
}

],
"script": "client.chat({{1}}.toString());",
"help": "Send a message as chat"
"help": "Send data to chat (will try to convert it to text first)"
},

{
Expand Down
4 changes: 2 additions & 2 deletions languages/node/blocks/mc_game_ide.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@


wb.requiredjs.before.minecraftgame = "var Minecraft = require('minecraft-pi-vec3');\nvar v= require('vec3');";
wb.requiredjs.before.mcgame = "var Minecraft = require('minecraft-pi-vec3');\nvar v= require('vec3');";

wb.requiredjs.after.minecraftgame = "\nprocess.on('exit',function(){console.log(\"Caught exit\");client.end();});";
wb.requiredjs.after.mcgame = "\nprocess.on('exit',function(){console.log(\"Caught exit\");client.end();});";


// TODO : fix blocktypes to number or text not both
Expand Down
2 changes: 1 addition & 1 deletion languages/node/blocks/mc_player.css
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
.player, .player .holder{
.mcplayer, .mcplayer .holder{
border-color: hsl(264,62%,79%);
background-color: hsl(264,62%,89%);
}
Expand Down
2 changes: 1 addition & 1 deletion languages/node/blocks/mc_player_blockmenu.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
wb.menu(
{
"sectionkey": "mcplayer",
"name": "Player",
"name": "Minecraft Player",
"help": "Find and move Steve the Minecraft player",
"blocks": [
{
Expand Down
2 changes: 1 addition & 1 deletion languages/node/blocks/mc_position.css
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
.position, .position .holder{
.mcposition, .mcposition .holder{
border-color: hsl(115, 65%, 79%);
background-color: hsl(115, 62%, 89%);
}
Expand Down
14 changes: 5 additions & 9 deletions languages/node/blocks/mc_position_blockmenu.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
wb.menu(
{
"sectionkey": "mcposition",
"name": "Position",
"name": "Minecraft Position",
"help": "Find and change Minecraft Positions",
"blocks": [
{
Expand Down Expand Up @@ -190,10 +190,8 @@
{
"name": "position",
"type": "position",
"block": "8bb6aab6-273d-4671-8caa-9c15b5c486a7"
},
{
"name": "as text"
"block": "8bb6aab6-273d-4671-8caa-9c15b5c486a7",
"suffix": "as text"
}
],
"script": "{{1}}.toString()",
Expand Down Expand Up @@ -249,10 +247,8 @@
{
"name": "by",
"type": "number",
"value": "1"
},
{
"name": "block(s)"
"value": "1",
"suffix": "block(s)"
}
],
"script": "client.directions.forEach(function(dir, idx){var position##=client.directioncalcs[dir]({{1}},{{2}});[[1]]});",
Expand Down
6 changes: 2 additions & 4 deletions languages/node/blocks/string_blockmenu.js
Original file line number Diff line number Diff line change
Expand Up @@ -73,10 +73,8 @@
{
"name": "string",
"type": "string",
"value": null
},
{
"name": "length"
"value": null,
"suffix": "length"
}
]
},
Expand Down

0 comments on commit 789fe90

Please sign in to comment.