特征
装置
这个插件使用权限系统。若要分配权限,请使用oxide.grant <user or group> <name or steam id> <permission>。若要移除权限,请使用oxide.revoke <user or group> <name or steam id> <permission>.
注意:仅当相应实体的配置指定了以下内容时,权限才是必需的"RequirePermission": true。默认值为false对于所有实体。
可以在中配置设置和选项PowerlessElectronics文件放在config目录。建议使用编辑器和验证器来避免格式问题和语法错误。
默认配置(没有实体提供免费电源):
{
"Entities": {
"andswitch.entity": {
"RequirePermission": false,
"InputSlots": [
0,
1
],
"PowerAmounts": [
0,
0
]
},
"audioalarm": {
"RequirePermission": false,
"PowerAmount": 0
},
"autoturret_deployed": {
"RequirePermission": false,
"PowerAmount": 0
},
"boombox.deployed": {
"RequirePermission": false,
"PowerAmount": 0
},
"button": {
"RequirePermission": false,
"PowerAmount": 0
},
"cctv_deployed": {
"RequirePermission": false,
"PowerAmount": 0
},
"ceilinglight.deployed": {
"RequirePermission": false,
"PowerAmount": 0
},
"counter": {
"RequirePermission": false,
"PowerAmount": 0
},
"discoball.deployed": {
"RequirePermission": false,
"PowerAmount": 0
},
"discofloor.deployed": {
"RequirePermission": false,
"PowerAmount": 0
},
"discofloor.largetiles.deployed": {
"RequirePermission": false,
"PowerAmount": 0
},
"doorcontroller.deployed": {
"RequirePermission": false,
"PowerAmount": 0
},
"electric.flasherlight.deployed": {
"RequirePermission": false,
"PowerAmount": 0
},
"electric.sirenlight.deployed": {
"RequirePermission": false,
"PowerAmount": 0
},
"electrical.blocker.deployed": {
"RequirePermission": false,
"PowerAmount": 0
},
"electrical.branch.deployed": {
"RequirePermission": false,
"PowerAmount": 0
},
"electrical.combiner.deployed": {
"RequirePermission": false,
"InputSlots": [
0,
1
],
"PowerAmounts": [
0,
0
]
},
"electrical.heater": {
"RequirePermission": false,
"PowerAmount": 0
},
"electrical.memorycell.deployed": {
"RequirePermission": false,
"PowerAmount": 0
},
"electrical.modularcarlift.deployed": {
"RequirePermission": false,
"PowerAmount": 0
},
"electrical.random.switch.deployed": {
"RequirePermission": false,
"PowerAmount": 0
},
"elevatorioentity": {
"RequirePermission": false,
"PowerAmount": 0
},
"fluidswitch": {
"RequirePermission": false,
"InputSlots": [
2
],
"PowerAmount": 0
},
"hbhfsensor.deployed": {
"RequirePermission": false,
"PowerAmount": 0
},
"igniter.deployed": {
"RequirePermission": false,
"PowerAmount": 0
},
"large.rechargable.battery.deployed": {
"RequirePermission": false,
"PowerAmount": 0
},
"laserdetector": {
"RequirePermission": false,
"PowerAmount": 0
},
"laserlight.deployed": {
"RequirePermission": false,
"PowerAmount": 0
},
"medium.rechargable.battery.deployed": {
"RequirePermission": false,
"PowerAmount": 0
},
"microphonestandio.entity": {
"RequirePermission": false,
"PowerAmount": 0
},
"orswitch.entity": {
"RequirePermission": false,
"InputSlots": [
0,
1
],
"PowerAmounts": [
0,
0
]
},
"poweredwaterpurifier.deployed": {
"RequirePermission": false,
"InputSlots": [
1
],
"PowerAmount": 0
},
"pressurepad.deployed": {
"RequirePermission": false,
"PowerAmount": 0
},
"reactivetarget_deployed": {
"RequirePermission": false,
"PowerAmount": 0
},
"rfbroadcaster": {
"RequirePermission": false,
"PowerAmount": 0
},
"rfreceiver": {
"RequirePermission": false,
"PowerAmount": 0
},
"sam_site_turret_deployed": {
"RequirePermission": false,
"PowerAmount": 0
},
"searchlight.deployed": {
"RequirePermission": false,
"PowerAmount": 0
},
"sign.neon.125x125": {
"RequirePermission": false,
"PowerAmount": 0
},
"sign.neon.125x215": {
"RequirePermission": false,
"PowerAmount": 0
},
"sign.neon.125x215.animated": {
"RequirePermission": false,
"PowerAmount": 0
},
"sign.neon.xl": {
"RequirePermission": false,
"PowerAmount": 0
},
"sign.neon.xl.animated": {
"RequirePermission": false,
"PowerAmount": 0
},
"simplelight": {
"RequirePermission": false,
"PowerAmount": 0
},
"smallrechargablebattery.deployed": {
"RequirePermission": false,
"PowerAmount": 0
},
"smartalarm": {
"RequirePermission": false,
"PowerAmount": 0
},
"smartswitch": {
"RequirePermission": false,
"PowerAmount": 0
},
"splitter": {
"RequirePermission": false,
"PowerAmount": 0
},
"storagemonitor.deployed": {
"RequirePermission": false,
"PowerAmount": 0
},
"switch": {
"RequirePermission": false,
"PowerAmount": 0
},
"telephone.deployed": {
"RequirePermission": false,
"PowerAmount": 0
},
"teslacoil.deployed": {
"RequirePermission": false,
"PowerAmount": 0
},
"timer": {
"RequirePermission": false,
"PowerAmount": 0
},
"water.pump.deployed": {
"RequirePermission": false,
"PowerAmount": 0
},
"xmas.advanced.lights.deployed": {
"RequirePermission": false,
"PowerAmount": 0
},
"xorswitch.entity": {
"RequirePermission": false,
"InputSlots": [
0,
1
],
"PowerAmounts": [
0,
0
]
}
}
}
每个实体类型都有以下配置选项,在配置中映射到实体的预设简称。
实体电源要求
为了帮助您根据您的使用情况配置插件,下面列出了每个实体的最小可用电量。这些可能略高于功率要求,因为如果不为输出提供额外的功率,一些实体实际上是无用的。我为实体添加了一个+,在那里增加更多的能力除了简单的穿越之外还提供了一个有用的功能。
问:为什么我要为分支或分路器提供免费电源?
答:允许它们本质上作为具有多个输出的测试发生器。非常有用。
问:我为什么要为AND交换机提供免费电源?
答:所以它可以用来提高HBHF传感器的低功率输出,因为它只输出每个检测到的球员1个功率。
例如,如果您想使用or开关将多个HBHF传感器连接在一起,OR开关将消耗HBHF传感器发送的所有功率,使它们实际上毫无用处。为了减轻这种情况,您可以通过一个AND开关发送其输出来提高每个HBHF传感器的功率输出,该开关在另一个输入端具有额外的功率,您可以通过该插件免费获得(不需要发电机)。
问:为什么我要为智能报警器提供免费电源?
答:简化一些有效的电路设计。
例如,在一般情况下,您可以使用以下布线设计一个电路,在该电路中,墙壁或地板的破坏会触发智能警报。
发电机->电气分支(附在墙上)->阻断器(“阻断直通”输入)->智能报警
当电力分支所连接的墙壁被破坏时,电力将恢复流经阻断器,以触发智能警报。有了智能闹钟的免费电源,你可以简单地在墙上放置一个开关或按钮,将其连接到智能闹钟,并让它永远关闭。当那个实体被墙摧毁时,电线会断开,让智能警报器开始自己发电并触发通知。
开发者挂钩
父实体已经被这个插件忽略了,所以插件冲突是不可能的。插件也可以通过阻止这个插件的更新OnInputUpdate钩,但OnPowerlessInputUpdate如果需要,下面的钩子也可以用于更精细的控制。
OnPowerlessInputUpdate
- 允许任何电气实体产生可配置的电量
- 允许通过准确产生实体所需的电力(例如,电加热器为3)来使实体实际上断电
- 允许通过产生比它们需要的更多的功率(例如,1000用于分离器)来使实体作为测试发生器
- 可选地仅适用于由具有权限的玩家部署的实体,可根据实体类型进行配置
- 设计用于电路,因此带有电线的输入会被忽略
装置
- 将插件添加到oxide/pluginsRust服务器安装的目录
- 更新插件配置,以确定每个实体类型应该获得多少自由权力,以及是否需要权限
- 如果适用,授予上一步中的权限(参见权限部分)
- 重新加载插件
- 未接通电源的现有实体将自动获得您配置的电量
- 插入的现有实体最初不会受到影响,但断开输入线将立即导致这些实体产生您配置的电量
- 稍后部署的实体将自动获得您配置的电量
- 授予权限或角色后,您需要重新加载插件来自动启动现有实体
- 确保为使用配置的每个实体授予权限"RequirePermission": true(默认关闭)
- 确保您为每个实体配置的功率量至少是功率需求,否则将没有任何效果
- 下面的配置部分列出了大多数实体的电源要求,以帮助您根据自己的使用情况配置插件
这个插件使用权限系统。若要分配权限,请使用oxide.grant <user or group> <name or steam id> <permission>。若要移除权限,请使用oxide.revoke <user or group> <name or steam id> <permission>.
注意:仅当相应实体的配置指定了以下内容时,权限才是必需的"RequirePermission": true。默认值为false对于所有实体。
- powerlesselectronics.all-拥有此权限的玩家部署的所有电气实体将拥有由插件配置决定的自由功率。您还必须为每个实体配置功率量,以使其生效。
- powerlesselectronics.andswitch
- powerlesselectronics.audioalarm
- powerlesselectronics.autoturret
- powerlesselectronics.boombox
- powerlesselectronics.button
- powerlesselectronics.cctv
- powerlesselectronics.ceilinglight
- powerlesselectronics.counter
- powerlesselectronics.discoball
- powerlesselectronics.discofloor
- powerlesselectronics.discofloor.largetiles
- powerlesselectronics.doorcontroller
- powerlesselectronics.flasherlight
- powerlesselectronics.sirenlight
- powerlesselectronics.blocker
- powerlesselectronics.branch
- powerlesselectronics.combiner
- powerlesselectronics.heater
- powerlesselectronics.memorycell
- powerlesselectronics.modularcarlift
- powerlesselectronics.random.switch
- powerlesselectronics.elevatorioentity
- powerlesselectronics.fluidswitch
- powerlesselectronics.hbhfsensor
- powerlesselectronics.igniter
- powerlesselectronics.laserdetector
- powerlesselectronics.laserlight
- powerlesselectronics.large.rechargable.battery
- powerlesselectronics.medium.rechargable.battery
- powerlesselectronics.microphonestandio
- powerlesselectronics.orswitch
- powerlesselectronics.poweredwaterpurifier
- powerlesselectronics.pressurepad
- powerlesselectronics.reactivetarget
- powerlesselectronics.rfbroadcaster
- powerlesselectronics.rfreceiver
- powerlesselectronics.sam_site_turret
- powerlesselectronics.searchlight
- powerlesselectronics.sign.neon.125x125
- powerlesselectronics.sign.neon.125x215
- powerlesselectronics.sign.neon.125x215.animated
- powerlesselectronics.sign.neon.xl
- powerlesselectronics.sign.neon.xl.animated
- powerlesselectronics.simplelight
- powerlesselectronics.smallrechargablebattery
- powerlesselectronics.smartalarm
- powerlesselectronics.smartswitch
- powerlesselectronics.splitter
- powerlesselectronics.storagemonitor
- powerlesselectronics.switch
- powerlesselectronics.telephone
- powerlesselectronics.teslacoil
- powerlesselectronics.timer
- powerlesselectronics.water.pump
- powerlesselectronics.xmas.advanced.lights
- powerlesselectronics.xorswitch
可以在中配置设置和选项PowerlessElectronics文件放在config目录。建议使用编辑器和验证器来避免格式问题和语法错误。
默认配置(没有实体提供免费电源):
{
"Entities": {
"andswitch.entity": {
"RequirePermission": false,
"InputSlots": [
0,
1
],
"PowerAmounts": [
0,
0
]
},
"audioalarm": {
"RequirePermission": false,
"PowerAmount": 0
},
"autoturret_deployed": {
"RequirePermission": false,
"PowerAmount": 0
},
"boombox.deployed": {
"RequirePermission": false,
"PowerAmount": 0
},
"button": {
"RequirePermission": false,
"PowerAmount": 0
},
"cctv_deployed": {
"RequirePermission": false,
"PowerAmount": 0
},
"ceilinglight.deployed": {
"RequirePermission": false,
"PowerAmount": 0
},
"counter": {
"RequirePermission": false,
"PowerAmount": 0
},
"discoball.deployed": {
"RequirePermission": false,
"PowerAmount": 0
},
"discofloor.deployed": {
"RequirePermission": false,
"PowerAmount": 0
},
"discofloor.largetiles.deployed": {
"RequirePermission": false,
"PowerAmount": 0
},
"doorcontroller.deployed": {
"RequirePermission": false,
"PowerAmount": 0
},
"electric.flasherlight.deployed": {
"RequirePermission": false,
"PowerAmount": 0
},
"electric.sirenlight.deployed": {
"RequirePermission": false,
"PowerAmount": 0
},
"electrical.blocker.deployed": {
"RequirePermission": false,
"PowerAmount": 0
},
"electrical.branch.deployed": {
"RequirePermission": false,
"PowerAmount": 0
},
"electrical.combiner.deployed": {
"RequirePermission": false,
"InputSlots": [
0,
1
],
"PowerAmounts": [
0,
0
]
},
"electrical.heater": {
"RequirePermission": false,
"PowerAmount": 0
},
"electrical.memorycell.deployed": {
"RequirePermission": false,
"PowerAmount": 0
},
"electrical.modularcarlift.deployed": {
"RequirePermission": false,
"PowerAmount": 0
},
"electrical.random.switch.deployed": {
"RequirePermission": false,
"PowerAmount": 0
},
"elevatorioentity": {
"RequirePermission": false,
"PowerAmount": 0
},
"fluidswitch": {
"RequirePermission": false,
"InputSlots": [
2
],
"PowerAmount": 0
},
"hbhfsensor.deployed": {
"RequirePermission": false,
"PowerAmount": 0
},
"igniter.deployed": {
"RequirePermission": false,
"PowerAmount": 0
},
"large.rechargable.battery.deployed": {
"RequirePermission": false,
"PowerAmount": 0
},
"laserdetector": {
"RequirePermission": false,
"PowerAmount": 0
},
"laserlight.deployed": {
"RequirePermission": false,
"PowerAmount": 0
},
"medium.rechargable.battery.deployed": {
"RequirePermission": false,
"PowerAmount": 0
},
"microphonestandio.entity": {
"RequirePermission": false,
"PowerAmount": 0
},
"orswitch.entity": {
"RequirePermission": false,
"InputSlots": [
0,
1
],
"PowerAmounts": [
0,
0
]
},
"poweredwaterpurifier.deployed": {
"RequirePermission": false,
"InputSlots": [
1
],
"PowerAmount": 0
},
"pressurepad.deployed": {
"RequirePermission": false,
"PowerAmount": 0
},
"reactivetarget_deployed": {
"RequirePermission": false,
"PowerAmount": 0
},
"rfbroadcaster": {
"RequirePermission": false,
"PowerAmount": 0
},
"rfreceiver": {
"RequirePermission": false,
"PowerAmount": 0
},
"sam_site_turret_deployed": {
"RequirePermission": false,
"PowerAmount": 0
},
"searchlight.deployed": {
"RequirePermission": false,
"PowerAmount": 0
},
"sign.neon.125x125": {
"RequirePermission": false,
"PowerAmount": 0
},
"sign.neon.125x215": {
"RequirePermission": false,
"PowerAmount": 0
},
"sign.neon.125x215.animated": {
"RequirePermission": false,
"PowerAmount": 0
},
"sign.neon.xl": {
"RequirePermission": false,
"PowerAmount": 0
},
"sign.neon.xl.animated": {
"RequirePermission": false,
"PowerAmount": 0
},
"simplelight": {
"RequirePermission": false,
"PowerAmount": 0
},
"smallrechargablebattery.deployed": {
"RequirePermission": false,
"PowerAmount": 0
},
"smartalarm": {
"RequirePermission": false,
"PowerAmount": 0
},
"smartswitch": {
"RequirePermission": false,
"PowerAmount": 0
},
"splitter": {
"RequirePermission": false,
"PowerAmount": 0
},
"storagemonitor.deployed": {
"RequirePermission": false,
"PowerAmount": 0
},
"switch": {
"RequirePermission": false,
"PowerAmount": 0
},
"telephone.deployed": {
"RequirePermission": false,
"PowerAmount": 0
},
"teslacoil.deployed": {
"RequirePermission": false,
"PowerAmount": 0
},
"timer": {
"RequirePermission": false,
"PowerAmount": 0
},
"water.pump.deployed": {
"RequirePermission": false,
"PowerAmount": 0
},
"xmas.advanced.lights.deployed": {
"RequirePermission": false,
"PowerAmount": 0
},
"xorswitch.entity": {
"RequirePermission": false,
"InputSlots": [
0,
1
],
"PowerAmounts": [
0,
0
]
}
}
}
每个实体类型都有以下配置选项,在配置中映射到实体的预设简称。
- RequirePermission (true或者false)-而true,只有由具有相应权限的玩家部署的这种类型的实体才能获得此处配置的能力。正在…false,此类型的所有实体都将在此处配置电源。
- PowerAmount-缺线时提供给每个输入的功率量。
- PowerAmounts-电量列表,适用于实体有多个电源输入的情况。您也可以使用PowerAmount(单数)对所有输入应用相同数量的选项。
- InputSlots(高级)-你应该只需要配置这个选项,如果你想为一个实体提供免费的权力,还没有在插件的默认配置,如当新的项目被引入到游戏中。此选项控制将电源分配给哪些内部插槽号。大多数实体只有一个电源输入,通常位于插槽0,但有些有多个或使用不同的数字,因为也有水输入。
实体电源要求
为了帮助您根据您的使用情况配置插件,下面列出了每个实体的最小可用电量。这些可能略高于功率要求,因为如果不为输出提供额外的功率,一些实体实际上是无用的。我为实体添加了一个+,在那里增加更多的能力除了简单的穿越之外还提供了一个有用的功能。
- andswitch.entity: 2+, 2+
- audioalarm: 1
- autoturret_deployed: 10+
- button: 2+
- boombox.deployed: 1+
- cctv_deployed: 5
- ceilinglight.deployed: 2
- counter: 1+
- discoball.deployed: 1+
- discofloor.deployed: 1+
- discofloor.largetiles.deployed: 1+
- doorcontroller.deployed: 1+
- electric.flasherlight.deployed: 1
- electric.sirenlight.deployed: 1
- electrical.blocker.deployed: 2+
- electrical.branch.deployed: 4+
- electrical.combiner.deployed: 1+, 1+
- electrical.heater: 3
- electrical.memorycell.deployed: 1+
- electrical.modularcarlift.deployed: 5
- electrical.random.switch.deployed: 2+
- elevatorioentity: 5
- fluidswitch: 1
- hbhfsensor.deployed: 2+
- igniter.deployed: 2
- laserdetector: 2+
- laserlight.deployed: 1+
- microphonestandio: 1+
- orswitch.entity: 2+, 2+
- poweredwaterpurifier.deployed: 5
- pressurepad.deployed: 2+
- reactivetarget_deployed: 2+
- rfbroadcaster: 1
- rfreceiver: 2+
- sam_site_turret_deployed: 25
- searchlight.deployed: 10
- sign.neon.125x125: 4
- sign.neon.125x215: 6
- sign.neon.125x215.animated: 10
- sign.neon.xl: 8
- sign.neon.xl.animated: 15
- simplelight: 1
- smartalarm: 1
- smartswitch: 2+
- splitter: 4+
- storagemonitor.deployed: 1+
- switch: 2+
- telephone.deployed: 1+
- teslacoil.deployed: 1-35
- timer: 2+
- water.pump.deployed: 5
- xmas.advanced.lights.deployed: 5
- xorswitch.entity: 1+
问:为什么我要为分支或分路器提供免费电源?
答:允许它们本质上作为具有多个输出的测试发生器。非常有用。
问:我为什么要为AND交换机提供免费电源?
答:所以它可以用来提高HBHF传感器的低功率输出,因为它只输出每个检测到的球员1个功率。
例如,如果您想使用or开关将多个HBHF传感器连接在一起,OR开关将消耗HBHF传感器发送的所有功率,使它们实际上毫无用处。为了减轻这种情况,您可以通过一个AND开关发送其输出来提高每个HBHF传感器的功率输出,该开关在另一个输入端具有额外的功率,您可以通过该插件免费获得(不需要发电机)。
问:为什么我要为智能报警器提供免费电源?
答:简化一些有效的电路设计。
例如,在一般情况下,您可以使用以下布线设计一个电路,在该电路中,墙壁或地板的破坏会触发智能警报。
发电机->电气分支(附在墙上)->阻断器(“阻断直通”输入)->智能报警
当电力分支所连接的墙壁被破坏时,电力将恢复流经阻断器,以触发智能警报。有了智能闹钟的免费电源,你可以简单地在墙上放置一个开关或按钮,将其连接到智能闹钟,并让它永远关闭。当那个实体被墙摧毁时,电线会断开,让智能警报器开始自己发电并触发通知。
开发者挂钩
父实体已经被这个插件忽略了,所以插件冲突是不可能的。插件也可以通过阻止这个插件的更新OnInputUpdate钩,但OnPowerlessInputUpdate如果需要,下面的钩子也可以用于更精细的控制。
OnPowerlessInputUpdate
- 当这个插件将要为一个特定实体的空输入槽供电时调用
- 返回false将阻止此插件影响实体
- 返回null将导致默认行为