show silver, gold and peridot by their ore maps
The pick reads them from ore inside quartz and olivine deposits, which are not placed yet, so for them the Minerals list shows the ore map instead, marked as such: the overlay, Find nearest and the cursor work on its value in sevenths, and the probe lists them on a line of their own. Their maps already match the save. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -303,7 +303,8 @@
|
||||
(return out))
|
||||
|
||||
;;; The mineral tile: per sample, MINERAL-VALUE-BASE plus the category
|
||||
;;; of the pick's reading there.
|
||||
;;; of the pick's reading there, or of the ore map where the pick can't
|
||||
;;; read the mineral; that needs neither heights nor strata.
|
||||
(fn render-minerals ((tr (* terra)) (rocks (* strata)) (o (* ores)) (k tile-key) (size (* int)))
|
||||
(* u8)
|
||||
(var res int (. k stratum))
|
||||
@@ -313,6 +314,7 @@
|
||||
(var out (* u8) (malloc (* res res)))
|
||||
(var heights [u16 1024])
|
||||
(var column (* u8) (malloc (+ (. tr size-y) 1)))
|
||||
(var readable bool (. [(. o minerals) (. k param)] readable))
|
||||
(var per-chunk int (/ 32 step))
|
||||
(if (< per-chunk 1) (= per-chunk 1))
|
||||
(for (var cz int 0) (< cz 16) (++ cz)
|
||||
@@ -321,17 +323,21 @@
|
||||
(continue))
|
||||
(var chunk-x int (+ (* (. k rx) 16) cx))
|
||||
(var chunk-z int (+ (* (. k rz) 16) cz))
|
||||
(terra/chunk-heights tr chunk-x chunk-z (if (> step 32) 32 step) heights)
|
||||
(if readable
|
||||
(terra/chunk-heights tr chunk-x chunk-z (if (> step 32) 32 step) heights))
|
||||
(for (var dz int 0) (< dz per-chunk) (++ dz)
|
||||
(for (var dx int 0) (< dx per-chunk) (++ dx)
|
||||
(var lx int (* dx step))
|
||||
(var lz int (* dz step))
|
||||
(var h int [heights (+ (* lz 32) lx)])
|
||||
(strata/column rocks chunk-x chunk-z lx lz h column)
|
||||
(var r mineral-reading (ores/reading o (. k param) (& map) (+ (* chunk-x 32) lx)
|
||||
(+ (* chunk-z 32) lz) column h))
|
||||
(var h int 0)
|
||||
(if readable
|
||||
(do
|
||||
(= h [heights (+ (* lz 32) lx)])
|
||||
(strata/column rocks chunk-x chunk-z lx lz h column)))
|
||||
(var c int (ores/category-at o (. k param) (& map) (+ (* chunk-x 32) lx)
|
||||
(+ (* chunk-z 32) lz) column h))
|
||||
(= [out (+ (* (+ (/ (* cz 32) step) dz) res) (/ (* cx 32) step) dx)]
|
||||
(cast (+ MINERAL-VALUE-BASE (ores/category (. r total))) u8))))))
|
||||
(cast (+ MINERAL-VALUE-BASE c) u8))))))
|
||||
(free column)
|
||||
(free (. map data))
|
||||
(= (* size) res)
|
||||
|
||||
Reference in New Issue
Block a user