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

257 lines
7.9 KiB
Lua
Raw Normal View History

2014-10-02 08:49:54 +08:00
function MakepOptions()
PlayMenuOpenSound()
if pOptions then
pOptions:SetAlpha(0)
pOptions:AlphaTo(255, 0.5, 0)
pOptions:SetVisible(true)
pOptions:MakePopup()
return
end
local Window = vgui.Create("DFrame")
local wide = math.min(ScrW(), 500)
local tall = math.min(ScrH(), 580)
Window:SetSize(wide, tall)
Window:Center()
Window:SetTitle(" ")
Window:SetDeleteOnClose(false)
pOptions = Window
local y = 8
local label = EasyLabel(Window, "Options", "ZSHUDFont", color_white)
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("Don't show point floaters")
check:SetConVar("zs_nofloatingscore")
check:SizeToContents()
list:AddItem(check)
local check = vgui.Create("DCheckBoxLabel", Window)
check:SetText("Draw crosshair in ironsights.")
check:SetConVar("zs_ironsightscrosshair")
check:SizeToContents()
list:AddItem(check)
local check = vgui.Create("DCheckBoxLabel", Window)
check:SetText("Film Mode (disable most of the HUD)")
check:SetConVar("zs_filmmode")
check:SizeToContents()
list:AddItem(check)
local check = vgui.Create("DCheckBoxLabel", Window)
check:SetText("Enable ambient music")
check:SetConVar("zs_beats")
check:SizeToContents()
list:AddItem(check)
local check = vgui.Create("DCheckBoxLabel", Window)
check:SetText("Enable last human music")
check:SetConVar("zs_playmusic")
check:SizeToContents()
list:AddItem(check)
local check = vgui.Create("DCheckBoxLabel", Window)
check:SetText("Enable post processing")
check:SetConVar("zs_postprocessing")
check:SizeToContents()
list:AddItem(check)
local check = vgui.Create("DCheckBoxLabel", Window)
check:SetText("Enable film grain")
check:SetConVar("zs_filmgrain")
check:SizeToContents()
list:AddItem(check)
local check = vgui.Create("DCheckBoxLabel", Window)
check:SetText("Enable Color Mod")
check:SetConVar("zs_colormod")
check:SizeToContents()
list:AddItem(check)
local check = vgui.Create("DCheckBoxLabel", Window)
check:SetText("Enable pain flashes")
check:SetConVar("zs_drawpainflash")
check:SizeToContents()
list:AddItem(check)
local check = vgui.Create("DCheckBoxLabel", Window)
check:SetText("No crosshair rotate")
check:SetConVar("zs_nocrosshairrotate")
check:SizeToContents()
list:AddItem(check)
local check = vgui.Create("DCheckBoxLabel", Window)
check:SetText("Enable human health auras")
check:SetConVar("zs_auras")
check:SizeToContents()
list:AddItem(check)
local check = vgui.Create("DCheckBoxLabel", Window)
check:SetText("Enable damage indicators")
check:SetConVar("zs_damagefloaters")
check:SizeToContents()
list:AddItem(check)
local check = vgui.Create("DCheckBoxLabel", Window)
check:SetText("Enable movement view roll")
check:SetConVar("zs_movementviewroll")
check:SizeToContents()
list:AddItem(check)
local check = vgui.Create("DCheckBoxLabel", Window)
check:SetText("Always display nail health")
check:SetConVar("zs_alwaysshownails")
check:SizeToContents()
list:AddItem(check)
local check = vgui.Create("DCheckBoxLabel", Window)
check:SetText("Disable automatic redeeming (next round)")
check:SetConVar("zs_noredeem")
check:SizeToContents()
list:AddItem(check)
local check = vgui.Create("DCheckBoxLabel", Window)
check:SetText("Always volunteer to start as a zombie")
check:SetConVar("zs_alwaysvolunteer")
check:SizeToContents()
list:AddItem(check)
local 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
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
local check = vgui.Create("DCheckBoxLabel", Window)
check:SetText("Automatic suicide when changing classes")
check:SetConVar("zs_suicideonchange")
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("3D")
dropdown:AddChoice("2D")
dropdown:AddChoice("Both")
dropdown.OnSelect = function(me, index, value, data)
RunConsoleCommand("zs_weaponhudmode", value == "Both" and 2 or value == "2D" and 1 or 0)
end
dropdown:SetText(GAMEMODE.WeaponHUDMode == 2 and "Both" or GAMEMODE.WeaponHUDMode == 1 and "2D" or "3D")
list:AddItem(dropdown)
list:AddItem(EasyLabel(Window, "Human ambient beat set", "DefaultFontSmall", color_white))
local dropdown = vgui.Create("DComboBox", Window)
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)
list:AddItem(dropdown)
list:AddItem(EasyLabel(Window, "Zombie ambient beat set", "DefaultFontSmall", color_white))
local dropdown = vgui.Create("DComboBox", Window)
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)
list:AddItem(dropdown)
local slider = vgui.Create("DNumSlider", Window)
slider:SetDecimals(0)
slider:SetMinMax(0, 100)
slider:SetConVar("zs_beatsvolume")
slider:SetText("Music volume")
slider:SizeToContents()
list:AddItem(slider)
local slider = vgui.Create("DNumSlider", Window)
slider:SetDecimals(0)
slider:SetMinMax(0, 512)
slider:SetConVar("zs_transparencyradius")
slider:SetText("Transparency radius")
slider:SizeToContents()
list:AddItem(slider)
local 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)
list:AddItem(EasyLabel(Window, "Crosshair primary color"))
local colpicker = vgui.Create("DColorMixer", Window)
colpicker:SetAlphaBar(false)
colpicker:SetPalette(false)
colpicker:SetConVarR("zs_crosshair_colr")
colpicker:SetConVarG("zs_crosshair_colg")
colpicker:SetConVarB("zs_crosshair_colb")
colpicker:SetTall(72)
list:AddItem(colpicker)
list:AddItem(EasyLabel(Window, "Crosshair secondary color"))
local colpicker = vgui.Create("DColorMixer", Window)
colpicker:SetAlphaBar(false)
colpicker:SetPalette(false)
colpicker:SetConVarR("zs_crosshair_colr2")
colpicker:SetConVarG("zs_crosshair_colg2")
colpicker:SetConVarB("zs_crosshair_colb2")
colpicker:SetTall(72)
list:AddItem(colpicker)
list:AddItem(EasyLabel(Window, "Health aura color - Full health"))
local colpicker = vgui.Create("DColorMixer", Window)
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"))
local colpicker = vgui.Create("DColorMixer", Window)
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.5, 0)
Window:MakePopup()
end