v1.4.4
This commit is contained in:
commit
9c94d113d3
10260 changed files with 1237388 additions and 0 deletions
38
assets/devel/stats/effects/ballistic/mechballistic.lua
Normal file
38
assets/devel/stats/effects/ballistic/mechballistic.lua
Normal 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
|
|
@ -0,0 +1,10 @@
|
|||
{
|
||||
"name" : "mechballistic",
|
||||
"effectConfig" : {
|
||||
},
|
||||
"defaultDuration" : 10,
|
||||
|
||||
"scripts" : [
|
||||
"mechballistic.lua"
|
||||
]
|
||||
}
|
17
assets/devel/stats/effects/devboost/devboost.animation
Normal file
17
assets/devel/stats/effects/devboost/devboost.animation
Normal file
|
@ -0,0 +1,17 @@
|
|||
{
|
||||
"particleEmitters" : {
|
||||
"devparticles" : {
|
||||
"enabled" : true,
|
||||
"emissionRate" : 5.0,
|
||||
"particles" : [
|
||||
]
|
||||
}
|
||||
},
|
||||
"lights" : {
|
||||
"glow" : {
|
||||
"active" : true,
|
||||
"position" : [0, 0],
|
||||
"color" : [200, 200, 200]
|
||||
}
|
||||
}
|
||||
}
|
31
assets/devel/stats/effects/devboost/devboost.lua
Normal file
31
assets/devel/stats/effects/devboost/devboost.lua
Normal 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
|
14
assets/devel/stats/effects/devboost/devboost.statuseffect
Normal file
14
assets/devel/stats/effects/devboost/devboost.statuseffect
Normal 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"
|
||||
}
|
24
assets/devel/stats/effects/devshooter/devshooter.lua
Normal file
24
assets/devel/stats/effects/devshooter/devshooter.lua
Normal 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
|
|
@ -0,0 +1,12 @@
|
|||
{
|
||||
"name" : "devshooter",
|
||||
"effectConfig" : {},
|
||||
"defaultDuration" : 5,
|
||||
|
||||
"scripts" : [
|
||||
"devshooter.lua"
|
||||
],
|
||||
|
||||
"label" : "HACKS",
|
||||
"icon" : "/interface/statuses/crash.png"
|
||||
}
|
34
assets/devel/stats/effects/messy/messy.lua
Normal file
34
assets/devel/stats/effects/messy/messy.lua
Normal 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
|
13
assets/devel/stats/effects/messy/messy.statuseffect
Normal file
13
assets/devel/stats/effects/messy/messy.statuseffect
Normal file
|
@ -0,0 +1,13 @@
|
|||
{
|
||||
"name" : "messy",
|
||||
"effectConfig" : {
|
||||
"object" : "poop",
|
||||
"offset" : [0, 0]
|
||||
},
|
||||
"defaultDuration" : 30,
|
||||
|
||||
"scripts" : [
|
||||
"messy.lua"
|
||||
]
|
||||
|
||||
}
|
13
assets/devel/stats/effects/salary/salary.lua
Normal file
13
assets/devel/stats/effects/salary/salary.lua
Normal 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
|
15
assets/devel/stats/effects/salary/salary.statuseffect
Normal file
15
assets/devel/stats/effects/salary/salary.statuseffect
Normal file
|
@ -0,0 +1,15 @@
|
|||
{
|
||||
"name" : "salary",
|
||||
"effectConfig" : {
|
||||
"item" : {
|
||||
"name" : "money",
|
||||
"count" : 1
|
||||
}
|
||||
},
|
||||
"defaultDuration" : 30,
|
||||
|
||||
"scripts" : [
|
||||
"salary.lua"
|
||||
]
|
||||
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue