+ Added F5 key
+ Added french translation + Added lock aspect ratio check box + Added a few config options + More stuff I forgot
This commit is contained in:
parent
0e57567faf
commit
7b62fd1980
20
README.md
20
README.md
|
|
@ -1,19 +1,12 @@
|
||||||
# WebDisplays for Minecraft 1.12.2
|
# WebDisplays for Minecraft 1.12.2
|
||||||
This is the unfinished port of the WebDisplays mod for Minecraft 1.12.2. The text below is my "TODO" list.
|
This is the unfinished port of the WebDisplays mod for Minecraft 1.12.2. The text below is my "TODO" list.
|
||||||
|
|
||||||
### Missing features
|
|
||||||
* Read config (see "Config elements" below)
|
|
||||||
|
|
||||||
### TODO
|
### TODO
|
||||||
* French translations
|
* TESTING
|
||||||
* Change mod name to WD2
|
* "Anti-9minecraft"
|
||||||
* Auto-find rotation for BOTTOM & TOP screens
|
* Write wiki
|
||||||
|
* Update website
|
||||||
### Config elements
|
* Publish
|
||||||
* RPMP (Real pixels per Minecraft pixels)
|
|
||||||
* Screen load/unload distance (max distance = 60.0)
|
|
||||||
* Disable ownership thief item
|
|
||||||
* Put a limit on screen resolution
|
|
||||||
|
|
||||||
### Delayed things
|
### Delayed things
|
||||||
* Plugin API
|
* Plugin API
|
||||||
|
|
@ -22,5 +15,4 @@ This is the unfinished port of the WebDisplays mod for Minecraft 1.12.2. The tex
|
||||||
* Center camera to screen when using keyboard
|
* Center camera to screen when using keyboard
|
||||||
* minePad management: check GuiContainer.draggedStack for minePad
|
* minePad management: check GuiContainer.draggedStack for minePad
|
||||||
* In-game command to add/remove blacklisted domains
|
* In-game command to add/remove blacklisted domains
|
||||||
|
* Config: RPMP (Real pixels per Minecraft pixels)
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -102,9 +102,16 @@ public class WebDisplays {
|
||||||
public double padResX;
|
public double padResX;
|
||||||
public double padResY;
|
public double padResY;
|
||||||
private int lastPadId = 0;
|
private int lastPadId = 0;
|
||||||
public boolean doHardRecipe = true;
|
public boolean doHardRecipe;
|
||||||
private boolean hasOC;
|
private boolean hasOC;
|
||||||
private String[] blacklist;
|
private String[] blacklist;
|
||||||
|
public boolean disableOwnershipThief;
|
||||||
|
public double unloadDistance2;
|
||||||
|
public double loadDistance2;
|
||||||
|
public int maxResX;
|
||||||
|
public int maxResY;
|
||||||
|
public int miniservPort;
|
||||||
|
public long miniservQuota;
|
||||||
|
|
||||||
@Mod.EventHandler
|
@Mod.EventHandler
|
||||||
public void onPreInit(FMLPreInitializationEvent ev) {
|
public void onPreInit(FMLPreInitializationEvent ev) {
|
||||||
|
|
@ -115,16 +122,42 @@ public class WebDisplays {
|
||||||
Property padHeight = cfg.get("main", "padHeight", 480);
|
Property padHeight = cfg.get("main", "padHeight", 480);
|
||||||
Property hardRecipe = cfg.get("main", "hardRecipes", true);
|
Property hardRecipe = cfg.get("main", "hardRecipes", true);
|
||||||
Property homePage = cfg.get("main", "homepage", "mod://webdisplays/main.html");
|
Property homePage = cfg.get("main", "homepage", "mod://webdisplays/main.html");
|
||||||
|
Property disableOT = cfg.get("main", "disableOwnershipThief", false);
|
||||||
|
Property maxResX = cfg.get("main", "maxResolutionX", 7680);
|
||||||
|
Property maxResY = cfg.get("main", "maxResolutionY", 4320);
|
||||||
|
Property miniservPort = cfg.get("main", "miniservPort", 25566);
|
||||||
|
Property miniservQuota = cfg.get("main", "miniservQuota", 1024); //It's stored as a string anyway
|
||||||
|
Property loadDistance = cfg.get("client", "loadDistance", 30.0);
|
||||||
|
Property unloadDistance = cfg.get("client", "unloadDistance", 32.0);
|
||||||
|
|
||||||
blacklist.setComment("An array of domain names you don't want to load.");
|
blacklist.setComment("An array of domain names you don't want to load.");
|
||||||
padHeight.setComment("The minePad Y resolution in pixels. padWidth = padHeight * " + PAD_RATIO);
|
padHeight.setComment("The minePad Y resolution in pixels. padWidth = padHeight * " + PAD_RATIO);
|
||||||
hardRecipe.setComment("If true, breaking the minePad is required to craft upgrades.");
|
hardRecipe.setComment("If true, breaking the minePad is required to craft upgrades.");
|
||||||
homePage.setComment("The URL that will be loaded each time you create a screen");
|
homePage.setComment("The URL that will be loaded each time you create a screen");
|
||||||
|
disableOT.setComment("If true, the ownership thief item will be disabled");
|
||||||
|
loadDistance.setComment("All screens outside this range will be unloaded");
|
||||||
|
unloadDistance.setComment("All unloaded screens inside this range will be loaded");
|
||||||
|
maxResX.setComment("Maximum horizontal screen resolution, in pixels");
|
||||||
|
maxResY.setComment("Maximum vertical screen resolution, in pixels");
|
||||||
|
miniservPort.setComment("The port used by miniserv. 0 to disable.");
|
||||||
|
miniservPort.setMaxValue(Short.MAX_VALUE);
|
||||||
|
miniservQuota.setComment("The amount of data that can be uploaded to miniserv, in KiB (so 1024 = 1 MiO)");
|
||||||
|
|
||||||
|
if(unloadDistance.getDouble() < loadDistance.getDouble() + 2.0)
|
||||||
|
unloadDistance.set(loadDistance.getDouble() + 2.0);
|
||||||
|
|
||||||
cfg.save();
|
cfg.save();
|
||||||
|
|
||||||
this.blacklist = blacklist.getStringList();
|
this.blacklist = blacklist.getStringList();
|
||||||
this.doHardRecipe = hardRecipe.getBoolean();
|
doHardRecipe = hardRecipe.getBoolean();
|
||||||
this.homePage = homePage.getString();
|
this.homePage = homePage.getString();
|
||||||
|
disableOwnershipThief = disableOT.getBoolean();
|
||||||
|
unloadDistance2 = unloadDistance.getDouble() * unloadDistance.getDouble();
|
||||||
|
loadDistance2 = loadDistance.getDouble() * loadDistance.getDouble();
|
||||||
|
this.maxResX = maxResX.getInt();
|
||||||
|
this.maxResY = maxResY.getInt();
|
||||||
|
this.miniservPort = miniservPort.getInt();
|
||||||
|
this.miniservQuota = miniservQuota.getLong() * 1024L;
|
||||||
|
|
||||||
CREATIVE_TAB = new WDCreativeTab();
|
CREATIVE_TAB = new WDCreativeTab();
|
||||||
|
|
||||||
|
|
@ -233,9 +266,12 @@ public class WebDisplays {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Server sv = Server.getInstance();
|
if(miniservPort != 0) {
|
||||||
sv.setDirectory(new File(worldDir, "wd_filehost"));
|
Server sv = Server.getInstance();
|
||||||
sv.start(); //TODO: Configure port
|
sv.setPort(miniservPort);
|
||||||
|
sv.setDirectory(new File(worldDir, "wd_filehost"));
|
||||||
|
sv.start();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@SubscribeEvent
|
@SubscribeEvent
|
||||||
|
|
@ -295,7 +331,7 @@ public class WebDisplays {
|
||||||
@SubscribeEvent
|
@SubscribeEvent
|
||||||
public void onLogIn(PlayerEvent.PlayerLoggedInEvent ev) {
|
public void onLogIn(PlayerEvent.PlayerLoggedInEvent ev) {
|
||||||
if(!ev.player.world.isRemote && ev.player instanceof EntityPlayerMP)
|
if(!ev.player.world.isRemote && ev.player instanceof EntityPlayerMP)
|
||||||
WebDisplays.NET_HANDLER.sendTo(new CMessageServerInfo(25566), (EntityPlayerMP) ev.player); //TODO: Port config
|
WebDisplays.NET_HANDLER.sendTo(new CMessageServerInfo(miniservPort), (EntityPlayerMP) ev.player);
|
||||||
}
|
}
|
||||||
|
|
||||||
@SubscribeEvent
|
@SubscribeEvent
|
||||||
|
|
|
||||||
|
|
@ -105,8 +105,6 @@ public class ClientProxy extends SharedProxy implements IResourceManagerReloadLi
|
||||||
|
|
||||||
//Tracking
|
//Tracking
|
||||||
private ArrayList<TileEntityScreen> screenTracking = new ArrayList<>();
|
private ArrayList<TileEntityScreen> screenTracking = new ArrayList<>();
|
||||||
private double unloadDistance2 = 32.0 * 32.0;
|
|
||||||
private double loadDistance2 = 30.0 * 30.0;
|
|
||||||
private int lastTracked = 0;
|
private int lastTracked = 0;
|
||||||
|
|
||||||
//MinePads Management
|
//MinePads Management
|
||||||
|
|
@ -477,11 +475,11 @@ public class ClientProxy extends SharedProxy implements IResourceManagerReloadLi
|
||||||
double dist2 = mc.player.getDistanceSq(tes.getPos());
|
double dist2 = mc.player.getDistanceSq(tes.getPos());
|
||||||
|
|
||||||
if(tes.isLoaded()) {
|
if(tes.isLoaded()) {
|
||||||
if(dist2 > unloadDistance2)
|
if(dist2 > WebDisplays.INSTANCE.unloadDistance2)
|
||||||
tes.unload();
|
tes.unload();
|
||||||
else
|
else
|
||||||
tes.updateTrackDistance(dist2);
|
tes.updateTrackDistance(dist2);
|
||||||
} else if(dist2 <= loadDistance2)
|
} else if(dist2 <= WebDisplays.INSTANCE.loadDistance2)
|
||||||
tes.load();
|
tes.load();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -29,6 +29,7 @@ public class GuiScreenConfig extends WDScreen {
|
||||||
private int friendRights;
|
private int friendRights;
|
||||||
private int otherRights;
|
private int otherRights;
|
||||||
private Rotation rotation = Rotation.ROT_0;
|
private Rotation rotation = Rotation.ROT_0;
|
||||||
|
private float aspectRatio;
|
||||||
|
|
||||||
//Autocomplete handling
|
//Autocomplete handling
|
||||||
private boolean waitingAC;
|
private boolean waitingAC;
|
||||||
|
|
@ -101,6 +102,9 @@ public class GuiScreenConfig extends WDScreen {
|
||||||
@FillControl
|
@FillControl
|
||||||
private Button btnChangeRot;
|
private Button btnChangeRot;
|
||||||
|
|
||||||
|
@FillControl
|
||||||
|
private CheckBox cbLockRatio;
|
||||||
|
|
||||||
private CheckBox[] friendBoxes;
|
private CheckBox[] friendBoxes;
|
||||||
private CheckBox[] otherBoxes;
|
private CheckBox[] otherBoxes;
|
||||||
|
|
||||||
|
|
@ -138,6 +142,7 @@ public class GuiScreenConfig extends WDScreen {
|
||||||
|
|
||||||
tfResX.setText("" + scr.resolution.x);
|
tfResX.setText("" + scr.resolution.x);
|
||||||
tfResY.setText("" + scr.resolution.y);
|
tfResY.setText("" + scr.resolution.y);
|
||||||
|
aspectRatio = ((float) scr.resolution.x) / ((float) scr.resolution.y);
|
||||||
|
|
||||||
//Hopefully upgrades have been synchronized...
|
//Hopefully upgrades have been synchronized...
|
||||||
ugUpgrades.setUpgrades(scr.upgrades);
|
ugUpgrades.setUpgrades(scr.upgrades);
|
||||||
|
|
@ -242,6 +247,22 @@ public class GuiScreenConfig extends WDScreen {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(cbLockRatio.isChecked()) {
|
||||||
|
if(ev.getSource() == tfResX) {
|
||||||
|
try {
|
||||||
|
float val = (float) Integer.parseInt(ev.getNewContent());
|
||||||
|
val /= aspectRatio;
|
||||||
|
tfResY.setText("" + ((int) val));
|
||||||
|
} catch(NumberFormatException ex) {}
|
||||||
|
} else {
|
||||||
|
try {
|
||||||
|
float val = (float) Integer.parseInt(ev.getNewContent());
|
||||||
|
val *= aspectRatio;
|
||||||
|
tfResX.setText("" + ((int) val));
|
||||||
|
} catch(NumberFormatException ex) {}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
btnSetRes.setDisabled(false);
|
btnSetRes.setDisabled(false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -270,6 +291,15 @@ public class GuiScreenConfig extends WDScreen {
|
||||||
otherRights &= ~flag;
|
otherRights &= ~flag;
|
||||||
|
|
||||||
requestSync();
|
requestSync();
|
||||||
|
} else if(ev.getSource() == cbLockRatio && ev.isChecked()) {
|
||||||
|
try {
|
||||||
|
int x = Integer.parseInt(tfResX.getText());
|
||||||
|
int y = Integer.parseInt(tfResY.getText());
|
||||||
|
|
||||||
|
aspectRatio = ((float) x) / ((float) y);
|
||||||
|
} catch(NumberFormatException ex) {
|
||||||
|
cbLockRatio.setChecked(false);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -445,6 +475,7 @@ public class GuiScreenConfig extends WDScreen {
|
||||||
}
|
}
|
||||||
|
|
||||||
public void updateResolution(Vector2i res) {
|
public void updateResolution(Vector2i res) {
|
||||||
|
aspectRatio = ((float) res.x) / ((float) res.y);
|
||||||
tfResX.setText("" + res.x);
|
tfResX.setText("" + res.x);
|
||||||
tfResY.setText("" + res.y);
|
tfResY.setText("" + res.y);
|
||||||
btnSetRes.setDisabled(true);
|
btnSetRes.setDisabled(true);
|
||||||
|
|
|
||||||
|
|
@ -238,6 +238,9 @@ public class GuiServer extends WDScreen {
|
||||||
updateUploadScreen();
|
updateUploadScreen();
|
||||||
} else
|
} else
|
||||||
startFileUpload(file, true);
|
startFileUpload(file, true);
|
||||||
|
} else if(keyCode == Keyboard.KEY_F5) {
|
||||||
|
uploadCD(uploadDir);
|
||||||
|
updateUploadScreen();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -553,13 +556,13 @@ public class GuiServer extends WDScreen {
|
||||||
private void updateUploadScreen() {
|
private void updateUploadScreen() {
|
||||||
lines.clear();
|
lines.clear();
|
||||||
|
|
||||||
lines.add("Choose a file to upload");
|
lines.add(tr("upload.info"));
|
||||||
lines.add(trimStringL(uploadDir.getPath()));
|
lines.add(trimStringL(uploadDir.getPath()));
|
||||||
lines.add("");
|
lines.add("");
|
||||||
|
|
||||||
for(int i = uploadOffset; i < uploadFiles.size() && lines.size() < MAX_LINES; i++) {
|
for(int i = uploadOffset; i < uploadFiles.size() && lines.size() < MAX_LINES; i++) {
|
||||||
if(i == 0 && uploadFirstIsParent)
|
if(i == 0 && uploadFirstIsParent)
|
||||||
lines.add("[Parent directory]");
|
lines.add(tr("upload.parent"));
|
||||||
else
|
else
|
||||||
lines.add(trimStringR(uploadFiles.get(i).getName()));
|
lines.add(trimStringR(uploadFiles.get(i).getName()));
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -15,6 +15,7 @@ import net.minecraft.tileentity.TileEntity;
|
||||||
import net.minecraft.util.*;
|
import net.minecraft.util.*;
|
||||||
import net.minecraft.util.math.AxisAlignedBB;
|
import net.minecraft.util.math.AxisAlignedBB;
|
||||||
import net.minecraft.util.math.BlockPos;
|
import net.minecraft.util.math.BlockPos;
|
||||||
|
import net.minecraft.util.math.MathHelper;
|
||||||
import net.minecraft.world.World;
|
import net.minecraft.world.World;
|
||||||
import net.minecraftforge.fml.common.network.NetworkRegistry;
|
import net.minecraftforge.fml.common.network.NetworkRegistry;
|
||||||
import net.montoyo.mcef.api.IBrowser;
|
import net.montoyo.mcef.api.IBrowser;
|
||||||
|
|
@ -186,6 +187,20 @@ public class TileEntityScreen extends TileEntity {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void clampResolution() {
|
||||||
|
if(resolution.x > WebDisplays.INSTANCE.maxResX) {
|
||||||
|
float newY = ((float) resolution.y) * ((float) WebDisplays.INSTANCE.maxResX) / ((float) resolution.x);
|
||||||
|
resolution.x = WebDisplays.INSTANCE.maxResX;
|
||||||
|
resolution.y = (int) newY;
|
||||||
|
}
|
||||||
|
|
||||||
|
if(resolution.y > WebDisplays.INSTANCE.maxResY) {
|
||||||
|
float newX = ((float) resolution.x) * ((float) WebDisplays.INSTANCE.maxResY) / ((float) resolution.y);
|
||||||
|
resolution.x = (int) newX;
|
||||||
|
resolution.y = WebDisplays.INSTANCE.maxResY;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private ArrayList<Screen> screens = new ArrayList<>();
|
private ArrayList<Screen> screens = new ArrayList<>();
|
||||||
|
|
@ -256,9 +271,23 @@ public class TileEntityScreen extends TileEntity {
|
||||||
ret.otherRights = ScreenRights.DEFAULTS;
|
ret.otherRights = ScreenRights.DEFAULTS;
|
||||||
ret.upgrades = new ArrayList<>();
|
ret.upgrades = new ArrayList<>();
|
||||||
|
|
||||||
if(owner != null)
|
if(owner != null) {
|
||||||
ret.owner = new NameUUIDPair(owner.getGameProfile());
|
ret.owner = new NameUUIDPair(owner.getGameProfile());
|
||||||
|
|
||||||
|
if(side == BlockSide.TOP || side == BlockSide.BOTTOM) {
|
||||||
|
int rot = MathHelper.floor(((double) (owner.rotationYaw * 4.0f / 360.0f)) + 2.5) & 3;
|
||||||
|
|
||||||
|
if(side == BlockSide.TOP) {
|
||||||
|
if(rot == 1)
|
||||||
|
rot = 3;
|
||||||
|
else if(rot == 3)
|
||||||
|
rot = 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
ret.rotation = Rotation.values()[rot];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if(resolution == null || resolution.x < 1 || resolution.y < 1) {
|
if(resolution == null || resolution.x < 1 || resolution.y < 1) {
|
||||||
float psx = ((float) size.x) * 16.f - 4.f;
|
float psx = ((float) size.x) * 16.f - 4.f;
|
||||||
float psy = ((float) size.y) * 16.f - 4.f;
|
float psy = ((float) size.y) * 16.f - 4.f;
|
||||||
|
|
@ -269,6 +298,8 @@ public class TileEntityScreen extends TileEntity {
|
||||||
} else
|
} else
|
||||||
ret.resolution = resolution;
|
ret.resolution = resolution;
|
||||||
|
|
||||||
|
ret.clampResolution();
|
||||||
|
|
||||||
if(!world.isRemote) {
|
if(!world.isRemote) {
|
||||||
ret.setupRedstoneStatus(world, pos);
|
ret.setupRedstoneStatus(world, pos);
|
||||||
|
|
||||||
|
|
@ -380,6 +411,7 @@ public class TileEntityScreen extends TileEntity {
|
||||||
}
|
}
|
||||||
|
|
||||||
scr.resolution = res;
|
scr.resolution = res;
|
||||||
|
scr.clampResolution();
|
||||||
|
|
||||||
if(world.isRemote) {
|
if(world.isRemote) {
|
||||||
WebDisplays.PROXY.screenUpdateResolutionInGui(new Vector3i(pos), side, res);
|
WebDisplays.PROXY.screenUpdateResolutionInGui(new Vector3i(pos), side, res);
|
||||||
|
|
|
||||||
|
|
@ -8,6 +8,7 @@ import net.minecraft.entity.player.EntityPlayer;
|
||||||
import net.minecraft.entity.player.EntityPlayerMP;
|
import net.minecraft.entity.player.EntityPlayerMP;
|
||||||
import net.minecraft.nbt.NBTTagCompound;
|
import net.minecraft.nbt.NBTTagCompound;
|
||||||
import net.minecraft.tileentity.TileEntity;
|
import net.minecraft.tileentity.TileEntity;
|
||||||
|
import net.montoyo.wd.WebDisplays;
|
||||||
import net.montoyo.wd.data.ServerData;
|
import net.montoyo.wd.data.ServerData;
|
||||||
import net.montoyo.wd.utilities.NameUUIDPair;
|
import net.montoyo.wd.utilities.NameUUIDPair;
|
||||||
import net.montoyo.wd.utilities.Util;
|
import net.montoyo.wd.utilities.Util;
|
||||||
|
|
@ -40,10 +41,9 @@ public class TileEntityServer extends TileEntity {
|
||||||
if(world.isRemote)
|
if(world.isRemote)
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
//TODO: Check if miniserv is disabled
|
if(WebDisplays.INSTANCE.miniservPort == 0)
|
||||||
//Util.toast(ply, "noMiniserv");
|
Util.toast(ply, "noMiniserv");
|
||||||
|
else if(owner != null && ply instanceof EntityPlayerMP)
|
||||||
if(owner != null && ply instanceof EntityPlayerMP)
|
|
||||||
(new ServerData(owner)).sendTo((EntityPlayerMP) ply);
|
(new ServerData(owner)).sendTo((EntityPlayerMP) ply);
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
|
|
|
||||||
|
|
@ -43,6 +43,11 @@ public class ItemOwnershipThief extends Item {
|
||||||
if(world.isRemote)
|
if(world.isRemote)
|
||||||
return EnumActionResult.SUCCESS;
|
return EnumActionResult.SUCCESS;
|
||||||
|
|
||||||
|
if(WebDisplays.INSTANCE.disableOwnershipThief) {
|
||||||
|
Util.toast(player, "otDisabled");
|
||||||
|
return EnumActionResult.SUCCESS;
|
||||||
|
}
|
||||||
|
|
||||||
ItemStack stack = player.getHeldItem(hand);
|
ItemStack stack = player.getHeldItem(hand);
|
||||||
if(stack.hasTagCompound()) {
|
if(stack.hasTagCompound()) {
|
||||||
NBTTagCompound tag = stack.getTagCompound();
|
NBTTagCompound tag = stack.getTagCompound();
|
||||||
|
|
|
||||||
|
|
@ -4,6 +4,7 @@
|
||||||
|
|
||||||
package net.montoyo.wd.miniserv.server;
|
package net.montoyo.wd.miniserv.server;
|
||||||
|
|
||||||
|
import net.montoyo.wd.WebDisplays;
|
||||||
import net.montoyo.wd.utilities.Log;
|
import net.montoyo.wd.utilities.Log;
|
||||||
import net.montoyo.wd.utilities.Util;
|
import net.montoyo.wd.utilities.Util;
|
||||||
|
|
||||||
|
|
@ -36,10 +37,13 @@ public class Server implements Runnable {
|
||||||
private final ByteBuffer readBuffer = ByteBuffer.allocateDirect(8192);
|
private final ByteBuffer readBuffer = ByteBuffer.allocateDirect(8192);
|
||||||
private final ClientManager clientMgr = new ClientManager();
|
private final ClientManager clientMgr = new ClientManager();
|
||||||
private File directory;
|
private File directory;
|
||||||
private long maxQuota = 1024 * 1024; //1 MiB max
|
|
||||||
private volatile boolean running;
|
private volatile boolean running;
|
||||||
private volatile Thread thread;
|
private volatile Thread thread;
|
||||||
|
|
||||||
|
public void setPort(int p) {
|
||||||
|
port = p;
|
||||||
|
}
|
||||||
|
|
||||||
public void start() {
|
public void start() {
|
||||||
thread = new Thread(this);
|
thread = new Thread(this);
|
||||||
thread.setName("MiniServServer");
|
thread.setName("MiniServServer");
|
||||||
|
|
@ -231,7 +235,7 @@ public class Server implements Runnable {
|
||||||
}
|
}
|
||||||
|
|
||||||
public long getMaxQuota() {
|
public long getMaxQuota() {
|
||||||
return maxQuota;
|
return WebDisplays.INSTANCE.miniservQuota;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -180,17 +180,25 @@
|
||||||
"label": "$webdisplays.gui.screencfg.setres",
|
"label": "$webdisplays.gui.screencfg.setres",
|
||||||
"disabled": true
|
"disabled": true
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"type": "CheckBox",
|
||||||
|
"name": "cbLockRatio",
|
||||||
|
"x": 257,
|
||||||
|
"y": 99,
|
||||||
|
"label": "$webdisplays.gui.screencfg.lockratio",
|
||||||
|
"checked": true
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"type": "Label",
|
"type": "Label",
|
||||||
"x": 258,
|
"x": 258,
|
||||||
"y": 105,
|
"y": 117,
|
||||||
"label": "$webdisplays.gui.screencfg.rotation"
|
"label": "$webdisplays.gui.screencfg.rotation"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"type": "Button",
|
"type": "Button",
|
||||||
"name": "btnChangeRot",
|
"name": "btnChangeRot",
|
||||||
"x": 260,
|
"x": 260,
|
||||||
"y": 117,
|
"y": 129,
|
||||||
"width": 84
|
"width": 84
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
|
|
|
||||||
|
|
@ -51,6 +51,7 @@ webdisplays.message.upgradeError=Upgrade error :( Check logs...
|
||||||
webdisplays.message.upgradeOk=Upgrade installed!
|
webdisplays.message.upgradeOk=Upgrade installed!
|
||||||
webdisplays.message.linkAbort=Linker reset
|
webdisplays.message.linkAbort=Linker reset
|
||||||
webdisplays.message.noMiniserv=Server block is disabled on this server
|
webdisplays.message.noMiniserv=Server block is disabled on this server
|
||||||
|
webdisplays.message.otDisabled=Ownership thief is disabled on this server
|
||||||
webdisplays.gui.screencfg.owner=Screen owner:
|
webdisplays.gui.screencfg.owner=Screen owner:
|
||||||
webdisplays.gui.screencfg.friends=Friends:
|
webdisplays.gui.screencfg.friends=Friends:
|
||||||
webdisplays.gui.screencfg.permissions=Permissions:
|
webdisplays.gui.screencfg.permissions=Permissions:
|
||||||
|
|
@ -69,6 +70,7 @@ webdisplays.gui.screencfg.rot0=0°
|
||||||
webdisplays.gui.screencfg.rot90=90°
|
webdisplays.gui.screencfg.rot90=90°
|
||||||
webdisplays.gui.screencfg.rot180=180°
|
webdisplays.gui.screencfg.rot180=180°
|
||||||
webdisplays.gui.screencfg.rot270=270°
|
webdisplays.gui.screencfg.rot270=270°
|
||||||
|
webdisplays.gui.screencfg.lockratio=Lock ratio
|
||||||
webdisplays.linker.selectScreen=Right click on a screen
|
webdisplays.linker.selectScreen=Right click on a screen
|
||||||
webdisplays.linker.selectPeripheral=Right click on a peripheral
|
webdisplays.linker.selectPeripheral=Right click on a peripheral
|
||||||
webdisplays.linker.posInfo=Screen pos: %d %d %d
|
webdisplays.linker.posInfo=Screen pos: %d %d %d
|
||||||
|
|
@ -88,7 +90,7 @@ webdisplays.gui.keyboard.warning2=This means anyone can know what you're up to.
|
||||||
webdisplays.gui.keyboard.warning3=NEVER write one of your passwords using this keyboard.
|
webdisplays.gui.keyboard.warning3=NEVER write one of your passwords using this keyboard.
|
||||||
webdisplays.gui.keyboard.gotcha=Got ya
|
webdisplays.gui.keyboard.gotcha=Got ya
|
||||||
advancements.webdisplays.root.title=WebDisplays
|
advancements.webdisplays.root.title=WebDisplays
|
||||||
advancements.webdisplays.root.description=The WebDisplays mod advancements
|
advancements.webdisplays.root.description=The WebDisplays mod
|
||||||
advancements.webdisplays.screen.title=The internet is for...
|
advancements.webdisplays.screen.title=The internet is for...
|
||||||
advancements.webdisplays.screen.description=Craft your first web display
|
advancements.webdisplays.screen.description=Craft your first web display
|
||||||
advancements.webdisplays.minepad.title=This is a revolution
|
advancements.webdisplays.minepad.title=This is a revolution
|
||||||
|
|
@ -126,6 +128,8 @@ webdisplays.server.fnamearg=Missing file name argument
|
||||||
webdisplays.server.nameerr=Invalid file name
|
webdisplays.server.nameerr=Invalid file name
|
||||||
webdisplays.server.urlcopied=Copied URL to clipboard.
|
webdisplays.server.urlcopied=Copied URL to clipboard.
|
||||||
webdisplays.server.notfound=File not found
|
webdisplays.server.notfound=File not found
|
||||||
|
webdisplays.server.upload.info=Choose a file to upload
|
||||||
|
webdisplays.server.upload.parent=[Parent directory]
|
||||||
webdisplays.server.upload.uploading=Uploading...
|
webdisplays.server.upload.uploading=Uploading...
|
||||||
webdisplays.server.upload.done=Done
|
webdisplays.server.upload.done=Done
|
||||||
webdisplays.server.upload.exists=Error: File exists
|
webdisplays.server.upload.exists=Error: File exists
|
||||||
|
|
|
||||||
147
src/main/resources/assets/webdisplays/lang/fr_fr.lang
Normal file
147
src/main/resources/assets/webdisplays/lang/fr_fr.lang
Normal file
|
|
@ -0,0 +1,147 @@
|
||||||
|
itemGroup.webdisplays=§5Web Displays
|
||||||
|
tile.webdisplays.screen.name=Ecran
|
||||||
|
tile.webdisplays.peripheral.name=Périphérique
|
||||||
|
tile.webdisplays.peripheral.keyboard.name=Clavier
|
||||||
|
tile.webdisplays.peripheral.remotectrl.name=Télécommande
|
||||||
|
tile.webdisplays.peripheral.ccinterface.name=Interface ComputerCraft
|
||||||
|
tile.webdisplays.peripheral.cointerface.name=Interface OpenComputers
|
||||||
|
tile.webdisplays.peripheral.redstonectrl.name=Contrôleur
|
||||||
|
tile.webdisplays.peripheral.server.name=Serveur
|
||||||
|
item.webdisplays.screencfg.name=Gestionnaire d'écran
|
||||||
|
item.webdisplays.ownerthief.name=Voleur d'écran [ADMIN]
|
||||||
|
item.webdisplays.linker.name=Outil d'appairage
|
||||||
|
item.webdisplays.craftcomp.name=Composant de recette
|
||||||
|
item.webdisplays.craftcomp.stonekey.name=Touche en pierre
|
||||||
|
item.webdisplays.craftcomp.upgrade.name=Amélioration vide
|
||||||
|
item.webdisplays.craftcomp.peripheral.name=Base de périphérique
|
||||||
|
item.webdisplays.craftcomp.batcell.name=Cellule de batterie
|
||||||
|
item.webdisplays.craftcomp.batpack.name=Batterie
|
||||||
|
item.webdisplays.craftcomp.laserdiode.name=Diode laser 650nm
|
||||||
|
item.webdisplays.craftcomp.backlight.name=Rétroéclairage
|
||||||
|
item.webdisplays.craftcomp.extcard.name=Carte d'extension
|
||||||
|
item.webdisplays.craftcomp.badextcard.name=Carte d'extension ratée
|
||||||
|
item.webdisplays.minepad.name=minePad
|
||||||
|
item.webdisplays.minepad2.name=minePad 2
|
||||||
|
item.webdisplays.upgrade.name=Amélioration d'écran
|
||||||
|
item.webdisplays.upgrade.lasermouse.name=Capteur de laser
|
||||||
|
item.webdisplays.upgrade.redinput.name=Port d'entrée Redstone
|
||||||
|
item.webdisplays.upgrade.redoutput.name=Port de sortie Redstone
|
||||||
|
item.webdisplays.upgrade.gps.name=Module GALILEO
|
||||||
|
item.webdisplays.laserpointer.name=Pointeur laser
|
||||||
|
item.webdisplays.advicon.name=Icone de progrès
|
||||||
|
item.webdisplays.advicon.wd.name=WebDisplays
|
||||||
|
item.webdisplays.advicon.brokenpad.name=minePad cassé
|
||||||
|
item.webdisplays.advicon.pigeon.name=Pigeon
|
||||||
|
webdisplays.message.tooSmall=Trop petit ! La taille minimale est de 2x2.
|
||||||
|
webdisplays.message.invalid=La structure est invalide; regardez vers %s.
|
||||||
|
webdisplays.message.turnOn=Vous devez d'abord allumer l'écran
|
||||||
|
webdisplays.message.screenSet=Ecran sélectionné ! Donnez l'item à quelqu'un...
|
||||||
|
webdisplays.message.newOwner=Vous êtes maintenant le propriétaire de cet écran
|
||||||
|
webdisplays.message.restrictions=Vous n'avez pas le droit de faire cela :(
|
||||||
|
webdisplays.message.peripheral=Ce n'est pas un périphérique!
|
||||||
|
webdisplays.message.linked=Appairé !
|
||||||
|
webdisplays.message.linkError=Erreur d'appairage... :( vérifiez les logs
|
||||||
|
webdisplays.message.notAScreen=Vous devez d'abord sélectionner un écran
|
||||||
|
webdisplays.message.screenSet2=Ecran sélectionné! Maintenant, sélectionnez un périphérique...
|
||||||
|
webdisplays.message.chunkUnloaded=Le chunk dans lequel se trouve l'écran n'est pas chargé
|
||||||
|
webdisplays.message.notLinked=Ce périphérique n'a pas encore été appairé
|
||||||
|
webdisplays.message.missingCC=ComputerCraft non disponible.
|
||||||
|
webdisplays.message.missingOC=OpenComputers non disponible.
|
||||||
|
webdisplays.message.upgradeError=Erreur lors de l'amélioration, vérifiez les logs
|
||||||
|
webdisplays.message.upgradeOk=Amélioration installée !
|
||||||
|
webdisplays.message.linkAbort=Outil d'appairage remis à zéro.
|
||||||
|
webdisplays.message.noMiniserv=Le bloc serveur est désactivé
|
||||||
|
webdisplays.message.otDisabled=Le voleur d'écran est désactivé sur ce serveur
|
||||||
|
webdisplays.gui.screencfg.owner=Propriétaire :
|
||||||
|
webdisplays.gui.screencfg.friends=Amis :
|
||||||
|
webdisplays.gui.screencfg.permissions=Permissions :
|
||||||
|
webdisplays.gui.screencfg.seturl=Changer l'URL
|
||||||
|
webdisplays.gui.screencfg.click=Cliquer & écrire
|
||||||
|
webdisplays.gui.screencfg.friendlist=Gérer les amis
|
||||||
|
webdisplays.gui.screencfg.otherrights=Gérer les autres
|
||||||
|
webdisplays.gui.screencfg.mupgrades=Améliorer & appairer
|
||||||
|
webdisplays.gui.screencfg.mres=Changer la résolution
|
||||||
|
webdisplays.gui.screencfg.others=Autres
|
||||||
|
webdisplays.gui.screencfg.upgrades=Améliorations :
|
||||||
|
webdisplays.gui.screencfg.resolution=Résolution :
|
||||||
|
webdisplays.gui.screencfg.setres=Déf. Resolution
|
||||||
|
webdisplays.gui.screencfg.rotation=Rotation
|
||||||
|
webdisplays.gui.screencfg.rot0=0°
|
||||||
|
webdisplays.gui.screencfg.rot90=90°
|
||||||
|
webdisplays.gui.screencfg.rot180=180°
|
||||||
|
webdisplays.gui.screencfg.rot270=270°
|
||||||
|
webdisplays.gui.screencfg.lockratio=Verrouiller le ratio
|
||||||
|
webdisplays.linker.selectScreen=Cliquez droit sur un écran
|
||||||
|
webdisplays.linker.selectPeripheral=Cliquez droit sur un périphérique
|
||||||
|
webdisplays.linker.posInfo=Pos. écran : %d %d %d
|
||||||
|
webdisplays.linker.sideInfo=Côté : %s
|
||||||
|
webdisplays.gui.seturl.url=URL:
|
||||||
|
webdisplays.gui.seturl.ok=OK
|
||||||
|
webdisplays.gui.seturl.cancel=Annuler
|
||||||
|
webdisplays.gui.seturl.shutdown=Eteindre
|
||||||
|
webdisplays.minepad.turnon=Pour allumer, s'accroupir et faire clique-droit
|
||||||
|
webdisplays.minepad2.info=PAS DE REMBOURSEMENT !
|
||||||
|
webdisplays.extcard.cantcraft1=Vous n'avez pas assez de connaissances
|
||||||
|
webdisplays.extcard.cantcraft2=Vous ALLEZ RATER la fabrication de cet item
|
||||||
|
webdisplays.extcard.bad=Quelqu'un a raté la fabrication de cette carte
|
||||||
|
webdisplays.gui.keyboard.hooked=Clavier attaché. Appuyez sur Echap pour quitter.
|
||||||
|
webdisplays.gui.keyboard.warning1=ATTENTION ! Le texte que vous tapez ici est envoyé EN CLAIR au serveur.
|
||||||
|
webdisplays.gui.keyboard.warning2=Cela signifie que tout le monde peut voir ce que vous tapez.
|
||||||
|
webdisplays.gui.keyboard.warning3=Ne JAMAIS taper de mot de passe avec ce clavier.
|
||||||
|
webdisplays.gui.keyboard.gotcha=Je comprends
|
||||||
|
advancements.webdisplays.root.title=WebDisplays
|
||||||
|
advancements.webdisplays.root.description=Le mod WebDisplays
|
||||||
|
advancements.webdisplays.screen.title=The internet is for...
|
||||||
|
advancements.webdisplays.screen.description=Fabriquez votre premier écran
|
||||||
|
advancements.webdisplays.minepad.title=C'est une révolution
|
||||||
|
advancements.webdisplays.minepad.description=Essayez notre tout dernier bijoux technologique: le minePad !
|
||||||
|
advancements.webdisplays.padbreak.title=Rétro-ingénierie
|
||||||
|
advancements.webdisplays.padbreak.description=Ces trucs là sont fragiles ! Ne les jetez pas de haut pour débloquer les recettes des améliorations !
|
||||||
|
advancements.webdisplays.minepad2.title=Pigeon
|
||||||
|
advancements.webdisplays.minepad2.description=Fabriquez un minePad 2. Ecoutez, je sais que c'est très cher, mais ça veut dire que ce qu'il y'a de mieux non ?
|
||||||
|
advancements.webdisplays.linkperipheral.title=Sans fils !
|
||||||
|
advancements.webdisplays.linkperipheral.description=Appairez un périphérique à un écran
|
||||||
|
advancements.webdisplays.keyboardcat.title=PU**IN DE CHATS
|
||||||
|
advancements.webdisplays.keyboardcat.description=Faites en sorte qu'un ocelot marche sur votre clavier
|
||||||
|
advancements.webdisplays.upgrade.title=Plus qu'un écran
|
||||||
|
advancements.webdisplays.upgrade.description=Installez votre première amélioration
|
||||||
|
advancements.webdisplays.laser.title=Ne pas viser les yeux
|
||||||
|
advancements.webdisplays.laser.description=Fabriquez un pointeur laser
|
||||||
|
webdisplays.side.bottom=Bas
|
||||||
|
webdisplays.side.top=Haut
|
||||||
|
webdisplays.side.north=Nord
|
||||||
|
webdisplays.side.south=Sud
|
||||||
|
webdisplays.side.west=Ouest
|
||||||
|
webdisplays.side.east=Est
|
||||||
|
webdisplays.server.info=Tapez "help" pour obtenir de l'aide
|
||||||
|
webdisplays.server.unknowncmd=Commande inconnue.
|
||||||
|
webdisplays.server.error=Erreur interne. Vérifiez les logs.
|
||||||
|
webdisplays.server.error2=Erreur interne %d. Vérifiez les logs.
|
||||||
|
webdisplays.server.argerror=Argument non reconnu
|
||||||
|
webdisplays.server.queryerr=Erreur de requête, essayez "reconnect".
|
||||||
|
webdisplays.server.errowner=Seul le propriétaire peut faire cela.
|
||||||
|
webdisplays.server.timeout=Le délai est dépaissé. Vérifiez les logs.
|
||||||
|
webdisplays.server.ownername=Nom du propriétaire : %s
|
||||||
|
webdisplays.server.owneruuid=UUID du propriétaire :
|
||||||
|
webdisplays.server.quota=%s/%s utilisés
|
||||||
|
webdisplays.server.fnamearg=Nom de fichier manquant
|
||||||
|
webdisplays.server.nameerr=Nom de fichier invalide
|
||||||
|
webdisplays.server.urlcopied=URL copié dans le presse-papier.
|
||||||
|
webdisplays.server.notfound=Fichier introuvable
|
||||||
|
webdisplays.server.upload.info=Choisissez un fichier
|
||||||
|
webdisplays.server.upload.parent=[Dossier parent]
|
||||||
|
webdisplays.server.upload.uploading=Mise en ligne...
|
||||||
|
webdisplays.server.upload.done=Terminé !
|
||||||
|
webdisplays.server.upload.exists=Erreur : le fichier existe
|
||||||
|
webdisplays.server.upload.quota=Erreur : taille max atteinte
|
||||||
|
webdisplays.server.help.help=Affiche ce texte
|
||||||
|
webdisplays.server.help.clear=Efface l'écran
|
||||||
|
webdisplays.server.help.exit=Quitte la console
|
||||||
|
webdisplays.server.help.access=§kPas d'aide disponible
|
||||||
|
webdisplays.server.help.owner=Affiche le proprio. de ce serveur
|
||||||
|
webdisplays.server.help.quota=Affiche le quota de stockage
|
||||||
|
webdisplays.server.help.ls=Liste les fichiers de ce serveur
|
||||||
|
webdisplays.server.help.url=Copie l'URL d'un fichier
|
||||||
|
webdisplays.server.help.upload=Ouvre l'assitant de mise en ligne
|
||||||
|
webdisplays.server.help.rm=Supprime un fichier
|
||||||
|
webdisplays.server.help.reconnect=Se reco. à Miniserv [DEBUG]
|
||||||
Loading…
Reference in New Issue
Block a user