Interface IPlaceBuildableRequestedEvent
- Namespace
- Uncreated.Warfare.Events.Models.Buildables
- Assembly
- Uncreated.Warfare.dll
Base event for when a barricade or structure is placed.
public interface IPlaceBuildableRequestedEvent : ICancellable
- Inherited Members
Properties
Asset
The asset of the buildable being placed.
ItemPlaceableAsset Asset { get; }
Property Value
- ItemPlaceableAsset
GroupOwner
The group that owns the buildable's Steam ID, or Steamworks.CSteamID.Nil.
CSteamID GroupOwner { get; set; }
Property Value
- CSteamID
Remarks
This can be changed.
HitTarget
Buildable place target (where the player was looking). This could be a vehicle in which case barricades will be planted.
Transform? HitTarget { get; }
Property Value
- Transform
Remarks
If this is a vehicle, it will be stored in TargetVehicle.
IsOnVehicle
If this buildable is being placed on a vehicle.
bool IsOnVehicle { get; }
Property Value
IsStructure
If the buildable being placed is a structure.
bool IsStructure { get; }
Property Value
Item
The SDG.Unturned.Barricade or SDG.Unturned.Structure of the buildable.
object Item { get; }
Property Value
OriginalPlacer
The player that initially tried to place the barricade.
WarfarePlayer OriginalPlacer { get; }
Property Value
Owner
The player that owns the buildable's Steam ID, or Steamworks.CSteamID.Nil.
CSteamID Owner { get; set; }
Property Value
- CSteamID
Remarks
This can be changed.
Position
The exact position of the buildable.
Vector3 Position { get; set; }
Property Value
- Vector3
Remarks
This can be changed.
Exceptions
- ArgumentException
Position is not in a region when not planted.
RegionPosition
Coordinate of the region the buildable was placed in.
RegionCoord RegionPosition { get; }
Property Value
- RegionCoord
Rotation
The exact rotation of the buildable.
Quaternion Rotation { get; set; }
Property Value
- Quaternion
Remarks
This can be changed.
TargetVehicle
The vehicle the buildable will be placed on, if any.
InteractableVehicle? TargetVehicle { get; }
Property Value
- InteractableVehicle
Methods
GetItem<TData>()
Get Item as either a SDG.Unturned.Barricade or SDG.Unturned.Structure.
TData GetItem<TData>() where TData : class
Returns
- TData
Type Parameters
TData