Skip to content

Commit

Permalink
Fix block config fragment getting discolored
Browse files Browse the repository at this point in the history
  • Loading branch information
buthed010203 committed Dec 10, 2023
1 parent a325dd2 commit 05e9c98
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
9 changes: 4 additions & 5 deletions core/src/mindustry/client/antigrief/Moderation.kt
Original file line number Diff line number Diff line change
Expand Up @@ -86,12 +86,11 @@ class Moderation {
}

Events.on(EventType.PlayerJoin::class.java) { e -> // Trace players when they join, also traces all players on join
if (e.player == null || e.player == Vars.player ||!Core.settings.getBool("modenabled")) return@on
if (e.player == null || e.player == Vars.player || !Core.settings.getBool("modenabled")) return@on
Seer.registerPlayer(e.player)
if (Server.current.adminui() && !e.player.admin) {
silentTrace++
Call.adminRequest(e.player, Packets.AdminAction.trace, null)
}
if (!Server.current.adminui() || e.player.admin) return@on
silentTrace++
Call.adminRequest(e.player, Packets.AdminAction.trace, null)

}
}
Expand Down
2 changes: 1 addition & 1 deletion core/src/mindustry/client/utils/ServerUtils.kt
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ enum class Server( // FINISHME: This is horrible. Why have I done this?
}
}

override fun adminui() = ClientVars.rank >= 5 || player.admin
override fun adminui() = player.admin || ClientVars.rank >= 5
},
phoenix("Phoenix Network", null, Cmd("/w"), Cmd("/rtv"), Cmd("/freeze", 9), votekickString = "Type [cyan]/vote y"),
korea("Korea", ghost = true),
Expand Down
1 change: 1 addition & 0 deletions core/src/mindustry/ui/fragments/BlockConfigFragment.java
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ public void showConfig(Building tile){

table.visible = true;
table.clear();
table.background(null); // clear the background as some blocks set custom ones
tile.buildConfiguration(table);
table.pack();
table.setTransform(true);
Expand Down
2 changes: 1 addition & 1 deletion core/src/mindustry/world/blocks/logic/LogicBlock.java
Original file line number Diff line number Diff line change
Expand Up @@ -674,7 +674,7 @@ public void buildConfiguration(Table table){
ui.logic.show(code, executor, privileged, code -> configure(compress(code, relativeConnections())))
).size(40);

//TODO FINISHME: bundle
// FINISHME: bundle
table.button(Icon.refresh, Styles.cleari, () -> {
var original = code;
ClientVars.configs.add(() -> { // Cursed, enqueues a config now, when that one is run it enqueues a second config.
Expand Down

0 comments on commit 05e9c98

Please sign in to comment.