| 141 | } |
| 142 | |
| 143 | bool DecalObject::SetFromDesc(const EntityDescription& desc) { |
| 144 | bool ret = Object::SetFromDesc(desc); |
| 145 | if (ret) { |
| 146 | for (const auto& field : desc.fields) { |
| 147 | switch (field.type) { |
| 148 | case EDF_FILE_PATH: { |
| 149 | std::string type_file; |
| 150 | field.ReadString(&type_file); |
| 151 | if (type_file != obj_file) { |
| 152 | Load(type_file); |
| 153 | } |
| 154 | break; |
| 155 | } |
| 156 | } |
| 157 | } |
| 158 | color_tint_component_.SetFromDescription(desc); |
| 159 | } |
| 160 | return ret; |
| 161 | } |
| 162 | |
| 163 | void DecalObject::Load(const std::string& type_file) { |
| 164 | obj_file = type_file; |
nothing calls this directly
no test coverage detected