|
Broke Protocol Game API Reference
1.39
Code reference for server and client scripting
|
Public Member Functions | |
| JobInfoShared | GetJobInfoShared () |
| int | GetMaxExperience () |
| bool | CanEquip (ShEquipable e) |
| bool | CanWear (ShWearable w) |
| int | GetPlaceItemLimit () |
| bool | IsMount< T > (out T mount) |
| bool | IsPassenger (out ShMovable mount) |
| Vector3 | OriginOffset () |
| ShTransport | GetDeployable () |
| bool | TryGetCachedItem< T > (out T item) |
| void | Bind (int equipableIndex, byte slot) |
| void | Unbind (byte slot) |
| override void | PreInitialize (int ID) |
| override void | Initialize () |
| override void | Destroy () |
| void | ZeroInputs () |
| override void | ResetInputs () |
| float | Perlin (float scale) |
| void | TrySetInput (float x, float y, float z) |
| bool | TryUpdateMode (byte modeInput) |
| override float | GetSpeedLimit () |
| override void | SetRotation (Quaternion rotation) |
| bool | SetEquipable (int equipableIndex, bool resetAmmo) |
| ShAttachment | GetAttachment (int type) |
| bool | SetAttachment (int attachmentIndex, UnderbarrelSetting underbarrelSetting=UnderbarrelSetting.Default) |
| bool | SetAttachment (ShAttachment a, UnderbarrelSetting underbarrelSetting=UnderbarrelSetting.Default) |
| bool | BindAttachment (int attachmentIndex, byte slot) |
| bool | UnbindAttachment (int attachmentIndex, byte slot) |
| bool | SetWearable (int wearableIndex) |
| void | ResetMode () |
| void | SendFire (int mountableIndex) |
| void | Fire (int mountableIndex) |
| void | UpdateAmmo (ShMountable weapon) |
| ShItem | GetAmmoItem (bool underbarrel) |
| void | Consume (int index) |
| void | Orient (Vector2 delta) |
| override void | Die (ShPlayer attacker=null) |
| bool | IsShielded (DamageIndex damageIndex, Collider collider) |
| bool | IsBlocking (DamageIndex damageIndex) |
| override void | HitEffect (Collider collider, DamageIndex damageIndex, Vector3 point, Vector3 normal) |
| override void | Mounted (ShPlayer occupant, int seat) |
| void | SetStanceColliders (StanceIndex stanceIndex) |
| void | UpdateShieldEnabled () |
| void | SetStance (StanceIndex stanceIndex) |
| void | SetBody () |
| void | Mount (ShMountable mount, byte enterSeat) |
| override bool | InActionRange (ShEntity e) |
| int | GetLayer () |
| void | UpdateLayer () |
| void | Dismount () |
| void | Jump () |
| void | FinishTrade (bool isGood) |
| void | SetCapsuleHeight (float height) |
| override void | CleanUp () |
| override void | Restore (Vector3 position, Quaternion rotation, Transform placeT) |
| bool | CanCollectEntity (ShEntity e) |
| override void | Spawn (Vector3 position, Quaternion rotation, Transform placeT) |
| IEnumerator | Maintenance () |
| void | AddInjury (BodyPart part, BodyEffect effect, byte amount) |
| void | ClearInjuries () |
| void | RemoveInjury (int index) |
| void | UpdateInjuries () |
| override bool | IsAccessible (ShPlayer attempter, bool checkOwner) |
| bool | CanMount (ShMountable mount, bool checkOwner, bool checkRestrained, out byte seatIndex) |
| override void | DestroyExtras () |
| override bool | CanBeSearched (ShPlayer p) |
| void | SendSelfTransfer (byte deltaType, int itemIndex, int amount) |
| override void | TransferItem (byte deltaType, int itemIndex, int amount=1, bool dispatch=true) |
| void | CorrectMoveMode () |
| void | CheckEquipment (int itemIndex, int delta) |
| override void | AddToMyItems (int itemIndex, int amount, bool dispatch) |
| override void | RemoveFromMyItems (int itemIndex, int amount, bool dispatch) |
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.ShMountable | |
| virtual void | Reload () |
| void | UpdatePrimaryAmmo (int delta) |
| void | UpdateSecondaryAmmo (int delta) |
| virtual bool | CanUse () |
| virtual Vector3 | GetWeaponPosition () |
| virtual Vector3 | GetWeaponVector () |
| virtual void | ResetAmmo () |
| void | Rearm (float amount) |
| void | IncrementFireTime (float delay) |
| void | MountFire () |
Public Member Functions inherited from BrokeProtocol.Entities.ShEntity | |
| Bounds | GetWorldBounds () |
| override void | CheckSave () |
| float | GetLocalY (Vector3 worldPosition) |
| float | GetFlatAngle (Vector3 v) |
| 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) |
| 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) |
| byte[] | SerializeMyItems () |
| SizedArray | SerializeShop () |
| void | DeserializeMyItems (byte[] inventoryArray) |
| void | DeserializeShop (byte[] inventoryArray) |
| void | AddToTradeItems (int itemIndex, int amount) |
| void | RemoveFromTradeItems (int itemIndex, int amount) |
| 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) |
Protected Member Functions | |
| override void | MoveControlled () |
| override void | Move () |
| IEnumerator | ArmSway () |
| override void | UpdateMainColliders () |
| void | SetFriction (bool highFriction) |
| void | OnCollisionStay (Collision collision) |
| IEnumerator | SetEquipableFinish () |
| bool | SafeRemove (int itemIndex, int amount, bool dispatch) |
Protected Member Functions inherited from BrokeProtocol.Entities.ShPhysical | |
| void | FixedUpdate () |
| virtual void | MoveSimulated () |
Protected Member Functions inherited from BrokeProtocol.Entities.ShMountable | |
| void | DeltaClip (int delta) |
| IEnumerator | RearmLoop () |
| IEnumerator | MoveTurret () |
Protected Member Functions inherited from BrokeProtocol.Entities.ShEntity | |
| 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 | |
| readonly int[] | injuryDecay |
| Transform | rotationT |
| bool | armSway |
| float | switchFinishTime |
| float | jumpVelocity = 14f |
| Vector3 | climbableNormal |
Protected Attributes inherited from BrokeProtocol.Entities.ShPhysical | |
| Vector3 | lastPosition |
Static Protected Attributes | |
| const float | baseWeightLimit = 100f |
Properties | |
| bool | InOwnApartment [get] |
| int | PlaceItemCount [get] |
| override ShEntity | SpecEntity [get] |
| bool | LockOnValid [get] |
| ShWeapon | Hands [get] |
| ShEquipable | Surrender [get] |
| ShRestraint | Handcuffs [get] |
| bool | IsMountArmed [get] |
| ShMountable | ActiveWeapon [get] |
| bool | CanUpdateInputs [get] |
| bool | OutsideController [get] |
| bool | IsMountController [get] |
| GameObject | HiddenInterior [get] |
| bool | CanCrouch [get] |
| bool | CanJump [get] |
| bool | CanDeploy [get] |
| override Collider | Ground [get] |
| override Vector3 | Velocity [get, set] |
| override StanceIndex | GetStanceIndex [get] |
| bool | IsCapable [get] |
| bool | IsUp [get] |
| bool | IsMobile [get] |
| bool | CanFollow [get] |
| bool | InventoryLocked [get] |
| bool | IsRestrained [get] |
| bool | IsSurrendered [get] |
| bool | IsKnockedOut [get] |
| override Vector3 | CenterBuoyancy [get] |
| override Vector3 | GetOrigin [get] |
| override Transform | GetRotationT [get] |
| override Quaternion | GetRotation [get] |
| override SerializedParameters | Parameters [get] |
| override Type | EditorType [get] |
| override ShPlayer | Player [get] |
| override ShMountable | GetMount [get] |
| override bool | InWater [get] |
| override float | MountHealth [get] |
| ShMovable | GetControlled [get] |
| bool | IsSlow [get] |
| int | CurrentAmmoTotal [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] |
|
inline |
|
inlinevirtual |
Reimplemented from BrokeProtocol.Entities.ShEntity.
|
inlineprotected |
|
inline |
|
inline |
|
virtual |
Reimplemented from BrokeProtocol.Entities.ShEntity.
| bool BrokeProtocol.Entities.ShPlayer.CanCollectEntity | ( | ShEntity | e | ) |
| bool BrokeProtocol.Entities.ShPlayer.CanEquip | ( | ShEquipable | e | ) |
|
inline |
| bool BrokeProtocol.Entities.ShPlayer.CanWear | ( | ShWearable | w | ) |
|
inline |
|
inlinevirtual |
Reimplemented from BrokeProtocol.Entities.ShMountable.
|
inline |
|
inline |
|
inline |
|
inlinevirtual |
Reimplemented from BrokeProtocol.Entities.ShEntity.
|
inlinevirtual |
Reimplemented from BrokeProtocol.Entities.ShEntity.
|
inlinevirtual |
Reimplemented from BrokeProtocol.Entities.ShDestroyable.
|
inline |
|
inline |
|
inline |
| ShItem BrokeProtocol.Entities.ShPlayer.GetAmmoItem | ( | bool | underbarrel | ) |
| ShAttachment BrokeProtocol.Entities.ShPlayer.GetAttachment | ( | int | type | ) |
| ShTransport BrokeProtocol.Entities.ShPlayer.GetDeployable | ( | ) |
| JobInfoShared BrokeProtocol.Entities.ShPlayer.GetJobInfoShared | ( | ) |
|
inline |
|
inline |
|
inline |
|
inlinevirtual |
Reimplemented from BrokeProtocol.Entities.ShMovable.
|
inlinevirtual |
Reimplemented from BrokeProtocol.Entities.ShDamageable.
|
virtual |
Reimplemented from BrokeProtocol.Entities.ShEntity.
|
inlinevirtual |
Reimplemented from BrokeProtocol.Entities.ShPhysical.
|
virtual |
Reimplemented from BrokeProtocol.Entities.ShMountable.
| bool BrokeProtocol.Entities.ShPlayer.IsBlocking | ( | DamageIndex | damageIndex | ) |
|
inline |
| bool BrokeProtocol.Entities.ShPlayer.IsPassenger | ( | out ShMovable | mount | ) |
| bool BrokeProtocol.Entities.ShPlayer.IsShielded | ( | DamageIndex | damageIndex, |
| Collider | collider ) |
| void BrokeProtocol.Entities.ShPlayer.Jump | ( | ) |
|
inline |
|
inline |
|
inlinevirtual |
Reimplemented from BrokeProtocol.Entities.ShMountable.
|
inlineprotectedvirtual |
Reimplemented from BrokeProtocol.Entities.ShMovable.
|
inlineprotectedvirtual |
Reimplemented from BrokeProtocol.Entities.ShMovable.
|
inlineprotected |
|
inline |
|
inline |
| float BrokeProtocol.Entities.ShPlayer.Perlin | ( | float | scale | ) |
|
inlinevirtual |
Reimplemented from BrokeProtocol.Entities.ShMountable.
|
inlinevirtual |
Reimplemented from BrokeProtocol.Entities.ShEntity.
|
inline |
|
inlinevirtual |
Reimplemented from BrokeProtocol.Entities.ShMountable.
|
inline |
|
inlinevirtual |
Reimplemented from BrokeProtocol.Entities.ShPhysical.
|
inlineprotected |
|
inline |
| void BrokeProtocol.Entities.ShPlayer.SendSelfTransfer | ( | byte | deltaType, |
| int | itemIndex, | ||
| int | amount ) |
| bool BrokeProtocol.Entities.ShPlayer.SetAttachment | ( | int | attachmentIndex, |
| UnderbarrelSetting | underbarrelSetting = UnderbarrelSetting.Default ) |
|
inline |
|
inline |
|
inline |
|
inline |
|
inlineprotected |
|
inlineprotected |
|
virtual |
Reimplemented from BrokeProtocol.Entities.ShEntity.
|
inline |
|
inline |
|
inline |
|
inlinevirtual |
Reimplemented from BrokeProtocol.Entities.ShPhysical.
|
inlinevirtual |
Reimplemented from BrokeProtocol.Entities.ShEntity.
|
inline |
| T | : | ShItem |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inlineprotectedvirtual |
Reimplemented from BrokeProtocol.Entities.ShEntity.
| void BrokeProtocol.Entities.ShPlayer.UpdateShieldEnabled | ( | ) |
| void BrokeProtocol.Entities.ShPlayer.ZeroInputs | ( | ) |
| float BrokeProtocol.Entities.ShPlayer.armorLevel |
|
protected |
|
staticprotected |
| Binding [] BrokeProtocol.Entities.ShPlayer.bindings |
| bool BrokeProtocol.Entities.ShPlayer.boss |
| Dictionary<Type, int> BrokeProtocol.Entities.ShPlayer.cachedItems = new () |
| CapsuleCollider BrokeProtocol.Entities.ShPlayer.capsule |
| CharacterType BrokeProtocol.Entities.ShPlayer.characterType |
| ushort BrokeProtocol.Entities.ShPlayer.chatChannel |
| ChatMode BrokeProtocol.Entities.ShPlayer.chatMode |
|
protected |
| ClimbState BrokeProtocol.Entities.ShPlayer.climbState |
| ClPlayer BrokeProtocol.Entities.ShPlayer.clPlayer |
| ShEquipable BrokeProtocol.Entities.ShPlayer.curEquipable |
| ShMountable BrokeProtocol.Entities.ShPlayer.curMount |
| Transform BrokeProtocol.Entities.ShPlayer.curMountT |
| ShWearable [] BrokeProtocol.Entities.ShPlayer.curWearables = new ShWearable[Enum.GetNames(typeof(WearableType)).Length] |
| string BrokeProtocol.Entities.ShPlayer.displayName |
| int BrokeProtocol.Entities.ShPlayer.experience |
| byte BrokeProtocol.Entities.ShPlayer.fireIndex |
| string BrokeProtocol.Entities.ShPlayer.hands |
| Collider BrokeProtocol.Entities.ShPlayer.headCollider |
| List<Injury> BrokeProtocol.Entities.ShPlayer.injuries = new () |
| float [] BrokeProtocol.Entities.ShPlayer.injuryAmount = new float[(int)BodyPart.Count] |
|
protected |
| Vector3 BrokeProtocol.Entities.ShPlayer.input |
|
protected |
| Language BrokeProtocol.Entities.ShPlayer.language |
| bool BrokeProtocol.Entities.ShPlayer.lockedTrade |
| ShEntity BrokeProtocol.Entities.ShPlayer.lockOnTarget |
| float BrokeProtocol.Entities.ShPlayer.lockOnTime |
| byte BrokeProtocol.Entities.ShPlayer.mode |
| Vector3 BrokeProtocol.Entities.ShPlayer.moveFactor = new(12f, 12f, 12f) |
| Transform BrokeProtocol.Entities.ShPlayer.originT |
| ShEntity BrokeProtocol.Entities.ShPlayer.otherEntity |
| Dictionary<ShApartment, Place> BrokeProtocol.Entities.ShPlayer.ownedApartments = new () |
| HashSet<ShTransport> BrokeProtocol.Entities.ShPlayer.ownedTransports = new () |
| bool BrokeProtocol.Entities.ShPlayer.pointing |
| int BrokeProtocol.Entities.ShPlayer.rank |
|
protected |
| byte BrokeProtocol.Entities.ShPlayer.seat |
| BoxCollider BrokeProtocol.Entities.ShPlayer.shieldCollider |
| ShPlayer BrokeProtocol.Entities.ShPlayer.specPlayer |
| StanceType BrokeProtocol.Entities.ShPlayer.stance |
| StanceType [] BrokeProtocol.Entities.ShPlayer.stances |
| float [] BrokeProtocol.Entities.ShPlayer.stats = new float[] { 1f, 1f, 1f } |
| string BrokeProtocol.Entities.ShPlayer.surrender |
| SvPlayer BrokeProtocol.Entities.ShPlayer.svPlayer |
|
protected |
| bool BrokeProtocol.Entities.ShPlayer.switching |
| string BrokeProtocol.Entities.ShPlayer.username |
| WearableOptions [] BrokeProtocol.Entities.ShPlayer.wearableOptions |
| float BrokeProtocol.Entities.ShPlayer.weight |
| float BrokeProtocol.Entities.ShPlayer.weightLimit = baseWeightLimit |
|
get |
|
get |
|
get |
|
get |
|
get |
|
get |
|
get |
|
get |
|
get |
|
get |
|
get |
|
get |
|
get |
|
get |
|
get |
|
get |
|
get |
|
get |
|
get |
|
get |
|
get |
|
get |
|
get |
|
get |
|
get |
|
get |
|
get |
|
get |
|
get |
|
get |
|
get |
|
get |
|
get |
|
get |
|
get |
|
get |
|
get |
|
get |
|
get |
|
getset |