forked from github/server
Server startet eressea.lua, nicht default.lua
Das crasht allerdings momentan bei einem Gebäude!
This commit is contained in:
parent
65ba2505a7
commit
36d1956c12
|
@ -18,19 +18,6 @@ function write_emails()
|
|||
end
|
||||
end
|
||||
|
||||
function run_scripts()
|
||||
scripts = {
|
||||
"xmas2004.lua"
|
||||
}
|
||||
for index in scripts do
|
||||
local script = scriptpath .. "/" .. scripts[index]
|
||||
print("- loading " .. script)
|
||||
if pcall(dofile, script)==0 then
|
||||
print("Could not load " .. script)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
function process(orders)
|
||||
file = "" .. get_turn()
|
||||
if read_game(file)~=0 then
|
||||
|
@ -49,9 +36,6 @@ function process(orders)
|
|||
read_orders(orders)
|
||||
plan_monsters()
|
||||
|
||||
-- load scripts:
|
||||
run_scripts()
|
||||
|
||||
--
|
||||
process_orders()
|
||||
|
||||
|
|
|
@ -1,3 +1,19 @@
|
|||
function run_scripts()
|
||||
scripts = {
|
||||
"wedding-jadee.lua",
|
||||
"eternath.lua",
|
||||
"ponnuki.lua",
|
||||
"xmas2004.lua"
|
||||
}
|
||||
for index in scripts do
|
||||
local script = scriptpath .. "/" .. scripts[index]
|
||||
print("- loading " .. script)
|
||||
if pcall(dofile, script)==0 then
|
||||
print("Could not load " .. script)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
function write_emails()
|
||||
local locales = { "de", "en" }
|
||||
local files = {}
|
||||
|
@ -32,15 +48,10 @@ function process(orders)
|
|||
add_equipment("stone", 30);
|
||||
add_equipment("money", 2000 + get_turn() * 10);
|
||||
|
||||
-- initialize other scripts
|
||||
local magrathea = get_region(-67, -5)
|
||||
if magrathea~=nil and init_ponnuki~=nil then
|
||||
init_ponnuki(magrathea)
|
||||
return
|
||||
end
|
||||
|
||||
-- run the turn:
|
||||
read_orders(orders)
|
||||
run_scripts()
|
||||
|
||||
plan_monsters()
|
||||
process_orders()
|
||||
|
||||
|
@ -61,22 +72,10 @@ end
|
|||
-- main body of script
|
||||
--
|
||||
|
||||
scripts = {
|
||||
"wedding-jadee.lua",
|
||||
"eternath.lua",
|
||||
"ponnuki.lua"
|
||||
}
|
||||
|
||||
-- orderfile: contains the name of the orders.
|
||||
if orderfile==nil then
|
||||
print "you must specify an orderfile"
|
||||
else
|
||||
for index in scripts do
|
||||
local script = scriptpath .. scripts[index]
|
||||
if pcall(dofile, script)==0 then
|
||||
print("Could not load " .. script)
|
||||
end
|
||||
end
|
||||
process(orderfile)
|
||||
end
|
||||
|
||||
|
|
|
@ -17,7 +17,7 @@ function ponnuki_brain(u)
|
|||
u:add_order("NACH " .. directions[d])
|
||||
end
|
||||
|
||||
function init_ponnuki(home)
|
||||
local function init_ponnuki(home)
|
||||
local f = get_faction(0)
|
||||
local u = get_unit(atoi36("ponn"))
|
||||
if u == nil then
|
||||
|
@ -32,3 +32,11 @@ function init_ponnuki(home)
|
|||
u:set_brain(ponnuki_brain)
|
||||
end
|
||||
end
|
||||
|
||||
-- initialize other scripts
|
||||
local magrathea = get_region(-67, -5)
|
||||
if magrathea~=nil and init_ponnuki~=nil then
|
||||
init_ponnuki(magrathea)
|
||||
return
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in New Issue