@@ -262,7 +262,7 @@ class ScriptTreeGenerator {
262262 index : this . descendInputOfBlock ( block , 'INDEX' )
263263 } ) ;
264264 case 'data_lengthoflist' :
265- return new IntermediateInput ( InputOpcode . LIST_LENGTH , InputType . NUMBER_POS_REAL | InputType . NUMBER_ZERO , {
265+ return new IntermediateInput ( InputOpcode . LIST_LENGTH , InputType . NUMBER_POS_INT | InputType . NUMBER_ZERO , {
266266 list : this . descendVariable ( block , 'LIST' , LIST_TYPE )
267267 } ) ;
268268 case 'data_listcontainsitem' :
@@ -271,7 +271,7 @@ class ScriptTreeGenerator {
271271 item : this . descendInputOfBlock ( block , 'ITEM' )
272272 } ) ;
273273 case 'data_itemnumoflist' :
274- return new IntermediateInput ( InputOpcode . LIST_INDEX_OF , InputType . NUMBER_POS_REAL | InputType . NUMBER_ZERO , {
274+ return new IntermediateInput ( InputOpcode . LIST_INDEX_OF , InputType . NUMBER_POS_INT | InputType . NUMBER_ZERO , {
275275 list : this . descendVariable ( block , 'LIST' , LIST_TYPE ) ,
276276 item : this . descendInputOfBlock ( block , 'ITEM' )
277277 } ) ;
@@ -290,12 +290,12 @@ class ScriptTreeGenerator {
290290
291291 case 'looks_backdropnumbername' :
292292 if ( block . fields . NUMBER_NAME . value === 'number' ) {
293- return new IntermediateInput ( InputOpcode . LOOKS_BACKDROP_NUMBER , InputType . NUMBER_POS_REAL ) ;
293+ return new IntermediateInput ( InputOpcode . LOOKS_BACKDROP_NUMBER , InputType . NUMBER_POS_INT ) ;
294294 }
295295 return new IntermediateInput ( InputOpcode . LOOKS_BACKDROP_NAME , InputType . STRING ) ;
296296 case 'looks_costumenumbername' :
297297 if ( block . fields . NUMBER_NAME . value === 'number' ) {
298- return new IntermediateInput ( InputOpcode . LOOKS_COSTUME_NUMBER , InputType . NUMBER_POS_REAL ) ;
298+ return new IntermediateInput ( InputOpcode . LOOKS_COSTUME_NUMBER , InputType . NUMBER_POS_INT ) ;
299299 }
300300 return new IntermediateInput ( InputOpcode . LOOKS_COSTUME_NAME , InputType . STRING ) ;
301301 case 'looks_size' :
@@ -482,13 +482,13 @@ class ScriptTreeGenerator {
482482 } ) ;
483483 case 'sensing_current' :
484484 switch ( block . fields . CURRENTMENU . value . toLowerCase ( ) ) {
485- case 'year' : return new IntermediateInput ( InputOpcode . SENSING_TIME_YEAR , InputType . NUMBER_POS_REAL | InputType . NUMBER_ZERO ) ;
486- case 'month' : return new IntermediateInput ( InputOpcode . SENSING_TIME_MONTH , InputType . NUMBER_POS_REAL ) ;
487- case 'date' : return new IntermediateInput ( InputOpcode . SENSING_TIME_DATE , InputType . NUMBER_POS_REAL ) ;
488- case 'dayofweek' : return new IntermediateInput ( InputOpcode . SENSING_TIME_WEEKDAY , InputType . NUMBER_POS_REAL ) ;
489- case 'hour' : return new IntermediateInput ( InputOpcode . SENSING_TIME_HOUR , InputType . NUMBER_POS_REAL | InputType . NUMBER_ZERO ) ;
490- case 'minute' : return new IntermediateInput ( InputOpcode . SENSING_TIME_MINUTE , InputType . NUMBER_POS_REAL | InputType . NUMBER_ZERO ) ;
491- case 'second' : return new IntermediateInput ( InputOpcode . SENSING_TIME_SECOND , InputType . NUMBER_POS_REAL | InputType . NUMBER_ZERO ) ;
485+ case 'year' : return new IntermediateInput ( InputOpcode . SENSING_TIME_YEAR , InputType . NUMBER_POS_INT | InputType . NUMBER_ZERO ) ;
486+ case 'month' : return new IntermediateInput ( InputOpcode . SENSING_TIME_MONTH , InputType . NUMBER_POS_INT ) ;
487+ case 'date' : return new IntermediateInput ( InputOpcode . SENSING_TIME_DATE , InputType . NUMBER_POS_INT ) ;
488+ case 'dayofweek' : return new IntermediateInput ( InputOpcode . SENSING_TIME_WEEKDAY , InputType . NUMBER_POS_INT ) ;
489+ case 'hour' : return new IntermediateInput ( InputOpcode . SENSING_TIME_HOUR , InputType . NUMBER_POS_INT | InputType . NUMBER_ZERO ) ;
490+ case 'minute' : return new IntermediateInput ( InputOpcode . SENSING_TIME_MINUTE , InputType . NUMBER_POS_INT | InputType . NUMBER_ZERO ) ;
491+ case 'second' : return new IntermediateInput ( InputOpcode . SENSING_TIME_SECOND , InputType . NUMBER_POS_INT | InputType . NUMBER_ZERO ) ;
492492 default : return this . createConstantInput ( 0 ) ;
493493 }
494494 case 'sensing_dayssince2000' :
@@ -523,7 +523,7 @@ class ScriptTreeGenerator {
523523 switch ( property ) {
524524 case 'background #' : // fallthrough for scratch 1.0 compatibility
525525 case 'backdrop #' :
526- return new IntermediateInput ( InputOpcode . SENSING_OF_BACKDROP_NUMBER , InputType . NUMBER_POS_REAL ) ;
526+ return new IntermediateInput ( InputOpcode . SENSING_OF_BACKDROP_NUMBER , InputType . NUMBER_POS_INT ) ;
527527 case 'backdrop name' :
528528 return new IntermediateInput ( InputOpcode . SENSING_OF_BACKDROP_NAME , InputType . STRING ) ;
529529 }
@@ -536,7 +536,7 @@ class ScriptTreeGenerator {
536536 case 'direction' :
537537 return new IntermediateInput ( InputOpcode . SENSING_OF_DIRECTION , InputType . NUMBER_REAL , { object} ) ;
538538 case 'costume #' :
539- return new IntermediateInput ( InputOpcode . SENSING_OF_COSTUME_NUMBER , InputType . NUMBER_POS_REAL , { object} ) ;
539+ return new IntermediateInput ( InputOpcode . SENSING_OF_COSTUME_NUMBER , InputType . NUMBER_POS_INT , { object} ) ;
540540 case 'costume name' :
541541 return new IntermediateInput ( InputOpcode . SENSING_OF_COSTUME_NAME , InputType . STRING , { object} ) ;
542542 case 'size' :
0 commit comments