2021-10-05 22:15:58 +00:00
|
|
|
scriptname _00E_Playerhousing_FurnitureItem extends ObjectReference
|
|
|
|
{A manipulatable housing object while being in the players inventory}
|
|
|
|
|
2021-10-12 02:10:35 +00:00
|
|
|
ActorBase Property _MANNEQUIN_toCreate auto
|
|
|
|
Furniture Property _FURNITURE_toCreate auto
|
2021-10-05 22:15:58 +00:00
|
|
|
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)
|
2021-10-12 02:10:35 +00:00
|
|
|
If akNewContainer == None
|
|
|
|
If master == None
|
|
|
|
master = _00E_PlayerhousingMaster.GetMaster()
|
|
|
|
EndIf
|
|
|
|
master.playerItemDropped(Self)
|
|
|
|
EndIf
|
|
|
|
EndEvent
|
2021-10-05 22:15:58 +00:00
|
|
|
|
2021-10-12 02:10:35 +00:00
|
|
|
_00E_Playerhousing_Furniture Function placeFurnitureAtMe()
|
2021-10-05 22:15:58 +00:00
|
|
|
_00E_Playerhousing_Furniture result = None
|
2021-10-12 02:10:35 +00:00
|
|
|
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
|
2021-10-05 22:15:58 +00:00
|
|
|
Debug.MessageBox("ERROR: *_toCreate property in playerhousingfurnitureitem is no furnitureitem, please write a bugticket")
|
2021-10-12 02:10:35 +00:00
|
|
|
EndIf
|
|
|
|
|
|
|
|
Return result
|
|
|
|
EndFunction
|