Jump to content
pestilence

Materials Widget & Industrial Effects Widget

Recommended Posts

Industrial Effects Widget UPDATED - Added MAD_JIHAD's code + Fixed a few pipes

Industrial Effects Widget UPDATED - Added MAD_JIHAD's code that Fixed the chains, added the light mounts and lava steam

Materials Widget UPDATED -  Added aliasedfrog code that added Drag by title to position,minimize button and moved the draws into a for block using tables

Both UPDATED - Changed how it shows up

Both UPDATED - Updated for 0.34.3 and missed items

Materials Widget UPDATED - Removed editor_teleport & editor_jumppad from Level Renamed level to Misc

Both UPDATED - Added what Ohm sweet suggested

Both UPDATED - Added MAD_JIHAD's code for showing the widgets properly and removed meta

          Both UPDATED - MAD_JIHAD added code for showing the widgets properly and added ivy and rubble

 

Materials Widget:https://github.com/MADJIHADx/Reflex-Scripts/blob/master/MaterialsWidget.lua

Industrial Effects Widget:https://github.com/MADJIHADx/Reflex-Scripts/blob/master/IndustrialEffectsWidget.lua

 

 

Materials Widget Note: The race_checkpoint/race_finish/race_start Under Misc are not the world types for racing and are used only for visuals.

7f93431b81.jpg

dd7c89e5a1.jpg

Edited by pestilence

Share this post


Link to post
Share on other sites

Ok so something I would like to have is another list in materials for stuff like

 

internal/editor/textures/editor_clip

internal/editor/textures/editor_fullclip

internal/editor/textures/editor_jumppad

internal/editor/textures/editor_meta

internal/editor/textures/editor_teleport

internal/effects/race/race_checkpoint

internal/effects/race/race_finish

internal/effects/race/race_start

 

^this stuff could go with the nolight material into a list^

 

 

Also for effects some usefull things are missing like

 

internal/misc/reflectionprobe

internal/world/teleporter/teleporter_frame_L

internal/world/teleporter/teleporter_frame_R

internal/world/teleporter/teleporter_portal

structural/decals/decal_dev_logo_reflex

 

Edit: Ah I just did it my self, here it is if you want it.

require "base/internal/ui/reflexcore"

--Materials Level
local contentlistMaterialsLevel =
{
  "internal/editor/textures/editor_clip",
  "internal/editor/textures/editor_fullclip",
  "internal/editor/textures/editor_jumppad",
  "internal/editor/textures/editor_meta",
  "internal/editor/textures/editor_teleport",
  "internal/effects/race/race_checkpoint",
  "internal/effects/race/race_finish",
  "internal/effects/race/race_start",
  "internal/editor/textures/editor_nolight"
}

--Materials with grids
local contentlistMaterialsWithGrids =
{
  "dev_aqua",
  "dev_aquadark",
  "dev_black",
  "dev_blue",
  "dev_bluedark",
  "dev_bluelight",
  "dev_green",
  "dev_greendark",
  "dev_greenlight",
  "dev_grey128",
  "dev_grey192",
  "dev_grey64",
  "dev_lime",
  "dev_magenta",
  "dev_magentadark",
  "dev_orange",
  "dev_orangedark",
  "dev_pink",
  "dev_pinkdark",
  "dev_purple",
  "dev_purpledark",
  "dev_red",
  "dev_reddark",
  "dev_white",
  "dev_yellow",
  "dev_yellowdark"
}

--Materials without grids
local contentlistMaterialsWithoutGrids =
{
  "dev_nogrid_aqua",
  "dev_nogrid_aquadark",
  "dev_nogrid_black",
  "dev_nogrid_bluedark",
  "dev_nogrid_bluelight",
  "dev_nogrid_green",
  "dev_nogrid_greendark",
  "dev_nogrid_greenlight",
  "dev_nogrid_grey128",
  "dev_nogrid_grey192",
  "dev_nogrid_grey64",
  "dev_nogrid_lime",
  "dev_nogrid_limedark",
  "dev_nogrid_magenta",
  "dev_nogrid_magentadark",
  "dev_nogrid_orange",
  "dev_nogrid_orangedark",
  "dev_nogrid_pink",
  "dev_nogrid_pinkdark",
  "dev_nogrid_purple",
  "dev_nogrid_purpledark",
  "dev_nogrid_red",
  "dev_nogrid_reddark",
  "dev_nogrid_white",
  "dev_nogrid_yellow",
  "dev_nogrid_yellowdark"
}

