Skip to content

Commit

Permalink
v3.1.1.1 Beta Merge pull request #937 from Die4Ever/develop
Browse files Browse the repository at this point in the history
v3.1.1.1 Beta
  • Loading branch information
Die4Ever authored Sep 4, 2024
2 parents c2ddce8 + ace3bc1 commit 585fcd0
Show file tree
Hide file tree
Showing 44 changed files with 530 additions and 77 deletions.
76 changes: 73 additions & 3 deletions DXRBalance/DeusEx/Classes/AugDisplayWindow.uc
Original file line number Diff line number Diff line change
Expand Up @@ -49,9 +49,16 @@ function DrawVisionAugmentation(GC gc)
local Actor A;

// brighten and tint the screen
gc.SetStyle(DSTY_Modulated);
gc.DrawPattern(30, 30, width-60, height-60, 0, 0, Texture'VisionFilter');
gc.DrawPattern(30, 30, width-60, height-60, 0, 0, Texture'VisionFilter');
if(class'MenuUIChoiceVisionTint'.default.value == 1) {
gc.SetStyle(DSTY_Modulated);
gc.DrawPattern(30, 30, width-60, height-60, 0, 0, Texture'VisionFilter');
gc.DrawPattern(30, 30, width-60, height-60, 0, 0, Texture'VisionFilter');
} else if(class'MenuUIChoiceVisionTint'.default.value == 2) {
gc.SetStyle(DSTY_Modulated);
gc.DrawPattern(30, 30, width-60, height-60, 0, 0, Texture'SolidGreen');
gc.DrawPattern(30, 30, width-60, height-60, 0, 0, Texture'SolidGreen');
}

gc.SetStyle(DSTY_Translucent);

// at level one and higher, enhance heat sources (FLIR)
Expand Down Expand Up @@ -119,6 +126,37 @@ function bool ShouldDrawActorDist(Actor A, float dist)
return dist <= maxDist;
}

//Allow different actors to show up as different colours
function Texture GetGridTexture(Texture tex)
{
switch(tex) {
case None:
case Texture'BlackMaskTex':
case Texture'GrayMaskTex':
case Texture'PinkMaskTex':
return Texture'BlackMaskTex';

case Texture'DeusExItems.Skins.DataCubeTex1':
case Texture'DeusExItems.Skins.DataCubeTex2':
case Texture'DeusExItems.Skins.NanoKeyTex1':
//case Texture'Effects.Electricity.BioCell_SFX': // nanokey multiskin 1
case Texture'DeusExDeco.Skins.BookClosedTex1':
case Texture'DeusExDeco.Skins.BookOpenTex1':
return Texture'Nano_SFX'; //Blue
}

switch(VisionTargetStatus) {
case VISIONENEMY:
return Texture'Virus_SFX';
case VISIONALLY:
return Texture'Wepn_Prifle_SFX';
case VISIONNEUTRAL:
return Texture'WhiteStatic';
}

return Texture'WhiteStatic';
}

function _DrawActor(GC gc, Actor A, float DrawGlow)
{
local Texture oldSkins[9];
Expand Down Expand Up @@ -814,3 +852,35 @@ function GetTargetReticleColor( Actor target, out Color xcolor )
}
}
}
function DrawSpyDroneAugmentation(GC gc)
{
local String str;
local float boxCX, boxCY, boxTLY, boxH;
local float x, y, w, h;
Super.DrawSpyDroneAugmentation(gc);
#ifdef injections
if (winDrone!=None){
//Balanced SpyDrone costs 10 energy to detonate. Display a message if you don't have enough
//See "DroneExplode" in DXRBalance/BalancePlayer.uc
if (Player.Energy < 10){
//Find the useful coords of the drone window
boxH = height/4;
boxCX = width/8 + margin;
boxCY = height/2;
boxTLY = boxCY - boxH/2;
str = "Not enough energy to detonate!";
gc.GetTextExtent(0, w, h, str);
x = boxCX - w/2;
y = boxTLY + margin + h + margin;
gc.SetTextColorRGB(255,0,0);
gc.DrawText(x, y, w, h, str);
gc.SetTextColor(colHeaderText);
}
}
#endif
}
35 changes: 28 additions & 7 deletions DXRBalance/DeusEx/Classes/ChargedPickup.uc
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,20 @@ const LAST_SECONDS = 1;
function PostPostBeginPlay()
{
SoundVolume = 50;
FixChargeRounding();
Super.PostPostBeginPlay();
}

