Audi A6 body implementation
This commit is contained in:
parent
8d3ab94bd3
commit
b18ed9b58a
@ -1,12 +1,188 @@
|
||||
--@name
|
||||
--@author
|
||||
-- @shared
|
||||
-- @name Audi A6 2012
|
||||
-- @author DarkSupah
|
||||
-- @include /koptilnya/mesh_loader/builder.txt
|
||||
require("/koptilnya/mesh_loader/builder.txt")
|
||||
|
||||
--[[
|
||||
Starfall Scripting Environment
|
||||
DEBUG_MODE = true
|
||||
|
||||
Github: https://github.com/thegrb93/StarfallEx
|
||||
Reference Page: http://thegrb93.github.io/Starfall/
|
||||
local LINK = "https://drive.google.com/u/0/uc?id=1Q4V8lHwTIw3ccJrRWiiwf0WTwSE3qbWb&export=download"
|
||||
local SCALE = Vector(1)
|
||||
|
||||
Default Keyboard shortcuts: https://github.com/ajaxorg/ace/wiki/Default-Keyboard-Shortcuts
|
||||
]]
|
||||
local Materials =
|
||||
{
|
||||
Body = "phoenix_storms/fender_white",
|
||||
Shadow = "models/debug/debugwhite",
|
||||
Grille = "models/shiny",
|
||||
WindowsOutline = "models/debug/debugwhite",
|
||||
Badge = "models/shiny",
|
||||
Bottom = "models/debug/debugwhite",
|
||||
ExhaustPipe = "models/debug/debugwhite",
|
||||
ExhaustTip = "models/shiny",
|
||||
RearLightsBase = "models/debug/debugwhite",
|
||||
StopLights = "models/debug/debugwhite",
|
||||
ReverseLights = "models/debug/debugwhite",
|
||||
RearLightsGlass = "models/debug/debugwhite",
|
||||
FrontLightsBase = "models/debug/debugwhite",
|
||||
FrontLights = "models/debug/debugwhite",
|
||||
FrontLightsGlass = "models/debug/debugwhite",
|
||||
Floor = "models/debug/debugwhite",
|
||||
Dashboard = "models/debug/debugwhite",
|
||||
SteeringColumn = "models/debug/debugwhite",
|
||||
InteriorChrome = "models/shiny",
|
||||
Interior = "models/debug/debugwhite",
|
||||
DoorPanels = "models/debug/debugwhite",
|
||||
DoorPanelsLines = "models/debug/debugwhite",
|
||||
DoorHandles = "models/shiny",
|
||||
Seats = "models/debug/debugwhite",
|
||||
Torpedo = "models/debug/debugwhite",
|
||||
ShifterOutline = "models/shiny",
|
||||
Mirrors = "debug/env_cubemap_model",
|
||||
InteriorSheet = "https://i.imgur.com/qCRlK2o.jpeg",
|
||||
Arrow = "models/debug/debugwhite",
|
||||
DashDials = "https://i.imgur.com/hQVDw7M.png",
|
||||
Seatbelts = "models/debug/debugwhite",
|
||||
SeatbeltsCaps = "models/debug/debugwhite",
|
||||
SeatbeltsLocks = "models/shiny",
|
||||
SeatbeltLockButtons = "models/debug/debugwhite"
|
||||
}
|
||||
|
||||
local Colors =
|
||||
{
|
||||
Body = Color(255,255,255),
|
||||
Shadow = Color(25,25,25),
|
||||
Grille = Color(130,130,130),
|
||||
WindowsOutline = Color(30,30,30),
|
||||
Badge = Color(130,130,130),
|
||||
Bottom = Color(0,0,0),
|
||||
ExhaustPipe = Color(40,40,40),
|
||||
ExhaustTip = Color(130,130,130),
|
||||
RearLightsBase = Color(40,40,40),
|
||||
StopLights = Color(160,50,50),
|
||||
ReverseLights = Color(120,120,120),
|
||||
RearLightsGlass = Color(150,40,40),
|
||||
FrontLightsBase = Color(30,30,30),
|
||||
FrontLights = Color(170,180,180),
|
||||
FrontLightsGlass = Color(140,140,140),
|
||||
Floor = Color(50,50,50),
|
||||
Dashboard = Color(50,50,50),
|
||||
SteeringColumn = Color(50,50,50),
|
||||
InteriorChrome = Color(130,130,130),
|
||||
Interior = Color(50,50,50),
|
||||
DoorPanels = Color(50,50,50),
|
||||
DoorPanelsLines = Color(90,90,90),
|
||||
DoorHandles = Color(140,140,140),
|
||||
Seats = Color(50,50,50),
|
||||
Torpedo = Color(50,50,50),
|
||||
ShifterOutline = Color(130,130,130),
|
||||
Mirrors = Color(255,255,255),
|
||||
InteriorSheet = Color(255,255,255),
|
||||
Arrow = Color(80,80,80),
|
||||
DashDials = Color(255,255,255),
|
||||
Seatbelts = Color(25,25,25),
|
||||
SeatbeltsCaps = Color(35,35,35),
|
||||
SeatbeltsLocks = Color(130,130,130),
|
||||
SeatbeltLockButtons = Color(160,40,40)
|
||||
}
|
||||
|
||||
local builder = {}
|
||||
|
||||
if SERVER then
|
||||
builder = MeshBuilder:new(LINK)
|
||||
|
||||
local this = chip()
|
||||
|
||||
// Body group
|
||||
builder:build("Body", Vector(0), Angle(0), SCALE, Colors.Body, Materials.Body, this, this)
|
||||
builder:build("Bonnet", Vector(0), Angle(0), SCALE, Colors.Body, Materials.Body, this, this)
|
||||
builder:build("Trunk", Vector(0), Angle(0), SCALE, Colors.Body, Materials.Body, this, this)
|
||||
builder:build("Doors", Vector(0), Angle(0), SCALE, Colors.Body, Materials.Body, this, this)
|
||||
builder:build("FrontBumper", Vector(0), Angle(0), SCALE, Colors.Body, Materials.Body, this, this)
|
||||
builder:build("BodyMirrors", Vector(0), Angle(0), SCALE, Colors.Body, Materials.Body, this, this)
|
||||
|
||||
builder:build("FrontShadows", Vector(0), Angle(0), SCALE, Colors.Shadow, Materials.Shadow, this, this)
|
||||
builder:build("RearShadow", Vector(0), Angle(0), SCALE, Colors.Shadow, Materials.Shadow, this, this)
|
||||
|
||||
builder:build("Bottom", Vector(0), Angle(0), SCALE, Colors.Shadow, Materials.Shadow, this, this)
|
||||
|
||||
builder:build("GrillOutline", Vector(0), Angle(0), SCALE, Colors.Grille, Materials.Grille, this, this)
|
||||
|
||||
builder:build("WindowsOutline", Vector(0), Angle(0), SCALE, Colors.WindowsOutline, Materials.WindowsOutline, this, this)
|
||||
|
||||
// Badges and stuff
|
||||
builder:build("Badge", Vector(0), Angle(0), SCALE, Colors.Badge, Materials.Badge, this, this)
|
||||
builder:build("RearBadges", Vector(0), Angle(0), SCALE, Colors.Badge, Materials.Badge, this, this)
|
||||
|
||||
builder:build("ExhaustPipes", Vector(0), Angle(0), SCALE, Colors.ExhaustPipe, Materials.ExhaustPipe, this, this)
|
||||
builder:build("ExhaustTips", Vector(0), Angle(0), SCALE, Colors.ExhaustTip, Materials.ExhaustTip, this, this)
|
||||
|
||||
// Rear lights
|
||||
builder:build("RearLightsBase", Vector(0), Angle(0), SCALE, Colors.RearLightsBase, Materials.RearLightsBase, this, this)
|
||||
local stopLights = builder:build("StopLights", Vector(0), Angle(0), SCALE, Colors.StopLights, Materials.StopLights, this, this)
|
||||
stopLights:suppressEngineLighting(true)
|
||||
local revLights = builder:build("ReverseLights", Vector(0), Angle(0), SCALE, Colors.ReverseLights, Materials.ReverseLights, this, this)
|
||||
revLights:suppressEngineLighting(true)
|
||||
//builder:build("RearLightsGlass", Vector(0), Angle(0), SCALE, Colors.RearLightsGlass, Materials.RearLightsGlass, this, this)
|
||||
|
||||
// Front lights
|
||||
builder:build("FrontLightsShadow", Vector(0), Angle(0), SCALE, Colors.FrontLightsBase, Materials.FrontLightsBase, this, this)
|
||||
//builder:build("FrontLightsGlass", Vector(0), Angle(0), SCALE, Colors.FrontLightsGlass, Materials.FrontLightsGlass, this, this)
|
||||
local frontLights = builder:build("FrontLights", Vector(0), Angle(0), SCALE, Colors.FrontLights, Materials.FrontLights, this, this)
|
||||
frontLights:suppressEngineLighting(true)
|
||||
|
||||
// Interior
|
||||
builder:build("Floor", Vector(0), Angle(0), SCALE, Colors.Floor, Materials.Floor, this, this)
|
||||
|
||||
builder:build("Dashboard", Vector(0), Angle(0), SCALE, Colors.Dashboard, Materials.Dashboard, this, this)
|
||||
builder:build("TachoArrow", Vector(0), Angle(0), SCALE, Colors.Arrow, Materials.Arrow, this, this)
|
||||
builder:build("SpeedArrow", Vector(0), Angle(0), SCALE, Colors.Arrow, Materials.Arrow, this, this)
|
||||
builder:build("SteeringColumn", Vector(0), Angle(0), SCALE, Colors.SteeringColumn, Materials.SteeringColumn, this, this)
|
||||
|
||||
builder:build("InteriorChrome", Vector(0), Angle(0), SCALE, Colors.InteriorChrome, Materials.InteriorChrome, this, this)
|
||||
builder:build("Interior", Vector(0), Angle(0), SCALE, Colors.Interior, Materials.Interior, this, this)
|
||||
|
||||
builder:build("DoorPanels", Vector(0), Angle(0), SCALE, Colors.DoorPanels, Materials.DoorPanels, this, this)
|
||||
builder:build("DoorPanelsWood", Vector(0), Angle(0), SCALE, Colors.DoorPanelsLines, Materials.DoorPanelsLines, this, this)
|
||||
builder:build("DoorHandles", Vector(0), Angle(0), SCALE, Colors.DoorHandles, Materials.DoorHandles, this, this)
|
||||
|
||||
builder:build("Seats", Vector(0), Angle(0), SCALE, Colors.Seats, Materials.Seats, this, this)
|
||||
builder:build("RearSeats", Vector(0), Angle(0), SCALE, Colors.Seats, Materials.Seats, this, this)
|
||||
|
||||
builder:build("Torpedo", Vector(0), Angle(0), SCALE, Colors.Seats, Materials.Seats, this, this)
|
||||
builder:build("ShifterOutline", Vector(0), Angle(0), SCALE, Colors.ShifterOutline, Materials.ShifterOutline, this, this)
|
||||
|
||||
builder:build("Mirrors", Vector(0), Angle(0), SCALE, Colors.Mirrors, Materials.Mirrors, this, this)
|
||||
builder:build("ProfilesButtons", Vector(0), Angle(0), SCALE, Colors.InteriorSheet, Materials.InteriorSheet, this, this)
|
||||
builder:build("WindowControls", Vector(0), Angle(0), SCALE, Colors.InteriorSheet, Materials.InteriorSheet, this, this)
|
||||
builder:build("WindowLocks", Vector(0), Angle(0), SCALE, Colors.InteriorSheet, Materials.InteriorSheet, this, this)
|
||||
builder:build("Vents", Vector(0), Angle(0), SCALE, Colors.InteriorSheet, Materials.InteriorSheet, this, this)
|
||||
builder:build("ShifterDecals", Vector(0), Angle(0), SCALE, Colors.InteriorSheet, Materials.InteriorSheet, this, this)
|
||||
builder:build("TopControls", Vector(0), Angle(0), SCALE, Colors.InteriorSheet, Materials.InteriorSheet, this, this)
|
||||
builder:build("Multimedia", Vector(0), Angle(0), SCALE, Colors.InteriorSheet, Materials.InteriorSheet, this, this)
|
||||
|
||||
builder:build("Seatbelts", Vector(0), Angle(0), SCALE, Colors.Seatbelts, Materials.Seatbelts, this, this)
|
||||
builder:build("SeatbeltsCaps", Vector(0), Angle(0), SCALE, Colors.SeatbeltsCaps, Materials.SeatbeltsCaps, this, this)
|
||||
builder:build("SeatbeltsLocks", Vector(0), Angle(0), SCALE, Colors.SeatbeltsLocks, Materials.SeatbeltsLocks, this, this)
|
||||
builder:build("RearSeatsChrome", Vector(0), Angle(0), SCALE, Colors.Interior, Materials.Interior, this, this)
|
||||
builder:build("SeatbeltLockButtons", Vector(0), Angle(0), SCALE, Colors.SeatbeltLockButtons, Materials.SeatbeltLockButtons, this, this)
|
||||
|
||||
builder:build("DashDials", Vector(0), Angle(0), SCALE, Colors.DashDials, Materials.DashDials, this, this)
|
||||
|
||||
local result = builder:getResult()
|
||||
else
|
||||
function init()
|
||||
builder = MeshBuilder:new(LINK)
|
||||
end
|
||||
|
||||
if hasPermission("http.get") and hasPermission("mesh") and hasPermission("entities.setRenderProperty", chip()) then
|
||||
init()
|
||||
else
|
||||
setupPermissionRequest({"http.get", "mesh", "entities.setRenderProperty"}, "", true)
|
||||
|
||||
hook.add("permissionrequest", "_permissionrequest", function()
|
||||
if permissionRequestSatisfied() then
|
||||
init()
|
||||
end
|
||||
end)
|
||||
end
|
||||
end
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user