aboutsummaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
Diffstat (limited to 'doc')
-rw-r--r--doc/for_developers/structs/dropped_item.md14
-rw-r--r--doc/for_developers/structs/player.md17
-rw-r--r--doc/structs/dropped_item.md14
3 files changed, 45 insertions, 0 deletions
diff --git a/doc/for_developers/structs/dropped_item.md b/doc/for_developers/structs/dropped_item.md
new file mode 100644
index 0000000..ffabfbd
--- /dev/null
+++ b/doc/for_developers/structs/dropped_item.md
@@ -0,0 +1,14 @@
+# Dropped item
+
+Droped items are represented as a name-data combo
+
+ local i = <table_item>
+ local e = ents.Create("art_droppeditem")
+ e.Item = {
+ Name = i.Name
+ Data = i:Serialize()
+ }
+
+This structure is used in:
+* gamemode/core/inventory/sv_invtracker.lua
+* entities/entities/art_droppeditem/init.lua
diff --git a/doc/for_developers/structs/player.md b/doc/for_developers/structs/player.md
new file mode 100644
index 0000000..130927d
--- /dev/null
+++ b/doc/for_developers/structs/player.md
@@ -0,0 +1,17 @@
+# Player
+
+A player has the following fields
+
+`ply.data` - stores all data needed to save & create a player
+
+# Data
+
+A players data consists of the following
+
+`data.inventories :: array` the inventories a player posesses, remember that all inventories must have a :serialize() method
+
+`data.skills :: table` the skills a player has picked up
+
+`data.quests :: table` the quests a player knows about
+
+`data.prayers :: tabe` the prayers that a player can do
diff --git a/doc/structs/dropped_item.md b/doc/structs/dropped_item.md
new file mode 100644
index 0000000..ffabfbd
--- /dev/null
+++ b/doc/structs/dropped_item.md
@@ -0,0 +1,14 @@
+# Dropped item
+
+Droped items are represented as a name-data combo
+
+ local i = <table_item>
+ local e = ents.Create("art_droppeditem")
+ e.Item = {
+ Name = i.Name
+ Data = i:Serialize()
+ }
+
+This structure is used in:
+* gamemode/core/inventory/sv_invtracker.lua
+* entities/entities/art_droppeditem/init.lua