Skip to content

Commit

Permalink
[Wiki] Iris, GDO and Transceiver documentation (#152)
Browse files Browse the repository at this point in the history
* Document Iris, GDO & transceiver, update just-the-docs to 0.9.0

document transceiver functions
create transceiver page for computercraft functions
Update events with peripheral name
Document CC functions for iris control
Update readme with package dependencies for Ubuntu
remove custom header with warning
remove future note
transceiver description
linking to GDO and transceiver
GDO item description
GDO redstone circuit
update interface modes
iris WIP
basic iris page
rename vortex to strudel
Update just-the-docs to 0.9.0

* Describe switching interface mode

* improve getIrisProgress() description
  • Loading branch information
lukaskabc authored Dec 28, 2024
1 parent 19c3181 commit b8f9eb9
Show file tree
Hide file tree
Showing 60 changed files with 990 additions and 63 deletions.
2 changes: 1 addition & 1 deletion Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ gem "github-pages", group: :jekyll_plugins

# theme
# https://github.com/just-the-docs/just-the-docs
gem "just-the-docs", "~> 0.8.2"
gem "just-the-docs", "~> 0.9.0"

# Windows and JRuby does not include zoneinfo files, so bundle the tzinfo-data gem
# and associated library.
Expand Down
4 changes: 2 additions & 2 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,7 @@ GEM
gemoji (>= 3, < 5)
html-pipeline (~> 2.2)
jekyll (>= 3.0, < 5.0)
just-the-docs (0.8.2)
just-the-docs (0.9.0)
jekyll (>= 3.8.5)
jekyll-include-cache
jekyll-seo-tag (>= 2.0)
Expand Down Expand Up @@ -271,7 +271,7 @@ PLATFORMS
DEPENDENCIES
github-pages
http_parser.rb (~> 0.6.0)
just-the-docs (~> 0.8.2)
just-the-docs (~> 0.9.0)
tzinfo (>= 1, < 3)
tzinfo-data
wdm (~> 0.1.1)
Expand Down
13 changes: 13 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,24 @@ Used template: [Just the docs](https://just-the-docs.com/)
# Local testing
[Testing your GitHub Pages site locally with Jekyll](https://docs.github.com/en/pages/setting-up-a-github-pages-site-with-jekyll/testing-your-github-pages-site-locally-with-jekyll)

Ubuntu installation
```bash
# install dependencies
sudo apt install ruby ruby-dev ruby-bundler
# change the gem home directory for non-root users (otherwise it defaults to /var)
export GEM_HOME=$HOME/.gem
# make the change "permanent"
echo 'export GEM_HOME=$HOME/.gem' >> $HOME/.bashrc
# build the site
bundle install
```

example `run.sh` for bash
```bash
#!/bin/bash
# you should clear the _site directory on script restart as incremental build is used
# rm -R ./_site
# you may also need to use --force_polling
bundle exec jekyll serve --livereload --incremental
```

Expand Down
8 changes: 0 additions & 8 deletions _includes/header_custom.html

This file was deleted.

4 changes: 1 addition & 3 deletions _includes/js/custom.js
Original file line number Diff line number Diff line change
@@ -1,3 +1 @@
document.addEventListener("DOMContentLoaded", () => {
{% include js/open-details.js %}
});
{% include js/open-details.js %}
11 changes: 8 additions & 3 deletions _includes/js/open-details.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
// TODO: this definitely needs some tweaks, it does not work as intended
/**
* Once the page is loaded, it will extract the fragment (part after {@code #}) from the url
* Once the page is loaded, it will extract the fragment from the url
* and if it refers to a {@code details} or {@code summary} element, it will add {@code open} attribute
* to the relevant {@code details} element.
*/
(() => {
function onHashChange() {
const fragment = window.location.hash.substring(1);
if (fragment == null || fragment.trim() === "") return;
const details = document.querySelectorAll("#" + fragment);
Expand All @@ -16,4 +17,8 @@
el.setAttribute("open", "true");
}
})
})();
}

document.addEventListener("DOMContentLoaded", onHashChange);
document.addEventListener("hashchange", onHashChange);
// document.addEventListener("click", onHashChange);
4 changes: 4 additions & 0 deletions _sass/custom/custom.scss
Original file line number Diff line number Diff line change
Expand Up @@ -29,5 +29,9 @@ details {
border-left: 3px solid #44434d;
}

.flex-align-items-center {
align-items: center;
}

