[quote=“Kevin Granade, post:2, topic:7829”]Let’s back up just a bit to the implications for a power grid.
The way things are currently coded, only vehicles can participate in a power grid.
As such there are two ways forward.
- make everything that consumes or produces power a vehicle.
- extend power generation and consumption to non-vehicles.
Since terrain and furniture has no state attached to it, I’m favoring 1 as being much less disruptive to all the code.[/quote]
Yeah, I realize the implications of turning appliances into vehicles in game terms. I’ve tinkered with the vehicle code quite a bit and I know how much of a headache it would be to implement some of this stuff.
The problem here is that we’ve put all of our eggs into the vehicle basket. We have a minifridge, welding rig, forge (?!), kitchen unit, chemistry lab, various lights and auto guns. All of them only work when attached to a car. Meanwhile, things like fridges and stoves in houses are just inert terrain items that you use like a shelf. The question, then, is where to draw the line. There are 2 options if I wanted to build, say, a generator.
A.) Open the vehicle menu and mount a fuel tank, engine, alternator and battery on a frame. This fits right in with the existing vehicle code with no modification, all you need is a way to connect it to appliances like ovens, floodlights, etc.
B.) You create a “generator” furniture item and build it in the construction menu. This is easier to understand for the player.
Either way, unless we want to turn every single static appliance into a vehicle with a bunch of unnecessary car-related variables, it would be best to do what you suggested: create a temporary, invisible vehicle that functions alongside the terrain object. However, it seems like it would be less trouble if we just added a new tag to furniture items like “POWERED”, which would allow them to be turned on and off. Then all you would need is a signed power value, indicating how much power it would drain or supply when switched on. From there on we could add in support for furniture that emits light when powered (upright floodlight), is usable as a cooking tool when powered (electrical oven), and more.
I probably worded that badly. I meant something more along the lines of making a clear division between what each menu would handle, because a lot of things that would have been handled by the construction menu have been shoved into the rather bloated vehicle menu lately. Like I said before, there are plenty of things that could be represented either as a modular vehicle object or a discrete terrain feature.
Vehicles don’t have to be involved in this at all if we just make some furniture capable of using electricity. But the framework is there, and much of it relies on the current vehicle system. So it’s a choice.