fix: deterministic behaviour for radar by storing the random fractions when generating rd.json (#372)
* Store the random blip positions when generating rd.json Fixes: https://github.com/AOEpeople/aoe_technology_radar/issues/148 Simple solution to creating stable blips is to store the randomly generated angle and radius in rg.json. Attempted a few hash functions but found it hard to spread blips 'nicely' (they tended to clump into groups or sections of the radar). * distribute points within .1 and .9 of the arc --------- Co-authored-by: Bastian Ike <bastian.ike@bare.id>
This commit is contained in:
@@ -199,6 +199,8 @@ var addRevisionToItem = function (item, revision) {
|
||||
quadrant: "",
|
||||
body: "",
|
||||
info: "",
|
||||
angleFraction: Math.random(),
|
||||
radiusFraction: Math.random()
|
||||
}; }
|
||||
var newItem = __assign(__assign(__assign({}, item), revision), { body: ignoreEmptyRevisionBody(revision, item) });
|
||||
if (revisionCreatesNewHistoryEntry(revision, item)) {
|
||||
|
||||
Reference in New Issue
Block a user