That's because of non-existed ENT:GetOverlayData() function (that only gmod_wire_light and gmod_wire_trigger has, that's why tooltip is working on those entities)
UPD: Script for tests: http://pastebin.com/aQipg1rs . You need to look at E2 and run this script in Luapad or with lua_openscript_cl
The tooltip functions are defined in the base wire entity https://github.com/wiremod/wire/blob/master/lua/entities/base_wire_entity.lua
All entities that use this entity as a base automatically get all of the overlay functions. This includes every single entity in wiremod.
A few entities (such as the light and trigger, as you found) want to modify the behavior of their overlays, and that's why they override those functions.
@Divran Okay, I didn't noticed that GetOverlaySize and others is already in base_wire_entity, sorry, my bad
Well, that's strange, but I've found an addon that conflicts with Wiremod's tooltips - it's a Particle Maker from Workshop (http://steamcommunity.com/sharedfiles/filedetails/?id=104466547)
Ok, I found out why that addon breaks wire's overlays. It's because the particle maker creates a timer named "WireOverlayUpdate", which is the same name as wire's overlay update timer. This means that wire's overlay update function will no longer run, and particle maker's overlay update timer doesn't update the overlay properly (the code in the timer's function is incorrect). So, yep it's that addon's fault.
Maybe it was an old workaround.
No, it didn't work around any problem. It was just the addon author not knowing how to use ENT:SetOverlayText so they copy pasted a bunch of code from wire for no reason at all.
To clarify, they include modified Wiremod code in a way that infringes on the Apache license:
- You must give any other recipients of the Work or Derivative Works a copy of this License; and
- You must cause any modified files to carry prominent notices stating that You changed the files; and
- You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and ...
Hey everyone,
Someone mentioned this thread on Steam, so I figured I should look into it (being the author of the malicious plugin).
As @Divran mentioned I didn't know at the time how the Wiremod SetOverlayMethod worked, so I probably chose to nuke wiremod to get it to work. For now the issue is solved and Particle Maker should play fair with Wiremod again. The new version will be pushed to the users in a few hours.
Sorry 'bout the hassle.
To be clear, the easiest way is to simply call setoverlaytext(str). Is this
how you solved it? You should only use setoverlaydata if you need more
advanced displays than what you can get from a single string. See the
colorer or expression 2 for example.
On May 21, 2016 18:02, "Roelof" [email protected] wrote:
Hey everyone,
Someone mentioned this thread on Steam, so I figured I should look into it
(being the author of the malicious plugin).
As @Divran https://github.com/Divran mentioned I didn't know at the time
how the Wiremod SetOverlayMethod worked, so I probably chose to nuke
wiremod to get it to work. For now the issue is solved and Particle Maker
should play fair with Wiremod again. The new version will be pushed to the
users in a few hours.
Sorry 'bout the hassle.
—
You are receiving this because you were mentioned.
Reply to this email directly or view it on GitHub
https://github.com/wiremod/wire/issues/1130#issuecomment-220785692
roelofr/GMod-ParticleMaker@a34a236fb07675a506e7ef2c543472bb1492aab7 just removes Wiremod support entirely. This also stops it being a license violation.
Well, at least that's been taken care of for now.
@AbigailBuccaneer I know, this basically fixes two issues at once and gives me less files to manage when I re-implement Wiremod functionality (with respect to the license terms, as that was something that hadn't crossed my mind back in the day).
Most helpful comment
No, it didn't work around any problem. It was just the addon author not knowing how to use ENT:SetOverlayText so they copy pasted a bunch of code from wire for no reason at all.