PPConf

Pixel Place Config

目前为 2022-11-06 提交的版本。查看 最新版本

此脚本不应直接安装,它是一个供其他脚本使用的外部库。如果您需要使用该库,请在脚本元属性加入:// @require https://update.gf.qytechs.cn/scripts/454335/1113858/PPConf.js

  1. // ==UserScript==
  2. // @name PPConf
  3. // @description Pixel Place Config
  4. // @version 1.6.1
  5. // @author 0vC4, XMenko
  6. // @namespace https://gf.qytechs.cn/users/670183
  7. // @match https://pixelplace.io/*
  8. // @icon https://www.google.com/s2/favicons?sz=64&domain=pixelplace.io
  9. // @license MIT
  10. // @grant none
  11. // @run-at document-start
  12. // ==/UserScript==
  13. (() => {
  14. const PPClient = window.PPClient || {modules:{}};
  15. window.PPClient = PPClient;
  16. if ('Config' in PPClient.modules) return;
  17.  
  18. const module = {};
  19. module.zero = 0xCCCCCC;
  20. module.colors = new Uint32Array([0xFFFFFF,0xC4C4C4,0x888888,0x555555,0x222222,0x000000,0x003638,0x006600,0x22B14C,0x02BE01,0x51E119,0x94E044,0x98FB98,0xFBFF5B,0xE5D900,0xE6BE0C,0xE59500,0xCE2939,0xFF416A,0xFF7000,0xA06A42,0x99530D,0x633C1F,0x6B0000,0x9F0000,0xE50000,0xFF3904,0xBB4F00,0xFF755F,0xFFC49F,0xFFDFCC,0xFFA7D1,0xCF6EE4,0x7D26CD,0xEC08EC,0x820080,0x330077,0x020763,0x5100FF,0x020763,0x0000EA,0x044BFF,0x005BA1,0x6583CF,0x36BAFF,0x0083C7,0x00D3DD,0x45FFC8,0xB5E8EE,0x2BE01,0x1B7400]);
  21. module.packetSpeed = 50;
  22. module.packetCount = null;
  23. module.silent = true;
  24. module.tickSpeed = 666;
  25. module.timer = window;
  26. module.order = 'fromCenter';
  27. module.callbacks = [];
  28. module.subscribe = (...funcs) => {
  29. module.callbacks.push(...funcs.flat());
  30. funcs.flat().map(f => f(module));
  31. };
  32.  
  33. PPClient.config = new Proxy(module, {
  34. set(target, key, value) {
  35. target[key] = value;
  36. target.callbacks.map(c => c(target));
  37. return true;
  38. }
  39. });
  40.  
  41. PPClient.modules.Config = module;
  42. })();
  43. // 0vC4#7152, XMenko#7968

QingJ © 2025

镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址