Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Fixed LANG being global and sometimes used without PHE.
  • Loading branch information
Kurante2801 committed Nov 24, 2019
1 parent a6dec46 commit ac8255a
Show file tree
Hide file tree
Showing 8 changed files with 9 additions and 9 deletions.
4 changes: 2 additions & 2 deletions gamemodes/prop_hunt/gamemode/cl_credits.lua
Expand Up @@ -37,7 +37,7 @@ hook.Add("PH_CustomTabMenu", "PHE.About", function(tab, pVgui)
}

pVgui("","label","PHE.TitleFont",grid, label.title )
pVgui("","label","Trebuchet24",grid, PHE.LANG.PHEMENU.ABOUT.CURRENTVER .. label.version .. " | " .. LANG.PHEMENU.ABOUT.CURRENTREV .. label.rev)
pVgui("","label","Trebuchet24",grid, PHE.LANG.PHEMENU.ABOUT.CURRENTVER .. label.version .. " | " .. PHE.LANG.PHEMENU.ABOUT.CURRENTREV .. label.rev)
pVgui("","label","Trebuchet24",grid, PHE.LANG.PHEMENU.ABOUT.ENJOYING )
pVgui("","label",false,grid, PHE.LANG.PHEMENU.ABOUT.LINKS )
pVgui("","btn",{max = 3,textdata = {
Expand All @@ -46,7 +46,7 @@ hook.Add("PH_CustomTabMenu", "PHE.About", function(tab, pVgui)
[3] = { PHE.LANG.PHEMENU.ABOUT.GITHUB, function() gui.OpenURL(label.lgit) end},
}},grid,"")
pVgui("spacer1","spacer",nil,grid,"" )
pVgui("","label","Trebuchet24",grid, LANG.PHEMENU.ABOUT.THANKS .. "\n" .. label.credits )
pVgui("","label","Trebuchet24",grid, PHE.LANG.PHEMENU.ABOUT.THANKS .. "\n" .. label.credits )

tab:AddSheet(PHE.LANG.PHEMENU.ABOUT.TAB,panel,"icon16/information.png")
end)
2 changes: 1 addition & 1 deletion gamemodes/prop_hunt/gamemode/cl_init.lua
Expand Up @@ -264,7 +264,7 @@ function HUDPaint()
-- The 'You were Killed By' text, or the Freeze Cam text.
if LocalPlayer():GetNWBool("InFreezeCam", false) then
local textx = ScrW() / 2
draw.SimpleTextOutlined(string.format(LANG.HUD.FREEZECAM, LocalPlayer():GetNWEntity("PlayerKilledByPlayerEntity", nil):Name()), "TrebuchetBig", textx, ScrH() * 0.75, Color(255, 10, 10, 255), TEXT_ALIGN_CENTER, TEXT_ALIGN_CENTER, 1.5, Color(0, 0, 0, 255))
draw.SimpleTextOutlined(string.format(PHE.LANG.HUD.FREEZECAM, LocalPlayer():GetNWEntity("PlayerKilledByPlayerEntity", nil):Name()), "TrebuchetBig", textx, ScrH() * 0.75, Color(255, 10, 10, 255), TEXT_ALIGN_CENTER, TEXT_ALIGN_CENTER, 1.5, Color(0, 0, 0, 255))
end
end
hook.Add("HUDPaint", "PH_HUDPaint", HUDPaint)
Expand Down
2 changes: 1 addition & 1 deletion gamemodes/prop_hunt/gamemode/cl_menu.lua
Expand Up @@ -569,7 +569,7 @@ function ph_BaseMainWindow(ply, cmd, args)
Ph:CreateVGUIType("ph_hud_use_new", "check", "CLIENT", gridpl, PHE.LANG.PHEMENU.PLAYER.ph_hud_use_new)
Ph:CreateVGUIType("ph_show_tutor_control", "check", "CLIENT", gridpl, PHE.LANG.PHEMENU.PLAYER.ph_show_tutor_control)
Ph:CreateVGUIType("ph_show_custom_crosshair", "check", "CLIENT", gridpl, PHE.LANG.PHEMENU.PLAYER.ph_show_custom_crosshair)
Ph:CreateVGUIType("ph_show_team_topbar", "check", "CLIENT", gridpl, LANG.PHEMENU.PLAYER.ph_show_team_topbar)
Ph:CreateVGUIType("ph_show_team_topbar", "check", "CLIENT", gridpl, PHE.LANG.PHEMENU.PLAYER.ph_show_team_topbar)

tab:AddSheet(PHE.LANG.PHEMENU.PLAYER.TAB, panel, "icon16/user_orange.png")
end
Expand Down
2 changes: 1 addition & 1 deletion gamemodes/prop_hunt/gamemode/init.lua
Expand Up @@ -553,7 +553,7 @@ function GM:RoundTimerEnd()
return
end

GAMEMODE:RoundEndWithResult(TEAM_PROPS, string.format(LANG.HUD.WIN, "Props"))
GAMEMODE:RoundEndWithResult(TEAM_PROPS, string.format(PHE.LANG.HUD.WIN, "Props"))
PHE.VOICE_IS_END_ROUND = 1
ForceCloseTauntWindow(1)

Expand Down
2 changes: 1 addition & 1 deletion gamemodes/prop_hunt/gamemode/lang/english.lua
@@ -1,4 +1,4 @@
LANG = {}
local LANG = {}

-- Language code and name
LANG.Code = "en"
Expand Down
2 changes: 1 addition & 1 deletion gamemodes/prop_hunt/gamemode/lang/french.lua
@@ -1,5 +1,5 @@

LANG = {}
local LANG = {}

-- Language code and name
LANG.Code = "fr"
Expand Down
2 changes: 1 addition & 1 deletion gamemodes/prop_hunt/gamemode/lang/russian.lua
@@ -1,4 +1,4 @@
LANG = {}
local LANG = {}

-- Language code and name
LANG.Code = "ru"
Expand Down
2 changes: 1 addition & 1 deletion gamemodes/prop_hunt/gamemode/lang/spanish.lua
@@ -1,4 +1,4 @@
LANG = {}
local LANG = {}
-- Cualquier persona es bienvenida a mejorar esta traduccion (soy argentino y no se la regla de las tildes) - Fafy

-- Language code and name
Expand Down

0 comments on commit ac8255a

Please sign in to comment.