aboutsummaryrefslogtreecommitdiff
path: root/gamemode/shared/itemsystem/quest/rougebook.lua
diff options
context:
space:
mode:
Diffstat (limited to 'gamemode/shared/itemsystem/quest/rougebook.lua')
-rw-r--r--gamemode/shared/itemsystem/quest/rougebook.lua61
1 files changed, 61 insertions, 0 deletions
diff --git a/gamemode/shared/itemsystem/quest/rougebook.lua b/gamemode/shared/itemsystem/quest/rougebook.lua
new file mode 100644
index 0000000..835b863
--- /dev/null
+++ b/gamemode/shared/itemsystem/quest/rougebook.lua
@@ -0,0 +1,61 @@
+--[[
+ A quest item for the prayer book quest
+]]
+local item = {}
+
+item.Name = "Orders of the Silent Circle"
+
+item.Serialize = function(self)
+ print("Trying to serailize!")
+ return ""
+end
+
+item.DeSerialize = function(self,string)
+ print("Trying to deserialize!")
+ return self
+end
+
+item.Shape = {
+ {true,true},
+ {true,true},
+}
+
+local rougeadvice = {
+ "He who refuses to trim his beard will find himself in a hairy situation.",
+ "You'll get tired defending from a man in a vehicle",
+ "You'll get exhaused attacking a man in a vehicle.",
+ "If you eat beans before church, you will sit in your own pew.",
+ "He who seeks challenges will be puzzeled.",
+ "He who fishes in another man's well is likely to catch crabs.",
+}
+
+local lhint = 1
+
+function item.GetOptions(self)
+ local options = {}
+ options["Read"] = function()
+ local readframe = vgui.Create( "DFrame" )
+ readframe:SetPos( ScrW()/2 - 100, ScrH()/2 - 100)
+ readframe:SetSize(200,200)
+ readframe:SetTitle("Orders of the Silent Circle")
+ readframe:MakePopup()
+
+
+ local readpanel = vgui.Create( "DPanel", readframe )
+ readpanel:SetPos( 5, 30 )
+ readpanel:SetSize( 190, 170 )
+ function readpanel:Paint(w,h) end
+
+
+ local readtext = vgui.Create( "DLabel", readpanel )
+ readtext:SetPos( 40, 40 )
+ readtext:SetText(rougeadvice[lhint])
+ readtext:SetDark()
+ readtext:Dock(FILL)
+ readtext:SetWrap(true)
+ lhint = (lhint % #rougeadvice) + 1
+ end
+ return options
+end
+
+ART.RegisterItem(item)