Install Steam
login
|
language
简体中文 (Simplified Chinese)
繁體中文 (Traditional Chinese)
日本語 (Japanese)
한국어 (Korean)
ไทย (Thai)
Български (Bulgarian)
Čeština (Czech)
Dansk (Danish)
Deutsch (German)
Español - España (Spanish - Spain)
Español - Latinoamérica (Spanish - Latin America)
Ελληνικά (Greek)
Français (French)
Italiano (Italian)
Bahasa Indonesia (Indonesian)
Magyar (Hungarian)
Nederlands (Dutch)
Norsk (Norwegian)
Polski (Polish)
Português (Portuguese - Portugal)
Português - Brasil (Portuguese - Brazil)
Română (Romanian)
Русский (Russian)
Suomi (Finnish)
Svenska (Swedish)
Türkçe (Turkish)
Tiếng Việt (Vietnamese)
Українська (Ukrainian)
Report a translation problem
I managed to hunt down this awesome web-tool at stationeering.com that's helping me a little bit.. I realized the old code I found will no longer run, but I was able to start re-working it so that it does run again. You have to re-do the first lines to be like "alias sensor d0" then I started going through and I replaced the "d0" in later lines with the alias "sensor" and the code is starting to become readable :) Sorry, but I'm going to keep posting because I hope this might help others who are in the same situation as me, where I just can't seem to grasp this and I so badly want to.
EDIT - there is a bug, it didn't kick on my cooler when the greenhouse got too hot, I have to figure out what I did wrong
alias heater d0
alias cooler d1
alias sensor d2
alias temp r0
alias cushion r3
define MAXTEMP 300
define MINTEMP 280
define HOUSINGHASH -128473777
start:
l temp sensor Temperature
sub temp temp 273.15
sub cushion MAXTEMP MINTEMP
div cushion cushion 3
add r4 MINTEMP cushion
sub r5 MAXTEMP cushion
slt r6 temp r7
select r7 r6 r4 temp
s heater On r6
sgt r8 temp r9
select r9 r8 r5 MAXTEMP
s cooler On r8
blt temp 288 notSafe
bgt temp 323 notSafe
l r10 sensor RatioCarbonDioxide
blt r10 0.01 notSafe
l r10 sensor Pressure
blt r10 20 notSafe
bgt r10 140 notSafe
l r10 sensor RatioVolatiles
bge r10 0.01 notSafe
l r10 sensor RatioPollutant
bge r10 0.01 notSafe
sb HOUSINGHASH Setting 1
j start
notSafe:
sb HOUSINGHASH Setting 0
j start
#Greenhouse monitor
alias heater d0
alias cooler d1
alias sensor d2
alias temperature r1
alias heaton r2
alias coolon r3
alias heatselect r4
alias coolselect r5
define MAXTEMP 300
define MINTEMP 290
define HOUSINGHASH -128473777
start:
l temperature sensor Temperature
select heatselect r2 MAXTEMP MINTEMP
select coolselect r3 MINTEMP MAXTEMP
slt r2 temperature heatselect
brdns heater 2
s heater On r2
select coolselect r3 MINTEMP MAXTEMP
select heatselect r2 MAXTEMP MINTEMP
sgt r3 temperature coolselect
brdns cooler 2
s cooler On r3
blt temperature 288 notSafe
bgt temperature 323 notSafe
l r0 sensor RatioCarbonDioxide
blt r0 0.01 notSafe
l r0 sensor Pressure
blt r0 20 notSafe
bgt r0 140 notSafe
l r0 sensor RatioVolatiles
bge r0 0.01 notSafe
l r0 sensor RatioPollutant
bge r0 0.01 notSafe
sb HOUSINGHASH Setting 1
yield
j start
notSafe:
sb HOUSINGHASH Setting 0
yield
j start
now here's where I wonder if the game is ever going to register the room temp as exactly equal to my 295 or if it's always going to have some little decimal value and the trigger will be skipped, leaving my greenhouse too hot or too cold
EDIT i was right, and the decimals messed me up but I just added that round line to round off the room temp and that seemed to do the trick
alias sensor d0
alias heater d1
alias cooler d2
alias roomtemp r1
alias activate r2
define MINTEMP 290
define MAXTEMP 300
define MIDTEMP 295
start:
l roomtemp sensor Temperature
round roomtemp roomtemp
blt roomtemp MINTEMP COLD_START
bgt roomtemp MAXTEMP HOT_START
beq roomtemp MIDTEMP RESET
yield
j start
COLD_START:
s heater On 1
s cooler On 0
j start
HOT_START:
s cooler On 1
s heater On 0
j start
RESET:
s cooler On 0
s heater On 0
j start