Improved reactor adjustment steps
Improved exit for CC scripts
This commit is contained in:
parent
e9d2fb1492
commit
f6087f5320
4 changed files with 14 additions and 12 deletions
|
@ -486,22 +486,22 @@ function reactor_key(keycode)
|
|||
data_save()
|
||||
return true
|
||||
elseif keycode == 34 then -- G
|
||||
data.reactor_rate = data.reactor_rate / 10
|
||||
data.reactor_rate = data.reactor_rate - 1000
|
||||
reactor_setMode()
|
||||
data_save()
|
||||
return true
|
||||
elseif keycode == 20 then -- T
|
||||
data.reactor_rate = data.reactor_rate * 10
|
||||
data.reactor_rate = data.reactor_rate + 1000
|
||||
reactor_setMode()
|
||||
data_save()
|
||||
return true
|
||||
elseif keycode == 36 then -- J
|
||||
data.reactor_laserAmount = data.reactor_laserAmount / 10
|
||||
data.reactor_laserAmount = data.reactor_laserAmount - 500
|
||||
reactor_setLaser()
|
||||
data_save()
|
||||
return true
|
||||
elseif keycode == 22 then -- U
|
||||
data.reactor_laserAmount = data.reactor_laserAmount * 10
|
||||
data.reactor_laserAmount = data.reactor_laserAmount + 500
|
||||
reactor_setLaser()
|
||||
data_save()
|
||||
return true
|
||||
|
|
|
@ -1205,22 +1205,22 @@ function reactor_key(keycode)
|
|||
data_save()
|
||||
return true
|
||||
elseif keycode == 34 then -- G
|
||||
data.reactor_rate = data.reactor_rate / 10
|
||||
data.reactor_rate = data.reactor_rate - 1000
|
||||
reactor_setMode()
|
||||
data_save()
|
||||
return true
|
||||
elseif keycode == 20 then -- T
|
||||
data.reactor_rate = data.reactor_rate * 10
|
||||
data.reactor_rate = data.reactor_rate + 1000
|
||||
reactor_setMode()
|
||||
data_save()
|
||||
return true
|
||||
elseif keycode == 36 then -- J
|
||||
data.reactor_laserAmount = data.reactor_laserAmount / 10
|
||||
data.reactor_laserAmount = data.reactor_laserAmount - 500
|
||||
reactor_setLaser()
|
||||
data_save()
|
||||
return true
|
||||
elseif keycode == 22 then -- U
|
||||
data.reactor_laserAmount = data.reactor_laserAmount * 10
|
||||
data.reactor_laserAmount = data.reactor_laserAmount + 500
|
||||
reactor_setLaser()
|
||||
data_save()
|
||||
return true
|
||||
|
@ -2069,6 +2069,7 @@ repeat
|
|||
if eventName == "key" then
|
||||
keycode = params[2]
|
||||
if char == 88 or char == 120 or keycode == 45 then -- x for eXit
|
||||
os.pullEventRaw()
|
||||
abort = true
|
||||
elseif char == 48 or keycode == 11 or keycode == 82 then -- 0
|
||||
page = connections_page
|
||||
|
|
|
@ -950,6 +950,7 @@ repeat
|
|||
if eventName == "key" then
|
||||
keycode = params[2]
|
||||
if char == 88 or char == 120 or keycode == 45 then -- x for eXit
|
||||
os.pullEventRaw()
|
||||
abort = true
|
||||
elseif char == 48 or keycode == 11 or keycode == 82 then -- 0
|
||||
page = connections_page
|
||||
|
|
|
@ -442,22 +442,22 @@ function reactor_key(char, keycode)
|
|||
data_save()
|
||||
return true
|
||||
elseif char == 71 or char == 103 then -- G
|
||||
data.reactor_rate = data.reactor_rate / 10
|
||||
data.reactor_rate = data.reactor_rate - 1000
|
||||
reactor_setMode()
|
||||
data_save()
|
||||
return true
|
||||
elseif char == 84 or char == 116 then -- T
|
||||
data.reactor_rate = data.reactor_rate * 10
|
||||
data.reactor_rate = data.reactor_rate + 1000
|
||||
reactor_setMode()
|
||||
data_save()
|
||||
return true
|
||||
elseif char == 74 or char == 106 then -- J
|
||||
data.reactor_laserAmount = data.reactor_laserAmount / 10
|
||||
data.reactor_laserAmount = data.reactor_laserAmount - 500
|
||||
reactor_setLaser()
|
||||
data_save()
|
||||
return true
|
||||
elseif char == 85 or char == 117 then -- U
|
||||
data.reactor_laserAmount = data.reactor_laserAmount * 10
|
||||
data.reactor_laserAmount = data.reactor_laserAmount + 500
|
||||
reactor_setLaser()
|
||||
data_save()
|
||||
return true
|
||||
|
|
Loading…
Reference in a new issue