From 1097acd8fb9dd724eab4b1d961f65cc42b0ef13f Mon Sep 17 00:00:00 2001 From: Christopher Head Date: Sun, 7 Apr 2024 01:14:41 -0700 Subject: [PATCH] Fix screen turnOn/turnOff return value docs (#3698) These component method calls actually both return two booleans, but only the first one was documented. --- src/main/scala/li/cil/oc/common/component/TextBuffer.scala | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/scala/li/cil/oc/common/component/TextBuffer.scala b/src/main/scala/li/cil/oc/common/component/TextBuffer.scala index 70dd49027..d9610f55e 100644 --- a/src/main/scala/li/cil/oc/common/component/TextBuffer.scala +++ b/src/main/scala/li/cil/oc/common/component/TextBuffer.scala @@ -178,14 +178,14 @@ class TextBuffer(val host: EnvironmentHost) extends AbstractManagedEnvironment w @Callback(direct = true, doc = """function():boolean -- Returns whether the screen is currently on.""") def isOn(computer: Context, args: Arguments): Array[AnyRef] = result(isDisplaying) - @Callback(doc = """function():boolean -- Turns the screen on. Returns true if it was off.""") + @Callback(doc = """function():boolean -- Turns the screen on. Returns whether the state changed, and whether it is now on.""") def turnOn(computer: Context, args: Arguments): Array[AnyRef] = { val oldPowerState = isDisplaying setPowerState(value = true) result(isDisplaying != oldPowerState, isDisplaying) } - @Callback(doc = """function():boolean -- Turns off the screen. Returns true if it was on.""") + @Callback(doc = """function():boolean -- Turns off the screen. Returns whether the state changed, and whether it is now on.""") def turnOff(computer: Context, args: Arguments): Array[AnyRef] = { val oldPowerState = isDisplaying setPowerState(value = false)