Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion entities/entities/nut_item.lua
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ if (SERVER) then
self:SetModel(model)
self:SetSkin(itemTable.skin or 0)
self:SetMaterial(itemTable.material or "")
self:SetColor(itemTable.color or Color(255,255,255))
self:SetColor(itemTable.color or color_white)
self:PhysicsInit(SOLID_VPHYSICS)
self:SetSolid(SOLID_VPHYSICS)
self:setNetVar("id", itemTable.uniqueID)
Expand Down
2 changes: 1 addition & 1 deletion entities/weapons/nut_hands.lua
Original file line number Diff line number Diff line change
Expand Up @@ -538,7 +538,7 @@ function SWEP:pickup(entity, trace)

self.carryHack:SetModel("models/weapons/w_bugbait.mdl")

self.carryHack:SetColor(Color(50, 250, 50, 240))
--self.carryHack:SetColor(Color(50, 250, 50, 240))
self.carryHack:SetNoDraw(true)
self.carryHack:DrawShadow(false)

Expand Down
37 changes: 33 additions & 4 deletions gamemode/config/sh_config.lua
Original file line number Diff line number Diff line change
Expand Up @@ -16,23 +16,52 @@ nut.config.add("maxChars", 5, "The maximum number of characters a player can hav
category = "characters"
})

nut.config.add("color", Color(75, 119, 190), "The main color theme for the framework.", nil, {category = "appearance"})
nut.config.add("color", Color(75, 119, 190), "The main color theme for the framework.", function()
if CLIENT then hook.Run("nutUpdateColors") end
end, {category = "appearance"})

nut.config.add("colorAutoTheme", "dark", "Whether secondary and background colours generated from the main color should be dark or light themed.\nGenerated colors will be estimates and not guaranteed to look good.\nDisable to enable manual tuning", function()
if CLIENT then hook.Run("nutUpdateColors") end
end, {
form = "Combo",
category = "appearance",
options = {"dark", "light", "disabled"}
}
)

nut.config.add("colorSecondary", Color(55, 87, 140), "The secondary color for the framework, used for accents.", function()
if CLIENT then hook.Run("nutUpdateColors") end
end, {category = "appearance"})

nut.config.add("colorBackground", Color(25, 40, 64), "The background color for the framework, used in derma backgrounds", function()
if CLIENT then hook.Run("nutUpdateColors") end
end, {category = "appearance"})

nut.config.add("colorText", color_white, "The main text color for the framework.", function()
if CLIENT then hook.Run("nutUpdateColors") end
end, {category = "appearance"})

nut.config.add("font", "Arial", "The font used to display titles.", function(oldValue, newValue)
if (CLIENT) then
hook.Run("LoadNutFonts", newValue, nut.config.get("genericFont"))
hook.Run("LoadNutFonts", newValue, nut.config.get("genericFont"), nut.config.get("configFont"))
end
end, {category = "appearance"})

nut.config.add("genericFont", "Segoe UI", "The font used to display generic texts.", function(oldValue, newValue)
if (CLIENT) then
hook.Run("LoadNutFonts", nut.config.get("font"), newValue)
hook.Run("LoadNutFonts", nut.config.get("font"), newValue, nut.config.get("configFont"))
end
end, {category = "appearance"})

nut.config.add("configFont", "Segoe UI", "The font used to display config and admin menu texts.", function(oldValue, newValue)
if (CLIENT) then
hook.Run("LoadNutFonts", nut.config.get("font"), nut.config.get("genericFont"), newValue)
end
end, {category = "appearance"})

nut.config.add("fontScale", 1.0, "The scale for the font.", function(oldValue, newValue)
if (CLIENT) then
hook.Run("LoadNutFonts", nut.config.get("font"), nut.config.get("genericFont"))
hook.Run("LoadNutFonts", nut.config.get("font"), nut.config.get("genericFont"), nut.config.get("configFont"))
end
end, {
form = "Float",
Expand Down
Loading