OWOP Maps

Map system for OWOP, with included maps

目前為 2022-04-12 提交的版本,檢視 最新版本

// ==UserScript==
// @name         OWOP Maps
// @namespace    http://tampermonkey.net/
// @version      0.1
// @description  Map system for OWOP, with included maps
// @author       Mizu
// @match        https://ourworldofpixels.com/*
// @icon         https://www.google.com/s2/favicons?sz=64&domain=ourworldofpixels.com
// @grant        none
// @license      GPL-3.0
// ==/UserScript==

(function() {
    'use strict';

    // OWOP maps

    let OWOPMaps = {
        amogus: [[-16,0,[255,255,255]],[-15,0,[255,255,255]],[-14,0,[229,59,68]],[-13,0,[229,59,68]],[-12,0,[229,59,68]],[-11,0,[229,59,68]],[-10,0,[229,59,68]],[-9,0,[229,59,68]],[-8,0,[255,255,255]],[-7,0,[255,255,255]],[-16,1,[255,255,255]],[-15,1,[255,255,255]],[-14,1,[229,59,68]],[-13,1,[229,59,68]],[-12,1,[229,59,68]],[-11,1,[229,59,68]],[-10,1,[229,59,68]],[-9,1,[229,59,68]],[-8,1,[255,255,255]],[-7,1,[255,255,255]],[-16,2,[229,59,68]],[-15,2,[229,59,68]],[-14,2,[44,232,244]],[-13,2,[44,232,244]],[-12,2,[44,232,244]],[-11,2,[44,232,244]],[-10,2,[44,232,244]],[-9,2,[44,232,244]],[-8,2,[117,246,255]],[-7,2,[117,246,255]],[-16,3,[229,59,68]],[-15,3,[229,59,68]],[-14,3,[44,232,244]],[-13,3,[44,232,244]],[-12,3,[44,232,244]],[-11,3,[44,232,244]],[-10,3,[44,232,244]],[-9,3,[255,255,255]],[-8,3,[255,255,255]],[-7,3,[117,246,255]],[-16,4,[229,59,68]],[-15,4,[229,59,68]],[-14,4,[44,232,244]],[-13,4,[44,232,244]],[-12,4,[44,232,244]],[-11,4,[44,232,244]],[-10,4,[44,232,244]],[-9,4,[44,232,244]],[-8,4,[255,255,255]],[-7,4,[44,232,244]],[-16,5,[229,59,68]],[-15,5,[229,59,68]],[-14,5,[44,232,244]],[-13,5,[44,232,244]],[-12,5,[44,232,244]],[-11,5,[44,232,244]],[-10,5,[44,232,244]],[-9,5,[44,232,244]],[-8,5,[44,232,244]],[-7,5,[44,232,244]],[-16,6,[255,255,255]],[-15,6,[255,255,255]],[-14,6,[229,59,68]],[-13,6,[229,59,68]],[-12,6,[229,59,68]],[-11,6,[229,59,68]],[-10,6,[229,59,68]],[-9,6,[229,59,68]],[-8,6,[255,255,255]],[-7,6,[255,255,255]],[-16,7,[255,255,255]],[-15,7,[255,255,255]],[-14,7,[229,59,68]],[-13,7,[229,59,68]],[-12,7,[229,59,68]],[-11,7,[229,59,68]],[-10,7,[229,59,68]],[-9,7,[229,59,68]],[-8,7,[255,255,255]],[-7,7,[255,255,255]],[-16,8,[255,255,255]],[-15,8,[255,255,255]],[-14,8,[158,40,53]],[-13,8,[229,59,68]],[-12,8,[255,255,255]],[-11,8,[255,255,255]],[-10,8,[229,59,68]],[-9,8,[229,59,68]],[-8,8,[255,255,255]],[-7,8,[255,255,255]],[-16,9,[255,255,255]],[-15,9,[255,255,255]],[-14,9,[158,40,53]],[-13,9,[158,40,53]],[-12,9,[255,255,255]],[-11,9,[255,255,255]],[-10,9,[229,59,68]],[-9,9,[229,59,68]],[-8,9,[255,255,255]],[-7,9,[255,255,255]]],
    };

    function sleep(ms) {
        return new Promise(resolve => setTimeout(resolve, ms));
    }

    async function buildMap(x, y, map_array) {
        for(const cell of map_array) {
            await sleep(30);
            OWOP.world.setPixel(x + cell[0], y + cell[1], cell[2]);
        }
    }

    function createMap(x, y, w, h) {
        let found_map = []
        for(let i = y; i < y + h; i++) {
            for (let j = x; j < x + w; j++) {
                found_map.push([j + x, i + x, OWOP.world.getPixel(j, i)]);
            }
        }
        return found_map;
    }
})();

QingJ © 2025

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