Skip to content

Commit

Permalink
Probably fix editor autosaves changing map name
Browse files Browse the repository at this point in the history
  • Loading branch information
buthed010203 committed Sep 12, 2024
1 parent 304444a commit 968573f
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 4 deletions.
2 changes: 2 additions & 0 deletions core/assets/bundles/bundle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -495,6 +495,8 @@ client.setting.nyduspadpatch.name = Despawn Bullets Fired By Launchpads
client.setting.nyduspadpatch.description = Only applies to nydus, useful for reducing clutter and frame lag
client.setting.forceallowschematics.name = Always Allow Schematics
client.setting.forceallowschematics.description = Allows placing schematics even when they are disabled in map settings
client.setting.blockfishannoyances.name = Block Fish Annoyances
client.setting.blockfishannoyances.description = Blocks labels and line particles as they are abused by staff. Has no effect on gameplay
client.setting.allowjoinany.name = Join Servers On Any Version
client.setting.allowjoinany.description = This is very likely to break things between versions with any significant changes
client.setting.hidebannedblocks.name = Hide Banned And Unplaceable Blocks From The Block List
Expand Down
7 changes: 4 additions & 3 deletions core/src/mindustry/client/utils/ServerUtils.kt
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,8 @@ enum class Server( // FINISHME: This is horrible. Why have I done this?
private val rtv: Cmd = Cmd("/rtv", -1),
@JvmField val freeze: Cmd = Cmd("/freeze", -1),
@JvmField val ghost: Boolean = false,
private val votekickString: String = "Type[orange] /vote <y/n>[] to agree."
private val votekickString: String = "Type[orange] /vote <y/n>[] to agree.",
@JvmField var blockAnnoyances: Boolean = true
) {
other(null),
nydus("nydus"),
Expand All @@ -57,7 +58,7 @@ enum class Server( // FINISHME: This is horrible. Why have I done this?
},
phoenix("Phoenix Network", null, Cmd("/w"), Cmd("/rtv"), Cmd("/freeze", 9), votekickString = "Type [cyan]/vote y"),
korea("Korea", ghost = true),
fish("Fish", null, Cmd("/msg")) {
fish("Fish", null, Cmd("/msg"), blockAnnoyances = Core.settings.getBool("blockfishannoyances")) {
override fun handleMessage(msg: String?, unformatted: String?, sender: Player?): Boolean {
msg ?: return false
if (sender == null && ohnoTask != null) { // Very hacky way of handling autoOhno
Expand All @@ -78,7 +79,7 @@ enum class Server( // FINISHME: This is horrible. Why have I done this?

/** Fish staff spam obnoxious particle rings */
override fun blockEffect(fx: Effect, rot: Float): Boolean {
return rot == 0F && fx == Fx.pointBeam
return blockAnnoyances && rot == 0F && fx == Fx.pointBeam
}
},
darkdustry("Darkdustry")
Expand Down
2 changes: 1 addition & 1 deletion core/src/mindustry/ui/Menus.java
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ public static void infoPopup(String message, float duration, int align, int top,
@Remote(variants = Variant.both, unreliable = true)
public static void label(String message, float duration, float worldx, float worldy){
if(message == null) return;
if(Server.fish.b()) return; // Fish admins spam stupid labels
if(Server.fish.b() && Server.fish.blockAnnoyances) return; // Fish admins spam stupid labels

ui.showLabel(message, duration, worldx, worldy);
}
Expand Down
1 change: 1 addition & 0 deletions core/src/mindustry/ui/dialogs/SettingsMenuDialog.java
Original file line number Diff line number Diff line change
Expand Up @@ -441,6 +441,7 @@ void addSettings(){
client.checkPref("pathnav", true);
client.checkPref("nyduspadpatch", true);
client.checkPref("forceallowschematics", true);
client.checkPref("blockfishannoyances", true, i -> Server.fish.blockAnnoyances = i);
client.checkPref("hidebannedblocks", false);
client.checkPref("allowjoinany", false);
client.checkPref("debug", false, i -> Log.level = i ? Log.LogLevel.debug : Log.LogLevel.info); // Sets the log level to debug
Expand Down

0 comments on commit 968573f

Please sign in to comment.