forked from github/server
re-enable silver weight
Conflicts: scripts/tests/e3/rules.lua scripts/tests/faction.lua
This commit is contained in:
parent
2175dd4e0e
commit
cad154ac59
|
@ -2,7 +2,7 @@
|
||||||
<resources>
|
<resources>
|
||||||
|
|
||||||
<resource name="money">
|
<resource name="money">
|
||||||
<item weight="0"/>
|
<item weight="1"/>
|
||||||
</resource>
|
</resource>
|
||||||
|
|
||||||
<resource name="ao_healing" appearance="amulet">
|
<resource name="ao_healing" appearance="amulet">
|
||||||
|
|
|
@ -712,7 +712,7 @@ function test_golem_use_four_iron()
|
||||||
assert_equal(4, u1:get_item("towershield"))
|
assert_equal(4, u1:get_item("towershield"))
|
||||||
end
|
end
|
||||||
|
|
||||||
function skip_test_silver_weight_stops_movement()
|
function test_silver_weight_stops_movement()
|
||||||
local r1 = region.create(1, 1, "plain")
|
local r1 = region.create(1, 1, "plain")
|
||||||
local r2 = region.create(2, 1, "plain")
|
local r2 = region.create(2, 1, "plain")
|
||||||
region.create(3, 1, "plain")
|
region.create(3, 1, "plain")
|
||||||
|
@ -729,7 +729,7 @@ function skip_test_silver_weight_stops_movement()
|
||||||
assert_equal(r2, u1.region)
|
assert_equal(r2, u1.region)
|
||||||
end
|
end
|
||||||
|
|
||||||
function skip_test_silver_weight_stops_ship()
|
function test_silver_weight_stops_ship()
|
||||||
local r1 = region.create(1, 1, "ocean")
|
local r1 = region.create(1, 1, "ocean")
|
||||||
local r2 = region.create(2, 1, "ocean")
|
local r2 = region.create(2, 1, "ocean")
|
||||||
region.create(3, 1, "ocean")
|
region.create(3, 1, "ocean")
|
||||||
|
@ -771,11 +771,26 @@ function test_building_owner_can_enter_ship()
|
||||||
assert_equal(null, u1.building, "owner of the building can not go into a ship")
|
assert_equal(null, u1.building, "owner of the building can not go into a ship")
|
||||||
end
|
end
|
||||||
|
|
||||||
function test_weightless_silver()
|
function test_only_building_owner_can_set_not_paid()
|
||||||
local r1 = region.create(1, 2, "plain")
|
local r = region.create(0, 0, "plain")
|
||||||
local f1 = faction.create("noreply@eressea.de", "human", "de")
|
local f = faction.create("noreply@eressea.de", "human", "de")
|
||||||
local u1 = unit.create(f1, r1, 1)
|
local u1 = unit.create(f, r, 1)
|
||||||
assert_equal(1000, u1.weight)
|
local u2 = unit.create(f, r, 1)
|
||||||
u1:add_item("money", 540)
|
local mine = building.create(r, "mine")
|
||||||
assert_equal(1000, u1.weight)
|
mine.size = 2
|
||||||
|
u1:add_item("money", 500)
|
||||||
|
u1.building = mine
|
||||||
|
u2.building = mine
|
||||||
|
u1:clear_orders()
|
||||||
|
u2:clear_orders()
|
||||||
|
-- Test that Bezahle nicht is working
|
||||||
|
u1:add_order("Bezahle nicht")
|
||||||
|
process_orders()
|
||||||
|
assert_equal(500, u1:get_item("money"))
|
||||||
|
u1:clear_orders()
|
||||||
|
-- Test that bug fix 0001976 is working
|
||||||
|
-- Bezahle nicht is not working
|
||||||
|
u2:add_order("Bezahle nicht")
|
||||||
|
process_orders()
|
||||||
|
assert_equal(0, u1:get_item("money"))
|
||||||
end
|
end
|
||||||
|
|
|
@ -10,7 +10,8 @@ function setup()
|
||||||
}]]
|
}]]
|
||||||
eressea.config.reset()
|
eressea.config.reset()
|
||||||
assert(eressea.config.parse(conf)==0)
|
assert(eressea.config.parse(conf)==0)
|
||||||
f = faction.create("faction@eressea.de", "human", "de")
|
f = faction.create("faction@eressea.de", "human", "de")
|
||||||
|
assert(f~=nil)
|
||||||
end
|
end
|
||||||
|
|
||||||
function test_faction_flags()
|
function test_faction_flags()
|
||||||
|
|
Loading…
Reference in New Issue