Skip to content

Commit

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

- Model + Wreck added
- working animation
- unitdef
- GL4LUPS AFUS orb

* Buildpic - Buildmenus

Custom Buildpic added. Also added to the respective cons.

Inserted in the buildmenu configs for Grid and Legacy

* ColVol Adjustments

* Yardmap Removal & Footprint correction

* ColVol Size Adjust

* smallen the colvols slightly

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

* Update icontypes.lua

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

---------

Co-authored-by: Zephyr Skies <[email protected]>
Co-authored-by: Protar <[email protected]>
  • Loading branch information
3 people authored Jan 11, 2025
1 parent 0fb5ee0 commit 8e012b2
Show file tree
Hide file tree
Showing 13 changed files with 335 additions and 6 deletions.
4 changes: 4 additions & 0 deletions gamedata/icontypes.lua
Original file line number Diff line number Diff line change
Expand Up @@ -1111,6 +1111,10 @@ local icontypes = {
bitmap = "icons/hazardous.png",
size = 1.88999987
},
legafus = {
bitmap = "icons/energy5_1.85.png",
size = 1.9425
},
legatorpbomber = {
bitmap = "icons/air_t2_torpbomber.png",
size = 1.67999995
Expand Down
11 changes: 11 additions & 0 deletions luaui/Widgets/gfx_lupsgl4_orbs.lua
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,13 @@ local armafusShieldSphere = table.merge(defaults, {
--colormap2 = { {0.2, 0.2, 1, 0.7},{0.2, 0.2, 1, 0.75},{0.2, 0.2, 1, 0.75},{0.2, 0.2, 1, 0.7} },
})

local legafusShieldSphere = table.merge(defaults, {
pos = { 0, 60, 0 },
size = 36,
light = 4.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.2, 1, 0.7},{0.2, 0.2, 1, 0.75},{0.2, 0.2, 1, 0.75},{0.2, 0.2, 1, 0.7} },
})
local corfusShieldSphere = table.merge(defaults, {
pos = { 0, 51, 0 },
size = 23,
Expand Down Expand Up @@ -146,6 +153,10 @@ local UnitEffects = {
{ class = 'ShieldSphere', options = armafusShieldSphere },
{ class = 'ShieldJitter', options = { layer = -16, life = math.huge, pos = { 0, 60, 0 }, size = 28.5, precision = 22, repeatEffect = true } },
},
["legafus"] = {
{ class = 'ShieldSphere', options = legafusShieldSphere },
{ class = 'ShieldJitter', options = { layer = -16, life = math.huge, pos = { 0, 60, 0 }, size = 38.5, precision = 22, repeatEffect = true } },
},
["resourcecheat"] = {
{ 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
1 change: 1 addition & 0 deletions luaui/configs/buildmenu_sorting.lua
Original file line number Diff line number Diff line change
Expand Up @@ -501,6 +501,7 @@ local unitOrderTable = {
['corfus'] = 101600,
['armafus'] = 101700,
['corafus'] = 101750,
['legafus'] = 101775,

--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", "corafus", }, -- moho, fusion, afus
{ "legmoho", "corfus", "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", "corafus", }, -- moho, fusion, afus
{ "legmoho", "corfus", "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", "corafus", }, -- moho, fusion, afus
{ "legmoho", "corfus", "legafus", }, -- moho, fusion, afus
{ "cormmkr", "legageo", "cormexp","coruwageo", }, -- T2 converter, T2 geo, armed moho
{ "coruwadves", "legamstor", }, -- hardened energy storage, hardened metal storage,
},
Expand Down
Binary file added objects3d/Units/legafus.s3o
Binary file not shown.
Binary file added objects3d/Units/legafus_dead.s3o
Binary file not shown.
214 changes: 214 additions & 0 deletions scripts/Units/legafus.bos
Original file line number Diff line number Diff line change
@@ -0,0 +1,214 @@
#define TA // This is a TA script

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

piece base, arm1b, arm1m, arm1t, arm2b, arm2m, arm2t, arm3b, arm3m, arm3t, arm4b, arm4m, arm4t, piston1, piston2, piston3, piston4, 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"
//#define ARMSPEED <8>
//#define ARMSPEED2 <8>

ArmSwing() {
signal 4;
set-signal-mask 4;
// var turnAngle;
while(TRUE) {
// turnAngle = rand(0, <1.2>);
// turnAngle = turnAngle +<15>;
// turn arm1t to z-axis (0-turnAngle) speed ARMSPEED;
// turn arm2t to x-axis (0-turnAngle) speed ARMSPEED;
// turn arm3t to z-axis turnAngle speed ARMSPEED;
// turn arm4t to x-axis turnAngle speed ARMSPEED;
// turn arm1t to x-axis rand(0, <1.2>) speed ARMSPEED2;
// turn arm2t to z-axis rand(0, <1.2>) speed ARMSPEED2;
// turn arm3t to x-axis rand(0, <1.2>) speed ARMSPEED2;
// turn arm4t to z-axis rand(0, <1.2>) speed ARMSPEED2;
// wait-for-turn arm1t around z-axis;
// wait-for-turn arm1t around x-axis;
// move away from orb
turn arm1b to x-axis <-5> speed <15>;
turn arm1m to x-axis <5> speed <10>;
turn piston1 to x-axis <-5> speed <10>;
turn arm1t to z-axis <2> speed <15>;
turn arm2b to z-axis <-5> speed <15>;
turn arm2m to z-axis <5> speed <10>;
turn piston2 to z-axis <-5> speed <10>;
turn arm2t to x-axis <2> speed <15>;
turn arm3b to x-axis <5> speed <15>;
turn arm3m to x-axis <-5> speed <10>;
turn piston3 to x-axis <5> speed <10>;
turn arm3t to z-axis <-2> speed <15>;
turn arm4b to z-axis <5> speed <15>;
turn arm4m to z-axis <-5> speed <10>;
turn piston4 to z-axis <5> speed <10>;
turn arm4t to x-axis <-2> speed <15>;
sleep(2600);
// move towards orb
turn arm1b to x-axis <5> speed <10>;
turn arm1m to x-axis <-5> speed <15>;
turn piston1 to x-axis <5> speed <12>;
turn arm1t to z-axis <-2> speed <15>;
turn arm2b to z-axis <5> speed <10>;
turn arm2m to z-axis <-5> speed <15>;
turn piston2 to z-axis <5> speed <12>;
turn arm2t to x-axis <-2> speed <15>;
turn arm3b to x-axis <-5> speed <10>;
turn arm3m to x-axis <5> speed <15>;
turn piston3 to x-axis <-5> speed <12>;
turn arm3t to z-axis <2> speed <15>;
turn arm4b to z-axis <-5> speed <10>;
turn arm4m to z-axis <5> speed <15>;
turn piston4 to z-axis <-5> speed <12>;
turn arm4t to x-axis <2> speed <15>;
sleep(2600);
// reset
turn arm1b to x-axis <0> speed <10>;
turn arm1m to x-axis <0> speed <10>;
turn piston1 to x-axis <0> speed <10>;
turn arm1t to z-axis <0> speed <15>;
turn arm2b to z-axis <0> speed <10>;
turn arm2m to z-axis <0> speed <10>;
turn piston2 to z-axis <0> speed <10>;
turn arm2t to x-axis <0> speed <15>;
turn arm3b to x-axis <0> speed <10>;
turn arm3m to x-axis <0> speed <10>;
turn piston3 to x-axis <0> speed <10>;
turn arm3t to z-axis <0> speed <15>;
turn arm4b to z-axis <0> speed <10>;
turn arm4m to z-axis <0> speed <10>;
turn piston4 to z-axis <0> speed <10>;
turn arm4t to x-axis <0> speed <15>;
sleep(2600);
}
}


Go()
{
start-script ArmSwing();
set ARMORED to 1;
return (0);
}

Stop()
{
signal 4;
spin arm1t around y-axis speed <0.000000>;
spin arm2t around y-axis speed <0.000000>;
spin arm3t around y-axis speed <0.000000>;
spin arm4t around y-axis speed <0.000000>;
move arm1t to z-axis [0] speed [0];
move arm2t to x-axis [0] speed [0];
move arm3t to z-axis [0] speed [0];
move arm4t to x-axis [0] speed [0];
set ARMORED to 0;
return (0);
}
Create()
{
call-script InitState();
while( get BUILD_PERCENT_LEFT )
{
sleep 1000;
}
call-script Go();
return (0);

}

SetStunned(State)
{
Stunned = State;
if (Stunned) {
hide emit;
call-script Stop();
} else {
show emit;
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 <= 12 )
{
corpsetype = 1;
return (corpsetype);
}
if( severity <= 50 )
{
corpsetype = 2;
return (corpsetype);
}
if( severity <= 99 )
{
corpsetype = 3;
return (corpsetype);
}
corpsetype = 3;
explode arm1t type SMOKE | FIRE | EXPLODE_ON_HIT | BITMAP3 | NOHEATCLOUD;
explode arm2t type SMOKE | FIRE | EXPLODE_ON_HIT | BITMAP5 | NOHEATCLOUD;
explode arm3t type SMOKE | FIRE | EXPLODE_ON_HIT | BITMAP5 | NOHEATCLOUD;
explode arm4t type SMOKE | FIRE | EXPLODE_ON_HIT | BITMAP5 | NOHEATCLOUD;
return (corpsetype);
}
Binary file added scripts/Units/legafus.cob
Binary file not shown.
Binary file added unitpics/legafus.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 @@ -37,7 +37,7 @@ return {
workertime = 100,
buildoptions = {
"corfus",
"corafus",
"legafus",
"legageo",
"coruwageo",
"legrampart",
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 @@ -40,7 +40,7 @@ return {
workertime = 180,
buildoptions = {
"corfus",
"corafus",
"legafus",
"leggant",
"legageo",
"legrampart",
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 @@ -43,7 +43,7 @@ return {
workertime = 250,
buildoptions = {
[1] = "corfus",
[2] = "corafus",
[2] = "legafus",
[3] = "legageo",
[4] = "legrampart",
[5] = "legmoho",
Expand Down
Loading

0 comments on commit 8e012b2

Please sign in to comment.