--Materials trims
local contentlistMaterialsTrims =
{
  "dev_bluelight_trim",
  "dev_blue_trim",
  "dev_greenlight_trim",
  "dev_green_trim",
  "dev_grey192_trim",
  "dev_orange_trim",
  "dev_purple_trim",
  "dev_red_trim",
  "dev_yellow_trim"
}

--Materials liquids
local contentlistMaterialsLiquids =
{
  "lava/lava",
  "slime/slime",
  "water/water"
}

--Materials light
local contentlistMaterialsLight =
{
  "dev_light_blue",
  "dev_light_green",
  "dev_light_magenta",
  "dev_light_orange",
  "dev_light_pink",
  "dev_light_purple",
  "dev_light_red",
  "dev_light_white",
  "dev_light_yellow"
}

--Materials Industrial
local contentlistMaterialsIndustrial =
{
  "brick/brick_small",
  "brick/cinderblock_01",
  "brick/cinderblock_01_painted_black",
  "brick/cinderblock_01_painted_blue",
  "brick/cinderblock_01_painted_green",
  "brick/cinderblock_01_painted_grey",
  "brick/cinderblock_01_painted_orange",
  "brick/cinderblock_01_painted_red",
  "brick/cinderblock_01_painted_teal",
  "brick/cinderblock_01_painted_white",
  "brick/cinderblock_01_painted_yellow",
  "concrete/concrete_01",
  "concrete/concrete_02",
  "concrete/concrete_bunker_01",
  "concrete/concrete_bunker_02",
  "concrete/concrete_polished",
  "fence/chainlink",
  "metal/corrugated_plated_01",
  "metal/corrugated_sheet_iron",
  "tiles/tiles",
  "trims/metal_01",
  "trims/metal_02",
  "wood/planks"
}

local comboWidth = 340;
local comboBoxMaterialsLevel_Value = "internal/editor/textures/editor_nolight";
local comboBoxMaterialsLiquids_Value = "lava/lava";
local comboBoxMaterialsTrims_Value = "dev_bluelight_trim";
local comboBoxMaterialsWithOutGrids_Value = "dev_nogrid_aqua";
local comboBoxMaterialsWithGrids_Value = "dev_aqua";
local comboBoxMaterialsLight_Value = "dev_light_blue";
local comboBoxMaterialsIndustrial_Value = "brick/brick_small";

MaterialsWidget =
{
  comboBoxDataMaterialsLevel = {},
  comboBoxDataMaterialsWithGrids = {},
  comboBoxDataMaterialsWithOutGrids = {},
  comboBoxDataMaterialsTrims = {},
  comboBoxDataMaterialsLiquids = {},
  comboBoxDataMaterialsLight = {},
  comboBoxDataMaterialsIndustrial = {},
  canPosition = true
  --canHide = false,
  --isMenu = true
};
registerWidget("MaterialsWidget");

