mirror of
https://github.com/Anuken/Mindustry.git
synced 2025-01-10 23:28:52 +07:00
Made blocks no longer unlock in custom games
This commit is contained in:
parent
5dcacdeea1
commit
67cfa5d42f
Binary file not shown.
Before Width: | Height: | Size: 624 B After Width: | Height: | Size: 619 B |
@ -398,7 +398,7 @@ mode.waves.name=waves
|
||||
mode.waves.description=the normal mode. limited resources and automatic incoming waves.
|
||||
mode.sandbox.name=sandbox
|
||||
mode.sandbox.description=infinite resources and no timer for waves.
|
||||
mode.sandbox.warning=Note that blocks cannot be used in sandbox mode until they are unlocked in other modes.\n\n[LIGHT_GRAY]If you have not unlocked any blocks, none will appear.
|
||||
mode.custom.warning=Note that blocks cannot be used in custom games until they are unlocked in sectors.\n\n[LIGHT_GRAY]If you have not unlocked any blocks, none will appear.
|
||||
mode.freebuild.name=freebuild
|
||||
mode.freebuild.description=limited resources and no timer for waves.
|
||||
|
||||
|
Binary file not shown.
Before Width: | Height: | Size: 99 KiB After Width: | Height: | Size: 99 KiB |
@ -13,7 +13,6 @@ import io.anuke.mindustry.entities.TileEntity;
|
||||
import io.anuke.mindustry.game.Content;
|
||||
import io.anuke.mindustry.game.ContentDatabase;
|
||||
import io.anuke.mindustry.game.EventType.*;
|
||||
import io.anuke.mindustry.game.GameMode;
|
||||
import io.anuke.mindustry.game.Saves;
|
||||
import io.anuke.mindustry.input.DefaultKeybinds;
|
||||
import io.anuke.mindustry.input.DesktopInput;
|
||||
@ -110,9 +109,9 @@ public class Control extends Module{
|
||||
|
||||
state.set(State.playing);
|
||||
|
||||
if(state.mode == GameMode.sandbox && !Settings.getBool("sandbox-warning", false)){
|
||||
threads.runGraphics(() -> ui.showInfo("$mode.sandbox.warning"));
|
||||
Settings.putBool("sandbox-warning", true);
|
||||
if(world.getSector() == null && !Settings.getBool("custom-warning", false)){
|
||||
threads.runGraphics(() -> ui.showInfo("$mode.custom.warning"));
|
||||
Settings.putBool("custom-warning", true);
|
||||
Settings.save();
|
||||
}
|
||||
});
|
||||
@ -388,7 +387,7 @@ public class Control extends Module{
|
||||
}
|
||||
|
||||
//check unlocks every 2 seconds
|
||||
if(!state.mode.infiniteResources && Timers.get("timerCheckUnlock", 120)){
|
||||
if(world.getSector() != null && Timers.get("timerCheckUnlock", 120)){
|
||||
checkUnlockableBlocks();
|
||||
|
||||
//save if the db changed
|
||||
|
Loading…
Reference in New Issue
Block a user