roblox animation upload helper

This commit is contained in:
Austin 2021-10-31 21:37:34 -04:00
parent efc28d34df
commit a436998e7f
1 changed files with 16 additions and 0 deletions

View File

@ -3348,6 +3348,22 @@ function uploadRobloxTexture($name, $assetid, $creatorid) {
return false;
}
function uploadRobloxAnimation($name, $assetid, $creatorid) {
if (getRobloxProductInfo($assetid)->AssetTypeId == 24) {
$animationstr = file_get_contents('compress.zlib://'.$GLOBALS['ROBLOXAssetAPI'].$assetid);
$hash = genAssetHash(16);
$assetid = availableAssetId();
$name = cleanInput($name);
if (file_put_contents($GLOBALS['assetCDNPath'] . $hash, $animationstr)) {
createGenericAsset($assetid, 24, $assetid, "", $name, "", $creatorid, 0, 0, 1, 1, $hash);
return $assetid;
}
}
return false;
}
function submitRobloxAssetWorker($requestedassetid, $assettypeid, $assetname, $assetdescription, $price, $onsale) {
//multiple occasions of the same item being uploaded, double check the name now
$isduplicate = false;