wiremod / wire

Garry's Mod add-on that allows users to wire up components in order to make more elaborate automatic and user-controlled contraptions.
http://www.wiremod.com
Apache License 2.0
553 stars 332 forks source link

sentSpawn functionality #3086

Closed deltamolfar closed 3 months ago

deltamolfar commented 3 months ago

(Re-PR because I accidentally deleted previous fork) Added :GetBool(), and review changes.

While most of registration code/logic is from starfall prop_sent.lua, I've found and fixed ~10 sents + added ~6 that weren't originally there.

Current minor bugs:

thegrb93 commented 3 months ago

Looks fine, might do a diff against starfall's to sanity check.

thegrb93 commented 3 months ago

Diffed the changes and they mostly look ok. The gmod_wire_value code is pretty messy, but whatever.

deltamolfar commented 3 months ago

Regarding gmod_wire_value code is messy because I didn't like how it was implemented in sf, so I've decided to expand the value setting logic, while leaving support for the sf way. Code is messy, but I'm not sure how to make it cleaner without separating logic into few, never reused functions out of gmod_wire_value's preFactory. I think it's fine to leave it as is for now, as it will not really harm any future work, and maybe someday someone, or me, will refactor that.