diff --git a/assets/items.psd b/assets/items.psd index 42bc35c6c..2bf82fc04 100644 Binary files a/assets/items.psd and b/assets/items.psd differ diff --git a/build.properties b/build.properties index 0af0c72e3..ab649e181 100644 --- a/build.properties +++ b/build.properties @@ -1,7 +1,7 @@ minecraft.version=1.7.10 forge.version=10.13.2.1291 -oc.version=1.5.7 +oc.version=1.5.8 oc.subversion=dev ae2.version=rv2-beta-26 diff --git a/src/main/java/li/cil/oc/api/API.java b/src/main/java/li/cil/oc/api/API.java index d37844ed4..adbec7d9c 100644 --- a/src/main/java/li/cil/oc/api/API.java +++ b/src/main/java/li/cil/oc/api/API.java @@ -16,7 +16,7 @@ import li.cil.oc.api.detail.NetworkAPI; */ public class API { public static final String ID_OWNER = "OpenComputers|Core"; - public static final String VERSION = "5.1.0"; + public static final String VERSION = "5.1.1"; public static DriverAPI driver = null; public static FileSystemAPI fileSystem = null; diff --git a/src/main/java/li/cil/oc/api/internal/Wrench.java b/src/main/java/li/cil/oc/api/internal/Wrench.java new file mode 100644 index 000000000..06c6716cb --- /dev/null +++ b/src/main/java/li/cil/oc/api/internal/Wrench.java @@ -0,0 +1,30 @@ +package li.cil.oc.api.internal; + +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.world.World; + +/** + * Implemented on items that are wrench-like tools. + */ +public interface Wrench { + /** + * Called when the wrench is used. + *

+ * This is called in two scenarios, once when testing whether the wrench + * can be used on a certain block, in which case the simulate + * argument will be true, and once when actually used on a block, + * in which case the simulate argument will be false, + * allowing the tool to damage itself, for example. + *

+ * This is usually called from blocks' activation logic. + * + * @param player the player using the tool + * @param world the world containing the block the wrench is used on. + * @param x the X coordinate of the block. + * @param y the Y coordinate of the block. + * @param z the Z coordinate of the block. + * @param simulate whether to simulate the usage. + * @return whether the wrench can be used on the block. + */ + boolean useWrenchOnBlock(EntityPlayer player, World world, int x, int y, int z, boolean simulate); +} diff --git a/src/main/java/li/cil/oc/api/manual/ImageRenderer.java b/src/main/java/li/cil/oc/api/manual/ImageRenderer.java index 19aa4fb15..2dcad21f7 100644 --- a/src/main/java/li/cil/oc/api/manual/ImageRenderer.java +++ b/src/main/java/li/cil/oc/api/manual/ImageRenderer.java @@ -15,7 +15,7 @@ public interface ImageRenderer { * The width of the area this renderer uses. *

* This is used to offset the OpenGL state properly before calling - * {@link #render()}, to correctly align the image horizontally. + * {@link #render(int, int)}, to correctly align the image horizontally. * * @return the width of the rendered image. */ @@ -25,7 +25,7 @@ public interface ImageRenderer { * The height of the area this renderer uses. *

* This is used to offset the OpenGL state properly before calling - * {@link #render()}, as well as to know where to resume rendering + * {@link #render(int, int)}, as well as to know where to resume rendering * other content below the image. * * @return the height of the rendered image. diff --git a/src/main/java/li/cil/oc/api/prefab/ResourceContentProvider.java b/src/main/java/li/cil/oc/api/prefab/ResourceContentProvider.java index 586845b6b..44d5efe68 100644 --- a/src/main/java/li/cil/oc/api/prefab/ResourceContentProvider.java +++ b/src/main/java/li/cil/oc/api/prefab/ResourceContentProvider.java @@ -40,7 +40,7 @@ public class ResourceContentProvider implements ContentProvider { @Override public Iterable getContent(String path) { - final ResourceLocation location = new ResourceLocation(resourceDomain, basePath + path); + final ResourceLocation location = new ResourceLocation(resourceDomain, basePath + (path.startsWith("/") ? path.substring(1) : path)); InputStream is = null; try { is = Minecraft.getMinecraft().getResourceManager().getResource(location).getInputStream(); diff --git a/src/main/resources/application.conf b/src/main/resources/application.conf index a6ae0505f..4ada8d8e9 100644 --- a/src/main/resources/application.conf +++ b/src/main/resources/application.conf @@ -946,6 +946,16 @@ opencomputers { # cartridge. Tweak this if you think printing is too cheap or expensive. # Note: the amount a single dye adds is this divided by 10. inkValue: 50000 + + # Whether to enable print opacity, i.e. make prints have shadows. If + # enabled, prints will have an opacity that is estimated from their + # sampled fill rate. This is disabled by default, because MC's lighting + # computation is apparently not very happy with multiple blocks with + # dynamic opacity sitting next to each other, and since all prints share + # the same block type, this can lead to weird shadows on prints. If you + # don't care about that and prefer them to be not totally shadowless, + # enable this. + printsHaveOpacity: false } # Other settings that you might find useful to tweak. @@ -1069,6 +1079,11 @@ opencomputers { # avoid issues with computers timing out, but can also lead to higher # server load. AGAIN, USE WITH CARE! threadPriority: -1 + + # Whether to give a new player a free copy of the manual. This will only + # happen one time per game, not per world, not per death. Once. If this + # is still too much for your taste, disable it here ;-) + giveManualToNewPlayers: true } # Settings for mod integration (the mod previously known as OpenComponents). diff --git a/src/main/resources/assets/opencomputers/doc/de_DE/index.md b/src/main/resources/assets/opencomputers/doc/de_DE/index.md index 6534b57ab..5b19c4d6f 100644 --- a/src/main/resources/assets/opencomputers/doc/de_DE/index.md +++ b/src/main/resources/assets/opencomputers/doc/de_DE/index.md @@ -1,5 +1,10 @@ # Handbuch -Test für Lokalisierung. +Leider ist das Handbuch bisher nur [auf Englisch](/en_US/index.md) vorhanden. -Ergo, [Link zur Beispielseite](general/example.md) die nur auf Englisch existiert. \ No newline at end of file +Wenn du des Englischen mächtig bist und dazu beitragen willst, das Handbuch zu übersetzen, super! Wenn du noch dazu sauberes Deutsch schreiben kannst, nicht alle drei Wörter einen Rechtschreibfehler einbaust, und es dich nervt wenn Leute Standart statt Standard schreiben, lies weiter. Sonst... schau mer mal ;-) Etwas Grundkenntnis von Git ist nötig, um deine Übersetzung dann als Pull-Request in OpenComputers einzubringen. + +Um beim Übersetzen zu helfen bedarf es keiner Programmierkenntnisse. Die gesamte Dokumentation ist in Form von Markdown-Dokumenten vorhanden, und findet sich [hier](http://git.io/ve1Fj). Im `en_US` Ordner findet sich die Englische Dokumentation, mit der gleichen Datei- und Ordnerstruktur müsste die Übersetzung ins Deutsche in den `de_DE` Ordner. +Dass die Ordner und Dateien gleich heißen ist wichtig, damit die richtige Seite automatisch angezeigt werden kann, wenn man das Handbuch z.B. auf einen Block anwendet. Zudem wird für fehlende Seiten automatisch auf die Englischen zurückgegriffen, sofern vorhanden. Das heißt auch, dass es schon hilft wenn einzelne Seiten übersetzt werden. Diese würden dann in Deutsch angezeigt, während alle anderen Seiten nach wie vor auf Englisch angezeigt würden. + +Wenn sich freiwillige finden würden, wäre das super. Andernfalls müsst ihr euch bis auf Weiteres mit der [Englischen Variante](/en_US/index.md) begnügen. diff --git a/src/main/resources/assets/opencomputers/doc/en_US/block/accessPoint.md b/src/main/resources/assets/opencomputers/doc/en_US/block/accessPoint.md index f154d2a7b..5dde0da28 100644 --- a/src/main/resources/assets/opencomputers/doc/en_US/block/accessPoint.md +++ b/src/main/resources/assets/opencomputers/doc/en_US/block/accessPoint.md @@ -2,10 +2,10 @@ ![AAA](oredict:oc:accessPoint) -The Access Point is the wireless version of the [switch](switch.md). It can be used to separate subnetworks so that machines in them will not see components in other networks, while still allowing to send network messages to the machines in other networks. +The access point is the wireless version of the [switch](switch.md). It can be used to separate subnetworks so that machines in them will not see [components](../general/computer.md) in other networks, while still allowing to send network messages to the machines in other networks. -In addition to that, this block will resend any wired messages it receives as wireless ones, wireless messages it receives as wired messages, and repeat wireless messages as wireless ones. +In addition to that, this block can act as a repeater: it can re-send wired messages as wired messages to other devices; or wireless messages as wired or wireless messages. -Switches and access point do *not* keep track of which packets they relayed recently, so avoid cycles in your network, or you may receive the same packet multiple times. +[Switches](switch.md) and access point do *not* keep track of which packets they relayed recently, so avoid cycles in your network or you may receive the same packet multiple times. Due to the limited buffer size of switches, packet loss can occur when trying to send network messages too frequently. You can upgrade your switches and access points to increase the speed at which they relay messages, as well as their internal message queue size. -Packets are only re-sent a certain number of times, so chaining an arbitrary number of switches or access points is not possible. +Packets are only re-sent a certain number of times, so chaining an arbitrary number of [switches](switch.md) or access points is not possible. By default, a packet will be re-sent up to five times. diff --git a/src/main/resources/assets/opencomputers/doc/en_US/block/adapter.md b/src/main/resources/assets/opencomputers/doc/en_US/block/adapter.md index 379041bd6..8df3e7188 100644 --- a/src/main/resources/assets/opencomputers/doc/en_US/block/adapter.md +++ b/src/main/resources/assets/opencomputers/doc/en_US/block/adapter.md @@ -2,6 +2,6 @@ ![Now with 100% more everything.](oredict:oc:adapter) -The Adapter allows computers to interact with a number of blocks that are not part of OpenComputers, such as blocks from Minecraft itself (like the Furnace) and from a number of other mods. Supported blocks adjacent to the adapter will show up as components in [computers](../general/computer.md) connected to the adapter. +The adapter allows [computers](../general/computer.md) to interact with blocks from vanilla Minecraft or other mods. Supported blocks adjacent to the adapter will show up as components in [computers](../general/computer.md) connected to the adapter. In addition to this, the adapter provides a slot for a few select upgrades. For example, the [inventory controller upgrade](../item/inventoryControllerUpgrade.md) allows computers to query more information from an inventory adjacent to the adapter, similar to when the upgrade is installed in a device (such as a [robot](robot.md) or [drone](../item/drone.md)), and a [tank controller upgrade](../item/tankControllerUpgrade.md) provides similar functionality for fluid tanks next to the adapter. diff --git a/src/main/resources/assets/opencomputers/doc/en_US/block/assembler.md b/src/main/resources/assets/opencomputers/doc/en_US/block/assembler.md index 3866ff288..cb25ceb76 100644 --- a/src/main/resources/assets/opencomputers/doc/en_US/block/assembler.md +++ b/src/main/resources/assets/opencomputers/doc/en_US/block/assembler.md @@ -2,10 +2,12 @@ ![Harder, better, faster, stronger.](oredict:oc:assembler) -The Assembler is an advanced workstation that can be used to build more complex electronic devices, such as [robots](robot.md), [drones](../item/drone.md) and [tablets](../item/tablet.md). They usually require a relatively large amount of energy to assemble these devices, so it is recommended to power them sufficiently. +The assembler is an advanced workstation that can be used to build more complex electronic devices, such as [robots](robot.md), [drones](../item/drone.md) and [tablets](../item/tablet.md). They require a large amount of energy to assemble devices, so it is recommended to power them sufficiently with a [capacitor bank](capacitor.md). -To build a device using an assembler, first insert the base part for that device. For [robots](robot.md) that is a [computer case](case1.md) of any tier, for tablets that is a [tablet case](../item/tabletCase1.md), for example. Continue to insert any parts you would like the device to contain. Take particular care to provide an operating system, or a possibility to install one later on (for robots you can install a [disk drive](diskDrive.md) to insert and remove [floppies](../item/floppy.md) later on, for example). +To build a device using an assembler, insert the base part for that device. For [robots](robot.md), that is a [computer case](case1.md) of any tier; and for [tablets](../item/tablet.md), a [tablet case](../item/tabletCase1.md). As with all OpenComputers inventories, the parts that can be inserted into specific slots; hovering over a slot highlights the parts in your inventory that can go into the slot. If you have NEI open, filtered to show OpenComputers items, compatible items will be highlighted in NEI as well. Continue to insert any parts you would like the device to contain. Take particular care to provide an operating system, or a way to install one later on (for robots you can install a [disk drive](diskDrive.md) to insert and remove [floppies](../item/floppy.md) later on, for example). For most devices, their [EEPROM](../item/eeprom.md) can be changed later on, by crafting the device together with a different [EEPROM](../item/eeprom.md) to insert in them. Existing [EEPROM](../item/eeprom.md) on the device will be returned to your inventory. -Also note that for [robots](robot.md) to have a [screen](screen1.md) you need to install a tier one screen in them, and to allow typing on the screen you also need to install a [keyboard](keyboard.md). For [tablets](../item/tablet.md) the screen is pre-installed in the tablet case, but you still need to install a keyboard if you wish to type on your [tablet](../item/tablet.md). +Also note that for [robots](robot.md) to have a [screen](screen1.md), you will need to install a [screen (tier 1)](screen1.md) in them, and to allow typing on the [screen](screen1.md), you will need to install a [keyboard](keyboard.md). For [tablets](../item/tablet.md), the [screen](screen1.md) is pre-installed in the [tablet case](../item/tabletCase1.md), but you will need to install a [keyboard](keyboard.md) if you wish to type on the [tablet](../item/tablet.md). -Once everything is in place, press the start button and wait for the device to be assembled and charged. It is important to remember that you *cannot* change the device after it has been assembled. If you forgot something or made a mistake, you will have to disassemble the device completely using the [disassembler](disassembler.md), which has a slight chance of breaking parts in the process. +Once everything is in place, press the start button and wait for the device to be assembled and charged. It is important to remember that you *cannot* change the device after it has been assembled. If you forgot something or made a mistake, you will have to disassemble the device using the [disassembler](disassembler.md), which has a slight chance of breaking parts in the process. + +A final note on complexity: the tier of an item determines how much complexity it requires, with tier 1 items requiring 1 complexity, tier 2 requiring 2 and tier 3 requiring 3. Container upgrades are the exception, where the complexity is twice the tier of the container (eg: a tier 2 [upgrade containers](../item/upgradeContainer1.md) requires 4 complexity, and likewise for [card containers](../item/cardContainer1.md)). diff --git a/src/main/resources/assets/opencomputers/doc/en_US/block/cable.md b/src/main/resources/assets/opencomputers/doc/en_US/block/cable.md index e323f4251..8b4c7028e 100644 --- a/src/main/resources/assets/opencomputers/doc/en_US/block/cable.md +++ b/src/main/resources/assets/opencomputers/doc/en_US/block/cable.md @@ -2,8 +2,8 @@ ![Salad.](oredict:oc:cable) -The Cable simply serves as a way of connecting computers and machines that are far apart. If you have a compact build where all components touch each other (directly or indirectly, most blocks also behave the same way as cables) you will usually not need cables. +The cable serves as a way of connecting [computers](../general/computer.md) and machines that are far apart. If you have a compact build where all components touch each other (directly or indirectly, most blocks also behave the same way as cables) you will usually not need cables. Cables can be colored using any kind of dye. Colored cables will only connect to cables of the same color and to light gray colored cables - the default color. This can be useful for running cables for multiple subnetworks in parallel, without using covers. -If necessary, Cables can be covered using Forge MultiPart covers, or Immibis Microblocks covers. \ No newline at end of file +If necessary, cables can be covered using Forge MultiPart covers, or Immibis Microblocks covers. Keep in mind that [3D prints](print.md) are Forge MultiPart compatible, so it is possible to print custom covers, if desired. diff --git a/src/main/resources/assets/opencomputers/doc/en_US/block/capacitor.md b/src/main/resources/assets/opencomputers/doc/en_US/block/capacitor.md index 8c5498cd2..1d8faf904 100644 --- a/src/main/resources/assets/opencomputers/doc/en_US/block/capacitor.md +++ b/src/main/resources/assets/opencomputers/doc/en_US/block/capacitor.md @@ -2,7 +2,7 @@ ![It's over 9000.](oredict:oc:capacitor) -The capacitor stores energy to be used by the network, acting as an energy buffer when needed. Unlike conversion from other mod's energy to OpenComputers' internal energy type (using a [power converter](powerConverter.md), transferring energy inside a single subnetwork is instantaneous, so it can be advantageous to store some energy internally for tasks that consume a lot of energy, such as assembling devices in the [assembler](assembler.md) or charging [robots](robot.md). +The capacitor stores energy to be used by the network, acting as an energy buffer when needed. Unlike conversion from other mod's energy to OpenComputers' internal energy type (using a [power converter](powerConverter.md) for example), transferring energy inside a single subnetwork is instantaneous. Having an internal energy bugger will be useful for tasks that require a lot of energy, such as [assembling](assembler.md) and/or [charging](charger.md) devices such as [robots](robot.md) or [drones](../item/drone.md). The storage efficiency of capacitors increases with the number of capacitors in direct contact or in the vicinity. For example, two capacitors directly next to each other will have a higher storage capacity than the sum of two separated capacitors. This adjacency bonus applies for capacitors up to two blocks away, and is reduced as the distance between capacitors increases. diff --git a/src/main/resources/assets/opencomputers/doc/en_US/block/case1.md b/src/main/resources/assets/opencomputers/doc/en_US/block/case1.md index efd5ded50..aa9c46572 100644 --- a/src/main/resources/assets/opencomputers/doc/en_US/block/case1.md +++ b/src/main/resources/assets/opencomputers/doc/en_US/block/case1.md @@ -4,6 +4,8 @@ Computer cases come in three different tiers, which limits the components that can be inserted into them. An additional tier also exists for use in creative mode only. Computer cases can also be placed inside an [assembler](assembler.md) to build [robots](robot.md). +The maximum tier of the component that can be inserted into any slot of a computer case can be seen as a small roman numeral in the corner of a tier-limited slot. A tier 2 slot can take a tier 1 component, for instance. + The tier 1 case can house up to and including the following components: - 2x tier 1 expansion cards (such as [graphics cards](../item/graphicsCard1.md), [network cards](../item/lanCard.md), etc) - 1x tier 1 [CPU](../item/cpu1.md) @@ -32,4 +34,4 @@ The tier 4 (Creative) case can house the following components: - 1x tier 3 [CPU](../item/cpu3.md) - 2x tier 3 [RAM](../item/ram5.md) - 2x tier 3 [HDD](../item/hdd3.md) -- 1x [floppy disk](../item/floppy.md) \ No newline at end of file +- 1x [floppy disk](../item/floppy.md) diff --git a/src/main/resources/assets/opencomputers/doc/en_US/block/chameliumBlock.md b/src/main/resources/assets/opencomputers/doc/en_US/block/chameliumBlock.md index 4e08bc3d8..99012ba02 100644 --- a/src/main/resources/assets/opencomputers/doc/en_US/block/chameliumBlock.md +++ b/src/main/resources/assets/opencomputers/doc/en_US/block/chameliumBlock.md @@ -1,7 +1,7 @@ -# Chamelium Block +# Block of Chamelium ![So... blank.](oredict:oc:chameliumBlock) -A bunch of [Chamelium](../item/chamelium.md) slapped together, this can be nice to decorate parts of your base, if you want a clean, monochrome block. Can be dyed to take any one of the 16 common Minecraft colors. +A few pieces of [chamelium](../item/chamelium.md) can be combined to provide a monochrome block for decorative purposes. Chamelium blocks can also be dyed with any of the 16 Minecraft colors. -Another use is to pick its texture and use that in your [3D prints](print.md), if you want something clean white to apply a tint to. +Using the Chamelium block as a texture for [3D prints](print.md) provides a clean white surface for applying tints. diff --git a/src/main/resources/assets/opencomputers/doc/en_US/block/charger.md b/src/main/resources/assets/opencomputers/doc/en_US/block/charger.md index 65b3e757e..e8d3db1b4 100644 --- a/src/main/resources/assets/opencomputers/doc/en_US/block/charger.md +++ b/src/main/resources/assets/opencomputers/doc/en_US/block/charger.md @@ -2,8 +2,8 @@ ![All right, let's do this.](oredict:oc:charger) -The Charger is used to charge devices such as [robots](robot.md), [drones](../item/drone.md) and [tablets](../item/tablet.md). A charger has to be activated by applying a redstone signal to it. The relative charge speed is based on the applied redstone signal's strength, with a strength of 15 meaning a charge speed of 100%. +The charger is used to charge devices such as [robots](robot.md), [drones](../item/drone.md) and [tablets](../item/tablet.md). A charger has to be activated by applying a redstone signal to it. The charge speed is based on the applied redstone signal's strength, with a strength of 15 meaning a charge speed of 100%. -Note that this logic can be inversed by hitting the charger with a BuildCraft compatible wrench. In inversed mode the charger defaults to 100% charge speed, and a higher redstone signal will result in a slower charge speed. +Note that this logic can be inversed by hitting the charger with a [wrench](../item/wrench.md). In inversed mode, the charger defaults to 100% charge speed, decreasing in charge speed as the strength of the redstone signal increases. -When a [tablet](../item/tablet.md) is placed in the charger, its first [hard drive](../item/hdd1.md) is also exposed to [computers](../general/computer.md) connected to the charger, similar to how [floppies](../item/floppy.md) in [disk drives](diskDrive.md) are. This allows transferring of data between the [computer](../general/computer.md) and [tablet](../item/tablet.md). +When a [tablet](../item/tablet.md) is placed in the charger, the first [hard drive](../item/hdd1.md) is also exposed to [computers](../general/computer.md) connected to the charger, similar to how [floppies](../item/floppy.md) in [disk drives](diskDrive.md) are. This allows transferring of data between the [computer](../general/computer.md) and [tablet](../item/tablet.md). diff --git a/src/main/resources/assets/opencomputers/doc/en_US/block/disassembler.md b/src/main/resources/assets/opencomputers/doc/en_US/block/disassembler.md index 830b15c94..770376b9d 100644 --- a/src/main/resources/assets/opencomputers/doc/en_US/block/disassembler.md +++ b/src/main/resources/assets/opencomputers/doc/en_US/block/disassembler.md @@ -2,6 +2,6 @@ ![Build it, tear it down.](oredict:oc:disassembler) -The Disassembler can be used to deconstruct most items in OpenComputers into their original parts. This is mostly useful to reclaim materials from old parts that are no longer useful, or to deconstruct devices that are either no longer needed or were incorrectly built (e.g. [robots](robot.md) without an operating system). +The disassembler can be used to deconstruct most items in OpenComputers into their original parts. This is mostly useful to reclaim materials from old parts that are no longer useful, or to deconstruct devices that are either no longer needed or were incorrectly built (e.g. [robots](robot.md) without an [operating system](../general/openOS.md)). -Disassembling items takes a relatively long time, and some energy. There is also a slight chance of loosing a component, which is applied on a component by component basis - be careful about throwing a device into the disassembler. +Disassembling items takes a long time, and some energy. There is also a slight chance of losing a component (which is applied on a component by component basis). \ No newline at end of file diff --git a/src/main/resources/assets/opencomputers/doc/en_US/block/diskDrive.md b/src/main/resources/assets/opencomputers/doc/en_US/block/diskDrive.md index c1ad8b493..ce8ded7a3 100644 --- a/src/main/resources/assets/opencomputers/doc/en_US/block/diskDrive.md +++ b/src/main/resources/assets/opencomputers/doc/en_US/block/diskDrive.md @@ -2,6 +2,8 @@ ![Going round and round and...](oredict:oc:diskDrive) -The Disk Drive can be used to read [floppy disks](../item/floppy.md) using a computer connected to the disk drive. This is useful to get started, since the lower tier [computer cases](case1.md) do not have a built-in floppy slot, and you'll need an operating system to get started. An OpenOS disk can be crafted using an empty [floppy disk](../item/floppy.md) and a Book. +The disk drive can be used to read [floppy disks](../item/floppy.md) using a [computer](../general/computer.md) connected to the disk drive. This is useful to get started, since the lower tier [computer cases](case1.md) do not have a built-in floppy slot, and you'll need an operating system to boot up the [computer](../general/computer.md). An [OpenOS](../general/openOS.lua) disk can be crafted using an empty [floppy disk](../item/floppy.md) and a [manual](../item/manual.lua). -It can also be installed in [robots](robot.md) to allow inserting an removing [floppy disks](../item/floppy.md) into and from the robot at any time. This can be very useful since the only other way to transfer data to and from a robot is using networking - for example using [network cards](../item/lanCard.md). +It can also be installed in [robots](robot.md) to allow inserting [floppy disks](../item/floppy.md) into the [robot](robot.md). This can be very useful since the only other way to transfer data to and from a robot is using networking - for example using [network cards](../item/lanCard.md). + +[Disks](../item/floppy.md) can be inserted and removed without opening the disk drive's GUI by sneak-activating the disk drive (shift-right click) with the [floppy disk](../item/floppy.md) in hand. diff --git a/src/main/resources/assets/opencomputers/doc/en_US/block/geolyzer.md b/src/main/resources/assets/opencomputers/doc/en_US/block/geolyzer.md index 7f0b2e5a3..e7c190a69 100644 --- a/src/main/resources/assets/opencomputers/doc/en_US/block/geolyzer.md +++ b/src/main/resources/assets/opencomputers/doc/en_US/block/geolyzer.md @@ -2,6 +2,6 @@ ![It rocks.](oredict:oc:geolyzer) -The Geolyzer can be used by computers to scan the terrain surrounding the geolyzer for the blocks' approximate hardness. This can be useful to generate maps of the area to display on [hologram projectors](hologram1.md) as well as to detect potentially valuable blocks (ores are usually harder than dirt and stone). Geolyzer scan results have a certain amount of noise added; in theory, multiple scans can be performed to determine a more accurate reading of a block's hardness level. +The geolyzer can be used by [computers](../general/computer.md) to scan the terrain surrounding the geolyzer for the blocks' approximate hardness. This can be useful to generate maps of the area to display on [hologram projectors](hologram1.md) as well as to detect potentially valuable blocks (ores are usually harder than dirt and stone). Geolyzer scan results have a certain amount of noise added; in theory, multiple scans can be performed to determine a more accurate reading of a block's hardness level. -The geolyzer can also be installed in [robots](robot.md) as an upgrade to allow them to scan their surroundings. Performing a scan will consume some energy, though, so using it excessively may quickly drain a [robot](robot.md)'s batteries. +The geolyzer can also be installed in [robots](robot.md) and [tablets](../item/tablet.md) as an upgrade to allow them to scan their surroundings. Performing a scan will consume some energy, though, so using it excessively will drain the device's batteries. diff --git a/src/main/resources/assets/opencomputers/doc/en_US/block/hologram1.md b/src/main/resources/assets/opencomputers/doc/en_US/block/hologram1.md index 81d1e074a..0e6d89769 100644 --- a/src/main/resources/assets/opencomputers/doc/en_US/block/hologram1.md +++ b/src/main/resources/assets/opencomputers/doc/en_US/block/hologram1.md @@ -2,6 +2,6 @@ ![Is this the real life? Is this just fantasy?](oredict:oc:hologram1) -The Hologram Projector is a volumetric display, i.e. it provides a three dimensional array of voxels that can be individually enabled or disabled by a connected computer. The second tier projector, while having the same resolution as the tier one projector, supports displaying the individual voxels in three different user-definable colors. +The hologram projector is a volumetric display, i.e. it provides a three dimensional array of voxels that can be individually enabled or disabled by a connected [computer](../general/computer.md). The second tier projector, while having the same resolution as the tier 1 projector, supports displaying the individual voxels in three different user-definable colors. -Holograms can be rotated along their vertical axis by hitting them with a BuildCraft compatible wrench on their top or bottom. This can save some effort, so that the output doesn't have to be transformed on the software side. Holograms can also be scaled up or down as desired. +Holograms can be rotated along their vertical axis by hitting them with a [wrench](../item/wrench.md) on their top or bottom. This can save some effort, so that the output doesn't have to be transformed on the software side. Holograms can also be scaled up or down as desired. diff --git a/src/main/resources/assets/opencomputers/doc/en_US/block/index.md b/src/main/resources/assets/opencomputers/doc/en_US/block/index.md index fe19c3fdf..19b3d670b 100644 --- a/src/main/resources/assets/opencomputers/doc/en_US/block/index.md +++ b/src/main/resources/assets/opencomputers/doc/en_US/block/index.md @@ -28,7 +28,7 @@ Keep in mind that some of these may not be available, depending on the recipe se * [Motion Sensor](motionSensor.md) * [Redstone I/O](redstone.md) -### Assembly / Printing +## Assembly / Printing * [3D Print](print.md) * [3D Printer](printer.md) * [Assembler](assembler.md) diff --git a/src/main/resources/assets/opencomputers/doc/en_US/block/keyboard.md b/src/main/resources/assets/opencomputers/doc/en_US/block/keyboard.md index f0fa45c7a..6ce96a892 100644 --- a/src/main/resources/assets/opencomputers/doc/en_US/block/keyboard.md +++ b/src/main/resources/assets/opencomputers/doc/en_US/block/keyboard.md @@ -2,6 +2,6 @@ ![QWERTY](oredict:oc:keyboard) -A Keyboard is needed to type text on [screens](screen1.md), be they in the world or built into devices such as [robots](robot.md) or [tablets](../item/tablet.md). +A keyboard is needed to type text on [screens](screen1.md), be they in the world or built into devices such as [robots](robot.md) or [tablets](../item/tablet.md). -For a keyboard to work with a [screen](screen1.md) in the world, it has to be placed next to the [screen](screen1.md), facing that [screen](screen1.md), or placed directly on the [screen](screen1.md) (on top or on one of its sides). You can tell that a keyboard is "connected" to a [screen](screen1.md) if by using the keyboard the [screen's](screen1.md) GUI opens up. +For a keyboard to work with a [screen](screen1.md) in the world, it has to be placed next to the [screen](screen1.md), facing that [screen](screen1.md), or placed directly on the [screen](screen1.md) (on top or on one of its sides). You can tell that a keyboard is "connected" to a [screen](screen1.md) if the [screen's](screen.md) GUI opens up when using the keyboard. \ No newline at end of file diff --git a/src/main/resources/assets/opencomputers/doc/en_US/block/microcontroller.md b/src/main/resources/assets/opencomputers/doc/en_US/block/microcontroller.md index 6fd08a7bb..910316304 100644 --- a/src/main/resources/assets/opencomputers/doc/en_US/block/microcontroller.md +++ b/src/main/resources/assets/opencomputers/doc/en_US/block/microcontroller.md @@ -2,6 +2,6 @@ ![Don't belittle it.](block:OpenComputers:microcontroller) -Microcontrollers are built using a [microcontroller case](../item/microcontrollerCase1.md) in the [assembler](assembler.md). They have less functionality compared to computers. +Microcontrollers are built using a [microcontroller case](../item/microcontrollerCase1.md) in the [assembler](assembler.md). They have less functionality compared to [computers](../general/computer.md), but are cheaper to build. -Microcontrollers can take various components, such as [CPUs](../item/cpu1.md), [memory (RAM)](../item/ram1.md), and Expansion cards. Microcontrollers are unable to contain a [hard disk drive](../item/hdd1.md), but do contain a slot for an [EEPROM](../item/eeprom.md), which can be programmed for very specific tasks. \ No newline at end of file +Microcontrollers can take various components, such as [CPUs](../item/cpu1.md), [memory (RAM)](../item/ram1.md), and Expansion cards. Microcontrollers are unable to contain a [hard disk drive](../item/hdd1.md), but do contain a slot for an [EEPROM](../item/eeprom.md), which can be programmed for very specific tasks. diff --git a/src/main/resources/assets/opencomputers/doc/en_US/block/motionSensor.md b/src/main/resources/assets/opencomputers/doc/en_US/block/motionSensor.md index 2d9f19e61..37225ec63 100644 --- a/src/main/resources/assets/opencomputers/doc/en_US/block/motionSensor.md +++ b/src/main/resources/assets/opencomputers/doc/en_US/block/motionSensor.md @@ -2,6 +2,6 @@ ![Don't. Blink.](oredict:oc:motionSensor) -The Motion Sensor allows [computers](../general/computer.md) to detect movement of living entities. If an entity moves faster than a set threshold, a signal will be injected into [computers](../general/computer.md) connected to the motion sensor. The threshold can be configured via the component the motion sensor exposes to connected computers. +The motion sensor allows [computers](../general/computer.md) to detect movement of living entities. If an entity moves faster than a set threshold, a signal will be injected into [computers](../general/computer.md) connected to the motion sensor. The threshold can be configured using the component API that the motion sensor exposes to connected computers. Movement is only detected if it happens within a radius of eight blocks around the motion sensor, and if there is a direct line of sight from the block to the entity that moved. diff --git a/src/main/resources/assets/opencomputers/doc/en_US/block/powerConverter.md b/src/main/resources/assets/opencomputers/doc/en_US/block/powerConverter.md index 0c2ae0515..07728c892 100644 --- a/src/main/resources/assets/opencomputers/doc/en_US/block/powerConverter.md +++ b/src/main/resources/assets/opencomputers/doc/en_US/block/powerConverter.md @@ -2,4 +2,4 @@ ![One of us? One of us!](oredict:oc:powerConverter) -The Power Converter serves as the fastest way to convert energy from other mods' power systems to OpenComputers' internal energy. If you only run a simple computer, you probably won't need a converter. If you have a large capacitor bank that you only drain every now and then, you probably won't need one, either. However, if you wish to directly power an [assembler](assembler.md) or [charger](charger.md), it is usually a good idea to use a converter, instead of directly connecting them to external power. +The power converter serves as the fastest way to convert energy from other mods' power systems to OpenComputers' internal energy. If you only run a simple computer, you probably won't need a converter. If you have a large capacitor bank that you only drain every now and then, you probably won't need one, either. However, if you wish to directly power an [assembler](assembler.md) or [charger](charger.md), it is usually a good idea to use a converter instead of directly connecting them to external power. diff --git a/src/main/resources/assets/opencomputers/doc/en_US/block/powerDistributor.md b/src/main/resources/assets/opencomputers/doc/en_US/block/powerDistributor.md index de88f4f09..70ec54adf 100644 --- a/src/main/resources/assets/opencomputers/doc/en_US/block/powerDistributor.md +++ b/src/main/resources/assets/opencomputers/doc/en_US/block/powerDistributor.md @@ -2,4 +2,4 @@ ![Power to the masses.](oredict:oc:powerDistributor) -The Power Distributor distributes a shared power storage (such as a [capacitor](capacitor.md)), allowing several subnetworks to share their energy, without components being exposed to computers in other networks. It operates by regularly "balancing" the energy in all subnetworks it is connected to, so that the *relative* amount of energy is the same in them. +The power distributor distributes a shared power storage (such as a [capacitor](capacitor.md)), allowing several subnetworks to share their energy without components being exposed to computers in other networks. It operates by regularly "balancing" the energy in all subnetworks it is connected to, so that the *relative* amount of energy is the same in them. diff --git a/src/main/resources/assets/opencomputers/doc/en_US/block/print.md b/src/main/resources/assets/opencomputers/doc/en_US/block/print.md index a56b2838c..8fea03113 100644 --- a/src/main/resources/assets/opencomputers/doc/en_US/block/print.md +++ b/src/main/resources/assets/opencomputers/doc/en_US/block/print.md @@ -2,6 +2,10 @@ ![Any way you want me.](block:OpenComputers:print) -3D prints are created using a [3D printer](printer.md). They are primarily intended for decorative purposes, but can also be created in such a way that they react to or emit redstone signals, allowing for a little bit of functional behavior on the side. +3D prints are created using a [3D printer](printer.md). They are primarily intended for decorative purposes, but can also be created in such a way that they react to or emit redstone signals, allowing for a little bit extra functionality. -3D prints can be recycled by putting them as input into a 3D printer. This will re-use some of the [chamelium](../item/chamelium.md) that was used to print them. Color that was used to print the model will not be recycled. +3D prints can be recycled by putting them as input into a [3D printer](printer.md). This will re-use some of the [chamelium](../item/chamelium.md) that was used to print them. Color that was used to print the model will not be recycled. + +Holding the key for OpenComputers' extended tooltips (default is [Shift]), a print's active state will be shown, if any. + +Printed blocks are also Forge MultiPart compatible. If present, multiple prints can be placed into a single block-space, unless they do not collide, and the total number of shapes in the block-space does not exceed the limit for a single model. Due to the nature of Forge MultiPart, prints can therefore also be placed into the same block-space as any other Forge MultiPart compatible block, such as torches, levers, cables or red alloy wires from Project Red, for example. diff --git a/src/main/resources/assets/opencomputers/doc/en_US/block/printer.md b/src/main/resources/assets/opencomputers/doc/en_US/block/printer.md index 09d44ca57..3fdb09cae 100644 --- a/src/main/resources/assets/opencomputers/doc/en_US/block/printer.md +++ b/src/main/resources/assets/opencomputers/doc/en_US/block/printer.md @@ -4,12 +4,12 @@ 3D printers allow you to print any block of any shape, with any type of texture. To get started with 3D printers, you will need to place down a 3D printer block next to a computer. This will give access to the `printer3d` component API, allowing you to set up and print [models](print.md) using the provided functions. -A more convenient way to setup 3D printers is to use Open Programs Package Manager (OPPM). Once installed, make sure you have an [internet card](../item/internetCard.md) in your computer and run the following command: +A more convenient way to setup 3D printers is to use Open Programs Package Manager (OPPM). Once installed (`oppm install oppm`), make sure you have an [internet card](../item/internetCard.md) in your [computer](../general/computer.md) and run the following command: `oppm install print3d-examples` -The examples can then be found in `/usr/share/models/` as .3dm files. Take a look through the example files for available options, in particular the `example.3dm` file. Alternatively, you can download the `print3d` and `print3d-examples` programs from OpenPrograms using `wget` and an internet card. +The examples can then be found in `/usr/share/models/` as .3dm files. Take a look through the example files for available options, in particular the `example.3dm` file. Alternatively, you can download the `print3d` and `print3d-examples` programs from OpenPrograms using `wget` and an [internet card](../item/internetCard.md). -In order to be able to print the models, a 3D printer needs to be configured via a computer. If set to print non-stop, the computer will be no longer required thereafter. You will also need to provide an [ink cartridge](../item/inkCartridge.md) and some [chamelium](../item/chamelium.md) as input materials. The amount of chamelium used depends on the volume of the 3D print, while the amount of ink used depends on the surface area of the printed item. +In order to be able to print the models, a 3D printer needs to be configured via a [computer](../general/computer.md). If set to print non-stop, the computer will no longer be required thereafter. You will also need to provide an [ink cartridge](../item/inkCartridge.md) and some [chamelium](../item/chamelium.md) as input materials. The amount of chamelium used depends on the volume of the 3D print, while the amount of ink used depends on the surface area of the printed item. To print an item, use the following command: `print3d /path/to/file.3dm` diff --git a/src/main/resources/assets/opencomputers/doc/en_US/block/raid.md b/src/main/resources/assets/opencomputers/doc/en_US/block/raid.md index 6f82a9250..87eda2777 100644 --- a/src/main/resources/assets/opencomputers/doc/en_US/block/raid.md +++ b/src/main/resources/assets/opencomputers/doc/en_US/block/raid.md @@ -2,8 +2,10 @@ ![40 man instance.](oredict:oc:raid) -The Raid block houses three [hard drives](../item/hdd1.md) 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](../item/hdd1.md) and is available to all [computers](../general/computer.md) connected to the raid. +The raid block houses three [hard drives](../item/hdd1.md) 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](../item/hdd1.md) and is available to all [computers](../general/computer.md) connected to the raid. The raid only works (and shows up as a file system) when three [hard drives](../item/hdd1.md) are present. The [hard drives](../item/hdd1.md) may differ in size. -Beware that adding a [hard drive](../item/hdd1.md) to the raid block will wipe it of its contents. Removing a single [hard drives](../item/hdd1.md) from a complete raid will also wipe the raid. Adding the disk back in will *not* restore it, the raid's new file system will not contain any files. +Beware that adding a [hard drive](../item/hdd1.md) to the raid block will wipe it of its contents. Removing a single [hard drives](../item/hdd1.md) from a complete raid will wipe the entire raid. Adding the disk back in will *not* restore the old files; the raid will be re-initialized as an empty file system. + +Breaking a raid block will retain its contents, so it can be safely relocated without losing any data. diff --git a/src/main/resources/assets/opencomputers/doc/en_US/block/redstone.md b/src/main/resources/assets/opencomputers/doc/en_US/block/redstone.md index b5362ad8e..8978fc884 100644 --- a/src/main/resources/assets/opencomputers/doc/en_US/block/redstone.md +++ b/src/main/resources/assets/opencomputers/doc/en_US/block/redstone.md @@ -2,8 +2,8 @@ ![Hi Red.](oredict:oc:redstone) -The Redstone I/O block can be used to remotely read and emit redstone signals. It behaves like a hybrid of a tier 1 and 2 [redstone card](../item/redstoneCard1.md): it can read and emit simple analog as well as bundled signals, but cannot read or emit wireless redstone signals. +The redstone I/O block can be used to remotely read and emit redstone signals. It behaves like a hybrid of a tier 1 and 2 [redstone card](../item/redstoneCard1.md): it can read and emit simple analog as well as bundled signals, but cannot read or emit wireless redstone signals. -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. +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. -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. +Like the [redstone cards](../item/redstoneCard1.md), this block injects a signal into connected [computers](../general/computer.md) when the state of a redstone signal changes - both for analog as well as for bundled signals. This block can also be configured to wake up connected [computers](../general/computer.md) when a certain input strength is exceeded, allowing automated booting of [computers](../general/computer.md). diff --git a/src/main/resources/assets/opencomputers/doc/en_US/block/robot.md b/src/main/resources/assets/opencomputers/doc/en_US/block/robot.md index 1a4aeb597..7b32bc5c0 100644 --- a/src/main/resources/assets/opencomputers/doc/en_US/block/robot.md +++ b/src/main/resources/assets/opencomputers/doc/en_US/block/robot.md @@ -2,8 +2,8 @@ ![His name was Tobor.](block:OpenComputers:robot) -Unlike computers, robots can move around and interact with the world much like a player can. They can *not* interact with external components, however! If you need to communicate with a computer or other robots, use a [wireless network card](../item/wlanCard.md), or create some low-level protocol using redstone signals via a [redstone card](../item/redstoneCard1.md), for example. +Unlike [computers](../general/computer.md), robots can move around and interact with the world much like a player can. They can *not* interact with external components, however! If you need to communicate with a [computer](../general/computer.md) or other robots, use a [wireless network card](../item/wlanCard.md), or create some low-level protocol using redstone signals via a [redstone card](../item/redstoneCard1.md), for example. -Robots are built by placing a [computer case](case1.md) of any tier in an [assembler](assembler.md). Higher tier computer cases can build more complex robots, due to being able to hold a higher tier [CPU](../item/cpu1.md). Complexity of the robot (as shown in the [assembler](assembler.md)) is determined by the tier of the components and upgrades placed in the robot slots; higher tier components will increase the complexity more than a lower tier component. If the complexity of the robot is too high, the [assembler](assembler.md) will not build the robot. +Robots are built by placing a [computer case](case1.md) of any tier in an [assembler](assembler.md). Higher tier [computer cases](case1.md) can build more complex robots, due to being able to hold a higher tier [CPU](../item/cpu1.md). Complexity of the robot (as shown in the [assembler](assembler.md)) is determined by the tier of the components and upgrades placed in the robot slots; higher tier components will increase the complexity more than a lower tier component. If the complexity of the robot is too high, the [assembler](assembler.md) will not build the robot. -Various upgrades can be placed into robots to increase the functionality. These include [inventory](../item/inventoryUpgrade.md) and [inventory controller](../item/inventoryControllerUpgrade.md) upgrades, [tank upgrades](../item/tankUpgrade.md), [navigation upgrade](../item/navigationUpgrade.md), among others. [Upgrade](../item/upgradeContainer1.md) and [card](../item/cardContainer1.md) containers can be placed in the robot for on-the-fly insertion and removal of upgrades and components. A [disk drive](diskDrive.md) can also be placed inside a robot to allow [floppy disks](../item/floppy.md) to be inserted, which will let you install openOS to the robot (an alternative is to install openOS to a blank [hard drive](../item/hdd1.md) using a computer, and using the pre-installed [hard drive](../item/hdd1.md) as a component in the robot assembly). +Various upgrades can be placed into robots to increase the functionality. These include [inventory](../item/inventoryUpgrade.md) and [inventory controller](../item/inventoryControllerUpgrade.md) upgrades, [tank upgrades](../item/tankUpgrade.md), [navigation upgrade](../item/navigationUpgrade.md), among others. [Upgrade](../item/upgradeContainer1.md) and [card](../item/cardContainer1.md) containers can be placed in the robot for on-the-fly insertion and removal of upgrades and components. A [disk drive](diskDrive.md) can also be placed inside a robot to allow [floppy disks](../item/floppy.md) to be inserted, which will let you install [openOS](../general/openOS.md) to the robot (an alternative is to install [openOS](../general/openOS.md) to a blank [hard drive](../item/hdd1.md) using a [computer](../general/computer.md), and using the pre-installed [hard drive](../item/hdd1.md) as a component in the robot assembly). diff --git a/src/main/resources/assets/opencomputers/doc/en_US/block/screen1.md b/src/main/resources/assets/opencomputers/doc/en_US/block/screen1.md index 7ef51edf8..75710fb6b 100644 --- a/src/main/resources/assets/opencomputers/doc/en_US/block/screen1.md +++ b/src/main/resources/assets/opencomputers/doc/en_US/block/screen1.md @@ -2,15 +2,17 @@ ![See this?](oredict:oc:screen1) -A Screen is used in combination with a [graphics card](../item/graphicsCard1.md), to allow computers to display text. Different screen tiers have different capabilities, such as supporting different resolutions and color depths. Screens range from low-resolution, monochrome displays to high-resolution displays with up to 256 colors. +A screen is used in combination with a [graphics card](../item/graphicsCard1.md), to allow [computers](../general/computer.md) to display text. Different screen tiers have different capabilities, such as supporting different resolutions and color depths. Screens range from low-resolution, monochrome displays to high-resolution displays with up to 256 colors. -The available resolution and color depth depends on the lowest tier component. When using a [graphics card (tier 1)](../item/graphicsCard1.md) with a [screen (tier 3)](screen3.md), only the tier 1 resolution and color depth is usable. +The available resolution and color depth depends on the lowest tier component. When using a [graphics card (tier 1)](../item/graphicsCard1.md) with a [screen (tier 3)](screen3.md), only the tier 1 resolution and color depth is usable. However, when using a tier 3 [graphics card](../item/graphicsCard1.md) with a tier 1 screen, while resolution and color depth will still be limit to tier 1, the different operations on the [graphics card](../item/graphicsCard1.md) will be faster than when using a tier 1 [graphics card](../item/graphicsCard1.md). -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. +Screens can be placed next to each other to form multi-block screens, as long as they are facing the same way. When placed facing up or down they must also be rotated the same way. Their orientation is indicated by an arrow overlay shown while holding a screen in hand. -Tier 2 and tier 3 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. +The size of a screen has no impact on the available resolution, only its tier has. To control how adjacent screens connect, screens can also be dyed using any dye. Simply right-click the screen with a dye in hand. The dye will not be consumed, but screens will not retain this color when broken. Screens with different colors will not connect. Screens with different tiers will never connect, even if they have the same color. + +Tier 2 and tier 3 screens also support mouse input. Clicks can either be performed in a screen's GUI (which can only be opened if a [keyboard](keyboard.md) is connected to the screen), or by using a screen while sneaking (empty-handed when in doubt). The sneaking part is optional if the screen has no [keyboard](keyboard.md). Note that whether the GUI opens when sneak- or normally activating a screen can be controlled using the component API that it exposes to connected [computers](../general/computer.md). Tier 3 screens allow more accurate hit position detection, if enabled in their component. This allows detecting whether the upper or lower half of a single character space was clicked, for example, which can be useful when using special Unicode characters to simulate higher resolutions. The resolutions and color depths for the screens are as follows: - Tier 1: 50x16, 1-bit color. - Tier 2: 80x25, 4-bit color. -- Tier 3: 160x50, 8-bit color. \ No newline at end of file +- Tier 3: 160x50, 8-bit color. diff --git a/src/main/resources/assets/opencomputers/doc/en_US/block/serverRack.md b/src/main/resources/assets/opencomputers/doc/en_US/block/serverRack.md index e82738713..c737a4711 100644 --- a/src/main/resources/assets/opencomputers/doc/en_US/block/serverRack.md +++ b/src/main/resources/assets/opencomputers/doc/en_US/block/serverRack.md @@ -2,8 +2,8 @@ ![Free housing.](oredict:oc:serverRack) -A Server Rack houses up to four [servers](../item/server1.md). A server is a higher tier computer, which can only run when inside a server rack. [Servers](../item/server1.md) can be remote controlled using a [remote terminal](../item/terminal.md). 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. +A server rack houses up to four [servers](../item/server1.md). A [server](../item/server1.md) is a higher tier [computer](../general/computer.md), which can only run when inside a server rack. [Servers](../item/server1.md) can be remote controlled using a [remote terminal](../item/terminal.md). The number of [remote terminals](../item/terminal.md) that can be connected to a single [server](../item/server1.md) at a time depends on the tier of the [server](../item/server1.md). The distance up to which the [remote terminal](../item/terminal.md) work can be configured in the rack's GUI. Higher values have require more energy. -Each [server](../item/server1.md) 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](../item/server1.md) 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. +Each [server](../item/server1.md) 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](../item/server1.md) 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, `sides.right` will be to your left and vice versa. -Server racks act as [switch](switch.md) and [power distributor](powerDistributor.md) 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](../item/server.md) in the rack, they will not be automatically relayed to the other faces of the rack. [Servers](../item/server1.md) 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. +Server racks act as [switch](switch.md) and [power distributor](powerDistributor.md) 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](switch.md). In internal mode, messages are only passed to the [servers](../item/server.md) in the rack, and will not be automatically relayed to the other faces of the rack. [Servers](../item/server1.md) will still be able to send messages to each other. This allows using server racks as advanced [switches](switch.md) that can perform filter and mapping operations, for example. diff --git a/src/main/resources/assets/opencomputers/doc/en_US/block/switch.md b/src/main/resources/assets/opencomputers/doc/en_US/block/switch.md index cf447676f..a607e0cfd 100644 --- a/src/main/resources/assets/opencomputers/doc/en_US/block/switch.md +++ b/src/main/resources/assets/opencomputers/doc/en_US/block/switch.md @@ -2,10 +2,10 @@ ![Building bridges.](oredict:oc:switch) -The switch 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). +The switch can be used to allow different subnetworks to send network messages to each other, without exposing components to [computers](../general/computer.md) in other networks. Keeping components local is usually a good idea, to avoid [computers](../general/computer.md) using the wrong [screen](screen1.md) or to avoid component overflows to happen (causing [computers](../general/computer.md) to crash and refuse to boot up). -There is also a wireless variation of this block, called the [access point](accessPoint.md), which will also relay messages wirelessly. +There is also a wireless variation of this block, called the [access point](accessPoint.md), which will also relay messages wirelessly. Wireless messages can be received and relayed by other [access points](accessPoint.md), or by [computers](../general/computer.md) with a [wireless network card](../item/wlanCard.md). -Switches and [access points](accessPoint.md) do *not* keep track of which packets they relayed recently, so avoid cycles in your network or you may receive the same packet multiple times. +Switches and [access points](accessPoint.md) do *not* keep track of which packets they relayed recently, so avoid cycles in your network or you may receive the same packet multiple times. Due to the limited buffer size of switches, sending messages too frequently will result in packet loss. You can upgrade your switches and [access points](accessPoint.md) to increase the speed with which they relay messages, as well as their internal message queue size. -Packets are only re-sent a certain number of times, so chaining an arbitrary number of switches or access points is not possible. +Packets are only re-sent a certain number of times, so chaining an arbitrary number of switches or access points is not possible. By default, a packet will be re-sent up to five times. diff --git a/src/main/resources/assets/opencomputers/doc/en_US/general/computer.md b/src/main/resources/assets/opencomputers/doc/en_US/general/computer.md index b5da1e742..5ca59e680 100644 --- a/src/main/resources/assets/opencomputers/doc/en_US/general/computer.md +++ b/src/main/resources/assets/opencomputers/doc/en_US/general/computer.md @@ -1,10 +1,10 @@ # Computers -Computers are built using a variety of different [blocks](../block/index.md) and components. The bare minimum needed to build a computer is a [case](../block/case1.md), [screen](../block/screen1.md), and [keyboard](../block/keyboard.md). The case and screen are available in different tiers providing different functionality and allowing for more complex computer systems. In order for the screen to be accessible, the keyboard must be placed adjacent to the screen (either on the sides or directly in front of the screen). +Computers are built using a variety of different [blocks](../block/index.md) and components. The bare minimum needed to build a computer is a [case](../block/case1.md), [screen](../block/screen1.md), and [keyboard](../block/keyboard.md). The [case](../block/case1.md) and [screen](../block/screen1.md) are available in different tiers providing different functionality and allowing for more complex computer systems. In order for the [screen](../block/screen1.md) to be accessible, the [keyboard](../block/keyboard.md) must be placed adjacent to the [screen](../block/screen1.md) (either on the sides or directly in front of the [screen](../block/screen1.md)). -Once the basic structure is built, components can be placed inside the [case](../block/case1.md). These components include [CPUs](../item/cpu1.md), [memory (RAM)](../item/ram1.md), [hard disk drives (HDD)](../item/hdd1.md), [graphics cards](../item/graphicsCard1.md) (to be able to use the [screen](../block/screen1.md)), [network cards](../item/lanCard.md) (for communication between computer networks), etc. There are many components available allowing for highly flexible systems designed for specific purposes. +Once the basic structure is built, components can be placed inside the [case](../block/case1.md). These components include [CPUs](../item/cpu1.md), [memory (RAM)](../item/ram1.md), [hard drives (HDD)](../item/hdd1.md), [graphics cards](../item/graphicsCard1.md) (to be able to use the [screen](../block/screen1.md)), [network cards](../item/lanCard.md) (for communication between computer networks), etc. There are many components available allowing for highly flexible systems designed for specific purposes. -Lower tier computers also require a [disk drive](../block/diskDrive.md), which takes a [floppy](../item/floppy.md) disk. An OpenOS [floppy](../item/floppy.md) disk is needed for booting up the computer for the first time, and is used to install the operating system to the [HDD](../item/hdd1.md). Once installed to the [HDD](../item/hdd1.md), the [floppy](../item/floppy.md) disk is no longer necessary. Additional software is also available as [floppy](../item/floppy.md) disks (such as Open Programs Package Manager, or OPPM) and are obtained from dungeon loot. +Lower tier computers also require a [disk drive](../block/diskDrive.md), which takes a [floppy](../item/floppy.md) disk. An [OpenOS](openOS.md) [floppy](../item/floppy.md) disk is needed for booting up the computer for the first time, and is used to install the operating system to the [HDD](../item/hdd1.md). Once installed to the [HDD](../item/hdd1.md), the [floppy](../item/floppy.md) disk is no longer necessary. Additional software is also available as [floppy](../item/floppy.md) disks (such as Open Programs Package Manager, or OPPM) and are obtained from dungeon loot. The final step necessary is to provide the computer with a power source. OpenComputers is compatible with most major power-providing mods, and many blocks can be powered directly. You can see which blocks can be connected to external power by checking if their tooltip contains an entry about the block's power conversion speed. -For a larger network with multiple computers, a [power converter](../block/powerConverter.md) (converts different mod's power to OC's internal Energy type), [power distributor](../block/powerDistributor.md) (distributes power to different computers), and [capacitor](../block/capacitor.md) (power storage for the network) can be used to connect different computers on the network using Cables. +For a larger network with multiple computers, a [power converter](../block/powerConverter.md) (converts different mod's power to OC's internal Energy type), [power distributor](../block/powerDistributor.md) (distributes power to different computers on the network), and [capacitor](../block/capacitor.md) (power storage for the network) can be used to connect different computers on the network using [cables](../block/cable.md). diff --git a/src/main/resources/assets/opencomputers/doc/en_US/general/lua.md b/src/main/resources/assets/opencomputers/doc/en_US/general/lua.md index 16de00ff9..e9fbb87c6 100644 --- a/src/main/resources/assets/opencomputers/doc/en_US/general/lua.md +++ b/src/main/resources/assets/opencomputers/doc/en_US/general/lua.md @@ -1,12 +1,16 @@ # Lua -The Lua [reference manual](http://www.lua.org/manual/5.2/manual.html) is a good place to get started with the basics of Lua and becoming familiar with the basic syntax and standard libraries. OpenComputers has very similar standard libraries, and omits certain libraries almost entirely (such as about 99% of the debug library). +The Lua [reference manual](http://www.lua.org/manual/5.2/manual.html) and the [Programming in Lua](http://www.lua.org/pil/) books (first edition is available for free online) are a good place to get started with the basics of Lua and becoming familiar with the basic syntax and standard libraries. [OpenOS](openOS.md) strives to emulate the standard libraries very closely, with a few deviations, such as the mostly missing debug library (for sandboxing reasons). These differences are [documented on the wiki](http://ocdoc.cil.li/api:non-standard-lua-libs). -Non-standard libraries will need to be *required* in order to use them in a script. For example: +Non-standard libraries will need to be `require`d in order to use them in a script. For example: -`local component = require("component")` -`local rs = component.redstone` +`local component = require("component")` +`local rs = component.redstone` -This will allow you to call all of the functions provided by the [redstone](../item/redstoneCard1.md) component. +This will allow you to call all of the functions provided by the [redstone](../item/redstoneCard1.md) component. For example: -OpenComputers provides many custom libraries which can be used for many applications, from controlling and manipulating components attached to the [computer](computer.md), to reference APIs for colors and keyboard keycodes. Custom libraries can be used within a Lua script by using the `require()` function, as above. Some custom libraries require specific components to work, such as the Internet library requiring an [internet card](../item/internetCard.md). \ No newline at end of file +`rs.setOutput(require("sides").front, 15)` + +**Important**: when working in the Lua interpreter, *do not* use `local`, as that will make the variables local to a single line of input. Meaning if you were to enter the lines above one after another in the interpreter, the third one would error, telling you that `rs` is a `nil` value. Why only on the third line, you ask? Because, for ease of testing, the interpreter tries to load unknown variables as libraries. So even though the assignment to `component` from the first line would nothing, the use of `component` on the second line would cause that library to be loaded and used. Libraries are not automatically used when using Lua scripts to keep memory usage low, because that's a limited resource. + +OpenOS provides many custom libraries which can be used for many applications, from controlling and manipulating components attached to the [computer](computer.md), to reference APIs for colors used in bundled redstone control and [keyboard](../block/keyboard.md) keycodes. Custom libraries can be used within a Lua script by using the `require()` function, as above. Some custom libraries require specific components to work, such as the `internet` library requiring an [internet card](../item/internetCard.md). In that particular case it is even being provided by it, i.e. the library will show up once you install an internet card - technically speaking, it is contained on a small, read-only file system on the internet card. diff --git a/src/main/resources/assets/opencomputers/doc/en_US/general/openOS.md b/src/main/resources/assets/opencomputers/doc/en_US/general/openOS.md index 17c5bdaa6..0f1b23793 100644 --- a/src/main/resources/assets/opencomputers/doc/en_US/general/openOS.md +++ b/src/main/resources/assets/opencomputers/doc/en_US/general/openOS.md @@ -1,7 +1,12 @@ # OpenOS -OpenOS is a basic operating system available in OpenComputers. It is required to boot up a [computer](computer.md) for the first time, and can be crafted by placing an empty [floppy disk](../item/floppy.md) and an OpenComputers manual inside a Crafting table. +OpenOS is a basic operating system available in OpenComputers. It is required to boot up a [computer](computer.md) for the first time, and can be crafted by placing an empty [floppy disk](../item/floppy.md) and an OpenComputers [manual](../item/manual.md) inside a crafting table. -Once crafted, the [floppy disk](../item/floppy.md) can be placed inside a [disk drive](../block/diskDrive.md) connected to a [computer](computer.md) system, which will allow the [computer](computer.md) to boot up OpenOS. Once booted, it is advisable to install OpenOS to an empty [hard drive](../item/hdd1.md), foregoing the need for a [floppy disk](../item/floppy.md) and to gain access to a read-write file system ([floppy disk](../item/floppy.md) are read-only). A tier 3 [computer case](../block/case3.md) does not require a [disk drive](../block/diskDrive.md), as it has a slot built in for the [floppy disk](../item/floppy.md). OpenOS can be installed by simply running `install`, and following the on-screen prompts to complete the installation. The [floppy disk](../item/floppy.md) may be removed once the system has been rebooted. OpenOS can be installed on all devices except [drones](../item/drone.md) and [microcontrollers](../block/microcontroller.md) (both of which require manually programming an [EEPROM](../item/eeprom.md) to provide functionality). +Once crafted, the [floppy disk](../item/floppy.md) can be placed inside a [disk drive](../block/diskDrive.md) connected to a [correctly configured](quickstart.md) [computer](computer.md) system, which will allow the [computer](computer.md) to boot up OpenOS. +Once booted, it is advisable to install OpenOS to an empty [hard drive](../item/hdd1.md), foregoing the need for a [floppy disk](../item/floppy.md) and to gain access to a read-write file system (the OpenOS [floppy disk](../item/floppy.md) and other "loot" disks are read-only). A tier 3 [computer case](../block/case3.md) does not require a [disk drive](../block/diskDrive.md), as it has a slot built in for the [floppy disk](../item/floppy.md). -OpenOS has many built in functions, the most useful of them is the `lua` command, which opens up a Lua interpreter. This is a good testing space for trying out various commands, and experimenting with component API, before writing the commands into a .lua script. For more information on programming, refer to the [Lua Programming](lua.md) page. To run Lua scripts, simply type in the name of the file and hit enter (for example, script.lua can be run by typing the `script` command in the terminal). \ No newline at end of file +OpenOS can be installed by simply running `install`, and following the on-screen prompts to complete the installation. The [floppy disk](../item/floppy.md) may be removed once the system has been rebooted. OpenOS can be installed on all devices except [drones](../item/drone.md) and [microcontrollers](../block/microcontroller.md) (both of which require manually programming an [EEPROM](../item/eeprom.md) to provide functionality, because they have no built in file system). + +OpenOS has many built in functions, the most useful of them is the `lua` command, which opens up a Lua interpreter. This is a good testing space for trying out various commands, and experimenting with component API, before writing the commands into a .lua script. Take note of the information displayed when starting the interpreter, it will tell you how to show results of the commands you enter, and how to exit it. + +For more information on programming, refer to the [Lua Programming](lua.md) page. To run Lua scripts, simply type in the name of the file and hit enter (for example, `script.lua` can be run by typing the `script` command in the terminal). diff --git a/src/main/resources/assets/opencomputers/doc/en_US/general/quickstart.md b/src/main/resources/assets/opencomputers/doc/en_US/general/quickstart.md new file mode 100644 index 000000000..b880cbdc6 --- /dev/null +++ b/src/main/resources/assets/opencomputers/doc/en_US/general/quickstart.md @@ -0,0 +1,50 @@ +# Getting Started + +Also know as "how to build your first computer". To get your first [computer](computer.md) to run, you will need to first set it up correctly. There are many different types of computers in OpenComputers, but let's start with the basic one: the standard computer. + +**Disclaimer**: this will be step-by-step, and also provide some information on how to look for issues yourself later on, so this is quite long. If you have never built a computer in real life, and/or are completely new to the mod, it is highly recommended you read through it all. + +First off, you will need a [computer case](../block/case1.md). This is the block which will contain of the components, defining the behavior of the computer you are building. + +![A tier two computer case.](oredict:oc:case2) + +For example, you will need to choose what tier of [graphics card](../item/graphicsCard1.md) you wish to use, if you need a [network card](../item/lanCard.md), a [redstone card](../item/redstoneCard1.md) or, if you're just playing around in creative mode, maybe even a [debug card](../item/debugCard.md). + +When you open the [computer case](../block/case1.md)'s GUI you will see a few slots to the right. The number of slots, and what tier of component can be placed into them (indicated by the small roman numeral in the slot) depends on the tier of the case itself. +![GUI of a tier two computer case.](opencomputers:doc/img/configuration_case1.png) +In their empty state, [computer cases](../block/case1.md) are pretty useless. You can try to power up your [computer](computer.md) now, but it'll immediately print an error message to your chat log, and make its dissatisfaction heard by beeping at you. Good thing the error message is telling you what you can do to fix this situation: it requires energy. Connect your [computer](computer.md) to some power, either directly or via a [power converter](../block/powerConverter.md). + +When you try to start it now, it will tell you that you need a [CPU](../item/cpu1.md). These come in different tiers - a trend you will notice is present throughout OpenComputers. For [CPUs](../item/cpu1.md), higher tiers mean more components at a time, as well as faster execution. So pick a tier, and put it in your [computer case](../block/case1.md). + +Next up you will be asked to insert some [memory (RAM)](../item/ram1.md). Notice that the beep code is different now: long-short. Higher tiers of [memory (RAM)](../item/ram1.md) mean more memory available to the programs running on your [computer](computer.md). To run [OpenOS](openOS.md), which is the goal of this introduction, you will want to use at least two tier 1 [memory (RAM)](../item/ram1.md) sticks. + +We're making good progress here. By now your [computer case](../block/case1.md) will look somewhat like this: +![Partially configured computer.](opencomputers:doc/img/configuration_case2.png) +And behold, turning it on now does not print any more error messages! But alas, it still doesn't do much. At least it beeps twice now. That means the actual execution of the [computer](computer.md) failed. In other words: it technically runs! This is where a very useful tool comes into play: the [analyzer](../item/analyzer.md). This tool allows inspecting many of OpenComputers' blocks, as well as some blocks from other mods. To use it on the [computer](computer.md), use the [analyzer](../item/analyzer.md) on the case while sneaking. + +You should now see the error that caused the [computer](computer.md) to crash: +`no bios found; install configured EEPROM` + +The emphasis here is on *configured*. Crafting an [EEPROM](../item/eeprom.md) is pretty simple. To configure it, you will usually use a [computer](computer.md) - but that's a little difficult right now, so we're going to use a recipe to craft a configured "Lua BIOS" [EEPROM](../item/eeprom.md). The standard recipe is an [EEPROM](../item/eeprom.md) plus a [manual](../item/manual.md). Put the configured [EEPROM](../item/eeprom.md) into your [computer](computer.md), aaaand. + +Nope. Still nothing. But we know what to do: player uses [analyzer](../item/analyzer.md), it's super effective! Now we have a different error message: +`no bootable medium found; file not found` + +Well then. That means the BIOS is working. It's just not finding a file system to boot from, such as a [floppy](../item/floppy.md) or [hard drive](../item/hdd1.md). The Lua BIOS in particular expects such a file system to furthermore contain a file named `init.lua` at root level. As with the [EEPROM](../item/eeprom.md), you usually write to file systems using a [computer](computer.md). You probably guessed it: we now need to craft our operating system disk. Take a blank [floppy disk](../item/floppy.md) and a [manual](../item/manual.md), craft them together, and you'll get an [OpenOS](openOS.md) disk. + +Now, if you used a tier 2 [computer case](../block/case2.md) as in the screenshots above, you'll have nowhere to place that floppy. If you have a tier 3 or creative [computer case](../block/case3.md), you can place the floppy right into the [case](../block/case1.md). Otherwise you'll need to place a [disk drive](../block/diskDrive.md) next to your case (or connect it via [cables](../block/cable.md)). Once your disk is in place, you know what to do. Press the power button. + +It lives! Or should, anyway. If it doesn't something went wrong, and you'll want to investigate using the [analyzer](../item/analyzer.md). But assuming it's running now, you're pretty much done. The hardest part is over. All that's left is to make it take input and show some output. + +To allow the [computer](computer.md) to show some output, you'll want to grab a [screen](../block/screen1.md) and a [graphics card](../item/graphicsCard1.md). +![No, it's not a flatscreen.](oredict:oc:screen2) + +Place the [screen](../block/screen1.md) adjacent to your [computer case](../block/case1.md), or, again, connect it using some [cable](../block/cable.md). Then place a [graphics card](../item/graphicsCard1.md) of your choice into the [computer case](../block/case1.md). You should now see a blinking cursor on the [screen](../block/screen1.md). Finally, place a [keyboard](../block/keyboard.md) either on the [screen](../block/screen1.md) itself, or in a way so that it faces the [screen](../block/screen1.md), to enable [keyboard](../block/keyboard.md) input. + +And with that, you're done. The [computer](computer.md) is up and running and ready for action. Try using it now! Type `lua` in the shell and press enter, and you'll be greeted with a bit of information on how to use the Lua interpreter. Here you can test basic Lua commands. For more information this topic see [the Lua page](lua.md). + +![It lives!](opencomputers:doc/img/configuration_done.png) + +Have fun building more complex [computers](computer.md), messing with [servers](../item/server1.md) and assembling [robots](../block/robot.md), [drones](../item/drone.md), [microcontrollers](../block/microcontroller.md) and [tablets](../item/tablet.md) in the [assembler](../block/assembler.md). + +Happy coding! diff --git a/src/main/resources/assets/opencomputers/doc/en_US/index.md b/src/main/resources/assets/opencomputers/doc/en_US/index.md index 56de596b8..4afde6dc7 100644 --- a/src/main/resources/assets/opencomputers/doc/en_US/index.md +++ b/src/main/resources/assets/opencomputers/doc/en_US/index.md @@ -2,33 +2,38 @@ OpenComputers is a mod that adds persistent, modular, and highly configurable [computers](general/computer.md), [servers](item/server1.md), [robots](block/robot.md), and [drones](item/drone.md) to the game. All devices can be programmed using Lua 5.2, allowing for systems with varying complexity depending on the usage. -To learn about how to use the manual, check out [the page about the manual](item/manual.md) (that green text is a link, you can click it). You can find a table of contents at the bottom of this page. +To learn about how to use the manual, check out [the page about the manual](item/manual.md) (that green text is a link, you can click it). -Persistence ensures that a running [computer](general/computer.md) retains its state when the chunk it is in is unloaded. This means that if the player moves away from the [computer](general/computer.md), or logs off, the [computer](general/computer.md) will remember its last known state and continue from that point on when the player goes near the [computer](general/computer.md). Persistence works for all devices except for [tablets](item/tablet.md). +## Table of Contents + +### Devices +- [Computers](general/computer.md) +- [Servers](item/server1.md) +- [Microcontrollers](block/microcontroller.md) +- [Robots](block/robot.md) +- [Drones](item/drone.md) + +### Software and Programming +- [OpenOS](general/openOS.md) +- [Lua](general/lua.md) + +### Blocks and Items +- [Items](item/index.md) +- [Blocks](block/index.md) + +### Guides +- [Getting Started](general/quickstart.md) + +## Overview + +As mentioned above, computers in OpenComputers feature persistence, which means that a running [computer](general/computer.md) retains its state when the chunk it is in is unloaded. This means that if the player moves away from the [computer](general/computer.md), or logs off, the [computer](general/computer.md) will remember its last known state and continue from that point on when the player goes near the [computer](general/computer.md). Persistence works for all devices except for [tablets](item/tablet.md). All devices are modular and can be assembled with a wide range of components, just like [computers](general/computer.md) in real life. Players who enjoy tinkering will be able to optimize devices to their heart's content. If desired, devices can be [dismantled](block/disassembler.md) and rebuilt if the initial configuration wasn't satisfactory. For [computers](general/computer.md) and [servers](item/server1.md), components can be swapped out on-the-fly simply by opening the corresponding GUI. OpenComputers devices are compatible with many different mods for manipulation of blocks and entities (through the [adapter](block/adapter.md), or specific upgrades in a [robot](block/robot.md) or [drone](item/drone.md)). Power can be supplied using a large range of other mods, including, but not limited to, Redstone Flux, IndustrialCraft2 EU, Mekanism Joules, Applied Energistics 2 energy as well as Factorization Charge. -Most devices are able to run a basic operating system called [OpenOS](general/openOS.md) (with the exception of drones and microcontrollers). OpenComputers allows for creation of custom OSes and Architectures, should the player desire it. +Most devices are able to run a basic operating system called [OpenOS](general/openOS.md) (with the exception of [drones](item/drone.md) and [microcontrollers](block/microcontroller.md). OpenComputers allows for creation of custom OSes and Architectures, should the player desire it. Devices have access to various resources such as [disk space](item/hdd1.md) and [memory (RAM)](item/ram1.md). [Microcontrollers](block/microcontroller.md) are cheap [computers](general/computer.md) with less functionality and components, and do not have an operating system, requiring creative use of programming. [Robots](block/robot.md) are mobile [computers](general/computer.md) and are able to interact with blocks and entities (but are unable to interact with external OpenComputers components). [Drones](item/drone.md) are fast, entity-based [robots](block/robot.md) with limited functionality, able to move differently and are able to interact differently with the world. [Servers](item/server1.md) are higher tier [computers](general/computer.md) and are able to hold more components, increasing the amount of resources available to control larger networks and run larger programs. This manual contains detailed information regarding all blocks and items, how to set up different types of systems and devices, as well as an introduction to Lua programming. - -## Table of Contents - -### Devices -- [Computers](general/computer.md) -- [Servers](item/server1.md) -- [Microcontrollers](block/microcontroller.md) -- [Robots](block/robot.md) -- [Drones](item/drone.md) - -### Software and Programming -- [OpenOS](general/openOS.md) -- [Lua](general/lua.md) - -### Blocks and Items -- [Items](item/index.md) -- [Blocks](block/index.md) diff --git a/src/main/resources/assets/opencomputers/doc/en_US/item/abstractBusCard.md b/src/main/resources/assets/opencomputers/doc/en_US/item/abstractBusCard.md index b38b46829..4263adfe2 100644 --- a/src/main/resources/assets/opencomputers/doc/en_US/item/abstractBusCard.md +++ b/src/main/resources/assets/opencomputers/doc/en_US/item/abstractBusCard.md @@ -2,4 +2,4 @@ ![More networking!](oredict:oc:abstractBusCard) -This card allows [computers](../general/computer.md), [servers](server1.md) and robots to interact with StargateTech2's abstract bus. When the card is installed, these blocks will connect to the abstract bus and a component becomes available to the machine that can be used to send messages across the abstract bus. Incoming abstract bus messages are converted to signals that are injected into the machine. +This card allows [computers](../general/computer.md), [servers](server1.md) and [robots](../block/robot.md) to interact with StargateTech2's abstract bus. When the card is installed, these blocks will connect to the abstract bus and a component becomes available to the machine that can be used to send messages across the abstract bus. Incoming abstract bus messages are converted to signals that are injected into the machine. diff --git a/src/main/resources/assets/opencomputers/doc/en_US/item/acid.md b/src/main/resources/assets/opencomputers/doc/en_US/item/acid.md index a0fb272d7..333f93900 100644 --- a/src/main/resources/assets/opencomputers/doc/en_US/item/acid.md +++ b/src/main/resources/assets/opencomputers/doc/en_US/item/acid.md @@ -2,4 +2,4 @@ ![Reflux?](oredict:oc:materialAcid) -You'll probably only see this item when playing with the hardmode recipe set, in which case you'll need it to etch [circuit boards](circuitBoard.md) to craft [printed circuit boards](printedCircuitBoard.md). +Encountered only when using hard-mode recipes, it is used to etch [circuit boards](circuitBoard.md) before crafting [printed circuit boards](printedCircuitBoard.md). diff --git a/src/main/resources/assets/opencomputers/doc/en_US/item/alu.md b/src/main/resources/assets/opencomputers/doc/en_US/item/alu.md index eeadb009d..d429cb404 100644 --- a/src/main/resources/assets/opencomputers/doc/en_US/item/alu.md +++ b/src/main/resources/assets/opencomputers/doc/en_US/item/alu.md @@ -2,4 +2,4 @@ ![I can into logic!](oredict:oc:materialALU) -Used for crafting most things pushing numbers, such as [CPUs](cpu1.md) and [graphics cards](graphicsCard1.md). +Used for crafting components that perform calculations, such as [CPUs](cpu1.md) and [graphics cards](graphicsCard1.md). diff --git a/src/main/resources/assets/opencomputers/doc/en_US/item/analyzer.md b/src/main/resources/assets/opencomputers/doc/en_US/item/analyzer.md index 0cc021cfb..b185704af 100644 --- a/src/main/resources/assets/opencomputers/doc/en_US/item/analyzer.md +++ b/src/main/resources/assets/opencomputers/doc/en_US/item/analyzer.md @@ -2,6 +2,6 @@ ![Must. Resist. Bad. Joke.](oredict:oc:analyzer) -The analyzer is a handy tool for getting some information about OpenComputers-related blocks in the world. Simply (sneak-)activate a block to get some information printed to the chat. This ranges from basic things like the address of components, to power levels in the subnetwork the block is in, and information on the error lead to a computer to crash, for example. +The analyzer is a handy tool for reading information about OpenComputers-related blocks in the world. Simply (sneak-)activate a block to get some information printed to the chat box. This ranges from basic things like the address of components, to power levels in the subnetwork the block is in, and information on the error lead to a [computer](../general/computer.md) to crash, for example. -Another useful functionality is that when using the using the analyzer on a block while holding down **Ctrl** the address of the block component will be copied to the clipboard. This information can then be pasted into a [computer](../general/computer.md) terminal if necessary. \ No newline at end of file +Another useful functionality is that when Ctrl-rightclicking a block or component, the address of that component is copied to the clipboard. This information can then be pasted into a [computer](../general/computer.md) terminal if needed. \ No newline at end of file diff --git a/src/main/resources/assets/opencomputers/doc/en_US/item/angelUpgrade.md b/src/main/resources/assets/opencomputers/doc/en_US/item/angelUpgrade.md index cf836fd07..611146a39 100644 --- a/src/main/resources/assets/opencomputers/doc/en_US/item/angelUpgrade.md +++ b/src/main/resources/assets/opencomputers/doc/en_US/item/angelUpgrade.md @@ -2,4 +2,4 @@ ![Hallelujah.](oredict:oc:angelUpgrade) -This upgrade allows robots to place blocks in thin air, without a reference block, similar to a certain block by a certain mod this upgrade may or may not have been inspired by. +This upgrade allows [robots](../block/robot.md) to place blocks in thin air, without a reference block. \ No newline at end of file diff --git a/src/main/resources/assets/opencomputers/doc/en_US/item/arrowKeys.md b/src/main/resources/assets/opencomputers/doc/en_US/item/arrowKeys.md index 2da1b1575..8357b596c 100644 --- a/src/main/resources/assets/opencomputers/doc/en_US/item/arrowKeys.md +++ b/src/main/resources/assets/opencomputers/doc/en_US/item/arrowKeys.md @@ -2,4 +2,4 @@ ![Just be grateful it's not made from arrows.](oredict:oc:materialArrowKey) -At the risk of repeating myself: it's a button sink. Because the button economy has seen some serious inflation in recent years. +At the risk of repeating myself: it's a button sink. Because the button economy has seen some serious inflation in recent years. It is used as a component for building [keyboards](../block/keyboard.md). diff --git a/src/main/resources/assets/opencomputers/doc/en_US/item/batteryUpgrade1.md b/src/main/resources/assets/opencomputers/doc/en_US/item/batteryUpgrade1.md index fc1b754d4..d1c06b34c 100644 --- a/src/main/resources/assets/opencomputers/doc/en_US/item/batteryUpgrade1.md +++ b/src/main/resources/assets/opencomputers/doc/en_US/item/batteryUpgrade1.md @@ -2,4 +2,4 @@ ![Made of Metal.](oredict:oc:batteryUpgrade1) -This upgrade increases the internal energy buffer of devices, such as [robots](../block/robot.md) and [tablets](tablet.md), allowing them to operate longer without having to return to a charger. +This upgrade increases the internal energy buffer of devices, such as [robots](../block/robot.md) and [tablets](tablet.md), allowing them to operate longer without having to return to a [charger](../block/charger.md). Higher tier battery upgrades can store more energy. diff --git a/src/main/resources/assets/opencomputers/doc/en_US/item/buttonGroup.md b/src/main/resources/assets/opencomputers/doc/en_US/item/buttonGroup.md index 5d1976afc..373d7cdc3 100644 --- a/src/main/resources/assets/opencomputers/doc/en_US/item/buttonGroup.md +++ b/src/main/resources/assets/opencomputers/doc/en_US/item/buttonGroup.md @@ -2,4 +2,4 @@ ![Needs more buttons.](oredict:oc:materialButtonGroup) -Because you *always* have too many buttons lying around somewhere. Don't lie. We all shift-click that button recipe time and again. +Because you *always* have too many buttons lying around somewhere. Don't lie. We all shift-click that button recipe time and again. Button groups are used to build [keyboards](../block/keyboard.md). diff --git a/src/main/resources/assets/opencomputers/doc/en_US/item/card.md b/src/main/resources/assets/opencomputers/doc/en_US/item/card.md index 2dc2388e4..55c5021b7 100644 --- a/src/main/resources/assets/opencomputers/doc/en_US/item/card.md +++ b/src/main/resources/assets/opencomputers/doc/en_US/item/card.md @@ -2,4 +2,4 @@ ![Can't be read.](oredict:oc:materialCard) -Common crafting material for most, if not all card components in OpenComputers. +Common crafting material for card components in OpenComputers (such as [graphics cards](graphicsCard1.md), [network cards](lanCard.md), etc). diff --git a/src/main/resources/assets/opencomputers/doc/en_US/item/cardContainer1.md b/src/main/resources/assets/opencomputers/doc/en_US/item/cardContainer1.md index 39a9985b7..64698c7df 100644 --- a/src/main/resources/assets/opencomputers/doc/en_US/item/cardContainer1.md +++ b/src/main/resources/assets/opencomputers/doc/en_US/item/cardContainer1.md @@ -2,4 +2,4 @@ ![Can haz cards!](oredict:oc:cardContainer1) -The card container is a container type upgrade for [robots](../block/robot.md) that provides a slot in the finished robots into which cards can be placed. The tier of card that the slot can hold is equal to the tier of the container. Unlike normal upgrades, the complexity of containers is twice their tier. See [here](../block/robot.md) for details on robot complexity. +The card container is a container upgrade for [robots](../block/robot.md) allowing cards to be inserted/removed to/from [robots](../block/robot.md) on-the-fly. The maximum tier of card that the slot can hold is equal to the tier of the container. Unlike normal upgrades, the complexity of containers is twice their tier. See [here](../block/robot.md) for details on robot complexity. diff --git a/src/main/resources/assets/opencomputers/doc/en_US/item/chamelium.md b/src/main/resources/assets/opencomputers/doc/en_US/item/chamelium.md index 1395ccea1..18fabca86 100644 --- a/src/main/resources/assets/opencomputers/doc/en_US/item/chamelium.md +++ b/src/main/resources/assets/opencomputers/doc/en_US/item/chamelium.md @@ -2,8 +2,8 @@ ![From Chameleon, in case you were wondering.](oredict:oc:chamelium) -Chamelium is a shape-shifting material that is used when creating [3D prints](../block/print.md) in a [3D printer](../block/printer.md). On its own it is featureless and therefore very useful for creating simple, plain and monochrome areas. +Chamelium is a shape-shifting material that is used when creating [3D prints](../block/print.md) in a [3D printer](../block/printer.md). On its own, it is featureless and therefore very useful for creating simple, plain and monochrome areas. -You can also slap some of it together to create a [block of Chamelium](../block/chameliumBlock.md). +You can also combine them to create a [block of Chamelium](../block/chameliumBlock.md). -As the tooltip says, eating it can have severe side-effects, so consume with care. Or better yet, don't. +As the tooltip says, eating it can cause adverse side-effects, so consume with care. Or better yet, don't. diff --git a/src/main/resources/assets/opencomputers/doc/en_US/item/chip1.md b/src/main/resources/assets/opencomputers/doc/en_US/item/chip1.md index 4f35fc69a..945b9a8d8 100644 --- a/src/main/resources/assets/opencomputers/doc/en_US/item/chip1.md +++ b/src/main/resources/assets/opencomputers/doc/en_US/item/chip1.md @@ -2,4 +2,4 @@ ![Not the edible ones.](oredict:oc:circuitChip1) -Microchips are the bread and butter of electronic component crafting. They come in different tiers, for the different tier of devices they're used to craft with. +Microchips are the bread and butter of electronic component crafting. They come in different tiers, for crafting different tiers of components. diff --git a/src/main/resources/assets/opencomputers/doc/en_US/item/chunkloaderUpgrade.md b/src/main/resources/assets/opencomputers/doc/en_US/item/chunkloaderUpgrade.md index 10423ca54..7f7e8210b 100644 --- a/src/main/resources/assets/opencomputers/doc/en_US/item/chunkloaderUpgrade.md +++ b/src/main/resources/assets/opencomputers/doc/en_US/item/chunkloaderUpgrade.md @@ -2,6 +2,6 @@ ![Not going anywhere.](oredict:oc:chunkloaderUpgrade) -The chunk loader upgrade can be installed in devices to allow them to keep the chunk they are in - as well as the surrounding chunks - loaded. This consumes quite a bit of energy, however. The chunk loader can be turned on and off using the component exposed to the device. +The chunk loader upgrade can be installed in devices (such as [robots](../block/robot.md) and [microcontrollers](../block/microcontroller.md)) to allow them to keep the chunk they are in - as well as the surrounding chunks - loaded. This consumes energy, however. The chunk loader can be turned on and off using the component API exposed to the device. The upgrade is automatically enabled when the device powers up, and automatically disabled when the device powers down. diff --git a/src/main/resources/assets/opencomputers/doc/en_US/item/circuitBoard.md b/src/main/resources/assets/opencomputers/doc/en_US/item/circuitBoard.md index 296274c2a..28ad8ecf7 100644 --- a/src/main/resources/assets/opencomputers/doc/en_US/item/circuitBoard.md +++ b/src/main/resources/assets/opencomputers/doc/en_US/item/circuitBoard.md @@ -2,4 +2,4 @@ ![Needs more gold.](oredict:oc:materialCircuitBoard) -Intermediary crafting item made from [raw circuit boards](rawCircuitBoard.md) and used to make [printed circuit boards](printedCircuitBoard.md). +Intermediate crafting item made from [raw circuit boards](rawCircuitBoard.md) and used to make [printed circuit boards](printedCircuitBoard.md). diff --git a/src/main/resources/assets/opencomputers/doc/en_US/item/componentBus1.md b/src/main/resources/assets/opencomputers/doc/en_US/item/componentBus1.md index 116c97a7c..b6d2990e3 100644 --- a/src/main/resources/assets/opencomputers/doc/en_US/item/componentBus1.md +++ b/src/main/resources/assets/opencomputers/doc/en_US/item/componentBus1.md @@ -2,7 +2,7 @@ ![I need mooooore.](oredict:oc:componentBus1) -A component bus is a [server](server1.md)-specific upgrade that allows the server to communicate with more components at the same time, without shutting down. Like with [CPUs](cpu1.md), higher tier buses provide higher component limits. Higher tier [servers](server1.md) are also capable of taking more component buses, allowing for communication with many more components. +A component bus is a [server](server1.md)-specific upgrade that allows the [server](server1.md) to communicate with more components at the same time, without shutting down. Like with [CPUs](cpu1.md), higher tier buses provide higher component limits. Higher tier [servers](server1.md) are also capable of taking more component buses, allowing for communication with many more components. The number of components each component bus allows access to is as follows: - Tier 1: 8 components. diff --git a/src/main/resources/assets/opencomputers/doc/en_US/item/controlUnit.md b/src/main/resources/assets/opencomputers/doc/en_US/item/controlUnit.md index 63994adfb..8935aeb96 100644 --- a/src/main/resources/assets/opencomputers/doc/en_US/item/controlUnit.md +++ b/src/main/resources/assets/opencomputers/doc/en_US/item/controlUnit.md @@ -2,4 +2,4 @@ ![With built-in cruise control.](oredict:oc:materialCU) -Higher tier crafting material used in more advanced circuitry, such as [CPUs](cpu1.md). +Higher tier crafting item used in more advanced circuitry, such as [CPUs](cpu1.md). diff --git a/src/main/resources/assets/opencomputers/doc/en_US/item/cpu1.md b/src/main/resources/assets/opencomputers/doc/en_US/item/cpu1.md index fcea3b83b..7ff267394 100644 --- a/src/main/resources/assets/opencomputers/doc/en_US/item/cpu1.md +++ b/src/main/resources/assets/opencomputers/doc/en_US/item/cpu1.md @@ -2,13 +2,13 @@ ![Braaainz.](oredict:oc:cpu1) -The central processing unit is a core part for each [computer](../general/computer.md) or [server](server1.md). It defines the architecture of the computer, and the number of components that can be connected to the computer before it stops working. Higher tier CPUs also provide a higher per-tick direct call limit to the computer - in simpler terms: better CPUs run faster. +The central processing unit is a core part for each [computer](../general/computer.md) or [server](server1.md). It defines the architecture of the [computer](../general/computer.md), and the number of components that can be connected to the [computer](../general/computer.md) before it stops working. Higher tier CPUs also provide a higher per-tick direct call limit to the [computer](../general/computer.md) - in simpler terms: better CPUs run faster. The number of components that the CPU allows access to is as follows: - Tier 1: 8 components. - Tier 2: 12 components. - Tier 3: 16 components. -In servers, the number of supported components can be further increased by installing [component buses](componentBus1.md). +In [servers](server1.md), the number of supported components can be further increased by installing [component buses](componentBus1.md). -If more than the supported number of components are connected to a computer, it will no longer be able to start, and if it was running, it will crash. +If more than the supported number of components are connected to a [computer](../general/computer.md), it will no longer be able to start, and if it was running, it will crash. diff --git a/src/main/resources/assets/opencomputers/doc/en_US/item/craftingUpgrade.md b/src/main/resources/assets/opencomputers/doc/en_US/item/craftingUpgrade.md index 5ff8f5a7c..43320ee5e 100644 --- a/src/main/resources/assets/opencomputers/doc/en_US/item/craftingUpgrade.md +++ b/src/main/resources/assets/opencomputers/doc/en_US/item/craftingUpgrade.md @@ -2,4 +2,4 @@ ![Crafty.](oredict:oc:craftingUpgrade) -The crafting upgrade allows [robots](../block/robot.md) to craft shaped and shapeless recipes using items in their [inventory](../item/inventoryUpgrade.md). When crafting, the top-left three by three grid in the [robot](../block/robot.md)'s [inventory](../item/inventoryUpgrade.md) is used as the crafting grid. Items have to be located as they would be in a normal crafting table. Results will be placed back into the [robot](../block/robot.md)'s [inventory](../item/inventoryUpgrade.md). As with picking up items, the result will be placed into the selected slot; failing to do so will place the item in the next available empty slot. If no inventory space remains, the result will be dropped into the world. +The crafting upgrade allows [robots](../block/robot.md) to craft shaped and shapeless recipes using items in their [inventory](../item/inventoryUpgrade.md). When crafting, the top-left 3x3 grid in the [robot](../block/robot.md)'s [inventory](../item/inventoryUpgrade.md) is used as the crafting grid. Items have to be arranged according to the recipe. Results will be placed back into the [robot](../block/robot.md)'s [inventory](../item/inventoryUpgrade.md). As with picking up items, the result will be placed into the selected slot; failing to do so will place the item in the next available empty slot. If no inventory space remains, the result will be dropped into the world. diff --git a/src/main/resources/assets/opencomputers/doc/en_US/item/cuttingWire.md b/src/main/resources/assets/opencomputers/doc/en_US/item/cuttingWire.md index 045ec42f4..8f532bc68 100644 --- a/src/main/resources/assets/opencomputers/doc/en_US/item/cuttingWire.md +++ b/src/main/resources/assets/opencomputers/doc/en_US/item/cuttingWire.md @@ -2,4 +2,4 @@ ![Not a garrote. Honest.](oredict:oc:materialCuttingWire) -You'll usually only encounter this when playing with the hard mode recipe set. In that case, this is used for crafting [raw circuit boards](rawCircuitBoard.md). Very inefficiently. +An item encountered when using hard-mode recipes, it is used for crafting [raw circuit boards](rawCircuitBoard.md). Very inefficiently. diff --git a/src/main/resources/assets/opencomputers/doc/en_US/item/databaseUpgrade1.md b/src/main/resources/assets/opencomputers/doc/en_US/item/databaseUpgrade1.md index 3f212e4f9..ff4b4cfd5 100644 --- a/src/main/resources/assets/opencomputers/doc/en_US/item/databaseUpgrade1.md +++ b/src/main/resources/assets/opencomputers/doc/en_US/item/databaseUpgrade1.md @@ -4,6 +4,6 @@ The database upgrade can be configured to store a list of item stack representations, which can then be used by other components. This is particularly useful for items that are differentiated purely based on their NBT data, which is not part of the item stack descriptor returned by callbacks. -To configure a database, open it by right-clicking it while holding it in your hand, then placing the stacks you wish to configure it with into the top inventory. This will store a "ghost stack", i.e. no "real" items are stored in the database. +To configure a database, open it by right-clicking with the database in hand. Place the stacks you wish to configure it with into the top inventory. This will store a "ghost stack", i.e. no "real" items are stored in the database. -Alternatively the database can be configured automatically using [inventory controllers](inventoryControllerUpgrade.md) and [geolyzers](../block/geolyzer.md). +Alternatively the database can be configured automatically using the component API provided by [inventory controllers](inventoryControllerUpgrade.md) and [geolyzers](../block/geolyzer.md). diff --git a/src/main/resources/assets/opencomputers/doc/en_US/item/debugCard.md b/src/main/resources/assets/opencomputers/doc/en_US/item/debugCard.md index 2c968c953..624803cac 100644 --- a/src/main/resources/assets/opencomputers/doc/en_US/item/debugCard.md +++ b/src/main/resources/assets/opencomputers/doc/en_US/item/debugCard.md @@ -4,4 +4,4 @@ The debug card is a creative-only item that was originally only intended to make debugging things easier, by automating some processes. It has since gotten a bunch more functionality, making it quite useful for custom map-making. -Note that you can use sneak-activate while holding the card to bind it to you / unbind it, meaning `runCommand` will be performed using your permission levels instead of the default OpenComputers ones. +Note that you can use sneak-activate while holding the card to bind it to you or unbind it, meaning `runCommand` will be performed using your permission levels instead of the default OpenComputers ones. diff --git a/src/main/resources/assets/opencomputers/doc/en_US/item/drone.md b/src/main/resources/assets/opencomputers/doc/en_US/item/drone.md index c85ede5b4..e639c1982 100644 --- a/src/main/resources/assets/opencomputers/doc/en_US/item/drone.md +++ b/src/main/resources/assets/opencomputers/doc/en_US/item/drone.md @@ -2,4 +2,4 @@ ![Big brother is trying to watch you.](item:OpenComputers:item@84) -Drones are built using a [drone case](droneCase1.md) in the [assembler](../block/assembler.md). They are entity-based [robots](../block/robot.md), a little cheaper with limited functionality. They are also capable of moving differently and much quicker than robots, and are usually controlled using a client program on a computer. The drone will need a configured [EEPROM](eeprom.md) to listen for commands to be executed or act on its own. +Drones are built using a [drone case](droneCase1.md) in the [assembler](../block/assembler.md). They are entity-based [robots](../block/robot.md), a little cheaper with limited functionality. They are also capable of moving differently and much quicker than [robots](../block/robot.md), and are usually controlled using a client program on a [computer](../general/computer.md). The drone will need a configured [EEPROM](eeprom.md) to listen for commands to be executed or act on its own. diff --git a/src/main/resources/assets/opencomputers/doc/en_US/item/droneCase1.md b/src/main/resources/assets/opencomputers/doc/en_US/item/droneCase1.md index 53245de54..3cb50e9f7 100644 --- a/src/main/resources/assets/opencomputers/doc/en_US/item/droneCase1.md +++ b/src/main/resources/assets/opencomputers/doc/en_US/item/droneCase1.md @@ -2,11 +2,11 @@ ![Droning on.](oredict:oc:droneCase1) -The drone case is used to build [drones](drone.md) in the [assembler](../block/assembler.md). Drones are light-weight, fast and very mobile machines with limited functionality (fewer upgrade and component slots available). Unlike [robots](../block/robot.md) they cannot use tools, and can interact with the world only in a relatively limited manner. +The drone case is used to build [drones](drone.md) in the [assembler](../block/assembler.md). [Drones](drone.md) are light-weight, fast and very mobile machines with limited functionality (fewer upgrade and component slots available). Unlike [robots](../block/robot.md) they cannot use tools, and can interact with the world only in a relatively limited manner. -They make up for their limitations with speed and lower running energy costs. They are well suited for transport of small amounts of items, and ideal for reconnaissance. Pairing a drone with a robot can be quite powerful, with the robot doing the "hard work", and the drone providing information about the environment and transporting items to and from a central hub, for example. +They make up for their limitations with speed and lower running energy costs. They are well suited for transport of small amounts of items, and ideal for reconnaissance. Pairing a [drone](drone.md) with a [robot](../block/robot.md) can be quite powerful, with the [robot](../block/robot.md) doing the "hard work", and the [drone](drone.md) providing information about the environment and transporting items to and from a central hub, for example. -Like [microcontrollers](../block/microcontroller.md), Drones can only be programmed using their [EEPROM](eeprom.md). Accordingly, the [EEPROM](eeprom.md) can be changed by crafting the drone with another [EEPROM](eeprom.md). +Like [microcontrollers](../block/microcontroller.md), [drones](drone.md) can only be programmed using their [EEPROM](eeprom.md). Accordingly, the [EEPROM](eeprom.md) can be changed by crafting the [drone](drone.md) with another [EEPROM](eeprom.md); the existing [EEPROM](eeprom.md) is return to the player's inventory. The tier 1 drone case is capable of taking the following components: - 1x tier 1 [CPU](cpu1.md) diff --git a/src/main/resources/assets/opencomputers/doc/en_US/item/floppy.md b/src/main/resources/assets/opencomputers/doc/en_US/item/floppy.md index 3ef79a3b0..ae6071955 100644 --- a/src/main/resources/assets/opencomputers/doc/en_US/item/floppy.md +++ b/src/main/resources/assets/opencomputers/doc/en_US/item/floppy.md @@ -2,4 +2,4 @@ ![Many inches.](oredict:oc:floppy) -The floppy disk is the cheapest and smallest type of storage medium in OpenComputers. It is a handy early game way of storing data and transferring it between [computers](../general/computer.md) and [robots](../block/robot.md). You may also find floppy disks with useful programs on them in dungeon chests (OpenPrograms Package Manager is a good example, allowing easy install of programs from a central GitHub repository). +The floppy disk is the cheapest and smallest type of storage medium in OpenComputers. It is a handy early-game way of storing data and transferring it between [computers](../general/computer.md) and [robots](../block/robot.md). You may also find floppy disks with useful programs on them in dungeon chests (OpenPrograms Package Manager is a good example, allowing easy install of programs from a central GitHub repository). diff --git a/src/main/resources/assets/opencomputers/doc/en_US/item/generatorUpgrade.md b/src/main/resources/assets/opencomputers/doc/en_US/item/generatorUpgrade.md index 2e7a2a756..27c5dca64 100644 --- a/src/main/resources/assets/opencomputers/doc/en_US/item/generatorUpgrade.md +++ b/src/main/resources/assets/opencomputers/doc/en_US/item/generatorUpgrade.md @@ -2,6 +2,6 @@ ![Generator X.](oredict:oc:generatorUpgrade) -The generator upgrade allows devices to refuel on the go. Currently it only supports solid fuels, such as coal. It has an internal inventory that can store one item stack of fuel. Surplus fuel can be removed from the generator using the according API method. When removing a generator upgrade from a robot, its contents will be dropped into the world. +The generator upgrade allows devices to re-fuel on the go. Currently it only supports solid fuels, such as coal. It has an internal inventory that can store one item stack of fuel. Surplus fuel can be removed from the generator using the appropriate component API method. When removing a generator upgrade from a [robot](../block/robot.md), its contents will be dropped into the world. -The efficiency of generators is lower than that of usual generators of other mods, meaning it is usually more fuel efficient to power devices using a [charger](../block/charger.md). +The efficiency of generators is lower than that of usual generators from other mods, meaning it is usually more fuel efficient to power devices using a [charger](../block/charger.md). diff --git a/src/main/resources/assets/opencomputers/doc/en_US/item/graphicsCard1.md b/src/main/resources/assets/opencomputers/doc/en_US/item/graphicsCard1.md index 6f33dd64d..e72fc5c6c 100644 --- a/src/main/resources/assets/opencomputers/doc/en_US/item/graphicsCard1.md +++ b/src/main/resources/assets/opencomputers/doc/en_US/item/graphicsCard1.md @@ -4,4 +4,4 @@ The graphics card is an essential part for most [computers](../general/computer.md) and allows the [computer](../general/computer.md) to display text on a connected [screen](../block/screen1.md). Graphics cards come in several tiers, and like [screens](../block/screen1.md), support different resolutions and color depths. -Another noteworthy difference for the different graphics card tiers is the number of operations a graphics card can perform per tick. The values listed in the graphics cards' tooltip is representative for a [computer](../general/computer.md) with a tier two [CPU](cpu1.md). Tier one CPUs perform slightly slower, tier three CPUs slightly faster. The numbers listed are for the different operations provided by a GPU: `copy`, `fill`, `set`, `setBackground` and `setForeground`, respectively. +Another noteworthy difference for the different graphics card tiers is the number of operations a graphics card can perform per tick. The values listed in the graphics cards' tooltips are representative for a [computer](../general/computer.md) with a tier two [CPU](cpu1.md). Tier one CPUs perform slightly slower, tier three CPUs slightly faster. The numbers listed are for the different operations provided by a GPU: `copy`, `fill`, `set`, `setBackground` and `setForeground`, respectively. diff --git a/src/main/resources/assets/opencomputers/doc/en_US/item/hdd1.md b/src/main/resources/assets/opencomputers/doc/en_US/item/hdd1.md index c00bce3e7..c873304a4 100644 --- a/src/main/resources/assets/opencomputers/doc/en_US/item/hdd1.md +++ b/src/main/resources/assets/opencomputers/doc/en_US/item/hdd1.md @@ -2,4 +2,4 @@ ![Spaaaace.](oredict:oc:hdd1) -The hard disk drives are the higher tier storage medium in OpenComputers. There are no speed differences in the storage media provided by OpenComputers, they only differ in the amount of disk space they provide. There are also some devices that can only use disk drives, no [floppies](floppy.md) (although servers could use an external [disk drive](../block/diskDrive.md), for example). Hard drives can be placed inside a [raid](../block/raid.md), allowing multiple drives to share the same file system. +The hard disk drives are a higher tier storage medium in OpenComputers. All storage media perform at the same speed; higher tier storage provides more space. There are also some devices that can only use disk drives (although servers could use an external [disk drive](../block/diskDrive.md), for example). Hard drives can be placed inside a [raid](../block/raid.md), allowing multiple drives to share the same file system. Note that placing a hard drive in a [raid](../block/raid.md) wipes the drive of its contents. diff --git a/src/main/resources/assets/opencomputers/doc/en_US/item/index.md b/src/main/resources/assets/opencomputers/doc/en_US/item/index.md index 514f30a89..2c99c303e 100644 --- a/src/main/resources/assets/opencomputers/doc/en_US/item/index.md +++ b/src/main/resources/assets/opencomputers/doc/en_US/item/index.md @@ -9,6 +9,7 @@ Keep in mind that some of these may not be available, depending on the recipe se * [Manual](manual.md) * [Remote Terminal](terminal.md) * [Texture Picker](texturePicker.md) +* [Scrench](wrench.md) ## Devices * [Drone](drone.md) @@ -18,7 +19,7 @@ Keep in mind that some of these may not be available, depending on the recipe se ## Components ### Cards -* [AbstractBusCard](abstractBusCard.md) +* [AbstractBus Card](abstractBusCard.md) * [Debug Card](debugCard.md) (aka AMI) * [Graphics Card](graphicsCard1.md) * [Internet Card](internetCard.md) @@ -60,8 +61,8 @@ Keep in mind that some of these may not be available, depending on the recipe se ## Crafting * [Acid](acid.md) * [ALU](alu.md) -* [ArrowKeys](arrowKeys.md) -* [ButtonGroup](buttonGroup.md) +* [Arrow Keys](arrowKeys.md) +* [Button Group](buttonGroup.md) * [Card](card.md) * [Circuit Board](circuitBoard.md) * [Control Unit](controlUnit.md) @@ -74,9 +75,9 @@ Keep in mind that some of these may not be available, depending on the recipe se * [Raw Circuit Board](rawCircuitBoard.md) * [Transistor](transistor.md) -# Assembling / Printing +## Assembling / Printing * [Chamelium](chamelium.md) -* [Drone Case](droneCase1.md) * [Ink Cartridge](inkCartridge.md) +* [Drone Case](droneCase1.md) * [Microcontroller Case](microcontrollerCase1.md) * [Tablet Case](tabletCase1.md) diff --git a/src/main/resources/assets/opencomputers/doc/en_US/item/inkCartridge.md b/src/main/resources/assets/opencomputers/doc/en_US/item/inkCartridge.md index 7f7c5013b..14ae30e03 100644 --- a/src/main/resources/assets/opencomputers/doc/en_US/item/inkCartridge.md +++ b/src/main/resources/assets/opencomputers/doc/en_US/item/inkCartridge.md @@ -2,4 +2,4 @@ ![The colors of the rainbow.](oredict:oc:inkCartridge) -Ink cartridges come in handy when refilling the color buffer of [3D printers](../block/printer.md). While it is also possible to refill them using dyes directly, this is messy and very inefficient, so it is strongly recommended to invest into a real OC Ink Cartridge (TM), today! +Ink cartridges come in handy when refilling the color buffer of [3D printers](../block/printer.md). While it is also possible to refill them using dyes directly, this is messy and very inefficient. It is strongly recommended to invest into a real OC Ink Cartridge (TM), today! (Disclaimer: they may or may cost more than the printer itself). diff --git a/src/main/resources/assets/opencomputers/doc/en_US/item/internetCard.md b/src/main/resources/assets/opencomputers/doc/en_US/item/internetCard.md index 02cffa752..fa80e6d7f 100644 --- a/src/main/resources/assets/opencomputers/doc/en_US/item/internetCard.md +++ b/src/main/resources/assets/opencomputers/doc/en_US/item/internetCard.md @@ -4,4 +4,4 @@ The internet card grants [computers](../general/computer.md) access to the internet. It provides ways to perform simple HTTP requests, as well as to open plain TCP client sockets that can be read and written to. -Installing an internet card in a [computers](../general/computer.md) will also attach a custom file system that contains a few internet related applications, such as one for downloading and uploading snippets from and to pastebin as well as a wannabe `wget` clone that allows downloading data from arbitrary HTTP URLs. +Installing an internet card in a [computers](../general/computer.md) will also attach a custom file system that contains a few internet related applications, such as one for downloading and uploading snippets from/to pastebin as well as a `wget` clone that allows downloading data from arbitrary HTTP URLs. diff --git a/src/main/resources/assets/opencomputers/doc/en_US/item/inventoryControllerUpgrade.md b/src/main/resources/assets/opencomputers/doc/en_US/item/inventoryControllerUpgrade.md index a85f41e5d..c5f8edbae 100644 --- a/src/main/resources/assets/opencomputers/doc/en_US/item/inventoryControllerUpgrade.md +++ b/src/main/resources/assets/opencomputers/doc/en_US/item/inventoryControllerUpgrade.md @@ -2,6 +2,6 @@ ![I'm in control.](oredict:oc:inventoryControllerUpgrade) -The inventory controller upgrade provides extended inventory interaction to [robots](../block/robot.md) and [drones](drone.md). It allows the device to explicitly target slots in external inventories when dropping or sucking items. It also allows devices to read detailed information about item stacks. Lastly it provides robots with a means to change their equipped tool without external help. +The inventory controller upgrade provides extended inventory interaction to [robots](../block/robot.md) and [drones](drone.md). It allows the device to explicitly target slots in external inventories when dropping or sucking items. It also allows devices to read detailed information about item stacks. Lastly it provides [robots](../block/robot.md) with a means to change their equipped tool without external help. -This upgrade can also be placed in [adapters](../block/adapter.md), where it provides similar inspection methods for inventories adjacent to the adapter as it does to the robot. It does not allow the adapter to move items into or out of inventories, however. This feature is only available in [robots](../block/robot.md) and [drones](drone.md). +This upgrade can also be placed in [adapters](../block/adapter.md), where it provides similar inspection methods for inventories adjacent to the [adapter](../block/adapter.md) as it does to the [robot](../block/robot.md). It does not allow the [adapter](../block/adapter.md) to move items into or out of inventories, however. This feature is only available to [robots](../block/robot.md) and [drones](drone.md). diff --git a/src/main/resources/assets/opencomputers/doc/en_US/item/inventoryUpgrade.md b/src/main/resources/assets/opencomputers/doc/en_US/item/inventoryUpgrade.md index 45a886e67..a451f184c 100644 --- a/src/main/resources/assets/opencomputers/doc/en_US/item/inventoryUpgrade.md +++ b/src/main/resources/assets/opencomputers/doc/en_US/item/inventoryUpgrade.md @@ -2,6 +2,6 @@ ![Where does it keep all this stuff...](oredict:oc:inventoryUpgrade) -The inventory upgrade provides inventory slots to [robots](../block/robot.md) and [drones](drone.md). For each inventory upgrade a robot will gain an addition 16 inventory slots, up to a maximum of 64 slots in total; a drone will gain 4 slots per upgrade, up to a maximum of 8 slots in total. +The inventory upgrade provides inventory slots to [robots](../block/robot.md) and [drones](drone.md). For each inventory upgrade a [robot](../block/robot.md) will gain an addition 16 inventory slots, up to a maximum of 64 slots in total; a [drone](drone.md) will gain 4 slots per upgrade, up to a total of 8 slots. If no inventory upgrade is installed in a device it will not be able to store or pick up items. diff --git a/src/main/resources/assets/opencomputers/doc/en_US/item/lanCard.md b/src/main/resources/assets/opencomputers/doc/en_US/item/lanCard.md index ba368cdf7..3fbd8a6c4 100644 --- a/src/main/resources/assets/opencomputers/doc/en_US/item/lanCard.md +++ b/src/main/resources/assets/opencomputers/doc/en_US/item/lanCard.md @@ -2,4 +2,4 @@ ![Enter the network.](oredict:oc:lanCard) -The network card allows computers to send and receive network messages. Such messages (or packets) can be either sent as a broadcast, in which case they will be sent to all nodes in the same subnetwork, or sent to specific target, in which case they will only be received by the node with the specified target address. [Switches](../block/switch.md) and [access points](../block/accessPoint.md) can be used to bridge multiple subnetworks by relaying messages between the subnetworks they are connected to. It is also possible to send a targeted message if the receiver is in another subnetwork, if the networks are connected via one or more [switches](../block/switch.md). +The network card allows [computers](../general/computer.md) to send and receive network messages. Messages (or packets) can be broadcasted to all receiving nodes in a subnetwork, or sent to a specific node with a specified address. [Switches](../block/switch.md) and [access points](../block/accessPoint.md) can be used to bridge multiple subnetworks by relaying messages between the subnetworks they are connected to. It is also possible to send a targeted message if the receiver is in another subnetwork, if the networks are connected via one or more [switches](../block/switch.md). diff --git a/src/main/resources/assets/opencomputers/doc/en_US/item/linkedCard.md b/src/main/resources/assets/opencomputers/doc/en_US/item/linkedCard.md index 7244a3d20..ec3dc820c 100644 --- a/src/main/resources/assets/opencomputers/doc/en_US/item/linkedCard.md +++ b/src/main/resources/assets/opencomputers/doc/en_US/item/linkedCard.md @@ -2,4 +2,4 @@ ![I feel we some kind of connection.](oredict:oc:linkedCard) -The linked card is a specialized but advanced version of a [network card](lanCard.md). It can only operate in pairs, providing a point-to-point communication between the paired cards. In return, the distance the cards can communicate over is unlimited. They can even communicate across dimensions. +The linked card is a specialized but advanced version of a [network card](lanCard.md). It can only operate in pairs, providing a point-to-point communication between the paired cards. Linked cards can communicate over large (unlimited) distances and across dimensions. \ No newline at end of file diff --git a/src/main/resources/assets/opencomputers/doc/en_US/item/manual.md b/src/main/resources/assets/opencomputers/doc/en_US/item/manual.md index def7a4779..f7df60427 100644 --- a/src/main/resources/assets/opencomputers/doc/en_US/item/manual.md +++ b/src/main/resources/assets/opencomputers/doc/en_US/item/manual.md @@ -8,6 +8,8 @@ The thing you're reading right now! The manual contains a wealth of information Navigating the manual is similar to browsing a wiki: click on links (1) to follow them to the page they reference. Right-click or press the jump key to go back one page. Press escape or the inventory key to close the manual. To the left you will find a few tabs (2) that provide a way to quickly jump to select pages, such as the block and item index. To the right you will find the scroll bar (3). You can either drag it manually, or use the mouse wheel to scroll in a page. -When opening the manual again at a later point, you will return to the page you were on when you closed it. You can start over on the main index page by using it while sneaking. It is also possible to directly jump to a page concerning a block in the world by using the block while sneaking with the manual in hand. +The manual will remember the page where you last left off, when re-opening it. You can start over on the main index page by using it while sneaking. It is also possible to directly jump to a page concerning a block in the world by shift-right clicking the block with the manual in hand. -If your questions are not answered by the manual, other places with information are the [wiki](http://ocdoc.cil.li), OpenComputers' [IRC channel](http://webchat.esper.net/?channels=#oc) and the [forums](http://oc.cil.li/). +If your questions are not answered by the manual, other places with information are [the wiki](http://ocdoc.cil.li), OpenComputers' [IRC channel](http://webchat.esper.net/?channels=#oc) and [the forums](http://oc.cil.li/). + +If you spot any mistakes in the manual, factual, grammatical or otherwise; or bugs in the mod, for that matter, please let us know [via the issue tracker](https://github.com/MightyPirates/OpenComputers/issues). If you'd like to contribute to the manual by adding content, get in touch via IRC or by creating a ticket on the issue tracker. diff --git a/src/main/resources/assets/opencomputers/doc/en_US/item/microcontrollerCase1.md b/src/main/resources/assets/opencomputers/doc/en_US/item/microcontrollerCase1.md index cc1359d8d..92045902b 100644 --- a/src/main/resources/assets/opencomputers/doc/en_US/item/microcontrollerCase1.md +++ b/src/main/resources/assets/opencomputers/doc/en_US/item/microcontrollerCase1.md @@ -2,9 +2,9 @@ ![It's so cute.](oredict:oc:microcontrollerCase1) -The microcontroller Case is the base part when building [microcontrollers](../block/microcontroller.md) in the [assembler](../block/assembler.md). Microcontrollers are very primitive computers. They may only contain a very limited number of components, and are intended to be used in very specific use-cases, such as transforming or reacting to redstone signals, or processing network messages. +The Microcontroller case is the base part when building [microcontrollers](../block/microcontroller.md) in the [assembler](../block/assembler.md). [Microcontrollers](../block/microcontroller.md) are very primitive [computers](../general/computer.md). They may only contain a very limited number of components, and are intended to be used in very specific use-cases, such as transforming or reacting to redstone signals, or processing network messages. -They do not have an actual file system. All programming must be done using the [EEPROM](eeprom.md) chip built into them. This chip can be swapped for another one by crafting a microcontroller with the chip to insert. The old [EEPROM](eeprom.md) will be returned to your inventory. +They do not have an actual file system. All programming must be done using the [EEPROM](eeprom.md) chip built into them. This chip can be swapped for another one by crafting a [microcontrollers](../block/microcontroller.md) with the chip to insert. The old [EEPROM](eeprom.md) will be returned to your inventory. While they also require power to run, they consume very little energy. diff --git a/src/main/resources/assets/opencomputers/doc/en_US/item/navigationUpgrade.md b/src/main/resources/assets/opencomputers/doc/en_US/item/navigationUpgrade.md index 26e11f42b..ff513fdb6 100644 --- a/src/main/resources/assets/opencomputers/doc/en_US/item/navigationUpgrade.md +++ b/src/main/resources/assets/opencomputers/doc/en_US/item/navigationUpgrade.md @@ -4,4 +4,4 @@ The navigation upgrade provides location and orientation information to devices it is installed in. The coordinates the upgrade provides are relative to the center of the map that was used to craft the upgrade, and the functional range is based on the size of that map. -Navigation upgrades can be re-crafted with a map to replace the map in the upgrade with another one. The old map will be returned. +The map inside a Navigation upgrade can be changed by re-crafting the upgrade with a new map. The old map will be returned to the player. \ No newline at end of file diff --git a/src/main/resources/assets/opencomputers/doc/en_US/item/numPad.md b/src/main/resources/assets/opencomputers/doc/en_US/item/numPad.md index 5b3b75877..05ff6ade7 100644 --- a/src/main/resources/assets/opencomputers/doc/en_US/item/numPad.md +++ b/src/main/resources/assets/opencomputers/doc/en_US/item/numPad.md @@ -2,4 +2,4 @@ ![Check for fingerprints.](oredict:oc:materialNumPad) -The numeric keypad is part of every [keyboard](../block/keyboard.md). I allows you to enter numbers. I'm seriously running out of ideas of what to write here... +The Numeric keypad is part of every [keyboard](../block/keyboard.md). It allows you to enter numbers. \ No newline at end of file diff --git a/src/main/resources/assets/opencomputers/doc/en_US/item/pistonUpgrade.md b/src/main/resources/assets/opencomputers/doc/en_US/item/pistonUpgrade.md index 28e91eb2b..269f4825a 100644 --- a/src/main/resources/assets/opencomputers/doc/en_US/item/pistonUpgrade.md +++ b/src/main/resources/assets/opencomputers/doc/en_US/item/pistonUpgrade.md @@ -2,6 +2,6 @@ ![Push it.](oredict:oc:pistonUpgrade) -The piston upgrade allows some devices to act very much like a vanilla piston. When installed, a component with a single method, `push()`, becomes available. When called the device will then try to push the block in its forward facing direction. For example, for [robots](../block/robot.md) this is their facing, for [tablets](tablet.md) it's the player's facing, for [microcontrollers](../block/microcontroller.md) it is their facing. +The piston upgrade allows some devices to act very much like a vanilla piston. When installed, a component with a single method, `push()`, becomes available. When called the device will then try to push the block in its forward facing direction. For [robots](../block/robot.md) and [microcontrollers](../block/microcontroller.md), this is the front face; for [tablets](tablet.md), it will use the player's facing direction. The logic for pushing follows the same rules as vanilla pistons. diff --git a/src/main/resources/assets/opencomputers/doc/en_US/item/ram1.md b/src/main/resources/assets/opencomputers/doc/en_US/item/ram1.md index 80aa836d8..cd54adc4e 100644 --- a/src/main/resources/assets/opencomputers/doc/en_US/item/ram1.md +++ b/src/main/resources/assets/opencomputers/doc/en_US/item/ram1.md @@ -2,7 +2,7 @@ ![Do you remember, dancing in September~](oredict:oc:ram1) -Memory is, like the [CPU](cpu1.md), an essential part in all [computers](../general/computer.md). Depending on the CPU's architecture, the memory has a very essential effect on what a computer can and cannot do. For the standard Lua architecture, for example, it controls the actual amount of memory Lua scripts can use. This means that to run larger and more memory-intensive programs, you will need more RAM. +Memory is, like the [CPU](cpu1.md), an essential part in all [computers](../general/computer.md). Depending on the [CPU](cpu1.md)'s architecture, the memory has a very essential effect on what a [computer](../general/computer.md) can and cannot do. For the standard Lua architecture, for example, it controls the actual amount of memory Lua scripts can use. This means that to run larger and more memory-intensive programs, you will need more memory. RAM is available in multiple tiers with the following capacities, by default: - Tier 1: 192KB @@ -12,6 +12,6 @@ RAM is available in multiple tiers with the following capacities, by default: - Tier 3: 768KB - Tier 3.5: 1024KB -Note that these values only apply to the Lua architecture. Other architectures may provide different amounts of memory for the different tiers. +Note that these values only apply to the Lua architecture. Other architectures may provide different amounts of memory for the different tiers. Also note that tier 1 and 1.5 memory are both considered tier 1 memory, and similarly for tier 2 and 3 memory. The values can be changed in the configuration, if so desired. diff --git a/src/main/resources/assets/opencomputers/doc/en_US/item/rawCircuitBoard.md b/src/main/resources/assets/opencomputers/doc/en_US/item/rawCircuitBoard.md index e6fcc56ea..ac00250ea 100644 --- a/src/main/resources/assets/opencomputers/doc/en_US/item/rawCircuitBoard.md +++ b/src/main/resources/assets/opencomputers/doc/en_US/item/rawCircuitBoard.md @@ -2,4 +2,4 @@ ![Not sushi.](oredict:oc:materialCircuitBoardRaw) -Intermediary crafting material, used for crafting [circuit boards](circuitBoard.md) (or [printed circuit boards](printedCircuitBoard.md), depending on the recipe set you use). +Intermediary crafting material, used for crafting [circuit boards](circuitBoard.md) (or [printed circuit boards](printedCircuitBoard.md), depending on the recipe set being used). diff --git a/src/main/resources/assets/opencomputers/doc/en_US/item/redstoneCard1.md b/src/main/resources/assets/opencomputers/doc/en_US/item/redstoneCard1.md index 622ef3828..58abd2b89 100644 --- a/src/main/resources/assets/opencomputers/doc/en_US/item/redstoneCard1.md +++ b/src/main/resources/assets/opencomputers/doc/en_US/item/redstoneCard1.md @@ -2,8 +2,8 @@ ![Seeing red.](oredict:oc:redstoneCard1) -The redstone card allows computers to read and emit analog redstone signal in adjacent blocks. When an incoming signal strength changes, a signal is injected into the computer. +The redstone card allows [computers](../general/computer.md) to read and emit analog redstone signal in adjacent blocks. When an incoming signal strength changes, a signal is injected into the [computer](../general/computer.md). -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. +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. The side provided to the several methods are relative to the orientation of the [computer case](../block/case1.md) / [robot](../block/robot.md) / [server rack](../block/serverRack.md). That means when looking at the front of the computer, `sides.right` is at your left and vice versa. diff --git a/src/main/resources/assets/opencomputers/doc/en_US/item/server1.md b/src/main/resources/assets/opencomputers/doc/en_US/item/server1.md index acc755737..ca70f62fb 100644 --- a/src/main/resources/assets/opencomputers/doc/en_US/item/server1.md +++ b/src/main/resources/assets/opencomputers/doc/en_US/item/server1.md @@ -2,7 +2,7 @@ ![Serves u right.](oredict:oc:server1) -Servers are a form of higher tier [computer](../general/computer.md). They can be configured by holding them in the hand and using them - like opening a backpack or ender pouch, for example. After inserting a [CPU](cpu1.md), [memory](ram1.md) and Expansion cards, the server has to be placed inside a [server rack](../block/serverRack.md). For more information see the server rack entry. +Servers are a form of higher tier [computer](../general/computer.md). They can be configured by holding them in the hand and using them - like opening a backpack or Ender pouch, for example. After inserting a [CPU](cpu1.md), [memory](ram1.md) and Expansion cards, the server has to be placed inside a [server rack](../block/serverRack.md). For more information see the [server rack](../block/serverRack.md) entry. The tier 1 server is capable of taking the following components: - 1x tier 2 [CPU](cpu2.md) diff --git a/src/main/resources/assets/opencomputers/doc/en_US/item/signUpgrade.md b/src/main/resources/assets/opencomputers/doc/en_US/item/signUpgrade.md index 5d0b9a4f2..944bd24b6 100644 --- a/src/main/resources/assets/opencomputers/doc/en_US/item/signUpgrade.md +++ b/src/main/resources/assets/opencomputers/doc/en_US/item/signUpgrade.md @@ -2,4 +2,4 @@ ![I see the signs on the wall.](oredict:oc:signUpgrade) -This upgrade allows devices to interact with signs in the world. It allows reading the message currently being displayed on a sign, as well as setting that message to something else (unless some permission system blocks it). +This upgrade allows devices to interact with signs in the world. It allows reading the current message on the sign as well as changing the message on the sign (if permitted. \ No newline at end of file diff --git a/src/main/resources/assets/opencomputers/doc/en_US/item/solarGeneratorUpgrade.md b/src/main/resources/assets/opencomputers/doc/en_US/item/solarGeneratorUpgrade.md index 0f8e4e7ba..6740d5e69 100644 --- a/src/main/resources/assets/opencomputers/doc/en_US/item/solarGeneratorUpgrade.md +++ b/src/main/resources/assets/opencomputers/doc/en_US/item/solarGeneratorUpgrade.md @@ -2,6 +2,6 @@ ![Walking on the sun.](oredict:oc:solarGeneratorUpgrade) -The solar generator upgrade can be installed in devices such as [robots](../block/robot.md), [drones](drone.md) and [tablets](tablet.md) to passively generate energy. It will only work while the device is standing in the sun, i.e. it is day and there is no block between the device and the sky above it. +The solar generator upgrade can be installed in devices such as [robots](../block/robot.md), [drones](drone.md) and [tablets](tablet.md) to passively generate energy. It will only work while the device is exposed to direct sunlight; a device in an enclosed area or an area affected by weather will not generate energy. -The amount of energy generated is relatively small, but it should be enough to prolong the time needed between recharges, if not avoid them altogether. +The amount of energy generated is relatively small, but it should be enough to prolong the time needed between [recharges](../block/charger.md), if not avoid them altogether. diff --git a/src/main/resources/assets/opencomputers/doc/en_US/item/tablet.md b/src/main/resources/assets/opencomputers/doc/en_US/item/tablet.md index 30e6d8c02..eab94a816 100644 --- a/src/main/resources/assets/opencomputers/doc/en_US/item/tablet.md +++ b/src/main/resources/assets/opencomputers/doc/en_US/item/tablet.md @@ -4,6 +4,10 @@ Tablets are built by placing a [tablet case](tabletCase1.md) into an [assembler](../block/assembler.md), configuring as desired and assembling it. Tablets act as portable computers that cannot directly interact with the world - for example, basic [redstone cards](redstoneCard1.md) do not work in them. A number of upgrades do, such as the [sign i/o](signUpgrade.md) upgrade or the [piston](pistonUpgrade.md) upgrade. -To force rebooting a tablet, sneak-activate it while holding it in your hand. Unlike computers, tablets do not persist across the player holding it leaving and re-entering the game. They also do not persist across the player holding the tablet changing dimensions (e.g. going to the Nether or back). +The tier 2 tablet also allows installing a single container upgrade. The slot provided by the container can be accessed by opening the tablet's alternative GUI, by shift-right clicking with the tablet in hand. This will also forcibly shut down the tablet. -Tablets can be put into a [charger](../block/charger.md) to refill their energy, and to access the first [hard drive](hdd1.md) built into the tablet from a [computer](../general/computer.md) connected to the charger - in this setup, the charger will act similar to a [disk drive](../block/diskDrive.md), with the tablet being the [floppy disk](floppy.md). This can be very useful in case you forgot to install an OS on the hard drive built into the tablet, or after bricking a tablet's OS. +Unlike computers, tablets do not persist across the player holding it leaving and re-entering the game. They also do not persist across dimensions (such as a player going to the Nether and back). + +Tablets can be put into a [charger](../block/charger.md) to refill their energy, and to access the first [hard drive](hdd1.md) in the tablet from a [computer](../general/computer.md) connected to the charger - in this setup, the charger will behave similar to a [disk drive](../block/diskDrive.md), with the tablet being the [floppy disk](floppy.md). This can be very useful in case you forgot to install an OS on the hard drive built into the tablet, or after bricking a tablet's OS. + +Another advanced feature of the tablet is its ability to generate signals with information about certain blocks in the world, by using it on a block in the world for about one second (e.g. keep the right mouse button pressed). A short beep tone will notify you that the signal was generated. This only works if upgrades are installed in the tablet that populate the signal with information. For example, the [geolyzer](../block/geolyzer.md) will add information about the block itself, such as its hardness, the [navigation upgrade](navigationUpgrade.md) will add the coordinates of the block relative to the player holding the tablet. The block to be analyzed will be highlighted with a green overlay while holding the tablet. \ No newline at end of file diff --git a/src/main/resources/assets/opencomputers/doc/en_US/item/tabletCase1.md b/src/main/resources/assets/opencomputers/doc/en_US/item/tabletCase1.md index 6ef3fcd81..923c02aac 100644 --- a/src/main/resources/assets/opencomputers/doc/en_US/item/tabletCase1.md +++ b/src/main/resources/assets/opencomputers/doc/en_US/item/tabletCase1.md @@ -2,11 +2,11 @@ ![Doesn't bend.](oredict:oc:tabletCase1) -The tablet case is the base part when building [tablets](tablet.md) in the [assembler](../block/assembler.md). 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](../block/case1.md) can (using simple [network cards](lanCard.md) or [redstone cards](redstoneCard1.md) for example). +The tablet case is the base part when building [tablets](tablet.md) in the [assembler](../block/assembler.md). [Tablets](tablet.md) are very compact and portable [computers](../general/computer.md). They can host a small number of select upgrades, but cannot interact with the world like [computer cases](../block/case1.md) can (using simple [network cards](lanCard.md) or [redstone cards](redstoneCard1.md) 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. +Upgrades and cards that cannot be used in [tablets](tablet.md) cannot be placed in the [assembler](../block/assembler.md). If an upgrade can be placed in the [assembler](../block/assembler.md), it will be available for use through the component API. -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. +They must also remain in a player's inventory to continue running. When dropped or placed into another inventory, they will turn off after a short amount of time. The tier 1 tablet case can hold the following components: - 1x [CPU (tier 2)](cpu2.md) diff --git a/src/main/resources/assets/opencomputers/doc/en_US/item/terminal.md b/src/main/resources/assets/opencomputers/doc/en_US/item/terminal.md index 95bd4a22f..b511360f3 100644 --- a/src/main/resources/assets/opencomputers/doc/en_US/item/terminal.md +++ b/src/main/resources/assets/opencomputers/doc/en_US/item/terminal.md @@ -2,7 +2,7 @@ ![Remote access.](oredict:oc:terminal) -The remote terminal can be used to remote control [servers](server1.md). To use it, sneak-activate a server that is installed in a [server rack](../block/serverRack.md) (click on the [server rack](../block/serverRack.md) block in the world, targeting the [server](server1.md) to bind the terminal to). +The remote terminal can be used to remotely control [servers](server1.md). To use it, sneak-activate a server that is installed in a [server rack](../block/serverRack.md) (click on the [server rack](../block/serverRack.md) block in the world, targeting the [server](server1.md) to bind the terminal to). When a terminal is bound to a [server](server1.md), a virtual [screen](../block/screen1.md) and [keyboard](../block/keyboard.md) 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 using the terminal in hand after binding it, a GUI will open in the same manner as a [keyboard](../block/keyboard.md) attached to a [screen](../block/screen1.md). diff --git a/src/main/resources/assets/opencomputers/doc/en_US/item/texturePicker.md b/src/main/resources/assets/opencomputers/doc/en_US/item/texturePicker.md index 31c944d66..9a3e183fb 100644 --- a/src/main/resources/assets/opencomputers/doc/en_US/item/texturePicker.md +++ b/src/main/resources/assets/opencomputers/doc/en_US/item/texturePicker.md @@ -2,6 +2,6 @@ ![What do you mean, it's just a re-skin?](oredict:oc:texturePicker) -The texture picker is very useful when you're making models for your [3D printer](../block/printer.md). It allows getting the texture name of textures used by blocks in the world, simply by (sneak-)activate them with the tool. Disclaimer: for blocks that use special rendering, such as chests, this may not work. +The texture picker is very useful when making models for your [3D printer](../block/printer.md). It allows getting the texture name of textures used by blocks in the world, simply by (sneak-)activating them with the tool. Disclaimer: for blocks that use special rendering, such as chests, this may not work. While this is handy for quickly looking up texture names, it is good to know that you are not limited to the textures that can be picked with the analyzer. As long as you know the name of a texture (and it is a *block* texture), you can use it in your [3D prints](../block/print.md). diff --git a/src/main/resources/assets/opencomputers/doc/en_US/item/upgradeContainer1.md b/src/main/resources/assets/opencomputers/doc/en_US/item/upgradeContainer1.md index 767571737..2a704973a 100644 --- a/src/main/resources/assets/opencomputers/doc/en_US/item/upgradeContainer1.md +++ b/src/main/resources/assets/opencomputers/doc/en_US/item/upgradeContainer1.md @@ -2,4 +2,4 @@ ![Can haz upgrade.](oredict:oc:upgradeContainer1) -The upgrade container is a container type upgrade for [robots](../block/robot.md), that provides a slot in the finished [robots](../block/robot.md) 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. Refer to [robot](../block/robot.md) documentation on complexity. +The upgrade container is a container type upgrade for [robots](../block/robot.md), that provides a slot in the finished [robots](../block/robot.md) into which normal upgrades can be placed. The maximum 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. Refer to [robot](../block/robot.md) and [assembler](../block/assembler.md) documentation on complexity. diff --git a/src/main/resources/assets/opencomputers/doc/en_US/item/wlanCard.md b/src/main/resources/assets/opencomputers/doc/en_US/item/wlanCard.md index d4543b513..9404851cb 100644 --- a/src/main/resources/assets/opencomputers/doc/en_US/item/wlanCard.md +++ b/src/main/resources/assets/opencomputers/doc/en_US/item/wlanCard.md @@ -2,6 +2,6 @@ ![May cause cancer. May not.](oredict:oc:wlanCard) -The wireless network card is an upgraded [network card](lanCard.md) that, in addition to wired network messages, can also send and receive wireless network messages. The signal strength directly controls the distance up to which a sent message can be received, where the strength is equal to that distance in blocks. +The wireless network card is an upgraded [network card](lanCard.md) that, in addition to wired network messages, can also send and receive wireless network messages. The signal strength directly controls the distance up to which a sent message can be received, where the strength is equal to the distance in blocks. -The higher the signal strength, the more energy it will take to send a single message. The terrain between the sender and receiver also determines whether a message will be successfully transmitted or not. To penetrate a block, the blocks hardness is subtracted from the signal strength - with the minimum being one for air blocks. If no strength remains to reach the receiver, the message will not be received. This is not an exact science however - sometimes messages may still reach the target. In general you will want to make sure the line of sight between the sender and receiver are clear. +The higher the signal strength, the more energy it will take to send a single message. The terrain between the sender and receiver also determines whether a message will be successfully transmitted or not. To penetrate a block, the blocks hardness is subtracted from the signal strength - with the minimum being one for air blocks. If no strength remains to reach the receiver, the message will not be received. This is not an exact science however - sometimes messages may still reach the target. In general you will want to make sure the line of sight between the sender and receiver is clear. diff --git a/src/main/resources/assets/opencomputers/doc/en_US/item/wrench.md b/src/main/resources/assets/opencomputers/doc/en_US/item/wrench.md new file mode 100644 index 000000000..b26d7922e --- /dev/null +++ b/src/main/resources/assets/opencomputers/doc/en_US/item/wrench.md @@ -0,0 +1,5 @@ +# Scrench + +![Made in Swiss.](oredict:oc:wrench) + +Like pretty much any other technology-focused mod, OpenComputers has it's own version of a wrench tool. In this case, it is a hybrid of a screwdriver and a wrench, that looks like it's incredibly awkward to use. It can be used to rotate most blocks, and is also compatible with most other mods' blocks that can be interacted with by using wrench-like tools. diff --git a/src/main/resources/assets/opencomputers/doc/img/configuration_case1.png b/src/main/resources/assets/opencomputers/doc/img/configuration_case1.png new file mode 100644 index 000000000..fe1c0458d Binary files /dev/null and b/src/main/resources/assets/opencomputers/doc/img/configuration_case1.png differ diff --git a/src/main/resources/assets/opencomputers/doc/img/configuration_case2.png b/src/main/resources/assets/opencomputers/doc/img/configuration_case2.png new file mode 100644 index 000000000..787834a7a Binary files /dev/null and b/src/main/resources/assets/opencomputers/doc/img/configuration_case2.png differ diff --git a/src/main/resources/assets/opencomputers/doc/img/configuration_done.png b/src/main/resources/assets/opencomputers/doc/img/configuration_done.png new file mode 100644 index 000000000..d0330e946 Binary files /dev/null and b/src/main/resources/assets/opencomputers/doc/img/configuration_done.png differ diff --git a/src/main/resources/assets/opencomputers/doc/ru_RU/block/accessPoint.md b/src/main/resources/assets/opencomputers/doc/ru_RU/block/accessPoint.md new file mode 100644 index 000000000..58779b515 --- /dev/null +++ b/src/main/resources/assets/opencomputers/doc/ru_RU/block/accessPoint.md @@ -0,0 +1,11 @@ +# Точка доступа + +![AAA](oredict:oc:accessPoint) + +Точки доступа, это беспроводные версии [коммутаторов](switch.md). Они могут быть использованы, когда требуется разделить подсети, чтобы устройства не видели [компоненты](../general/computer.md) в других сетях, однако сохраняя при этом возможность передачи сообщений между подсетями. + +В дополнение к этому, точки доступа могут использоваться как повторители: они могут перенаправлять сообщения из проводной линии другим устройствам; или беспроводные сообщения как проводные, так и беспроводные. + +Коммутаторы и [коммутаторы](switch.md) *не* отслеживают, какие пакеты и куда они передали, поэтому в сети могут образовываться петли или вы можете получать одно сообщение несколько раз. Из-за ограниченного буфера сообщений коммутатора, частое отправление сообщений приводит к их потере. Вы можете улучшить [коммутатор](switch.md) или точку доступа для увеличения скорости обработки сообщений, а также увеличения размера сообщений. + +Сообщения, могут перенаправлены всего несколько раз, поэтому цепочки с произвольным количеством коммутаторов или точек доступа невозможны. По умолчанию, сообщение может быть перенаправлено пять раз. diff --git a/src/main/resources/assets/opencomputers/doc/ru_RU/block/adapter.md b/src/main/resources/assets/opencomputers/doc/ru_RU/block/adapter.md new file mode 100644 index 000000000..b072ea457 --- /dev/null +++ b/src/main/resources/assets/opencomputers/doc/ru_RU/block/adapter.md @@ -0,0 +1,7 @@ +# Адаптер + +![Теперь на 100% больше чего-то.](oredict:oc:adapter) + +Адаптеры позволяют [компьютерам](../general/computer.md) взаимодействовать с блоками Minecraft и блоками из других модов. Поддерживаемые блоки, прилегающие к адаптеру, будут отображаться как компоненты [компьютера](../general/computer.md), подключенного к адаптеру. + +В дополнение к этому, адаптеры добавляют слот для нескольких улучшений. Например, [контроллер инвентаря](../item/inventoryControllerUpgrade.md) позволяет компьютеру получать подробную информацию о предметах в инвентаре, для блока подключенного через адаптер, также это улучшение может быть установлено и в другие устройства (например [роботов](robot.md) или [дронов](../item/drone.md)), также [контроллер бака](../item/tankControllerUpgrade.md) предоставляет аналогичный функционал, только для жидкостей. diff --git a/src/main/resources/assets/opencomputers/doc/ru_RU/block/assembler.md b/src/main/resources/assets/opencomputers/doc/ru_RU/block/assembler.md new file mode 100644 index 000000000..dcd49e20d --- /dev/null +++ b/src/main/resources/assets/opencomputers/doc/ru_RU/block/assembler.md @@ -0,0 +1,13 @@ +# Сборщик роботов + +![Harder, better, faster, stronger.](oredict:oc:assembler) + +Сборщик роботов, это продвинутая система, позволяющая собирать такие сложные устройства, как [роботы](robot.md), [дроны](../item/drone.md) и [планшеты](../item/tablet.md). Они требуют для сборки большое количество энергии, поэтому рекомендуется использовать их совместно с [конденсатором энергии](capacitor.md). + +Для создания устройства с помощью сборщика, необходимо вставить корпус устройства. Для [роботов](robot.md) это [системный блок](case1.md) любого уровня; а для [планшетов](../item/tablet.md) это [корпус планшета](../item/tabletCase1.md). Также как в других устройствах OpenComputers, компоненты должны быть помещены в указанные слоты; при наведении курсора на компонент, подсвечивается слот, куда его можно вставить. Если у вас открыт NEI, со списком компонентов OpenComputers, совместимые компоненты также будут подсвечены в NEI. Вставьте все необходимые компоненты. Не забудьте про операционную систему или установите ее позже (для роботов вы можете вставить [дисковод](diskDrive.md) для чтения [дискет](../item/floppy.md)). Для большинства устройств их [EEPROM](../item/eeprom.md) может быть изменен после сборки, достаточно поместить устройство с новым [EEPROM](../item/eeprom.md) в верстаке. Старый [EEPROM](../item/eeprom.md) при этом будет возвращен вам в инвентарь. + +Также [роботы](robot.md) могут иметь [монитор](screen1.md), для этого нужно установить в них [монитор первого уровня](screen1.md), а для возможности печатать на [мониторе](screen1.md), требуется установить [клавиатуру](keyboard.md). Для [планшетов](../item/tablet.md), [монитор](screen1.md) уже установлен в [корпус планшета](../item/tabletCase1.md), но вы должны установить [клавиатуру](keyboard.md) для возможности печатать на [планшете](../item/tablet.md). + +После того, как вы поместили все нужные компоненты, нажмите кнопку старта и ожидайте, пока устройство будет собрано и заряжено. Также стоит заметить, что вы *не* сможете изменить устройство после разборки. Если вы что-то забыли или допустили ошибку, вам придется разобрать устройство в [разборщике](disassembler.md), при этом некоторые предметы имеют шанс поломаться. + +О сложности: уровень предмета означает, пунктов сложности они будут занимать, компоненты уровня 1 занимают 1 пункт сложности, уровня 2, требуют 2 пункта, а уровня 3, 3 пункта. Улучшения - контейнеры, имеют двойную сложность (например: [контейнеры](../item/upgradeContainer1.md) уровня 2 требуют 4 пункта сложности, аналогично для [контейнера карт](../item/cardContainer1.md)). diff --git a/src/main/resources/assets/opencomputers/doc/ru_RU/block/cable.md b/src/main/resources/assets/opencomputers/doc/ru_RU/block/cable.md new file mode 100644 index 000000000..808d0905c --- /dev/null +++ b/src/main/resources/assets/opencomputers/doc/ru_RU/block/cable.md @@ -0,0 +1,9 @@ +# Кабель + +![Зелень.](oredict:oc:cable) + +Кабель необходим для соединения [компьютеров](../general/computer.md) и машин, которые далеки друг от друга. Если вы используете компактную сборку, где все компоненты касаются друг друга (напрямую или нет, большинство блоков ведут себя как кабели), тогда вам не нужны кабели. + +Кабели могут быть окрашены с помощью красок. Цветные кабели могут соединяться только с кабелями этого же цвета и светло-серого цвета - цветом по умолчанию. Это можно использовать для запуска кабелей в нескольких подсетей параллельно, без оболочки. + +Если необходимо, кабели могут быть накрыты оболочкой из Forge MultiPart или Immibis Microblocks. Имейте ввиду, что [3D печать](print.md) совместима с Forge MultiPart, что делает возможным печать дополнительных оболочек. diff --git a/src/main/resources/assets/opencomputers/doc/ru_RU/block/capacitor.md b/src/main/resources/assets/opencomputers/doc/ru_RU/block/capacitor.md new file mode 100644 index 000000000..2b43ce72f --- /dev/null +++ b/src/main/resources/assets/opencomputers/doc/ru_RU/block/capacitor.md @@ -0,0 +1,9 @@ +# Конденсатор энергии + +![Овер 9000.](oredict:oc:capacitor) + +Конденсатор энергии хранит энергию, используемую в сети, действуя в качестве буфера энергии, когда это необходимо. В отличие от конвертации энергии других модов во внутреннюю энергию OpenComputers (с помощью [конвертера энергии](powerConverter.md) например), передает энергию внутри одной подсети мгновенно. Наличие энергетического буфера можно использовать, когда необходимо большое количество энергии, например, в [сборщике роботов](assembler.md) и/или [зарядном устройстве](charger.md) для [роботов](robot.md) или [дронов](../item/drone.md). + +Эффективность хранения возрастает с увеличением количества конденсаторов, находящихся рядом друг с другом или в непосредственной близости. Например, два конденсатора в непосредственной близости друг от друга, будут иметь большую емкость, чем 2 отдельно стоящих. Данный бонус распространяется на конденсаторы энергии, находящиеся в радиусе двух блоков относительно друг друга и уменьшается, с увеличением расстояния между ними. + +Конденсатор может быть подключен к [распределителю энергии](powerDistributor.md) для передачи энергии другим [компьютерам](../general/computer.md) или машинам в сети. diff --git a/src/main/resources/assets/opencomputers/doc/ru_RU/block/case1.md b/src/main/resources/assets/opencomputers/doc/ru_RU/block/case1.md new file mode 100644 index 000000000..6a91b02bc --- /dev/null +++ b/src/main/resources/assets/opencomputers/doc/ru_RU/block/case1.md @@ -0,0 +1,37 @@ +# Системный блок + +![Просто коробка.](oredict:oc:case1) + +Системные блоки имеют 3 различных уровня, различающихся количеством компонентов, которые могут быть в них вставлены. Также есть креативный системный блок. Системные блоки могут быть помещены в [сборщик роботов](assembler.md) для создания [робота](robot.md). + +Максимальный уровень компонента, который может быть помещен в слот, указан в самом слоте с помощью цифры. Слот 2 уровня также может содержать компоненты 1 уровня. + +Системный блок 1 уровня может содержать следующие компоненты: +- 2x платы расширения уровня 1 (например [видеокарты](../item/graphicsCard1.md), [сетевые карты](../item/lanCard.md) и т.д.) +- 1x [процессор](../item/cpu1.md) уровня 1 +- 2x [планки памяти](../item/ram1.md) уровня 1 +- 1x [жесткий диск](../item/hdd1.md) уровня 1 + +Системный блок 2 уровня может содержать следующие компоненты +- 1x плату расширения уровня 1 (например [видеокарты](../item/graphicsCard1.md), [сетевые карты](../item/lanCard.md) и т.д. +- 1x плату расширения уровня 2 +- 1x [процессор](../item/cpu2.md) уровня 2 +- 2x [планки памяти](../item/ram3.md) уровня 2 +- 1x [жесткий диск](../item/hdd1.md) уровня 1 +- 1x [жесткий диск](../item/hdd2.md) уровня 2 + +Системный блок 3 уровня может содержать следующие компоненты +- 1x плату расширения уровня уровня 3 (например [видеокарты](../item/graphicsCard1.md), [сетевые карты](../item/lanCard.md) и т.д.) +- 2x платы расширения уровня уровня 2 +- 1x [процессор](../item/cpu3.md) уровня 3 +- 2x [планки памяти](../item/ram5.md) уровня 3 +- 1x [жесткий диск](../item/hdd2.md) уровня 2 +- 1x [жесткий диск](../item/hdd3.md) уровня 3 +- 1x [дискету](../item/floppy.md) + +Системный блок 4 уровня (креатив) может содержать следующие компоненты +- 3x платы расширения уровня уровня 3 (например [видеокарты](../item/graphicsCard1.md), [сетевые карты](../item/lanCard.md) и т.д.) +- 1x [процессор](../item/cpu3.md) уровня 3 +- 2x [планки памяти](../item/ram5.md) уровня 3 +- 2x [жестких диска](../item/hdd3.md) уровня 3 +- 1x [дискету](../item/floppy.md) diff --git a/src/main/resources/assets/opencomputers/doc/ru_RU/block/case2.md b/src/main/resources/assets/opencomputers/doc/ru_RU/block/case2.md new file mode 100644 index 000000000..ee87d2036 --- /dev/null +++ b/src/main/resources/assets/opencomputers/doc/ru_RU/block/case2.md @@ -0,0 +1 @@ +#REDIRECT case1.md \ No newline at end of file diff --git a/src/main/resources/assets/opencomputers/doc/ru_RU/block/case3.md b/src/main/resources/assets/opencomputers/doc/ru_RU/block/case3.md new file mode 100644 index 000000000..ee87d2036 --- /dev/null +++ b/src/main/resources/assets/opencomputers/doc/ru_RU/block/case3.md @@ -0,0 +1 @@ +#REDIRECT case1.md \ No newline at end of file diff --git a/src/main/resources/assets/opencomputers/doc/ru_RU/block/caseCreative.md b/src/main/resources/assets/opencomputers/doc/ru_RU/block/caseCreative.md new file mode 100644 index 000000000..ee87d2036 --- /dev/null +++ b/src/main/resources/assets/opencomputers/doc/ru_RU/block/caseCreative.md @@ -0,0 +1 @@ +#REDIRECT case1.md \ No newline at end of file diff --git a/src/main/resources/assets/opencomputers/doc/ru_RU/block/chameliumBlock.md b/src/main/resources/assets/opencomputers/doc/ru_RU/block/chameliumBlock.md new file mode 100644 index 000000000..674f4c9c7 --- /dev/null +++ b/src/main/resources/assets/opencomputers/doc/ru_RU/block/chameliumBlock.md @@ -0,0 +1,7 @@ +# Блок хамелиума + +![Эмм... да.](oredict:oc:chameliumBlock) + +Несколько кусочком [хамелиума](../item/chamelium.md) могут быть объединены в единый блок. Блоки хамелиума могут быть окрашены в 16 стандартных цветов Minecraft. + +Используя блок хамелиума в качестве текстуры для [3D печати](print.md) вы получаете абсолютно белую поверхность. diff --git a/src/main/resources/assets/opencomputers/doc/ru_RU/block/charger.md b/src/main/resources/assets/opencomputers/doc/ru_RU/block/charger.md new file mode 100644 index 000000000..e68aa31ca --- /dev/null +++ b/src/main/resources/assets/opencomputers/doc/ru_RU/block/charger.md @@ -0,0 +1,9 @@ +# Зарядное устройство + +![Все хорошо, просто сделай это.](oredict:oc:charger) + +Зарядное устройство предназначено для зарядки устройств, таких как [роботы](robot.md), [дроны](../item/drone.md) и [планшеты](../item/tablet.md). Зарядное устройство активируется сигналом редстоуна. Скорость заряда зависит от силы редстоун сигнала, так, при силе 15, скорость заряда будет 100%. + +Логика работы зарядного устройства может быть инвертирована с помощью [ключа](../item/wrench.md). В инвертированном режиме, зарядное устройство заряжает со 100% скоростью, уменьшая скорость заряда в соответствии с силой редстоун сигнала. + +Когда [планшет](../item/tablet.md) помещен в зарядное устройство, первый [жесткий диск](../item/hdd1.md) подключается к [компьютеру](../general/computer.md), подключенному к зарядному устройству, также, как [дискеты](../item/floppy.md) в [дисководе](diskDrive.md). Это позволяет передавать информацию между [компьютером](../general/computer.md) и [планшетом](../item/tablet.md). diff --git a/src/main/resources/assets/opencomputers/doc/ru_RU/block/disassembler.md b/src/main/resources/assets/opencomputers/doc/ru_RU/block/disassembler.md new file mode 100644 index 000000000..d5ced40d6 --- /dev/null +++ b/src/main/resources/assets/opencomputers/doc/ru_RU/block/disassembler.md @@ -0,0 +1,7 @@ +# Разборщик + +![Построй это, снеси это.](oredict:oc:disassembler) + +Разборщик используется для разбора большинства блоков OpenComputers на исходные компоненты. Это удобно для сборки новых деталей из частей старых и ненужных или разборки устройств, которые вам больше не нужны, или были собраны неправильно (например [роботы](robot.md) без [операционной системы](../general/openOS.md)). + +Разборка занимает много времени и немного энергии. Также есть шанс, что компонент может сломаться. \ No newline at end of file diff --git a/src/main/resources/assets/opencomputers/doc/ru_RU/block/diskDrive.md b/src/main/resources/assets/opencomputers/doc/ru_RU/block/diskDrive.md new file mode 100644 index 000000000..d9c1f9090 --- /dev/null +++ b/src/main/resources/assets/opencomputers/doc/ru_RU/block/diskDrive.md @@ -0,0 +1,9 @@ +# Дисковод + +![Ходим вокруг да около...](oredict:oc:diskDrive) + +Дисковод может быть использован для чтения [дискет](../item/floppy.md) при работе с [компьютером](../general/computer.md) подключенным к дисководу. Это удобно на начальных этапах, когда низкоуровневый [системный блок](case1.md) не имеет встроенного дисковода, а вам нужна операционная система, для запуска [компьютера](../general/computer.md). Дискета с [OpenOS](../general/openOS.lua) может быть создана из пустой [дискеты](../item/floppy.md) и [данного руководства](../item/manual.lua). + +Он может быть также установлен в [роботов](robot.md), чтобы они получили возможеость использовать [дискеты](../item/floppy.md). Это можно использовать для передачи данных в и из робота используя сеть - например, используя [сетевые карты](../item/lanCard.md). + +[Дискеты](../item/floppy.md) могут быть вставлены/убраны без необходимости открывать интерфейс дисковода достаточно кликнуть правой кнопкой мыши, с зажатой клавишей Shift и [дискетой](../item/floppy.md) в руках. diff --git a/src/main/resources/assets/opencomputers/doc/ru_RU/block/geolyzer.md b/src/main/resources/assets/opencomputers/doc/ru_RU/block/geolyzer.md new file mode 100644 index 000000000..755c8bfa4 --- /dev/null +++ b/src/main/resources/assets/opencomputers/doc/ru_RU/block/geolyzer.md @@ -0,0 +1,7 @@ +# Геоанализатор + +![Это камень.](oredict:oc:geolyzer) + +Геоанализатор используется [компьютерами](../general/computer.md) для сканирования местности вокруг него. Это можно использовать для генерации карт местности и показа их на [голограммном проекторе](hologram1.md), также его можно использовать для нахождения полезных блоков (руды обычно тверже земли и камня). В результаты работы анализатора добавляется некоторое количество шума/ошибок; в теории, чем больше сканирований произвести, тем точнее результаты. + +Геоанализатор также может быть установлен в [роботов](robot.md) и [планшеты](../item/tablet.md) в качестве улучшения, которое позволяет сканировать территорию вокруг них. Сканирование требует некоторого количества энергии, хотя, частое его использование быстро разрядит батарее устройства. diff --git a/src/main/resources/assets/opencomputers/doc/ru_RU/block/hologram1.md b/src/main/resources/assets/opencomputers/doc/ru_RU/block/hologram1.md new file mode 100644 index 000000000..dbbc3e241 --- /dev/null +++ b/src/main/resources/assets/opencomputers/doc/ru_RU/block/hologram1.md @@ -0,0 +1,7 @@ +# Голограммный проектор + +![Это реально? Или это только ваше воображение?](oredict:oc:hologram1) + +Голограммный проектор предоставляет массив вокселей, расположенных в трех плоскостях, каждый из которых может быть включен или выключен с помощью подключенного [компьютера](../general/computer.md). Проектор уровня 2 имеет такое же разрешение, что и проектор уровня 1, но поддерживает 3 цветные воксели, цвета которых указываются пользователем. + +Голограммы можно вращать в вертикальной плоскости, для этого их нужно ударить [ключом](../item/wrench.md) сверху или снизу. Это может сэкономить ресурсы, ведь не нужно переворачивать их программными средствами. Голограммы также могут быть отмасштабированы. diff --git a/src/main/resources/assets/opencomputers/doc/ru_RU/block/hologram2.md b/src/main/resources/assets/opencomputers/doc/ru_RU/block/hologram2.md new file mode 100644 index 000000000..e1acf9676 --- /dev/null +++ b/src/main/resources/assets/opencomputers/doc/ru_RU/block/hologram2.md @@ -0,0 +1 @@ +#REDIRECT hologram1.md \ No newline at end of file diff --git a/src/main/resources/assets/opencomputers/doc/ru_RU/block/index.md b/src/main/resources/assets/opencomputers/doc/ru_RU/block/index.md new file mode 100644 index 000000000..5bb260211 --- /dev/null +++ b/src/main/resources/assets/opencomputers/doc/ru_RU/block/index.md @@ -0,0 +1,46 @@ +# Блоки + +Здесь представлен список блоков в OpenComputers. Если вы ищете предметы, проверьте [список предметов](../item/index.md). + +Некоторые блоки могут быть недоступны, в зависимости от рецептов. + +## Компьютеры +* [Системный блок](case1.md) +* [Микроконтроллер](microcontroller.md) +* [Робот](robot.md) +* [Серверная стойка](serverRack.md) + +## Компоненты + +### Ввод / Вывод +* [Холограммный проектор](hologram1.md) +* [Клавиатура](keyboard.md) +* [Монитор](screen1.md) + +### Хранение данных +* [Дисковод](diskDrive.md) +* [RAID](raid.md) + +### Расширения +* [Адаптер](adapter.md) +* [Кабель](cable.md) +* [Геоанализатор](geolyzer.md) +* [Датчик движения](motionSensor.md) +* [Редстоун I/O](redstone.md) + +## Сборка / Печать +* [3D печать](print.md) +* [3D принтер](printer.md) +* [Сборщик роботов](assembler.md) +* [Блок хамелиума](chameliumBlock.md) +* [Разборщик](disassembler.md) + +## Сеть +* [Точка доступа](accessPoint.md) +* [Коммутатор](switch.md) + +## Управление питанием +* [Конденсатор энергии](capacitor.md) +* [Зарядное устройство](charger.md) +* [Конвертер энергии](powerConverter.md) +* [Распределитель энергии](powerDistributor.md) diff --git a/src/main/resources/assets/opencomputers/doc/ru_RU/block/keyboard.md b/src/main/resources/assets/opencomputers/doc/ru_RU/block/keyboard.md new file mode 100644 index 000000000..053ff3627 --- /dev/null +++ b/src/main/resources/assets/opencomputers/doc/ru_RU/block/keyboard.md @@ -0,0 +1,7 @@ +# Клавиатура + +![QWERTY](oredict:oc:keyboard) + +Клавиатура необходима для набора текст на [мониторе](screen1.md), они могут стоять отдельным блоком в мире или быть встроены в такие устройства как [роботы](robot.md) или [планшеты](../item/tablet.md). + +Для того, чтобы клавиатура работала с [монитором](screen1.md), она должна быть расположена рядом с [монитором](screen1.md), повернута к [монитору](screen1.md), или расположена на самом [мониторе](screen1.md) (сверху или с одного из боков). Вы можете узнать, что клавиатура "соединилась" с [монитором](screen1.md) если интерфейс [монитора](screen.md) открывается, при использовании клавиатуры. \ No newline at end of file diff --git a/src/main/resources/assets/opencomputers/doc/ru_RU/block/microcontroller.md b/src/main/resources/assets/opencomputers/doc/ru_RU/block/microcontroller.md new file mode 100644 index 000000000..ffb28ad92 --- /dev/null +++ b/src/main/resources/assets/opencomputers/doc/ru_RU/block/microcontroller.md @@ -0,0 +1,7 @@ +# Микроконтроллер + +![Don't belittle it.](block:OpenComputers:microcontroller) + +Микроконтроллеры можно получить, поместив [корпус микроконтроллера](../item/microcontrollerCase1.md) в [сборщик роботов](assembler.md). Они обладают меньшей функциональностью, по сравнению с [компьютерами](../general/computer.md), но они дешевле в создании. + +Микроконтроллеры могут иметь несколько компонентов, таких как [процессоры](../item/cpu1.md), [планки памяти](../item/ram1.md) и платы расширения. Микроконтроллеры не могут иметь [жесткий диск](../item/hdd1.md), но имеют слот под [EEPROM](../item/eeprom.md), что позволяет запрограммировать их специфические задачи. diff --git a/src/main/resources/assets/opencomputers/doc/ru_RU/block/motionSensor.md b/src/main/resources/assets/opencomputers/doc/ru_RU/block/motionSensor.md new file mode 100644 index 000000000..632448a9c --- /dev/null +++ b/src/main/resources/assets/opencomputers/doc/ru_RU/block/motionSensor.md @@ -0,0 +1,7 @@ +# Датчик движения + +![Не двигайся.](oredict:oc:motionSensor) + +Датчик движения позволяет [компьютерам](../general/computer.md) замечать движение живых существ. Если существо двигается быстрее, чем задано, то будет подан сигнал в [компьютер](../general/computer.md) соединенный с датчиком движения. Вы можете задать порог срабатывания датчика через API, которое доступно с компьютеров, подключенных к датчику. + +Датчик движения обнаружит движение только в прямой видимости между ним объектом, а также только в радиусе 8 блоков. diff --git a/src/main/resources/assets/opencomputers/doc/ru_RU/block/powerConverter.md b/src/main/resources/assets/opencomputers/doc/ru_RU/block/powerConverter.md new file mode 100644 index 000000000..77f779dff --- /dev/null +++ b/src/main/resources/assets/opencomputers/doc/ru_RU/block/powerConverter.md @@ -0,0 +1,5 @@ +# Конвертер энергии + +![Один из нас? Один из нас!](oredict:oc:powerConverter) + +Конвертер энергии это самый быстрый способ получения энергии OpenComputers из энергии других модов. Если вы запустите простой компьютер, вероятно, вам не понадобится конвертер. Если у вас есть много конденсаторов, вам может понадобиться конвертер. Однако, если вы хотите подвести энергию к [сборщику роботов](assembler.md) или [зарядному устройству](charger.md), хорошей идеей будет подключить их через конвертер, чем напрямую. diff --git a/src/main/resources/assets/opencomputers/doc/ru_RU/block/powerDistributor.md b/src/main/resources/assets/opencomputers/doc/ru_RU/block/powerDistributor.md new file mode 100644 index 000000000..d3b25b159 --- /dev/null +++ b/src/main/resources/assets/opencomputers/doc/ru_RU/block/powerDistributor.md @@ -0,0 +1,5 @@ +# Распределитель энергии + +![Энергию в массы.](oredict:oc:powerDistributor) + +Распределитель энергии распределяет ее между несколькими хранилищами (такими как [конденсатор](capacitor.md)), что позволяет нескольким подсетям обмениваться энергией, без дополнительных компонентов. Это достигается "балансированием" энергии во всех подключенных подсетях, поддерживая *относительно* одинаковое количество энергии в них. diff --git a/src/main/resources/assets/opencomputers/doc/ru_RU/block/print.md b/src/main/resources/assets/opencomputers/doc/ru_RU/block/print.md new file mode 100644 index 000000000..9e18a278c --- /dev/null +++ b/src/main/resources/assets/opencomputers/doc/ru_RU/block/print.md @@ -0,0 +1,11 @@ +# 3D печать + +![В любом случае я нужен вам.](block:OpenComputers:print) + +3D печать осуществляется с помощью [3D принтеру](printer.md). Они предназначены в первую очередь для декоративных целей, но также могут реагировать и излучать редстоун сигнал, что расширяет их функционал. + +3D модели могут быть переработаны, для этого их нужно поместить в [3D принтер](printer.md). Что позволяет повторно использовать немного [хамелиума](../item/chamelium.md) затраченного на их печать. Цвет, который использовался для печати модели, не может быть переработан. + +Зажав кнопку показа подсказок OpenComputers (по умолчанию [Shift]), принтер покажет свое состояние. + +Распечатанные блоки совместимы с Forge MultiPart. Если требуется, множество 3D моделей могут быть размещены в пределах одного блока, пока их количество не превысит размеров одной модели. Благодаря природе Forge Multipart, модели могут быть также расположены в пределах одного блока, как факелы, рычаги и кабели (из мода Project Red например). diff --git a/src/main/resources/assets/opencomputers/doc/ru_RU/block/printer.md b/src/main/resources/assets/opencomputers/doc/ru_RU/block/printer.md new file mode 100644 index 000000000..9e32aaca9 --- /dev/null +++ b/src/main/resources/assets/opencomputers/doc/ru_RU/block/printer.md @@ -0,0 +1,18 @@ +# 3D принтер + +![2D печать это прошлый век.](oredict:oc:printer) + +3D принтеры позвляют вам распечатать любой блок любой формы и текстуры. Для начала работы с 3D принтерами, вы должны поместить блок 3D принтера рядом с компьютером. Это даст доступ к API `printer3d`, позволяющем вам создавать и печатать [3D модели](print.md) используя предоставленные функции. + +Наиболее удобный способ настройки принтеров это Пакетный менеджер OpenPrograms (OPPM). После установки (`oppm install oppm`), убедитесь, что у вас есть [интернет карта](../item/internetCard.md) в [компьютере](../general/computer.md), а после чего выполните следующие команды: +`oppm install print3d-examples` + +После чего примеры моделей будут доступны в директории `/usr/share/models/` как .3dm файлы. Изучите файлы-примеры на предмет доступных опций, в этом вам очень поможет файл `example.3dm`. Также, вы можете установить `print3d` и `print3d-examples` программы из OpenPrograms используя `wget` и [интернет карту](../item/internetCard.md). + +Для возможности печати, 3D принтер должен быть настроен с помощью [компьютера](../general/computer.md). Если он настроен для печати нон-стоп, компьютер больше не потребуется. Вы также должны вставить [картридж с чернилами](../item/inkCartridge.md) и немного [хамелиума](../item/chamelium.md) в качестве исходных материалов. Количество хамелиума зависит от сложности 3D модели, в то время, как количество чернил зависит от площади печатаемой модели. + +Для печати модели, используйте следующую команду: +`print3d /путь/к/файлу.3dm` +заменив путь, на пть к .3dm файлу. + +Документация о создании новых моделей может быть найдена в файле `/usr/share/models/example.3dm`. diff --git a/src/main/resources/assets/opencomputers/doc/ru_RU/block/raid.md b/src/main/resources/assets/opencomputers/doc/ru_RU/block/raid.md new file mode 100644 index 000000000..b181c3872 --- /dev/null +++ b/src/main/resources/assets/opencomputers/doc/ru_RU/block/raid.md @@ -0,0 +1,11 @@ +# RAID + +![40 человек в 1.](oredict:oc:raid) + +Блок RAID может содержать 3 [жестких диска](../item/hdd1.md), объединенных в единую файловую систему. Благодаря объединению, объем памяти [жестких дисков](../item/hdd1.md) суммируется и становится доступен для всех [компьютеров](../general/computer.md), подключенных к RAID. + +RAID работает только, когда все 3 [жестких диска](../item/hdd1.md) вставлены и доступны. [Жесткие диски](../item/hdd1.md) могут иметь различный объем. + +При добавлении нового [жестого диска](../item/hdd1.md) RAID стирает его содержимое. Удаление одного [жесткого диска](../item/hdd1.md) сотрет информацию и на остальных. Обратоне возвращение диска *не* восстановит данные; RAID просто будет создан заного, с пустыми дисками. + +Если сломать RAID блок, он сохранит все содержимое и данные, поэтому можно смело переезжать в другое место. diff --git a/src/main/resources/assets/opencomputers/doc/ru_RU/block/redstone.md b/src/main/resources/assets/opencomputers/doc/ru_RU/block/redstone.md new file mode 100644 index 000000000..abf9fbc19 --- /dev/null +++ b/src/main/resources/assets/opencomputers/doc/ru_RU/block/redstone.md @@ -0,0 +1,9 @@ +# Редстоун I/O + +![Привет Ред.](oredict:oc:redstone) + +Блок редстоун I/O для удаленного чтения и излучения редстоун сигнала. Он ведет себя как что-то среднее между [редстоун картой](../item/redstoneCard1.md) 1 и 2 уровня: может читать и излучать сигнал как в один провод и в многожильный кабель, но не может читать и излучать беспроводные сигналы. + +При предоставлении сторон методам компонента, направления принципиально важны, например, рекомендуется использовать `sides.north`, `sides.east` и т.п. + +Также как [редстоун карты](../item/redstoneCard1.md), этот блок подает сигнал в [компьютер](../general/computer.md) при изменении редстоун сигнала - как для одиночных, так и для многожильных сигналов. Данный компьютер может быть настроен так, чтобы будить [компьютер](../general/computer.md), когда уровень сигнала превысил порог. diff --git a/src/main/resources/assets/opencomputers/doc/ru_RU/block/robot.md b/src/main/resources/assets/opencomputers/doc/ru_RU/block/robot.md new file mode 100644 index 000000000..86795b083 --- /dev/null +++ b/src/main/resources/assets/opencomputers/doc/ru_RU/block/robot.md @@ -0,0 +1,9 @@ +# Робот + +![Его имя Тобор.](block:OpenComputers:robot) + +В отличие от [компьютеров](../general/computer.md), роботы могут двигаться и взаимодействовать с игровым миром также, как игроки. Они *не* могут взаимодействовать с внешними компонентами! Если вам нужно связать робота с [компьютером](../general/computer.md) или другими роботами, используйте [беспроводные сетевые карты](../item/wlanCard.md), или создайте низкоуровневый протокол, на основе сигнала редстоуна и [редстоун карт](../item/redstoneCard1.md), к примеру. + +Роботы получается путем помещения [системного блока](case1.md) любого уровня в [сборщик роботов](assembler.md). Чем выше уровень [системного блока](case1.md), тем более сложных роботов можно построить, благодаря возможности использовать [процессоры](../item/cpu1.md) высокого уровня. Сложность робота (показывается в [сборщике роботов](assembler.md)) определяется уровнем компонентов и улучшений, помещенных в робота; компонент высокого уровня сильнее увеличивает сложность, чем компонент низкого. Если сложность робота превысила предел, тогда [сборщик роботов](assembler.md) не сможет создать робота. + +Для повышения функциональности в роботов можно поместить множество компонентов. Это могут быть [инвентари](../item/inventoryUpgrade.md) и [контроллеры инвентарей](../item/inventoryControllerUpgrade.md), [баки для жидкостей](../item/tankUpgrade.md), [навигация](../item/navigationUpgrade.md) и многие другие. [Контейнер улучшений](../item/upgradeContainer1.md) и [карт](../item/cardContainer1.md) позволяют вставлять и вынимать компоненты без пересборки робота. [Дисковод](diskDrive.md) также может быть помещен в робота, для возможности работы с [дискетами](../item/floppy.md), например, для установки [openOS](../general/openOS.md) на робота (также вы можете установить [openOS](../general/openOS.md) на пустой [жесткий диск](../item/hdd1.md) с помощью [компьютера](../general/computer.md) и использовать этот [жесткий диск](../item/hdd1.md) как компонент, при сборке робота). diff --git a/src/main/resources/assets/opencomputers/doc/ru_RU/block/screen1.md b/src/main/resources/assets/opencomputers/doc/ru_RU/block/screen1.md new file mode 100644 index 000000000..6c91aabba --- /dev/null +++ b/src/main/resources/assets/opencomputers/doc/ru_RU/block/screen1.md @@ -0,0 +1,18 @@ +# Монитор + +![Вы тоже видите это?](oredict:oc:screen1) + +Монитор используется совместно с [видеокартой](../item/graphicsCard1.md), для отображения текста [компьютера](../general/computer.md). Разные уровни мониторов имеют разные возможности, такие как разное разрешение и глубина цвета. Они делятся на мониторы низкого разрешения и мониторы высокого разрешения, поддерживающих 2 и 256 цвета соответственно. + +Доступное разрешение и глубина цвета зависят от наименьшего уровня компонента. При использовании [видеокарты уровня 1](../item/graphicsCard1.md) и [монитора уровня 3](screen3.md), будет доступен только разрешение и глубина цвета первого уровня. Однако, при использовании [видеокарты](../item/graphicsCard1.md) уровня 3 с монитором уровня 1, разрешение и глубина цвета также будут уровня 1, но все остальные операции, выполняемые [видеокартой](../item/graphicsCard1.md) будут быстрее, чем при использовании [видеокарты](../item/graphicsCard1.md) уровня 1. + +Экраны могут быть размещены рядом друг с другом, образуя мультиблочные структуры. При размещении вверх или вниз, они будут развернуты также, как и все остальные. Их ориентация показана стрелкой, когда вы держите монитор в руках. + +Доступное разрешение не зависит от размера монитора, а только от его уровня. Прилегающие мониторы могут быть окрашены. Достаточно кликнуть правой кнопкой мыши по монитору с красителем в руке. Краситель не будет тратиться, но и монитор не сохранит этот цвет при разбивании. Мониторы разного цвета не соединяются. Мониторы разного уровня никогда не соединятся, даже если они одного цвета. + +Мониторы уровня 2 и 3 могут использовать мышь. Клики мышью могут быть выполнены как в интерфейсе монитора (когда подключена и используется [клавиатура](keyboard.md)) или находясь рядом с монитором. Открытие интерфейса монитора как обычно или с помощью Shift может контролироваться с помощью API на подключенном к монитору [компьютере](../general/computer.md). Мониторы уровня 3 наиболее точно определяют место клика, если включен их компонент. + +Разрешение и глубина цвета мониторов в зависимости от разрешения: +- Уровень 1: разрешение 50x16, 1-bit цвет. +- Уровень 2: разрешение 80x25, 4-bit цвет. +- Уровень 3: разрешение 160x50, 8-bit цвет. diff --git a/src/main/resources/assets/opencomputers/doc/ru_RU/block/screen2.md b/src/main/resources/assets/opencomputers/doc/ru_RU/block/screen2.md new file mode 100644 index 000000000..9a0e09ec3 --- /dev/null +++ b/src/main/resources/assets/opencomputers/doc/ru_RU/block/screen2.md @@ -0,0 +1 @@ +#REDIRECT screen1.md \ No newline at end of file diff --git a/src/main/resources/assets/opencomputers/doc/ru_RU/block/screen3.md b/src/main/resources/assets/opencomputers/doc/ru_RU/block/screen3.md new file mode 100644 index 000000000..9a0e09ec3 --- /dev/null +++ b/src/main/resources/assets/opencomputers/doc/ru_RU/block/screen3.md @@ -0,0 +1 @@ +#REDIRECT screen1.md \ No newline at end of file diff --git a/src/main/resources/assets/opencomputers/doc/ru_RU/block/serverRack.md b/src/main/resources/assets/opencomputers/doc/ru_RU/block/serverRack.md new file mode 100644 index 000000000..54beab330 --- /dev/null +++ b/src/main/resources/assets/opencomputers/doc/ru_RU/block/serverRack.md @@ -0,0 +1,9 @@ +# Серверная стойка + +![Бесплатное жилье.](oredict:oc:serverRack) + +Серверная стойка может содержать до 4 [серверов](../item/server1.md). [Сервер](../item/server1.md) это высокоуровневый [компьютер](../general/computer.md), который может работать только внутри серверной стойки. [Серверы](../item/server1.md) могут удаленно контролироваться, с помощью [терминала](../item/terminal.md). Количество [удаленных терминалов](../item/terminal.md), которое может быть подключено к одному [серверу](../item/server1.md) одновременно, зависит от уровня [сервера](../item/server1.md). Дистанция, на которой можно будет использовать [терминал](../item/terminal.md) настраивается в интерфейсе стойки. Большие значения требуют больше энергии. + +Каждый [сервер](../item/server1.md) в серверной стойке может взаимодействовать только с одной "стороной" стойки или ни с какой. К какой стороне, какой [сервер](../item/server1.md) подключен, настраивается в интерфейсе стойки. Будьте внимательны, стороны считаются относительно самой стойки, например, если вы смотрите на стойку спереди, то `правая сторона` стойки для вас будет слева. + +Серверные стойки взаимодействуют с [коммутаторами](switch.md) и [распределителями энергии](powerDistributor.md). Переключатель режимов работы стойки, может быть настроен в интерфейсе самой стойки, он имеет 2 режима: внешний и внутренний. Во внешнем режиме сервер будет работать как обычный [коммутатор](switch.md). Во внутреннем режиме, сообщения будут передаваться только к [серверам](../item/server.md) в стойке и не будут автоматически связаны со сторонами стойки. [Серверы](../item/server1.md) все также будут иметь возможность передачи сообщений друг другу. Это позволяет использовать серверные стойки как продвинутые [коммутаторы](switch.md) для операций фильтрации и направления данных, например. diff --git a/src/main/resources/assets/opencomputers/doc/ru_RU/block/switch.md b/src/main/resources/assets/opencomputers/doc/ru_RU/block/switch.md new file mode 100644 index 000000000..56445e17f --- /dev/null +++ b/src/main/resources/assets/opencomputers/doc/ru_RU/block/switch.md @@ -0,0 +1,11 @@ +# Коммутатор + +![Строит мосты.](oredict:oc:switch) + +Коммутатор используется для передачи сообщений между несколькими подсетями, не используя компоненты [компьютеров](../general/computer.md) в других сетях. Сохранение компонентов, как правило, хорошая идея, что не позволяет [компьютерам](../general/computer.md) использовать неверный [монитор](screen1.md) или не позволяет перенагружать их (в результате чего [компьютеры](../general/computer.md) выключатся и отказываются загружаться). + +Также есть беспроводная версия коммутатора, называемая [точка доступа](accessPoint.md), с ее помощью сообщения передаются по беспроводной линии. Сообщения, переданные по беспроводной линии могут быть получены или перенаправлены другими [точками доступа](accessPoint.md) или [компьютерами](../general/computer.md) с [беспроводной сетевой картой](../item/wlanCard.md). + +Коммутаторы и [точки доступа](accessPoint.md) *не* отслеживают, какие пакеты и куда они передали, поэтому для в сети могут образовываться петли или вы можете получать одно сообщение несколько раз. Из-за ограниченного буфера сообщений коммутатора, частое отправление сообщений приводит к их потере. Вы можете улучшить коммутатор или [точку доступа](accessPoint.md) для увеличения скорости обработки сообщений, а также увеличения размера сообщений. + +Сообщения, могут перенаправлены всего несколько раз, поэтому цепочки с произвольным количеством коммутаторов или точек доступа невозможны. По умолчанию, сообщение может быть перенаправлено пять раз. diff --git a/src/main/resources/assets/opencomputers/doc/ru_RU/general/computer.md b/src/main/resources/assets/opencomputers/doc/ru_RU/general/computer.md new file mode 100644 index 000000000..eac0380d6 --- /dev/null +++ b/src/main/resources/assets/opencomputers/doc/ru_RU/general/computer.md @@ -0,0 +1,10 @@ +# Компьютеры + +Компьютеры могут быть собраны из большого количества [блоков](../block/index.md) и компонентов. Минимальный набор блоков, для создания компьютера, это [системный блок](../block/case1.md), [монитор](../block/screen1.md) и [клавиатура](../block/keyboard.md). [Системный блок](../block/case1.md) и [монитор](../block/screen1.md) имеют несколько уровней, различающихся функционалом и возможностями, что позволяет создавать сложные компьютерные системы. Для получения возможности печатать на [мониторе](../block/screen1.md), потребуется [клавиатура](../block/keyboard.md) расположенная рядом с [монитором](../block/screen1.md) (она может быть как спереди, так и по бокам [монитора](../block/screen1.md)). + +После того, как базовые блоки собраны, требуется вставить компоненты в [системный блок](../block/case1.md). Эти компоненты включают [процессор](../item/cpu1.md), [планки памяти](../item/ram1.md), [жесткие диски](../item/hdd1.md), [видеокарты](../item/graphicsCard1.md) (для вывода изображения на [монитор](../block/screen1.md)), [сетевые карты](../item/lanCard.md) (для связи компьютеров) и т.д.. Выбирая только нужные компоненты, вы можете собрать оптимальный компьютер для требуемой задачи. + +Системные блоки низкого уровня также требуется [дисковод](../block/diskDrive.md) для работы с [дискетами](../item/floppy.md). [Дискета](../item/floppy.md) с [OpenOS](openOS.md) требуется для запуска компьютера первый раз и с ее помощью можно установить операционную систему на [жесткий диск](../item/hdd1.md). После установки системы на [жесткий диск](../item/hdd1.md), [дискеты](../item/floppy.md) больше не требуются для запуска. Дополнительные программы также доступны в виде [дискет](../item/floppy.md) (например Пакетный менеджер OpenPrograms (OPPM)) могут быть найдены в сокровищницах. + +В качестве финального шага требуется подать энергию на компьютер. OpenComputers совместим с самыми популярными техническими модами и их энергетической системой, что позволяет подключать блоки напрямую. Вы можете узнать, подключен блок к внешнему источнику питания или нет, по подсказке, в которой указана скорость конвертации энергии. +Для больших сетей с множеством компьютеров, [конвертер энергии](../block/powerConverter.md) (конвертирует энергию других модов в энергию ОС), [распределитель энергии](../block/powerDistributor.md) (распределяет энергию между компьютерами в сети) и [конденсатор энергии](../block/capacitor.md) (энергохранилище) могут быть подключены к компьютерам в сети с помощью [кабеля](../block/cable.md). diff --git a/src/main/resources/assets/opencomputers/doc/ru_RU/general/lua.md b/src/main/resources/assets/opencomputers/doc/ru_RU/general/lua.md new file mode 100644 index 000000000..b8a196591 --- /dev/null +++ b/src/main/resources/assets/opencomputers/doc/ru_RU/general/lua.md @@ -0,0 +1,16 @@ +# Lua + +Книги [Lua руководство](http://www.lua.org/manual/5.2/manual.html) и [Программирование на Lua](http://www.lua.org/pil/) (первое издание доступно бесплатно) хорошее начало, для получения базовых навыков программирования на Lua, ознакомления с синтаксисом и стандартными библиотеками. [OpenOS](openOS.md) стремится соответствовать стандартным библиотекам, с несколькими различиями, например отладочная библиотека. Эти различия [документированы в wiki](http://ocdoc.cil.li/api:non-standard-lua-libs). + +Нестандартные библиотеки должны быть `подключены`, для использования их в скриптах. Например: + +`local component = require("component")` +`local rs = component.redstone` + +Это позвонил вызывать и использовать функции [редстоун карты](../item/redstoneCard1.md). Например: + +`rs.setOutput(require("sides").front, 15)` + +**Важно**: при работе с интерпретатором Lua, *не* используйте несколько `local` в одной строке. Если вы вставите третью строку выше подключения библиотеки, вы получите ошибку, так как вызов `rs` будет иметь значение `nil`. Почему только на третьей строке, спросите вы? Потому, что для простоты тестирования, интерпретатор пытается загрузить неизвестные переменные, как библиотеки. Хотя на после первой строки ничего не произойдет, то на второй строке вызов `component` вызовет эту библиотеку и запустит ее. Библиотеки не подгружаются автоматически, их нужно вызвать, это сделано для экономии ресурсов. + +OpenOS предоставляет множество дополнительных библиотек и программ, начиная от контроля и управления компонентами [компьютера](computer.md) и заканчивая API для многожильного редстоун кабеля, а также кодов клавиш [клавиатуры](../block/keyboard.md). Дополнительные библиотеки могут быть подключены к Lua скрипту через функцию `require()`, как показано выше. Некоторые библиотеки требуют определенные компоненты для работы, например `интернет` библиотека требует [интернет карту](../item/internetCard.md). В данном случае, библиотека станет доступна, только после установки интернет карты. diff --git a/src/main/resources/assets/opencomputers/doc/ru_RU/general/openOS.md b/src/main/resources/assets/opencomputers/doc/ru_RU/general/openOS.md new file mode 100644 index 000000000..417fc3431 --- /dev/null +++ b/src/main/resources/assets/opencomputers/doc/ru_RU/general/openOS.md @@ -0,0 +1,12 @@ +# OpenOS + +OpenOS это простая операционная система, доступная в OpenComputers. Она требуется для первого запуска [компьютера](computer.md) и может быть получена с помощью пустой [дискеты](../item/floppy.md) и [руководства](../item/manual.md) OpenComputers в окне верстака. + +После крафта, [дискета](../item/floppy.md) может быть помещена в [дисковод](../block/diskDrive.md), подключенный к [правильно настроенному](quickstart.md) [компьютеру](computer.md), что позволит [компьютеру](computer.md) запустить OpenOS. +После запуска, вы можете установить OpenOS на чистый [жесткий диск](../item/hdd1.md), что освобождает от необходимости использовать [дискету](../item/floppy.md) при каждом запуске, а также получить доступ к файловой системе в режиме записи ([Дискеты](../item/floppy.md) с OpenOS и другие "трофейные" дискеты имеют режим `только чтение`). [Системный блок](../block/case3.md) уровня 3 не требует внешнего [дисковода](../block/diskDrive.md), он уже встроен и может работать с [дискетами](../item/floppy.md). + +OpenOS может быть установлена командой `install`, после чего потребуется подтверждение установки. [дискету](../item/floppy.md) можно вытащить, после установки системы и перезапуска компьютера. OpenOS может быть установлена на все устройства, за исключением [дронов](../item/drone.md) и [микроконтроллеров](../block/microcontroller.md) (оба вида могут быть запрограммированы только с помощью [EEPROM](../item/eeprom.md) потому, что они не имеют собственной файловой системы). + +OpenOS имеет множество встроенных функций, вы также можете использовать команду `lua`, чтобы открыть интерпретатор Lua. Это наилучший способ проверки работы команд и экспериментов с API, перед написанием .lua скрипта. Также прочитайте информацию, отображаемую при запуске интерпретатора, она покажет вам, как вывести результаты выполнения команды и как выйти из интерпретатора. + +Для более подробной информации, прочитайте страницу [Программирование на Lua](lua.md). Для запуска Lua скриптов, просто напечатайте имя скрипта и нажмите Enter (например, `script.lua` может быть запущен командой `script` в терминале). diff --git a/src/main/resources/assets/opencomputers/doc/ru_RU/general/quickstart.md b/src/main/resources/assets/opencomputers/doc/ru_RU/general/quickstart.md new file mode 100644 index 000000000..6b72085ff --- /dev/null +++ b/src/main/resources/assets/opencomputers/doc/ru_RU/general/quickstart.md @@ -0,0 +1,50 @@ +# Быстрый старт + +Также это руководство можно назвать "как сделать компьютер". Для запуска вашего первого [компьютера](computer.md) вам нужно его корректно собрать. В OpenComputers доступно большое количество компьютеров, но мы начнем с самого простого: обычного компьютера. + +**Примечание**: это пошаговая инструкция, которая позволит вам понять базовые принципы мода. Если вы никогда не собирали компьютер в реальной жизни или вы совсем не знаете этот мод, мы рекомендуем вам прочитать эту страницу. + +Сперва, вам понадобится [системный блок](../block/case1.md). Этот блок будет содержать все компоненты вашего компьютера и именно с него начинается создание компьютера. + +![Системный блок уровня 2.](oredict:oc:case2) + +Например, вам потребуется выбрать, [видеокарту](../item/graphicsCard1.md) какого уровня вы будете использовать, а может вам требуется [сетевая](../item/lanCard.md) или [редстоун](../item/redstoneCard1.md) карта или вы играете в креативе, тогда вам может понадобиться [отладочная карта](../item/debugCard.md). + +Когда вы откроете интерфейс [системного блока](../block/case1.md) вы увидите несколько слотов. Количество слотов и уровень компонентов, которые могут быть установлены (показано римскими цифрами в слоте) зависит от уровня системного блока. +![Интерфейс системного блока уровня 2.](opencomputers:doc/img/configuration_case1.png) +Пустые [системные блоки](../block/case1.md) бесполезны. Вы можете попытаться включить [компьютер](computer.md), но вы получите только сообщение о ошибке в чат, а также звуковой сигнал. Сообщение о ошибке указывает, что компьютерам нужна энергия для работы. Подключите ваш [компьютер](computer.md) к источнику энергии, напрямую или через [конвертер энергии](../block/powerConverter.md). + +При повторной попытке запуска, вы получите сообщение, о необходимости установки [процессора](../item/cpu1.md). Они бывают разных уровней, эта тенденция используется во всем OpenComputers. Чем выше уровень [процессора](../item/cpu1.md), тем больше компонентов он сможет использовать, а также, тем быстрее он работает. Выберите уровень и поместите процессор в [системный блок](../block/case1.md). + +После чего вы должны вставить [планки памяти](../item/ram1.md). Звуковой сигнал будет другим: 1 длинный и 1 короткий. Чем выше уровень [планок памяти](../item/ram1.md), тем больше памяти доступно программам на вашем [компьютере](computer.md). Для запуска [OpenOS](openOS.md), требуется как минимум две [планки памяти](../item/ram1.md) уровня 1. + +Так уже гораздо лучше. Теперь ваш [системный блок](../block/case1.md) выглядит примерно так: +![Частично собранный компьютер.](opencomputers:doc/img/configuration_case2.png) +И вот, попытка включения не выдает никаких сообщений! Но увы, он не запускается. При этом компьютер выдаст двойной звуковой сигнал. Это означает, что попытка запуска [компьютера](computer.md) не удалась. Другими словами: технически он работает! И тут нам на помощь приходит замечательный инструмент: [анализатор](../item/analyzer.md). Данный инструмент позволяет получать информацию о блоках OpenComputers, а также о некоторых блоках из другим модов. Для использования [анализатора](../item/analyzer.md) на [компьютере](computer.md) кликните по нему (с зажатой клавишей Shift). + +Вы получите сообщение, почему [компьютер](computer.md) не запускается: +`no bios found; install configured EEPROM` + +Самое главное здесь, это *настроенный*. Создать [EEPROM](../item/eeprom.md) очень просто. Для настройки, вы можете использовать [компьютер](computer.md), что немного сложно в данный момент, поэтому используйте его для крафта "Lua BIOS" [EEPROM](../item/eeprom.md). Обычно это [EEPROM](../item/eeprom.md) и [manual](../item/manual.md) расположенные рядом в верстаке. Поместите настроенный [EEPROM](../item/eeprom.md) в ваш [компьютер](computer.md) и..... + +Ничего. Совсем ничего. Но мы умеем использовать [анализатор](../item/analyzer.md), это очень удобно! В результате получаем другое сообщение: +`no bootable medium found; file not found` + +Ну что ж. BIOS работает и это хорошо. Но компьютер не может запустить операционную систему, тут нам потребуется [дискеты](../item/floppy.md) или [жесткий диск](../item/hdd1.md). Lua BIOS ожидает наличия в файловой системе файла `init.lua`, с которого начинается загрузка операционной системы. Вы, наверное догадались, что нам нужна дискета с операционной системой. Соедините пустую [дискету](../item/floppy.md) и [руководство](../item/manual.md) для создания дискеты с [OpenOS](openOS.md). + +Даже, если использовать [системный блок](../block/case2.md) уровня 2 (как на скриншотах выше), вы не сможете вставить дискету. Если вы будете использовать [системный блок](../block/case3.md) уровня 3 или креативный, вы сможете легко вставить дискету в [системный блок](../block/case1.md). Значит, нам потребуется [дисковод](../block/diskDrive.md) рядом с системным блоком (или подключенный с помощью [кабеля](../block/cable.md)). Как только вставите дискету, вы знаете, что делать. Включите компьютер. + +Он ожил! Ну или должен был. Если этого не произошло, значит что-то пошло не так и нам снова поможет [анализатор](../item/analyzer.md). Если предположить, что компьютер заработал, то вы проделали огромную работу. Самая сложная часть позади. Теперь осталось напечатать что-либо и вывести результат. + +Чтобы [компьютер](computer.md) мог выводить информацию, вы должны установить [монитор](../block/screen1.md) и [видеокарту](../item/graphicsCard1.md). +![Нет, это не плоский экран.](oredict:oc:screen2) + +Установите [монитор](../block/screen1.md) рядом с [системным блоком](../block/case1.md) или подключите его с помощью [кабеля](../block/cable.md). После чего установите [видеокарту](../item/graphicsCard1.md), которую вы выбрали в [системный блок](../block/case1.md). Вы должны увидеть мигающий курсор на [мониторе](../block/screen1.md). Теперь, установите [клавиатуру](../block/keyboard.md) перед [монитором](../block/screen1.md) или на одну из его сторон, чтобы получить возможность вводить текст с [клавиатуры](../block/keyboard.md). + +На этом все. Теперь ваш [компьютер](computer.md) запущен, работает и ожидает команд. Попробуйте что-нибудь напечатать! Введите `lua` и нажмите Enter, после чего вы получите приветственное сообщение интерпретатора Lua. Здесь вы можете выполнять простые команды Lua. Для более подробной информации, прочтите страницу о [Lua](lua.md). + +![Оно живое!](opencomputers:doc/img/configuration_done.png) + +Получите удовольствие, от создания сложных [компьютеров](computer.md), совместно [серверами](../item/server1.md) и сборкой [роботов](../block/robot.md), [дронов](../item/drone.md), [микроконтроллеров](../block/microcontroller.md) и [планшетов](../item/tablet.md) в [сборщике роботов](../block/assembler.md). + +Хорошего кода вам! diff --git a/src/main/resources/assets/opencomputers/doc/ru_RU/index.md b/src/main/resources/assets/opencomputers/doc/ru_RU/index.md new file mode 100644 index 000000000..47b8aee3b --- /dev/null +++ b/src/main/resources/assets/opencomputers/doc/ru_RU/index.md @@ -0,0 +1,39 @@ +# Руководство OpenComputers + +OpenComputers это мод, который добавляет модульные и настраиваемые [компьютеры](general/computer.md), [серверы](item/server1.md), [роботов](block/robot.md) и [дронов](item/drone.md) в игру, которые сохраняют свое состояние. Все устройства могут быть запрограммированы на языке Lua 5.2, что позволяет работать на системах любой сложности. + +Чтобы понять, как использовать руководство, прочитайте [эту страницу](item/manual.md) (этот зеленый текст - ссылка, кликните на него). + +## Содержание + +### Устройства +- [Компьютеры](general/computer.md) +- [Серверы](item/server1.md) +- [Микроконтроллеры](block/microcontroller.md) +- [Роботы](block/robot.md) +- [Дроны](item/drone.md) + +### Программы и программирование +- [OpenOS](general/openOS.md) +- [Lua](general/lua.md) + +### Блоки и предметы +- [Предметы](item/index.md) +- [Блоки](block/index.md) + +### Обучение +- [С чего начать?](general/quickstart.md) + +## Обзор + +Как упоминалось выше, компьютеры в OpenComputers сохраняют свое состояние, это означает, что [компьютер](general/computer.md) сохраняет свое состояние, даже если чанк был отгружен. Это означает, что если игрок отошел от [компьютера](general/computer.md) или вышел, то [компьютер](general/computer.md) запомнит свое последнее состояние и продолжит работу, тогда, когда игрок снова окажется около [компьютера](general/computer.md). Так работают все блоки, за исключением [планшетов](item/tablet.md). + +Все устройства модульные и могут быть собраны с большим количеством различных компонентов, также как [компьютеры](general/computer.md) в реальной жизни. Игроки, которые любят что-либо мастерить, могут собрать себе робота таким, каким хотят. Если потребуется, устройства могут быть [разобраны](block/disassembler.md). Для [компьютеров](general/computer.md) и [серверов](item/server1.md), компоненты могут быть заменены простым вынимаем из системного блока. + +Устройства OpenComputers совместимы с множеством других модов, что позволяет производить манипуляции над блоками и сущностями (через [адаптер](block/adapter.md) или добавляет специфические улучшения для [роботов](block/robot.md) и [дронов](item/drone.md)). Энергия может быть также получена из других модов, например, Redstone Flux, IndustrialCraft2 EU, Mekanism Joules, Applied Energistics 2 и Factorization Charge. + +Большинство устройств работают под простой операционной системой [OpenOS](general/openOS.md) (за исключением [дронов](item/drone.md) и [микроконтроллеров](block/microcontroller.md). OpenComputers позволяет создавать операционные системы и архитектуры, такими, какими захочет пользователь. + +Устройства имеют доступ к таким ресурсам, как [жесткий диск](item/hdd1.md) и [память (RAM)](item/ram1.md). [Микроконтроллеры](block/microcontroller.md) это дешевые [компьютеры](general/computer.md) с меньшим функционалом и компонентами, они не имеют файловой системы, требуют креатива для программирования. [Роботы](block/robot.md) это мобильные [компьютеры](general/computer.md) они могут взаимодействовать с блоками и существами (но не могут взаимодействовать с внешними компонентами OpenComputers). [Дроны](item/drone.md) это быстрые, entity-based [роботы](block/robot.md) с ограниченным функционалом, возможностью двигаться и взаимодействовать с миром отлично от роботов. [Серверы](item/server1.md) продвинутые [компьютеры](general/computer.md) могут содержать много компонентов, позволяют запускать огромные программы и управлять большими сетями. + +Данное руководство содержит детальную информацию обо всех блоках и предметах, о установке систем и устройств, а также введение в программирование на Lua. diff --git a/src/main/resources/assets/opencomputers/doc/ru_RU/item/abstractBusCard.md b/src/main/resources/assets/opencomputers/doc/ru_RU/item/abstractBusCard.md new file mode 100644 index 000000000..fbee0fa7a --- /dev/null +++ b/src/main/resources/assets/opencomputers/doc/ru_RU/item/abstractBusCard.md @@ -0,0 +1,5 @@ +# Карта абстрактной шины + +![Нужно больше сетей!](oredict:oc:abstractBusCard) + +Карта позволяет [компьютерам](../general/computer.md), [серверам](server1.md) и [роботам](../block/robot.md) взаимодействовать с абстрактной шиной мода StargateTech2. Если карта установлена, блоки подключаются к абстрактной шине и позволяет передавать сообщения с ее помощью. Входящие абстрактные сообщения будут конвертированы в сигналы и направлены в машину. diff --git a/src/main/resources/assets/opencomputers/doc/ru_RU/item/acid.md b/src/main/resources/assets/opencomputers/doc/ru_RU/item/acid.md new file mode 100644 index 000000000..2468909e7 --- /dev/null +++ b/src/main/resources/assets/opencomputers/doc/ru_RU/item/acid.md @@ -0,0 +1,5 @@ +# Кислота + +![Отлив?](oredict:oc:materialAcid) + +При использовании сложных рецептов, нужно использовать кислоту на [печатной плате](circuitBoard.md) перед созданием [отпечатанной печатной платы](printedCircuitBoard.md). diff --git a/src/main/resources/assets/opencomputers/doc/ru_RU/item/alu.md b/src/main/resources/assets/opencomputers/doc/ru_RU/item/alu.md new file mode 100644 index 000000000..441965834 --- /dev/null +++ b/src/main/resources/assets/opencomputers/doc/ru_RU/item/alu.md @@ -0,0 +1,5 @@ +# Арифметико-логическая единица + +![Я могу считать!](oredict:oc:materialALU) + +Используется для крафта компонентов, в которых происходят вычисления, таких как [процессоры](cpu1.md) и [видеокарты](graphicsCard1.md). diff --git a/src/main/resources/assets/opencomputers/doc/ru_RU/item/analyzer.md b/src/main/resources/assets/opencomputers/doc/ru_RU/item/analyzer.md new file mode 100644 index 000000000..d17b07e27 --- /dev/null +++ b/src/main/resources/assets/opencomputers/doc/ru_RU/item/analyzer.md @@ -0,0 +1,7 @@ +# Анализатор + +![Что же это такое.](oredict:oc:analyzer) + +Анализатор это ручной инструмент, предназначенный для получения информации о блоках OpenComputers. Просто активируйте блок, для получения информации в чат. В зависимости от блока вы можете получить как адрес компонента и информацию о уровне энергии, так и информацию о ошибке, из-за которой [компьютер](../general/computer.md) не работает. + +Вы можете зажать кнопку Ctrl и кликнуть правой кнопкой мыши по блоку или компоненту, в результате адрес этого блока или компонента будет скопирован у буфер обмена. Данная информация может быть вставлена позже в окно [компьютера](../general/computer.md). \ No newline at end of file diff --git a/src/main/resources/assets/opencomputers/doc/ru_RU/item/angelUpgrade.md b/src/main/resources/assets/opencomputers/doc/ru_RU/item/angelUpgrade.md new file mode 100644 index 000000000..99b8d4274 --- /dev/null +++ b/src/main/resources/assets/opencomputers/doc/ru_RU/item/angelUpgrade.md @@ -0,0 +1,5 @@ +# Улучшение - Ангельский блок + +![Аллилуйя](oredict:oc:angelUpgrade) + +Данное улучшение позволяет [роботам](../block/robot.md) ставить блоки прямо в воздухе, без соседнего блока. \ No newline at end of file diff --git a/src/main/resources/assets/opencomputers/doc/ru_RU/item/arrowKeys.md b/src/main/resources/assets/opencomputers/doc/ru_RU/item/arrowKeys.md new file mode 100644 index 000000000..af6eb5fe1 --- /dev/null +++ b/src/main/resources/assets/opencomputers/doc/ru_RU/item/arrowKeys.md @@ -0,0 +1,5 @@ +# Клавиши со стрелками + +![Просто нажми нужную кнопку.](oredict:oc:materialArrowKey) + +Это необходимый элемент для крафта [клавиатуры](../block/keyboard.md). diff --git a/src/main/resources/assets/opencomputers/doc/ru_RU/item/batteryUpgrade1.md b/src/main/resources/assets/opencomputers/doc/ru_RU/item/batteryUpgrade1.md new file mode 100644 index 000000000..571974c2c --- /dev/null +++ b/src/main/resources/assets/opencomputers/doc/ru_RU/item/batteryUpgrade1.md @@ -0,0 +1,5 @@ +# Улучшение - Аккумулятор + +![Сделано из металла.](oredict:oc:batteryUpgrade1) + +Данное улучшение увеличивает объем внутреннего энергохранилища, что позволяет [роботам](../block/robot.md) и [планшетам](tablet.md) работать гораздо дольше без [зарядки](../block/charger.md). Чем выше уровень батареи, тем больше энергии она может хранить. diff --git a/src/main/resources/assets/opencomputers/doc/ru_RU/item/batteryUpgrade2.md b/src/main/resources/assets/opencomputers/doc/ru_RU/item/batteryUpgrade2.md new file mode 100644 index 000000000..0281a4533 --- /dev/null +++ b/src/main/resources/assets/opencomputers/doc/ru_RU/item/batteryUpgrade2.md @@ -0,0 +1 @@ +#REDIRECT batteryUpgrade1.md \ No newline at end of file diff --git a/src/main/resources/assets/opencomputers/doc/ru_RU/item/batteryUpgrade3.md b/src/main/resources/assets/opencomputers/doc/ru_RU/item/batteryUpgrade3.md new file mode 100644 index 000000000..0281a4533 --- /dev/null +++ b/src/main/resources/assets/opencomputers/doc/ru_RU/item/batteryUpgrade3.md @@ -0,0 +1 @@ +#REDIRECT batteryUpgrade1.md \ No newline at end of file diff --git a/src/main/resources/assets/opencomputers/doc/ru_RU/item/buttonGroup.md b/src/main/resources/assets/opencomputers/doc/ru_RU/item/buttonGroup.md new file mode 100644 index 000000000..86da13c70 --- /dev/null +++ b/src/main/resources/assets/opencomputers/doc/ru_RU/item/buttonGroup.md @@ -0,0 +1,5 @@ +# Группа кнопок + +![Нужно больше кнопок.](oredict:oc:materialButtonGroup) + +Необходимый компонент для крафта [клавиатуры](../block/keyboard.md). diff --git a/src/main/resources/assets/opencomputers/doc/ru_RU/item/card.md b/src/main/resources/assets/opencomputers/doc/ru_RU/item/card.md new file mode 100644 index 000000000..bd38aa171 --- /dev/null +++ b/src/main/resources/assets/opencomputers/doc/ru_RU/item/card.md @@ -0,0 +1,5 @@ +# Карта + +![Не может быть прочитано.](oredict:oc:materialCard) + +Обычный компонент для крафта карт в OpenComputers (например [видеокарт](graphicsCard1.md), [сетевых карт](lanCard.md) и т.д.). diff --git a/src/main/resources/assets/opencomputers/doc/ru_RU/item/cardContainer1.md b/src/main/resources/assets/opencomputers/doc/ru_RU/item/cardContainer1.md new file mode 100644 index 000000000..b8aa1f351 --- /dev/null +++ b/src/main/resources/assets/opencomputers/doc/ru_RU/item/cardContainer1.md @@ -0,0 +1,5 @@ +# Контейнер для карт + +![Может хранить карты!](oredict:oc:cardContainer1) + +Контейнер для карт, как дополнение к улучшению для [роботов](../block/robot.md) позволяет добавлять/извлекать карты в/из [роботов](../block/robot.md). Максимальный уровень карты зависит от уровня контейнера. diff --git a/src/main/resources/assets/opencomputers/doc/ru_RU/item/cardContainer2.md b/src/main/resources/assets/opencomputers/doc/ru_RU/item/cardContainer2.md new file mode 100644 index 000000000..16d29de27 --- /dev/null +++ b/src/main/resources/assets/opencomputers/doc/ru_RU/item/cardContainer2.md @@ -0,0 +1 @@ +#REDIRECT cardContainer1.md \ No newline at end of file diff --git a/src/main/resources/assets/opencomputers/doc/ru_RU/item/cardContainer3.md b/src/main/resources/assets/opencomputers/doc/ru_RU/item/cardContainer3.md new file mode 100644 index 000000000..16d29de27 --- /dev/null +++ b/src/main/resources/assets/opencomputers/doc/ru_RU/item/cardContainer3.md @@ -0,0 +1 @@ +#REDIRECT cardContainer1.md \ No newline at end of file diff --git a/src/main/resources/assets/opencomputers/doc/ru_RU/item/chamelium.md b/src/main/resources/assets/opencomputers/doc/ru_RU/item/chamelium.md new file mode 100644 index 000000000..71146b61b --- /dev/null +++ b/src/main/resources/assets/opencomputers/doc/ru_RU/item/chamelium.md @@ -0,0 +1,9 @@ +# Хамелиум + +![Такая интересная штука.](oredict:oc:chamelium) + +Это основной материал, используемый в [3D печати](../block/print.md) на [3D принтерах](../block/printer.md). Сам по себе он не представляет ценности. + +Вы можете объединять его, для получения [блоков хамелиума](../block/chameliumBlock.md). + +Несъедобно. diff --git a/src/main/resources/assets/opencomputers/doc/ru_RU/item/chip1.md b/src/main/resources/assets/opencomputers/doc/ru_RU/item/chip1.md new file mode 100644 index 000000000..d747ebfea --- /dev/null +++ b/src/main/resources/assets/opencomputers/doc/ru_RU/item/chip1.md @@ -0,0 +1,5 @@ +# Микрочипы + +![Не съедобные.](oredict:oc:circuitChip1) + +Микрочипы - основа крафта электронных компонентов в OpenComputers. Они имеют различные уровни, для крафта компонентов разных уровней. diff --git a/src/main/resources/assets/opencomputers/doc/ru_RU/item/chip2.md b/src/main/resources/assets/opencomputers/doc/ru_RU/item/chip2.md new file mode 100644 index 000000000..5679bbdeb --- /dev/null +++ b/src/main/resources/assets/opencomputers/doc/ru_RU/item/chip2.md @@ -0,0 +1 @@ +#REDIRECT chip1.md \ No newline at end of file diff --git a/src/main/resources/assets/opencomputers/doc/ru_RU/item/chip3.md b/src/main/resources/assets/opencomputers/doc/ru_RU/item/chip3.md new file mode 100644 index 000000000..5679bbdeb --- /dev/null +++ b/src/main/resources/assets/opencomputers/doc/ru_RU/item/chip3.md @@ -0,0 +1 @@ +#REDIRECT chip1.md \ No newline at end of file diff --git a/src/main/resources/assets/opencomputers/doc/ru_RU/item/chunkloaderUpgrade.md b/src/main/resources/assets/opencomputers/doc/ru_RU/item/chunkloaderUpgrade.md new file mode 100644 index 000000000..607aacbdc --- /dev/null +++ b/src/main/resources/assets/opencomputers/doc/ru_RU/item/chunkloaderUpgrade.md @@ -0,0 +1,7 @@ +# Улучшение - Чанклоадер + +![Работает всегда.](oredict:oc:chunkloaderUpgrade) + +Данное улучшение может быть установлено (например, в [роботов](../block/robot.md) и [микроконтроллеры](../block/microcontroller.md)), чтобы устройства могли загружать чанки, в которых они находятся, а также соседние чанки. Однако на это требуется энергия. Чанклоадер может быть включен или выключен через API. + +Улучшение автоматически включается при включении устройства и выключается вместе с ним. diff --git a/src/main/resources/assets/opencomputers/doc/ru_RU/item/circuitBoard.md b/src/main/resources/assets/opencomputers/doc/ru_RU/item/circuitBoard.md new file mode 100644 index 000000000..430d1468b --- /dev/null +++ b/src/main/resources/assets/opencomputers/doc/ru_RU/item/circuitBoard.md @@ -0,0 +1,4 @@ +# Печатная плата +![Нужно больше золота.](oredict:oc:materialCircuitBoard) + +Результат крафта из [заготовки печатной платы](rawCircuitBoard.md), используется для создания [отпечатанной печатной платы](printedCircuitBoard.md). diff --git a/src/main/resources/assets/opencomputers/doc/ru_RU/item/componentBus1.md b/src/main/resources/assets/opencomputers/doc/ru_RU/item/componentBus1.md new file mode 100644 index 000000000..2f73d6a1d --- /dev/null +++ b/src/main/resources/assets/opencomputers/doc/ru_RU/item/componentBus1.md @@ -0,0 +1,10 @@ +# Компонентая шина + +![Нужно больше.....](oredict:oc:componentBus1) + +Компонентная шина это [серверное](server1.md) улучшение, которое позволяет [серверам](server1.md) взаимодействовать с большим количеством компонентов. Например [процессорами](cpu1.md), чем выше уровень шины, тем выше уровень компонента, который можно вставить. Чем выше уровень [сервера](server1.md), тем больше компонентных шин вы сможете вставить. + +Количество компонентов, к которому имеет компонентная шина: +- Уровень 1: 8 компонентов. +- Уровень 2: 12 компонентов. +- Уровень 3: 16 компонентов. diff --git a/src/main/resources/assets/opencomputers/doc/ru_RU/item/componentBus2.md b/src/main/resources/assets/opencomputers/doc/ru_RU/item/componentBus2.md new file mode 100644 index 000000000..a49cd378a --- /dev/null +++ b/src/main/resources/assets/opencomputers/doc/ru_RU/item/componentBus2.md @@ -0,0 +1 @@ +#REDIRECT componentBus1.md \ No newline at end of file diff --git a/src/main/resources/assets/opencomputers/doc/ru_RU/item/componentBus3.md b/src/main/resources/assets/opencomputers/doc/ru_RU/item/componentBus3.md new file mode 100644 index 000000000..a49cd378a --- /dev/null +++ b/src/main/resources/assets/opencomputers/doc/ru_RU/item/componentBus3.md @@ -0,0 +1 @@ +#REDIRECT componentBus1.md \ No newline at end of file diff --git a/src/main/resources/assets/opencomputers/doc/ru_RU/item/controlUnit.md b/src/main/resources/assets/opencomputers/doc/ru_RU/item/controlUnit.md new file mode 100644 index 000000000..cb353ccda --- /dev/null +++ b/src/main/resources/assets/opencomputers/doc/ru_RU/item/controlUnit.md @@ -0,0 +1,5 @@ +# Блок управления + +![Теперь с круиз-контролем.](oredict:oc:materialCU) + +Чем выше уровень и сложность предмета, тем совершеннее компоненты ему нужны, например [процессоры](cpu1.md). diff --git a/src/main/resources/assets/opencomputers/doc/ru_RU/item/cpu1.md b/src/main/resources/assets/opencomputers/doc/ru_RU/item/cpu1.md new file mode 100644 index 000000000..2d04578b8 --- /dev/null +++ b/src/main/resources/assets/opencomputers/doc/ru_RU/item/cpu1.md @@ -0,0 +1,14 @@ +# Процессор + +![Мозги...](oredict:oc:cpu1) + +Основа всех [компьютеров](../general/computer.md) и [серверов](server1.md). Устанавливает архитектуру [компьютера](../general/computer.md) и количество компонентов, которые могут быть подключены к [компьютеру](../general/computer.md), прежде чем он перестанет работать. Чем выше уровень процессора, тем быстрее работает ваш [компьютер](../general/computer.md) - все просто. + +Количество компонентов, к которым имеет доступ процессор: +- Уровень 1: 8 компонентов. +- Уровень 2: 12 компонентов. +- Уровень 3: 16 компонентов. + +В [серверах](server1.md), количество компонентов расширяется с помощью [компонентных шин](componentBus1.md). + +Если к [компьютеру](../general/computer.md) подключено больше компонентов, чем может использовать процессор, он не включится. diff --git a/src/main/resources/assets/opencomputers/doc/ru_RU/item/cpu2.md b/src/main/resources/assets/opencomputers/doc/ru_RU/item/cpu2.md new file mode 100644 index 000000000..b62149ec4 --- /dev/null +++ b/src/main/resources/assets/opencomputers/doc/ru_RU/item/cpu2.md @@ -0,0 +1 @@ +#REDIRECT cpu1.md \ No newline at end of file diff --git a/src/main/resources/assets/opencomputers/doc/ru_RU/item/cpu3.md b/src/main/resources/assets/opencomputers/doc/ru_RU/item/cpu3.md new file mode 100644 index 000000000..b62149ec4 --- /dev/null +++ b/src/main/resources/assets/opencomputers/doc/ru_RU/item/cpu3.md @@ -0,0 +1 @@ +#REDIRECT cpu1.md \ No newline at end of file diff --git a/src/main/resources/assets/opencomputers/doc/ru_RU/item/craftingUpgrade.md b/src/main/resources/assets/opencomputers/doc/ru_RU/item/craftingUpgrade.md new file mode 100644 index 000000000..b481b303c --- /dev/null +++ b/src/main/resources/assets/opencomputers/doc/ru_RU/item/craftingUpgrade.md @@ -0,0 +1,5 @@ +# Улучшение - Верстак + +![Скрафти это.](oredict:oc:craftingUpgrade) + +Это улучшение позволяет [роботам](../block/robot.md) крафтить простые предметы, используя свой [инвентарь](../item/inventoryUpgrade.md). Для крафта используется сетка 3 на 3 слота (левый верхний угол) в [инвентаре](../item/inventoryUpgrade.md) [робота](../block/robot.md). Предметы должны быть расположены в соответствии с рецептом. Результаты крафта будут помещены в [инвентарь](../item/inventoryUpgrade.md) [робота](../block/robot.md). Также результат может быть помещен в выбранный слот, если он заполнен, тогда используется следующий слот. Когда место в инвентаре заканчивается, результаты крафта будут выброшены в мир. diff --git a/src/main/resources/assets/opencomputers/doc/ru_RU/item/cuttingWire.md b/src/main/resources/assets/opencomputers/doc/ru_RU/item/cuttingWire.md new file mode 100644 index 000000000..9da22c97d --- /dev/null +++ b/src/main/resources/assets/opencomputers/doc/ru_RU/item/cuttingWire.md @@ -0,0 +1,5 @@ +# Проволока + +![Не гаррота. Лучше.](oredict:oc:materialCuttingWire) + +Предмет используется в сложных рецептах, нужен для создания [заготовки печатной платы](rawCircuitBoard.md). Очень неэффективно. diff --git a/src/main/resources/assets/opencomputers/doc/ru_RU/item/databaseUpgrade1.md b/src/main/resources/assets/opencomputers/doc/ru_RU/item/databaseUpgrade1.md new file mode 100644 index 000000000..35af7a69e --- /dev/null +++ b/src/main/resources/assets/opencomputers/doc/ru_RU/item/databaseUpgrade1.md @@ -0,0 +1,9 @@ +# Улучшение - База данных + +![Она существует.](oredict:oc:databaseUpgrade1) + +Улучшение может быть настроено на хранение списка стаков предметов, которые могут быть использованы другими компонентами. Это особенно полезно для элементов, которые отличаются на основе NBT данных. + +Для конфигурации базы данных, откройте ее, кликнув правой кнопкой мыши с базой данных в руке. Поместите стаки предметов, которые на которые вы хотите сконфигурировать в верхнюю часть инвентаря. Это будут "призрачные стаки", т.е. не "реальные" предметы, хранящиеся в базе данных. + +Также база данных может быть сконфигурирована автоматически, через API предоставленным [контроллером инвентаря](inventoryControllerUpgrade.md) и [анализатором](../block/geolyzer.md). diff --git a/src/main/resources/assets/opencomputers/doc/ru_RU/item/databaseUpgrade2.md b/src/main/resources/assets/opencomputers/doc/ru_RU/item/databaseUpgrade2.md new file mode 100644 index 000000000..196a017a3 --- /dev/null +++ b/src/main/resources/assets/opencomputers/doc/ru_RU/item/databaseUpgrade2.md @@ -0,0 +1 @@ +#REDIRECT databaseUpgrade1.md \ No newline at end of file diff --git a/src/main/resources/assets/opencomputers/doc/ru_RU/item/databaseUpgrade3.md b/src/main/resources/assets/opencomputers/doc/ru_RU/item/databaseUpgrade3.md new file mode 100644 index 000000000..196a017a3 --- /dev/null +++ b/src/main/resources/assets/opencomputers/doc/ru_RU/item/databaseUpgrade3.md @@ -0,0 +1 @@ +#REDIRECT databaseUpgrade1.md \ No newline at end of file diff --git a/src/main/resources/assets/opencomputers/doc/ru_RU/item/debugCard.md b/src/main/resources/assets/opencomputers/doc/ru_RU/item/debugCard.md new file mode 100644 index 000000000..270d4a1a1 --- /dev/null +++ b/src/main/resources/assets/opencomputers/doc/ru_RU/item/debugCard.md @@ -0,0 +1,7 @@ +# Отладочная карта + +![Подождите.](item:OpenComputers:item@73) + +Отладочная карта, это креативный предмет, предназначенный изначально для отладки некоторых вещей, за счет автоматизации процесса. С тех пор она обрела большую функциональность, что делает ее идеальным инструментом для создания карт. + +Обратите внимание, что вы можете привязать/отвязать карту, нажав кнопку `Красться`, держа в руках карту, это означает, что `команды` будут выполнены на основе вашего уровня доступа, а не умолчаний OpenComputers. diff --git a/src/main/resources/assets/opencomputers/doc/ru_RU/item/disk.md b/src/main/resources/assets/opencomputers/doc/ru_RU/item/disk.md new file mode 100644 index 000000000..186fee69a --- /dev/null +++ b/src/main/resources/assets/opencomputers/doc/ru_RU/item/disk.md @@ -0,0 +1,5 @@ +# Диск + +![Памяти Terry Pratchett.](oredict:oc:materialDisk) + +Базовый компонент для создания устройств хранения информации, таких как [дискеты](floppy.md) и [жесткие диски](hdd1.md). diff --git a/src/main/resources/assets/opencomputers/doc/ru_RU/item/drone.md b/src/main/resources/assets/opencomputers/doc/ru_RU/item/drone.md new file mode 100644 index 000000000..96ee74f9a --- /dev/null +++ b/src/main/resources/assets/opencomputers/doc/ru_RU/item/drone.md @@ -0,0 +1,5 @@ +# Дрон + +![Большой брат следит за тобой.](item:OpenComputers:item@84) + +Дроны собираются из [корпуса дрона](droneCase1.md) в [сборщике роботов](../block/assembler.md). Они entity-based [роботы](../block/robot.md), но с меньшим функционалом. Они также могут перемещаться по диагонали и быстрее чем [роботы](../block/robot.md), также они обычно контролируются с помощью программы на [компьютере](../general/computer.md). Дроны могут быть сконфигурированы с помощью [EEPROM](eeprom.md) для выполнения различных комманд. diff --git a/src/main/resources/assets/opencomputers/doc/ru_RU/item/droneCase1.md b/src/main/resources/assets/opencomputers/doc/ru_RU/item/droneCase1.md new file mode 100644 index 000000000..b1f8d815b --- /dev/null +++ b/src/main/resources/assets/opencomputers/doc/ru_RU/item/droneCase1.md @@ -0,0 +1,34 @@ +# Корпус дрона + +![Полетели.](oredict:oc:droneCase1) + +Корпус дрона используется для создания [дронов](drone.md) в [сборщике роботов](../block/assembler.md). [Дроны](drone.md) легковесны, быстры и очень мобильны, но с ограниченной функциональностью. В отличие от [роботов](../block/robot.md) они не могут использовать инструменты и могут ограниченно взаимодействовать с игровым миром. + +Их ограничения обусловлены скорость передвижения и низкими энергозатратами. Они созданы для переноса небольших количеств предметов и идеально подходят для разведки. Использование [дрона](drone.md) вместе с [роботом](../block/robot.md) дает большие возможности, с [роботом](../block/robot.md) выполняем тяжелую работу, а с помощью [дрона](drone.md) предоставляем информацию о окружении и переносим предметы. + +Также как и [микроконтроллеры](../block/microcontroller.md), [дроны](drone.md) могут быть запрограммированы только с помощью [EEPROM](eeprom.md). Также, [EEPROM](eeprom.md) может быть изменен, для этого нужно скрафтить этого [дрона](drone.md) с другим [EEPROM](eeprom.md); старый [EEPROM](eeprom.md) при этом будет возвращен игроку. + +Корпус дрона 1 уровня позволяет использовать следующие компоненты: +- 1x [процессор](cpu1.md) уровня 1 +- 1x [планка памяти](ram1.md) уровня 1 +- 1x [EEPROM](eeprom.md) +- 1x карта расширения уровня 2 +- 1x карта расширения уровня 1 +- 1x улучшение уровня 1 +- 1x улучшение уровня 2 + +Корпус дрона 2 уровня позволяет использовать следующие компоненты: +- 1x [процессор](cpu1.md) уровня 1 +- 2x [планки памяти](ram1.md) уровня 1 +- 1x [EEPROM](eeprom.md) +- 2x карты расширения уровня 2 +- 1x улучшение уровня 1 +- 1x улучшение уровня 2 +- 1x улучшение уровня 3 + +Корпус дрона 4 уровня (креатив) позволяет использовать следующие компоненты: +- 1x [процессор](cpu3.md) уровня 3 +- 2x [планка памяти](ram5.md) уровня 3 +- 1x [EEPROM](eeprom.md) +- 3x карты расширения уровня 3 +- 9x улучшений уровня 3 \ No newline at end of file diff --git a/src/main/resources/assets/opencomputers/doc/ru_RU/item/droneCase2.md b/src/main/resources/assets/opencomputers/doc/ru_RU/item/droneCase2.md new file mode 100644 index 000000000..702933ee7 --- /dev/null +++ b/src/main/resources/assets/opencomputers/doc/ru_RU/item/droneCase2.md @@ -0,0 +1 @@ +#REDIRECT droneCase1.md \ No newline at end of file diff --git a/src/main/resources/assets/opencomputers/doc/ru_RU/item/droneCaseCreative.md b/src/main/resources/assets/opencomputers/doc/ru_RU/item/droneCaseCreative.md new file mode 100644 index 000000000..702933ee7 --- /dev/null +++ b/src/main/resources/assets/opencomputers/doc/ru_RU/item/droneCaseCreative.md @@ -0,0 +1 @@ +#REDIRECT droneCase1.md \ No newline at end of file diff --git a/src/main/resources/assets/opencomputers/doc/ru_RU/item/eeprom.md b/src/main/resources/assets/opencomputers/doc/ru_RU/item/eeprom.md new file mode 100644 index 000000000..11b46adb5 --- /dev/null +++ b/src/main/resources/assets/opencomputers/doc/ru_RU/item/eeprom.md @@ -0,0 +1,7 @@ +# EEPROM + +![Начнем вечеринку.](oredict:oc:eeprom) + +EEPROM содержит код, который позволяет загрузить компьютер. Эти данные хранятся в виде простого массива байт, и могут различаться на [процессорах](cpu1.md) другой архитектуры. Например, для Lua обычно используют маленький скрипт, который ищет сценарий инициализации в файловой системе, для других архитектур это может быть другой машинный код. + +С помощью EEPROM могут быть запрограммированы [дроны](drone.md) и [микроконтроллеры](microcontroller.md). diff --git a/src/main/resources/assets/opencomputers/doc/ru_RU/item/experienceUpgrade.md b/src/main/resources/assets/opencomputers/doc/ru_RU/item/experienceUpgrade.md new file mode 100644 index 000000000..de53370f9 --- /dev/null +++ b/src/main/resources/assets/opencomputers/doc/ru_RU/item/experienceUpgrade.md @@ -0,0 +1,9 @@ +# Улучшение - Опыт + +![Почувствуй силу.](oredict:oc:experienceUpgrade) + +Данное улучшение имеет особый характер, оно позволяет [роботам](../block/robot.md) и [дронам](drone.md) получать опыт, за выполнение различных действий, таких как добыча руд и убийство животных. Одно улучшение может хранить до 30 уровней опыта, добавляя различные бонусы с каждым уровнем, включая увеличение скорости передвижения или увеличения энергохранилища. + +[Роботы](../block/robot.md) роботы уровня 10 и выше получают золотистый оттенок, [роботы](../block/robot.md) уровня 20 и выше получают алмазный оттенок. + +Опыт хранится в самом улучшении, таким образом, переставив улучшение в другого робота, вы переместите опыт на него. diff --git a/src/main/resources/assets/opencomputers/doc/ru_RU/item/floppy.md b/src/main/resources/assets/opencomputers/doc/ru_RU/item/floppy.md new file mode 100644 index 000000000..28fa1e4b8 --- /dev/null +++ b/src/main/resources/assets/opencomputers/doc/ru_RU/item/floppy.md @@ -0,0 +1,5 @@ +# Дискета + +![Уберите от телефона.](oredict:oc:floppy) + +Дискета это самое простое и дешевое средство хранения информации в OpenComputers. На начальных этапах это единственный способ переноса программ между [компьютерами](../general/computer.md) и [роботами](../block/robot.md). Вы также можете найти дискеты в сокровищницах. diff --git a/src/main/resources/assets/opencomputers/doc/ru_RU/item/generatorUpgrade.md b/src/main/resources/assets/opencomputers/doc/ru_RU/item/generatorUpgrade.md new file mode 100644 index 000000000..b80948652 --- /dev/null +++ b/src/main/resources/assets/opencomputers/doc/ru_RU/item/generatorUpgrade.md @@ -0,0 +1,7 @@ +# Улучшение - Генератор + +![Генератор X.](oredict:oc:generatorUpgrade) + +Улучшение позволяет устройствам заряжать себя. В данный момент поддерживается только твердое топливо, например уголь. Внутренний инвентарь генератора может хранить только один стак топлива. Топливо может быть убрано из генератора с помощью API. При вынимании генератора из [робота](../block/robot.md), его содержимое выпадает в игровой мир. + +Эффективность генераторов ниже, чем у генераторов в других модах, но этого должно хватить до [перезарядки](../block/charger.md). diff --git a/src/main/resources/assets/opencomputers/doc/ru_RU/item/graphicsCard1.md b/src/main/resources/assets/opencomputers/doc/ru_RU/item/graphicsCard1.md new file mode 100644 index 000000000..441ae7fc5 --- /dev/null +++ b/src/main/resources/assets/opencomputers/doc/ru_RU/item/graphicsCard1.md @@ -0,0 +1,7 @@ +# Видеокарта + +![Красивые картинки.](oredict:oc:graphicsCard1) + +Видеокарта является неотъемлемой частью большинства [компьютеров](../general/computer.md) и позволяет [компьютеру](../general/computer.md) выводить изображение на подключенный [монитор](../block/screen1.md). Видеокарты имеют несколько уровней, также как и [мониторы](../block/screen1.md), они поддерживают различные разрешения и глубину цвета. + +Другое отличие видеокарт разного уровня состоит в различном количестве операций, которые видеокарта может выполнить за тик. Приведенные в подсказках значения актуальны для [компьютеров](../general/computer.md) с [процессором](cpu1.md) второго уровня. Процессоры первого уровня немного медленнее, а третьего немного быстрее. Числа представлены для различных операций, выполняемых видеокартой: `copy` (копирование), `fill` (заполнение), `set` (установка), `setBackground` (установка заднего фона) и `setForeground` (установка основного фона), соответственно. diff --git a/src/main/resources/assets/opencomputers/doc/ru_RU/item/graphicsCard2.md b/src/main/resources/assets/opencomputers/doc/ru_RU/item/graphicsCard2.md new file mode 100644 index 000000000..2503631a4 --- /dev/null +++ b/src/main/resources/assets/opencomputers/doc/ru_RU/item/graphicsCard2.md @@ -0,0 +1 @@ +#REDIRECT graphicsCard1.md \ No newline at end of file diff --git a/src/main/resources/assets/opencomputers/doc/ru_RU/item/graphicsCard3.md b/src/main/resources/assets/opencomputers/doc/ru_RU/item/graphicsCard3.md new file mode 100644 index 000000000..2503631a4 --- /dev/null +++ b/src/main/resources/assets/opencomputers/doc/ru_RU/item/graphicsCard3.md @@ -0,0 +1 @@ +#REDIRECT graphicsCard1.md \ No newline at end of file diff --git a/src/main/resources/assets/opencomputers/doc/ru_RU/item/hdd1.md b/src/main/resources/assets/opencomputers/doc/ru_RU/item/hdd1.md new file mode 100644 index 000000000..b746fe12a --- /dev/null +++ b/src/main/resources/assets/opencomputers/doc/ru_RU/item/hdd1.md @@ -0,0 +1,5 @@ +# Жесткий диск + +![Место....](oredict:oc:hdd1) + +Жесткие диски это самое продвинутое хранилище информации в OpenComputers. Все виды жестких дисков имеют одинаковую скорость работы, но разный объем памяти. Некоторые устройства могут использовать только жесткие диски (хотя серверы могут использовать внешний [дисковод](../block/diskDrive.md), например). Жесткие диски могут быть объединены в [RAID](../block/raid.md), благодаря чему несколько жестких дисков будут работать как один большой. При объединении жестких дисков в [RAID](../block/raid.md) вся информация на них будет стерта. diff --git a/src/main/resources/assets/opencomputers/doc/ru_RU/item/hdd2.md b/src/main/resources/assets/opencomputers/doc/ru_RU/item/hdd2.md new file mode 100644 index 000000000..31a59d438 --- /dev/null +++ b/src/main/resources/assets/opencomputers/doc/ru_RU/item/hdd2.md @@ -0,0 +1 @@ +#REDIRECT hdd1.md \ No newline at end of file diff --git a/src/main/resources/assets/opencomputers/doc/ru_RU/item/hdd3.md b/src/main/resources/assets/opencomputers/doc/ru_RU/item/hdd3.md new file mode 100644 index 000000000..31a59d438 --- /dev/null +++ b/src/main/resources/assets/opencomputers/doc/ru_RU/item/hdd3.md @@ -0,0 +1 @@ +#REDIRECT hdd1.md \ No newline at end of file diff --git a/src/main/resources/assets/opencomputers/doc/ru_RU/item/index.md b/src/main/resources/assets/opencomputers/doc/ru_RU/item/index.md new file mode 100644 index 000000000..0e668022e --- /dev/null +++ b/src/main/resources/assets/opencomputers/doc/ru_RU/item/index.md @@ -0,0 +1,83 @@ +# Предметы + +Здесь представлен список предметов, доступных в OpenComputers. Если вы ищете блоки, проверьте [список блоков](../block/index.md). + +Некоторые блоки могут быть недоступны, в зависимости от рецепта. + +## Инструменты +* [Анализатор](analyzer.md) +* [Руководство](manual.md) +* [Терминал](terminal.md) +* [Выбор текстур](texturePicker.md) +* [Ключ](wrench.md) + +## Устройства +* [Дрон](drone.md) +* [Сервер](server1.md) +* [Планшет](tablet.md) + +## Компоненты + +### Карты +* [Карта абстрактной шины](abstractBusCard.md) +* [Отладочная карта](debugCard.md) +* [Видеокарта](graphicsCard1.md) +* [Интернет карта](internetCard.md) +* [Связанная карта](linkedCard.md) +* [Сетевая карта](lanCard.md) +* [Редстоун карта](redstoneCard1.md) +* [Беспроводная сетевая карта](wlanCard.md) +* [Мировой сенсор](worldSensorCard.md) + +### Улучшения +* [Ангельское](angelUpgrade.md) +* [Аккумулятор](batteryUpgrade1.md) +* [Хранилище карт](cardContainer1.md) +* [Чанклоадер](chunkloaderUpgrade.md) +* [Верстак](craftingUpgrade.md) +* [База данных](databaseUpgrade1.md) +* [Опыт](experienceUpgrade.md) +* [Генератор](generatorUpgrade.md) +* [Контроллер инвентаря](inventoryControllerUpgrade.md) +* [Инвентарь](inventoryUpgrade.md) +* [Поводок](leashUpgrade.md) +* [Навигация](navigationUpgrade.md) +* [Поршень](pistonUpgrade.md) +* [Табличка](signUpgrade.md) +* [Солнечная панель](solarGeneratorUpgrade.md) +* [Контроллер жидкости](tankControllerUpgrade.md) +* [Жидкость](tankUpgrade.md) +* [Притягивающий луч](tractorBeamUpgrade.md) +* [Улучшение](upgradeContainer1.md) + +### Другое +* [Компонентная шина](componentBus1.md) +* [Процессор](cpu1.md) +* [EEPROM](eeprom.md) +* [Дискета](floppy.md) +* [Жесткий диск](hdd1.md) +* [Оперативная память (RAM)](ram1.md) + +## Крафт +* [Кислота](acid.md) +* [АЛУ](alu.md) +* [Стрелочки](arrowKeys.md) +* [Группа кнопок](buttonGroup.md) +* [Карта](card.md) +* [Печатная плата](circuitBoard.md) +* [Блок управления](controlUnit.md) +* [Проволока](cuttingWire.md) +* [Диск](disk.md) +* [Интерсеть](interweb.md) +* [Микрочип](chip1.md) +* [Цифровая клавиатура](numPad.md) +* [Отпечатанная печатная плата](printedCircuitBoard.md) +* [Заготовка печатной платы](rawCircuitBoard.md) +* [Транзистор](transistor.md) + +## Сборка / Печать +* [Хамелиум](chamelium.md) +* [Картиридж с чернилами](inkCartridge.md) +* [Корпус дрона](droneCase1.md) +* [Корпус микроконтроллера](microcontrollerCase1.md) +* [Корпус планшета](tabletCase1.md) diff --git a/src/main/resources/assets/opencomputers/doc/ru_RU/item/inkCartridge.md b/src/main/resources/assets/opencomputers/doc/ru_RU/item/inkCartridge.md new file mode 100644 index 000000000..93e92d2c8 --- /dev/null +++ b/src/main/resources/assets/opencomputers/doc/ru_RU/item/inkCartridge.md @@ -0,0 +1,5 @@ +# Картридж с чернилами + +![Цвета радуги.](oredict:oc:inkCartridge) + +Картридж с чернилами используется для цветной печати в [3D принтерах](../block/printer.md). Также можно перезаправить их используя краски, но это не очень эффективно. diff --git a/src/main/resources/assets/opencomputers/doc/ru_RU/item/inkCartridgeEmpty.md b/src/main/resources/assets/opencomputers/doc/ru_RU/item/inkCartridgeEmpty.md new file mode 100644 index 000000000..2895df3c8 --- /dev/null +++ b/src/main/resources/assets/opencomputers/doc/ru_RU/item/inkCartridgeEmpty.md @@ -0,0 +1 @@ +#REDIRECT inkCartridge.md \ No newline at end of file diff --git a/src/main/resources/assets/opencomputers/doc/ru_RU/item/internetCard.md b/src/main/resources/assets/opencomputers/doc/ru_RU/item/internetCard.md new file mode 100644 index 000000000..4920fd05d --- /dev/null +++ b/src/main/resources/assets/opencomputers/doc/ru_RU/item/internetCard.md @@ -0,0 +1,7 @@ +# Интернет карта + +![Видео с котиками через 3, 2, ...](oredict:oc:internetCard) + +Интернет карта позволяет [компьютерам](../general/computer.md) выходить в интернет. Она позволяет выполнять простые HTTP запросы, а также открывать, читать и писать в TCP сокеты. + +Установка интернет карты в [компьютер](../general/computer.md) добавляет несколько интернет приложений, например приложение для загрузки/выгрузки программ в pastebin также как это делает `wget` в Linux. diff --git a/src/main/resources/assets/opencomputers/doc/ru_RU/item/interweb.md b/src/main/resources/assets/opencomputers/doc/ru_RU/item/interweb.md new file mode 100644 index 000000000..28f1beea1 --- /dev/null +++ b/src/main/resources/assets/opencomputers/doc/ru_RU/item/interweb.md @@ -0,0 +1,5 @@ +# Интерсеть + +![Вебсайт это место для видео о котиках.](oredict:oc:materialInterweb) + +Основной компонент для приборов дальней связи. Данный компонент использует странную механику, основанную на квантовой передаче сообщений через верхний мир. В основном используется для [интернет карт](internetCard.md) и [соединенных карт](linkedCard.md). diff --git a/src/main/resources/assets/opencomputers/doc/ru_RU/item/inventoryControllerUpgrade.md b/src/main/resources/assets/opencomputers/doc/ru_RU/item/inventoryControllerUpgrade.md new file mode 100644 index 000000000..be1396e4a --- /dev/null +++ b/src/main/resources/assets/opencomputers/doc/ru_RU/item/inventoryControllerUpgrade.md @@ -0,0 +1,7 @@ +# Улучшение - Контроллер инвентаря + +![Я контролирую все.](oredict:oc:inventoryControllerUpgrade) + +Контроллер инвентаря добавляет еще больше действий с инвентарем для [роботов](../block/robot.md) и [дронов](drone.md). Это позволяет устройству явно указывать слоты для внешних инвентарей. Также позволяет получать подробную информацию о стаках предметов. Напоследок позволяет [роботам](../block/robot.md) менять инструменты в зависимости от блока, без посторонней помощи. + +Данное улучшение может быть вставлено в [адаптеры](../block/adapter.md), что добавит дополнительные методы работы с инвентарем для [адаптера](../block/adapter.md) также как для [робота](../block/robot.md). Это не позволяет [адаптеру](../block/adapter.md) перемещать предметы в/из инвентари. Данная функция доступна только для [роботов](../block/robot.md) и [дронов](drone.md). diff --git a/src/main/resources/assets/opencomputers/doc/ru_RU/item/inventoryUpgrade.md b/src/main/resources/assets/opencomputers/doc/ru_RU/item/inventoryUpgrade.md new file mode 100644 index 000000000..88c3a4851 --- /dev/null +++ b/src/main/resources/assets/opencomputers/doc/ru_RU/item/inventoryUpgrade.md @@ -0,0 +1,7 @@ +# Улучшение - Инвентарь + +![Ты сможешь взять это...](oredict:oc:inventoryUpgrade) + +Улучшение позволяет добавить слоты инвентаря для [роботов](../block/robot.md) и [дронов](drone.md). Каждое улучшение дает [роботу](../block/robot.md) 16 дополнительных слотов, максимум можно получить 64 слота; а для [дронов](drone.md) можно добавить 4 слота с каждым апгрейдом, максимум 8 слотов. + +Если данное улучшение не установлено в устройство, то оно не сможешь хранить в себе предметы. diff --git a/src/main/resources/assets/opencomputers/doc/ru_RU/item/lanCard.md b/src/main/resources/assets/opencomputers/doc/ru_RU/item/lanCard.md new file mode 100644 index 000000000..7094ef65b --- /dev/null +++ b/src/main/resources/assets/opencomputers/doc/ru_RU/item/lanCard.md @@ -0,0 +1,5 @@ +# Сетевая карта + +![Войди в сеть.](oredict:oc:lanCard) + +Сетевая карта позволяет [компьютерам](../general/computer.md) отправлять и получать сетевые сообщения. Сообщения (или пакеты) будут отправлены всем принимающим устройствам в подсети или конкретной сетевой карте (после указания ее адреса). [Коммутаторы](../block/switch.md) и [точки доступа](../block/accessPoint.md) могут быть использованы для связи нескольких подсетей друг с другом, для передачи сообщений в них. Также возможно отправить письмо получателю, даже если он находится в другой подсети, если сеть подключена к одному или нескольким [коммутаторам](../block/switch.md). diff --git a/src/main/resources/assets/opencomputers/doc/ru_RU/item/leashUpgrade.md b/src/main/resources/assets/opencomputers/doc/ru_RU/item/leashUpgrade.md new file mode 100644 index 000000000..aa050db4d --- /dev/null +++ b/src/main/resources/assets/opencomputers/doc/ru_RU/item/leashUpgrade.md @@ -0,0 +1,5 @@ +# Улучшение - Поводок + +![-redacted- ~ Vexatos 2015](oredict:oc:leashUpgrade) + +Позволяет использовать поводок для животных, что позволяет привязывать их к различным устройствам, например [дронам](drone.md). При использовании этого улучшения, множество животных может быть привязано одновременно. diff --git a/src/main/resources/assets/opencomputers/doc/ru_RU/item/linkedCard.md b/src/main/resources/assets/opencomputers/doc/ru_RU/item/linkedCard.md new file mode 100644 index 000000000..9cdfcb56f --- /dev/null +++ b/src/main/resources/assets/opencomputers/doc/ru_RU/item/linkedCard.md @@ -0,0 +1,5 @@ +# Соединенные карты + +![Я чувствую, что мы связаны.](oredict:oc:linkedCard) + +Соединенные карта это специальная продвинутая версия [сетевой карты](lanCard.md). Они могут работать только в паре, образуя соединение точка-точка между картами. Соединенные карты могут передавать данные через больше (бесконечно) расстояние, а также между измерениями. \ No newline at end of file diff --git a/src/main/resources/assets/opencomputers/doc/ru_RU/item/manual.md b/src/main/resources/assets/opencomputers/doc/ru_RU/item/manual.md new file mode 100644 index 000000000..965a0b802 --- /dev/null +++ b/src/main/resources/assets/opencomputers/doc/ru_RU/item/manual.md @@ -0,0 +1,15 @@ +# Руководство + +![Я прочитаю ее.](oredict:oc:manual) + +Что вы сейчас читаете? Данное руководство содержит большой объем информации о моде OpenComputers. Если вам нужна информация о блоке или предмете, смотрите дальше! Пролистайте ниже, для просмотра информации (с помощью колесика мыши. + +![Ваш новый лучший друг.](opencomputers:doc/img/manual.png) + +Навигация по данному руководству подобна просмотру Wiki: кликните на ссылку (1) для перехода к упоминаемой странице. Правой клик или кнопка прыжка вернут вас на обратную страницу. Кнопка Esc или кнопка закрытия инвентаря закроют руководство. Слева вы найдете несколько вкладок (2), благодаря которым вы можете быстро перейти на нужную страницу, например список предметов или блоков. Справа видна полоса прокрутки (3). Вы можете двигать ее вручную или использовать колесико мышки. + +Руководство запомнит страницу, на которой вы остановились, даже если вы его закрыли. Вы можете начать сначала, открыв его с зажатой клавишей Shift. Вы также можете перейти на страницу о нужном блоке, кликнув правой кнопкой мыши на блоке с данным руководством в руке. + +Если у вас остались вопросы, вы можете ознакомиться с [Wiki](http://ocdoc.cil.li), [IRC каналом](http://webchat.esper.net/?channels=#oc) и [форумом](http://oc.cil.li/). + +Если вы нашли ошибки в данном руководстве или ошибки в моде, дайте нам знать [через Issues](https://github.com/MightyPirates/OpenComputers/issues) на GitHub. Если вы хотите внести свой вклад в данное руководство или изменить содержание, напишите нам в IRC или создайте ticket в Issues на GitHub. diff --git a/src/main/resources/assets/opencomputers/doc/ru_RU/item/microcontrollerCase1.md b/src/main/resources/assets/opencomputers/doc/ru_RU/item/microcontrollerCase1.md new file mode 100644 index 000000000..a0b1704c9 --- /dev/null +++ b/src/main/resources/assets/opencomputers/doc/ru_RU/item/microcontrollerCase1.md @@ -0,0 +1,31 @@ +# Корпус микроконтроллера + +![Он такой милый.](oredict:oc:microcontrollerCase1) + +Корпус микроконтроллера используется для создания [микроконтроллеров](../block/microcontroller.md) в [сборщике роботов](../block/assembler.md). [Микроконтроллеры](../block/microcontroller.md) это очень примитивные [компьютеры](../general/computer.md). Они содержат только очень ограниченный набор компонентов и используются в специфических задачах, например реакция на редстоун сигнал или обработка сетевых сообщений. + +Они не имеют файловой системы. Могут быть запрограммированы только с помощью [EEPROM](eeprom.md). Он может быть заменен на другой, при крафте [микроконтроллера](../block/microcontroller.md) с другим чипом. При этом, старый [EEPROM](eeprom.md) вернется в ваш инвентарь. + +Они также требуют энергии, для работы, но потребляют очень малое ее количество. + +Микроконтроллер 1 уровня может использовать следующие компоненты: +- 1x [процессор](cpu1.md) уровня 1 +- 1x [планка памяти](ram1.md) уровня 1 +- 1x [EEPROM](eeprom.md) +- 2x карты расширения уровня 1 +- 1x улучшение уровня 2 + +Микроконтроллер 2 уровня может использовать следующие компоненты: +- 1x [процессор](cpu1.md) уровня 1 +- 2x [планки памяти](ram1.md) уровня 1 +- 1x [EEPROM](eeprom.md) +- 1x карту расширения уровня 2 +- 1x карту расширения уровня 1 +- 1x улучшение уровня 3 + +Микроконтроллер 3 уровня может использовать следующие компоненты: +- 1x [процессор](cpu3.md) уровня 3 +- 2x [планки памяти](ram5.md) уровня 3 +- 1x [EEPROM](eeprom.md) +- 3x карты расширения уровня 3 +- 9x улучшений уровня 3 \ No newline at end of file diff --git a/src/main/resources/assets/opencomputers/doc/ru_RU/item/microcontrollerCase2.md b/src/main/resources/assets/opencomputers/doc/ru_RU/item/microcontrollerCase2.md new file mode 100644 index 000000000..d3a9af68d --- /dev/null +++ b/src/main/resources/assets/opencomputers/doc/ru_RU/item/microcontrollerCase2.md @@ -0,0 +1 @@ +#REDIRECT microcontrollerCase1.md \ No newline at end of file diff --git a/src/main/resources/assets/opencomputers/doc/ru_RU/item/microcontrollerCaseCreative.md b/src/main/resources/assets/opencomputers/doc/ru_RU/item/microcontrollerCaseCreative.md new file mode 100644 index 000000000..d3a9af68d --- /dev/null +++ b/src/main/resources/assets/opencomputers/doc/ru_RU/item/microcontrollerCaseCreative.md @@ -0,0 +1 @@ +#REDIRECT microcontrollerCase1.md \ No newline at end of file diff --git a/src/main/resources/assets/opencomputers/doc/ru_RU/item/navigationUpgrade.md b/src/main/resources/assets/opencomputers/doc/ru_RU/item/navigationUpgrade.md new file mode 100644 index 000000000..3d8036c4c --- /dev/null +++ b/src/main/resources/assets/opencomputers/doc/ru_RU/item/navigationUpgrade.md @@ -0,0 +1,7 @@ +# Улучшение - Навигация + +![Я потерялся. Снова.](oredict:oc:navigationUpgrade) + +Данное улучшение добавляет навигацию и ориентацию для устройств. Получаемые координаты начинаются от центра карты, где было собрано улучшение, радиус функционирования зависит от размера карты. + +Карта внутри улучшения может быть обновлена, повторным крафтом улучшения с новой картой. Старая карта при этом будет возвращена игроку. \ No newline at end of file diff --git a/src/main/resources/assets/opencomputers/doc/ru_RU/item/numPad.md b/src/main/resources/assets/opencomputers/doc/ru_RU/item/numPad.md new file mode 100644 index 000000000..84c65dd8a --- /dev/null +++ b/src/main/resources/assets/opencomputers/doc/ru_RU/item/numPad.md @@ -0,0 +1,5 @@ +# Цифровая клавиатура (NumPad) + +![Проверка на отпечатки.](oredict:oc:materialNumPad) + +Цифровая клавиатура часть [клавиатуры](../block/keyboard.md). Позволяет вводить цифры. \ No newline at end of file diff --git a/src/main/resources/assets/opencomputers/doc/ru_RU/item/pistonUpgrade.md b/src/main/resources/assets/opencomputers/doc/ru_RU/item/pistonUpgrade.md new file mode 100644 index 000000000..3cc740f67 --- /dev/null +++ b/src/main/resources/assets/opencomputers/doc/ru_RU/item/pistonUpgrade.md @@ -0,0 +1,7 @@ +# Улучшение - Поршень + +![Толкни это](oredict:oc:pistonUpgrade) + +Улучшение - поршень позволяет некоторым устройствам работать так же, как и обычный поршень. После установки, вам будет доступен компонент с одним методом `push()`. При вызове данного метода, устройство попытается сдвинуть блок, находящийся перед ним. Для [роботов](../block/robot.md) и [микроконтроллеров](../block/microcontroller.md) это передняя сторона; для [планшетов](tablet.md) будет использовано направление, куда смотрит игрок. + +Логика работы улучшения аналогична обычным поршням. diff --git a/src/main/resources/assets/opencomputers/doc/ru_RU/item/printedCircuitBoard.md b/src/main/resources/assets/opencomputers/doc/ru_RU/item/printedCircuitBoard.md new file mode 100644 index 000000000..fd4828b20 --- /dev/null +++ b/src/main/resources/assets/opencomputers/doc/ru_RU/item/printedCircuitBoard.md @@ -0,0 +1,5 @@ +# Отпечатанная печатная плата + +![AKA PCB](oredict:oc:materialCircuitBoardPrinted) + +Второй по популярности компонент крафта, после [транзистора](transistor.md) в OpenComputers. Используется как основа для множества компонентов, например [карт](card.md) и большого количества [блоков](../block/index.md). diff --git a/src/main/resources/assets/opencomputers/doc/ru_RU/item/ram1.md b/src/main/resources/assets/opencomputers/doc/ru_RU/item/ram1.md new file mode 100644 index 000000000..2c70caaf3 --- /dev/null +++ b/src/main/resources/assets/opencomputers/doc/ru_RU/item/ram1.md @@ -0,0 +1,17 @@ +# Оперативная память + +![Без нее никуда](oredict:oc:ram1) + +Память, также как [Процессор](cpu1.md) это неотъемлемая часть [компьютеров](../general/computer.md). В зависимости от архитектуры [процессора](cpu1.md), именно память отвечает за то, что [компьютеры](../general/computer.md) могут сделать, а что нет. Для стандартной архитектуры Lua, например, это позволяет контролировать количество память, которое будет использовано Lua скриптами. Это значит, что для запуска больших и требовательных программ вам потребуется больше памяти. + +Оперативная память имеет несколько уровней, в зависимости от ее объема, по умолчанию: +- Уровень 1: 192КБ +- Уровень 1.5: 256КБ +- Уровень 2: 384КБ +- Уровень 2.5: 512КБ +- Уровень 3: 768КБ +- Уровень 3.5: 1024КБ + +Следует заметить, что данные значения применимы только к архитектуре Lua. Другие архитектуры могут использовать другие объемы памяти на других уровнях. Также следует заметить, что память первого уровня и память уровня 1.5 относятся к первому уровню, аналогично для уровней 2 и 3. + +Эта параметры могут быть изменены в файле конфигурации, если потребуется. diff --git a/src/main/resources/assets/opencomputers/doc/ru_RU/item/ram2.md b/src/main/resources/assets/opencomputers/doc/ru_RU/item/ram2.md new file mode 100644 index 000000000..94679a04e --- /dev/null +++ b/src/main/resources/assets/opencomputers/doc/ru_RU/item/ram2.md @@ -0,0 +1 @@ +#REDIRECT ram1.md \ No newline at end of file diff --git a/src/main/resources/assets/opencomputers/doc/ru_RU/item/ram3.md b/src/main/resources/assets/opencomputers/doc/ru_RU/item/ram3.md new file mode 100644 index 000000000..94679a04e --- /dev/null +++ b/src/main/resources/assets/opencomputers/doc/ru_RU/item/ram3.md @@ -0,0 +1 @@ +#REDIRECT ram1.md \ No newline at end of file diff --git a/src/main/resources/assets/opencomputers/doc/ru_RU/item/ram4.md b/src/main/resources/assets/opencomputers/doc/ru_RU/item/ram4.md new file mode 100644 index 000000000..94679a04e --- /dev/null +++ b/src/main/resources/assets/opencomputers/doc/ru_RU/item/ram4.md @@ -0,0 +1 @@ +#REDIRECT ram1.md \ No newline at end of file diff --git a/src/main/resources/assets/opencomputers/doc/ru_RU/item/ram5.md b/src/main/resources/assets/opencomputers/doc/ru_RU/item/ram5.md new file mode 100644 index 000000000..94679a04e --- /dev/null +++ b/src/main/resources/assets/opencomputers/doc/ru_RU/item/ram5.md @@ -0,0 +1 @@ +#REDIRECT ram1.md \ No newline at end of file diff --git a/src/main/resources/assets/opencomputers/doc/ru_RU/item/ram6.md b/src/main/resources/assets/opencomputers/doc/ru_RU/item/ram6.md new file mode 100644 index 000000000..94679a04e --- /dev/null +++ b/src/main/resources/assets/opencomputers/doc/ru_RU/item/ram6.md @@ -0,0 +1 @@ +#REDIRECT ram1.md \ No newline at end of file diff --git a/src/main/resources/assets/opencomputers/doc/ru_RU/item/rawCircuitBoard.md b/src/main/resources/assets/opencomputers/doc/ru_RU/item/rawCircuitBoard.md new file mode 100644 index 000000000..f71aae80b --- /dev/null +++ b/src/main/resources/assets/opencomputers/doc/ru_RU/item/rawCircuitBoard.md @@ -0,0 +1,5 @@ +# Заготовка печатной платы + +![Не суши.](oredict:oc:materialCircuitBoardRaw) + +Компонент крафта, используется для создания [печатной платы](circuitBoard.md) (или [отпечатанной печатной платы](printedCircuitBoard.md), в зависимости от рецепта). diff --git a/src/main/resources/assets/opencomputers/doc/ru_RU/item/redstoneCard1.md b/src/main/resources/assets/opencomputers/doc/ru_RU/item/redstoneCard1.md new file mode 100644 index 000000000..312986e02 --- /dev/null +++ b/src/main/resources/assets/opencomputers/doc/ru_RU/item/redstoneCard1.md @@ -0,0 +1,9 @@ +# Редстоун карта + +![Вижу красный.](oredict:oc:redstoneCard1) + +Редстоун карта позволяет [компьютерам](../general/computer.md) принимать и излучать вокруг себя редстоун сигнал. Когда сила входящего сигнала изменяется, он попадает в [компьютер](../general/computer.md). + +Если у вас установлен любой из модов, которые добавляют многожильные провода, такие как RedLogic, Project Red или MineFactory Reloaded и иные, вы в полной мере можете взаимодействовать и с ними. + +Сторона сигнала аналогична стороне [системного блока](../block/case1.md) / [робота](../block/robot.md) / [серверной стойки](../block/serverRack.md). Это означает, что если вы смотрите на компьютер спереди, `sides.right` будет слева от вас. diff --git a/src/main/resources/assets/opencomputers/doc/ru_RU/item/redstoneCard2.md b/src/main/resources/assets/opencomputers/doc/ru_RU/item/redstoneCard2.md new file mode 100644 index 000000000..7480d5267 --- /dev/null +++ b/src/main/resources/assets/opencomputers/doc/ru_RU/item/redstoneCard2.md @@ -0,0 +1 @@ +#REDIRECT redstoneCard1.md \ No newline at end of file diff --git a/src/main/resources/assets/opencomputers/doc/ru_RU/item/server1.md b/src/main/resources/assets/opencomputers/doc/ru_RU/item/server1.md new file mode 100644 index 000000000..768206505 --- /dev/null +++ b/src/main/resources/assets/opencomputers/doc/ru_RU/item/server1.md @@ -0,0 +1,39 @@ +# Сервер + +![Так тебе и надо.](oredict:oc:server1) + +Серверы это форма самых продвинутых [компьютеров](../general/computer.md). Они могут быть сконфигурированы где угодно. После вставки [процессора](cpu1.md), [памяти](ram1.md) и платы расширения, сервер должен быть помещен в [серверную стойку](../block/serverRack.md). Подробнее читайте в статье про [серверную стойку](../block/serverRack.md). + +Сервер уровня 1 может содержать следующие компоненты: +- 1x [процессор](cpu2.md) уровня 2 +- 2x [планки памяти](ram3.md) уровня 2 +- 2x [жестких диска](hdd2.md) уровня 2 +- 1x [компонентную шину](componentBus2.md) уровня 2 +- 2x платы расширения уровня 2 +- 1x [EEPROM](eeprom.md) + +Сервер уровня 2 может содержать следующие компоненты: +- 1x [процессор](cpu2.md) уровня 3 +- 3x [планки памяти](ram5.md) уровня 3 +- 3x [жестких диска](hdd3.md) уровня 3 +- 2x [компонентных шины](componentBus3.md) уровня 3 +- 2x платы расширения уровня 2 +- 1x плату расширения уровня 3 +- 1x [EEPROM](eeprom.md) + +Сервер уровня 3 может содержать следующие компоненты: +- 1x [процессор](cpu2.md) уровня 3 +- 4x [планки памяти](ram5.md) уровня 3 +- 4x [жестких диска](hdd3.md) уровня 3 +- 3x [компонентных шины](componentBus3.md) уровня 3 +- 2x платы расширения уровня 2 +- 2x платы расширения уровня 3 +- 1x [EEPROM](eeprom.md) + +Сервер уровня 4 (креатив) может содержать следующие компоненты: +- 1x [процессор](cpu2.md) уровня 3 +- 4x [планки памяти](ram5.md) уровня 3 +- 4x [жестких диска](hdd3.md) уровня 3 +- 3x [компонентных шины](componentBus3.md) уровня 3 +- 4x платы расширения уровня 3 +- 1x [EEPROM](eeprom.md) diff --git a/src/main/resources/assets/opencomputers/doc/ru_RU/item/server2.md b/src/main/resources/assets/opencomputers/doc/ru_RU/item/server2.md new file mode 100644 index 000000000..d02b2f850 --- /dev/null +++ b/src/main/resources/assets/opencomputers/doc/ru_RU/item/server2.md @@ -0,0 +1 @@ +#REDIRECT server1.md \ No newline at end of file diff --git a/src/main/resources/assets/opencomputers/doc/ru_RU/item/server3.md b/src/main/resources/assets/opencomputers/doc/ru_RU/item/server3.md new file mode 100644 index 000000000..d02b2f850 --- /dev/null +++ b/src/main/resources/assets/opencomputers/doc/ru_RU/item/server3.md @@ -0,0 +1 @@ +#REDIRECT server1.md \ No newline at end of file diff --git a/src/main/resources/assets/opencomputers/doc/ru_RU/item/serverCreative.md b/src/main/resources/assets/opencomputers/doc/ru_RU/item/serverCreative.md new file mode 100644 index 000000000..d02b2f850 --- /dev/null +++ b/src/main/resources/assets/opencomputers/doc/ru_RU/item/serverCreative.md @@ -0,0 +1 @@ +#REDIRECT server1.md \ No newline at end of file diff --git a/src/main/resources/assets/opencomputers/doc/ru_RU/item/signUpgrade.md b/src/main/resources/assets/opencomputers/doc/ru_RU/item/signUpgrade.md new file mode 100644 index 000000000..3aec655a6 --- /dev/null +++ b/src/main/resources/assets/opencomputers/doc/ru_RU/item/signUpgrade.md @@ -0,0 +1,5 @@ +# Улучшение - Таблички + +![Я вижу надписи на стенах.](oredict:oc:signUpgrade) + +Данное улучшение позволяет устройствам взаимодействовать с табличками. Позволяет читать сообщение, указанное на табличке, а также менять его (если разрешено). \ No newline at end of file diff --git a/src/main/resources/assets/opencomputers/doc/ru_RU/item/solarGeneratorUpgrade.md b/src/main/resources/assets/opencomputers/doc/ru_RU/item/solarGeneratorUpgrade.md new file mode 100644 index 000000000..69f232c1a --- /dev/null +++ b/src/main/resources/assets/opencomputers/doc/ru_RU/item/solarGeneratorUpgrade.md @@ -0,0 +1,7 @@ +# Улучшение - Солнечная панель + +![Я на солнышке лежу.](oredict:oc:solarGeneratorUpgrade) + +Данное улучшение может быть установлено в такие устройства как, [роботы](../block/robot.md), [дроны](drone.md) и [планшеты](tablet.md) для пассивной генерации энергии. Генерация энергии происходит только под прямыми солнечными лучами и не происходит в дождь или в помещении. + +Энергии генерируется сравнительно небольшое количество, но этого обычно хватает, до [перезарядки](../block/charger.md). diff --git a/src/main/resources/assets/opencomputers/doc/ru_RU/item/tablet.md b/src/main/resources/assets/opencomputers/doc/ru_RU/item/tablet.md new file mode 100644 index 000000000..5f60f02e0 --- /dev/null +++ b/src/main/resources/assets/opencomputers/doc/ru_RU/item/tablet.md @@ -0,0 +1,13 @@ +# Планшет + +![Дотронься, если сможешь.](item:OpenComputers:item@68) + +Планшеты можно скрафтить поместив [корпус планшета](tabletCase1.md) в [сборщик роботов](../block/assembler.md), настроив их и в итоге собрав готовый. Планшеты как переносные компьютеры, не могут напрямую взаимодействовать с игровым миром - например, простые [редстоун карты](redstoneCard1.md) не работают с ними. Количество улучшений также ограничено, это может быть улучшение для работы с [табличками](signUpgrade.md) или [поршнями](pistonUpgrade.md). + +Планшеты второго уровня позволяют установить одно улучшение - контейнер. Слот, добавленный контейнером, может быть открыт дополнительным интерфейсом планшета, при клике правой кнопкой мыши с зажатой клавишей Shift с планшетом в руке. Это также принудительно выключит планшет. + +В отличие от компьютеров, планшеты не сохраняют состояние, когда игрок входит/выходит в игру. Также они не сохраняют свое состояние при перемещении между мирами (например, в ад и обратно). + +Планшеты можно поместить в [зарядное устройство](../block/charger.md), чтобы зарядить их и получить доступ к первому [жесткому диску](hdd1.md) в планшете из [компьютера](../general/computer.md) соединенного с зарядным устройством - в данной установке, зарядки будет вести себя аналогично [дисководу](../block/diskDrive.md), с планшетом вместо [дискеты](floppy.md). Это полезно, если вы забыли установить операционную систему на жесткий диск перед сборкой планшета или случайно повредили ее. + +Другой особенностью планшетов является возможность генерации сигналов с информацией об определенных блоках в игровом мире. Короткий звук означает, что сигнал сгенерирован. Это работает, если установлено улучшение, позволяющее генерировать эту информацию. Например, [анализатор](../block/geolyzer.md) добавляет информацию о блоке, его прочности, [навигационное улучшение](navigationUpgrade.md) добавляет координаты блока. Проанализированный будет подсвечен зеленым. \ No newline at end of file diff --git a/src/main/resources/assets/opencomputers/doc/ru_RU/item/tabletCase1.md b/src/main/resources/assets/opencomputers/doc/ru_RU/item/tabletCase1.md new file mode 100644 index 000000000..b2ff26c6b --- /dev/null +++ b/src/main/resources/assets/opencomputers/doc/ru_RU/item/tabletCase1.md @@ -0,0 +1,39 @@ +# Корпус планшета + +![Не сгибать.](oredict:oc:tabletCase1) + +Корпус планшета используется для создания [планшетов](tablet.md) в [сборщике](../block/assembler.md). [Планшеты](tablet.md) миниатюрные и переносимые [компьютеры](../general/computer.md). Они могут содержать несколько улучшений, но не могут взаимодействовать с игровым миром, как [системный блок](../block/case1.md) могут (использовать простые [сетевые карты](lanCard.md) или [редстоун карту](redstoneCard1.md)). + +Улучшения и карты, которые не могут быть использованы в [планшетах](tablet.md) не могут быть помещены в [сборщик роботов](../block/assembler.md). Если улучшение было установлено в [сборщике роботов](../block/assembler.md), значит оно доступно через API. + +При нахождении в инвентаре игрока, они продолжают работать. Если их поместить в другой инвентарь и выкинуть, они выключатся через некоторое время. + +Корпус планшета 1 уровня может содержать следующие компоненты: +- 1x [процессор уровня 2](cpu2.md) +- 2x [планки памяти уровня 2](ram3.md) +- 1x [жесткий диск уровня 2](hdd2.md) +- 2x карты расширения уровня 2 +- 1x [EEPROM](eeprom.md) +- 1x улучшение уровня 1 +- 1x улучшение уровня 2 +- 1x улучшение уровня 3 + +Корпус планшета 2 уровня может содержать следующие компоненты: +- 1x [процессор уровня 3](cpu3.md) +- 2x [планки памяти уровня 2](ram3.md) +- 1x [жесткий диск уровня 2](hdd2.md) +- 1x карту расширения уровня 2 +- 1x карту расширения уровня 3 +- 1x [EEPROM](eeprom.md) +- 2x улучшения уровня 2 +- 1x улучшение уровня 3 +- 1x [Улучшение](upgradeContainer2.md) или [Контейнер карт](cardContainer2.md) уровня 2 + +Корпус планшета 4 уровня (креатив) может содержать следующие компоненты: +- 1x [процессор уровня 3](cpu3.md) +- 2x [планки памяти уровня 3](ram5.md) +- 1x [жесткий диск уровня 3](hdd3.md) +- 3x карты расширения уровня 3 +- 1x [EEPROM](eeprom.md) +- 9x улучшений уровня 3 +- 1x [Улучшение](upgradeContainer3.md) или [Контейнер карт](cardContainer3.md) уровня 3 \ No newline at end of file diff --git a/src/main/resources/assets/opencomputers/doc/ru_RU/item/tabletCase2.md b/src/main/resources/assets/opencomputers/doc/ru_RU/item/tabletCase2.md new file mode 100644 index 000000000..325fd0f57 --- /dev/null +++ b/src/main/resources/assets/opencomputers/doc/ru_RU/item/tabletCase2.md @@ -0,0 +1 @@ +#REDIRECT tabletCase1.md \ No newline at end of file diff --git a/src/main/resources/assets/opencomputers/doc/ru_RU/item/tabletCaseCreative.md b/src/main/resources/assets/opencomputers/doc/ru_RU/item/tabletCaseCreative.md new file mode 100644 index 000000000..325fd0f57 --- /dev/null +++ b/src/main/resources/assets/opencomputers/doc/ru_RU/item/tabletCaseCreative.md @@ -0,0 +1 @@ +#REDIRECT tabletCase1.md \ No newline at end of file diff --git a/src/main/resources/assets/opencomputers/doc/ru_RU/item/tankControllerUpgrade.md b/src/main/resources/assets/opencomputers/doc/ru_RU/item/tankControllerUpgrade.md new file mode 100644 index 000000000..883499f50 --- /dev/null +++ b/src/main/resources/assets/opencomputers/doc/ru_RU/item/tankControllerUpgrade.md @@ -0,0 +1,7 @@ +# Улучшение - Контроллер бака + +![Туда сюда.](oredict:oc:tankControllerUpgrade) + +Контроллер бака, аналогичен [контроллеру инвентаря](inventoryControllerUpgrade.md), только для жидкостей. Позволяет устройствам получать подробную информацию о баках и их содержимом. + +Это улучшение может быть установлено в [адаптеры](../block/adapter.md), позволяя [компьютерам](../general/computer.md), подключенным к [адаптеру](../block/adapter.md) запрашивать информацию о баках, прилегающих к [адаптеру](../block/adapter.md). diff --git a/src/main/resources/assets/opencomputers/doc/ru_RU/item/tankUpgrade.md b/src/main/resources/assets/opencomputers/doc/ru_RU/item/tankUpgrade.md new file mode 100644 index 000000000..f50a7e4cb --- /dev/null +++ b/src/main/resources/assets/opencomputers/doc/ru_RU/item/tankUpgrade.md @@ -0,0 +1,5 @@ +# Улучшение - бак для жидкости + +![Высоси это.](oredict:oc:tankUpgrade) + +Позволяет устройства хранить жидкости. Каждый бак может хранить только жидкость одного типа и объемом не более 16 ведер (16000mB). [Роботы](../block/robot.md) и [дроны](drone.md) могут выкачивать жидкости из игрового мира, а также из других баков. Также они могут снова заполнять баки жидкостями и обратно выливать их (в зависимости от жидкости). Вы можете установить любое количество улучшение этого вида в устройство. diff --git a/src/main/resources/assets/opencomputers/doc/ru_RU/item/terminal.md b/src/main/resources/assets/opencomputers/doc/ru_RU/item/terminal.md new file mode 100644 index 000000000..9c9da5d63 --- /dev/null +++ b/src/main/resources/assets/opencomputers/doc/ru_RU/item/terminal.md @@ -0,0 +1,9 @@ +# Удаленный терминал + +![Удаленный доступ.](oredict:oc:terminal) + +Терминал может быть использован для контроля [серверов](server1.md). Для использования терминала, кликните им по серверу в [серверной стойке](../block/serverRack.md) (кликните по блоку [серверной стойки](../block/serverRack.md), в нужный [сервер](server1.md) для привязки терминала к нему). + +Когда терминал привязан к [серверу](server1.md),к серверу будут подключены виртуальный [монитор](../block/screen1.md) и [клавиатура](../block/keyboard.md). Это может привести к неожиданному поведению реального монитора и клавиатуры, подключенных к серверу. При использовании терминала вы сможете печатать, как будто к серверу подключена обычная [клавиатура](../block/keyboard.md) и [монитор](../block/screen1.md). + +К одному [серверу](server1.md) могут быть подключены несколько терминалов, однако все они будут показывать одинаковую информацию. Максимальное количество терминалов, которое может быть подключено к [серверу](server1.md) зависит от уровня [сервера](server1.md). Дальность действия терминалов, относительно [серверной стойки](../block/serverRack.md) настраивается в файле конфигурации. diff --git a/src/main/resources/assets/opencomputers/doc/ru_RU/item/texturePicker.md b/src/main/resources/assets/opencomputers/doc/ru_RU/item/texturePicker.md new file mode 100644 index 000000000..d7d3114b2 --- /dev/null +++ b/src/main/resources/assets/opencomputers/doc/ru_RU/item/texturePicker.md @@ -0,0 +1,7 @@ +# Выбор текстур + +![Что это за цвет?](oredict:oc:texturePicker) + +Данный предмет будет в первую очередь удобен для [3D принтеров](../block/printer.md). Позволяет узнать название текстуры блока, установленного в мире, достаточно просто кликнуть на блок. Обратите внимание: для блоков с особым рендером, таких как сундуки, это может не сработать. + +Вы можете выбрать любую текстуру и узнать ее название, а узнав текстуры, использовать его [3D печати](../block/print.md). diff --git a/src/main/resources/assets/opencomputers/doc/ru_RU/item/tractorBeamUpgrade.md b/src/main/resources/assets/opencomputers/doc/ru_RU/item/tractorBeamUpgrade.md new file mode 100644 index 000000000..a9111aaf7 --- /dev/null +++ b/src/main/resources/assets/opencomputers/doc/ru_RU/item/tractorBeamUpgrade.md @@ -0,0 +1,5 @@ +# Улучшение - Притягивающий луч + +![Пошли со мной.](oredict:oc:tractorBeamUpgrade) + +Данное улучшение позволяет устройства подбирать предметы в радиусе 3 блоков вокруг себя. Это очень удобно использовать в [роботах](../block/robot.md) на любой из ферм или если вы можете ломать несколько блоков вокруг себя (как инструменты из Tinker's Construct). Каждая операция пытается подобрать один стак предметов вокруг себя, а также затрачивает некоторое количество энергии. diff --git a/src/main/resources/assets/opencomputers/doc/ru_RU/item/transistor.md b/src/main/resources/assets/opencomputers/doc/ru_RU/item/transistor.md new file mode 100644 index 000000000..9bc64bcf7 --- /dev/null +++ b/src/main/resources/assets/opencomputers/doc/ru_RU/item/transistor.md @@ -0,0 +1,5 @@ +# Транзистор + +![Транзистор.](oredict:oc:materialTransistor) + +Самый простой элемент крафта в OpenComputers. Он используется для крафта [микрочипов](chip1.md) и иных электронных компонентов. diff --git a/src/main/resources/assets/opencomputers/doc/ru_RU/item/upgradeContainer1.md b/src/main/resources/assets/opencomputers/doc/ru_RU/item/upgradeContainer1.md new file mode 100644 index 000000000..ab64b3b95 --- /dev/null +++ b/src/main/resources/assets/opencomputers/doc/ru_RU/item/upgradeContainer1.md @@ -0,0 +1,5 @@ +# Улучшение - Контейнер + +![Можно обновляться.](oredict:oc:upgradeContainer1) + +Данное улучшение применимо к [роботам](../block/robot.md), оно добавляет готовым [роботам](../block/robot.md) место под установку еще одного улучшения. Максимальный уровень улучшения, которое может быть установлено, равен уровню контейнера. Прочтите документацию о [роботах](../block/robot.md) и [сборщике роботов](../block/assembler.md). diff --git a/src/main/resources/assets/opencomputers/doc/ru_RU/item/upgradeContainer2.md b/src/main/resources/assets/opencomputers/doc/ru_RU/item/upgradeContainer2.md new file mode 100644 index 000000000..408c907f9 --- /dev/null +++ b/src/main/resources/assets/opencomputers/doc/ru_RU/item/upgradeContainer2.md @@ -0,0 +1 @@ +#REDIRECT upgradeContainer1.md \ No newline at end of file diff --git a/src/main/resources/assets/opencomputers/doc/ru_RU/item/upgradeContainer3.md b/src/main/resources/assets/opencomputers/doc/ru_RU/item/upgradeContainer3.md new file mode 100644 index 000000000..408c907f9 --- /dev/null +++ b/src/main/resources/assets/opencomputers/doc/ru_RU/item/upgradeContainer3.md @@ -0,0 +1 @@ +#REDIRECT upgradeContainer1.md \ No newline at end of file diff --git a/src/main/resources/assets/opencomputers/doc/ru_RU/item/wlanCard.md b/src/main/resources/assets/opencomputers/doc/ru_RU/item/wlanCard.md new file mode 100644 index 000000000..097480f13 --- /dev/null +++ b/src/main/resources/assets/opencomputers/doc/ru_RU/item/wlanCard.md @@ -0,0 +1,7 @@ +# Беспроводная сетевая карта + +![Может вызвать рак, а может, и нет.](oredict:oc:wlanCard) + +Беспроводная сетевая карта, это улучшенная версия [сетевой карты](lanCard.md), в дополнение к сообщениям по проводной линии, также может принимать сообщения и по беспроводной. Сила сигнала позволяет контролировать, на каком расстоянии могут быть получены сообщения, где сила равна расстоянию в блоках. + +Чем выше сила сигнала, тем больше энергии затрачивается на передачу одного сообщения. Поверхность игрового мира также влияет на возможность получения сигнала. Если силы сигнала недостаточно, получатель не получит сообщение. Данная информация еще не подтверждена учеными, но сообщения все же иногда доходят. В общем случае, расстояние между отправителем и получателем не должно содержать гор и прочих образований. diff --git a/src/main/resources/assets/opencomputers/doc/ru_RU/item/worldSensorCard.md b/src/main/resources/assets/opencomputers/doc/ru_RU/item/worldSensorCard.md new file mode 100644 index 000000000..6164134ed --- /dev/null +++ b/src/main/resources/assets/opencomputers/doc/ru_RU/item/worldSensorCard.md @@ -0,0 +1,4 @@ +# Карта Мировой сенсор +![Для смелых...](oredict:oc:worldSensorCard) + +Данная карта позволяет получать информацию об атмосфере и гравитации, на планетах добавляемых модом GalactiCraft. Может быть использовано как в [роботах](../block/robot.md) так и [дронах](drone.md). diff --git a/src/main/resources/assets/opencomputers/doc/ru_RU/item/wrench.md b/src/main/resources/assets/opencomputers/doc/ru_RU/item/wrench.md new file mode 100644 index 000000000..bb57fd513 --- /dev/null +++ b/src/main/resources/assets/opencomputers/doc/ru_RU/item/wrench.md @@ -0,0 +1,5 @@ +# Ключ + +![Сделано в Швейцарии.](oredict:oc:wrench) + +Как и другие технологические моды, OpenComputers имеет свой ключ. В данном случае, это гибрид ключа и отвертки, что позволяет невероятно удобно пользоваться им. Ключ может поворачивать большинство блоков, также он может быть использован в других модах. diff --git a/src/main/resources/assets/opencomputers/lang/de_DE.lang b/src/main/resources/assets/opencomputers/lang/de_DE.lang index 4ce4bef37..ea46fa9ca 100644 --- a/src/main/resources/assets/opencomputers/lang/de_DE.lang +++ b/src/main/resources/assets/opencomputers/lang/de_DE.lang @@ -184,8 +184,10 @@ oc:gui.Error.NoEnergy=Nicht genug Energie. oc:gui.Error.NoRAM=Im Computer ist kein RAM installiert. oc:gui.Error.OutOfMemory=Nicht genug Arbeitsspeicher. oc:gui.Manual.Blocks=OpenComputers Blöcke +oc:gui.Manual.Home=Startseite oc:gui.Manual.Items=OpenComputers Gegenstände oc:gui.Manual.Warning.BlockMissing=Block nicht verfügbar. +oc:gui.Manual.Warning.ImageMissing=Bild nicht gefunden. oc:gui.Manual.Warning.ItemMissing=Gegenstand nicht verfügbar. oc:gui.Manual.Warning.OreDictMissing=Ore-Dictionary-Eintrag nicht verfügbar. oc:gui.Raid.Warning=§4Eine Platte einzufügen löscht sie.[nl] Eine Platte zu entfernen löscht das Raid. @@ -337,3 +339,14 @@ oc:tooltip.UpgradeTankController=Dieses Upgrade erlaubt es dem Roboter, präzise oc:tooltip.UpgradeTractorBeam=Stattet den Roboter mit unglaublich fortschrittlicher Technologie - Kosename: "Gegenstandsmagnet" - aus. Erlaubt es dem Roboter, Gegenstände, innerhalb von 3 Blöcken um sich herum, einzusammeln. oc:tooltip.WirelessNetworkCard=Erlaubt das drahtlose Senden von Netzwerknachrichten, zusätzlich zu normalen. Drahtlose Nachrichten werden nur gesendet, wenn eine §fSignalstärke§7 festgelegt wurde! oc:tooltip.WorldSensorCard=Erlaubt es, Informationen über die Welt auszulesen, wie etwa Gravitation und ob die Atmosphäre atembar ist. Verwendung von Messergebnissen auf eigene Gefahr. Der Hersteller übernimmt keinerlei Garantie. + +# NEI Integration +nei.options.inventory.oredict=Zeige OreDictionary Namen +nei.options.inventory.oredict.true=True +nei.options.inventory.oredict.false=False +nei.usage.oc.Manual=Handbuch öffnen + +# Waila Integration +option.oc.address=Adresse +option.oc.componentName=Komponentenname +option.oc.energy=Energie \ No newline at end of file diff --git a/src/main/resources/assets/opencomputers/lang/en_US.lang b/src/main/resources/assets/opencomputers/lang/en_US.lang index 4d1799cb0..0927a2243 100644 --- a/src/main/resources/assets/opencomputers/lang/en_US.lang +++ b/src/main/resources/assets/opencomputers/lang/en_US.lang @@ -135,6 +135,7 @@ item.oc.UpgradeTankController.name=Tank Controller Upgrade item.oc.UpgradeTractorBeam.name=Tractor Beam Upgrade item.oc.WirelessNetworkCard.name=Wireless Network Card item.oc.WorldSensorCard.name=World Sensor Card +item.oc.wrench.name=Scrench # Entities entity.oc.Drone.name=Drone @@ -184,8 +185,10 @@ oc:gui.Error.NoEnergy=Not enough energy. oc:gui.Error.NoRAM=No RAM is installed in the computer. oc:gui.Error.OutOfMemory=Out of memory. oc:gui.Manual.Blocks=OpenComputers Blocks +oc:gui.Manual.Home=Home oc:gui.Manual.Items=OpenComputers Items oc:gui.Manual.Warning.BlockMissing=Block unavailable. +oc:gui.Manual.Warning.ImageMissing=Image not found. oc:gui.Manual.Warning.ItemMissing=Item unavailable. oc:gui.Manual.Warning.OreDictMissing=Ore dictionary entry unavailable. oc:gui.Raid.Warning=§4Adding a disk wipes it.[nl] Removing a disk wipes the raid. @@ -337,6 +340,7 @@ oc:tooltip.UpgradeTankController=This upgrade allows robots and drones more cont oc:tooltip.UpgradeTractorBeam=Equips a device with extremely advanced technology, nicknamed the "Item Magnet". Allows the device to pick up items anywhere within 3 blocks of its location. oc:tooltip.WirelessNetworkCard=Allows wireless sending of network messages in addition to normal ones. You can adjust the §fsignal strength§7 to control how far messages are sent. Higher signal strength results in higher energy consumption. oc:tooltip.WorldSensorCard=Allows reading out information about the world, such as its gravity and whether it has a breathable atmosphere. Use results at own risk. The manufacturer takes no responsibility for bodily or material harm caused by decisions made upon the cards' outputs. We have lawyers. And money. Don't even try. +oc:tooltip.Wrench=A hybrid of Screwdriver and Wrench, this tool is easy to learn, but hard to master. #Achievements achievement.oc.adapter=Plug In Baby @@ -416,6 +420,7 @@ achievement.oc.wirelessNetworkCard.desc=Time to go where no packet has gone befo nei.options.inventory.oredict=Show OreDictionary names nei.options.inventory.oredict.true=True nei.options.inventory.oredict.false=False +nei.usage.oc.Manual=Open Manual # Waila Integration option.oc.address=Address diff --git a/src/main/resources/assets/opencomputers/loot/OPPM/oppm.lua b/src/main/resources/assets/opencomputers/loot/OPPM/oppm.lua index c7811b00a..64df24d0c 100644 --- a/src/main/resources/assets/opencomputers/loot/OPPM/oppm.lua +++ b/src/main/resources/assets/opencomputers/loot/OPPM/oppm.lua @@ -505,6 +505,7 @@ local function installPackage(pack,path,update) term.write("Done.\n") saveToFile(tPacks) print("Successfully installed package "..pack) + return true end local function uninstallPackage(pack) @@ -565,7 +566,7 @@ if options.iKnowWhatIAmDoing then provideInfo(args[2]) elseif args[1] == "install" then if not getInternet() then return end - installPackage(args[2],args[3],false) + return installPackage(args[2],args[3],false) elseif args[1] == "update" then if not getInternet() then return end updatePackage(args[2]) @@ -631,6 +632,10 @@ if not result then error(reason, 0) end +if not reason then + return +end + print("All done! Please remove the Floppy Disk used for installation! Reboot now? [Y/n]") local result = io.read() if not result or result == "" or result:sub(1, 1):lower() == "y" then diff --git a/src/main/resources/assets/opencomputers/loot/OpenOS/bin/lua.lua b/src/main/resources/assets/opencomputers/loot/OpenOS/bin/lua.lua index d1176b111..a60b03edc 100644 --- a/src/main/resources/assets/opencomputers/loot/OpenOS/bin/lua.lua +++ b/src/main/resources/assets/opencomputers/loot/OpenOS/bin/lua.lua @@ -76,7 +76,7 @@ if #args == 0 or options.i then elseif type(v) == "table" and getmetatable(v) and getmetatable(v).__call then postfix = "()" elseif type(v) == "table" then postfix = "." end - table.insert(r, prefix..k..postfix) + r[prefix..k..postfix] = true end end local mt = getmetatable(t) @@ -86,16 +86,20 @@ if #args == 0 or options.i then end end local function hint(line, index) + line = (line or ""):sub(1, index - 1) local path = string.match(line, "[a-zA-Z_][a-zA-Z0-9_.]*$") if not path then return nil end local suffix = string.match(path, "[^.]+$") or "" local prefix = string.sub(path, 1, #path - #suffix) local t = findTable(env, prefix) if not t then return nil end - local r = {} - findKeys(t, r, string.sub(line, 1, #line - #suffix), suffix) - table.sort(r) - return r + local r1, r2 = {}, {} + findKeys(t, r1, string.sub(line, 1, #line - #suffix), suffix) + for k in pairs(r1) do + table.insert(r2, k) + end + table.sort(r2) + return r2 end component.gpu.setForeground(0xFFFFFF) diff --git a/src/main/resources/assets/opencomputers/loot/loot.properties b/src/main/resources/assets/opencomputers/loot/loot.properties index b7b1b1b53..4e9e7d187 100644 --- a/src/main/resources/assets/opencomputers/loot/loot.properties +++ b/src/main/resources/assets/opencomputers/loot/loot.properties @@ -12,7 +12,7 @@ Network=network:1:dyeLime OpenIRC=irc:1:dyeLightBlue OpenLoader=openloader:1:dyeMagenta OpenOS=openos:0:dyeGreen -OPPM=oppm:1:dyeCyan +OPPM=oppm:0:dyeCyan # Higher chance to find the dig program, because it has the most immediate # use - OpenOS is craftable and IRC can be downloaded once an internet card # is available - which one needs anyway, to use the program... diff --git a/src/main/resources/assets/opencomputers/lua/machine.lua b/src/main/resources/assets/opencomputers/lua/machine.lua index 3402c90ec..e72d36f1f 100644 --- a/src/main/resources/assets/opencomputers/lua/machine.lua +++ b/src/main/resources/assets/opencomputers/lua/machine.lua @@ -634,6 +634,14 @@ local function spcall(...) end end +local sgcco + +local function sgcf(self, gc) + while true do + self, gc = coroutine.yield(pcall(gc, self)) + end +end + local function sgc(self) local oldDeadline, oldHitDeadline = deadline, hitDeadline local mt = debug.getmetatable(self) @@ -642,11 +650,16 @@ local function sgc(self) if type(gc) ~= "function" then return end - local co = coroutine.create(gc) - debug.sethook(co, checkDeadline, "", hookInterval) + if not sgcco then + sgcco = coroutine.create(sgcf) + end + debug.sethook(sgcco, checkDeadline, "", hookInterval) deadline, hitDeadline = math.min(oldDeadline, computer.realTime() + 0.5), true - local result, reason = coroutine.resume(co, self) - debug.sethook(co) + local _, result, reason = coroutine.resume(sgcco, self, gc) + debug.sethook(sgcco) + if coroutine.status(sgcco) == "dead" then + sgcco = nil + end deadline, hitDeadline = oldDeadline, oldHitDeadline if not result then error(reason, 0) diff --git a/src/main/resources/assets/opencomputers/recipes/default.recipes b/src/main/resources/assets/opencomputers/recipes/default.recipes index 2c53ee43f..f2acb4422 100644 --- a/src/main/resources/assets/opencomputers/recipes/default.recipes +++ b/src/main/resources/assets/opencomputers/recipes/default.recipes @@ -15,6 +15,28 @@ manual { type: shapeless input: [book, "oc:circuitChip1"] } +wrench { + input: [[ingotIron, "", ingotIron] + ["", "oc:circuitChip2", ""], + ["", ingotIron, ""]] +} +lootDisks: [ + { + name: OpenOS + type: shapeless + input: ["oc:floppy", "oc:manual"] + }, + { + name: OPPM + type: shapeless + input: ["oc:floppy", "oc:materialInterweb"] + } +] +luaBios { + type: shapeless + input: ["oc:eeprom", "oc:manual"] +} + droneCase1 { input: [[{block="minecraft:end_stone"}, compass, {block="minecraft:end_stone"}] ["oc:circuitChip1", "oc:microcontrollerCase1", "oc:circuitChip1"] @@ -117,14 +139,6 @@ hdd3 { ["oc:materialCircuitBoardPrinted", "oc:materialDisk", craftingPiston] ["oc:circuitChip3", "oc:materialDisk", diamond]] } -openOS { - type: shapeless - input: ["oc:floppy", "oc:manual"] -} -luaBios { - type: shapeless - input: ["oc:eeprom", "oc:manual"] -} graphicsCard1 { input: [["oc:circuitChip1", "oc:materialALU", "oc:ram1"] ["", "oc:materialCard", ""]] @@ -230,12 +244,12 @@ generatorUpgrade { } inventoryUpgrade { input: [[plankWood, hopper, plankWood] - [dispenser, chest, craftingPiston] + [dropper, chest, craftingPiston] [plankWood, "oc:circuitChip1", plankWood]] } inventoryControllerUpgrade { input: [[ingotGold, "oc:analyzer", ingotGold] - [dispenser, "oc:circuitChip2", craftingPiston] + [dropper, "oc:circuitChip2", craftingPiston] [ingotGold, "oc:materialCircuitBoardPrinted", ingotGold]] } leashUpgrade { diff --git a/src/main/resources/assets/opencomputers/recipes/peaceful.recipes b/src/main/resources/assets/opencomputers/recipes/peaceful.recipes new file mode 100644 index 000000000..5401e0fb3 --- /dev/null +++ b/src/main/resources/assets/opencomputers/recipes/peaceful.recipes @@ -0,0 +1,75 @@ +include file("default.recipes") + +redstoneCard2 { + input: [[blockRedstone, "oc:circuitChip2", diamond] + ["", "oc:materialCard", ""]] +} +wlanCard { + input: [[diamond, "oc:circuitChip2", ""] + ["", "oc:materialCard", ""]] +} +linkedCard { + input: [[diamond, "", diamond] + ["oc:lanCard", "oc:materialInterweb", "oc:lanCard"] + ["oc:circuitChip3", "", "oc:circuitChip3"]] + output: 2 # Note: all resulting cards are linked to each other. +} + +angelUpgrade { + input: [[ingotIron, diamond, ingotIron] + ["oc:circuitChip1", pistonStickyBase, "oc:circuitChip1"] + [ingotIron, diamond, ingotIron]] +} +chunkloaderUpgrade { + input: [[ingotGold, glass, ingotGold] + ["oc:circuitChip3", diamond, "oc:circuitChip3"] + [obsidian, "oc:materialCircuitBoardPrinted", obsidian]] +} +inventoryUpgrade { + input: [[plankWood, hopper, plankWood] + [dropper, chest, craftingPiston] + [plankWood, "oc:circuitChip1", plankWood]] +} +inventoryControllerUpgrade { + input: [[ingotGold, "oc:analyzer", ingotGold] + [dropper, "oc:circuitChip2", craftingPiston] + [ingotGold, "oc:materialCircuitBoardPrinted", ingotGold]] +} +signUpgrade { + input: [[ingotIron, dyeBlack, ingotIron] + ["oc:circuitChip1", stickWood, "oc:circuitChip1"] + [ingotIron, craftingPiston, ingotIron]] +} +tankUpgrade { + input: [[plankWood, fenceIron, plankWood] + [dropper, cauldron, craftingPiston] + [plankWood, "oc:circuitChip1", plankWood]] +} +tankControllerUpgrade { + input: [[ingotGold, glassBottle, ingotGold] + [dropper, "oc:circuitChip2", craftingPiston] + [ingotGold, "oc:materialCircuitBoardPrinted", ingotGold]] +} + +inkCartridgeEmpty { + input: [[nuggetIron, dropper, nuggetIron], + ["oc:materialTransistor", bucket, "oc:materialTransistor"], + [nuggetIron, "oc:materialCircuitBoardPrinted", nuggetIron]] +} + +interweb { + input: [[redstone, {block="minecraft:wool", subID=9}, redstone] + [{block="minecraft:wool", subID=9}, diamond, {block="minecraft:wool", subID=9}] + [redstone, {block="minecraft:wool", subID=9}, redstone]] +} + +geolyzer { + input: [[ingotGold, compass, ingotGold] + [diamond, "oc:circuitChip2", diamond] + [ingotGold, "oc:materialCircuitBoardPrinted", ingotGold]] +} +hologram2 { + input: [["oc:circuitChip3", glass, "oc:circuitChip3"] + ["oc:materialCircuitBoardPrinted", blockDiamond, "oc:materialCircuitBoardPrinted"] + [obsidian, yellowDust, obsidian]] +} diff --git a/src/main/resources/assets/opencomputers/recipes/user.recipes b/src/main/resources/assets/opencomputers/recipes/user.recipes index 4a612f4b6..69c4632ba 100644 --- a/src/main/resources/assets/opencomputers/recipes/user.recipes +++ b/src/main/resources/assets/opencomputers/recipes/user.recipes @@ -11,6 +11,7 @@ include file("default.recipes") #include file("hardmode.recipes") #include file("gregtech.recipes") +#include file("peaceful.recipes") #include file("your_custom.recipes") # You can also specify custom recipes in this file directly. Have a look at the diff --git a/src/main/resources/assets/opencomputers/robot.names b/src/main/resources/assets/opencomputers/robot.names index a14f0a57c..9d76928a5 100644 --- a/src/main/resources/assets/opencomputers/robot.names +++ b/src/main/resources/assets/opencomputers/robot.names @@ -5,14 +5,17 @@ # Names of more or less famous robots and AIs, are welcome. Feel free to add # more via pull requests. Let's hope this won't get us sued... -# When adding names, please keep the list sorted alphabetially, make sure it's +# When adding names, please keep the list sorted alphabetically, make sure it's # not already in the list, and, where appropriate, provide a concise source. +# And since we now also have that special case, ignore special characters when +# sorting. Adventure Core # Portal Anson Argyris # Perry Rhodan ASIMO # Honda Atlas # Portal Augustus # Perry Rhodan +Baymax # Big Hero 6 Bender # Futurama BMO # Adventure Time BraitenBurg # Simple intelligent agents. @@ -26,12 +29,13 @@ Claptrap # Borderlands Crypto # Kodos Daedalus # Deus Ex Dalek Sec # Doctor Who -Deputy ANDY # Eureka Death Trap # Borderlands 2's Mechromancer +Deputy ANDY # Eureka Dog # Half-Life Donald Duck # Perry Rhodan Elmer # One of the first two robots developed by William Gray Walter. Elsie # One of the first two robots developed by William Gray Walter. +*Emilia # Digital: A Love Story Eve # Wall-E Fact Core # Portal Flexo # Futurama @@ -41,10 +45,11 @@ HAL 9000 # Space Odyssey Harkness # Fallout 3 Heron # Vexatos Homunk # Perry Rhodan +*Hyun-ae # Analogue: A Hate Story / Hate Plus Icarus # Deus Ex J.A.R.V.I.S # Iron Man -JoshTheEnder # Contributor Johnny 5 # Short Circuit +JoshTheEnder # Contributor K-9 # Doctor Who KARR # Knight Rider Kilobyte # Contributor @@ -55,12 +60,13 @@ Loader 1340 # Borderlands 2 LordFokas # Contributor Marvin # Hitchhiker's Guide to the Galaxy Michiyo # Contributor +*Mute # Analogue: A Hate Story / Hate Plus P-Body # Portal PixelToast # Contributor QT-1 # I, Robot -R2-D2 # Star Wars R. Daneel Olivaw # Isaac Asimov's R. Giskard Reventlov # Isaac Asimov's +R2-D2 # Star Wars Replicator # Stargate Robby # Forbidden Planet Roomba # Under your couch... wait. diff --git a/src/main/resources/assets/opencomputers/textures/blocks/White.png b/src/main/resources/assets/opencomputers/textures/blocks/White.png index b9d310c91..a48258bff 100644 Binary files a/src/main/resources/assets/opencomputers/textures/blocks/White.png and b/src/main/resources/assets/opencomputers/textures/blocks/White.png differ diff --git a/src/main/resources/assets/opencomputers/textures/gui/manual_home.png b/src/main/resources/assets/opencomputers/textures/gui/manual_home.png new file mode 100644 index 000000000..a149b7dd8 Binary files /dev/null and b/src/main/resources/assets/opencomputers/textures/gui/manual_home.png differ diff --git a/src/main/resources/assets/opencomputers/textures/items/Wrench.png b/src/main/resources/assets/opencomputers/textures/items/Wrench.png new file mode 100644 index 000000000..0c2e620af Binary files /dev/null and b/src/main/resources/assets/opencomputers/textures/items/Wrench.png differ diff --git a/src/main/scala/li/cil/oc/Constants.scala b/src/main/scala/li/cil/oc/Constants.scala index 175828dca..1f7bcb7f6 100644 --- a/src/main/scala/li/cil/oc/Constants.scala +++ b/src/main/scala/li/cil/oc/Constants.scala @@ -142,6 +142,7 @@ object Constants { final val UpgradeContainerTier3 = "upgradeContainer3" final val WirelessNetworkCard = "wlanCard" final val WorldSensorCard = "worldSensorCard" + final val Wrench = "wrench" def DroneCase(tier: Int) = ItemUtils.caseNameWithTierSuffix("droneCase", tier) diff --git a/src/main/scala/li/cil/oc/Settings.scala b/src/main/scala/li/cil/oc/Settings.scala index 339478458..b49b1d6d0 100644 --- a/src/main/scala/li/cil/oc/Settings.scala +++ b/src/main/scala/li/cil/oc/Settings.scala @@ -293,6 +293,7 @@ class Settings(val config: Config) { val presentChance = config.getDouble("misc.presentChance") max 0 min 1 val assemblerBlacklist = config.getStringList("misc.assemblerBlacklist") val threadPriority = config.getInt("misc.threadPriority") + val giveManualToNewPlayers = config.getBoolean("misc.giveManualToNewPlayers") // ----------------------------------------------------------------------- // // printer @@ -303,6 +304,7 @@ class Settings(val config: Config) { val printCustomRedstone = config.getInt("printer.customRedstoneCost") max 0 val printMaterialValue = config.getInt("printer.materialValue") max 0 val printInkValue = config.getInt("printer.inkValue") max 0 + val printsHaveOpacity = config.getBoolean("printer.printsHaveOpacity") // ----------------------------------------------------------------------- // // integration diff --git a/src/main/scala/li/cil/oc/client/PacketHandler.scala b/src/main/scala/li/cil/oc/client/PacketHandler.scala index 5ab795ed3..ee5640be9 100644 --- a/src/main/scala/li/cil/oc/client/PacketHandler.scala +++ b/src/main/scala/li/cil/oc/client/PacketHandler.scala @@ -52,6 +52,7 @@ object PacketHandler extends CommonPacketHandler { case PacketType.HologramScale => onHologramScale(p) case PacketType.HologramSet => onHologramSet(p) case PacketType.HologramTranslation => onHologramPositionOffsetY(p) + case PacketType.ParticleEffect => onParticleEffect(p) case PacketType.PetVisibility => onPetVisibility(p) case PacketType.PowerState => onPowerState(p) case PacketType.PrinterState => onPrinterState(p) @@ -234,6 +235,41 @@ object PacketHandler extends CommonPacketHandler { case _ => // Invalid packet. } + def onParticleEffect(p: PacketParser) = { + val dimension = p.readInt() + world(p.player, dimension) match { + case Some(world) => + val x = p.readInt() + val y = p.readInt() + val z = p.readInt() + val velocity = p.readDouble() + val direction = p.readDirection() + val name = p.readUTF() + val count = p.readUnsignedByte() + + for (i <- 0 until count) { + def rv(f: ForgeDirection => Int) = direction match { + case Some(d) => world.rand.nextFloat - 0.5 + f(d) * 0.5 + case _ => world.rand.nextFloat * 2 - 1 + } + val vx = rv(_.offsetX) + val vy = rv(_.offsetY) + val vz = rv(_.offsetZ) + if (vx * vx + vy * vy + vz * vz < 1) { + def rp(x: Int, v: Double, f: ForgeDirection => Int) = direction match { + case Some(d) => x + 0.5 + v * velocity * 0.5 + f(d) * velocity + case _ => x + 0.5 + v * velocity + } + val px = rp(x, vx, _.offsetX) + val py = rp(y, vy, _.offsetY) + val pz = rp(z, vz, _.offsetZ) + world.spawnParticle(name, px, py, pz, vx, vy + velocity * 0.25, vz) + } + } + case _ => // Invalid packet. + } + } + def onPetVisibility(p: PacketParser) { val count = p.readInt() for (i <- 0 until count) { diff --git a/src/main/scala/li/cil/oc/client/Textures.scala b/src/main/scala/li/cil/oc/client/Textures.scala index 337ba85c8..75d81d310 100644 --- a/src/main/scala/li/cil/oc/client/Textures.scala +++ b/src/main/scala/li/cil/oc/client/Textures.scala @@ -26,8 +26,9 @@ object Textures { val guiDrone = new ResourceLocation(Settings.resourceDomain, "textures/gui/drone.png") val guiKeyboardMissing = new ResourceLocation(Settings.resourceDomain, "textures/gui/keyboard_missing.png") val guiManual = new ResourceLocation(Settings.resourceDomain, "textures/gui/manual.png") - val guiManualTab = new ResourceLocation(Settings.resourceDomain, "textures/gui/manual_tab.png") + val guiManualHome = new ResourceLocation(Settings.resourceDomain, "textures/gui/manual_home.png") val guiManualMissingItem = new ResourceLocation(Settings.resourceDomain, "textures/gui/manual_missing_item.png") + val guiManualTab = new ResourceLocation(Settings.resourceDomain, "textures/gui/manual_tab.png") val guiPrinter = new ResourceLocation(Settings.resourceDomain, "textures/gui/printer.png") val guiPrinterInk = new ResourceLocation(Settings.resourceDomain, "textures/gui/printer_ink.png") val guiPrinterMaterial = new ResourceLocation(Settings.resourceDomain, "textures/gui/printer_material.png") diff --git a/src/main/scala/li/cil/oc/client/gui/Manual.scala b/src/main/scala/li/cil/oc/client/gui/Manual.scala index 74df4d1eb..52e513a02 100644 --- a/src/main/scala/li/cil/oc/client/gui/Manual.scala +++ b/src/main/scala/li/cil/oc/client/gui/Manual.scala @@ -1,6 +1,5 @@ package li.cil.oc.client.gui -import java.net.URI import java.util import li.cil.oc.Localization @@ -39,7 +38,7 @@ class Manual extends GuiScreen { var xSize = 0 var ySize = 0 var isDragging = false - var document = Iterable.empty[Segment] + var document: Segment = null var documentHeight = 0 var currentSegment = None: Option[InteractiveSegment] protected var scrollButton: ImageButton = _ @@ -182,19 +181,8 @@ class Manual extends GuiScreen { isDragging = true scrollMouse(mouseY) } - else if (button == 0) { - // Left click, did we hit a link? - currentSegment.foreach(segment => if (!segment.onMouseClick(mouseX, mouseY)) segment.link match { - case Some(link) => - if (link.startsWith("http://") || link.startsWith("https://")) handleUrl(link) - else pushPage(ManualAPI.makeRelative(link, ManualAPI.history.top.path)) - case _ => - }) - } - else if (button == 1) { - // Right mouseclick = back. - popPage() - } + else if (button == 0) currentSegment.foreach(_.onMouseClick(mouseX, mouseY)) + else if (button == 1) popPage() } override protected def mouseClickMove(mouseX: Int, mouseY: Int, lastButtonClicked: Int, timeSinceMouseClick: Long) { @@ -211,18 +199,6 @@ class Manual extends GuiScreen { } } - private def handleUrl(url: String): Unit = { - // Pretty much copy-paste from GuiChat. - try { - val desktop = Class.forName("java.awt.Desktop") - val instance = desktop.getMethod("getDesktop").invoke(null) - desktop.getMethod("browse", classOf[URI]).invoke(instance, new URI(url)) - } - catch { - case t: Throwable => Minecraft.getMinecraft.thePlayer.addChatMessage(Localization.Chat.WarningLink(t.toString)) - } - } - private def scrollMouse(mouseY: Int) { scrollTo(math.round((mouseY - guiTop - scrollPosY - 6.5) * maxOffset / (scrollHeight - 13.0)).toInt) } diff --git a/src/main/scala/li/cil/oc/client/renderer/font/DynamicFontRenderer.scala b/src/main/scala/li/cil/oc/client/renderer/font/DynamicFontRenderer.scala index 7f9d65583..543db431a 100644 --- a/src/main/scala/li/cil/oc/client/renderer/font/DynamicFontRenderer.scala +++ b/src/main/scala/li/cil/oc/client/renderer/font/DynamicFontRenderer.scala @@ -42,7 +42,7 @@ class DynamicFontRenderer extends TextureFontRenderer with IResourceManagerReloa textures.clear() charMap.clear() textures += new DynamicFontRenderer.CharTexture(this) - activeTexture = textures(0) + activeTexture = textures.head generateChars(basicChars.toCharArray) } @@ -68,9 +68,9 @@ class DynamicFontRenderer extends TextureFontRenderer with IResourceManagerReloa } override protected def drawChar(tx: Float, ty: Float, char: Char) { - val icon = charMap(char) - if (icon != null && icon.texture == activeTexture) { - icon.draw(tx, ty) + charMap.get(char) match { + case Some(icon) if icon.texture == activeTexture => icon.draw(tx, ty) + case _ => } } diff --git a/src/main/scala/li/cil/oc/client/renderer/item/ItemRenderer.scala b/src/main/scala/li/cil/oc/client/renderer/item/ItemRenderer.scala index 017cd24e8..d20c17123 100644 --- a/src/main/scala/li/cil/oc/client/renderer/item/ItemRenderer.scala +++ b/src/main/scala/li/cil/oc/client/renderer/item/ItemRenderer.scala @@ -168,7 +168,7 @@ object ItemRenderer extends IItemRenderer { val data = new PrintData(stack) Minecraft.getMinecraft.renderEngine.bindTexture(TextureMap.locationBlocksTexture) val state = - if (data.stateOn.size > 0 && KeyBindings.showExtendedTooltips) + if (data.hasActiveState && KeyBindings.showExtendedTooltips) data.stateOn else data.stateOff diff --git a/src/main/scala/li/cil/oc/client/renderer/markdown/Document.scala b/src/main/scala/li/cil/oc/client/renderer/markdown/Document.scala index cf30af9b1..efd148129 100644 --- a/src/main/scala/li/cil/oc/client/renderer/markdown/Document.scala +++ b/src/main/scala/li/cil/oc/client/renderer/markdown/Document.scala @@ -7,32 +7,65 @@ import net.minecraft.client.Minecraft import net.minecraft.client.gui.FontRenderer import org.lwjgl.opengl.GL11 +import scala.collection.Iterable import scala.util.matching.Regex /** * Primitive Markdown parser, only supports a very small subset. Used for * parsing documentation into segments, to be displayed in a GUI somewhere. + * + * General usage is: parse a string using parse(), render it using render(). + * + * The parser generates a list of segments, each segment representing a part + * of the document, with a specific formatting / render type. For example, + * links are their own segments, a bold section in a link would be its own + * section and so on. + * The data structure is essentially a very flat multi-tree, where the segments + * returned are the leaves, and the roots are the individual lines, represented + * as text segments. + * Formatting is done by accumulating formatting information over the parent + * nodes, up to the root. */ object Document { /** * Parses a plain text document into a list of segments. */ - def parse(document: Iterable[String]): Iterable[Segment] = { - var segments = document.flatMap(line => Iterable(new segment.TextSegment(null, Option(line).fold("")(_.reverse.dropWhile(_.isWhitespace).reverse)), new segment.NewLineSegment())).toArray + def parse(document: Iterable[String]): Segment = { + var segments: Iterable[Segment] = document.map(line => new segment.TextSegment(null, Option(line).fold("")(_.reverse.dropWhile(_.isWhitespace).reverse))) for ((pattern, factory) <- segmentTypes) { segments = segments.flatMap(_.refine(pattern, factory)) } - for (Array(s1, s2) <- segments.sliding(2)) { - s2.previous = s1 + for (window <- segments.sliding(2) if window.size == 2) { + window.head.next = window.last } - segments + segments.head } /** - * Renders a list of segments and tooltips if a segment with a tooltip is hovered. - * Returns a link address if a link is hovered. + * Compute the overall height of a document, e.g. for computation of scroll offsets. */ - def render(document: Iterable[Segment], x: Int, y: Int, maxWidth: Int, maxHeight: Int, yOffset: Int, renderer: FontRenderer, mouseX: Int, mouseY: Int): Option[InteractiveSegment] = { + def height(document: Segment, maxWidth: Int, renderer: FontRenderer): Int = { + var currentX = 0 + var currentY = 0 + var segment = document + while (segment != null) { + currentY += segment.nextY(currentX, maxWidth, renderer) + currentX = segment.nextX(currentX, maxWidth, renderer) + segment = segment.next + } + currentY + } + + /** + * Line height for a normal line of text. + */ + def lineHeight(renderer: FontRenderer): Int = renderer.FONT_HEIGHT + 1 + + /** + * Renders a list of segments and tooltips if a segment with a tooltip is hovered. + * Returns the hovered interactive segment, if any. + */ + def render(document: Segment, x: Int, y: Int, maxWidth: Int, maxHeight: Int, yOffset: Int, renderer: FontRenderer, mouseX: Int, mouseY: Int): Option[InteractiveSegment] = { val mc = Minecraft.getMinecraft GL11.glPushAttrib(GL11.GL_ALL_ATTRIB_BITS) @@ -68,13 +101,20 @@ object Document { // Actual rendering. var hovered: Option[InteractiveSegment] = None - var currentX = 0 - var currentY = 0 - for (segment <- document) { - val result = segment.render(x, y + currentY - yOffset, currentX, maxWidth, y, maxHeight - (currentY - yOffset), renderer, mouseX, mouseY) - hovered = hovered.orElse(result) - currentY += segment.height(currentX, maxWidth, renderer) - currentX = segment.width(currentX, maxWidth, renderer) + var indent = 0 + var currentY = y - yOffset + val minY = y - lineHeight(renderer) + val maxY = y + maxHeight + lineHeight(renderer) + var segment = document + while (segment != null) { + val segmentHeight = segment.nextY(indent, maxWidth, renderer) + if (currentY + segmentHeight >= minY && currentY <= maxY) { + val result = segment.render(x, currentY, indent, maxWidth, renderer, mouseX, mouseY) + hovered = hovered.orElse(result) + } + currentY += segmentHeight + indent = segment.nextX(indent, maxWidth, renderer) + segment = segment.next } if (mouseX < x || mouseX > x + maxWidth || mouseY < y || mouseY > y + maxHeight) hovered = None hovered.foreach(_.notifyHover()) @@ -84,24 +124,6 @@ object Document { hovered } - /** - * Compute the overall height of a document, for computation of scroll offsets. - */ - def height(document: Iterable[Segment], maxWidth: Int, renderer: FontRenderer): Int = { - var currentX = 0 - var currentY = 0 - for (segment <- document) { - currentY += segment.height(currentX, maxWidth, renderer) - currentX = segment.width(currentX, maxWidth, renderer) - } - currentY - } - - /** - * Line height for a normal line of text. - */ - def lineHeight(renderer: FontRenderer): Int = renderer.FONT_HEIGHT + 1 - // ----------------------------------------------------------------------- // private def HeaderSegment(s: Segment, m: Regex.Match) = new segment.HeaderSegment(s, m.group(2), m.group(1).length) diff --git a/src/main/scala/li/cil/oc/client/renderer/markdown/segment/BasicTextSegment.scala b/src/main/scala/li/cil/oc/client/renderer/markdown/segment/BasicTextSegment.scala new file mode 100644 index 000000000..7fd3e328f --- /dev/null +++ b/src/main/scala/li/cil/oc/client/renderer/markdown/segment/BasicTextSegment.scala @@ -0,0 +1,68 @@ +package li.cil.oc.client.renderer.markdown.segment + +import li.cil.oc.client.renderer.markdown.Document +import net.minecraft.client.gui.FontRenderer + +trait BasicTextSegment extends Segment { + protected final val breaks = Set(' ', '.', ',', ':', ';', '!', '?', '_', '=', '-', '+', '*', '/', '\\') + protected final val lists = Set("- ", "* ") + protected lazy val rootPrefix = root.asInstanceOf[TextSegment].text.take(2) + + override def nextX(indent: Int, maxWidth: Int, renderer: FontRenderer): Int = { + if (isLast) return 0 + var currentX = indent + var chars = text + if (ignoreLeadingWhitespace && indent == 0) chars = chars.dropWhile(_.isWhitespace) + val wrapIndent = computeWrapIndent(renderer) + var numChars = maxChars(chars, maxWidth - indent, maxWidth - wrapIndent, renderer) + while (chars.length > numChars) { + chars = chars.drop(numChars).dropWhile(_.isWhitespace) + numChars = maxChars(chars, maxWidth - wrapIndent, maxWidth - wrapIndent, renderer) + currentX = wrapIndent + } + currentX + stringWidth(chars, renderer) + } + + override def nextY(indent: Int, maxWidth: Int, renderer: FontRenderer): Int = { + var lines = 0 + var chars = text + if (ignoreLeadingWhitespace && indent == 0) chars = chars.dropWhile(_.isWhitespace) + val wrapIndent = computeWrapIndent(renderer) + var numChars = maxChars(chars, maxWidth - indent, maxWidth - wrapIndent, renderer) + while (chars.length > numChars) { + lines += 1 + chars = chars.drop(numChars).dropWhile(_.isWhitespace) + numChars = maxChars(chars, maxWidth - wrapIndent, maxWidth - wrapIndent, renderer) + } + if (isLast) lines += 1 + lines * lineHeight(renderer) + } + + // ----------------------------------------------------------------------- // + + protected def text: String + + protected def ignoreLeadingWhitespace: Boolean = true + + protected def lineHeight(renderer: FontRenderer): Int = Document.lineHeight(renderer) + + protected def stringWidth(s: String, renderer: FontRenderer): Int + + protected def maxChars(s: String, maxWidth: Int, maxLineWidth: Int, renderer: FontRenderer): Int = { + var pos = -1 + var lastBreak = -1 + val fullWidth = stringWidth(s, renderer) + while (pos < s.length) { + pos += 1 + val width = stringWidth(s.take(pos), renderer) + if (width >= maxWidth) { + if (lastBreak > 0 || fullWidth <= maxLineWidth || s.exists(breaks.contains)) return lastBreak + 1 + else return pos - 1 + } + if (pos < s.length && breaks.contains(s.charAt(pos))) lastBreak = pos + } + pos + } + + protected def computeWrapIndent(renderer: FontRenderer) = if (lists.contains(rootPrefix)) renderer.getStringWidth(rootPrefix) else 0 +} diff --git a/src/main/scala/li/cil/oc/client/renderer/markdown/segment/CodeSegment.scala b/src/main/scala/li/cil/oc/client/renderer/markdown/segment/CodeSegment.scala index eace30584..46f36f4aa 100644 --- a/src/main/scala/li/cil/oc/client/renderer/markdown/segment/CodeSegment.scala +++ b/src/main/scala/li/cil/oc/client/renderer/markdown/segment/CodeSegment.scala @@ -1,80 +1,34 @@ package li.cil.oc.client.renderer.markdown.segment import li.cil.oc.client.renderer.TextBufferRenderCache -import li.cil.oc.client.renderer.markdown.Document import net.minecraft.client.gui.FontRenderer import org.lwjgl.opengl.GL11 -private[markdown] class CodeSegment(protected val parent: Segment, val text: String) extends Segment { - private final val breaks = Set(' ', '.', ',', ':', ';', '!', '?', '_', '=', '-', '+', '*', '/', '\\') - private final val lists = Set("- ", "* ") - private lazy val rootPrefix = root.asInstanceOf[TextSegment].text.take(2) - - override def height(indent: Int, maxWidth: Int, renderer: FontRenderer): Int = { - var lines = 0 - var chars = text - val wrapIndent = computeWrapIndent(renderer) - var numChars = maxChars(chars, maxWidth - indent, maxWidth - wrapIndent) - while (chars.length > numChars) { - lines += 1 - chars = chars.drop(numChars).dropWhile(_.isWhitespace) - numChars = maxChars(chars, maxWidth - wrapIndent, maxWidth - wrapIndent) - } - lines * Document.lineHeight(renderer) - } - - override def width(indent: Int, maxWidth: Int, renderer: FontRenderer): Int = { - var currentX = indent - var chars = text - val wrapIndent = computeWrapIndent(renderer) - var numChars = maxChars(chars, maxWidth - indent, maxWidth - wrapIndent) - while (chars.length > numChars) { - chars = chars.drop(numChars).dropWhile(_.isWhitespace) - numChars = maxChars(chars, maxWidth - wrapIndent, maxWidth - wrapIndent) - currentX = wrapIndent + 1 - } - currentX + stringWidth(chars) - } - - override def render(x: Int, y: Int, indent: Int, maxWidth: Int, minY: Int, maxY: Int, renderer: FontRenderer, mouseX: Int, mouseY: Int): Option[InteractiveSegment] = { +private[markdown] class CodeSegment(val parent: Segment, val text: String) extends BasicTextSegment { + override def render(x: Int, y: Int, indent: Int, maxWidth: Int, renderer: FontRenderer, mouseX: Int, mouseY: Int): Option[InteractiveSegment] = { TextBufferRenderCache.renderer.generateChars(text.toCharArray) var currentX = x + indent var currentY = y var chars = text val wrapIndent = computeWrapIndent(renderer) - var numChars = maxChars(chars, maxWidth - indent, maxWidth - wrapIndent) - while (chars.length > 0 && (currentY - y) < maxY) { + var numChars = maxChars(chars, maxWidth - indent, maxWidth - wrapIndent, renderer) + while (chars.length > 0) { val part = chars.take(numChars) GL11.glColor4f(0.75f, 0.8f, 1, 1) TextBufferRenderCache.renderer.drawString(part, currentX, currentY) currentX = x + wrapIndent - currentY += Document.lineHeight(renderer) + currentY += lineHeight(renderer) chars = chars.drop(numChars).dropWhile(_.isWhitespace) - numChars = maxChars(chars, maxWidth - wrapIndent, maxWidth - wrapIndent) + numChars = maxChars(chars, maxWidth - wrapIndent, maxWidth - wrapIndent, renderer) } None } - private def stringWidth(s: String): Int = s.length * TextBufferRenderCache.renderer.charRenderWidth + override protected def ignoreLeadingWhitespace: Boolean = false - private def maxChars(s: String, maxWidth: Int, maxLineWidth: Int): Int = { - var pos = 0 - var lastBreak = -1 - while (pos < s.length) { - pos += 1 - val width = stringWidth(s.take(pos)) - if (width >= maxWidth) { - if (lastBreak > 0 || stringWidth(s) <= maxLineWidth || s.exists(breaks.contains)) return lastBreak + 1 - else return pos - 1 - } - if (pos < s.length && breaks.contains(s.charAt(pos))) lastBreak = pos - } - pos - } - - private def computeWrapIndent(renderer: FontRenderer) = if (lists.contains(rootPrefix)) renderer.getStringWidth(rootPrefix) else 0 + override protected def stringWidth(s: String, renderer: FontRenderer): Int = s.length * TextBufferRenderCache.renderer.charRenderWidth override def toString: String = s"{CodeSegment: text = $text}" } diff --git a/src/main/scala/li/cil/oc/client/renderer/markdown/segment/InteractiveSegment.scala b/src/main/scala/li/cil/oc/client/renderer/markdown/segment/InteractiveSegment.scala index 5419f701c..347e993a7 100644 --- a/src/main/scala/li/cil/oc/client/renderer/markdown/segment/InteractiveSegment.scala +++ b/src/main/scala/li/cil/oc/client/renderer/markdown/segment/InteractiveSegment.scala @@ -1,13 +1,37 @@ package li.cil.oc.client.renderer.markdown.segment +/** + * Segments that can react to mouse presence and input. + * + * The currently hovered interactive segment is picked in the render process + * and returned there. Calling code can then decide whether to render the + * segment's tooltip, for example. It should also notice the currently hovered + * segment when a left-click occurs. + */ trait InteractiveSegment extends Segment { + /** + * The tooltip that should be displayed when this segment is being hovered. + */ def tooltip: Option[String] = None - def link: Option[String] = None - + /** + * Should be called by whatever is rendering the document when a left mouse + * click occurs. + * + * The mouse coordinates are expected to be in the same frame of reference as + * the document. + * + * @param mouseX the X coordinate of the mouse cursor. + * @param mouseY the Y coordinate of the mouse cursor. + * @return whether the click was processed (true) or ignored (false). + */ def onMouseClick(mouseX: Int, mouseY: Int): Boolean = false + // Called during the render call on the currently hovered interactive segment. + // Useful to track hover state, e.g. for link highlighting. private[markdown] def notifyHover(): Unit = {} - private[markdown] def checkHovered(mouseX: Int, mouseY: Int, x: Int, y: Int, w: Int, h: Int): Option[InteractiveSegment] = if (mouseX >= x && mouseY >= y && mouseX <= x + w && mouseY <= y + h) Some(this) else None + // Collision check, test if coordinate is inside this interactive segment. + private[markdown] def checkHovered(mouseX: Int, mouseY: Int, x: Int, y: Int, w: Int, h: Int): Option[InteractiveSegment] = + if (mouseX >= x && mouseY >= y && mouseX <= x + w && mouseY <= y + h) Some(this) else None } diff --git a/src/main/scala/li/cil/oc/client/renderer/markdown/segment/LinkSegment.scala b/src/main/scala/li/cil/oc/client/renderer/markdown/segment/LinkSegment.scala index 9ea335986..15fc30289 100644 --- a/src/main/scala/li/cil/oc/client/renderer/markdown/segment/LinkSegment.scala +++ b/src/main/scala/li/cil/oc/client/renderer/markdown/segment/LinkSegment.scala @@ -1,7 +1,11 @@ package li.cil.oc.client.renderer.markdown.segment +import java.net.URI + +import li.cil.oc.Localization import li.cil.oc.api import li.cil.oc.client.Manual +import net.minecraft.client.Minecraft private[markdown] class LinkSegment(parent: Segment, text: String, val url: String) extends TextSegment(parent, text) with InteractiveSegment { private final val normalColor = 0x66FF66 @@ -23,7 +27,11 @@ private[markdown] class LinkSegment(parent: Segment, text: String, val url: Stri override def tooltip: Option[String] = Option(url) - override def link: Option[String] = Option(url) + override def onMouseClick(mouseX: Int, mouseY: Int): Boolean = { + if (url.startsWith("http://") || url.startsWith("https://")) handleUrl(url) + else Manual.navigate(Manual.makeRelative(url, Manual.history.top.path)) + true + } override private[markdown] def notifyHover(): Unit = lastHovered = System.currentTimeMillis() @@ -34,5 +42,17 @@ private[markdown] class LinkSegment(parent: Segment, text: String, val url: Stri (r << 16) | (g << 8) | b } + private def handleUrl(url: String): Unit = { + // Pretty much copy-paste from GuiChat. + try { + val desktop = Class.forName("java.awt.Desktop") + val instance = desktop.getMethod("getDesktop").invoke(null) + desktop.getMethod("browse", classOf[URI]).invoke(instance, new URI(url)) + } + catch { + case t: Throwable => Minecraft.getMinecraft.thePlayer.addChatMessage(Localization.Chat.WarningLink(t.toString)) + } + } + override def toString: String = s"{LinkSegment: text = $text, url = $url}" } diff --git a/src/main/scala/li/cil/oc/client/renderer/markdown/segment/NewLineSegment.scala b/src/main/scala/li/cil/oc/client/renderer/markdown/segment/NewLineSegment.scala deleted file mode 100644 index d6eee6f03..000000000 --- a/src/main/scala/li/cil/oc/client/renderer/markdown/segment/NewLineSegment.scala +++ /dev/null @@ -1,15 +0,0 @@ -package li.cil.oc.client.renderer.markdown.segment - -import li.cil.oc.client.renderer.markdown.Document -import net.minecraft.client.gui.FontRenderer - -private[markdown] class NewLineSegment extends Segment { - override protected def parent: Segment = null - - override def height(indent: Int, maxWidth: Int, renderer: FontRenderer): Int = previous match { - case segment: TextSegment => (Document.lineHeight(renderer) * segment.resolvedScale).toInt - case _ => Document.lineHeight(renderer) - } - - override def toString: String = s"{NewLineSegment}" -} diff --git a/src/main/scala/li/cil/oc/client/renderer/markdown/segment/RenderSegment.scala b/src/main/scala/li/cil/oc/client/renderer/markdown/segment/RenderSegment.scala index c29996015..d1183338c 100644 --- a/src/main/scala/li/cil/oc/client/renderer/markdown/segment/RenderSegment.scala +++ b/src/main/scala/li/cil/oc/client/renderer/markdown/segment/RenderSegment.scala @@ -24,19 +24,17 @@ private[markdown] class RenderSegment(val parent: Segment, val title: String, va def imageWidth(maxWidth: Int) = math.min(maxWidth, imageRenderer.getWidth) - def imageHeight(maxWidth: Int) = (imageRenderer.getHeight * scale(maxWidth)).toInt + def imageHeight(maxWidth: Int) = math.ceil(imageRenderer.getHeight * scale(maxWidth)).toInt + 4 - override def width(indent: Int, maxWidth: Int, renderer: FontRenderer): Int = imageWidth(maxWidth) + override def nextY(indent: Int, maxWidth: Int, renderer: FontRenderer): Int = imageHeight(maxWidth) + (if (indent > 0) Document.lineHeight(renderer) else 0) - override def height(indent: Int, maxWidth: Int, renderer: FontRenderer): Int = { - math.max(0, imageHeight(maxWidth)) + (if (indent > 0) Document.lineHeight(renderer) else 0) - } + override def nextX(indent: Int, maxWidth: Int, renderer: FontRenderer): Int = 0 - override def render(x: Int, y: Int, indent: Int, maxWidth: Int, minY: Int, maxY: Int, renderer: FontRenderer, mouseX: Int, mouseY: Int): Option[InteractiveSegment] = { + override def render(x: Int, y: Int, indent: Int, maxWidth: Int, renderer: FontRenderer, mouseX: Int, mouseY: Int): Option[InteractiveSegment] = { val width = imageWidth(maxWidth) val height = imageHeight(maxWidth) val xOffset = (maxWidth - width) / 2 - val yOffset = 4 + (if (indent > 0) Document.lineHeight(renderer) else 0) + val yOffset = 2 + (if (indent > 0) Document.lineHeight(renderer) else 0) val s = scale(maxWidth) lastX = x + xOffset diff --git a/src/main/scala/li/cil/oc/client/renderer/markdown/segment/Segment.scala b/src/main/scala/li/cil/oc/client/renderer/markdown/segment/Segment.scala index be1ec951e..7e6ca0527 100644 --- a/src/main/scala/li/cil/oc/client/renderer/markdown/segment/Segment.scala +++ b/src/main/scala/li/cil/oc/client/renderer/markdown/segment/Segment.scala @@ -7,31 +7,54 @@ import scala.util.matching.Regex trait Segment { /** - * Computes the height of this segment, in pixels, given it starts at the - * specified indent into the current line, with the specified maximum - * allowed width. + * Parent segment, i.e. the segment this segment was refined from. + * Each line starts as a TextSegment that is refined based into segments + * based on the handled formatting rules / patterns. */ - def height(indent: Int, maxWidth: Int, renderer: FontRenderer): Int = 0 + def parent: Segment /** - * Computes the width of the last line of this segment, given it starts - * at the specified indent into the current line, with the specified - * maximum allowed width. - * If the segment remains on the same line, returns the new end of the - * line (i.e. indent plus width of the segment). + * The root segment, i.e. the original parent of this segment. */ - def width(indent: Int, maxWidth: Int, renderer: FontRenderer): Int = 0 + @tailrec final def root: Segment = if (parent == null) this else parent.root - def render(x: Int, y: Int, indent: Int, maxWidth: Int, minY: Int, maxY: Int, renderer: FontRenderer, mouseX: Int, mouseY: Int): Option[InteractiveSegment] = None + /** + * Get the X coordinate at which to render the next segment. + * + * For flowing/inline segments this will be to the right of the last line + * this segment renders, for block segments it will be at the start of + * the next line below this segment. + * + * The coordinates in this context are relative to (0,0). + */ + def nextX(indent: Int, maxWidth: Int, renderer: FontRenderer): Int - // Used when rendering, to compute the style of a nested segment. - protected def parent: Segment + /** + * Get the Y coordinate at which to render the next segment. + * + * For flowing/inline segments this will be the same level as the last line + * this segment renders, unless it's the last segment on its line. For block + * segments and last-on-line segments this will be the next line after. + * + * The coordinates in this context are relative to (0,0). + */ + def nextY(indent: Int, maxWidth: Int, renderer: FontRenderer): Int - @tailrec protected final def root: Segment = if (parent == null) this else parent.root + /** + * Render the segment at the specified coordinates with the specified + * properties. + */ + def render(x: Int, y: Int, indent: Int, maxWidth: Int, renderer: FontRenderer, mouseX: Int, mouseY: Int): Option[InteractiveSegment] = None + + // ----------------------------------------------------------------------- // // Used during construction, checks a segment for inner segments. private[markdown] def refine(pattern: Regex, factory: (Segment, Regex.Match) => Segment): Iterable[Segment] = Iterable(this) - // Set after construction of document, used for formatting (e.g. newline height). - private[markdown] var previous: Segment = null + // Set after construction of document, used for formatting, specifically + // to compute the height for last segment on a line (to force a new line). + private[markdown] var next: Segment = null + + // Utility method to check if the segment is the last on a line. + private[markdown] def isLast = next == null || root != next.root } diff --git a/src/main/scala/li/cil/oc/client/renderer/markdown/segment/TextSegment.scala b/src/main/scala/li/cil/oc/client/renderer/markdown/segment/TextSegment.scala index 8ecab9ac7..9c0bc8383 100644 --- a/src/main/scala/li/cil/oc/client/renderer/markdown/segment/TextSegment.scala +++ b/src/main/scala/li/cil/oc/client/renderer/markdown/segment/TextSegment.scala @@ -4,14 +4,35 @@ import li.cil.oc.client.renderer.markdown.Document import net.minecraft.client.gui.FontRenderer import org.lwjgl.opengl.GL11 -import scala.annotation.tailrec import scala.collection.mutable import scala.util.matching.Regex -private[markdown] class TextSegment(protected val parent: Segment, val text: String) extends Segment { - private final val breaks = Set(' ', '.', ',', ':', ';', '!', '?', '_', '=', '-', '+', '*', '/', '\\') - private final val lists = Set("- ", "* ") - private lazy val rootPrefix = root.asInstanceOf[TextSegment].text.take(2) +private[markdown] class TextSegment(val parent: Segment, val text: String) extends BasicTextSegment { + override def render(x: Int, y: Int, indent: Int, maxWidth: Int, renderer: FontRenderer, mouseX: Int, mouseY: Int): Option[InteractiveSegment] = { + var currentX = x + indent + var currentY = y + var chars = text + if (indent == 0) chars = chars.dropWhile(_.isWhitespace) + val wrapIndent = computeWrapIndent(renderer) + var numChars = maxChars(chars, maxWidth - indent, maxWidth - wrapIndent, renderer) + var hovered: Option[InteractiveSegment] = None + while (chars.length > 0) { + val part = chars.take(numChars) + hovered = hovered.orElse(resolvedInteractive.fold(None: Option[InteractiveSegment])(_.checkHovered(mouseX, mouseY, currentX, currentY, stringWidth(part, renderer), (Document.lineHeight(renderer) * resolvedScale).toInt))) + GL11.glPushMatrix() + GL11.glTranslatef(currentX, currentY, 0) + GL11.glScalef(resolvedScale, resolvedScale, resolvedScale) + GL11.glTranslatef(-currentX, -currentY, 0) + renderer.drawString(resolvedFormat + part, currentX, currentY, resolvedColor) + GL11.glPopMatrix() + currentX = x + wrapIndent + currentY += lineHeight(renderer) + chars = chars.drop(numChars).dropWhile(_.isWhitespace) + numChars = maxChars(chars, maxWidth - wrapIndent, maxWidth - wrapIndent, renderer) + } + + hovered + } override def refine(pattern: Regex, factory: (Segment, Regex.Match) => Segment): Iterable[Segment] = { val result = mutable.Buffer.empty[Segment] @@ -39,61 +60,13 @@ private[markdown] class TextSegment(protected val parent: Segment, val text: Str result } - override def height(indent: Int, maxWidth: Int, renderer: FontRenderer): Int = { - var lines = 0 - var chars = text - if (indent == 0) chars = chars.dropWhile(_.isWhitespace) - val wrapIndent = computeWrapIndent(renderer) - var numChars = maxChars(chars, maxWidth - indent, maxWidth - wrapIndent, renderer) - while (chars.length > numChars) { - lines += 1 - chars = chars.drop(numChars).dropWhile(_.isWhitespace) - numChars = maxChars(chars, maxWidth - wrapIndent, maxWidth - wrapIndent, renderer) - } - (lines * Document.lineHeight(renderer) * resolvedScale).toInt - } + // ----------------------------------------------------------------------- // - override def width(indent: Int, maxWidth: Int, renderer: FontRenderer): Int = { - var currentX = indent - var chars = text - if (indent == 0) chars = chars.dropWhile(_.isWhitespace) - val wrapIndent = computeWrapIndent(renderer) - var numChars = maxChars(chars, maxWidth - indent, maxWidth - wrapIndent, renderer) - while (chars.length > numChars) { - chars = chars.drop(numChars).dropWhile(_.isWhitespace) - numChars = maxChars(chars, maxWidth - wrapIndent, maxWidth - wrapIndent, renderer) - currentX = wrapIndent - } - currentX + (stringWidth(chars, renderer) * resolvedScale).toInt - } + override protected def lineHeight(renderer: FontRenderer): Int = (super.lineHeight(renderer) * resolvedScale).toInt - override def render(x: Int, y: Int, indent: Int, maxWidth: Int, minY: Int, maxY: Int, renderer: FontRenderer, mouseX: Int, mouseY: Int): Option[InteractiveSegment] = { - val fontScale = resolvedScale - var currentX = x + indent - var currentY = y - var chars = text - if (indent == 0) chars = chars.dropWhile(_.isWhitespace) - val wrapIndent = computeWrapIndent(renderer) - var numChars = maxChars(chars, maxWidth - indent, maxWidth - wrapIndent, renderer) - val interactive = findInteractive() - var hovered: Option[InteractiveSegment] = None - while (chars.length > 0 && (currentY - y) < maxY) { - val part = chars.take(numChars) - hovered = hovered.orElse(interactive.fold(None: Option[InteractiveSegment])(_.checkHovered(mouseX, mouseY, currentX, currentY, (stringWidth(part, renderer) * fontScale).toInt, (Document.lineHeight(renderer) * fontScale).toInt))) - GL11.glPushMatrix() - GL11.glTranslatef(currentX, currentY, 0) - GL11.glScalef(fontScale, fontScale, fontScale) - GL11.glTranslatef(-currentX, -currentY, 0) - renderer.drawString(resolvedFormat + part, currentX, currentY, resolvedColor) - GL11.glPopMatrix() - currentX = x + wrapIndent - currentY += (Document.lineHeight(renderer) * fontScale).toInt - chars = chars.drop(numChars).dropWhile(_.isWhitespace) - numChars = maxChars(chars, maxWidth - wrapIndent, maxWidth - wrapIndent, renderer) - } + override protected def stringWidth(s: String, renderer: FontRenderer): Int = (renderer.getStringWidth(resolvedFormat + s) * resolvedScale).toInt - hovered - } + // ----------------------------------------------------------------------- // protected def color = None: Option[Int] @@ -101,48 +74,28 @@ private[markdown] class TextSegment(protected val parent: Segment, val text: Str protected def format = "" - protected def stringWidth(s: String, renderer: FontRenderer): Int = renderer.getStringWidth(resolvedFormat + s) + private def resolvedColor: Int = color.getOrElse(parent match { + case segment: TextSegment => segment.resolvedColor + case _ => 0xDDDDDD + }) - def resolvedColor: Int = parent match { - case segment: TextSegment => color.getOrElse(segment.resolvedColor) - case _ => color.getOrElse(0xDDDDDD) + private def resolvedScale: Float = parent match { + case segment: TextSegment => scale.getOrElse(1f) * segment.resolvedScale + case _ => 1f } - def resolvedScale: Float = parent match { - case segment: TextSegment => scale.getOrElse(segment.resolvedScale) - case _ => scale.getOrElse(1f) - } - - def resolvedFormat: String = parent match { + private def resolvedFormat: String = parent match { case segment: TextSegment => segment.resolvedFormat + format case _ => format } - @tailrec private def findInteractive(): Option[InteractiveSegment] = this match { + private lazy val resolvedInteractive: Option[InteractiveSegment] = this match { case segment: InteractiveSegment => Some(segment) case _ => parent match { - case segment: TextSegment => segment.findInteractive() + case segment: TextSegment => segment.resolvedInteractive case _ => None } } - private def maxChars(s: String, maxWidth: Int, maxLineWidth: Int, renderer: FontRenderer): Int = { - val fontScale = resolvedScale - var pos = -1 - var lastBreak = -1 - while (pos < s.length) { - pos += 1 - val width = (stringWidth(s.take(pos), renderer) * fontScale).toInt - if (width >= maxWidth) { - if (lastBreak > 0 || stringWidth(s, renderer) <= maxLineWidth || s.exists(breaks.contains)) return lastBreak + 1 - else return pos - 1 - } - if (pos < s.length && breaks.contains(s.charAt(pos))) lastBreak = pos - } - pos - } - - private def computeWrapIndent(renderer: FontRenderer) = if (lists.contains(rootPrefix)) renderer.getStringWidth(rootPrefix) else 0 - override def toString: String = s"{TextSegment: text = $text}" } diff --git a/src/main/scala/li/cil/oc/client/renderer/markdown/segment/render/TextureImageProvider.scala b/src/main/scala/li/cil/oc/client/renderer/markdown/segment/render/TextureImageProvider.scala index e3ea2d3fe..487d778fa 100644 --- a/src/main/scala/li/cil/oc/client/renderer/markdown/segment/render/TextureImageProvider.scala +++ b/src/main/scala/li/cil/oc/client/renderer/markdown/segment/render/TextureImageProvider.scala @@ -2,11 +2,18 @@ package li.cil.oc.client.renderer.markdown.segment.render import li.cil.oc.api.manual.ImageProvider import li.cil.oc.api.manual.ImageRenderer +import li.cil.oc.api.manual.InteractiveImageRenderer +import li.cil.oc.client.Textures import net.minecraft.util.ResourceLocation object TextureImageProvider extends ImageProvider { override def getImage(data: String): ImageRenderer = { - val location = new ResourceLocation(data) - new TextureImageRenderer(location) + try new TextureImageRenderer(new ResourceLocation(data)) catch { + case t: Throwable => new TextureImageRenderer(Textures.guiManualMissingItem) with InteractiveImageRenderer { + override def getTooltip(tooltip: String): String = "oc:gui.Manual.Warning.ImageMissing" + + override def onMouseClick(mouseX: Int, mouseY: Int): Boolean = false + } + } } } diff --git a/src/main/scala/li/cil/oc/client/renderer/tileentity/RobotRenderer.scala b/src/main/scala/li/cil/oc/client/renderer/tileentity/RobotRenderer.scala index a223b60e5..922495a4f 100644 --- a/src/main/scala/li/cil/oc/client/renderer/tileentity/RobotRenderer.scala +++ b/src/main/scala/li/cil/oc/client/renderer/tileentity/RobotRenderer.scala @@ -428,7 +428,7 @@ object RobotRenderer extends TileEntitySpecialRenderer { GL11.glPopMatrix() val name = robot.name - if (Settings.get.robotLabels && !Strings.isNullOrEmpty(name) && x * x + y * y + z * z < RendererLivingEntity.NAME_TAG_RANGE) { + if (Settings.get.robotLabels && MinecraftForgeClient.getRenderPass == 1 && !Strings.isNullOrEmpty(name) && x * x + y * y + z * z < RendererLivingEntity.NAME_TAG_RANGE) { GL11.glPushMatrix() // This is pretty much copy-pasta from the entity's label renderer. @@ -452,7 +452,7 @@ object RobotRenderer extends TileEntitySpecialRenderer { GL11.glDisable(GL11.GL_TEXTURE_2D) t.startDrawingQuads() - t.setColorRGBA_F(0, 0, 0, 0.25f) + t.setColorRGBA_F(0, 0, 0, 0.5f) t.addVertex(-halfWidth - 1, -1, 0) t.addVertex(-halfWidth - 1, 8, 0) t.addVertex(halfWidth + 1, 8, 0) diff --git a/src/main/scala/li/cil/oc/common/EventHandler.scala b/src/main/scala/li/cil/oc/common/EventHandler.scala index eaf3223a8..7d69d7126 100644 --- a/src/main/scala/li/cil/oc/common/EventHandler.scala +++ b/src/main/scala/li/cil/oc/common/EventHandler.scala @@ -12,6 +12,7 @@ import cpw.mods.fml.common.network.FMLNetworkEvent.ClientConnectedToServerEvent import li.cil.oc._ import li.cil.oc.api.Network import li.cil.oc.api.detail.ItemInfo +import li.cil.oc.api.machine.MachineHost import li.cil.oc.client.renderer.PetRenderer import li.cil.oc.client.{PacketSender => ClientPacketSender} import li.cil.oc.common.asm.ClassTransformer @@ -26,16 +27,21 @@ import li.cil.oc.integration.util import li.cil.oc.server.component.Keyboard import li.cil.oc.server.machine.Machine import li.cil.oc.server.{PacketSender => ServerPacketSender} +import li.cil.oc.util.ExtendedWorld._ import li.cil.oc.util._ import net.minecraft.client.Minecraft +import net.minecraft.entity.player.EntityPlayer import net.minecraft.entity.player.EntityPlayerMP import net.minecraft.item.ItemStack +import net.minecraft.nbt.NBTTagCompound import net.minecraft.server.MinecraftServer import net.minecraft.tileentity.TileEntity import net.minecraftforge.common.MinecraftForge import net.minecraftforge.common.util.FakePlayer import net.minecraftforge.common.util.ForgeDirection +import net.minecraftforge.event.entity.EntityJoinWorldEvent import net.minecraftforge.event.world.BlockEvent +import net.minecraftforge.event.world.ChunkEvent import net.minecraftforge.event.world.WorldEvent import scala.collection.convert.WrapAsScala._ @@ -137,9 +143,16 @@ object EventHandler { else if (robot.world != null) robot.machine.update() }) runningRobots --= invalid - + } + else if (e.phase == TickEvent.Phase.END) { + // Clean up machines *after* a tick, to allow stuff to be saved, first. val closed = mutable.ArrayBuffer.empty[Machine] - machines.foreach(machine => if (machine.tryClose()) closed += machine) + machines.foreach(machine => if (machine.tryClose()) { + closed += machine + if (machine.host.world == null || !machine.host.world.blockExists(BlockPosition(machine.host))) { + if (machine.node != null) machine.node.remove() + } + }) machines --= closed } @@ -227,6 +240,23 @@ object EventHandler { keyboards.foreach(_.releasePressedKeys(e.player)) } + @SubscribeEvent + def onEntityJoinWorld(e: EntityJoinWorldEvent): Unit = { + if (Settings.get.giveManualToNewPlayers && !e.world.isRemote) e.entity match { + case player: EntityPlayer if !player.isInstanceOf[FakePlayer] => + val nbt = player.getEntityData + if (!nbt.hasKey(EntityPlayer.PERSISTED_NBT_TAG)) { + nbt.setTag(EntityPlayer.PERSISTED_NBT_TAG, new NBTTagCompound()) + } + val ocData = nbt.getCompoundTag(EntityPlayer.PERSISTED_NBT_TAG) + if (!ocData.getBoolean(Settings.namespace + "receivedManual")) { + ocData.setBoolean(Settings.namespace + "receivedManual", true) + player.inventory.addItemStackToInventory(api.Items.get(Constants.ItemName.Manual).createItemStack(1)) + } + case _ => + } + } + lazy val drone = api.Items.get(Constants.ItemName.Drone) lazy val eeprom = api.Items.get(Constants.ItemName.EEPROM) lazy val mcu = api.Items.get(Constants.BlockName.Microcontroller) @@ -321,10 +351,23 @@ object EventHandler { @SubscribeEvent def onWorldUnload(e: WorldEvent.Unload) { if (!e.world.isRemote) { - import scala.collection.convert.WrapAsScala._ e.world.loadedTileEntityList.collect { case te: tileentity.traits.TileEntity => te.dispose() } + e.world.loadedEntityList.collect { + case host: MachineHost => host.machine.stop() + } + } + } + + @SubscribeEvent + def onChunkUnload(e: ChunkEvent.Unload): Unit = { + if (!e.world.isRemote) { + e.getChunk.entityLists.foreach(_.collect { + case host: MachineHost => host.machine match { + case machine: Machine => scheduleClose(machine) + } + }) } } } diff --git a/src/main/scala/li/cil/oc/common/Loot.scala b/src/main/scala/li/cil/oc/common/Loot.scala index e9125da0e..96f48fec1 100644 --- a/src/main/scala/li/cil/oc/common/Loot.scala +++ b/src/main/scala/li/cil/oc/common/Loot.scala @@ -10,6 +10,7 @@ import li.cil.oc.Settings import li.cil.oc.common.init.Items import li.cil.oc.util.Color import net.minecraft.inventory.IInventory +import net.minecraft.item.Item import net.minecraft.item.ItemStack import net.minecraft.nbt.NBTTagCompound import net.minecraft.util.WeightedRandomChestContent @@ -20,7 +21,7 @@ import net.minecraftforge.event.world.WorldEvent import scala.collection.convert.WrapAsScala._ import scala.collection.mutable -object Loot extends WeightedRandomChestContent(Items.createOpenOS(), 1, 1, Settings.get.lootProbability) { +object Loot extends WeightedRandomChestContent(new ItemStack(null: Item), 1, 1, Settings.get.lootProbability) { val containers = Array( ChestGenHooks.DUNGEON_CHEST, ChestGenHooks.PYRAMID_DESERT_CHEST, @@ -76,7 +77,7 @@ object Loot extends WeightedRandomChestContent(Items.createOpenOS(), 1, 1, Setti } private def parseLootDisks(list: java.util.Properties, acc: mutable.Map[String, (ItemStack, Int)]) { - for (key <- list.stringPropertyNames if key != "OpenOS") { + for (key <- list.stringPropertyNames) { val value = list.getProperty(key) try value.split(":") match { case Array(name, count, color) => diff --git a/src/main/scala/li/cil/oc/common/PacketType.scala b/src/main/scala/li/cil/oc/common/PacketType.scala index d34b1d04f..76ce62fa1 100644 --- a/src/main/scala/li/cil/oc/common/PacketType.scala +++ b/src/main/scala/li/cil/oc/common/PacketType.scala @@ -19,6 +19,7 @@ object PacketType extends Enumeration { HologramScale, HologramSet, HologramTranslation, + ParticleEffect, PetVisibility, // Goes both ways. PowerState, PrinterState, diff --git a/src/main/scala/li/cil/oc/common/asm/ClassTransformer.scala b/src/main/scala/li/cil/oc/common/asm/ClassTransformer.scala index fb8235ec8..79794a933 100644 --- a/src/main/scala/li/cil/oc/common/asm/ClassTransformer.scala +++ b/src/main/scala/li/cil/oc/common/asm/ClassTransformer.scala @@ -107,6 +107,7 @@ class ClassTransformer extends IClassTransformer { } case _ => log.warn(s"Skipping interface $interfaceName from unknown mod $modid.") + ClassTransformer.hadErrors = true } case _ => } diff --git a/src/main/scala/li/cil/oc/common/block/Print.scala b/src/main/scala/li/cil/oc/common/block/Print.scala index e7a807e78..061df66c6 100644 --- a/src/main/scala/li/cil/oc/common/block/Print.scala +++ b/src/main/scala/li/cil/oc/common/block/Print.scala @@ -62,7 +62,7 @@ class Print(protected implicit val tileTag: ClassTag[tileentity.Print]) extends if (data.emitRedstone) { tooltip.add(Localization.Tooltip.PrintRedstoneLevel(data.redstoneLevel)) } - if (data.lightLevel > 0) { + if (data.emitLight) { tooltip.add(Localization.Tooltip.PrintLightValue(data.lightLevel)) } } @@ -75,7 +75,7 @@ class Print(protected implicit val tileTag: ClassTag[tileentity.Print]) extends override def getLightOpacity(world: IBlockAccess, x: Int, y: Int, z: Int): Int = world.getTileEntity(x, y, z) match { - case print: tileentity.Print => (print.data.opacity * 4).toInt + case print: tileentity.Print if Settings.get.printsHaveOpacity => (print.data.opacity * 4).toInt case _ => super.getLightOpacity(world, x, y, z) } diff --git a/src/main/scala/li/cil/oc/common/entity/Drone.scala b/src/main/scala/li/cil/oc/common/entity/Drone.scala index 697a8e301..48a69bd33 100644 --- a/src/main/scala/li/cil/oc/common/entity/Drone.scala +++ b/src/main/scala/li/cil/oc/common/entity/Drone.scala @@ -206,19 +206,7 @@ class Drone(val world: World) extends Entity(world) with MachineHost with intern // ----------------------------------------------------------------------- // - override def onAnalyze(player: EntityPlayer, side: Int, hitX: Float, hitY: Float, hitZ: Float) = { - machine.lastError match { - case value if value != null => - player.addChatMessage(Localization.Analyzer.LastError(value)) - case _ => - } - player.addChatMessage(Localization.Analyzer.Components(machine.componentCount, machine.maxComponents)) - val list = machine.users - if (list.size > 0) { - player.addChatMessage(Localization.Analyzer.Users(list)) - } - Array(machine.node) - } + override def onAnalyze(player: EntityPlayer, side: Int, hitX: Float, hitY: Float, hitZ: Float) = Array(machine.node) // ----------------------------------------------------------------------- // diff --git a/src/main/scala/li/cil/oc/common/init/Items.scala b/src/main/scala/li/cil/oc/common/init/Items.scala index f8c758e2a..6e86c49f2 100644 --- a/src/main/scala/li/cil/oc/common/init/Items.scala +++ b/src/main/scala/li/cil/oc/common/init/Items.scala @@ -20,7 +20,6 @@ import li.cil.oc.common.item.data.RobotData import li.cil.oc.common.item.data.TabletData import li.cil.oc.common.recipe.Recipes import li.cil.oc.integration.Mods -import li.cil.oc.util.Color import net.minecraft.block.Block import net.minecraft.creativetab.CreativeTabs import net.minecraft.entity.player.EntityPlayer @@ -114,18 +113,7 @@ object Items extends ItemAPI { // ----------------------------------------------------------------------- // def createOpenOS(amount: Int = 1) = { - val data = new NBTTagCompound() - data.setString(Settings.namespace + "fs.label", "openos") - - val nbt = new NBTTagCompound() - nbt.setTag(Settings.namespace + "data", data) - nbt.setString(Settings.namespace + "lootPath", "OpenOS") - nbt.setInteger(Settings.namespace + "color", Color.dyes.indexOf("dyeGreen")) - - val stack = get(Constants.ItemName.LootDisk).createItemStack(amount) - stack.setTagCompound(nbt) - - stack + Loot.builtInDisks.get("OpenOS").map(_._1.copy()).orNull } def createLuaBios(amount: Int = 1) = { @@ -268,7 +256,6 @@ object Items extends ItemAPI { def init() { val multi = new item.Delegator() { def configuredItems = Array( - createOpenOS(), createLuaBios(), createConfiguredDrone(), createConfiguredMicrocontroller(), @@ -389,7 +376,6 @@ object Items extends ItemAPI { else super.onItemRightClick(stack, world, player) } } - Recipes.addRecipe(createOpenOS(), "openOS") Recipes.addSubItem(new item.UpgradeInventoryController(multi), Constants.ItemName.InventoryControllerUpgrade, "oc:inventoryControllerUpgrade") Recipes.addSubItem(new item.UpgradeChunkloader(multi), Constants.ItemName.ChunkloaderUpgrade, "oc:chunkloaderUpgrade") @@ -428,7 +414,7 @@ object Items extends ItemAPI { // 1.4.2 val eeprom = new item.EEPROM() Recipes.addItem(eeprom, Constants.ItemName.EEPROM, "oc:eeprom") - Recipes.addRecipe(createLuaBios(), "luaBios") + Recipes.addRecipe(createLuaBios(), Constants.ItemName.LuaBios) Recipes.addSubItem(new item.MicrocontrollerCase(multi, Tier.One), Constants.ItemName.MicrocontrollerCaseTier1, "oc:microcontrollerCase1") // 1.4.3 @@ -460,6 +446,7 @@ object Items extends ItemAPI { Recipes.addSubItem(new item.TexturePicker(multi), Constants.ItemName.TexturePicker, "oc:texturePicker") // 1.5.7 - Recipes.addSubItem(new item.Manual(multi), Constants.ItemName.Manual, "oc:manual") + Recipes.addSubItem(new item.Manual(multi), Constants.ItemName.Manual, "oc:manual", "craftingBook") + Recipes.addItem(new item.Wrench(), Constants.ItemName.Wrench, "oc:wrench") } } diff --git a/src/main/scala/li/cil/oc/common/item/Analyzer.scala b/src/main/scala/li/cil/oc/common/item/Analyzer.scala index 0fd0be0be..cf5f859fe 100644 --- a/src/main/scala/li/cil/oc/common/item/Analyzer.scala +++ b/src/main/scala/li/cil/oc/common/item/Analyzer.scala @@ -5,6 +5,7 @@ import li.cil.oc.Constants import li.cil.oc.Localization import li.cil.oc.Settings import li.cil.oc.api +import li.cil.oc.api.machine.Machine import li.cil.oc.api.network.Analyzable import li.cil.oc.api.network._ import li.cil.oc.common.tileentity @@ -59,6 +60,20 @@ object Analyzer { private def analyzeNodes(nodes: Array[Node], player: EntityPlayer) = if (nodes != null) for (node <- nodes if node != null) { player match { case playerMP: EntityPlayerMP => + if (node != null) node.host match { + case machine: Machine => + if (machine != null) { + if (machine.lastError != null) { + playerMP.addChatMessage(Localization.Analyzer.LastError(machine.lastError)) + } + playerMP.addChatMessage(Localization.Analyzer.Components(machine.componentCount, machine.maxComponents)) + val list = machine.users + if (list.length > 0) { + playerMP.addChatMessage(Localization.Analyzer.Users(list)) + } + } + case _ => + } node match { case connector: Connector => if (connector.localBufferSize > 0) { diff --git a/src/main/scala/li/cil/oc/common/item/Wrench.scala b/src/main/scala/li/cil/oc/common/item/Wrench.scala new file mode 100644 index 000000000..2fff19aa7 --- /dev/null +++ b/src/main/scala/li/cil/oc/common/item/Wrench.scala @@ -0,0 +1,94 @@ +package li.cil.oc.common.item + +import li.cil.oc.api +import li.cil.oc.common.asm.Injectable +import li.cil.oc.integration.Mods +import net.minecraft.block.Block +import net.minecraft.entity.EntityLivingBase +import net.minecraft.entity.item.EntityMinecart +import net.minecraft.entity.player.EntityPlayer +import net.minecraft.init.Blocks +import net.minecraft.item.ItemStack +import net.minecraft.world.World +import net.minecraftforge.common.util.ForgeDirection + +@Injectable.InterfaceList(Array( + new Injectable.Interface(value = "appeng.api.implementations.items.IAEWrench", modid = Mods.IDs.AppliedEnergistics2), + new Injectable.Interface(value = "buildcraft.api.tools.IToolWrench", modid = Mods.IDs.BuildCraftTools), + new Injectable.Interface(value = "cofh.api.item.IToolHammer", modid = Mods.IDs.CoFHItem), + new Injectable.Interface(value = "crazypants.enderio.tool.ITool", modid = Mods.IDs.EnderIO), + new Injectable.Interface(value = "mekanism.api.IMekWrench", modid = Mods.IDs.Mekanism), + new Injectable.Interface(value = "powercrystals.minefactoryreloaded.api.IMFRHammer", modid = Mods.IDs.MineFactoryReloaded), + new Injectable.Interface(value = "mrtjp.projectred.api.IScrewdriver", modid = Mods.IDs.ProjectRedCore), + new Injectable.Interface(value = "mods.railcraft.api.core.items.IToolCrowbar", modid = Mods.IDs.Railcraft), + new Injectable.Interface(value = "ic2.api.item.IBoxable", modid = Mods.IDs.IndustrialCraft2) +)) +class Wrench extends SimpleItem with api.internal.Wrench { + setHarvestLevel("wrench", 1) + + override def doesSneakBypassUse(world: World, x: Int, y: Int, z: Int, player: EntityPlayer): Boolean = true + + override def onItemUseFirst(stack: ItemStack, player: EntityPlayer, world: World, x: Int, y: Int, z: Int, side: Int, hitX: Float, hitY: Float, hitZ: Float): Boolean = { + world.blockExists(x, y, z) && world.canMineBlock(player, x, y, z) && (world.getBlock(x, y, z) match { + case block: Block if block.rotateBlock(world, x, y, z, ForgeDirection.getOrientation(side)) => + block.onNeighborBlockChange(world, x, y, z, Blocks.air) + player.swingItem() + !world.isRemote + case _ => + super.onItemUseFirst(stack, player, world, x, y, z, side, hitX, hitY, hitZ) + }) + } + + def useWrenchOnBlock(player: EntityPlayer, world: World, x: Int, y: Int, z: Int, simulate: Boolean): Boolean = { + if (!simulate) player.swingItem() + true + } + + // Applied Energistics 2 + + def canWrench(stack: ItemStack, player: EntityPlayer, x: Int, y: Int, z: Int): Boolean = true + + // BuildCraft + + def canWrench(player: EntityPlayer, x: Int, y: Int, z: Int): Boolean = true + + def wrenchUsed(player: EntityPlayer, x: Int, y: Int, z: Int): Unit = player.swingItem() + + // CoFH + + def isUsable(stack: ItemStack, player: EntityLivingBase, x: Int, y: Int, z: Int): Boolean = true + + def toolUsed(stack: ItemStack, player: EntityLivingBase, x: Int, y: Int, z: Int): Unit = player.swingItem() + + // EnderIO + + def canUse(stack: ItemStack, player: EntityPlayer, x: Int, y: Int, z: Int): Boolean = true + + def used(stack: ItemStack, player: EntityPlayer, x: Int, y: Int, z: Int): Unit = {} + + // Mekanism + + def canUseWrench(player: EntityPlayer, x: Int, y: Int, z: Int): Boolean = true + + // Project Red + + def damageScrewdriver(world: World, player: EntityPlayer): Unit = {} + + // Railcraft + + def canWhack(player: EntityPlayer, stack: ItemStack, x: Int, y: Int, z: Int): Boolean = true + + def onWhack(player: EntityPlayer, stack: ItemStack, x: Int, y: Int, z: Int): Unit = {} + + def canLink(player: EntityPlayer, stack: ItemStack, cart: EntityMinecart): Boolean = false + + def onLink(player: EntityPlayer, stack: ItemStack, cart: EntityMinecart): Unit = {} + + def canBoost(player: EntityPlayer, stack: ItemStack, cart: EntityMinecart): Boolean = false + + def onBoost(player: EntityPlayer, stack: ItemStack, cart: EntityMinecart): Unit = {} + + // IndustrialCraft 2 + + def canBeStoredInToolbox(stack: ItemStack): Boolean = true +} diff --git a/src/main/scala/li/cil/oc/common/item/data/PrintData.scala b/src/main/scala/li/cil/oc/common/item/data/PrintData.scala index 78a3038e3..341a6962f 100644 --- a/src/main/scala/li/cil/oc/common/item/data/PrintData.scala +++ b/src/main/scala/li/cil/oc/common/item/data/PrintData.scala @@ -29,7 +29,17 @@ class PrintData extends ItemData { var isBeaconBase = false var lightLevel = 0 - def emitRedstone = redstoneLevel > 0 && stateOn.size > 0 + def hasActiveState = stateOn.size > 0 + + def emitLight = lightLevel > 0 + + def emitRedstone = redstoneLevel > 0 + + def emitRedstone(state: Boolean): Boolean = if (state) emitRedstoneWhenOn else emitRedstoneWhenOff + + def emitRedstoneWhenOff = emitRedstone && !hasActiveState + + def emitRedstoneWhenOn = emitRedstone && hasActiveState def opacity = { if (opacityDirty) { diff --git a/src/main/scala/li/cil/oc/common/recipe/Recipes.scala b/src/main/scala/li/cil/oc/common/recipe/Recipes.scala index fe2328eb7..d2c1a54ac 100644 --- a/src/main/scala/li/cil/oc/common/recipe/Recipes.scala +++ b/src/main/scala/li/cil/oc/common/recipe/Recipes.scala @@ -8,6 +8,7 @@ import com.typesafe.config._ import cpw.mods.fml.common.Loader import cpw.mods.fml.common.registry.GameRegistry import li.cil.oc._ +import li.cil.oc.common.Loot import li.cil.oc.common.block.SimpleBlock import li.cil.oc.common.init.Items import li.cil.oc.common.item.Delegator @@ -43,30 +44,30 @@ object Recipes { recipeMap += name -> recipe } - def addBlock(instance: Block, name: String, oreDict: String = null) = { + def addBlock(instance: Block, name: String, oreDict: String*) = { Items.registerBlock(instance, name) addRecipe(new ItemStack(instance), name) - register(oreDict, instance match { + register(instance match { case simple: SimpleBlock => simple.createItemStack() case _ => new ItemStack(instance) - }) + }, oreDict: _*) instance } - def addSubItem[T <: common.item.Delegate](delegate: T, name: String, oreDict: String = null) = { + def addSubItem[T <: common.item.Delegate](delegate: T, name: String, oreDict: String*) = { Items.registerItem(delegate, name) addRecipe(delegate.createItemStack(), name) - register(oreDict, delegate.createItemStack()) + register(delegate.createItemStack(), oreDict: _*) delegate } - def addItem(instance: Item, name: String, oreDict: String = null) = { + def addItem(instance: Item, name: String, oreDict: String*) = { Items.registerItem(instance, name) addRecipe(new ItemStack(instance), name) - register(oreDict, instance match { + register(instance match { case simple: SimpleItem => simple.createItemStack() case _ => new ItemStack(instance) - }) + }, oreDict: _*) instance } @@ -74,8 +75,8 @@ object Recipes { list += stack -> name } - private def register(name: String, item: ItemStack) { - if (name != null) { + private def register(item: ItemStack, names: String*) { + for (name <- names if name != null) { oreDictEntries += name -> item } } @@ -92,18 +93,16 @@ object Recipes { oreDictEntries.clear() try { - val defaultRecipes = new File(Loader.instance.getConfigDir + File.separator + "opencomputers" + File.separator + "default.recipes") - val hardmodeRecipes = new File(Loader.instance.getConfigDir + File.separator + "opencomputers" + File.separator + "hardmode.recipes") - val gregTechRecipes = new File(Loader.instance.getConfigDir + File.separator + "opencomputers" + File.separator + "gregtech.recipes") - val userRecipes = new File(Loader.instance.getConfigDir + File.separator + "opencomputers" + File.separator + "user.recipes") - - defaultRecipes.getParentFile.mkdirs() - FileUtils.copyURLToFile(getClass.getResource("/assets/opencomputers/recipes/default.recipes"), defaultRecipes) - FileUtils.copyURLToFile(getClass.getResource("/assets/opencomputers/recipes/hardmode.recipes"), hardmodeRecipes) - FileUtils.copyURLToFile(getClass.getResource("/assets/opencomputers/recipes/gregtech.recipes"), gregTechRecipes) + val recipeSets = Array("default", "hardmode", "gregtech", "peaceful") + val recipeDirectory = new File(Loader.instance.getConfigDir + File.separator + "opencomputers") + val userRecipes = new File(recipeDirectory, "user.recipes") + userRecipes.getParentFile.mkdirs() if (!userRecipes.exists()) { FileUtils.copyURLToFile(getClass.getResource("/assets/opencomputers/recipes/user.recipes"), userRecipes) } + for (recipeSet <- recipeSets) { + FileUtils.copyURLToFile(getClass.getResource(s"/assets/opencomputers/recipes/$recipeSet.recipes"), new File(recipeDirectory, s"$recipeSet.recipes")) + } lazy val config: ConfigParseOptions = ConfigParseOptions.defaults. setSyntax(ConfigSyntax.CONF). setIncluder(new ConfigIncluder with ConfigIncluderFile { @@ -127,7 +126,44 @@ object Recipes { // Register all known recipes. for ((stack, name) <- list) { - addRecipe(stack, recipes, name) + if (recipes.hasPath(name)) { + val value = recipes.getValue(name) + value.valueType match { + case ConfigValueType.OBJECT => + addRecipe(stack, recipes.getConfig(name), "'" + name + "'") + case ConfigValueType.BOOLEAN => + // Explicitly disabled, keep in NEI if true. + if (!value.unwrapped.asInstanceOf[Boolean]) { + hide(stack) + } + case _ => + OpenComputers.log.error(s"Failed adding recipe for '$name', you will not be able to craft this item. The error was: Invalid value for recipe.") + hadErrors = true + } + } + else { + OpenComputers.log.warn(s"No recipe for '$name', you will not be able to craft this item. To suppress this warning, disable the recipe (assign `false` to it).") + hadErrors = true + } + } + + // Register all unknown recipes. Well. Loot disk recipes. + if (recipes.hasPath("lootDisks")) try { + val lootRecipes = recipes.getConfigList("lootDisks") + for (recipe <- lootRecipes) { + val name = recipe.getString("name") + Loot.builtInDisks.get(name) match { + case Some((stack, _)) => addRecipe(stack, recipe, "loot disk '" + name + "'") + case _ => + OpenComputers.log.warn(s"Failed adding recipe for loot disk '$name': No such global loot disk.") + hadErrors = true + } + } + } + catch { + case t: Throwable => + OpenComputers.log.warn("Failed parsing loot disk recipes.", t) + hadErrors = true } // Recrafting operations. @@ -254,101 +290,24 @@ object Recipes { list.clear() } - private def addRecipe(output: ItemStack, list: Config, name: String) = try { - if (list.hasPath(name)) { - val value = list.getValue(name) - value.valueType match { - case ConfigValueType.OBJECT => - val recipe = list.getConfig(name) - val recipeType = tryGetType(recipe) - try { - recipeMap.get(recipeType) match { - case Some(x) => x(output, recipe) - case _ => OpenComputers.log.error(s"Failed adding $recipeType recipe for '$name', you will not be able to craft this item!") + private def addRecipe(output: ItemStack, recipe: Config, name: String) = { - } - } - catch { - case e: RecipeException => - OpenComputers.log.error(s"Failed adding $recipeType recipe for '$name', you will not be able to craft this item! The error was: ${e.getMessage}") - hadErrors = true - } - case ConfigValueType.BOOLEAN => - // Explicitly disabled, keep in NEI if true. - if (!value.unwrapped.asInstanceOf[Boolean]) { - hide(output) - } - case _ => - OpenComputers.log.error(s"Failed adding recipe for '$name', you will not be able to craft this item. The error was: Invalid value for recipe.") + val recipeType = tryGetType(recipe) + try { + recipeMap.get(recipeType) match { + case Some(x) => x(output, recipe) + case _ => OpenComputers.log.error(s"Failed adding $recipeType recipe for '$name', you will not be able to craft this item!") hadErrors = true + } } - else { - OpenComputers.log.warn(s"No recipe for '$name', you will not be able to craft this item. To suppress this warning, disable the recipe (assign `false` to it).") - hadErrors = true + catch { + case e: RecipeException => + OpenComputers.log.error(s"Failed adding $recipeType recipe for $name, you will not be able to craft this item! The error was: ${e.getMessage}") + hadErrors = true } } - // private def addRecipe(output: ItemStack, list: Config, name: String) = try { - // if (list.hasPath(name)) { - // val value = list.getValue(name) - // value.valueType match { - // case ConfigValueType.OBJECT => - // val recipe = list.getConfig(name) - // val recipeType = tryGetType(recipe) - // try { - // recipeType match { - // case "shaped" => addShapedRecipe(output, recipe) - // case "shapeless" => addShapelessRecipe(output, recipe) - // case "furnace" => addFurnaceRecipe(output, recipe) - // case "gt_assembler" => - // if (Mods.GregTech.isAvailable) { - // addGTAssemblingMachineRecipe(output, recipe) - // } - // else { - // OpenComputers.log.error(s"Skipping GregTech assembler recipe for '$name' because GregTech is not present, you will not be able to craft this item.") - // hadErrors = true - // } - // case "gt_alloysmelter" => - // if (Mods.GregTech.isAvailable) { - // addGTAlloySmelterRecipe(output, recipe) - // } - // else { - // OpenComputers.log.error(s"Skipping GregTech alloy smelter recipe for '$name' because GregTech is not present, you will not be able to craft this item.") - // hadErrors = true - // } - // case other => - // OpenComputers.log.error(s"Failed adding recipe for '$name', you will not be able to craft this item. The error was: Invalid recipe type '$other'.") - // hadErrors = true - // } - // } - // catch { - // case e: RecipeException => - // OpenComputers.log.error(s"Failed adding $recipeType recipe for '$name', you will not be able to craft this item! The error was: ${e.getMessage}") - // hadErrors = true - // } - // case ConfigValueType.BOOLEAN => - // // Explicitly disabled, keep in NEI if true. - // if (!value.unwrapped.asInstanceOf[Boolean]) { - // hide(output) - // } - // case _ => - // OpenComputers.log.error(s"Failed adding recipe for '$name', you will not be able to craft this item. The error was: Invalid value for recipe.") - // hadErrors = true - // } - // } - // else { - // OpenComputers.log.warn(s"No recipe for '$name', you will not be able to craft this item. To suppress this warning, disable the recipe (assign `false` to it).") - // hadErrors = true - // } - // } - // catch { - // case e: Throwable => - // OpenComputers.log.error(s"Failed adding recipe for '$name', you will not be able to craft this item.", e) - // hadErrors = true - // } - - def parseFluidIngredient(entry: AnyRef): Option[Fluid] = entry match { case name: String => { if (name == null || name.trim.isEmpty) None diff --git a/src/main/scala/li/cil/oc/common/tileentity/Hologram.scala b/src/main/scala/li/cil/oc/common/tileentity/Hologram.scala index 3bd875839..2de8d85a2 100644 --- a/src/main/scala/li/cil/oc/common/tileentity/Hologram.scala +++ b/src/main/scala/li/cil/oc/common/tileentity/Hologram.scala @@ -56,9 +56,6 @@ class Hologram(var tier: Int) extends traits.Environment with SidedEnvironment w var dirtyFromZ = Int.MaxValue var dirtyUntilZ = -1 - // Time to wait before sending another update packet. - var cooldown = 5 - var hasPower = true final val colorsByTier = Array(Array(0x00FF00), Array(0x0000FF, 0x00FF00, 0xFF0000)) // 0xBBGGRR for rendering convenience @@ -97,7 +94,6 @@ class Hologram(var tier: Int) extends traits.Environment with SidedEnvironment w dirtyUntilX = -1 dirtyFromZ = Int.MaxValue dirtyUntilZ = -1 - cooldown = 5 } // ----------------------------------------------------------------------- // @@ -113,7 +109,7 @@ class Hologram(var tier: Int) extends traits.Environment with SidedEnvironment w // ----------------------------------------------------------------------- // @Callback(doc = """function() -- Clears the hologram.""") - def clear(computer: Context, args: Arguments): Array[AnyRef] = this.synchronized { + def clear(context: Context, args: Arguments): Array[AnyRef] = this.synchronized { for (i <- 0 until volume.length) volume(i) = 0 ServerPacketSender.sendHologramClear(this) resetDirtyFlag() @@ -122,13 +118,13 @@ class Hologram(var tier: Int) extends traits.Environment with SidedEnvironment w } @Callback(direct = true, doc = """function(x:number, y:number, z:number):number -- Returns the value for the specified voxel.""") - def get(computer: Context, args: Arguments): Array[AnyRef] = this.synchronized { + def get(context: Context, args: Arguments): Array[AnyRef] = this.synchronized { val (x, y, z) = checkCoordinates(args) result(getColor(x, y, z)) } @Callback(direct = true, limit = 256, doc = """function(x:number, y:number, z:number, value:number or boolean) -- Set the value for the specified voxel.""") - def set(computer: Context, args: Arguments): Array[AnyRef] = this.synchronized { + def set(context: Context, args: Arguments): Array[AnyRef] = this.synchronized { val (x, y, z) = checkCoordinates(args) val value = checkColor(args, 3) setColor(x, y, z, value) @@ -136,7 +132,7 @@ class Hologram(var tier: Int) extends traits.Environment with SidedEnvironment w } @Callback(direct = true, limit = 128, doc = """function(x:number, z:number[, minY:number], maxY:number, value:number or boolean) -- Fills an interval of a column with the specified value.""") - def fill(computer: Context, args: Arguments): Array[AnyRef] = this.synchronized { + def fill(context: Context, args: Arguments): Array[AnyRef] = this.synchronized { val (x, _, z) = checkCoordinates(args, 0, -1, 1) val (minY, maxY, value) = if (args.count > 4) @@ -157,8 +153,30 @@ class Hologram(var tier: Int) extends traits.Environment with SidedEnvironment w null } + @Callback(doc = """function(data:string) -- Set the raw buffer to the specified byte array, where each byte represents a voxel color. Nesting is x,z,y.""") + def setRaw(context: Context, args: Arguments): Array[AnyRef] = this.synchronized { + val data = args.checkByteArray(0) + for (x <- 0 until width; z <- 0 until width) { + val offset = z * height + x * height * width + if (data.length >= offset + height) { + var lbit = 0 + var hbit = 0 + for (y <- (height - 1) to 0 by -1) { + val color = data(offset + y) + lbit |= (color & 1) << y + hbit |= ((color & 3) >>> 1) << y + } + volume(x + z * width) = lbit + volume(x + z * width + width * width) = hbit + } + } + setDirty(0, 0) + setDirty(width - 1, width - 1) + null + } + @Callback(doc = """function(x:number, z:number, sx:number, sz:number, tx:number, tz:number) -- Copies an area of columns by the specified translation.""") - def copy(computer: Context, args: Arguments): Array[AnyRef] = this.synchronized { + def copy(context: Context, args: Arguments): Array[AnyRef] = this.synchronized { val (x, _, z) = checkCoordinates(args, 0, -1, 1) val w = args.checkInteger(2) val h = args.checkInteger(3) @@ -205,30 +223,30 @@ class Hologram(var tier: Int) extends traits.Environment with SidedEnvironment w // 'free' if it's less than 0.25 seconds, i.e. for small copies. val area = (math.max(dx0, dx1) - math.min(dx0, dx1)) * (math.max(dz0, dz1) - math.min(dz0, dz1)) val relativeArea = math.max(0, area / (width * width).toFloat - 0.25) - computer.pause(relativeArea) + context.pause(relativeArea) null } @Callback(direct = true, doc = """function():number -- Returns the render scale of the hologram.""") - def getScale(computer: Context, args: Arguments): Array[AnyRef] = { + def getScale(context: Context, args: Arguments): Array[AnyRef] = { result(scale) } @Callback(doc = """function(value:number) -- Set the render scale. A larger scale consumes more energy.""") - def setScale(computer: Context, args: Arguments): Array[AnyRef] = { + def setScale(context: Context, args: Arguments): Array[AnyRef] = { scale = math.max(0.333333, math.min(Settings.get.hologramMaxScaleByTier(tier), args.checkDouble(0))) ServerPacketSender.sendHologramScale(this) null } @Callback(direct = true, doc = """function():number, number, number -- Returns the relative render projection offsets of the hologram.""") - def getTranslation(computer: Context, args: Arguments): Array[AnyRef] = { + def getTranslation(context: Context, args: Arguments): Array[AnyRef] = { result(translation.xCoord, translation.yCoord, translation.zCoord) } @Callback(doc = """function(tx:number, ty:number, tz:number) -- Sets the relative render projection offsets of the hologram.""") - def setTranslation(computer: Context, args: Arguments): Array[AnyRef] = { + def setTranslation(context: Context, args: Arguments): Array[AnyRef] = { // Validate all axes before setting the values. val maxTranslation = Settings.get.hologramMaxTranslationByTier(tier) val tx = math.max(-maxTranslation, math.min(maxTranslation, args.checkDouble(0))) @@ -249,7 +267,7 @@ class Hologram(var tier: Int) extends traits.Environment with SidedEnvironment w } @Callback(doc = """function(index:number):number -- Get the color defined for the specified value.""") - def getPaletteColor(computer: Context, args: Arguments): Array[AnyRef] = { + def getPaletteColor(context: Context, args: Arguments): Array[AnyRef] = { val index = args.checkInteger(0) if (index < 1 || index > colors.length) throw new ArrayIndexOutOfBoundsException() // Colors are stored as 0xAABBGGRR for rendering convenience, so convert them. @@ -257,7 +275,7 @@ class Hologram(var tier: Int) extends traits.Environment with SidedEnvironment w } @Callback(doc = """function(index:number, value:number):number -- Set the color defined for the specified value.""") - def setPaletteColor(computer: Context, args: Arguments): Array[AnyRef] = { + def setPaletteColor(context: Context, args: Arguments): Array[AnyRef] = { val index = args.checkInteger(0) if (index < 1 || index > colors.length) throw new ArrayIndexOutOfBoundsException() val value = args.checkInteger(1) @@ -300,12 +318,9 @@ class Hologram(var tier: Int) extends traits.Environment with SidedEnvironment w override def updateEntity() { super.updateEntity() if (isServer) { - if (dirty) { - cooldown -= 1 - if (cooldown <= 0) this.synchronized { - ServerPacketSender.sendHologramSet(this) - resetDirtyFlag() - } + if (dirty) this.synchronized { + ServerPacketSender.sendHologramSet(this) + resetDirtyFlag() } if (world.getTotalWorldTime % Settings.get.tickFrequency == 0) { if (litRatio < 0) this.synchronized { diff --git a/src/main/scala/li/cil/oc/common/tileentity/Print.scala b/src/main/scala/li/cil/oc/common/tileentity/Print.scala index 8e344c2a3..58c94f823 100644 --- a/src/main/scala/li/cil/oc/common/tileentity/Print.scala +++ b/src/main/scala/li/cil/oc/common/tileentity/Print.scala @@ -19,7 +19,7 @@ class Print extends traits.TileEntity with traits.RedstoneAware with traits.Rota _isOutputEnabled = true def activate(): Boolean = { - if (data.stateOn.size > 0) { + if (data.hasActiveState) { if (!state || !data.isButtonMode) { toggleState() return true @@ -32,7 +32,7 @@ class Print extends traits.TileEntity with traits.RedstoneAware with traits.Rota state = !state world.playSoundEffect(x + 0.5, y + 0.5, z + 0.5, "random.click", 0.3F, if (state) 0.6F else 0.5F) world.markBlockForUpdate(x, y, z) - if (data.emitRedstone) { + if (data.emitRedstoneWhenOn) { ForgeDirection.VALID_DIRECTIONS.foreach(output(_, if (state) data.redstoneLevel else 0)) } if (state && data.isButtonMode) { @@ -44,7 +44,7 @@ class Print extends traits.TileEntity with traits.RedstoneAware with traits.Rota override protected def onRedstoneInputChanged(side: ForgeDirection, oldMaxValue: Int, newMaxValue: Int): Unit = { super.onRedstoneInputChanged(side, oldMaxValue, newMaxValue) - if (!data.emitRedstone) { + if (!data.emitRedstone && data.hasActiveState) { state = newMaxValue > 0 world.playSoundEffect(x + 0.5, y + 0.5, z + 0.5, "random.click", 0.3F, if (state) 0.6F else 0.5F) world.markBlockForUpdate(x, y, z) @@ -89,6 +89,10 @@ class Print extends traits.TileEntity with traits.RedstoneAware with traits.Rota boundsOn = data.stateOn.drop(1).foldLeft(data.stateOn.headOption.fold(ExtendedAABB.unitBounds)(_.bounds))((a, b) => a.func_111270_a(b.bounds)) if (boundsOn.volume == 0) boundsOn = ExtendedAABB.unitBounds else boundsOn = boundsOn.rotateTowards(facing) + + if (data.emitRedstoneWhenOff) { + ForgeDirection.VALID_DIRECTIONS.foreach(output(_, data.redstoneLevel)) + } } override protected def onRotationChanged(): Unit = { diff --git a/src/main/scala/li/cil/oc/common/tileentity/Printer.scala b/src/main/scala/li/cil/oc/common/tileentity/Printer.scala index edab5033d..503883846 100644 --- a/src/main/scala/li/cil/oc/common/tileentity/Printer.scala +++ b/src/main/scala/li/cil/oc/common/tileentity/Printer.scala @@ -57,7 +57,7 @@ class Printer extends traits.Environment with traits.Inventory with traits.Rotat // ----------------------------------------------------------------------- // - def canPrint = data.stateOff.size > 0 && data.stateOff.size + data.stateOn.size <= Settings.get.maxPrintComplexity + def canPrint = data.stateOff.size > 0 && data.stateOff.size < Settings.get.maxPrintComplexity && data.stateOn.size < Settings.get.maxPrintComplexity def isPrinting = output.isDefined @@ -100,6 +100,18 @@ class Printer extends traits.Environment with traits.Inventory with traits.Rotat result(data.tooltip.orNull) } + @Callback(doc = """function(value:number) -- Set what light level the printed block should have.""") + def setLightLevel(context: Context, args: Arguments): Array[Object] = { + data.lightLevel = args.checkInteger(0) max 0 min Settings.get.maxPrintLightLevel + isActive = false // Needs committing. + null + } + + @Callback(doc = """function():number -- Get which light level the printed block should have.""") + def getLightLevel(context: Context, args: Arguments): Array[Object] = { + result(data.lightLevel) + } + @Callback(doc = """function(value:boolean or number) -- Set whether the printed block should emit redstone when in its active state.""") def setRedstoneEmitter(context: Context, args: Arguments): Array[Object] = { if (args.isBoolean(0)) data.redstoneLevel = if (args.checkBoolean(0)) 15 else 0 @@ -113,18 +125,6 @@ class Printer extends traits.Environment with traits.Inventory with traits.Rotat result(data.emitRedstone, data.redstoneLevel) } - @Callback(doc = """function(value:number) -- Set what light level the printed block should have.""") - def setLightLevel(context: Context, args: Arguments): Array[Object] = { - data.lightLevel = args.checkInteger(0) max 0 min Settings.get.maxPrintLightLevel - isActive = false // Needs committing. - null - } - - @Callback(doc = """function():number -- Get which light level the printed block should have.""") - def getLightLevel(context: Context, args: Arguments): Array[Object] = { - result(data.lightLevel) - } - @Callback(doc = """function(value:boolean) -- Set whether the printed block should automatically return to its off state.""") def setButtonMode(context: Context, args: Arguments): Array[Object] = { data.isButtonMode = args.checkBoolean(0) @@ -139,7 +139,7 @@ class Printer extends traits.Environment with traits.Inventory with traits.Rotat @Callback(doc = """function(minX:number, minY:number, minZ:number, maxX:number, maxY:number, maxZ:number, texture:string[, state:boolean=false][,tint:number]) -- Adds a shape to the printers configuration, optionally specifying whether it is for the off or on state.""") def addShape(context: Context, args: Arguments): Array[Object] = { - if (data.stateOff.size + data.stateOn.size >= Settings.get.maxPrintComplexity) { + if (data.stateOff.size >= Settings.get.maxPrintComplexity || data.stateOn.size >= Settings.get.maxPrintComplexity) { return result(null, "model too complex") } val minX = (args.checkInteger(0) max 0 min 16) / 16f @@ -173,7 +173,7 @@ class Printer extends traits.Environment with traits.Inventory with traits.Rotat } @Callback(doc = """function():number -- Get the number of shapes in the current configuration.""") - def getShapeCount(context: Context, args: Arguments): Array[Object] = result(data.stateOff.size + data.stateOn.size) + def getShapeCount(context: Context, args: Arguments): Array[Object] = result(data.stateOff.size, data.stateOn.size) @Callback(doc = """function():number -- Get the maximum allowed number of shapes.""") def getMaxShapeCount(context: Context, args: Arguments): Array[Object] = result(Settings.get.maxPrintComplexity) diff --git a/src/main/scala/li/cil/oc/common/tileentity/ServerRack.scala b/src/main/scala/li/cil/oc/common/tileentity/ServerRack.scala index feb1897a4..6995f4218 100644 --- a/src/main/scala/li/cil/oc/common/tileentity/ServerRack.scala +++ b/src/main/scala/li/cil/oc/common/tileentity/ServerRack.scala @@ -214,19 +214,7 @@ class ServerRack extends traits.PowerAcceptor with traits.Hub with traits.PowerB override def onAnalyze(player: EntityPlayer, side: Int, hitX: Float, hitY: Float, hitZ: Float) = { slotAt(ForgeDirection.getOrientation(side), hitX, hitY, hitZ) match { case Some(slot) => servers(slot) match { - case Some(server) => - val computer = server.machine - computer.lastError match { - case value if value != null => - player.addChatMessage(Localization.Analyzer.LastError(value)) - case _ => - } - player.addChatMessage(Localization.Analyzer.Components(computer.componentCount, computer.maxComponents)) - val list = computer.users - if (list.size > 0) { - player.addChatMessage(Localization.Analyzer.Users(list)) - } - Array(computer.node) + case Some(server) => Array(server.machine.node) case _ => null } case _ => Array(sidedNode(ForgeDirection.getOrientation(side))) diff --git a/src/main/scala/li/cil/oc/common/tileentity/traits/Computer.scala b/src/main/scala/li/cil/oc/common/tileentity/traits/Computer.scala index 205e97f6e..8e8d301bc 100644 --- a/src/main/scala/li/cil/oc/common/tileentity/traits/Computer.scala +++ b/src/main/scala/li/cil/oc/common/tileentity/traits/Computer.scala @@ -5,7 +5,6 @@ import java.util import cpw.mods.fml.relauncher.Side import cpw.mods.fml.relauncher.SideOnly -import li.cil.oc.Localization import li.cil.oc.Settings import li.cil.oc.api.Machine import li.cil.oc.api.machine.MachineHost @@ -209,17 +208,5 @@ trait Computer extends Environment with ComponentInventory with Rotatable with B // ----------------------------------------------------------------------- // - override def onAnalyze(player: EntityPlayer, side: Int, hitX: Float, hitY: Float, hitZ: Float) = { - machine.lastError match { - case value if value != null => - player.addChatMessage(Localization.Analyzer.LastError(value)) - case _ => - } - player.addChatMessage(Localization.Analyzer.Components(machine.componentCount, machine.maxComponents)) - val list = machine.users - if (list.size > 0) { - player.addChatMessage(Localization.Analyzer.Users(list)) - } - Array(machine.node) - } + override def onAnalyze(player: EntityPlayer, side: Int, hitX: Float, hitY: Float, hitZ: Float) = Array(machine.node) } diff --git a/src/main/scala/li/cil/oc/integration/Mods.scala b/src/main/scala/li/cil/oc/integration/Mods.scala index dadd4cec3..3d094a071 100644 --- a/src/main/scala/li/cil/oc/integration/Mods.scala +++ b/src/main/scala/li/cil/oc/integration/Mods.scala @@ -50,6 +50,7 @@ object Mods { val NotEnoughItems = new SimpleMod(IDs.NotEnoughItems) val OpenComputers = new SimpleMod(IDs.OpenComputers) val PortalGun = new SimpleMod(IDs.PortalGun) + val ProjectRedCore = new SimpleMod(IDs.ProjectRedCore) val ProjectRedTransmission = new SimpleMod(IDs.ProjectRedTransmission) val Railcraft = new SimpleMod(IDs.Railcraft) val RedLogic = new SimpleMod(IDs.RedLogic) @@ -168,6 +169,7 @@ object Mods { final val NotEnoughItems = "NotEnoughItems" final val OpenComputers = "OpenComputers" final val PortalGun = "PortalGun" + final val ProjectRedCore = "ProjRed|Core" final val ProjectRedTransmission = "ProjRed|Transmission" final val Railcraft = "Railcraft" final val RedLogic = "RedLogic" diff --git a/src/main/scala/li/cil/oc/integration/fmp/PrintPart.scala b/src/main/scala/li/cil/oc/integration/fmp/PrintPart.scala index 18ec70ef4..d4f8c9e35 100644 --- a/src/main/scala/li/cil/oc/integration/fmp/PrintPart.scala +++ b/src/main/scala/li/cil/oc/integration/fmp/PrintPart.scala @@ -138,20 +138,20 @@ class PrintPart(val original: Option[tileentity.Print] = None) extends SimpleBlo // ----------------------------------------------------------------------- // - override def conductsRedstone: Boolean = data.emitRedstone && state + override def conductsRedstone: Boolean = if (state) data.emitRedstoneWhenOn else data.emitRedstoneWhenOff - override def redstoneConductionMap: Int = if (data.emitRedstone && state) 0xFF else 0 + override def redstoneConductionMap: Int = if (conductsRedstone) 0xFF else 0 override def canConnectRedstone(side: Int): Boolean = true override def strongPowerLevel(side: Int): Int = weakPowerLevel(side) - override def weakPowerLevel(side: Int): Int = if (data.emitRedstone && state) data.redstoneLevel else 0 + override def weakPowerLevel(side: Int): Int = if (data.emitRedstone(state)) data.redstoneLevel else 0 // ----------------------------------------------------------------------- // override def activate(player: EntityPlayer, hit: MovingObjectPosition, item: ItemStack): Boolean = { - if (data.stateOn.size > 0) { + if (data.hasActiveState) { if (!state || !data.isButtonMode) { toggleState() return true @@ -262,15 +262,15 @@ class PrintPart(val original: Option[tileentity.Print] = None) extends SimpleBlo protected def checkRedstone(): Unit = { val newMaxValue = computeInput() - val newState = newMaxValue > 1 // Fixes oddities in cycling updates. - if (!data.emitRedstone && state != newState) { + val newState = newMaxValue > 1 // >1 Fixes oddities in cycling updates. + if (!data.emitRedstone && data.hasActiveState && state != newState) { toggleState() } } protected def computeInput(): Int = { val inner = tile.partList.foldLeft(0)((power, part) => part match { - case print: PrintPart if print.state && print.data.emitRedstone => math.max(power, print.data.redstoneLevel) + case print: PrintPart if print.data.emitRedstone(print.state) => math.max(power, print.data.redstoneLevel) case _ => power }) math.max(inner, ForgeDirection.VALID_DIRECTIONS.map(computeInput).max) diff --git a/src/main/scala/li/cil/oc/integration/nei/ManualUsageHandler.scala b/src/main/scala/li/cil/oc/integration/nei/ManualUsageHandler.scala index e7f7b6cfd..7a7664c9f 100644 --- a/src/main/scala/li/cil/oc/integration/nei/ManualUsageHandler.scala +++ b/src/main/scala/li/cil/oc/integration/nei/ManualUsageHandler.scala @@ -8,6 +8,7 @@ import codechicken.nei.api.IOverlayHandler import codechicken.nei.api.IRecipeOverlayRenderer import codechicken.nei.recipe.GuiRecipe import codechicken.nei.recipe.IUsageHandler +import li.cil.oc.Localization import li.cil.oc.api import net.minecraft.client.Minecraft import net.minecraft.client.gui.GuiButton @@ -20,7 +21,7 @@ class ManualUsageHandler(path: Option[String]) extends IUsageHandler { var lastMouseX = 0 var lastMouseY = 0 - val button = new GuiButton(0, 34, 20, 100, 20, "Open Manual") + val button = new GuiButton(0, 34, 20, 100, 20, Localization.localizeImmediately("nei.usage.oc.Manual")) override def getRecipeName = "Manual" diff --git a/src/main/scala/li/cil/oc/integration/opencomputers/ModOpenComputers.scala b/src/main/scala/li/cil/oc/integration/opencomputers/ModOpenComputers.scala index a05991463..d8c9c3225 100644 --- a/src/main/scala/li/cil/oc/integration/opencomputers/ModOpenComputers.scala +++ b/src/main/scala/li/cil/oc/integration/opencomputers/ModOpenComputers.scala @@ -8,9 +8,12 @@ import li.cil.oc.Settings import li.cil.oc.api import li.cil.oc.api.detail.ItemInfo import li.cil.oc.api.internal +import li.cil.oc.api.internal.Wrench import li.cil.oc.api.manual.PathProvider import li.cil.oc.api.prefab.ItemStackTabIconRenderer import li.cil.oc.api.prefab.ResourceContentProvider +import li.cil.oc.api.prefab.TextureTabIconRenderer +import li.cil.oc.client.Textures import li.cil.oc.client.renderer.markdown.segment.render.BlockImageProvider import li.cil.oc.client.renderer.markdown.segment.render.ItemImageProvider import li.cil.oc.client.renderer.markdown.segment.render.OreDictImageProvider @@ -32,6 +35,7 @@ import li.cil.oc.integration.util.BundledRedstone import li.cil.oc.integration.util.WirelessRedstone import li.cil.oc.server.network.WirelessNetwork import li.cil.oc.util.ExtendedNBT._ +import net.minecraft.entity.player.EntityPlayer import net.minecraft.item.ItemStack import net.minecraft.nbt.NBTTagCompound import net.minecraft.world.World @@ -50,6 +54,8 @@ object ModOpenComputers extends ModProxy { TabletTemplate.register() TemplateBlacklist.register() + FMLInterModComms.sendMessage(Mods.IDs.OpenComputers, "registerWrenchTool", "li.cil.oc.integration.opencomputers.ModOpenComputers.useWrench") + ForgeChunkManager.setForcedChunkLoadingCallback(OpenComputers, ChunkloaderUpgradeHandler) FMLCommonHandler.instance.bus.register(EventHandler) @@ -208,10 +214,18 @@ object ModOpenComputers extends ModProxy { api.Manual.addProvider("block", BlockImageProvider) api.Manual.addProvider("oredict", OreDictImageProvider) + api.Manual.addTab(new TextureTabIconRenderer(Textures.guiManualHome), "oc:gui.Manual.Home", "%LANGUAGE%/index.md") api.Manual.addTab(new ItemStackTabIconRenderer(api.Items.get("case1").createItemStack(1)), "oc:gui.Manual.Blocks", "%LANGUAGE%/block/index.md") api.Manual.addTab(new ItemStackTabIconRenderer(api.Items.get("cpu1").createItemStack(1)), "oc:gui.Manual.Items", "%LANGUAGE%/item/index.md") } + def useWrench(player: EntityPlayer, x: Int, y: Int, z: Int, changeDurability: Boolean): Boolean = { + player.getCurrentEquippedItem.getItem match { + case wrench: Wrench => wrench.useWrenchOnBlock(player, player.getEntityWorld, x, y, z, !changeDurability) + case _ => false + } + } + private def blacklistHost(host: Class[_], itemNames: String*) { for (itemName <- itemNames) { val nbt = new NBTTagCompound() diff --git a/src/main/scala/li/cil/oc/server/PacketSender.scala b/src/main/scala/li/cil/oc/server/PacketSender.scala index e9f652b86..c1634cab0 100644 --- a/src/main/scala/li/cil/oc/server/PacketSender.scala +++ b/src/main/scala/li/cil/oc/server/PacketSender.scala @@ -205,6 +205,20 @@ object PacketSender { pb.sendToPlayersNearTileEntity(t) } + def sendParticleEffect(position: BlockPosition, name: String, count: Int, velocity: Double, direction: Option[ForgeDirection] = None): Unit = if (count > 0) { + val pb = new SimplePacketBuilder(PacketType.ParticleEffect) + + pb.writeInt(position.world.get.provider.dimensionId) + pb.writeInt(position.x) + pb.writeInt(position.y) + pb.writeInt(position.z) + pb.writeDouble(velocity) + pb.writeDirection(direction) + pb.writeUTF(name) + pb.writeByte(count.toByte) + + pb.sendToNearbyPlayers(position.world.get, position.x, position.y, position.z, Some(32.0)) + } def sendPetVisibility(name: Option[String] = None, player: Option[EntityPlayerMP] = None) { val pb = new SimplePacketBuilder(PacketType.PetVisibility) diff --git a/src/main/scala/li/cil/oc/server/component/GraphicsCard.scala b/src/main/scala/li/cil/oc/server/component/GraphicsCard.scala index dc82aea6a..4ad804a3b 100644 --- a/src/main/scala/li/cil/oc/server/component/GraphicsCard.scala +++ b/src/main/scala/li/cil/oc/server/component/GraphicsCard.scala @@ -128,7 +128,6 @@ abstract class GraphicsCard extends prefab.ManagedEnvironment { }) } - @Callback(doc = """function(index:number, color:number):number -- Set the palette color at the specified palette index. Returns the previous value.""") def setPaletteColor(context: Context, args: Arguments): Array[AnyRef] = { val index = args.checkInteger(0) val color = args.checkInteger(1) @@ -380,6 +379,9 @@ object GraphicsCard { @Callback(direct = true, limit = 32, doc = """function(value:number[, palette:boolean]):number, number or nil -- Sets the foreground color to the specified value. Optionally takes an explicit palette index. Returns the old value and if it was from the palette its palette index.""") override def setForeground(context: Context, args: Arguments) = super.setForeground(context, args) + + @Callback(direct = true, limit = 2, doc = """function(index:number, color:number):number -- Set the palette color at the specified palette index. Returns the previous value.""") + override def setPaletteColor(context: Context, args: Arguments): Array[AnyRef] = super.setPaletteColor(context, args) } class Tier2 extends GraphicsCard { @@ -400,6 +402,9 @@ object GraphicsCard { @Callback(direct = true, limit = 64, doc = """function(value:number[, palette:boolean]):number, number or nil -- Sets the foreground color to the specified value. Optionally takes an explicit palette index. Returns the old value and if it was from the palette its palette index.""") override def setForeground(context: Context, args: Arguments) = super.setForeground(context, args) + + @Callback(direct = true, limit = 8, doc = """function(index:number, color:number):number -- Set the palette color at the specified palette index. Returns the previous value.""") + override def setPaletteColor(context: Context, args: Arguments): Array[AnyRef] = super.setPaletteColor(context, args) } class Tier3 extends GraphicsCard { @@ -420,6 +425,9 @@ object GraphicsCard { @Callback(direct = true, limit = 128, doc = """function(value:number[, palette:boolean]):number, number or nil -- Sets the foreground color to the specified value. Optionally takes an explicit palette index. Returns the old value and if it was from the palette its palette index.""") override def setForeground(context: Context, args: Arguments) = super.setForeground(context, args) + + @Callback(direct = true, limit = 16, doc = """function(index:number, color:number):number -- Set the palette color at the specified palette index. Returns the previous value.""") + override def setPaletteColor(context: Context, args: Arguments): Array[AnyRef] = super.setPaletteColor(context, args) } -} \ No newline at end of file +} diff --git a/src/main/scala/li/cil/oc/server/component/Robot.scala b/src/main/scala/li/cil/oc/server/component/Robot.scala index bc67759bf..0dbc66064 100644 --- a/src/main/scala/li/cil/oc/server/component/Robot.scala +++ b/src/main/scala/li/cil/oc/server/component/Robot.scala @@ -10,6 +10,8 @@ import li.cil.oc.api.network._ import li.cil.oc.api.prefab import li.cil.oc.common.ToolDurabilityProviders import li.cil.oc.common.tileentity +import li.cil.oc.server.PacketSender +import li.cil.oc.util.BlockPosition import li.cil.oc.util.ExtendedArguments._ import li.cil.oc.util.ExtendedNBT._ import net.minecraft.nbt.NBTTagCompound @@ -72,6 +74,8 @@ class Robot(val agent: tileentity.Robot) extends prefab.ManagedEnvironment with else { val (something, what) = blockContent(direction) if (something) { + context.pause(0.4) + PacketSender.sendParticleEffect(BlockPosition(agent), "crit", 8, 0.25, Some(direction)) result(Unit, what) } else { @@ -84,6 +88,8 @@ class Robot(val agent: tileentity.Robot) extends prefab.ManagedEnvironment with } else { node.changeBuffer(Settings.get.robotMoveCost) + context.pause(0.4) + PacketSender.sendParticleEffect(BlockPosition(agent), "crit", 8, 0.25, Some(direction)) result(Unit, "impossible move") } } diff --git a/src/main/scala/li/cil/oc/server/component/WirelessNetworkCard.scala b/src/main/scala/li/cil/oc/server/component/WirelessNetworkCard.scala index 16de4f242..e87d8f527 100644 --- a/src/main/scala/li/cil/oc/server/component/WirelessNetworkCard.scala +++ b/src/main/scala/li/cil/oc/server/component/WirelessNetworkCard.scala @@ -91,7 +91,7 @@ class WirelessNetworkCard(host: EnvironmentHost) extends NetworkCard(host) with override def onDisconnect(node: Node) { super.onDisconnect(node) - if (node == this.node) { + if (node == this.node || !world.blockExists(x, y, z)) { api.Network.leaveWirelessNetwork(this) } } diff --git a/src/main/scala/li/cil/oc/server/machine/Machine.scala b/src/main/scala/li/cil/oc/server/machine/Machine.scala index b25c18bb4..5bfb7b9e7 100644 --- a/src/main/scala/li/cil/oc/server/machine/Machine.scala +++ b/src/main/scala/li/cil/oc/server/machine/Machine.scala @@ -117,19 +117,17 @@ class Machine(val host: MachineHost) extends prefab.ManagedEnvironment with mach } case _ => 0 })) - val oldArchitecture = architecture - architecture = null + var newArchitecture: Architecture = null components.find { case stack: ItemStack => Option(Driver.driverFor(stack, host.getClass)) match { case Some(driver: Processor) if driver.slot(stack) == Slot.CPU => Option(driver.architecture(stack)) match { case Some(clazz) => - if (oldArchitecture == null || oldArchitecture.getClass != clazz) { - architecture = clazz.getConstructor(classOf[machine.Machine]).newInstance(this) - if (node.network != null) architecture.onConnect() + if (architecture == null || architecture.getClass != clazz) { + newArchitecture = clazz.getConstructor(classOf[machine.Machine]).newInstance(this) } else { - architecture = oldArchitecture + newArchitecture = architecture } true case _ => false @@ -138,6 +136,12 @@ class Machine(val host: MachineHost) extends prefab.ManagedEnvironment with mach } case _ => false } + // This needs to operate synchronized against the worker thread, to avoid the + // architecture changing while it is currently being executed. + if (newArchitecture != architecture) this.synchronized { + architecture = newArchitecture + if (architecture != null && node.network != null) architecture.onConnect() + } hasMemory = Option(architecture).fold(false)(_.recomputeMemory(components)) } @@ -181,7 +185,7 @@ class Machine(val host: MachineHost) extends prefab.ManagedEnvironment with mach override def isPaused = state.synchronized(state.top == Machine.State.Paused && remainingPause > 0) - override def start(): Boolean = state.synchronized(state.top match { + override def start(): Boolean = node.network != null && state.synchronized(state.top match { case Machine.State.Stopped => onHostChanged() processAddedComponents()