Stationeers

Stationeers

评价数不足
LArRE Controller
   
奖励
收藏
已收藏
取消收藏
文件大小
发表于
更新日期
304.668 KB
2024 年 8 月 15 日 上午 8:17
2024 年 8 月 15 日 上午 8:45
3 项改动说明 ( 查看 )

订阅以下载
LArRE Controller

描述
LArRE Controller

NOTE: I'm currently working on a re-write for the update. LArRE is a lot simpler!

Due to the limitation on lines of code, this is broken up into two separate scripts: LArRE Controller and LArRE Setup. The script you get when you subscribe is the Layer Control script, which runs really close to the 128 line limit. The LArRE Setup script is described below, and is used to set up your Hydroponic Devices.

Note: If you have any issues, please comment and let me know. Either way - please feel free to rate it.

Features
  • 1 LArRE dock supports up to a theoretical 60 or so Hydroponics devices (20 tested), limited by lines of code and the speed of LArRE.
  • Multiple “Input” bins allow for shorter travel distances when harvesting, greatly speeding up the process. Uses logic to determine the closest bin.
  • Harvests seeds as well as plant product.
  • May have multiple groups of plants, each group’s seed selection managed by Hex generators
  • Cycles all trays through fertilizing, planting, and harvesting

Requirements
  • 1 LArRE Dock
  • LArRE Rails
  • 2+ Powered Chutes. I recommend 1 output and about 1 for every 5 Hydroponics Trays
  • Hydroponics Trays
  • 1 Refrigerated Vending machine
  • 1 Sorter
  • Logic Hex Generator (one for each type of plant, not to exceed the number of trays)
  • Cables and pipes
  • 2 IC Housings and chips
  • Grow lights (optional, I guess)
  • Optional daylight sensor
  • Optional Hex display consoles

Setup

Room
  • Set up trays, piping, and wiring as you normally would
  • All Input bins should merge together, and exit into the back of the vending machine.
  • The front of which should route to the sorter - with the primary output (the one inline with the input) going to the Output Bin. The other going to where you want to be able to retrieve your food.
  • I recommend one input bin between every 5 trays or so, and one on each end. I have tested * this with 20 trays and 5 bin
  • Each Hydroponics tray needs a unique name, as this is how they are addressed.
    The Hex Generators also need unique names.
Lights

The setup script has a little light control code in it. This code can be moved to a dedicated IC, or removed if you have other options of controlling the light. If you do use it, it currently requires a daylight sensor.

Setup script

Outside of the daylight sensor code, the script is made up of a series of push statements, two for each “station” on the rail network. Note: the code currently _assumes_ the station numbers start at zero, and do not have negatives.

The push statements are for the hash of the tray name, followed by the hash of the group name (the name of the Hex Generator). Input bins are a set of -1 entries, and any other station (including the output bin) are -2s. This must be ended with a
push 0
.
For example, let’s say you have four trays, with an input on either side, and the output bin in the middle, in two groups, like:

1-2-3-4-5-6-7 I-T-T-O-T-T-I

The setup script would look like:

move sp 0 push -1 push -1 push HASH(“Tray 1”) push HASH(“Group A”) push HASH(“Tray 2”) push HASH(“Group A”) push -2 push -2 push HASH(“Tray 3”) push HASH(“Group B”) push HASH(“Tray 4”) push HASH(“Group B”) push -1 push -1 push 0

Full Setup Script

This is the full setup script I use in the second IC, including grow light control:

alias dDaylightSensor d0 move sp 0 # Part 2: Stations & Hashes push -2 # 0/0 push -2 # 0/1 push -1 # 1/2 push -1 # 1/3 push HASH("Tray1") # 2/4 push HASH("GroupA") # 2/5 push HASH("Tray2") # 3/6 push HASH("GroupA") # 3/7 push HASH("Tray3") # 4/8 push HASH("GroupA") # 4/9 push HASH("Tray4") # 5/10 push HASH("GroupA") # 5/11 push HASH("Tray5") # 6/12 push HASH("GroupA") # 6/13 push -1 # 7/14 push -1 # 7/15 push HASH("Tray6") # 8/16 push HASH("GroupB") # 8/17 push HASH("Tray7") # 9/18 push HASH("GroupB") # 9/19 push HASH("Tray8") # 10/20 push HASH("GroupB") # 10/21 push HASH("Tray9") # 11/22 push HASH("GroupB") # 11/23 push HASH("Tray10") # 12/24 push HASH("GroupB") # 12/25 push -1 # 13/26 push -1 # 13/27 push HASH("Tray11") # 14/28 push HASH("GroupC") # 14/29 push HASH("Tray12") # 15/30 push HASH("GroupC") # 16/31 push HASH("Tray13") # 17/32 push HASH("GroupC") # 17/33 push HASH("Tray14") # 18/34 push HASH("GroupC") # 18/35 push HASH("Tray15") # 19/36 push HASH("GroupC") # 19/37 push -1 # 20/38 push -1 # 20/39 push HASH("Tray16") # 21/40 push HASH("GroupD") # 21/41 push HASH("Tray17") # 22/42 push HASH("GroupD") # 22/43 push HASH("Tray18") # 23/44 push HASH("GroupD") # 23/45 push HASH("Tray19") # 24/46 push HASH("GroupD") # 24/47 push HASH("Tray20") # 25/48 push HASH("GroupD") # 25/49 push -1 # 26/50 push -1 # 26/51 # end part 2 push 0 # End of trays ("Hydroponic Devices") s db Setting -999 # Signal that we are ready # Everything below this line is for managing the Glow lights, and can be removed or moved # to another IC if more linex are needed (maximum of 128 lines are permitted) define cDaylightAngle 112.5 define cGrowLightHash -1758710260 define cHydroDevice -1841632400 alias rSolarAngle r15 alias rLightPower r14 lStart: yield lbs r0 cHydroDevice 0 Growth Maximum beq r0 -1 lStart l rSolarAngle dDaylightSensor SolarAngle slt rLightPower rSolarAngle cDaylightAngle sb cGrowLightHash On rLightPower j lStart