Skip to content

Commit 47ade72

Browse files
committed
Fix double storing in lambda.json
1 parent 0b72461 commit 47ade72

File tree

4 files changed

+14
-15
lines changed

4 files changed

+14
-15
lines changed

common/src/main/kotlin/com/lambda/Lambda.kt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ package com.lambda
33
import com.google.gson.Gson
44
import com.google.gson.GsonBuilder
55
import com.lambda.config.serializer.*
6+
import com.lambda.config.serializer.gui.ModuleTagSerializer
67
import com.lambda.config.serializer.gui.TagWindowSerializer
78
import com.lambda.core.Loader
89
import com.lambda.gui.impl.clickgui.windows.TagWindow

common/src/main/kotlin/com/lambda/config/serializer/ModuleTagSerializer.kt renamed to common/src/main/kotlin/com/lambda/config/serializer/gui/ModuleTagSerializer.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package com.lambda.config.serializer
1+
package com.lambda.config.serializer.gui
22

33
import com.google.gson.*
44
import com.lambda.module.tag.ModuleTag
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
package com.lambda.gui.impl.clickgui
2+
3+
import com.lambda.config.Configurable
4+
import com.lambda.config.configurations.GuiConfig
5+
import com.lambda.gui.api.component.WindowComponent
6+
import com.lambda.gui.impl.clickgui.windows.TagWindow
7+
8+
object GuiConfigurable : Configurable(GuiConfig) {
9+
override val name = "ClickGui"
10+
val windows = setting("windows", mutableListOf<WindowComponent<*>>(TagWindow()))
11+
}
Lines changed: 1 addition & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,10 @@
11
package com.lambda.gui.impl.clickgui
22

3-
import com.lambda.command.CommandManager.setting
4-
import com.lambda.config.Configurable
5-
import com.lambda.config.configurations.GuiConfig
63
import com.lambda.gui.api.LambdaGui
74
import com.lambda.gui.api.component.WindowComponent
85
import com.lambda.gui.api.component.core.list.IListComponent
9-
import com.lambda.gui.impl.clickgui.windows.TagWindow
106
import com.lambda.module.modules.client.ClickGui
117

128
object LambdaClickGui : LambdaGui("ClickGui", ClickGui), IListComponent<WindowComponent<*>> {
13-
private val windows = setting("windows", mutableListOf<WindowComponent<*>>(TagWindow()))
14-
override val children: MutableList<WindowComponent<*>> get() = windows.value
15-
16-
init {
17-
object : Configurable(GuiConfig) {
18-
init { settings.add(windows) }
19-
20-
override val name = this@LambdaClickGui.name
21-
}
22-
}
9+
override val children: MutableList<WindowComponent<*>> get() = GuiConfigurable.windows.value
2310
}

0 commit comments

Comments
 (0)