settings for infection times + server creation settings

This commit is contained in:
Jonny_Bro (Nikita) 2023-10-14 10:35:51 +05:00
parent b6f2a6e3de
commit ab6a16f576
7 changed files with 89 additions and 250 deletions

View file

@ -10,263 +10,87 @@
{ {
1 1
{ {
"name" "physgun_limited" "name" "Beatrun_PuristMode"
"text" "limit_physgun" "text" "beatrun.toolsmenu.gameplay.puristmode"
"help" "If enabled, the Physics Gun will not be able to pick up certain map entities" "help" "#beatrun.toolsmenu.gameplay.puristmodedesc"
"type" "CheckBox" "type" "CheckBox"
"default" "0" "default" "1"
"singleplayer" "1"
} }
2 2
{ {
"name" "sbox_weapons" "name" "Beatrun_QuickturnGround"
"text" "enable_weapons" "text" "beatrun.toolsmenu.gameplay.quickturnground"
"help" "If enabled, each player will receive default Half-Life 2 weapons on each spawn" "help" "#beatrun.toolsmenu.gameplay.quickturngrounddesc"
"type" "CheckBox" "type" "CheckBox"
"default" "1" "default" "0"
"singleplayer" "1" "singleplayer" "1"
} }
3 3
{ {
"name" "sbox_godmode" "name" "Beatrun_QuickturnHandsOnly"
"text" "allow_god_mode" "text" "beatrun.toolsmenu.gameplay.quickturnhandsonly"
"help" "If enabled, all players will be invincible" "help" "#beatrun.toolsmenu.gameplay.quickturnhandsonlydesc"
"type" "CheckBox" "type" "CheckBox"
"default" "0" "default" "1"
"singleplayer" "1" "singleplayer" "1"
} }
4 4
{ {
"name" "sbox_playershurtplayers" "name" "Beatrun_DisableGrapple"
"text" "players_damage_players" "text" "beatrun.toolsmenu.gameplay.disablegrapple"
"help" "If enabled, players will be able to hurt each other" "help" "#beatrun.toolsmenu.gameplay.disablegrappledesc"
"type" "CheckBox" "type" "CheckBox"
"default" "1" "default" "0"
"singleplayer" "1"
} }
5 5
{ {
"name" "sbox_maxprops" "name" "Beatrun_AllowPropSpawn"
"text" "max_props" "text" "beatrun.toolsmenu.misc.propspawn"
"help" "Maximum props a single player can create" "help" "#beatrun.toolsmenu.misc.propspawndesc"
"type" "Numeric" "type" "CheckBox"
"default" "200" "default" "0"
} }
6 6
{ {
"name" "sbox_maxragdolls" "name" "Beatrun_AllowOverdriveInMultiplayer"
"text" "max_ragdolls" "text" "beatrun.toolsmenu.misc.overdrivemp"
"help" "Maximum ragdolls a single player can create" "help" "#beatrun.toolsmenu.misc.overdrivempdesc"
"type" "Numeric" "type" "CheckBox"
"default" "10" "default" "0"
} }
7 7
{ {
"name" "sbox_maxvehicles" "name" "Beatrun_PuristModeForce"
"text" "max_vehicles" "text" "beatrun.toolsmenu.moves.forcepuristmode"
"help" "Maximum vehicles a single player can create" "help" "#beatrun.toolsmenu.moves.forcepuristmodedesc"
"type" "Numeric" "type" "CheckBox"
"default" "4" "default" "0"
} }
8 8
{ {
"name" "sbox_maxeffects" "name" "Beatrun_PuristWallrun"
"text" "max_effects" "text" "beatrun.toolsmenu.moves.realisticwallrunning"
"help" "Maximum effect props a single player can create" "help" "#beatrun.toolsmenu.moves.realisticwallrunningdesc"
"type" "Numeric" "type" "CheckBox"
"default" "200" "default" "1"
} }
9 9
{ {
"name" "sbox_maxballoons" "name" "Beatrun_AllowOverdriveInMultiplayer"
"text" "max_balloons" "text" "beatrun.toolsmenu.misc.overdrivemp"
"help" "Maximum balloons a single player can create" "help" "#beatrun.toolsmenu.misc.overdrivempdesc"
"type" "Numeric"
"default" "100"
}
10
{
"name" "sbox_maxcameras"
"text" "max_cameras"
"help" "Maximum cameras a single player can create"
"type" "Numeric"
"default" "10"
}
11
{
"name" "sbox_maxnpcs"
"text" "max_npcs"
"help" "Maximum NPCs a single player can create"
"type" "Numeric"
"default" "10"
}
12
{
"name" "sbox_maxsents"
"text" "max_entities"
"help" "Maximum entities a single player can create"
"type" "Numeric"
"default" "100"
}
13
{
"name" "sbox_maxdynamite"
"text" "max_dynamite"
"help" "Maximum dynamites a single player can create"
"type" "Numeric"
"default" "10"
}
14
{
"name" "sbox_maxlamps"
"text" "max_lamps"
"help" "Maximum lamps a single player can create"
"type" "Numeric"
"default" "3"
}
15
{
"name" "sbox_maxlights"
"text" "max_lights"
"help" "Maximum lights a single player can create"
"type" "Numeric"
"default" "5"
}
16
{
"name" "sbox_maxwheels"
"text" "max_wheels"
"help" "Maximum wheels a single player can create"
"type" "Numeric"
"default" "50"
}
17
{
"name" "sbox_maxthrusters"
"text" "max_thrusters"
"help" "Maximum thrusters a single player can create"
"type" "Numeric"
"default" "50"
}
18
{
"name" "sbox_maxhoverballs"
"text" "max_hoverballs"
"help" "Maximum hoverballs a single player can create"
"type" "Numeric"
"default" "50"
}
19
{
"name" "sbox_maxbuttons"
"text" "max_buttons"
"help" "Maximum buttons a single player can create"
"type" "Numeric"
"default" "50"
}
20
{
"name" "sbox_maxemitters"
"text" "max_emitters"
"help" "Maximum emitters a single player can create"
"type" "Numeric"
"default" "20"
}
21
{
"name" "gmod_maxammo"
"text" "gmod_maxammo"
"help" "Forces amount of maximum ammo reserves for all weapons of each player. Values 0 and below mean use weapon's ammo type maximum ammo setting instead."
"type" "Numeric"
"default" "9999"
"singleplayer" "1"
"dontcreate" "1"
}
22
{
"name" "gmod_suit"
"text" "gmod_suit"
"help" "Set to non zero to enable Half-Life 2 aux suit power stuff."
"type" "CheckBox" "type" "CheckBox"
"default" "0" "default" "0"
"singleplayer" "1"
"dontcreate" "1"
}
23
{
"name" "sbox_noclip"
"text" "allow_noclip"
"help" "If enabled, players will be able to use noclip"
"type" "CheckBox"
"default" "1"
}
24
{
"name" "mp_falldamage"
"text" "realistic_falldamage"
"help" "Enable realistic fall damage"
"type" "CheckBox"
"default" "0"
"singleplayer" "1"
"dontcreate" "1"
}
25
{
"name" "sbox_bonemanip_npc"
"text" "bone_manipulate_npcs"
"help" "If enabled then manipulating NPC bones will be allowed"
"type" "CheckBox"
"default" "1"
}
26
{
"name" "sbox_bonemanip_player"
"text" "bone_manipulate_players"
"help" "If enabled then manipulating Player bones will be allowed"
"type" "CheckBox"
"default" "0"
}
27
{
"name" "sbox_bonemanip_misc"
"text" "bone_manipulate_others"
"help" "If enabled then manipulating the bones of other entities will be allowed"
"type" "CheckBox"
"default" "0"
}
28
{
"name" "sbox_persist"
"text" "persistent_mode_menu"
"help" "If not empty, enables 'Make Persistent' option when you right click on props while holding C, allowing you to save them across sessions. Changing this convar will save existing persistent props, cleanup the whole map and load props from given file."
"type" "Text"
"default" ""
"singleplayer" "1"
} }
} }
} }

