add basic station select
This commit is contained in:
parent
175baab4b9
commit
ab11ccccd1
40
src/spacer.jl
Normal file → Executable file
40
src/spacer.jl
Normal file → Executable file
@ -1,3 +1,43 @@
|
|||||||
#!/usr/bin/julia
|
#!/usr/bin/julia
|
||||||
|
using TerminalMenus
|
||||||
|
include("../lib/io.jl")
|
||||||
|
|
||||||
|
function sectors()
|
||||||
|
local sector1 = ["Moon Plaza", "Hoover", "Mir", "Aloomis", "Caldari"]
|
||||||
|
local defMessage = "You have not moved"
|
||||||
|
return sector1
|
||||||
|
end
|
||||||
|
|
||||||
|
function stations(stationName)
|
||||||
|
|
||||||
|
if stationName == "Mir"
|
||||||
|
println("You arrive at Mir")
|
||||||
|
|
||||||
|
elseif stationName == "Hoover"
|
||||||
|
println("You have arrived at Hoover")
|
||||||
|
|
||||||
|
elseif stationName == "Aloomis"
|
||||||
|
println("You have arrived in Aloonis")
|
||||||
|
|
||||||
|
elseif stationName == "Caldari"
|
||||||
|
println("You have arrived in Caldari")
|
||||||
|
|
||||||
|
elseif stationName == "Moon Plaza"
|
||||||
|
println("You have arrived at Moon Plaza")
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
|
sector = sectors()
|
||||||
|
|
||||||
|
menu = RadioMenu(sector, pagesize=10)
|
||||||
|
|
||||||
|
println("You are in sector 1")
|
||||||
|
choice = request("Warp to Station: ", menu)
|
||||||
|
|
||||||
|
if choice != -1
|
||||||
|
stations(sector[choice])
|
||||||
|
|
||||||
|
else
|
||||||
|
println("Cancelled")
|
||||||
|
end
|
||||||
|
Loading…
x
Reference in New Issue
Block a user