zombiesurvival-evolved/gamemodes/zombiesurvival/gamemode/vgui/poptions.lua

449 lines
14 KiB
Lua
Raw Permalink Normal View History

2014-10-02 08:49:54 +08:00
function MakepOptions()
PlayMenuOpenSound()
if pOptions then
pOptions:SetAlpha(0)
pOptions:AlphaTo(255, 0.15, 0)
2014-10-02 08:49:54 +08:00
pOptions:SetVisible(true)
pOptions:MakePopup()
return
end
local Window = vgui.Create("DFrame")
local wide = math.min(ScrW(), 500)
local tall = math.min(ScrH(), 800)
2014-10-02 08:49:54 +08:00
Window:SetSize(wide, tall)
Window:Center()
Window:SetTitle(" ")
Window:SetDeleteOnClose(false)
pOptions = Window
local y = 8
local label = EasyLabel(Window, "Options", "ZSScoreBoardTitle", color_white)
2014-10-02 08:49:54 +08:00
label:SetPos(wide * 0.5 - label:GetWide() * 0.5, y)
y = y + label:GetTall() + 8
local list = vgui.Create("DPanelList", pOptions)
list:EnableVerticalScrollbar()
list:EnableHorizontal(false)
list:SetSize(wide - 24, tall - y - 12)
list:SetPos(12, y)
list:SetPadding(8)
list:SetSpacing(4)
gamemode.Call("AddExtraOptions", list, Window)
local check = vgui.Create("DCheckBoxLabel", Window)
check:SetText("Always display nail health")
check:SetConVar("zs_alwaysshownails")
check:SizeToContents()
list:AddItem(check)
check = vgui.Create("DCheckBoxLabel", Window)
check:SetText("Always third person knockdown camera")
check:SetConVar("zs_thirdpersonknockdown")
check:SizeToContents()
list:AddItem(check)
check = vgui.Create("DCheckBoxLabel", Window)
check:SetText("Always volunteer to start as a zombie")
check:SetConVar("zs_alwaysvolunteer")
check:SizeToContents()
list:AddItem(check)
check = vgui.Create("DCheckBoxLabel", Window)
check:SetText("Always quick buy from arsenal and remantler")
check:SetConVar("zs_alwaysquickbuy")
check:SizeToContents()
list:AddItem(check)
check = vgui.Create("DCheckBoxLabel", Window)
check:SetText("Automatic suicide when changing classes")
check:SetConVar("zs_suicideonchange")
check:SizeToContents()
list:AddItem(check)
check = vgui.Create("DCheckBoxLabel", Window)
check:SetText("Disable automatic redeeming (next round)")
check:SetConVar("zs_noredeem")
check:SizeToContents()
list:AddItem(check)
check = vgui.Create("DCheckBoxLabel", Window)
check:SetText("Disable pressing use to deposit ammo in deployables")
check:SetConVar("zs_nousetodeposit")
check:SizeToContents()
list:AddItem(check)
check = vgui.Create("DCheckBoxLabel", Window)
check:SetText("Disable use to prop pickup (only pickup items)")
check:SetConVar("zs_nopickupprops")
check:SizeToContents()
list:AddItem(check)
check = vgui.Create("DCheckBoxLabel", Window)
check:SetText("Disable iron sights view model translation")
check:SetConVar("zs_noironsights")
check:SizeToContents()
list:AddItem(check)
check = vgui.Create("DCheckBoxLabel", Window)
check:SetText("Disable crosshair rotate")
check:SetConVar("zs_nocrosshairrotate")
check:SizeToContents()
list:AddItem(check)
check = vgui.Create("DCheckBoxLabel", Window)
check:SetText("Disable ironsight scopes")
check:SetConVar("zs_disablescopes")
check:SizeToContents()
list:AddItem(check)
check = vgui.Create("DCheckBoxLabel", Window)
check:SetText("Display experience")
check:SetConVar("zs_drawxp")
check:SizeToContents()
list:AddItem(check)
check = vgui.Create("DCheckBoxLabel", Window)
2014-10-02 08:49:54 +08:00
check:SetText("Don't show point floaters")
check:SetConVar("zs_nofloatingscore")
check:SizeToContents()
list:AddItem(check)
check = vgui.Create("DCheckBoxLabel", Window)
check:SetText("Don't hide arsenal and resupply packs")
check:SetConVar("zs_hidepacks")
2014-10-02 08:49:54 +08:00
check:SizeToContents()
list:AddItem(check)
check = vgui.Create("DCheckBoxLabel", Window)
check:SetText("Don't hide friends via transparency")
check:SetConVar("zs_showfriends")
2014-10-02 08:49:54 +08:00
check:SizeToContents()
list:AddItem(check)
check = vgui.Create("DCheckBoxLabel", Window)
check:SetText("Draw crosshair in ironsights.")
check:SetConVar("zs_ironsightscrosshair")
check:SizeToContents()
list:AddItem(check)
check = vgui.Create("DCheckBoxLabel", Window)
2014-10-02 08:49:54 +08:00
check:SetText("Enable ambient music")
check:SetConVar("zs_beats")
check:SizeToContents()
list:AddItem(check)
check = vgui.Create("DCheckBoxLabel", Window)
2014-10-02 08:49:54 +08:00
check:SetText("Enable last human music")
check:SetConVar("zs_playmusic")
check:SizeToContents()
list:AddItem(check)
check = vgui.Create("DCheckBoxLabel", Window)
2014-10-02 08:49:54 +08:00
check:SetText("Enable post processing")
check:SetConVar("zs_postprocessing")
check:SizeToContents()
list:AddItem(check)
check = vgui.Create("DCheckBoxLabel", Window)
2014-10-02 08:49:54 +08:00
check:SetText("Enable film grain")
check:SetConVar("zs_filmgrain")
check:SizeToContents()
list:AddItem(check)
check = vgui.Create("DCheckBoxLabel", Window)
2014-10-02 08:49:54 +08:00
check:SetText("Enable Color Mod")
check:SetConVar("zs_colormod")
check:SizeToContents()
list:AddItem(check)
check = vgui.Create("DCheckBoxLabel", Window)
2014-10-02 08:49:54 +08:00
check:SetText("Enable pain flashes")
check:SetConVar("zs_drawpainflash")
check:SizeToContents()
list:AddItem(check)
check = vgui.Create("DCheckBoxLabel", Window)
check:SetText("Enable font effects")
check:SetConVar("zs_fonteffects")
2014-10-02 08:49:54 +08:00
check:SizeToContents()
list:AddItem(check)
check = vgui.Create("DCheckBoxLabel", Window)
2014-10-02 08:49:54 +08:00
check:SetText("Enable human health auras")
check:SetConVar("zs_auras")
check:SizeToContents()
list:AddItem(check)
check = vgui.Create("DCheckBoxLabel", Window)
2014-10-02 08:49:54 +08:00
check:SetText("Enable damage indicators")
check:SetConVar("zs_damagefloaters")
check:SizeToContents()
list:AddItem(check)
check = vgui.Create("DCheckBoxLabel", Window)
2014-10-02 08:49:54 +08:00
check:SetText("Enable movement view roll")
check:SetConVar("zs_movementviewroll")
check:SizeToContents()
list:AddItem(check)
check = vgui.Create("DCheckBoxLabel", Window)
check:SetText("Enable message beacon visibility")
check:SetConVar("zs_messagebeaconshow")
2014-10-02 08:49:54 +08:00
check:SizeToContents()
list:AddItem(check)
check = vgui.Create("DCheckBoxLabel", Window)
check:SetText("Film Mode (disable most of the HUD)")
check:SetConVar("zs_filmmode")
2014-10-02 08:49:54 +08:00
check:SizeToContents()
list:AddItem(check)
check = vgui.Create("DCheckBoxLabel", Window)
check:SetText("Hide view models")
check:SetConVar("zs_hideviewmodels")
2014-10-02 08:49:54 +08:00
check:SizeToContents()
list:AddItem(check)
check = vgui.Create("DCheckBoxLabel", Window)
check:SetText("Prevent being picked as a boss zombie")
check:SetConVar("zs_nobosspick")
check:SizeToContents()
list:AddItem(check)
2014-10-02 08:49:54 +08:00
check = vgui.Create("DCheckBoxLabel", Window)
check:SetText("Show damage indicators through walls")
check:SetConVar("zs_damagefloaterswalls")
Merge with current nox changes. Random starting loadouts now include things that aren't weapons (ammo, traits, etc.). Added an option to disable the automatic suicide when changing zombie classes. Zombies will no longer receive damage resistance when only one human remains. Players can no longer claim the arsenal crate that gets spawned in the human spawn when nobody has one. Any player can pack it up though. The Ghoul's ghoul touch special ability has been changed. It will no longer slow targets but will debuff them for the next 10 seconds. They will take 40% more damage (the extra damage is attributed to the person who ghoul touched them last) for the next 10 seconds as well as slightly disorienting them. The Ghoul movement speed has been reduced from 185 to 170. Added crafting recipe: 'Waraxe' Handgun. Combine two 'Battleaxe' Handguns to craft this. Slightly better version of the Owens. The Flesh Creeper model has been changed to one that doesn't have severely awkward hitboxes. The Flesh Creeper can no longer jump and attack at the same time. The Lead Pipe special trait has been changed from a disorientation to a severe view punch/snap on a global cooldown of 1.5 seconds. The Regenerative trait is now 1 health every 6 seconds under 50% health instead of 1 health every 5 seconds under 50% health. Fast Zombie Legs have been changed to be a slightly faster but slightly weaker version of Zombie Legs. Zombies that have just spawned or enter zombie gas will now have a temporary buff which gives 25% extra speed and 40% damage resistance. This buff lasts for 3 seconds and is refreshed by entering the gas. Gas will no longer heal. Zombies with this buff on will strobe dark green. Added crafting recipe: Bladehack. Combine a saw blade with a manhack to get this. Slower but has more health, does more damage, and has less of a knockback when hitting something. Resupply Boxes now award the owner a point for every 2 people who use their box instead of every single person (so half as many points). Fixed Fast Zombie Legs spawning much more abundantly than intended. Fixed Flesh Creepers not being able to jump over obstacles due to their insanely low jump height. Fixed zombies taking themselves in to account when calculating horde damage resistance (bosses always had full resistance because of this). Fixed allowing people to use worth menu after redeeming.
2014-11-07 13:03:40 +08:00
check:SizeToContents()
list:AddItem(check)
2014-10-02 08:49:54 +08:00
list:AddItem(EasyLabel(Window, "Weapon HUD display style", "DefaultFontSmall", color_white))
local dropdown = vgui.Create("DComboBox", Window)
dropdown:SetMouseInputEnabled(true)
dropdown:AddChoice("Display in 3D")
dropdown:AddChoice("Display in 2D")
dropdown:AddChoice("Display both")
2014-10-02 08:49:54 +08:00
dropdown.OnSelect = function(me, index, value, data)
RunConsoleCommand("zs_weaponhudmode", value == "Display both" and 2 or value == "Display in 2D" and 1 or 0)
2014-10-02 08:49:54 +08:00
end
dropdown:SetText(GAMEMODE.WeaponHUDMode == 2 and "Display both" or GAMEMODE.WeaponHUDMode == 1 and "Display in 2D" or "Display in 3D")
dropdown:SetTextColor(color_black)
list:AddItem(dropdown)
list:AddItem(EasyLabel(Window, "Health target display style", "DefaultFontSmall", color_white))
dropdown = vgui.Create("DComboBox", Window)
dropdown:SetMouseInputEnabled(true)
dropdown:AddChoice("% of health")
dropdown:AddChoice("Health amount")
dropdown.OnSelect = function(me, index, value, data)
RunConsoleCommand("zs_healthtargetdisplay", value == "Health amount" and 1 or 0)
end
dropdown:SetText(GAMEMODE.HealthTargetDisplay == 1 and "Health amount" or "% of health")
dropdown:SetTextColor(color_black)
list:AddItem(dropdown)
list:AddItem(EasyLabel(Window, "Prop rotation snap angle", "DefaultFontSmall", color_white))
dropdown = vgui.Create("DComboBox", Window)
dropdown:SetMouseInputEnabled(true)
dropdown:AddChoice("No snap")
dropdown:AddChoice("15 degrees")
dropdown:AddChoice("30 degrees")
dropdown:AddChoice("45 degrees")
dropdown.OnSelect = function(me, index, value, data)
RunConsoleCommand("zs_proprotationsnap", value == "15 degrees" and 15 or value == "30 degrees" and 30 or value == "45 degrees" and 45 or 0)
end
dropdown:SetText(GAMEMODE.PropRotationSnap == 15 and "15 degrees"
or GAMEMODE.PropRotationSnap == 30 and "30 degrees"
or GAMEMODE.PropRotationSnap == 45 and "45 degrees"
or "No snap")
dropdown:SetTextColor(color_black)
2014-10-02 08:49:54 +08:00
list:AddItem(dropdown)
list:AddItem(EasyLabel(Window, "Human ambient beat set", "DefaultFontSmall", color_white))
dropdown = vgui.Create("DComboBox", Window)
2014-10-02 08:49:54 +08:00
dropdown:SetMouseInputEnabled(true)
for setname in pairs(GAMEMODE.Beats) do
if setname ~= GAMEMODE.BeatSetHumanDefualt then
dropdown:AddChoice(setname)
end
end
dropdown:AddChoice("none")
dropdown:AddChoice("default")
dropdown.OnSelect = function(me, index, value, data)
RunConsoleCommand("zs_beatset_human", value)
end
dropdown:SetText(GAMEMODE.BeatSetHuman == GAMEMODE.BeatSetHumanDefault and "default" or GAMEMODE.BeatSetHuman)
dropdown:SetTextColor(color_black)
2014-10-02 08:49:54 +08:00
list:AddItem(dropdown)
list:AddItem(EasyLabel(Window, "Zombie ambient beat set", "DefaultFontSmall", color_white))
dropdown = vgui.Create("DComboBox", Window)
2014-10-02 08:49:54 +08:00
dropdown:SetMouseInputEnabled(true)
for setname in pairs(GAMEMODE.Beats) do
if setname ~= GAMEMODE.BeatSetZombieDefualt then
dropdown:AddChoice(setname)
end
end
dropdown:AddChoice("none")
dropdown:AddChoice("default")
dropdown.OnSelect = function(me, index, value, data)
RunConsoleCommand("zs_beatset_zombie", value)
end
dropdown:SetText(GAMEMODE.BeatSetZombie == GAMEMODE.BeatSetZombieDefault and "default" or GAMEMODE.BeatSetZombie)
dropdown:SetTextColor(color_black)
2014-10-02 08:49:54 +08:00
list:AddItem(dropdown)
local slider = vgui.Create("DNumSlider", Window)
slider:SetDecimals(0)
slider:SetMinMax(2, 8)
slider:SetConVar("zs_crosshairlines")
slider:SetText("Crosshair lines")
slider:SizeToContents()
list:AddItem(slider)
slider = vgui.Create("DNumSlider", Window)
slider:SetDecimals(0)
slider:SetMinMax(0, 90)
slider:SetConVar("zs_crosshairoffset")
slider:SetText("Crosshair offset")
slider:SizeToContents()
list:AddItem(slider)
slider = vgui.Create("DNumSlider", Window)
slider:SetDecimals(1)
slider:SetMinMax(0.5, 2)
slider:SetConVar("zs_crosshairthickness")
slider:SetText("Crosshair thickness")
slider:SizeToContents()
list:AddItem(slider)
slider = vgui.Create("DNumSlider", Window)
slider:SetDecimals(1)
slider:SetMinMax(0.5, 2)
slider:SetConVar("zs_dmgnumberscale")
slider:SetText("Damage number size")
slider:SizeToContents()
list:AddItem(slider)
slider = vgui.Create("DNumSlider", Window)
slider:SetDecimals(1)
slider:SetMinMax(0, 1)
slider:SetConVar("zs_dmgnumberspeed")
slider:SetText("Damage number speed")
slider:SizeToContents()
list:AddItem(slider)
slider = vgui.Create("DNumSlider", Window)
slider:SetDecimals(1)
slider:SetMinMax(0.2, 1.5)
slider:SetConVar("zs_dmgnumberlife")
slider:SetText("Damage number lifetime")
slider:SizeToContents()
list:AddItem(slider)
slider = vgui.Create("DNumSlider", Window)
slider:SetDecimals(1)
slider:SetMinMax(0, 255)
slider:SetConVar("zs_filmgrainopacity")
slider:SetText("Film grain")
slider:SizeToContents()
list:AddItem(slider)
slider = vgui.Create("DNumSlider", Window)
slider:SetDecimals(1)
slider:SetMinMax(0.7, 1.6)
slider:SetConVar("zs_interfacesize")
slider:SetText("Interface/HUD scale")
slider:SizeToContents()
list:AddItem(slider)
slider = vgui.Create("DNumSlider", Window)
slider:SetDecimals(2)
slider:SetMinMax(0, 1)
slider:SetConVar("zs_ironsightzoom")
slider:SetText("Ironsight zoom scale")
slider:SizeToContents()
list:AddItem(slider)
slider = vgui.Create("DNumSlider", Window)
slider:SetDecimals(0)
2014-10-02 08:49:54 +08:00
slider:SetMinMax(0, 100)
slider:SetConVar("zs_beatsvolume")
slider:SetText("Music volume")
slider:SizeToContents()
list:AddItem(slider)
slider = vgui.Create("DNumSlider", Window)
slider:SetDecimals(1)
slider:SetMinMax(0.1, 4)
slider:SetConVar("zs_proprotationsens")
slider:SetText("Prop rotation sensitivity")
slider:SizeToContents()
list:AddItem(slider)
slider = vgui.Create("DNumSlider", Window)
2014-10-02 08:49:54 +08:00
slider:SetDecimals(0)
slider:SetMinMax(0, GAMEMODE.TransparencyRadiusMax)
2014-10-02 08:49:54 +08:00
slider:SetConVar("zs_transparencyradius")
slider:SetText("Transparency radius")
slider:SizeToContents()
list:AddItem(slider)
slider = vgui.Create("DNumSlider", Window)
slider:SetDecimals(0)
slider:SetMinMax(0, GAMEMODE.TransparencyRadiusMax)
slider:SetConVar("zs_transparencyradius3p")
slider:SetText("Transparency radius in third person")
2014-10-02 08:49:54 +08:00
slider:SizeToContents()
list:AddItem(slider)
list:AddItem(EasyLabel(Window, "Crosshair primary color"))
local colpicker = vgui.Create("DColorMixer", Window)
colpicker:SetAlphaBar(true)
2014-10-02 08:49:54 +08:00
colpicker:SetPalette(false)
colpicker:SetConVarR("zs_crosshair_colr")
colpicker:SetConVarG("zs_crosshair_colg")
colpicker:SetConVarB("zs_crosshair_colb")
colpicker:SetConVarA("zs_crosshair_cola")
2014-10-02 08:49:54 +08:00
colpicker:SetTall(72)
list:AddItem(colpicker)
list:AddItem(EasyLabel(Window, "Crosshair secondary color"))
colpicker = vgui.Create("DColorMixer", Window)
colpicker:SetAlphaBar(true)
2014-10-02 08:49:54 +08:00
colpicker:SetPalette(false)
colpicker:SetConVarR("zs_crosshair_colr2")
colpicker:SetConVarG("zs_crosshair_colg2")
colpicker:SetConVarB("zs_crosshair_colb2")
colpicker:SetConVarA("zs_crosshair_cola2")
2014-10-02 08:49:54 +08:00
colpicker:SetTall(72)
list:AddItem(colpicker)
list:AddItem(EasyLabel(Window, "Health aura color - Full health"))
colpicker = vgui.Create("DColorMixer", Window)
2014-10-02 08:49:54 +08:00
colpicker:SetAlphaBar(false)
colpicker:SetPalette(false)
colpicker:SetConVarR("zs_auracolor_full_r")
colpicker:SetConVarG("zs_auracolor_full_g")
colpicker:SetConVarB("zs_auracolor_full_b")
colpicker:SetTall(72)
list:AddItem(colpicker)
list:AddItem(EasyLabel(Window, "Health aura color - No health"))
colpicker = vgui.Create("DColorMixer", Window)
2014-10-02 08:49:54 +08:00
colpicker:SetAlphaBar(false)
colpicker:SetPalette(false)
colpicker:SetConVarR("zs_auracolor_empty_r")
colpicker:SetConVarG("zs_auracolor_empty_g")
colpicker:SetConVarB("zs_auracolor_empty_b")
colpicker:SetTall(72)
list:AddItem(colpicker)
Window:SetAlpha(0)
Window:AlphaTo(255, 0.15, 0)
2014-10-02 08:49:54 +08:00
Window:MakePopup()
end