function MaterialsWidget:draw()
  if shouldShowHUD() then return end;

  nvgBeginPath();
  nvgRect(-115,-30,600,485);
  nvgFillColor(Color(20,20,20,128));
  nvgFill();

  nvgFontSize(45);
  nvgFillColor(Color(255,255,255));
  nvgTextAlign(NVG_ALIGN_LEFT, NVG_ALIGN_MIDDLE);
  nvgText(120, 5, "Materials");

  nvgFontSize(35);
  nvgTextAlign(NVG_ALIGN_RIGHT, NVG_ALIGN_MIDDLE);

  nvgText(0, 420, "Level");
  comboBoxMaterialsLevel_ui = uiComboBox(contentlistMaterialsLevel, comboBoxMaterialsLevel_Value, 15, 400, comboWidth, self.comboBoxDataMaterialsLevel);
  comboBoxMaterialsLevel_Value = comboBoxMaterialsLevel_ui;
  if uiButton("Set", nil, comboWidth + 25, 400, 100, 35, UI_COLOR_RED) then
    consolePerformCommand("me_activematerial " .. comboBoxMaterialsLevel_ui);
  end

  nvgText(0, 360, "Industrial");
  comboBoxMaterialsIndustrial_ui = uiComboBox(contentlistMaterialsIndustrial, comboBoxMaterialsIndustrial_Value, 15, 340, comboWidth, self.comboBoxDataMaterialsIndustrial);
  comboBoxMaterialsIndustrial_Value = comboBoxMaterialsIndustrial_ui;
  if uiButton("Set", nil, comboWidth + 25, 340, 100, 35, UI_COLOR_RED) then
    consolePerformCommand("me_activematerial structural/industrial/materials/" .. comboBoxMaterialsIndustrial_ui);
  end

  nvgText(0, 300, "Light");
  comboBoxMaterialsLight_ui = uiComboBox(contentlistMaterialsLight, comboBoxMaterialsLight_Value, 15, 280, comboWidth, self.comboBoxDataMaterialsLight);
  comboBoxMaterialsLight_Value = comboBoxMaterialsLight_ui;
  if uiButton("Set", nil, comboWidth + 25, 280, 100, 35, UI_COLOR_RED) then
    consolePerformCommand("me_activematerial structural/dev/" .. comboBoxMaterialsLight_ui);
  end

  nvgText(0, 240, "Liquid");
  comboBoxMaterialsLiquids_ui = uiComboBox(contentlistMaterialsLiquids, comboBoxMaterialsLiquids_Value, 15, 220, comboWidth, self.comboBoxDataMaterialsLiquids);
  comboBoxMaterialsLiquids_Value = comboBoxMaterialsLiquids_ui;
  if uiButton("Set", nil, comboWidth + 25, 220, 100, 35, UI_COLOR_RED) then
    consolePerformCommand("me_activematerial environment/liquids/" .. comboBoxMaterialsLiquids_ui);
  end

  nvgText(0, 180, "Trim");
  comboBoxMaterialsTrims_ui = uiComboBox(contentlistMaterialsTrims, comboBoxMaterialsTrims_Value, 15, 160, comboWidth, self.comboBoxDataMaterialsTrims);
  comboBoxMaterialsTrims_Value = comboBoxMaterialsTrims_ui;
  if uiButton("Set", nil, comboWidth + 25, 160, 100, 35, UI_COLOR_RED) then
    consolePerformCommand("me_activematerial structural/dev/" .. comboBoxMaterialsTrims_ui);
  end

  nvgText(0, 120, "NoGrid");
  comboBoxMaterialsWithOutGrids_ui = uiComboBox(contentlistMaterialsWithoutGrids, comboBoxMaterialsWithOutGrids_Value, 15, 100, comboWidth, self.comboBoxDataMaterialsWithOutGrids);
  comboBoxMaterialsWithOutGrids_Value = comboBoxMaterialsWithOutGrids_ui;
  if uiButton("Set", nil, comboWidth + 25, 100, 100, 35, UI_COLOR_RED) then
    consolePerformCommand("me_activematerial structural/dev/" .. comboBoxMaterialsWithOutGrids_ui);
  end

  nvgText(0, 60, "Grid");
  comboBoxMaterialsWithGrids_ui = uiComboBox(contentlistMaterialsWithGrids, comboBoxMaterialsWithGrids_Value, 15, 45, comboWidth, self.comboBoxDataMaterialsWithGrids);
  comboBoxMaterialsWithGrids_Value = comboBoxMaterialsWithGrids_ui;
  if uiButton("Set", nil, comboWidth + 25, 45, 100, 35, UI_COLOR_RED) then
    consolePerformCommand("me_activematerial structural/dev/" .. comboBoxMaterialsWithGrids_ui);
  end
end

require "base/internal/ui/reflexcore"

--List of effects folders
local EffectsList =
{
	"beams",
	"cable",
	"chains",
	"fans",
	"grates",
	"lights",
	"misc",
	"pillars",
	"pipes",
	"railings",
	"sheets",
	"vents",
	"windows",
	"level"
}

--Level
local contentlistLevel =
{
	"internal/misc/reflectionprobe",
	"internal/world/teleporter/teleporter_frame_L",
	"internal/world/teleporter/teleporter_frame_R",
	"internal/world/teleporter/teleporter_portal",
	"structural/decals/decal_dev_logo_reflex"
}

--Beams
local contentlistBeams =
{
	"beams/IBeam_Bot",
	"beams/IBeam_HorizontalEnd",
	"beams/IBeam_HorizontalEnd2",
	"beams/IBeam_Support_45",
	"beams/IBeam_Support_45_32",
	"beams/IBeam_Tiling",
	"beams/IBeam_Top",
	"beams/IBeam_VSupport2",
	"beams/IBeam_VSupport_End2"
}

--Cables
local contentlistCables =
{
	"cables/cable_f_coiled",
	"cables/cable_h_straight_128x16",
	"cables/cable_h_straight_128x32",
	"cables/cable_h_straight_128x4",
	"cables/cable_h_straight_128x8",
	"cables/cable_m_bend_90_16",
	"cables/cable_m_straight_128",
	"cables/cable_v_straight_128",
	"cables/cable_v_straight_128_coiled"
}

--Chains
local contentlistChains =
{
	"structural/industrial/chains/chain_floor_01",
	"structural/industrial/chains/chain_floor_02",
	"structural/industrial/chains/chain_floor_03",
	"structural/industrial/chains/chain_hang_128x16",
	"structural/industrial/chains/chain_hang_128x256",
	"structural/industrial/chains/chain_hang_256x256",
	"structural/industrial/chains/chain_hang_256x32",
	"structural/industrial/chains/chain_hang_394x196",
	"structural/industrial/chains/chain_hook",
	"structural/industrial/chains/chain_mount",
	"structural/industrial/chains/chain_pulley_01",
	"structural/industrial/chains/chain_v_128",
	"structural/industrial/chains/chain_v_192",
	"structural/industrial/chains/chain_v_256",
	"structural/industrial/chains/chain_v_64"
}

--Fans
local contentlistFans =
{
	"fans/fan_128_blades",
	"fans/fan_128_main",
	"fans/fan_vent_128_frame",
	"fans/fan_vent_128_frame_closed"
}

--Grates
local contentlistGrates =
{
	"grates/grate_128x128x8_txy"
}

--Lights
local contentlistLights =
{
	"lights/ceil_spot1/ceil_spot1_light",
	"lights/flood1/flood1_light",
	"lights/light_flood/light_flood",
	"lights/light_fluro/light_fluro_twin_64_w",
	"lights/light_rnd/light_rnd",
	"lights/light_spot_sml/light_spot_sml",
	"lights/light_step_sml/light_step_sml",
	"lights/light_wall/light_wall",
	"lights/light_wall/light_wall2",
	"lights/light_wall_rect/light_wall_rect",
	"lights/light_wall_sml/light_wall_sml",
	"lights/wall_tube1/wall_tube1_light",
	"lights/wall_tube2/wall_tube2_light"
}

--Misc
local contentlistMisc =
{
	"misc/misc_alarm",
	"misc/misc_clock"
}

--Pillars
local contentlistPillars =
{
	"pillars/pillar_base_01",
	"pillars/pillar_girder_01"
}

--Pipes
local contentlistPipes =
{
	"pipes/64/pipe_64_128",
	"pipes/64/pipe_64_128_end",
	"pipes/64/pipe_64_256",
	"pipes/64/pipe_64_512",
	"pipes/64/pipe_64_bend90",
	"pipes/64/pipe_64_end",
	"pipes/64/pipe_64_end_drain",
	"pipes/64/pipe_64_tjunc",
	"structural/industrial/pipes/small/pipe_bend_180",
	"structural/industrial/pipes/small/pipe_bend_90",
	"structural/industrial/pipes/small/pipe_booster",
	"structural/industrial/pipes/small/pipe_clamp",
	"structural/industrial/pipes/small/pipe_join",
	"structural/industrial/pipes/small/pipe_join2",
	"structural/industrial/pipes/small/pipe_junc_4way",
	"structural/industrial/pipes/small/pipe_junc_t",
	"structural/industrial/pipes/small/pipe_mount",
	"structural/industrial/pipes/small/pipe_sprinkler",
	"structural/industrial/pipes/small/pipe_straight_16",
	"structural/industrial/pipes/small/pipe_straight_32",
	"structural/industrial/pipes/small/pipe_straight_32_2",
	"structural/industrial/pipes/small/pipe_straight_32_3",
	"structural/industrial/pipes/small/pipe_valve1",
	"structural/industrial/pipes/small/pipe_valve2"
}

