Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- print("### Default Outpost Omega Extension Mod ###")
- print("### Written by MaxKhl (maxkhl.com) ###")
- print("Building 'NiceObject'")
- builder = NewBuilder()
- builder.ClassName = "NiceObject"
- builder:SetParent("OutpostOmega.Game.gObject.structure.machinery.machinery")
- builder:AddAttribute("OutpostOmega.Game.gObject.attributes.Definition", {"Nice Object", "What a nice object. Holy sheeet"})
- builder:AddAttribute("OutpostOmega.Game.gObject.attributes.Construction", { getType("OutpostOmega.Game.gObject.structure.Frame"), getType("OutpostOmega.Game.gObject.item.tool") })
- builder:Hook("Constructor",
- function(myObject)
- model = myObject:LoadModel(GetFirstContent("CubeModel"))
- model:AssignTexture("Cube", GetFirstContent("CubeTexture"))
- --Setup physics
- myObject.Shape = PhysicBoxShape(2, 2, 2) --X,Y,Z (Y = UP)
- myObject.Mass = 20
- myObject.Static = true
- myObject:PhysicCreateMaterial() --Create the shapes material (needed to apply mass)
- myObject:PhysicEnable() --Tell engine we are done
- myObject.PhysicEnableDebug() --Needs to be enabled to see shape in debugging mode
- end)
- --builder:Hook("RequestFunction",
- --function(myObject, Key, IsRepeat)
- -- return
- --end)
- newType = builder:Compile()
- print("Object compiled. Mod fully loaded")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement