Skip to content

Commit

Permalink
fixing db entries + formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
wookiefriseur committed Jul 16, 2023
1 parent 4671e80 commit c611636
Show file tree
Hide file tree
Showing 16 changed files with 96 additions and 127 deletions.
1 change: 0 additions & 1 deletion FurCControlBridge.lua
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,6 @@ function FurC.GuiOnSearchBoxClick(control, mouseButton, doubleClick)
end
end


function FurC.GuiOnScroll(control, delta)
if not delta then
return
Expand Down
4 changes: 0 additions & 4 deletions FurCSettingsAdapter.lua
Original file line number Diff line number Diff line change
Expand Up @@ -465,10 +465,6 @@ function FurC.GetDropdownChoiceTextual(dropdownName)
return FurC.DropdownData["Choices" .. dropdownName][value]
end

function FurC.GetDefaultDropdownChoiceTextual()
return FurC.DropdownData["Choices" .. dropdownName][FurC.GetDefaultDropdownChoice(dropdownName)]
end

function FurC.GetAccountCrafters()
local ret = {}
for characterName, isCrafter in pairs(FurC.settings.accountCharacters) do
Expand Down
12 changes: 10 additions & 2 deletions FurCUtil.lua
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
-- TABLE UTILS --

--- Merges Table2 into Table1, mutates Table1 inplace and replaces its values if they have the same key. Example: merge({a="1",b="3"},{b="2"}) => {a="1",b="2"}
--- @param t1 any
--- @param t2 any
Expand All @@ -20,6 +22,7 @@ end

-- ruthlessly stolen from TextureIt
-- ToDo: ZO_TableOrderingFunction
--- @return table sortedTable
function FurC.SortTable(tTable, sortKey, SortOrderUp)
local keys = {}
for k in pairs(tTable) do
Expand All @@ -38,6 +41,7 @@ function FurC.SortTable(tTable, sortKey, SortOrderUp)
return tTable[a][sortKey] < tTable[b][sortKey]
end
end
return tTable
end)

local ret = {}
Expand All @@ -58,11 +62,15 @@ end
-- STRING UTILS --

function FurC.capitalise(str)
str = str:gsub("^(%l)(%w*)", function(a, b) return string.upper(a) .. b end)
str = str:gsub("^(%l)(%w*)", function(a, b)
return string.upper(a) .. b
end)
return str
end

function FurC.stripColor(aString)
if nil == aString then return "" end
if nil == aString then
return ""
end
return aString:gsub("|%l%l%d%d%d%d%d", ""):gsub("|%l%l%d%l%l%d%d", ""):gsub("|c25C31E", ""):gsub("", "")
end
19 changes: 9 additions & 10 deletions FurnitureCatalogue_DevUtility/Bindings.xml
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
<Bindings>
<Layer name="SI_KEYBINDINGS_CATEGORY_GENERAL">
<Category name="Furniture Catalogue">
<Action name="FURC_CONCAT_TO_TEXTBOX">
<Down>
FurnitureCatalogueDevUtility_AddToTextbox()
</Down>
</Action>
</Category>
</Layer>
<Bindings xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="http://sir.insidi.at/or/schema/esobindings.xsd">
<Layer name="SI_KEYBINDINGS_CATEGORY_GENERAL">
<Category name="Furniture Catalogue">
<Action name="FURC_CONCAT_TO_TEXTBOX">
<Down>FurnitureCatalogueDevUtility_AddToTextbox()</Down>
</Action>
</Category>
</Layer>
</Bindings>
15 changes: 6 additions & 9 deletions FurnitureCatalogue_DevUtility/Custom.example
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@
== This function is called "FurC.ScanRecipes" and lives in "FurC_Data.lua". ==

]]

--[[

== How to gather the data ==
Expand All @@ -49,7 +48,6 @@
After you've done that, type "/dumpfurniture" and do another /reloadui.
You will now find two additional tables in ..\SavedVariables\SidTools.lua.
]]

