Broke Protocol Game API Reference  1.39
Code reference for server and client scripting
Loading...
Searching...
No Matches
Public Member Functions | Public Attributes | Protected Member Functions | Protected Attributes | Properties | List of all members
BrokeProtocol.Entities.ShTransport Class Reference
Inheritance diagram for BrokeProtocol.Entities.ShTransport:
BrokeProtocol.Entities.ShMovable BrokeProtocol.Entities.ShPhysical BrokeProtocol.Entities.ShDestroyable BrokeProtocol.Entities.ShMountable BrokeProtocol.Entities.ShDamageable BrokeProtocol.Entities.ShEntity BrokeProtocol.Entities.Serialized BrokeProtocol.Entities.ShAircraft BrokeProtocol.Entities.ShBoat BrokeProtocol.Entities.ShTrain BrokeProtocol.Entities.ShVehicle BrokeProtocol.Entities.ShFixedWing BrokeProtocol.Entities.ShHelo BrokeProtocol.Entities.ShBike BrokeProtocol.Entities.ShEmergencyVehicle BrokeProtocol.Entities.ShTracked BrokeProtocol.Entities.ShAirplane BrokeProtocol.Entities.ShParachute

Public Member Functions

override void Initialize ()
 
override bool IsAccessible (ShPlayer attempter, bool checkOwner)
 
override void Restore (Vector3 position, Quaternion rotation, Transform placeT)
 
override void Spawn (Vector3 position, Quaternion rotation, Transform placeT)
 
override void Destroy ()
 
override void CleanUp ()
 
void SetSiren (bool setting)
 
bool FindTowable (out ShTransport towable)
 
void Tow (ShTransport towable)
 
override void ResetInputs ()
 
float GetTorqueFactor (float speed, float limit)
 
override void DestroyExtras ()
 
- Public Member Functions inherited from BrokeProtocol.Entities.ShMovable
virtual float GetSpeedLimit ()
 
- Public Member Functions inherited from BrokeProtocol.Entities.ShPhysical
void SetVelocity (Vector3 velocity)
 
void SetAngularVelocity (Vector3 velocity)
 
bool GroundEntityOffsets (out int groundID, out Vector3 posOffset, out Quaternion rotOffset)
 
void ApplyInverseGravity ()
 
void Force (Vector3 force)
 
override void SetTransform (Vector3 position, Quaternion rotation, bool zeroVelocity)
 
- Public Member Functions inherited from BrokeProtocol.Entities.ShDestroyable
virtual void Die (ShPlayer attacker=null)
 
- Public Member Functions inherited from BrokeProtocol.Entities.ShMountable
virtual void Reload ()
 
void UpdatePrimaryAmmo (int delta)
 
void UpdateSecondaryAmmo (int delta)
 
virtual bool CanUse ()
 
override void PreInitialize (int ID)
 
virtual Vector3 GetWeaponPosition ()
 
virtual Vector3 GetWeaponVector ()
 
virtual void ResetAmmo ()
 
void Rearm (float amount)
 
virtual void Mounted (ShPlayer occupant, int enterSeat)
 
void IncrementFireTime (float delay)
 
void MountFire ()
 
- Public Member Functions inherited from BrokeProtocol.Entities.ShDamageable
virtual void HitEffect (Collider collider, DamageIndex damageIndex, Vector3 point, Vector3 normal)
 
- Public Member Functions inherited from BrokeProtocol.Entities.ShEntity
Bounds GetWorldBounds ()
 
override void CheckSave ()
 
float GetLocalY (Vector3 worldPosition)
 
float GetFlatAngle (Vector3 v)
 
virtual bool InActionRange (ShEntity e)
 
bool CanSeeEntity (ShEntity other, bool checkInFront=false, float viewRange=Util.visibleRange)
 
bool GetOverlapEntity< T > (Vector3 position, Quaternion rotation, int maskIndex, float extentsMultiplier, Predicate< T > predicate, out T entity)
 
bool CanSpawn (Vector3 position, Quaternion rotation, ShEntity[] ignoreArray)
 
