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

Method getItemBaseValue

library/modules/Items.cpp:1108–1291  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1106}
1107
1108int Items::getItemBaseValue(int16_t item_type, int16_t item_subtype,
1109 int16_t mat_type, int32_t mat_subtype)
1110{
1111 int value = 0;
1112 switch (item_type)
1113 { using namespace df::enums::item_type;
1114 case SEEDS:
1115 case DRINK:
1116 case POWDER_MISC:
1117 case LIQUID_MISC:
1118 case COIN:
1119 case GLOB:
1120 case ORTHOPEDIC_CAST:
1121 case BRANCH:
1122 value = 1;
1123 break;
1124 case MEAT:
1125 case PLANT:
1126 case PLANT_GROWTH:
1127 value = 2;
1128 break;
1129 case BOULDER:
1130 case WOOD:
1131 value = 3;
1132 break;
1133 case BAR:
1134 case BLOCKS:
1135 case SKIN_TANNED:
1136 case SHEET:
1137 value = 5;
1138 break;
1139 case ROUGH:
1140 case THREAD:
1141 value = 6;
1142 break;
1143 case CLOTH:
1144 value = 7;
1145 break;
1146 case DOOR:
1147 case FLOODGATE:
1148 case BED:
1149 case CHAIR:
1150 case CHAIN:
1151 case FLASK:
1152 case GOBLET:
1153 case TOY:
1154 case CAGE:
1155 case BARREL:
1156 case BUCKET:
1157 case ANIMALTRAP:
1158 case TABLE:
1159 case COFFIN:
1160 case BOX:
1161 case BAG:
1162 case BIN:
1163 case ARMORSTAND:
1164 case WEAPONRACK:
1165 case CABINET:

Callers

nothing calls this directly

Calls 2

findFunction · 0.50
decodeMethod · 0.45

Tested by

no test coverage detected