Code: Select all
local path_request
local path_args = {
bounding_box = bounding_box,
collision_mask = vehicle.prototype.collision_mask or {},
start = vehicle.position,
goal = goal,
force = vehicle.force,
radius = radius,
entity_to_ignore = vehicle,
can_open_gates = true,
pathfind_flags = {
allow_destroy_friendly_entities = false,
cache = false,
prefer_straight_paths = true,
low_priority = false,
},
}
path_request = vehicle.surface.request_path(path_args)
Code: Select all
path_args.can_open_gates = false
path_request = vehicle.surface.request_path(path_args)
Question: Given that no parameters except for path_args.goal have changed, is there a guarantee that both path requests return the same path iff there are no gates between vehicle.position and path_args.goal?