Giter VIP home page Giter VIP logo

Comments (3)

321freddy avatar 321freddy commented on June 4, 2024

Do you still need this? I could add a remote interface, but only for control lua stage if thats ok.

from even-distribution.

PFQNiet avatar PFQNiet commented on June 4, 2024

I would very much like this, yes. Control stage is absolutely fine.

from even-distribution.

321freddy avatar 321freddy commented on June 4, 2024

I added it in 1.0.10. These are the functions:

-- Returns the version of this remote API
-- Usage example: remote.call("even-distribution", "version")
function this.version()
    return 1
end

-- Add an entity to be ignored by CTRL+Click Drag and SHIFT+C
-- Usage example: remote.call("even-distribution", "add_ignored_entity", "wooden-chest")
function this.add_ignored_entity(entity)
    global.remoteIgnoredEntities = global.remoteIgnoredEntities or {}
    global.remoteIgnoredEntities[entity] = true
end

-- Remove an entity from the ignored list
-- Usage example: remote.call("even-distribution", "remove_ignored_entity", "wooden-chest")
function this.remove_ignored_entity(entity)
    global.remoteIgnoredEntities = global.remoteIgnoredEntities or {}
    global.remoteIgnoredEntities[entity] = nil
end

-- Get the list of ignored entities
-- Usage example: remote.call("even-distribution", "get_ignored_entities")
--                  --> { ["wooden-chest"] = true, ["steel-chest"] = true }
function this.get_ignored_entities(entity)
    return global.remoteIgnoredEntities or {}
end

from even-distribution.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.