--Railings
local contentlistRailings =
{
	"railings/railing_bend_90",
	"railings/railing_end",
	"railings/railing_end2",
	"railings/railing_post",
	"railings/railing_stairs",
	"railings/railing_stairs_bot",
	"railings/railing_stairs_post",
	"railings/railing_stairs_top",
	"railings/railing_straight",
	"railings/railing_straight_half"
}

--Sheets
local contentlistSheets =
{
	"sheets/sheet_iron",
	"sheets/sheet_iron_b",
	"sheets/sheet_iron_c",
	"sheets/sheet_iron_d"
}

--Vents
local contentlistVents =
{
	"vents/vent_128x48x6",
	"vents/vent_48x32x4",
	"vents/vent_48x32x4_2",
	"vents/vent_64x32x4",
	"vents/vent_64x64",
	"vents/vent_rnd_64x64"
}

--Windows
local contentlistWindows =
{
	"windows/windows_sqr_01_frame",
	"windows/windows_sqr_01_smashed_01",
	"windows/windows_sqr_01_smashed_02",
	"windows/windows_sqr_01_smashed_03",
	"windows/windows_sqr_01_whole_01",
	"windows/windows_sqr_01_whole_02",
	"windows/windows_sqr_01_whole_03"
}

local comboWidth = 340;
local comboBoxEffectsList_Value = "beams";
local value = "";

IndustrialEffectsWidget =
{
	comboBoxDataEffectsList = {},
	comboBoxDataEffects = {},
	canPosition = true
	--canHide = false,
	--isMenu = true
};
registerWidget("IndustrialEffectsWidget");

function IndustrialEffectsWidget:draw()
	if shouldShowHUD() then return end;

	nvgBeginPath();
	nvgRect(-20,-30,375,520);
	nvgFillColor(Color(20,20,20,128));
	nvgFill();

	nvgFontSize(45);
	nvgFillColor(Color(255,255,255));
	nvgTextAlign(NVG_ALIGN_LEFT, NVG_ALIGN_MIDDLE);
	nvgText(70, 5, "Industrial Effects");

	nvgFontSize(35);
	nvgTextAlign(NVG_ALIGN_RIGHT, NVG_ALIGN_MIDDLE);

	if comboBoxEffectsList_Value == "beams" then
		value_ui = uiScrollSelection(contentlistBeams, value, 0, 75, 340, 360, self.comboBoxDataEffects);
	elseif comboBoxEffectsList_Value == "cable" then
		value_ui = uiScrollSelection(contentlistCables, value, 0, 75, 340, 360, self.comboBoxDataEffects);
	elseif comboBoxEffectsList_Value == "chains" then
		value_ui = uiScrollSelection(contentlistChains, value, 0, 75, 340, 360, self.comboBoxDataEffects);
	elseif comboBoxEffectsList_Value == "fans" then
		value_ui = uiScrollSelection(contentlistFans, value, 0, 75, 340, 360, self.comboBoxDataEffects);
	elseif comboBoxEffectsList_Value == "grates" then
		value_ui = uiScrollSelection(contentlistGrates, value, 0, 75, 340, 360, self.comboBoxDataEffects);
	elseif comboBoxEffectsList_Value == "lights" then
		value_ui = uiScrollSelection(contentlistLights, value, 0, 75, 340, 360, self.comboBoxDataEffects);
	elseif comboBoxEffectsList_Value == "misc" then
		value_ui = uiScrollSelection(contentlistMisc, value, 0, 75, 340, 360, self.comboBoxDataEffects);
	elseif comboBoxEffectsList_Value == "pillars" then
		value_ui = uiScrollSelection(contentlistPillars, value, 0, 75, 340, 360, self.comboBoxDataEffects);
	elseif comboBoxEffectsList_Value == "pipes" then
		value_ui = uiScrollSelection(contentlistPipes, value, 0, 75, 340, 360, self.comboBoxDataEffects);
	elseif comboBoxEffectsList_Value == "railings" then
		value_ui = uiScrollSelection(contentlistRailings, value, 0, 75, 340, 360, self.comboBoxDataEffects);
	elseif comboBoxEffectsList_Value == "sheets" then
		value_ui = uiScrollSelection(contentlistSheets, value, 0, 75, 340, 360, self.comboBoxDataEffects);
	elseif comboBoxEffectsList_Value == "vents" then
		value_ui = uiScrollSelection(contentlistVents, value, 0, 75, 340, 360, self.comboBoxDataEffects);
	elseif comboBoxEffectsList_Value == "windows" then
		value_ui = uiScrollSelection(contentlistWindows, value, 0, 75, 340, 360, self.comboBoxDataEffects);
	elseif comboBoxEffectsList_Value == "level" then
		value_ui = uiScrollSelection(contentlistLevel, value, 0, 75, 340, 360, self.comboBoxDataEffects);
	end

	local newSelectedWidget_ui = uiEditBox(value_ui, 0, 445, 340);
	if value ~= newSelectedWidget_ui then
		value = "structural/industrial/" .. newSelectedWidget_ui;
	end
	comboBoxEffectsList_ui = uiComboBox(EffectsList, comboBoxEffectsList_Value, 0, 35, comboWidth, self.comboBoxDataEffectsList);
	comboBoxEffectsList_Value = comboBoxEffectsList_ui;
