This commit is contained in:
Aria 2025-03-21 22:23:30 +11:00
commit 9c94d113d3
Signed by untrusted user who does not match committer: aria
GPG key ID: 19AB7AA462B8AB3B
10260 changed files with 1237388 additions and 0 deletions

View file

@ -0,0 +1,51 @@
function init()
self.lastJump = false
self.lastBoostDirection = nil
self.energyUsagePerSecond = config.getParameter("energyUsagePerSecond")
self.boostSpeed = config.getParameter("boostSpeed")
self.boostControlForce = config.getParameter("boostControlForce")
end
function update(args)
local boostDirection
if not mcontroller.onGround() then
if not mcontroller.canJump() and args.moves["jump"] and not self.lastJump then
local diag = 1 / math.sqrt(2)
if args.moves["right"] and args.moves["up"] then
boostDirection = {self.boostSpeed * diag, self.boostSpeed * diag}
elseif args.moves["right"] and args.moves["down"] then
boostDirection = {self.boostSpeed * diag, -self.boostSpeed * diag}
elseif args.moves["left"] and args.moves["up"] then
boostDirection = {-self.boostSpeed * diag, self.boostSpeed * diag}
elseif args.moves["left"] and args.moves["down"] then
boostDirection = {-self.boostSpeed * diag, -self.boostSpeed * diag}
elseif args.moves["right"] then
boostDirection = {self.boostSpeed, 0}
elseif args.moves["down"] then
boostDirection = {0, -self.boostSpeed}
elseif args.moves["left"] then
boostDirection = {-self.boostSpeed, 0}
elseif args.moves["up"] then
boostDirection = {0, self.boostSpeed}
end
elseif args.moves["jump"] and self.lastBoostDirection then
boostDirection = self.lastBoostDirection
end
end
self.lastJump = args.moves["jump"]
self.lastBoostDirection = boostDirection
if boostDirection and status.overConsumeResource("energy", self.energyUsagePerSecond * args.dt) then
mcontroller.controlApproachVelocity(boostDirection, self.boostControlForce)
animator.setAnimationState("boosting", "on")
animator.setParticleEmitterActive("boostParticles", true)
else
animator.setAnimationState("boosting", "off")
animator.setParticleEmitterActive("boostParticles", false)
end
end

Binary file not shown.

After

Width:  |  Height:  |  Size: 655 B

View file

@ -0,0 +1,45 @@
{
"animatedParts" : {
"stateTypes" : {
"boosting" : {
"default" : "off",
"states" : {
"off" : {
},
"on" : {
"properties" : {
"persistentSound" : "/sfx/tech/tech_bubbleboost.ogg"
}
}
}
}
},
"parts" : {
"bubble" : {
"partStates" : {
"boosting" : {
"on" : {
"properties" : {
"centered" : true,
"image" : "bubble.png"
}
}
}
}
}
}
},
"particleEmitters" : {
"boostParticles" : {
"emissionRate" : 20.0,
"particles" : [
{
"particle" : "bubbleboost",
"offsetRegion" : [-1, -1.5, 1, 1.5]
}
]
}
}
}

View file

@ -0,0 +1,18 @@
{
"name" : "bubbleboost",
"type" : "legs",
"scripts" : ["booster.lua"],
"animator" : "bubbleboost.animation",
"description" : "Remind yourself of December 2013 with the Bubble Boost.",
"shortDescription" : "Bubble Boost",
"rarity" : "Legendary",
"icon" : "/tech/bubbleboost.png",
"chipCost" : 8,
"boostControlForce" : 750,
"boostSpeed" : 30,
"energyUsagePerSecond" : 0
}

View file

@ -0,0 +1,23 @@
{
"animatedParts" : {
"stateTypes" : {
"boosting" : {
"default" : "off",
"states" : {
"off" : {
},
"on" : {
}
}
}
}
},
"particleEmitters" : {
"boostParticles" : {
"emissionRate" : 0.0,
"particles" : [
]
}
}
}

View file

@ -0,0 +1,18 @@
{
"name" : "cameramanboost",
"type" : "legs",
"scripts" : ["booster.lua"],
"animator" : "cameramanboost.animation",
"description" : "Press and hold Jump in the air to float around.",
"shortDescription" : "Camera Man Boost",
"rarity" : "Legendary",
"icon" : "/tech/booster.png",
"chipCost" : 8,
"boostControlForce" : 5000,
"boostSpeed" : 8,
"energyUsagePerSecond" : 0
}