View file

@ -204,15 +204,18 @@ beatrun.toolsmenu.gamemodes.name=Gamemodes
beatrun.toolsmenu.gamemodes.desc=Gamemodes Settings beatrun.toolsmenu.gamemodes.desc=Gamemodes Settings
beatrun.toolsmenu.gamemodes.error=Another gamemode is running! beatrun.toolsmenu.gamemodes.error=Another gamemode is running!
beatrun.toolsmenu.gamemodesc.infection=Toggle Infection Gamemode beatrun.toolsmenu.gamemodes.infection=Toggle Infection Gamemode
beatrun.toolsmenu.gamemodesc.datatheft=Toggle Data Theft Gamemode beatrun.toolsmenu.gamemodes.infectionstarttime=Time before starting the game
beatrun.toolsmenu.gamemodesc.deathmatch=Toggle Deathmatch Gamemode beatrun.toolsmenu.gamemodes.infectiongametime=Length of the gamemode
beatrun.toolsmenu.gamemodes.infectiontime=Time in seconds
beatrun.toolsmenu.gamemodes.datatheft=Toggle Data Theft Gamemode
beatrun.toolsmenu.gamemodes.deathmatch=Toggle Deathmatch Gamemode
# Checkpoints # Checkpoints
beatrun.checkpoints.countdown1=Ready beatrun.checkpoints.countdown1=Ready
beatrun.checkpoints.countdown2=Steady beatrun.checkpoints.countdown2=Set
beatrun.checkpoints.countdown3=GO! beatrun.checkpoints.countdown3=GO!
beatrun.checkpoints.speedometer= %s km/h beatrun.checkpoints.speedometer=%s km/h
# DataTheft # DataTheft
beatrun.datatheft.name=Data Theft (%s) beatrun.datatheft.name=Data Theft (%s)

