Skip to content

Adds a system to construction datums to allow tools to have different speeds

Rob Nelson requested to merge pull/4216/welder into Bleeding-Edge

Created by: Exxion

I really couldn't think of a better way to word the title. Basically, tools (or anything else used in construction, but this is really intended for tools) have a variable that contains two multipliers for their construction delay: One for construction and one for deconstruction. This defaults to 1 for both, of course. Setting either to 0 makes the tool not function in that direction, somewhat similarly to how the plasma cutter can deconstruct walls but not reconstruct them. That's a really bad example, but I guess it works. Documented near the top of tools.dm. I have plans for this, but I can't really execute them until most things that reasonably can and should be ported to construction datums are. Specifically, I intend to add in advanced subtypes of some of the tools that work faster at the cost of, for example, using charge when the base types don't. That, combined with bad planning, would be why the branch is named what it is. But for now, those are just ideas, as they would currently only be useful for flatpacks and maybe mechas.

This PR alone has no effect on gameplay unless adminbus is involved. You could edit the variables on an individual tool and allow it to build flatpacks faster (or slower), but not much else, unless I fucked up on my search for everything that currently actually uses construction datums.

An odd bug cropped up in testing, but I couldn't reliably reproduce it. Sometimes, flatpacks would get stuck on a step when an increased speed tool was used on them, but no runtimes were thrown and it only happened occasionally. I'm not sure whether or not this is directly related to my changes.

Merge request reports