summaryrefslogtreecommitdiff
path: root/gamemode/structuresystem/structures/aaaStructureExample.lua
diff options
context:
space:
mode:
authorAlexander Pickering <alexandermpickering@gmail.com>2016-05-25 22:40:09 -0400
committerAlexander Pickering <alexandermpickering@gmail.com>2016-05-25 22:40:09 -0400
commitf797cbe348dd52b51da4cd4812cfa291d1434095 (patch)
treedf4fabacfc6819a981d750c510122f5bbda8083c /gamemode/structuresystem/structures/aaaStructureExample.lua
parenta5932d386488030b6005c829fe343f74daed9893 (diff)
parentfd04cb695e1c0e6597456f2b1b7b076310fd81bf (diff)
downloadgmstranded-f797cbe348dd52b51da4cd4812cfa291d1434095.tar.gz
gmstranded-f797cbe348dd52b51da4cd4812cfa291d1434095.tar.bz2
gmstranded-f797cbe348dd52b51da4cd4812cfa291d1434095.zip
Merge branch 'structsystem'hotfix
Diffstat (limited to 'gamemode/structuresystem/structures/aaaStructureExample.lua')
-rw-r--r--gamemode/structuresystem/structures/aaaStructureExample.lua22
1 files changed, 22 insertions, 0 deletions
diff --git a/gamemode/structuresystem/structures/aaaStructureExample.lua b/gamemode/structuresystem/structures/aaaStructureExample.lua
new file mode 100644
index 0000000..abe91ba
--- /dev/null
+++ b/gamemode/structuresystem/structures/aaaStructureExample.lua
@@ -0,0 +1,22 @@
+--This file is to help developers add new structures to the game!
+
+STRUCT = {}
+
+--A name for this structure, each type of structure must have a different name
+STRUCT.Name = "Example Structure"
+
+--The model for this structure.
+STRUCT.Model = "models/props/de_inferno/ClayOven.mdl"
+
+--The initalize method. Called on both the server and the client
+STRUCT.onInitialize = function(self)
+ print("Initalize called!")
+end
+
+--If this structure is not like every other structures of the same name (for example, if it has an internal inventory)
+STRUCT.uniquedata = false
+
+--Called when a player presses e on this structure, called on both the server and the client. Keep in mind that on the client side, ply may not be the local player!
+STRUCT.onUse = function(self,ply)
+ print("onUse called!")
+end