Skip to content

Commit

Permalink
Merge pull request #549 from MattJeanes/parar-new-sounds
Browse files Browse the repository at this point in the history
Cloak and interior lock sounds
  • Loading branch information
MattJeanes authored Dec 1, 2021
2 parents d5892e2 + 6cdc5a0 commit 4c966f2
Show file tree
Hide file tree
Showing 5 changed files with 109 additions and 99 deletions.
24 changes: 15 additions & 9 deletions lua/entities/gmod_tardis/modules/sh_cloak.lua
Original file line number Diff line number Diff line change
Expand Up @@ -188,17 +188,23 @@ else
if self:GetData("cloak",false) and not self:GetData("cloak-animating",false) then return false end
end)

ENT:OnMessage("cloak", function(self)
ENT:OnMessage("cloak", function(self)
local on = net.ReadBool()
self:SetData("cloak", on)
self:SetData("cloak-animating", true)
local snd = self.metadata.Exterior.Sounds.Cloak
if on and TARDIS:GetSetting("cloaksound-enabled") and TARDIS:GetSetting("sound") then
self:EmitSound(snd)
local snd
if on then
snd = self.metadata.Exterior.Sounds.Cloak
else
snd = self.metadata.Exterior.Sounds.CloakOff
end

if IsValid(self.interior) then
self.interior:EmitSound(snd)
end
end
end)
if TARDIS:GetSetting("cloaksound-enabled") and TARDIS:GetSetting("sound") then
self:EmitSound(snd)

if IsValid(self.interior) then
self.interior:EmitSound(snd)
end
end
end)
end
8 changes: 5 additions & 3 deletions lua/entities/gmod_tardis/modules/sh_lock.lua
Original file line number Diff line number Diff line change
Expand Up @@ -82,11 +82,13 @@ else
})

ENT:OnMessage("locksound",function(self)
local snd = self.metadata.Exterior.Sounds.Lock
local extsound = self.metadata.Exterior.Sounds.Lock
local intsound = self.metadata.Interior.Sounds.Lock or extsound

if TARDIS:GetSetting("locksound-enabled") and TARDIS:GetSetting("sound") then
self:EmitSound(snd)
self:EmitSound(extsound)
if IsValid(self.interior) then
self.interior:EmitSound(snd)
self.interior:EmitSound(intsound)
end
end
end)
Expand Down
176 changes: 89 additions & 87 deletions lua/tardis/interiors/base.lua
Original file line number Diff line number Diff line change
@@ -1,116 +1,118 @@
-- Base

