diff --git a/binaries/data/mods/official/entities/foundation_field.xml b/binaries/data/mods/official/entities/foundation_field.xml index ae820fb05f..d7479c4799 100644 --- a/binaries/data/mods/official/entities/foundation_field.xml +++ b/binaries/data/mods/official/entities/foundation_field.xml @@ -4,14 +4,14 @@ - Foundation 6x6 + Foundation Field Foundation - 28.0 - 28.0 + 10.0 + 10.0 8.0 @@ -20,7 +20,7 @@ - - structures/plot_field_fallow.xml + + structures/plot_field_found.xml \ No newline at end of file diff --git a/binaries/data/mods/official/entities/template_structure_resource_field.xml b/binaries/data/mods/official/entities/template_structure_resource_field.xml index 158f212de1..654575d434 100644 --- a/binaries/data/mods/official/entities/template_structure_resource_field.xml +++ b/binaries/data/mods/official/entities/template_structure_resource_field.xml @@ -49,6 +49,10 @@ food grain + + + 9 + diff --git a/binaries/data/mods/official/scripts/entity_functions.js b/binaries/data/mods/official/scripts/entity_functions.js index 9d52fb890f..5887d26a2a 100644 --- a/binaries/data/mods/official/scripts/entity_functions.js +++ b/binaries/data/mods/official/scripts/entity_functions.js @@ -1090,6 +1090,13 @@ function entityEventTargetExhausted( evt ) } else if( evt.action == ACTION_BUILD ) { + // If the target was gatherable, try to gather it. + if( canGather(this, evt.target) ) + { + this.order( ORDER_GENERIC, evt.target, ACTION_GATHER ); + return; + } + // Look for other stuff to build var visible = this.getVisibleEntities(); var bestDist = 1e20; @@ -1110,10 +1117,12 @@ function entityEventTargetExhausted( evt ) if( bestTarget != null ) { this.order( ORDER_GENERIC, bestTarget, ACTION_BUILD ); + return; } - else if( evt.target.hasClass("Village") ) + + // Nothing to build, but try to gather any resource around us if this was a village object. + if( evt.target.hasClass("Village") ) { - // Nothing to build, but try to gather any resource around us this.chooseGatherTarget( null, evt.target.getVisibleEntities() ); } }