schematic server setting
This commit is contained in:
@@ -53,6 +53,7 @@ schematic.saved = Schematic saved.
|
|||||||
schematic.delete.confirm = This schematic will be utterly eradicated.
|
schematic.delete.confirm = This schematic will be utterly eradicated.
|
||||||
schematic.rename = Rename Schematic
|
schematic.rename = Rename Schematic
|
||||||
schematic.info = {0}x{1}, {2} blocks
|
schematic.info = {0}x{1}, {2} blocks
|
||||||
|
schematic.disabled = [scarlet]Schematics are not allowed!
|
||||||
|
|
||||||
stat.wave = Waves Defeated:[accent] {0}
|
stat.wave = Waves Defeated:[accent] {0}
|
||||||
stat.enemiesDestroyed = Enemies Destroyed:[accent] {0}
|
stat.enemiesDestroyed = Enemies Destroyed:[accent] {0}
|
||||||
@@ -824,6 +825,7 @@ rules.lighting = Lighting
|
|||||||
rules.ambientlight = Ambient Light
|
rules.ambientlight = Ambient Light
|
||||||
rules.solarpowermultiplier = Solar Power Multiplier
|
rules.solarpowermultiplier = Solar Power Multiplier
|
||||||
|
|
||||||
|
|
||||||
content.item.name = Items
|
content.item.name = Items
|
||||||
content.liquid.name = Liquids
|
content.liquid.name = Liquids
|
||||||
content.unit.name = Units
|
content.unit.name = Units
|
||||||
|
|||||||
@@ -329,7 +329,7 @@ public class DesktopInput extends InputHandler{
|
|||||||
|
|
||||||
table.button(Icon.paste, Styles.clearPartiali, () -> {
|
table.button(Icon.paste, Styles.clearPartiali, () -> {
|
||||||
ui.schematics.show();
|
ui.schematics.show();
|
||||||
}).tooltip("Schematics");
|
}).tooltip("Schematics").disabled(d -> !state.rules.schematicAllowed);
|
||||||
|
|
||||||
table.button(Icon.tree, Styles.clearPartiali, () -> {
|
table.button(Icon.tree, Styles.clearPartiali, () -> {
|
||||||
ui.research.show();
|
ui.research.show();
|
||||||
@@ -387,6 +387,8 @@ public class DesktopInput extends InputHandler{
|
|||||||
if(Core.input.keyTap(Binding.schematic_menu) && !Core.scene.hasKeyboard()){
|
if(Core.input.keyTap(Binding.schematic_menu) && !Core.scene.hasKeyboard()){
|
||||||
if(ui.schematics.isShown()){
|
if(ui.schematics.isShown()){
|
||||||
ui.schematics.hide();
|
ui.schematics.hide();
|
||||||
|
}else if(!state.rules.schematicAllowed) {
|
||||||
|
ui.showInfoToast("@schematic.disabled", 3f);
|
||||||
}else{
|
}else{
|
||||||
ui.schematics.show();
|
ui.schematics.show();
|
||||||
ui.schematics.focusSearchField();
|
ui.schematics.focusSearchField();
|
||||||
@@ -399,10 +401,14 @@ public class DesktopInput extends InputHandler{
|
|||||||
}
|
}
|
||||||
|
|
||||||
if(Core.input.keyRelease(Binding.schematic_select) && !Core.scene.hasKeyboard()){
|
if(Core.input.keyRelease(Binding.schematic_select) && !Core.scene.hasKeyboard()){
|
||||||
lastSchematic = schematics.create(schemX, schemY, rawCursorX, rawCursorY);
|
if(!state.rules.schematicAllowed){
|
||||||
useSchematic(lastSchematic);
|
ui.showInfoToast("@schematic.disabled", 3f);
|
||||||
if(selectRequests.isEmpty()){
|
}else {
|
||||||
lastSchematic = null;
|
lastSchematic = schematics.create(schemX, schemY, rawCursorX, rawCursorY);
|
||||||
|
useSchematic(lastSchematic);
|
||||||
|
if (selectRequests.isEmpty()) {
|
||||||
|
lastSchematic = null;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -90,7 +90,7 @@ public class HudFragment extends Fragment{
|
|||||||
select.button(Icon.menu, style, ui.paused::show);
|
select.button(Icon.menu, style, ui.paused::show);
|
||||||
flip = select.button(Icon.upOpen, style, this::toggleMenus).get();
|
flip = select.button(Icon.upOpen, style, this::toggleMenus).get();
|
||||||
|
|
||||||
select.button(Icon.paste, style, ui.schematics::show).disabled(!state.rules.schematicAllowed);
|
select.button(Icon.paste, style, ui.schematics::show).disabled(d -> !state.rules.schematicAllowed);
|
||||||
|
|
||||||
select.button(Icon.pause, style, () -> {
|
select.button(Icon.pause, style, () -> {
|
||||||
if(net.active()){
|
if(net.active()){
|
||||||
|
|||||||
@@ -61,7 +61,7 @@ public class ServerControl implements ApplicationListener{
|
|||||||
"bans", "",
|
"bans", "",
|
||||||
"admins", "",
|
"admins", "",
|
||||||
"shufflemode", "custom",
|
"shufflemode", "custom",
|
||||||
"globalrules", "{reactorExplosions: false}"
|
"globalrules", "{reactorExplosions: false, schematicAllowed: true}"
|
||||||
);
|
);
|
||||||
|
|
||||||
Log.setLogger((level, text) -> {
|
Log.setLogger((level, text) -> {
|
||||||
|
|||||||
Reference in New Issue
Block a user