Fish and mountain ressources cannot be removed when they are on grass
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
widelands |
Fix Released
|
Medium
|
Unassigned |
Bug Description
Steps to reproduce:
- Make a new map in the editor. Add a lake and a mountain.
- Add fish ressources to the lake and mountain ressources (e.g. coal) to the mountain.
- Replace the lake and the mountain with normal terrain (e.g. grass)
Result: The ressources will stay even if the area is changed but they cannot be removed any more. The terrain has first to be changed back.
The ressources stay there when one starts a game. Miners and fishers can get them. A geologist finds them (where fish is, he finds nothing because there is nothing. A well runs only at 65%).
What should be changed:
First possibility:
- The removing of ressources should be allowed even if the terrain type does not match.
- If they are not removed, they should not be available in the game.
Second possibility:
- When the terrain type is changed, the ressources should be (temporarily) removed (like it happens to a port space when more land/water is added).
The attached map has fish on the left side and mountain ressources on the right side placed like described above. You can try it out (choose the Atlanteans for bigger mine range).
Related branches
- SirVer: Approve
- Tino: Needs Fixing
- kaputtnik (community): Needs Fixing
- TiborB: Pending requested
-
Diff: 2875 lines (+769/-768)53 files modifiedsrc/editor/map_generator.cc (+1/-1)
src/editor/tools/editor_decrease_height_tool.cc (+23/-23)
src/editor/tools/editor_decrease_height_tool.h (+8/-6)
src/editor/tools/editor_decrease_resources_tool.cc (+22/-41)
src/editor/tools/editor_decrease_resources_tool.h (+6/-6)
src/editor/tools/editor_delete_bob_tool.cc (+18/-18)
src/editor/tools/editor_delete_bob_tool.h (+6/-6)
src/editor/tools/editor_delete_immovable_tool.cc (+16/-17)
src/editor/tools/editor_delete_immovable_tool.h (+6/-6)
src/editor/tools/editor_draw_tool.cc (+18/-18)
src/editor/tools/editor_draw_tool.h (+6/-6)
src/editor/tools/editor_history.cc (+5/-5)
src/editor/tools/editor_increase_height_tool.cc (+21/-21)
src/editor/tools/editor_increase_height_tool.h (+6/-6)
src/editor/tools/editor_increase_resources_tool.cc (+25/-101)
src/editor/tools/editor_increase_resources_tool.h (+10/-9)
src/editor/tools/editor_info_tool.cc (+13/-13)
src/editor/tools/editor_info_tool.h (+3/-3)
src/editor/tools/editor_make_infrastructure_tool.cc (+5/-5)
src/editor/tools/editor_make_infrastructure_tool.h (+3/-3)
src/editor/tools/editor_noise_height_tool.cc (+23/-23)
src/editor/tools/editor_noise_height_tool.h (+6/-6)
src/editor/tools/editor_place_bob_tool.cc (+26/-26)
src/editor/tools/editor_place_bob_tool.h (+6/-6)
src/editor/tools/editor_place_immovable_tool.cc (+28/-29)
src/editor/tools/editor_place_immovable_tool.h (+6/-6)
src/editor/tools/editor_set_height_tool.cc (+26/-26)
src/editor/tools/editor_set_height_tool.h (+6/-6)
src/editor/tools/editor_set_origin_tool.cc (+14/-14)
src/editor/tools/editor_set_origin_tool.h (+6/-6)
src/editor/tools/editor_set_port_space_tool.cc (+69/-69)
src/editor/tools/editor_set_port_space_tool.h (+13/-13)
src/editor/tools/editor_set_resources_tool.cc (+61/-62)
src/editor/tools/editor_set_resources_tool.h (+19/-6)
src/editor/tools/editor_set_starting_pos_tool.cc (+12/-12)
src/editor/tools/editor_set_starting_pos_tool.h (+3/-3)
src/editor/tools/editor_set_terrain_tool.cc (+30/-30)
src/editor/tools/editor_set_terrain_tool.h (+6/-6)
src/editor/tools/editor_tool.h (+12/-12)
src/editor/ui_menus/editor_tool_change_resources_options_menu.cc (+8/-5)
src/logic/bob.h (+1/-1)
src/logic/game_controller.h (+1/-1)
src/logic/map.cc (+66/-21)
src/logic/map.h (+51/-25)
src/logic/widelands.h (+1/-0)
src/logic/worker.cc (+23/-27)
src/logic/world/world.cc (+5/-2)
src/map_io/widelands_map_loader.cc (+2/-0)
src/scripting/lua_map.cc (+7/-3)
src/ui_fsmenu/options.cc (+2/-1)
src/wui/overlay_manager.cc (+3/-1)
src/wui/overlay_manager.h (+1/-1)
test/maps/lua_testsuite.wmf/scripting/efield.lua (+5/-5)
- GunChleoc: Approve
- kaputtnik (community): Approve (correct functionality)
-
Diff: 2964 lines (+639/-590)60 files modifiedsrc/editor/CMakeLists.txt (+2/-1)
src/editor/editorinteractive.cc (+150/-101)
src/editor/editorinteractive.h (+82/-60)
src/editor/map_generator.cc (+1/-2)
src/editor/tools/editor_action_args.h (+1/-1)
src/editor/tools/editor_decrease_resources_tool.cc (+3/-4)
src/editor/tools/editor_delete_bob_tool.cc (+1/-1)
src/editor/tools/editor_delete_immovable_tool.cc (+1/-1)
src/editor/tools/editor_history.cc (+0/-9)
src/editor/tools/editor_history.h (+1/-8)
src/editor/tools/editor_increase_resources_tool.cc (+2/-3)
src/editor/tools/editor_set_origin_tool.cc (+6/-6)
src/editor/tools/editor_set_port_space_tool.cc (+2/-2)
src/editor/tools/editor_set_resources_tool.cc (+4/-38)
src/editor/tools/editor_set_resources_tool.h (+0/-11)
src/editor/tools/editor_tool.h (+1/-1)
src/editor/tools/editor_tool_action.h (+1/-1)
src/editor/ui_menus/editor_main_menu.h (+1/-1)
src/editor/ui_menus/editor_main_menu_load_map.cc (+1/-3)
src/editor/ui_menus/editor_main_menu_map_options.h (+1/-1)
src/editor/ui_menus/editor_main_menu_new_map.cc (+1/-5)
src/editor/ui_menus/editor_main_menu_new_map.h (+1/-1)
src/editor/ui_menus/editor_main_menu_random_map.cc (+1/-6)
src/editor/ui_menus/editor_main_menu_random_map.h (+1/-1)
src/editor/ui_menus/editor_player_menu.cc (+6/-6)
src/editor/ui_menus/editor_player_menu.h (+1/-1)
src/editor/ui_menus/editor_tool_change_height_options_menu.h (+1/-1)
src/editor/ui_menus/editor_tool_change_resources_options_menu.cc (+2/-2)
src/editor/ui_menus/editor_tool_change_resources_options_menu.h (+1/-1)
src/editor/ui_menus/editor_tool_menu.cc (+34/-34)
src/editor/ui_menus/editor_tool_menu.h (+1/-1)
src/editor/ui_menus/editor_tool_noise_height_options_menu.h (+1/-1)
src/editor/ui_menus/editor_tool_options_menu.cc (+1/-1)
src/editor/ui_menus/editor_tool_place_immovable_options_menu.h (+1/-1)
src/editor/ui_menus/editor_tool_set_terrain_options_menu.h (+1/-1)
src/editor/ui_menus/editor_toolsize_menu.cc (+1/-1)
src/editor/ui_menus/editor_toolsize_menu.h (+1/-1)
src/logic/field.h (+1/-9)
src/logic/map.cc (+55/-19)
src/logic/map.h (+24/-6)
src/logic/map_objects/tribes/production_program.cc (+1/-2)
src/logic/map_objects/tribes/worker.cc (+2/-4)
src/logic/player.cc (+3/-3)
src/logic/player.h (+2/-1)
src/map_io/map_resources_packet.cc (+3/-2)
src/map_io/s2map.cc (+11/-11)
src/notifications/note_ids.h (+2/-1)
src/scripting/lua_map.cc (+14/-11)
src/ui_basic/panel.h (+2/-1)
src/wui/field_overlay_manager.cc (+6/-0)
src/wui/field_overlay_manager.h (+4/-0)
src/wui/fieldaction.cc (+3/-4)
src/wui/interactive_base.cc (+116/-124)
src/wui/interactive_base.h (+35/-35)
src/wui/interactive_gamebase.cc (+4/-4)
src/wui/interactive_gamebase.h (+1/-1)
src/wui/interactive_player.cc (+13/-13)
src/wui/interactive_spectator.cc (+12/-12)
test/maps/lua_testsuite.wmf/scripting/efield.lua (+1/-1)
test/maps/lua_testsuite.wmf/scripting/gfield.lua (+7/-6)
Changed in widelands: | |
status: | New → Confirmed |
Changed in widelands: | |
status: | Incomplete → Confirmed |
milestone: | none → build19-rc1 |
importance: | Undecided → Medium |
Changed in widelands: | |
status: | Incomplete → In Progress |
Changed in widelands: | |
assignee: | TiborB (tiborb95) → nobody |
Changed in widelands: | |
assignee: | nobody → Janosch Peters (janosch-peters) |
Changed in widelands: | |
status: | In Progress → Fix Committed |
Changed in widelands: | |
status: | Confirmed → In Progress |
Changed in widelands: | |
status: | In Progress → Fix Committed |
Changed in widelands: | |
assignee: | SirVer (sirver) → nobody |
Changed in widelands: | |
status: | Fix Committed → Fix Released |
+1 for removing incompatible resources when changing terrain type