Added methods to define new descriptions
This commit is contained in:
1 parent
1c7df4ffb4
commit
061268b1ab
3 files changed
+33
-20
No files matched your search
@@ -0,0 +1 @@
|
||||
save1.dat
|
||||
+19
-20
@@ -77,51 +77,50 @@ EID.ItemTypeAnm2Names = {
|
||||
---------------------------------------------------------------------------
|
||||
-------------------------Handle API Functions -----------------------------
|
||||
|
||||
-- Adds a description for a collectible. Optional parameters: itemName, language, transformations
|
||||
function EID:addCollectible(id, description, itemName, language, transformations)
|
||||
-- Adds a description for a collectible. Optional parameters: itemName, language
|
||||
function EID:addCollectible(id, description, itemName, language)
|
||||
itemName = itemName or nil
|
||||
language = language or "en_us"
|
||||
transformations = transformations or "0"
|
||||
EID.descriptions[language].custom["collectible_" .. id] = {id, transformations, itemName, description}
|
||||
EID.descriptions[language].custom["collectible_" .. id] = {id, itemName, description}
|
||||
end
|
||||
|
||||
-- Adds a description for a trinket. Optional parameters: itemName, language, transformations
|
||||
function EID:addTrinket(id, description, itemName, language, transformations)
|
||||
-- Adds a description for a trinket. Optional parameters: itemName, language
|
||||
function EID:addTrinket(id, description, itemName, language)
|
||||
itemName = itemName or nil
|
||||
language = language or "en_us"
|
||||
transformations = transformations or "0"
|
||||
EID.descriptions[language].custom["trinket_" .. id] = {id, transformations, itemName, description}
|
||||
EID.descriptions[language].custom["trinket_" .. id] = {id, itemName, description}
|
||||
end
|
||||
|
||||
-- Adds a description for a card/rune. Optional parameters: itemName, language, transformations
|
||||
function EID:addCard(id, description, itemName, language, transformations)
|
||||
-- Adds a description for a card/rune. Optional parameters: itemName, language
|
||||
function EID:addCard(id, description, itemName, language)
|
||||
itemName = itemName or nil
|
||||
language = language or "en_us"
|
||||
transformations = transformations or "0"
|
||||
EID.descriptions[language].custom["card_" .. id] = {id, transformations, itemName, description}
|
||||
EID.descriptions[language].custom["card_" .. id] = {id, itemName, description}
|
||||
end
|
||||
|
||||
-- Adds a description for a pilleffect id. Optional parameters: itemName, language, transformations
|
||||
function EID:addPill(id, description, itemName, language, transformations)
|
||||
-- Adds a description for a pilleffect id. Optional parameters: itemName, language
|
||||
function EID:addPill(id, description, itemName, language)
|
||||
itemName = itemName or nil
|
||||
language = language or "en_us"
|
||||
transformations = transformations or "0"
|
||||
EID.descriptions[language].custom["pill_" .. id] = {id, transformations, itemName, description}
|
||||
EID.descriptions[language].custom["pill_" .. id] = {id, itemName, description}
|
||||
end
|
||||
|
||||
-- Adds transformations to an entity.
|
||||
function EID:addTransformation(targetType, targetIdentifier, transformationString, language)
|
||||
EID.descriptions[language].custom["transformations_"..targetType.."_".. targetIdentifier] = {targetType, targetIdentifier, transformationString}
|
||||
end
|
||||
|
||||
-- Adds a description for a pilleffect id. Optional parameters: language, transformations
|
||||
-- when subtype is -1 or empty, it will affect all subtypes of that entity
|
||||
function EID:addEntity(id, variant, subtype, entityName, description, language, transformations)
|
||||
function EID:addEntity(id, variant, subtype, entityName, description, language)
|
||||
subtype = subtype or nil
|
||||
language = language or "en_us"
|
||||
transformations = transformations or "0"
|
||||
EID.descriptions[language].custom[id .. "." .. variant .. "." .. subtype] = {
|
||||
id,
|
||||
variant,
|
||||
subtype,
|
||||
entityName,
|
||||
description,
|
||||
transformations
|
||||
description
|
||||
}
|
||||
end
|
||||
|
||||
|
||||
@@ -22,6 +22,9 @@ local charsToDebug = {
|
||||
"End of line",
|
||||
}
|
||||
|
||||
-----------------------------------------------
|
||||
----------------LEGACY METHODS-----------------
|
||||
-----------------------------------------------
|
||||
------ Legacy Overriding descriptions ------
|
||||
__eidItemDescriptions[1] = "\1 Overriden description" -- 5.100.1 = Sad Onion
|
||||
__eidTrinketDescriptions[1] = "\2 Overriden " -- 5.350.1 = swallowed penny
|
||||
@@ -49,6 +52,16 @@ __eidItemTransformations[3] = "1,2,3,4,5,6,7,8,9,10,11,12,13"
|
||||
------ Test: Description with colors ------
|
||||
__eidItemDescriptions[3] = "Some {{ColorRed}}long ass Test string with a lot of Words that sound interesting#With{{ColorBlink}} cool {{CR}}{{ColorRed}}C{{ColorGreen}}o{{ColorBlue}}l{{ColorYellow}}o{{ColorOrange}}r{{ColorPink}}s{{ColorWhite}} and a high amount of nifty {{ColorRainbow}}Swag "
|
||||
|
||||
-----------------------------------------------
|
||||
------------------NEW METHODS------------------
|
||||
-----------------------------------------------
|
||||
------ Overriding descriptions------
|
||||
EID:addCollectible(5,"New override Method") -- minimal method
|
||||
EID:addCollectible(6,"New override Method","new Name","ru") -- maximal method
|
||||
EID:addCard(2,"New override Method","new Name") -- card
|
||||
EID:addPill(2,"New override Method","new Name") -- pill
|
||||
EID:addEntity(5,10,2,"Custom Name","Custom description") -- Entity
|
||||
|
||||
local function onDebugRender(t)
|
||||
for i, v in ipairs(charsToDebug) do
|
||||
local pos = Vector(EIDConfig["XPosition"], EIDConfig["YPosition"] - 15 + ((i - 1) * 14))
|
||||
|
||||
Reference in new issue
Block a user