diff --git a/language/en/interface.json b/language/en/interface.json index 70d61014a85..559f83ce395 100644 --- a/language/en/interface.json +++ b/language/en/interface.json @@ -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", diff --git a/luaui/Widgets/gui_attack_aoe.lua b/luaui/Widgets/gui_attack_aoe.lua index 05c0e07b522..bf27373d940 100644 --- a/luaui/Widgets/gui_attack_aoe.lua +++ b/luaui/Widgets/gui_attack_aoe.lua @@ -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 @@ -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 diff --git a/scripts/Units/coralab.lua b/scripts/Units/coralab.lua index 4ddd8747985..88b511edf55 100644 --- a/scripts/Units/coralab.lua +++ b/scripts/Units/coralab.lua @@ -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); @@ -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); diff --git a/scripts/Units/corape_clean.bos b/scripts/Units/corape_clean.bos index 8a05c771d58..3b349f1eccd 100644 --- a/scripts/Units/corape_clean.bos +++ b/scripts/Units/corape_clean.bos @@ -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(); } @@ -44,6 +54,7 @@ Activate() { show rthrust; show lthrust; + } Deactivate() @@ -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>; @@ -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>; @@ -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); diff --git a/scripts/Units/corape_clean.cob b/scripts/Units/corape_clean.cob index da141418e13..ec735682902 100644 Binary files a/scripts/Units/corape_clean.cob and b/scripts/Units/corape_clean.cob differ diff --git a/scripts/Units/coravp_lite_clean.bos b/scripts/Units/coravp_lite_clean.bos new file mode 100644 index 00000000000..56620649ebf --- /dev/null +++ b/scripts/Units/coravp_lite_clean.bos @@ -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; +} diff --git a/scripts/Units/coravp_lite_clean.cob b/scripts/Units/coravp_lite_clean.cob new file mode 100644 index 00000000000..e66e1b6b94c Binary files /dev/null and b/scripts/Units/coravp_lite_clean.cob differ diff --git a/scripts/Units/corlab.lua b/scripts/Units/corlab.lua index 198105984e6..0a85efc52f5 100644 --- a/scripts/Units/corlab.lua +++ b/scripts/Units/corlab.lua @@ -9,10 +9,13 @@ 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); @@ -20,6 +23,7 @@ function open() Move(crane2,x_axis,21,42); UnitScript.WaitForMove(crane1, x_axis); Sleep(1000); + end --Open yard open_yard(); --Get into buildstance @@ -34,6 +38,7 @@ 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); @@ -41,9 +46,17 @@ function close() 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; diff --git a/scripts/Units/corsiegebreaker_clean.bos b/scripts/Units/corsiegebreaker_clean.bos new file mode 100644 index 00000000000..824afe6c8f8 --- /dev/null +++ b/scripts/Units/corsiegebreaker_clean.bos @@ -0,0 +1,365 @@ +#include "../recoil_common_includes.h" + +piece base, chamber_flare_fixed, chamber_flare, barrel_glow, barrel_glow_overcharge, flare, gun, chamber, r1, r2, r3, l1, l2, l3, hood, smoke1, aimfromy; + +static-var bMoving, moveSpeed, currentSpeed, animSpeed, terrain, restore_delay, shooting, pshotcount, sshotcount, weapon1_default_range, reloading, xoffset, yoffset, timeLeft; + + +#define TURNRATE 200 + + + +// Signal definitions +#define SIGNAL_AIM1 256 +#define SIGNAL_MOVE 1 +#define SIGNAL_RESTORE 128 + + + +#define VD_PIECE1 smoke1; +#define VD_AMPHIBIOUS +#define VD_DIRTCEG 1024 + 1 +#include "../vehicle_dirt_cegs.h" + + +#define BASEPIECE base +#define HITSPEED <45.0> +//how 'heavy' the unit is, on a scale of 1-10 +#define UNITSIZE 7 +#define MAXTILT 100 +#define RECOIL_POWER 0 +#include "../unit_hitbyweaponid_and_smoke.h" + +//#define TB_BASE base +//#define TB_TURNRATE <12.0> +//#define TB_TILT_X <0.20> +//#define TB_BANK_Z <0.15> // Do not define this if you dont want banking +//#include "../tilt_bank_mobileunit.h" + +UnitSpeed() +{ + while(TRUE) + { + currentSpeed = (get CURRENT_SPEED)*20/moveSpeed; + if (currentSpeed<4) currentSpeed=4; + animSpeed = 1800 / currentSpeed; + sleep 142; + } +} + + + + + +RockUnit(anglex, anglez) +{ + turn base to x-axis anglex speed <50.000000>; + turn base to z-axis <0> - anglez speed <50.000000>; + wait-for-turn base around z-axis; + wait-for-turn base around x-axis; + turn base to z-axis <0.000000> speed <20.000000>; + turn base to x-axis <0.000000> speed <20.000000>; +} + +Create() +{ + + + turn gun to x-axis <0.000000> speed <45.000000>; + turn gun to y-axis <0.000000> speed <45.000000>; + + + + shooting = 0; + pshotcount = 0; + sshotcount = 0; + + xoffset = [3]; + yoffset = [1]; + + + + turn r2 to y-axis <3> now; + turn r3 to y-axis <6> now; + turn l2 to y-axis <-3> now; + turn l3 to y-axis <-6> now; + + + move r1 to x-axis [0.000000] speed [0.600000]; + move r2 to x-axis [0.000000] speed [0.600000]; + move r3 to x-axis [0.000000] speed [0.600000]; + move l1 to x-axis [0.000000] speed [0.600000]; + move l2 to x-axis [0.000000] speed [0.600000]; + move l3 to x-axis [0.000000] speed [0.600000]; + + move r1 to y-axis [0] speed [0.200000]; + move r2 to y-axis [0] speed [0.200000]; + move r3 to y-axis [0] speed [0.200000]; + move l1 to y-axis [0] speed [0.200000]; + move l2 to y-axis [0] speed [0.200000]; + move l3 to y-axis [0] speed [0.200000]; + wait-for-move r1 along y-axis; + + + + //hide r1; + //hide r2; + //hide r3; + //hide l1; + //hide l2; + //hide l3; + //hide smoke3; + hide flare; + //hide smoke2; + hide smoke1; + bMoving = FALSE; + moveSpeed = get (MAX_SPEED); + animSpeed = 100; + restore_delay = 3000; + +} + + + +StartMoving(reversing) +{ + signal SIGNAL_MOVE; + set-signal-mask SIGNAL_MOVE; + start-script Vehicle_Dirt_Ceg(); + //START_TILTBANK; + +} + + +StopMoving() +{ + signal SIGNAL_MOVE; + //STOP_TILTBANK; +} + + + +static-var Stunned; +SetStunned(State) +{ + Stunned = State; +} + + +TimeToRestore(addTime){ + signal SIGNAL_RESTORE; + set-signal-mask SIGNAL_RESTORE; + // This function may not be signal terminated + // If it has to be, it _must_ be immediately restarted + // PROBLEM: the time that is slept depends on number of aim calls. + while((timeLeft > 1) || Stunned){ + //get PRINT(timeLeft, get GAME_FRAME); + addTime = timeLeft; + timeLeft = 1; + sleep addTime;//can sometimes sleep 6000 but never wake up again? + } + //get PRINT(77, timeLeft, get GAME_FRAME); + // The restore section must be atomic :/ + turn gun to x-axis <0.000000> speed <45.000000>; + turn gun to y-axis <0.000000> speed <45.000000>; + + timeLeft = 0; + shooting = 0; + + +} + + + + + + +lua_UnitScriptLight(lightIndex, count) +{ + return 0; +} + + + + + + +AimWeapon1(heading, pitch) +{ + + signal SIGNAL_AIM1; + set-signal-mask SIGNAL_AIM1; + if (timeLeft == 0) + { + start-script TimeToRestore(); + } + timeLeft = restore_delay; + + + + if (pitch < <-10>) { pitch = <-10>; } + + if (shooting==1) {return(0);} + + + //reloading = (get GAME_FRAME) < (get WEAPON_RELOADSTATE(2)); + //if (reloading) { + //return(0); + //} + + + + //get PRINT(heading); + + if ((bMoving AND heading>800) OR (bMoving AND heading<-800)) return 0; + //start-script ResetAim(); + turn gun to x-axis 0 - pitch speed <35>;//* + while(heading > TURNRATE) { + set HEADING to (get HEADING) + TURNRATE; + heading=heading - TURNRATE; + sleep 30; + } + while(heading < 0 - TURNRATE) { + set HEADING to (get HEADING) - TURNRATE; + heading=heading + TURNRATE; + sleep 30; + } + set HEADING to (get HEADING) + heading;//*/ + wait-for-turn gun around x-axis; + + + return 1; +} + + + + + +FireWeapon1() +{ + + + shooting=1; + sshotcount = sshotcount + 1; + + + + show r1; + show r2; + show r3; + show l1; + show l2; + show l3; + + move r1 to x-axis xoffset speed [100.000000]; + move r2 to x-axis xoffset speed [100.000000]; + move r3 to x-axis xoffset speed [100.000000]; + move l1 to x-axis 0-xoffset speed [100.000000]; + move l2 to x-axis 0-xoffset speed [100.000000]; + move l3 to x-axis 0-xoffset speed [100.000000]; + move r1 to y-axis 0-yoffset speed [100.000000]; + move r2 to y-axis 0-yoffset speed [100.000000]; + move r3 to y-axis 0-yoffset speed [100.000000]; + move l1 to y-axis 0-yoffset speed [100.000000]; + move l2 to y-axis 0-yoffset speed [100.000000]; + move l3 to y-axis 0-yoffset speed [100.000000]; + + + call-script lua_UnitScriptLight(1, sshotcount); + + + //emit-sfx 1024 + 0 from flare; + //emit-sfx 1024 + 2 from chamber; + move gun to z-axis [-4.000000] speed [500.000000]; + //wait-for-move gun along z-axis; + + move chamber to z-axis [-6.000000] speed [600.000000]; + wait-for-move chamber along z-axis; + + + move chamber to z-axis [0.000000] speed [3.000000]; + wait-for-move chamber along z-axis; + + move gun to z-axis [0.000000] speed [6.000000]; + wait-for-move gun along z-axis; + + + + + move r1 to x-axis [0.000000] speed [0.250000]; + move r2 to x-axis [0.000000] speed [0.400000]; + move r3 to x-axis [0.000000] speed [0.70000]; + move l1 to x-axis [0.000000] speed [0.250000]; + move l2 to x-axis [0.000000] speed [0.400000]; + move l3 to x-axis [0.000000] speed [0.700000]; + move r1 to y-axis [0] speed [0.0830000]; + move r2 to y-axis [0] speed [0.1330000]; + move r3 to y-axis [0] speed [0.233000]; + move l1 to y-axis [0] speed [0.083000]; + move l2 to y-axis [0] speed [0.1330000]; + move l3 to y-axis [0] speed [0.233000]; + + + shooting=0; + +} + + + +QueryWeapon1(piecenum) +{ + piecenum = chamber_flare_fixed; +} + + +AimFromWeapon1(piecenum) +{ + + piecenum = aimfromy; +} + + + + + + +Killed(severity, corpsetype) +{ + if( severity <= 25 ) + { + corpsetype = 1 ; + explode base type BITMAPONLY | NOHEATCLOUD; + explode gun type BITMAPONLY | NOHEATCLOUD; + explode hood type BITMAPONLY | NOHEATCLOUD; + explode chamber type FIRE | SMOKE | FALL | NOHEATCLOUD; + //explode flare type BITMAPONLY | NOHEATCLOUD; + return(corpsetype); + } + if( severity <= 50 ) + { + corpsetype = 2 ; + explode base type BITMAPONLY | NOHEATCLOUD; + explode gun type FIRE | SMOKE | FALL | NOHEATCLOUD; + explode hood type FIRE | SMOKE | FALL | NOHEATCLOUD; + explode chamber type FIRE | SMOKE | FALL | NOHEATCLOUD; + //explode flare type FIRE | SMOKE | FALL | NOHEATCLOUD; + return(corpsetype); + } + if( severity <= 99 ) + { + corpsetype = 3 ; + explode base type BITMAPONLY | NOHEATCLOUD; + explode gun type EXPLODE_ON_HIT | FIRE | SMOKE | FALL | NOHEATCLOUD; + explode hood type EXPLODE_ON_HIT | FIRE | SMOKE | FALL | NOHEATCLOUD; + explode chamber type EXPLODE_ON_HIT | SMOKE | FALL | NOHEATCLOUD; + //explode flare type SMOKE | FALL | NOHEATCLOUD; + return(corpsetype); + } + corpsetype = 3 ; + explode base type BITMAPONLY | NOHEATCLOUD; + explode gun type EXPLODE_ON_HIT | FIRE | FALL | NOHEATCLOUD; + explode hood type EXPLODE_ON_HIT | FIRE | FALL | NOHEATCLOUD; + explode chamber type EXPLODE_ON_HIT | FIRE | FALL | NOHEATCLOUD; + //explode flare type EXPLODE_ON_HIT | FIRE | SMOKE | FALL | NOHEATCLOUD; + return corpsetype; +} diff --git a/scripts/Units/corsiegebreaker_clean.cob b/scripts/Units/corsiegebreaker_clean.cob new file mode 100644 index 00000000000..cec7960d7da Binary files /dev/null and b/scripts/Units/corsiegebreaker_clean.cob differ diff --git a/scripts/Units/cortrem_clean.bos b/scripts/Units/cortrem_clean.bos index c2d9848d0c3..b24cba62a99 100644 --- a/scripts/Units/cortrem_clean.bos +++ b/scripts/Units/cortrem_clean.bos @@ -35,6 +35,7 @@ static-var weapon1_active_accuracy, weapon1_default_accuracy; static-var weapon1_active_range, weapon1_default_range, weapon2_default_range; Create() { + hide flare6; hide flare3; hide flare4; @@ -54,10 +55,8 @@ Create() out_of_arc_count = 0; weapon1_default_accuracy = 0; weapon1_active_accuracy = 0; - weapon1_default_range = get WEAPON_RANGE(1); - weapon2_default_range = get WEAPON_RANGE(2); - get WEAPON_RANGE(-1,get MIN(weapon1_default_range,weapon2_default_range)); - get WEAPON_RANGE(-2,get MIN(weapon1_default_range,weapon2_default_range)); + //weapon1_default_range = get WEAPON_RANGE(1); + //get WEAPON_RANGE(-1,get MIN(weapon1_default_range,weapon2_default_range)); call-script TB_Init(); } StartMoving(reversing) @@ -98,41 +97,9 @@ RestoreAfterDelay() start-script ExecuteRestoreAfterDelay(); } -Activate() -{ - // signal kills any current aim animations - signal SIGNAL_AIM1; - // variable setting weapon state - fire_mode = 1; - // set last heading values to large negative, ensure first aim waits for the turn - global_heading = -1000000; - global_pitch = -1000000; - get WEAPON_RANGE(-1,get MAX(weapon1_default_range,weapon2_default_range)); - get WEAPON_RANGE(-2,get MAX(weapon1_default_range,weapon2_default_range)); -} - -Deactivate() -{ - // signal kills any current aim animations - signal SIGNAL_AIM1; - // variable setting weapon state - fire_mode = 0; - // set last heading values to large negative, ensure first aim waits for the turn - global_heading = -1000000; - global_pitch = -1000000; - get WEAPON_RANGE(-1,get MIN(weapon1_default_range,weapon2_default_range)); - get WEAPON_RANGE(-2,get MIN(weapon1_default_range,weapon2_default_range)); -} - - AimWeapon1(heading, pitch) { - if( fire_mode == 1 ) - { - return(0); - } - signal SIGNAL_AIM1; set-signal-mask SIGNAL_AIM1; @@ -176,56 +143,6 @@ AimWeapon1(heading, pitch) return (1); } -AimWeapon2(heading, pitch) -{ - - if( fire_mode == 0 ) - { - return(0); - } - - signal SIGNAL_AIM1; - set-signal-mask SIGNAL_AIM1; - - // out of firing arc aim calls happen during "preaiming" logic - // logic to reset gun to neutral if the target heading has been - // out of firing arc for ~3 seconds - if ( (heading < -24576) OR (heading > 24576) ) - { - // assume reaim time is every 15 frames, 0.5 seconds - out_of_arc_count = out_of_arc_count + 1; - // after 6 aim checks, if target is still out of arc, restore gun to neutral - if (out_of_arc_count > 6) - { - start-script ExecuteRestoreAfterDelay(); - } - return (0); - } - out_of_arc_count = 0; - - // turn to face target - turn turret to y-axis heading speed <20.0>; - - // prespin the hex barrel spindle if the unit has not recently fired - // in FireWeapon1, the spindle should be locked in place for a few frames - // after firing, then starts spinning the spindle into place - // before the next AimWeapon1 call - if (recoiling == 0) - { - turn spindle to x-axis <60.005495> * gun_1 - pitch speed <360>; - } - - // only wait-for-turn if it takes more than 3 frames to get into position - if ( (get ABS(pitch-global_pitch)>5400) OR (get ABS(heading-global_heading)>360) ) - { - wait-for-turn turret around y-axis; - wait-for-turn spindle around x-axis; - } - global_pitch = pitch; - global_heading = heading; - start-script RestoreAfterDelay(); - return (1); -} FireWeapon1() { @@ -236,79 +153,17 @@ FireWeapon1() emit-sfx 1024 + 0 from flare1; sleep 32; move barrel1 to z-axis [0.0] speed [4.5]; - } - if( gun_1 == 1 ) - { - move barrel2 to y-axis [-3.750000] now; - move barrel2 to z-axis [-2.250000] now; - emit-sfx 1024 + 0 from flare2; - sleep 32; - move barrel2 to y-axis [0.0] speed [3.75]; - move barrel2 to z-axis [0.0] speed [2.25]; - } - if( gun_1 == 2 ) - { - move barrel3 to y-axis [-3.750000] now; - move barrel3 to z-axis [2.250000] now; - emit-sfx 1024 + 0 from flare3; - sleep 32; - move barrel3 to y-axis [0.0] speed [3.75]; - move barrel3 to z-axis [0.0] speed [2.25]; - } - if( gun_1 == 3 ) - { - move barrel4 to z-axis [4.500000] now; - emit-sfx 1024 + 0 from flare4; - sleep 32; - move barrel4 to z-axis [0.0] speed [4.5]; - } - if( gun_1 == 4 ) - { - move barrel5 to y-axis [3.750000] now; - move barrel5 to z-axis [2.250000] now; - emit-sfx 1024 + 0 from flare5; - sleep 32; move barrel5 to y-axis [0.0] speed [3.75]; move barrel5 to z-axis [0.0] speed [2.25]; } - if( gun_1 == 5 ) - { - move barrel6 to y-axis [3.750000] now; - move barrel6 to z-axis [-2.250000] now; - emit-sfx 1024 + 0 from flare6; - sleep 32; - move barrel6 to y-axis [0.0] speed [3.75]; - move barrel6 to z-axis [0.0] speed [2.25]; - } - ++gun_1; - if( gun_1 == 6 ) - { - gun_1 = flare1; - } - sleep 96; - turn spindle to x-axis <60.005495> * gun_1 - global_pitch speed <360>; - recoiling = 0; - return (0); -} - -FireWeapon2() -{ - recoiling = 1; - if( gun_1 == 0 ) - { - move barrel1 to z-axis [-4.500000] now; - emit-sfx 1024 + 0 from flare1; - sleep 32; - move barrel1 to z-axis [0.0] speed [4.5]; - } if( gun_1 == 1 ) { move barrel2 to y-axis [-3.750000] now; move barrel2 to z-axis [-2.250000] now; emit-sfx 1024 + 0 from flare2; sleep 32; - move barrel2 to y-axis [0.0] speed [3.75]; - move barrel2 to z-axis [0.0] speed [2.25]; + move barrel6 to y-axis [0.0] speed [3.75]; + move barrel6 to z-axis [0.0] speed [2.25]; } if( gun_1 == 2 ) { @@ -316,8 +171,8 @@ FireWeapon2() move barrel3 to z-axis [2.250000] now; emit-sfx 1024 + 0 from flare3; sleep 32; - move barrel3 to y-axis [0.0] speed [3.75]; - move barrel3 to z-axis [0.0] speed [2.25]; + move barrel1 to y-axis [0.0] speed [3.75]; + move barrel1 to z-axis [0.0] speed [2.25]; } if( gun_1 == 3 ) { @@ -325,6 +180,8 @@ FireWeapon2() emit-sfx 1024 + 0 from flare4; sleep 32; move barrel4 to z-axis [0.0] speed [4.5]; + move barrel2 to y-axis [0.0] speed [3.75]; + move barrel2 to z-axis [0.0] speed [2.25]; } if( gun_1 == 4 ) { @@ -341,8 +198,8 @@ FireWeapon2() move barrel6 to z-axis [-2.250000] now; emit-sfx 1024 + 0 from flare6; sleep 32; - move barrel3 to y-axis [0.0] speed [3.75]; - move barrel3 to z-axis [0.0] speed [2.25]; + move barrel4 to y-axis [0.0] speed [3.75]; + move barrel4 to z-axis [0.0] speed [2.25]; } ++gun_1; if( gun_1 == 6 ) @@ -355,6 +212,7 @@ FireWeapon2() return (0); } + QueryWeapon1(pieceIndex) { pieceIndex = gun_1; @@ -367,18 +225,6 @@ AimFromWeapon1(pieceIndex) return (0); } -QueryWeapon2(pieceIndex) -{ - pieceIndex = gun_1; - return (0); -} - -AimFromWeapon2(pieceIndex) -{ - pieceIndex = spindle; - return (0); -} - Killed(severity, corpsetype) diff --git a/scripts/Units/cortrem_clean.cob b/scripts/Units/cortrem_clean.cob index 84c5118c0df..f517ef498be 100644 Binary files a/scripts/Units/cortrem_clean.cob and b/scripts/Units/cortrem_clean.cob differ diff --git a/scripts/Units/corvp.lua b/scripts/Units/corvp.lua index 3c0cebb7d51..ded5fc63b44 100644 --- a/scripts/Units/corvp.lua +++ b/scripts/Units/corvp.lua @@ -7,15 +7,19 @@ local SIG_OPENCLOSE = 4; include("include/util.lua"); +local litelab = UnitDefs[unitDefID].customParams.litelab ~= nil + function open() UnitScript.Signal(SIG_OPENCLOSE); UnitScript.SetSignalMask(SIG_OPENCLOSE); --Activate - UnitScript.Move(doorl, x_axis, -17, 17); - UnitScript.Move(doorr, x_axis, 17, 17); - UnitScript.Move(doorf, y_axis, -16, 16); - UnitScript.WaitForMove(doorl, x_axis); - Sleep(1000); + if not litelab then + UnitScript.Move(doorl, x_axis, -17, 17); + UnitScript.Move(doorr, x_axis, 17, 17); + UnitScript.Move(doorf, y_axis, -16, 16); + UnitScript.WaitForMove(doorl, x_axis); + Sleep(1000); + end --Open yard open_yard(); --Get into buildstance @@ -30,15 +34,22 @@ function close() --Close yard close_yard(); --Deactivate - UnitScript.Move(doorf, y_axis, 16, 16); - UnitScript.Move(doorl, x_axis, 0, 17); - UnitScript.Move(doorr, x_axis, 0, 17); - UnitScript.Move(doorf, y_axis, 0, 16); - UnitScript.WaitForMove(doorl, x_axis); - Sleep(500); + if not litelab then + UnitScript.Move(doorf, y_axis, 16, 16); + UnitScript.Move(doorl, x_axis, 0, 17); + UnitScript.Move(doorr, x_axis, 0, 17); + UnitScript.Move(doorf, y_axis, 0, 16); + UnitScript.WaitForMove(doorl, x_axis); + Sleep(500); + end end function script.Create() + if litelab then + Hide(doorl); + Hide(doorr); + Hide(doorf); + end Hide(nano1); Hide(nano2); Hide(nano3); diff --git a/units/ArmVehicles/armmlv.lua b/units/ArmVehicles/armmlv.lua index b73eb090210..2f1dbbc7201 100644 --- a/units/ArmVehicles/armmlv.lua +++ b/units/ArmVehicles/armmlv.lua @@ -14,7 +14,7 @@ return { canmove = true, --canpatrol = false, canreclaim = false, - --canrepair = false, + canrepair = true, canrestore = false, category = "ALL TANK WEAPON MOBILE NOTSUB NOTSHIP NOTAIR NOTHOVER SURFACE EMPABLE", collisionvolumeoffsets = "0 -1 0", diff --git a/units/CorAircraft/T2/corape.lua b/units/CorAircraft/T2/corape.lua index 7b6c434dda1..3341dc18bcb 100644 --- a/units/CorAircraft/T2/corape.lua +++ b/units/CorAircraft/T2/corape.lua @@ -27,7 +27,7 @@ return { maxwaterdepth = 0, nochasecategory = "VTOL", objectname = "Units/CORAPE.s3o", - script = "Units/CORAPE.cob", + script = "Units/corape_clean.cob", seismicsignature = 0, selfdestructas = "mediumExplosionGenericSelfd", sightdistance = 550, @@ -101,6 +101,7 @@ return { smokecolor = 0.55, smokeTrailCastShadow = false, castshadow = true, --projectile + predictboost = 0.2, soundhit = "rockhit", soundhitwet = "splsmed", soundstart = "rocklit3", @@ -109,6 +110,7 @@ return { texture1 = "null", texture2 = "smoketrailbar", tolerance = 8000, + tracks = true, turnrate = 9000, turret = false, weaponacceleration = 200, diff --git a/units/CorSeaplanes/corcut.lua b/units/CorSeaplanes/corcut.lua index 9368021a6a6..1197a1d4fcb 100644 --- a/units/CorSeaplanes/corcut.lua +++ b/units/CorSeaplanes/corcut.lua @@ -25,7 +25,7 @@ return { maxwaterdepth = 255, nochasecategory = "VTOL", objectname = "Units/CORCUT.s3o", - script = "Units/CORCUT.cob", + script = "Units/corcut_clean.cob", seismicsignature = 0, selfdestructas = "mediumExplosionGenericSelfd", sightdistance = 595, @@ -91,6 +91,7 @@ return { impulsefactor = 0.123, name = "RiotCannon", noselfdamage = true, + predictboost = 0.3, range = 430, reloadtime = 1.3, rgbcolor = "0.8 0.8 0.1", @@ -101,7 +102,7 @@ return { soundtrigger = true, turret = false, weapontype = "Cannon", - weaponvelocity = 500, + weaponvelocity = 600, damage = { default = 47, vtol = 9, diff --git a/units/CorVehicles/T2/corsiegebreaker.lua b/units/CorVehicles/T2/corsiegebreaker.lua index c5d863fd015..218c47b5ae9 100644 --- a/units/CorVehicles/T2/corsiegebreaker.lua +++ b/units/CorVehicles/T2/corsiegebreaker.lua @@ -25,9 +25,8 @@ return { maxvelocity = 1.8, movementclass = "HTANK4", nochasecategory = "VTOL GROUNDSCOUT", - onoffable = true, objectname = "Units/CORSIEGEBREAKER.s3o", - script = "Units/CORSIEGEBREAKER.cob", + script = "Units/corsiegebreaker_clean.cob", seismicsignature = 0, selfdestructas = "mediumExplosionGenericSelfd-phib", sightdistance = 500,--500 @@ -133,48 +132,6 @@ return { }, }, weapondefs = { - dreadshot = { - areaofeffect = 40, - avoidfeature = false, - avoidfriendly = true, - beamtime = 0.1, - collidefeature = true, - collidefriendly = false, - corethickness = 0.39, - craterareaofeffect = 0, - craterboost = 0, - cratermult = 0, - edgeeffectiveness = 0.15, - energypershot = 100, - explosiongenerator = "custom:laserhit-medium-blue", - firestarter = 70, - fireTolerance = 2000, - impulseboost = 0.3, - impulsefactor = 0.4, - laserflaresize = 8.25, - minintensity = 1, - name = "Dreadshot Ion Accelerator", - noselfdamage = true, - predictboost = 1, - range = 820, - reloadtime = 3, - rgbcolor = "0 1 0.8", - rgbcolor2 = "0 0.8 0.6", - soundhitdry = "", - soundhitwet = "sizzle", - soundstart = "annigun1", - soundtrigger = 1, - targetmoveerror = 0, - thickness = 1.6, - tolerance = 10000, - turret = true, - weapontype = "BeamLaser", - weaponvelocity = 3060, - damage = { - commanders = 200, - default = 500, - }, - }, dreadovercharge = { areaofeffect = 60, avoidfeature = false, @@ -230,15 +187,6 @@ return { fastautoretargeting = true, weaponAimAdjustPriority = 125, }, - [2] = { - badtargetcategory = "VTOL GROUNDSCOUT", - def = "DREADSHOT", - maindir = "0 0 1", - maxangledif = 50, - onlytargetcategory = "SURFACE", - fastautoretargeting = true, - weaponAimAdjustPriority = 125, - }, }, }, } diff --git a/units/CorVehicles/T2/cortrem.lua b/units/CorVehicles/T2/cortrem.lua index f57877ab503..d78d8455edc 100644 --- a/units/CorVehicles/T2/cortrem.lua +++ b/units/CorVehicles/T2/cortrem.lua @@ -28,8 +28,7 @@ return { movestate = 0, nochasecategory = "VTOL", objectname = "Units/CORTREM.s3o", - onoffable = true, - script = "Units/CORTREM.cob", + script = "Units/cortrem_clean.cob", seismicsignature = 0, selfdestructas = "hugeExplosionGenericSelfd", sightdistance = 351, @@ -113,43 +112,6 @@ return { }, }, weapondefs = { - tremor_focus_fire = { - - accuracy = 0, --accuracy controlled by the customparams sector_fire - areaofeffect = 200, - avoidfeature = false, - cegtag = "arty-medium", - craterboost = 0, - cratermult = 0, - edgeeffectiveness = 0.9, - explosiongenerator = "custom:genericshellexplosion-medium", - gravityaffected = "true", - impulsefactor = 1.8, - name = "RapidArtillery", - noselfdamage = true, - proximitypriority = -3, - range = 1275, - mygravity = 0.1333, - reloadtime = 0.5, - soundhit = "xplomed4", - soundhitwet = "splslrg", - soundstart = "cannhvy2", - turret = true, - weapontype = "Cannon", - weaponvelocity = 420, - customparams = { - speceffect = "sector_fire", - when = "always", - max_range_reduction = "0.25", - spread_angle = "15", - }, - damage = { - default = 150, - subs = 75, - vtol = 19, - }, - - }, tremor_spread_fire = { accuracy = 0, --accuracy controlled by the customparams sector_fire areaofeffect = 200, @@ -166,7 +128,7 @@ return { proximitypriority = -3, range = 1470, mygravity = 0.1333, - reloadtime = 0.5, + reloadtime = 0.4, soundhit = "xplomed4", soundhitwet = "splslrg", soundstart = "cannhvy2", @@ -176,8 +138,8 @@ return { customparams = { speceffect = "sector_fire", when = "always", - max_range_reduction = "0.35", - spread_angle = "24", + max_range_reduction = "0.28", + spread_angle = "20", }, damage = { default = 150, @@ -189,13 +151,6 @@ return { }, weapons = { [1] = { - badtargetcategory = "VTOL", - def = "TREMOR_FOCUS_FIRE", - maindir = "0 0 1", - maxangledif = 270, - onlytargetcategory = "SURFACE", - }, - [2] = { badtargetcategory = "VTOL", def = "TREMOR_SPREAD_FIRE", maindir = "0 0 1", diff --git a/units/CorVehicles/cormlv.lua b/units/CorVehicles/cormlv.lua index 239c157c908..f23e096f225 100644 --- a/units/CorVehicles/cormlv.lua +++ b/units/CorVehicles/cormlv.lua @@ -13,7 +13,7 @@ return { --canguard = false, canmove = true, canreclaim = false, - --canrepair = false, + canrepair = true, canrestore = false, category = "ALL TANK WEAPON MOBILE NOTSUB NOTSHIP NOTAIR NOTHOVER SURFACE EMPABLE", collisionvolumeoffsets = "0 0 0", diff --git a/units/Legion/Defenses/legbastion.lua b/units/Legion/Defenses/legbastion.lua index 078aee6f247..7ba99ddc5df 100644 --- a/units/Legion/Defenses/legbastion.lua +++ b/units/Legion/Defenses/legbastion.lua @@ -34,7 +34,7 @@ return { seismicsignature = 0, selfdestructas = "largeBuildingExplosionGenericSelfd", sightdistance = 780, - yardmap = "yoo0y o0ooo o0ooo yo0oy", + yardmap = "yoooy ooooo ooooo ooooo yoooy", customparams = { maxrange = 1125, usebuildinggrounddecal = true,