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,48 @@
{
"animatedParts" : {
"stateTypes" : {
"moving" : {
"default" : "off",
"states" : {
"off" : {},
"on" : {
"properties" : {
"persistentSound" : "/sfx/tech/forcefield_loop.ogg"
}
}
}
}
},
"parts" : {
"base" : {
"properties" : {
"offset" : [0, -1],
"centered" : false,
"image" : "<partImage>"
}
},
"platform" : {
"properties" : {
"centered" : true,
"transformationGroups" : ["platform"],
"image" : "<partImage>",
"zLevel" : 1
}
}
}
},
"transformationGroups" : {
"platform" : {
"interpolated" : true
}
},
"sounds" : {
"changeDir" : {
"pool" : [ "/sfx/blocks/footstep_lightmetal.ogg" ]
}
}
}

View file

@ -0,0 +1,61 @@
{
"objectName" : "longhorizontalrightmovingplatform",
"objectType" : "physics",
"colonyTags" : ["wired"],
"printable" : false,
"rarity" : "Rare",
"category" : "wire",
"price" : 100,
"description" : "A moving platform.",
"shortdescription" : "Moving Platform",
"race" : "generic",
"apexDescription" : "A moving platform.",
"avianDescription" : "A moving platform.",
"floranDescription" : "A moving platform.",
"glitchDescription" : "A moving platform.",
"humanDescription" : "A moving platform.",
"hylotlDescription" : "A moving platform.",
"inventoryIcon" : "platform.png",
"orientations" : [
{
"direction" : "right",
"image" : "longhorizontalrightstand.png",
"imagePosition" : [0, -8],
"spaceScan" : 0.1,
"anchors" : [ "left" ]
}
],
"scripts" : [ "movingplatform.lua" ],
"scriptDelta" : 1,
"animation" : "horizontalmovingplatform.animation",
"animationParts" : {
"base" : "longhorizontalrightstand.png",
"platform" : "platform.png"
},
"inputNodes" : [[0, 0]],
"physicsCollisions" : {
"platform" : {
"collision" : [
[-2, -0.35],
[2, -0.35],
[2, 0.35],
[-2, 0.35]
],
"collisionKind" : "platform",
"position" : [2, 0]
}
},
"platformStart" : [2, 0],
"platformEnd" : [16, 0],
"platformMoveTime" : 2
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

View file

@ -0,0 +1,72 @@
require "/scripts/vec2.lua"
require "/scripts/poly.lua"
function init()
self.cycle = 0
self.dir = 0
self.platformStart = config.getParameter("platformStart")
self.platformEnd = config.getParameter("platformEnd")
self.platformMoveTime = config.getParameter("platformMoveTime")
end
function getMode()
if not object.isInputNodeConnected(0) then
return "bounce"
elseif object.getInputNodeLevel(0) then
return "toend"
else
return "tostart"
end
end
function update()
local mode = getMode()
local cycle = self.cycle
local dir = self.dir
if mode == "tostart" then
if cycle > 0.0 then
dir = -1
else
dir = 0
end
elseif mode == "toend" then
if cycle < 1.0 then
dir = 1
else
dir = 0
end
else
if dir == 0 then
dir = 1
end
if cycle == 1.0 then
dir = -1
elseif cycle == 0.0 then
dir = 1
end
end
cycle = cycle + script.updateDt() / self.platformMoveTime * self.dir
cycle = math.min(math.max(cycle, 0.0), 1.0)
if dir == 0 then
animator.setAnimationState("moving", "off")
else
animator.setAnimationState("moving", "on")
end
local pos = vec2.add(vec2.mul(self.platformStart, 1.0 - cycle), vec2.mul(self.platformEnd, cycle))
physics.setCollisionPosition("platform", pos)
animator.resetTransformationGroup("platform")
animator.translateTransformationGroup("platform", pos)
if dir ~= self.dir then
animator.playSound("changeDir")
end
self.cycle = cycle
self.dir = dir
end

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

View file

@ -0,0 +1,59 @@
{
"objectName" : "shorthorizontalrightmovingplatform",
"objectType" : "physics",
"colonyTags" : ["wired"],
"printable" : false,
"rarity" : "Rare",
"category" : "wire",
"price" : 100,
"description" : "A moving platform.",
"shortdescription" : "Moving Platform",
"race" : "generic",
"apexDescription" : "A moving platform.",
"avianDescription" : "A moving platform.",
"floranDescription" : "A moving platform.",
"glitchDescription" : "A moving platform.",
"humanDescription" : "A moving platform.",
"hylotlDescription" : "A moving platform.",
"inventoryIcon" : "platform.png",
"orientations" : [
{
"direction" : "right",
"image" : "shorthorizontalrightstand.png",
"imagePosition" : [0, -8],
"spaceScan" : 0.1,
"anchors" : [ "left" ]
}
],
"scripts" : [ "movingplatform.lua" ],
"scriptDelta" : 1,
"animation" : "horizontalmovingplatform.animation",
"animationParts" : {
"base" : "shorthorizontalrightstand.png",
"platform" : "platform.png"
},
"physicsCollisions" : {
"platform" : {
"collision" : [
[-2, -0.35],
[2, -0.35],
[2, 0.35],
[-2, 0.35]
],
"collisionKind" : "platform",
"position" : [2, 0]
}
},
"platformStart" : [2, 0],
"platformEnd" : [8, 0],
"platformMoveTime" : 1
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

View file

@ -0,0 +1,61 @@
{
"objectName" : "shortverticalmovingplatform",
"objectType" : "physics",
"colonyTags" : ["wired"],
"printable" : false,
"rarity" : "Rare",
"category" : "wire",
"price" : 100,
"description" : "A moving platform.",
"shortdescription" : "Moving Platform",
"race" : "generic",
"apexDescription" : "A moving platform.",
"avianDescription" : "A moving platform.",
"floranDescription" : "A moving platform.",
"glitchDescription" : "A moving platform.",
"humanDescription" : "A moving platform.",
"hylotlDescription" : "A moving platform.",
"inventoryIcon" : "platform.png",
"orientations" : [
{
"direction" : "right",
"image" : "shortverticalstand.png",
"imagePosition" : [-8, 0],
"spaceScan" : 0.1,
"anchors" : [ "bottom" ]
}
],
"scripts" : [ "movingplatform.lua" ],
"scriptDelta" : 1,
"animation" : "verticalmovingplatform.animation",
"animationParts" : {
"base" : "shortverticalstand.png",
"platform" : "platform.png"
},
"inputNodes" : [[0, 0]],
"physicsCollisions" : {
"platform" : {
"collision" : [
[-2, -0.35],
[2, -0.35],
[2, 0.35],
[-2, 0.35]
],
"collisionKind" : "platform",
"position" : [0, 1]
}
},
"platformStart" : [0, 0.5],
"platformEnd" : [0, 8],
"platformMoveTime" : 1
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

View file

@ -0,0 +1,61 @@
{
"objectName" : "tallverticalmovingplatform",
"objectType" : "physics",
"colonyTags" : ["wired"],
"printable" : false,
"rarity" : "Rare",
"category" : "wire",
"price" : 100,
"description" : "A moving platform.",
"shortdescription" : "Moving Platform",
"race" : "generic",
"apexDescription" : "A moving platform.",
"avianDescription" : "A moving platform.",
"floranDescription" : "A moving platform.",
"glitchDescription" : "A moving platform.",
"humanDescription" : "A moving platform.",
"hylotlDescription" : "A moving platform.",
"inventoryIcon" : "platform.png",
"orientations" : [
{
"direction" : "right",
"image" : "tallverticalstand.png",
"imagePosition" : [-8, 0],
"spaceScan" : 0.1,
"anchors" : [ "bottom" ]
}
],
"scripts" : [ "movingplatform.lua" ],
"scriptDelta" : 1,
"animation" : "verticalmovingplatform.animation",
"animationParts" : {
"base" : "tallverticalstand.png",
"platform" : "platform.png"
},
"inputNodes" : [[0, 0]],
"physicsCollisions" : {
"platform" : {
"collision" : [
[-2, -0.35],
[2, -0.35],
[2, 0.35],
[-2, 0.35]
],
"collisionKind" : "platform",
"position" : [0, 1]
}
},
"platformStart" : [0, 0.5],
"platformEnd" : [0, 16],
"platformMoveTime" : 2
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

View file

@ -0,0 +1,48 @@
{
"animatedParts" : {
"stateTypes" : {
"moving" : {
"default" : "off",
"states" : {
"off" : {},
"on" : {
"properties" : {
"persistentSound" : "/sfx/tech/forcefield_loop.ogg"
}
}
}
}
},
"parts" : {
"base" : {
"properties" : {
"offset" : [-1, 0],
"centered" : false,
"image" : "<partImage>"
}
},
"platform" : {
"properties" : {
"centered" : true,
"transformationGroups" : ["platform"],
"image" : "<partImage>",
"zLevel" : 1
}
}
}
},
"transformationGroups" : {
"platform" : {
"interpolated" : true
}
},
"sounds" : {
"changeDir" : {
"pool" : [ "/sfx/blocks/footstep_lightmetal.ogg" ]
}
}
}