stone.js 618 B

12345678910111213141516171819202122232425262728293031
  1. module.exports = class Stone {
  2. constructor() {
  3. this.id = 0;
  4. this.name = "a chip of stone";
  5. this.description = "A sizeable piece of stone made up of many flecks of minerals.";
  6. this.type = "item";
  7. this.keywords = ["stone", "chip"];
  8. this.resetDelay = 12000000;
  9. this.itemExpires = 0;
  10. this.filename = "stone.js";
  11. this.value = 5;
  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. }