DaedalusGame / Modular-Diversity

A Modular Machinery Addon
MIT License
4 stars 14 forks source link

[Feature Request] Distance Between and Forced Moves #42

Open Damien-Reave opened 5 years ago

Damien-Reave commented 5 years ago

Hey there, I'm Damien Reave, dev of the pack Omnifactory. I recently found Modular Diversity because I wanted to make a MM that only worked on the moon, so thank you very much for the biome based functionality! A real life saver.

I've got two requests for additional features. One is a tag that will make a MM not function if its within X blocks of another copy of a similar MM, in order to force the user to spread them out. I'm not particular on if both MMs stop working, or just the more recent one, however is easiest to implement it. My intention is to add this tag to Lunar Mining Stations, to simulate how each station would need its own sizable range for the rovers to collect 2H and He3 from lunar soil.

My second request would be for a tag that makes it so that after a MM carries out X operations, it would create a square shaped 'dead zone' centered on the MM, and now no MM of the same type can function within it, with a customizable width / height (and covering all Y values). My intention is to add this tag to my Oil Drilling Rigs, to simulate the oil in the area drying up, forcing the player to move their rig.

Thank you for your time! It would be awesome if you could accommodate these requests but I totally get if they're outside the scope of what you're looking to do :)

DaedalusGame commented 5 years ago

I've been thinking about distance from nearby machines when I did the position component. I think it'd be best as an "anchor" tag that changes the component's center point to, for example, the closest machine of some type.

The second thing sounds like reservoir/mineral component but without the IE/IP dependency. Kind of on the fence about this because it's a pretty big system to add for one component.

Also played Omnifactory a bit last week, pretty good pack.

DaedalusGame commented 5 years ago
    "requirements": [
        {
            "type": "position",
            "io-type": "input",
            "distanceMin": 10,
            "xMin": 0,
            "xMax": 0,
            "yMin": 0,
            "yMax": 0,
            "zMin": 0,
            "zMax": 0,
            "anchor": {
                "type": "anchor",
                "identifier": "drill"
            }
        },
        {
            "type": "item",
            "io-type": "output",
            "item": "minecraft:diamond",
            "amount": 1
        },
        {
            "type": "anchor",
            "io-type": "output",
            "identifier": "drill",
            "time": 10
        }
    ]

as of 1.8, this will prevent the machine from working if another machine of its own type is within 10 blocks.