No, it's just an upgrade. If anything, I'll be using it in the modules that I made to make the code cleaner, but otherwise, you won't notice anything different. Everything should just be a little bit faster is all, and more concise. Reading though this example, gave me the idea for the object dereferencing that I'm using in the packet module for the quick one line solution for packets.
You can download PHPInSimMod - PRISM 0.4.1 from that link. Please use this thread to talk about this release.
Thank you.
PHPInSimMod (PRISM) 0.4.1
Fixed minor crash when running a the `prism reo` command.
Fixed a bug in the Reorder plugin by requesting information about the clients & players before anything else. This should also avoid a bug in other plugins, even if the packet requests are redundant.
Updated colorButtons, distance, gmeter, LVS, reorder, theTime, & welcome plugins to use simple packet syntax.
Simple syntax for packets is now here. You can now have one line both create and send a packet. No more $MTC = new IS_MTC; You can now do it all in one line like, IS_MTC()->UCID(0)->Text('Hello')->Send(); If you need a refrence, you can still edit the object right away like so, $MTC = IS_MTC()->UCID($UCID); This is pretty useful when you know your going to send a message, but it has many possilbe text values. Or you might be sending a diffrent line to the same person.
Fixed bug in `prism exit`, now works correctly.
`prism help` will only show commands available at that clients level. Also made changes in prep for loading and unloading plugins at run time.
Added more detail to ClientHandler about the PRISM admin level of the client. New methods include isPRISMAdmin, isTemporaray, getConnection & getAccessFlags. isAdmin now reports TRUE in the case that the client is a PRISM or LFS admin on the host.
Ensured that UNames are handled as case insenstive throughout the admin module.
Admin plugin updated so that Kick, Ban, Spec & Pit commands are all handled by one method. Basis of loading & unloading plugins at runtime was added.
Removed debug code from IS_MTC class.
Demo Plugin to show Button/ButtonManager usage (plugins/buttonTest.php)
Button class and button manager are now in a usable state.
Fixed pylons plugin (include statement).
Moved packet-dispatching for buttonmanager to statehandler to avoid multiple calls for one packet
Logging improvements. Packets in now show <, packets out now show > in front.
Fixed Typo in Type of IS_BTT
Last edited by Dygear, .
Reason : Added change log.
Fixed minor crash when running a the `prism reo` command.
Fixed a bug in the Reorder plugin by requesting information about the clients & players before anything else. This should also avoid a bug in other plugins, even if the packet requests are redundant.
Updated colorButtons, distance, gmeter, LVS, reorder, theTime, & welcome plugins to use simple packet syntax.
Simple syntax for packets is now here. You can now have one line both create and send a packet. No more $MTC = new IS_MTC; You can now do it all in one line like, IS_MTC()->UCID(0)->Text('Hello')->Send(); If you need a refrence, you can still edit the object right away like so, $MTC = IS_MTC()->UCID($UCID); This is pretty useful when you know your going to send a message, but it has many possilbe text values. Or you might be sending a diffrent line to the same person.
Fixed bug in `prism exit`, now works correctly.
`prism help` will only show commands available at that clients level. Also made changes in prep for loading and unloading plugins at run time.
Added more detail to ClientHandler about the PRISM admin level of the client. New methods include isPRISMAdmin, isTemporaray, getConnection & getAccessFlags. isAdmin now reports TRUE in the case that the client is a PRISM or LFS admin on the host.
Ensured that UNames are handled as case insenstive throughout the admin module.
Admin plugin updated so that Kick, Ban, Spec & Pit commands are all handled by one method. Basis of loading & unloading plugins at runtime was added.
Removed debug code from IS_MTC class.
Demo Plugin to show Button/ButtonManager usage (plugins/buttonTest.php)
Button class and button manager are now in a usable state.
Fixed pylons plugin (include statement).
Moved packet-dispatching for buttonmanager to statehandler to avoid multiple calls for one packet
Logging improvements. Packets in now show <, packets out now show > in front.
Fixed Typo in Type of IS_BTT
Last edited by Dygear, .
Reason : Added change log.
are completely valid PRISM code. So, I'm pretty sure at this point, that we've reached nirvana when it comes to the PRISM packets module, and I'm happy enough with it now to call it functionally complete. While that's not fundamentally complete, no huge major changes will need to be made to make everything work as far as the raw packet stuff goes. From here, we just need to add things like packet scoped functions, like assigning blame in the collision packet, things like that.
I just want to make something clear here. I program to make your lives easy. What I did was take away one line of code for each time you make a packet. I did this so that everyone's code is more concise. That's a pretty big deal for me. I don't like syntax noise, and I'll get rid of it as much as I can while giving you the fastest product possible. I hope you enjoy these little tweaks to make your lives easier. They might not come quickly, but they do come.
There have been some changes in PHP 5.4 in how arrays work, specifically, array dereferencing. So what is array dereferencing? Well, simply it allows for things like this:
<?php public function onClientConnect($UCID) { echo $PRISM->getClients()[$UCID]->UName; } ?>
In our old code, we would have to do:
<?php public function onClientConnect($UCID) { $Clients = $PRISM->getClients(); echo $Clients[$UCID]->UName; } ?>
So, it just cleans up some syntax noise from some of our code. When 5.4 becomes stable, expect for PRISM to upgrade to this version as it's minimum requirement.
You don't seem to understand how the internet works. When he helps you, he helps anyone else who has that problem. So when YOU ask a question, and someone answers it, it might answer the question for many other people as well. So why help one person via MSN, when he can help many people using these forums?
@misiek08, Strong arming someone who has what you need is never a good idea. Get a better attitude and try again, I can't see anyone helping you on any subject anymore if you keep acting like this.
Well, how to hell are we meant to know if a another InSim Client is using that ClickID? This is a terrible idea and a massive oversight!
There are a few things that we can do, but none of them are great.
We could like GeForz said, limit the ClickID number available to the client by a configuration file option.
Ask Scawen to give us a packet once a InSim Instance uses a ClickID, and allow us to reserve a set of ClickIDs when we want to present a interface object to the client.
We could ask the Scawen fix this, so that each InSim client get's in own button space.
We ourselves make a Meta InSim client, that acts as an intermediary to the other InSim instances. So "MetaSim" will connect to LFS's InSim. From there, all of the conventional InSim client's connect to MetaSim, and it acts as a pass-trough. But we ourselfs add some packets to the InSim interface so we know when another InSim instance uses a ClickID as the information will be reported back to each InSim Instance that is connected to MetaSim. Basically, it's MetaMod for LFS.
Yeah, but the fact that the log system does not work is slightly embarrassing considering the amount of time the code and configuration opens have been there. But your right, I should work on LVS as well.
I don't know if anyone else has tested what GeForz has made with the pylons plugin, but that was cool. I just did like a lap with it, and it's basically the arrow marks the follow you around the track, but even cooler then that, it also shows your angle of attack into the corner, so the front of the arrow might be pointing into the corner even if your going straight. It's very cool. Great for visualizer what your doing on the track with the car.
Ok, I have a 0.4.1 build that is a simple merge of what GeForz has done. Is there anything that anyone would like to see in 0.4.1 outside of the scope of buttons?
I was reading today's coding horror article about Performance is a Feature, of any web site. At point three he talks about making performance a point of (public) pride, and using the MVC Mini Profiler to profile his .NET stack. I am so freaking jelous of .NET web programmers right now. Mind you not enough to switch to .NET just yet, but still ... Pretty awesome stuff.