-
Notifications
You must be signed in to change notification settings - Fork 44
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #417 from jss2a98aj/master
New ship BG and pet
- Loading branch information
Showing
55 changed files
with
2,193 additions
and
27 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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] | ||
} |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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] | ||
} |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
24 changes: 24 additions & 0 deletions
24
items/active/unsorted/avalipetstartingbag/avalipetstartingbag.activeitem
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | ||
} | ||
} |
210 changes: 210 additions & 0 deletions
210
items/active/unsorted/avalipetstartingbag/avalipetstartingbag.animation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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
88
items/active/unsorted/avalipetstartingbag/avalipetstartingbag.lua
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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.
Binary file added
BIN
+178 Bytes
items/active/unsorted/avalipetstartingbag/avalipetstartingbagicon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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" ] | ||
} |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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" ] | ||
} |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Oops, something went wrong.