Barotrauma 潜渊症

Barotrauma 潜渊症

30 个评价
Wiring permissions
   
奖励
收藏
已收藏
取消收藏
文件大小
发表于
更新日期
40.081 KB
2024 年 12 月 21 日 上午 3:13
6 月 29 日 上午 8:15
11 项改动说明 ( 查看 )

订阅以下载
Wiring permissions

描述
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 enabled "Lock all default wires" or disabled "Allow rewiring" settings in Server Settings > Anti-Griefing. These options would still lock wires and prevent everyone from rewiring.

THE INTENDED CONFIGURATION WITH THIS MOD IS
"Allow rewiring" Checked
"Lock all default wires" Unchecked

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 条留言
Ydrec  [作者] 5 月 24 日 上午 8:44 
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  [作者] 5 月 24 日 上午 8:42 
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 5 月 24 日 上午 5:13 
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 5 月 24 日 上午 4:36 
"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 4 月 23 日 上午 4:16 
It has LUA activated and it say ChangeWiring permission not available
Ydrec  [作者] 4 月 22 日 上午 10:17 
Seems to be fine from my tests? Check your server has lua and provide errors if it gives any.
Soulseeker 4 月 22 日 上午 7:01 
not working anymore?
Ydrec  [作者] 3 月 24 日 上午 1:44 
Like other permissions, default is revoked unless player has "ChangeWiring" or "All" permissions
melelconquistador 3 月 23 日 下午 12:35 
Do players have permissions revoked or enabled by default?
Ydrec  [作者] 1 月 4 日 下午 7:24 
Fixed lots of bugs so probably should work now.