Ships should be supported in Lua scripting
Bug #1380287 reported by
wl-zocker
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
widelands |
Fix Released
|
Wishlist
|
TiborB |
Bug Description
For a start, the following functions are desirable:
- plr:get_ships() or plr:get_
- a ship.state that tells what the ship is doing (idle, expedition, transport_wares etc.)
They are needed in the seafaring tutorial.
- sending the ship into a direction
This could be used in emp01.wmf to show the ship driving.
Related branches
lp:~widelands-dev/widelands/bug-1380287
- SirVer: Needs Fixing
- GunChleoc: Approve
-
Diff: 1463 lines (+610/-173)23 files modifiedsrc/ai/ai_help_structs.h (+1/-1)
src/ai/defaultai.cc (+4/-4)
src/economy/portdock.cc (+1/-2)
src/logic/game.cc (+2/-2)
src/logic/game.h (+3/-2)
src/logic/playercommand.cc (+10/-10)
src/logic/playercommand.h (+5/-5)
src/logic/ship.cc (+41/-26)
src/logic/ship.h (+16/-6)
src/logic/walkingdir.cc (+42/-42)
src/logic/walkingdir.h (+3/-3)
src/scripting/lua_game.cc (+37/-0)
src/scripting/lua_game.h (+1/-0)
src/scripting/lua_map.cc (+273/-9)
src/scripting/lua_map.h (+10/-1)
src/wui/shipwindow.cc (+8/-8)
test/maps/expedition.wmf/scripting/init.lua (+15/-30)
test/maps/expedition.wmf/scripting/test_ship_movement_controls.lua (+115/-0)
test/maps/expedition.wmf/scripting/test_starting_and_immediately_canceling.lua (+6/-2)
test/maps/expedition.wmf/scripting/test_starting_wait_a_while_cancel.lua (+2/-2)
test/maps/ship_transportation.wmf/scripting/init.lua (+0/-17)
test/maps/ship_transportation.wmf/scripting/test_rip_portdock_with_worker_and_ware_in_transit.lua (+3/-1)
test/maps/ship_transportation.wmf/scripting/test_rip_second_port_with_worker_in_portdock.lua (+12/-0)
description: | updated |
Changed in widelands: | |
status: | Expired → Confirmed |
importance: | Undecided → Wishlist |
Changed in widelands: | |
milestone: | none → build19-rc1 |
Changed in widelands: | |
status: | Fix Committed → Fix Released |
To post a comment you must log in.
It seems there is not data structure that keeps info about all ships of the player, or is there?