bool CanSee (Vector3 position)
 
float Distance (ShEntity other)
 
float DistanceSqr (ShEntity other)
 
float DistanceSqr2D (ShEntity other)
 
float DistanceSqr2D (Vector3 other)
 
float Distance (Vector3 other)
 
float DistanceSqr (Vector3 other)
 
void SetParent (Transform parent)
 
void SetPosition (Vector3 position)
 
virtual void SetRotation (Quaternion rotation)
 
void SetPositionSafe (Vector3 targetPosition)
 
void DeactivateEntity ()
 
void IgnoreCollision (ShPlayer p, bool ignore)
 
IEnumerator ResetCollisions (ShPlayer p)
 
int InventoryValue ()
 
int GetMyItemValue (ShItem item, bool markup)
 
void SendViewerDelta (byte delta, int itemIndex, int amount, ShPlayer ignorePlayer)
 
void TransferMoney (byte deltaType, int amount=1, bool dispatch=true)
 
void TransferItem (byte deltaType, ShItem item, int amount=1, bool dispatch=true)
 
bool ValidTransfer (int itemIndex, int amount)
 
virtual void TransferItem (byte deltaType, int itemIndex, int amount=1, bool dispatch=true)
 
byte[] SerializeMyItems ()
 
SizedArray SerializeShop ()
 
void DeserializeMyItems (byte[] inventoryArray)
 
void DeserializeShop (byte[] inventoryArray)
 
virtual void AddToMyItems (int itemIndex, int amount, bool dispatch)
 
void AddToTradeItems (int itemIndex, int amount)
 
virtual void RemoveFromMyItems (int itemIndex, int amount, bool dispatch)
 
void RemoveFromTradeItems (int itemIndex, int amount)
 
virtual bool CanBeSearched (ShPlayer p)
 
bool CanBeCracked (ShPlayer p)
 
int ItemCount (Dictionary< int, InventoryItem > inventory, int itemIndex)
 
bool HasItem (ShItem item)
 
bool HasItem (int itemIndex)
 
int MyItemCount (ShEntity item)
 
int TradeItemCount (ShEntity item)
 
int MyItemCount (int itemIndex)
 
int TradeItemCount (int itemIndex)
 
void ClearAllViewers ()
 
void RemoveViewer (ShPlayer viewer)
 
bool ShopCanBuy (ShItem item)
 
- Public Member Functions inherited from BrokeProtocol.Entities.Serialized
virtual void InitializeEditor ()
 
virtual void BoundsHighlightAdd ()
 
virtual void BoundsHighlightRemove ()
 
void Trigger (Collider collider, string eventName, bool enter)
 

Public Attributes

ClTransport clTransport
 
SvTransport svTransport
 
EntityState state
 
Transform towT
 
bool siren
 
ShPlayer owner
 
WheelCollider[] wheels
 
Transform[] wheelTransforms
 
Vector3 localVelocity
 
float forwardVelocity
 
float nextBoostTime
 
float maxSteeringAngle = 45f
 
- Public Attributes inherited from BrokeProtocol.Entities.ShMovable
ClMovable clMovable
 
SvMovable svMovable
 
float maxSpeed
 
ShTransport towParent
 
ShTransport towChild
 
- Public Attributes inherited from BrokeProtocol.Entities.ShPhysical
ClPhysical clPhysical
 
SvPhysical svPhysical
 
Rigidbody positionRB
 
Vector3 boostVelocity
 
float spawnVelocity
 
float originalDrag
 
float originalAngularDrag
 
- Public Attributes inherited from BrokeProtocol.Entities.ShDestroyable
ClDestroyable clDestroyable
 
SvDestroyable svDestroyable
 
float health
 
float maxStat = 20f
 
- Public Attributes inherited from BrokeProtocol.Entities.ShMountable
ClMountable clMountable
 
SvMountable svMountable
 
Seat[] seats
 
Transform[] exitTransforms
 
float viewAngleLimit = 89f
 
Transform turretT
 
Transform barrelT
 
