Addon Entry

Now supporting the newest garrysmods.org

New : UserScript to add a search button to any garrysmod.org download page Script Page Install It!

Mirrors

There are no mirrors, request one in the comment section below.
File: Auto E2 powered LS (SB)
Version: 0
Garrysmod.org URL: http://www.garrysmod.org/downloads/?a=view&id=124967
Description:
REQUIRES WIRE AND SPACEBUILD (SVN)

Plz comment your thoughts and your ideas for other E2's
how did i do for my first E2?
to other E2 coders: after looking at the code, any suggestions for improvement/ optimization?




this is my first E2 chip:
rather simple it supports water,heavy water,Oxygen,and nitrogen

inputs:

Cur_Water_Level
Cur_HeavyWater_Level
Cur_Nitrogen_Level
Cur_Oxigen_Level
Max_Water_Level
Max_HeavyWater_Level
Max_Nitrogen_Level
Max_Oxigen_Level

Note the code for each resource is completely modular so you dont need all inputs ex you could use only oxygen if u wanted

Heavy Water is the only exception to that rule it REQUIRES to have a Max_Water_Level input above 0 or that section of the code remains inactive (if you dont have a Cur_Water_Level input the Activate_Value and the Deactivate_Value are not used)

inputs (Optional):
Water_ON_Value-----------water generators will turn on when water falls below this level
HWater_ON_Value----------same as water but with heavy water
NCompressor_ON_Value----- "
OCompressor_ON_Value----- "
Water_BUON_Value---------same as the others but with backup generators
HWater_BUON_Value-------- "
NCompressor_BUON_Value--- "
OCompressor_BUON_Value--- "
HWater_Activate_Value---- Heavy water electrolizers will only turn on if water levels are above this value
HWater_Deactivate_Value-- turns off heavy water electrolizers if water falls below this level

EX:
If you use the defaults And your Cur_water_Level input = (or >) 5/10 (1/2)(cur water/max water)
The heavy water Electrolizers will be running until Cur_water_Level = (or <) 1.25/10 (1/8) (Cur/Max)
Then they will be shut off.

By default all ON_Value's are 1/2 there indicated resource max storage
All BUON_Value's Are 1/4 there Indicated Resource max storage
the Activate_Value is 1/2 the max water
the Deactivate_Value is 1/8 the max water




---------------------------------------------------------------------------------------------


this E2 is designed to run 2 sets of generators:

set one to run if >Resource< falls below ON_Value default (or otherwise indicated value)

set two to run with set one if >Resource< falls below BUON_value default (or otherwise indicated value)

but if you dont want to have two sets you can wire the Backup outputs to OVERDRIVE input function on the generators (or just not wire them at all)

WARNING:
I found if you set the overdrive function to on with the Heavy Water Electrolizers they will only run for 2min then they will shut them selves off
(this is a function on the entity itself NOT the E2 chip)

----------------------------------------------------------------------------------------------

there is also Text screen outputs:
(WaterS:string HeavyWaterS:string OxygenS:string NitrogenS:string)

the corresponding resource string will tell you the status of its generator

and the vector outputs will color code it

ex: if the main Compressors of Oxygen are on the screen text would be YELLOW and would say "Main Oxygen compressors running due to low levels."

where as if the backups are on it would be RED and say "Backup Oxygen Compressors running to compensate for high demand!"


----------------------------------------------------------------------------------------------

A Adv. Dupe file is also included for an example (PASTE IN gm_construct AT ITS ORIGINAL POSITION)

and the new Gravity hull designator is included for the upload (as e2 files are txt files)info for it can be found here:
http://www.facepunch.com/threads/1085630-Gravity-Hull-Designator-a-true-Localized-Physics-mod

place the gravity hull folder in addons
the Auto E2 Powered LS (SB).txt in data\expression2
and the other .txt in data\adv. duplicator (not the read me)



I AM AWARE OF THE SPELLING ERRORS IN SOME OF THE INPUTS / OUTPUTS IT WAS 2 AM WHEN I NOTICED AND WAS TO TYRED TO CHANGE THEM ALL AND THEN GO THROUGH ALL THE CODE FIXING!

Image: Auto