summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--entities/entities/gms_bed.lua78
-rw-r--r--entities/entities/gms_campfire.lua75
-rw-r--r--gamemode/craftablesystem/misc/stove.lua2
3 files changed, 142 insertions, 13 deletions
diff --git a/entities/entities/gms_bed.lua b/entities/entities/gms_bed.lua
index 9ca5e86..7b7a87b 100644
--- a/entities/entities/gms_bed.lua
+++ b/entities/entities/gms_bed.lua
@@ -1,13 +1,85 @@
-
+--[[
+A useful command for createing structures.
+lua_run for k,v in pairs(ents.GetAll()) do if(v:GetClass() == "prop_physics") then print(v:GetModel()) print(v:GetPos()) print(v:GetAngles()) end end
+]]
AddCSLuaFile()
+--[[
+Some lua_run functions useful for finding props
+function offsetpos()
+ for k,v in pairs(ents.GetAll()) do
+ if(v:GetMaterial() == "models/wireframe") then
+ return v
+ end
+ end
+end
+
+function printprop(v,o)
+ print(v:GetModel())
+ print(v:GetPos() - o:GetPos())
+ print(v:GetAngles())
+end
+
+function printPropsStruct()
+ local o = offsetpos()
+ for k,v in pairs(ents.GetAll()) do
+ if(v:GetClass() == "prop_physics") then
+ printprop(v,o)
+ end
+ end
+end
+]]
ENT.Base = "gms_base_entity"
ENT.PrintName = "Bed"
-ENT.Model = "models/XQM/Rails/gumball_1.mdl"
+ENT.Model = "models/props_wasteland/laundry_washer003.mdl"
+ENT.VisParts = {
+ {
+ "models/props_c17/gravestone001a.mdl",
+ Vector(3.3, 1.5, -4.8),
+ Angle(-90,90,180),
+ },
+ {
+ "models/props_c17/gravestone001a.mdl",
+ Vector(3.6, 2.5, -5),
+ Angle(-90, -90, 180),
+ },
+ {
+ "models/props_c17/canister01a.mdl",
+ Vector(17.5, -41.6, -5),
+ Angle(0, 90, 180),
+ },
+ {
+ "models/props_c17/canister01a.mdl",
+ Vector(-12, -41.6, -5),
+ Angle(0, 90, -180),
+ },
+ {
+ "models/props_c17/playground_teetertoter_stan.mdl",
+ Vector(4.1, 45.8, -27),
+ Angle(0,0,0),
+ }
+}
if ( CLIENT ) then return end
+function ENT:OnInitialize()
+ self:SetAngles(Angle(0,90,0))
+ self:SetMaterial("models/wireframe")
+ self.Props = {}
+ PrintTable(self.VisParts)
+ for k,v in pairs(self.VisParts) do
+ local e = ents.Create("prop_physics")
+ e:SetModel(v[1])
+ e:SetPos(v[2] + self:GetPos())
+ e:SetAngles(v[3])
+ e:Spawn()
+ e:SetParent(self)
+ self.Props[k] = e
+ end
+
+end
+
function ENT:OnUse( ply )
- ply:ConCommand("gms_sleep")
+ ply:ConCommand("gms_sleep")
end
diff --git a/entities/entities/gms_campfire.lua b/entities/entities/gms_campfire.lua
index a3c27b4..776cfbc 100644
--- a/entities/entities/gms_campfire.lua
+++ b/entities/entities/gms_campfire.lua
@@ -5,24 +5,81 @@ AddCSLuaFile()
ENT.Base = "gms_base_entity"
ENT.PrintName = "Campfire"
-ENT.Model = "models/XQM/Rails/gumball_1.mdl"
-ENT.Burnproxy = nil
+ENT.Model = "models/hunter/blocks/cube1x1x05.mdl"
if ( CLIENT ) then return end
+ENT.VisParts = {
+ {
+ "models/props_debris/wood_chunk08b.mdl",
+ Vector(1.240417, 5.524837, -7.739258),
+ Angle(-89.377, -65.131, -82.987),
+ },
+ {
+ "models/props_debris/wood_chunk06d.mdl",
+ Vector(-0.861053, -7.099247, -3.869141),
+ Angle(-68.427, -61.634, -141.252),
+ },
+ {
+ "models/props_debris/wood_chunk02a.mdl",
+ Vector(-3.136078, 11.640522, -3.352539),
+ Angle(-62.440, 122.254, 1.722),
+ },
+ {
+ "models/props_debris/wood_chunk04d.mdl",
+ Vector(-12.100769, 3.301933, -0.352539),
+ Angle(-45.086, 67.079, -161.642),
+ },
+ {
+ "models/props_debris/wood_chunk02b.mdl",
+ Vector(-1.157349, -9.414154, -2.000000),
+ Angle(68.427, 118.366, 9.406),
+ },
+}
+--[[
+models/props_debris/wood_chunk08b.mdl
+1.240417 5.524837 -7.739258
+-89.377 -65.131 -82.987
+models/props_debris/wood_chunk06d.mdl
+-0.861053 -7.099247 -3.869141
+-68.427 -61.634 -141.252
+models/props_debris/wood_chunk02a.mdl
+-3.136078 11.640522 -3.352539
+-62.440 122.254 1.722
+models/props_debris/wood_chunk04d.mdl
+-12.100769 3.301933 -0.352539
+-45.086 67.079 -161.642
+models/props_debris/wood_chunk02b.mdl
+-1.157349 -9.414154 -2.000000
+68.427 118.366 9.406
+models/hunter/blocks/cube1x1x05.mdl
+0.000000 0.000000 0.000000
+0.010 -45.169 0.018
+models/props_debris/wood_chunk04d.mdl
+3.393311 17.393948 -3.345703
+58.830 -82.344 13.865
+
+]]
function ENT:OnInitialize()
self:SetModel( self.Model )
self:PhysicsInit( SOLID_VPHYSICS )
self:SetMoveType( MOVETYPE_NONE )
self:SetSolid( SOLID_VPHYSICS )
- self.Burnproxy = ents.Create("prop_physics")
- self.Burnproxy:SetModel("models/props_phx/construct/wood/wood_panel1x1.mdl")
- self.Burnproxy:Ignite(9999999)
- self.Burnproxy:SetPos(self:GetPos())
- self.Burnproxy:SetAngles(self:GetAngles())
- self.Burnproxy:SetColor(Color(0,0,0,0))
+ self:Ignite(9999999)
+ self:SetMaterial("models/wireframe")
+ self.Props = {}
+ PrintTable(self.VisParts)
+ for k,v in pairs(self.VisParts) do
+ local e = ents.Create("prop_physics")
+ e:SetModel(v[1])
+ e:SetPos(v[2] + self:GetPos())
+ e:SetAngles(v[3])
+ e:Spawn()
+ e:SetParent(self)
+ e:SetHealth(9999999)
+ self.Props[k] = e
+ end
--Removes everything after a little while
timer.Simple( 180, function()
- self.Burnproxy:Remove()
self:Remove()
end )
end
diff --git a/gamemode/craftablesystem/misc/stove.lua b/gamemode/craftablesystem/misc/stove.lua
index 14ccf40..4c908af 100644
--- a/gamemode/craftablesystem/misc/stove.lua
+++ b/gamemode/craftablesystem/misc/stove.lua
@@ -27,7 +27,7 @@ COMBI.Req["Wood"] = 15
COMBI.Results = "gms_campfire"
COMBI.Texture = "gms_icons/gms_stove.png"
-COMBI.BuildSiteModel = "models/XQM/Rails/gumball_1.mdl"
+COMBI.BuildSiteModel = "models/hunter/blocks/cube1x1x05.mdl"
GMS.RegisterCombi( COMBI, "Structures" )