-- add FURC_DEMO to _Constants.lua
-- After sirinsidiator's example, 'Custom.lua' gets loaded already, and will be loaded last.

Expand Down Expand Up @@ -82,28 +80,28 @@ FurC.MiscItemSources[FURC_DEMO] = {

-- unconfirmed: Items that have been datamined, but not yet seen in-game.
-- Will filter out stuff that can't be obtained. Removing this will drive the OCD people nuts!
[FURC_RUMOUR] = {
[src.RUMOUR] = {
[4711] = "this is a demo item. It doesn't really exist and won't show up unless you filter for rumour items.",
},

-- Can be bought in the crown store. There's a utility function in data/MiscItemSources.lua to generate the price strings.
-- It's local, but you can just copy it to your new file.
[FURC_CROWN] = {
[src.CROWN] = {
[4811] = (getCrownPrice and getCrownPrice(9999)) or "oops", -- an item with the ID 4811 can be bought from crown store for 9999 crowns.
},

-- Anything that can be looted (legally - everything else goes into "FURC_JUSTICE"!).
[FURC_DROP] = {
-- Anything that can be looted (legally - everything else goes into "src.JUSTICE"!).
[src.DROP] = {
[4911] = "this is a demo item that will show up under 'drop'",
},

-- anything that can be looted _illegally_ - Pickpocketing, cracking safeboxes, you name it. Will require laundering.
[FURC_JUSTICE] = {
[src.JUSTICE] = {
[4712] = "You can steal this item somewhere. Where? No one but you will know, though!",
},

-- anything that can be fished. I treat these separately because some people are fine with grinding, not so fine with fishing.
[FURC_FISHING] = {
[src.FISHING] = {
[4713] = "Something something",
},
}
Expand All @@ -117,7 +115,6 @@ In the file data/AchievementVendors, you can see tables containing the achieveme
If you have added your account name to `FurnitureCatalogue_DevUtility\00_startup.lua`, you will see 'Add data to textbox' in the content menu.
Unfortunately, you need to look up the achievement ID for yourself, but at least the price will be autogenerated this way.
]]

-- To add your custom version to the dropdown, check FurC.DropdownData in startup.lua for pull requests.

FurC.DropdownData.ChoicesVersion[FURC_DEMO] = "this is my custom demo entry"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,15 +1,16 @@
## Title: FurnitureCatalogue_DevUtility
## Author: manavortex
## Description: This is a utility addon that helps me generate text entries for the data files. It won't do anything if you're not me, so feel free to unload it.\nYou're welcome to get in touch if you want to use this, then I can add you to the list.
## Description: This is a utility addon that helps generating entries for the furniture database.\nYou will only need it if you want to help with development or the database.
## Version: 2.0.0
## AddonVersion: 2000000
## APIVersion: 101038 101037
## DependsOn: FurnitureCatalogue
## OptionalDependsOn: sidTools AchievementFinder LibDebugLogger DebugLogViewer
## OptionalDependsOn: sidTools LibDebugLogger DebugLogViewer

Bindings.xml
xml.xml
00_startup.lua

startup.lua
ContextMenu.lua

DumpFurniture_sidTools.lua
Expand Down
File renamed without changes.
90 changes: 45 additions & 45 deletions FurnitureCatalogue_DevUtility/xml.xml
Original file line number Diff line number Diff line change
@@ -1,48 +1,48 @@
<?xml version="1.0" encoding="utf-8"?>
<GuiXml xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="http://sir.insidi.at/or/schema/esoui.xsd">
<Controls>
<TopLevelControl name="FurCDevControl" clampedToScreen="true" movable="true"
mouseEnabled="true" hidden="true" resizeHandleSize="10">
<Dimensions x="600" y="500" />
<Anchor point="CENTER" relativeTo="GUI_ROOT" relativePoint="CENTER" offsetX="-125"
offsetY="-140" />
<Controls>
<Backdrop name="$(parent)_BG" inherits="ZO_DefaultBackdrop">
<AnchorFill />
</Backdrop>
<Button name="$(parent)_hide" inherits="ZO_ButtonBehaviorClickSound">
<OnClicked>FurCDevUtility.ToggleEditBox()</OnClicked>
<Dimensions x="30" y="30" />
<Anchor point="TOPLEFT" relativeTo="$(parent)" relativePoint="TOPLEFT"
offsetX="10" offsetY="10" />
<Textures
normal="/esoui/art/buttons/decline_up.dds"
pressed="/esoui/art/buttons/decline_down.dds"
mouseOver="/esoui/art/buttons/decline_over.dds"
/>
</Button>
<Button name="$(parent)_clear" inherits="ZO_ButtonBehaviorClickSound">
<OnClicked>FurCDevUtility.clearControl()</OnClicked>
<Dimensions x="40" y="40" />
<Anchor point="TOPRIGHT" relativeTo="$(parent)" relativePoint="TOPRIGHT"
offsetX="-10" offsetY="10" />
<Textures
normal="/esoui/art/help/help_tabicon_feedback_up.dds"
pressed="/esoui/art/help/help_tabicon_feedback_down.dds "
mouseOver="/esoui/art/help/help_tabicon_feedback_over.dds"
/>
</Button>
<EditBox name="$(parent)Box"
inherits="ZO_DefaultEditMultiLine ZO_DefaultEditForDarkBackdrop">
<Anchor point="TOPLEFT" relativeTo="$(parent)" relativePoint="TOPLEFT"
offsetX="50" offsetY="50" />
<Anchor point="BOTTOMRIGHT" relativeTo="$(parent)" relativePoint="BOTTOMRIGHT"
offsetX="50" />
<OnFocusGained>FurCDevUtility.selectEntireTextbox()</OnFocusGained>
<OnTextChanged>FurCDevUtility.onTextboxTextChanged()</OnTextChanged>
</EditBox>
</Controls>
</TopLevelControl>
</Controls>
xsi:noNamespaceSchemaLocation="http://sir.insidi.at/or/schema/esoui.xsd">
<Controls>
<TopLevelControl name="FurCDevControl" clampedToScreen="true" movable="true" mouseEnabled="true"
hidden="true" resizeHandleSize="10">
<Dimensions x="600" y="500" />
<Anchor point="CENTER" relativeTo="GUI_ROOT" relativePoint="CENTER" offsetX="-125"
offsetY="-140" />
<Controls>
<Backdrop name="$(parent)_BG" inherits="ZO_DefaultBackdrop">
<AnchorFill />
</Backdrop>
<Button name="$(parent)_hide" inherits="ZO_ButtonBehaviorClickSound">
<OnClicked>FurCDev.ToggleEditBox()</OnClicked>
<Dimensions x="30" y="30" />
<Anchor point="TOPLEFT" relativeTo="$(parent)" relativePoint="TOPLEFT" offsetX="10"
offsetY="10" />
<Textures
normal="/esoui/art/buttons/decline_up.dds"
pressed="/esoui/art/buttons/decline_down.dds"
mouseOver="/esoui/art/buttons/decline_over.dds"
/>
</Button>
<Button name="$(parent)_clear" inherits="ZO_ButtonBehaviorClickSound">
<OnClicked>FurCDev.clearControl()</OnClicked>
<Dimensions x="40" y="40" />
<Anchor point="TOPRIGHT" relativeTo="$(parent)" relativePoint="TOPRIGHT" offsetX="-10"
offsetY="10" />
<Textures
normal="/esoui/art/help/help_tabicon_feedback_up.dds"
pressed="/esoui/art/help/help_tabicon_feedback_down.dds "
mouseOver="/esoui/art/help/help_tabicon_feedback_over.dds"
/>
</Button>
<EditBox name="$(parent)Box"
inherits="ZO_DefaultEditMultiLine ZO_DefaultEditForDarkBackdrop">
<Anchor point="TOPLEFT" relativeTo="$(parent)" relativePoint="TOPLEFT" offsetX="50"
offsetY="50" />
<Anchor point="BOTTOMRIGHT" relativeTo="$(parent)" relativePoint="BOTTOMRIGHT"
offsetX="50" />
<OnFocusGained>FurCDev.selectEntireTextbox()</OnFocusGained>
<OnTextChanged>FurCDev.onTextboxTextChanged()</OnTextChanged>
</EditBox>
</Controls>
</TopLevelControl>
</Controls>
</GuiXml>
14 changes: 4 additions & 10 deletions data/01_Homestead/H_AchievementVendors.lua
Original file line number Diff line number Diff line change
Expand Up @@ -218,10 +218,10 @@ local structures = {
[117961] = { -- Rough Block, Woodcutter's
itemPrice = 100,
},
[117987] = { -- Rough Plank, Long
[117986] = { -- Rough Plank, Long
itemPrice = 100,
},
[117961] = { -- Rough Planks, Narrow
[117987] = { -- Rough Planks, Narrow
itemPrice = 100,
},
[117988] = { -- Rough Planks, Platform
Expand All @@ -242,9 +242,6 @@ local boxes = {
[117959] = { -- Rough Container, Shipping
itemPrice = 100,
},
[117959] = { -- Rough Box, Slatted
itemPrice = 100,
},
[117931] = { -- Rough Crate Lid
itemPrice = 100,
},
Expand Down Expand Up @@ -1565,9 +1562,6 @@ FurC.AchievementVendors[ver.HOMESTEAD] = {
[120441] = { -- Sapling, Short Highland
itemPrice = 100,
},
[120443] = { -- Sapling, Strong Highland
itemPrice = 100,
},
[120443] = { -- Sapling, Tall Highland
itemPrice = 100,
},
Expand Down Expand Up @@ -2378,7 +2372,7 @@ FurC.AchievementVendors[ver.HOMESTEAD] = {
itemPrice = 25000,
achievement = 1371,
},
[119954] = { -- Statue of Shadows
[119971] = { -- Statue of Shadows
itemPrice = 25000,
achievement = 1401,
},
Expand Down Expand Up @@ -2440,7 +2434,7 @@ FurC.AchievementVendors[ver.HOMESTEAD] = {
[117981] = { -- Rough Firewood, Smoldering
itemPrice = 100,
},
[117976] = { -- Rough Hay Bed, Sloppy
[117975] = { -- Rough Hay Bed, Sloppy
itemPrice = 100,
},
[117976] = { -- Rough Hay Bed, Covered
Expand Down
5 changes: 1 addition & 4 deletions data/02_Morrowind/M_AchievementVendors.lua
Original file line number Diff line number Diff line change
Expand Up @@ -119,9 +119,6 @@ local b2 = {
[117959] = { -- Rough Container, Shipping
itemPrice = 100,
},
[117959] = { -- Rough Box, Slatted
itemPrice = 100,
},
[117931] = { -- Rough Crate Lid
itemPrice = 100,
},
Expand Down Expand Up @@ -180,7 +177,7 @@ FurC.AchievementVendors[ver.MORROWIND] = {
achievement = 1867, -- Morrowind Grand Adventurer
},
[126624] = { -- Banner of House Indoril
itemPrice = 126624,
itemPrice = 10000,
achievement = 1867, -- Morrowind Grand Adventurer
},
[126628] = { -- Banner, Morag Tong
Expand Down
12 changes: 4 additions & 8 deletions data/06_2018/MiscItemSources.lua
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,9 @@ FurC.MiscItemSources[ver.WOTL] = {
[120881] = rumourSource, -- Tombstone, Engraved, Order of the Hour,
[120882] = rumourSource, -- Tombstone, Small,
[147636] = rumourSource, -- Banner of Hermaeus Mora,
[147644] = rumourSource, -- Palisade, Crude,
[147645] = rumourSource, -- Dwarven Tonal Arc,
[147647] = rumourSource, -- Dwarven Centurion Blade, Detached,
[132166] = rumourSource, -- Death Skeleton, Robed,
[134474] = rumourSource, -- Banner, Malacath,
[147599] = rumourSource, -- Banner of Namira,
Expand Down Expand Up @@ -503,8 +506,6 @@ FurC.MiscItemSources[ver.ALTMER] = {
[126464] = getCrownPrice(610), -- Telvanni Painting, Oversized Valley
[126462] = getCrownPrice(610), -- Telvanni Painting, Oversized Volcanic

[139331] = getCrownPrice(45), -- Coral Formation, Tree Antler

[139083] = getCrownPrice(30), -- Plants, Grasswort Patch

[139088] = getCrownPrice(50), -- Alinor Table Runner, Verdant
Expand Down Expand Up @@ -666,7 +667,6 @@ FurC.MiscItemSources[ver.ALTMER] = {
[139077] = fishing_summerset, -- Coral Formation, Bulwark
[139078] = fishing_summerset, -- Coral Formation, Pillar Polyps
[139082] = fishing_summerset, -- Plants, Ruby Glasswort Patch
[139068] = fishing_summerset, -- Plants, Springwheeze
},

[src.RUMOUR] = {
Expand All @@ -685,6 +685,7 @@ FurC.MiscItemSources[ver.ALTMER] = {
[132203] = dataminedUnclear, -- Stone, Anvil Limestone
[132197] = dataminedUnclear, -- Death Skeleton, Shrouded
[140297] = dataminedUnclear, -- Replica Throne of Alinor,
[130070] = dataminedUnclear, -- Daedric Spout, Arched,
[120856] = dataminedUnclear, -- Yokudan Sarcophagus
[120857] = dataminedUnclear, -- Yokudan Sarcophagus Lid
[120858] = dataminedUnclear, -- Yokudan Tapestry
Expand Down Expand Up @@ -862,7 +863,6 @@ FurC.MiscItemSources[ver.MORROWIND] = { -- Morrowind

-- drops from plants
[125631] = plants_vvardenfell, -- Plants, Ash Frond
[125647] = plants_vvardenfell, -- Plants, Ash Frond
[131420] = plants_vvardenfell, -- Plants, Ash Frond
[125553] = plants_vvardenfell, -- Flowers, Netch Cabbage Stalks
[125551] = plants_vvardenfell, -- Flowers, Netch Cabbage
Expand Down Expand Up @@ -900,8 +900,6 @@ FurC.MiscItemSources[ver.MORROWIND] = { -- Morrowind
[125671] = plants_vvardenfell, -- Toadstool, Bloodtooth Cap
[125672] = plants_vvardenfell, -- Toadstool, Bloodtooth Cluster

[125649] = plants_vvardenfell, -- Shrub, Flowering Dusk

[126759] = questRewardSuran, -- Sir Sock's Ball of Yarn

[126592] = GetString(SI_FURC_PLANTS), -- Plants, Hanging Pitcher Pair
Expand Down Expand Up @@ -1129,7 +1127,6 @@ FurC.MiscItemSources[ver.HOMESTEAD] = {

[118064] = getCrownPrice(45), -- Common Barrel, Dry
[118065] = getCrownPrice(45), -- Common Cargo Crate, Dry
[118064] = getCrownPrice(45), -- Common Barrel, Dry

[118054] = getCrownPrice(80), -- Common Firepit, Outdoor
[118055] = getCrownPrice(80), -- Common Firepit, Piled
Expand All @@ -1155,7 +1152,6 @@ FurC.MiscItemSources[ver.HOMESTEAD] = {
[118120] = getCrownPrice(120), -- Minecart, Push
[118278] = getCrownPrice(140), -- Plaque, Bordered Deer Antlers
[115395] = getCrownPrice(40), -- Nord Drinking Horn, Display
[118065] = getCrownPrice(45), -- Common Cargo Crate, Dry
[118118] = getCrownPrice(100), -- Candles, Lasting
},

Expand Down
Loading

0 comments on commit c611636

Please sign in to comment.