Add files via upload

This commit is contained in:
celisej567
2021-08-05 17:54:51 +03:00
committed by GitHub
parent d58ad89d11
commit 76b55e2a87
57 changed files with 5632 additions and 0 deletions

31
code/Carriable.cs Normal file
View File

@@ -0,0 +1,31 @@
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;
}
}