Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
---
id: distributor_receiver
lookup: neepmeat:distributor_point
---

# Distributor Receiver

The Distributor Receiver summons Distributor Organisms to transport items and fluids to other receivers on the same channel. Transport can occur to unloaded chunks and across dimensions.

# Usage

Only one Distributor Receiver can be part of a machine. The receiver can be configured to send resources, receive them, or both. Send mode requires an item input to be part of the machine, and receive mode requires an item output.

Right-clicking on the receiver opens a GUI with configuration options:

- Channel: Receivers with the same channel will be able to send and receive from each other.
- Mode: Whether to send, receive, or both.
- Cooldown: How long to wait between sends.
- Auto send: Whether to automatically send resources when they are available, or wait for a NEEPBus signal.

For transport to occur, only the sender chunks need to be loaded.

# NEEPBus Support

NEEPBus can be used to set a receiver's channel or trigger it to send.
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
---
id: thord_stack
---

# The Stack

The stack is how a PLC stores numbers that are currently in use by a program. It is a last-in-first-out data structure. This means that the last number to go on the stack will be the first one that can be taken off it.

Consider it like a stack of papers. You can add more paper and take paper off, but you can't easily take or add paper from the middle or the bottom.

Arithmetic operations take their arguments from the stack. The following program will add the numbers 1 and 2:

```
1 2 +
```

- First, the numbers 1 and 2 are put onto the stack.
- The + word removes the two topmost stack elements and adds them.
- The result is put onto the stack.

For some words, such as the division operator, the order of stack elements is important.

The / word will take the second stack element and divide it by the first:

```
6 3 / # gives 2
3 6 / # gives 0 due to integer division
```
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
---
id: thord_strings
---

# Strings

Strings can be pushed to the stack much like integers:

```
"I am a string" .
# Prints 'I am a string'
```

It is important to note that what is stored on the stack is not the string, but a pointer to the string in the PLC's random access memory. Allocated memory is automatically freed when no references to it exist in the stack, so strings do not need to be manually freed.

# Relevant Instructions

Some instructions can differentiate between pointers and normal stack entries and modify their behaviour. For example, NBWRITE can send integers from the stack, but can also send strings from memory via a pointer on the stack using the same syntax:

```
1234
nbwrite "the address"

"I am a string"
nbwrite "the address"
```
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
---
id: pressure_washer
lookup: neepmeat:pressure_washer
---

# Pressure Washer

The Pressure Washer can change or remove certain blocks depending on the fluid used.

Press R (by default) when holding to interact with blocks normally.

## Fluid Effects

- Water: Removes sludge, vines, sculk veins, etc.
- Patina Treatment: Oxidises copper blocks.
- Lava (or any hot fluid): Strips patina from copper blocks.
- Integration Fluid: Repairs open machine blocks.
- Compressed Air: Breaks crops
Original file line number Diff line number Diff line change
Expand Up @@ -50,17 +50,20 @@
{"type": "page", "id": "metaboliser", "icon": "neepmeat:metaboliser_segment", "text": "Metaboliser"},
{"type": "page", "id": "tree_vacuum", "icon": "neepmeat:tree_vacuum", "text": "Tree Vacuum", "lookup": "neepmeat:tree_vacuum"},
{"type": "page", "id": "charnel_pump", "icon": "neepmeat:charnel_pump", "text": "Charnel Pump", "lookup": "neepmeat:charnel_pump"},
{"type": "page", "id": "large_compressor", "icon": "neepmeat:large_compressor", "text": "Large Compressor", "lookup": "neepmeat:large_compressor"}
{"type": "page", "id": "large_compressor", "icon": "neepmeat:large_compressor", "text": "Large Compressor", "lookup": "neepmeat:large_compressor"},
{"type": "page", "id": "distributor_receiver", "icon": "neepmeat:distributor_point", "text": "Distributor Receiver"}
]},
{"type": "menu", "id": "plc", "icon": "neepmeat:plc", "text": "PLC and Manufacturing", "entries": [
{"type": "page", "id": "plc", "icon": "neepmeat:plc", "text": "PLC", "lookup": ["neepmeat:plc", "neepmeat:executor"]},
{"type": "menu", "id": "thord_menu", "icon": "neepmeat:plc", "text": "THORD Language", "entries": [
{"type": "page", "id": "thord_words", "icon": "neepmeat:plc", "text": "THORD Word Reference"},
{"type": "page", "id": "thord_stack", "icon": "neepmeat:plc", "text": "The Stack"},
{"type": "page", "id": "thord", "icon": "neepmeat:plc", "text": "THORD"},
{"type": "page", "id": "word_definition", "icon": "neepmeat:plc", "text": "Defining Words"},
{"type": "page", "id": "thord_constructs", "icon": "neepmeat:plc", "text": "Flow-Control Constructs"},
{"type": "page", "id": "thord_variables", "icon": "neepmeat:plc", "text": "Variables"},
{"type": "page", "id": "thord_booleans", "icon": "neepmeat:plc", "text": "Booleans"},
{"type": "page", "id": "thord_strings", "icon": "neepmeat:plc", "text": "Strings"},
{"type": "page", "id": "thord_macros", "icon": "neepmeat:plc", "text": "THORD Macros"},
{"type": "page", "id": "thord_examples", "icon": "neepmeat:plc", "text": "THORD Code Examples"}
]},
Expand Down Expand Up @@ -118,8 +121,9 @@
{"type": "page", "id": "synthesiser", "icon": "neepmeat:synthesiser", "text": "Oviparous Synthesiser", "lookup": "neepmeat:synthesiser"},
{"type": "page", "id": "airtruck", "icon": "meatweapons:airtruck", "text": "Airtruck", "lookup": "meatweapons:airtruck"}
]},
{"type": "menu", "id": "weapons", "icon": "meatweapons:assault_drill", "text": "Weapons", "entries": [
{"type": "page", "id": "assault_drill", "icon": "meatweapons:assault_drill", "text": "Assault Drill", "lookup": "meatweapons:assault_drill"}
{"type": "menu", "id": "tools", "icon": "neepmeat:pressure_washer", "text": "Tools", "entries": [
{"type": "page", "id": "assault_drill", "icon": "meatweapons:assault_drill", "text": "Assault Drill", "lookup": "meatweapons:assault_drill"},
{"type": "page", "id": "pressure_washer", "icon": "neepmeat:pressure_washer", "text": "Pressure Washer"}
]}
]}
}
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@ id: integrator
---
# 融变生物机

