[0.16.51] Possible typo in decoratives.lua

This subforum contains all the issues which we already resolved.
Post Reply
Allaizn
Former Staff
Former Staff
Posts: 90
Joined: Sat Mar 03, 2018 12:07 pm
Contact:

[0.16.51] Possible typo in decoratives.lua

Post by Allaizn »

I took a deep look into many of the base mod luas while trying to understand how rocks are generated, and I think I found a possible typo in \data\base\prototypes\decorative\decoratives.lua

Code: Select all

    local aux_center = (rectangle[2][1] + rectangle[1][1]) / 2
    local aux_range = math.abs(rectangle[2][1] - rectangle[1][1]) / 2
    local water_center = (rectangle[2][2] + rectangle[1][2]) / 2
    local water_range = math.abs(rectangle[2][2] - rectangle[1][2]) / 2

    peak["aux_optimal"] = aux_center
    peak["aux_range"] = aux_range
    peak["aux_max_range"] = water_range + 0.05

    peak["water_optimal"] = water_center
    peak["water_range"] = water_range
    peak["water_max_range"] = water_range + 0.05
It seems illogical that "aus_max_range" is based on "water_range" instead of "aux_range", especially since the current implementation could result in "max_aux_range" being smaller than "aux_range".

kovarex
Factorio Staff
Factorio Staff
Posts: 8078
Joined: Wed Feb 06, 2013 12:00 am
Contact:

Re: [0.16.51] Possible typo in decoratives.lua

Post by kovarex »

This is probably obsolete now.

Post Reply

Return to “Resolved Problems and Bugs”