Killed remote terminals. More power to tablets!

This commit is contained in:
Florian Nücke 2015-01-03 02:06:22 +01:00
parent 33290714e3
commit a804769abd
35 changed files with 42 additions and 508 deletions

View File

@ -30,9 +30,4 @@ public interface ServerRack extends Environment, SidedEnvironment, Rotatable, II
* @return the machine currently hosted in the specified slot. * @return the machine currently hosted in the specified slot.
*/ */
Server server(int slot); Server server(int slot);
/**
* The currently set wireless range in which remote terminals work.
*/
int range();
} }

View File

@ -82,7 +82,6 @@ item.oc.Server2.name=Server (Stufe 3)
item.oc.Server3.name=Server (Kreativ) item.oc.Server3.name=Server (Kreativ)
item.oc.Tablet.name=Tablet item.oc.Tablet.name=Tablet
item.oc.TabletCase.name=Tablet-Gehäuse item.oc.TabletCase.name=Tablet-Gehäuse
item.oc.Terminal.name=Fernbedienung
item.oc.Transistor.name=Transistor item.oc.Transistor.name=Transistor
item.oc.UpgradeAngel.name=Schwebe-Upgrade item.oc.UpgradeAngel.name=Schwebe-Upgrade
item.oc.UpgradeBattery0.name=Akku-Upgrade (Stufe 1) item.oc.UpgradeBattery0.name=Akku-Upgrade (Stufe 1)
@ -162,8 +161,6 @@ oc:gui.ServerRack.WirelessRange=Reichweite
oc:gui.Switch.TransferRate=Taktung oc:gui.Switch.TransferRate=Taktung
oc:gui.Switch.PacketsPerCycle=Pakete / Zyklus oc:gui.Switch.PacketsPerCycle=Pakete / Zyklus
oc:gui.Switch.QueueSize=Puffergröße oc:gui.Switch.QueueSize=Puffergröße
oc:gui.Terminal.InvalidKey=Ungültiger Schlüssel, vermutlich wurde eine andere Fernbedienung an den Server gebunden.
oc:gui.Terminal.OutOfRange=Kein Signal.
# Containers # Containers
oc:container.AccessPoint=Access Point oc:container.AccessPoint=Access Point
@ -243,13 +240,12 @@ oc:tooltip.Robot=Im Gegensatz zu normalen Computern können sich Roboter in der
oc:tooltip.Robot_Level=§fStufe§7: §a%s§7. oc:tooltip.Robot_Level=§fStufe§7: §a%s§7.
oc:tooltip.Robot_StoredEnergy=§fGespeicherte Energie§7: §a%s§7. oc:tooltip.Robot_StoredEnergy=§fGespeicherte Energie§7: §a%s§7.
oc:tooltip.Screen=Zeigt Text an, gesteuert von Grafikkarten in Computern.[nl] Höchstauflösung: §f%sx%s§7[nl] Maximale Farbtiefe: §f%s§7 oc:tooltip.Screen=Zeigt Text an, gesteuert von Grafikkarten in Computern.[nl] Höchstauflösung: §f%sx%s§7[nl] Maximale Farbtiefe: §f%s§7
oc:tooltip.Server=Ein Server kann wie ein gewöhnliches Computergehäuse mit Komponenten verbessert werden. Um den Server zu starten, muss er in einem Servergehäuse installiert werden.[nl] Anzahl unterstützter Fernbedienungen: §f%s§7 oc:tooltip.Server=Ein Server kann wie ein gewöhnliches Computergehäuse mit Komponenten verbessert werden. Um den Server zu starten, muss er in einem Servergehäuse installiert werden.
oc:tooltip.Server.Components=Installierte Komponenten: oc:tooltip.Server.Components=Installierte Komponenten:
oc:tooltip.ServerRack=Erlaubt die Installation von bis zu vier Servern. Stellt für jeden eingebauten Server eine virtuelle Tastatur- und Bildschirmkomponente zur Verfügung, welche je eine Fernbedienung repräsentieren. oc:tooltip.ServerRack=Erlaubt die Installation von bis zu vier Servern. Server müssen konfiguriert werden bevor sie in einem Rack brauchbar sind.
oc:tooltip.Switch=Erlaubt es, mehrere Netzwerke miteinander zu verbinden. Leitet ausschließlich Netzwerknachrichten weiter, Komponenten "hinter" dem Switch sind nicht sichtbar. Nützlich, um Netzwerke zu trennen, jedoch nach wie vor Kommunikation zwischen den Netzwerken zu erlauben, z.b. mittels Netzwerkkarten. oc:tooltip.Switch=Erlaubt es, mehrere Netzwerke miteinander zu verbinden. Leitet ausschließlich Netzwerknachrichten weiter, Komponenten "hinter" dem Switch sind nicht sichtbar. Nützlich, um Netzwerke zu trennen, jedoch nach wie vor Kommunikation zwischen den Netzwerken zu erlauben, z.b. mittels Netzwerkkarten.
oc:tooltip.Tablet=Ein Tablet-PC, für Lua unterwegs. Kann durch Sneak-Aktivierung zwangsgestoppt werden. oc:tooltip.Tablet=Ein Tablet-PC, für Lua unterwegs. Kann durch Sneak-Aktivierung zwangsgestoppt werden.
oc:tooltip.TabletCase=Einfaches Gehäuse für Tablet-PCs. Kann in der Elektronik-Werkbank mit Komponenten bestückt werden, um einen Tablet-PC zu fertigen. oc:tooltip.TabletCase=Einfaches Gehäuse für Tablet-PCs. Kann in der Elektronik-Werkbank mit Komponenten bestückt werden, um einen Tablet-PC zu fertigen.
oc:tooltip.Terminal=Erlaubt es, einen Server aus der Ferne zu steuern, so lange man sich in Reichweite des Servers befindet. Verhält sich wie Bildschirm und Tastatur in einem. Kann mit Shift-Rechtsklick an einen Server in einem Serverschrank gebunden werden.
oc:tooltip.Tier=§8Stufe %s oc:tooltip.Tier=§8Stufe %s
oc:tooltip.TooLong=Halte [§f%s§7] gedrückt für mehr Infos. oc:tooltip.TooLong=Halte [§f%s§7] gedrückt für mehr Infos.
oc:tooltip.Transistor=Elementarer Baustein der meisten Computerkomponenten. Nicht zu verwechseln mit Steinelementaren. oc:tooltip.Transistor=Elementarer Baustein der meisten Computerkomponenten. Nicht zu verwechseln mit Steinelementaren.

View File

