Skip to content

Commit

Permalink
Another two-letter addition
Browse files Browse the repository at this point in the history
  • Loading branch information
FateUnix29 authored and StackDoubleFlow committed Jun 17, 2024
1 parent e9bea82 commit bd63fca
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion docs/Redpiler.md
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ Different node types operates differently:

### Repeater

When a Repeater is updated, the first thing that is check is if the Repeater should be locked. If that value is different from the current state, the locking state of the Repeater is changed. Since this state change happens during the update, Repeater locking is instant. Then, if the Repeater is not locked and there is not already a tick pending at its node, then whether or not it should be powered is calculated. If this value is different from the current state, a tick is scheduled with the delay of the specific Repeater. The priority of the tick depends on if the output of the Repeater is directly facing another Repeater or Comparator. If it is, the priority is `Highest`. If not, but the Repeater is depowering, the priority is `Higher`. Otherwise, when the repeater should be powered and is not facing a Repeater or Comparator, the priority is `High`.
When a Repeater is updated, the first thing that is checked is if the Repeater should be locked. If that value is different from the current state, the locking state of the Repeater is changed. Since this state change happens during the update, Repeater locking is instant. Then, if the Repeater is not locked and there is not already a tick pending at its node, then whether or not it should be powered is calculated. If this value is different from the current state, a tick is scheduled with the delay of the specific Repeater. The priority of the tick depends on if the output of the Repeater is directly facing another Repeater or Comparator. If it is, the priority is `Highest`. If not, but the Repeater is depowering, the priority is `Higher`. Otherwise, when the repeater should be powered and is not facing a Repeater or Comparator, the priority is `High`.

When a Repeater is ticked, the first thing that is checked is if the Repeater is locked. If not, then the Repeater checked if it should be powered. If the Repeater is not powered, its state is set to powered. If the Repeater is powered but should not be powered, its state is set to unpowered. Note that a Repeater will become powered here regardless of the input it is receiving, but the same is not true for depowering. If its state is changed, all nodes that may be affected by this change are updated. If the Repeater was just set to powered even though it is not receiving a non-zero input, a tick is scheduled with `Higher` priority with the delay of the Repeater. This is the only node type where a tick is scheduled in the tick function itself.

Expand Down

0 comments on commit bd63fca

Please sign in to comment.