View file

@ -50,8 +50,8 @@ beatrun.hud.infector=Заражённый
# Menu_Course # Menu_Course
beatrun.coursemenu.trials=Курсы - %s beatrun.coursemenu.trials=Курсы - %s
beatrun.coursemenu.buildmode=Переключить режим строительства beatrun.coursemenu.buildmode=Режим строительства
beatrun.coursemenu.freeplay=Вернуться в свободную игру beatrun.coursemenu.freeplay=Свободная игра
# CoursesDatabase # CoursesDatabase
beatrun.coursesdatabase.cantuploadfreeplay=Нельзя загружать во время свободной игры beatrun.coursesdatabase.cantuploadfreeplay=Нельзя загружать во время свободной игры
@ -167,7 +167,7 @@ beatrun.toolsmenu.moves.speedlimitdesc=Изменяет ограничение
beatrun.toolsmenu.moves.forcepuristmode=Принудительный Режим Purist beatrun.toolsmenu.moves.forcepuristmode=Принудительный Режим Purist
beatrun.toolsmenu.moves.forcepuristmodedesc=Включает режим Purist для всех игроков beatrun.toolsmenu.moves.forcepuristmodedesc=Включает режим Purist для всех игроков
beatrun.toolsmenu.moves.realisticwallrunning="Реалистичный" Без по Стенам beatrun.toolsmenu.moves.realisticwallrunning="Реалистичный" Бег по Стенам
beatrun.toolsmenu.moves.realisticwallrunningdesc=Нет потери в скорости если отключить beatrun.toolsmenu.moves.realisticwallrunningdesc=Нет потери в скорости если отключить
beatrun.toolsmenu.moves.kickglitch=Kick Glitch beatrun.toolsmenu.moves.kickglitch=Kick Glitch
@ -204,15 +204,18 @@ beatrun.toolsmenu.gamemodes.name=Режимы
beatrun.toolsmenu.gamemodes.desc=Настройка режимов beatrun.toolsmenu.gamemodes.desc=Настройка режимов
beatrun.toolsmenu.gamemodes.error=Другой режим уже запущен! beatrun.toolsmenu.gamemodes.error=Другой режим уже запущен!
beatrun.toolsmenu.gamemodesc.infection=Переключить Infection beatrun.toolsmenu.gamemodes.infection=Переключить Infection
beatrun.toolsmenu.gamemodesc.datatheft=Переключить Data Theft beatrun.toolsmenu.gamemodes.infectionstarttime=Время перед началом
beatrun.toolsmenu.gamemodesc.deathmatch=Переключить Deathmatch beatrun.toolsmenu.gamemodes.infectiongametime=Продолжительность
beatrun.toolsmenu.gamemodes.infectiontime=Время в секундах
beatrun.toolsmenu.gamemodes.datatheft=Переключить Data Theft
beatrun.toolsmenu.gamemodes.deathmatch=Переключить Deathmatch
# Checkpoints # Checkpoints
beatrun.checkpoints.countdown1=Раз beatrun.checkpoints.countdown1=Раз
beatrun.checkpoints.countdown2=Два beatrun.checkpoints.countdown2=Два
beatrun.checkpoints.countdown3=ПОШЁЛ! beatrun.checkpoints.countdown3=ПОШЁЛ!
beatrun.checkpoints.speedometer= %s км/ч beatrun.checkpoints.speedometer=%s км/ч
# DataTheft # DataTheft
beatrun.datatheft.name=Data Theft (%s) beatrun.datatheft.name=Data Theft (%s)
@ -224,10 +227,10 @@ beatrun.deathmatch.start=Deathmatch! Убивайте игроков чтобы
# Infection # Infection
beatrun.infection.name=Infection beatrun.infection.name=Infection
beatrun.infection.start=Infection! Дотрагивайтесь до других игроков чтобы заразить их\n%s игроков будет выбрано через %sс beatrun.infection.start=Infection! Дотрагивайтесь до других игроков чтобы заразить их\n%s игрок(а/ов) будет выбрано через %s сек
beatrun.infection.nosurvivors=Никто... beatrun.infection.nosurvivors=Никто...
beatrun.infection.infected=был заражён! beatrun.infection.infected=был заражён!
beatrun.infection.infectedby=заразил beatrun.infection.infectedby=заразил
beatrun.infection.award=Вы получили 200 XP за выживание! beatrun.infection.award=Вы получили 200 XP за выживание!
beatrun.infection.awardinfected=Вы получили 100 XP за спавн заражённым! beatrun.infection.awardinfected=Вы получили 100 XP за спавн заражённым!
beatrun.infection.end=Игра окончена!\nВыжившие: %s\nПерезапуск через %sс beatrun.infection.end=Игра окончена!\nВыжившие: %s\nПерезапуск через 15 сек

