Closes team doors and stashes when the last team member goes offline

Supported Games
GameServerKingsGameServerKings

The necessary improvement we wanted was to make it support Rust's native team functionality so that regardless of who logs out last and who had placed each door in the shared base, all the team's doors will be closed. Ladder Hatches count as "doors" in this case also.

Version 0.8.4 (and upwards) added functionality to stashes. They will similarly be automatically hidden on disconnect for the whole team when the last member disconnects.

The plugin relies on the native team system in Rust, and changes nothing regarding the default behaviour, so there shouldn't be any conflicts with other plugins as long as they don't tamper with the built-in team system.

Usage

When a player disconnects:

  1. If they have no team: Closes all of the player's doors and hides their stashes.
  2. If they belong to a team, checks if there are any team members still connected, and does nothing if there are.
  3. When the last team member disconnects, closes all the doors and hides all the stashes of the whole team.

Credits

  • Slydelix, for making the original Offline Doors
  • Finrust (Suomen Ruoste) server and their players for testing
MIT License

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.