Skip to content
Open
5 changes: 5 additions & 0 deletions changelog.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,16 @@
0.9.30 (in development)
- Improved: Enemy scaling now caps out at 20 players, doing more adds too much stress to the server.
- Improved: Vehicles now temporarily disable collisions when entering a changelevel trigger, remains disabled set by settings.
- Improved: When using medkit to revive the teammate now have a progress bar.
- Improved: Compatibility with "Enhanced PlayerModel Selector" addon.
- Improved: Simplified Chinese localization.
- Added: Setting to disable vehicle collisions.
- Fixed: Bad lightning by forcing r_radiosity convar to 4.
- Fixed: Multiple weapons dissolving when an NPC dies.
- Fixed: ep1_citadel_03 disabled clip so Alyx can go through the door sooner.
- Fixed: Missing default crosshair and incomplete QuickInfo crosshair.
- Fixed: Rare game freeze on community maps when it's playing a cutscene.
- Fixed: Incorrect AUX power when server have "gmod_suit 1".

0.9.29
- Improved: Use new checkpoint structure in mapscripts where possible with better positioning (first 5 chapters).
Expand Down
2 changes: 2 additions & 0 deletions entities/entities/lambda_ragdollmanager.lua
Original file line number Diff line number Diff line change
Expand Up @@ -277,6 +277,8 @@ function ENT:CreateRagdoll(dmgForce, gibPlayer, didExplode)
ragdoll:Spawn()
ragdoll:SetCollisionGroup(COLLISION_GROUP_DEBRIS)

hook.Run("CreateEntityRagdoll", self:GetOwner(), ragdoll)

ragdoll.GetPlayerColor = function(s)
if IsValid(owner) and owner.GetPlayerColor ~= nil then return owner:GetPlayerColor() end
end
Expand Down
9 changes: 5 additions & 4 deletions entities/entities/lambda_trigger.lua
Original file line number Diff line number Diff line change
Expand Up @@ -1133,7 +1133,7 @@ else -- CLIENT

local _, h = 0, 0
local text = ""
local remaining = scheduledTime - GetSyncedTimestamp()
local remaining = math.Round(scheduledTime - GetSyncedTimestamp())

if remaining < 0 then
remaining = 0
Expand All @@ -1149,18 +1149,19 @@ else -- CLIENT
surface.SetFont("LAMBDA_2")
local textY = 0
local spacing = 10
text = "Waiting for players: " .. tostring(activePlayerCount) .. " / " .. tostring(playerCount)
text = language.GetPhrase("LAMBDA_CHECKPOINT_WAITING"):format(activePlayerCount, playerCount)
draw.DrawText(text, "LAMBDA_1", x, y + textY, colorBg, TEXT_ALIGN_CENTER)
draw.DrawText(text, "LAMBDA_2", x, y + textY, textColor, TEXT_ALIGN_CENTER)
w, h = surface.GetTextSize(text)
textY = textY + h + spacing
text = "Game will continue once all players are here"
text = language.GetPhrase("LAMBDA_CHECKPOINT_WAITING_2")

draw.DrawText(text, "LAMBDA_1", x, y + textY, colorBg, TEXT_ALIGN_CENTER)
draw.DrawText(text, "LAMBDA_2", x, y + textY, textColor, TEXT_ALIGN_CENTER)
textY = textY + h + spacing

if scheduledTime > 0 then
text = "Timeout in " .. string.format("%.02f", remaining) .. " seconds"
text = language.GetPhrase("LAMBDA_CHECKPOINT_WAITING_3"):format(remaining)
draw.DrawText(text, "LAMBDA_1", x, y + textY, colorBg, TEXT_ALIGN_CENTER)
draw.DrawText(text, "LAMBDA_2", x, y + textY, textColor, TEXT_ALIGN_CENTER)
textY = textY + h + spacing
Expand Down
8 changes: 4 additions & 4 deletions entities/entities/lambda_vehicle_tracker.lua
Original file line number Diff line number Diff line change
Expand Up @@ -134,13 +134,13 @@ elseif CLIENT then
local text = ""

if belongsToUs == true then
text = "Your Vehicle"
text = "#LAMBDA_VEHICLE_OWNED"
elseif isTaken == false then
if haveVehicle == true then
text = "Reserved Vehicle"
text = "#LAMBDA_VEHICLE_RESERVED"
alpha = alpha * 0.08
else
text = "Available Vehicle"
text = "#LAMBDA_VEHICLE_AVAILABLE"
end
elseif isTaken == true then
local ownerName = "???"
Expand All @@ -149,7 +149,7 @@ elseif CLIENT then
ownerName = owner:GetName()
end

