The online racing simulator
PHPInSimMod - PRISM 0.6.0 Discussion
You can download PHPInSimMod - PRISM 0.6.* from that link. Please use this thread to talk about this release.

Thank you.

PHPInSimMod (PRISM) 0.6.0

Increased version to 0.6.0 due to the following plugin breaking changes:
  • Translation engine changes potentially breaking plugins for certain users
  • AddClickEventToBtn from BetterButtonManager caused the incorrect params to be sent in some situations(See below)
Updates:
  • Add handling for buttons created using UCID 255 ( #63 )
    • correctly handle buttons events even when button is created with UCID 255
  • ClearButtonsForConn when a client disconnects ( #28 )
  • Update Translation Engine ( #64 )
    • Moved Translations to own class which is now inherited by plugins [UserPlugin extends Plugins extends Translations extends Timers]
    • Converted TranslateEngine to a class
      • See how to use Translations in your plugin here
      • Translations are now stored to a static variable for caching
      • To clear cache for your plugin call $this->clearTranslationCache();
      • if you ever called directly called the TranslateEngine function in your plugin(which was not how it was originally intended, but could have been used that way, you'll need to update your code to use translateEngine::translate)
  • Add param to betterButtonManager initButton function that prevents the text from looping
    • This could be really useful in situations such as coundowns so you could do something like:

      <?php 
      #InitButton(ButtonName, Group, Top, Left, Width, Height, ButtonStyle, Text, SecondsToShow, Repeat);
      $this->BTNMan[$UName]->InitButton('testButton''testGroup'25255025ISB_DARK, array('5''4''3''2''1''GO!'), 8false);
      ?>

      In this situation, it would count down from 5 to 1 and then say go for 3 seconds.
    • For help setting up betterButtonManager, there is a readme available here(though it currently doesn't list all of the functions that are available in the betterButtonManager.)
  • Fix situations when using betterButtonManager and addClickEventToBtn and no param array is specified(so it defaulted to null as a result as seen below)

    <?php 
    public function AddClickEventToBtn($Name$Class$Function$Params=null)
    ?>

    PRISM was treating the null as the parameter intended to send to the function. When there is no params the following is expected:

    <?php 
    function ClickEvent ($BTC$BTN) {
        
    #BTC has the structure of the BTC packet PRISM receives from the host
        #BTN is the original button that caused the click
    }
    ?>

PHPInSimMod (PRISM) 0.6.1

* available from same link as above currently
  • Fix issue left over from when moving translateEngine to it's own class
  • Add MessageAllHost Plugin function.

    <?php 
    # Sends a message to all servers including the one that called the function
    $this->messageAllHosts('This is sent to all PRISM connected hosts!');

    # Sends a message to all servers but the one that called the function
    $this->messageAllHosts('Message to other host!'true);
    ?>

Found a minor bug in the translate engine. I'll need to release another minor update.
Uploaded another update which fixes the issue with TranslateEngine, as well as adds an additional function to plugins that allows a plugin to send a message to all hosts(Currently This will send to all hosts, regardless if they are running the plugin that called it or not.)

I may add another parameter to the function that allows it to be only sent to servers running the calling plugin.
Quote from T3charmy :I may add another parameter to the function that allows it to be only sent to servers running the calling plugin.

That is pretty cool dude! Very nice work!

FGED GREDG RDFGDR GSFDG