Skip to content

Commit

Permalink
Legion FUS Remodel (#4158)
Browse files Browse the repository at this point in the history
* Legion FUS Remodel

* Slight Col and Footprint Adjustments

* adjust lighting, increase colvol

* remove legafus from buildlists

since this doesn't add the legafus it might break buildlists when both this and #4155 are merged separately

Co-Authored-By: Protar <[email protected]>

* add to armordef, icon, name+desc, evocom, legacykeys

Co-Authored-By: Protar <[email protected]>

* fix 2

Co-Authored-By: Protar <[email protected]>

* Update buildmenu_sorting.lua

---------

Co-authored-by: Zephyr Skies <[email protected]>
Co-authored-by: Protar <[email protected]>
Co-authored-by: Zecrus2 <[email protected]>
  • Loading branch information
4 people authored Jan 11, 2025
1 parent 8e012b2 commit e1fdb6a
Show file tree
Hide file tree
Showing 24 changed files with 282 additions and 13 deletions.
1 change: 1 addition & 0 deletions gamedata/armordefs.lua
Original file line number Diff line number Diff line change
Expand Up @@ -428,6 +428,7 @@ local armorDefs = {
"legrl",
"legrhapsis",
"legsilo",
"legfus",

"coruwgeo",
"coruwageo",
Expand Down
4 changes: 4 additions & 0 deletions gamedata/icontypes.lua
Original file line number Diff line number Diff line change
Expand Up @@ -2703,6 +2703,10 @@ local icontypes = {
bitmap = "icons/metalmaker_t1.png",
size = 0.78749996
},
legfus = {
bitmap = "icons/fusion.png",
size = 1.46999991
},
legtriarius = {
bitmap = "icons/ship_destroyer.png",
size = 1.51199996
Expand Down
2 changes: 2 additions & 0 deletions language/en/units.json
Original file line number Diff line number Diff line change
Expand Up @@ -726,6 +726,7 @@
"legfloat": "Triton",
"legfort": "Tyrannus",
"legfortt4": "Epic Tyrannus",
"legfus": "Fusion Reactor",
"legapt3": "Experimental Aircraft Gantry",
"leggant": "Experimental Gantry",
"leggat": "Decurion",
Expand Down Expand Up @@ -1581,6 +1582,7 @@
"legflak": "Anti-Air Gatling Gun",
"legfort": "Flying Fortress",
"legfortt4": "Gigantic Flying Fortress",
"legfus": "Produces 1000 Energy",
"legapt3": "Produces Experimental Units",
"leggant": "Produces Experimental Units",
"leggat": "Armored Assault Tank",
Expand Down
13 changes: 13 additions & 0 deletions luaui/Widgets/gfx_lupsgl4_orbs.lua
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,15 @@ local corfusShieldSphere = table.merge(defaults, {
--colormap2 = { {0.2, 0.6, 0.2, 0.4},{0.2, 0.6, 0.2, 0.45},{0.2, 0.6, 0.2, 0.45},{0.2, 0.6, 0.2, 0.4} },
})

local legfusShieldSphere = table.merge(defaults, {
pos = { 0, 10, 0 },
size = 23,
light = 3.25,
--colormap1 = { {0.9, 0.9, 1, 0.75},{0.9, 0.9, 1, 1.0},{0.9, 0.9, 1, 1.0},{0.9, 0.9, 1, 0.75} },
--colormap2 = { {0.2, 0.6, 0.2, 0.4},{0.2, 0.6, 0.2, 0.45},{0.2, 0.6, 0.2, 0.45},{0.2, 0.6, 0.2, 0.4} },
})


local corgateShieldSphere = table.merge(defaults, {
pos = { 0, 42, 0 },
size = 11,
Expand Down Expand Up @@ -149,6 +158,10 @@ local UnitEffects = {
{ class = 'ShieldSphere', options = corfusShieldSphere },
{ class = 'ShieldJitter', options = { life = math.huge, pos = { 0, 50, 0 }, size = 23.5, precision = 22, repeatEffect = true } },
},
["legfus"] = {
{ class = 'ShieldSphere', options = legfusShieldSphere },
{ class = 'ShieldJitter', options = { life = math.huge, pos = { 0, 19, 0 }, size = 23.5, precision = 22, repeatEffect = true } },
},
["armafus"] = {
{ class = 'ShieldSphere', options = armafusShieldSphere },
{ class = 'ShieldJitter', options = { layer = -16, life = math.huge, pos = { 0, 60, 0 }, size = 28.5, precision = 22, repeatEffect = true } },
Expand Down
21 changes: 21 additions & 0 deletions luaui/configs/DeferredLightsGL4config.lua
Original file line number Diff line number Diff line change
Expand Up @@ -14599,6 +14599,7 @@ local unitLights = {
modelfactor = 0.1, specular = 1.6, scattering = 1.5, lensflare = 0,
lifetime = 0, sustain = 0, animtype = 0},
},

-- fusionorb = {
-- lightType = 'point',
-- pieceName = 'emit',
Expand All @@ -14609,6 +14610,26 @@ local unitLights = {
-- lifetime = 0, sustain = 0, animtype = 0},
-- },
},
['legfus'] = {
fusionglow = {
lightType = 'point',
pieceName = 'emit',
lightConfig = { posx = 0, posy = 5, posz = 0, radius = 45,
color2r = 0, color2g = 0, color2b = 0, colortime = 0,
r = -1, g = 1, b = 1, a = 0.5,
modelfactor = 0.2, specular = 1.2, scattering = 2, lensflare = 0,
lifetime = 0, sustain = 0, animtype = 0},
},
fusionglow2 = {
lightType = 'point',
pieceName = 'emit',
lightConfig = { posx = 0, posy = 5, posz = 0, radius = 55,
color2r = 0, color2g = 0, color2b = 0, colortime = 0,
r = -1, g = 1, b = 1, a = 0.5,
modelfactor = 0.1, specular = 1.2, scattering = 1.5, lensflare = 0,
lifetime = 0, sustain = 0, animtype = 0},
},
},
['corafus'] = {
fusionglow = {
lightType = 'point',
Expand Down
3 changes: 2 additions & 1 deletion luaui/configs/buildmenu_sorting.lua
Original file line number Diff line number Diff line change
Expand Up @@ -499,9 +499,10 @@ local unitOrderTable = {
['armfus'] = 101525,
['armckfus'] = 101550,
['corfus'] = 101600,
['legfus'] = 101650,
['armafus'] = 101700,
['corafus'] = 101750,
['legafus'] = 101775,
['legafus'] = 101780,

--ECO NRG STORAGE
['armestor'] = 101800,
Expand Down
6 changes: 3 additions & 3 deletions luaui/configs/gridmenu_layouts.lua
Original file line number Diff line number Diff line change
Expand Up @@ -1489,7 +1489,7 @@ local unitGrids = {

legack = {
{
{ "legmoho", "corfus", "legafus", }, -- moho, fusion, afus
{ "legmoho", "legfus", "legafus", }, -- moho, fusion, afus
{ "cormmkr", "legageo", "cormexp", }, -- T2 converter, T2 geo, armed moho
{ "coruwadves", "legamstor", }, -- hardened energy storage, hardened metal storage,
},
Expand Down Expand Up @@ -1559,7 +1559,7 @@ local unitGrids = {

legacv = {
{
{ "legmoho", "corfus", "legafus", }, -- moho, fusion, afus
{ "legmoho", "legfus", "legafus", }, -- moho, fusion, afus
{ "cormmkr", "legageo", "cormexp", }, -- T2 converter, T2 geo, armed moho
{ "coruwadves", "legamstor", }, -- hardened energy storage, hardened metal storage,
},
Expand Down Expand Up @@ -1628,7 +1628,7 @@ local unitGrids = {
},
legaca = {
{
{ "legmoho", "corfus", "legafus", }, -- moho, fusion, afus
{ "legmoho", "legfus", "legafus", }, -- moho, fusion, afus
{ "cormmkr", "legageo", "cormexp","coruwageo", }, -- T2 converter, T2 geo, armed moho
{ "coruwadves", "legamstor", }, -- hardened energy storage, hardened metal storage,
},
Expand Down
2 changes: 2 additions & 0 deletions luaui/configs/hotkeys/legacy_keys.txt
Original file line number Diff line number Diff line change
Expand Up @@ -162,6 +162,8 @@ bind sc_x buildunit_armmmkr
bind Shift+sc_x buildunit_armmmkr
bind sc_x buildunit_corfus
bind Shift+sc_x buildunit_corfus
bind sc_x buildunit_legfus
bind Shift+sc_x buildunit_legfus
bind sc_x buildunit_cormmkr
bind Shift+sc_x buildunit_cormmkr
bind sc_x buildunit_armtide
Expand Down
2 changes: 2 additions & 0 deletions luaui/configs/hotkeys/legacy_keys_60pct.txt
Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,8 @@ bind sc_x buildunit_armmmkr
bind Shift+sc_x buildunit_armmmkr
bind sc_x buildunit_corfus
bind Shift+sc_x buildunit_corfus
bind sc_x buildunit_legfus
bind Shift+sc_x buildunit_legfus
bind sc_x buildunit_cormmkr
bind Shift+sc_x buildunit_cormmkr
bind sc_x buildunit_armtide
Expand Down
Binary file added objects3d/Units/legfus.s3o
Binary file not shown.
Binary file added objects3d/Units/legfus_dead.s3o
Binary file not shown.
123 changes: 123 additions & 0 deletions scripts/Units/legfus.bos
Original file line number Diff line number Diff line change
@@ -0,0 +1,123 @@
#define TA // This is a TA script

#include "sfxtype.h"
#include "exptype.h"

piece base, emit;

static-var statechg_DesiredState, statechg_StateChanging;
static-var Stunned;

InitState()
{
statechg_DesiredState = TRUE;
statechg_StateChanging = FALSE;
return (0);
}

#define SMOKEPIECE base
#include "smokeunit_thread_nohit.h"

Go()
{
set ARMORED to 1;
show emit;
}
Stop()
{
set ARMORED to 0;
hide emit;

}
Create()
{
hide emit;
call-script InitState();
while( get BUILD_PERCENT_LEFT )
{
sleep 1000;
}
call-script Go();
return (0);
}

SetStunned(State)
{
Stunned = State;
if (Stunned) {
call-script Stop();
} else {
call-script Go();
}
}


RequestState(requestedstate, currentstate)
{
if( statechg_StateChanging )
{
statechg_DesiredState = requestedstate;
return (0);
}
statechg_StateChanging = TRUE;
currentstate = statechg_DesiredState;
statechg_DesiredState = requestedstate;
while( statechg_DesiredState != currentstate )
{
if( statechg_DesiredState == 0 )
{
call-script Go();
currentstate = 0;
}
if( statechg_DesiredState == 1 )
{
call-script Stop();
currentstate = 1;
}
}
statechg_StateChanging = FALSE;
return (0);
}

Activate()
{
start-script RequestState(0);
return (0);
}

Deactivate()
{
start-script RequestState(1);
return (0);
}

SweetSpot(piecenum)
{
piecenum = base;
return (0);
}

Killed(severity, corpsetype)
{
if( severity <= 25 )
{
corpsetype = 1 ;
explode base type BITMAPONLY | NOHEATCLOUD;
return(corpsetype);
}
if( severity <= 50 )
{
corpsetype = 2 ;
explode base type BITMAPONLY | NOHEATCLOUD;
return(corpsetype);
}
if( severity <= 99 )
{
corpsetype = 3 ;
explode base type BITMAPONLY | NOHEATCLOUD;
return(corpsetype);
}
corpsetype = 3 ;
explode base type BITMAPONLY | NOHEATCLOUD;
return corpsetype;
}
Binary file added scripts/Units/legfus.cob
Binary file not shown.
Binary file added unitpics/legfus.dds
Binary file not shown.
2 changes: 1 addition & 1 deletion units/Legion/Constructors/legaca.lua
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ return {
turnrate = 240,
workertime = 100,
buildoptions = {
"corfus",
"legfus",
"legafus",
"legageo",
"coruwageo",
Expand Down
2 changes: 1 addition & 1 deletion units/Legion/Constructors/legack.lua
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ return {
upright = false,
workertime = 180,
buildoptions = {
"corfus",
"legfus",
"legafus",
"leggant",
"legageo",
Expand Down
2 changes: 1 addition & 1 deletion units/Legion/Constructors/legacv.lua
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ return {
turnrate = 363,
workertime = 250,
buildoptions = {
[1] = "corfus",
[1] = "legfus",
[2] = "legafus",
[3] = "legageo",
[4] = "legrampart",
Expand Down
Loading

0 comments on commit e1fdb6a

Please sign in to comment.