Hi!
After 2 weeks of inactivity there's finally some movement in devteam. And that'd be me, commiting my scriptcore refactoring.
Internally almost everything changed except the fact that it still uses RemObject's PascalScript as engine. As for the API here's the list of what I've changed:
- Modifed scripts are not shutting down the server when compilation fails (they'll simply get disabled instead)
- Modified script will display now proper info whenever dll file is not found or there's any other error with script other than syntax error
- Modified hints are now shown also when compilation succeeds
- Modified script will now display line and column number on error, if such info is available (I've noticed that they were already compiling and running in debug mode, why not taking advantage of it then)
- ------
- Added OnGameEnd() event
- Modified AppOnIdleTimer is now available also if safemode is enabled
- Modified OnRequestGame is now OnRequestGame(IP: String; Port: Word; State: byte; Forwarded: Boolean): Integer;
- Modified OnPlayerKill is now OnPlayerKill(Victim, Killer, Weapon: Byte); (Weapon String->Byte)
- Modified OnPlayerDamage is now OnPlayerDamage(Victim, Shooter: Byte; Damage: Integer; Weapon: Byte): Integer; (Added Weapon)
- Removed ReqFwd and ReqPort global variables
- Removed socket functions
Right after my commit, Shoozza've started to refactor my code (normalizing variable/function names and such), poor guy
. Beyond that he added also couple of his changes, and that'd be:
- Modified PlaySound script function can play files from .\Sfx folder instead of .\Downloads\Sfx folder
- Fixed Soldat "crash" if playback device is missing and registered
- Fixed access violation if playback device is missing and not registered
It also turned out that my commit managed to somehow break client's code and it was unable to compile itself for some time. Hopefuly Shoozza resolved it as well.
I hope nobody was using socket functions, they were broken anyway afaik. If you did so though, now you have dlls, feel free to use them instead.
If you have some ideas for features that could be added to scriptcore, this is the perfect time to report them, however please do so on suggestion board instead of posting them as reply to this topic.
Speaking about features, I've found old enesce's get/usepackage code. It was incomplete, now it's even more incomplete as I've removed it completely along with sockets, the implementation was bad anyway. The only thing left from it is PlaySound() function which will be included in next release.
It doesn't mean that I'm not gonna (re)add package support in the future, if you have an idea on how that could look like, please post it on suggestion board.