roughdiamond.js 678 B

12345678910111213141516171819202122232425262728293031
  1. module.exports = class RoughDiamond {
  2. constructor() {
  3. this.id = 0;
  4. this.name = "a rough diamond";
  5. this.description = "A small piece of uncut diamond. It is a cloudy white but you can see the flat surfaces reveal a clear interior.";
  6. this.type = "item";
  7. this.keywords = ["diamond"];
  8. this.resetDelay = 12000000;
  9. this.itemExpires = 0;
  10. this.filename = "roughdiamond.js";
  11. this.value = 100;
  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. }