v1.4.4
This commit is contained in:
commit
9c94d113d3
10260 changed files with 1237388 additions and 0 deletions
BIN
assets/devel/vehicles/modularmech/arm/playerlauncher.png
Normal file
BIN
assets/devel/vehicles/modularmech/arm/playerlauncher.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 2.5 KiB |
|
@ -0,0 +1,35 @@
|
|||
require "/vehicles/modularmech/armscripts/base.lua"
|
||||
|
||||
PlayerLauncher = MechArm:extend()
|
||||
|
||||
function PlayerLauncher:init()
|
||||
self.reloadTimer = 0
|
||||
self.bobLocked = true
|
||||
-- vehicle.setLoungeStatusEffects("z" .. self.armName .. "Seat", {"mechballistic"})
|
||||
end
|
||||
|
||||
function PlayerLauncher:update(dt)
|
||||
if aimPosition then
|
||||
animator.rotateTransformationGroup(self.armName, self.aimAngle, self.shoulderOffset)
|
||||
|
||||
self.reloadTimer = math.max(0, self.reloadTimer - dt)
|
||||
if self.fireTriggered and self.reloadTimer == 0 then
|
||||
self.reloadTimer = self.reloadTime
|
||||
animator.playSound(self.armName .. "Fire")
|
||||
animator.setAnimationState(self.armName, "winddown", true)
|
||||
vehicle.setLoungeStatusEffects("z" .. self.armName .. "Seat", {"mechballistic"})
|
||||
elseif self.reloadTimer > 0 then
|
||||
-- vehicle.setLoungeStatusEffects("z" .. self.armName .. "Seat", {})
|
||||
-- vehicle.setLoungeEnabled("z" .. self.armName .. "Seat", false)
|
||||
else
|
||||
vehicle.setLoungeStatusEffects("z" .. self.armName .. "Seat", {})
|
||||
vehicle.setLoungeEnabled("z" .. self.armName .. "Seat", true)
|
||||
animator.setAnimationState(self.armName, "rotate")
|
||||
|
||||
end
|
||||
else
|
||||
vehicle.setLoungeStatusEffects("z" .. self.armName .. "Seat", {})
|
||||
vehicle.setLoungeEnabled("z" .. self.armName .. "Seat", false)
|
||||
animator.setAnimationState(self.armName, "idle")
|
||||
end
|
||||
end
|
43
assets/devel/vehicles/modularmech/mechparts_arm.config.patch
Normal file
43
assets/devel/vehicles/modularmech/mechparts_arm.config.patch
Normal file
|
@ -0,0 +1,43 @@
|
|||
[
|
||||
{
|
||||
"op" : "add",
|
||||
"path" : "/playerlauncher",
|
||||
"value" : {
|
||||
"stats" : {
|
||||
"power" : 3,
|
||||
"energy" : 0
|
||||
},
|
||||
"partParameters" : {
|
||||
"script" : "/vehicles/modularmech/armscripts/playerlauncher.lua",
|
||||
"armClass" : "PlayerLauncher",
|
||||
|
||||
"rotationLimits" : [-0.5, 1.0],
|
||||
|
||||
"reloadTime" : 0.3
|
||||
},
|
||||
"loungePositions" : {
|
||||
"z<armName>Seat" : { // name needs a 'z' to sort after the main seat
|
||||
"part" : "<armName>",
|
||||
"partAnchor" : "sitPosition",
|
||||
"orientation" : "sit",
|
||||
"cameraFocus" : true,
|
||||
"enabled" : false
|
||||
}
|
||||
},
|
||||
"partImages" : {
|
||||
"<armName>" : "arm/playerlauncher.png",
|
||||
"<armName>Fullbright" : ""
|
||||
},
|
||||
"defaultPrimaryColors" : ["f4988c", "d93a3a", "932625", "601119"],
|
||||
"defaultSecondaryColors" : ["838383", "555555", "383838", "151515"],
|
||||
"animationCustom" : {
|
||||
"animatedParts" : { "parts" : { "<armName>" : { "properties" : {
|
||||
"sitPosition" : [4.5, 4.5]
|
||||
}}}},
|
||||
"sounds" : {
|
||||
"<armName>Fire" : [ "/sfx/gun/crossbow1.ogg" ]
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
Loading…
Add table
Add a link
Reference in a new issue