Skip to content
This repository has been archived by the owner on Jan 30, 2021. It is now read-only.

Commit

Permalink
Merge pull request #16 from ThorsCrafter/beta
Browse files Browse the repository at this point in the history
Release 2.5
  • Loading branch information
ThorsCrafter authored Jan 28, 2017
2 parents 2b343d1 + f76acdc commit c5c7557
Show file tree
Hide file tree
Showing 16 changed files with 568 additions and 329 deletions.
1 change: 1 addition & 0 deletions .idea/.gitignore

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

47 changes: 45 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,45 @@
# Reactor-and-Turbine-control-program
This is my Reactor- and Turbine control program for ComputerCraft and BigReactors
# Reactor and Turbine control program
***Description:***

This is my Reactor- and Turbine control program for ComputerCraft and BigReactors.
The following list shows the features of the program:
- Control up to 32 Turbines (per Reactor)
- Supports multiple languages (currently English and German)
- Automatic and manual Control of Reactor and attached Turbines
- Energy-based automatic Control
- Switches Reactor and Turbines on/off if energy level is low/high
- Supports multiple Energy Storage typesm like Capacitorbanks (EnderIO), Energy Core (Draconic Evolution), etc.
- Large option menu
- Change Background and Text Color
- Set energy level for activating/deactivating the reactor
- Set Reactor Steam Output Level

## How To Install
- Set up a Computer, connect all parts (Reactor, Energy Storage, Turbines) with ***Wired Modems***
- ***Activate*** all modems
- Type in the following into the computer:

```
pastebin get HMtbgkwt git
git
```
- Then follow the install instructions
## Have a look at my Update Videos on YouTube
- Current version (2.4):
- https://www.youtube.com/watch?v=UnPru3xhrjo (English)
- https://www.youtube.com/watch?v=XNlsU0tSHOc&t=1s (German)
## Do you want to help me developing the program?
- Use my beta versions!
- Report bugs and send me suggestions for new features
##
### *Have fun! Thanks for using my program!*
1 change: 1 addition & 0 deletions turbineControl_v2/src/beta.ver
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
2.5-beta
17 changes: 16 additions & 1 deletion turbineControl_v2/src/changelog/changelogDE.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,22 @@
****************************************************************
-- Reaktor- und Turbinenprogramm von Thor_s_Crafter --
-- Komplettes Changelog --
-- Aktuelle Version: 2.4 --
-- Aktuelle Version: 2.5 --
****************************************************************
Version 2.5
- Automatische Updates implementiert
- Git Downloader & Installer Updates
- Readme in Github aktualisiert
- Optionen Reworks
- Energiespeicher werden nun anhand der Methode
getEnergyStored() erkannt
- Bugfixes:
> Anzeigebugs
> Event Handling Fixes
> Buttons
> Hauptmenue Bugs
> Start Bugs
> Eine Menge Code-Cleanups
****************************************************************
Version 2.4
- Github Downloader hinzugefuegt (ersetzt installerUpdate)
Expand Down
17 changes: 16 additions & 1 deletion turbineControl_v2/src/changelog/changelogEn.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,22 @@
****************************************************************
-- Reactor- und Turbine control by Thor_s_Crafter --
-- Complete Changelog --
-- Current Version: 2.4 --
-- Current Version: 2.5 --
****************************************************************
Version 2.5
- Reimplemented automatic updates
- Git Downloader & Installer Updates
- Updated Readme in Github
- Option Reworks
- Energy Storage is now being detected by the function
getEnergyStored()
- Bugfixes:
> Visual Bugfixes
> Event Handling Fixes
> Buttons
> Hauptmenu Bugs
> Start Bugs
> Lots of Code-Cleanups
****************************************************************
Version 2.4
- Added Github Downloader (replaces installerUpdate)
Expand Down
42 changes: 15 additions & 27 deletions turbineControl_v2/src/config/options.txt
Original file line number Diff line number Diff line change
@@ -1,27 +1,15 @@

version
2.4
rodLevel
0
backgroundColor
128
textColor
1
reactorOffAt
90
reactorOnAt
50
mainMenu
true
autoUpdate
false
lang
de
mode
auto
program
turbine
turbineTargetSpeed
1820
turbineTargetSteam
2000
{
mainMenu = true,
rodLevel = 0,
targetSpeed = 2000,
overallMode = "auto",
reactorOffAt = 80,
backgroundColor = 128,
reactorOnAt = 50,
targetSteam = 2000,
turbineTargetSpeed = 1820,
version = "2.5-beta04",
textColor = 1,
program = "turbine",
lang = "de",
}
30 changes: 10 additions & 20 deletions turbineControl_v2/src/config/touchpoint.lua
Original file line number Diff line number Diff line change
@@ -1,25 +1,15 @@
-- Reaktor- and Turbinen control by Thor_s_Crafter --
-- Version 2.4 --
-- Version 2.5 --
-- Touchpoint API by Lyqyd - Slightly changed --

