Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
component:inventory_slots:zh [2023/11/26 18:42]
hfsr created
component:inventory_slots:zh [2023/11/30 08:16] (current)
hfsr [机器人物品栏的外部视图]
Line 1: Line 1:
-====Slot Alignment====+====槽位排列====
  
-===Internal versus External Slot Alignment===+===内部与外部槽位排列的区别===
  
-**Slot indexes do not match between the robot'​s internal and external view of its inventory**+**机器人自带物品栏的内部视图与外部视图槽位索引号不同。**
  
-When a robot interacts with its own inventory it is using its internal view. You access the inventory of another robot via its external view.+机器人与其自身物品栏交互时使用内部视图。访问其他机器人的物品栏时使用外部视图。
  
-The reason for this distinction is to separate the two inventory spaces: the main inventory and the tool belt inventory. Internally, the robot selects slots only in its inventory space, and not its toolbelt. It can `equip` ​or unequip items from its toolbelt. However, externally, an observer interacts with a single inventory that includes both the toolbelt as well as the main inventory.+这种区别是为了分开两种物品栏空间:主物品栏和工具带物品栏。在内部视图下,机器人只能选定主物品栏的槽位,不能选定工具带槽位,但是可以装备(`equip`函数)或卸下工具带中的物品。在外部视图下,观察者只会与单个物品栏交互,其中同时包含了工具带和主物品栏二者。
  
-===Internal Robot Slot Alignment===+===内部视图槽位排列===
  
-The Robot'​s ​GUI displays the slots of a robot aligned from top-left to bottom-right. So for example the slot at index is displayed in the top-left corner, the slot at index is the next to the right and the first slot on the 2nd row is index 5+机器人的GUI中显示了机器人的物品栏槽位,编号从左上到右下排列。例如,编号为1的槽位显示在左上角,编号为2的槽位紧挨着它在其右侧,第二行的第一个槽位为编号5
  
 {{api:​robot_slotalign.png}} {{api:​robot_slotalign.png}}
  
-These are the slot indexes a robot uses on it self (for its own main inventory, an interview view).+这些槽位编号是机器人与自身交互时使用的(在内部视图下用于自身的主物品栏 )。
  
-How many slots a robot has available depends on it's setup. If a slot is specified in a function that exceeds the amount of slots a robot has available an error is thrown.+机器人有多少可用槽位依其配置而定。若在调用某函数时指定的槽位号超出了机器人的槽位总数,将会报错。
  
-The robot can `select``place``drop``compare` ​(etc) items from its main inventory using these slot indexes as they represent the internal perspective of its inventory.+这些槽位编号代表了内部视角下的机器人物品栏,因此机器人可以使用这些槽位编号对其主物品栏中的物品进行`select`(选定)、`place`(放置)、`drop`(丢弃)`compare`(比较)等操作。
  
-===External View of a Robot Inventory===+===机器人物品栏的外部视图===
  
-Slot indexes of a robot'​s inventory to an outside observer will be offset by 4. To an outside observer, slots through ​refer to slots in the robot toolbelt. The first slot of the main inventory is slot from inside the robot (internal view), but is thus slot to an outside observer. Yes, this can be confusing at first. This design choice was made so that, to an outside observer, ​[slot 1] always indicated the first toolbelt slot regardless of the robot inventory size, and [slot 5] was always the first main inventory slot.+对外部观察者而言,机器人物品栏的编号会偏移4。对外部观察者,14槽位代表机器人工具带的槽位。主物品栏的第一个槽位在机器人内部(内部视图下)为1,但是对外部观察者而言是5。这么做确实感觉有些混乱,但是这么设计是为了:对外部观察者而言,[槽位1]永远代指第一个工具带槽位,[槽位5]永远代指第一个主物品栏槽位,无论机器人的物品栏大小如何。
  
-The robot inventory, again to an external observer, is sided inventory. The robot will not share all its inventory to all sides. Slot indexes __do not__ change to these different sides. Slot 1, therefore, always refers to the first toolbelt slot, even when inaccessible to a side.+机器人的物品栏对外界观察者而言是有方向区分的。机器人不会将其全部物品栏开放给全部方向。但是槽位编号**不会**随方向而变化。因此槽位1永远代指工具带的第一个槽位,哪怕在无法访问的面上也是如此。
  
-From its left side it share nothing. +机器人的左侧不开放任何槽位。 
-From its right side it shares only its toolbelt slots (1-5) +机器人的右侧仅开放工具带槽位(1-5)。 
-From all other sides it shares only its main inventory slots (5-n)+机器人的其余所有面仅开放主物品栏槽位(5-n)。