forked from github/server
Merge pull request #256 from badgerman/bug-1965-packice-buildings
Bug 1965: cannot create new buildings on packice
This commit is contained in:
commit
5d150248dd
2 changed files with 33 additions and 8 deletions
16
.travis.yml
16
.travis.yml
|
@ -1,16 +1,16 @@
|
||||||
language: c
|
language: c
|
||||||
compiler:
|
compiler:
|
||||||
- gcc
|
- gcc
|
||||||
- clang
|
- clang
|
||||||
before_install:
|
before_install:
|
||||||
- sudo apt-get update -qq
|
- sudo apt-get update -qq
|
||||||
install:
|
install:
|
||||||
- sudo apt-get install -qq zlib1g-dev libtolua-dev liblua5.1-dev libncurses5-dev libsqlite3-dev libxml2-dev valgrind clang
|
- sudo apt-get install -qq zlib1g-dev libtolua-dev liblua5.1-dev libncurses5-dev libsqlite3-dev libxml2-dev valgrind clang
|
||||||
script:
|
script:
|
||||||
- s/travis-build
|
- s/travis-build
|
||||||
os:
|
os:
|
||||||
- linux
|
- linux
|
||||||
- osx
|
- osx
|
||||||
notifications:
|
notifications:
|
||||||
slack:
|
slack:
|
||||||
secure: F89aXLWaE125PaJIlETv12jT4EfH6wLXJmGCPZzrN3OcLn2ahDWqjwuzR7lOEDf2nAISmeMPyDZMhEHXLNHAE5qP6lg9yliYQw5hzGmDK9m1xUq/pPEne/b2Y7K3my1mkRZ6n3asbHgSmBWAfCIk1JN8R5Rv+rmbLuWLc+zofts=
|
secure: F89aXLWaE125PaJIlETv12jT4EfH6wLXJmGCPZzrN3OcLn2ahDWqjwuzR7lOEDf2nAISmeMPyDZMhEHXLNHAE5qP6lg9yliYQw5hzGmDK9m1xUq/pPEne/b2Y7K3my1mkRZ6n3asbHgSmBWAfCIk1JN8R5Rv+rmbLuWLc+zofts=
|
|
@ -25,3 +25,28 @@ function test_small_castles()
|
||||||
assert_equal("site", b:get_typename(9))
|
assert_equal("site", b:get_typename(9))
|
||||||
assert_equal("fortification", b:get_typename(10))
|
assert_equal("fortification", b:get_typename(10))
|
||||||
end
|
end
|
||||||
|
|
||||||
|
function test_build_normal()
|
||||||
|
local r = region.create(0, 0, "plain")
|
||||||
|
local f = faction.create("noreply@eressea.de", "human", "de")
|
||||||
|
local u = unit.create(f, r, 1)
|
||||||
|
u:clear_orders()
|
||||||
|
u:add_item("stone", 10)
|
||||||
|
u:set_skill("building", 10)
|
||||||
|
u:add_order("MACHE BURG")
|
||||||
|
process_orders()
|
||||||
|
assert_not_nil(u.building)
|
||||||
|
assert_equal(10, u.building.size)
|
||||||
|
end
|
||||||
|
|
||||||
|
function test_build_packice()
|
||||||
|
local r = region.create(0, 0, "packice")
|
||||||
|
local f = faction.create("noreply@eressea.de", "human", "de")
|
||||||
|
local u = unit.create(f, r, 1)
|
||||||
|
u:clear_orders()
|
||||||
|
u:add_item("stone", 10)
|
||||||
|
u:set_skill("building", 10)
|
||||||
|
u:add_order("MACHE BURG")
|
||||||
|
process_orders()
|
||||||
|
assert_equal(nil, u.building)
|
||||||
|
end
|
||||||
|
|
Loading…
Reference in a new issue