From 871e3c83d36c428c8652e0527eb19c217bb072d2 Mon Sep 17 00:00:00 2001 From: "Eric T. Johnson" Date: Thu, 5 Oct 2023 16:01:21 -0400 Subject: [PATCH 1/2] Update FancyGradle repo (#3658) --- build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.gradle b/build.gradle index 5327018b4..fdae2548d 100644 --- a/build.gradle +++ b/build.gradle @@ -6,7 +6,7 @@ buildscript { } maven { name 'FancyGradle' - url 'https://gitlab.com/api/v4/projects/26758973/packages/maven' + url 'https://maven.gofancy.wtf/releases' } } dependencies { From 1097acd8fb9dd724eab4b1d961f65cc42b0ef13f Mon Sep 17 00:00:00 2001 From: Christopher Head Date: Sun, 7 Apr 2024 01:14:41 -0700 Subject: [PATCH 2/2] 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)