From 28affa22541b9ef251707793f6b1c1a26d663592 Mon Sep 17 00:00:00 2001 From: Alexander Pickering Date: Sat, 3 Nov 2018 18:23:45 -0400 Subject: Started on new npc system Started work on the new npc system --- gamemode/core/inventory/common/items.lua | 40 -------------------------------- 1 file changed, 40 deletions(-) delete mode 100644 gamemode/core/inventory/common/items.lua (limited to 'gamemode/core/inventory/common') diff --git a/gamemode/core/inventory/common/items.lua b/gamemode/core/inventory/common/items.lua deleted file mode 100644 index 65d8e4a..0000000 --- a/gamemode/core/inventory/common/items.lua +++ /dev/null @@ -1,40 +0,0 @@ ----Some common functions for working with items. --- Just one function for now ---@shared items.lua ---@alias items - -local log = nrequire("log.lua") -local items = {} - --- local function drop_provided(ent,invid,frompos) --- assert(CLIENT,"requested to drop an item when we are not the client!") --- net.Start("art_RequestInvDrop") --- net.WriteEntity(ent) --- net.WriteUInt(invid,32) --- net.WriteTable(frompos) --- net.SendToServer() --- end - ----Drops an item. --- Client side only, will error if you try to use it server side ---@tparam entity ent_or_tbl the entity that wants to drop the item ---@tparam number invid The inventory number the entity wants to drop from ---@tparam table frompos The position in the inventory the item was in. -function items.DropItem(ent_or_tbl,invid,frompos) - --[[ - if type(ent_or_tbl) == "table" then - drop_self(ent_or_tbl) - else - drop_provided(ent_or_tbl,invid,frompos) - end - ]] - assert(CLIENT,"requested to drop an item when we are not the client!") - log.debug("Drop item was requested, ent_or_tbl is" .. tostring(ent_or_tbl)) - net.Start("art_RequestInvDrop") - net.WriteEntity(ent_or_tbl) - net.WriteUInt(invid,32) - net.WriteTable(frompos) - net.SendToServer() -end - -return items -- cgit v1.2.3-70-g09d2