MCPcopy Create free account
hub / github.com/OpenTTD/OpenTTD / CopyCompatibleConfig

Method CopyCompatibleConfig

src/gfxinit.cpp:405–412  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

403}
404
405void GraphicsSet::CopyCompatibleConfig(const GraphicsSet &src)
406{
407 const GRFConfig *src_cfg = src.GetExtraConfig();
408 if (src_cfg == nullptr || src_cfg->param.empty()) return;
409 GRFConfig &dest_cfg = this->GetOrCreateExtraConfig();
410 if (dest_cfg.IsCompatible(src_cfg->version)) return;
411 dest_cfg.CopyParams(*src_cfg);
412}
413
414/**
415 * Calculate and check the MD5 hash of the supplied GRF.

Callers 1

AddFileMethod · 0.45

Calls 4

GetExtraConfigMethod · 0.80
IsCompatibleMethod · 0.80
CopyParamsMethod · 0.80
emptyMethod · 0.45

Tested by

no test coverage detected