融变生物机是一种信息处理用生物机械系统,专为简化机器生产而造。它能承受非人类知识的大量累积,并可将这种知识送入特定种类的物质,以此为物质启智。
融变生物机是一种信息处理用生物机械系统,专为简化机器生产而造。它能承受住大量累积的非人类知识,同时还可将这种知识送入特定种类的物质,以此为物质启智。

## 获取途径

制造融变生物机有关的科技已不可考,但它们的卵仍留存于地牢之中。
与制造融变生物机有关的科技已不可考,但它们的卵仍留存于地牢之中。

还可选择向下图的接收器结构提供一颗复苏心脏,有可能形成一个融变生物机。

Expand All @@ -17,4 +17,4 @@ id: integrator

## 使用方法

每一个融变生物机个体都有一个内部信息存储库,在它聆听宇宙时,该存储库会缓慢自动填充。以呢喃面粉喂食可加快融变机的学习
每个融变生物机个体都有一个内部信息存储库,在它聆听宇宙时,该存储库会缓慢自动填充。以呢喃面粉喂食可加快融变机的学习速度
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
---
id: distributor_receiver
lookup: neepmeat:distributor_point
---
# 派送接收机

派送接收机会召唤派送生物体向同频道的其他接收机运输物品和流体。可以向未加载的区块运输,也可跨维度运输。

# 使用方法

活体机器中只可存在一台派送接收机。接收机可配置为发送资源、接收资源,或同时具有两种功能。发送模式下需要机器中包含物品输入端口,接收模式则要求存在物品输出端口。

右击接收机可打开配置项GUI:

- 频道:接收机可对同频道的接收机收发资源。
- 模式:发送、接收,或同时具有两种功能。
- 冷却:两次收发操作间的等候时间。
- 自动发送:在获得资源时自动发送,或等待NEEP总线信号再发送。

运输时只需发送端所处区块处于加载状态。

# NEEP总线支持

NEEP总线可设置接收机的频道,也可用于触发发送。
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
---
id: thord_stack
---
# 栈

栈是PLC存储程序所用数值的方式。栈是一种先入后出的数据结构,也即最后进入栈的数会最先被取走。

可以把它想成是一叠纸。能往上面放纸和从上面拿纸,但从中间或底部抽纸和塞纸就不算容易了。

算术操作会从栈中获取参数。下方的程序会求1和2的和:

```
1 2 +
```

- 首先,1和2进入栈。
- 词`+`会移除栈顶的两个元素,并求两者之和。
- 结果进入栈。

对除法操作等部分词而言,栈中元素的顺序也很重要。

词`/`视栈顶往下第二个元素为被除数,并用栈顶元素作除数计算结果。

```
6 3 / # gives 2 [1]
3 6 / # gives 0 due to integer division [2]
```
[1] 返回2
[2] 由于使用的是整数除法,返回0
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
---
id: thord_strings
---
# 字符串

字符串的压栈操作与整数类似:

```
"I am a string" .
# Prints 'I am a string' [1]
```
[1] 打印'我是个字符串'

需要注意的是,栈中存储的并不是字符串本身,而是指向PLC随机存取存储器中字符串的指针。栈中所有引用均解除后,相应分配的内存空间会自动释放,因此字符串无需手动释放内存。

# 相关指令

某些指令能区分指针和普通的栈元素,从而改变自身行为。例如,NBWRITE可以发送栈中的整数,也可通过指针发送内存中的字符串,无需修改语法:

```
1234
nbwrite "the address"

"I am a string"
nbwrite "the address"
```
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
---
id: pressure_washer
lookup: neepmeat:pressure_washer
---
# 高压清洗器

高压清洗器可以改变或移除特定方块,具体操作由流体种类决定。

持有清洗器时按下R(默认)可按照普通方式与方块进行交互。

## 流体效果

- 水:清除污泥、藤蔓、幽匿脉络等方块。
- 锈铜液:氧化铜质方块。
- 熔岩(或者任意热流体):为铜质方块除锈。
- 融变液:修复机器方块的伤口。
- 压缩空气:破坏农作物。
Original file line number Diff line number Diff line change
Expand Up @@ -50,17 +50,20 @@
{"type": "page", "id": "metaboliser", "icon": "neepmeat:metaboliser_segment", "text": "代谢机"},
{"type": "page", "id": "tree_vacuum", "icon": "neepmeat:tree_vacuum", "text": "真空吸树机", "lookup": "neepmeat:tree_vacuum"},
{"type": "page", "id": "charnel_pump", "icon": "neepmeat:charnel_pump", "text": "积骸泵", "lookup": "neepmeat:charnel_pump"},
{"type": "page", "id": "large_compressor", "icon": "neepmeat:large_compressor", "text": "大型压缩机", "lookup": "neepmeat:large_compressor"}
{"type": "page", "id": "large_compressor", "icon": "neepmeat:large_compressor", "text": "大型压缩机", "lookup": "neepmeat:large_compressor"},
{"type": "page", "id": "distributor_receiver", "icon": "neepmeat:distributor_point", "text": "派送接收机"}
]},
{"type": "menu", "id": "plc", "icon": "neepmeat:plc", "text": "PLC与制造加工", "entries": [
{"type": "page", "id": "plc", "icon": "neepmeat:plc", "text": "PLC", "lookup": ["neepmeat:plc", "neepmeat:executor"]},
{"type": "menu", "id": "thord_menu", "icon": "neepmeat:plc", "text": "THORD语言", "entries": [
{"type": "page", "id": "thord_words", "icon": "neepmeat:plc", "text": "THORD词参考文档"},
{"type": "page", "id": "thord_stack", "icon": "neepmeat:plc", "text": "栈操作"},
{"type": "page", "id": "thord", "icon": "neepmeat:plc", "text": "THORD"},
{"type": "page", "id": "word_definition", "icon": "neepmeat:plc", "text": "词的定义"},
{"type": "page", "id": "thord_constructs", "icon": "neepmeat:plc", "text": "流程控制结构"},
{"type": "page", "id": "thord_variables", "icon": "neepmeat:plc", "text": "变量"},
{"type": "page", "id": "thord_booleans", "icon": "neepmeat:plc", "text": "布尔值"},
{"type": "page", "id": "thord_strings", "icon": "neepmeat:plc", "text": "字符串"},
{"type": "page", "id": "thord_macros", "icon": "neepmeat:plc", "text": "THORD宏"},
{"type": "page", "id": "thord_examples", "icon": "neepmeat:plc", "text": "THORD代码示例"}
]},
Expand Down Expand Up @@ -118,8 +121,9 @@
{"type": "page", "id": "synthesiser", "icon": "neepmeat:synthesiser", "text": "精卵合成机", "lookup": "neepmeat:synthesiser"},
{"type": "page", "id": "airtruck", "icon": "meatweapons:airtruck", "text": "空中货车", "lookup": "meatweapons:airtruck"}
]},
{"type": "menu", "id": "weapons", "icon": "meatweapons:assault_drill", "text": "武器", "entries": [
{"type": "page", "id": "assault_drill", "icon": "meatweapons:assault_drill", "text": "突击钻", "lookup": "meatweapons:assault_drill"}
{"type": "menu", "id": "tools", "icon": "neepmeat:pressure_washer", "text": "工具", "entries": [
{"type": "page", "id": "assault_drill", "icon": "meatweapons:assault_drill", "text": "突击钻", "lookup": "meatweapons:assault_drill"},
{"type": "page", "id": "pressure_washer", "icon": "neepmeat:pressure_washer", "text": "高压清洗器"}
]}
]}
}
Loading
Loading