Revert "Validation: Make Assets Loadable on Maptest (#198)"
This reverts commit abd233ce65.
This commit is contained in:
4
Cargo.lock
generated
4
Cargo.lock
generated
@@ -1379,9 +1379,9 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "rbx_asset"
|
||||
version = "0.4.6"
|
||||
version = "0.4.5"
|
||||
source = "sparse+https://git.itzana.me/api/packages/strafesnet/cargo/"
|
||||
checksum = "860909d8375a54deb2a50187b1b792dcf88c0d2e21c18f0c1d44b34e2f027f36"
|
||||
checksum = "b448bf22f70748215c2a937158f83790bf3f4df81e2af8521a089bc821155360"
|
||||
dependencies = [
|
||||
"bytes",
|
||||
"chrono",
|
||||
|
||||
@@ -7,7 +7,7 @@ edition = "2021"
|
||||
submissions-api = { path = "api", features = ["internal"], default-features = false, registry = "strafesnet" }
|
||||
async-nats = "0.41.0"
|
||||
futures = "0.3.31"
|
||||
rbx_asset = { version = "0.4.6", registry = "strafesnet" }
|
||||
rbx_asset = { version = "0.4.5", registry = "strafesnet" }
|
||||
rbx_binary = "1.0.0"
|
||||
rbx_dom_weak = "3.0.0"
|
||||
rbx_reflection_database = "1.0.3"
|
||||
|
||||
@@ -9,8 +9,6 @@ pub enum Error{
|
||||
Download(crate::download::Error),
|
||||
ModelFileDecode(ReadDomError),
|
||||
GetRootInstance(GetRootInstanceError),
|
||||
InvalidGamePrefix,
|
||||
LoadableOnMaptest(rbx_asset::cookie::SetAssetsPermissionsError),
|
||||
}
|
||||
impl std::fmt::Display for Error{
|
||||
fn fmt(&self,f:&mut std::fmt::Formatter<'_>)->std::fmt::Result{
|
||||
@@ -64,24 +62,11 @@ impl crate::message_handler::MessageHandler{
|
||||
game_id,
|
||||
}=get_mapinfo(&dom,model_instance);
|
||||
|
||||
let game_id=game_id.map_err(|_|Error::InvalidGamePrefix)?;
|
||||
|
||||
let universe_id=match &game_id{
|
||||
GameID::Bhop=>4422715291,
|
||||
GameID::Surf=>4422716026,
|
||||
GameID::FlyTrials=>4419912257,
|
||||
};
|
||||
let config=rbx_asset::cookie::SetAssetsPermissionsRequest{
|
||||
universe_id,
|
||||
asset_ids:&[create_info.ModelID],
|
||||
};
|
||||
self.cookie_context.set_assets_permissions(config).await.map_err(Error::LoadableOnMaptest)?;
|
||||
|
||||
Ok(CreateResult{
|
||||
AssetOwner:user_id,
|
||||
DisplayName:display_name.ok().map(ToOwned::to_owned),
|
||||
Creator:creator.ok().map(ToOwned::to_owned),
|
||||
GameID:Some(game_id),
|
||||
GameID:game_id.ok(),
|
||||
AssetVersion:asset_version,
|
||||
})
|
||||
}
|
||||
|
||||
@@ -51,7 +51,6 @@ pub enum Error{
|
||||
ApiGetScriptFromHash(submissions_api::types::ScriptSingleItemError),
|
||||
ApiUpdateMapfixModel(submissions_api::Error),
|
||||
ApiUpdateSubmissionModel(submissions_api::Error),
|
||||
LoadableOnMaptest(rbx_asset::cookie::SetAssetsPermissionsError),
|
||||
ModelFileRootMustHaveOneChild,
|
||||
ModelFileChildRefIsNil,
|
||||
ModelFileEncode(rbx_binary::EncodeError),
|
||||
@@ -297,14 +296,6 @@ impl crate::message_handler::MessageHandler{
|
||||
},
|
||||
}
|
||||
|
||||
// Map Staging
|
||||
let universe_id=7895115682;
|
||||
let config=rbx_asset::cookie::SetAssetsPermissionsRequest{
|
||||
universe_id,
|
||||
asset_ids:&[validated_model_id],
|
||||
};
|
||||
self.cookie_context.set_assets_permissions(config).await.map_err(Error::LoadableOnMaptest)?;
|
||||
|
||||
Ok(())
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user