text = "Vehicle belongs to " .. ownerName
text = language.GetPhrase("LAMBDA_VEHICLE_OWNED_BY_OTHERS"):format(ownerName)
alpha = alpha * 0.08
end

Expand Down
28 changes: 27 additions & 1 deletion entities/weapons/weapon_lambda_medkit.lua
Original file line number Diff line number Diff line change
Expand Up @@ -584,6 +584,24 @@ function SWEP:Holster(ent)
return true
end

function SWEP:DrawHUD()
if self:GetState() ~= STATE_CHARGING then return end

local bgColor = Color(0, 0, 0, 150)
local barColor = Color(0, 200, 0, 255)
local textColor = Color(255, 255, 255, 255)

local progress = self:GetChargeEnergy() / REVIVE_AMOUNT

local w, h = 600, 30
local x = (ScrW() / 2) - (w / 2)
local y = (ScrH() * 0.8) - (h / 2)

draw.RoundedBox(8, x, y, w, h, bgColor)
draw.RoundedBox(8, x + 2, y + 2, (w - 4) * progress, h - 4, barColor)
draw.SimpleText("Reviving...", "DermaDefault", x + (w / 2), y - 15, textColor, TEXT_ALIGN_CENTER)
end

function SWEP:DrawWorldModel()
self:DrawModel()
end
Expand Down Expand Up @@ -654,7 +672,7 @@ function SWEP:PostDrawPlayerHands(hands, vm, ply, wep)
end

function SWEP:Ammo1()
local energy = math.Clamp(self:GetEnergy() - self:GetChargeEnergy(), 0, 100)
local energy = math.Round(math.Clamp(self:GetEnergy() - self:GetChargeEnergy(), 0, 100))

return energy
end
Expand All @@ -663,6 +681,14 @@ function SWEP:Ammo2()
return 0
end

function SWEP:CustomAmmoDisplay()
local display = {}
display.Draw = true
display.PrimaryClip = self:Ammo1()

return display
end

