Broke Protocol Game API Reference  1.39
Code reference for server and client scripting
Loading...
Searching...
No Matches
Public Member Functions | Public Attributes | Static Public Attributes | Protected Member Functions | Protected Attributes | Properties | List of all members
BrokeProtocol.Entities.SvEntity Class Reference
Inheritance diagram for BrokeProtocol.Entities.SvEntity:
BrokeProtocol.Entities.SvDamageable BrokeProtocol.Entities.SvDeathZone BrokeProtocol.Entities.SvDoor BrokeProtocol.Entities.SvTextDisplay BrokeProtocol.Entities.SvTrigger BrokeProtocol.Entities.SvVault BrokeProtocol.Entities.SvMountable BrokeProtocol.Entities.SvVoxel BrokeProtocol.Entities.SvApartment BrokeProtocol.Entities.SvTerritory BrokeProtocol.Entities.SvDestroyable BrokeProtocol.Entities.SvItem BrokeProtocol.Entities.SvSmoothVoxel BrokeProtocol.Entities.SvDamage BrokeProtocol.Entities.SvPhysical BrokeProtocol.Entities.SvAttachment BrokeProtocol.Entities.SvEquipable BrokeProtocol.Entities.SvWearable BrokeProtocol.Entities.SvFire BrokeProtocol.Entities.SvMovable BrokeProtocol.Entities.SvThrown BrokeProtocol.Entities.SvMuzzle BrokeProtocol.Entities.SvSight BrokeProtocol.Entities.SvUnderbarrel BrokeProtocol.Entities.SvLight BrokeProtocol.Entities.SvShield BrokeProtocol.Entities.SvUsable

Public Member Functions

GetEvents< T > ()
 
void InitializeSender ()
 
void UpdateDefaultItems ()
 
virtual void ResetOriginal ()
 
virtual bool CheckUpdatable ()
 
void SvAnimatorEnabled (bool enabled)
 
void SvAnimatorFloat (string parameterName, float value)
 
void SvAnimatorInt (string parameterName, int value)
 
void SvAnimatorBool (string parameterName, bool value)
 
void SvAnimatorTrigger (string parameterName)
 
void SvStopVideo ()
 
void SvStartDefaultVideo (int index)
 
void SvStartCustomVideo (string url)
 
bool BuyEntity (ShPlayer buyer)
 
virtual void SvSetParent (Transform parent)
 
void SvRelocate (Transform t, Transform parent=null)
 
virtual void SvRelocate (Vector3 position, Quaternion rotation, Transform parent=null)
 
virtual bool IsValidTarget (ShPlayer chaser)
 
SizedArray SerializeAnimator ()
 
SizedArray SerializeParameters ()
 
virtual void WriteActivateData ()
 
void SendActivateToOther (ShPlayer other)
 
void SendDeactivateToOther (ShPlayer other)
 
virtual void Initialize ()
 
IEnumerator SyncAnimator ()
 
void AddItemOptions (ItemOption[] options)
 
Sector GetEntitySector ()
 
bool AddSubscribedPlayer (ShPlayer player, bool sendInitData=true)
 
void RemoveSubscribedPlayer (ShPlayer player, bool dispatch)
 
void SameSector ()
 
void NewSector (Sector newSector)
 
virtual void Destroy ()
 
virtual void SvDestroyEffect ()
 
void SpawnOriginal ()
 
void SpawnFire ()
 
HashSet< T > GetLocalInRange< T > (float range)
 
void ExplosionDamage (float range, float damage, ShPlayer attacker)
 
void SvAddDynamicAction (string eventName, string label)
 
void SvRemoveDynamicAction (string eventName)
 
virtual void WriteInitData (ref object[] initializeArgs, bool isPlayer)
 
void SvSetScale (Vector3 scale)
 
virtual void InitializeSectors ()
 
virtual void Respawn ()
 
virtual void Deactivate (bool removeSectors)
 
virtual void SvRestore (Vector3 position, Quaternion rotation, int placeIndex)
 
bool LocalEntitiesOne (Func< ShEntity, bool > Test, Func< ShEntity, bool > Action)
 
void LocalEntitiesAll (Func< ShEntity, bool > Test, Action< ShEntity > Action)
 
virtual void Restock (float fraction=1f)
 
virtual void Shop (ShPlayer customer)
 
void Send (SvSendType sendType, PacketFlags channel, ClPacket packet, params object[] args)
 
void Send (SvSendType sendType, PacketFlags channel)
 

Public Attributes

ShEntity entity
 
ShPlayer spawner
 
ShPlayer instigator
 
