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

Function CopyMat

plugins/remotefortressreader/remotefortressreader.cpp:634–648  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

632}
633
634void CopyMat(RemoteFortressReader::MatPair * mat, int type, int index)
635{
636 if (type >= MaterialInfo::FIGURE_BASE && type < MaterialInfo::PLANT_BASE)
637 {
638 df::historical_figure * figure = df::historical_figure::find(index);
639 if (figure)
640 {
641 type -= MaterialInfo::GROUP_SIZE;
642 index = figure->race;
643 }
644 }
645 mat->set_mat_type(type);
646 mat->set_mat_index(index);
647
648}
649
650std::map<DFCoord, uint16_t> hashes;
651

Callers 5

CopyBlockFunction · 0.85
CopyspattersFunction · 0.85
CopyLocalMapFunction · 0.85
GetPartialCreatureRawsFunction · 0.85
GetPartialPlantRawsFunction · 0.85

Calls 1

findFunction · 0.50

Tested by

no test coverage detected