MCPcopy Create free account
hub / github.com/WolfireGames/overgrowth / ASGetModThumbnailImage

Function ASGetModThumbnailImage

Source/Scripting/angelscript/asfuncs.cpp:6913–6926  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

6911}
6912
6913static IMImage* ASGetModThumbnailImage(ModID& sid) {
6914 ModInstance* mod = ModLoading::Instance().GetMod(sid);
6915 IMImage* image = NULL;
6916 if (mod) {
6917 Path thumb = mod->GetFullAbsThumbnailPath();
6918 if (thumb.isValid() && IsImageFile(thumb)) {
6919 return IMImage::ASFactoryPath(thumb);
6920 } else {
6921 return IMImage::ASFactory("Images/thumb_fallback.png");
6922 }
6923 } else {
6924 return IMImage::ASFactory("Images/thumb_fallback.png");
6925 }
6926}
6927
6928static CScriptArray* ASGetModSids() {
6929 asIScriptContext* ctx = asGetActiveContext();

Callers

nothing calls this directly

Calls 4

IsImageFileFunction · 0.85
GetModMethod · 0.80
isValidMethod · 0.45

Tested by

no test coverage detected