HyperGaming Network

Other Forums => Scrapyard => Topic started by: Kelse on 05-04-2012

Title: Re: Development Team Application Thread
Post by: Kelse on 05-04-2012
Quote from: Jake on 04-04-2012
wow holy shit i mean did you seriously expect to trick other people into believing that you're some sort ~pro~ coder or just trolling?
most of that code he posted is renamed variables of conna's kuroscript i mean really how did you even think that NOBODY would check what the code looks like?

ye man we just look at the 'size' and 'amount' of this & judge it from its ~~complexity~~

im not going to fit all of OA's code for this, but just some evidence:

sh_plugin.lua from OA compared to "HIS" plugin code

--[[
   © 2011 CloudSixteen.com do not share, re-distribute or modify
   without permission of its author ([email protected]).
--]]

openAura.plugin = {};
openAura.plugin.hooks = {};
openAura.plugin.stored = {};
openAura.plugin.buffer = {};
openAura.plugin.modules = {};

if (SERVER) then
   function openAura.plugin:SetUnloaded(name, isUnloaded)
      local plugin = self:Get(name);
     
      if (plugin and plugin != openAura.schema) then
         if (isUnloaded) then
            self.unloaded[plugin.folderName] = true;
         else
            self.unloaded[plugin.folderName] = nil;
         end;
         
         openAura:SaveSchemaData("plugins", self.unloaded);
         
         return true;
      end;
     
      return false;
   end;
   
   -- A function to get whether a plugin is disabled.
   function openAura.plugin:IsDisabled(name, bFolder)
      if (!bFolder) then
         local plugin = self:Get(name);
         
         if (plugin and plugin != openAura.schema) then
            for k, v in pairs(self.unloaded) do
               local unloaded = self:Get(k);
               
               if (unloaded and unloaded != openAura.schema
               and plugin.folderName != unloaded.folderName) then
                  if ( table.HasValue(unloaded.plugins, plugin.folderName) ) then
                     return true;
                  end;
               end;
            end;
         end;
      elseif (name != "schema") then
         for k, v in pairs(self.unloaded) do
            local unloaded = self:Get(k);
           
            if (unloaded and unloaded != openAura.schema and name != unloaded.folderName) then
               if ( table.HasValue(unloaded.plugins, name) ) then
                  return true;
               end;
            end;
         end;
      end;
     
      return false;
   end;
   
   -- A function to get whether a plugin is unloaded.
   function openAura.plugin:IsUnloaded(name, bFolder)
      if (!bFolder) then
         local plugin = self:Get(name);
         
         if (plugin and plugin != openAura.schema) then
            return (self.unloaded[plugin.folderName] == true);
         end;
      elseif (name != "schema") then
         return (self.unloaded[name] == true);
      end;
     
      return false;
   end;
else
   openAura.plugin.override = {};
   
   -- A function to set whether a plugin is unloaded.
   function openAura.plugin:SetUnloaded(name, isUnloaded)
      local plugin = self:Get(name);
     
      if (plugin) then
         self.override[plugin.folderName] = isUnloaded;
      end;
   end;
   
   -- A function to get whether a plugin is disabled.

Quote
Some plugin code I've been working with (one again, just a portion)

--[[
    The plugin library is inspired by Cloud Sixteen's openAura/Clockwork framework

    © 2012 Slidefuse.net do not share, re-distribute or modify
    without permission of its author ([email protected]).
--]]

SF.plugin = {};
SF.plugin.hooks = {};
SF.plugin.stored = {};
SF.plugin.buffer = {};
SF.plugin.modules = {};

