MCPcopy Create free account
hub / github.com/DFHack/dfhack / history_value

Method history_value

plugins/workflow.cpp:315–319  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

313 return history.data_size() / hist_entry_size;
314 }
315 int history_value(int idx, HistoryItem item) {
316 size_t hsize = history_size();
317 size_t base = ((history.ival(0)+1+idx) % hsize) * hist_entry_size;
318 return history.get_int28(base + item*int28_size);
319 }
320 int history_count(int idx) { return history_value(idx, HIST_COUNT); }
321 int history_amount(int idx) { return history_value(idx, HIST_AMOUNT); }
322 int history_inuse_count(int idx) { return history_value(idx, HIST_INUSE_COUNT); }

Callers

nothing calls this directly

Calls 1

ivalMethod · 0.80

Tested by

no test coverage detected