// located in /assets/css
@import "./youtubePlayer.css";
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/img/blocks/technological/transceiver.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/img/items/functional/gdo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/img/items/functional/gdo_gui.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
6 changes: 6 additions & 0 deletions blocks/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,9 @@ nav_order: 40
has_children: true
---
# Blocks


[//]: # (Taking the block screenshot)
[//]: # (yes I am lazy to generalize this)
[//]: # (/tp lukaskabc 9.5 189 -87.5 -135 45)
[//]: # (While the block is placed at 9 189 -88)
4 changes: 2 additions & 2 deletions blocks/stargate_variants.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,8 +68,8 @@ Each chevron opens and closes individually and moves on both sides of the gate i
The primary chevron is the only one that doesn't move.
Tt has open space under it, so the symbol under it is easier to see.
<details markdown="block">
<summary>The event horizon forms a vortex behind the gate</summary>
![Milky Way Stargate movie variant]({{ site.baseurl }}/assets/img/blocks/technological/variants/vortex.png)
<summary>The event horizon forms a strudel behind the gate</summary>
![Milky Way Stargate movie variant]({{ site.baseurl }}/assets/img/blocks/technological/variants/strudel.png)
{: .max-width-256 }
</details>

Expand Down
24 changes: 24 additions & 0 deletions blocks/technological_blocks.md
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,30 @@ The gate automatically picks up symbols of the galaxy each time it is placed (un

___

## Transceiver
The transceiver is capable of receiving an IDC (IDentification code) from the
[Garage Door Opener (GDO)]({{ site.baseurl }}/items/functional/#garage-door-opener-gdo).
It will provide a redstone signal pulse through a comparator when a correct IDC is received
and will notify connected computers with an event.
Transceiver is also able to transmit the IDC.

See [Stargate Network / Stargate Iris / Controlling / Remote iris control]({{ site.baseurl }}/stargate_network/stargate_iris/#remote-iris-control)
for redstone example.

**GUI usage**
- The **code** is displayed on the first line of the display.
- The **editing mode** is displayed as **#** when you are modifying the frequency.
When the **#** is absent, you are modifying the identification code.
The editing mode can be switched with the **f** button.
- The **transmit button** on the left sends the entered IDC (IDentification Code) on the specified frequency.

<div class="d-flex flex-justify-between flex-align-items-center" markdown="block">
![Transceiver]({{ site.baseurl }}/assets/img/blocks/technological/transceiver.png)
{: .max-width-256 }
![Transceiver GUI]({{ site.baseurl }}/assets/img/blocks/technological/transceiver_gui.png)
</div>
___

## Transport rings
## Ring panel

Expand Down
72 changes: 52 additions & 20 deletions computercraft/events.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,17 @@
---
title: Events
nav_order: 5
nav_order: 50
has_children: false
parent: Computercraft
---

{% include computercraft_doc.html %}

# Events
{: .no_toc }

1. Table of Contents
{:toc}

<details markdown="block">
<summary>How to listen to events</summary>
Expand Down Expand Up @@ -62,7 +66,7 @@ end
</details>

## Stargate interface
You will receive these events whenever an interface is connected to the Stargate and the computer.
The computer will receive these events whenever an interface is connected to a Stargate and the computer.

<h3 class="h-function">
<code>stargate_chevron_engaged</code>
Expand All @@ -72,11 +76,12 @@ Fired whenever a **chevron** is engaged.

**Return values**
1. `string` The event name (`stargate_chevron_engaged`)
2. `number` Count of engaged symbols (from `1` to `9`)
3. `number` Engaged chevron (chevron identifier from `0` to `8`)
4. `boolean` `true` if the chevron was engaged for incoming connection,
2. `string` The peripheral name
3. `number` Count of engaged symbols (from `1` to `9`)
4. `number` Engaged chevron (chevron identifier from `0` to `8`)
5. `boolean` `true` if the chevron was engaged for incoming connection,
`false` if the chevron was locked by dialing this gate
5. `number` Encoded symbol (from `0` to `38` - or `35` for the Universe gate)
6. `number` Encoded symbol (from `0` to `38` - or `35` for the Universe gate)

<span class="label label-blue ml-0">Basic Interface</span><span class="label label-green ml-0">Crystal Interface</span>The symbol is present only when engaged for outgoing connection.
<span class="label label-purple ml-0">Advanced Crystal Interface</span> The symbol is present even for incoming connection.
Expand All @@ -92,7 +97,8 @@ The event is fired right **after** the kawoosh end.

**Return values**
1. `string` The event name (`stargate_incoming_wormhole`)
2. `number[]`<span class="label label-purple">Advanced Crystal Interface</span> The connected address
2. `string` The peripheral name
3. `number[]`<span class="label label-purple">Advanced Crystal Interface</span> The connected address

___

Expand All @@ -105,7 +111,8 @@ The event is fired right **before** the kawoosh start.

**Return values**
1. `string` The event name (`stargate_outgoing_wormhole`)
2. `number[]` The dialed address
2. `string` The peripheral name
3. `number[]` The dialed address

___

Expand All @@ -117,8 +124,9 @@ Fired whenever a connection is ended.

**Return values**
1. `string` The event name (`stargate_disconnected`)
2. `number` The recent feedback code <!-- TODO: add feedback code link -->
3. `string`<span class="label label-green">Crystal Interface</span><span class="label label-purple ml-0">Advanced Crystal Interface</span>A description of the feedback
2. `string` The peripheral name
3. `number` The recent feedback code <!-- TODO: add feedback code link -->
4. `string`<span class="label label-green">Crystal Interface</span><span class="label label-purple ml-0">Advanced Crystal Interface</span>A description of the feedback

___

Expand All @@ -131,8 +139,9 @@ Fired whenever a Stargate resets.

**Return values**
1. `string` The event name (`stargate_reset`)
2. `number` The recent feedback code <!-- TODO: add feedback code link -->
3. `string`<span class="label label-green">Crystal Interface</span><span class="label label-purple ml-0">Advanced Crystal Interface</span>A description of the feedback
2. `string` The peripheral name
3. `number` The recent feedback code <!-- TODO: add feedback code link -->
4. `string`<span class="label label-green">Crystal Interface</span><span class="label label-purple ml-0">Advanced Crystal Interface</span>A description of the feedback

___

Expand All @@ -144,10 +153,11 @@ Fired whenever an entity enters the wormhole.

**Return values**
1. `string` The event name (`stargate_deconstructing_entity`)
2. `string` The type of the entity (e.g. `minecraft:pig`)
3. `string` The display name of the entity (e.g. player's name, name set by a nametag or a default mob name)
4. `string` UUID of the entity
5. `boolean` `true` when the entity was destroyed by stepping through the wrong end of the wormhole, `false` otherwise.
2. `string` The peripheral name
3. `string` The type of the entity (e.g. `minecraft:pig`)
4. `string` The display name of the entity (e.g. player's name, name set by a nametag or a default mob name)
5. `string` UUID of the entity
6. `boolean` `true` when the entity was destroyed by stepping through the wrong end of the wormhole, `false` otherwise.

___

Expand All @@ -159,9 +169,10 @@ Fired whenever an entity exits the wormhole.

**Return values**
1. `string` The event name (`stargate_reconstructing_entity`)
2. `string` The type of the entity (e.g. `minecraft:pig`)
3. `string` The display name of the entity (e.g. player's name, name set by a nametag or a default mob name)
4. `string` UUID of the entity
2. `string` The peripheral name
3. `string` The type of the entity (e.g. `minecraft:pig`)
4. `string` The display name of the entity (e.g. player's name, name set by a nametag or a default mob name)
5. `string` UUID of the entity

___

Expand All @@ -173,7 +184,28 @@ Fired whenever a Stargate receives a message sent by the `sendStargateMessage(me

**Return values**
1. `string` The event name (`stargate_message_received`)
2. `string` The message that was sent from an interface connected to the Stargate on the other end of the connection.
2. `string` The peripheral name
3. `string` The message that was sent from an interface connected to the Stargate on the other end of the connection.

**See also**
- [sendStargateMessage(message)]({{ site.baseurl }}/computercraft/stargate_interface/#sendStargateMessage)

___

## Transceiver
The computer will receiver these events whenever a [transceiver]({{ site.baseurl }}/computercraft/transceiver/) is connected as a peripheral.

___

<h3 class="h-function">
<code>transceiver_transmission_received</code>
</h3>

Fired whenever the [transceiver]({{ site.baseurl }}/computercraft/transceiver/) receives a transmission on the configured frequency.

**Return values**
1. `string` The event name (`transceiver_transmission_received`)
2. `string` The peripheral name
3. `number` The configured frequency
4. `number` The received identification code (IDC)
5. `boolean` Whether the code matches the configured IDC on the transceiver
Loading

0 comments on commit b8f9eb9

Please sign in to comment.