function FixChargeRounding()
{// compatibility with old save games, without breaking travel
if(!IsActive() && Charge == default.Charge) {
Charge = default.Charge * 100;
}
}

simulated function Float GetCurrentCharge()
{// no longer need * 100
return Float(Charge) / Float(Default.Charge);
}

function ChargedPickupBegin(DeusExPlayer Player)
Expand All @@ -34,11 +48,17 @@ function ChargedPickupBegin(DeusExPlayer Player)

simulated function int CalcChargeDrain(DeusExPlayer Player)
{
local int drain;
local float skillValue;
local float drain;

drain = 400.0;// multiplied by 100 to fix rounding issues with ints
skillValue = 1.0;

if (skillNeeded != None)
skillValue = Player.SkillSystem.GetSkillLevelValue(skillNeeded);
drain *= skillValue;

drain = _CalcChargeDrain(Player);
if( drain < 1 ) drain = 1;
return drain;
return Max(Int(drain), 1);
}

// overriding the Pickup class's function returning true, we return false in order to allow the pickup to happen
Expand Down Expand Up @@ -66,19 +86,20 @@ function PlayTickSound(DeusExPlayer Player)

function HandleTickSound(DeusExPlayer Player)
{
local int endDrain;
local int endDrain, defaultCharge;

endDrain = CalcChargeDrain(Player) * 30;
defaultCharge = default.Charge * 100;

if(ticksRemaining-- <= 0){

PlayTickSound(Player);

if (Charge > (Default.Charge/2)){
if (Charge > (defaultCharge/2)){
ticksRemaining=DEFAULT_TIME;
} else if (charge < endDrain){
ticksRemaining=LAST_SECONDS;
} else if (Charge < (Default.Charge/4)){
} else if (Charge < (defaultCharge/4)){
ticksRemaining=QUARTER_TIME;
} else {
ticksRemaining=HALF_TIME;
Expand Down
2 changes: 2 additions & 0 deletions DXRCore/DeusEx/Classes/DXRActorsBase.uc
Original file line number Diff line number Diff line change
Expand Up @@ -521,6 +521,7 @@ function RemoveFears(ScriptedPawn p)
p.bFearDistress = false;
p.bFearAlarm = false;
p.bFearProjectiles = false;
p.ResetReactions();
}

function RemoveReactions(ScriptedPawn p)
Expand All @@ -545,6 +546,7 @@ function RemoveReactions(ScriptedPawn p)
p.bReactCarcass = false;
p.bReactDistress = false;
p.bReactProjectiles = false;
p.ResetReactions();
}

function SetPawnHealth(ScriptedPawn p, int health)
Expand Down
8 changes: 8 additions & 0 deletions DXRCore/DeusEx/Classes/DXRInfo.uc
Original file line number Diff line number Diff line change
Expand Up @@ -227,6 +227,14 @@ function bool IsChristmasSeason()
return false;
}
function bool OnTitleScreen()
{
local DXRando dxr;
dxr = class'DXRando'.default.dxr;
return dxr.LocalURL=="DX" || dxr.LocalURL=="DXONLY";
}

final function int SystemTime()
{
return _SystemTime(Level);
Expand Down
4 changes: 4 additions & 0 deletions DXRCore/DeusEx/Classes/DXRMenuSelectDifficulty.uc
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,10 @@ function BindControls(optional string action)
EnumOption("First Entry", autosave.FirstEntry, f.autosave);
EnumOption("Autosaves-Only (Hardcore)", autosave.Hardcore, f.autosave);
EnumOption("Extra Safe (1+GB per playthrough)", autosave.ExtraSafe, f.autosave);
if(f.IsOctoberUnlocked()) {
EnumOption("Limited Saves", autosave.LimitedSaves, f.autosave);
EnumOption("Fixed Saves", autosave.FixedSaves, f.autosave);
}
EnumOption("Off", autosave.Disabled, f.autosave);
#endif

Expand Down
8 changes: 4 additions & 4 deletions DXRCore/DeusEx/Classes/DXRVersion.uc
Original file line number Diff line number Diff line change
Expand Up @@ -4,21 +4,21 @@ simulated static function CurrentVersion(optional out int major, optional out in
{
major=3;
minor=1;
patch=0;
build=11;//build can't be higher than 99
patch=1;
build=1;//build can't be higher than 99
}

simulated static function bool VersionIsStable()
{
return true;
return false;
}

simulated static function string VersionString(optional bool full)
{
local int major,minor,patch,build;
local string status;

status = "";
status = "Beta";

if(status!="") {
status = " " $ status;
Expand Down
35 changes: 35 additions & 0 deletions DXRFixes/DeusEx/Classes/ScriptedPawn.uc
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,41 @@ function Carcass SpawnCarcass()
return Super.SpawnCarcass();
}

//Copied from vanilla ScriptedPawn
//'Exploded' moved from secondary to primary
function bool IsPrimaryDamageType(name damageType)
{
local bool bPrimary;

switch (damageType)
{
case 'TearGas':
case 'HalonGas':
case 'PoisonGas':
case 'PoisonEffect':
case 'Radiation':
case 'EMP':
case 'Drowned':
case 'NanoVirus':
bPrimary = false;
break;

case 'Stunned':
case 'KnockedOut':
case 'Burned':
case 'Flamed':
case 'Poison':
case 'Shot':
case 'Sabot':
case 'Exploded':
default:
bPrimary = true;
break;
}

return (bPrimary);
}

// only draw a new shield if we haven't spawned one recently
function MaybeDrawShield()
{
Expand Down
2 changes: 2 additions & 0 deletions DXRMapFixups/DeusEx/Classes/DXRFixupM03.uc
Original file line number Diff line number Diff line change
Expand Up @@ -491,6 +491,8 @@ function FixAnnaAmbush()

foreach AllActors(class'#var(prefix)AnnaNavarre', anna) {break;}

anna.MaxProvocations = 0;

// if she's angry then let her blow up
if(anna != None && anna.GetAllianceType('player') == ALLIANCE_Hostile) anna = None;

Expand Down
7 changes: 7 additions & 0 deletions DXRMapFixups/DeusEx/Classes/DXRFixupM04.uc
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ function PreFirstEntryMapFixes()
local #var(prefix)NanoKey key;
local #var(prefix)PigeonGenerator pg;
local #var(prefix)GuntherHermann gunther;
local #var(prefix)AnnaNavarre anna;
local #var(prefix)GilbertRenton gilbert;
local #var(prefix)MapExit exit;
local #var(prefix)BlackHelicopter jock;
Expand Down Expand Up @@ -320,6 +321,12 @@ function PreFirstEntryMapFixes()
hoverHint = class'DXRTeleporterHoverHint'.static.Create(self, class'DXRMapInfo'.static.GetTeleporterName(mapvariants.VaryMap("05_NYC_UNATCOMJ12Lab"),""), gunther.Location, gunther.CollisionRadius+5, gunther.CollisionHeight+5);
hoverHint.SetBaseActor(gunther);
}
foreach AllActors(class'#var(prefix)AnnaNavarre',anna){
anna.MaxProvocations = 0;
anna.AgitationSustainTime = 3600;
anna.AgitationDecayRate = 0;
}

break;

case "04_NYC_BAR":
Expand Down
14 changes: 14 additions & 0 deletions DXRMapFixups/DeusEx/Classes/DXRFixupM05.uc
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,7 @@ function PreFirstEntryMapFixes()
//running around
foreach AllActors(class'#var(prefix)AnnaNavarre',anna){
anna.bHateWeapon=False;
anna.ResetReactions();
}

if (VanillaMaps){
Expand Down Expand Up @@ -150,6 +151,12 @@ function PreFirstEntryMapFixes()
miguel.ResetReactions();
}

foreach AllActors(class'#var(prefix)AnnaNavarre',anna){
anna.MaxProvocations = 0;
anna.AgitationSustainTime = 3600;
anna.AgitationDecayRate = 0;
}

if(!dxr.flags.IsZeroRando()) {
k = Spawn(class'#var(prefix)NanoKey',,, vectm(420,195,333));
k.KeyID = 'UNOfficeDoorKey';
Expand Down Expand Up @@ -356,6 +363,13 @@ function BalanceJailbreak()
while(nextItem != None)
for(i=0; i<num; i++)
nextItem = MoveNextItemTo(nextItem, itemLocations[i], 'player_inv');
} else {
//If Prison Pocket is enabled, there is no equipment to be found. Remove the infolink.
//If we implement tiers of Prison Pocket (ie. keep only one item), this will need to be revisited.
foreach AllActors(class'#var(prefix)DataLinkTrigger', dlt) {
if(dlt.datalinkTag != 'dl_equipment') continue;
dlt.Destroy();
}
}

if(dxr.flags.settings.swapitems > 0 || dxr.flags.loadout != 0) {
Expand Down
22 changes: 22 additions & 0 deletions DXRMapFixups/DeusEx/Classes/DXRFixupM15.uc
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ function PreFirstEntryMapFixes_Bunker()
local DeusExMover d;
local ComputerSecurity c;
local Keypad k;
local #var(prefix)Button1 b;
local Switch2 s2;
local SequenceTrigger st;
local DataLinkTrigger dlt;
Expand All @@ -73,6 +74,7 @@ function PreFirstEntryMapFixes_Bunker()
local #var(prefix)RatGenerator rg;
local Vector loc;
local #var(prefix)Fan1 fan;
local #var(prefix)WaltonSimons ws;

if (dxr.flags.settings.starting_map < 151) {
player().DeleteAllGoals();
Expand Down Expand Up @@ -164,6 +166,20 @@ function PreFirstEntryMapFixes_Bunker()
}
}

//The buttons on the big elevator down to the bunker entrance could be used if you reached around
//the invisible panel that is supposed to block them. Make them actually unusable until the power
//is turned on.
foreach AllActors(class'#var(prefix)Button1',b){
if (b.Event=='level1'){
b.Tag='level1_switch';
class'DXRTriggerEnable'.static.Create(b,'power','level1_switch');
} else if (b.Event=='level2'){
b.Tag='level2_switch';
class'DXRTriggerEnable'.static.Create(b,'power','level2_switch');
}
}


//Button to open blast doors from inside
AddSwitch( vect(2015.894653,1390.463867,-839.793091), rot(0, -16328, 0), 'blast_door');

Expand All @@ -175,6 +191,12 @@ function PreFirstEntryMapFixes_Bunker()
fan.bHighlight=True;
}

foreach AllActors(class'#var(prefix)WaltonSimons',ws){
ws.MaxProvocations = 0;
ws.AgitationSustainTime = 3600;
ws.AgitationDecayRate = 0;
}

Spawn(class'PlaceholderItem',,, vectm(-1469.9,3238.7,-213)); //Storage building
Spawn(class'PlaceholderItem',,, vectm(-1565.4,3384.8,-213)); //Back of Storage building
Spawn(class'PlaceholderItem',,, vectm(-1160.9,256.3,-501)); //Tower basement
Expand Down
3 changes: 3 additions & 0 deletions DXRMapFixups/DeusEx/Classes/DXRFixupParis.uc
Original file line number Diff line number Diff line change
Expand Up @@ -182,6 +182,9 @@ function PreFirstEntryMapFixes()
case "11_PARIS_CATHEDRAL":
foreach AllActors(class'GuntherHermann', g) {
g.ChangeAlly('mj12', 1, true);
g.MaxProvocations = 0;
g.AgitationSustainTime = 3600;
g.AgitationDecayRate = 0;
}
foreach AllActors(class'#var(prefix)DamageTrigger',dt){
//There should only be two damage triggers in the map,
Expand Down
Loading

0 comments on commit 585fcd0

Please sign in to comment.