diff --git a/eid_api.lua b/eid_api.lua index dcb881fb..2b7ec5e5 100644 --- a/eid_api.lua +++ b/eid_api.lua @@ -113,7 +113,7 @@ end function EID:getDescriptionObj(objTable, objID) local tableEntry = EID.descriptions[EIDConfig["Language"]][objTable][tonumber(objID)] or EID.descriptions["en_us"][objTable][tonumber(objID)] local description = {} - description.ID = tableEntry[1] or objID + description.ID = tonumber(tableEntry[1]) or objID description.Name = EID:getObjectName(objID, objTable) or objTable description.Description = tableEntry[4] or tableEntry[3] or "" description.Transformation = tableEntry[2] or "0" @@ -177,16 +177,9 @@ end -- Replaces shorthand-representations of a character with the internal reference function EID:replaceShortMarkupStrings(text) - text = string.gsub(text, "!!!", "{{Warning}}") -- Turn 3 Exclamations into Warning - text = string.gsub(text, "↑", "{{ArrowUp}}") -- Up Arrow - text = string.gsub(text, "↓", "{{ArrowDown}}") -- Down Arrow - text = string.gsub(text, "\1", "{{ArrowUp}}") -- Legacy Up Arrow - text = string.gsub(text, "\2", "{{ArrowDown}}") -- Legacy Down Arrow - text = string.gsub(text, "\3", "{{Warning}}") -- Legacy Warning - text = string.gsub(text, "\6", "{{Heart}}") -- Legacy Heart - text = string.gsub(text, "\5", "{{Key}}") -- Legacy Key - text = string.gsub(text, "\015", "{{Coin}}") -- Legacy Coin - text = string.gsub(text, "\8\189", "{{Bomb}}") -- Legacy BOMB + for _,pair in ipairs(EID.TextReplacementPairs) do + text = string.gsub(text, pair[1], pair[2]) + end return text end diff --git a/eid_data.lua b/eid_data.lua index e338f65a..d880c95e 100644 --- a/eid_data.lua +++ b/eid_data.lua @@ -1,3 +1,18 @@ +-- Specific strings that will be replaced with something else. This is used to convert Shortcuts into internal markup. +EID.TextReplacementPairs = { + {"!!!", "{{Warning}}"}, -- Turn 3 Exclamations into Warning + {"↑", "{{ArrowUp}}"}, -- Up Arrow + {"↓", "{{ArrowDown}}"}, -- Down Arrow + {"\1", "{{ArrowUp}}"}, -- Legacy Up Arrow + {"\2", "{{ArrowDown}}"}, -- Legacy Down Arrow + {"\3", "{{Warning}}"}, -- Legacy Warning + {"\6", "{{Heart}}"}, -- Legacy Heart + {"\5", "{{Key}}"}, -- Legacy Key + {"\015", "{{Coin}}"}, -- Legacy Coin + {"\8\189", "{{Bomb}}"}, -- Legacy BOMB + {"{{Hashtag}}", "ǂ"}, -- Hashtag +} + --Format: [SHORTCUT]= {Animationname, Frame, Width, Height, LeftOffset [Default: -1], TopOffset [Default: 0], SpriteObject [Default: EID.InlineIconSprite]} EID.InlineIcons = { ["ERROR"] = {"ERROR", 0, 10, 10}, diff --git a/eid_debugging.lua b/eid_debugging.lua index b15b5845..326388bb 100644 --- a/eid_debugging.lua +++ b/eid_debugging.lua @@ -9,10 +9,10 @@ local charsToDebug = { "cyrillic 1: Аа Бб Вв Гг Дд Ее Ёё Жж Зз Ии Йй Кк Лл Мм Нн Оо", "cyrillic 2: Пп Рр Сс Тт Уу Фф Хх Цц Чч Шш Щщ Ъъ Ыы Ьь Ээ Юю Яя", "polish: Ąą Ćć Ęę Łł Ńń Óó Śś Źź Żż", - "custom icons: ↑Positive ↓Negative \007bulletpoint !Exclamation ǃWarning !!!shortcut", + "custom icons: ↑Positive ↓Negative \007bulletpoint !Exclamation ǃWarning !!!3!shortcut ǂHashtag", "legacy icon Markup: \\1:\1Positive \\2:\2Negative \\3:\3Warning ! \\6:\6 heart \\5:\5 Key \\015:\015 Coin \\8\\189:\8\189 Bomb", "emotes: ☆★〠♠♣♥♦♤♧♡♢☀☂♨♪♭♯♂♀", - "Markup main: |{{ArrowUp}}|{{ArrowDown}}|{{Warning}}|{{ERROR}}|", + "Markup main: |{{ArrowUp}}|{{ArrowDown}}|{{Warning}}|{{ERROR}}|{{Hashtag}}", "Markup numbers: |{{0}}|{{1}}|{{2}}|{{3}}|{{4}}|{{5}}|{{6}}|{{7}}|{{8}}|{{9}}|{{10}}|{{11}}|{{12}}|", "Markup hearts: |{{Heart}}|{{HalfHeart}}|{{EthernalHeart}}|{{EmptyHeart}}|{{BlendedHeart}}|{{BoneHeart}}|{{HalfBoneHeart}}|{{EmptyBoneHeart}}|{{SoulHeart}}|{{HalfSoulHeart}}|{{BlackHeart}}|{{HalfBlackHeart}}|{{GoldenHeart}}|{{CoinHeart}}|{{HalfCoinHeart}}|{{EmptyCoinHeart}}|", "Markup pickups: |{{Key}}|{{GoldenKey}}|{{Bomb}}|{{GoldenBomb}}|{{Coin}}|{{Card}}|{{RedCard}}|{{Collectible}}|{{Pill}}|{{Trinket}}|{{Battery}}|{{Rune}}|{{Slotmachine}}|", @@ -36,7 +36,6 @@ dummySprite:Load("gfx/eid_inline_icons.anm2", true) EID.InlineIcons["Test"] = {"hearts", 0, 9, 9, -1, 0, dummySprite} __eidItemDescriptions[2] = "{{Bomb}} Emote {{Key}} Test {{Test}} description {{InvalidMarkupThing}} cool" -- 5.100.2 = Inner Eye - -- test adding custom transformation icon EID.TransformationIcons["Test"] = {"hearts", 9, 9, -1, 0, dummySprite} __eidItemTransformations[2] = "Test" diff --git a/resources/font/PixelMplus10-Regular-edited.ttf b/resources/font/PixelMplus10-Regular-edited.ttf index 07b8f071..5ad1560a 100644 Binary files a/resources/font/PixelMplus10-Regular-edited.ttf and b/resources/font/PixelMplus10-Regular-edited.ttf differ diff --git a/resources/font/PixelMplus10-Regular.sfd b/resources/font/PixelMplus10-Regular.sfd index e78e998a..1e25b254 100644 --- a/resources/font/PixelMplus10-Regular.sfd +++ b/resources/font/PixelMplus10-Regular.sfd @@ -22,7 +22,7 @@ OS2Version: 1 OS2_WeightWidthSlopeOnly: 0 OS2_UseTypoMetrics: 0 CreationTime: 1370142052 -ModificationTime: 1599857363 +ModificationTime: 1603583696 PfmFamily: 17 TTFWeight: 400 TTFWidth: 5 @@ -87,8 +87,8 @@ NameList: AGL For New Fonts DisplaySize: -48 AntiAlias: 1 FitToEm: 0 -WinInfo: 39 39 14 -BeginChars: 65538 7287 +WinInfo: 0 39 14 +BeginChars: 65538 7288 StartChar: .notdef Encoding: 65536 -1 0 @@ -497666,5 +497666,51 @@ SplineSet 100 100 l 1,24,-1 EndSplineSet EndChar + +StartChar: uni01C2 +Encoding: 450 450 7287 +Width: 600 +Flags: W +LayerCount: 2 +Fore +SplineSet +400 300 m 1,0,-1 + 500 300 l 1,1,-1 + 500 200 l 1,2,-1 + 400 200 l 1,3,-1 + 400 300 l 1,0,-1 +400 500 m 1,4,-1 + 500 500 l 1,5,-1 + 500 400 l 1,6,-1 + 400 400 l 1,7,-1 + 400 500 l 1,4,-1 +0 200 m 1,8,-1 + 0 300 l 1,9,-1 + 100 300 l 1,10,-1 + 100 400 l 1,11,-1 + 0 400 l 1,12,-1 + 0 500 l 1,13,-1 + 100 500 l 1,14,-1 + 100 700 l 1,15,-1 + 200 700 l 1,16,-1 + 200 500 l 1,17,-1 + 300 500 l 1,18,-1 + 300 700 l 1,19,-1 + 400 700 l 1,20,-1 + 400 0 l 1,21,-1 + 300 0 l 1,22,-1 + 300 200 l 1,23,-1 + 200 200 l 1,24,-1 + 200 0 l 1,25,-1 + 100 0 l 1,26,-1 + 100 200 l 1,27,-1 + 0 200 l 1,8,-1 +300 300 m 1,28,-1 + 300 400 l 1,29,-1 + 200 400 l 1,30,-1 + 200 300 l 1,31,-1 + 300 300 l 1,28,-1 +EndSplineSet +EndChar EndChars EndSplineFont diff --git a/resources/font/eid_default.fnt b/resources/font/eid_default.fnt index 6214c76a..e3a14b0f 100644 Binary files a/resources/font/eid_default.fnt and b/resources/font/eid_default.fnt differ diff --git a/resources/font/eid_default_0.png b/resources/font/eid_default_0.png index 6d4c7eb4..0d706828 100644 Binary files a/resources/font/eid_default_0.png and b/resources/font/eid_default_0.png differ diff --git a/resources/font/eid_default_1.png b/resources/font/eid_default_1.png index b1a4403d..4adf9a75 100644 Binary files a/resources/font/eid_default_1.png and b/resources/font/eid_default_1.png differ