WeaponSet[] weaponSets
 
int weaponIndex
 
Vector2 recoilP
 
Vector2 recoilV
 
ShPlayer[] occupants
 
float nextFire
 
- Public Attributes inherited from BrokeProtocol.Entities.ShDamageable
SvDamageable svDamageable
 
- Public Attributes inherited from BrokeProtocol.Entities.ShEntity
ClEntity clEntity
 
SvEntity svEntity
 
Animator animator
 
bool syncAnimator
 
ShPlayer controller
 
Dictionary< string, string > dynamicActions = new ()
 
bool isHuman
 
float videoStartTime
 
string profile = string.Empty
 
bool isWorldEntity
 
Renderer[] renderers
 
AppIndex[] availableApps
 
InventoryType inventoryType
 
Dictionary< int, InventoryItemmyItems = new ()
 
Dictionary< int, InventoryItemtradeItems = new ()
 
HashSet< ShPlayerviewers = new ()
 
HashSet< Collider > colliders
 
int ID
 
int index
 
ShManager manager
 
int value
 
int respawnFrame
 
Vector3 relativeVelocity
 
Bounds bounds
 
- Public Attributes inherited from BrokeProtocol.Entities.Serialized
string referencePrefab
 
GameObject go
 
Transform mainT
 
string data
 
BoundsHighlight highlight
 

Protected Member Functions

void SetMotorBrake (float motor, float brake)
 
virtual void Start ()
 
override void Move ()
 
virtual void SetSteeringAngle (float angle)
 
override void MoveSimulated ()
 
virtual void AirControl ()
 
override void MoveControlled ()
 
Vector3 GetOrientInput ()
 
- Protected Member Functions inherited from BrokeProtocol.Entities.ShPhysical
void FixedUpdate ()
 
- Protected Member Functions inherited from BrokeProtocol.Entities.ShMountable
void DeltaClip (int delta)
 
IEnumerator RearmLoop ()
 
IEnumerator MoveTurret ()
 
- Protected Member Functions inherited from BrokeProtocol.Entities.ShEntity
virtual void UpdateMainColliders ()
 
InventoryItem DeserializeItem (byte[] itemArray)
 
InventoryItem DeserializeShopItem (byte[] itemArray)
 
void AddToInventory (Dictionary< int, InventoryItem > inventory, int itemIndex, int amount)
 
void RemoveFromInventory (Dictionary< int, InventoryItem > inventory, int itemIndex, int amount)
 

Protected Attributes

Vector3 orientStrength = Vector3.one
 
float torque = 4f
 
int steeringCount = 2
 
float minSteeringAngle
 
- Protected Attributes inherited from BrokeProtocol.Entities.ShPhysical
Vector3 lastPosition
 

Properties

override Collider Ground [get]
 
override SerializedParameters Parameters [get]
 
override Type EditorType [get]
 
bool IsAbandoned [get]
 
override float CameraDistance [get]
 
virtual Vector3 CenterOfMassMultiplier [get]
 
- Properties inherited from BrokeProtocol.Entities.ShMovable
override bool DestroyOnDeath [get]
 
override bool ServersidePhysics [get]
 
bool DisableBrakes [get]
 
- Properties inherited from BrokeProtocol.Entities.ShPhysical
virtual float WaterDrag [get]
 
override bool SyncTransform [get]
 
override Vector3 Velocity [get, set]
 
override Vector3 CenterBuoyancy [get]
 
virtual StanceIndex GetStanceIndex [get]
 
Vector3 FutureOrigin [get]
 
Vector3 FuturePosition [get]
 
Quaternion FutureRotation [get]
 
- Properties inherited from BrokeProtocol.Entities.ShDestroyable
override bool IsDead [get]
 
override float MountHealth [get]
 
Color HealthToColor [get]
 
bool CanHeal [get]
 
virtual bool DestroyOnDeath [get]
 
- Properties inherited from BrokeProtocol.Entities.ShMountable
float NormalizedRecoilAmount [get]
 
virtual bool UsePathfinding [get]
 
