Skip to content

Commit

Permalink
missing classes
Browse files Browse the repository at this point in the history
  • Loading branch information
rfuzzo committed May 7, 2024
1 parent 6973525 commit 75b1fad
Show file tree
Hide file tree
Showing 11 changed files with 164 additions and 404 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,7 @@ local log = lib.log

-- Define the CBoat class inheriting from CVehicle
---@class CBoat : CVehicle
local CBoat = {
sound = { "Boat Hull" },
freedomtype = "boat",
}
local CBoat = {}
setmetatable(CBoat, { __index = CVehicle })

---Constructor for CBoat
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,31 +2,42 @@ local CBoat = require("ImmersiveTravel.Vehicles.CBoat")

-- Define the CCanoe class inheriting from CBoat
---@class CCanoe : CBoat
local CCanoe = {
id = "a_canoe_01",
sound = {
local CCanoe = {}
setmetatable(CCanoe, { __index = CBoat })

---Constructor for CCanoe
---@return CCanoe
function CCanoe:new()
local newObj = CBoat:new()
self.__index = self
setmetatable(newObj, self)
---@cast newObj CCanoe

-- set default values
newObj.id = "a_canoe_01"
newObj.sound = {
"Boat Creak"
},
loopSound = true,
mesh = "x\\Ex_Gondola_01_rot.nif",
scale = 0.7,
offset = 40,
sway = 0.7,
speed = 2,
minSpeed = -2,
maxSpeed = 7,
turnspeed = 40,
hasFreeMovement = false,
freedomtype = "boat",
guideSlot = {
}
newObj.loopSound = true
newObj.mesh = "x\\Ex_Gondola_01_rot.nif"
newObj.scale = 0.7
newObj.offset = 40
newObj.sway = 0.7
newObj.speed = 2
newObj.minSpeed = -2
newObj.maxSpeed = 7
newObj.turnspeed = 40
newObj.hasFreeMovement = false
newObj.freedomtype = "boat"
newObj.guideSlot = {
animationGroup = { "idle6" },
animationFile = "VA_sitting.nif",
position = tes3vector3.new(0, -82, -15)
},
hiddenSlot = {
}
newObj.hiddenSlot = {
position = tes3vector3.new(0, 0, -200)
},
slots = {
}
newObj.slots = {
{
animationGroup = {
"idle6"
Expand All @@ -38,8 +49,8 @@ local CCanoe = {
animationGroup = {},
position = tes3vector3.new(0, 7, -15)
},
},
clutter = {
}
newObj.clutter = {
{
id = "light_de_paper_lantern_01_nr",
position = tes3vector3.new(0, -219, 56)
Expand All @@ -48,27 +59,16 @@ local CCanoe = {
id = "light_de_paper_lantern_04_nr",
position = tes3vector3.new(0, 176, 17)
}
},
userData = {
}
newObj.userData = {
name = "Canoe",
price = 300,
materials = {
{ material = "wood", count = 12 },
{ material = "rope", count = 6 },
{ material = "fabric", count = 4 },
}
},

}
setmetatable(CCanoe, { __index = CBoat })

---Constructor for CCanoe
---@return CCanoe
function CCanoe:new()
local newObj = CBoat:new()
self.__index = self
setmetatable(newObj, self)
---@cast newObj CCanoe
}

return newObj
end
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,69 +4,7 @@ local log = lib.log

-- Define the CGondola class inheriting from CBoat
---@class CGondola : CBoat
local CGondola = {
-- id = "a_gondola_01",
-- sound = {
-- "Boat Creak"
-- },
-- loopSound = true,
-- mesh = "x\\Ex_Gondola_01_rot.nif",
-- scale = 1,
-- offset = 40,
-- sway = 1,
-- speed = 2,
-- minSpeed = -2,
-- maxSpeed = 7,
-- turnspeed = 40,
-- hasFreeMovement = false,
-- freedomtype = "boat",
-- guideSlot = {
-- animationGroup = { "idle6" },
-- position = tes3vector3.new(0, -171, -18)
-- },
-- hiddenSlot = {
-- position = tes3vector3.new(0, 0, -200)
-- },
-- slots = {
-- {
-- animationGroup = {
-- "idle6"
-- },
-- animationFile = "VA_sitting.nif",
-- position = tes3vector3.new(0, 82, -15)
-- },
-- {
-- animationGroup = {
-- "idle6"
-- },
-- animationFile = "VA_sitting.nif",
-- position = tes3vector3.new(0, -82, -15)
-- },
-- {
-- animationGroup = {},
-- position = tes3vector3.new(0, 7, -15)
-- },
-- },
-- clutter = {
-- {
-- id = "light_de_paper_lantern_01_nr",
-- position = tes3vector3.new(0, -219, 56)
-- },
-- {
-- id = "light_de_paper_lantern_04_nr",
-- position = tes3vector3.new(0, 176, 17)
-- }
-- },
-- userData = {
-- name = "Gondola",
-- price = 500,
-- materials = {
-- { material = "wood", count = 20 },
-- { material = "rope", count = 10 },
-- { material = "fabric", count = 4 },
-- },
-- },
}
local CGondola = {}
setmetatable(CGondola, { __index = CBoat })

---Constructor for CGondola
Expand Down
Original file line number Diff line number Diff line change
@@ -1,82 +1,10 @@
local CBoat = require("ImmersiveTravel.Vehicles.CBoat")
local lib = require("ImmersiveTravel.lib")
local log = lib.log
local CBoat = require("ImmersiveTravel.Vehicles.CBoat")
local lib = require("ImmersiveTravel.lib")
local log = lib.log

-- Define the CLongboat class inheriting from CBoat
---@class CLongboat : CBoat
local CLongboat = {}

CLongboat.prototype =
{
id = "a_longboat",
sound = {
"Boat Hull"
},
loopSound = true,
mesh = "x\\Ex_longboat_rot.nif",
offset = 74,
sway = 4,
speed = 4,
turnspeed = 24,
hasFreeMovement = true,
freedomtype = "boat",
guideSlot = {
animationGroup = {},
position = tes3vector3.new(67, -457, -65)
},
hiddenSlot = {
position = tes3vector3.new(0, 0, -200)
},
slots = {
{
animationGroup = {},
position = tes3vector3.new(0, 411, -63)
},
{
animationGroup = {},
position = tes3vector3.new(-132, 67, -63)
},
{
animationGroup = {},
position = tes3vector3.new(160, -145, -63)
},
{
animationGroup = {},
position = tes3vector3.new(-79, -390, -67)
},
{
animationGroup = {
"idle6"
},
animationFile = "VA_sitting.nif",
position = tes3vector3.new(0, 133, -26)
},
{
animationGroup = {
"idle6"
},
animationFile = "VA_sitting.nif",
position = tes3vector3.new(-122, -181, -27)
},
{
animationGroup = {
"idle6"
},
animationFile = "VA_sitting.nif",
position = tes3vector3.new(87, -259, -27)
}
},
clutter = {
{
id = "light_com_lantern_01",
position = tes3vector3.new(0, 623, 28)
},
{
id = "light_com_lantern_02",
position = tes3vector3.new(0, -585, 18)
}
}
}
local CLongboat = {}
setmetatable(CLongboat, { __index = CBoat })

---Constructor for CLongboat
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,27 +2,38 @@ local CBoat = require("ImmersiveTravel.Vehicles.CBoat")

-- Define the CMushroomdola class inheriting from CBoat
---@class CMushroomdola : CBoat
local CMushroomdola = {
id = "a_mushroomdola_iv",
sound = {
local CMushroomdola = {}
setmetatable(CMushroomdola, { __index = CBoat })

---Constructor for CMushroomdola
---@return CMushroomdola
function CMushroomdola:new()
local newObj = CBoat:new()
self.__index = self
setmetatable(newObj, self)
---@cast newObj CMushroomdola

-- set default values
newObj.id = "a_mushroomdola_iv"
newObj.sound = {
"Boat Creak"
},
loopSound = true,
mesh = "dim\\dim_mushroomdola1.nif",
offset = 40,
sway = 1,
speed = 2,
minSpeed = -2,
maxSpeed = 7,
changeSpeed = 1.5,
turnspeed = 30,
scale = 1,
guideSlot = {
}
newObj.loopSound = true
newObj.mesh = "dim\\dim_mushroomdola1.nif"
newObj.offset = 40
newObj.sway = 1
newObj.speed = 2
newObj.minSpeed = -2
newObj.maxSpeed = 7
newObj.changeSpeed = 1.5
newObj.turnspeed = 30
newObj.scale = 1
newObj.guideSlot = {
animationGroup = { "idle6" },
animationFile = "VA_sitting.nif",
position = tes3vector3.new(-30, 0, -13)
},
userData = {
}
newObj.userData = {
name = "Mushroomdola",
price = 300,
materials = {
Expand All @@ -31,17 +42,7 @@ local CMushroomdola = {
{ material = "fabric", count = 4 },
{ material = "mushroom", count = 8 },
}
},
}
setmetatable(CMushroomdola, { __index = CBoat })

---Constructor for CMushroomdola
---@return CMushroomdola
function CMushroomdola:new()
local newObj = CBoat:new()
self.__index = self
setmetatable(newObj, self)
---@cast newObj CMushroomdola
}

return newObj
end
Expand Down
Loading

0 comments on commit 75b1fad

Please sign in to comment.