IDCollection< ShPlayersubscribers
 
SvManager svManager
 
Dictionary< ValueTuple< Place, Vector2Int >, SectorlocalSectors = new ()
 
Sector sector
 
bool randomSpawn
 
bool respawnable = true
 
string videoURL = string.Empty
 
float destroyAfter
 
bool destroyEmpty
 
ItemOption[] itemOptions
 
Dictionary< int, InventoryItemdefaultItems
 
HashSet< ShPlayerspectators = new ()
 
object[] activateArgs
 
Vector3 originalPosition
 
Quaternion originalRotation
 
Transform originalParent
 

Static Public Attributes

static readonly EntityEvents events = new()
 

Protected Member Functions

void RemoveSectors (bool sendDeactivate)
 
void TryAddHuman (Sector s)
 
void TryRemoveHuman (Sector s)
 
void SendToPlayer (ShPlayer toPlayer, PacketFlags channel)
 
virtual void SendToSelf (PacketFlags channel)
 
virtual void SendToLocal (PacketFlags channel)
 
void SendToLocalOthers (PacketFlags channel)
 
void SendToAll (PacketFlags channel)
 
void SendToAllOthers (PacketFlags channel)
 

Protected Attributes

readonly Dictionary< SvSendType, Action< PacketFlags > > sender = new ()
 
byte[] animatorArray
 
byte[] parameterArray
 

Properties

virtual EntityEvents Events [get]
 
virtual WaypointType WaypointProperty [get]
 
CustomData CustomData = new () [get, set]
 
virtual float RespawnTime [get]
 
virtual float SpawnRate [get]
 
bool OnOrigin [get]
 
ShDoor GetDoor [get]
 
Vector3 ExteriorPosition [get]
 

Member Function Documentation

◆ AddItemOptions()

void BrokeProtocol.Entities.SvEntity.AddItemOptions ( ItemOption[] options)
inline

◆ AddSubscribedPlayer()

bool BrokeProtocol.Entities.SvEntity.AddSubscribedPlayer ( ShPlayer player,
bool sendInitData = true )
inline

◆ BuyEntity()

bool BrokeProtocol.Entities.SvEntity.BuyEntity ( ShPlayer buyer)
inline

◆ CheckUpdatable()

virtual bool BrokeProtocol.Entities.SvEntity.CheckUpdatable ( )
virtual

◆ Deactivate()

virtual void BrokeProtocol.Entities.SvEntity.Deactivate ( bool removeSectors)
inlinevirtual

◆ Destroy()

virtual void BrokeProtocol.Entities.SvEntity.Destroy ( )
inlinevirtual

◆ ExplosionDamage()

void BrokeProtocol.Entities.SvEntity.ExplosionDamage ( float range,
float damage,
ShPlayer attacker )
inline

◆ GetEntitySector()

Sector BrokeProtocol.Entities.SvEntity.GetEntitySector ( )
inline

◆ GetEvents< T >()

T BrokeProtocol.Entities.SvEntity.GetEvents< T > ( )
Type Constraints
T :EntityEvents 

◆ GetLocalInRange< T >()

HashSet< T > BrokeProtocol.Entities.SvEntity.GetLocalInRange< T > ( float range)
inline
Type Constraints
T :ShEntity 

◆ Initialize()

virtual void BrokeProtocol.Entities.SvEntity.Initialize ( )
inlinevirtual

◆ InitializeSectors()

virtual void BrokeProtocol.Entities.SvEntity.InitializeSectors ( )
virtual

◆ InitializeSender()

void BrokeProtocol.Entities.SvEntity.InitializeSender ( )
inline

◆ IsValidTarget()

virtual bool BrokeProtocol.Entities.SvEntity.IsValidTarget ( ShPlayer chaser)
virtual

◆ LocalEntitiesAll()

void BrokeProtocol.Entities.SvEntity.LocalEntitiesAll ( Func< ShEntity, bool > Test,
Action< ShEntity > Action )
inline

◆ LocalEntitiesOne()

bool BrokeProtocol.Entities.SvEntity.LocalEntitiesOne ( Func< ShEntity, bool > Test,
Func< ShEntity, bool > Action )
inline

◆ NewSector()

void BrokeProtocol.Entities.SvEntity.NewSector ( Sector newSector)
inline

◆ RemoveSectors()

void BrokeProtocol.Entities.SvEntity.RemoveSectors ( bool sendDeactivate)
inlineprotected

◆ RemoveSubscribedPlayer()

void BrokeProtocol.Entities.SvEntity.RemoveSubscribedPlayer ( ShPlayer player,
bool dispatch )
inline

