Skip to content

Commit

Permalink
Clockwork 0.94.74 Beta
Browse files Browse the repository at this point in the history
0.94.74
-------

* Fixed a fatal error with schema prints erroring out clientside.

0.94.73
-------

* Changed the ESP system to be a little less confusing with its tables,
uses string keys instead of numbered keys now.
  • Loading branch information
Skiastra committed Dec 19, 2015
1 parent 3fab884 commit 36cc136
Show file tree
Hide file tree
Showing 5 changed files with 78 additions and 30 deletions.
12 changes: 12 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,18 @@ Changelog
---------
The following changes have been made for each official Clockwork build.

0.94.74
-------

* Fixed a fatal error with schema prints erroring out clientside.
* *Contributed by NightAngel.*

0.94.73
-------

* Changed the ESP system to be a little less confusing with its tables, uses string keys instead of numbered keys now.
* *Contributed by NightAngel.*

0.94.72
-------

Expand Down
2 changes: 1 addition & 1 deletion Clockwork/garrysmod/gamemodes/clockwork/clockwork.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"settings"
{
}
"version" "0.94.72"
"version" "0.94.74"
"author" "Cloud Sixteen"
"description" "A roleplaying framework developed by Cloud Sixteen for the people."
"workshopid" "474315121"
Expand Down
66 changes: 50 additions & 16 deletions Clockwork/garrysmod/gamemodes/clockwork/framework/cl_kernel.lua
Original file line number Diff line number Diff line change
Expand Up @@ -2124,7 +2124,10 @@ function Clockwork:GetAdminESPInfo(info)
cwPlugin:Call("GetStatusInfo", v, topText);
local text = {
{table.concat(topText, " "), cwTeam.GetColor(v:Team())}
{
text = table.concat(topText, " "),
color = cwTeam.GetColor(v:Team())
}
};
cwPlugin:Call("GetPlayerESPInfo", v, text);
Expand All @@ -2140,16 +2143,21 @@ function Clockwork:GetAdminESPInfo(info)
for k, v in pairs (ents.GetAll()) do
if (v:GetClass() == "cw_salesman") then
if (v:IsValid()) then
local position = v:GetPos()
local position = v:GetPos() + Vector(0, 0, 80);
local saleName = v:GetNetworkedString("Name");
local color = Color(255, 150, 0, 255);
table.insert(info, {
position = position,
color = color,
text = {
{"[Salesman]", color},
{saleName, color}
{
text = "[Salesman]",
color = color
},
{
text = saleName,
color = color
}
}
});
end;
Expand All @@ -2161,19 +2169,24 @@ function Clockwork:GetAdminESPInfo(info)
for k, v in pairs (ents.GetAll()) do
if (v:GetClass() == "cw_item") then
if (v:IsValid()) then
local position = v:GetPos()
local itemTable = Clockwork.entity:FetchItemTable(v)
local position = v:GetPos();
local itemTable = Clockwork.entity:FetchItemTable(v);
if (itemTable) then
local itemName = itemTable("name")
local itemName = itemTable("name");
local color = Color(0, 255, 255, 255);
table.insert(info, {
position = position,
color = color,
text = {
{"[Item]", color},
{itemName, color}
{
text = "[Item]",
color = color
},
{
text = itemName,
color = color
}
}
});
end;
Expand Down Expand Up @@ -2227,19 +2240,37 @@ function Clockwork:GetPlayerESPInfo(player, text)
local colorHealth = colorWhite;
local colorArmor = colorWhite;
table.insert(text, {player:SteamName(), Color(170, 170, 170, 255), nil, nil, self.player:GetChatIcon(player)})
table.insert(text, {
text = player:SteamName(),
color = Color(170, 170, 170, 255),
icon = self.player:GetChatIcon(player)
});
if (player:Alive() and health > 0) then
if (CW_CONVAR_ESPBARS:GetInt() == 0) then
colorHealth = self:GetValueColor(health);
colorArmor = self:GetValueColor(armor);
end;
table.insert(text, {"Health: ["..health.."]", colorHealth, {health, player:GetMaxHealth()}})
table.insert(text, {
text = "Health: ["..health.."]",
color = colorHealth,
bar = {
value = health,
max = player:GetMaxHealth()
}
});
if (player:Armor() > 0) then
table.insert(text, {"Armor: ["..armor.."]", colorArmor, {armor, player:GetMaxArmor()}, Color(30, 65, 175, 255)});
table.insert(text, {
text = "Armor: ["..armor.."]",
color = colorArmor,
bar = {
value = armor,
max = player:GetMaxArmor()
},
barColor = Color(30, 65, 175, 255)
});
end;
if (weapon and IsValid(weapon)) then
Expand All @@ -2254,7 +2285,10 @@ function Clockwork:GetPlayerESPInfo(player, text)
local printName = weapon:GetPrintName();
if (printName) then
table.insert(text, {printName, color})
table.insert(text, {
text = printName,
color = color
});
end;
end;
end;
Expand Down
6 changes: 4 additions & 2 deletions Clockwork/garrysmod/gamemodes/clockwork/framework/sh_boot.lua
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ end;
Clockwork.ClockworkFolder = Clockwork.ClockworkFolder or GM.Folder;
Clockwork.SchemaFolder = Clockwork.SchemaFolder or GM.Folder;
Clockwork.KernelVersion = "0.94.72";
Clockwork.KernelVersion = "0.94.74";
Clockwork.KernelBuild = "beta"
Clockwork.DeveloperVersion = true;
Clockwork.Website = "http://kurozael.com";
Expand Down Expand Up @@ -114,7 +114,9 @@ end;
Clockwork.kernel:IncludeSchema();
Clockwork.plugin:Call("ClockworkSchemaLoaded");
MsgC(Color(0, 255, 100, 255), "[Clockwork] Schema \""..Schema:GetName().."\" ["..Clockwork.kernel:GetSchemaGamemodeVersion().."] by "..Schema:GetAuthor().." loaded!\n");
if (SERVER) then
MsgC(Color(0, 255, 100, 255), "[Clockwork] Schema \""..Schema:GetName().."\" ["..Clockwork.kernel:GetSchemaGamemodeVersion().."] by "..Schema:GetAuthor().." loaded!\n");
end;
--[[ The following code is loaded over-the-Cloud. --]]
if (SERVER and Clockwork.LoadPostSchemaExternals) then
Expand Down
22 changes: 11 additions & 11 deletions Clockwork/garrysmod/gamemodes/clockwork/framework/sh_kernel.lua
Original file line number Diff line number Diff line change
Expand Up @@ -2268,14 +2268,14 @@ else
text = v2;
color = v.color;
else
text = v2[1];
color = v2[2];
text = v2.text;
color = v2.color;
local barNumbers = v2[3];
local barNumbers = v2.bar;
if (type(barNumbers) == "table") then
barValue = barNumbers[1];
maximum = barNumbers[2];
barValue = barNumbers.value;
maximum = barNumbers.max;
else
barValue = barNumbers;
end;
Expand All @@ -2289,23 +2289,23 @@ else
height = draw.GetFontHeight(Clockwork.option:GetFont("main_text"));
end;
if (v2[5]) then
if (v2.icon) then
local icon = "icon16/exclamation.png";
local width = surface.GetTextSize(text);
if (type(v2[5] == "string") and v2[5] != "") then
icon = v2[5];
if (type(v2.icon == "string") and v2.icon != "") then
icon = v2.icon;
end;
surface.SetDrawColor(255, 255, 255, 255);
surface.SetMaterial(Material(icon));
surface.SetMaterial(Clockwork.kernel:GetMaterial(icon));
surface.DrawTexturedRect(position.x - (width * 0.40) - height, position.y - height * 0.5, height, height);
end;
if (barValue and CW_CONVAR_ESPBARS:GetInt() == 1) then
local barHeight = height * 0.80;
local barColor = v2[4] or Clockwork:GetValueColor(barValue);
local grayColor = Color( 150, 150, 150, 170);
local barColor = v2.barColor or Clockwork:GetValueColor(barValue);
local grayColor = Color(150, 150, 150, 170);
local progress = 100 * (barValue / maximum);
if progress < 0 then
Expand Down

0 comments on commit 36cc136

Please sign in to comment.