enderalse/source/scripts/_00e_playerhousing_furnitureitem.psc

43 lines
1.7 KiB
Plaintext

scriptname _00E_Playerhousing_FurnitureItem extends ObjectReference
{A manipulatable housing object while being in the players inventory}
ActorBase Property _MANNEQUIN_toCreate auto
Furniture Property _FURNITURE_toCreate auto
Container Property _CONTAINER_toCreate auto
Light Property _LIGHT_toCreate auto
MiscObject Property _MISC_toCreate Auto
Activator Property _ACTIVATOR_toCreate Auto
_00E_PlayerhousingMaster Property master Auto
Event OnContainerChanged(ObjectReference akNewContainer, ObjectReference akOldContainer)
If akNewContainer == None
If master == None
master = _00E_PlayerhousingMaster.GetMaster()
EndIf
master.playerItemDropped(Self)
EndIf
EndEvent
_00E_Playerhousing_Furniture Function placeFurnitureAtMe()
_00E_Playerhousing_Furniture result = None
If _MANNEQUIN_toCreate
result = PlaceAtMe(_MANNEQUIN_toCreate, abForcePersist = True, abInitiallyDisabled = True) as _00E_Playerhousing_Furniture
ElseIf _FURNITURE_toCreate
result = PlaceAtMe(_FURNITURE_toCreate, abInitiallyDisabled = True) as _00E_Playerhousing_Furniture
ElseIf _CONTAINER_toCreate
result = PlaceAtMe(_CONTAINER_toCreate, abInitiallyDisabled = True) as _00E_Playerhousing_Furniture
ElseIf _LIGHT_toCreate
result = PlaceAtMe(_LIGHT_toCreate, abInitiallyDisabled = True) as _00E_Playerhousing_Furniture
ElseIf _ACTIVATOR_toCreate
result = PlaceAtMe(_ACTIVATOR_toCreate, abInitiallyDisabled = True) as _00E_Playerhousing_Furniture
ElseIf _MISC_toCreate
result = PlaceAtMe(_MISC_toCreate, abInitiallyDisabled = True) as _00E_Playerhousing_Furniture
EndIf
If result == None
Debug.MessageBox("ERROR: *_toCreate property in playerhousingfurnitureitem is no furnitureitem, please write a bugticket")
EndIf
Return result
EndFunction