You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

45 lines
784 B

  1. module.exports = {
  2. type: 'mounted',
  3. oldCell: null,
  4. oldSheetName: null,
  5. init: function () {
  6. let obj = this.obj;
  7. this.oldCell = obj.cell;
  8. this.oldSheetName = obj.sheetName;
  9. obj.cell = 35;
  10. obj.sheetName = 'mobs';
  11. let syncer = obj.syncer;
  12. syncer.set(false, null, 'cell', obj.cell);
  13. syncer.set(false, null, 'sheetName', obj.sheetName);
  14. },
  15. simplify: function () {
  16. return {
  17. type: 'mounted',
  18. ttl: this.ttl
  19. };
  20. },
  21. destroy: function () {
  22. let obj = this.obj;
  23. obj.cell = this.oldCell;
  24. obj.sheetName = this.oldSheetName;
  25. let syncer = obj.syncer;
  26. syncer.set(false, null, 'cell', obj.cell);
  27. syncer.set(false, null, 'sheetName', obj.sheetName);
  28. },
  29. events: {
  30. onBeforeTryMove: function (moveEvent) {
  31. moveEvent.sprintChance = 200;
  32. }
  33. }
  34. };