Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
78 commits
Select commit Hold shift + click to select a range
4ec7d6f
add default stamina and stamina regen configs
TovarischPootis Apr 6, 2021
547b37a
Update sh_plugin.lua
TovarischPootis Apr 7, 2021
53aead1
Merge pull request #50 from TovarischPootis/1.2.2-wip
TovarischPootis Apr 7, 2021
10157e6
Override description in nshud
raecyst Apr 8, 2021
3cc899d
Merge pull request #51 from SeamusMcGowan/1.2.2-wip
TovarischPootis Apr 8, 2021
40b2bd9
Changed the discord @ for contact
bleonheart Apr 10, 2021
dcd75cd
Merge pull request #52 from baratoxis/patch-2
TovarischPootis Apr 11, 2021
afd36cd
Added Portuguese (#53)
bleonheart Apr 11, 2021
f49e670
Noticed a Missing Comma
bleonheart Apr 12, 2021
f5314f3
Merge pull request #54 from baratoxis/patch-4
TovarischPootis Apr 13, 2021
6766f04
Fix items not being returned by d map
raecyst Apr 14, 2021
72d88e4
Merge pull request #55 from SeamusMcGowan/1.2.2-wip
TovarischPootis Apr 14, 2021
b0d3ce6
Fixed an error when an object can be dropped.
FlorianLeChat Apr 19, 2021
a122345
French translations update
FlorianLeChat Apr 19, 2021
087cc8f
While reviewing the commit, found another issue
TovarischPootis Apr 19, 2021
eef7545
Merge pull request #56 from FlorianLeChat/hands-fix
TovarischPootis Apr 19, 2021
b19e5ed
Thank you SPURION, scoreboard fix
TovarischPootis Apr 19, 2021
ecccf1a
Merge pull request #57 from FlorianLeChat/translations-update
TovarischPootis Apr 20, 2021
42ad9f1
Merge pull request #58 from TovarischPootis/1.2.2-wip
TovarischPootis Apr 20, 2021
9eb6b8e
global draw-over hook
raecyst Apr 25, 2021
809b9e0
Small fix
raecyst Apr 27, 2021
31301de
Merge pull request #59 from SeamusMcGowan/1.2.2-wip
TovarischPootis Apr 28, 2021
36c11bb
Minor Language Adjustments & Credits added (#60)
bleonheart Apr 28, 2021
13578f4
Fixed the indicator display when a player is in act
FlorianLeChat May 2, 2021
a00b4c2
Merge pull request #61 from FlorianLeChat/typing-indicator-fix
TovarischPootis May 6, 2021
a7a6967
Fix some spacing issues
FlorianLeChat May 8, 2021
3fb1329
Do not show the voice panel if allowVoice is disabled
FlorianLeChat May 8, 2021
439e173
Replace some color objects into Gmod constants
FlorianLeChat May 8, 2021
f942b2b
give power to the canitembetransferred hook
raecyst May 8, 2021
c534248
Remove trailing whitespace
FlorianLeChat May 8, 2021
aab8ab6
Some cleanup
FlorianLeChat May 8, 2021
c35177e
Fixed meta:isInArea not working properly since its creation.
FlorianLeChat May 8, 2021
d4aa584
Merge pull request #63 from FlorianLeChat/newvoice-plugin-update
TovarischPootis May 8, 2021
93f4009
Merge pull request #62 from SeamusMcGowan/1.2.2-wip
TovarischPootis May 8, 2021
6794269
Add font scaling
TovarischPootis May 9, 2021
5968937
Add GetDefaultCharDesc
TovarischPootis May 9, 2021
2c6dbad
Update nut_hands.lua
TovarischPootis May 9, 2021
b5cc4f4
Merge remote-tracking branch 'upstream/1.2.2-wip' into 1.2.2-wip
TovarischPootis May 9, 2021
f51f6b6
Merge pull request #64 from FlorianLeChat/area-plugin-update
TovarischPootis May 9, 2021
0a57609
Merge branch '1.2.2-wip' into 1.2.2-wip
TovarischPootis May 9, 2021
48a6c5f
formatting
TovarischPootis May 9, 2021
65a2663
Some code cleanup
FlorianLeChat May 9, 2021
ef02533
Optimizations and code readability
FlorianLeChat May 9, 2021
e8e989c
Fix looc admin delay
FlorianLeChat May 9, 2021
6b402ea
Add a radius property to allow a dynamic chat range
FlorianLeChat May 9, 2021
2027ba4
Update NutScript commands with new radius property
FlorianLeChat May 9, 2021
28ee44e
Fix the display of the typing indicator for players in vehicles
FlorianLeChat May 9, 2021
48aa83a
Some cleanup and code improvements
FlorianLeChat May 9, 2021
9c4b808
Fixed the display of some parameter values
FlorianLeChat May 9, 2021
a176f26
Merge pull request #66 from FlorianLeChat/typing-indicator-fix
TovarischPootis May 9, 2021
d83207a
Merge pull request #65 from TovarischPootis/1.2.2-wip
TovarischPootis May 10, 2021
d6501f9
Add paylimit
TovarischPootis May 10, 2021
e134bc0
Added hook to allow custom checks on commands
Xem0n May 10, 2021
28fb253
Re-add transfer function
raecyst May 10, 2021
10f69d3
Discord Info Change
bleonheart May 15, 2021
b6702a2
Merge pull request #74 from baratoxis/patch-7
TovarischPootis May 17, 2021
e7f5198
Simple Discord Change (#73)
bleonheart May 17, 2021
7b85b56
Merge pull request #71 from Xem0n/1.2.2-wip
TovarischPootis May 17, 2021
3e53fa7
Merge pull request #69 from FlorianLeChat/config-panel-fix
TovarischPootis May 17, 2021
bf48d27
Merge pull request #75 from SeamusMcGowan/1.2.2-wip
TovarischPootis May 18, 2021
30a58b0
Merge pull request #70 from TovarischPootis/1.2.2-wip
TovarischPootis May 18, 2021
813a08a
Allow static numbers in the radius property
FlorianLeChat May 23, 2021
711a6e1
Add getmodel hook
raecyst May 24, 2021
ad58a97
Merge pull request #76 from SeamusMcGowan/1.2.2-wip
TovarischPootis May 25, 2021
5df87da
Merge pull request #68 from FlorianLeChat/dynamic-chat-radius
TovarischPootis May 25, 2021
1e9dfd2
allow tables for faction bodygroups
TovarischPootis May 28, 2021
5536799
make inv icons use overridable stuff + add getSkin for items
TovarischPootis May 28, 2021
908de59
Update sh_util.lua
TovarischPootis Jun 14, 2021
ecb3418
Set max starting points for attribs
TovarischPootis Jun 29, 2021
a131736
Merge pull request #78 from TovarischPootis/1.2.2-wip
TovarischPootis Jul 8, 2021
b1855f7
Fixed a bug where door info won't draw when it should
TovarischPootis Jul 8, 2021
afb6687
Update sv_transfer.lua
TovarischPootis Jul 8, 2021
e75d541
Merge pull request #79 from TovarischPootis/1.2.2-wip
TovarischPootis Jul 8, 2021
9f98c58
fix bug that shows players as purchasable doors lmao
TovarischPootis Jul 8, 2021
d154328
Merge pull request #80 from TovarischPootis/1.2.2-wip
TovarischPootis Jul 8, 2021
bba0f13
Tov's an idiot lmao (error fix)
TovarischPootis Jul 8, 2021
e6aeed6
Merge pull request #81 from TovarischPootis/1.2.2-wip
TovarischPootis Jul 8, 2021
cd26c97
small optimizing (#82)
TovarischPootis Sep 14, 2021
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
9 changes: 5 additions & 4 deletions entities/weapons/nut_hands.lua
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ PLAYER_PICKUP_RANGE = 200
with prop pushing.
CARRY_STRENGTH_GOD: 0 - You can push player with prop on this strength levle.
the grabbing never fails.
Try this if you're playing with very trustful community.
Try this if you're playing with very trustful community.
]]--

CARRY_FORCE_LIMIT = CARRY_FORCE_LEVEL[CARRY_STRENGTH_CHAD] -- default strength level is CHAD.
Expand Down Expand Up @@ -506,7 +506,7 @@ function SWEP:doPickup(throw, entity, trace)
-- increase refire to make rags easier to drag
--self.Weapon:SetNextSecondaryFire(CurTime() + 0.04)
end

if (IsValid(phys)) then
self:dragObject(phys, pdir, 6000, is_ragdoll)
return
Expand Down Expand Up @@ -591,7 +591,7 @@ function SWEP:pickup(entity, trace)
local max_force = CARRY_FORCE_LIMIT

if (entity:GetClass() == "prop_ragdoll") then
self.dt.carried_rag = ent
self.dt.carried_rag = entity

bone = trace.PhysicsBone
max_force = 0
Expand All @@ -611,8 +611,9 @@ end
local down = Vector(0, 0, -1)
function SWEP:allowEntityDrop()
local client = self:GetOwner()
local ent = self.carryHack

if (not IsValid(client)) or (not IsValid(self.carryHack)) then return false end
if (not IsValid(client)) or (not IsValid(ent)) then return false end

local ground = client:GetGroundEntity()
if ground and (ground:IsWorld() or IsValid(ground)) then return true end
Expand Down
10 changes: 10 additions & 0 deletions gamemode/config/sh_config.lua
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,16 @@ nut.config.add("genericFont", "Segoe UI", "The font used to display generic text
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"))
end
end, {
form = "Float",
data = {min = 0.1, max = 2.0},
category = "appearance"
})

nut.config.add("chatRange", 280, "The maximum distance a person's IC chat message goes to.", nil, {
form = "Float",
data = {min = 10, max = 5000},
Expand Down
20 changes: 14 additions & 6 deletions gamemode/core/derma/cl_inventory.lua
Original file line number Diff line number Diff line change
Expand Up @@ -34,12 +34,14 @@ function PANEL:setItemType(itemTypeOrID)
if (isnumber(itemTypeOrID)) then
item = nut.item.instances[itemTypeOrID]
self.itemID = itemTypeOrID
else
self.itemType = itemTypeOrID
end
assert(item, "invalid item type or ID "..tostring(item))

self.nutToolTip = true
self.itemTable = item
self:SetModel(item.model, item.skin)
self:SetModel(item:getModel(), item:getSkin())
self:updateTooltip()

if (item.exRender) then
Expand Down Expand Up @@ -97,14 +99,20 @@ function PANEL:Init()
self:SetSize(NS_ICON_SIZE, NS_ICON_SIZE)
end

--[[ function PANEL:Think()
self.itemTable = nut.item.instances[self.itemID]
self:updateTooltip()
end ]]

function PANEL:PaintOver(w, h)
local itemTable = nut.item.instances[self.itemID]

if (itemTable and itemTable.paintOver) then
local w, h = self:GetSize()

itemTable.paintOver(self, itemTable, w, h)
end

hook.Run("ItemPaintOver", self, itemTable, w, h)
end

function PANEL:PaintBehind(w, h)
Expand Down Expand Up @@ -308,20 +316,20 @@ hook.Add("CreateMenuButtons", "nutInventory", function(tabs)
local childPanels = inventory:show(mainPanel)
nut.gui["inv"..inventory:getID()] = childPanels
table.insert(sortPanels, childPanels)

totalSize.x = totalSize.x + childPanels:GetWide() + margin
totalSize.y = math.max(totalSize.y, childPanels:GetTall())
end
end

local px, py, pw, ph = mainPanel:GetBounds()
local x, y = px + pw/2 - totalSize.x / 2, py + ph/2
local x, y = px + pw/2 - totalSize.x / 2, py + ph/2
for _, panel in pairs(sortPanels) do
panel:ShowCloseButton(true)
panel:SetPos(x, y - panel:GetTall()/2)
x = x + panel:GetWide() + margin
end

hook.Add("PostRenderVGUI", mainPanel, function()
hook.Run("PostDrawInventory", mainPanel)
end)
Expand Down
63 changes: 30 additions & 33 deletions gamemode/core/hooks/cl_hooks.lua
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
function GM:LoadNutFonts(font, genericFont)
local oldFont, oldGenericFont = font, genericFont

local scale = math.Round(nut.config.get("fontScale", 1), 2)
surface.CreateFont("nut3D2DFont", {
font = font,
size = 2048,
Expand All @@ -10,28 +10,28 @@ function GM:LoadNutFonts(font, genericFont)

surface.CreateFont("nutTitleFont", {
font = font,
size = ScreenScale(30),
size = ScreenScale(30) * scale,
extended = true,
weight = 1000
})

surface.CreateFont("nutSubTitleFont", {
font = font,
size = ScreenScale(18),
size = ScreenScale(18) * scale,
extended = true,
weight = 500
})

surface.CreateFont("nutMenuButtonFont", {
font = font,
size = ScreenScale(14),
size = ScreenScale(14) * scale,
extended = true,
weight = 1000
})

surface.CreateFont("nutMenuButtonLightFont", {
font = font,
size = ScreenScale(14),
size = ScreenScale(14) * scale,
extended = true,
weight = 200
})
Expand All @@ -45,21 +45,21 @@ function GM:LoadNutFonts(font, genericFont)

surface.CreateFont("nutDynFontSmall", {
font = font,
size = ScreenScale(22),
size = ScreenScale(22) * scale,
extended = true,
weight = 1000
})

surface.CreateFont("nutDynFontMedium", {
font = font,
size = ScreenScale(28),
size = ScreenScale(28) * scale,
extended = true,
weight = 1000
})

surface.CreateFont("nutDynFontBig", {
font = font,
size = ScreenScale(48),
size = ScreenScale(48) * scale,
extended = true,
weight = 1000
})
Expand All @@ -69,101 +69,101 @@ function GM:LoadNutFonts(font, genericFont)

surface.CreateFont("nutCleanTitleFont", {
font = font,
size = 200,
size = 200 * scale,
extended = true,
weight = 1000
})

surface.CreateFont("nutHugeFont", {
font = font,
size = 72,
size = 72 * scale,
extended = true,
weight = 1000
})

surface.CreateFont("nutBigFont", {
font = font,
size = 36,
size = 36 * scale,
extended = true,
weight = 1000
})

surface.CreateFont("nutMediumFont", {
font = font,
size = 25,
size = 25 * scale,
extended = true,
weight = 1000
})

surface.CreateFont("nutMediumLightFont", {
font = font,
size = 25,
size = 25 * scale,
extended = true,
weight = 200
})

surface.CreateFont("nutGenericFont", {
font = font,
size = 20,
size = 20 * scale,
extended = true,
weight = 1000
})

surface.CreateFont("nutGenericLightFont", {
font = font,
size = 20,
size = 20 * scale,
extended = true,
weight = 500
})

surface.CreateFont("nutChatFont", {
font = font,
size = math.max(ScreenScale(7), 17),
size = math.max(ScreenScale(7), 17) * scale,
extended = true,
weight = 200
})

surface.CreateFont("nutChatFontItalics", {
font = font,
size = math.max(ScreenScale(7), 17),
size = math.max(ScreenScale(7), 17) * scale,
extended = true,
weight = 200,
italic = true
})

surface.CreateFont("nutChatFontBold", {
font = font,
size = math.max(ScreenScale(7), 17),
size = math.max(ScreenScale(7), 17) * scale,
extended = true,
weight = 800,
})

surface.CreateFont("nutSmallFont", {
font = font,
size = math.max(ScreenScale(6), 17),
size = math.max(ScreenScale(6), 17) * scale,
extended = true,
weight = 500
})

surface.CreateFont("nutItemDescFont", {
font = font,
size = math.max(ScreenScale(6), 17),
size = math.max(ScreenScale(6), 17) * scale,
extended = true,
shadow = true,
weight = 500
})

surface.CreateFont("nutSmallBoldFont", {
font = font,
size = math.max(ScreenScale(8), 20),
size = math.max(ScreenScale(8), 20) * scale,
extended = true,
weight = 800
})

surface.CreateFont("nutItemBoldFont", {
font = font,
shadow = true,
size = math.max(ScreenScale(8), 20),
size = math.max(ScreenScale(8), 20) * scale,
extended = true,
weight = 800
})
Expand Down Expand Up @@ -286,7 +286,6 @@ end

function GM:CharacterListLoaded()
local shouldPlayIntro = nut.config.get("alwaysPlayIntro", true) or not nut.localData.intro or nil
print("shouldPlayIntro", shouldPlayIntro)
timer.Create("nutWaitUntilPlayerValid", 0.5, 0, function()
if (not IsValid(LocalPlayer())) then return end
timer.Remove("nutWaitUntilPlayerValid")
Expand Down Expand Up @@ -345,7 +344,7 @@ function GM:CalcView(client, origin, angles, fov)
view.origin = data.Pos
view.angles = data.Ang
end

return view
end
end
Expand Down Expand Up @@ -387,7 +386,7 @@ end

function GM:PlayerBindPress(client, bind, pressed)
bind = bind:lower()

if ((bind:find("use") or bind:find("attack")) and pressed) then
local menu, callback = nut.menu.getActiveMenu()

Expand Down Expand Up @@ -428,7 +427,7 @@ function GM:ItemShowEntityMenu(entity)

local options = {}
local itemTable = entity:getItemTable()
if (!itemTable) then return end -- MARK: This is the where error came from.
if (not itemTable) then return end -- MARK: This is the where error came from.

local function callback(index)
if (IsValid(entity)) then
Expand All @@ -440,16 +439,14 @@ function GM:ItemShowEntityMenu(entity)
itemTable.entity = entity

if (input.IsShiftDown()) then
callback("take")
callback("take")
end

for k, v in SortedPairs(itemTable.functions) do
if (k == "combine") then continue end -- yeah, noob protection

if (isfunction(v.onCanRun)) then
if (not v.onCanRun(itemTable)) then
continue
end
if (isfunction(v.onCanRun)) and (not v.onCanRun(itemTable)) then
continue
end

options[L(v.name or k)] = function()
Expand Down Expand Up @@ -505,7 +502,7 @@ function GM:SetupQuickMenu(menu)

local button = menu:addCheck(name, function(panel)
panel.checked = true

if (IsValid(current)) then
if (current == panel) then
return
Expand All @@ -518,7 +515,7 @@ function GM:SetupQuickMenu(menu)
RunConsoleCommand("nut_language", k)
end, enabled)

if (enabled and !IsValid(current)) then
if (enabled and not IsValid(current)) then
current = button
end
end
Expand Down
Loading