792 Commits over 2,740 Days - 0.01cph!
Renamed math.DistToSqr to math.DistanceSqr
More logical/consistent with math.Distance
Fixed MarkupObject:Draw's new argument not working without MaxWidth being set
Try using the new UI functions in Sandbox tools
Cleanup net.lua
Add argument to net.Read/WriteColor to skip alpha (#1841)
* Add argument to net.Read/WriteColor to skip alpha
More network efficient if you aren't using the alpha. The value between the read and write calls must match and should be a warning on the wiki page if this is merged.
* Change alpha read from faux ternary to cond branch
Since net.ReadUInt is a cfunc
Added: Color box method (#1854)
* Added: Color box method
* Added function to control panel also
* Updated: Coding stile
Updated: Use ipairs instead of pairs
* Utilize: Use of `ipairs`
Removed: All changes from DForm
* Fixed: wrong variable names for R,G,B,A
Utilize: Pairs loop when configuring default convar settings
* Updated: Use camel case
* Removed: Use `if var` instead of `if var != nil` for convention
changed: Loop internal variables to `k,v` for convention
* Relace the IF statement with selection operator
Correction of a typing error in the comments (#1862)
This is a problem of huge importance: it was written "interger" instead of "integer".
The game will surely be better with this fix ;)
Moved DForm.ToolPresets and DForm.KeyBinder to ControlPanel panel
The panels those functions create are Sandbox gamemode exclusive
Less error prone tool panel creation
string.JavascriptSafe escapes `
Minor cleanups in menu state
Added Permissions viewer
TTT uses new permissions.EnableVoiceChat
Add new types to AccessorFunc (#1800)
Optimized string.Comma. (#1513)
* Optimized string.Comma.
* code style fixes
Co-authored-by: howmanysmall <9477871+1@iechs.org>
Co-authored-by: Rubat <3299036+robotboy655@users.noreply.github.com>
add math.DistToSqr (#1844)
Additional check for TableInherit function (#1830)
If you write argument in base entity like a string and then overwrite it like table you will catch error like
[ERROR] lua/includes/modules/scripted_ents.lua:25: bad argument #1 to 'pairs' (table expected, got string)
1. pairs - [C]:-1
2. TableInherit - lua/includes/modules/scripted_ents.lua:25
3. TableInherit - lua/includes/modules/scripted_ents.lua:30
4. Get - lua/includes/modules/scripted_ents.lua:184
5. unknown - lua/includes/modules/scripted_ents.lua:151
Markup Library Improvements (#1732)
* Markup Library Improvements
- New argument to MarkupObject:Draw() (textAlign) allows for text alignment inside the maxWidth bounds (i.e. align text center, align text right)
- Added MarkupObject:GetMaxWidth()
- Added markup.Escape which escapes markup-sensitive characters ( & < > )
- Fixed trailing spaces on new lines
- Fixed issue where new blocks were unnecessarily being split in the middle of a word
- Changed pairs to ipairs
- Improved code readability, cleaned up comments, removed a redundant comment
* New blocks will not wrap unless preceded by a space, remove some redundant code, change name of variable and add new comment
* Use lookup table for unescape string.gsub
* Small optimizations
- Changed blocks[ i ] to blk
- Populate new_block tables during declaration rather than setting keys & values after creation
* Create markup.Color which converts a Color into a string for use in <color> tags
Removed useless variable (#1832)
TTT: fix TTTCanPickup hook not denying pickup when false is returned (#1860)
TTT: PT-BR translation final update (#1859)
TTT: update PT-BR translation (#1858)
TTT: translation updates (#1857)
* Add L.tip41 to Brazilian Portuguese translation
* Correct inconsistencies with the date markers
* Removes some translations from the Simplified Chinese translation that do not exist in the original English translation.
Fixed a potential error in duplicator tool
TTT: update Russian translation (#1847)
Added: Various handy methods replacing PANEL:AddControl() (#1702)
Problems system improvements
Code style cleanups
Lowercase model name in PropSelect for sorting purposes
This simply matches behavior of the "old" method which ends up with lowercase keys.
hook.Add with invalid 2nd argument throws proper error (#1810)
Add SlowWalkSpeed to player_manager / GM.SetPlayerSpeed / Default player classes (#1827)
Add utility functions for using the Hammer IO system (#1530)
Example usage
```lua
function ENT:KeyValue( key, value )
if ( BaseClass.KeyValue ) then BaseClass.KeyValue( self, key, value ) end
if ( self:SetNetworkKeyValue( key, value ) ) then
return
elseif ( self:AddOutputFromKeyValue( key, value ) ) then
return
end
-- Your entity's logic goes here
end
function ENT:AcceptInput( name, activator, called, value )
if ( BaseClass.AcceptInput and BaseClass.AcceptInput( self, name, activator, called, value ) ) then
return true
end
if ( self:AddOutputFromAcceptInput( name, value ) ) then
return true
end
-- Your entity's logic goes here
return false
end
```
Create table.MemberValuesFromKey (#1539)
New library: math.ease (#1755)
* New library: ease
* ease -> math.ease
* fix: call correct math.ease function
probably a module leftover
* Reduce repeated multiplication to powers
* Reduce _G lookups and use a `module()`
Co-authored-by: Tom <27384135+CupCakeR@users.noreply.github.com>
Add DComboBox:OnMenuOpened(menu) (#1659)
Add table.Shuffle (#1683)
* Add table.Shuffle
Performs an inline Fisher-Yates shuffle on the table in O(n) time
* table.Shuffle small optimization
Fix table.RemoveByValue throwing an error when key is not a number (#1704)
Made hook.Add/Remove not silently fail on arg type mismatch (#1344)
* Made hook.Add/Remove not silently fail on arg type mismatch
In the rare case a typo was made for the hook args, it is now noticeable.
TTT: add PT-BR translation for L.tip41 (#1842)
TTT: add spectator mic volume tip (#1840)
* New player mic volume tip
* Increased number of tips
TTT: PT-BR translation update (#1838)
Fix mistake in russian.lua (#1837)
Incorrect form
> ВЫБЕРЕТЕ ОБРАЗЕЦ
Correct
> ВЫБЕРИТЕ ОБРАЗЕЦ
The word “выберите” expresses a wish, request, or order. In this context, the verb form of the imperative plural is used.
https://russkiiyazyk.ru/orfografiya/pravopisanie/kak-pravilno-pishetsya-slovo-vyiberete-ili-vyiberite.html
TTT: update Russian translation (#1835)
TTT: PT-BR translation updates (#1829)
TTT: update Spanish translation (#1828)
Fixed duplicator and saves not working
Fixed an issue with constraint.GetAllConstrainedEntities
Fixed constraint.GetAllConstrainedEntities returning all entities constrained to world if the given entity is constrained to world
Added g_SpawnMenu:GetCreationMenu()
Added CreationMenu.GetCreationTab & GetCreationTabs
Added spawnmenu.SwitchCreationTab( id )
Made spawnmenu.SwitchToolTab work
Added 3rd argument to spawnmenu.ActivateToolPanel
Save game map workshopID stuff
Adds duplicator.FigureOutRequiredAddons
Required Workshop addons for duplicator
Attribute CS:GO lobby map to CS:GO (#1824)
makes "Other" empty by default again
Fixed a Lua error with DTree_Node
DComboBox's dropdown works better on modal panels
Disallowed Shadow shader to be used as rope material
TTT: add more validation to corpse commands
- Prevent spamming of "call detective" command. Thanks to #1822 for suggesting a similar fix.
- Make sure cmds act on player corpses only
- Cleanup
TTT: more updates to PT-BR translation (#1820)
TTT: update German translation (#1818)
Better implementation of Player.IsUserGroup (#1819)
Fix gmod_camera being dependent on tickrate (#1816)
TTT: PT-BR translation updates (#1815)
Fixed XSS vulnerability in loading screen. (#1814)
Using the method `.text` rather than `.html`, since the method `.html` does not escape html entity characters.
TTT: updated the Russian localization (#1813)
Fixed DownloadingFile in loading screens
duplicator copies lua-set colors and material override
Fixed 0 width constrains creating errors
Fixed Lua errors with default scoreboard
Prevent 2 or more players from 'driving' a single entity
Make use of IsConCommandBlocked
Makes blocked concommand errors include proper stack.
Fixed duplicated constraints not getting correct player obj