Closed MicroTransactionsMatterToo closed 3 years ago
The thing you found is part of the sidebar UI. The flags themselves are stored in the tile_occupancy
struct (that's the C name, anyway) as dig_auto
and dig_marked
, probably because tile_designation
ran out of space. In Ruby:
class TileOccupancy < MemHack::Compound
field(:_whole, 0) {
number 32, true
}
field(:building, 0) { bits 0, 3, TileBuildingOcc }
field(:unit, 0) { bit 3 }
field(:unit_grounded, 0) { bit 4 }
field(:item, 0) { bit 5 }
field(:edge_flow_in, 0) { bit 6 }
field(:moss, 0) { bit 7 }
field(:arrow_color, 0) { bits 8, 4 }
field(:arrow_variant, 0) { bit 12 }
field(:unk13_noncitizen_unit, 0) { bit 13 }
field(:monster_lair, 0) { bit 14 }
field(:no_grow, 0) { bit 15 }
field(:unk16, 0) { bit 16 }
field(:unk17, 0) { bit 17 }
field(:carve_track_north, 0) { bit 18 }
field(:carve_track_south, 0) { bit 19 }
field(:carve_track_east, 0) { bit 20 }
field(:carve_track_west, 0) { bit 21 }
field(:unk22, 0) { bit 22 }
field(:unk23, 0) { bit 23 }
field(:dig_marked, 0) { bit 24 }
field(:dig_auto, 0) { bit 25 }
field(:heavy_aquifer, 0) { bit 26 }
end
Right, sweet. Thanks for the help. Would be nice if there was clearer documentation for the df
object, the docs don't really cover what's in it. Obviously you can figure it out by reading other scripts and reading the source, but some proper docs would be nice.
Been trying to write a script to mark visible vein walls of a given material to be automined, but have hit a barrier trying to find a way to designate automining as opposed to normal digging. The only place I can find mention of it is in the exported ruby-autogen file, where it's present under
UiSideBarMenus
as the fieldmine_mode
. As best I can tell, automining designations can't be told apart from normal dig designations within dfhack, but clearly the game itself handles them differently, so presumably there's a flag or amine_mode
field set on tiles somewhere. Anybody able to offer advice on this?Ruby auto-gen code for reference