widelands icon indicating copy to clipboard operation
widelands copied to clipboard

resources placed by script is found by a geologist, but a mine says no resources found

Open bunnybot opened this issue 7 months ago • 3 comments

frankystoneMirrored from Codeberg Created on Sat Jun 29 18:07:34 CEST 2024 by frankystone


If you place resources with a script, geologists find them, but placing a mine on this resources the mine says immediately "no resources found/mine depleted"

To reproduce

  1. start attached simple map resources by script.zip
  2. open the debug console and type
    r = wl.Game().map:get_field(0,62):region(12,4)
    for i, f in ipairs(r) do f.resource = "resource_stones"; f.resource_amount = 20 end
    
  3. send geologists, they will find stones
  4. place a marble mine on top of the found resources

As soon it starts to work it says "Mine depleted".

I used resource stones because a stone mine can immediately start to work (wine is available). But this happens also with other resources.

Expected behavior If a geologist finds resources a mine should also find resources.

Version:

  • OS: archlinux
  • Widelands Version: 1.3~git26670 (a5ad5d7@master) Debug
  • Enabled Add-Ons: Where are my heroes

bunnybot avatar Jun 29 '24 16:06 bunnybot