WeaponSet WeaponSet [get]
 
virtual int ClipSize [get]
 
virtual int CurrentClip [get, set]
 
virtual bool CanReload [get]
 
virtual bool ServersideAmmo [get]
 
virtual ShItem AmmoItem [get]
 
int AmmoTotal [get]
 
virtual bool UseClips [get]
 
virtual bool MustAim [get]
 
virtual float Range [get]
 
virtual float Damage [get]
 
virtual bool CanLockOn [get]
 
bool ThrownHasGuidance [get]
 
virtual float CameraDistance [get]
 
override ShMountable GetMount [get]
 
bool CheckHitscans [get]
 
virtual bool ServersidePhysics [get]
 
bool IsSimulated [get]
 
bool HasWeapons [get]
 
virtual float WeaponVelocity [get]
 
float WeaponGravity [get]
 
float ThrownVelocity [get]
 
virtual float UseDelay [get]
 
- Properties inherited from BrokeProtocol.Entities.ShEntity
virtual bool IsDead [get]
 
virtual bool SyncTransform [get]
 
virtual Collider Ground [get]
 
virtual ShEntity SpecEntity [get]
 
bool SpecSelf [get]
 
override SerializedParameters Parameters [get]
 
override Type EditorType [get]
 
virtual ShMountable GetMount [get]
 
virtual ShPlayer Player [get]
 
virtual Vector3 Velocity [get, set]
 
virtual Vector3 GetOrigin [get]
 
virtual float MountHealth [get]
 
override bool SendInitial [get]
 
virtual InventoryStruct[] CollectedItems [get]
 
bool IsClientMain [get]
 
virtual float ProcessDuration [get]
 
Bounds ScaledBounds [get]
 
Vector3 CenterBounds [get]
 
bool HasInventory [get]
 
bool Shop [get]
 
int MyMoneyCount [get]
 
int TradeMoneyCount [get]
 
- Properties inherited from BrokeProtocol.Entities.Serialized
virtual bool SendInitial [get]
 
virtual SerializedParameters Parameters [get]
 
virtual Type EditorType [get]
 
ChildIndex GetChildIndex [get]
 
virtual Transform GetRotationT [get]
 
virtual Quaternion GetRotation [get]
 
Transform GetParent [get]
 
bool IsOutside [get]
 
int GetPlaceIndex [get]
 
Place GetPlace [get]
 
Vector3 GetPosition [get]
 
string LogPosition [get]
 
virtual Vector3 CenterBuoyancy [get]
 
virtual bool InWater [get]
 

Member Function Documentation

◆ AirControl()

virtual void BrokeProtocol.Entities.ShTransport.AirControl ( )
inlineprotectedvirtual

◆ CleanUp()

override void BrokeProtocol.Entities.ShTransport.CleanUp ( )
inlinevirtual

◆ Destroy()

override void BrokeProtocol.Entities.ShTransport.Destroy ( )
inlinevirtual

Reimplemented from BrokeProtocol.Entities.ShEntity.

◆ DestroyExtras()

override void BrokeProtocol.Entities.ShTransport.DestroyExtras ( )
inlinevirtual

Reimplemented from BrokeProtocol.Entities.ShEntity.

◆ FindTowable()

bool BrokeProtocol.Entities.ShTransport.FindTowable ( out ShTransport towable)
inline

◆ GetOrientInput()

Vector3 BrokeProtocol.Entities.ShTransport.GetOrientInput ( )
inlineprotected

◆ GetTorqueFactor()

float BrokeProtocol.Entities.ShTransport.GetTorqueFactor ( float speed,
float limit )

◆ Initialize()

override void BrokeProtocol.Entities.ShTransport.Initialize ( )
inlinevirtual

◆ IsAccessible()

override bool BrokeProtocol.Entities.ShTransport.IsAccessible ( ShPlayer attempter,
bool checkOwner )
virtual

◆ Move()

override void BrokeProtocol.Entities.ShTransport.Move ( )
inlineprotectedvirtual

