Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--TurtleArt/tabasics.py3
-rw-r--r--plugins/turtle_blocks_extras/turtle_blocks_extras.py11
2 files changed, 9 insertions, 5 deletions
diff --git a/TurtleArt/tabasics.py b/TurtleArt/tabasics.py
index 8586ad9..3d1eb10 100644
--- a/TurtleArt/tabasics.py
+++ b/TurtleArt/tabasics.py
@@ -278,10 +278,11 @@ turtle (can be used in place of a number block)'),
0,
lambda self: self.tw.turtles.get_active_turtle().get_heading())
+ # This block is used for holding the remote turtle name
palette.add_block('turtle-label',
hidden=True,
style='blank-style',
- label=['turtle'])
+ label=['remote turtle name'])
# Deprecated
palette.add_block('setxy',
diff --git a/plugins/turtle_blocks_extras/turtle_blocks_extras.py b/plugins/turtle_blocks_extras/turtle_blocks_extras.py
index defd35f..ea6cc79 100644
--- a/plugins/turtle_blocks_extras/turtle_blocks_extras.py
+++ b/plugins/turtle_blocks_extras/turtle_blocks_extras.py
@@ -674,11 +674,11 @@ module found in the Journal'))
palette.add_block('addturtle',
style='basic-style-1arg',
label=_('turtle'),
- prim_name='turtle',
+ prim_name='addturtle',
default=1,
string_or_number=True,
help_string=_('chooses which turtle to command'))
- self.tw.lc.def_prim('turtle', 1,
+ self.tw.lc.def_prim('addturtle', 1,
lambda self, x:
self.tw.turtles.set_turtle(x))
@@ -1575,13 +1575,16 @@ Journal objects'))
x, y = self.tw.turtles.turtle_to_screen_coordinates((x, y))
for name in block_names:
# Translate label name into block/prim name.
- if blkname in block_names[name]:
+ if blkname in block_names[name]: # block label is an array
+ print 'found a match', blkname, name, block_names[name]
if name in content_blocks or \
(name in block_primitives and
block_primitives[name] == name):
+ print '_make_block', blkname, name
return self._make_block(name, x, y, defaults)
elif blkname in block_names:
- return self._make_block(blkname, x, y, defaults)
+ print '_make_block', blkname
+ return self._make_block(blkname, x, y, defaults)
for name in special_names:
# Translate label name into block/prim name.
if blkname in special_names[name]: