mirror of
https://github.com/PHIDIAS0303/ExpCluster.git
synced 2026-11-16 00:24:52 +09:00
Personal Battery Recharge Error Message (#290)
* Update vlayer.lua * Update vlayer.lua * Update vlayer.lua
This commit is contained in:
1 parent
5b1081db57
commit
9a3161d776
1 file changed
+4
@@ -8,6 +8,10 @@ local vlayer = require 'modules.control.vlayer'
|
||||
Commands.new_command('personal-battery-recharge', 'Recharge Player Battery upto a portion with vlayer')
|
||||
:add_param('amount', 'number-range', 0.2, 1)
|
||||
:register(function(player, amount)
|
||||
if vlayer.get_statistics()['energy_sustained'] == 0 then
|
||||
return Commands.error('vlayer need to be running to get this command work')
|
||||
end
|
||||
|
||||
local armor = player.get_inventory(defines.inventory.character_armor)[1].grid
|
||||
|
||||
for i=1, #armor.equipment do
|
||||
|
||||
Reference in new issue
Block a user