Skip to content

Commit 5c9563a

Browse files
committed
4.0.1
1 parent 6973087 commit 5c9563a

File tree

9 files changed

+65
-24
lines changed

9 files changed

+65
-24
lines changed

changelog.txt

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,16 @@
1+
Version 4.0.0
2+
3+
- Added optional lunalib settings support with a bunch of settings to customise the new UI.
4+
- Added tab cycling (disbled by default).
5+
- Added context sentitive command suggestions. (disabled by default)
6+
- The up/down keys will now loop through autocompletions.
7+
- Readded the RAM/VRAM display.
8+
- Reverted the name of a class to fix an issue with ShipBrowser.
9+
- Moved a few things to on application load, should prevent a small lag when first opening the console.
10+
- Fixed an issue where sometimes the same command would be added to the command history twice in a row.
11+
12+
13+
114
Version 4.0.0
215

316
- Complete visual overhaul of the legacy UI.

console.version

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
"modVersion": {
66
"major": 4,
77
"minor": 0,
8-
"patch": 0
8+
"patch": 1
99
},
1010

1111
#Link towards a direct download, fetched from the online version file

data/config/LunaSettings.csv

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
fieldID,fieldName,fieldType,defaultValue,secondaryValue,fieldDescription,minValue,maxValue,tab
22
,,,,,,,,
3+
console_keybindsHeader,Keybinds,Header,Keybinds,,,,,
4+
console_openKeybind,Console Keybind,Keycode,14,,Key that should be pressed to open the console. ,,,
5+
console_holdCTRL,Require Ctrl,Boolean,true,,"If enabled, requires CTRL to be held in addition to the keybind.",,,
6+
console_holdSHIFT,Require Shift,Boolean,false,,"If enabled, requires Shift to be held in addition to the keybind.",,,
7+
console_holdALT,Require Alt,Boolean,false,,"If enabled, requires Alt to be held in addition to the keybind.",,,
8+
,,,,,,,,
39
console_uiHeader,UI,Header,UI,,,,,
410
console_enableBackgroundBlur,Enable blur,Boolean,true,,Enable the blur that is applied to everything behind the console. This blur is only displayed when [GraphicsLib] is active and its [enableShaders] config is set to true.,,,
511
console_backgroundDarkening,Background darkening,Double,0.9,,"How strongly the background is darkened while the console is open. 1 is fully dark, 0 is completely visible",0,1,
@@ -15,4 +21,9 @@ console_autocompletionsCount,Autocompletions display count,Int,20,,Sets the maxi
1521
,,,,,,,,
1622
console_MiscHeader,Misc,Header,Misc,,,,,
1723
console_showRAMAndVram,Show RAM/VRAM usage,Boolean,true,,Display RAM and VRAM usage in the Console.,,,
18-
,,,,,,,,
24+
,,,,,,,,
25+
console_legacyHeader,Legacy Console,Header,Legacy Console,,,,,
26+
console_legacyText,Legacy Console,Text,"If you want to use the legacy console, it can be enabled in [""ConsoleCommands/data/console/console_settings.json""] by changing [""enableLegacyConsole""] from false to true.
27+
28+
The legacy console does not use any settings from this screen.
29+
Configure it with the LegacyConsoleSettings command in the console.",,,,,

jars/lw_Console.jar

432 Bytes
Binary file not shown.

