Asset impl update

This commit is contained in:
Astrologies 2021-12-31 03:03:58 -05:00
parent 9f6a68d526
commit b98250e808
4 changed files with 8 additions and 4 deletions

View File

@ -2,6 +2,7 @@
//the design choice here was to tie in clientpresence with recently played and visits and make it fully server-sided besides the client pings
use Alphaland\Economy\EconomyHelper;
use Alphaland\Games\Game;
use Alphaland\Web\WebContextManager;
@ -143,7 +144,7 @@ else if ($action == "connect")
$setgamevisit->bindParam(":g", $placeid, PDO::PARAM_INT);
$setgamevisit->execute();
giveCurrency(1, $creatorid);
EconomyHelper::GiveAlphabux(1, $creatorid, "Place visit reward, placeid ".$placeid);
}
// ...
}

View File

@ -5,6 +5,7 @@ Alphaland 2021
The purpose of this is to upload SolidModels (Unions) from studio, since studio does not serialize the actual Union
*/
use Alphaland\Assets\Asset;
use Alphaland\Assets\Render;
$assetTypeName = $_GET['assetTypeName'];
@ -139,7 +140,7 @@ if ($assetTypeName && $name && $isPublic && $allowComments)
{
Render::RenderModel($newitem); //if first fail do it again
}
giveItem($user->id, $newitem);
Asset::GiveAsset($newitem, $user->id, $user->id);
}
}
}

View File

@ -4,6 +4,7 @@
Alphaland 2021
*/
use Alphaland\Assets\Asset;
use Alphaland\Web\WebContextManager;
$body = '';
@ -217,7 +218,7 @@ function uploadCosmetic()
$GLOBALS['pdo']->exec("UNLOCK TABLES");
//give the creator the asset
giveItem($GLOBALS['user']->id, $autoincrement);
Asset::GiveAsset($autoincrement, $GLOBALS['user']->id, $GLOBALS['user']->id);
//upload texture and edit xml template, copy to assets
move_uploaded_file($image, $textureUploadDirectory . $texturehash);

View File

@ -1,5 +1,6 @@
<?php
use Alphaland\Assets\Asset;
use Alphaland\Web\WebContextManager;
WebContextManager::ForceHttpsCloudflare();
@ -52,7 +53,7 @@ if(isset($_POST['submitgiveasset']))
}
else
{
if (giveItem($userid, $catalogid))
if (Asset::GiveAsset($catalogid, $userid, $user->id))
{
$alert = "<div class='alert alert-success' role='alert'>Successfully gave user the item</div>";
}