Greasy Fork is available in English.

Zombacode

By [Q1] eh#2907

This script should not be not be installed directly. It is a library for other scripts to include with the meta directive // @require https://update.greasyfork.org/scripts/426924/933864/Zombacode.js

    window.sortEntities = (...options) => {
        var optionMatchMap = {};
        for(let i in game.world.entities) {
            let match = [];
            let ei = game.world.entities[i].targetTick;
            let opCount = 0;

            options.forEach((option => {
                option.attrs.forEach((attr => {
                    try {
                        match.push(ei[attr.name] === attr.eq);
                    } catch {
                        match.push(false);
                    };
                }));
                if(match.includes(true)) {
                    optionMatchMap[opCount] = {
                        eq: match,
                        uid: i
                    };
                };
                opCount++;
            }));
        };
        return optionMatchMap;
    };