local T={}
T.Base=true
T.Name="Base"
T.ID="base"
T.Interior={
Model="models/drmatt/tardis/interior.mdl",
ExitDistance=600,
Portal={
pos=Vector(-1,-353.5,136),
ang=Angle(0,90,0),
width=60,
height=91
local T = {}
T.Base = true
T.Name = "Base"
T.ID = "base"
T.Interior = {
Model = "models/drmatt/tardis/interior.mdl",
ExitDistance = 600,
Portal = {
pos = Vector(-1,-353.5,136),
ang = Angle(0,90,0),
width = 60,
height = 91
},
Fallback={
pos=Vector(0,-330,95),
ang=Angle(0,90,0)
Fallback = {
pos = Vector(0,-330,95),
ang = Angle(0,90,0)
},
Sounds={
Teleport={
demat_fail="drmatt/tardis/demat_fail_int.wav"
Sounds = {
Teleport = {
demat_fail = "drmatt/tardis/demat_fail_int.wav"
}, -- uses exterior sounds if not specified
Power={
On="drmatt/tardis/power_on.wav",
Off="drmatt/tardis/power_off.wav"
Power = {
On = "drmatt/tardis/power_on.wav",
Off = "drmatt/tardis/power_off.wav"
},
SequenceOK = "drmatt/tardis/seq_ok.wav",
SequenceFail = "drmatt/tardis/seq_bad.wav",
Cloister = "drmatt/tardis/cloisterbell_loop.wav"
Cloister = "drmatt/tardis/cloisterbell_loop.wav",
Lock = "drmatt/tardis/lock_int.wav",
},
Tips = {},
CustomTips = {},
PartTips = {},
TipSettings={
style="white_on_grey",
view_range_min=70,
view_range_max=100,
TipSettings = {
style = "white_on_grey",
view_range_min = 70,
view_range_max = 100,
},
LightOverride={
basebrightness=0.3, --Base interior brightness when power is on.
nopowerbrightness=0.05 --Interior brightness with no power. Should always be darker than basebrightness.
LightOverride = {
basebrightness = 0.3, --Base interior brightness when power is on.
nopowerbrightness = 0.05 --Interior brightness with no power. Should always be darker than basebrightness.
},
ScreenDistance=500,
ScreensEnabled=true
ScreenDistance = 500,
ScreensEnabled = true
}
T.Exterior={
Model="models/drmatt/tardis/exterior/exterior.mdl",
Mass=5000,
DoorAnimationTime=0.5,
ScannerOffset=Vector(22,0,50),
Portal={
pos=Vector(26,0,51.65),
ang=Angle(0,0,0),
width=44,
height=91
T.Exterior = {
Model = "models/drmatt/tardis/exterior/exterior.mdl",
Mass = 5000,
DoorAnimationTime = 0.5,
ScannerOffset = Vector(22,0,50),
Portal = {
pos = Vector(26,0,51.65),
ang = Angle(0,0,0),
width = 44,
height = 91
},
Fallback={
pos=Vector(60,0,5),
ang=Angle(0,0,0)
Fallback = {
pos = Vector(60,0,5),
ang = Angle(0,0,0)
},
Light={
enabled=true,
pos=Vector(0,0,122),
color=Color(255,255,255),
dynamicpos=Vector(0,0,130),
dynamicbrightness=2,
dynamicsize=300
Light = {
enabled = true,
pos = Vector(0,0,122),
color = Color(255,255,255),
dynamicpos = Vector(0,0,130),
dynamicbrightness = 2,
dynamicsize = 300
},
ProjectedLight={
--color=Color(r,g,b), --Base color. Will use main interior light if not set.
--warncolor=Color(r,g,b), --Warning color. Will use main interior warn color if not set.
brightness=0.1, --Light's brightness
--vertfov=90,
--horizfov=90, --vertical and horizontal field of view of the light. Will default to portal height and width.
farz=750, --FarZ property of the light. Determines how far the light projects.]]
offset=Vector(-21,0,51.1), --Offset from box origin
texture="effects/flashlight/square" --Texture the projected light will use. You can get these from the Lamp tool.
ProjectedLight = {
--color = Color(r,g,b), --Base color. Will use main interior light if not set.
--warncolor = Color(r,g,b), --Warning color. Will use main interior warn color if not set.
brightness = 0.1, --Light's brightness
--vertfov = 90,
--horizfov = 90, --vertical and horizontal field of view of the light. Will default to portal height and width.
farz = 750, --FarZ property of the light. Determines how far the light projects.]]
offset = Vector(-21,0,51.1), --Offset from box origin
texture = "effects/flashlight/square" --Texture the projected light will use. You can get these from the Lamp tool.
},
Sounds={
Teleport={
demat="drmatt/tardis/demat.wav",
demat_damaged="drmatt/tardis/demat_damaged.wav",
demat_fail="drmatt/tardis/demat_fail_ext.wav",
mat="drmatt/tardis/mat.wav",
mat_damaged="drmatt/tardis/mat_damaged.wav",
Sounds = {
Teleport = {
demat = "drmatt/tardis/demat.wav",
demat_damaged = "drmatt/tardis/demat_damaged.wav",
demat_fail = "drmatt/tardis/demat_fail_ext.wav",
mat = "drmatt/tardis/mat.wav",
mat_damaged = "drmatt/tardis/mat_damaged.wav",
fullflight = "drmatt/tardis/full.wav",
fullflight_damaged = "drmatt/tardis/full_damaged.wav",
},
RepairFinish="drmatt/tardis/repairfinish.wav",
Lock="drmatt/tardis/lock.wav",
Door={
enabled=true,
open="drmatt/tardis/door_open.wav",
close="drmatt/tardis/door_close.wav",
locked="drmatt/tardis/door_locked.wav"
RepairFinish = "drmatt/tardis/repairfinish.wav",
Lock = "drmatt/tardis/lock.wav",
Door = {
enabled = true,
open = "drmatt/tardis/door_open.wav",
close = "drmatt/tardis/door_close.wav",
locked = "drmatt/tardis/door_locked.wav"
},
FlightLoop="drmatt/tardis/flight_loop.wav",
FlightLoopDamaged="drmatt/tardis/flight_loop_damaged.wav",
FlightLoop = "drmatt/tardis/flight_loop.wav",
FlightLoopDamaged = "drmatt/tardis/flight_loop_damaged.wav",
Cloak = "drmatt/tardis/phase_enable.wav",
CloakOff = "drmatt/tardis/phase_disable.wav",
},
Parts={
vortex={
model="models/doctorwho1200/toyota/2013timevortex.mdl",
pos=Vector(0,0,50),
ang=Angle(0,0,0),
scale=10
Parts = {
vortex = {
model = "models/doctorwho1200/toyota/2013timevortex.mdl",
pos = Vector(0,0,50),
ang = Angle(0,0,0),
scale = 10
}
},
Teleport={
SequenceSpeed=0.77,
SequenceSpeedFast=0.935,
DematSequence={
Teleport = {
SequenceSpeed = 0.77,
SequenceSpeedFast = 0.935,
DematSequence = {
150,
200,
100,
Expand All @@ -119,7 +121,7 @@ T.Exterior={
100,
0
},
MatSequence={
MatSequence = {
100,
50,
150,
Expand Down
Binary file added sound/drmatt/tardis/lock_int.wav
Binary file not shown.
Binary file added sound/drmatt/tardis/phase_disable.wav
Binary file not shown.

0 comments on commit 4c966f2

Please sign in to comment.