@@ -222,7 +222,7 @@ const EVENT_HANDLER = {
222222 let foundMechanism = false ;
223223 const mechanismsInRobot = editor . getMechanismsFromRobot ( ) ;
224224 for ( const mechanismInRobot of mechanismsInRobot ) {
225- if ( mechanismInRobot . blockId === this . mrcMechanismBlockId ) {
225+ if ( mechanismInRobot . mechanismId === this . mrcMechanismBlockId ) {
226226 foundMechanism = true ;
227227
228228 // If the mechanism name has changed, we can handle that.
@@ -235,7 +235,7 @@ const EVENT_HANDLER = {
235235 const mechanismEvents : storageModuleContent . Event [ ] = mechanism
236236 ? editor . getEventsFromMechanism ( mechanism ) : [ ] ;
237237 for ( const mechanismEvent of mechanismEvents ) {
238- if ( mechanismEvent . blockId === this . mrcOtherBlockId ) {
238+ if ( mechanismEvent . eventId === this . mrcOtherBlockId ) {
239239 foundMechanismEvent = true ;
240240 if ( this . getFieldValue ( FIELD_EVENT_NAME ) !== mechanismEvent . name ) {
241241 this . setFieldValue ( mechanismEvent . name , FIELD_EVENT_NAME ) ;
@@ -279,7 +279,7 @@ const EVENT_HANDLER = {
279279 this . setWarningText ( null , WARNING_ID_EVENT_CHANGED ) ;
280280 }
281281 } ,
282- getEventBlockId : function ( this : EventHandlerBlock ) : string {
282+ getEventId : function ( this : EventHandlerBlock ) : string {
283283 return this . mrcOtherBlockId ;
284284 } ,
285285 renameMechanismName : function ( this : EventHandlerBlock , mechanismBlockId : string , newName : string ) : void {
@@ -447,8 +447,8 @@ function createMechanismEventHandlerBlock(
447447 const extraState : EventHandlerExtraState = {
448448 senderType : SenderType . MECHANISM ,
449449 params : [ ] ,
450- otherBlockId : event . blockId ,
451- mechanismBlockId : mechanismInRobot . blockId ,
450+ otherBlockId : event . eventId ,
451+ mechanismBlockId : mechanismInRobot . mechanismId ,
452452 } ;
453453 event . args . forEach ( arg => {
454454 extraState . params . push ( {
0 commit comments