Skip to content

Commit

Permalink
V2.2.1
Browse files Browse the repository at this point in the history
  • Loading branch information
parker02311 committed Jul 22, 2024
1 parent be85e45 commit 69e6a29
Show file tree
Hide file tree
Showing 6 changed files with 38 additions and 3 deletions.
Binary file added Builds/V2_2_1.rbxm
Binary file not shown.
Binary file modified Dev Place.rbxl
Binary file not shown.
2 changes: 1 addition & 1 deletion src/ExportTemplates/BlankSettings.luau
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,6 @@ return {

-- DO NOT CHANGE
-- THIS IS AUTOMATICALLY GENERATED
PluginVersion = "2.2.0",
PluginVersion = "2.2.1",
-- THIS IS FOR THE CHASSIS PLUGIN AND WILL NOT ALWAYS MATCH THE STUDIO PLUGIN
}
2 changes: 1 addition & 1 deletion src/ExportTemplates/Settings.luau
Original file line number Diff line number Diff line change
Expand Up @@ -171,6 +171,6 @@ return {

-- DO NOT CHANGE
-- THIS IS AUTOMATICALLY GENERATED
PluginVersion = "2.2.0",
PluginVersion = "2.2.1",
-- THIS IS FOR THE CHASSIS PLUGIN AND WILL NOT ALWAYS MATCH THE STUDIO PLUGIN
}
2 changes: 1 addition & 1 deletion src/Main.server.luau
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ local function getName(name: string)
return name
end

local Plugin_Version = "2.2.0"
local Plugin_Version = "2.2.1"
local Plugin_Name = getName("Emergency Vehicle Creator V2")
local Plugin_Description = "Easily create amazing ELS for emergency vehicles!"
local Plugin_Icon = "http://www.roblox.com/asset/?id=9953243250"
Expand Down
35 changes: 35 additions & 0 deletions src/Utils/settingsConverter.luau
Original file line number Diff line number Diff line change
Expand Up @@ -171,6 +171,41 @@ settingsConverter.converters["2_1_1"] = function(settings: ModuleScript, pluginS
return newSettingsModule
end

settingsConverter.converters["2_2_0"] = function(settings: ModuleScript, pluginSettings: v2_1_0): ModuleScript
local newSettingsModule = pluginRoot.src.ExportTemplates.BlankSettings:Clone()
local originalSource = settings.Source
local source = newSettingsModule.Source

source = source:gsub("LightbarName = nil,", `LightbarName = \"{pluginSettings.LightbarName}\",`, 1)
source = source:gsub(
"AdditionalLightbarLocations = nil,",
"AdditionalLightbarLocations = {" .. originalSource:split("AdditionalLightbarLocations = {")[2]:split("--")[1],
1
)
source = source:gsub("SirenName = nil,", `SirenName = \"{pluginSettings.SirenName}\",`, 1)
source = source:gsub("Sirens = nil,", "Sirens = {" .. originalSource:split("Sirens = {")[2]:split("--")[1], 1)
source = source:gsub("Keybinds = nil,", "Keybinds = {" .. originalSource:split("Keybinds = {")[2]:split("--")[1], 1)
source = source:gsub(
"DefaultFunctionState = nil,",
"DefaultFunctionState = {" .. originalSource:split("DefaultFunctionState = {")[2]:split("--")[1],
1
)
source =
source:gsub("Overrides = nil,", "Overrides = {" .. originalSource:split("Overrides = {")[2]:split("--")[1], 1)
source = source:gsub("Colors = nil,", "Colors = {" .. originalSource:split("Colors = {")[2]:split("--")[1], 1)
source =
source:gsub("Light = nil,", "Light = function" .. originalSource:split("Light = function")[2]:split("--")[1], 1)

source = source:gsub(
"SecondaryKeybinds = nil,",
"SecondaryKeybinds = {" .. originalSource:split("SecondaryKeybinds = {")[2]:split("--")[1],
1
)

newSettingsModule.Source = source
return newSettingsModule
end

function settingsConverter.convert(settings: ModuleScript)
local pluginSettings = require(settings)
local formattedVersion = pluginSettings.PluginVersion:gsub("%.", "_")
Expand Down

0 comments on commit 69e6a29

Please sign in to comment.