Ulysses Stuff > Releases
PlayerTitle [v1.2] - A name and title display module
JamminR:
Directly, the ULib portions that even ULX relies on for all it's commands, most of them can be found here - http://ulyssesmod.net/docs/files/lua/ULib/shared/commands-lua.html
I've never looked at the code of player title to know how close it is to ULX originally.
However, for a perfect example of ULX command system "before and after", see MrPresident's "ulx explode" in the releases section.
The original post has code for the old non-SVN ULX.
The last page or so, look for my post with an attachment which I practiced converting it.
To me, the new command system looked scary at first... however, once I realized it was just treating each 'function' as an object, then allowing various checks on the options/variables/input of that function command setup instead of the function itself checking every time...it became clear, and in my opinion, much less convoluted.
The way we have the command system now, you can spend time on writing the function, instead of sanity checking the input to the function. The command system does most of the checking for you.
lavacano201014:
Done.
Two files are attached.
The zip file is the addon in it's entirety if you don't have it. This one is edited for the SVN.
The lone Lua file is the replacement file, if you have the addon already. Replace lua/ulx/modules/playertitle.lua
[ Changes ]
* Reflects new command system
* Quotes are no longer needed! But you can still use them if you want (call it legacy support)
* Made the comments pure Lua.
[ Known Limitations ]
- !mytitle isn't doing anything. It SHOULD be echoing, but it isn't.
- !settitle doesn't echo back when you change someone else's title. It still changes, however.
JamminR:
Nice conversion.
I've no idea if you like to tinker like I do but if your interested there can be more cleanup of code to use the new command system.
Certain checks are done within the functions that very well could be done (or removed because they're already done) by the command set up.
Please don't take that as criticism... it's sometimes difficult to tell in a 2d text world.
I mean to simply state that if you're in a tweaking mood that it can still be done, including fixing of the echo logs.
If you want some more assistance, feel free to post the lua file in the developers corner forum area with questions/comments/snide remarks. :P
I like exercising my mind ... small bits like this help.
vader0146:
Mirror:
http://misc.diamondbuild.info/files/playertitle12.zip
NaRyan:
Does anyone have a working link to the non svn version of this?
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version