enderalse/scripts/source/_00e_playerhousing_furniture.psc

26 lines
1.1 KiB
Plaintext

scriptname _00E_Playerhousing_Furniture extends ObjectReference
{A manipulatable housing object while being in the world}
_00E_Playerhousing_FurnitureItem Property furnitureItem auto hidden
{Set by Playerhousing_FurnitureItem when placing this Furniture}
_00E_Playerhousing_FurnitureItem function getFurnitureItem()
return furnitureItem
Endfunction
bool function shouldActivateBePossible()
return !((self as ObjectReference) as _00E_Playerhousing_FurnitureItem) ; if the _00E_Playerhousing_FurnitureItem script is on this object, activating means taking
Endfunction
function finishPlacement()
{this function is called when the furniture object is at the right position and being placed; use e.g. for light}
blockActivation(true)
disable()
enable()
; in case we place a mannequin, we need to store its position
If self.GetBaseObject() == Game.GetFormFromFile(0x00141028, "Skyrim.esm")
ObjectReference akNPC = self as ObjectReference
(akNPC as _00E_Playerhousing_MannequinControl).setForcePosition(akNPC.GetPositionX(), akNPC.GetPositionY(), akNPC.GetPositionZ(), akNPC.GetAngleX(), akNPC.GetAngleY(), akNPC.GetAngleZ())
EndIf
Endfunction