wiremod / advduplicator

Garry's Mod add-on that allows a player to save and load contraptions
http://www.wiremod.com
Apache License 2.0
67 stars 43 forks source link

Advanced duplicator not copying dampening/constant values of wired hydraulics #52

Closed DSAutomations closed 10 years ago

DSAutomations commented 10 years ago

A wired hydraulic will be placed on an object with a high weight, and the weight of the object will be reduced to get a stronger hydraulic with high dampening and constant values. When the object is copied with advanced duplicator, the dampening and constant values are not.

Nebual commented 10 years ago

Damping/Constant are intended to be set via Wires if you want a different setting than the default (which is based on weight), therefore the settings are not stored (since they're stored in the entity outputting the wire signal)

Its almost a bug that changing the weight doesn't immediately change the settings, but thats simply because theres no tidy way to track weight changes.

The default formulas are Constant = Weight * 100, Damping = Weight * 20

If anyone finds this approach against the spirit of wire, feel free to reopen.

Edit: Perhaps, for ease of use, we could add a cpanel setting for like "Strength" or "Relative Constant", which would default to 1x, that'd be a multiplier for the weight. The fine control of wiring is still there, but the setting could be fast.

TomyLobo commented 10 years ago

why track the weight changes if you can just query the weight each time you push? or is that some gmod-internal thing that does the actual pushing?

AbigailBuccaneer commented 10 years ago

@TomyLobo it's a constraint that you just set with the relevant parameters and then it pretty much takes care of itself. All we do when setting the length of the hydraulic is self.constraint:Fire("SetSpringLength", value, 0).

AbigailBuccaneer commented 10 years ago

@Nebual, if you can set these values via wires and then disconnect the wires, then as far as the user's concerned it's kept some internal state. This should probably be duplicated.