summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorApickx <apickx@cogarr.com>2025-02-12 16:41:17 -0600
committerApickx <apickx@cogarr.com>2025-02-12 16:41:17 -0600
commit94cc3813c462df5f7bfd875d5a817b0da42006e6 (patch)
treede80af0fe1300e822c6b553d15dbf2136f31f1b9
parentd22897e044a422e125f46e52c3467473a3656378 (diff)
downloadartery_stranded-94cc3813c462df5f7bfd875d5a817b0da42006e6.tar.gz
artery_stranded-94cc3813c462df5f7bfd875d5a817b0da42006e6.tar.bz2
artery_stranded-94cc3813c462df5f7bfd875d5a817b0da42006e6.zip
Final commitHEADmaster
-rw-r--r--content/materials/svg/delapouite/originals/svg/000000/transparent/log.svg1
-rw-r--r--content/materials/svg/lorc/originals/svg/000000/transparent/dead-wood.svg1
-rw-r--r--content/materials/svg/lorc/originals/svg/000000/transparent/oak.svg1
-rw-r--r--content/materials/svg/lorc/originals/svg/000000/transparent/pine-tree.svg1
-rw-r--r--content/materials/svg/lorc/originals/svg/000000/transparent/root-tip.svg1
-rw-r--r--data/artery/global/art_sawhorse/cl_ent_sawhorse.lua118
-rw-r--r--data/artery/global/art_sawhorse/sh_ent_sawhorse.lua106
-rw-r--r--data/artery/global/art_sawhorse/sv_ent_sawhorse.lua172
-rw-r--r--data/artery/global/art_shipyardcontrol/cl_ent_shipyardcontrol.lua128
-rw-r--r--data/artery/global/art_shipyardcontrol/sh_ent_shipyardcontrol.lua26
-rw-r--r--data/artery/global/art_shipyardcontrol/sv_ent_shipyardcontrol.lua110
-rw-r--r--data/artery/global/art_workbench/cl_ent_workbench.lua126
-rw-r--r--data/artery/global/art_workbench/sh_ent_workbench.lua74
-rw-r--r--data/artery/global/art_workbench/sv_ent_workbench.lua222
-rw-r--r--data/artery/global/cl_crafting_inv.lua6
-rw-r--r--data/artery/global/sh_chopwood.txt13
-rw-r--r--data/artery/global/sh_crafting_inv.lua386
-rw-r--r--data/artery/global/sh_minerock.txt59
-rw-r--r--data/artery/global/sh_shipyard.txt126
-rw-r--r--data/artery/global/sv_config.txt20
-rw-r--r--data/artery/global/sv_dupboat.lua76
-rw-r--r--lua/autorun/animations.lua706
-rw-r--r--lua/autorun/server/init.lua22
-rw-r--r--lua/autorun/zone_shipyard.lua63
24 files changed, 1324 insertions, 1240 deletions
diff --git a/content/materials/svg/delapouite/originals/svg/000000/transparent/log.svg b/content/materials/svg/delapouite/originals/svg/000000/transparent/log.svg
new file mode 100644
index 0000000..b003c5e
--- /dev/null
+++ b/content/materials/svg/delapouite/originals/svg/000000/transparent/log.svg
@@ -0,0 +1 @@
+<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><path d="M391.69 15.94c-16.368.073-31 5.07-41.975 16.044L73.83 307.87c4.225-.493 8.42-.613 12.56-.372 3.104.18 6.177.564 9.21 1.14 13.84 2.63 26.617 8.977 37.984 17.714 27.167-24.11 141.885-119.71 141.885-119.71-40.545 46.737-88.255 89.892-120.536 140.76.593.734 1.195 1.46 1.775 2.205 15.83 20.355 26.67 45.27 29.923 69.563.955 7.135 1.235 14.277.74 21.23l181.06-181.06-7.742-4.647c-.48.215-.962.43-1.493.647l-45.254 22.627 45.254-45.254c0 .09.02.18.026.27l.072-.12 43.52 26.114c1.272-5.898 3.794-11.413 7.824-16.05 4.662-5.37 11.21-9.078 19-10.74l-26.124-43.542 15.435-9.262 11.04 18.4 42.762-42.762c21.036-21.035 26.396-41.327 23.27-60.39-1.63-9.942-5.823-19.683-11.913-28.747l-72.876 72.875 63.522-84.697c-3.586-3.89-7.52-7.585-11.752-11.03-8.926-7.268-19.102-13.37-29.695-17.936.182.177.37.35.55.527l-56.567 33.942 21.668-43.337c-1.333-.107-2.66-.187-3.974-.233-1.106-.04-2.205-.055-3.297-.05zm43.593 233.36c-5.373.6-8.696 2.71-11.058 5.43-2.093 2.41-3.55 5.79-4.127 9.872 4.65-.945 7.952-2.652 10.228-4.928 2.3-2.3 4.02-5.645 4.957-10.375zM81.69 325.282c-15.297-.065-31.403 6.298-48.342 23.08-14.82 15.01-19.83 34.54-17.672 55.385 2.17 20.985 12 42.9 26.424 59.945 2.267 2.68 4.655 5.22 7.125 7.633 3.784-12.452 22.964-33.344 33.912-49.724-7.955 21.334-13.49 43.014-12.62 65.61 7.806 4.22 16.034 7.09 24.415 8.25 19.47 2.693 40.22-3.064 61.29-23.92 11.398-11.606 15.307-29.53 12.57-49.983-2.76-20.61-12.425-43.073-26.292-60.902-13.867-17.83-31.744-30.818-50.262-34.338-3.472-.66-6.987-1.022-10.547-1.037zm-8.21 19.8a73.833 55.395 45 0 1 60.14 26.034 73.833 55.395 45 0 1 13.038 91.377 73.833 55.395 45 0 1-46.732 11.692 61.463 48 45 0 0 29.154-11.608 61.463 48 45 0 0-9.52-77.4 61.463 48 45 0 0-77.402-9.522 61.463 48 45 0 0-11.62 29.147A73.833 55.395 45 0 1 42.24 358.08a73.833 55.395 45 0 1 31.237-12.998z"/></svg> \ No newline at end of file
diff --git a/content/materials/svg/lorc/originals/svg/000000/transparent/dead-wood.svg b/content/materials/svg/lorc/originals/svg/000000/transparent/dead-wood.svg
new file mode 100644
index 0000000..458ceb2
--- /dev/null
+++ b/content/materials/svg/lorc/originals/svg/000000/transparent/dead-wood.svg
@@ -0,0 +1 @@
+<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><path d="M290.78 9.563l-19.5 72.53 70.033 26.813-39.282 40.813c-15.52 8.456-27.103 8.22-37.31 2.124-.014-.008-.02-.024-.033-.03l-5.093-11.064 41.844-33.5-49.375 17.22-29.875-64.626 14.406-31.375-31.656 22.56V51l-91.344-20.094 90.75 37.844 11.53 24.938-62.25 13.25-33.31-41.626 15.78 45.344-26.156 5.563L50.25 77.843l26.344 30.062-39.906 31.938 52.03-18.125 13.907 15.843 80.563-16.938-3.22 43.75 20.782-47.438 23.656-4.968 23.406 50.624c1.88 9.953 2.716 19.126 2.282 27.125l-45.188-17.657 41.188 35.562c-6.098 12.943-19.27 18.24-41.344 11.594l-75.344-49.97-27.97 18.53-16.405-37.343 3.376 46-9.53 6.313-65.157-49.344 61.5 74.938 54.186-35.938c10.9 7.49 21.867 14.905 32.844 22.28l-12.125 41.72-48.75 20.22 63.97-3.782 13.593-47.03c5.696 3.787 11.38 7.58 17.093 11.342 49.537 75.88 57.073 189.32 1.97 176.688 9.086 38.633-24.273 67.905-54.844 81.062h28.03l-.03-.062c25.217-7.956 40.217-20.772 55.906-45.813.113 17.364-7.4 33.346-20.875 45.876h66c-17.686-16.632-27.36-43.79-15.062-88.53 2.454 40.996 14.77 72.124 53.156 88.5v.03h25.97c-69.106-37.694-84.94-111.418-50.094-182.53l36.28-43.47 62.158 17.25-38.188-24.28 18.156-45.72-32.156 36.813-14.22-9.064-13.842 16.53c-7.277-7.843-9.635-21.475-7.78-38.405 2.074-18.954 9.395-40.43 17.123-56.25l15.938-16.405 41.53 25.97 13.408 57.28 79.75 21.938L401 219.22l-10.438-45.782 26.97-12.594L461.187 209l-26.72-56.063 9.813-4.593 50.47-2.875-34.656-13 19.437-52.19-40.374 49.845-59.406 27.72-36.28-22.72 24.124-24.844 42.437-33.968-52.31 18.22-5.408-2.094L392.75 13.31l-58.063 72.313-43.906-16.938V9.563zm-13.5 224.687c.254 15.565 4.228 30.356 15 40.594l-12.186 14.562c-9.453-13.425-9.047-33.08-2.813-55.156zm-53.78 14.28c26.69 17.688 39.887 60.23 23.75 88.595-3.706-24.886-12.738-58.882-25.688-85.188l1.938-3.406z" fill-rule="evenodd"/></svg> \ No newline at end of file
diff --git a/content/materials/svg/lorc/originals/svg/000000/transparent/oak.svg b/content/materials/svg/lorc/originals/svg/000000/transparent/oak.svg
new file mode 100644
index 0000000..34e2b46
--- /dev/null
+++ b/content/materials/svg/lorc/originals/svg/000000/transparent/oak.svg
@@ -0,0 +1 @@
+<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><path d="M348.92 15.633c-1.387-.018-2.776.02-4.168.113l-.002.006c-13.368.9-26.782 7.143-39.715 19.27-20.056-5.876-37.08-10.614-57.232-.58-37.81-11.887-75.686-13.068-104.54 19.27-42.477-10.09-87.2 9.883-76.51 58.985-47.074 14.955-56.408 78.2-.58 73.586 7.938 46.78 41.118 55.937 83.514 40.883 19.41 24.008 46.462 39.182 77.282 46.443.28 5.105.085 10.33-.566 15.68-5.807 47.77-50.79 105.31-121.367 154.696L81.12 460.723l29.16-1.354c29.003-1.347 48.05-2.39 58.935-1.55-5.818 6.555-11.317 12.37-16.28 17.297L134.04 493.88l26.26-4.417c23.887-4.017 44.442-7.94 59.927-8.363 15.484-.423 24.434 2.174 29.916 9.552l7.33 9.864 6.597-10.368c6.53-10.26 13.576-12.87 27.227-12.257 13.65.613 32.84 6.013 57.043 13.3l29.69 8.94-21.036-22.782c-8.04-8.707-15.965-18.118-23.357-27.786 2.535.115 5.228.297 8.015.596 12.14 1.3 26.887 3.978 40.67 8.067l26.127 7.75-17.145-21.184c-32.25-39.843-64.6-69.885-69.768-104.74-2.584-17.43.916-36.76 15.28-61.374 1.952-3.342 4.124-6.783 6.49-10.31 7.932-2.277 15.826-4.915 23.634-7.913 27.094 24.058 78.02 4.07 50.812-27.45 58.72-14.457 105.89-59.625 26.865-95.196 46.613-36.08 17.39-90.36-40.297-88.188-14.636-21.026-34.603-33.72-55.4-33.987zm11.277 65.488c-42.59 32.678-48.978 37.184-53.506 65.825.317 3.472.597 7.013 1.103 10.11 3.153 19.296 10.22 32.648 21.43 39.89 11.21 7.243 24.752 7.554 38.814 5.344 3.876-.61 7.86-1.446 11.91-2.397-26.82 26.337-45.555 49.373-57.742 70.253-15.75 26.986-20.6 50.827-17.404 72.385 5.283 35.632 30.606 63.305 56.864 93.556-6.317-1.147-12.557-2.146-18.21-2.752-8.907-.955-16.085-1.496-22.225-1.018-15.78-23.394-27.137-46.75-28.396-64.013l-16.875 1.23c2.246 30.812 24.037 66.155 49.786 97.565-12.35-3.28-23.554-5.657-33.69-6.112-13.696-.614-26.363 3.152-35.763 12.244-9.7-7.222-22.628-9.424-36.527-9.044-11.164.304-23.902 2.172-37.366 4.402 44.064-49.242 105.015-137.42 104.04-226.442l-16.92.186c.81 73.714-47.797 152.037-88.25 201.336-11.867-3.388-25.73-3.414-44.05-2.566 60.184-46.96 99.88-99.595 105.98-149.77 3.418-28.11-4.46-55.45-25.085-78.033-16.147-17.684-39.853-32.51-71.576-44.105 7.55-1.88 14.953-4.365 21.462-9.18 6.738-4.988 11.306-13.447 12.117-23.892 4.84 5.99 9.412 10.25 15.808 12.004 3.987 1.093 8.89.41 12.398-1.818 1.18-.75 2.055-1.72 2.987-2.65 1.008 13.36 2.204 26.116 4.996 35.543 1.305 4.41 2.77 8.54 6.917 11.938 4.147 3.4 11.522 3.424 16.02.846 2.954-1.693 5.624-4.19 8.255-7.105.53 5.72 1.776 10.502 4.068 14.624 1.406 2.527 3.53 5.005 6.594 6.473 3.065 1.467 6.72 1.527 9.586.712 5.732-1.63 9.41-5.37 13.29-10.104 8.362-10.204 17.167-27.234 25.41-49.5-1.647-26.645-3.49-39.06-35.522-58.758 25.123 13.013 47.678 20.495 89.27-7.207z" /></svg> \ No newline at end of file
diff --git a/content/materials/svg/lorc/originals/svg/000000/transparent/pine-tree.svg b/content/materials/svg/lorc/originals/svg/000000/transparent/pine-tree.svg
new file mode 100644
index 0000000..672c592
--- /dev/null
+++ b/content/materials/svg/lorc/originals/svg/000000/transparent/pine-tree.svg
@@ -0,0 +1 @@
+<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><path d="M249.28 19.188v.25c-18.114 38.634-45.065 72.36-77.686 102.937l37.72-3.938-51.345 65.032 24.81-7.907-33.624 54.875 16.53 9.843-65.25 92.157 36.095.188-51.686 83.594 63.562-8.126 12 32.094 66.438-25.282L215.5 493.28h52.938l-6.532-68.217 38.188 16.406 10.187-24.783 44.283 20.97 56.406-20.75-37.064-64.094-12.437-2.282 6.78 17.19 7.844 19.905-19.938-7.78-50.906-19.908V395.688l-14.156-8.594-69.375-42-21.595 21.25-18.03 17.75 2.155-25.22 2.125-24.655 18.188 1.56 9.218-9.092 5.19-5.094 6.218 3.75 61.375 37.156v-29.906l12.75 4.97 43.718 17.092-5.092-12.906-6.157-15.656 16.533 3.03 45.468 8.345-34.53-38.94-23.625 14.033-6.688 3.968-5.125-5.874-14.28-16.437.218 1.217-18.406 3.22-5.97-34.313-5.75-33.063 22 25.345 31.188 35.875 43.907-26.03c-24.67-19.543-39.507-33.87-49.658-48.814l.813 12.656 1.97 31-18.75-24.75-34.47-45.437-22.25 46.813-13.844 29.125-3.843-32.032-3.5-28.843 16.532-1.968 16.624-34.97 6.594-13.875 9.28 12.22 25 32.936-.75-11.53-.906-14.28 13.47 4.936L341.81 188l-26.125-35.156-55.843-28.875-8.938 20.218-9.656 21.937-7.72-22.688-7.468-21.875 16.97-5.78 3.718-8.438 4-9.125 8.844 4.593 49.375 25.53 16.467-5.562c-43.42-34.31-64.63-68.886-76.156-103.593z" /></svg> \ No newline at end of file
diff --git a/content/materials/svg/lorc/originals/svg/000000/transparent/root-tip.svg b/content/materials/svg/lorc/originals/svg/000000/transparent/root-tip.svg
new file mode 100644
index 0000000..c71c70d
--- /dev/null
+++ b/content/materials/svg/lorc/originals/svg/000000/transparent/root-tip.svg
@@ -0,0 +1 @@
+<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><path d="M16.508 18.453l-.002 149.908 61.26 49.667 59.757 124.543-9.488-110.738C88.835 182.608 56.58 126.518 67.12 58.338l18.47 2.855c-7.312 47.297 8.4 88.472 33.44 126.67l77.745 43.094 83.868 183.8c70.454 33.943 140.91 58.63 211.365 72.423-47.672-21.634-93.83-50.913-131.332-90.717l-62.45-11.06 3.256-18.4 13.06 3.25 117.42 18.155c-52.808-19.54-101.05-43.642-132.01-85.03-10.244-24.453-17.846-51.365-22.16-81.007-23.356-4.888-46.4-13.233-68.97-25.49l8.92-16.423c26.233 14.248 52.854 22.748 80 26.426l46.75 2.033 146.23 150.81c-18.12-52.077-51.543-121.06-88.19-177.67-30.968-13.506-61.174-15.44-91.886-5.587l-5.71-17.798c14.194-4.553 28.47-6.83 42.746-6.926 2.04-.014 4.078.017 6.117.092 26.897.987 53.746 9.68 79.973 25.42 16.215 8.164 32.85 17.73 50.288 28.525-33.99-44.3-65.738-83.98-117.208-99.594l-.004-.007-23.94 15.336c-36.26 17.486-88.188 18.165-135.264-8.645-21.56 7.324-42.96 12.01-64.166 13.527l-1.334-18.64c26.348-1.886 53.598-9.242 81.577-21.08-18.115-6.645-36.81-15.81-54.095-26.082-22.913-13.617-43.004-28.54-55.545-42.147zM141.354 370.49l-1.4 71.356c38.483 37.214 86.748 46.007 139.91 54.564-64.332-36.743-109.837-71.915-138.51-125.92z"/></svg> \ No newline at end of file
diff --git a/data/artery/global/art_sawhorse/cl_ent_sawhorse.lua b/data/artery/global/art_sawhorse/cl_ent_sawhorse.lua
index 2cbe16a..f80784d 100644
--- a/data/artery/global/art_sawhorse/cl_ent_sawhorse.lua
+++ b/data/artery/global/art_sawhorse/cl_ent_sawhorse.lua
@@ -1,59 +1,59 @@
---[[
- Client stuff!
-]]
-local ENT = nrequire("sh_ent_sawhorse.lua")
-
-function ENT:Draw()
-
- self.Entity:DrawModel()
-
-end
-
-net.Receive("art_sawhorse_open",function()
- local who = net.ReadEntity()
- print("Opening sawhorse")
- local selectframe = vgui.Create("DFrame")
- selectframe:SetSize(ScrW()/2, ScrH()/2)
- selectframe:Center()
- selectframe:SetTitle("Sawhorse")
-
- local scroll = vgui.Create( "DScrollPanel",selectframe )
- scroll:Dock(FILL)
-
- local grid = vgui.Create( "DGrid", scroll )
- grid:SetPos( 10, 30 )
- grid:SetCols( 2 )
- grid:SetColWide( 200 )
- grid:SetRowHeight(100)
- grid:Dock(FILL)
-
- print("s.props is",ENT.props)
- PrintTable(ENT.props)
-
- for k,v in pairs(ENT.props) do
- local p = vgui.Create("DPanel")
- p:SetSize(200,100)
- --p:Dock(FILL)
- local but = vgui.Create("DModelPanel",p)
- but:SetModel(v.model)
- but:SetSize(100,100)
- but:Dock(LEFT)
- but.DoClick = function(self)
- net.Start("art_sawhorse_select")
- net.WriteString(k)
- net.WriteEntity(who)
- net.SendToServer()
- print("I want to make a ", k)
- end
- local label = vgui.Create("DLabel",p)
- label:SetSize(100,100)
- label:Dock(RIGHT)
- label:SetText(string.format("%s\nCost:%d wood",k,v.cost))
- label:SetDark(true)
- grid:AddItem(p)
- end
-
- selectframe:MakePopup()
-end)
-
-scripted_ents.Register(ENT,"art_sawhorse")
+--[[
+ Client stuff!
+]]
+local ENT = nrequire("sh_ent_sawhorse.lua")
+
+function ENT:Draw()
+
+ self.Entity:DrawModel()
+
+end
+
+net.Receive("art_sawhorse_open",function()
+ local who = net.ReadEntity()
+ print("Opening sawhorse")
+ local selectframe = vgui.Create("DFrame")
+ selectframe:SetSize(ScrW()/2, ScrH()/2)
+ selectframe:Center()
+ selectframe:SetTitle("Sawhorse")
+
+ local scroll = vgui.Create( "DScrollPanel",selectframe )
+ scroll:Dock(FILL)
+
+ local grid = vgui.Create( "DGrid", scroll )
+ grid:SetPos( 10, 30 )
+ grid:SetCols( 2 )
+ grid:SetColWide( 200 )
+ grid:SetRowHeight(100)
+ grid:Dock(FILL)
+
+ print("s.props is",ENT.props)
+ PrintTable(ENT.props)
+
+ for k,v in pairs(ENT.props) do
+ local p = vgui.Create("DPanel")
+ p:SetSize(200,100)
+ --p:Dock(FILL)
+ local but = vgui.Create("DModelPanel",p)
+ but:SetModel(v.model)
+ but:SetSize(100,100)
+ but:Dock(LEFT)
+ but.DoClick = function(self)
+ net.Start("art_sawhorse_select")
+ net.WriteString(k)
+ net.WriteEntity(who)
+ net.SendToServer()
+ print("I want to make a ", k)
+ end
+ local label = vgui.Create("DLabel",p)
+ label:SetSize(100,100)
+ label:Dock(RIGHT)
+ label:SetText(string.format("%s\nCost:%d wood",k,v.cost))
+ label:SetDark(true)
+ grid:AddItem(p)
+ end
+
+ selectframe:MakePopup()
+end)
+
+scripted_ents.Register(ENT,"art_sawhorse")
diff --git a/data/artery/global/art_sawhorse/sh_ent_sawhorse.lua b/data/artery/global/art_sawhorse/sh_ent_sawhorse.lua
index bf0e640..49ede91 100644
--- a/data/artery/global/art_sawhorse/sh_ent_sawhorse.lua
+++ b/data/artery/global/art_sawhorse/sh_ent_sawhorse.lua
@@ -1,53 +1,53 @@
-
-local ENT = {}
-
-ENT.Type = "anim"
-ENT.Base = "art_chest"
-ENT.PrintName = "art_sawhorse"
-ENT.Author = "Apickx"
-
-ENT.Spawnable = false
-ENT.AdminSpawnable = false
-
-local skil = nrequire("sh_skillcommon.lua")
-skil.RegisterSkill({"Crafting","Carpentry"})
-
-ENT.props = {
- ["A short board"] = {
- model = "models/props_debris/wood_board06a.mdl",
- cost = 1
- },
- ["A longer board"] = {
- model = "models/props_debris/wood_board07a.mdl",
- cost = 2,
- },
- ["A pallet"] = {
- model = "models/props_junk/wood_pallet001a.mdl",
- cost = 2
- },
- ["A large flat peice of wood"] = {
- model = "models/props_wasteland/wood_fence01a.mdl",
- cost = 3
- },
- ["A small flat peice of wood"] = {
- model = "models/props_wasteland/wood_fence02a.mdl",
- cost = 2
- },
- ["A very strong, boyent fence"] = {
- model = "models/props_c17/FurnitureShelf001a.mdl",
- cost = 2
- },
- ["A round table"] = {
- model = "models/props_c17/FurnitureTable001a.mdl",
- cost = 1
- },
- ["A rectangle table"] = {
- model = "models/props_c17/FurnitureTable002a.mdl",
- cost = 1
- },
- ["A tall pole"] = {
- model = "models/props_docks/dock01_pole01a_128.mdl",
- cost = 2
- }
-}
-return ENT
+
+local ENT = {}
+
+ENT.Type = "anim"
+ENT.Base = "art_chest"
+ENT.PrintName = "art_sawhorse"
+ENT.Author = "Apickx"
+
+ENT.Spawnable = false
+ENT.AdminSpawnable = false
+
+local skil = nrequire("sh_skillcommon.lua")
+skil.RegisterSkill({"Crafting","Carpentry"})
+
+ENT.props = {
+ ["A short board"] = {
+ model = "models/props_debris/wood_board06a.mdl",
+ cost = 1
+ },
+ ["A longer board"] = {
+ model = "models/props_debris/wood_board07a.mdl",
+ cost = 2,
+ },
+ ["A pallet"] = {
+ model = "models/props_junk/wood_pallet001a.mdl",
+ cost = 2
+ },
+ ["A large flat peice of wood"] = {
+ model = "models/props_wasteland/wood_fence01a.mdl",
+ cost = 3
+ },
+ ["A small flat peice of wood"] = {
+ model = "models/props_wasteland/wood_fence02a.mdl",
+ cost = 2
+ },
+ ["A very strong, boyent fence"] = {
+ model = "models/props_c17/FurnitureShelf001a.mdl",
+ cost = 2
+ },
+ ["A round table"] = {
+ model = "models/props_c17/FurnitureTable001a.mdl",
+ cost = 1
+ },
+ ["A rectangle table"] = {
+ model = "models/props_c17/FurnitureTable002a.mdl",
+ cost = 1
+ },
+ ["A tall pole"] = {
+ model = "models/props_docks/dock01_pole01a_128.mdl",
+ cost = 2
+ }
+}
+return ENT
diff --git a/data/artery/global/art_sawhorse/sv_ent_sawhorse.lua b/data/artery/global/art_sawhorse/sv_ent_sawhorse.lua
index 393aaed..100864a 100644
--- a/data/artery/global/art_sawhorse/sv_ent_sawhorse.lua
+++ b/data/artery/global/art_sawhorse/sv_ent_sawhorse.lua
@@ -1,86 +1,86 @@
---[[
- This entity gives townies things to do
-]]
-
-local ENT = nrequire("sh_ent_sawhorse.lua")
-
-DEFINE_BASECLASS("art_chest") -- this defined a local variable called BaseClass
-
-AddCSLuaFile( "cl_init.lua" )
-AddCSLuaFile( "shared.lua" )
-
-print("Hello from art_sawhorse init.lua!")
-
-local s = include("shared.lua")
-local inv = nrequire("core/inventory/inventory.lua")
-local itm = nrequire("core/inventory/item.lua")
-
-function ENT:Initialize( )
- self.InvType = "Crafting Inventory"
- BaseClass.Initialize(self)
- timer.Simple(0.1,function()
- self.data.inventories[self:GetCreationID()].accepts = {
- ["Wood"] = true,
- }
- end)
- self.Entity:SetModel("models/props/cs_militia/sawhorse.mdl")
- self.Entity:PhysicsInit( SOLID_VPHYSICS )
- self.Entity:SetMoveType( MOVETYPE_VPHYSICS )
- self.Entity:SetSolid( SOLID_VPHYSICS )
- self.Entity:Activate()
- local phys = self.Entity:GetPhysicsObject()
- if (phys:IsValid()) then
- phys:Wake()
- phys:SetMass(100)
- end
- self.selfPos = self.Entity
- self:SetUseType(SIMPLE_USE)
-end
-
-
-util.AddNetworkString("art_sawhorse_open")
-util.AddNetworkString("art_sawhorse_select")
-util.AddNetworkString("art_sawhorse_puzzle")
-util.AddNetworkString("art_sawhorse_put")
-util.AddNetworkString("art_sawhorse_close")
-
-function ENT:Use(a,c,u,v)
- net.Start("art_sawhorse_open")
- net.WriteEntity(self)
- net.Send(c)
- BaseClass.Use(self,a,c,u,v)
-end
-
-net.Receive("art_sawhorse_select",function(ln,ply)
- local name = net.ReadString()
- local who = net.ReadEntity()
- print("props are:")
- PrintTable(ENT.props)
- assert(ENT.props[name],"Player " .. ply:Nick() .. " tried to make a prop we don't have:" .. name)
- local cost = ENT.props[name].cost
- print("player wanted to make a ",name,cost)
- local num = 0
- local myinv = who.data.inventories[who:GetCreationID()]
- local cursor = myinv:Has("Wood")
- local titm = nil
- while cursor ~= nil and num < cost do
- titm = myinv:Remove(cursor)
- num = num + 1
- cursor = myinv:Has("Wood")
- end
- if num == cost then
- local e = ents.Create("prop_physics")
- e:SetPos(who:GetPos() + Vector(0,0,100))
- e:SetModel(ENT.props[name].model)
- e:Spawn()
- ply:AddSkill("Carpentry",cost)
- else
- --Put stuff back in if we didn't have enough!
- for i = 1,num do
- local pos = myinv:FindPlaceFor(titm)
- myinv:Put(pos,titm)
- end
- end
-end)
-
-scripted_ents.Register(ENT,"art_sawhorse")
+--[[
+ This entity gives townies things to do
+]]
+
+local ENT = nrequire("sh_ent_sawhorse.lua")
+
+DEFINE_BASECLASS("art_chest") -- this defined a local variable called BaseClass
+
+AddCSLuaFile( "cl_init.lua" )
+AddCSLuaFile( "shared.lua" )
+
+print("Hello from art_sawhorse init.lua!")
+
+local s = include("shared.lua")
+local inv = nrequire("core/inventory/inventory.lua")
+local itm = nrequire("core/inventory/item.lua")
+
+function ENT:Initialize( )
+ self.InvType = "Crafting Inventory"
+ BaseClass.Initialize(self)
+ timer.Simple(0.1,function()
+ self.data.inventories[self:GetCreationID()].accepts = {
+ ["Wood"] = true,
+ }
+ end)
+ self.Entity:SetModel("models/props/cs_militia/sawhorse.mdl")
+ self.Entity:PhysicsInit( SOLID_VPHYSICS )
+ self.Entity:SetMoveType( MOVETYPE_VPHYSICS )
+ self.Entity:SetSolid( SOLID_VPHYSICS )
+ self.Entity:Activate()
+ local phys = self.Entity:GetPhysicsObject()
+ if (phys:IsValid()) then
+ phys:Wake()
+ phys:SetMass(100)
+ end
+ self.selfPos = self.Entity
+ self:SetUseType(SIMPLE_USE)
+end
+
+
+util.AddNetworkString("art_sawhorse_open")
+util.AddNetworkString("art_sawhorse_select")
+util.AddNetworkString("art_sawhorse_puzzle")
+util.AddNetworkString("art_sawhorse_put")
+util.AddNetworkString("art_sawhorse_close")
+
+function ENT:Use(a,c,u,v)
+ net.Start("art_sawhorse_open")
+ net.WriteEntity(self)
+ net.Send(c)
+ BaseClass.Use(self,a,c,u,v)
+end
+
+net.Receive("art_sawhorse_select",function(ln,ply)
+ local name = net.ReadString()
+ local who = net.ReadEntity()
+ print("props are:")
+ PrintTable(ENT.props)
+ assert(ENT.props[name],"Player " .. ply:Nick() .. " tried to make a prop we don't have:" .. name)
+ local cost = ENT.props[name].cost
+ print("player wanted to make a ",name,cost)
+ local num = 0
+ local myinv = who.data.inventories[who:GetCreationID()]
+ local cursor = myinv:Has("Wood")
+ local titm = nil
+ while cursor ~= nil and num < cost do
+ titm = myinv:Remove(cursor)
+ num = num + 1
+ cursor = myinv:Has("Wood")
+ end
+ if num == cost then
+ local e = ents.Create("prop_physics")
+ e:SetPos(who:GetPos() + Vector(0,0,100))
+ e:SetModel(ENT.props[name].model)
+ e:Spawn()
+ ply:AddSkill("Carpentry",cost)
+ else
+ --Put stuff back in if we didn't have enough!
+ for i = 1,num do
+ local pos = myinv:FindPlaceFor(titm)
+ myinv:Put(pos,titm)
+ end
+ end
+end)
+
+scripted_ents.Register(ENT,"art_sawhorse")
diff --git a/data/artery/global/art_shipyardcontrol/cl_ent_shipyardcontrol.lua b/data/artery/global/art_shipyardcontrol/cl_ent_shipyardcontrol.lua
index c9be7a6..a382132 100644
--- a/data/artery/global/art_shipyardcontrol/cl_ent_shipyardcontrol.lua
+++ b/data/artery/global/art_shipyardcontrol/cl_ent_shipyardcontrol.lua
@@ -1,64 +1,64 @@
---[[
- Client stuff!
-]]
-local ENT = nrequire("sh_ent_shipyardcontrol.lua")
-
-function ENT:Draw()
- self:DrawModel()
-
-end
-
-net.Receive("art_shipyard_open",function()
- local who = net.ReadEntity()
- print("Opening shipyard")
- local selectframe = vgui.Create("DFrame")
- selectframe:SetSize(ScrW() / 2, ScrH() / 2)
- selectframe:Center()
- selectframe:SetTitle("Shipyard")
-
- local scroll = vgui.Create( "DScrollPanel",selectframe )
- scroll:Dock(FILL)
-
- local labelname = vgui.Create("DLabel",scroll)
- labelname:Dock(TOP)
- labelname:SetText("Ship name:")
- labelname:SetDark(true)
-
- local textname = vgui.Create("DTextEntry",scroll)
- textname:Dock(TOP)
-
- local buttonfinish = vgui.Create( "DButton", scroll )
- buttonfinish:SetText("Finish")
- buttonfinish:Dock(TOP)
- buttonfinish.DoClick = function()
- net.Start("art_shipyard_finalize")
- net.WriteEntity(who)
- net.WriteString(textname:GetValue())
- net.SendToServer()
- end
-
- selectframe:MakePopup()
-end)
-
---[[
- Display the bounds of shipyards
-]]
-
-hook.Add( "PostDrawOpaqueRenderables", "artery_draw_shipyards", function()
- local ztd = zones.FindByClass("artery_shipyard")
- for k,v in pairs(ztd) do
- local bounds = v.bounds
- cam.Start3D2D( bounds.mins, Angle(0,0,0), 1 )
- local x,y = bounds.maxs.x - bounds.mins.x, -(bounds.maxs.y - bounds.mins.y)
- surface.SetDrawColor( 238, 238, 255, 50 )
- surface.DrawRect( 0, 0, x, y )
- surface.SetDrawColor( 100,100,255,255)
- surface.DrawLine(0,0,x,0)
- surface.DrawLine(0,0,0,y)
- surface.DrawLine(x,y,x,0)
- surface.DrawLine(x,y,0,y)
- cam.End3D2D()
- end
-end )
-
-scripted_ents.Register(ENT,"art_shipyardcontrol")
+--[[
+ Client stuff!
+]]
+local ENT = nrequire("sh_ent_shipyardcontrol.lua")
+
+function ENT:Draw()
+ self:DrawModel()
+
+end
+
+net.Receive("art_shipyard_open",function()
+ local who = net.ReadEntity()
+ print("Opening shipyard")
+ local selectframe = vgui.Create("DFrame")
+ selectframe:SetSize(ScrW() / 2, ScrH() / 2)
+ selectframe:Center()
+ selectframe:SetTitle("Shipyard")
+
+ local scroll = vgui.Create( "DScrollPanel",selectframe )
+ scroll:Dock(FILL)
+
+ local labelname = vgui.Create("DLabel",scroll)
+ labelname:Dock(TOP)
+ labelname:SetText("Ship name:")
+ labelname:SetDark(true)
+
+ local textname = vgui.Create("DTextEntry",scroll)
+ textname:Dock(TOP)
+
+ local buttonfinish = vgui.Create( "DButton", scroll )
+ buttonfinish:SetText("Finish")
+ buttonfinish:Dock(TOP)
+ buttonfinish.DoClick = function()
+ net.Start("art_shipyard_finalize")
+ net.WriteEntity(who)
+ net.WriteString(textname:GetValue())
+ net.SendToServer()
+ end
+
+ selectframe:MakePopup()
+end)
+
+--[[
+ Display the bounds of shipyards
+]]
+
+hook.Add( "PostDrawOpaqueRenderables", "artery_draw_shipyards", function()
+ local ztd = zones.FindByClass("artery_shipyard")
+ for k,v in pairs(ztd) do
+ local bounds = v.bounds
+ cam.Start3D2D( bounds.mins, Angle(0,0,0), 1 )
+ local x,y = bounds.maxs.x - bounds.mins.x, -(bounds.maxs.y - bounds.mins.y)
+ surface.SetDrawColor( 238, 238, 255, 50 )
+ surface.DrawRect( 0, 0, x, y )
+ surface.SetDrawColor( 100,100,255,255)
+ surface.DrawLine(0,0,x,0)
+ surface.DrawLine(0,0,0,y)
+ surface.DrawLine(x,y,x,0)
+ surface.DrawLine(x,y,0,y)
+ cam.End3D2D()
+ end
+end )
+
+scripted_ents.Register(ENT,"art_shipyardcontrol")
diff --git a/data/artery/global/art_shipyardcontrol/sh_ent_shipyardcontrol.lua b/data/artery/global/art_shipyardcontrol/sh_ent_shipyardcontrol.lua
index bb0026b..acf87a4 100644
--- a/data/artery/global/art_shipyardcontrol/sh_ent_shipyardcontrol.lua
+++ b/data/artery/global/art_shipyardcontrol/sh_ent_shipyardcontrol.lua
@@ -1,13 +1,13 @@
-
-
-local ENT = {}
-
-ENT.Type = "anim"
-ENT.Base = "art_chest"
-ENT.PrintName = "art_shipyardcontrol"
-ENT.Author = "Apickx"
-
-ENT.Spawnable = false
-ENT.AdminSpawnable = false
-
-return ENT
+
+
+local ENT = {}
+
+ENT.Type = "anim"
+ENT.Base = "art_chest"
+ENT.PrintName = "art_shipyardcontrol"
+ENT.Author = "Apickx"
+
+ENT.Spawnable = false
+ENT.AdminSpawnable = false
+
+return ENT
diff --git a/data/artery/global/art_shipyardcontrol/sv_ent_shipyardcontrol.lua b/data/artery/global/art_shipyardcontrol/sv_ent_shipyardcontrol.lua
index ed1eed0..3a2ac4f 100644
--- a/data/artery/global/art_shipyardcontrol/sv_ent_shipyardcontrol.lua
+++ b/data/artery/global/art_shipyardcontrol/sv_ent_shipyardcontrol.lua
@@ -1,55 +1,55 @@
---[[
- This entity gives townies things to do
-]]
-if not nrequire then return end
-
-AddCSLuaFile( "cl_init.lua" )
-AddCSLuaFile( "shared.lua" )
-
-print("Hello from art_shipyardcontrol init.lua!")
-
-local ENT = nrequire("sh_ent_shipyardcontrol.lua")
-
-function ENT:Initialize( )
- self.Entity:SetModel("models/props/cs_militia/sawhorse.mdl")
- self.Entity:PhysicsInit( SOLID_VPHYSICS )
- self.Entity:SetMoveType( MOVETYPE_VPHYSICS )
- self.Entity:SetSolid( SOLID_VPHYSICS )
- self.Entity:Activate()
- local phys = self.Entity:GetPhysicsObject()
- if (phys:IsValid()) then
- phys:Wake()
- phys:SetMass(100)
- end
- self.selfPos = self.Entity
- self:SetUseType(SIMPLE_USE)
-end
-
-
-util.AddNetworkString("art_shipyard_open")
-util.AddNetworkString("art_shipyard_finalize")
-util.AddNetworkString("art_shipyard_close")
-
-function ENT:Use(a,c,u,v)
- net.Start("art_shipyard_open")
- net.WriteEntity(self)
- net.Send(c)
-end
-
-net.Receive("art_shipyard_finalize",function(ln,ply)
- print("Finalizing ship...")
- local area = net.ReadEntity()
- local name = net.ReadString()
- print("Name will be", name)
- print(area,area.Zone)
- local zone = zones.List[area.Zone]
- local bounds = zone.bounds
- local allents = ents.FindInBox(bounds.mins,bounds.maxs)
- duplicator.SetLocalPos( ply:GetPos())
- local boat = duplicator.Copy(allents[1])
- duplicator.SetLocalPos(Vector(0,0,0))
- print("Got boat")
- PrintTable(boat)
-end)
-
-scripted_ents.Register(ENT,"art_shipyardcontrol")
+--[[
+ This entity gives townies things to do
+]]
+if not nrequire then return end
+
+AddCSLuaFile( "cl_init.lua" )
+AddCSLuaFile( "shared.lua" )
+
+print("Hello from art_shipyardcontrol init.lua!")
+
+local ENT = nrequire("sh_ent_shipyardcontrol.lua")
+
+function ENT:Initialize( )
+ self.Entity:SetModel("models/props/cs_militia/sawhorse.mdl")
+ self.Entity:PhysicsInit( SOLID_VPHYSICS )
+ self.Entity:SetMoveType( MOVETYPE_VPHYSICS )
+ self.Entity:SetSolid( SOLID_VPHYSICS )
+ self.Entity:Activate()
+ local phys = self.Entity:GetPhysicsObject()
+ if (phys:IsValid()) then
+ phys:Wake()
+ phys:SetMass(100)
+ end
+ self.selfPos = self.Entity
+ self:SetUseType(SIMPLE_USE)
+end
+
+
+util.AddNetworkString("art_shipyard_open")
+util.AddNetworkString("art_shipyard_finalize")
+util.AddNetworkString("art_shipyard_close")
+
+function ENT:Use(a,c,u,v)
+ net.Start("art_shipyard_open")
+ net.WriteEntity(self)
+ net.Send(c)
+end
+
+net.Receive("art_shipyard_finalize",function(ln,ply)
+ print("Finalizing ship...")
+ local area = net.ReadEntity()
+ local name = net.ReadString()
+ print("Name will be", name)
+ print(area,area.Zone)
+ local zone = zones.List[area.Zone]
+ local bounds = zone.bounds
+ local allents = ents.FindInBox(bounds.mins,bounds.maxs)
+ duplicator.SetLocalPos( ply:GetPos())
+ local boat = duplicator.Copy(allents[1])
+ duplicator.SetLocalPos(Vector(0,0,0))
+ print("Got boat")
+ PrintTable(boat)
+end)
+
+scripted_ents.Register(ENT,"art_shipyardcontrol")
diff --git a/data/artery/global/art_workbench/cl_ent_workbench.lua b/data/artery/global/art_workbench/cl_ent_workbench.lua
index 8f4b722..7f30178 100644
--- a/data/artery/global/art_workbench/cl_ent_workbench.lua
+++ b/data/artery/global/art_workbench/cl_ent_workbench.lua
@@ -1,63 +1,63 @@
---[[
- Client stuff!
-]]
-local ENT = nrequire("sh_ent_workbench.lua")
-
-function ENT:Draw()
-
- self.Entity:DrawModel()
-
-end
-
-net.Receive("art_workbench_open",function()
- local who = net.ReadEntity()
- print("Opening sawhorse")
- local selectframe = vgui.Create("DFrame")
- selectframe:SetSize(ScrW()/2, ScrH()/2)
- selectframe:Center()
- selectframe:SetTitle("Sawhorse")
-
- local scroll = vgui.Create( "DScrollPanel",selectframe )
- scroll:Dock(FILL)
-
- local grid = vgui.Create( "DGrid", scroll )
- grid:SetPos( 10, 30 )
- grid:SetCols( 2 )
- grid:SetColWide( 200 )
- grid:SetRowHeight(100)
- grid:Dock(FILL)
-
- print("s.props is",ENT.props)
- PrintTable(ENT.props)
-
- for k,v in pairs(ENT.props) do
- local p = vgui.Create("DPanel")
- p:SetSize(200,100)
- --p:Dock(FILL)
- local but = vgui.Create("DModelPanel",p)
- but:SetModel(v.model)
- but:SetSize(100,100)
- but:Dock(LEFT)
- but.DoClick = function(self)
- net.Start("art_workbench_select")
- net.WriteString(k)
- net.WriteEntity(who)
- net.SendToServer()
- print("I want to make a ", k)
- end
- local label = vgui.Create("DLabel",p)
- label:SetSize(100,100)
- label:Dock(RIGHT)
- local costtbl = {}
- for k,v in pairs(v.reqs) do
- costtbl[#costtbl+1] = string.format("%10s : %5d", k, v)
- end
- label:SetText(string.format("%s\nCost:\n%s",k,table.concat(costtbl,"\n")))
- label:SetDark(true)
- grid:AddItem(p)
- end
-
- selectframe:MakePopup()
-end)
-
-scripted_ents.Register(ENT,"art_workbench")
+--[[
+ Client stuff!
+]]
+local ENT = nrequire("sh_ent_workbench.lua")
+
+function ENT:Draw()
+
+ self.Entity:DrawModel()
+
+end
+
+net.Receive("art_workbench_open",function()
+ local who = net.ReadEntity()
+ print("Opening sawhorse")
+ local selectframe = vgui.Create("DFrame")
+ selectframe:SetSize(ScrW()/2, ScrH()/2)
+ selectframe:Center()
+ selectframe:SetTitle("Sawhorse")
+
+ local scroll = vgui.Create( "DScrollPanel",selectframe )
+ scroll:Dock(FILL)
+
+ local grid = vgui.Create( "DGrid", scroll )
+ grid:SetPos( 10, 30 )
+ grid:SetCols( 2 )
+ grid:SetColWide( 200 )
+ grid:SetRowHeight(100)
+ grid:Dock(FILL)
+
+ print("s.props is",ENT.props)
+ PrintTable(ENT.props)
+
+ for k,v in pairs(ENT.props) do
+ local p = vgui.Create("DPanel")
+ p:SetSize(200,100)
+ --p:Dock(FILL)
+ local but = vgui.Create("DModelPanel",p)
+ but:SetModel(v.model)
+ but:SetSize(100,100)
+ but:Dock(LEFT)
+ but.DoClick = function(self)
+ net.Start("art_workbench_select")
+ net.WriteString(k)
+ net.WriteEntity(who)
+ net.SendToServer()
+ print("I want to make a ", k)
+ end
+ local label = vgui.Create("DLabel",p)
+ label:SetSize(100,100)
+ label:Dock(RIGHT)
+ local costtbl = {}
+ for k,v in pairs(v.reqs) do
+ costtbl[#costtbl+1] = string.format("%10s : %5d", k, v)
+ end
+ label:SetText(string.format("%s\nCost:\n%s",k,table.concat(costtbl,"\n")))
+ label:SetDark(true)
+ grid:AddItem(p)
+ end
+
+ selectframe:MakePopup()
+end)
+
+scripted_ents.Register(ENT,"art_workbench")
diff --git a/data/artery/global/art_workbench/sh_ent_workbench.lua b/data/artery/global/art_workbench/sh_ent_workbench.lua
index 4900d3e..7468a32 100644
--- a/data/artery/global/art_workbench/sh_ent_workbench.lua
+++ b/data/artery/global/art_workbench/sh_ent_workbench.lua
@@ -1,37 +1,37 @@
-if not nrequire then return end
-
-local ENT = {}
-
-ENT.Type = "anim"
-ENT.Base = "art_chest"
-ENT.PrintName = "art_sawhorse"
-ENT.Author = "Apickx"
-
-ENT.Spawnable = false
-ENT.AdminSpawnable = false
-
-local skil = nrequire("sh_skillcommon.lua")
-skil.RegisterSkill({"Crafting","Toolbuilding"})
-
-ENT.props = {
- ["Hammer"] = {
- model = "models/weapons/w_hammer.mdl",
- reqs = {
- ["Wood"] = 2,
- ["Iron"] = 1
- }
- },
- ["Nail"] = {
- model = "models/crossbow_bolt.mdl",
- reqs = {
- ["Copper"] = 1
- }
- },
- ["Paddle"] = {
- model = "models/weapons/w_hammer.mdl",
- reqs = {
- ["Wood"] = 4
- }
- }
-}
-return ENT
+if not nrequire then return end
+
+local ENT = {}
+
+ENT.Type = "anim"
+ENT.Base = "art_chest"
+ENT.PrintName = "art_sawhorse"
+ENT.Author = "Apickx"
+
+ENT.Spawnable = false
+ENT.AdminSpawnable = false
+
+local skil = nrequire("sh_skillcommon.lua")
+skil.RegisterSkill({"Crafting","Toolbuilding"})
+
+ENT.props = {
+ ["Hammer"] = {
+ model = "models/weapons/w_hammer.mdl",
+ reqs = {
+ ["Wood"] = 2,
+ ["Iron"] = 1
+ }
+ },
+ ["Nail"] = {
+ model = "models/crossbow_bolt.mdl",
+ reqs = {
+ ["Copper"] = 1
+ }
+ },
+ ["Paddle"] = {
+ model = "models/weapons/w_hammer.mdl",
+ reqs = {
+ ["Wood"] = 4
+ }
+ }
+}
+return ENT
diff --git a/data/artery/global/art_workbench/sv_ent_workbench.lua b/data/artery/global/art_workbench/sv_ent_workbench.lua
index 9ce7e0f..75d00a3 100644
--- a/data/artery/global/art_workbench/sv_ent_workbench.lua
+++ b/data/artery/global/art_workbench/sv_ent_workbench.lua
@@ -1,111 +1,111 @@
---[[
- This entity gives townies things to do
-]]
-if not nrequire then return end
-
-DEFINE_BASECLASS("art_chest") -- this defined a local variable called BaseClass
-
-AddCSLuaFile( "cl_init.lua" )
-AddCSLuaFile( "shared.lua" )
-
-print("Hello from art_workbench init.lua!")
-
-local ENT = nrequire("sh_ent_workbench.lua")
-local inv = nrequire("core/inventory/inventory.lua")
-local itm = nrequire("core/inventory/item.lua")
-
-function ENT:Initialize( )
- self.InvType = "Crafting Inventory"
- BaseClass.Initialize(self)
- timer.Simple(0.1,function()
- self.data.inventories[self:GetCreationID()].accepts = {
- ["Wood"] = true,
- ["Copper"] = true,
- ["Iron"] = true
- }
- end)
- self.Entity:SetModel("models/props/cs_militia/sawhorse.mdl")
- self.Entity:PhysicsInit( SOLID_VPHYSICS )
- self.Entity:SetMoveType( MOVETYPE_VPHYSICS )
- self.Entity:SetSolid( SOLID_VPHYSICS )
- self.Entity:Activate()
- local phys = self.Entity:GetPhysicsObject()
- if (phys:IsValid()) then
- phys:Wake()
- phys:SetMass(100)
- end
- self.selfPos = self.Entity
- self:SetUseType(SIMPLE_USE)
-end
-
-
-util.AddNetworkString("art_workbench_open")
-util.AddNetworkString("art_workbench_select")
-util.AddNetworkString("art_workbench_puzzle")
-util.AddNetworkString("art_workbench_put")
-util.AddNetworkString("art_workbench_close")
-
-function ENT:Use(a,c,u,v)
- net.Start("art_workbench_open")
- net.WriteEntity(self)
- net.Send(c)
- BaseClass.Use(self,a,c,u,v)
-end
-
-function ENT:NumOf(name)
- local myinv = self.data.inventories[self:GetCreationID()]
- local cursor = myinv:Has(name)
- local titm = nil
- local num = 0
- while cursor ~= nil do
- titm = myinv:Remove(cursor)
- num = num + 1
- cursor = myinv:Has(name)
- end
- --Put stuff back in
- for i = 1,num do
- if titm ~= nil then
- local pos = myinv:FindPlaceFor(titm)
- myinv:Put(pos,titm)
- end
- end
-
- return num
-end
-
-net.Receive("art_workbench_select",function(ln,ply)
- local name = net.ReadString()
- local who = net.ReadEntity()
- print("props are:")
- PrintTable(s.props)
- assert(s.props[name],"Player " .. ply:Nick() .. " tried to make a prop we don't have:" .. name)
- local reqs = s.props[name].reqs
- print("player wanted to make a ",name,reqs)
- PrintTable(reqs)
- local canmake = true
- for k,v in pairs(reqs) do
- if who:NumOf(k) < v then
- canmake = false
- break
- end
- end
-
- local myinv = who.data.inventories[who:GetCreationID()]
- if canmake then
- print("Player can make, giveing")
- xpcall(function()
- ply:GiveItem(itm.GetItemByName(name))
- ply:AddSkill("Toolbuilding",#reqs)
- for k,v in pairs(reqs) do
- for i = 1,v do
- local cur = myinv:Has(k)
- myinv:Remove(cur)
- end
- end
- end,function(err)
- Msg("Failed to insert:" .. err)
- end)
- end
-end)
-
-scripted_ents.Register(ENT,"art_workbench")
+--[[
+ This entity gives townies things to do
+]]
+if not nrequire then return end
+
+DEFINE_BASECLASS("art_chest") -- this defined a local variable called BaseClass
+
+AddCSLuaFile( "cl_init.lua" )
+AddCSLuaFile( "shared.lua" )
+
+print("Hello from art_workbench init.lua!")
+
+local ENT = nrequire("sh_ent_workbench.lua")
+local inv = nrequire("core/inventory/inventory.lua")
+local itm = nrequire("core/inventory/item.lua")
+
+function ENT:Initialize( )
+ self.InvType = "Crafting Inventory"
+ BaseClass.Initialize(self)
+ timer.Simple(0.1,function()
+ self.data.inventories[self:GetCreationID()].accepts = {
+ ["Wood"] = true,
+ ["Copper"] = true,
+ ["Iron"] = true
+ }
+ end)
+ self.Entity:SetModel("models/props/cs_militia/sawhorse.mdl")
+ self.Entity:PhysicsInit( SOLID_VPHYSICS )
+ self.Entity:SetMoveType( MOVETYPE_VPHYSICS )
+ self.Entity:SetSolid( SOLID_VPHYSICS )
+ self.Entity:Activate()
+ local phys = self.Entity:GetPhysicsObject()
+ if (phys:IsValid()) then
+ phys:Wake()
+ phys:SetMass(100)
+ end
+ self.selfPos = self.Entity
+ self:SetUseType(SIMPLE_USE)
+end
+
+
+util.AddNetworkString("art_workbench_open")
+util.AddNetworkString("art_workbench_select")
+util.AddNetworkString("art_workbench_puzzle")
+util.AddNetworkString("art_workbench_put")
+util.AddNetworkString("art_workbench_close")
+
+function ENT:Use(a,c,u,v)
+ net.Start("art_workbench_open")
+ net.WriteEntity(self)
+ net.Send(c)
+ BaseClass.Use(self,a,c,u,v)
+end
+
+function ENT:NumOf(name)
+ local myinv = self.data.inventories[self:GetCreationID()]
+ local cursor = myinv:Has(name)
+ local titm = nil
+ local num = 0
+ while cursor ~= nil do
+ titm = myinv:Remove(cursor)
+ num = num + 1
+ cursor = myinv:Has(name)
+ end
+ --Put stuff back in
+ for i = 1,num do
+ if titm ~= nil then
+ local pos = myinv:FindPlaceFor(titm)
+ myinv:Put(pos,titm)
+ end
+ end
+
+ return num
+end
+
+net.Receive("art_workbench_select",function(ln,ply)
+ local name = net.ReadString()
+ local who = net.ReadEntity()
+ print("props are:")
+ PrintTable(s.props)
+ assert(s.props[name],"Player " .. ply:Nick() .. " tried to make a prop we don't have:" .. name)
+ local reqs = s.props[name].reqs
+ print("player wanted to make a ",name,reqs)
+ PrintTable(reqs)
+ local canmake = true
+ for k,v in pairs(reqs) do
+ if who:NumOf(k) < v then
+ canmake = false
+ break
+ end
+ end
+
+ local myinv = who.data.inventories[who:GetCreationID()]
+ if canmake then
+ print("Player can make, giveing")
+ xpcall(function()
+ ply:GiveItem(itm.GetItemByName(name))
+ ply:AddSkill("Toolbuilding",#reqs)
+ for k,v in pairs(reqs) do
+ for i = 1,v do
+ local cur = myinv:Has(k)
+ myinv:Remove(cur)
+ end
+ end
+ end,function(err)
+ Msg("Failed to insert:" .. err)
+ end)
+ end
+end)
+
+scripted_ents.Register(ENT,"art_workbench")
diff --git a/data/artery/global/cl_crafting_inv.lua b/data/artery/global/cl_crafting_inv.lua
index ead7c3e..6a61208 100644
--- a/data/artery/global/cl_crafting_inv.lua
+++ b/data/artery/global/cl_crafting_inv.lua
@@ -1,3 +1,3 @@
---[[
- The client part
-]]
+--[[
+ The client part
+]]
diff --git a/data/artery/global/sh_chopwood.txt b/data/artery/global/sh_chopwood.txt
index 46e2c07..854bc92 100644
--- a/data/artery/global/sh_chopwood.txt
+++ b/data/artery/global/sh_chopwood.txt
@@ -5,6 +5,15 @@ local itm = nrequire("item.lua")
local skil = nrequire("sh_skillcommon.lua")
skil.RegisterSkill({"Forageing","Woodcutting"})
+local matmap = {
+ [0] = "materials/svg/delapouite/originals/svg/000000/transparent/log.svg",
+ "materials/svg/lorc/originals/svg/000000/transparent/root-tip.svg",
+ "materials/svg/lorc/originals/svg/000000/transparent/oak.svg",
+ "materials/svg/lorc/originals/svg/000000/transparent/pine-tree.svg",
+ "materials/svg/lorc/originals/svg/000000/transparent/dead-wood.svg",
+
+}
+
local function isoutside(puzzle,width,height,position) --rewrite this at some point
print("Checking ",width,height,position)
PrintTable(puzzle)
@@ -19,6 +28,10 @@ if SERVER then
util.AddNetworkString("artery_chop_wood_start")
util.AddNetworkString("artery_chop_wood_quit")
util.AddNetworkString("artery_chop_wood_action")
+ for k,v in pairs(matmap) do
+ resource.AddSingleFile(v)
+ end
+
function puzzlefactory(width,height,veriety)
local puzzle = {}
local height,width = 4,4
diff --git a/data/artery/global/sh_crafting_inv.lua b/data/artery/global/sh_crafting_inv.lua
index d720551..0514ba0 100644
--- a/data/artery/global/sh_crafting_inv.lua
+++ b/data/artery/global/sh_crafting_inv.lua
@@ -1,193 +1,193 @@
---[[
- An inventory that accepts materials and can store 100's of them.
-]]
---[[
- Public functions:
- RegisterInventory(tbl_inventory) ::nil
- Registers a new inventory prototype, see below
- CreateInventory(string_name) ::table_inventory
- Creates a new inventory be sure to set the .owner and .id fields!
- CreateInventoryFromData(string_name,string_data)::table_inventory)
- Just deserializes an inventory. You still need to set .owner and .id!
- DeriveInventory(string_name) ::table_inventory
- Creates a new inventory from an old, allows for heiarchy.
- Inventories have the following structure
- field returns
- inv.Name ::string
- The name!
- inv:FindPlaceFor(item) ::table_position or nil
- Finds a place for the item
- inv:CanFitIn(table_position,item) ::boolean
- Check if the item can fit in the position
- inv:Put(table_position,item) ::nil
- Put an item in at the position
- inv:Has(string_or_compare_func) ::table_position or nil
- find an item in the inventory
- inv:Remove(position) ::table_item
- Remove an item from the position
- inv:Get(position) ::table_item
- Get the item at a position
- inv:Serialize() ::string
- Serialize the item to store it in a db
- inv:DeSerialize(str) ::table_inventory
- recreate the item from data in serialize
- The above fields must be defined for new inventories.
- -----------------------------------------------------
- The below are automatically made if they do not exist.
- inv:AddObserver(tbl_other) ::number_id Whenever put or remove is called on this inventory, tbl_other's put() and remove() is also called, for easy networking to whoever needs it
- inv:RemoveObserver(number_id) ::nil Removes an observer from the inventory
- ------------------------------------------------------
- These fields should be defined when an inventory is created, before it can be used
- inv.Owner ::entity
- inv.id ::number
-]]
-if not nrequire then return end
-local reg = nrequire("core/inventory/inventory.lua")
-local itm = nrequire("core/inventory/item.lua")
-local i = {}
-
-i.Name = "Crafting Inventory"
-i.materials = {}
-i.accepts = {}
-
-function i:FindPlaceFor(item)
- if not self.accepts[item.Name] then return nil end
- return {item.Name}
-end
-
-function i:CanFitIn(position,item)
- return self.accepts[item.Name]
-end
-
-function i:Put(pos,item)
- self.materials[item.Name] = (self.materials[item.Name] or 0) + 1
-end
-
-function i:Has(str_or_cmp)
- if type(str_or_cmp) == "function" then error("Tried to check has of a workbench with function") end
- if (self.materials[str_or_cmp] or 0) > 0 then
- return {str_or_cmp}
- else
- return nil
- end
-end
-
-function i:Remove(tbl)
- local ret = itm.GetItemByName(tbl[1])
- assert(self.materials[ tbl[1] ] > 0, "Tried to remove a resource when we didn't have any!")
- self.materials[ tbl[1] ] = self.materials[ tbl[1] ] - 1
- return ret
-end
-
-function i:Get(tbl)
- return itm.GetItemByName(tbl[1])
-end
-
-function i:Serialize()
- local s = {
- materials = self.materials,
- accepts = self.accepts
- }
- return util.TableToJSON(s)
-end
-
-function i:DeSerialize(data)
- local cpy = table.Copy(self)
- local d = util.JSONToTable(data)
- cpy.materials = d.materials
- cpy.accepts = d.accepts
- return cpy
-end
-
-if CLIENT then
- local svg = nrequire("cl_svg.lua")
- local com = nrequire("cl_common.lua")
- local col = nrequire("colortheme.lua")
- local c = col.ui.border
- local inputimg = svg.MaterialFromSVG("materials/svg/delapouite/gui/svg/000000/transparent/plain-arrow.svg", nil, ucol)
-
- function i.DrawOnDPanel(self,dpanel)
- local matpnls = {}
- local matscroll = vgui.Create("DScrollPanel",dpanel)
- matscroll:Dock(FILL)
-
- local inputpnl = vgui.Create("DModelPanel",dpanel)
- --inputpnl:Dock(TOP)
- inputpnl.PaintOver = function(tp,w,h)
- if inputimg.material then
- surface.SetDrawColor(c.r,c.g,c.b)
- surface.DrawOutlinedRect(0, 0, h, h)
- surface.SetDrawColor(255,255,255)
- surface.SetMaterial( inputimg.material )
- surface.DrawTexturedRect( 0, 0, h, h )
- end
- end
- inputpnl:Receiver("item",com.generatereceiver())
- inputpnl:SetSize(50,50)
- inputpnl.info = {
- owner = self.Owner,
- id = self.id,
- pos = {"*"},
- inv = self
- }
- inputpnl:Dock(TOP)
-
- local function create_panel(k,v)
- local pnlitem = {}
- pnlitem.panel = vgui.Create("DPanel",matscroll)
- pnlitem.panel:Dock(TOP)
- pnlitem.text = vgui.Create("DLabel",pnlitem.panel)
- pnlitem.text:SetText(string.format("%10s : %5d",k,v - 1))
- pnlitem.text:Dock(FILL)
- pnlitem.text:SetDark(true)
- local ta = vgui.Create("DModelPanel",pnlitem.panel)
- ta:Dock(LEFT)
- ta:Droppable("item")
- ta.info = {
- owner = self.Owner,
- id = self.id,
- pos = {k},
- inv = self
- }
- matpnls[k] = pnlitem
- end
-
- for k,v in pairs(self.materials) do
- if v > 0 then
- create_panel(k,v)
- end
- end
-
- local function refresh_ammt(name,p)
- local pnlitem = matpnls[ name ]
- local ammt = self.materials[name]
- if ammt == 0 or ammt == nil then
- pnlitem.panel:Remove()
- else
- pnlitem.text:SetText(string.format("%10s : %5d",name,ammt)) --Called before the actual inventorie's put, so +1
- end
- end
-
- local observer = {}
- observer.Put = function(obs,position,item)
- if self.materials[ item.Name ] == nil or self.materials[ item.Name ] == 0 then --Create a panel for the item
- create_panel(item.Name,1)
- else
- refresh_ammt(item.Name,1)
- end
- --matslbls[ position[1] ]:SetText(self.materials[ position[1] ])
- --drawitemat(self,position[1],position[2],item)
- end
- observer.Remove = function(obs,position)
- if self.materials[position[1]] == 1 then --Remove at 1 since this is called before inventory's remove()
- matpnls[position[1]].panel:Remove()
- end
- refresh_ammt(position[1],-1)
- --matslbls[ position[1] ]:SetText(self.materials[ position[1] ])
- --undrawitemat(self,position[1],position[2])
- end
- return observer
- end
-end
-
-reg.RegisterInventory(i)
+--[[
+ An inventory that accepts materials and can store 100's of them.
+]]
+--[[
+ Public functions:
+ RegisterInventory(tbl_inventory) ::nil
+ Registers a new inventory prototype, see below
+ CreateInventory(string_name) ::table_inventory
+ Creates a new inventory be sure to set the .owner and .id fields!
+ CreateInventoryFromData(string_name,string_data)::table_inventory)
+ Just deserializes an inventory. You still need to set .owner and .id!
+ DeriveInventory(string_name) ::table_inventory
+ Creates a new inventory from an old, allows for heiarchy.
+ Inventories have the following structure
+ field returns
+ inv.Name ::string
+ The name!
+ inv:FindPlaceFor(item) ::table_position or nil
+ Finds a place for the item
+ inv:CanFitIn(table_position,item) ::boolean
+ Check if the item can fit in the position
+ inv:Put(table_position,item) ::nil
+ Put an item in at the position
+ inv:Has(string_or_compare_func) ::table_position or nil
+ find an item in the inventory
+ inv:Remove(position) ::table_item
+ Remove an item from the position
+ inv:Get(position) ::table_item
+ Get the item at a position
+ inv:Serialize() ::string
+ Serialize the item to store it in a db
+ inv:DeSerialize(str) ::table_inventory
+ recreate the item from data in serialize
+ The above fields must be defined for new inventories.
+ -----------------------------------------------------
+ The below are automatically made if they do not exist.
+ inv:AddObserver(tbl_other) ::number_id Whenever put or remove is called on this inventory, tbl_other's put() and remove() is also called, for easy networking to whoever needs it
+ inv:RemoveObserver(number_id) ::nil Removes an observer from the inventory
+ ------------------------------------------------------
+ These fields should be defined when an inventory is created, before it can be used
+ inv.Owner ::entity
+ inv.id ::number
+]]
+if not nrequire then return end
+local reg = nrequire("core/inventory/inventory.lua")
+local itm = nrequire("core/inventory/item.lua")
+local i = {}
+
+i.Name = "Crafting Inventory"
+i.materials = {}
+i.accepts = {}
+
+function i:FindPlaceFor(item)
+ if not self.accepts[item.Name] then return nil end
+ return {item.Name}
+end
+
+function i:CanFitIn(position,item)
+ return self.accepts[item.Name]
+end
+
+function i:Put(pos,item)
+ self.materials[item.Name] = (self.materials[item.Name] or 0) + 1
+end
+
+function i:Has(str_or_cmp)
+ if type(str_or_cmp) == "function" then error("Tried to check has of a workbench with function") end
+ if (self.materials[str_or_cmp] or 0) > 0 then
+ return {str_or_cmp}
+ else
+ return nil
+ end
+end
+
+function i:Remove(tbl)
+ local ret = itm.GetItemByName(tbl[1])
+ assert(self.materials[ tbl[1] ] > 0, "Tried to remove a resource when we didn't have any!")
+ self.materials[ tbl[1] ] = self.materials[ tbl[1] ] - 1
+ return ret
+end
+
+function i:Get(tbl)
+ return itm.GetItemByName(tbl[1])
+end
+
+function i:Serialize()
+ local s = {
+ materials = self.materials,
+ accepts = self.accepts
+ }
+ return util.TableToJSON(s)
+end
+
+function i:DeSerialize(data)
+ local cpy = table.Copy(self)
+ local d = util.JSONToTable(data)
+ cpy.materials = d.materials
+ cpy.accepts = d.accepts
+ return cpy
+end
+
+if CLIENT then
+ local svg = nrequire("cl_svg.lua")
+ local com = nrequire("cl_common.lua")
+ local col = nrequire("colortheme.lua")
+ local c = col.ui.border
+ local inputimg = svg.MaterialFromSVG("materials/svg/delapouite/gui/svg/000000/transparent/plain-arrow.svg", nil, ucol)
+
+ function i.DrawOnDPanel(self,dpanel)
+ local matpnls = {}
+ local matscroll = vgui.Create("DScrollPanel",dpanel)
+ matscroll:Dock(FILL)
+
+ local inputpnl = vgui.Create("DModelPanel",dpanel)
+ --inputpnl:Dock(TOP)
+ inputpnl.PaintOver = function(tp,w,h)
+ if inputimg.material then
+ surface.SetDrawColor(c.r,c.g,c.b)
+ surface.DrawOutlinedRect(0, 0, h, h)
+ surface.SetDrawColor(255,255,255)
+ surface.SetMaterial( inputimg.material )
+ surface.DrawTexturedRect( 0, 0, h, h )
+ end
+ end
+ inputpnl:Receiver("item",com.generatereceiver())
+ inputpnl:SetSize(50,50)
+ inputpnl.info = {
+ owner = self.Owner,
+ id = self.id,
+ pos = {"*"},
+ inv = self
+ }
+ inputpnl:Dock(TOP)
+
+ local function create_panel(k,v)
+ local pnlitem = {}
+ pnlitem.panel = vgui.Create("DPanel",matscroll)
+ pnlitem.panel:Dock(TOP)
+ pnlitem.text = vgui.Create("DLabel",pnlitem.panel)
+ pnlitem.text:SetText(string.format("%10s : %5d",k,v - 1))
+ pnlitem.text:Dock(FILL)
+ pnlitem.text:SetDark(true)
+ local ta = vgui.Create("DModelPanel",pnlitem.panel)
+ ta:Dock(LEFT)
+ ta:Droppable("item")
+ ta.info = {
+ owner = self.Owner,
+ id = self.id,
+ pos = {k},
+ inv = self
+ }
+ matpnls[k] = pnlitem
+ end
+
+ for k,v in pairs(self.materials) do
+ if v > 0 then
+ create_panel(k,v)
+ end
+ end
+
+ local function refresh_ammt(name,p)
+ local pnlitem = matpnls[ name ]
+ local ammt = self.materials[name]
+ if ammt == 0 or ammt == nil then
+ pnlitem.panel:Remove()
+ else
+ pnlitem.text:SetText(string.format("%10s : %5d",name,ammt)) --Called before the actual inventorie's put, so +1
+ end
+ end
+
+ local observer = {}
+ observer.Put = function(obs,position,item)
+ if self.materials[ item.Name ] == nil or self.materials[ item.Name ] == 0 then --Create a panel for the item
+ create_panel(item.Name,1)
+ else
+ refresh_ammt(item.Name,1)
+ end
+ --matslbls[ position[1] ]:SetText(self.materials[ position[1] ])
+ --drawitemat(self,position[1],position[2],item)
+ end
+ observer.Remove = function(obs,position)
+ if self.materials[position[1]] == 1 then --Remove at 1 since this is called before inventory's remove()
+ matpnls[position[1]].panel:Remove()
+ end
+ refresh_ammt(position[1],-1)
+ --matslbls[ position[1] ]:SetText(self.materials[ position[1] ])
+ --undrawitemat(self,position[1],position[2])
+ end
+ return observer
+ end
+end
+
+reg.RegisterInventory(i)
diff --git a/data/artery/global/sh_minerock.txt b/data/artery/global/sh_minerock.txt
index 0e6bcaf..b73748b 100644
--- a/data/artery/global/sh_minerock.txt
+++ b/data/artery/global/sh_minerock.txt
@@ -47,7 +47,7 @@ local function findmatchesfortile(puzzle,x,y)
matches[#matches+1] = v
end
end
-
+
--Find verticle matches
local matchesverticle = 1
cursor = y + 1
@@ -94,39 +94,39 @@ local oremap = {
"materials/svg/faithtoken/originals/svg/000000/transparent/minerals.svg",
"materials/svg/delapouite/originals/svg/000000/transparent/stone-pile.svg",
"materials/svg/lorc/originals/svg/000000/transparent/fossil.svg"
-
+
}
if SERVER then
local itm = nrequire("item.lua")
-
+
for k,v in pairs(oremap) do
resource.AddSingleFile(v)
end
-
+
util.AddNetworkString("artery_mine_rock_start")
util.AddNetworkString("artery_mine_rock_new")
util.AddNetworkString("artery_mine_rock_quit")
util.AddNetworkString("artery_mine_rock_action")
util.AddNetworkString("artery_mine_rocks_update")
-
+
local function genpuzzle(width,height,variety)
local puzzle = {}
puzzle.width = width
puzzle.height = height
puzzle.variety = variety
puzzle.tiles = {}
-
+
for i = 0,puzzle.width do
puzzle.tiles[i] = {}
for j = 0,puzzle.height do
puzzle.tiles[i][j] = math.random(0,puzzle.variety)
end
end
-
+
return puzzle
end
-
+
local function del_and_replace(puzzle,matches)
local tp = puzzle.tiles
local function dropcolumn(x,y,spaces)
@@ -139,9 +139,9 @@ if SERVER then
dropcolumn(v[1],v[2],1)
end
end
-
-
-
+
+
+
local function findmatchesfor(puzzle)
local duped = {}
for i = 0, puzzle.width-1 do
@@ -165,7 +165,7 @@ if SERVER then
end
return m
end
-
+
local puzzles = {}
local scores = {}
function meta:MineRock()
@@ -182,11 +182,11 @@ if SERVER then
net.WriteTable(p)
net.Send(self)
end
-
+
local function kick_cheating_player(who)
error(who:Nick() .. " was cheating!")
end
-
+
net.Receive("artery_mine_rock_action",function(ln,ply)
local p = puzzles[ply]
local x1 = net.ReadUInt(8)
@@ -210,9 +210,9 @@ if SERVER then
net.WriteTable(p)
net.WriteDouble(scores[ply])
net.Send(ply)
- ply:StartAnimation("stranded_mine_rock")
+ --ply:StartAnimation("stranded_mine_rock")
end)
-
+
net.Receive("artery_mine_rock_quit",function(ln,ply)
local s = scores[ply]
local cursor = 1
@@ -224,7 +224,7 @@ if SERVER then
local togive = itm.GetItemByName(n)
ply:GiveItem(togive)
ply:AddSkill("Mineing",s)
- ply:StopAnimation("stranded_mine_rock")
+ ply:StopAnimation("stranded_mine_rocks")
end)
else
local svg = nrequire("cl_svg.lua")
@@ -254,34 +254,34 @@ else
net.Start("artery_mine_rock_quit")
net.SendToServer()
end
-
+
local puzzlepane = vgui.Create( "DPanel", puzzleview )
puzzlepane:Dock(FILL)
-
+
local help = vgui.Create("DLabel",puzzlepane)
help:SetText("Click two cells to switch them.\nCreate runs of 3 or more to clear them from the board\nNew numbers come in from the top\nQuit at any time to receive the resource you have worked towards.")
help:SetDark(true)
help:SizeToContents()
help:Dock(RIGHT)
-
+
local rocklayout = vgui.Create("DPanel",puzzlepane)
rocklayout:Dock(BOTTOM)
-
+
local rockprogress = vgui.Create( "DProgress",rocklayout )
rockprogress:Dock(FILL)
-
+
local rocknameleft = vgui.Create("DLabel",rocklayout)
rocknameleft:Dock(LEFT)
rocknameleft:SetDark(true)
rocknameleft:SetText("")
-
+
local rocknameright = vgui.Create("DLabel",rocklayout)
rocknameright:Dock(RIGHT)
rocknameright:SetDark(true)
rocknameright:SetText(rockdata[2][1])
-
+
rocks = {rockprogress,rocknameleft,rocknameright}
-
+
local puzzlegrid = vgui.Create( "DGrid", puzzlepane )
puzzlegrid:SetCols(tbl.width)
puzzlegrid:Dock(TOP)
@@ -307,6 +307,9 @@ else
self:SetMaterial(oremats[tbl.tiles[x][y]].material)
end
end
+ tile.Paint = function(self,w,h)
+
+ end
tile.DoClick = function(self)
if selected == nil then
selected = self
@@ -339,9 +342,9 @@ else
puzzlegrid:AddItem(tile)
end
end
-
+
end)
-
+
net.Receive("artery_mine_rocks_update",function()
tbl = net.ReadTable()
local score = net.ReadDouble()
@@ -367,5 +370,5 @@ else
end
end
end)
-
+
end
diff --git a/data/artery/global/sh_shipyard.txt b/data/artery/global/sh_shipyard.txt
index b29c63c..b2f9395 100644
--- a/data/artery/global/sh_shipyard.txt
+++ b/data/artery/global/sh_shipyard.txt
@@ -1,63 +1,63 @@
---[[
- A hunting ground zone will occasionally spawn a monster near a player that will go attack the player
-]]
-zones.RegisterClass("artery_shipyard",Color(238,238,255))
-
---Use this to set default properties. Only called on server.
-hook.Add("OnZoneCreated","artery_outpost",function(zone,class,zoneID)
- if class == "artery_shipyard" then
- zone.datatbl = {}
- zone.datatbl.control = ents.Create("art_shipyardcontrol")
- zone.datatbl.control:SetPos(Entity(1):GetPos())
- zone.datatbl.control:Spawn()
- zone.datatbl.control.Zone = zoneID
- end
-end)
-
--- Use this hook to let a player change a zone after making it or with the edit tool.
--- class is zone.class, zone is the zone's full table, DPanel is a panel to parent your things to, zoneID is the zone's ID, DFrame is the whole frame.
--- Return your preferred width and height for the panel and the frame will size to it.
-hook.Add("ShowZoneOptions","artery_shipyard",function(zone,class,DPanel,zoneID,DFrame)
- if class == "artery_shipyard" then
- local w,h = 500, 400
-
- local scroll = vgui.Create( "DScrollPanel",DPanel)
- scroll:Dock(FILL)
-
- function synctbl()
- net.Start("artery_shipyard_settbl")
- net.WriteFloat(zoneID)
- net.WriteTable(zone.datatbl)
- net.SendToServer()
- end
-
- print("Displaying table, my table is")
- PrintTable(zone.datatbl)
-
- local shipinstr = vgui.Create("DLabel",DPanel)
- shipinstr:Dock(TOP)
- shipinstr:SetText("Find the control entity, and palce it somewhere reasonable.")
- shipinstr:SetDark(true)
- shipinstr:SizeToContents()
-
- return w, h -- Specify the width and height for the DPanel container. The frame will resize accordingly.
-
- end
-end)
-
-if SERVER then
- util.AddNetworkString("artery_shipyard_settbl")
- net.Receive("artery_shipyard_settbl",function(len,ply)
- print("Server change received!")
- local id, new = net.ReadFloat(), net.ReadTable()
- print("New table is:")
- PrintTable(new)
- if not ply:IsAdmin() then return end
- local zone = zones.List[id]
- zone.datatbl = new
- if new.Name then
- zone.Name = new.Name
- end
- zones.Sync()
- end)
-end
+--[[
+ A hunting ground zone will occasionally spawn a monster near a player that will go attack the player
+]]
+zones.RegisterClass("artery_shipyard",Color(238,238,255))
+
+--Use this to set default properties. Only called on server.
+hook.Add("OnZoneCreated","artery_outpost",function(zone,class,zoneID)
+ if class == "artery_shipyard" then
+ zone.datatbl = {}
+ zone.datatbl.control = ents.Create("art_shipyardcontrol")
+ zone.datatbl.control:SetPos(Entity(1):GetPos())
+ zone.datatbl.control:Spawn()
+ zone.datatbl.control.Zone = zoneID
+ end
+end)
+
+-- Use this hook to let a player change a zone after making it or with the edit tool.
+-- class is zone.class, zone is the zone's full table, DPanel is a panel to parent your things to, zoneID is the zone's ID, DFrame is the whole frame.
+-- Return your preferred width and height for the panel and the frame will size to it.
+hook.Add("ShowZoneOptions","artery_shipyard",function(zone,class,DPanel,zoneID,DFrame)
+ if class == "artery_shipyard" then
+ local w,h = 500, 400
+
+ local scroll = vgui.Create( "DScrollPanel",DPanel)
+ scroll:Dock(FILL)
+
+ function synctbl()
+ net.Start("artery_shipyard_settbl")
+ net.WriteFloat(zoneID)
+ net.WriteTable(zone.datatbl)
+ net.SendToServer()
+ end
+
+ print("Displaying table, my table is")
+ PrintTable(zone.datatbl)
+
+ local shipinstr = vgui.Create("DLabel",DPanel)
+ shipinstr:Dock(TOP)
+ shipinstr:SetText("Find the control entity, and palce it somewhere reasonable.")
+ shipinstr:SetDark(true)
+ shipinstr:SizeToContents()
+
+ return w, h -- Specify the width and height for the DPanel container. The frame will resize accordingly.
+
+ end
+end)
+
+if SERVER then
+ util.AddNetworkString("artery_shipyard_settbl")
+ net.Receive("artery_shipyard_settbl",function(len,ply)
+ print("Server change received!")
+ local id, new = net.ReadFloat(), net.ReadTable()
+ print("New table is:")
+ PrintTable(new)
+ if not ply:IsAdmin() then return end
+ local zone = zones.List[id]
+ zone.datatbl = new
+ if new.Name then
+ zone.Name = new.Name
+ end
+ zones.Sync()
+ end)
+end
diff --git a/data/artery/global/sv_config.txt b/data/artery/global/sv_config.txt
index 30efdc3..3f3e40b 100644
--- a/data/artery/global/sv_config.txt
+++ b/data/artery/global/sv_config.txt
@@ -1,10 +1,10 @@
-do return end
-if not nrequire then return end
-local n = nrequire("sv_newplayer.lua")
-
-n.newmeta = function()
- return {
- lastserver = "67.163.245.187:27015",
- lastlocation = "175 325 524"
- }
-end
+do return end
+if not nrequire then return end
+local n = nrequire("sv_newplayer.lua")
+
+n.newmeta = function()
+ return {
+ lastserver = "67.163.245.187:27015",
+ lastlocation = "175 325 524"
+ }
+end
diff --git a/data/artery/global/sv_dupboat.lua b/data/artery/global/sv_dupboat.lua
index 1a32d0c..df613f6 100644
--- a/data/artery/global/sv_dupboat.lua
+++ b/data/artery/global/sv_dupboat.lua
@@ -1,38 +1,38 @@
-if not nrequire then return end
-duplicator.Allow("prop_physics")
-
-local dups = {}
-
-local function copyplayer(ply,cmd,args)
- local tr = util.TraceLine({
- start = ply:GetPos(),
- endpos = ply:GetPos() + Vector(0,0,-100),
- })
- local ent = tr.Entity
- print('Ent is', ent)
- duplicator.SetLocalPos( ply:GetPos())
- local dup = duplicator.Copy(ent)
- duplicator.SetLocalPos(Vector(0,0,0))
- print("After normalizing, dup was")
- PrintTable(dup)
- dups[args[1]] = dup
- print("saved boat as", args[1])
-end
-
-local function pasteplayer(ply,cmd,args)
- print("Pasteing ", args[1])
- local dup = dups[args[1]]
- print("Before setting up under player, dup is")
- PrintTable(dup)
- for k,v in pairs(dup.Entities) do
- v.Pos = v.Pos + ply:GetPos()
- end
- print("After setting up under player, dup is")
- PrintTable(dup)
- duplicator.SetLocalPos( ply:GetPos())
- duplicator.Paste(ply,dup.Entities, dup.Constraints)
- duplicator.SetLocalPos(Vector(0,0,0))
-end
-
-concommand.Add("artery_copyboat",copyplayer)
-concommand.Add("artery_pasteboat",pasteplayer)
+if not nrequire then return end
+duplicator.Allow("prop_physics")
+
+local dups = {}
+
+local function copyplayer(ply,cmd,args)
+ local tr = util.TraceLine({
+ start = ply:GetPos(),
+ endpos = ply:GetPos() + Vector(0,0,-100),
+ })
+ local ent = tr.Entity
+ print('Ent is', ent)
+ duplicator.SetLocalPos( ply:GetPos())
+ local dup = duplicator.Copy(ent)
+ duplicator.SetLocalPos(Vector(0,0,0))
+ print("After normalizing, dup was")
+ PrintTable(dup)
+ dups[args[1]] = dup
+ print("saved boat as", args[1])
+end
+
+local function pasteplayer(ply,cmd,args)
+ print("Pasteing ", args[1])
+ local dup = dups[args[1]]
+ print("Before setting up under player, dup is")
+ PrintTable(dup)
+ for k,v in pairs(dup.Entities) do
+ v.Pos = v.Pos + ply:GetPos()
+ end
+ print("After setting up under player, dup is")
+ PrintTable(dup)
+ duplicator.SetLocalPos( ply:GetPos())
+ duplicator.Paste(ply,dup.Entities, dup.Constraints)
+ duplicator.SetLocalPos(Vector(0,0,0))
+end
+
+concommand.Add("artery_copyboat",copyplayer)
+concommand.Add("artery_pasteboat",pasteplayer)
diff --git a/lua/autorun/animations.lua b/lua/autorun/animations.lua
index f8aae38..444782b 100644
--- a/lua/autorun/animations.lua
+++ b/lua/autorun/animations.lua
@@ -1,353 +1,353 @@
-hook.Add("OnGamemodeLoaded","artery_stranded_anims",function()
-RegisterLuaAnimation('stranded_chop_wood', {
- FrameData = {
- {
- BoneInfo = {
- ['ValveBiped.Bip01_R_Calf'] = {
- RU = 52.7383
- },
- ['ValveBiped.Bip01_R_Thigh'] = {
- RU = -45.5908,
- RR = 32.311,
- RF = 19.3292
- },
- ['ValveBiped.Bip01_Spine2'] = {
- RF = -12.8903
- },
- ['ValveBiped.Bip01_R_UpperArm'] = {
- RU = 4.6922,
- RR = 28.2239,
- RF = 95.649
- },
- ['ValveBiped.Bip01_Spine'] = {
- },
- ['ValveBiped.Bip01_R_Forearm'] = {
- RU = 6.7985,
- RR = -138.8409,
- RF = -3.6922
- },
- ['ValveBiped.Bip01_L_UpperArm'] = {
- RU = -118.8375,
- RR = 1.33,
- RF = -18.6262
- },
- ['ValveBiped.Bip01_L_Forearm'] = {
- RU = -54.1778,
- RR = 49.3891,
- RF = -17.4275
- },
- ['ValveBiped.Bip01_Spine1'] = {
- },
- ['ValveBiped.Bip01_L_Thigh'] = {
- RU = 17.8439,
- RR = -27.2881,
- RF = -66.1325
- },
- ['ValveBiped.Bip01_Spine4'] = {
- RF = -19.375
- },
- ['ValveBiped.Bip01_Pelvis'] = {
- MU = -6.2234
- },
- ['ValveBiped.Bip01_L_Calf'] = {
- RU = 0.1249,
- RR = 23.1365
- },
- ['ValveBiped.Bip01_L_Foot'] = {
- RU = 4.2748
- }
- },
- FrameRate = 1
- },
- {
- BoneInfo = {
- ['ValveBiped.Bip01_R_Calf'] = {
- RU = 52.7383
- },
- ['ValveBiped.Bip01_R_Thigh'] = {
- RU = -45.5908,
- RR = 32.311,
- RF = 19.3292
- },
- ['ValveBiped.Bip01_L_Foot'] = {
- RU = 4.2748
- },
- ['ValveBiped.Bip01_L_Calf'] = {
- RU = 0.1249,
- RR = 23.1365
- },
- ['ValveBiped.Bip01_Pelvis'] = {
- MU = -6.2234
- },
- ['ValveBiped.Bip01_L_Forearm'] = {
- RU = 14.726354797221,
- RR = 14.372249178086,
- RF = 67.254853315307
- },
- ['ValveBiped.Bip01_L_UpperArm'] = {
- RU = -118.55072559209,
- RR = -18.472382158172,
- RF = -25.571552996169
- },
- ['ValveBiped.Bip01_R_Forearm'] = {
- RU = 20.84833112133,
- RR = -44.285748284171,
- RF = 53.271771890186
- },
- ['ValveBiped.Bip01_Spine1'] = {
- RU = 7.0719397868016
- },
- ['ValveBiped.Bip01_L_Thigh'] = {
- RU = 17.8439,
- RR = -27.2881,
- RF = -66.1325
- },
- ['ValveBiped.Bip01_Spine4'] = {
- RU = 6.7183427974615,
- RF = 19.490397940959
- },
- ['ValveBiped.Bip01_Spine'] = {
- RU = 11.400272978762
- },
- ['ValveBiped.Bip01_Spine2'] = {
- RU = 6.3647458081214,
- RF = 11.644257572985
- },
- ['ValveBiped.Bip01_R_UpperArm'] = {
- RU = -107.25174221889,
- RR = 2.5677191930821,
- RF = 62.475625466013
- }
- },
- FrameRate = 10
- },
- {
- BoneInfo = {
- ['ValveBiped.Bip01_R_Calf'] = {
- RU = 52.7383
- },
- ['ValveBiped.Bip01_R_Thigh'] = {
- RU = -45.5908,
- RR = 32.311,
- RF = 19.3292
- },
- ['ValveBiped.Bip01_L_Foot'] = {
- RU = 4.2748
- },
- ['ValveBiped.Bip01_L_Calf'] = {
- RU = 0.1249,
- RR = 23.1365
- },
- ['ValveBiped.Bip01_Pelvis'] = {
- MU = -6.2234
- },
- ['ValveBiped.Bip01_L_Forearm'] = {
- RU = -54.1778,
- RR = 49.3891,
- RF = -17.4275
- },
- ['ValveBiped.Bip01_L_UpperArm'] = {
- RU = -118.8375,
- RR = 1.33,
- RF = -18.6262
- },
- ['ValveBiped.Bip01_R_Forearm'] = {
- RU = 6.7985,
- RR = -138.8409,
- RF = -3.6922
- },
- ['ValveBiped.Bip01_Spine1'] = {
- },
- ['ValveBiped.Bip01_L_Thigh'] = {
- RU = 17.8439,
- RR = -27.2881,
- RF = -66.1325
- },
- ['ValveBiped.Bip01_Spine4'] = {
- RF = -19.375
- },
- ['ValveBiped.Bip01_Spine'] = {
- },
- ['ValveBiped.Bip01_Spine2'] = {
- RF = -12.8903
- },
- ['ValveBiped.Bip01_R_UpperArm'] = {
- RU = 4.6922,
- RR = 28.2239,
- RF = 95.649
- }
- },
- FrameRate = 1
- }
- },
- RestartFrame = 2,
- Type = TYPE_SEQUENCE
-})
-
-RegisterLuaAnimation('stranded_mine_rocks', {
- FrameData = {
- {
- BoneInfo = {
- ['ValveBiped.Bip01_Spine2'] = {
- },
- ['ValveBiped.Bip01_L_Thigh'] = {
- },
- ['ValveBiped.Bip01_Head1'] = {
- RU = 16.3653
- },
- ['ValveBiped.Bip01_R_Clavicle'] = {
- },
- ['ValveBiped.Bip01_L_UpperArm'] = {
- RU = -169.4528,
- RR = -17.0857
- },
- ['ValveBiped.Bip01_Spine4'] = {
- },
- ['ValveBiped.Bip01_Pelvis'] = {
- },
- ['ValveBiped.Bip01_R_Hand'] = {
- },
- ['ValveBiped.Bip01_L_Calf'] = {
- },
- ['ValveBiped.Bip01_R_Forearm'] = {
- RU = 0.3663,
- RR = -23.8679
- },
- ['ValveBiped.Bip01_L_Clavicle'] = {
- },
- ['ValveBiped.Bip01_Spine1'] = {
- },
- ['ValveBiped.Bip01_Spine'] = {
- },
- ['ValveBiped.Bip01_R_Thigh'] = {
- },
- ['ValveBiped.Bip01_R_UpperArm'] = {
- RU = -160,
- RR = 16.6091,
- RF = -5.0659
- },
- ['ValveBiped.Bip01_L_Forearm'] = {
- RU = 13.9547,
- RR = 23.0274
- },
- ['ValveBiped.Bip01_R_Foot'] = {
- }
- },
- FrameRate = 1
- },
- {
- BoneInfo = {
- ['ValveBiped.Bip01_Spine2'] = {
- RU = 19.5945
- },
- ['ValveBiped.Bip01_L_Thigh'] = {
- RU = -25.9972,
- RR = -4.3907
- },
- ['ValveBiped.Bip01_Head1'] = {
- },
- ['ValveBiped.Bip01_R_Clavicle'] = {
- RF = 57.3827
- },
- ['ValveBiped.Bip01_R_UpperArm'] = {
- RU = 2.5616,
- RR = -11.5777
- },
- ['ValveBiped.Bip01_Spine4'] = {
- RU = 9.6885
- },
- ['ValveBiped.Bip01_Pelvis'] = {
- MU = -3.3808,
- RR = -11.3417
- },
- ['ValveBiped.Bip01_R_Hand'] = {
- RU = 26.3055,
- RR = -25.3824,
- RF = -7.8628
- },
- ['ValveBiped.Bip01_L_Calf'] = {
- RU = 25.0442
- },
- ['ValveBiped.Bip01_L_Forearm'] = {
- RR = 38.3937
- },
- ['ValveBiped.Bip01_L_Clavicle'] = {
- RU = 2.3203,
- RF = -38.6058
- },
- ['ValveBiped.Bip01_Spine1'] = {
- RU = 0.6215
- },
- ['ValveBiped.Bip01_Spine'] = {
- RU = 17.2787
- },
- ['ValveBiped.Bip01_R_Thigh'] = {
- RU = 19.0125
- },
- ['ValveBiped.Bip01_L_UpperArm'] = {
- RU = -29.9497,
- RR = -6.5064
- },
- ['ValveBiped.Bip01_R_Forearm'] = {
- RR = -33.6703
- },
- ['ValveBiped.Bip01_R_Foot'] = {
- RU = -17.9333
- }
- },
- FrameRate = 4
- },
- {
- BoneInfo = {
- ['ValveBiped.Bip01_Spine2'] = {
- },
- ['ValveBiped.Bip01_L_Thigh'] = {
- },
- ['ValveBiped.Bip01_Head1'] = {
- RU = 16.3653
- },
- ['ValveBiped.Bip01_L_Clavicle'] = {
- },
- ['ValveBiped.Bip01_R_UpperArm'] = {
- RU = -160,
- RR = 16.6091,
- RF = -5.0659
- },
- ['ValveBiped.Bip01_Spine4'] = {
- },
- ['ValveBiped.Bip01_Pelvis'] = {
- },
- ['ValveBiped.Bip01_R_Hand'] = {
- },
- ['ValveBiped.Bip01_L_Calf'] = {
- },
- ['ValveBiped.Bip01_R_Forearm'] = {
- RU = 0.3663,
- RR = -23.8679
- },
- ['ValveBiped.Bip01_R_Clavicle'] = {
- },
- ['ValveBiped.Bip01_Spine1'] = {
- },
- ['ValveBiped.Bip01_Spine'] = {
- },
- ['ValveBiped.Bip01_R_Thigh'] = {
- },
- ['ValveBiped.Bip01_L_UpperArm'] = {
- RU = -169.4528,
- RR = -17.0857
- },
- ['ValveBiped.Bip01_L_Forearm'] = {
- RU = 13.9547,
- RR = 23.0274
- },
- ['ValveBiped.Bip01_R_Foot'] = {
- }
- },
- FrameRate = 1
- }
- },
- RestartFrame = 2,
- Type = TYPE_STANCE
-})
-end)
+hook.Add("OnGamemodeLoaded","artery_stranded_anims",function()
+RegisterLuaAnimation('stranded_chop_wood', {
+ FrameData = {
+ {
+ BoneInfo = {
+ ['ValveBiped.Bip01_R_Calf'] = {
+ RU = 52.7383
+ },
+ ['ValveBiped.Bip01_R_Thigh'] = {
+ RU = -45.5908,
+ RR = 32.311,
+ RF = 19.3292
+ },
+ ['ValveBiped.Bip01_Spine2'] = {
+ RF = -12.8903
+ },
+ ['ValveBiped.Bip01_R_UpperArm'] = {
+ RU = 4.6922,
+ RR = 28.2239,
+ RF = 95.649
+ },
+ ['ValveBiped.Bip01_Spine'] = {
+ },
+ ['ValveBiped.Bip01_R_Forearm'] = {
+ RU = 6.7985,
+ RR = -138.8409,
+ RF = -3.6922
+ },
+ ['ValveBiped.Bip01_L_UpperArm'] = {
+ RU = -118.8375,
+ RR = 1.33,
+ RF = -18.6262
+ },
+ ['ValveBiped.Bip01_L_Forearm'] = {
+ RU = -54.1778,
+ RR = 49.3891,
+ RF = -17.4275
+ },
+ ['ValveBiped.Bip01_Spine1'] = {
+ },
+ ['ValveBiped.Bip01_L_Thigh'] = {
+ RU = 17.8439,
+ RR = -27.2881,
+ RF = -66.1325
+ },
+ ['ValveBiped.Bip01_Spine4'] = {
+ RF = -19.375
+ },
+ ['ValveBiped.Bip01_Pelvis'] = {
+ MU = -6.2234
+ },
+ ['ValveBiped.Bip01_L_Calf'] = {
+ RU = 0.1249,
+ RR = 23.1365
+ },
+ ['ValveBiped.Bip01_L_Foot'] = {
+ RU = 4.2748
+ }
+ },
+ FrameRate = 1
+ },
+ {
+ BoneInfo = {
+ ['ValveBiped.Bip01_R_Calf'] = {
+ RU = 52.7383
+ },
+ ['ValveBiped.Bip01_R_Thigh'] = {
+ RU = -45.5908,
+ RR = 32.311,
+ RF = 19.3292
+ },
+ ['ValveBiped.Bip01_L_Foot'] = {
+ RU = 4.2748
+ },
+ ['ValveBiped.Bip01_L_Calf'] = {
+ RU = 0.1249,
+ RR = 23.1365
+ },
+ ['ValveBiped.Bip01_Pelvis'] = {
+ MU = -6.2234
+ },
+ ['ValveBiped.Bip01_L_Forearm'] = {
+ RU = 14.726354797221,
+ RR = 14.372249178086,
+ RF = 67.254853315307
+ },
+ ['ValveBiped.Bip01_L_UpperArm'] = {
+ RU = -118.55072559209,
+ RR = -18.472382158172,
+ RF = -25.571552996169
+ },
+ ['ValveBiped.Bip01_R_Forearm'] = {
+ RU = 20.84833112133,
+ RR = -44.285748284171,
+ RF = 53.271771890186
+ },
+ ['ValveBiped.Bip01_Spine1'] = {
+ RU = 7.0719397868016
+ },
+ ['ValveBiped.Bip01_L_Thigh'] = {
+ RU = 17.8439,
+ RR = -27.2881,
+ RF = -66.1325
+ },
+ ['ValveBiped.Bip01_Spine4'] = {
+ RU = 6.7183427974615,
+ RF = 19.490397940959
+ },
+ ['ValveBiped.Bip01_Spine'] = {
+ RU = 11.400272978762
+ },
+ ['ValveBiped.Bip01_Spine2'] = {
+ RU = 6.3647458081214,
+ RF = 11.644257572985
+ },
+ ['ValveBiped.Bip01_R_UpperArm'] = {
+ RU = -107.25174221889,
+ RR = 2.5677191930821,
+ RF = 62.475625466013
+ }
+ },
+ FrameRate = 10
+ },
+ {
+ BoneInfo = {
+ ['ValveBiped.Bip01_R_Calf'] = {
+ RU = 52.7383
+ },
+ ['ValveBiped.Bip01_R_Thigh'] = {
+ RU = -45.5908,
+ RR = 32.311,
+ RF = 19.3292
+ },
+ ['ValveBiped.Bip01_L_Foot'] = {
+ RU = 4.2748
+ },
+ ['ValveBiped.Bip01_L_Calf'] = {
+ RU = 0.1249,
+ RR = 23.1365
+ },
+ ['ValveBiped.Bip01_Pelvis'] = {
+ MU = -6.2234
+ },
+ ['ValveBiped.Bip01_L_Forearm'] = {
+ RU = -54.1778,
+ RR = 49.3891,
+ RF = -17.4275
+ },
+ ['ValveBiped.Bip01_L_UpperArm'] = {
+ RU = -118.8375,
+ RR = 1.33,
+ RF = -18.6262
+ },
+ ['ValveBiped.Bip01_R_Forearm'] = {
+ RU = 6.7985,
+ RR = -138.8409,
+ RF = -3.6922
+ },
+ ['ValveBiped.Bip01_Spine1'] = {
+ },
+ ['ValveBiped.Bip01_L_Thigh'] = {
+ RU = 17.8439,
+ RR = -27.2881,
+ RF = -66.1325
+ },
+ ['ValveBiped.Bip01_Spine4'] = {
+ RF = -19.375
+ },
+ ['ValveBiped.Bip01_Spine'] = {
+ },
+ ['ValveBiped.Bip01_Spine2'] = {
+ RF = -12.8903
+ },
+ ['ValveBiped.Bip01_R_UpperArm'] = {
+ RU = 4.6922,
+ RR = 28.2239,
+ RF = 95.649
+ }
+ },
+ FrameRate = 1
+ }
+ },
+ RestartFrame = 2,
+ Type = TYPE_SEQUENCE
+})
+
+RegisterLuaAnimation('stranded_mine_rocks', {
+ FrameData = {
+ {
+ BoneInfo = {
+ ['ValveBiped.Bip01_Spine2'] = {
+ },
+ ['ValveBiped.Bip01_L_Thigh'] = {
+ },
+ ['ValveBiped.Bip01_Head1'] = {
+ RU = 16.3653
+ },
+ ['ValveBiped.Bip01_R_Clavicle'] = {
+ },
+ ['ValveBiped.Bip01_L_UpperArm'] = {
+ RU = -169.4528,
+ RR = -17.0857
+ },
+ ['ValveBiped.Bip01_Spine4'] = {
+ },
+ ['ValveBiped.Bip01_Pelvis'] = {
+ },
+ ['ValveBiped.Bip01_R_Hand'] = {
+ },
+ ['ValveBiped.Bip01_L_Calf'] = {
+ },
+ ['ValveBiped.Bip01_R_Forearm'] = {
+ RU = 0.3663,
+ RR = -23.8679
+ },
+ ['ValveBiped.Bip01_L_Clavicle'] = {
+ },
+ ['ValveBiped.Bip01_Spine1'] = {
+ },
+ ['ValveBiped.Bip01_Spine'] = {
+ },
+ ['ValveBiped.Bip01_R_Thigh'] = {
+ },
+ ['ValveBiped.Bip01_R_UpperArm'] = {
+ RU = -160,
+ RR = 16.6091,
+ RF = -5.0659
+ },
+ ['ValveBiped.Bip01_L_Forearm'] = {
+ RU = 13.9547,
+ RR = 23.0274
+ },
+ ['ValveBiped.Bip01_R_Foot'] = {
+ }
+ },
+ FrameRate = 1
+ },
+ {
+ BoneInfo = {
+ ['ValveBiped.Bip01_Spine2'] = {
+ RU = 19.5945
+ },
+ ['ValveBiped.Bip01_L_Thigh'] = {
+ RU = -25.9972,
+ RR = -4.3907
+ },
+ ['ValveBiped.Bip01_Head1'] = {
+ },
+ ['ValveBiped.Bip01_R_Clavicle'] = {
+ RF = 57.3827
+ },
+ ['ValveBiped.Bip01_R_UpperArm'] = {
+ RU = 2.5616,
+ RR = -11.5777
+ },
+ ['ValveBiped.Bip01_Spine4'] = {
+ RU = 9.6885
+ },
+ ['ValveBiped.Bip01_Pelvis'] = {
+ MU = -3.3808,
+ RR = -11.3417
+ },
+ ['ValveBiped.Bip01_R_Hand'] = {
+ RU = 26.3055,
+ RR = -25.3824,
+ RF = -7.8628
+ },
+ ['ValveBiped.Bip01_L_Calf'] = {
+ RU = 25.0442
+ },
+ ['ValveBiped.Bip01_L_Forearm'] = {
+ RR = 38.3937
+ },
+ ['ValveBiped.Bip01_L_Clavicle'] = {
+ RU = 2.3203,
+ RF = -38.6058
+ },
+ ['ValveBiped.Bip01_Spine1'] = {
+ RU = 0.6215
+ },
+ ['ValveBiped.Bip01_Spine'] = {
+ RU = 17.2787
+ },
+ ['ValveBiped.Bip01_R_Thigh'] = {
+ RU = 19.0125
+ },
+ ['ValveBiped.Bip01_L_UpperArm'] = {
+ RU = -29.9497,
+ RR = -6.5064
+ },
+ ['ValveBiped.Bip01_R_Forearm'] = {
+ RR = -33.6703
+ },
+ ['ValveBiped.Bip01_R_Foot'] = {
+ RU = -17.9333
+ }
+ },
+ FrameRate = 4
+ },
+ {
+ BoneInfo = {
+ ['ValveBiped.Bip01_Spine2'] = {
+ },
+ ['ValveBiped.Bip01_L_Thigh'] = {
+ },
+ ['ValveBiped.Bip01_Head1'] = {
+ RU = 16.3653
+ },
+ ['ValveBiped.Bip01_L_Clavicle'] = {
+ },
+ ['ValveBiped.Bip01_R_UpperArm'] = {
+ RU = -160,
+ RR = 16.6091,
+ RF = -5.0659
+ },
+ ['ValveBiped.Bip01_Spine4'] = {
+ },
+ ['ValveBiped.Bip01_Pelvis'] = {
+ },
+ ['ValveBiped.Bip01_R_Hand'] = {
+ },
+ ['ValveBiped.Bip01_L_Calf'] = {
+ },
+ ['ValveBiped.Bip01_R_Forearm'] = {
+ RU = 0.3663,
+ RR = -23.8679
+ },
+ ['ValveBiped.Bip01_R_Clavicle'] = {
+ },
+ ['ValveBiped.Bip01_Spine1'] = {
+ },
+ ['ValveBiped.Bip01_Spine'] = {
+ },
+ ['ValveBiped.Bip01_R_Thigh'] = {
+ },
+ ['ValveBiped.Bip01_L_UpperArm'] = {
+ RU = -169.4528,
+ RR = -17.0857
+ },
+ ['ValveBiped.Bip01_L_Forearm'] = {
+ RU = 13.9547,
+ RR = 23.0274
+ },
+ ['ValveBiped.Bip01_R_Foot'] = {
+ }
+ },
+ FrameRate = 1
+ }
+ },
+ RestartFrame = 2,
+ Type = TYPE_STANCE
+})
+end)
diff --git a/lua/autorun/server/init.lua b/lua/autorun/server/init.lua
index 71956ae..39e396f 100644
--- a/lua/autorun/server/init.lua
+++ b/lua/autorun/server/init.lua
@@ -1,11 +1,11 @@
-print("hello from artery_stranded init.lua")
-do return end
---for k,v in pairs(ents.FindByClass("trigger_teleport")) do v:Remove() end
-
-local config = nrequire("sv_newplayer.lua")
-config.newmeta = function()
- return {
- lastserver = "67.163.245.187:27015",
- lastlocation = "5699 -5191 131"
- }
-end
+print("hello from artery_stranded init.lua")
+do return end
+--for k,v in pairs(ents.FindByClass("trigger_teleport")) do v:Remove() end
+
+local config = nrequire("sv_newplayer.lua")
+config.newmeta = function()
+ return {
+ lastserver = "67.163.245.187:27015",
+ lastlocation = "5699 -5191 131"
+ }
+end
diff --git a/lua/autorun/zone_shipyard.lua b/lua/autorun/zone_shipyard.lua
new file mode 100644
index 0000000..b2f9395
--- /dev/null
+++ b/lua/autorun/zone_shipyard.lua
@@ -0,0 +1,63 @@
+--[[
+ A hunting ground zone will occasionally spawn a monster near a player that will go attack the player
+]]
+zones.RegisterClass("artery_shipyard",Color(238,238,255))
+
+--Use this to set default properties. Only called on server.
+hook.Add("OnZoneCreated","artery_outpost",function(zone,class,zoneID)
+ if class == "artery_shipyard" then
+ zone.datatbl = {}
+ zone.datatbl.control = ents.Create("art_shipyardcontrol")
+ zone.datatbl.control:SetPos(Entity(1):GetPos())
+ zone.datatbl.control:Spawn()
+ zone.datatbl.control.Zone = zoneID
+ end
+end)
+
+-- Use this hook to let a player change a zone after making it or with the edit tool.
+-- class is zone.class, zone is the zone's full table, DPanel is a panel to parent your things to, zoneID is the zone's ID, DFrame is the whole frame.
+-- Return your preferred width and height for the panel and the frame will size to it.
+hook.Add("ShowZoneOptions","artery_shipyard",function(zone,class,DPanel,zoneID,DFrame)
+ if class == "artery_shipyard" then
+ local w,h = 500, 400
+
+ local scroll = vgui.Create( "DScrollPanel",DPanel)
+ scroll:Dock(FILL)
+
+ function synctbl()
+ net.Start("artery_shipyard_settbl")
+ net.WriteFloat(zoneID)
+ net.WriteTable(zone.datatbl)
+ net.SendToServer()
+ end
+
+ print("Displaying table, my table is")
+ PrintTable(zone.datatbl)
+
+ local shipinstr = vgui.Create("DLabel",DPanel)
+ shipinstr:Dock(TOP)
+ shipinstr:SetText("Find the control entity, and palce it somewhere reasonable.")
+ shipinstr:SetDark(true)
+ shipinstr:SizeToContents()
+
+ return w, h -- Specify the width and height for the DPanel container. The frame will resize accordingly.
+
+ end
+end)
+
+if SERVER then
+ util.AddNetworkString("artery_shipyard_settbl")
+ net.Receive("artery_shipyard_settbl",function(len,ply)
+ print("Server change received!")
+ local id, new = net.ReadFloat(), net.ReadTable()
+ print("New table is:")
+ PrintTable(new)
+ if not ply:IsAdmin() then return end
+ local zone = zones.List[id]
+ zone.datatbl = new
+ if new.Name then
+ zone.Name = new.Name
+ end
+ zones.Sync()
+ end)
+end