coal.js 655 B

12345678910111213141516171819202122232425262728293031
  1. module.exports = class Coal {
  2. constructor() {
  3. this.id = 0;
  4. this.name = "a lump of coal";
  5. this.description = "About a handful of black carbon coal. It is jagged and leaves black smudges on everything it touches.";
  6. this.type = "item";
  7. this.keywords = ["coal", "lump"];
  8. this.resetDelay = 12000000;
  9. this.itemExpires = 0;
  10. this.filename = "coal.js";
  11. this.value = 15;
  12. }
  13. mud_reset(time) {
  14. this.itemExpires = time + this.resetDelay;
  15. }
  16. mud_tick(time) {
  17. if(time >= this.itemExpires) {
  18. this.mud_reset(time);
  19. }
  20. }
  21. mud_getName() {
  22. return "{item}" + this.name + "{/item}";
  23. }
  24. mud_getDescription() {
  25. return this.description;
  26. }
  27. }