Barotrauma

Barotrauma

26 ratings
Wiring permissions
   
Award
Favorite
Favorited
Unfavorite
File Size
Posted
Updated
40.020 KB
Dec 21, 2024 @ 3:13am
Jan 5 @ 5:52pm
10 Change Notes ( view )

Subscribe to download
Wiring permissions

Description
Ever wanted to allow rewiring stuff only to trusted people? Thats what this mod allows.

This is Serversided Lua mod which adds per player wiring permissions to Barotrauma.
These permissions also get saved and become part of your normal permissions config file.

Clients joining your server don't need to have clientside lua or even have this mod enabled for it to work. This mod does not override "Lock all default wires" or "Allow rewiring" settings in Server Settings > Anti-Griefing. These options would still lock wires if enabled.

To change client wiring permissions use:
giveperm "PlayerName" ChangeWiring revokeperm "PlayerName" ChangeWiring


This mod prevents and logs:
Adding new Wires and Rewiring
Deattaching electrical components
Changing properties of electrical components
Changing anything inside of a circuit box

Only applies to friendly submarines/outposts, meaning players can still repair beacons or loot wreck electronics without needing permission

Mod provides clientside integration with vanilla interface for the new permission.
If you have clientside lua then mod fully mimics how vanilla permissions behave, without clientside you can still use console commands above but new permission would not be visible in any menus.
Menus such as manage menu, permissions changed announcement, and tab has a star if player has this permission.
These additions are purely visual and mod would still 100% work without clientside lua.

This version of the mod would be visible in server modlist and joining clients would download it.

If you want to host vanilla server without it appearing in modlist you can use Serverside Only Version
If you also directly install Lua for Barotrauma you can have Vanilla appearing server in browser with this still enabled.

Soucecode:
https://github.com/Ydrec/Baro-wiringpermissions

Edorsments:
Luatrauma Discord: https://discord.gg/f9zvNNuxu9
18 Comments
Ydrec  [author] May 24 @ 8:44am 
For testing you can run DedicatedServer.exe from your own Barotrauma folder then join that server via directconnect>localhost. Then you can change your own permissions from server console.
Ydrec  [author] May 24 @ 8:42am 
i dont alter locked state of objects. My mod sits in networking methods which catch interaction with electrical stuff and discard network packets as well as drop selected interface for sender of these packets if their client doesnt have necessary permissions. If wire or whatever is locked, then that person can't send wire interaction packet in the first place.

TLDR
Locked wires takes priority over my mod preventing anyone from changing wires. Unlocked wires is what youre supposed to use with this mod. Permissions are done completely serverside and client can not bypass it just because wire is unlocked.
vvhalefccd May 24 @ 5:13am 
not sure why its not working at all when I'm testing it. I've tried it with enable rewiring turned on/off. Maybe I can't rewire because I'm the host and can't change the permissions given to myself? It seems like it defaults my Host permissions to not allow rewiring
vvhalefccd May 24 @ 4:36am 
"This mod does not override "Lock all default wires" or "Allow rewiring" settings in Server Settings > Anti-Griefing. These options would still lock wires if enabled."

So what you're saying is that if you enable "allow rewiring" then everybody can rewire... so that would defeat the purpose of this mod. In that case I'll just turn that option OFF.

Thats what is sounds like you're saying but its hard to be sure. I'll ask straight-up... What EXACTLY did you put in the server settings to make it so only people you want to rewire can rewire.
Soulseeker Apr 23 @ 4:16am 
It has LUA activated and it say ChangeWiring permission not available
Ydrec  [author] Apr 22 @ 10:17am 
Seems to be fine from my tests? Check your server has lua and provide errors if it gives any.
Soulseeker Apr 22 @ 7:01am 
not working anymore?
Ydrec  [author] Mar 24 @ 1:44am 
Like other permissions, default is revoked unless player has "ChangeWiring" or "All" permissions
melelconquistador Mar 23 @ 12:35pm 
Do players have permissions revoked or enabled by default?
Ydrec  [author] Jan 4 @ 7:24pm 
Fixed lots of bugs so probably should work now.