mod_info.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"name": "Console Commands",
44
"author": "LazyWizard, Lukas04",
55
"utility": "true",
6-
"version": "4.0.0",
6+
"version": "4.0.1",
77
"description": "An in-game developer's console, by default summoned with control+backspace.\n\nFor a complete list of commands enter 'help'. For more information on a specific command enter 'help <command>'. Enter 'settings' to customize the console's appearance and behavior, including the key used to summon it.\n\nThis should be compatible with all mods and doesn't require a new game.",
88
"gameVersion": "0.98a-RC5",
99
"jars": [

src/org/lazywizard/console/ConsolePlugins.kt

Lines changed: 14 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -10,28 +10,24 @@ import org.lazywizard.console.BaseCommand.CommandContext
1010
import org.lazywizard.console.overlay.legacy.addToHistory
1111
import org.lazywizard.console.overlay.legacy.show
1212
import org.lazywizard.console.overlay.v2.panels.ConsoleOverlayPanel
13+
import org.lazywizard.console.overlay.v2.settings.ConsoleV2Settings
1314
import org.lazywizard.lazylib.StringUtils
1415
import java.util.*
1516

1617
internal class ConsoleCampaignListener : CampaignInputListener, ConsoleListener {
17-
override fun getListenerInputPriority(): Int = 9999
18+
override fun getListenerInputPriority(): Int = Int.MAX_VALUE-10
1819

1920
override fun processCampaignInputPreCore(events: MutableList<InputEventAPI>) {
2021
if (Global.getSector().campaignUI.isShowingMenu) return
2122

22-
23-
if (ConsoleOverlayPanel.instance == null && Console.getSettings().consoleSummonKey.isPressed(events)) {
24-
if (Console.isUseLegacyConsole()) {
25-
show(context)
26-
}
27-
else if (ConsoleOverlayPanel.instance == null) {
28-
ConsoleOverlayPanel(context)
29-
}
23+
if (ConsoleOverlayPanel.instance == null && Console.isUseLegacyConsole() && Console.getSettings().consoleSummonKey.isPressed(events)) {
24+
show(context)
25+
events.clear()
26+
}
27+
else if (ConsoleOverlayPanel.instance == null && ConsoleV2Settings.consoleKeybind.isPressed(events)) {
28+
ConsoleOverlayPanel(context)
3029
events.clear()
3130
}
32-
33-
34-
3531

3632
Console.advance(this)
3733
}
@@ -64,13 +60,12 @@ internal class ConsoleCombatListener : BaseEveryFrameCombatPlugin(), ConsoleList
6460
if (!::context.isInitialized || Global.getCombatEngine().playerShip == null) return
6561

6662

67-
if (ConsoleOverlayPanel.instance == null && Console.getSettings().consoleSummonKey.isPressed(events)) {
68-
if (Console.isUseLegacyConsole()) {
69-
show(context)
70-
}
71-
else if (ConsoleOverlayPanel.instance == null) {
72-
ConsoleOverlayPanel(context)
73-
}
63+
if (ConsoleOverlayPanel.instance == null && Console.isUseLegacyConsole() && Console.getSettings().consoleSummonKey.isPressed(events)) {
64+
show(context)
65+
events.clear()
66+
}
67+
else if (ConsoleOverlayPanel.instance == null && ConsoleV2Settings.consoleKeybind.isPressed(events)) {
68+
ConsoleOverlayPanel(context)
7469
events.clear()
7570
}
7671

src/org/lazywizard/console/ConsoleSettings.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@ object ConsoleSettings {
144144
}
145145
}
146146

147-
private class KeystrokePref(val key: String, default: Keystroke) {
147+
public class KeystrokePref(val key: String, default: Keystroke) {
148148
private var field = parseKeystroke(settings.optString(key, asString(default)))
149149

150150
private fun asString(keystroke: Keystroke) =

src/org/lazywizard/console/ShowSettings.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@ public CommandResult runCommand(String args, CommandContext context)
2929
if (ConsoleOverlayPanel.getInstance() != null) {
3030
Console.showMessage("Error: This command only works within the legacy console");
3131
return CommandResult.ERROR;
32-
3332
}
3433

3534
if (!context.isInCampaign())

src/org/lazywizard/console/overlay/v2/settings/ConsoleV2Settings.kt

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,23 @@
11
package org.lazywizard.console.overlay.v2.settings
22

33
import lunalib.lunaSettings.LunaSettings
4+
import org.lazywizard.console.ConsoleSettings
5+
import org.lazywizard.console.ConsoleSettings.Keystroke
6+
import org.lazywizard.console.ConsoleSettings.KeystrokePref
7+
import org.lwjgl.input.Keyboard
48
import java.awt.Color
59

610
object ConsoleV2Settings {
711

812
var MOD_ID = "lw_console"
913

14+
/* var consoleKeybind = Keyboard.KEY_BACK
15+
var needsHoldCTRL = true
16+
var needsHoldShift = false
17+
var needsHoldAlt = false*/
18+
19+
var consoleKeybind = ConsoleSettings.Keystroke(Keyboard.KEY_BACK, true, false, false)
20+
1021
var enableBackgroundBlur = true
1122
var backgroundDarkening = 0.9f
1223
var textInputColor = Color(243, 245, 250)
@@ -23,6 +34,18 @@ object ConsoleV2Settings {
2334
//Only called from the ConsoleLunaSettingsListener class
2435
@JvmStatic
2536
fun update() {
37+
38+
/*consoleKeybind = LunaSettings.getInt(MOD_ID, "console_openKeybind")!!
39+
needsHoldCTRL = LunaSettings.getBoolean(MOD_ID, "console_holdCTRL")!!
40+
needsHoldShift = LunaSettings.getBoolean(MOD_ID, "console_holdSHIFT")!!
41+
needsHoldAlt = LunaSettings.getBoolean(MOD_ID, "console_holdALT")!!*/
42+
43+
consoleKeybind = Keystroke(LunaSettings.getInt(MOD_ID, "console_openKeybind")!!,
44+
LunaSettings.getBoolean(MOD_ID, "console_holdCTRL")!!,
45+
LunaSettings.getBoolean(MOD_ID, "console_holdALT")!!,
46+
LunaSettings.getBoolean(MOD_ID, "console_holdSHIFT")!!
47+
)
48+
2649
enableBackgroundBlur = LunaSettings.getBoolean(MOD_ID, "console_enableBackgroundBlur")!!
2750
backgroundDarkening = LunaSettings.getFloat(MOD_ID, "console_backgroundDarkening")!!
2851
textInputColor = LunaSettings.getColor(MOD_ID, "console_inputTextColor")!!

0 commit comments

Comments
 (0)