end

Share this post


Link to post
Share on other sites

Fixed the chains, added the light mounts and lava steam.

require "base/internal/ui/reflexcore"
-- we need to require this file, because there is some basic functionality
-- like shouldShowHUD(), Color() and NVG_* constants

--List of effects folders
local EffectsList =
{
	"beams",
	"cable",
	"chains",
	"fans",
	"grates",
	"lights",
	"misc",
	"pillars",
	"pipes",
	"railings",
	"sheets",
	"vents",
	"windows",
	"level"
}

--Level
local contentlistLevel =
{
	"internal/misc/reflectionprobe",
	"internal/effects/steam/steam_lava",
	"internal/world/teleporter/teleporter_frame_L",
	"internal/world/teleporter/teleporter_frame_R",
	"internal/world/teleporter/teleporter_portal",
	"structural/decals/decal_dev_logo_reflex"
}

--Beams
local contentlistBeams =
{
	"beams/IBeam_Bot",
	"beams/IBeam_HorizontalEnd",
	"beams/IBeam_HorizontalEnd2",
	"beams/IBeam_Support_45",
	"beams/IBeam_Support_45_32",
	"beams/IBeam_Tiling",
	"beams/IBeam_Top",
	"beams/IBeam_VSupport2",
	"beams/IBeam_VSupport_End2"
}

--Cables
local contentlistCables =
{
	"cables/cable_f_coiled",
	"cables/cable_h_straight_128x16",
	"cables/cable_h_straight_128x32",
	"cables/cable_h_straight_128x4",
	"cables/cable_h_straight_128x8",
	"cables/cable_m_bend_90_16",
	"cables/cable_m_straight_128",
	"cables/cable_v_straight_128",
	"cables/cable_v_straight_128_coiled"
}

--Chains
local contentlistChains =
{
	"chains/chain_floor_01",
	"chains/chain_floor_02",
	"chains/chain_floor_03",
	"chains/chain_hang_128x16",
	"chains/chain_hang_128x256",
	"chains/chain_hang_256x256",
	"chains/chain_hang_256x32",
	"chains/chain_hang_394x196",
	"chains/chain_hook",
	"chains/chain_mount",
	"chains/chain_pulley_01",
	"chains/chain_v_128",
	"chains/chain_v_192",
	"chains/chain_v_256",
	"chains/chain_v_64"
}

--Fans
local contentlistFans =
{
	"fans/fan_128_blades",
	"fans/fan_128_main",
	"fans/fan_vent_128_frame",
	"fans/fan_vent_128_frame_closed"
}

--Grates
local contentlistGrates =
{
	"grates/grate_128x128x8_txy"
}

