Skip to content

Commit

Permalink
Merge pull request #417 from jss2a98aj/master
Browse files Browse the repository at this point in the history
New ship BG and pet
  • Loading branch information
Fevix committed Nov 30, 2019
2 parents 172a96f + 714a07c commit c4cc49c
Show file tree
Hide file tree
Showing 55 changed files with 2,193 additions and 27 deletions.
7 changes: 7 additions & 0 deletions animations/emotes/avalirecharged.animation
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"frames" : "avalirecharged.png",
"variants" : 1,
"frameNumber" : 8,
"animationCycle" : 1,
"offset" : [0, 0]
}
Binary file added animations/emotes/avalirecharged.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
7 changes: 7 additions & 0 deletions animations/emotes/avalisleepy.animation
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"frames" : "avalisleepy.png",
"variants" : 1,
"frameNumber" : 8,
"animationCycle" : 1,
"offset" : [0, 0]
}
Binary file added animations/emotes/avalisleepy.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
{
"itemName" : "avalipetstartingbag",
"price" : 0,
"level" : 1,
"maxStack" : 1,
"rarity" : "Legendary",
"category" : "mysteriousReward",
"description" : "Retrofit your ship for your new cleaning drone.",
"shortdescription" : "Cleaning Drone Install Kit",
"twoHanded" : true,

"inventoryIcon" : "avalipetstartingbagicon.png",
"animation" : "avalipetstartingbag.animation",
"animationCustom" : {},
"scripts" : ["avalipetstartingbag.lua"],

"fireTime" : 2.0,
"fireOffset" : [1.0, 0.0],

"treasure" : {
"pool" : "avaliPetRetrofitTreasure",
"level" : 1
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,210 @@
{
"animatedParts" : {
"stateTypes" : {
"firing" : {
"default" : "off",
"states" : {
"off" : {
"properties" : {
"particleEmittersOff" : [ "confetti" ]
}
},
"fire" : {
"frames" : 2,
"cycle" : 0.1,
"mode" : "transition",
"transition" : "confetti",
"properties" : {
"immediateSound" : "/sfx/objects/colonydeed_partyhorn.ogg",
"particleEmittersOff" : [ "confetti" ]
},
"frameProperties" : {
"stateNudge" : [ [-0.125, 0], [0, 0] ]
}
},
"confetti" : {
"cycle" : 0.2,
"mode" : "transition",
"transition" : "off",
"properties" : {
"particleEmittersOn" : [ "confetti" ]
}
}
}
}
},

"parts" : {
"gun" : {
"properties" : {
"centered" : true,
"image" : "avalipetstartingbag.png",
"offset" : [0.0, 0.0]
}
}
}
},

"particleEmitters" : {
"confetti" : {
"emissionRate" : 500.0,
"emissionRateVariance" : 0.0,
"active" : true,

"particles" : [
{
// Red, drifting
"particle" : {
"type" : "ember",
"position" : [1.0, 0],
"size" : 2.0,
"color" : [255, 0, 0, 255],
"light" : [50, 50, 50],
"fade" : 0.9,
"initialVelocity" : [0.0, 9.0],
"finalVelocity" : [0.0, -5.0],
"approach" : [0, 20],
"timeToLive" : 5,
"layer" : "middle",
"variance" : {
"initialVelocity" : [2, 2.0]
}
}
},
{
// Red, falling fast
"particle" : {
"type" : "ember",
"position" : [1.0, 0],
"size" : 2.0,
"color" : [255, 0, 0, 255],
"light" : [50, 50, 50],
"fade" : 0.9,
"initialVelocity" : [0.0, 7.0],
"finalVelocity" : [0.0, -50.0],
"approach" : [0, 20],
"timeToLive" : 5,
"layer" : "middle",
"variance" : {
"initialVelocity" : [5, 2.0]
}
}
},
{
// Green, drifting
"particle" : {
"type" : "ember",
"position" : [1.0, 0],
"size" : 2.0,
"color" : [0, 255, 0, 255],
"light" : [50, 50, 50],
"fade" : 0.9,
"initialVelocity" : [0.0, 9.0],
"finalVelocity" : [0.0, -5.0],
"approach" : [0, 20],
"timeToLive" : 5,
"layer" : "middle",
"variance" : {
"initialVelocity" : [2, 2.0]
}
}
},
{
// Green, falling fast
"particle" : {
"type" : "ember",
"position" : [1.0, 0],
"size" : 2.0,
"color" : [0, 255, 0, 255],
"light" : [50, 50, 50],
"fade" : 0.9,
"initialVelocity" : [0.0, 7.0],
"finalVelocity" : [0.0, -50.0],
"approach" : [0, 20],
"timeToLive" : 5,
"layer" : "middle",
"variance" : {
"initialVelocity" : [5, 2.0]
}
}
},
{
// Blue, drifting
"particle" : {
"type" : "ember",
"position" : [1.0, 0],
"size" : 2.0,
"color" : [0, 0, 255, 255],
"light" : [50, 50, 50],
"fade" : 0.9,
"initialVelocity" : [0.0, 9.0],
"finalVelocity" : [0.0, -5.0],
"approach" : [0, 20],
"timeToLive" : 5,
"layer" : "middle",
"variance" : {
"initialVelocity" : [2, 2.0]
}
}
},
{
// Blue, falling fast
"particle" : {
"type" : "ember",
"position" : [1.0, 0],
"size" : 2.0,
"color" : [0, 0, 255, 255],
"light" : [50, 50, 50],
"fade" : 0.9,
"initialVelocity" : [0.0, 7.0],
"finalVelocity" : [0.0, -50.0],
"approach" : [0, 20],
"timeToLive" : 5,
"layer" : "middle",
"variance" : {
"initialVelocity" : [5, 2.0]
}
}
},
{
// White, drifting
"particle" : {
"type" : "ember",
"position" : [1.0, 0],
"size" : 2.0,
"color" : [255, 255, 255, 255],
"light" : [50, 50, 50],
"fade" : 0.9,
"initialVelocity" : [0.0, 9.0],
"finalVelocity" : [0.0, -5.0],
"approach" : [0, 20],
"timeToLive" : 5,
"layer" : "middle",
"variance" : {
"initialVelocity" : [2, 2.0]
}
}
},
{
// White, falling fast
"particle" : {
"type" : "ember",
"position" : [1.0, 0],
"size" : 2.0,
"color" : [255, 255, 255, 255],
"light" : [50, 50, 50],
"fade" : 0.9,
"initialVelocity" : [0.0, 7.0],
"finalVelocity" : [0.0, -50.0],
"approach" : [0, 20],
"timeToLive" : 5,
"layer" : "middle",
"variance" : {
"initialVelocity" : [5, 2.0]
}
}
}
]
}
}
}
88 changes: 88 additions & 0 deletions items/active/unsorted/avalipetstartingbag/avalipetstartingbag.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,88 @@
require "/scripts/vec2.lua"

function init()
self.recoil = 0
self.recoilRate = 0

self.fireOffset = config.getParameter("fireOffset")
updateAim()

self.active = false
storage.fireTimer = storage.fireTimer or 0
end

function update(dt, fireMode, shiftHeld)
updateAim()

storage.fireTimer = math.max(storage.fireTimer - dt, 0)

if self.active then
self.recoilRate = 0
else
self.recoilRate = math.max(1, self.recoilRate + (10 * dt))
end
self.recoil = math.max(self.recoil - dt * self.recoilRate, 0)

if self.active and not storage.firing and storage.fireTimer <= 0 then
self.recoil = math.pi/2 - self.aimAngle
activeItem.setArmAngle(math.pi/2)
if animator.animationState("firing") == "off" then
animator.setAnimationState("firing", "fire")
end
storage.fireTimer = config.getParameter("fireTime", 1.0)
storage.firing = true

end

self.active = false

if storage.firing and animator.animationState("firing") == "off" then
item.consume(1)
if player then
local pool = config.getParameter("treasure.pool")
local level = config.getParameter("treasure.level")
local seed = config.getParameter("treasure.seed")
local treasure = root.createTreasure(pool, level, seed)
for _,item in pairs(treasure) do
player.giveItem(item)
end
end
storage.firing = false
return
end
end

function activate(fireMode, shiftHeld)
if not storage.firing then
self.active = true
end
end

function updateAim()
self.aimAngle, self.aimDirection = activeItem.aimAngleAndDirection(self.fireOffset[2], activeItem.ownerAimPosition())
self.aimAngle = self.aimAngle + self.recoil
activeItem.setArmAngle(self.aimAngle)
activeItem.setFacingDirection(self.aimDirection)
end

function firePosition()
return vec2.add(mcontroller.position(), activeItem.handPosition(self.fireOffset))
end

function aimVector()
local aimVector = vec2.rotate({1, 0}, self.aimAngle + sb.nrand(config.getParameter("inaccuracy", 0), 0))
aimVector[1] = aimVector[1] * self.aimDirection
return aimVector
end

function holdingItem()
return true
end

function recoil()
return false
end

function outsideOfHand()
return false
end
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
10 changes: 10 additions & 0 deletions items/generic/crafting/avalibattery.item
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"itemName" : "avalibattery",
"price" : 500,
"rarity" : "Rare",
"category" : "craftingMaterial",
"inventoryIcon" : "avalibattery.png",
"description" : "This ionic battery holds a significant amount of power when fully charged.",
"shortdescription" : "Ionic Battery",
"itemTags" : [ "reagent" ]
}
Binary file added items/generic/crafting/avalibattery.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
10 changes: 10 additions & 0 deletions items/generic/crafting/avalismallbattery.item
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"itemName" : "avalismallbattery",
"price" : 5,
"rarity" : "Common",
"category" : "craftingMaterial",
"inventoryIcon" : "avalismallbattery.png",
"description" : "Despite the technology used, this battery is not rechargeable.",
"shortdescription" : "Disposable Battery",
"itemTags" : [ "reagent" ]
}
Binary file added items/generic/crafting/avalismallbattery.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit c4cc49c

Please sign in to comment.