mirror of
https://github.com/space-wizards/RobustToolbox.git
synced 2026-02-15 03:30:53 +01:00
Make SpriteSpecifier.Texture fail validation if it contains ".rsi" (#6155)
No pointing to PNGs inside RSIs.
This commit is contained in:
committed by
GitHub
parent
c2c8af16d0
commit
f02cd0083a
@@ -112,7 +112,11 @@ namespace Robust.Shared.Serialization.TypeSerializers.Implementations
|
||||
IDependencyCollection dependencies,
|
||||
ISerializationContext? context)
|
||||
{
|
||||
return serializationManager.ValidateNode<ResPath>(new ValueDataNode($"{TextureRoot / node.Value}"), context);
|
||||
var path = TextureRoot / node.Value;
|
||||
if (path.ToString().Contains(".rsi/"))
|
||||
return new ErrorNode(node, "Texture paths may not be inside RSI files.");
|
||||
|
||||
return serializationManager.ValidateNode<ResPath>(new ValueDataNode(path.ToString()), context);
|
||||
}
|
||||
|
||||
ValidationNode ITypeValidator<SpriteSpecifier, MappingDataNode>.Validate(
|
||||
|
||||
Reference in New Issue
Block a user