Skip to content

Possible way to handle connecting to utilities from a distance. #1787

@koosemose

Description

@koosemose

Currently, for a furniture to connect to a Utility, it needs to have the wires ran directly to the furniture. In the past, people have stated a desire to have furniture connect to Utilities from a distance (similar to Rimworld, for reference).

I have however been reticent to implement this for two reasons.

First, I personally find the autoconnection awkward and somewhat annoying to use particularly when trying to either maintain separate networks or keep certain furniture connected to only a certain portion of a network (such as in rimworld keeping all turrets connected to the other end of a switch), at times requiring awkward placement, and deconstruction and rebuilding of your wires when they don't run in just the right way.

Second, I am not confident in the combination of my coding skill and the PP framework to implement a system which will mimic Rimworld in allowing any powerable furniture to connect to any power cable within a given distance, and not have noticeable performance dips on placement of furniture and wires as they search for things to connect to.

However, as a solution to both these problems, and still at least partially satisfying those who want "easy" connections, I think having it in a limited form may work. Basically the idea is to have some sort of "outlet" object (rather a furniture, or a sort of Utility, depends on what works best) which is the only object capable of the ranged connect. This would mean not every wire has to search only this specific object, and if is implemented with some form of master list of all outlets, it would simplify furniture searching, as rather than having to either search every tile within, for example, an 8 tile range, or check every utility cable for closeness, it could just check the much smaller list of outlets to connect to (or maybe it could use some sort of signal through the tiles it covers, so rather than either one searching, the outlet just "notifies" the tiles they're in it's range, and either it can in turn notify any furniture presently there, or new furniture placed down will be able to check what outlets it is in range of.

There's room for additional mechanics around it as well (though I haven't heavily considered the implications thereof, they're just random ideas), such as having it either serve the entirety of a room (I think that would probably be bad, as it might lead to power gamers making the base one giant room to save on wiring), or serving a single room and only within range (mimicking an outlet on a wall in real life), and if it's in a wall it will be able to be set towards one room or another (or it is unplaceable in a wall).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions