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

Commit c5c7557

Browse files
authored
Merge pull request #16 from ThorsCrafter/beta
Release 2.5
2 parents 2b343d1 + f76acdc commit c5c7557

File tree

16 files changed

+568
-329
lines changed

16 files changed

+568
-329
lines changed

.idea/.gitignore

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

README.md

Lines changed: 45 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,45 @@
1-
# Reactor-and-Turbine-control-program
2-
This is my Reactor- and Turbine control program for ComputerCraft and BigReactors
1+
# Reactor and Turbine control program
2+
***Description:***
3+
4+
This is my Reactor- and Turbine control program for ComputerCraft and BigReactors.
5+
The following list shows the features of the program:
6+
- Control up to 32 Turbines (per Reactor)
7+
- Supports multiple languages (currently English and German)
8+
- Automatic and manual Control of Reactor and attached Turbines
9+
- Energy-based automatic Control
10+
- Switches Reactor and Turbines on/off if energy level is low/high
11+
- Supports multiple Energy Storage typesm like Capacitorbanks (EnderIO), Energy Core (Draconic Evolution), etc.
12+
- Large option menu
13+
- Change Background and Text Color
14+
- Set energy level for activating/deactivating the reactor
15+
- Set Reactor Steam Output Level
16+
17+
## How To Install
18+
- Set up a Computer, connect all parts (Reactor, Energy Storage, Turbines) with ***Wired Modems***
19+
- ***Activate*** all modems
20+
- Type in the following into the computer:
21+
22+
```
23+
pastebin get HMtbgkwt git
24+
git
25+
```
26+
27+
- Then follow the install instructions
28+
29+
## Have a look at my Update Videos on YouTube
30+
- Current version (2.4):
31+
- https://www.youtube.com/watch?v=UnPru3xhrjo (English)
32+
- https://www.youtube.com/watch?v=XNlsU0tSHOc&t=1s (German)
33+
34+
35+
## Do you want to help me developing the program?
36+
- Use my beta versions!
37+
- Report bugs and send me suggestions for new features
38+
39+
##
40+
41+
42+
### *Have fun! Thanks for using my program!*
43+
44+
45+

turbineControl_v2/src/beta.ver

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
2.5-beta

turbineControl_v2/src/changelog/changelogDE.txt

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,22 @@
11
****************************************************************
22
-- Reaktor- und Turbinenprogramm von Thor_s_Crafter --
33
-- Komplettes Changelog --
4-
-- Aktuelle Version: 2.4 --
4+
-- Aktuelle Version: 2.5 --
5+
****************************************************************
6+
Version 2.5
7+
- Automatische Updates implementiert
8+
- Git Downloader & Installer Updates
9+
- Readme in Github aktualisiert
10+
- Optionen Reworks
11+
- Energiespeicher werden nun anhand der Methode
12+
getEnergyStored() erkannt
13+
- Bugfixes:
14+
> Anzeigebugs
15+
> Event Handling Fixes
16+
> Buttons
17+
> Hauptmenue Bugs
18+
> Start Bugs
19+
> Eine Menge Code-Cleanups
520
****************************************************************
621
Version 2.4
722
- Github Downloader hinzugefuegt (ersetzt installerUpdate)

turbineControl_v2/src/changelog/changelogEn.txt

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,22 @@
11
****************************************************************
22
-- Reactor- und Turbine control by Thor_s_Crafter --
33
-- Complete Changelog --
4-
-- Current Version: 2.4 --
4+
-- Current Version: 2.5 --
5+
****************************************************************
6+
Version 2.5
7+
- Reimplemented automatic updates
8+
- Git Downloader & Installer Updates
9+
- Updated Readme in Github
10+
- Option Reworks
11+
- Energy Storage is now being detected by the function
12+
getEnergyStored()
13+
- Bugfixes:
14+
> Visual Bugfixes
15+
> Event Handling Fixes
16+
> Buttons
17+
> Hauptmenu Bugs
18+
> Start Bugs
19+
> Lots of Code-Cleanups
520
****************************************************************
621
Version 2.4
722
- Added Github Downloader (replaces installerUpdate)
Lines changed: 15 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,15 @@
1-
2-
version
3-
2.4
4-
rodLevel
5-
0
6-
backgroundColor
7-
128
8-
textColor
9-
1
10-
reactorOffAt
11-
90
12-
reactorOnAt
13-
50
14-
mainMenu
15-
true
16-
autoUpdate
17-
false
18-
lang
19-
de
20-
mode
21-
auto
22-
program
23-
turbine
24-
turbineTargetSpeed
25-
1820
26-
turbineTargetSteam
27-
2000
1+
{
2+
mainMenu = true,
3+
rodLevel = 0,
4+
targetSpeed = 2000,
5+
overallMode = "auto",
6+
reactorOffAt = 80,
7+
backgroundColor = 128,
8+
reactorOnAt = 50,
9+
targetSteam = 2000,
10+
turbineTargetSpeed = 1820,
11+
version = "2.5-beta04",
12+
textColor = 1,
13+
program = "turbine",
14+
lang = "de",
15+
}

turbineControl_v2/src/config/touchpoint.lua

