mirror of
https://github.com/zenith391/OCEmu.git
synced 2025-09-29 16:05:05 -04:00
change white space to tabs instead of spaces
This commit is contained in:
parent
1b83c83d6d
commit
7e7851f0de
@ -107,7 +107,6 @@ end
|
||||
|
||||
-- backend private methods, these are not pushed to user machine environments
|
||||
function modem_host.pushMessage(target, datagram)
|
||||
|
||||
if not modem_host.validTarget(target) then
|
||||
return false, "invalid target, no such client listening" --ignored
|
||||
end
|
||||
@ -154,7 +153,6 @@ function modem_host.processPendingMessages()
|
||||
else
|
||||
table.remove(modem_host.messages, i)
|
||||
end
|
||||
|
||||
end
|
||||
end
|
||||
|
||||
@ -219,7 +217,6 @@ function modem_host.joinExistingMessageBoard()
|
||||
end
|
||||
|
||||
function modem_host.connectMessageBoard()
|
||||
|
||||
if modem_host.connected then
|
||||
return true
|
||||
end
|
||||
@ -276,11 +273,13 @@ function obj.getWakeMessage() -- Get the current wake-up message.
|
||||
cprint("modem.getWakeMessage")
|
||||
return wakeMessage
|
||||
end
|
||||
|
||||
function obj.setWakeMessage(message) -- Set the wake-up message.
|
||||
cprint("modem.setWakeMessage",message)
|
||||
compCheckArg(1,message,"string","nil")
|
||||
wakeMessage = message
|
||||
end
|
||||
|
||||
function obj.close(port) -- Closes the specified port (default: all ports). Returns true if ports were closed.
|
||||
cprint("modem.close",port)
|
||||
compCheckArg(1,port,"number","nil")
|
||||
@ -295,10 +294,12 @@ function obj.close(port) -- Closes the specified port (default: all ports). Retu
|
||||
modem_host.open_ports[port] = nil
|
||||
return true
|
||||
end
|
||||
|
||||
function obj.maxPacketSize() -- Gets the maximum packet size (config setting).
|
||||
cprint("modem.maxPacketSize")
|
||||
return settings.maxNetworkPacketSize
|
||||
end
|
||||
|
||||
if wireless then
|
||||
function obj.getStrength() -- Get the signal strength (range) used when sending messages.
|
||||
cprint("modem.getStrength")
|
||||
@ -310,11 +311,13 @@ if wireless then
|
||||
strength = newstrength
|
||||
end
|
||||
end
|
||||
|
||||
function obj.isOpen(port) -- Whether the specified port is open.
|
||||
cprint("modem.isOpen",port)
|
||||
compCheckArg(1,port,"number")
|
||||
return modem_host.open_ports[port] ~= nil
|
||||
end
|
||||
|
||||
function obj.open(port) -- Opens the specified port. Returns true if the port was opened.
|
||||
cprint("modem.open",port)
|
||||
compCheckArg(1,port,"number")
|
||||
@ -332,10 +335,12 @@ function obj.open(port) -- Opens the specified port. Returns true if the port wa
|
||||
modem_host.open_ports[port] = true
|
||||
return true
|
||||
end
|
||||
|
||||
function obj.isWireless() -- Whether this is a wireless network card.
|
||||
cprint("modem.isWireless")
|
||||
return wireless
|
||||
end
|
||||
|
||||
function obj.broadcast(port, ...) -- Broadcasts the specified data on the specified port.
|
||||
cprint("modem.broadcast",port, ...)
|
||||
compCheckArg(1,port,"number")
|
||||
@ -353,17 +358,17 @@ end
|
||||
local cec = {}
|
||||
|
||||
local doc = {
|
||||
["send"]="function(address:string, port:number, data...) -- Sends the specified data to the specified target.",
|
||||
["getWakeMessage"]="function():string -- Get the current wake-up message.",
|
||||
["setWakeMessage"]="function(message:string):string -- Set the wake-up message.",
|
||||
["close"]="function([port:number]):boolean -- Closes the specified port (default: all ports). Returns true if ports were closed.",
|
||||
["maxPacketSize"]="function():number -- Gets the maximum packet size (config setting).",
|
||||
["getStrength"]="function():number -- Get the signal strength (range) used when sending messages.",
|
||||
["setStrength"]="function(strength:number):number -- Set the signal strength (range) used when sending messages.",
|
||||
["isOpen"]="function(port:number):boolean -- Whether the specified port is open.",
|
||||
["open"]="function(port:number):boolean -- Opens the specified port. Returns true if the port was opened.",
|
||||
["isWireless"]="function():boolean -- Whether this is a wireless network card.",
|
||||
["broadcast"]="function(port:number, data...) -- Broadcasts the specified data on the specified port.",
|
||||
["send"]="function(address:string, port:number, data...) -- Sends the specified data to the specified target.",
|
||||
["getWakeMessage"]="function():string -- Get the current wake-up message.",
|
||||
["setWakeMessage"]="function(message:string):string -- Set the wake-up message.",
|
||||
["close"]="function([port:number]):boolean -- Closes the specified port (default: all ports). Returns true if ports were closed.",
|
||||
["maxPacketSize"]="function():number -- Gets the maximum packet size (config setting).",
|
||||
["getStrength"]="function():number -- Get the signal strength (range) used when sending messages.",
|
||||
["setStrength"]="function(strength:number):number -- Set the signal strength (range) used when sending messages.",
|
||||
["isOpen"]="function(port:number):boolean -- Whether the specified port is open.",
|
||||
["open"]="function(port:number):boolean -- Opens the specified port. Returns true if the port was opened.",
|
||||
["isWireless"]="function():boolean -- Whether this is a wireless network card.",
|
||||
["broadcast"]="function(port:number, data...) -- Broadcasts the specified data on the specified port.",
|
||||
}
|
||||
|
||||
return obj,cec,doc
|
||||
|
Loading…
x
Reference in New Issue
Block a user