◆ ResetOriginal()

virtual void BrokeProtocol.Entities.SvEntity.ResetOriginal ( )
virtual

◆ Respawn()

virtual void BrokeProtocol.Entities.SvEntity.Respawn ( )
virtual

◆ Restock()

virtual void BrokeProtocol.Entities.SvEntity.Restock ( float fraction = 1f)
inlinevirtual

◆ SameSector()

void BrokeProtocol.Entities.SvEntity.SameSector ( )

◆ Send() [1/2]

void BrokeProtocol.Entities.SvEntity.Send ( SvSendType sendType,
PacketFlags channel )

◆ Send() [2/2]

void BrokeProtocol.Entities.SvEntity.Send ( SvSendType sendType,
PacketFlags channel,
ClPacket packet,
params object[] args )
inline

◆ SendActivateToOther()

void BrokeProtocol.Entities.SvEntity.SendActivateToOther ( ShPlayer other)
inline

◆ SendDeactivateToOther()

void BrokeProtocol.Entities.SvEntity.SendDeactivateToOther ( ShPlayer other)
inline

◆ SendToAll()

void BrokeProtocol.Entities.SvEntity.SendToAll ( PacketFlags channel)
inlineprotected

◆ SendToAllOthers()

void BrokeProtocol.Entities.SvEntity.SendToAllOthers ( PacketFlags channel)
inlineprotected

◆ SendToLocal()

virtual void BrokeProtocol.Entities.SvEntity.SendToLocal ( PacketFlags channel)
protectedvirtual

◆ SendToLocalOthers()

void BrokeProtocol.Entities.SvEntity.SendToLocalOthers ( PacketFlags channel)
inlineprotected

◆ SendToPlayer()

void BrokeProtocol.Entities.SvEntity.SendToPlayer ( ShPlayer toPlayer,
PacketFlags channel )
inlineprotected

◆ SendToSelf()

virtual void BrokeProtocol.Entities.SvEntity.SendToSelf ( PacketFlags channel)
inlineprotectedvirtual

◆ SerializeAnimator()

SizedArray BrokeProtocol.Entities.SvEntity.SerializeAnimator ( )
inline

◆ SerializeParameters()

SizedArray BrokeProtocol.Entities.SvEntity.SerializeParameters ( )
inline

◆ Shop()

virtual void BrokeProtocol.Entities.SvEntity.Shop ( ShPlayer customer)
inlinevirtual

◆ SpawnFire()

void BrokeProtocol.Entities.SvEntity.SpawnFire ( )
inline

◆ SpawnOriginal()

void BrokeProtocol.Entities.SvEntity.SpawnOriginal ( )
inline

◆ SvAddDynamicAction()

void BrokeProtocol.Entities.SvEntity.SvAddDynamicAction ( string eventName,
string label )
inline

◆ SvAnimatorBool()

void BrokeProtocol.Entities.SvEntity.SvAnimatorBool ( string parameterName,
bool value )
inline

◆ SvAnimatorEnabled()

void BrokeProtocol.Entities.SvEntity.SvAnimatorEnabled ( bool enabled)
inline

◆ SvAnimatorFloat()

void BrokeProtocol.Entities.SvEntity.SvAnimatorFloat ( string parameterName,
float value )
inline

◆ SvAnimatorInt()

void BrokeProtocol.Entities.SvEntity.SvAnimatorInt ( string parameterName,
int value )
inline

◆ SvAnimatorTrigger()

void BrokeProtocol.Entities.SvEntity.SvAnimatorTrigger ( string parameterName)
inline

◆ SvDestroyEffect()

virtual void BrokeProtocol.Entities.SvEntity.SvDestroyEffect ( )
inlinevirtual

◆ SvRelocate() [1/2]

void BrokeProtocol.Entities.SvEntity.SvRelocate ( Transform t,
Transform parent = null )

◆ SvRelocate() [2/2]

virtual void BrokeProtocol.Entities.SvEntity.SvRelocate ( Vector3 position,
Quaternion rotation,
Transform parent = null )
inlinevirtual

◆ SvRemoveDynamicAction()

void BrokeProtocol.Entities.SvEntity.SvRemoveDynamicAction ( string eventName)
inline

◆ SvRestore()

virtual void BrokeProtocol.Entities.SvEntity.SvRestore ( Vector3 position,
Quaternion rotation,
int placeIndex )
inlinevirtual

◆ SvSetParent()

virtual void BrokeProtocol.Entities.SvEntity.SvSetParent ( Transform parent)
inlinevirtual

◆ SvSetScale()

