diff --git a/objects/avian/sarcoavian1/sarcoavian1.object b/objects/avian/sarcoavian1/sarcoavian1.object index dfe1d78db75..79631944d69 100644 --- a/objects/avian/sarcoavian1/sarcoavian1.object +++ b/objects/avian/sarcoavian1/sarcoavian1.object @@ -32,9 +32,7 @@ } ], - "breakDropOptions" : [ - [ [ "sarcoavian1deco", 1, { } ] ] - ], + "retainObjectParametersInItem":true, "animation" : "/objects/noisy/noisy.animation", "scripts" : [ diff --git a/objects/avian/sarcoavian1/sarcoavian1deco.object b/objects/avian/sarcoavian1/sarcoavian1deco.object index 391cdaa4ed8..85c3ad8a6a6 100644 --- a/objects/avian/sarcoavian1/sarcoavian1deco.object +++ b/objects/avian/sarcoavian1/sarcoavian1deco.object @@ -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:", - "inventoryIcon" : "sarcoavian1icon.png", - "orientations" : [ - { - "dualImage" : "sarcoavian1.png:", + "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" ] - - } - ] + } + ] } diff --git a/objects/avian/sarcoavian2/sarcoavian2.object b/objects/avian/sarcoavian2/sarcoavian2.object index 38fa689e26e..316f49f0fe8 100644 --- a/objects/avian/sarcoavian2/sarcoavian2.object +++ b/objects/avian/sarcoavian2/sarcoavian2.object @@ -32,9 +32,7 @@ } ], - "breakDropOptions" : [ - [ [ "sarcoavian2deco", 1, { } ] ] - ], + "retainObjectParametersInItem":true, "animation" : "/objects/noisy/noisy.animation", "scripts" : [ diff --git a/objects/avian/sarcoavian2/sarcoavian2deco.object b/objects/avian/sarcoavian2/sarcoavian2deco.object index d70806003ee..bfa20c087ef 100644 --- a/objects/avian/sarcoavian2/sarcoavian2deco.object +++ b/objects/avian/sarcoavian2/sarcoavian2deco.object @@ -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:", - "inventoryIcon" : "sarcoavian2icon.png", - "orientations" : [ - { - "dualImage" : "sarcoavian2.png:", + "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" ] - - } - ] + } + ] } diff --git a/objects/avian/sarcobunny/sarcobunny.object b/objects/avian/sarcobunny/sarcobunny.object index 49b696e3047..0ce9d752cc1 100644 --- a/objects/avian/sarcobunny/sarcobunny.object +++ b/objects/avian/sarcobunny/sarcobunny.object @@ -32,9 +32,7 @@ } ], - "breakDropOptions" : [ - [ [ "sarcobunnydeco", 1, { } ] ] - ], + "retainObjectParametersInItem":true, "animation" : "/objects/noisy/noisy.animation", "scripts" : [ diff --git a/objects/avian/sarcobunny/sarcobunnydeco.object b/objects/avian/sarcobunny/sarcobunnydeco.object index 88e29033d90..caba2f315f2 100644 --- a/objects/avian/sarcobunny/sarcobunnydeco.object +++ b/objects/avian/sarcobunny/sarcobunnydeco.object @@ -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:", - "inventoryIcon" : "sarcobunnyicon.png", - "orientations" : [ - { - "dualImage" : "sarcobunny.png:", + "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" ] - - } - ] + } + ] } diff --git a/objects/avian/sarcohuman/sarcohuman.object b/objects/avian/sarcohuman/sarcohuman.object index 30ae4c98c89..3531b11893e 100644 --- a/objects/avian/sarcohuman/sarcohuman.object +++ b/objects/avian/sarcohuman/sarcohuman.object @@ -32,10 +32,7 @@ } ], - - "breakDropOptions" : [ - [ [ "sarcohumandeco", 1, { } ] ] - ], + "retainObjectParametersInItem":true, "animation" : "/objects/noisy/noisy.animation", diff --git a/objects/avian/sarcohuman/sarcohumanalive.object.patch b/objects/avian/sarcohuman/sarcohumanalive.object.patch index d91c7356f83..3b89f0bce47 100644 --- a/objects/avian/sarcohuman/sarcohumanalive.object.patch +++ b/objects/avian/sarcohuman/sarcohumanalive.object.patch @@ -1,20 +1,12 @@ [ - { - "op": "add", - "path": "/breakDropOptions", - "value": [ - [ - [ - "sarcohumandeco", - 1, - {} - ] - ] - ] - }, - { - "op": "replace", - "path": "/scripts/0", - "value": "/objects/noisy/noisynew.lua" - } -] \ No newline at end of file + { + "op": "add", + "path": "/retainObjectParametersInItem", + "value": true + }, + { + "op": "replace", + "path": "/scripts/0", + "value": "/objects/noisy/noisynew.lua" + } +] diff --git a/objects/avian/sarcohuman/sarcohumandeco.object b/objects/avian/sarcohuman/sarcohumandeco.object index 0fd276a1254..f73ff541ce7 100644 --- a/objects/avian/sarcohuman/sarcohumandeco.object +++ b/objects/avian/sarcohuman/sarcohumandeco.object @@ -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:", - "inventoryIcon" : "sarcohumanicon.png", - "orientations" : [ - { - "dualImage" : "sarcohuman.png:", + "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" ] - - } - ] + } + ] } diff --git a/objects/minibiome/precursor/precursorconverter/converter.lua b/objects/minibiome/precursor/precursorconverter/converter.lua index 712fc9859ba..87d7bd2b446 100644 --- a/objects/minibiome/precursor/precursorconverter/converter.lua +++ b/objects/minibiome/precursor/precursorconverter/converter.lua @@ -7,6 +7,7 @@ function init() storage.timer = 1 self.mintick = 1 storage.crafting = storage.crafting or false + object.setAllOutputNodes(storage.crafting) storage.output = storage.output or {} storage.inputs = storage.inputs or {} end @@ -111,6 +112,7 @@ function update(dt) end end storage.crafting = false + object.setAllOutputNodes(storage.crafting) storage.output = nil storage.inputs = nil storage.timer = self.mintick --reset timer to a safe minimum @@ -139,6 +141,7 @@ function startCrafting(result) end storage.crafting = true + object.setAllOutputNodes(storage.crafting) storage.timer = result.time storage.output = result.outputs --animator.setAnimationState("samplingarrayanim", "working") diff --git a/objects/noisy/noisynew.lua b/objects/noisy/noisynew.lua index e7bb87edb57..2071ee50ef4 100644 --- a/objects/noisy/noisynew.lua +++ b/objects/noisy/noisynew.lua @@ -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() + 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 diff --git a/objects/noisy/quiet.lua b/objects/noisy/quiet.lua index 517afedd561..2a60ff22fcd 100644 --- a/objects/noisy/quiet.lua +++ b/objects/noisy/quiet.lua @@ -1,23 +1,29 @@ function init() - self.random = math.random(1,2) --50% can produce a corpse - object.setInteractive(true) + cadaverRoll = config.getParameter("cadaverRoll") --50% can produce a corpse + local wasNil=(cadaverRoll==nil) + if not cadaverRoll then cadaverRoll = math.random(1,2) end + object.setConfigParameter("cadaverRoll",cadaverRoll) + --object.setConfigParameter("retainObjectParametersInItem",true)--doesn't work here. + object.setInteractive(wasNil or (cadaverRoll==1)) end function onInteraction() - if self.random == 1 then --if random chance is 1 - self.random = 2 -- set to 0 so we never repeat - checkSarco() -- spawn the item - end + if cadaverRoll == 1 then --if random chance is 1 + cadaverRoll = 2 -- set to 0 so we never repeat + object.setConfigParameter("cadaverRoll",cadaverRoll) + checkSarco() -- spawn the item + end + object.setInteractive(false) 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 function checkSarco() - world.spawnItem("wrappedbodybirb", object.position(), 1) - object.smash(true) + world.spawnItem("wrappedbodybirb", object.position(), 1) + object.smash() end diff --git a/objects/noisy/quietalien.lua b/objects/noisy/quietalien.lua index c9dd5d28432..001183728f6 100644 --- a/objects/noisy/quietalien.lua +++ b/objects/noisy/quietalien.lua @@ -1,32 +1,38 @@ function init() - self.random = math.random(1,2) --50% can produce a corpse - object.setInteractive(true) + cadaverRoll = config.getParameter("cadaverRoll") --50% can produce a corpse + local wasNil=(cadaverRoll==nil) + if not cadaverRoll then cadaverRoll = math.random(1,2) end + object.setConfigParameter("cadaverRoll",cadaverRoll) + --object.setConfigParameter("retainObjectParametersInItem",true)--doesn't work here. + object.setInteractive(wasNil or (cadaverRoll==1)) end function onInteraction() - if self.random == 1 then --if random chance is 1 - self.random = 2 -- set to 0 so we never repeat - checkSarco() -- spawn the item - end + if cadaverRoll == 1 then --if random chance is 1 + cadaverRoll = 2 -- set to 0 so we never repeat + object.setConfigParameter("cadaverRoll",cadaverRoll) + checkSarco() -- spawn the item + end + object.setInteractive(false) 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 function checkSarco() - self.random = math.random(1,3) - if self.random == 1 then - world.spawnItem("wrappedbodyalien", object.position(), 1) - object.smash(true) - elseif self.random == 2 then - world.spawnItem("wrappedbody", object.position(), 1) - object.smash(true) - elseif self.random == 3 then - world.spawnItem("wrappedbodyputrid", object.position(), 1) - object.smash(true) - end -end \ No newline at end of file + local rando = math.random(1,3) + if rando == 1 then + world.spawnItem("wrappedbodyalien", object.position(), 1) + object.smash() + elseif rando == 2 then + world.spawnItem("wrappedbody", object.position(), 1) + object.smash() + elseif rando == 3 then + world.spawnItem("wrappedbodyputrid", object.position(), 1) + object.smash() + end +end diff --git a/objects/noisy/quiethuman.lua b/objects/noisy/quiethuman.lua index f5896fea8ff..a12ea7a0d67 100644 --- a/objects/noisy/quiethuman.lua +++ b/objects/noisy/quiethuman.lua @@ -1,31 +1,35 @@ function init() - self.random = math.random(1,2) --50% can produce a corpse - object.setInteractive(true) + cadaverRoll = config.getParameter("cadaverRoll") --50% can produce a corpse + local wasNil=(cadaverRoll==nil) + if not cadaverRoll then cadaverRoll = math.random(1,2) end + object.setConfigParameter("cadaverRoll",cadaverRoll) + --object.setConfigParameter("retainObjectParametersInItem",true)--doesn't work here. + object.setInteractive(wasNil or (cadaverRoll==1)) end function onInteraction() - if self.random == 1 then --if random chance is 1 - self.random = 2 -- set to 0 so we never repeat - checkSarco() -- spawn the item - end + if cadaverRoll == 1 then --if random chance is 1 + cadaverRoll = 2 -- set to 0 so we never repeat + object.setConfigParameter("cadaverRoll",cadaverRoll) + checkSarco() -- spawn the item + end + object.setInteractive(false) 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 - - function checkSarco() - self.random = math.random(1,2) - if self.random == 1 then - world.spawnItem("wrappedbody", object.position(), 1) - object.smash(true) - elseif self.random == 2 then - world.spawnItem("wrappedbodyputrid", object.position(), 1) - object.smash(true) - end -end \ No newline at end of file + local rando = math.random(1,3) + if rando == 1 then + world.spawnItem("wrappedbody", object.position(), 1) + object.smash() + elseif rando == 2 then + world.spawnItem("wrappedbodyputrid", object.position(), 1) + object.smash() + end +end diff --git a/objects/noisy/sarconinjadeprecate.lua b/objects/noisy/sarconinjadeprecate.lua new file mode 100644 index 00000000000..593c4a1e63d --- /dev/null +++ b/objects/noisy/sarconinjadeprecate.lua @@ -0,0 +1,6 @@ +function init() + targetObject=config.getParameter("targetForReplace","futurelight") + targetRoll=config.getParameter("targetCadaverRoll",math.huge) + world.placeObject(targetObject,entity.position(),object.direction(),{cadaverRoll=targetRoll}) + object.smash(true) +end diff --git a/quests/outpost/museumcurator1.questtemplate.patch b/quests/outpost/museumcurator1.questtemplate.patch deleted file mode 100644 index a101f90834d..00000000000 --- a/quests/outpost/museumcurator1.questtemplate.patch +++ /dev/null @@ -1,7 +0,0 @@ -[ - { - "op": "replace", - "path": "/scriptConfig/conditions/0/itemName", - "value": "sarcoavian2deco" - } -] \ No newline at end of file