Skip to content

Commit bf2924c

Browse files
committed
Refactor news formatting functions for improved readability
1 parent 53aa80c commit bf2924c

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

Data/News.lua

+4-4
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
local CraftSim = select(2, ...)
33

44
local GUTIL = CraftSim.GUTIL
5+
local f = GUTIL:GetFormatter()
56

67
CraftSim.NEWS = {}
78

@@ -10,13 +11,12 @@ CraftSim.NEWS.GITHUB_COLLABS = {
1011
}
1112

1213
local print = CraftSim.DEBUG:RegisterDebugID("Data.News")
14+
local function newP(v) return f.l("\n --- Version " .. v .. " ---\n") end
15+
local function collab(gl) return f.a .. "- Thanks to " .. f.bb(gl) end
1316

1417
---@param itemMap table<string, ItemMixin>
1518
function CraftSim.NEWS:GET_NEWS(itemMap)
16-
-- minimize names to make manual formatting easier :p
17-
local f = GUTIL:GetFormatter()
18-
local function newP(v) return f.l("\n --- Version " .. v .. " ---\n") end
19-
local function collab(gl) return f.a .. "- Thanks to " .. f.bb(gl) end
19+
2020
local supporterListUpdate = f.p .. f.patreon("Supporter List Update ") ..
2121
CraftSim.MEDIA:GetAsTextIcon(CraftSim.MEDIA.IMAGES.PIXEL_HEART, 0.15)
2222
local news = {

0 commit comments

Comments
 (0)