if CLIENT then
surface.CreateFont("LambdaMedkitFont", {
font = "HalfLife2",
Expand Down
3 changes: 3 additions & 0 deletions gamemode/cl_hud.lua
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,9 @@ function GM:HUDShouldDraw(hudName)
elseif hudName == "CHUDQuickInfo" then
-- We make our own.
return false
elseif hudName == "CHudSuitPower" then
-- We have our own AUX power display.
return false
end

return true
Expand Down
3 changes: 2 additions & 1 deletion gamemode/cl_lang.lua
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,12 @@ local DbgPrint = GetLogging("Language")

local SUPPORTED_LANGUAGES = {
["en"] = "english",
["zh-cn"] = "schinese"
}

local function GetCurrentLanguage()
local gmod_language = GetConVar("gmod_language")
local lang = gmod_language:GetString()
local lang = gmod_language:GetString():lower()
local realLang = SUPPORTED_LANGUAGES[lang]
if realLang == nil then
DbgPrint("Language '" .. lang .. "' is not supported, falling back to 'en'")
Expand Down
121 changes: 120 additions & 1 deletion gamemode/gametypes/base/cl_localisation.lua
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
if SERVER then AddCSLuaFile() end

local LOCALISATION = {}

-- en (english)
LOCALISATION["english"] = {
["World"] = "Cruel World",
["base_ai"] = "Creature",
Expand All @@ -15,6 +18,12 @@ LOCALISATION["english"] = {
["Valve_Hint_CROSSBOW"] = "%+attack2% CROSSBOW ZOOM",
["GM_DIFFICULTY"] = "Difficulty level",
["GM_DIFFICULTY_DESC"] = "Set the gametype difficulty",
["GM_DIFFICULTY_MODE_VERY_EASY"] = "Very easy",
["GM_DIFFICULTY_MODE_EASY"] = "Easy",
["GM_DIFFICULTY_MODE_NORMAL"] = "Normal",
["GM_DIFFICULTY_MODE_HARD"] = "Hard",
["GM_DIFFICULTY_MODE_VERY_HARD"] = "Very hard",
["GM_DIFFICULTY_MODE_REALISM"] = "Realism",
["GM_WALKSPEED"] = "Walk speed",
["GM_WALKSPEED_DESC"] = "Set speed when slowly walking with ALT key",
["GM_NORMSPEED"] = "Normal speed",
Expand Down Expand Up @@ -53,6 +62,9 @@ LOCALISATION["english"] = {
["GM_DIFFMETRICS_DESC"] = "Metrics for use by developers",
["GM_WEAPONDROP"] = "Weapon drop mode",
["GM_WEAPONDROP_DESC"] = "Change what players drop on death",
["GM_WEAPONDROP_MODE_NONE"] = "Nothing",
["GM_WEAPONDROP_MODE_ACTIVE"] = "Active",
["GM_WEAPONDROP_MODE_ALL"] = "Everything",
["GM_CHANGELVLDELAY"] = "Level change delay",
["GM_CHANGELVLDELAY_DESC"] = "The amount in seconds to wait before changing to the next map",
["GM_VOICEGENDER"] = "Voice gender",
Expand All @@ -79,6 +91,113 @@ LOCALISATION["english"] = {
["GM_DM_TIMELIMIT_DESC"] = "Set how long the round lasts",
["GM_DM_TEAMONLY"] = "Team based deathmatch",
["GM_DM_TEAMONLY_DESC"] = "Switch between DM or TDM",
["LAMBDA_VEHICLE_TAKE_OVER"] = "Take over vehicle %+speed%+%+use%"
["LAMBDA_VEHICLE_TAKE_OVER"] = "Take over vehicle %+speed%+%+use%",
["LAMBDA_THIRDPARTY_EPS_WARNING"] = "Enhanced Playermodel Selector is installed,\nAnd \"Enforce your player model\" is enabled.\nYou must use the enhanced playermodel selector\nTo change your player model.",
["LAMBDA_CHECKPOINT_WAITING"] = "Waiting for players: %d / %d",
["LAMBDA_CHECKPOINT_WAITING_2"] = "Game will continue once all players are here",
["LAMBDA_CHECKPOINT_WAITING_3"] = "Timeout in %d seconds",
["LAMBDA_VEHICLE_OWNED"] = "Your Vehicle",
["LAMBDA_VEHICLE_RESERVED"] = "Reserved Vehicle",
["LAMBDA_VEHICLE_AVAILABLE"] = "Available Vehicle",
["LAMBDA_VEHICLE_OWNED_BY_OTHERS"] = "Vehicle belongs to %s"
}

-- zh-cn (schinese)
LOCALISATION["schinese"] = {
["World"] = "世界",
["base_ai"] = "生物",
["Valve_Hint_EnterVan"] = "%+use% 进入车辆",
["Valve_Hint_ExitVan"] = "%+use% 离开车辆",
["Valve_Hint_Crouch"] = "%+duck% 蹲下",
["Valve_Hint_Sprint"] = "%+speed% 冲刺",
["Valve_Hint_PushButton"] = "%+use% 按下按钮",
["Valve_Hint_PicKUp"] = "%+use% 拾取",
["Valve_Hint_Interact"] = "%+use% 互动",
["Valve_Hint_GravGun"] = "%+attack% 击飞物体 %+attack2% 拉取物体",
["Valve_Hint_CarryTurret"] = "%+use% 或重力枪拾取炮塔",
["Valve_Hint_CROSSBOW"] = "%+attack2% 使用瞄准镜",
["GM_DIFFICULTY"] = "难度",
["GM_DIFFICULTY_DESC"] = "设置游戏难度",
["GM_DIFFICULTY_MODE_VERY_EASY"] = "非常简单",
["GM_DIFFICULTY_MODE_EASY"] = "简单",
["GM_DIFFICULTY_MODE_NORMAL"] = "普通",
["GM_DIFFICULTY_MODE_HARD"] = "困难",
["GM_DIFFICULTY_MODE_VERY_HARD"] = "非常困难",
["GM_DIFFICULTY_MODE_REALISM"] = "真实",
["GM_WALKSPEED"] = "行走速度",
["GM_WALKSPEED_DESC"] = "按住 ALT 键慢走时的速度",
["GM_NORMSPEED"] = "正常速度",
["GM_NORMSPEED_DESC"] = "设置正常行走速度",
["GM_SPRINTSPEED"] = "冲刺速度",
["GM_SPRINTSPEED_DESC"] = "设置奔跑速度",
["GM_CONNECTTIMEOUT"] = "连接超时",
["GM_CONNECTTIMEOUT_DESC"] = "设置等待玩家连接的时间",
["GM_PLAYERCOLLISION"] = "玩家碰撞",
["GM_PLAYERCOLLISION_DESC"] = "玩家之间存在碰撞,无法穿过其他玩家",
["GM_FRIENDLYFIRE"] = "友军伤害",
["GM_FRIENDLYFIRE_DESC"] = "允许对队友造成伤害",
["GM_PREVENTITEMMOVE"] = "阻止补给品移动",
["GM_PREVENTITEMMOVE_DESC"] = "阻止补给因玩家因素而被移动(如射击)",
["GM_DEFAMMO"] = "启用弹药限制",
["GM_DEFAMMO_DESC"] = "使武器备弹无法超过半条命2的默认备弹上限",
["GM_AUTOJUMP"] = "允许自动连跳",
["GM_AUTOJUMP_DESC"] = "允许玩家按住跳跃键自动连跳",
["GM_RESPAWNTIME"] = "复活时间",
["GM_RESPAWNTIME_DESC"] = "设置玩家复活等待时间",
["GM_CHECKPOINT_RESPAWN"] = "检查点复活",
["GM_CHECKPOINT_RESPAWN_DESC"] = "玩家必须等待新的检查点才能复活",
["GM_RESTARTTIME"] = "重启时间",
["GM_RESTARTTIME_DESC"] = "设置回合失败后到重新开始之间的时间",
["GM_MAPCHANGETIME"] = "地图终点等待时间",
["GM_MAPCHANGETIME_DESC"] = "设置玩家到达地图终点时等待其他玩家的时间",
["GM_CHECKPOINTTIMEOUT"] = "检查点等待时间",
["GM_CHECKPOINTTIMEOUT_DESC"] = "设置玩家到达检查点时等待其他玩家的时间",
["GM_GODMODE"] = "无敌模式",
["GM_GODMODE_DESC"] = "启用无敌模式,免疫所有伤害",
["GM_PICKUPDELAY"] = "拾取物品延迟",
["GM_PICKUPDELAY_DESC"] = "设置玩家频繁按E拿东西(如木箱等)时至少要等待的延迟",
["GM_DIFFMETRICS"] = "NPC/玩家指标",
["GM_DIFFMETRICS_DESC"] = "供开发者使用的指标",
["GM_WEAPONDROP"] = "死亡武器掉落",
["GM_WEAPONDROP_DESC"] = "玩家死亡时,是否应该掉落武器",
["GM_WEAPONDROP_MODE_NONE"] = "不掉落",
["GM_WEAPONDROP_MODE_ACTIVE"] = "手持武器",
["GM_WEAPONDROP_MODE_ALL"] = "掉落全部",
["GM_CHANGELVLDELAY"] = "关卡切换延迟",
["GM_CHANGELVLDELAY_DESC"] = "切换至下一张地图前等待的秒数",
["GM_VOICEGENDER"] = "语音类型",
["GM_VOICEGENDER_DESC"] = "设置角色语音的类型",
["GM_COCKROACHES"] = "蟑螂数量",
["GM_COCKROACHES_DESC"] = "最多可生成的蟑螂数量,设为0以禁用",
["GM_ABH"] = "向后连跳加速",
["GM_ABH_DESC"] = "启用向后连跳加速,速通玩家常用的技巧以获得超高速度",
["GM_DYNCHECKPOINT"] = "启用动态检查点",
["GM_DYNCHECKPOINT_DESC"] = "根据玩家行为自动生成检查点",
["GM_NPCDMG"] = "重要NPC友伤",
["GM_NPCDMG_DESC"] = "允许玩家对重要NPC造成队友伤害",
["GM_PLYTRACK"] = "玩家隔墙显示",
["GM_PLYTRACK_DESC"] = "允许看见墙壁后的玩家",
["GM_ANTLIONCOLLISION"] = "友方蚁狮碰撞",
["GM_ANTLIONCOLLISION_DESC"] = "启用/禁用与友方蚁狮的碰撞",
["GM_PLAYERSPEECH"] = "玩家角色语音",
["GM_PLAYERSPEECH_DESC"] = "允许玩家根据游戏内行为自动说话(如发现敌人等)",
["GM_PLAYERHURTSOUNDS"] = "玩家受伤语音",
["GM_PLAYERHURTSOUNDS_DESC"] = "启用/禁用玩家根据受到的伤害自动发言",
["GM_DM_FRAGLIMIT"] = "分数限制",
["GM_DM_FRAGLIMIT_DESC"] = "设置结束回合的分数上限",
["GM_DM_TIMELIMIT"] = "回合时间限制",
["GM_DM_TIMELIMIT_DESC"] = "设置回合持续时间",
["GM_DM_TEAMONLY"] = "团队死斗模式",
["GM_DM_TEAMONLY_DESC"] = "切换自由死斗或团队死斗",
["LAMBDA_VEHICLE_TAKE_OVER"] = "接管载具 %+speed%+%+use%",
["LAMBDA_THIRDPARTY_EPS_WARNING"] = "Enhanced Playermodel Selector 已安装,\n且“强制使用选中模型”已启用。\n你必须使用增强版玩家模型选择器\n来更改你的玩家模型。",
["LAMBDA_CHECKPOINT_WAITING"] = "等待玩家汇合: %d / %d",
["LAMBDA_CHECKPOINT_WAITING_2"] = "流程将会在所有玩家汇合于此后继续进行",
["LAMBDA_CHECKPOINT_WAITING_3"] = "还剩 %d 秒",
["LAMBDA_VEHICLE_OWNED"] = "状态: 可以驾驶",
["LAMBDA_VEHICLE_RESERVED"] = "状态: 禁止驾驶",
["LAMBDA_VEHICLE_AVAILABLE"] = "状态: 可以驾驶",
["LAMBDA_VEHICLE_OWNED_BY_OTHERS"] = "状态: 禁止驾驶(归属\"%s\")"
}

return LOCALISATION
18 changes: 9 additions & 9 deletions gamemode/gametypes/gametype_base.lua
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ end
function GAMETYPE:GetDifficultyData()
return {
[0] = {
Name = "Very Easy",
Name = "#GM_DIFFICULTY_MODE_VERY_EASY",
Proficiency = WEAPON_PROFICIENCY_POOR,
Skill = 1,
NPCSpawningScale = 0.0,
Expand Down Expand Up @@ -148,7 +148,7 @@ function GAMETYPE:GetDifficultyData()
}
},
[1] = {
Name = "Easy",
Name = "#GM_DIFFICULTY_MODE_EASY",
Proficiency = WEAPON_PROFICIENCY_AVERAGE,
Skill = 1,
NPCSpawningScale = 0.2,
Expand Down Expand Up @@ -180,7 +180,7 @@ function GAMETYPE:GetDifficultyData()
}
},
[2] = {
Name = "Normal",
Name = "#GM_DIFFICULTY_MODE_NORMAL",
Proficiency = WEAPON_PROFICIENCY_GOOD,
Skill = 2,
NPCSpawningScale = 0.4,
Expand Down Expand Up @@ -212,7 +212,7 @@ function GAMETYPE:GetDifficultyData()
}
},
[3] = {
Name = "Hard",
Name = "#GM_DIFFICULTY_MODE_HARD",
Proficiency = WEAPON_PROFICIENCY_VERY_GOOD,
Skill = 2,
NPCSpawningScale = 0.7,
Expand Down Expand Up @@ -244,7 +244,7 @@ function GAMETYPE:GetDifficultyData()
}
},
[4] = {
Name = "Very Hard",
Name = "#GM_DIFFICULTY_MODE_VERY_HARD",
Proficiency = WEAPON_PROFICIENCY_PERFECT,
Skill = 3,
NPCSpawningScale = 1,
Expand Down Expand Up @@ -276,7 +276,7 @@ function GAMETYPE:GetDifficultyData()
}
},
[5] = {
Name = "Realism",
Name = "#GM_DIFFICULTY_MODE_REALISM",
Proficiency = WEAPON_PROFICIENCY_PERFECT,
Skill = 3,
NPCSpawningScale = 1,
Expand Down Expand Up @@ -518,9 +518,9 @@ function GAMETYPE:InitSettings()
Extra = {
Type = "combo",
Choices = {
[0] = "Nothing",
[1] = "Active",
[2] = "Everything"
[0] = "#GM_WEAPONDROP_MODE_NONE",
[1] = "#GM_WEAPONDROP_MODE_ACTIVE",
[2] = "#GM_WEAPONDROP_MODE_ALL"
}
}
})
Expand Down
Loading
Loading