diff --git a/gamedata/armordefs.lua b/gamedata/armordefs.lua index 306bf1bff0e..7ed1af26280 100644 --- a/gamedata/armordefs.lua +++ b/gamedata/armordefs.lua @@ -428,6 +428,7 @@ local armorDefs = { "legrl", "legrhapsis", "legsilo", + "legfus", "coruwgeo", "coruwageo", diff --git a/gamedata/icontypes.lua b/gamedata/icontypes.lua index ea76083a319..116012976a0 100644 --- a/gamedata/icontypes.lua +++ b/gamedata/icontypes.lua @@ -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 diff --git a/language/en/units.json b/language/en/units.json index 9ba584b6c36..41df6eded0d 100644 --- a/language/en/units.json +++ b/language/en/units.json @@ -726,6 +726,7 @@ "legfloat": "Triton", "legfort": "Tyrannus", "legfortt4": "Epic Tyrannus", + "legfus": "Fusion Reactor", "legapt3": "Experimental Aircraft Gantry", "leggant": "Experimental Gantry", "leggat": "Decurion", @@ -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", diff --git a/luaui/Widgets/gfx_lupsgl4_orbs.lua b/luaui/Widgets/gfx_lupsgl4_orbs.lua index 91177fb3a63..89b3939d170 100644 --- a/luaui/Widgets/gfx_lupsgl4_orbs.lua +++ b/luaui/Widgets/gfx_lupsgl4_orbs.lua @@ -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, @@ -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 } }, diff --git a/luaui/configs/DeferredLightsGL4config.lua b/luaui/configs/DeferredLightsGL4config.lua index 0da0e8985d8..c1bdb297400 100644 --- a/luaui/configs/DeferredLightsGL4config.lua +++ b/luaui/configs/DeferredLightsGL4config.lua @@ -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', @@ -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', diff --git a/luaui/configs/buildmenu_sorting.lua b/luaui/configs/buildmenu_sorting.lua index 859c968c388..5c814cb27ca 100644 --- a/luaui/configs/buildmenu_sorting.lua +++ b/luaui/configs/buildmenu_sorting.lua @@ -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, diff --git a/luaui/configs/gridmenu_layouts.lua b/luaui/configs/gridmenu_layouts.lua index f242860e41c..441a910fb44 100644 --- a/luaui/configs/gridmenu_layouts.lua +++ b/luaui/configs/gridmenu_layouts.lua @@ -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, }, @@ -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, }, @@ -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, }, diff --git a/luaui/configs/hotkeys/legacy_keys.txt b/luaui/configs/hotkeys/legacy_keys.txt index f674d429478..802f02f49fc 100644 --- a/luaui/configs/hotkeys/legacy_keys.txt +++ b/luaui/configs/hotkeys/legacy_keys.txt @@ -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 diff --git a/luaui/configs/hotkeys/legacy_keys_60pct.txt b/luaui/configs/hotkeys/legacy_keys_60pct.txt index 255f0706072..5ea804edc2e 100644 --- a/luaui/configs/hotkeys/legacy_keys_60pct.txt +++ b/luaui/configs/hotkeys/legacy_keys_60pct.txt @@ -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 diff --git a/objects3d/Units/legfus.s3o b/objects3d/Units/legfus.s3o new file mode 100644 index 00000000000..8aacc7e677e Binary files /dev/null and b/objects3d/Units/legfus.s3o differ diff --git a/objects3d/Units/legfus_dead.s3o b/objects3d/Units/legfus_dead.s3o new file mode 100644 index 00000000000..cbc61505a2b Binary files /dev/null and b/objects3d/Units/legfus_dead.s3o differ diff --git a/scripts/Units/legfus.bos b/scripts/Units/legfus.bos new file mode 100644 index 00000000000..b8aa5d29dfd --- /dev/null +++ b/scripts/Units/legfus.bos @@ -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; +} diff --git a/scripts/Units/legfus.cob b/scripts/Units/legfus.cob new file mode 100644 index 00000000000..ff47fcc552e Binary files /dev/null and b/scripts/Units/legfus.cob differ diff --git a/unitpics/legfus.dds b/unitpics/legfus.dds new file mode 100644 index 00000000000..b6b43ed5a3a Binary files /dev/null and b/unitpics/legfus.dds differ diff --git a/units/Legion/Constructors/legaca.lua b/units/Legion/Constructors/legaca.lua index 1f05c2406e3..6a51bd1fb6d 100644 --- a/units/Legion/Constructors/legaca.lua +++ b/units/Legion/Constructors/legaca.lua @@ -36,7 +36,7 @@ return { turnrate = 240, workertime = 100, buildoptions = { - "corfus", + "legfus", "legafus", "legageo", "coruwageo", diff --git a/units/Legion/Constructors/legack.lua b/units/Legion/Constructors/legack.lua index 5ec394baf40..fbfce23df1e 100644 --- a/units/Legion/Constructors/legack.lua +++ b/units/Legion/Constructors/legack.lua @@ -39,7 +39,7 @@ return { upright = false, workertime = 180, buildoptions = { - "corfus", + "legfus", "legafus", "leggant", "legageo", diff --git a/units/Legion/Constructors/legacv.lua b/units/Legion/Constructors/legacv.lua index 68e2e5767ad..4f5474ee589 100644 --- a/units/Legion/Constructors/legacv.lua +++ b/units/Legion/Constructors/legacv.lua @@ -42,7 +42,7 @@ return { turnrate = 363, workertime = 250, buildoptions = { - [1] = "corfus", + [1] = "legfus", [2] = "legafus", [3] = "legageo", [4] = "legrampart", diff --git a/units/Legion/Economy/legfus.lua b/units/Legion/Economy/legfus.lua new file mode 100644 index 00000000000..c7914c1f7a8 --- /dev/null +++ b/units/Legion/Economy/legfus.lua @@ -0,0 +1,100 @@ +return { + legfus = { + activatewhenbuilt = true, + buildangle = 4096, + buildpic = "LEGFUS.DDS", + buildtime = 70000, + canrepeat = false, + collisionvolumeoffsets = "0 0 0", + collisionvolumescales = "101 67 69", + collisionvolumetype = "Box", + corpse = "DEAD", + energycost = 21000, + energymake = 1000, + energystorage = 2500, + explodeas = "fusionExplosion", + footprintx = 6, + footprintz = 5, + health = 4450, + hidedamage = true, + idleautoheal = 5, + idletime = 1800, + maxacc = 0, + maxdec = 0, + maxslope = 10, + maxwaterdepth = 0, + metalcost = 4300, + objectname = "Units/LEGFUS.s3o", + script = "Units/LEGFUS.cob", + seismicsignature = 0, + selfdestructas = "fusionExplosionSelfd", + sightdistance = 273, + customparams = { + buildinggrounddecaldecayspeed = 30, + buildinggrounddecalsizex = 6, + buildinggrounddecalsizey = 6, + buildinggrounddecaltype = "decals/legfus_aoplane.dds", + model_author = "Protar", + normaltex = "unittextures/leg_normal.dds", + removestop = true, + removewait = true, + subfolder = "Legion/Economy", + techlevel = 2, + unitgroup = "energy", + usebuildinggrounddecal = true, + }, + featuredefs = { + dead = { + blocking = true, + category = "corpses", + collisionvolumeoffsets = "0 0 0", + collisionvolumescales = "101 67 69", + collisionvolumetype = "Box", + damage = 2700, + featuredead = "HEAP", + footprintx = 6, + footprintz = 5, + height = 40, + metal = 2603, + object = "Units/legfus_dead.s3o", + reclaimable = true, + }, + heap = { + blocking = false, + category = "heaps", + collisionvolumescales = "85.0 14.0 6.0", + collisionvolumetype = "cylY", + damage = 1350, + footprintx = 4, + footprintz = 4, + height = 4, + metal = 1041, + object = "Units/arm4X4A.s3o", + reclaimable = true, + resurrectable = 0, + }, + }, + sfxtypes = { + pieceexplosiongenerators = { + [1] = "deathceg2", + [2] = "deathceg3", + [3] = "deathceg4", + }, + }, + sounds = { + canceldestruct = "cancel2", + underattack = "warning1", + count = { + [1] = "count6", + [2] = "count5", + [3] = "count4", + [4] = "count3", + [5] = "count2", + [6] = "count1", + }, + select = { + [1] = "fusion1", + }, + }, + }, +} diff --git a/units/Legion/Legion EvoCom/legcomlvl10.lua b/units/Legion/Legion EvoCom/legcomlvl10.lua index fb81d9fbf55..d32c57a9556 100644 --- a/units/Legion/Legion EvoCom/legcomlvl10.lua +++ b/units/Legion/Legion EvoCom/legcomlvl10.lua @@ -65,7 +65,7 @@ return { workertime = 1796, buildoptions = { [1] = "legmoho", - [2] = "corfus", + [2] = "legfus", [3] = "legwin", [5] = "cormmkr", [6] = "legadvsol", diff --git a/units/Legion/Legion EvoCom/legcomlvl5.lua b/units/Legion/Legion EvoCom/legcomlvl5.lua index 125dcc8047e..20908db4835 100644 --- a/units/Legion/Legion EvoCom/legcomlvl5.lua +++ b/units/Legion/Legion EvoCom/legcomlvl5.lua @@ -67,7 +67,7 @@ return { [1] = "legmoho", [2] = "legadvsol", [3] = "legwin", - [4] = "corfus", + [4] = "legfus", [5] = "cormmkr", [6] = "legsolar", [7] = "leggeo", diff --git a/units/Legion/Legion EvoCom/legcomlvl6.lua b/units/Legion/Legion EvoCom/legcomlvl6.lua index 165634c39b3..ab46d7439d3 100644 --- a/units/Legion/Legion EvoCom/legcomlvl6.lua +++ b/units/Legion/Legion EvoCom/legcomlvl6.lua @@ -65,7 +65,7 @@ return { workertime = 811, buildoptions = { [1] = "legmoho", - [2] = "corfus", + [2] = "legfus", [3] = "legwin", [5] = "cormmkr", [6] = "legadvsol", diff --git a/units/Legion/Legion EvoCom/legcomlvl7.lua b/units/Legion/Legion EvoCom/legcomlvl7.lua index 33a2802883e..bdf2b5e0e09 100644 --- a/units/Legion/Legion EvoCom/legcomlvl7.lua +++ b/units/Legion/Legion EvoCom/legcomlvl7.lua @@ -65,7 +65,7 @@ return { workertime = 989, buildoptions = { [1] = "legmoho", - [2] = "corfus", + [2] = "legfus", [3] = "legwin", [5] = "cormmkr", [6] = "legadvsol", diff --git a/units/Legion/Legion EvoCom/legcomlvl8.lua b/units/Legion/Legion EvoCom/legcomlvl8.lua index dd4caf45153..8d2f6199d7c 100644 --- a/units/Legion/Legion EvoCom/legcomlvl8.lua +++ b/units/Legion/Legion EvoCom/legcomlvl8.lua @@ -65,7 +65,7 @@ return { workertime = 1207, buildoptions = { [1] = "legmoho", - [2] = "corfus", + [2] = "legfus", [3] = "legwin", [5] = "cormmkr", [6] = "legadvsol", diff --git a/units/Legion/Legion EvoCom/legcomlvl9.lua b/units/Legion/Legion EvoCom/legcomlvl9.lua index 9a668360c96..a57be9a6d19 100644 --- a/units/Legion/Legion EvoCom/legcomlvl9.lua +++ b/units/Legion/Legion EvoCom/legcomlvl9.lua @@ -65,7 +65,7 @@ return { workertime = 1472, buildoptions = { [1] = "legmoho", - [2] = "corfus", + [2] = "legfus", [3] = "legwin", [5] = "cormmkr", [6] = "legadvsol",