wiremod / advdupe2

Advanced Duplicator 2
http://wiremod.com
Apache License 2.0
90 stars 60 forks source link

Remove `WireLib.dummytrace` dependency #428

Closed Vurv78 closed 1 year ago

Vurv78 commented 1 year ago

Think returning just { Entity = ent } is fine.

Doubt it would cause errors, I don't think servers with only advdupe2 and not wiremod are that uncommon.

Aws0mee commented 1 year ago

Maybe you can check if Wirelib and Wirelib.dummytrace exist, and if not just return the entity. Alternatively, you can check if Wirelib.dummytrace exists when advdupe2 loads and create it if it does not.

Vurv78 commented 1 year ago

You're risking causing lua errors in CanTool hooks without a complete trace structure.

Yes, but as I said in the description this was already the behavior without wiremod. I doubt no server would go without reporting this for so long. Alternatively I can just make it call WireLib.CanTool (or nonpreferably duplicate wire's new cantool)

Maybe you can check if Wirelib and Wirelib.dummytrace exist, and if not just return the entity. Alternatively, you can check if Wirelib.dummytrace exists when advdupe2 loads and create it if it does not.

This is being done because WireLib.dummytrace is being removed in https://github.com/wiremod/wire/pull/2610.

thegrb93 commented 1 year ago

Most servers with advdupe2 also have wire so the { Entity = ent } case was probably never used until now, which may introduce issues.

Aws0mee commented 1 year ago

Most servers with advdupe2 also have wire so the { Entity = ent } case was probably never used until now, which may introduce issues.

From what I've seen wiremod seems to be pretty unpopular on darkrp servers unfortunately, while advdupe2 seems to be extremely popular. So, I don't think it's too uncommon for servers to have advdupe2 and not wiremod. I didn't know advdupe2 had a dependency on wiremod but ideally it shouldn't in my opinion.