if (SERVER) then
    function SF.plugin:SetUnloaded(name, isUnloaded)
        local plugin = self:Get(name);
       
        if (plugin and plugin != SF.theme) then
            if (isUnloaded) then
                self.unloaded[plugin.folderName] = true;
            else
                self.unloaded[plugin.folderName] = nil;
            end;
           
            SF:SavethemeData("plugins", self.unloaded);
           
            return true;
        end;
       
        return false;
    end;
   
    -- A function to get whether a plugin is disabled.
    function SF.plugin:IsDisabled(name, bFolder)
        if (!bFolder) then
            local plugin = self:Get(name);
           
            if (plugin and plugin != SF.theme) then
                for k, v in pairs(self.unloaded) do
                    local unloaded = self:Get(k);
                   
                    if (unloaded and unloaded != SF.theme
                    and plugin.folderName != unloaded.folderName) then
                        if ( table.HasValue(unloaded.plugins, plugin.folderName) ) then
                            return true;
                        end;
                    end;
                end;
            end;
        elseif (name != "theme") then
            for k, v in pairs(self.unloaded) do
                local unloaded = self:Get(k);
               
                if (unloaded and unloaded != SF.theme and name != unloaded.folderName) then
                    if ( table.HasValue(unloaded.plugins, name) ) then
                        return true;
                    end;
                end;
            end;
        end;
       
        return false;
    end;
   
    -- A function to get whether a plugin is unloaded.
    function SF.plugin:IsUnloaded(name, bFolder)
        if (!bFolder) then
            local plugin = self:Get(name);
           
            if (plugin and plugin != SF.theme) then
                return (self.unloaded[plugin.folderName] == true);
            end;
        elseif (name != "theme") then
            return (self.unloaded[name] == true);
        end;
       
        return false;
    end;
else
    SF.plugin.override = {};
   
    -- A function to set whether a plugin is unloaded.
    function SF.plugin:SetUnloaded(name, isUnloaded)
        local plugin = self:Get(name);
       
        if (plugin) then
            self.override[plugin.folderName] = isUnloaded;
        end;
    end;
   
    -- A function to get whether a plugin is disabled.
    function SF.plugin:IsDisabled(name, bFolder)
        if (!bFolder) then
            local plugin = self:Get(name);
           
            if (plugin and plugin != SF.theme) then
                for k, v in pairs(self.unloaded) do
                    local unloaded = self:Get(k);
                   
                    if (unloaded and unloaded != SF.theme and plugin.folderName != unloaded.folderName) then
                        if ( table.HasValue(unloaded.plugins, plugin.folderName) ) then
                            return true;
                        end;
                    end;
                end;
            end;

quoting in case he edits

Quote from: Kelse on 04-04-2012
Gamer name: |HGN| Daz

Timezone: (UK, US etc) : US -5 GMT

Skills:I've been learning LUA for ~1 year now, I've been working recently with the group known as Slidefuse and Spencer Sharkey on a GMod13 RP gamemode and a framework for our roleplay gamemodes, while I don't do much with MySQL and stuff I do know how to work with sweps and fix derma issues (like the derma panel thing a while back that broke a ton of gamemodes) I also helped Spencer Sharkey fix a gamemode from 2009 that had basically everything about it broken. I am also great at working in teams of people so I can work the other developers to fix anything that's broken or any lua errors (like earlier I got a lua error that was just a missing model)

