check for nulls on waila integration

closes #3017

# Conflicts:
#	src/main/scala/li/cil/oc/integration/waila/BlockDataProvider.scala
This commit is contained in:
payonel 2019-02-02 00:49:53 -08:00
commit 6cb67d3e6b
3 changed files with 10 additions and 4 deletions

View File

@ -103,7 +103,7 @@ function tty.stream:write(value)
local x, y = tty.getCursor() local x, y = tty.getCursor()
local _, ei, delim = unicode.sub(window.output_buffer, 1, window.width):find("([\27\t\r\n\a\b\15])") local _, ei, delim = unicode.sub(window.output_buffer, 1, window.width):find("([\27\t\r\n\a\b\v\15])")
local segment = ansi_print .. (ei and window.output_buffer:sub(1, ei - 1) or window.output_buffer) local segment = ansi_print .. (ei and window.output_buffer:sub(1, ei - 1) or window.output_buffer)
if segment ~= "" then if segment ~= "" then
@ -139,6 +139,8 @@ function tty.stream:write(value)
y = y + 1 y = y + 1
elseif delim == "\b" then elseif delim == "\b" then
x = x - 1 x = x - 1
elseif delim == "\v" then
y = y + 1
elseif delim == "\a" and not beeped then elseif delim == "\a" and not beeped then
computer.beep() computer.beep()
beeped = true beeped = true

View File

@ -40,7 +40,7 @@ Dalek Sec # Doctor Who
Data # Star Trek Data # Star Trek
David # A.I. (the movie) David # A.I. (the movie)
Death Trap # Borderlands 2's Mechromancer Death Trap # Borderlands 2's Mechromancer
Decepticon #Transformers Decepticon # Transformers
Deep Thought # Hitchhiker's Guide to the Galaxy Deep Thought # Hitchhiker's Guide to the Galaxy
Deputy ANDY # Eureka Deputy ANDY # Eureka
Dog # Half-Life Dog # Half-Life
@ -54,10 +54,11 @@ E.V.E # Anno 2070
Eve # Wall-E Eve # Wall-E
Fact Core # Portal Fact Core # Portal
Flexo # Futurama Flexo # Futurama
Gerty # Moon (film) Gerty # Moon
Ghost # I, Robot quote "There have always been ghosts in the machine" Ghost # I, Robot quote "There have always been ghosts in the machine"
GLaDOS # Portal GLaDOS # Portal
Gipsy Danger # Pacific Rim Gipsy Danger # Pacific Rim
G.U.N.T.E.R. # Lost in Space
HAL 9000 # Space Odyssey HAL 9000 # Space Odyssey
Harbinger # Mass Effect Harbinger # Mass Effect
Harkness # Fallout 3 Harkness # Fallout 3
@ -84,7 +85,7 @@ Mawhrin-skel # The Player of Games (Iain M Banks)
Michiyo # Contributor Michiyo # Contributor
*Mute # Analogue: A Hate Story / Hate Plus *Mute # Analogue: A Hate Story / Hate Plus
Mycroft Holmes # The Moon Is a Harsh Mistress Mycroft Holmes # The Moon Is a Harsh Mistress
PacMan # Pacman Pac-Man # Pac-Man
Optimus # Transformers. Seperated "Optimus Prime" into two names, as both are quite fitting robot names. Optimus # Transformers. Seperated "Optimus Prime" into two names, as both are quite fitting robot names.
P-Body # Portal P-Body # Portal
Pintsize # Questionable Content Pintsize # Questionable Content

View File

@ -161,6 +161,9 @@ object WirelessNetworkCard {
) )
override def getDeviceInfo: util.Map[String, String] = deviceInfo override def getDeviceInfo: util.Map[String, String] = deviceInfo
override protected def isPacketAccepted(packet: Packet, distance: Double) = distance != 0 && super.isPacketAccepted(packet, distance)
} }
class Tier2(host: EnvironmentHost) extends Tier1(host) { class Tier2(host: EnvironmentHost) extends Tier1(host) {