We want to make a system in-game wherein users can give IDs of decals to place them on an object ingame. Obviously, we can have them put in the IMAGE id but that’s not user friendly. Concepted using insertservice to get the IMAGE id from inserting the DECAL into the game - but it only works with decals the owner of the game owns. Since decals can just be copied from the website ( unlike models, which was the reason this restriction was put in ) could we at-least have the ability to insert decals a user owns if they’re in the server? At very best, the ability to insert any decal?
InsertService should just be exposed like it used to be. If I want to insert a model made by Miked then I should be able to. I don’t need security measures in place to stop me unless I don’t have permission to use the model.
that’s a step away from j_b’s request though - there are no bad side effects from inserting decals you can just get from the site by subtracting 1 [or 2 or 3] but bringing models into the equation makes it a different request
@usering I think @brad_sharp means miked’s free models, or models of miked that brad owns, at least.
Does your code handle if the decal was published via a group? the CreatorId of the Decal will be the GroupId, while the Source Image will have the CreatorId as the Player who uploaded it.
I find adding an extra (or) check to see if the Decal has the same name as the Source Image helps, as most people don’t wind up changing the Decal’s name.
Good point. I guess the only check you can do for that is to compare the names then, but I find that a bit of an arbitrary check since there is a chance that the names are different.
Maybe a better idea would be if they supplied the image ID of the decal along with the product information that is obtained via MarketPlaceService::GetProductInfo.
yea, it would only fail to get the image is if it was uploaded via a group and the name was changed, sadly there really isn’t anything else to gather from GetProductInfo to match the 2 together, so sticking the sourceId into the decal’s info would be great.