Lines changed: 10 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,15 @@
11
-- Reaktor- and Turbinen control by Thor_s_Crafter --
2-
-- Version 2.4 --
2+
-- Version 2.5 --
33
-- Touchpoint API by Lyqyd - Slightly changed --
44

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

8-
function loadOptions()
9-
local optionList = {}
10-
local file = fs.open("/reactor-turbine-program/config/options.txt","r")
11-
local listElement = file.readLine()
12-
while listElement do
13-
table.insert(optionList,listElement)
14-
listElement = file.readLine()
15-
end
16-
file.close()
17-
18-
backgroundColor = tonumber(optionList[7])
19-
textColor = tonumber(optionList[9])
20-
end
21-
22-
loadOptions()
9+
--Insert Elements and assign values
10+
optionList = textutils.unserialise(list)
11+
backgroundColor = tonumber(optionList["backgroundColor"])
12+
textColor = tonumber(optionList["textColor"])
2313

2414
local function setupLabel(buttonLen, minY, maxY, name)
2515
local labelTable = {}
@@ -50,8 +40,8 @@ end
5040
local Button = {
5141
draw = function(self)
5242
local old = term.redirect(self.mon)
53-
term.setTextColor(textColor)
54-
term.setBackgroundColor(backgroundColor)
43+
term.setTextColor(tonumber(textColor))
44+
term.setBackgroundColor(tonumber(backgroundColor))
5545
term.clear()
5646
for name, buttonData in pairs(self.buttonList) do
5747
if buttonData.active then

turbineControl_v2/src/install/github_downloader.lua

Lines changed: 18 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,11 @@
11
-- Reactor- und Turbine control by Thor_s_Crafter --
2-
-- Betaversion downloader (GitHub) --
2+
-- Init Program Downloader (GitHub) --
3+
4+
5+
--===== Local variables =====
36

47
--Release or beta version?
5-
local selectInstaller = "release"
8+
local selectInstaller = ""
69

710
--Branch & Relative paths to the url and path
811
local installLang = ""
@@ -35,26 +38,31 @@ function selectBranch()
3538
if installLang == "de" then
3639
print("Welche Version soll geladen werden?")
3740
print("Verfuegbar:")
38-
print("1) master (Realeases)")
39-
print("2) build-2.4.2 (Betatestversion)")
41+
print("1) master (Releases)")
42+
print("2) beta (Betaversionen)")
4043
term.write("Eingabe (1-2): ")
4144
elseif installLang == "en" then
4245
print("Which version should be downloaded?")
4346
print("Available:")
4447
print("1) master (Realeases)")
45-
print("2) build-2.4.2 (Betaversion)")
48+
print("2) beta (Betaversions)")
4649
term.write("Input (1-2): ")
4750
end
4851
local input = read()
49-
if input == "1" then branch = "master"
50-
elseif input == "2" then branch = "build-2.4.2"
52+
if input == "1" then
53+
branch = "master"
54+
relUrl = "https://raw.githubusercontent.com/ThorsCrafter/Reactor-and-Turbine-control-program/"..branch.."/turbineControl_v2/src/"
55+
releaseVersion()
56+
elseif input == "2" then
57+
branch = "beta"
58+
relUrl = "https://raw.githubusercontent.com/ThorsCrafter/Reactor-and-Turbine-control-program/"..branch.."/turbineControl_v2/src/"
59+
betaVersion()
5160
else
5261
if installLang == "de" then print("Ungueltige Eingabe!")
5362
elseif installLang == "en" then print("Invalid input!") end
5463
sleep(2)
5564
selectBranch()
5665
end
57-
relUrl = "https://raw.githubusercontent.com/ThorsCrafter/Reactor-and-Turbine-control-program/"..branch.."/turbineControl_v2/src/"
5866
end
5967

6068
--Removes old installations
@@ -80,7 +88,7 @@ function getURL(path)
8088
local gotUrl = http.get(relUrl..path)
8189
if gotUrl == nil then
8290
clearTerm()
83-
error("File not found! Please check, if the branch is correct!")
91+
error("File not found! Please check!\nFailed at "..relUrl..path)
8492
else
8593
return gotUrl.readAll()
8694
end
@@ -125,9 +133,6 @@ function clearTerm()
125133
end
126134

127135
function releaseVersion()
128-
--Set branch (relUrl) to "master"
129-
relUrl = "https://raw.githubusercontent.com/ThorsCrafter/Reactor-and-Turbine-control-program/master/turbineControl_v2/src/"
130-
131136
removeAll()
132137
--Downloads the installer
133138
if installLang == "de" then
@@ -139,7 +144,6 @@ function releaseVersion()
139144
end
140145

141146
function betaVersion()
142-
selectBranch()
143147
removeAll()
144148
getFiles()
145149
print("Done!")
@@ -149,12 +153,5 @@ end
149153
--Run
150154
selectLanguage()
151155

152-
if selectInstaller == "beta" then
153-
betaVersion()
154-
elseif selectInstaller == "release" then
155-
releaseVersion()
156-
else
157-
error("Enter a release version! (\"beta\"/\"release\") in line 5!")
158-
end
159-
156+
selectBranch()
160157
os.reboot()

0 commit comments

Comments
 (0)