Reimplemented from BrokeProtocol.Entities.ShMovable.

◆ MoveControlled()

override void BrokeProtocol.Entities.ShTransport.MoveControlled ( )
inlineprotectedvirtual

◆ MoveSimulated()

override void BrokeProtocol.Entities.ShTransport.MoveSimulated ( )
inlineprotectedvirtual

Reimplemented from BrokeProtocol.Entities.ShPhysical.

◆ ResetInputs()

override void BrokeProtocol.Entities.ShTransport.ResetInputs ( )
virtual

◆ Restore()

override void BrokeProtocol.Entities.ShTransport.Restore ( Vector3 position,
Quaternion rotation,
Transform placeT )
inlinevirtual

Reimplemented from BrokeProtocol.Entities.ShPhysical.

◆ SetMotorBrake()

void BrokeProtocol.Entities.ShTransport.SetMotorBrake ( float motor,
float brake )
inlineprotected

◆ SetSiren()

void BrokeProtocol.Entities.ShTransport.SetSiren ( bool setting)
inline

◆ SetSteeringAngle()

virtual void BrokeProtocol.Entities.ShTransport.SetSteeringAngle ( float angle)
inlineprotectedvirtual

Reimplemented in BrokeProtocol.Entities.ShBoat.

◆ Spawn()

override void BrokeProtocol.Entities.ShTransport.Spawn ( Vector3 position,
Quaternion rotation,
Transform placeT )
inlinevirtual

Reimplemented from BrokeProtocol.Entities.ShPhysical.

◆ Start()

virtual void BrokeProtocol.Entities.ShTransport.Start ( )
inlineprotectedvirtual

◆ Tow()

void BrokeProtocol.Entities.ShTransport.Tow ( ShTransport towable)
inline

Member Data Documentation

◆ clTransport

ClTransport BrokeProtocol.Entities.ShTransport.clTransport

◆ forwardVelocity

float BrokeProtocol.Entities.ShTransport.forwardVelocity

◆ localVelocity

Vector3 BrokeProtocol.Entities.ShTransport.localVelocity

◆ maxSteeringAngle

float BrokeProtocol.Entities.ShTransport.maxSteeringAngle = 45f

◆ minSteeringAngle

float BrokeProtocol.Entities.ShTransport.minSteeringAngle
protected

◆ nextBoostTime

float BrokeProtocol.Entities.ShTransport.nextBoostTime

◆ orientStrength

Vector3 BrokeProtocol.Entities.ShTransport.orientStrength = Vector3.one
protected

◆ owner

ShPlayer BrokeProtocol.Entities.ShTransport.owner

◆ siren

bool BrokeProtocol.Entities.ShTransport.siren

◆ state

EntityState BrokeProtocol.Entities.ShTransport.state

◆ steeringCount

int BrokeProtocol.Entities.ShTransport.steeringCount = 2
protected

◆ svTransport

SvTransport BrokeProtocol.Entities.ShTransport.svTransport

◆ torque

float BrokeProtocol.Entities.ShTransport.torque = 4f
protected

◆ towT

Transform BrokeProtocol.Entities.ShTransport.towT

◆ wheels

WheelCollider [] BrokeProtocol.Entities.ShTransport.wheels

◆ wheelTransforms

Transform [] BrokeProtocol.Entities.ShTransport.wheelTransforms

Property Documentation

◆ CameraDistance

override float BrokeProtocol.Entities.ShTransport.CameraDistance
get

◆ CenterOfMassMultiplier

virtual Vector3 BrokeProtocol.Entities.ShTransport.CenterOfMassMultiplier
getprotected

◆ EditorType

override Type BrokeProtocol.Entities.ShTransport.EditorType
get

◆ Ground

override Collider BrokeProtocol.Entities.ShTransport.Ground
get

◆ IsAbandoned

bool BrokeProtocol.Entities.ShTransport.IsAbandoned
get

◆ Parameters

override SerializedParameters BrokeProtocol.Entities.ShTransport.Parameters
get

The documentation for this class was generated from the following file: