Skip to content

Commit

Permalink
sarcophagi revision
Browse files Browse the repository at this point in the history
  • Loading branch information
Kherae committed Aug 20, 2023
1 parent 776a1bb commit 2bca24a
Show file tree
Hide file tree
Showing 15 changed files with 211 additions and 228 deletions.
4 changes: 1 addition & 3 deletions objects/avian/sarcoavian1/sarcoavian1.object
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,7 @@

}
],
"breakDropOptions" : [
[ [ "sarcoavian1deco", 1, { } ] ]
],
"retainObjectParametersInItem":true,
"animation" : "/objects/noisy/noisy.animation",

"scripts" : [
Expand Down
51 changes: 23 additions & 28 deletions objects/avian/sarcoavian1/sarcoavian1deco.object
Original file line number Diff line number Diff line change
@@ -1,35 +1,30 @@
{
"objectName" : "sarcoavian1deco",
"colonyTags" : ["avian","aviantomb"],
"rarity" : "Common",
"category" : "decorative",
"price" : 85,
"objectName" : "sarcoavian1deco",
"colonyTags" : ["avian","aviantomb"],
"rarity" : "Common",
"category" : "decorative",
"price" : 85,

"description" : "An expertly crafted Avian sarcophagus. This one is clearly empty.",
"shortdescription" : "Avian Sarcophagus (Empty)",
"race" : "avian",
"tooltipKind": "codex",
"description" : "^red;This object is being deprecated. Just place it down to get the normal version^reset;.",
"shortdescription" : "Avian Sarcophagus (Deprecated)",
"race" : "avian",
"tooltipKind": "codex",

"apexDescription" : "A sarcophagus. No-one is inside.",
"avianDescription" : "The richest and most revered of Avians preserve their entire bodies in these.",
"floranDescription" : "No sssnack insside.",
"glitchDescription" : "Neutral. It's empty.",
"humanDescription" : "A dusty sarcophagus.",
"hylotlDescription" : "The Hylotl give their dead to the ocean.",
"novakidDescription" : "A place for a dead body.",
"scripts" : ["/objects/noisy/sarconinjadeprecate.lua"],
"targetForReplace":"sarcoavian1",
"targetCadaverRoll":2,
"inventoryIcon" : "sarcoavian1icon.png",
"orientations" : [
{
"dualImage" : "sarcoavian1.png:<color>",

"inventoryIcon" : "sarcoavian1icon.png",
"orientations" : [
{
"dualImage" : "sarcoavian1.png:<color>",
"imagePosition" : [-8, 0],
"frames" : 1,
"animationCycle" : 0.5,

"imagePosition" : [-8, 0],
"frames" : 1,
"animationCycle" : 0.5,
"spaceScan" : 0.1,
"anchors" : [ "bottom" ]

"spaceScan" : 0.1,
"anchors" : [ "bottom" ]

}
]
}
]
}
4 changes: 1 addition & 3 deletions objects/avian/sarcoavian2/sarcoavian2.object
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,7 @@

}
],
"breakDropOptions" : [
[ [ "sarcoavian2deco", 1, { } ] ]
],
"retainObjectParametersInItem":true,
"animation" : "/objects/noisy/noisy.animation",

"scripts" : [
Expand Down
51 changes: 23 additions & 28 deletions objects/avian/sarcoavian2/sarcoavian2deco.object
Original file line number Diff line number Diff line change
@@ -1,35 +1,30 @@
{
"objectName" : "sarcoavian2deco",
"colonyTags" : ["avian","aviantomb"],
"rarity" : "Common",
"category" : "decorative",
"price" : 100,
"objectName" : "sarcoavian2deco",
"colonyTags" : ["avian","aviantomb"],
"rarity" : "Common",
"category" : "decorative",
"price" : 100,

"description" : "An expertly crafted Avian sarcophagus. The feather suggests it was for someone important.",
"shortdescription" : "Grand Avian Sarcophagus (Empty)",
"race" : "avian",
"tooltipKind": "codex",
"description" : "^red;This object is being deprecated. Just place it down to get the normal version^reset;.",
"shortdescription" : "Grand Avian Sarcophagus (Deprecated)",
"race" : "avian",
"tooltipKind": "codex",

"avianDescription" : "The richest and most revered of Avians preserve their entire bodies in these. The feather marks the favour of the stargazers.",
"apexDescription" : "A sarcophagus. No-one is inside.",
"floranDescription" : "No sssnack insside.",
"glitchDescription" : "Neutral. It's empty.",
"humanDescription" : "A dusty sarcophagus.",
"hylotlDescription" : "The Hylotl give their dead to the ocean.",
"novakidDescription" : "A place for a dead body.",
"scripts" : ["/objects/noisy/sarconinjadeprecate.lua"],
"targetForReplace":"sarcoavian2",
"targetCadaverRoll":2,
"inventoryIcon" : "sarcoavian2icon.png",
"orientations" : [
{
"dualImage" : "sarcoavian2.png:<color>",

"inventoryIcon" : "sarcoavian2icon.png",
"orientations" : [
{
"dualImage" : "sarcoavian2.png:<color>",
"imagePosition" : [-8, 0],
"frames" : 1,
"animationCycle" : 0.5,

"imagePosition" : [-8, 0],
"frames" : 1,
"animationCycle" : 0.5,
"spaceScan" : 0.1,
"anchors" : [ "bottom" ]

"spaceScan" : 0.1,
"anchors" : [ "bottom" ]

}
]
}
]
}
4 changes: 1 addition & 3 deletions objects/avian/sarcobunny/sarcobunny.object
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,7 @@

}
],
"breakDropOptions" : [
[ [ "sarcobunnydeco", 1, { } ] ]
],
"retainObjectParametersInItem":true,
"animation" : "/objects/noisy/noisy.animation",

"scripts" : [
Expand Down
51 changes: 23 additions & 28 deletions objects/avian/sarcobunny/sarcobunnydeco.object
Original file line number Diff line number Diff line change
@@ -1,35 +1,30 @@
{
"objectName" : "sarcobunnydeco",
"colonyTags" : ["avian","aviantomb"],
"rarity" : "Common",
"category" : "decorative",
"price" : 100,
"objectName" : "sarcobunnydeco",
"colonyTags" : ["avian","aviantomb"],
"rarity" : "Common",
"category" : "decorative",
"price" : 100,

"description" : "Is it wrong to take your bunny to the afterlife with you?",
"shortdescription" : "Bunny Sarcophagus (Empty)",
"race" : "avian",
"tooltipKind": "codex",
"description" : "^red;This object is being deprecated. Just place it down to get the normal version^reset;.",
"shortdescription" : "Bunny Sarcophagus (Deprecated)",
"race" : "avian",
"tooltipKind": "codex",

"apexDescription" : "Why is this sarcophagus rabbit-shaped?",
"avianDescription" : "A sarcophagus for criminals and heretics. Any Avian inside will lose their wings in the afterlife.",
"floranDescription" : "Long earsss, long dead.",
"glitchDescription" : "Observant. Despite the design of the sarcophagus, an Avian was inside.",
"humanDescription" : "A bunny sarcophagus! Cute!",
"hylotlDescription" : "The crystals in this sarcophagus appear to hold it closed. Was the inhabitant still alive when they were shut in?",
"novakidDescription" : "An Avian sarcophagus. But why is it shaped like a rabbit?",
"scripts" : ["/objects/noisy/sarconinjadeprecate.lua"],
"targetForReplace":"sarcobunny",
"targetCadaverRoll":2,
"inventoryIcon" : "sarcobunnyicon.png",
"orientations" : [
{
"dualImage" : "sarcobunny.png:<color>",

"inventoryIcon" : "sarcobunnyicon.png",
"orientations" : [
{
"dualImage" : "sarcobunny.png:<color>",
"imagePosition" : [-8, 0],
"frames" : 1,
"animationCycle" : 0.5,

"imagePosition" : [-8, 0],
"frames" : 1,
"animationCycle" : 0.5,
"spaceScan" : 0.1,
"anchors" : [ "bottom" ]

"spaceScan" : 0.1,
"anchors" : [ "bottom" ]

}
]
}
]
}
5 changes: 1 addition & 4 deletions objects/avian/sarcohuman/sarcohuman.object
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,7 @@

}
],

"breakDropOptions" : [
[ [ "sarcohumandeco", 1, { } ] ]
],
"retainObjectParametersInItem":true,

"animation" : "/objects/noisy/noisy.animation",