[worldscript\gamemode\core\libraries\sh_animation.lua:886] Model missing: models/tiramisu/animationtrees/playeranimtree.mdl
(


What can you contribute to the development of this project: I'm one of those guys who sparks up an idea while roleplaying and then starts straight away, so I can contribute ideas and LUA, I've worked with the frameworks Kurozael has made in the past like Blueprint 2, OpenAura, and Clockwork, Nexus is a new one for me though but I'll probably get a quick grip on it considering how fast I've learned these frameworks, I also test any modifications I make to the scripts before I release them just incase I break something (which happens often for me, we're not all flawless coders.) I can bring to the table anything you guys could pretty much want whether it be a swep, or an entire gamemode using skeleton.

Portfolio: (previous work etc):
Some networking code that I've been working on (not going to post the entire thing, don't want anyone getting any ideas)

--[[
    © 2012 Slidefuse.net do not share, re-distribute or modify
    without permission of its author ([email protected]).
--]]

if (!SF) then
    SF = {}
end

SF.dataHooks = {};
SF.netDebug = false;

SF.netCache = {};

if (datastream) then
    if (SERVER) then

        function SF:AcceptStream(player, data, id)
            return true;
        end;

        function SF:NetAll(name, data)
            players = _player.GetAll();
            datastream.StreamToClients(players, name, data);
        end;   
       
        function SF:Net(player, name, data)
            if (!player or player == nil) then
                print("---ERROR! Datastream: '"..name.."' players table is nil!");
                return false;
            end;
            datastream.StreamToClients(player, name, data);
        end;

        function SF:NetHook(name, Callback)
            self.dataHooks[name] = Callback;
            datastream.Hook(name, function (player, handler, id, encoded, decoded)
                self.dataHooks[name](player, decoded);
            end);
        end;   
       
    else

        function SF:NetHook(name, Callback)
            self.dataHooks[name] = Callback;
            datastream.Hook(name, function(handler, id, encoded, decoded)
                self.dataHooks[name](decoded)
            end);
        end;   

        function SF:Net(name, data)
            datastream.StreamToServer(name, data);
        end;
       
    end;
else
    if (SERVER) then
        util.AddNetworkString("SFNet");

        function SF:NetAll(name, data)
            net.Start("SFNet")
                net.WriteString(name);
                net.WriteTable(data);
            net.Send(_player.GetAll());
        end;   
       
        function SF:Net(player, name, data)   
            if (!player or player == nil) then
                print("---ERROR! NETWORK: '"..name.."' players table is nil!");
                return false;
            end;
            net.Start("SFNet")
                net.WriteString(name);
                net.WriteTable(data);
            net.Send(player);

            if (self.netDebug) then
                print("_ SERVER _ SF-NET: Sent '"..name.."'\n");
            end;
        end;

        function SF:NetHook(name, Callback)
            self.dataHooks[name] = Callback;
  end;

Some plugin code I've been working with (one again, just a portion)

--[[
    The plugin library is inspired by Cloud Sixteen's openAura/Clockwork framework

    © 2012 Slidefuse.net do not share, re-distribute or modify
    without permission of its author ([email protected]).
--]]

SF.plugin = {};
SF.plugin.hooks = {};
SF.plugin.stored = {};
SF.plugin.buffer = {};
SF.plugin.modules = {};

if (SERVER) then
    function SF.plugin:SetUnloaded(name, isUnloaded)
        local plugin = self:Get(name);
       
        if (plugin and plugin != SF.theme) then
            if (isUnloaded) then
                self.unloaded[plugin.folderName] = true;
            else
                self.unloaded[plugin.folderName] = nil;
            end;
           
            SF:SavethemeData("plugins", self.unloaded);
           
            return true;
        end;
       
        return false;
    end;
   
    -- A function to get whether a plugin is disabled.
    function SF.plugin:IsDisabled(name, bFolder)
        if (!bFolder) then
            local plugin = self:Get(name);
           
            if (plugin and plugin != SF.theme) then
                for k, v in pairs(self.unloaded) do
                    local unloaded = self:Get(k);
                   
                    if (unloaded and unloaded != SF.theme
                    and plugin.folderName != unloaded.folderName) then
                        if ( table.HasValue(unloaded.plugins, plugin.folderName) ) then
                            return true;
                        end;
                    end;
                end;
            end;
        elseif (name != "theme") then
            for k, v in pairs(self.unloaded) do
                local unloaded = self:Get(k);
               
                if (unloaded and unloaded != SF.theme and name != unloaded.folderName) then
                    if ( table.HasValue(unloaded.plugins, name) ) then
                        return true;
                    end;
                end;
            end;
        end;
       
        return false;
    end;
   
    -- A function to get whether a plugin is unloaded.
    function SF.plugin:IsUnloaded(name, bFolder)
        if (!bFolder) then
            local plugin = self:Get(name);
           
            if (plugin and plugin != SF.theme) then
                return (self.unloaded[plugin.folderName] == true);
            end;
        elseif (name != "theme") then
            return (self.unloaded[name] == true);
        end;
       
        return false;
    end;
else
    SF.plugin.override = {};
   
    -- A function to set whether a plugin is unloaded.
    function SF.plugin:SetUnloaded(name, isUnloaded)
        local plugin = self:Get(name);
       
        if (plugin) then
            self.override[plugin.folderName] = isUnloaded;
        end;
    end;
   
    -- A function to get whether a plugin is disabled.
    function SF.plugin:IsDisabled(name, bFolder)
        if (!bFolder) then
            local plugin = self:Get(name);
           
            if (plugin and plugin != SF.theme) then
                for k, v in pairs(self.unloaded) do
                    local unloaded = self:Get(k);
                   
                    if (unloaded and unloaded != SF.theme and plugin.folderName != unloaded.folderName) then
                        if ( table.HasValue(unloaded.plugins, plugin.folderName) ) then
                            return true;
                        end;
                    end;
                end;
            end;

Some networked variables that I've been working with (Not complete once again.)

SF.vars = {};
SF.vars.stored = {}
local meta = FindMetaTable("Player");

if (SERVER) then

    function SF.vars:NetworkVarSelf(player, name)
        SF:Net(player, "NetVarSelf", {name, player:GetNVar(name)});
    end;

    function meta:SetNVar(name, value)
        if (!SF.vars.stored[self:SteamID()]) then
            SF.vars.stored[self:SteamID()] = {};
        end;

        SF.vars.stored[self:SteamID()][name] = value;
        SF.vars:NetworkVarSelf(self, name);
    end;

Some shared stuff.

--[[
    © 2012 Slidefuse.net do not share, re-distribute or modify
    without permission of its author ([email protected]).
--]]

SF:IncludePrefixed("sh_networking.lua");
SF:IncludePrefixed("sv_database.lua");
SF:IncludePrefixed("sv_auto.lua");
SF:IncludePrefixed("cl_auto.lua");
SF:IncludePrefixed("sh_plugin.lua");

SF:IncludeDirectory("core/libraries", true);
SF:IncludeDirectory("core/derma", true);
SF:IncludeDirectory("core/autorun", true);

local themeFolder = SF:GetThemeFolder();
       
if (themeFolder and type(themeFolder) == "string") then
    SF.plugin:Include(themeFolder.."/theme", true);
end;

function SF:Initialize()
    if (self.Init) then
        self:Init()
    end;
    if (self.theme.Init) then
        self.theme:Init()
    end
end;

function ScaleToWideScreen(size)
    return math.min(math.max(ScreenScale(size / 2.62467192), math.min(size, 16)), size);
end;


You can also find some stuff (nothing specifically important, no images, no code or anything) at my blog @
http://www.jakewall.net (http://www.jakewall.net/)

Remember, not all this was created by just me so if you see [email protected] that's because Spencer did most of the work, I just finished it and vice versa.

Did you bother to read ANY of it?
    The plugin library is inspired by Cloud Sixteen's openAura/Clockwork framework
    The plugin library is inspired by Cloud Sixteen's openAura/Clockwork framework
    The plugin library is inspired by Cloud Sixteen's openAura/Clockwork framework
    The plugin library is inspired by Cloud Sixteen's openAura/Clockwork framework
Remember, not all this was created by just me so if you see [email protected] that's because Spencer did most of the work, I just finished it and vice versa.
Remember, not all this was created by just me so if you see [email protected] that's because Spencer did most of the work, I just finished it and vice versa.
Remember, not all this was created by just me so if you see [email protected] that's because Spencer did most of the work, I just finished it and vice versa.
Remember, not all this was created by just me so if you see [email protected] that's because Spencer did most of the work, I just finished it and vice versa.

I never said I created ALL of it, Spencer is from slidefuse as am I, if you want to see the base for yourself then ask me, atleast read the comments.
Also, let me point out that I NEVER said I didn't use any OA variables, because me and Spencer BOTH use OA variables OFTEN.