|
| 1 | +# Ore Detector Block Handler |
| 2 | +This block handler gives you some basic control over Ore Detectors, including setting their range, whether or not they are enabled, and whether or not they are broadcasting. |
| 3 | + |
| 4 | +* Block Type Keywords: ```detector``` |
| 5 | +* Block Type Group Keywords: ```detectors``` |
| 6 | + |
| 7 | +Default Primitive Properties: |
| 8 | +* Bool - Enabled |
| 9 | +* Numeric - Range |
| 10 | + |
| 11 | +Default Directional Properties |
| 12 | +* Up - Range |
| 13 | + |
| 14 | +## "Enabled" Property |
| 15 | +* Primitive Type: Bool |
| 16 | +* Keywords: ```enable, enabled``` |
| 17 | +* Inverse Keywords: ```disable, disabled``` |
| 18 | + |
| 19 | +Enables or Disables the given block |
| 20 | + |
| 21 | +``` |
| 22 | +#Enable Block |
| 23 | +enable "My Ore Detector" |
| 24 | +set "My Ore Detector" to enabled |
| 25 | +turn on "My Ore Detector" |
| 26 | +
|
| 27 | +#Disable Block |
| 28 | +disable "My Ore Detector" |
| 29 | +set "My Ore Detector" to disabled |
| 30 | +turn off "My Ore Detector" |
| 31 | +``` |
| 32 | + |
| 33 | +## "Power" Property |
| 34 | +* Primitive Type: Bool |
| 35 | +* Keywords: ```power, powered``` |
| 36 | + |
| 37 | +Turns on or off power to the block. Effectively the same as the Enabled property. |
| 38 | + |
| 39 | +``` |
| 40 | +#Turn on |
| 41 | +turn on power to "My Ore Detector" |
| 42 | +power on "My Ore Detector" |
| 43 | +
|
| 44 | +#Turn off |
| 45 | +turn off "My Ore Detector" |
| 46 | +power off "My Beacon" |
| 47 | +``` |
| 48 | + |
| 49 | +## "Range" Property |
| 50 | +* Primitive Type: Numeric |
| 51 | +* Keywords: ```range, ranges, distance, distances, limit, limits, radius, radii``` |
| 52 | + |
| 53 | +Gets/Sets the range, in meters, of the Ore Detector, meaning the radius in which it will detect nearby ores. |
| 54 | + |
| 55 | +``` |
| 56 | +Print "Range: " + "My Ore Detector" range |
| 57 | +
|
| 58 | +set "My Ore Detector" range to 200 |
| 59 | +``` |
| 60 | + |
| 61 | +## "Broadcast" Property |
| 62 | +* Primitive Type: Bool |
| 63 | +* Keywords: ```broadcast, broadcasting``` |
| 64 | + |
| 65 | +Gets/Sets whether the Ore Detector is broadcasting, meaning that detected ores will be shared via any connected antenna. |
| 66 | + |
| 67 | +``` |
| 68 | +if "My Ore Detector" is broadcasting |
| 69 | + Print "Sharing Ore Locations" |
| 70 | +
|
| 71 | +tell "My Ore Detector" to broadcast |
| 72 | +``` |
0 commit comments