--Lights
local contentlistLights =
{
	"lights/ceil_spot1/ceil_spot1_mount",
	"lights/ceil_spot1/ceil_spot1_link",
	"lights/ceil_spot1/ceil_spot1_light",
	"lights/flood1/flood1_mount",
	"lights/flood1/flood1_light",
	"lights/light_flood/light_flood",
	"lights/light_fluro/light_fluro_twin_64_w",
	"lights/light_rnd/light_rnd",
	"lights/light_spot_sml/light_spot_sml",
	"lights/light_step_sml/light_step_sml",
	"lights/light_wall/light_wall",
	"lights/light_wall/light_wall2",
	"lights/light_wall_rect/light_wall_rect",
	"lights/light_wall_sml/light_wall_sml",
	"lights/wall_tube1/wall_tube1_mount",
	"lights/wall_tube1/wall_tube1_light",
	"lights/wall_tube2/wall_tube2_light"
}

--Misc
local contentlistMisc =
{
	"misc/misc_alarm",
	"misc/misc_clock"
}

--Pillars
local contentlistPillars =
{
	"pillars/pillar_base_01",
	"pillars/pillar_girder_01"
}

--Pipes
local contentlistPipes =
{
	"pipes/64/pipe_64_128",
	"pipes/64/pipe_64_128_end",
	"pipes/64/pipe_64_256",
	"pipes/64/pipe_64_512",
	"pipes/64/pipe_64_bend90",
	"pipes/64/pipe_64_end",
	"pipes/64/pipe_64_end_drain",
	"pipes/64/pipe_64_tjunc",
	"pipes/small/pipe_bend_180",
	"pipes/small/pipe_bend_90",
	"pipes/small/pipe_booster",
	"pipes/small/pipe_clamp",
	"pipes/small/pipe_join",
	"pipes/small/pipe_join2",
	"pipes/small/pipe_junc_4way",
	"pipes/small/pipe_junc_t",
	"pipes/small/pipe_mount",
	"pipes/small/pipe_sprinkler",
	"pipes/small/pipe_straight_16",
	"pipes/small/pipe_straight_32",
	"pipes/small/pipe_straight_32_2",
	"pipes/small/pipe_straight_32_3",
	"pipes/small/pipe_valve1",
	"pipes/small/pipe_valve2"
}

--Railings
local contentlistRailings =
{
	"railings/railing_bend_90",
	"railings/railing_end",
	"railings/railing_end2",
	"railings/railing_post",
	"railings/railing_stairs",
	"railings/railing_stairs_bot",
	"railings/railing_stairs_post",
	"railings/railing_stairs_top",
	"railings/railing_straight",
	"railings/railing_straight_half"
}

--Sheets
local contentlistSheets =
{
	"sheets/sheet_iron",
	"sheets/sheet_iron_b",
	"sheets/sheet_iron_c",
	"sheets/sheet_iron_d"
}

--Vents
local contentlistVents =
{
	"vents/vent_128x48x6",
	"vents/vent_48x32x4",
	"vents/vent_48x32x4_2",
	"vents/vent_64x32x4",
	"vents/vent_64x64",
	"vents/vent_rnd_64x64"
}

--Windows
local contentlistWindows =
{
	"windows/windows_sqr_01_frame",
	"windows/windows_sqr_01_smashed_01",
	"windows/windows_sqr_01_smashed_02",
	"windows/windows_sqr_01_smashed_03",
	"windows/windows_sqr_01_whole_01",
	"windows/windows_sqr_01_whole_02",
	"windows/windows_sqr_01_whole_03"
}

local objectWidth = 360;
local comboBoxEffectsList_Value = "beams";
local value = "";

IndustrialEffectsWidget =
{
	comboBoxDataEffectsList = {},
	comboBoxDataEffects = {},
	canPosition = true
	--canHide = false,
	--isMenu = true
};
registerWidget("IndustrialEffectsWidget");