local backgroundColor
local textColor
local file = fs.open("/reactor-turbine-program/config/options.txt","r")
local list = file.readAll()
file.close()

function loadOptions()
local optionList = {}
local file = fs.open("/reactor-turbine-program/config/options.txt","r")
local listElement = file.readLine()
while listElement do
table.insert(optionList,listElement)
listElement = file.readLine()
end
file.close()

backgroundColor = tonumber(optionList[7])
textColor = tonumber(optionList[9])
end

loadOptions()
--Insert Elements and assign values
optionList = textutils.unserialise(list)
backgroundColor = tonumber(optionList["backgroundColor"])
textColor = tonumber(optionList["textColor"])

local function setupLabel(buttonLen, minY, maxY, name)
local labelTable = {}
Expand Down Expand Up @@ -50,8 +40,8 @@ end
local Button = {
draw = function(self)
local old = term.redirect(self.mon)
term.setTextColor(textColor)
term.setBackgroundColor(backgroundColor)
term.setTextColor(tonumber(textColor))
term.setBackgroundColor(tonumber(backgroundColor))
term.clear()
for name, buttonData in pairs(self.buttonList) do
if buttonData.active then
Expand Down
39 changes: 18 additions & 21 deletions turbineControl_v2/src/install/github_downloader.lua
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
-- Reactor- und Turbine control by Thor_s_Crafter --
-- Betaversion downloader (GitHub) --
-- Init Program Downloader (GitHub) --


--===== Local variables =====

--Release or beta version?
local selectInstaller = "release"
local selectInstaller = ""

--Branch & Relative paths to the url and path
local installLang = ""
Expand Down Expand Up @@ -35,26 +38,31 @@ function selectBranch()
if installLang == "de" then
print("Welche Version soll geladen werden?")
print("Verfuegbar:")
print("1) master (Realeases)")
print("2) build-2.4.2 (Betatestversion)")
print("1) master (Releases)")
print("2) beta (Betaversionen)")
term.write("Eingabe (1-2): ")
elseif installLang == "en" then
print("Which version should be downloaded?")
print("Available:")
print("1) master (Realeases)")
print("2) build-2.4.2 (Betaversion)")
print("2) beta (Betaversions)")
term.write("Input (1-2): ")
end
local input = read()
if input == "1" then branch = "master"
elseif input == "2" then branch = "build-2.4.2"
if input == "1" then
branch = "master"
relUrl = "https://raw.githubusercontent.com/ThorsCrafter/Reactor-and-Turbine-control-program/"..branch.."/turbineControl_v2/src/"
releaseVersion()
elseif input == "2" then
branch = "beta"
relUrl = "https://raw.githubusercontent.com/ThorsCrafter/Reactor-and-Turbine-control-program/"..branch.."/turbineControl_v2/src/"
betaVersion()
else
if installLang == "de" then print("Ungueltige Eingabe!")
elseif installLang == "en" then print("Invalid input!") end
sleep(2)
selectBranch()
end
relUrl = "https://raw.githubusercontent.com/ThorsCrafter/Reactor-and-Turbine-control-program/"..branch.."/turbineControl_v2/src/"
end

--Removes old installations
Expand All @@ -80,7 +88,7 @@ function getURL(path)
local gotUrl = http.get(relUrl..path)
if gotUrl == nil then
clearTerm()
error("File not found! Please check, if the branch is correct!")
error("File not found! Please check!\nFailed at "..relUrl..path)
else
return gotUrl.readAll()
end
Expand Down Expand Up @@ -125,9 +133,6 @@ function clearTerm()
end

function releaseVersion()
--Set branch (relUrl) to "master"
relUrl = "https://raw.githubusercontent.com/ThorsCrafter/Reactor-and-Turbine-control-program/master/turbineControl_v2/src/"

removeAll()
--Downloads the installer
if installLang == "de" then
Expand All @@ -139,7 +144,6 @@ function releaseVersion()
end

function betaVersion()
selectBranch()
removeAll()
getFiles()
print("Done!")
Expand All @@ -149,12 +153,5 @@ end
--Run
selectLanguage()

if selectInstaller == "beta" then
betaVersion()
elseif selectInstaller == "release" then
releaseVersion()
else
error("Enter a release version! (\"beta\"/\"release\") in line 5!")
end

selectBranch()
os.reboot()
Loading

0 comments on commit c5c7557

Please sign in to comment.