Files
gm_construct_port/code/Carriable.cs
2021-08-05 17:54:51 +03:00

32 lines
504 B
C#

using Sandbox;
public partial class Carriable : BaseCarriable, IUse
{
public override void CreateViewModel()
{
Host.AssertClient();
if ( string.IsNullOrEmpty( ViewModelPath ) )
return;
ViewModelEntity = new ViewModel
{
Position = Position,
Owner = Owner,
EnableViewmodelRendering = true
};
ViewModelEntity.SetModel( ViewModelPath );
}
public bool OnUse( Entity user )
{
return false;
}
public virtual bool IsUsable( Entity user )
{
return Owner == null;
}
}