Upload from upload_mods.ps1
This commit is contained in:
33
Scripts/Entities/Inactive/EntityBicycleRebirth.cs
Normal file
33
Scripts/Entities/Inactive/EntityBicycleRebirth.cs
Normal file
@@ -0,0 +1,33 @@
|
||||
using System;
|
||||
|
||||
public class EntityBicycleRebirth : EntityDriveable
|
||||
{
|
||||
public float SpeedBoostMultiplier = 1f; // temp - for player buffs that boost the vehicle speed
|
||||
|
||||
public override void Update()
|
||||
{
|
||||
base.Update();
|
||||
//Log.Out("EntityBicycleRebirth-Update this.HasDriver: " + this.HasDriver);
|
||||
|
||||
if (HasDriver && AttachedMainEntity != null)
|
||||
{
|
||||
//Log.Out("EntityBicycleRebirth-Update AttachedMainEntity: " + this.AttachedMainEntity.EntityClass.entityClassName);
|
||||
|
||||
EntityAlive driver = (EntityAlive)AttachedMainEntity;
|
||||
|
||||
if (driver.Buffs.HasBuff("FuriousRamsayMobilityBoostRedTea"))
|
||||
{
|
||||
// todo fix - temp - this needs a better implementation
|
||||
SpeedBoostMultiplier = 1.5f; // red tea boosts speed by 1.5 or ?
|
||||
vehicle.VelocityMaxForward *= SpeedBoostMultiplier;
|
||||
//Log.Out("EntityBicycleRebirth-Update HAS BUFF");
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
SpeedBoostMultiplier = 1f;
|
||||
vehicle.VelocityMaxForward *= SpeedBoostMultiplier;
|
||||
//Log.Out("EntityBicycleRebirth-Update DOESN'T HAVE BUFF");
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user