Permalink
Browse files
More special cases, comment fix, removed some unnecessary code
- Loading branch information
Showing
with
3 additions
and 3 deletions.
| @@ -1,12 +1,13 @@ | ||
| local PLUGIN = PLUGIN; | ||
|
|
||
| -- Called when the important HUD should be painted. | ||
| -- Called before a weapon's information is drawn. | ||
| function PLUGIN:PreDrawWeaponList(x, y, weaponLimit, displayAlpha, beforeWeapons, currentWeapon, afterWeapons, newWeapons) | ||
|
|
||
| -- Adding this so that weapons without the information will actually draw, and so that weapons that do have information won't have a bunch of useless information added. | ||
| if (!currentWeapon.Instructions and !currentWeapon.Purpose and !currentWeapon.Contact and !currentWeapon.Author) then | ||
| if (!currentWeapon.Instructions or currentWeapon.Instructions == "") then | ||
| currentWeapon.Instructions = "N/A"; | ||
| end; | ||
|
|
||
| currentWeapon.Instructions = currentWeapon.Instructions; -- cw plz... | ||
| currentWeapon.DrawWeaponInfoBox = true; | ||
| end; |
| @@ -1,4 +1,3 @@ | ||
| local PLUGIN = PLUGIN; | ||
| local Clockwork = Clockwork; | ||
|
|
||
| Clockwork.kernel:IncludePrefixed("cl_plugin.lua"); |