void BrokeProtocol.Entities.SvEntity.SvSetScale ( Vector3 scale)
inline

◆ SvStartCustomVideo()

void BrokeProtocol.Entities.SvEntity.SvStartCustomVideo ( string url)
inline

◆ SvStartDefaultVideo()

void BrokeProtocol.Entities.SvEntity.SvStartDefaultVideo ( int index)
inline

◆ SvStopVideo()

void BrokeProtocol.Entities.SvEntity.SvStopVideo ( )
inline

◆ SyncAnimator()

IEnumerator BrokeProtocol.Entities.SvEntity.SyncAnimator ( )
inline

◆ TryAddHuman()

void BrokeProtocol.Entities.SvEntity.TryAddHuman ( Sector s)
inlineprotected

◆ TryRemoveHuman()

void BrokeProtocol.Entities.SvEntity.TryRemoveHuman ( Sector s)
inlineprotected

◆ UpdateDefaultItems()

void BrokeProtocol.Entities.SvEntity.UpdateDefaultItems ( )
inline

◆ WriteActivateData()

virtual void BrokeProtocol.Entities.SvEntity.WriteActivateData ( )
inlinevirtual

◆ WriteInitData()

virtual void BrokeProtocol.Entities.SvEntity.WriteInitData ( ref object[] initializeArgs,
bool isPlayer )
inlinevirtual

Member Data Documentation

◆ activateArgs

object [] BrokeProtocol.Entities.SvEntity.activateArgs

◆ animatorArray

byte [] BrokeProtocol.Entities.SvEntity.animatorArray
protected

◆ defaultItems

Dictionary<int, InventoryItem> BrokeProtocol.Entities.SvEntity.defaultItems

◆ destroyAfter

float BrokeProtocol.Entities.SvEntity.destroyAfter

◆ destroyEmpty

bool BrokeProtocol.Entities.SvEntity.destroyEmpty

◆ entity

ShEntity BrokeProtocol.Entities.SvEntity.entity

◆ events

readonly EntityEvents BrokeProtocol.Entities.SvEntity.events = new()
static

◆ instigator

ShPlayer BrokeProtocol.Entities.SvEntity.instigator

◆ itemOptions

ItemOption [] BrokeProtocol.Entities.SvEntity.itemOptions

◆ localSectors

Dictionary<ValueTuple<Place, Vector2Int>, Sector> BrokeProtocol.Entities.SvEntity.localSectors = new ()

◆ originalParent

Transform BrokeProtocol.Entities.SvEntity.originalParent

◆ originalPosition

Vector3 BrokeProtocol.Entities.SvEntity.originalPosition

◆ originalRotation

Quaternion BrokeProtocol.Entities.SvEntity.originalRotation

◆ parameterArray

byte [] BrokeProtocol.Entities.SvEntity.parameterArray
protected

◆ randomSpawn

bool BrokeProtocol.Entities.SvEntity.randomSpawn

◆ respawnable

bool BrokeProtocol.Entities.SvEntity.respawnable = true

◆ sector

Sector BrokeProtocol.Entities.SvEntity.sector

◆ sender

readonly Dictionary<SvSendType, Action<PacketFlags> > BrokeProtocol.Entities.SvEntity.sender = new ()
protected

◆ spawner

ShPlayer BrokeProtocol.Entities.SvEntity.spawner

◆ spectators

HashSet<ShPlayer> BrokeProtocol.Entities.SvEntity.spectators = new ()

◆ subscribers

IDCollection<ShPlayer> BrokeProtocol.Entities.SvEntity.subscribers

◆ svManager

SvManager BrokeProtocol.Entities.SvEntity.svManager

◆ videoURL

string BrokeProtocol.Entities.SvEntity.videoURL = string.Empty

Property Documentation

◆ CustomData

CustomData BrokeProtocol.Entities.SvEntity.CustomData = new ()
getset

◆ Events

virtual EntityEvents BrokeProtocol.Entities.SvEntity.Events
get

◆ ExteriorPosition

Vector3 BrokeProtocol.Entities.SvEntity.ExteriorPosition
get

◆ GetDoor

ShDoor BrokeProtocol.Entities.SvEntity.GetDoor
get

◆ OnOrigin

bool BrokeProtocol.Entities.SvEntity.OnOrigin
get

◆ RespawnTime

virtual float BrokeProtocol.Entities.SvEntity.RespawnTime
get

◆ SpawnRate

virtual float BrokeProtocol.Entities.SvEntity.SpawnRate
get

◆ WaypointProperty

virtual WaypointType BrokeProtocol.Entities.SvEntity.WaypointProperty
get

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