@ -93,7 +93,6 @@ item.oc.Server2.name=Server (Tier 3)
item.oc.Server3.name=Server (Creative) item.oc.Server3.name=Server (Creative)
item.oc.Tablet.name=Tablet item.oc.Tablet.name=Tablet
item.oc.TabletCase.name=Tablet Case item.oc.TabletCase.name=Tablet Case
item.oc.Terminal.name=Remote Terminal
item.oc.Transistor.name=Transistor item.oc.Transistor.name=Transistor
item.oc.UpgradeAngel.name=Angel Upgrade item.oc.UpgradeAngel.name=Angel Upgrade
item.oc.UpgradeBattery0.name=Battery Upgrade (Tier 1) item.oc.UpgradeBattery0.name=Battery Upgrade (Tier 1)
@ -179,8 +178,6 @@ oc:gui.ServerRack.WirelessRange=Range
oc:gui.Switch.TransferRate=Cycle rate oc:gui.Switch.TransferRate=Cycle rate
oc:gui.Switch.PacketsPerCycle=Packets / cycle oc:gui.Switch.PacketsPerCycle=Packets / cycle
oc:gui.Switch.QueueSize=Queue size oc:gui.Switch.QueueSize=Queue size
oc:gui.Terminal.InvalidKey=Invalid key, most likely another terminal has been bound to the server.
oc:gui.Terminal.OutOfRange=No signal.
# Containers # Containers
oc:container.AccessPoint=Access Point oc:container.AccessPoint=Access Point
@ -269,13 +266,12 @@ oc:tooltip.Robot=Unlike computers, robots can move around and interact with the
oc:tooltip.Robot_Level=§fLevel§7: §a%s§7 oc:tooltip.Robot_Level=§fLevel§7: §a%s§7
oc:tooltip.Robot_StoredEnergy=§fStored energy§7: §a%s§7 oc:tooltip.Robot_StoredEnergy=§fStored energy§7: §a%s§7
oc:tooltip.Screen=Display text, controlled by a Graphics Card in a Case.[nl] Maximum resolution: §f%sx%s§7[nl] Maximum color depth: §f%s§7 oc:tooltip.Screen=Display text, controlled by a Graphics Card in a Case.[nl] Maximum resolution: §f%sx%s§7[nl] Maximum color depth: §f%s§7
oc:tooltip.Server=This is a server, there are many like it, but this one can be upgraded with components much like a computer case can be. It can be run by inserting it into a server rack.[nl] Number of supported terminals: §f%s§7 oc:tooltip.Server=This is a server, there are many like it, but this one can be upgraded with components much like a computer case can be. It can be run by inserting it into a server rack.
oc:tooltip.Server.Components=Installed components: oc:tooltip.Server.Components=Installed components:
oc:tooltip.ServerRack=Allows the installation of up to four servers. Use a Remote Terminal to access the servers built into this server rack. oc:tooltip.ServerRack=Allows the installation of up to four servers. Servers have to be configured before being placed into a server rack.
oc:tooltip.Switch=Allows connecting different networks to each other. Only network messages will be passed along, components will not be visible through this. Use this to separate networks while still allowing communication using Network Cards, for example. oc:tooltip.Switch=Allows connecting different networks to each other. Only network messages will be passed along, components will not be visible through this. Use this to separate networks while still allowing communication using Network Cards, for example.
oc:tooltip.Tablet=A tablet computer, for fresh Lua on the go. Can be forced to shut down by sneak-activating it. oc:tooltip.Tablet=A tablet computer, for fresh Lua on the go. Can be forced to shut down by sneak-activating it.
oc:tooltip.TabletCase=Basic case for tablets. Place it into the assembler to add in components and create a tablet computer. oc:tooltip.TabletCase=Basic case for tablets. Place it into the assembler to add in components and create a tablet computer.
oc:tooltip.Terminal=Allows controlling a server remotely, as long as you are in range of it. Acts like a portable screen and keyboard. Shift-right-click a server in a server rack to bind the terminal to it.
oc:tooltip.Tier=§8Tier %s oc:tooltip.Tier=§8Tier %s
oc:tooltip.TooLong=Hold [§f%s§7] for a detailed tooltip. oc:tooltip.TooLong=Hold [§f%s§7] for a detailed tooltip.
oc:tooltip.Transistor=A basic element in most other computer parts. It's a bit twisted, but it does the job. oc:tooltip.Transistor=A basic element in most other computer parts. It's a bit twisted, but it does the job.
@ -319,7 +315,6 @@ item.oc.NetworkCard.usage=The §oNetwork Card§r allows computers to send and re
item.oc.RedstoneCard.usage=The §oRedstone Card§r allows computers to read and emit analog redstone signal in adjacent blocks. When an ingoing signal strength changes, a signal is injected into the computer.[nl][nl]If there are any supported mods present that provide bundled redstone facilities, such as RedLogic, Project Red or MineFactory Reloaded, or mods that provide wireless redstone facilities such as WR-CBE and Slimevoid's Wireless mod, a second tier card is available that allows interacting with these systems.[nl][nl]The side provided to the several methods are relative to the orientation of the computer case / robot / server rack. That means when looking at the front of the computer, right is at your left and vice versa. item.oc.RedstoneCard.usage=The §oRedstone Card§r allows computers to read and emit analog redstone signal in adjacent blocks. When an ingoing signal strength changes, a signal is injected into the computer.[nl][nl]If there are any supported mods present that provide bundled redstone facilities, such as RedLogic, Project Red or MineFactory Reloaded, or mods that provide wireless redstone facilities such as WR-CBE and Slimevoid's Wireless mod, a second tier card is available that allows interacting with these systems.[nl][nl]The side provided to the several methods are relative to the orientation of the computer case / robot / server rack. That means when looking at the front of the computer, right is at your left and vice versa.
item.oc.Server.usage=§oServers§r are a form of higher tier computer. They can be configured by holding them in the hand and rightclicking - like opening a backpack or ender pouch, for example. After inserting CPU, memory and cards, the server has to be placed inside a §oServer Rack§r. For more information see the server rack entry. item.oc.Server.usage=§oServers§r are a form of higher tier computer. They can be configured by holding them in the hand and rightclicking - like opening a backpack or ender pouch, for example. After inserting CPU, memory and cards, the server has to be placed inside a §oServer Rack§r. For more information see the server rack entry.
item.oc.TabletCase.usage=The §oTablet Case§r is the base part when building tablets in the §oAssembler§r. Tablets are very compact and portable computers. They can host a small number of select upgrades, but obviously cannot interact with the world like computer cases can (using simple §oNetwork Cards§r or §oRedstone Cards§r for example). Upgrades and cards that cannot be used in tablets can generally not be placed into the assembler, so if you can install an upgrade, you can usually assume that you will also be able to use it.[nl][nl]They must also remain in a player's inventory to continue running. When dropped or placed into some other inventory, they will turn off after a short amount of time. item.oc.TabletCase.usage=The §oTablet Case§r is the base part when building tablets in the §oAssembler§r. Tablets are very compact and portable computers. They can host a small number of select upgrades, but obviously cannot interact with the world like computer cases can (using simple §oNetwork Cards§r or §oRedstone Cards§r for example). Upgrades and cards that cannot be used in tablets can generally not be placed into the assembler, so if you can install an upgrade, you can usually assume that you will also be able to use it.[nl][nl]They must also remain in a player's inventory to continue running. When dropped or placed into some other inventory, they will turn off after a short amount of time.
item.oc.Terminal.usage=The §oRemote Terminal§r can be used to remote control §oServers§r. To use it, sneak-activate a server that is installed in a §oServer Rack§r (click on the server rack block in the world, targeting the server to bind the terminal to). When a terminal is bound to a server, a virtual screen and keyboard get connected to the server. This can lead to unexpected behavior if another real screen and/or keyboard is connected to the server, so this should be avoided. When rightclicking with the terminal in hand after binding it, a GUI will open, the same as when opening the GUI of a screen with an attached keyboard.[nl][nl]Multiple terminals can be bound to one server, but they will all display the same information, as they will share the virtual screen and keyboard. The number of terminals that can be bound to a server depends on the server's tier. The range in which the terminals work can be configured in the server rack's GUI.
item.oc.UpgradeChunkloader.usage=The §oChunkloader Upgrade§r can be installed in robots to allow them too keep the chunk they are in - as well as the surrounding chunks - loaded. This consumes quite a bit of energy, however. The chunkloader can be turned on and off using the component the upgrade exposes to the robot.[nl][nl]The upgrade is automatically enabled when the robot powers up, and automatically disabled when the robot powers down. item.oc.UpgradeChunkloader.usage=The §oChunkloader Upgrade§r can be installed in robots to allow them too keep the chunk they are in - as well as the surrounding chunks - loaded. This consumes quite a bit of energy, however. The chunkloader can be turned on and off using the component the upgrade exposes to the robot.[nl][nl]The upgrade is automatically enabled when the robot powers up, and automatically disabled when the robot powers down.
item.oc.UpgradeContainerCard.usage=The §oCard Container§r is a container type upgrade for robots that provides a slot in the finished robots into which cards can be placed. The tier of card that slot can hold is equal to the tier of the container. Unlike normal upgrades, the complexity of containers is twice their tier. item.oc.UpgradeContainerCard.usage=The §oCard Container§r is a container type upgrade for robots that provides a slot in the finished robots into which cards can be placed. The tier of card that slot can hold is equal to the tier of the container. Unlike normal upgrades, the complexity of containers is twice their tier.
item.oc.UpgradeContainerUpgrade.usage=The §oUpgrade Container§r is a container type upgrade for robots that provides a slot in the finished robots into which normal upgrades can be placed. The tier of upgrade that slot can hold is equal to the tier of the container. Unlike normal upgrades, the complexity of containers is twice their tier. item.oc.UpgradeContainerUpgrade.usage=The §oUpgrade Container§r is a container type upgrade for robots that provides a slot in the finished robots into which normal upgrades can be placed. The tier of upgrade that slot can hold is equal to the tier of the container. Unlike normal upgrades, the complexity of containers is twice their tier.
@ -353,7 +348,7 @@ tile.oc.powerDistributor.usage=The §oPower Distributor§r is for energy what th
tile.oc.raid.usage=The §oRaid§r block houses three hard drives which will be combined into a single file system. This combined file system has the size of the sum of the capacities of the individual hard drives and is available to all computers connected to the raid.[nl][nl]The raid only works (and shows up as a file system) when three disks are present. The disks may differ in size.[nl][nl]Beware that adding a hard drive to the raid block will wipe it of its contents. Removing a single disk from a complete raid will also wipe the raid. Adding the disk back in will §lnot§r restore it, the raid's new file system will not contain any files. tile.oc.raid.usage=The §oRaid§r block houses three hard drives which will be combined into a single file system. This combined file system has the size of the sum of the capacities of the individual hard drives and is available to all computers connected to the raid.[nl][nl]The raid only works (and shows up as a file system) when three disks are present. The disks may differ in size.[nl][nl]Beware that adding a hard drive to the raid block will wipe it of its contents. Removing a single disk from a complete raid will also wipe the raid. Adding the disk back in will §lnot§r restore it, the raid's new file system will not contain any files.
tile.oc.redstone.usage=The §oRedstone I/O§r block can be used to remotely read and emit redstone signals. It behaves like a hybrid of a tier one and two §oRedstone Card§r, in that it can read and emit simple analog as well as bundled signals, but cannot read or emit wireless redstone signals.[nl][nl]When providing a side to the methods of the component exposed by this block, the directions are the global principal directions, i.e. it is recommended to use sides.north, sides.east and so on.[nl][nl]Like the redstone card, this block injects a signal into connected computers when the state of a redstone signal changes - both for analog as well as for bundled signals. tile.oc.redstone.usage=The §oRedstone I/O§r block can be used to remotely read and emit redstone signals. It behaves like a hybrid of a tier one and two §oRedstone Card§r, in that it can read and emit simple analog as well as bundled signals, but cannot read or emit wireless redstone signals.[nl][nl]When providing a side to the methods of the component exposed by this block, the directions are the global principal directions, i.e. it is recommended to use sides.north, sides.east and so on.[nl][nl]Like the redstone card, this block injects a signal into connected computers when the state of a redstone signal changes - both for analog as well as for bundled signals.
tile.oc.screen.usage=A §oScreen§r is used in combination with a §oGraphics Card§r to allow computers to display text. Different screen tiers have different capabilties, that being that they support different resolutions and color depths, ranging from very low resolution, monochrome displays, to very high resolutions with up to 256 different colors.[nl][nl]The available resolution and color depth depends on the weakest link. When using a tier one graphics card with a tier three screen, only the tier one resolution and color depth is usable.[nl][nl]Screens can be placed next to each other to form multi-block screens. This has no impact on the available resolution. To control how adjacent screens connect, screens can also be dyed using any dye. Screens with different colors will not connect. Screens with different tiers will never connect, even if they have the same color.[nl][nl]Tier two and tier three screens also support mouse input. Clicks can either be performed in a screen's GUI (which can only be opened if a keyboard is connected to the screen), or by sneak-activating a screen empty-handed. Note that whether the GUI opens when sneak- or normally activating a screen can be controlled via the component it exposes to connected computers. tile.oc.screen.usage=A §oScreen§r is used in combination with a §oGraphics Card§r to allow computers to display text. Different screen tiers have different capabilties, that being that they support different resolutions and color depths, ranging from very low resolution, monochrome displays, to very high resolutions with up to 256 different colors.[nl][nl]The available resolution and color depth depends on the weakest link. When using a tier one graphics card with a tier three screen, only the tier one resolution and color depth is usable.[nl][nl]Screens can be placed next to each other to form multi-block screens. This has no impact on the available resolution. To control how adjacent screens connect, screens can also be dyed using any dye. Screens with different colors will not connect. Screens with different tiers will never connect, even if they have the same color.[nl][nl]Tier two and tier three screens also support mouse input. Clicks can either be performed in a screen's GUI (which can only be opened if a keyboard is connected to the screen), or by sneak-activating a screen empty-handed. Note that whether the GUI opens when sneak- or normally activating a screen can be controlled via the component it exposes to connected computers.
tile.oc.serverRack.usage=A §oServer Rack§r houses up to four §oServers§r. A server is a higher tier computer, which can only run when inside a server rack. Servers can be remote controlled using a §oRemote Terminal§r. The number of terminals that can be connected to a single server at a time depends on the tier of the server. The distance up to which the remote terminals work can be configured in the rack's GUI. Higher values have a higher constant energy draw.[nl][nl]Each server in a server rack can only communicate with one "face" of the server rack at a time - or none at all. Which side each server is connected to can be configured in the server rack's GUI. Beware that the sides are from the point of view of the server rack, i.e. if you are looking at the front of the server rack, right will be to your left and vice versa.[nl][nl]Server racks act as §oSwitch§r and §oPower Distributor§r in one. The switch mode of the server rack can be configured in its GUI, with the two options being internal and external. In external mode the server rack will behave like a normal switch. In internal mode, messages are only passed to the servers in the rack, they will not be automatically relayed to the other faces of the rack. Servers will still be able to send messages to each other. This allows using server racks as advanced switches that can perform filter and mapping operations, for example. tile.oc.serverRack.usage=A §oServer Rack§r houses up to four §oServers§r. A server is a higher tier computer, which can only run when inside a server rack.[nl][nl]Each server in a server rack can only communicate with one "face" of the server rack at a time - or none at all. Which side each server is connected to can be configured in the server rack's GUI. Beware that the sides are from the point of view of the server rack, i.e. if you are looking at the front of the server rack, right will be to your left and vice versa.[nl][nl]Server racks act as §oSwitch§r and §oPower Distributor§r in one. The switch mode of the server rack can be configured in its GUI, with the two options being internal and external. In external mode the server rack will behave like a normal switch. In internal mode, messages are only passed to the servers in the rack, they will not be automatically relayed to the other faces of the rack. Servers will still be able to send messages to each other. This allows using server racks as advanced switches that can perform filter and mapping operations, for example.
tile.oc.switch.usage=The §oSwitch§r can be used to allow different subnetworks to send network messages to each other without exposing components to computers in other networks. Keeping components local is usually a good idea, to avoid computers using the wrong screen or to avoid component overflows to happen (in which computers will crash / not start anymore).[nl][nl]There is also a wireless variation of this block, the §oAccess Point§r, which will also relay messages wirelessly.[nl][nl]Switches and access point do §lnot§r keep track of which packets they relayed recently, so avoid cycles in your network, or you may receive the same packet multiple times.[nl][nl]Packets are only re-sent a certain number of times, so chaining an arbitrary number of switches or access points is not possible. tile.oc.switch.usage=The §oSwitch§r can be used to allow different subnetworks to send network messages to each other without exposing components to computers in other networks. Keeping components local is usually a good idea, to avoid computers using the wrong screen or to avoid component overflows to happen (in which computers will crash / not start anymore).[nl][nl]There is also a wireless variation of this block, the §oAccess Point§r, which will also relay messages wirelessly.[nl][nl]Switches and access point do §lnot§r keep track of which packets they relayed recently, so avoid cycles in your network, or you may receive the same packet multiple times.[nl][nl]Packets are only re-sent a certain number of times, so chaining an arbitrary number of switches or access points is not possible.
# NEI Integration # NEI Integration

View File

@ -88,7 +88,6 @@ item.oc.Server2.name=Serveur (Niveau 3)
item.oc.Server3.name=Serveur (Créatif) item.oc.Server3.name=Serveur (Créatif)
item.oc.Tablet.name=Tablette item.oc.Tablet.name=Tablette
item.oc.TabletCase.name=Boitier de tablette item.oc.TabletCase.name=Boitier de tablette
item.oc.Terminal.name=Terminal à distance
item.oc.Transistor.name=Transistor item.oc.Transistor.name=Transistor
item.oc.UpgradeAngel.name=Amélioration ange item.oc.UpgradeAngel.name=Amélioration ange
item.oc.UpgradeBattery0.name=Amélioration batterie (Niveau 1) item.oc.UpgradeBattery0.name=Amélioration batterie (Niveau 1)
@ -173,8 +172,6 @@ oc:gui.ServerRack.WirelessRange=Portée
oc:gui.Switch.TransferRate=Vitesse du cycle oc:gui.Switch.TransferRate=Vitesse du cycle
oc:gui.Switch.PacketsPerCycle=paquets / cycle oc:gui.Switch.PacketsPerCycle=paquets / cycle
oc:gui.Switch.QueueSize=Taille de la file oc:gui.Switch.QueueSize=Taille de la file
oc:gui.Terminal.InvalidKey=Clef invalide, très probablement qu'un autre terminal a dû nécessité le serveur.
oc:gui.Terminal.OutOfRange=Pas de signal.
# Containers # Containers
oc:container.AccessPoint=Point d'accès oc:container.AccessPoint=Point d'accès
@ -260,13 +257,12 @@ oc:tooltip.Robot=Contrairement aux ordinateurs, les robots peuvent se déplacer
oc:tooltip.Robot_Level=§fNiveau§7: §a%s§7. oc:tooltip.Robot_Level=§fNiveau§7: §a%s§7.
oc:tooltip.Robot_StoredEnergy=§fEnergie stockée§7: §a%s§7. oc:tooltip.Robot_StoredEnergy=§fEnergie stockée§7: §a%s§7.
oc:tooltip.Screen=Affiche du texte, contrôlé par une Carte graphique dans un Boitier.[nl] Résolution maximum: §f%sx%s§7[nl] Couleurs maximales: §f%s§7 oc:tooltip.Screen=Affiche du texte, contrôlé par une Carte graphique dans un Boitier.[nl] Résolution maximum: §f%sx%s§7[nl] Couleurs maximales: §f%s§7
oc:tooltip.Server=Ceci est un serveur, il y en a beaucoup comme ca, mais celui-ci peut être amélioré avec des composants bien plus qu'un ordinateur peut l'être. Il peut être placé dans un support de serveur.[nl] Numbre de terminaux supportés : §f%s§7 oc:tooltip.Server=Ceci est un serveur, il y en a beaucoup comme ca, mais celui-ci peut être amélioré avec des composants bien plus qu'un ordinateur peut l'être. Il peut être placé dans un support de serveur.
oc:tooltip.Server.Components=Composants installés : oc:tooltip.Server.Components=Composants installés :
oc:tooltip.ServerRack=Permet l'installation jusqu'à quatre serveurs. Utilisez un terminal à distance pour avoir accès aux serveurs placés dans ce support. oc:tooltip.ServerRack=Permet l'installation jusqu'à quatre serveurs.
oc:tooltip.Switch=Permet de connecter différents réseaux entre eux. Seulement des messages réseau seront transmis, les composants ne seront pas visibles via celui ci. A utiliser pour séparer des réseaux tout en leur permettant de communiquer entre eux, grâce aux Cartes réseau, par exemple. oc:tooltip.Switch=Permet de connecter différents réseaux entre eux. Seulement des messages réseau seront transmis, les composants ne seront pas visibles via celui ci. A utiliser pour séparer des réseaux tout en leur permettant de communiquer entre eux, grâce aux Cartes réseau, par exemple.
oc:tooltip.Tablet=Une tablette, pour une Lua fraiche en route. Peut être forcé à l'arrêt par un accroupi-clique droit. oc:tooltip.Tablet=Une tablette, pour une Lua fraiche en route. Peut être forcé à l'arrêt par un accroupi-clique droit.
oc:tooltip.TabletCase=Boitier de tablettes de base. Placez-le dans l'assembleur pour ajouter des composants et créez une tablette. oc:tooltip.TabletCase=Boitier de tablettes de base. Placez-le dans l'assembleur pour ajouter des composants et créez une tablette.
oc:tooltip.Terminal=Permet de contrôler un serveur à distance, tant que vous êtes à portée de lui. Fonctionne comme un écran-clavier portable. Maj-clique droit un serveur du support pour le lier au terminal.
oc:tooltip.Tier=§8Niv. %s oc:tooltip.Tier=§8Niv. %s
oc:tooltip.TooLong=Maintenez la touche [§f%s§7] pour plus d'informations. oc:tooltip.TooLong=Maintenez la touche [§f%s§7] pour plus d'informations.
oc:tooltip.Transistor=Un élément basique constituant la plupart des pièces d'un ordinateur. Il est un peu tordu, mais il fait son boulot. oc:tooltip.Transistor=Un élément basique constituant la plupart des pièces d'un ordinateur. Il est un peu tordu, mais il fait son boulot.

View File

@ -80,7 +80,6 @@ item.oc.Server2.name=Server (Livello 3)
item.oc.Server3.name=Server (Creativo) item.oc.Server3.name=Server (Creativo)
item.oc.Tablet.name=Tablet item.oc.Tablet.name=Tablet
item.oc.TabletCase.name=Custodia Tablet item.oc.TabletCase.name=Custodia Tablet
item.oc.Terminal.name=Terminale Remoto
item.oc.Transistor.name=Transistor item.oc.Transistor.name=Transistor
item.oc.UpgradeAngel.name=Upgrade Angel item.oc.UpgradeAngel.name=Upgrade Angel
item.oc.UpgradeBattery0.name=Upgrade Batteria (Livello 1) item.oc.UpgradeBattery0.name=Upgrade Batteria (Livello 1)
@ -160,8 +159,6 @@ oc:gui.ServerRack.WirelessRange=Portata
oc:gui.Switch.TransferRate=Tasso di ciclo oc:gui.Switch.TransferRate=Tasso di ciclo
oc:gui.Switch.PacketsPerCycle=Pacchetti / ciclo oc:gui.Switch.PacketsPerCycle=Pacchetti / ciclo
oc:gui.Switch.QueueSize=Dimensione coda oc:gui.Switch.QueueSize=Dimensione coda
oc:gui.Terminal.InvalidKey=Tasto invalido, molto probabilmente un altro terminale è stato collegato al server.
oc:gui.Terminal.OutOfRange=Nessun segnale
# Containers # Containers
oc:container.AccessPoint=Punto di accesso oc:container.AccessPoint=Punto di accesso
@ -241,14 +238,13 @@ oc:tooltip.Robot=A differenza dei computer, i robot possono muoversi e interagir
oc:tooltip.Robot_Level=§fLivelli§7: §a%s§7 oc:tooltip.Robot_Level=§fLivelli§7: §a%s§7
oc:tooltip.Robot_StoredEnergy=§fEnergia immagazzinata§7: §a%s§7 oc:tooltip.Robot_StoredEnergy=§fEnergia immagazzinata§7: §a%s§7
oc:tooltip.Screen=Mostra del testo, contollato da una scheda grafica contenuta nel case del computer.[nl] Risoluzione massima: §f%sx%s§7[nl] Profondità di colore massima: §f%s§7 oc:tooltip.Screen=Mostra del testo, contollato da una scheda grafica contenuta nel case del computer.[nl] Risoluzione massima: §f%sx%s§7[nl] Profondità di colore massima: §f%s§7
oc:tooltip.Server=Questo è un server, ci sono tanti come lui, ma questo può essere aggiornato con i componenti in modo simile a un case del computer. Può essere avviato inserendolo in un rack di server.[nl] Numero di terminali supportati: §f%s§7 oc:tooltip.Server=Questo è un server, ci sono tanti come lui, ma questo può essere aggiornato con i componenti in modo simile a un case del computer. Può essere avviato inserendolo in un rack di server.
oc:tooltip.Server.Components=Componenti installati: oc:tooltip.Server.Components=Componenti installati:
oc:tooltip.ServerRack=Permette l'installazione di un massimo di quattro server. Utilizzare un terminale remoto per accedere ai server contenuti in questo server rack. oc:tooltip.ServerRack=Permette l'installazione di un massimo di quattro server.
oc:tooltip.Switch=Consente il collegamento di reti diverse tra loro. Solo i messaggi di rete saranno inoltrati attraverso il blocco, i componenti non saranno invece visibili Utilizzarlo per separare le reti pur consentendo la comunicazione utilizzando schede di rete, per esempio. oc:tooltip.Switch=Consente il collegamento di reti diverse tra loro. Solo i messaggi di rete saranno inoltrati attraverso il blocco, i componenti non saranno invece visibili Utilizzarlo per separare le reti pur consentendo la comunicazione utilizzando schede di rete, per esempio.
oc:tooltip.Tablet=Un computer tablet, per del Lua fresco in movimento. Può essere forzato lo spegnimento usandolo mentre si preme maiusc. oc:tooltip.Tablet=Un computer tablet, per del Lua fresco in movimento. Può essere forzato lo spegnimento usandolo mentre si preme maiusc.
oc:tooltip.TabletCase=Case di base per i tablet. Posizionarlo in assembler per aggiungere componenti e creare un tablet PC. oc:tooltip.TabletCase=Case di base per i tablet. Posizionarlo in assembler per aggiungere componenti e creare un tablet PC.
oc:tooltip.Terminal=Permette il controllo di un server in remoto, fino a quando si è nella portata di esso. Agisce come uno schermo portatile e una tastiera. Utilizzare i tasti maiusc-destro del mouse su un server in un rack di server per associare il terminale ad esso. oc:tooltip.Tier=§8Livello %s
oc:tooltip.Livello=§8Livello %s
oc:tooltip.TooLong=Tenere premuto [§f%s§7] per un tooltip dettagliato. oc:tooltip.TooLong=Tenere premuto [§f%s§7] per un tooltip dettagliato.
oc:tooltip.Transistor=Un elemento fondamentale in molte altre parti del computer. È un po' contorto, ma fa il suo lavoro. oc:tooltip.Transistor=Un elemento fondamentale in molte altre parti del computer. È un po' contorto, ma fa il suo lavoro.
oc:tooltip.UpgradeAngel=Consente ai robot di posizionare i blocchi nel nulla, anche se non vi è alcun blocco di riferimento. oc:tooltip.UpgradeAngel=Consente ai robot di posizionare i blocchi nel nulla, anche se non vi è alcun blocco di riferimento.

View File

@ -77,7 +77,6 @@ item.oc.Server1.name=Сервер (2-ой уровень)
item.oc.Server2.name=Сервер (3-ий уровень) item.oc.Server2.name=Сервер (3-ий уровень)
item.oc.Server3.name=Сервер (Творческий) item.oc.Server3.name=Сервер (Творческий)
item.oc.Tablet.name=Планшет item.oc.Tablet.name=Планшет
item.oc.Terminal.name=Беспроводной терминал
item.oc.Transistor.name=Транзистор item.oc.Transistor.name=Транзистор
item.oc.UpgradeAngel.name=«Ангельское» улучшение item.oc.UpgradeAngel.name=«Ангельское» улучшение
item.oc.UpgradeBattery0.name=Улучшение «Ёмкость» (1-ый уровень) item.oc.UpgradeBattery0.name=Улучшение «Ёмкость» (1-ый уровень)
@ -154,8 +153,6 @@ oc:gui.ServerRack.WirelessRange=Радиус
oc:gui.Switch.TransferRate=Цикличность oc:gui.Switch.TransferRate=Цикличность
oc:gui.Switch.PacketsPerCycle=Пакеты / цикл oc:gui.Switch.PacketsPerCycle=Пакеты / цикл
oc:gui.Switch.QueueSize=Размер очереди oc:gui.Switch.QueueSize=Размер очереди
oc:gui.Terminal.InvalidKey=Неверный ключ, возможно, к серверу уже подключен другой терминал.
oc:gui.Terminal.OutOfRange=Нет сигнала.
# Containers # Containers
oc:container.AccessPoint=Точка доступа oc:container.AccessPoint=Точка доступа
@ -229,12 +226,11 @@ oc:tooltip.Robot=В отличие от компьютеров, роботы м
oc:tooltip.Robot_Level=§fУровень§7: §a%s§7. oc:tooltip.Robot_Level=§fУровень§7: §a%s§7.
oc:tooltip.Robot_StoredEnergy=§fНакопленная энергия§7: §a%s§7. oc:tooltip.Robot_StoredEnergy=§fНакопленная энергия§7: §a%s§7.
oc:tooltip.Screen=Отображает текст, передаваемый видеокартой.[nl] Максимальное разрешение: §f%sx%s§7[nl] Максимальная глубина цвета: §f%s§7 oc:tooltip.Screen=Отображает текст, передаваемый видеокартой.[nl] Максимальное разрешение: §f%sx%s§7[nl] Максимальная глубина цвета: §f%s§7
oc:tooltip.Server=Это сервер, который может быть улучшен компонентами, как системный блок. Включается размещением в стойку.[nl] Количество поддерживаемых терминалов: §f%s§7 oc:tooltip.Server=Это сервер, который может быть улучшен компонентами, как системный блок. Включается размещением в стойку.
oc:tooltip.Server.Components=Установленные компоненты: oc:tooltip.Server.Components=Установленные компоненты:
oc:tooltip.ServerRack=Обеспечивает работу до четырёх серверов. Используйте беспроводной терминал для управления установленными серверами. oc:tooltip.ServerRack=Обеспечивает работу до четырёх серверов.
oc:tooltip.Switch=Позволяет соединять различные сети между собой. Передаются только сообщения, компоненты между сетями недоступны. Используйте его для разделения сетей с возможностью пересылать сообщения между ними. oc:tooltip.Switch=Позволяет соединять различные сети между собой. Передаются только сообщения, компоненты между сетями недоступны. Используйте его для разделения сетей с возможностью пересылать сообщения между ними.
oc:tooltip.Tablet=ЭКСПЕРИМЕНТАЛЬНЫЙ - ТОЛЬКО ДЛЯ ТЕСТИРОВАНИЯ [nl] Это тестирование компьютеров-предметов. Он не может быть создан. Сообщайте о ошибках, если Вы тестируете его! oc:tooltip.Tablet=ЭКСПЕРИМЕНТАЛЬНЫЙ - ТОЛЬКО ДЛЯ ТЕСТИРОВАНИЯ [nl] Это тестирование компьютеров-предметов. Он не может быть создан. Сообщайте о ошибках, если Вы тестируете его!
oc:tooltip.Terminal=Позволяет дистанционно управлять сервером, пока вы в радиусе его действия. Действует как портативный дисплей с клавиатурой.[nl] Shift+ПКМ по серверу в стойке для привязки к нему терминала.
oc:tooltip.TooLong=Удерживайте [§f%s§7], чтобы отобразить описание. oc:tooltip.TooLong=Удерживайте [§f%s§7], чтобы отобразить описание.
oc:tooltip.Transistor=Базовый элемент в других частях компьютера. Он немного деформирован, но отлично выполняет свою работу. oc:tooltip.Transistor=Базовый элемент в других частях компьютера. Он немного деформирован, но отлично выполняет свою работу.
oc:tooltip.UpgradeAngel=Позволяет роботам размещать блоки в воздухе, даже если отсутствует точка опоры. oc:tooltip.UpgradeAngel=Позволяет роботам размещать блоки в воздухе, даже если отсутствует точка опоры.

View File

@ -82,7 +82,6 @@ item.oc.Server2.name=超级服务器
item.oc.Server3.name=创造模式服务器 item.oc.Server3.name=创造模式服务器
item.oc.Tablet.name=平板电脑 item.oc.Tablet.name=平板电脑
item.oc.TabletCase.name=平板电脑保护套 item.oc.TabletCase.name=平板电脑保护套
item.oc.Terminal.name=远程终端
item.oc.Transistor.name=晶体管 item.oc.Transistor.name=晶体管
item.oc.UpgradeAngel.name=天使方块升级 item.oc.UpgradeAngel.name=天使方块升级
item.oc.UpgradeBattery0.name=基础电池升级 item.oc.UpgradeBattery0.name=基础电池升级
@ -162,8 +161,6 @@ oc:gui.ServerRack.WirelessRange=范围
oc:gui.Switch.TransferRate=周期率 oc:gui.Switch.TransferRate=周期率
oc:gui.Switch.PacketsPerCycle=数据包 / 周期 oc:gui.Switch.PacketsPerCycle=数据包 / 周期
oc:gui.Switch.QueueSize=队列长度 oc:gui.Switch.QueueSize=队列长度
oc:gui.Terminal.InvalidKey=无效键, 看上去另一个终端已绑定到这台服务器.
oc:gui.Terminal.OutOfRange=无信号.
# Containers # Containers
oc:container.AccessPoint=桥接器 oc:container.AccessPoint=桥接器
@ -242,12 +239,11 @@ oc:tooltip.Robot=和计算机不同, 机器人能够移动并且像玩家那样
oc:tooltip.Robot_Level=§f等级§7: §a%s§7. oc:tooltip.Robot_Level=§f等级§7: §a%s§7.
oc:tooltip.Robot_StoredEnergy=§f存储能量§7: §a%s§7. oc:tooltip.Robot_StoredEnergy=§f存储能量§7: §a%s§7.
oc:tooltip.Screen=显示文本, 运作需要机箱中的显卡.[nl] 最高分辨率: §f%sx%s§7[nl] 最高色深: §f%s§7 oc:tooltip.Screen=显示文本, 运作需要机箱中的显卡.[nl] 最高分辨率: §f%sx%s§7[nl] 最高色深: §f%s§7
oc:tooltip.Server=这就是服务器, 它与许多其它的服务器拥有相似功能, 但这台服务器可以使用组件进行升级, 就像升级机箱一样. 它也可以放入服务器机架中运行.[nl] 支持终端的数量: §f%s§7 oc:tooltip.Server=这就是服务器, 它与许多其它的服务器拥有相似功能, 但这台服务器可以使用组件进行升级, 就像升级机箱一样. 它也可以放入服务器机架中运行.
oc:tooltip.Server.Components=已安装的组件: oc:tooltip.Server.Components=已安装的组件:
oc:tooltip.ServerRack=它能装下四台服务器. 使用远程终端访问机架中的服务器. oc:tooltip.ServerRack=它能装下四台服务器.
oc:tooltip.Switch=允许设备相互连接不同的网络. 仅能传递网络信息, 并且组件不可见. 例如你可以通过这种方式来建立独立网络但仍允许其使用网卡通讯. oc:tooltip.Switch=允许设备相互连接不同的网络. 仅能传递网络信息, 并且组件不可见. 例如你可以通过这种方式来建立独立网络但仍允许其使用网卡通讯.
oc:tooltip.Tablet=开发中 - 目前只能用于测试 [nl] 这是一个基于计算机的测试物品. 它还不能被合成. 如果在测试时遇到Bug请及时反馈给作者! oc:tooltip.Tablet=开发中 - 目前只能用于测试 [nl] 这是一个基于计算机的测试物品. 它还不能被合成. 如果在测试时遇到Bug请及时反馈给作者!
oc:tooltip.Terminal=可以远程控制服务器, 不过前提是你处于信号范围内. 使用方法相同于显示屏与键盘. Shift+右键一个机架中的服务器可以绑定对应的终端.
oc:tooltip.Tier=§8等级 %s oc:tooltip.Tier=§8等级 %s
oc:tooltip.TooLong=按住 [§f%s§7] 显示详细物品信息. oc:tooltip.TooLong=按住 [§f%s§7] 显示详细物品信息.
oc:tooltip.Transistor=大多数电脑组件中最基础的元素. 看上去有些扭曲, 但它是有用的. oc:tooltip.Transistor=大多数电脑组件中最基础的元素. 看上去有些扭曲, 但它是有用的.

View File

@ -82,7 +82,6 @@ item.oc.Server2.name=伺服器 (3級)
item.oc.Server3.name=伺服器 (創造模式) item.oc.Server3.name=伺服器 (創造模式)
item.oc.Tablet.name=平板電腦 item.oc.Tablet.name=平板電腦
item.oc.TabletCase.name=平板電腦保護套 item.oc.TabletCase.name=平板電腦保護套
item.oc.Terminal.name=遠端終端機
item.oc.Transistor.name=電晶體 item.oc.Transistor.name=電晶體
item.oc.UpgradeAngel.name=天使升級 item.oc.UpgradeAngel.name=天使升級
item.oc.UpgradeBattery0.name=電池升級 (1級) item.oc.UpgradeBattery0.name=電池升級 (1級)
@ -162,8 +161,6 @@ oc:gui.ServerRack.WirelessRange=範圍
oc:gui.Switch.TransferRate=週期率 oc:gui.Switch.TransferRate=週期率
oc:gui.Switch.PacketsPerCycle=封包 / 週期 oc:gui.Switch.PacketsPerCycle=封包 / 週期
oc:gui.Switch.QueueSize=隊列大小 oc:gui.Switch.QueueSize=隊列大小
oc:gui.Terminal.InvalidKey=按鍵無效時,最有可能另一端已經綁定到伺服器。
oc:gui.Terminal.OutOfRange=沒訊號.
# Containers # Containers
oc:container.AccessPoint=存取點 oc:container.AccessPoint=存取點
@ -239,12 +236,11 @@ oc:tooltip.Robot=和計算機不同,機器人能夠移動并且像玩家那些
oc:tooltip.Robot_Level=§f等級§7: §a%s§7. oc:tooltip.Robot_Level=§f等級§7: §a%s§7.
oc:tooltip.Robot_StoredEnergy=§f儲能§7: §a%s§7. oc:tooltip.Robot_StoredEnergy=§f儲能§7: §a%s§7.
oc:tooltip.Screen=由電腦機殼內的顯示卡控制來顯示文字.[nl]最高分辨率: §f%sx%s§7[nl] 最大色深: §f%s§7 oc:tooltip.Screen=由電腦機殼內的顯示卡控制來顯示文字.[nl]最高分辨率: §f%sx%s§7[nl] 最大色深: §f%s§7
oc:tooltip.Server=這是一台伺服器, 他非常棒, 但是他可以使用元件去升級他功能就像電腦一樣. 他可以插入伺服器機架上執行.[nl] 支援終端機數量: §f%s§7 oc:tooltip.Server=這是一台伺服器, 他非常棒, 但是他可以使用元件去升級他功能就像電腦一樣. 他可以插入伺服器機架上執行.
oc:tooltip.Server.Components=安裝的元件: oc:tooltip.Server.Components=安裝的元件:
oc:tooltip.ServerRack=提供安裝最多達四個伺服器。為每個伺服器提供了一個內置的虛擬鍵盤和螢幕元件,相當於一個遠程終端。 oc:tooltip.ServerRack=提供安裝最多達四個伺服器。
oc:tooltip.Switch=允許設備相互連接不同的網絡.[nl]僅能傳遞網絡信息,通過路由器方式設備并不互相可見.[nl]例如可以通過這種方式來建立獨立網絡但仍允許其使用網卡通訊. oc:tooltip.Switch=允許設備相互連接不同的網絡.[nl]僅能傳遞網絡信息,通過路由器方式設備并不互相可見.[nl]例如可以通過這種方式來建立獨立網絡但仍允許其使用網卡通訊.
oc:tooltip.Tablet=實驗 - 僅用於測試 [nl] 這是一個測試基礎電腦的物品它不能製作如果測試到BUG請回報它。 oc:tooltip.Tablet=實驗 - 僅用於測試 [nl] 這是一個測試基礎電腦的物品它不能製作如果測試到BUG請回報它。
oc:tooltip.Terminal=允許遠程控制伺服器只要你在它的範圍內。就像一個隨身型螢幕和鍵盤。按住Shift鍵並滑鼠右鍵單擊某個服務器的服務器機架終端綁定它。
oc:tooltip.Tier=§8等級 %s oc:tooltip.Tier=§8等級 %s
oc:tooltip.TooLong=按住潛行鍵([§f%s§7])以查看詳細提示信息. oc:tooltip.TooLong=按住潛行鍵([§f%s§7])以查看詳細提示信息.
oc:tooltip.Transistor=在多數其他計算機的零件中都很基礎的元件.[nl]引腳有點彎了,但還能用。 oc:tooltip.Transistor=在多數其他計算機的零件中都很基礎的元件.[nl]引腳有點彎了,但還能用。

View File

@ -1,6 +0,0 @@
{
"parent": "opencomputers:item/flat",
"textures": {
"layer0": "opencomputers:items/terminal"
}
}

View File

@ -26,11 +26,6 @@ microcontrollerCase2 {
[blockRedstone, chest, blockRedstone] [blockRedstone, chest, blockRedstone]
[nuggetGold, "oc:materialCircuitBoardPrinted", nuggetGold]] [nuggetGold, "oc:materialCircuitBoardPrinted", nuggetGold]]
} }
terminal {
input: [[nuggetIron, "oc:solarGeneratorUpgrade", nuggetIron]
["oc:circuitChip3", "oc:screen2", "oc:wlanCard"]
[nuggetIron, "oc:keyboard", nuggetIron]]
}
tabletCase { tabletCase {
input: [[ingotGold, button, ingotGold] input: [[ingotGold, button, ingotGold]
["oc:componentBus1", "oc:screen2", "oc:circuitChip3"] ["oc:componentBus1", "oc:screen2", "oc:circuitChip3"]

View File

@ -8,11 +8,6 @@ analyzer {
["oc:materialTransistor", "oc:circuitChip1", nuggetGold] ["oc:materialTransistor", "oc:circuitChip1", nuggetGold]
["oc:materialTransistor", "oc:materialCircuitBoardPrinted", nuggetGold]] ["oc:materialTransistor", "oc:materialCircuitBoardPrinted", nuggetGold]]
} }
terminal {
input: [[nuggetIron, "oc:solarGeneratorUpgrade", nuggetIron]
["oc:circuitChip3", "oc:screen2", "oc:wlanCard"]
[nuggetIron, "oc:keyboard", nuggetIron]]
}
server1 { server1 {
input: [["oc:circuitChip1", "oc:ram4", "oc:circuitChip1"] input: [["oc:circuitChip1", "oc:ram4", "oc:circuitChip1"]

Binary file not shown.

Before

Width:  |  Height:  |  Size: 177 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 144 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 294 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 282 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 306 B

View File

@ -1,6 +0,0 @@
{
"animation": {
"frametime": 10,
"frames": [ 0, 1 ]
}
}

View File

@ -114,8 +114,6 @@ object Localization {
def SwitchExternal = localizeImmediately("gui.ServerRack.SwitchExternal") def SwitchExternal = localizeImmediately("gui.ServerRack.SwitchExternal")
def SwitchInternal = localizeImmediately("gui.ServerRack.SwitchInternal") def SwitchInternal = localizeImmediately("gui.ServerRack.SwitchInternal")
def WirelessRange = localizeImmediately("gui.ServerRack.WirelessRange")
} }
object Switch { object Switch {
@ -126,12 +124,6 @@ object Localization {
def QueueSize = localizeImmediately("gui.Switch.QueueSize") def QueueSize = localizeImmediately("gui.Switch.QueueSize")
} }
object Terminal {
def InvalidKey = localizeLater("gui.Terminal.InvalidKey")
def OutOfRange = localizeLater("gui.Terminal.OutOfRange")
}
object Tooltip { object Tooltip {
def Materials = localizeImmediately("tooltip.Materials") def Materials = localizeImmediately("tooltip.Materials")

View File

@ -272,13 +272,6 @@ class Settings(val config: Config) {
val maxOpenPorts = config.getInt("misc.maxOpenPorts") max 0 val maxOpenPorts = config.getInt("misc.maxOpenPorts") max 0
val maxWirelessRange = config.getDouble("misc.maxWirelessRange") max 0 val maxWirelessRange = config.getDouble("misc.maxWirelessRange") max 0
val rTreeMaxEntries = 10 val rTreeMaxEntries = 10
val terminalsPerTier = Array(config.getIntList("misc.terminalsPerTier"): _*) match {
case Array(tier1, tier2, tier3) =>
Array(math.max(tier1, 1), math.max(tier2, 1), math.max(tier3, 1))
case _ =>
OpenComputers.log.warn("Bad number of Remote Terminal counts, ignoring.")
Array(2, 4, 8)
}
val updateCheck = config.getBoolean("misc.updateCheck") val updateCheck = config.getBoolean("misc.updateCheck")
val lootProbability = config.getInt("misc.lootProbability") val lootProbability = config.getInt("misc.lootProbability")
val geolyzerRange = config.getInt("misc.geolyzerRange") val geolyzerRange = config.getInt("misc.geolyzerRange")

View File

@ -1,7 +1,5 @@
package li.cil.oc.client package li.cil.oc.client
import li.cil.oc.Localization
import li.cil.oc.Settings
import li.cil.oc.api.component.TextBuffer import li.cil.oc.api.component.TextBuffer
import li.cil.oc.common.GuiType import li.cil.oc.common.GuiType
import li.cil.oc.common.entity import li.cil.oc.common.entity
@ -14,7 +12,6 @@ import li.cil.oc.common.tileentity
import li.cil.oc.common.{GuiHandler => CommonGuiHandler} import li.cil.oc.common.{GuiHandler => CommonGuiHandler}
import li.cil.oc.util.BlockPosition import li.cil.oc.util.BlockPosition
import li.cil.oc.util.ExtendedWorld._ import li.cil.oc.util.ExtendedWorld._
import net.minecraft.client.Minecraft
import net.minecraft.entity.player.EntityPlayer import net.minecraft.entity.player.EntityPlayer
import net.minecraft.world.World import net.minecraft.world.World
@ -82,40 +79,6 @@ object GuiHandler extends CommonGuiHandler {
} }
} }
null null
case Some(terminal: item.Terminal) if id == GuiType.Terminal.id =>
val stack = player.getCurrentEquippedItem
if (stack.hasTagCompound) {
val address = stack.getTagCompound.getString(Settings.namespace + "server")
val key = stack.getTagCompound.getString(Settings.namespace + "key")
if (key != null && !key.isEmpty && address != null && !address.isEmpty) {
tileentity.ServerRack.list.keys.
flatMap(_.terminals).
find(term => term.rack.isPresent(term.number) match {
case Some(value) => value == address
case _ => false
}) match {
case Some(term) =>
def inRange = player.isEntityAlive && !term.rack.isInvalid && term.rack.getDistanceSq(player.posX, player.posY, player.posZ) < term.rack.range * term.rack.range
if (inRange) {
if (term.keys.contains(key)) return new gui.Screen(term.buffer, true, () => true, () => {
// Check if someone else bound a term to our server.
if (stack.getTagCompound.getString(Settings.namespace + "key") != key) {
Minecraft.getMinecraft.displayGuiScreen(null)
}
// Check whether we're still in range.
if (!inRange) {
Minecraft.getMinecraft.displayGuiScreen(null)
}
true
})
else player.addChatMessage(Localization.Terminal.InvalidKey)
}
else player.addChatMessage(Localization.Terminal.OutOfRange)
case _ => player.addChatMessage(Localization.Terminal.OutOfRange)
}
}
}
null
case _ => null case _ => null
} }
case _ => null case _ => null

View File

@ -112,19 +112,8 @@ object PacketHandler extends CommonPacketHandler {
case Some(t: Computer) => t.setRunning(p.readBoolean()) case Some(t: Computer) => t.setRunning(p.readBoolean())
case Some(t: ServerRack) => case Some(t: ServerRack) =>
val number = p.readInt() val number = p.readInt()
if (number == -1) { t.setRunning(number, p.readBoolean())
t.range = p.readInt() t.sides(number) = p.readDirection()
}
else {
t.setRunning(number, p.readBoolean())
t.sides(number) = p.readDirection()
val keyCount = p.readInt()
val keys = t.terminals(number).keys
keys.clear()
for (i <- 0 until keyCount) {
keys += p.readUTF()
}
}
case _ => // Invalid packet. case _ => // Invalid packet.
} }

View File

@ -152,15 +152,6 @@ object PacketSender {
pb.sendToServer() pb.sendToServer()
} }
def sendServerRange(t: ServerRack, range: Int) {
val pb = new SimplePacketBuilder(PacketType.ServerRange)
pb.writeTileEntity(t)
pb.writeInt(range)
pb.sendToServer()
}
def sendServerSide(t: ServerRack, number: Int, side: Option[EnumFacing]) { def sendServerSide(t: ServerRack, number: Int, side: Option[EnumFacing]) {
val pb = new SimplePacketBuilder(PacketType.ServerSide) val pb = new SimplePacketBuilder(PacketType.ServerSide)

View File

@ -28,7 +28,6 @@ object Textures {
val Bar = L("bar") val Bar = L("bar")
val Borders = L("borders") val Borders = L("borders")
val ButtonPower = L("button_power") val ButtonPower = L("button_power")
val ButtonRange = L("button_range")
val ButtonRun = L("button_run") val ButtonRun = L("button_run")
val ButtonScroll = L("button_scroll") val ButtonScroll = L("button_scroll")
val ButtonSide = L("button_side") val ButtonSide = L("button_side")
@ -41,7 +40,6 @@ object Textures {
val Drone = L("drone") val Drone = L("drone")
val KeyboardMissing = L("keyboard_missing") val KeyboardMissing = L("keyboard_missing")
val Raid = L("raid") val Raid = L("raid")
val Range = L("range")
val Robot = L("robot") val Robot = L("robot")
val RobotAssembler = L("robot_assembler") val RobotAssembler = L("robot_assembler")
val RobotNoScreen = L("robot_noscreen") val RobotNoScreen = L("robot_noscreen")

View File

@ -3,14 +3,11 @@ package li.cil.oc.client.gui
import java.util import java.util
import li.cil.oc.Localization import li.cil.oc.Localization
import li.cil.oc.Settings
import li.cil.oc.client.Textures import li.cil.oc.client.Textures
import li.cil.oc.client.{PacketSender => ClientPacketSender} import li.cil.oc.client.{PacketSender => ClientPacketSender}
import li.cil.oc.common.container import li.cil.oc.common.container
import li.cil.oc.common.tileentity import li.cil.oc.common.tileentity
import net.minecraft.client.gui.GuiButton import net.minecraft.client.gui.GuiButton
import net.minecraft.client.gui.GuiScreen
import net.minecraft.client.renderer.Tessellator
import net.minecraft.entity.player.InventoryPlayer import net.minecraft.entity.player.InventoryPlayer
import net.minecraft.util.EnumFacing import net.minecraft.util.EnumFacing
import org.lwjgl.opengl.GL11 import org.lwjgl.opengl.GL11
@ -22,8 +19,6 @@ class ServerRack(playerInventory: InventoryPlayer, val rack: tileentity.ServerRa
protected var sideButtons = new Array[GuiButton](4) protected var sideButtons = new Array[GuiButton](4)
protected var rangeButtons = new Array[GuiButton](2)
def sideName(number: Int) = rack.sides(number) match { def sideName(number: Int) = rack.sides(number) match {
case Some(EnumFacing.UP) => Localization.ServerRack.Top case Some(EnumFacing.UP) => Localization.ServerRack.Top
case Some(EnumFacing.DOWN) => Localization.ServerRack.Bottom case Some(EnumFacing.DOWN) => Localization.ServerRack.Bottom
@ -50,18 +45,6 @@ class ServerRack(playerInventory: InventoryPlayer, val rack: tileentity.ServerRa
} }
ClientPacketSender.sendServerSide(rack, number, nextSide) ClientPacketSender.sendServerSide(rack, number, nextSide)
} }
if (button.id >= 8 && button.id <= 9) {
val step =
if (GuiScreen.isShiftKeyDown) 32
else if (GuiScreen.isCtrlKeyDown) 1
else 8
val range =
if (button.id == 8) math.max(rack.range - step, 0)
else math.min(rack.range + step, Settings.get.maxWirelessRange.toInt)
if (range != rack.range) {
ClientPacketSender.sendServerRange(rack, range)
}
}
if (button.id == 10) { if (button.id == 10) {
ClientPacketSender.sendServerSwitchMode(rack, !rack.internalSwitch) ClientPacketSender.sendServerSwitchMode(rack, !rack.internalSwitch)
} }
@ -86,10 +69,6 @@ class ServerRack(playerInventory: InventoryPlayer, val rack: tileentity.ServerRa
sideButtons(i) = new ImageButton(4 + i, guiLeft + 126, guiTop + 7 + i * 18, 42, 18, Textures.GUI.ButtonSide, sideName(i)) sideButtons(i) = new ImageButton(4 + i, guiLeft + 126, guiTop + 7 + i * 18, 42, 18, Textures.GUI.ButtonSide, sideName(i))
add(buttonList, sideButtons(i)) add(buttonList, sideButtons(i))
} }
for (i <- 0 to 1) {
rangeButtons(i) = new ImageButton(8 + i, guiLeft + 8 + i * 48, guiTop + 50, 16, 18, Textures.GUI.ButtonRange, if (i == 0) "-" else "+")
add(buttonList, rangeButtons(i))
}
switchButton = new ImageButton(10, guiLeft + 8, guiTop + 17, 64, 18, Textures.GUI.ButtonSwitch, Localization.ServerRack.SwitchExternal, textIndent = 18) switchButton = new ImageButton(10, guiLeft + 8, guiTop + 17, 64, 18, Textures.GUI.ButtonSwitch, Localization.ServerRack.SwitchExternal, textIndent = 18)
add(buttonList, switchButton) add(buttonList, switchButton)
} }
@ -102,33 +81,6 @@ class ServerRack(playerInventory: InventoryPlayer, val rack: tileentity.ServerRa
Localization.localizeImmediately(rack.getName), Localization.localizeImmediately(rack.getName),
8, 6, 0x404040) 8, 6, 0x404040)
val rangeY = 39
fontRendererObj.drawString(Localization.ServerRack.WirelessRange, 8, rangeY, 0x404040)
{
// Background for range value.
val tx = 25
val ty = 50
val w = 30
val h = 18
val t = Tessellator.getInstance
val r = t.getWorldRenderer
mc.getTextureManager.bindTexture(Textures.GUI.Range)
GL11.glColor3f(1, 1, 1)
GL11.glDepthMask(false)
r.startDrawingQuads()
r.addVertexWithUV(tx, ty + h, zLevel, 0, 1)
r.addVertexWithUV(tx + w, ty + h, zLevel, 1, 1)
r.addVertexWithUV(tx + w, ty, zLevel, 1, 0)
r.addVertexWithUV(tx, ty, zLevel, 0, 0)
t.draw()
GL11.glDepthMask(true)
}
drawCenteredString(fontRendererObj,
rack.range.toString,
40, 56, 0xFFFFFF)
for (i <- 0 to 3 if powerButtons(i).isMouseOver) { for (i <- 0 to 3 if powerButtons(i).isMouseOver) {
val tooltip = new java.util.ArrayList[String] val tooltip = new java.util.ArrayList[String]
tooltip.add(if (rack.isRunning(i)) Localization.Computer.TurnOff else Localization.Computer.TurnOn) tooltip.add(if (rack.isRunning(i)) Localization.Computer.TurnOff else Localization.Computer.TurnOn)

View File

@ -8,90 +8,85 @@ object GuiType extends ScalaEnum {
val Categories = mutable.Map.empty[Int, Category.Value] val Categories = mutable.Map.empty[Int, Category.Value]
sealed trait EnumVal extends Value { sealed trait EnumVal extends Value {
def id = ordinal Categories += ordinal -> subType
final val id = ordinal
def subType: GuiType.Category.Value def subType: GuiType.Category.Value
Categories += ordinal -> subType
} }
val Adapter = new EnumVal { val Adapter = new EnumVal {
def name = "Adapter"; def name = "Adapter"
def subType = GuiType.Category.Block def subType = GuiType.Category.Block
} }
val Assembler = new EnumVal { val Assembler = new EnumVal {
def name = "Assembler"; def name = "Assembler"
def subType = GuiType.Category.Block def subType = GuiType.Category.Block
} }
val Case = new EnumVal { val Case = new EnumVal {
def name = "Case"; def name = "Case"
def subType = GuiType.Category.Block def subType = GuiType.Category.Block
} }
val Charger = new EnumVal { val Charger = new EnumVal {
def name = "Charger"; def name = "Charger"
def subType = GuiType.Category.Block def subType = GuiType.Category.Block
} }
val Database = new EnumVal { val Database = new EnumVal {
def name = "Database"; def name = "Database"
def subType = GuiType.Category.Item def subType = GuiType.Category.Item
} }
val Disassembler = new EnumVal { val Disassembler = new EnumVal {
def name = "Disassembler"; def name = "Disassembler"
def subType = GuiType.Category.Block def subType = GuiType.Category.Block
} }
val DiskDrive = new EnumVal { val DiskDrive = new EnumVal {
def name = "DiskDrive"; def name = "DiskDrive"
def subType = GuiType.Category.Block def subType = GuiType.Category.Block
} }
val Drone = new EnumVal { val Drone = new EnumVal {
def name = "Drone"; def name = "Drone"
def subType = GuiType.Category.Entity def subType = GuiType.Category.Entity
} }
val Rack = new EnumVal { val Rack = new EnumVal {
def name = "Rack"; def name = "Rack"
def subType = GuiType.Category.Block def subType = GuiType.Category.Block
} }
val Raid = new EnumVal { val Raid = new EnumVal {
def name = "Raid"; def name = "Raid"
def subType = GuiType.Category.Block def subType = GuiType.Category.Block
} }
val Robot = new EnumVal { val Robot = new EnumVal {
def name = "Robot"; def name = "Robot"
def subType = GuiType.Category.Block def subType = GuiType.Category.Block
} }
val Screen = new EnumVal { val Screen = new EnumVal {
def name = "Screen"; def name = "Screen"
def subType = GuiType.Category.Block def subType = GuiType.Category.Block
} }
val Server = new EnumVal { val Server = new EnumVal {
def name = "Server"; def name = "Server"
def subType = GuiType.Category.Item def subType = GuiType.Category.Item
} }
val Switch = new EnumVal { val Switch = new EnumVal {
def name = "Switch"; def name = "Switch"
def subType = GuiType.Category.Block def subType = GuiType.Category.Block
} }
val Tablet = new EnumVal { val Tablet = new EnumVal {
def name = "Tablet"; def name = "Tablet"
def subType = GuiType.Category.Item
}
val Terminal = new EnumVal {
def name = "Terminal";
def subType = GuiType.Category.Item def subType = GuiType.Category.Item
} }
@ -101,13 +96,13 @@ object GuiType extends ScalaEnum {
sealed trait EnumVal extends Value sealed trait EnumVal extends Value
val Block = new EnumVal { val Block = new EnumVal {
def name = "Block" final val name = "Block"
} }
val Entity = new EnumVal { val Entity = new EnumVal {
def name = "Entity" final val name = "Entity"
} }
val Item = new EnumVal { val Item = new EnumVal {
def name = "Item" final val name = "Item"
} }
} }

View File

@ -56,7 +56,6 @@ object PacketType extends Enumeration {
MultiPartPlace, MultiPartPlace,
RobotAssemblerStart, RobotAssemblerStart,
RobotStateRequest, RobotStateRequest,
ServerRange,
ServerSide, ServerSide,
ServerSwitchMode, ServerSwitchMode,

View File

@ -37,7 +37,7 @@ class Proxy {
registerExclusive("torchRedstoneActive", new ItemStack(net.minecraft.init.Blocks.redstone_torch)) registerExclusive("torchRedstoneActive", new ItemStack(net.minecraft.init.Blocks.redstone_torch))
registerExclusive("nuggetGold", new ItemStack(net.minecraft.init.Items.gold_nugget)) registerExclusive("nuggetGold", new ItemStack(net.minecraft.init.Items.gold_nugget))
val nuggetIron = api.Items.get("ironNugget").createItemStack(1) val nuggetIron = Items.get("ironNugget").createItemStack(1)
registerExclusive("nuggetIron", nuggetIron) registerExclusive("nuggetIron", nuggetIron)
Delegator.subItem(nuggetIron) match { Delegator.subItem(nuggetIron) match {

View File

@ -1,90 +0,0 @@
package li.cil.oc.common.component
import li.cil.oc.Settings
import li.cil.oc.api
import li.cil.oc.api.component.Keyboard.UsabilityChecker
import li.cil.oc.api.network.Component
import li.cil.oc.api.network.Node
import li.cil.oc.api.network.Visibility
import li.cil.oc.common.item
import li.cil.oc.common.item.Delegator
import li.cil.oc.common.tileentity
import li.cil.oc.util.ExtendedNBT._
import net.minecraft.entity.player.EntityPlayer
import net.minecraft.nbt.NBTTagCompound
import net.minecraft.nbt.NBTTagString
import net.minecraftforge.common.util.Constants.NBT
import net.minecraftforge.fml.relauncher.Side
import net.minecraftforge.fml.relauncher.SideOnly
import scala.collection.mutable
class Terminal(val rack: tileentity.ServerRack, val number: Int) {
val buffer = {
val screenItem = api.Items.get("screen1").createItemStack(1)
val buffer = api.Driver.driverFor(screenItem, rack.getClass).createEnvironment(screenItem, rack).asInstanceOf[api.component.TextBuffer]
val (maxWidth, maxHeight) = Settings.screenResolutionsByTier(1)
buffer.setMaximumResolution(maxWidth, maxHeight)
buffer.setMaximumColorDepth(Settings.screenDepthsByTier(1))
buffer
}
val keyboard = {
val keyboardItem = api.Items.get("keyboard").createItemStack(1)
val keyboard = api.Driver.driverFor(keyboardItem, rack.getClass).createEnvironment(keyboardItem, rack).asInstanceOf[api.component.Keyboard]
keyboard.setUsableOverride(new UsabilityChecker {
override def isUsableByPlayer(keyboard: api.component.Keyboard, player: EntityPlayer) = {
val stack = player.getCurrentEquippedItem
Delegator.subItem(stack) match {
case Some(t: item.Terminal) if stack.hasTagCompound => keys.contains(stack.getTagCompound.getString(Settings.namespace + "key"))
case _ => false
}
}
})
keyboard
}
if (buffer.node != null) {
buffer.node.asInstanceOf[Component].setVisibility(Visibility.Neighbors)
keyboard.node.asInstanceOf[Component].setVisibility(Visibility.Neighbors)
}
val keys = mutable.ListBuffer.empty[String]
def connect(node: Node) {
if (keys.size > 0) {
node.connect(buffer.node)
node.connect(keyboard.node)
buffer.node.connect(keyboard.node)
}
}
// ----------------------------------------------------------------------- //
def load(nbt: NBTTagCompound) {
buffer.load(nbt.getCompoundTag(Settings.namespace + "buffer"))
keyboard.load(nbt.getCompoundTag(Settings.namespace + "keyboard"))
// Compatibility for previous dev versions where there was only one term.
if (nbt.hasKey(Settings.namespace + "key")) {
keys += nbt.getString(Settings.namespace + "key")
}
nbt.getTagList(Settings.namespace + "keys", NBT.TAG_STRING).foreach((tag: NBTTagString) => keys += tag.getString)
}
def save(nbt: NBTTagCompound) {
nbt.setNewCompoundTag(Settings.namespace + "buffer", buffer.save)
nbt.setNewCompoundTag(Settings.namespace + "keyboard", keyboard.save)
nbt.setNewTagList(Settings.namespace + "keys", keys)
}
@SideOnly(Side.CLIENT)
def readFromNBTForClient(nbt: NBTTagCompound) {
buffer.load(nbt)
nbt.getTagList("keys", NBT.TAG_STRING).foreach((tag: NBTTagString) => keys += tag.getString)
}
def writeToNBTForClient(nbt: NBTTagCompound) {
buffer.save(nbt)
nbt.setNewTagList("keys", keys)
}
}

View File

@ -283,8 +283,6 @@ object Items extends ItemAPI {
Recipes.addMultiItem(new item.Analyzer(components), "analyzer", "oc:analyzer") Recipes.addMultiItem(new item.Analyzer(components), "analyzer", "oc:analyzer")
registerItem(new item.Debugger(components), "debugger") registerItem(new item.Debugger(components), "debugger")
Recipes.addMultiItem(new item.Terminal(multi), "terminal", "oc:terminal")
registerItem(new item.Tablet(multi), "tablet") registerItem(new item.Tablet(multi), "tablet")
registerItem(new item.Drone(multi), "drone") registerItem(new item.Drone(multi), "drone")

View File

@ -96,7 +96,6 @@ object Present {
add("ram3", 10) add("ram3", 10)
add("server1", 10) add("server1", 10)
add("internetCard", 9) add("internetCard", 9)
add("terminal", 9)
add("solarGeneratorUpgrade", 9) add("solarGeneratorUpgrade", 9)
add("hdd2", 7) add("hdd2", 7)
add("navigationUpgrade", 7) add("navigationUpgrade", 7)

View File

@ -20,8 +20,6 @@ class Server(val parent: Delegator, val tier: Int) extends Delegate {
override protected def tooltipName = Option(super.unlocalizedName) override protected def tooltipName = Option(super.unlocalizedName)
override protected def tooltipData = Seq(Settings.get.terminalsPerTier(math.min(Tier.Three, tier)))
override def rarity = Rarity.byTier(tier) override def rarity = Rarity.byTier(tier)
override def maxStackSize = 1 override def maxStackSize = 1

View File

@ -1,105 +0,0 @@
package li.cil.oc.common.item
import java.util
import java.util.UUID
import li.cil.oc.OpenComputers
import li.cil.oc.Settings
import li.cil.oc.common.GuiType
import li.cil.oc.common.Tier
import li.cil.oc.common.tileentity
import li.cil.oc.server.{PacketSender => ServerPacketSender}
import li.cil.oc.util.BlockPosition
import li.cil.oc.util.ExtendedWorld._
import net.minecraft.entity.player.EntityPlayer
import net.minecraft.item.ItemStack
import net.minecraft.nbt.NBTTagCompound
import net.minecraft.util.EnumFacing
import net.minecraft.world.World
import net.minecraftforge.fml.relauncher.Side
import net.minecraftforge.fml.relauncher.SideOnly
class Terminal(val parent: Delegator) extends Delegate {
override def maxStackSize = 1
def hasServer(stack: ItemStack) = stack.hasTagCompound && stack.getTagCompound.hasKey(Settings.namespace + "server")
@SideOnly(Side.CLIENT)
override def tooltipLines(stack: ItemStack, player: EntityPlayer, tooltip: util.List[String], advanced: Boolean) {
super.tooltipLines(stack, player, tooltip, advanced)
if (hasServer(stack)) {
val server = stack.getTagCompound.getString(Settings.namespace + "server")
tooltip.add("§8" + server.substring(0, 13) + "...§7")
}
}
// TODO remove
// private var iconOn: Option[Icon] = None
// private var iconOff: Option[Icon] = None
//
// // TODO check if server is in range and running
// // Unlike in the GUI handler the result should definitely be cached here.
// @SideOnly(Side.CLIENT)
// override def icon(stack: ItemStack, pass: Int) = if (hasServer(stack)) iconOn else iconOff
//
// override def registerIcons(iconRegister: IconRegister) = {
// super.getAtlasSprites(iconRegister)
//
// iconOn = Option(iconRegister.getAtlasSprite(Settings.resourceDomain + ":TerminalOn"))
// iconOff = Option(iconRegister.getAtlasSprite(Settings.resourceDomain + ":TerminalOff"))
// }
override def onItemUse(stack: ItemStack, player: EntityPlayer, position: BlockPosition, side: EnumFacing, hitX: Float, hitY: Float, hitZ: Float) = {
val world = position.world.get
world.getTileEntity(position) match {
case rack: tileentity.ServerRack if side == rack.facing.ordinal() =>
val l = 2 / 16.0
val h = 14 / 16.0
val slot = (((1 - hitY) - l) / (h - l) * 4).toInt
if (slot >= 0 && slot <= 3 && rack.items(slot).isDefined) {
if (!world.isRemote) {
rack.servers(slot) match {
case Some(server) =>
val terminal = rack.terminals(slot)
val key = UUID.randomUUID().toString
val keys = terminal.keys
if (!stack.hasTagCompound) {
stack.setTagCompound(new NBTTagCompound())
}
else {
keys -= stack.getTagCompound.getString(Settings.namespace + "key")
}
val maxSize = Settings.get.terminalsPerTier(math.min(Tier.Three, server.tier))
while (keys.length >= maxSize) {
keys.remove(0)
}
keys += key
terminal.connect(server.machine.node)
ServerPacketSender.sendServerState(rack, slot)
stack.getTagCompound.setString(Settings.namespace + "key", key)
stack.getTagCompound.setString(Settings.namespace + "server", server.machine.node.address)
player.inventory.markDirty()
case _ => // Huh?
}
}
true
}
else false
case _ => super.onItemUse(stack, player, position, side, hitX, hitY, hitZ)
}
}
override def onItemRightClick(stack: ItemStack, world: World, player: EntityPlayer) = {
if (!player.isSneaking && stack.hasTagCompound) {
val key = stack.getTagCompound.getString(Settings.namespace + "key")
val server = stack.getTagCompound.getString(Settings.namespace + "server")
if (key != null && !key.isEmpty && server != null && !server.isEmpty) {
if (world.isRemote) {
player.openGui(OpenComputers, GuiType.Terminal.id, world, 0, 0, 0)
}
player.swingItem()
}
}
super.onItemRightClick(stack, world, player)
}
}

View File

@ -31,10 +31,6 @@ class ServerRack extends traits.PowerAcceptor with traits.Hub with traits.PowerB
val sides = Seq(Option(EnumFacing.UP), Option(EnumFacing.EAST), Option(EnumFacing.WEST), Option(EnumFacing.DOWN)). val sides = Seq(Option(EnumFacing.UP), Option(EnumFacing.EAST), Option(EnumFacing.WEST), Option(EnumFacing.DOWN)).
padTo(servers.length, None).toArray padTo(servers.length, None).toArray
val terminals = (0 until servers.length).map(new common.component.Terminal(this, _)).toArray
var range = 16
// For client side, where we don't create the component. // For client side, where we don't create the component.
private val _isRunning = new Array[Boolean](getSizeInventory) private val _isRunning = new Array[Boolean](getSizeInventory)
@ -216,26 +212,9 @@ class ServerRack extends traits.PowerAcceptor with traits.Hub with traits.PowerB
override def updateEntity() { override def updateEntity() {
super.updateEntity() super.updateEntity()
if (isServer && isConnected) { if (isServer && isConnected) {
val shouldUpdatePower = world.getTotalWorldTime % Settings.get.tickFrequency == 0
if (shouldUpdatePower && range > 0 && !Settings.get.ignorePower) {
val countRunning = servers.count {
case Some(server) => server.machine.isRunning
case _ => false
}
if (countRunning > 0) {
var cost = -(countRunning * range * Settings.get.wirelessCostPerRange * Settings.get.tickFrequency)
for (side <- EnumFacing.values if cost < 0) {
sidedNode(side) match {
case connector: Connector => cost = connector.changeBuffer(cost)
case _ =>
}
}
}
}
servers collect { servers collect {
case Some(server) => case Some(server) =>
if (shouldUpdatePower && server.tier == Tier.Four) { if (server.tier == Tier.Four && world.getTotalWorldTime % Settings.get.tickFrequency == 0) {
server.machine.node.asInstanceOf[Connector].changeBuffer(Double.PositiveInfinity) server.machine.node.asInstanceOf[Connector].changeBuffer(Double.PositiveInfinity)
} }
server.machine.update() server.machine.update()
@ -258,7 +237,6 @@ class ServerRack extends traits.PowerAcceptor with traits.Hub with traits.PowerB
servers collect { servers collect {
case Some(server) => case Some(server) =>
server.inventory.updateComponents() server.inventory.updateComponents()
terminals(server.slot).buffer.update()
} }
} }
} }
@ -304,15 +282,6 @@ class ServerRack extends traits.PowerAcceptor with traits.Hub with traits.PowerB
case _ => None case _ => None
} }
Array.copy(sidesNbt, 0, sides, 0, math.min(sidesNbt.length, sides.length)) Array.copy(sidesNbt, 0, sides, 0, math.min(sidesNbt.length, sides.length))
nbt.getTagList(Settings.namespace + "terminals", NBT.TAG_COMPOUND).toArray[NBTTagCompound].
zipWithIndex.foreach {
case (tag, index) if index < terminals.length =>
try terminals(index).load(tag) catch {
case t: Throwable => OpenComputers.log.warn("Failed restoring terminal state. Please report this!", t)
}
case _ =>
}
range = nbt.getInteger(Settings.namespace + "range")
internalSwitch = nbt.getBoolean(Settings.namespace + "internalSwitch") internalSwitch = nbt.getBoolean(Settings.namespace + "internalSwitch")
} }
@ -331,14 +300,6 @@ class ServerRack extends traits.PowerAcceptor with traits.Hub with traits.PowerB
case Some(side) => side.ordinal.toByte case Some(side) => side.ordinal.toByte
case _ => -1: Byte case _ => -1: Byte
}) })
nbt.setNewTagList(Settings.namespace + "terminals", terminals.map(t => {
val terminalNbt = new NBTTagCompound()
try t.save(terminalNbt) catch {
case t: Throwable => OpenComputers.log.warn("Failed saving terminal state. Please report this!", t)
}
terminalNbt
}))
nbt.setInteger(Settings.namespace + "range", range)
nbt.setBoolean(Settings.namespace + "internalSwitch", internalSwitch) nbt.setBoolean(Settings.namespace + "internalSwitch", internalSwitch)
} }
@ -348,7 +309,7 @@ class ServerRack extends traits.PowerAcceptor with traits.Hub with traits.PowerB
val isRunningNbt = nbt.getByteArray("isServerRunning").map(_ == 1) val isRunningNbt = nbt.getByteArray("isServerRunning").map(_ == 1)
Array.copy(isRunningNbt, 0, _isRunning, 0, math.min(isRunningNbt.length, _isRunning.length)) Array.copy(isRunningNbt, 0, _isRunning, 0, math.min(isRunningNbt.length, _isRunning.length))
val isPresentNbt = nbt.getTagList("isPresent", NBT.TAG_STRING).map((tag: NBTTagString) => { val isPresentNbt = nbt.getTagList("isPresent", NBT.TAG_STRING).map((tag: NBTTagString) => {
val value = tag.getString() val value = tag.getString
if (Strings.isNullOrEmpty(value)) None else Some(value) if (Strings.isNullOrEmpty(value)) None else Some(value)
}).toArray }).toArray
Array.copy(isPresentNbt, 0, isPresent, 0, math.min(isPresentNbt.length, isPresent.length)) Array.copy(isPresentNbt, 0, isPresent, 0, math.min(isPresentNbt.length, isPresent.length))
@ -357,12 +318,6 @@ class ServerRack extends traits.PowerAcceptor with traits.Hub with traits.PowerB
case _ => None case _ => None
} }
Array.copy(sidesNbt, 0, sides, 0, math.min(sidesNbt.length, sides.length)) Array.copy(sidesNbt, 0, sides, 0, math.min(sidesNbt.length, sides.length))
nbt.getTagList("terminals", NBT.TAG_COMPOUND).toArray[NBTTagCompound].
zipWithIndex.foreach {
case (tag, index) if index < terminals.length => terminals(index).readFromNBTForClient(tag)
case _ =>
}
range = nbt.getInteger("range")
if (anyRunning) Sound.startLoop(this, "computer_running", 1.5f, 1000 + world.rand.nextInt(2000)) if (anyRunning) Sound.startLoop(this, "computer_running", 1.5f, 1000 + world.rand.nextInt(2000))
} }
@ -374,12 +329,6 @@ class ServerRack extends traits.PowerAcceptor with traits.Hub with traits.PowerB
case Some(side) => side.ordinal.toByte case Some(side) => side.ordinal.toByte
case _ => -1: Byte case _ => -1: Byte
}) })
nbt.setNewTagList("terminals", terminals.map(t => {
val terminalNbt = new NBTTagCompound()
t.writeToNBTForClient(terminalNbt)
terminalNbt
}))
nbt.setInteger("range", range)
} }
// ----------------------------------------------------------------------- // // ----------------------------------------------------------------------- //
@ -392,7 +341,6 @@ class ServerRack extends traits.PowerAcceptor with traits.Hub with traits.PowerB
case Some(server) => case Some(server) =>
if (serverSide == Option(plug.side)) plug.node.connect(server.machine.node) if (serverSide == Option(plug.side)) plug.node.connect(server.machine.node)
else api.Network.joinNewNetwork(server.machine.node) else api.Network.joinNewNetwork(server.machine.node)
terminals(number).connect(server.machine.node)
case _ => case _ =>
} }
} }
@ -410,7 +358,6 @@ class ServerRack extends traits.PowerAcceptor with traits.Hub with traits.PowerB
servers(slot) = Some(server) servers(slot) = Some(server)
reconnectServer(slot, server) reconnectServer(slot, server)
Network.joinNewNetwork(server.machine.node) Network.joinNewNetwork(server.machine.node)
terminals(slot).connect(server.machine.node)
} }
} }
@ -426,7 +373,6 @@ class ServerRack extends traits.PowerAcceptor with traits.Hub with traits.PowerB
case _ => case _ =>
} }
servers(slot) = None servers(slot) = None
terminals(slot).keys.clear()
} }
} }

View File

@ -1,7 +1,6 @@
package li.cil.oc.server package li.cil.oc.server
import li.cil.oc.Localization import li.cil.oc.Localization
import li.cil.oc.Settings
import li.cil.oc.api import li.cil.oc.api
import li.cil.oc.api.machine.Machine import li.cil.oc.api.machine.Machine
import li.cil.oc.common.PacketType import li.cil.oc.common.PacketType
@ -49,7 +48,6 @@ object PacketHandler extends CommonPacketHandler {
case PacketType.PetVisibility => onPetVisibility(p) case PacketType.PetVisibility => onPetVisibility(p)
case PacketType.RobotAssemblerStart => onRobotAssemblerStart(p) case PacketType.RobotAssemblerStart => onRobotAssemblerStart(p)
case PacketType.RobotStateRequest => onRobotStateRequest(p) case PacketType.RobotStateRequest => onRobotStateRequest(p)
case PacketType.ServerRange => onServerRange(p)
case PacketType.ServerSide => onServerSide(p) case PacketType.ServerSide => onServerSide(p)
case PacketType.ServerSwitchMode => onServerSwitchMode(p) case PacketType.ServerSwitchMode => onServerSwitchMode(p)
case PacketType.TextBufferInit => onTextBufferInit(p) case PacketType.TextBufferInit => onTextBufferInit(p)
@ -190,17 +188,6 @@ object PacketHandler extends CommonPacketHandler {
case _ => // Invalid packet. case _ => // Invalid packet.
} }
def onServerRange(p: PacketParser) =
p.readTileEntity[ServerRack]() match {
case Some(rack) => p.player match {
case player: EntityPlayerMP if rack.isUseableByPlayer(player) =>
rack.range = math.min(math.max(0, p.readInt()), Settings.get.maxWirelessRange).toInt
PacketSender.sendServerState(rack)
case _ =>
}
case _ => // Invalid packet.
}
def onServerSide(p: PacketParser) = def onServerSide(p: PacketParser) =
p.readTileEntity[ServerRack]() match { p.readTileEntity[ServerRack]() match {
case Some(rack) => p.player match { case Some(rack) => p.player match {

View File

@ -420,16 +420,6 @@ object PacketSender {
pb.sendToPlayersNearTileEntity(t) pb.sendToPlayersNearTileEntity(t)
} }
def sendServerState(t: tileentity.ServerRack) {
val pb = new SimplePacketBuilder(PacketType.ComputerState)
pb.writeTileEntity(t)
pb.writeInt(-1)
pb.writeInt(t.range)
pb.sendToPlayersNearTileEntity(t)
}
def sendServerState(t: tileentity.ServerRack, number: Int, player: Option[EntityPlayerMP] = None) { def sendServerState(t: tileentity.ServerRack, number: Int, player: Option[EntityPlayerMP] = None) {
val pb = new SimplePacketBuilder(PacketType.ComputerState) val pb = new SimplePacketBuilder(PacketType.ComputerState)
@ -437,11 +427,6 @@ object PacketSender {
pb.writeInt(number) pb.writeInt(number)
pb.writeBoolean(t.isRunning(number)) pb.writeBoolean(t.isRunning(number))
pb.writeDirection(t.sides(number)) pb.writeDirection(t.sides(number))
val keys = t.terminals(number).keys
pb.writeInt(keys.length)
for (key <- keys) {
pb.writeUTF(key)
}
player match { player match {
case Some(p) => pb.sendToPlayer(p) case Some(p) => pb.sendToPlayer(p)