function IndustrialEffectsWidget:draw()
	if shouldShowHUD() then return end;

	nvgBeginPath();
	nvgRect(-20,-30,395,525);
	nvgFillColor(Color(20,20,20,128));
	nvgFill();

	nvgFontSize(45);
	nvgFillColor(Color(255,255,255));
	nvgTextAlign(NVG_ALIGN_LEFT, NVG_ALIGN_MIDDLE);
	nvgText(70, 5, "Industrial Effects");

	nvgFontSize(35);
	nvgTextAlign(NVG_ALIGN_RIGHT, NVG_ALIGN_MIDDLE);

	if comboBoxEffectsList_Value == "beams" then
		value_ui = uiScrollSelection(contentlistBeams, value, 0, 75, objectWidth, 360, self.comboBoxDataEffects);
	elseif comboBoxEffectsList_Value == "cable" then
		value_ui = uiScrollSelection(contentlistCables, value, 0, 75, objectWidth, 360, self.comboBoxDataEffects);
	elseif comboBoxEffectsList_Value == "chains" then
		value_ui = uiScrollSelection(contentlistChains, value, 0, 75, objectWidth, 360, self.comboBoxDataEffects);
	elseif comboBoxEffectsList_Value == "fans" then
		value_ui = uiScrollSelection(contentlistFans, value, 0, 75, objectWidth, 360, self.comboBoxDataEffects);
	elseif comboBoxEffectsList_Value == "grates" then
		value_ui = uiScrollSelection(contentlistGrates, value, 0, 75, objectWidth, 360, self.comboBoxDataEffects);
	elseif comboBoxEffectsList_Value == "lights" then
		value_ui = uiScrollSelection(contentlistLights, value, 0, 75, objectWidth, 360, self.comboBoxDataEffects);
	elseif comboBoxEffectsList_Value == "misc" then
		value_ui = uiScrollSelection(contentlistMisc, value, 0, 75, objectWidth, 360, self.comboBoxDataEffects);
	elseif comboBoxEffectsList_Value == "pillars" then
		value_ui = uiScrollSelection(contentlistPillars, value, 0, 75, objectWidth, 360, self.comboBoxDataEffects);
	elseif comboBoxEffectsList_Value == "pipes" then
		value_ui = uiScrollSelection(contentlistPipes, value, 0, 75, objectWidth, 360, self.comboBoxDataEffects);
	elseif comboBoxEffectsList_Value == "railings" then
		value_ui = uiScrollSelection(contentlistRailings, value, 0, 75, objectWidth, 360, self.comboBoxDataEffects);
	elseif comboBoxEffectsList_Value == "sheets" then
		value_ui = uiScrollSelection(contentlistSheets, value, 0, 75, objectWidth, 360, self.comboBoxDataEffects);
	elseif comboBoxEffectsList_Value == "vents" then
		value_ui = uiScrollSelection(contentlistVents, value, 0, 75, objectWidth, 360, self.comboBoxDataEffects);
	elseif comboBoxEffectsList_Value == "windows" then
		value_ui = uiScrollSelection(contentlistWindows, value, 0, 75, objectWidth, 360, self.comboBoxDataEffects);
	elseif comboBoxEffectsList_Value == "level" then
		value_ui = uiScrollSelection(contentlistLevel, value, 0, 75, objectWidth, 360, self.comboBoxDataEffects);
	end

	local newSelectedWidget_ui = uiEditBox(value_ui, 0, 445, objectWidth);

	if value ~= newSelectedWidget_ui then
		if comboBoxEffectsList_Value ~= "level" then
			value = "structural/industrial/" .. newSelectedWidget_ui;
		else
			value = newSelectedWidget_ui;
		end
	end

	comboBoxEffectsList_ui = uiComboBox(EffectsList, comboBoxEffectsList_Value, 0, 35, objectWidth, self.comboBoxDataEffectsList);
	comboBoxEffectsList_Value = comboBoxEffectsList_ui;
end

Share this post


Link to post
Share on other sites

I just found out that the race checkpoint/start/finish are not materials they are entities like a separate brush. So setting a worldspawn brush to the race material does nothing except make it visually look like it.

Share this post


Link to post
Share on other sites

I left in meta in Misc.. idk if it should be a world type like the others that where removed or if its right?

​I think its for weaponrestrictors in race mode. So its like the start/finish trigger brushes.

Share this post


Link to post
Share on other sites

some other things for effects, first 2 are animated:

"internal/misc/respawn",
"internal/items/health/health_mega_active",

"internal/characters/common/characters_resist",
"internal/items/powerup_quad/powerup_quad_spawned",
"internal/items/powerup_protect/powerup_protect_pickedup"

maybe for an extra FX category?

 

Best

Edited by Ohm sweet

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×