- Fougerite went through tons of refactoring and code optimizations, I tried to cleanup most of the tragical issues, but I don't think alone I'll have any energy left for the rest
- Fixed an old issue from 2016 that was quite trivial, but lacked the experience to see back then. https://fougerite.com/threads/fougerite-official.348/page-33#post-10567 You can now reference Assembly-CSharp from your script plugins without an issue
- Added LastLogin, and LastLogout properties to the CachedPlayer class
- Fixed a very trash inventory fix logic implemented by Riketta ages ago. https://github.com/Notulp/Fougerite/commit/c0b087fef137f5054d55932f4bbdf0abf4fd15a6#diff-5a31291786c67de060470fb99c016810cf5156585b076bc3658216dbe5c2a3b5L24 This is now handled in the main hook event instead of registering playerkilled event for each player, and leaving those events nowhere in the memory. Jesus...
- Fixed CreateAsyncHTTPRequest for handling other response codes than 200, and 201. Your code should get called with the response codes, and if there is any message to read. https://github.com/Notulp/Fougerite/commit/c8db79d48d2896f01351e16452b748f62256cbec
- Utilized the Stopper class during the cleanup of code. Almost every Hook class will now print if they are taking longer than 100ms. If you keep seeing these messages you probably have a plugin that causes lagg during execution.
- Fixed up the Entity, and DataStore classes. They had very ugly code at some part, and bad error management. I'd say they are now sufficient. Also a bit at Util class.
- Added On_AirdropCrateDropped event. More on this later when i have time to finish wiki for 1.8.1 and 1.8.2. You may ask on discord for usage or figure using github / source code
- Added On_SupplyDropPlaneCreated
- Upgraded patcher's Mono.Cecil to 0.9.6 so we are not so dead-ass outdated. Maybe one day I'll set it up for 0.1.0.0
- Fixed a pathetic mistake for On_ConsoleWithCancel not being called for script plugins.
- Fixed a pathetic mistake for On_PlayerSpawning not being called for script plugins due to naming convention mistake back in 2018.
- Fixed up some weird ass decay logic from Riketta. I made the list ConcurrentList
- Updated Rust++ just because it was using this weird decay logic, please update it along
- Patcher updated, use prepatched dlls or patcher. Beware of the new Mono.Cecil dll files!
- Fougerite Project is an Official project based off of Magma. Built to stabilize Rust Legacy, and provide large API in many languages. - Commits · Notulp/Fougeritegithub.com
- Fixed ConcurrentDictionary not having Clear() method
- Fixed Rust++ references to Server.Cache causing errors, all of it is now using the correct functions. Update your RustPP dll.
- Type of Server.Cache has been changed back to IDictionary to retain compatibility
- Improved function calling speed for Python scripts
- Sleeper class now uses PlayerCache to get the name of the player
Tons of changes, they can be viewed here:
Some project updates, refactors, bugfixes to the project by dretax · Pull Request #151 · Notulp/FougeriteFougerite Project is an Official project based off of Magma. Built to stabilize Rust Legacy, and provide large API in many languages. - Some project updates, refactors, bugfixes to the project by dretax · Pull Request #151 · Notulp/Fougeritegithub.comFougerite Project is an Official project based off of Magma. Built to stabilize Rust Legacy, and provide large API in many languages. - Dretax by dretax · Pull Request #152 · Notulp/Fougeritegithub.comFougerite Project is an Official project based off of Magma. Built to stabilize Rust Legacy, and provide large API in many languages. - dll by dretax · Pull Request #153 · Notulp/Fougeritegithub.com
Appreciate @MrDan4es's testing during this release, and reports.
A Fougerite update after more than a year? Wasn't 1.7.9E supposed to be the "last" update of Fougerite?
Yeah, you might be saying that... and you would be right. Last year I have graduated as a Computer Science Engineer. During the years after my Java carrier in Minecraft, Rust Legacy was truly an astonishing journey. I was a noob, and totally new to the coding in terms of C# back in 2015. This project is the reason why I have gained so much experience, and started my path alongside the current jobs I have, and my reverse engineering career. From 2020, and during these absent months I never even bared to look at Fougerite's discord. I knew that so many things could be improved with my knowledge yet I wanted to let this project go. There are always fresh people, maybe not a lot, but there still are who join into the world of rust legacy, to start and gain experiences on how things were working during the Fougerite life cycle. Researching, facing problems, and what not.
So I couldn't just let this project go, and I still promised I'd push out a big release with all the fixes I had in my mind. All the problems that I didn't understand in 2015-2018. Obviously there are still things to work on, but most of the things cannot be caved out due to many plugins relying on the current API's build up. Even though there are parts that are clean, there are parts that should be cleaned up, or solved.
To be honest, I currently have 3 projects I work on, and there is absolutely no chance I'd take on updating Fougerite regularly. However I do wish to sometimes make hotfixes, and propose new opportunities that can be still caved out from legacy. What you can put into or make out of this depends on you honestly.
Since 1.8.0 is done, my next aim will be to do a similar big stabilization update for RustBuster. There is going to be plenty of work needed right there. Anyway, enough with the words, here are the changes briefly.
* A new event: On_ConsoleWithCancel. This event allows you to cancel console commands easily. This was not possible before, but now It pretty much is. More on this on the wiki later.
* Fougerite has been upgraded to the latest C# version. (The language, API set is still Mono, .NET 3.5)
* Tons of refactoring, and clean up in the project. And this was really a big work.
* Fougerite is now built via SERVER preprocessor. Some API sets in Rust Legacy Server checks for the SERVER constant, and since I just patched one function using It, It was necessary to declare.
* Lots of Code quality improvements
* Fixed an issue at HurtEvent, where in some cases It would assign the "Attacker" property to the "Victim" property as well, causing a mismatch between the two players. (I only noticed this by code, surprised that nobody noticed this through the years lol https://github.com/Notulp/Fougerite/pull/152/files#diff-f051a1552b30c8caec3394e122aa6ea5a6e70d0d1b886bf4dc577fe32df00286L73)
* Removed useless, or unused patching functions.
* A new event: On_GrenadeThrow. This event can be used in any scripting language unlike the shooting events which are only available for C#. More on this on the wiki later.
* Added SuperFastHash algorithm to the API.
* You can now use Util.GetUtil().SuperFastHash(string), Util.GetUtil().SHA1Hash(string), Util.GetUtil().MD5Hash(string) to generate hashes for specific inputs.
* The Web class has been completely reworked. Web.GET, Web.POST, Web.GETWithSSL, Web.POSTWithSSL have been marked as obsolete. These are blocking functions, and they shouldn't be used on the main thread unless you intentionally tend to cause laggs on the server. I have added tons of new references (dlls), which gives the opportunity for the inner .NET API to access new functions, and with this you also have deeper .NET API available. One of this is that we are now able to process new modern TLS protocols / SSL certificates on websites. Web class defines a default connection limit count of 200 now.
* Web.CreateAsyncHTTPRequest(url, callback, method, headers, timeout, compression) has been added. More on this on the wiki later.
* NewtonSoft has been updated to the latest version.
* Oracle Mysql has been updated to 6.9.8, the latest possible version we can update to.
* Following DLLs were added or updated: Mono.Data.Tds.dll, Mono.Security.dll, Mysql.Data.dll, Mysql.Data.CF.dll, Mysql.Data.Entity.dll, Mysql.Fabric.Plugin.dll, Mysql.Web.dll, System.Data.dll, System.Drawing.dll, System.Runtime.Serialization.dll, System.Xml.dll, System.Xml.Linq.dll (These contain new APIs, bugfixes, and what not)
* Facepunch.MeshBatch dll's issue has been re-patched. Instead of a crappy try catch, we actually check for the gameobject being null, thus avoiding the exception. (https://fougerite.com/threads/nullreferenceexception-on-entity-destroy.435/#post-4644 )
* A new set of .NET 4.0 standardized classes implemented. ConcurrentDictionary, ConcurrentEnumerator, ConcurrentList, LockCookie, LockQueue, ReadWriterLock. You can use these in your plugins! Go look these up on google, and read the microsoft documentation page what they are for. Basically these are classes that we should have implemented years ago. Some things in legacy must be done on a new thread if we want to avoid causing laggs to the server. However, there are functionalities after that must be ran on the main thread to avoid crashes from UnityEngine. For that purpose we introduced the class Loom which old developers already know about. It's on the wiki.
For example, ConcurrentDictionary, and ConcurrentList is a Dictionary, and List in C#, but they are thread safe, meaning that multiple threads can access these collections, and safely modifying them, instead of causing errors while they update the same entires.
* Fougerite's main config reading now handles errors, and logs them if they were to happen
* I shall introduce the new Cache system, the PlayerCache. This cache stores the connected player's history, meaning that the steamid stores the player's current name, used names in the past, and all the used IP addresses. It can be used via the PlayerCache class from script plugins, more on this later. This cache is thread safe, and Fougerite uses It to find the name of entities owners, when they didn't connect since last start (As rust doesn't store this info), and can be used for many other things as well.
* Server.Players is now completely thread safe, and the same goes for the Server.Cache (Well almost..). Server.Cache can be directly accessed to retain API functionality, but this shouldn't be used in this way, It should be Server.GetCachePlayer(steamid) that should be used instead. This cache by default from server runtime stores all the connected player's Player class, and we use this in the API to quickly find the players that we are looking for by ID.
* I shall introduce the new PermissionSystem! This has actually been slipped into 1.7.9E, but not in a perfect condition, and not finished either. Now all the API is finished, some bugs were fixed, and the good news is that PermissionSystem is also thread safe! This was actually a very necessary standardization needed for the plugins, and If I remember well, I updated almost all of my plugins for this. There are some I need to finish as well.
Before you upgrade, please open up Save/GroupPermissions.json via Notepad++ program, and check all entries. Look for the "UniqueID" properties, and ensure that every number is not a negative one. Where you spot a '-' sign just delete those and save the file. Or you can just delete GroupPermissions if you haven't been using It at all.
* For this new PermissionSystem I wrote a new plugin as well to complement It. You can find It in the Modules folder under "PermissionManager". This plugin contains several new commands, that you can use to manage users and groups, and their permissions. More on this later on the wiki.
* Rust++ now completely supports PermissionSystem. It uses the same permission names as It used already.
* Patching is required. Use the Patcher on cleaned dlls, or use the prepatched dlls from the prepatch folder!
Gathering all these new dlls were taking efforts, mostly due to the fact that we are limited in a specific mono API.
I guess for the future we could attempt upgrading to new versions as well, and I should implement our already existing AppDomains from RustBuster to Fougerite.
Obviously this is not all the full changes but the most important ones. Next update is for RustBuster in some days hopefully. Enjoy this fresh update, should make your server a lot more smoother already!
- Patcher updated, re patch or use the prepatched dlls.
- Fougerite.dll updated
- Rust++ dll updated
- Code fixes
- LootEvent no longer uses timer, but proper value return
- Added a complete set of Permission system inside fougerite. Plugins can now hook on this system and validate rights. My plugins will be switched to this system once i have enough time. I'll have a post explaining it on the wiki.
- Added On_Logger event on demand. Wiki post will be made about It. It runs when the Fougerite.Logger functions are called.
- Fixed minor startup issues. The C# plugins will be initialized first, and then Python.
- SQLite DB will be initialized before any plugins.
- Fixed On_Console for not running when fougerite commands are executed. Also done some major code fixes in there.
- The player class received an ConsoleCommandCancelList along side with console restriction functions aswell. Now you can restrict console commands for players individually aswell, not just chat commands.
- Fixed Rust++'s XML name string handling hopefully. Illegal characters shouldn't appear in the XML file causing an error.
- Added a /sharelist command for Rust++. This command was long awaited.
- Rust++'s default config was modified a little bit.
Excuse me for the delay. This build contains some fixes, and patches against the flooder issues.
The build has been tested for 2.5 weeks seems to run well. Patcher is not included for now, use the latest prepatched dlls.
Source update comes later.