local onClientCommand = function(module, command, playerObj, args)
	if isClient() then return end;
    if module ~= "DIY_Booster" then
        return
    end
	
	print ("module:DIY_Booster")
	
	--log
	if command == "UseBooster" then
		print ("module:DIY_Booster - command:UseBooster")
		local vehicle = getVehicleById(args.vehicle)
		if vehicle then
			local part = vehicle:getPartById(args.part)
			if not part then
				noise('no such part '..tostring(args.part))
				return
			end
			--part:setContainerContentAmount(args.amount)
			part:getInventoryItem():setUsedDelta(args.amount)
			vehicle:transmitPartModData(part)
			print ("Setset UsedDelta")
		else
			noise('no such vehicle id='..tostring(args.vehicle))
		end
		
		
		
		
		-- local vehicle = getVehicleById(args.vehicle)
		-- local part = vehicle:getPartById('Battery')
		-- part:getInventoryItem():setUsedDelta(0)
		-- vehicle:transmitPartUsedDelta(part)
		
	end
	
end

Events.OnClientCommand.Add(onClientCommand)


local function chargeBattery(part)
	local vehecle = part:getVehicle()
	part:setContainerContentAmount(0)
	vehicle:transmitPartModData(part)
end