View file

@ -307,15 +307,21 @@ hook.Add("PopulateToolMenu", "Beatrun_ToolMenu", function()
panel:ClearControls() panel:ClearControls()
panel:SetName("#beatrun.toolsmenu.gamemodes.desc") panel:SetName("#beatrun.toolsmenu.gamemodes.desc")
panel:NumSlider("#beatrun.toolsmenu.gamemodes.infectionstarttime", "Beatrun_InfectionStartTime", 5, 20, 0)
panel:Help("#beatrun.toolsmenu.gamemodes.infectiontime")
panel:NumSlider("#beatrun.toolsmenu.gamemodes.infectiongametime", "Beatrun_InfectionGameTime", 30, 600, 0)
panel:Help("#beatrun.toolsmenu.gamemodes.infectiontime")
local InfectionButton = vgui.Create("DButton", panel) local InfectionButton = vgui.Create("DButton", panel)
InfectionButton:SetText("#beatrun.toolsmenu.gamemodesc.infection") InfectionButton:SetText("#beatrun.toolsmenu.gamemodes.infection")
InfectionButton:SetSize(0, 20) InfectionButton:SetSize(0, 20)
InfectionButton.DoClick = function() InfectionButton.DoClick = function()
if GetGlobalBool("GM_DEATHMATCH") or GetGlobalBool("GM_DATATHEFT") then if GetGlobalBool("GM_DEATHMATCH") or GetGlobalBool("GM_DATATHEFT") then
InfectionButton:SetText("#beatrun.toolsmenu.gamemodes.error") InfectionButton:SetText("#beatrun.toolsmenu.gamemodes.error")
timer.Simple(2, function() timer.Simple(2, function()
InfectionButton:SetText("#beatrun.toolsmenu.gamemodesc.infection") InfectionButton:SetText("#beatrun.toolsmenu.gamemodes.infection")
end) end)
return return
@ -326,14 +332,14 @@ hook.Add("PopulateToolMenu", "Beatrun_ToolMenu", function()
panel:AddItem(InfectionButton) panel:AddItem(InfectionButton)
local DatatheftButton = vgui.Create("DButton", panel) local DatatheftButton = vgui.Create("DButton", panel)
DatatheftButton:SetText("#beatrun.toolsmenu.gamemodesc.datatheft") DatatheftButton:SetText("#beatrun.toolsmenu.gamemodes.datatheft")
DatatheftButton:SetSize(0, 20) DatatheftButton:SetSize(0, 20)
DatatheftButton.DoClick = function() DatatheftButton.DoClick = function()
if GetGlobalBool("GM_INFECTION") or GetGlobalBool("GM_DEATHMATCH") then if GetGlobalBool("GM_INFECTION") or GetGlobalBool("GM_DEATHMATCH") then
DatatheftButton:SetText("#beatrun.toolsmenu.gamemodes.error") DatatheftButton:SetText("#beatrun.toolsmenu.gamemodes.error")
timer.Simple(2, function() timer.Simple(2, function()
DatatheftButton:SetText("#beatrun.toolsmenu.gamemodesc.datatheft") DatatheftButton:SetText("#beatrun.toolsmenu.gamemodes.datatheft")
end) end)
return return
@ -344,14 +350,14 @@ hook.Add("PopulateToolMenu", "Beatrun_ToolMenu", function()
panel:AddItem(DatatheftButton) panel:AddItem(DatatheftButton)
local DeathmatchButton = vgui.Create("DButton", panel) local DeathmatchButton = vgui.Create("DButton", panel)
DeathmatchButton:SetText("#beatrun.toolsmenu.gamemodesc.deathmatch") DeathmatchButton:SetText("#beatrun.toolsmenu.gamemodes.deathmatch")
DeathmatchButton:SetSize(0, 20) DeathmatchButton:SetSize(0, 20)
DeathmatchButton.DoClick = function() DeathmatchButton.DoClick = function()
if GetGlobalBool("GM_INFECTION") or GetGlobalBool("GM_DATATHEFT") then if GetGlobalBool("GM_INFECTION") or GetGlobalBool("GM_DATATHEFT") then
DeathmatchButton:SetText("#beatrun.toolsmenu.gamemodes.error") DeathmatchButton:SetText("#beatrun.toolsmenu.gamemodes.error")
timer.Simple(2, function() timer.Simple(2, function()
DeathmatchButton:SetText("#beatrun.toolsmenu.gamemodesc.deathmatch") DeathmatchButton:SetText("#beatrun.toolsmenu.gamemodes.deathmatch")
end) end)
return return

View file

@ -98,6 +98,6 @@ if CLIENT then
net.Receive("DataTheft_Start", function() net.Receive("DataTheft_Start", function()
hook.Add("BeatrunHUDCourse", "DataTheftHUDName", DataTheftHUDName) hook.Add("BeatrunHUDCourse", "DataTheftHUDName", DataTheftHUDName)
chat.AddText(Color(200, 200, 200), "#beatrun.datatheft.start") chat.AddText(Color(200, 200, 200), language.GetPhrase("beatrun.datatheft.start"))
end) end)
end end

View file

@ -77,6 +77,6 @@ if CLIENT then
net.Receive("Deathmatch_Start", function() net.Receive("Deathmatch_Start", function()
hook.Add("BeatrunHUDCourse", "DeathmatchHUDName", DeathmatchHUDName) hook.Add("BeatrunHUDCourse", "DeathmatchHUDName", DeathmatchHUDName)
chat.AddText(Color(200, 200, 200), "#beatrun.deathmatch.start") chat.AddText(Color(200, 200, 200), language.GetPhrase("beatrun.deathmatch.start"))
end) end)
end end

View file

@ -1,6 +1,9 @@
Infection_StartTime = 0 Infection_StartTime = 0
Infection_EndTime = 0 Infection_EndTime = 0
local startTime = CreateConVar("Beatrun_InfectionStartTime", 10, {FCVAR_REPLICATED, FCVAR_ARCHIVE}, "", 5, 20)
local gameTime = CreateConVar("Beatrun_InfectionGameTime", 190, {FCVAR_REPLICATED, FCVAR_ARCHIVE}, "", 30, 600)
function table.Shuffle(t) function table.Shuffle(t)
local n = #t local n = #t
@ -239,8 +242,8 @@ if SERVER then
end end
end end
Infection_StartTime = CurTime() + 10 Infection_StartTime = CurTime() + startTime:GetInt()
Infection_EndTime = CurTime() + 190 Infection_EndTime = CurTime() + gameTime:GetInt()
hook.Add("Think", "InfectionTimer", InfectionTimer) hook.Add("Think", "InfectionTimer", InfectionTimer)
end end
@ -283,7 +286,7 @@ if SERVER then
if timeremaining <= 70 and timeremaining >= 50 and player.GetCount() > 6 and humancount == 1 then if timeremaining <= 70 and timeremaining >= 50 and player.GetCount() > 6 and humancount == 1 then
timer.Simple(0.1, function() timer.Simple(0.1, function()
for k, v in ipairs(player.GetAll()) do for _, v in ipairs(player.GetAll()) do
if v:Alive() and not v:GetNW2Bool("Infected") then if v:Alive() and not v:GetNW2Bool("Infected") then
net.Start("Infection_LastMan") net.Start("Infection_LastMan")
net.Send(v) net.Send(v)
@ -370,13 +373,13 @@ if CLIENT then
noclipkey = input.GetKeyCode(noclipbind) noclipkey = input.GetKeyCode(noclipbind)
endtime = 0 endtime = 0
Infection_StartTime = start + 10 Infection_StartTime = start + startTime:GetInt()
Infection_EndTime = start + 190 Infection_EndTime = start + gameTime:GetInt()
hook.Add("BeatrunHUDCourse", "InfectionHUDName", InfectionHUDName) hook.Add("BeatrunHUDCourse", "InfectionHUDName", InfectionHUDName)
hook.Add("CalcView", "InfectionCalcView", InfectionCalcView) hook.Add("CalcView", "InfectionCalcView", InfectionCalcView)
chat.AddText(chatcolor, language.GetPhrase("beatrun.infection.start"):format(math.max(math.floor(player.GetCount() / 4), 1), _time)) chat.AddText(chatcolor, language.GetPhrase("beatrun.infection.start"):format(math.max(math.floor(player.GetCount() / 4), 1), startTime:GetInt()))
end) end)
local music = nil local music = nil
@ -399,7 +402,7 @@ if CLIENT then
survivors = survivors:sub(1, -3) survivors = survivors:sub(1, -3)
if survivors == "" then if survivors == "" then
survivors = "#beatrun.infection.nosurvivors" survivors = language.GetPhrase("beatrun.infection.nosurvivors")
LocalPlayer():EmitSound("death.wav") LocalPlayer():EmitSound("death.wav")
end end
@ -432,9 +435,9 @@ if CLIENT then
if IsValid(attacker) and IsValid(victim) then if IsValid(attacker) and IsValid(victim) then
if attacker == victim then if attacker == victim then
chat.AddText(attacker, red, " #beatrun.infection.infected") chat.AddText(attacker, red, " " .. language.GetPhrase("beatrun.infection.infected"))
else else
chat.AddText(attacker, red, " #beatrun.infection.infectedby ", yellow, victim, "!") chat.AddText(attacker, red, " " .. language.GetPhrase("beatrun.infection.infectedby") .. " ", yellow, victim, "!")
end end
attacker.InfectionTouchDelay = CurTime() + 3 attacker.InfectionTouchDelay = CurTime() + 3
@ -497,10 +500,10 @@ if CLIENT then
if humanwin then if humanwin then
LocalPlayer():AddXP(200) LocalPlayer():AddXP(200)
chat.AddText(chatcolor, "#beatrun.infection.award") chat.AddText(chatcolor, language.GetPhrase("beatrun.infection.award"))
else else
LocalPlayer():AddXP(100) LocalPlayer():AddXP(100)
chat.AddText(chatcolor, "#beatrun.infection.awardinfected") chat.AddText(chatcolor, language.GetPhrase("beatrun.infection.awardinfected"))
end end
end) end)