Skip to content

Commit

Permalink
Merge pull request #3492 from Kherae/master
Browse files Browse the repository at this point in the history
stuff
  • Loading branch information
sayterdarkwynd authored Aug 12, 2023
2 parents 4a0acd8 + 039dfca commit 64cf4d0
Show file tree
Hide file tree
Showing 20 changed files with 197 additions and 129 deletions.
46 changes: 32 additions & 14 deletions interface/kheAA/kheAA_router/kheAA_routerGui.lua
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,13 @@ local outputList = "outputSlotScrollArea.outputSlotList";
local filterFunctionsLabelDefault = "Functions: ^yellow;Use these to help divide outputs for automation.^reset;"
local helpMode=false

local buttonNames={
evenSplit="roundRobinMode",
slotSplit="roundRobinSlotMode",
leaveOne="leaveOneItemMode",
onlyStack="onlyStackMode"
}

buttons = {
invertButtons = {
item1ButtonInvert = 1,
Expand Down Expand Up @@ -45,10 +52,12 @@ function initialize(conf)
filterInverted=conf[3]
filterType=conf[4]
invertSlots=conf[5]
widget.setChecked("roundRobinMode", conf[6])
widget.setChecked("roundRobinSlotMode", conf[7])
widget.setChecked("leaveOneItemMode", conf[8])
widget.setChecked("onlyStackMode", conf[9])
--round robin slots and only stack are mutually exclusive because spaghetti mess
if conf[7] and conf[9] then conf[9]=false end
widget.setChecked(buttonNames.evenSplit, conf[6])
widget.setChecked(buttonNames.slotSplit, conf[7])
widget.setChecked(buttonNames.leaveOne, conf[8])
widget.setChecked(buttonNames.onlyStack, conf[9])
redrawListSlots(inputList, inputSlots);
redrawListSlots(outputList, outputSlots);
redrawItemFilters()
Expand Down Expand Up @@ -240,18 +249,22 @@ function roundRobinToggle(name)
widget.setText("filterFunctionsLabel","^orange;Only matches a single item^reset;")
return
end
roundRobin = widget.getChecked(name)
world.sendEntityMessage(myBox, "setRR", roundRobin)
local buttonState = widget.getChecked(buttonNames.evenSplit)
world.sendEntityMessage(myBox, "setRR", buttonState)
end

function roundRobinSlotToggle(name)
if helpMode then
widget.setText("filterFunctionsLabel2","Slot Split: Splits a stack between slots in a container.")
widget.setText("filterFunctionsLabel","")
widget.setText("filterFunctionsLabel","^orange;Mutually exclusive with Stack Only^reset;")
return
end
roundRobin = widget.getChecked(name)
world.sendEntityMessage(myBox, "setRRS", roundRobin)
local buttonState = widget.getChecked(buttonNames.slotSplit)
--only stack and slot split are mutually exclusive.
if buttonState then
widget.setChecked(buttonNames.onlyStack,false)
end
world.sendEntityMessage(myBox, "setRRS", buttonState)
end

function leaveOneItemToggle(name)
Expand All @@ -260,18 +273,23 @@ function leaveOneItemToggle(name)
widget.setText("filterFunctionsLabel","^orange;Do you really need help with this?^reset;")
return
end
leaveOne = widget.getChecked(name)
world.sendEntityMessage(myBox, "setLO", leaveOne)
local buttonState = widget.getChecked(buttonNames.leaveOne)
world.sendEntityMessage(myBox, "setLO", buttonState)
end

function onlyStackToggle(name)
if helpMode then
widget.setText("filterFunctionsLabel2","Only Stack: Only attempts to add to already present stacks.")
widget.setText("filterFunctionsLabel","^orange;Only matches a single item^reset;")
widget.setText("filterFunctionsLabel","^orange;Only matches a single item^reset;. ^orange;Mutually exclusive with Slot Split^reset;.")
return
end
onlyStack = widget.getChecked(name)
world.sendEntityMessage(myBox, "setOS", onlyStack)

local buttonState = widget.getChecked(buttonNames.onlyStack)
--only stack and slot split are mutually exclusive.
if buttonState then
widget.setChecked(buttonNames.slotSplit,false)
end
world.sendEntityMessage(myBox, "setOS", buttonState)
end

function dbg(args)
Expand Down
2 changes: 1 addition & 1 deletion items/buildscripts/buildunrandweapon.lua
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@ function build(directory, config, parameters, level, seed)
-- Staff and Wand specific --
if primaryAbility and primaryAbility.projectileParameters then
if primaryAbility.projectileParameters.baseDamage then
config.tooltipFields.staffDamageLabel = primaryAbility.projectileParameters.baseDamage
config.tooltipFields.staffDamageLabel = (primaryAbility.projectileParameters.baseDamage) * configParameterDeep("damageLevelMultiplier",1) * configParameterDeep("baseDamageFactor",1)
end
end

Expand Down
4 changes: 2 additions & 2 deletions items/buildscripts/buildweapon.lua
Original file line number Diff line number Diff line change
Expand Up @@ -316,9 +316,9 @@ function build(directory, config, parameters, level, seed)
config.tooltipFields.critBonusImage = "/interface/statuses/dmgplus.png"

-- Staff and Wand specific --
if primaryAbility.projectileParameters then
if primaryAbility and primaryAbility.projectileParameters then
if primaryAbility.projectileParameters.baseDamage then
config.tooltipFields.staffDamageLabel = primaryAbility.projectileParameters.baseDamage
config.tooltipFields.staffDamageLabel = (primaryAbility.projectileParameters.baseDamage) * configParameterDeep("damageLevelMultiplier",1) * configParameterDeep("baseDamageFactor",1)
end
end

Expand Down
4 changes: 4 additions & 0 deletions items/generic/other/fungusstim.consumable.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
[
[{"op": "add","path": "/price","value": 100}],
[{"op": "replace","path": "/description","value": "This stim has natural healing properties. Grants ^white;60^reset;s of ^cyan;Regeneration 4^reset;: ^green; Heal 1.7% HP/s^reset;"}]
]
11 changes: 6 additions & 5 deletions objects/avian/sarcoavian1/sarcoavian1deco.object
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,15 @@
"category" : "decorative",
"price" : 85,

"description" : "An expertly crafted Avian sarcophagus. I wonder what's inside.",
"shortdescription" : "Avian Sarcophagus",
"description" : "An expertly crafted Avian sarcophagus. This one is clearly empty.",
"shortdescription" : "Avian Sarcophagus (Empty)",
"race" : "avian",
"tooltipKind": "codex",

"apexDescription" : "A sarcophagus. I wonder if someone is inside.",
"apexDescription" : "A sarcophagus. No-one is inside.",
"avianDescription" : "The richest and most revered of Avians preserve their entire bodies in these.",
"floranDescription" : "Sssnack insside iss not fresh.",
"glitchDescription" : "Neutral. The Avian within is very old indeed.",
"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.",
Expand Down
9 changes: 5 additions & 4 deletions objects/avian/sarcoavian2/sarcoavian2deco.object
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,14 @@
"price" : 100,

"description" : "An expertly crafted Avian sarcophagus. The feather suggests it was for someone important.",
"shortdescription" : "Grand Avian Sarcophagus",
"shortdescription" : "Grand Avian Sarcophagus (Empty)",
"race" : "avian",
"tooltipKind": "codex",

"apexDescription" : "A sarcophagus. I wonder if someone is inside.",
"avianDescription" : "The richest and most revered of Avians preserve their entire bodies in these. The feather marks the favour of the stargazers.",
"floranDescription" : "Sssnack insside iss not fresh.",
"glitchDescription" : "Neutral. The Avian within is very old indeed.",
"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.",
Expand Down
7 changes: 4 additions & 3 deletions objects/avian/sarcobunny/sarcobunnydeco.object
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,14 @@
"price" : 100,

"description" : "Is it wrong to take your bunny to the afterlife with you?",
"shortdescription" : "Bunny Sarcophagus",
"shortdescription" : "Bunny Sarcophagus (Empty)",
"race" : "avian",
"tooltipKind": "codex",

"apexDescription" : "Why is this sarcophagus rabbit-shaped?",
"avianDescription" : "A sarcophagus for criminals and heretics. The Avian inside will lose their wings in the afterlife.",
"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, there is an Avian inside.",
"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?",
Expand Down
9 changes: 5 additions & 4 deletions objects/avian/sarcohuman/sarcohumandeco.object
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,17 @@
"price" : 85,

"description" : "Avians have been known to attempt to take human companions with them to the afterlife.",
"shortdescription" : "Human Sarcophagus",
"shortdescription" : "Human Sarcophagus (Empty)",
"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 sits inside this sarcophagus.",
"humanDescription" : "Is that a 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. Is there a human body inside?",
"novakidDescription" : "A sarcophagus shaped like a human, with no human body inside.",

"inventoryIcon" : "sarcohumanicon.png",
"orientations" : [
Expand Down
21 changes: 19 additions & 2 deletions objects/kheAA/kheAA_router/kheAA_router.lua
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,20 @@ function init()
message.setHandler("setInvertSlots", function (_, _, inverted) storage.invertSlots = inverted end)
message.setHandler("setInputSlots", function (msg, _, slots) storage.inputSlots = slots end)
message.setHandler("setOutputSlots", function (msg, _, slots) storage.outputSlots = slots end)
-- 'Even Split'
message.setHandler("setRR", function (msg, _, rr) storage.roundRobin = rr end)
message.setHandler("setRRS", function (msg, _, rr) storage.roundRobinSlots = rr end)
-- 'Slot Split'
message.setHandler("setRRS", function (msg, _, rrs)
storage.roundRobinSlots = rrs
if rrs then storage.onlyStack = false end
end)
--'Leave One'
message.setHandler("setLO", function (msg, _, leaveOne) storage.leaveOne = leaveOne end)
message.setHandler("setOS", function (msg, _, onlyStack) storage.onlyStack = onlyStack end)
--'Stack Only'
message.setHandler("setOS", function (msg, _, onlyStack)
storage.onlyStack = onlyStack
if onlyStack then storage.roundRobinSlots = false end
end)
object.setInteractive(true)
end

Expand Down Expand Up @@ -74,6 +84,9 @@ function initVars()
if not storage.invertSlots then
storage.invertSlots={false,false}
end
if storage.roundRobinSlots and storage.onlyStack then
storage.onlyStack=false
end
self.init=true
end

Expand Down Expand Up @@ -194,6 +207,10 @@ function routeItems(dt)
end
end
else
local itemBefore=world.containerItemAt(sourceContainer,indexIn-1)
if not itemBefore then
break
end
world.containerTakeNumItemsAt(sourceContainer,indexIn-1,item.count)
originalCount=originalCount-item.count
if not (storage.roundRobinSlots) then
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"category" : "furniture",
"sitFlipDirection" : false,
"objectType" : "loungeable",
"sitPosition" : [4, 20],
"sitPosition" : [2, 20],

"price" : 75,
"description" : "Well, this is unnecessarily glowy, but nice. Hard as rock, though.",
Expand All @@ -18,6 +18,7 @@
"orientations" : [
{
"imageLayers" : [ { "image" : "precursorchair.png:<color>.<key>", "fullbright" : true }, { "image" : "precursorchairlit.png:<color>.<key>" } ],
"sitCoverImage": "/objects/minibiome/precursor/precursorchair/precursorchaircover.png",
"imagePosition" : [-12, 0],

"direction" : "left",
Expand All @@ -28,6 +29,7 @@
},
{
"imageLayers" : [ { "image" : "precursorchair.png:<color>.<key>", "fullbright" : true }, { "image" : "precursorchairlit.png:<color>.<key>" } ],
"sitCoverImage": "/objects/minibiome/precursor/precursorchair/precursorchaircover.png",
"imagePosition" : [-12, 0],

"direction" : "right",
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{

"frameGrid" : {
"size" : [24, 32],
"dimensions" : [1, 1],
"names" : [
[ "default" ]
]
},
"aliases" : {
"default.default" : "default",
"default.0" : "default.default"
}
}
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 64cf4d0

Please sign in to comment.