Skip to content

Commit

Permalink
Bugfix Digest (#3531)
Browse files Browse the repository at this point in the history
Wasps no longer out of stat nerfed with animations, also missing tracking tag added, so they can now actually hit things
Cutlass animation bug fixed, also slightly faster projectile
Added hooks for testing balance without corlab opening animation (main game unaffected)
Tremor updated to use one firing mode alone
Siegebreaker brought into new paradigm accordingly
Minesweepers patched to engage with mines on fight-move commands (bypassing engine bug for now)
  • Loading branch information
TheSilverHornet authored Aug 5, 2024
1 parent fdb8c58 commit 42d737e
Show file tree
Hide file tree
Showing 20 changed files with 645 additions and 319 deletions.
3 changes: 0 additions & 3 deletions language/en/interface.json
Original file line number Diff line number Diff line change
Expand Up @@ -281,9 +281,6 @@
"lowTrajectory": "Low Trajectory",
"highTrajectory": "High Trajectory",
"trajectory_tooltip": "Switch artillery firing angle between low and high trajectory",
"siegeMode": "Spread Fire",
"suppressiveFire": "Focused Fire",
"siege_tooltip": "Switches between Focused Fire and longer ranged Spread Fire",
"gauss_tooltip": "Switches between Gauss Cannon and Heavy Plasma Cannon",
"dreadshot": "Normal fire",
"overcharge": "Overcharge",
Expand Down
25 changes: 7 additions & 18 deletions luaui/Widgets/gui_attack_aoe.lua
Original file line number Diff line number Diff line change
Expand Up @@ -233,14 +233,9 @@ local function SetupUnitDef(unitDefID, unitDef)
weaponInfo[unitDefID] = { type = "sector"}
end
weaponInfo[unitDefID].type = "sector"
if ii == 2 then -- hard assumption the second weapon is the active ON weapon
weaponInfo[unitDefID].ONOFF = true
weaponInfo[unitDefID].sector_angle_active = tonumber(weaponDef.customParams.spread_angle)
weaponInfo[unitDefID].sector_shortfall_active = tonumber(weaponDef.customParams.max_range_reduction)
else
weaponInfo[unitDefID].sector_angle = tonumber(weaponDef.customParams.spread_angle)
weaponInfo[unitDefID].sector_shortfall = tonumber(weaponDef.customParams.max_range_reduction)
end
weaponInfo[unitDefID].sector_angle_active = tonumber(weaponDef.customParams.spread_angle)
weaponInfo[unitDefID].sector_shortfall_active = tonumber(weaponDef.customParams.max_range_reduction)

end
end
end
Expand Down Expand Up @@ -828,16 +823,10 @@ function widget:DrawWorld()

-- tremor customdef weapon
if (weaponType == "sector") then
local angle = info.sector_angle
local shortfall = info.sector_shortfall
-- case to catch ON/OFF weapons
if info.ONOFF == true then
local unitStates = Spring.GetUnitStates(aimingUnitID)
if unitStates.active == true then
angle = info.sector_angle_active
shortfall = info.sector_shortfall_active
end
end

local angle = info.sector_angle_active
local shortfall = info.sector_shortfall_active

DrawSectorScatter(angle, shortfall, fx, fy, fz, tx, ty, tz)
return
end
Expand Down
28 changes: 19 additions & 9 deletions scripts/Units/coralab.lua
Original file line number Diff line number Diff line change
Expand Up @@ -8,16 +8,20 @@ local SIG_BUILD = 8;

include("include/util.lua");

local litelab = UnitDefs[unitDefID].customParams.litelab ~= nil

function open()
UnitScript.Signal(SIG_OPENCLOSE);
UnitScript.SetSignalMask(SIG_OPENCLOSE);
--Activate
--UnitScript.Move(side1, z_axis, 0);
UnitScript.Move(side1, z_axis, 24, 24);
Sleep(908);
UnitScript.Move(side2, z_axis, 10, 2.777771);
Sleep(828);
--Open yard
if not litelab then
UnitScript.Move(side1, z_axis, 24, 24);
Sleep(908);
UnitScript.Move(side2, z_axis, 10, 2.777771);
Sleep(828);
--Open yard
end
open_yard();
--Get into buildstance
UnitScript.SetUnitValue(COB.INBUILDSTANCE, 1);
Expand All @@ -31,13 +35,19 @@ function close()
--Close yard
close_yard();
--Deactivate
UnitScript.Move(side1, z_axis, 0, 24);
Sleep(908);
UnitScript.Move(side2, z_axis, 0, 2.777771);
Sleep(828);
if not litelab then
UnitScript.Move(side1, z_axis, 0, 24);
Sleep(908);
UnitScript.Move(side2, z_axis, 0, 2.777771);
Sleep(828);
end
end

function script.Create()
if litelab then
UnitScript.Move(side1, z_axis, 24, 1000);
UnitScript.Move(side2, z_axis, 10, 1000);
end
Hide(nano1);
Hide(nano2);
Hide(nano3);
Expand Down
21 changes: 17 additions & 4 deletions scripts/Units/corape_clean.bos
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,18 @@ Create()
hide rflare;
hide lflare;
gun_1 = rflare;
turn rwing to z-axis <-60> speed <90>;
turn lwing to z-axis <60> speed <90>;

turn rwing to z-axis <0> speed <90>;
turn lwing to z-axis <0> speed <90>;
turn rwing to x-axis <90> speed <90>;
turn lwing to x-axis <90> speed <90>;
//turn rmislink to x-axis <90> speed <90>;
//turn lmislink to x-axis <90> speed <90>;
//turn wing to x-axis <0> -pitch speed <300>;
turn rjet to x-axis <-90> speed <90>;
turn ljet to x-axis <-90> speed <90>;
wait-for-turn rjet around x-axis;
wait-for-turn ljet around x-axis;
SLEEP_UNTIL_UNITFINISHED;
start-script IdleHover();
}
Expand All @@ -44,6 +54,7 @@ Activate()
{
show rthrust;
show lthrust;

}

