diff --git a/html/Game/ClientPresence.php b/html/Game/ClientPresence.php index 80513e6..c4c518b 100644 --- a/html/Game/ClientPresence.php +++ b/html/Game/ClientPresence.php @@ -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); } // ... } diff --git a/html/Studio/IDE/Publish/uploadnewasset.php b/html/Studio/IDE/Publish/uploadnewasset.php index d9a2d61..bbbe8cd 100644 --- a/html/Studio/IDE/Publish/uploadnewasset.php +++ b/html/Studio/IDE/Publish/uploadnewasset.php @@ -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); } } } diff --git a/html/create/index.php b/html/create/index.php index 2558005..8af6aac 100644 --- a/html/create/index.php +++ b/html/create/index.php @@ -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); diff --git a/html_admin/give-asset.php b/html_admin/give-asset.php index 7de6967..9cfa413 100644 --- a/html_admin/give-asset.php +++ b/html_admin/give-asset.php @@ -1,5 +1,6 @@ id)) { $alert = "