mirror of
https://github.com/chev2/gmod-addons.git
synced 2025-12-17 13:32:14 +00:00
Add map addons: cinema_construct, gm_krustykrab_night, gm_construct_flipped
This commit is contained in:
parent
fa60e3be1c
commit
39a6af1806
15 changed files with 398 additions and 0 deletions
11
addons/cinema_construct/addon.json
Normal file
11
addons/cinema_construct/addon.json
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
{
|
||||
"title": "cinema_construct",
|
||||
"type": "map",
|
||||
"tags": ["build", "movie"],
|
||||
"ignore":
|
||||
[
|
||||
"*.psd",
|
||||
"*.vcproj",
|
||||
"*.svn*"
|
||||
]
|
||||
}
|
||||
|
|
@ -0,0 +1,270 @@
|
|||
local LOCATION_DATA = {
|
||||
["Outside"] = {
|
||||
Min = Vector(-5259, -3790, -1500),
|
||||
Max = Vector(1905, 6480, 10000),
|
||||
},
|
||||
["Lobby 1"] = {
|
||||
Min = Vector(1028, -880, -155),
|
||||
Max = Vector(1791, 899, 27),
|
||||
},
|
||||
["Lobby 2"] = {
|
||||
Min = Vector(-3245, -2565, -152),
|
||||
Max = Vector(-1033, -1032, 208),
|
||||
},
|
||||
["Underground"] = {
|
||||
Min = Vector(-2975, -2610, -410),
|
||||
Max = Vector(-1174, -2063, -144),
|
||||
},
|
||||
["Color Room"] = {
|
||||
Min = Vector(-3311, -4587, -265),
|
||||
Max = Vector(-790, -2620, 170),
|
||||
},
|
||||
["Dark Room Stairs"] = {
|
||||
Min = Vector(-5657, -3463, -168),
|
||||
Max = Vector(-5257., -2315, 433),
|
||||
},
|
||||
["Tower"] = {
|
||||
Min = Vector(-5000, 4636, -144),
|
||||
Max = Vector(-3934, 6024, 2647),
|
||||
},
|
||||
["Lake"] = {
|
||||
Min = Vector(-3115, 2009, -884),
|
||||
Max = Vector(1937, 6467, 165),
|
||||
},
|
||||
["Secret Room"] = {
|
||||
Min = Vector(-3111, -1415, -97),
|
||||
Max = Vector(-2889, -1051, 13),
|
||||
},
|
||||
["Backrooms Theater 1"] = {
|
||||
Min = Vector(717, -2156, -149),
|
||||
Max = Vector(1048, -1803, 57),
|
||||
Theater = {
|
||||
Name = "Backrooms Theater 1",
|
||||
Flags = THEATER_PRIVATE,
|
||||
Pos = Vector(728.1, -2032, 16),
|
||||
Ang = Angle(0, 90, 0),
|
||||
Width = 224,
|
||||
Height = 128,
|
||||
ThumbInfo = {
|
||||
Pos = Vector(1056, -1944, -48),
|
||||
Ang = Angle(0, 0, 0)
|
||||
}
|
||||
}
|
||||
},
|
||||
["Backrooms Theater 2"] = {
|
||||
Min = Vector(707, -1400, -149),
|
||||
Max = Vector(1048, -1041, 69),
|
||||
Theater = {
|
||||
Name = "Backrooms Theater 2",
|
||||
Flags = THEATER_PRIVATE,
|
||||
Pos = Vector(728.1, -1392, 16),
|
||||
Ang = Angle(0, 90, 0),
|
||||
Width = 224,
|
||||
Height = 128,
|
||||
ThumbInfo = {
|
||||
Pos = Vector(1056, -1256, -48),
|
||||
Ang = Angle(0, 0, 0)
|
||||
}
|
||||
}
|
||||
},
|
||||
["Backrooms Theater 3"] = {
|
||||
Min = Vector(722, -2172, 1130),
|
||||
Max = Vector(1038, -1798, 1265),
|
||||
Theater = {
|
||||
Name = "Backrooms Theater 3",
|
||||
Flags = THEATER_PRIVATE,
|
||||
Pos = Vector(728.1, -2032, 1264),
|
||||
Ang = Angle(0, 90, 0),
|
||||
Width = 224,
|
||||
Height = 128,
|
||||
ThumbInfo = {
|
||||
Pos = Vector(1042, -1940, 1200),
|
||||
Ang = Angle(0, 0, 0)
|
||||
}
|
||||
}
|
||||
},
|
||||
["Backrooms Theater 4"] = {
|
||||
Min = Vector(722, -1401, 1130),
|
||||
Max = Vector(1038, -1041, 1265),
|
||||
Theater = {
|
||||
Name = "Backrooms Theater 4",
|
||||
Flags = THEATER_PRIVATE,
|
||||
Pos = Vector(728.1, -1392, 1264),
|
||||
Ang = Angle(0, 90, 0),
|
||||
Width = 224,
|
||||
Height = 128,
|
||||
ThumbInfo = {
|
||||
Pos = Vector(1042, -1260, 1200),
|
||||
Ang = Angle(0, 0, 0)
|
||||
}
|
||||
}
|
||||
},
|
||||
["Backrooms"] = {
|
||||
Min = Vector(843, -2156, -144),
|
||||
Max = Vector(1791, -1041, 54),
|
||||
},
|
||||
["Upper Backrooms"] = {
|
||||
Min = Vector(1070, -2172, 1117),
|
||||
Max = Vector(1845, -1041, 1290),
|
||||
},
|
||||
["Backrooms Crossing"] = {
|
||||
Min = Vector(1791, -1290, -144),
|
||||
Max = Vector(2178, -624, 35),
|
||||
},
|
||||
["Floor 1 Theater"] = {
|
||||
Min = Vector(-2945, -3254, 256),
|
||||
Max = Vector(-1665, -2305, 764),
|
||||
Theater = {
|
||||
Name = "Floor 1 Theater",
|
||||
Flags = THEATER_PRIVATE,
|
||||
Pos = Vector(-1876, -3227.9, 736),
|
||||
Ang = Angle(0, 180, 0),
|
||||
Width = 856,
|
||||
Height = 480
|
||||
}
|
||||
},
|
||||
["Floor 2 Theater"] = {
|
||||
Min = Vector(-3005, -3254, 768),
|
||||
Max = Vector(-1600, -2241, 1278),
|
||||
Theater = {
|
||||
Name = "Floor 2 Theater",
|
||||
Flags = THEATER_PRIVATE,
|
||||
Pos = Vector(-1876, -3227.9, 1248),
|
||||
Ang = Angle(0, 180, 0),
|
||||
Width = 856,
|
||||
Height = 480
|
||||
}
|
||||
},
|
||||
["Floor 3 Theater"] = {
|
||||
Min = Vector(-3005, -3254, 1280),
|
||||
Max = Vector(-1600, -2241, 1790),
|
||||
Theater = {
|
||||
Name = "Floor 3 Theater",
|
||||
Flags = THEATER_PRIVATE,
|
||||
Pos = Vector(-1876, -3227.9, 1760),
|
||||
Ang = Angle(0, 180, 0),
|
||||
Width = 856,
|
||||
Height = 480
|
||||
}
|
||||
},
|
||||
["Floor 4 Theater"] = {
|
||||
Min = Vector(-3005, -3254, 1792),
|
||||
Max = Vector(-1600, -2241, 2302),
|
||||
Theater = {
|
||||
Name = "Floor 4 Theater",
|
||||
Flags = THEATER_PRIVATE,
|
||||
Pos = Vector(-1876, -3227.9, 2272),
|
||||
Ang = Angle(0, 180, 0),
|
||||
Width = 856,
|
||||
Height = 480
|
||||
}
|
||||
},
|
||||
["Floor 5 Theater"] = {
|
||||
Min = Vector(-3005, -3254, 2304),
|
||||
Max = Vector(-1600, -2241, 2816),
|
||||
Theater = {
|
||||
Name = "Floor 5 Theater",
|
||||
Flags = THEATER_PRIVATE,
|
||||
Pos = Vector(-1876, -3227.9, 2816),
|
||||
Ang = Angle(0, 180, 0),
|
||||
Width = 856,
|
||||
Height = 512
|
||||
}
|
||||
},
|
||||
["Underground Theater"] = {
|
||||
Min = Vector(-2928, -2063, -542),
|
||||
Max = Vector(-1200, 105, -177),
|
||||
Theater = {
|
||||
Name = "Underground Theater",
|
||||
Flags = THEATER_REPLICATED,
|
||||
Pos = Vector(-2360, 79.7, -176),
|
||||
Ang = Angle(0, 0, 0),
|
||||
Width = 592,
|
||||
Height = 336,
|
||||
ThumbInfo = {
|
||||
Pos = Vector(-2064, -1912, 104),
|
||||
Ang = Angle(0, 90, 0)
|
||||
}
|
||||
}
|
||||
},
|
||||
["Dark Room Theater"] = {
|
||||
Min = Vector(-5660, -2568, -153),
|
||||
Max = Vector(-3232, -1037, 201),
|
||||
Theater = {
|
||||
Name = "Dark Room Theater",
|
||||
Flags = THEATER_REPLICATED,
|
||||
Pos = Vector(-3980, -2555.5, 160),
|
||||
Ang = Angle(0, 180, 0),
|
||||
Width = 540,
|
||||
Height = 304
|
||||
}
|
||||
},
|
||||
["Tower Theater"] = {
|
||||
Min = Vector(-4935, 4692, -120),
|
||||
Max = Vector(-4002, 5960, 478),
|
||||
Theater = {
|
||||
Name = "Tower Theater",
|
||||
Flags = THEATER_REPLICATED,
|
||||
Pos = Vector(-4927, 4812, 480),
|
||||
Ang = Angle(0, 90, 0),
|
||||
Width = 1024,
|
||||
Height = 576
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Location.Add("cinema_construct", LOCATION_DATA)
|
||||
|
||||
if SERVER then
|
||||
local CinemaConstructChairOffsets = {
|
||||
["models/props_trainstation/benchoutdoor01a.mdl"] = {
|
||||
{ Pos = Vector(0, 21, 0), Ang = Angle(0, 90, 0) },
|
||||
{ Pos = Vector(0, -26, 0), Ang = Angle(0, 90, 0) },
|
||||
},
|
||||
["models/cinema/theater_curve_couch_s.mdl"] = {
|
||||
{ Pos = Vector(-73.6, 17.3, 16), Ang = Angle(0, -128, 0) },
|
||||
{ Pos = Vector(-65.2, 50.3, 16), Ang = Angle(0, -128, 0) },
|
||||
{ Pos = Vector(-37.5, 71.7, 16), Ang = Angle(0, -153, 0) },
|
||||
{ Pos = Vector(0, 80, 16), Ang = Angle(0, -180, 0) },
|
||||
{ Pos = Vector(37.5, 71.7, 16), Ang = Angle(0, 153, 0) },
|
||||
{ Pos = Vector(65.2, 50.3, 16), Ang = Angle(0, 128, 0) },
|
||||
{ Pos = Vector(73.6, 17.3, 16), Ang = Angle(0, 128, 0) },
|
||||
}
|
||||
}
|
||||
|
||||
-- Add chair offsets used by props in this map
|
||||
local function AddChairOffsets()
|
||||
for mdlName, chairData in pairs(CinemaConstructChairOffsets) do
|
||||
ChairOffsets[mdlName] = chairData
|
||||
end
|
||||
|
||||
print("[cinema_construct] Map-specific chair offsets initialized.")
|
||||
end
|
||||
|
||||
hook.Add("Initialize", "cinema_construct.InitializeMapSpecificChairOffsets", AddChairOffsets)
|
||||
|
||||
-- Restrict usable buttons in theaters to theater owners only (admins exempt).
|
||||
-- This code is taken from gamemodes/cinema/gamemode/maps/cinema_theatron.lua
|
||||
-- Uses a custom hook name however, so server owners can remove the PlayerUse hook for this map as they see fit
|
||||
local UseCooldown = 0.3
|
||||
|
||||
hook.Add("PlayerUse", "cinema_construct.PrivateTheaterLightSwitch", function(ply, ent)
|
||||
if ply.LastUse and ply.LastUse + UseCooldown > CurTime() then
|
||||
return false
|
||||
end
|
||||
|
||||
-- Always admit admins
|
||||
if ply:IsAdmin() then return true end
|
||||
|
||||
-- Only private theater owners can switch the lights
|
||||
local Theater = ply:GetTheater()
|
||||
if Theater and Theater:IsPrivate() and ent:GetClass() == "func_button" then
|
||||
ply.LastUse = CurTime()
|
||||
|
||||
if Theater:GetOwner() ~= ply then
|
||||
return false
|
||||
end
|
||||
end
|
||||
return true
|
||||
end)
|
||||
end
|
||||
|
|
@ -0,0 +1,70 @@
|
|||
--[[----------------------------------------------------------------------------
|
||||
lua script to spawn door models in gamemodes that doesn't support theater_door
|
||||
----------------------------------------------------------------------------]]--
|
||||
if game.GetMap() ~= "cinema_construct" then return end
|
||||
|
||||
hook.Add("InitPostEntity", "cinema_construct.InitDoorsForNonCinemaGamemodes", function()
|
||||
-- If gamemode folder contains 'cinema', assume the server is running a Cinema-derived gamemode, and abort
|
||||
-- We'll assume the gamemode handles theater_door already
|
||||
local gmFolder = GAMEMODE.FolderName
|
||||
if string.find(string.lower(gmFolder), "cinema") then
|
||||
print("[cinema_construct] Gamemode '" .. gmFolder .. "' is assumed to be a Cinema-based gamemode; We won't apply theater_door entity patch.")
|
||||
return
|
||||
end
|
||||
|
||||
print("[cinema_construct] Spawning theater_door entities for non-Cinema-based gamemode...")
|
||||
|
||||
local DOOR_MODEL = Model("models/sunabouzu/theater_door02.mdl")
|
||||
|
||||
local DOOR_POSITIONS = {
|
||||
Vector(1680, -1600, -144),
|
||||
Vector(1736, -1600, 1136), --backrooms
|
||||
Vector(-2816, -2448, 256),
|
||||
Vector(-2816, -2448, 768),
|
||||
Vector(-2816, -2448, 1280),
|
||||
Vector(-2816, -2448, 1792), --building elevator up
|
||||
Vector(-1792, -2448, 768),
|
||||
Vector(-1792, -2448, 1280),
|
||||
Vector(-1792, -2448, 1792),
|
||||
Vector(-1792, -2448, 2304) --building elevator down
|
||||
}
|
||||
|
||||
local DOOR_ANGLES = {
|
||||
Angle(0, 180, 0),
|
||||
Angle(0, 180, 0), --backrooms
|
||||
Angle(0, 0, 0),
|
||||
Angle(0, 0, 0),
|
||||
Angle(0, 0, 0),
|
||||
Angle(0, 0, 0), --building elevator up
|
||||
Angle(0, 180, 0),
|
||||
Angle(0, 180, 0),
|
||||
Angle(0, 180, 0),
|
||||
Angle(0, 180, 0) --building elevator down
|
||||
}
|
||||
|
||||
local function CreateCinemaConstructDoors()
|
||||
for i = 1, #DOOR_POSITIONS, 1 do
|
||||
local doorent = ents.Create("prop_dynamic")
|
||||
if not IsValid(doorent) then return end
|
||||
|
||||
doorent:SetModel(DOOR_MODEL)
|
||||
doorent:SetPos(DOOR_POSITIONS[i])
|
||||
doorent:SetAngles(DOOR_ANGLES[i])
|
||||
doorent:PhysicsInit(SOLID_VPHYSICS)
|
||||
doorent:SetCollisionGroup(COLLISION_GROUP_INTERACTIVE_DEBRIS)
|
||||
doorent:DrawShadow(false)
|
||||
doorent:Spawn()
|
||||
|
||||
local phys = doorent:GetPhysicsObject()
|
||||
if IsValid(phys) then
|
||||
phys:EnableMotion(false)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
CreateCinemaConstructDoors()
|
||||
|
||||
hook.Add("PostCleanupMap", "CreateCinemaConstructDoorsCleanup", function()
|
||||
CreateCinemaConstructDoors()
|
||||
end)
|
||||
end)
|
||||
BIN
addons/cinema_construct/maps/cinema_construct.bsp
Normal file
BIN
addons/cinema_construct/maps/cinema_construct.bsp
Normal file
Binary file not shown.
BIN
addons/cinema_construct/maps/thumb/cinema_construct.png
Normal file
BIN
addons/cinema_construct/maps/thumb/cinema_construct.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 322 KiB |
|
|
@ -0,0 +1,9 @@
|
|||
"UnlitGeneric"
|
||||
{
|
||||
"$baseTexture" "sprites/moon_sprite"
|
||||
"$additive" "1"
|
||||
"$translucent" "1"
|
||||
"$vertexcolor" "1"
|
||||
"$vertexalpha" "1"
|
||||
"$ignorez" "1"
|
||||
}
|
||||
BIN
addons/cinema_construct/materials/sprites/moon_sprite.vtf
Normal file
BIN
addons/cinema_construct/materials/sprites/moon_sprite.vtf
Normal file
Binary file not shown.
6
addons/gm_construct_flipped/addon.json
Normal file
6
addons/gm_construct_flipped/addon.json
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
{
|
||||
"title": "gm_construct_flipped",
|
||||
"type": "map",
|
||||
"tags": ["build", "fun"],
|
||||
"ignore": ["*.vmf"]
|
||||
}
|
||||
BIN
addons/gm_construct_flipped/maps/gm_construct_flipped.bsp
Normal file
BIN
addons/gm_construct_flipped/maps/gm_construct_flipped.bsp
Normal file
Binary file not shown.
BIN
addons/gm_construct_flipped/maps/thumb/gm_construct_flipped.png
Normal file
BIN
addons/gm_construct_flipped/maps/thumb/gm_construct_flipped.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 29 KiB |
6
addons/gm_krustykrab_night/addon.json
Normal file
6
addons/gm_krustykrab_night/addon.json
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
{
|
||||
"title": "gm_krustykrab_night",
|
||||
"type": "map",
|
||||
"tags": ["cartoon", "comic"],
|
||||
"ignore": ["*.vmf"]
|
||||
}
|
||||
|
|
@ -0,0 +1,26 @@
|
|||
if !string.StartWith(game.GetMap(), "gm_krustykrab_night") then return end
|
||||
|
||||
local skyflower = Material("spongebob/meltyflower.png", "mips smooth")
|
||||
skyflower:SetString("$alpha", "0.5")
|
||||
|
||||
local skyflowercol = Color(28, 101, 47)
|
||||
|
||||
hook.Add("PostDrawSkyBox", "KrustyKrabNight_RenderSkyFlowers", function()
|
||||
if !IsValid(LocalPlayer()) then return end
|
||||
|
||||
render.OverrideDepthEnable(true, false)
|
||||
|
||||
cam.Start3D(Vector(0, 0, 0))
|
||||
render.SetMaterial(skyflower)
|
||||
render.DrawQuadEasy(Vector(16, -12, 5), Vector(-1, 1, 0), 4, 4, skyflowercol, 170)
|
||||
render.DrawQuadEasy(Vector(0, -12, 5), Vector(0, 1, 0), 5, 5, skyflowercol, 180)
|
||||
render.DrawQuadEasy(Vector(-14, -13.5, 4.3), Vector(0.7, 0.67, -0.22), 6, 6, skyflowercol, 185)
|
||||
render.DrawQuadEasy(Vector(-12.2, 15.4, 3.5), Vector(0.61, -0.77, -0.18), 4, 3.5, skyflowercol, 180)
|
||||
render.DrawQuadEasy(Vector(7.7, 17.8, 4.8), Vector(-0.39, -0.89, -0.24), 8, 8, skyflowercol, 185)
|
||||
render.DrawQuadEasy(Vector(17.89, 6.52, 6.09), Vector(-0.89, -0.33, -0.3), 3, 3, skyflowercol, 200)
|
||||
render.DrawQuadEasy(Vector(17.93, 3.88, 7.96), Vector(-0.89, -0.19, -0.39), 3, 3, skyflowercol, 170)
|
||||
//render.DrawQuadEasy(LocalPlayer():GetAimVector()*20, -LocalPlayer():GetAimVector(), 3, 3, skyflowercol, 170)
|
||||
cam.End3D()
|
||||
|
||||
render.OverrideDepthEnable(false, false)
|
||||
end)
|
||||
BIN
addons/gm_krustykrab_night/maps/gm_krustykrab_night.bsp
Normal file
BIN
addons/gm_krustykrab_night/maps/gm_krustykrab_night.bsp
Normal file
Binary file not shown.
BIN
addons/gm_krustykrab_night/maps/thumb/gm_krustykrab_night.png
Normal file
BIN
addons/gm_krustykrab_night/maps/thumb/gm_krustykrab_night.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 954 KiB |
BIN
addons/gm_krustykrab_night/materials/spongebob/meltyflower.png
Normal file
BIN
addons/gm_krustykrab_night/materials/spongebob/meltyflower.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 77 KiB |
Loading…
Add table
Reference in a new issue