Deactivate()
Expand Down Expand Up @@ -74,12 +85,13 @@ RestoreAfterDelay()
set-signal-mask SIGNAL_AIM1;
sleep restore_delay;
set-signal-mask 0;
/*
turn rjet to x-axis <0> speed <90>;
turn ljet to x-axis <0> speed <90>;
turn rwing to z-axis <-45> speed <90>;
turn lwing to z-axis <45> speed <90>;
turn rwing to x-axis <0> speed <90>;
turn lwing to x-axis <0> speed <90>;
turn lwing to x-axis <0> speed <90>;//*/
//turn rmislink to x-axis <0> speed <90>;
//turn lmislink to x-axis <-0> speed <90>;

Expand All @@ -99,6 +111,7 @@ AimWeapon1(heading, pitch)
{
signal SIGNAL_AIM1;
set-signal-mask SIGNAL_AIM1;
/*
turn rwing to z-axis <0> speed <90>;
turn lwing to z-axis <0> speed <90>;
turn rwing to x-axis <90> speed <90>;
Expand All @@ -109,7 +122,7 @@ AimWeapon1(heading, pitch)
turn rjet to x-axis <-90> speed <90>;
turn ljet to x-axis <-90> speed <90>;
wait-for-turn rjet around x-axis;
wait-for-turn ljet around x-axis;
wait-for-turn ljet around x-axis;//*/

start-script RestoreAfterDelay();
return (1);
Expand Down
Binary file modified scripts/Units/corape_clean.cob
Binary file not shown.
176 changes: 176 additions & 0 deletions scripts/Units/coravp_lite_clean.bos
Original file line number Diff line number Diff line change
@@ -0,0 +1,176 @@

#include "../recoil_common_includes.h"

#include "../factories_common.h"

piece base,doorl,doorr ,nano1,nano2,nano3,nano4,nano5,nano6,nano7,nano8,pad, cagelight, cagelight_emit, cagelight2, cagelight_emit2;

static-var spray;

// Signal definitions
#define SIGNAL_TURNON 4

Create()
{
move doorl to x-axis [-27.0] now;
move doorr to x-axis [27.0] now;
show pad;
hide nano7;
hide nano8;
hide nano5;
hide nano6;
hide nano1;
hide nano4;
hide nano3;
hide nano2;
hide cagelight_emit;
hide cagelight_emit2;
spray = 0;
}


#define BASEPIECE base
#define MAXTILT 0
#include "../unit_hitbyweaponid_and_smoke.h"

QueryNanoPiece(pieceIndex)
{
spray = (spray + 1) % 8;
pieceIndex = nano1 + spray;
}

Activate()
{
signal SIGNAL_TURNON;
set-signal-mask SIGNAL_TURNON;



FACTORY_OPEN_BUILD;
}

Deactivate()
{
signal SIGNAL_TURNON;
set-signal-mask SIGNAL_TURNON;
sleep 5000;


FACTORY_CLOSE_BUILD;
}

StartBuilding()
{
show nano1;
show nano2;
show nano3;
show nano4;
show nano5;
show nano6;
show nano7;
show nano8;
show cagelight_emit;
show cagelight_emit2;
spin cagelight around y-axis speed <200> accelerate <1>;
spin cagelight2 around y-axis speed <200> accelerate <1>;
}

StopBuilding()
{
hide nano1;
hide nano2;
hide nano3;
hide nano4;
hide nano5;
hide nano6;
hide nano7;
hide nano8;
hide cagelight_emit;
hide cagelight_emit2;

stop-spin cagelight around y-axis decelerate <1>;
stop-spin cagelight2 around y-axis decelerate <1>;


/*
set BUGGER_OFF to 1; // tell units to get out of here
set INBUILDSTANCE to 0; // we turn it off, to wait for the unit to clear the build pad (large aircraft)
sleep 500; // then we wait for 0.5 sec
set INBUILDSTANCE to 1; // we turn it on again, as the next startbuilding and construction will begin when this is 1 again.
set BUGGER_OFF to 0; // ok now we dont mind if they are here
*/
}

QueryBuildInfo(pieceIndex)
{
pieceIndex = pad;
}



Killed(severity, corpsetype)
{
if( severity <= 25 )
{
corpsetype = 1 ;
explode base type BITMAPONLY | NOHEATCLOUD;
//explode doorl type FIRE | SMOKE | FALL | BITMAPONLY | NOHEATCLOUD;
explode nano1 type BITMAPONLY | NOHEATCLOUD;
explode nano2 type BITMAPONLY | NOHEATCLOUD;
explode nano3 type BITMAPONLY | NOHEATCLOUD;
explode nano4 type BITMAPONLY | NOHEATCLOUD;
//explode doorr type BITMAPONLY | NOHEATCLOUD;
explode nano5 type BITMAPONLY | NOHEATCLOUD;
explode nano6 type BITMAPONLY | NOHEATCLOUD;
explode nano7 type BITMAPONLY | NOHEATCLOUD;
explode nano8 type BITMAPONLY | NOHEATCLOUD;
explode pad type BITMAPONLY | NOHEATCLOUD;
return(corpsetype);
}
if( severity <= 50 )
{
corpsetype = 2 ;
explode base type BITMAPONLY | NOHEATCLOUD;
explode nano1 type FALL | NOHEATCLOUD;
explode nano2 type FIRE | SMOKE | FALL | NOHEATCLOUD;
explode nano3 type FIRE | SMOKE | FALL | NOHEATCLOUD;
explode nano4 type FIRE | SMOKE | FALL | NOHEATCLOUD;
explode nano5 type FIRE | SMOKE | FALL | NOHEATCLOUD;
explode nano6 type FIRE | SMOKE | FALL | NOHEATCLOUD;
explode nano7 type FALL | NOHEATCLOUD;
explode nano8 type FIRE | SMOKE | FALL | NOHEATCLOUD;
explode pad type FIRE | SMOKE | FALL | NOHEATCLOUD;
return(corpsetype);
}
if( severity <= 99 )
{
corpsetype = 3 ;
explode base type BITMAPONLY | NOHEATCLOUD;
//explode doorl type BITMAPONLY | NOHEATCLOUD;
explode nano1 type FIRE | SMOKE | FALL | NOHEATCLOUD;
explode nano2 type FIRE | SMOKE | FALL | NOHEATCLOUD;
explode nano3 type FIRE | SMOKE | FALL | NOHEATCLOUD;
explode nano4 type EXPLODE_ON_HIT | FIRE | SMOKE | FALL | NOHEATCLOUD;
//explode doorr type BITMAPONLY | NOHEATCLOUD;
explode nano5 type SMOKE | FALL | NOHEATCLOUD;
explode nano6 type EXPLODE_ON_HIT | FIRE | SMOKE | FALL | NOHEATCLOUD;
explode nano7 type EXPLODE_ON_HIT | FIRE | SMOKE | FALL | NOHEATCLOUD;
explode nano8 type EXPLODE_ON_HIT | FIRE | SMOKE | FALL | NOHEATCLOUD;
explode pad type SMOKE | FALL | NOHEATCLOUD;
return(corpsetype);
}
corpsetype = 3 ;
explode base type BITMAPONLY | NOHEATCLOUD;
//explode doorl type EXPLODE_ON_HIT | FIRE | SMOKE | FALL | NOHEATCLOUD;
explode nano1 type EXPLODE_ON_HIT | FIRE | SMOKE | FALL | NOHEATCLOUD;
explode nano2 type EXPLODE_ON_HIT | FIRE | FALL | NOHEATCLOUD;
explode nano3 type EXPLODE_ON_HIT | FIRE | FALL | NOHEATCLOUD;
explode nano4 type EXPLODE_ON_HIT | FIRE | FALL | NOHEATCLOUD;
//explode doorr type EXPLODE_ON_HIT | FIRE | SMOKE | FALL | NOHEATCLOUD;
explode nano5 type EXPLODE_ON_HIT | FIRE | SMOKE | FALL | NOHEATCLOUD;
explode nano6 type EXPLODE_ON_HIT | FIRE | SMOKE | FALL | NOHEATCLOUD;
explode nano7 type EXPLODE_ON_HIT | FIRE | SMOKE | FALL | NOHEATCLOUD;
explode nano8 type EXPLODE_ON_HIT | FIRE | SMOKE | FALL | NOHEATCLOUD;
explode pad type EXPLODE_ON_HIT | FIRE | SMOKE | FALL | NOHEATCLOUD;
return corpsetype;
}
Binary file added scripts/Units/coravp_lite_clean.cob
Binary file not shown.
13 changes: 13 additions & 0 deletions scripts/Units/corlab.lua
Original file line number Diff line number Diff line change
Expand Up @@ -9,17 +9,21 @@ local SIG_CRANE2=16;

include("include/util.lua");

local litelab = UnitDefs[unitDefID].customParams.litelab ~= nil

function open()
UnitScript.Signal(SIG_OPENCLOSE);
UnitScript.SetSignalMask(SIG_OPENCLOSE);
--Activate
if not litelab then
Move(door1, x_axis, -17, 10);
Move(door2, x_axis, 17, 10);
UnitScript.WaitForMove(door1, x_axis);
Move(crane1,x_axis,21,42);
Move(crane2,x_axis,21,42);
UnitScript.WaitForMove(crane1, x_axis);
Sleep(1000);
end
--Open yard
open_yard();
--Get into buildstance
Expand All @@ -34,16 +38,25 @@ function close()
--Close yard
close_yard();
--Deactivate
if not litelab then
Move(crane1,x_axis,2,20);
Move(crane2,x_axis,2,20);
UnitScript.WaitForMove(crane1, x_axis);
Move(door1, x_axis, 0, 17);
Move(door2, x_axis, 0, 17);
UnitScript.WaitForMove(door1, x_axis);
Sleep(500)
end
end

function script.Create()
if litelab then
Hide(door1);
Hide(door2);
UnitScript.WaitForMove(door1, x_axis);
Move(crane1,x_axis,21,1000);
Move(crane2,x_axis,21,1000);
end
Hide(nano2);
Hide(nano1);
spray = 0;
Expand Down
Loading

0 comments on commit 42d737e

Please sign in to comment.