Expand Down
30 changes: 11 additions & 19 deletions objects/avian/sarcohuman/sarcohumanalive.object.patch
Original file line number Diff line number Diff line change
@@ -1,20 +1,12 @@
[
{
"op": "add",
"path": "/breakDropOptions",
"value": [
[
[
"sarcohumandeco",
1,
{}
]
]
]
},
{
"op": "replace",
"path": "/scripts/0",
"value": "/objects/noisy/noisynew.lua"
}
]
{
"op": "add",
"path": "/retainObjectParametersInItem",
"value": true
},
{
"op": "replace",
"path": "/scripts/0",
"value": "/objects/noisy/noisynew.lua"
}
]
51 changes: 23 additions & 28 deletions objects/avian/sarcohuman/sarcohumandeco.object
Original file line number Diff line number Diff line change
@@ -1,35 +1,30 @@
{
"objectName" : "sarcohumandeco",
"colonyTags" : ["avian","aviantomb"],
"rarity" : "Common",
"category" : "decorative",
"price" : 85,
"objectName" : "sarcohumandeco",
"colonyTags" : ["avian","aviantomb"],
"rarity" : "Common",
"category" : "decorative",
"price" : 85,

"description" : "Avians have been known to attempt to take human companions with them to the afterlife.",
"shortdescription" : "Human Sarcophagus (Empty)",
"race" : "avian",
"tooltipKind": "codex",
"description" : "^red;This object is being deprecated. Just place it down to get the normal version^reset;.",
"shortdescription" : "Human Sarcophagus (Deprecated)",
"race" : "avian",
"tooltipKind": "codex",

"apexDescription" : "A sarcophagus. It's human-shaped.",
"avianDescription" : "Some of the first Avians amongst the stars had deep friendships with humans. This is an attempt to bring humans to the aether so they might also gain wings.",
"floranDescription" : "Sssmells of human.",
"glitchDescription" : "Observant. A human sat inside this sarcophagus.",
"humanDescription" : "Did this have a human in it?",
"hylotlDescription" : "This is not an Avian sarcophagus.",
"novakidDescription" : "A sarcophagus shaped like a human, with no human body inside.",
"scripts" : ["/objects/noisy/sarconinjadeprecate.lua"],
"targetForReplace":"sarcohuman",
"targetCadaverRoll":4,
"inventoryIcon" : "sarcohumanicon.png",
"orientations" : [
{
"dualImage" : "sarcohuman.png:<color>",

"inventoryIcon" : "sarcohumanicon.png",
"orientations" : [
{
"dualImage" : "sarcohuman.png:<color>",
"imagePosition" : [-8, 0],
"frames" : 1,
"animationCycle" : 0.5,

"imagePosition" : [-8, 0],
"frames" : 1,
"animationCycle" : 0.5,
"spaceScan" : 0.1,
"anchors" : [ "bottom" ]

"spaceScan" : 0.1,
"anchors" : [ "bottom" ]

}
]
}
]
}
49 changes: 27 additions & 22 deletions objects/noisy/noisynew.lua
Original file line number Diff line number Diff line change
@@ -1,30 +1,35 @@
function init()
self.count = 0
self.sounds = config.getParameter("sounds", {})
animator.setSoundPool("noise", self.sounds)
object.setInteractive(true)
cadaverRoll = config.getParameter("cadaverRoll") --50% can produce a corpse
local wasNil=(cadaverRoll==nil)
if not cadaverRoll then cadaverRoll = 0 end
object.setConfigParameter("cadaverRoll",cadaverRoll)
self.sounds = config.getParameter("sounds", {})
animator.setSoundPool("noise", self.sounds)
--object.setConfigParameter("retainObjectParametersInItem",true)--doesn't work here.
object.setInteractive(wasNil or (cadaverRoll<4))
end

function onInteraction()
if self.count < 3 then
if #self.sounds > 0 then
animator.playSound("noise")
self.count = self.count +1
end
elseif self.count == 3 then
local crewtype = "crewmemberLoveliusSmythe"
local seed = math.random(255)
local parameters = {}
local crewrace = "human"
self.count = self.count +1
world.spawnNpc(object.position(), crewrace, crewtype, 1, seed, parameters)
object.smash(true)
end
if cadaverRoll < 3 then
if #self.sounds > 0 then
animator.playSound("noise")
cadaverRoll = cadaverRoll + 1
end
elseif cadaverRoll == 3 then
local crewtype = "crewmemberLoveliusSmythe"
local seed = math.random(255)
local parameters = {}
local crewrace = "human"
cadaverRoll = cadaverRoll + 1
object.setConfigParameter("cadaverRoll",cadaverRoll)
world.spawnNpc(object.position(), crewrace, crewtype, 1, seed, parameters)
object.smash(true)
end
end

function onNpcPlay(npcId)
local interact = config.getParameter("npcToy.interactOnNpcPlayStart")
if interact == nil or interact ~= false then
onInteraction()
end
local interact = config.getParameter("npcToy.interactOnNpcPlayStart")
if interact == nil or interact ~= false then
onInteraction()
end
end
Loading

0 comments on commit 2bca24a

Please sign in to comment.