v1.4.4
This commit is contained in:
commit
9c94d113d3
10260 changed files with 1237388 additions and 0 deletions
10
assets/devel/objects/greycapsule/greycapsule.frames
Normal file
10
assets/devel/objects/greycapsule/greycapsule.frames
Normal file
|
@ -0,0 +1,10 @@
|
|||
{
|
||||
|
||||
"frameGrid" : {
|
||||
"size" : [8, 12],
|
||||
"dimensions" : [1, 1],
|
||||
"names" : [
|
||||
[ "default" ]
|
||||
]
|
||||
}
|
||||
}
|
22
assets/devel/objects/greycapsule/greycapsule.lua
Normal file
22
assets/devel/objects/greycapsule/greycapsule.lua
Normal file
|
@ -0,0 +1,22 @@
|
|||
require "/scripts/util.lua"
|
||||
|
||||
function die(smash)
|
||||
local pos = entity.position()
|
||||
local spreadRange = config.getParameter("spreadRange", 2)
|
||||
local candidateSpaces = {}
|
||||
for x = pos[1] - spreadRange, pos[1] + spreadRange do
|
||||
for y = pos[2] - spreadRange, pos[2] + spreadRange do
|
||||
table.insert(candidateSpaces, {x, y})
|
||||
end
|
||||
end
|
||||
|
||||
shuffle(candidateSpaces)
|
||||
|
||||
local toPlace = config.getParameter("spreadFactor", 2)
|
||||
while #candidateSpaces > 0 and toPlace > 0 do
|
||||
if world.placeObject("greycapsule", candidateSpaces[1], 1, {}) then
|
||||
toPlace = toPlace - 1
|
||||
end
|
||||
table.remove(candidateSpaces, 1)
|
||||
end
|
||||
end
|
33
assets/devel/objects/greycapsule/greycapsule.object
Normal file
33
assets/devel/objects/greycapsule/greycapsule.object
Normal file
|
@ -0,0 +1,33 @@
|
|||
{
|
||||
"objectName" : "greycapsule",
|
||||
"colonyTags" : ["misc"],
|
||||
"rarity" : "Common",
|
||||
"category" : "breakable",
|
||||
"price" : 35,
|
||||
|
||||
"description" : "You are responsible for unleashing this horror.",
|
||||
"shortdescription" : "Grey Capsule",
|
||||
"race" : "generic",
|
||||
|
||||
"inventoryIcon" : "greycapsuleicon.png",
|
||||
"orientations" : [
|
||||
{
|
||||
"image" : "greycapsule.png:<color>",
|
||||
"imagePosition" : [0, 0],
|
||||
"frames" : 1,
|
||||
"animationCycle" : 0.5,
|
||||
|
||||
"spaceScan" : 0.1,
|
||||
"anchors" : [ "bottom" ]
|
||||
}
|
||||
],
|
||||
|
||||
"smashable" : true,
|
||||
"smashSounds" : [ "/sfx/objects/capsule_break1.ogg", "/sfx/objects/capsule_break2.ogg", "/sfx/objects/capsule_break3.ogg" ],
|
||||
"smashParticles" : [ { "count" : 3, "particle" : "capsuleshard1" } ],
|
||||
"smashDropPool" : "empty",
|
||||
|
||||
"scripts" : [ "greycapsule.lua" ],
|
||||
"spreadFactor" : 2,
|
||||
"spreadRange" : 6
|
||||
}
|
BIN
assets/devel/objects/greycapsule/greycapsule.png
Normal file
BIN
assets/devel/objects/greycapsule/greycapsule.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 243 B |
BIN
assets/devel/objects/greycapsule/greycapsuleicon.png
Normal file
BIN
assets/devel/objects/greycapsule/greycapsuleicon.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 288 B |
Loading…
Add table
Add a link
Reference in a new issue