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,38 @@
require "/scripts/rect.lua"
function init()
mcontroller.resetAnchorState()
local vector = vec2.rotate({1, 0}, mcontroller.rotation())
if vector[1] < 0 then
vector = vec2.rotate(vector, -0.2)
else
vector = vec2.rotate(vector, 0.2)
end
local ballisticVelocity = vec2.mul(vector, 50)
mcontroller.setVelocity(ballisticVelocity)
end
function update(dt)
local stickingDirection = mcontroller.stickingDirection()
if not stickingDirection then
local angle = vec2.angle(mcontroller.velocity())
mcontroller.setRotation(angle - math.pi / 2)
else
self.expireOnMove = true
end
if self.expireOnMove and (mcontroller.running() or mcontroller.walking()) then
effect.expire()
end
mcontroller.controlParameters({
standingPoly = { {-0.75, -2.0}, {-0.35, -2.5}, {0.35, -2.5}, {0.75, -2.0}, {0.75, -0.5}, {0.35, 0.25}, {-0.35, 0.25}, {-0.75, -0.5} },
stickyCollision = true,
stickyForce = 500
})
end
function uninit()
mcontroller.setRotation(0)
mcontroller.setPosition(vec2.add(mcontroller.position(), {0, 1}))
end

View file

@ -0,0 +1,10 @@
{
"name" : "mechballistic",
"effectConfig" : {
},
"defaultDuration" : 10,
"scripts" : [
"mechballistic.lua"
]
}

View file

@ -0,0 +1,17 @@
{
"particleEmitters" : {
"devparticles" : {
"enabled" : true,
"emissionRate" : 5.0,
"particles" : [
]
}
},
"lights" : {
"glow" : {
"active" : true,
"position" : [0, 0],
"color" : [200, 200, 200]
}
}
}

View file

@ -0,0 +1,31 @@
function init()
animator.setParticleEmitterOffsetRegion("devparticles", mcontroller.boundBox())
animator.setParticleEmitterActive("devparticles", true)
effect.addStatModifierGroup({
{stat = "fallDamageMultiplier", effectiveMultiplier = 0}
})
script.setUpdateDelta(5)
end
function update(dt)
mcontroller.controlParameters({
groundForce = 500,
airForce = 50,
gravityMultiplier = 1.5,
airJumpProfile = {
autoJump = true
},
liquidBuoyancy = -1.0
})
mcontroller.controlModifiers({
airJumpModifier = 2.5,
liquidJumpModifier = 2.5,
speedModifier = 5,
liquidMovementModifier = 5
})
end
function uninit()
end

View file

@ -0,0 +1,14 @@
{
"name" : "devboost",
"effectConfig" : {},
"defaultDuration" : 5,
"scripts" : [
"devboost.lua"
],
"animationConfig" : "devboost.animation",
"label" : "Jump Boost",
"icon" : "/animations/cat/cat.png?scalenearest=0.0625"
}

View file

@ -0,0 +1,24 @@
require "/scripts/vec2.lua"
function init()
script.setUpdateDelta(20)
end
function update(dt)
local targetIds = world.entityQuery(mcontroller.position(), 30, {
withoutEntityId = entity.id(),
includedTypes = {"creature"},
order = "nearest"
})
for i,id in ipairs(targetIds) do
if entity.isValidTarget(id) and not world.lineTileCollision(mcontroller.position(), world.entityPosition(id)) then
local directionTo = vec2.norm(world.distance(world.entityPosition(id), mcontroller.position()))
world.spawnProjectile("teslabolt", mcontroller.position(), entity.id(), directionTo, false, {speed = 100, power = 999})
end
end
end
function uninit()
end

View file

@ -0,0 +1,12 @@
{
"name" : "devshooter",
"effectConfig" : {},
"defaultDuration" : 5,
"scripts" : [
"devshooter.lua"
],
"label" : "HACKS",
"icon" : "/interface/statuses/crash.png"
}

View file

@ -0,0 +1,34 @@
require "/scripts/vec2.lua"
require "/scripts/pathutil.lua"
function init()
self.object = config.getParameter("object")
self.placementOffset = config.getParameter("offset", {0, 0})
self.ready = false
self.health = status.resource("health")
end
function floorPosition()
local bounds = mcontroller.boundBox()
local headPosition = findGroundPosition(mcontroller.position(), -5, 2, true)
if not headPosition then
return nil
end
return { headPosition[1], headPosition[2] + bounds[2] }
end
function update(dt)
if self.health > status.resource("health") then
self.ready = true
end
if self.ready then
local position = floorPosition()
if position then
position = vec2.add(position, self.placementOffset)
if world.placeObject(self.object, position) then
self.ready = false
end
end
end
self.health = status.resource("health")
end

View file

@ -0,0 +1,13 @@
{
"name" : "messy",
"effectConfig" : {
"object" : "poop",
"offset" : [0, 0]
},
"defaultDuration" : 30,
"scripts" : [
"messy.lua"
]
}

View file

@ -0,0 +1,13 @@
require "/scripts/vec2.lua"
function init()
self.item = config.getParameter("item")
self.health = status.resource("health")
end
function update(dt)
if self.health > status.resource("health") then
world.spawnItem(self.item.name, mcontroller.position(), self.item.count)
end
self.health = status.resource("health")
end

View file

@ -0,0 +1,15 @@
{
"name" : "salary",
"effectConfig" : {
"item" : {
"name" : "money",
"count" : 1
}
},
"defaultDuration" : 30,
"scripts" : [
"salary.lua"
]
}