Skip to content

Commit

Permalink
v3.1.0.5 Alpha Merge pull request #904 from Die4Ever/develop
Browse files Browse the repository at this point in the history
v3.1.0.5 Alpha
  • Loading branch information
Die4Ever authored Aug 12, 2024
2 parents 9c0c99b + d09b2b7 commit 0c5a781
Show file tree
Hide file tree
Showing 27 changed files with 134 additions and 48 deletions.
21 changes: 17 additions & 4 deletions DXRCore/DeusEx/Classes/DXRActorsBase.uc
Original file line number Diff line number Diff line change
Expand Up @@ -403,21 +403,34 @@ function Inventory MoveNextItemTo(Inventory item, vector Location, name Tag)
return nextItem;
}

static function DataVaultImage GivePlayerImage(DeusExPlayer player, class<DataVaultImage> imageClass)
static function DataVaultImage GiveImage(Pawn p, class<DataVaultImage> imageClass)
{
local DataVaultImage image;

image = DataVaultImage(player.FindInventoryType(imageClass));
image = DataVaultImage(p.FindInventoryType(imageClass));
if (image == None) {
image = player.Spawn(imageClass);
image = p.Spawn(imageClass);
image.ItemName = imageClass.default.imageDescription;
image.ItemArticle = "-";
image.Frob(player, None);
image.Frob(p, None);
}

return image;
}

static function #var(prefix)Nanokey GiveKey(Pawn p, name keyID, string desciption)
{
local #var(prefix)Nanokey key;

key = p.Spawn(class'#var(prefix)Nanokey', p);
key.KeyID = keyID;
key.Description = desciption;
key.GiveTo(p);
key.SetBase(p);

return key;
}

function bool SkipActorBase(Actor a)
{
if( a.Owner != None || a.bStatic || a.bHidden || a.bMovable==False || a.bIsSecretGoal || a.bDeleteMe )
Expand Down
2 changes: 1 addition & 1 deletion DXRCore/DeusEx/Classes/DXRMenuSetupRando.uc
Original file line number Diff line number Diff line change
Expand Up @@ -355,7 +355,7 @@ function BindControls(optional string action)

NewGroup("New Game+");

NewMenuItem("Scaling %", "Scales the curve of New Game+ changes over successive loops. Set to -1 to disable.");
NewMenuItem("Scaling %", "Scales the curve of New Game+ changes over successive loops. Set to -1 to disable. 100% is default.");
Slider(f.moresettings.newgameplus_curve_scalar, -1, 200);
NewMenuItem("Max Item Carryover", "Maximum number of the same item that can carry over between loops, not including stackable items.");
Slider(f.newgameplus_max_item_carryover, 0, 30);
Expand Down
2 changes: 1 addition & 1 deletion DXRCore/DeusEx/Classes/DXRVersion.uc
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ simulated static function CurrentVersion(optional out int major, optional out in
major=3;
minor=1;
patch=0;
build=4;//build can't be higher than 99
build=5;//build can't be higher than 99
}

simulated static function bool VersionIsStable()
Expand Down
6 changes: 3 additions & 3 deletions DXRFixes/DeusEx/Classes/ActorDisplayWindow.uc
Original file line number Diff line number Diff line change
Expand Up @@ -246,16 +246,16 @@ function DrawWindow(GC gc)
radius = actorRadius;
}

foreach player.RadiusActors(classToShow, trackActor,radius,player.Location)
foreach player.RadiusActors(classToShow, trackActor, radius, player.Location)
{
if(!bShowHidden && trackActor.bHidden)
continue;// DXRando: for spoilers buttons

if (filter!='' && filter!=trackActor.Name)
continue;
if (tagFilter!="" && tagFilter!=string(trackActor.Tag))
if (tagFilter!="" && !(tagFilter~=string(trackActor.Tag)))
continue;
if (eventFilter!="" && eventFilter!=string(trackActor.Event))
if (eventFilter!="" && !(eventFilter~=string(trackActor.Event)))
continue;

dxMover = DeusExMover(trackActor);
Expand Down
8 changes: 4 additions & 4 deletions DXRFixes/DeusEx/Classes/Carcass.uc
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,7 @@ function Frob(Actor Frobber, Inventory frobWith)
//log(" bFoundSomething = " $ bFoundSomething);

if (!bFoundSomething)
P.ClientMessage(msgEmpty);
P.ClientMessage(msgEmpty,, true);

if ((player != None) && (Level.Netmode != NM_Standalone))
{
Expand Down Expand Up @@ -341,7 +341,7 @@ function bool TryLootItem(DeusExPlayer player, Inventory item)
}
else
{
player.ClientMessage(Sprintf(msgCannotPickup, invItem.itemName));
player.ClientMessage(Sprintf(msgCannotPickup, invItem.itemName),, true);
//Also toss the item out of the carcass
TossItem(item);
}
Expand Down Expand Up @@ -455,7 +455,7 @@ function bool TryLootWeapon(DeusExPlayer player, DeusExWeapon item)
}
else // Rando: toss the weapon just for the ammo
{
player.ClientMessage(Sprintf(player.InventoryFull, item.itemName));
player.ClientMessage(Sprintf(player.InventoryFull, item.itemName),, true);
//Also toss the item out of the carcass
TossItem(item);
return true;
Expand All @@ -466,7 +466,7 @@ function bool TryLootWeapon(DeusExPlayer player, DeusExWeapon item)
// if he empties some inventory he can get something potentially cooler
// than he already has.
if (W == None && !player.FindInventorySlot(item, True)){
player.ClientMessage(Sprintf(player.InventoryFull, item.itemName));
player.ClientMessage(Sprintf(player.InventoryFull, item.itemName),, true);

//Also toss the item out of the carcass
TossItem(item);
Expand Down
2 changes: 1 addition & 1 deletion DXRMissions/DeusEx/Classes/DXRMissionsM05.uc
Original file line number Diff line number Diff line change
Expand Up @@ -251,7 +251,7 @@ function AddMissionGoals()
AddGoalFromConv(player(), 'FindPaul', 'DL_Choice');
AddGoalFromConv(player(), 'FindEquipment', 'DL_Choice');

GivePlayerImage(player(), class'Image05_NYC_MJ12Lab');
GiveImage(player(), class'Image05_NYC_MJ12Lab');
}

function AfterMoveGoalToLocation(Goal g, GoalLocation Loc)
Expand Down
10 changes: 10 additions & 0 deletions DXRMissions/DeusEx/Classes/DXRMissionsM15.uc
Original file line number Diff line number Diff line change
Expand Up @@ -216,6 +216,7 @@ function AfterMoveGoalToLocation(Goal g, GoalLocation Loc)
local #var(prefix)InformationDevices dc2;
local #var(prefix)FlagTrigger ft;
local #var(prefix)Switch1 button;
local Dispatcher disp;
local string dctext;

if (g.name=="Area 51 Blast Door Computer" && Loc.name != "the tower") {
Expand Down Expand Up @@ -256,6 +257,15 @@ function AfterMoveGoalToLocation(Goal g, GoalLocation Loc)
button.DrawScale=2;
button.SetCollisionSize(5.260000, 5.940000);
}
else if (g.name=="Aquinas Substation Computer") {
g.actors[0].a.Event = 'AquinasDoorComputer';
}

if(Loc.name=="Observation Deck") {// for releasing the bots behind you
foreach AllActors(class'Dispatcher', disp, 'node1') {
disp.Tag = g.actors[0].a.Event;
}
}
}

function AfterShuffleGoals(int goalsToLocations[32])
Expand Down
7 changes: 6 additions & 1 deletion DXRModules/DeusEx/Classes/DXREventsBase.uc
Original file line number Diff line number Diff line change
Expand Up @@ -1054,7 +1054,12 @@ function bool AddTestGoal(
f *= MissionsMaskAvailability(starting_mission, missions) ** 1.5;
max = Ceil(float(max) * f);
max = self.Max(max, 1);
desc = sprintf(bingo_options[bingoIdx].desc, max);

if (max == 1 && bingo_options[bingoIdx].desc_singular != "") {
desc = bingo_options[bingoIdx].desc_singular;
} else {
desc = sprintf(desc, max);
}
}

data.SetBingoSpot(
Expand Down
7 changes: 6 additions & 1 deletion DXRModules/DeusEx/Classes/DXRFlags.uc
Original file line number Diff line number Diff line change
Expand Up @@ -624,7 +624,8 @@ function FlagsSettings SetDifficulty(int new_difficulty)
// splits overlay
moresettings.splits_overlay = 1;
// disable NG+ by default
moresettings.newgameplus_curve_scalar = -1;
if(class'MenuChoice_NewGamePlus'.default.value != 2)
moresettings.newgameplus_curve_scalar = -1;
}
else if(IsWaltonWare()) {
settings.bingo_win = 1;
Expand Down Expand Up @@ -670,6 +671,10 @@ function FlagsSettings SetDifficulty(int new_difficulty)
else if(IsHalloweenMode()) {
//moresettings.camera_mode = 1;// 3rd person? or maybe just stick to 1st person lol
}

if(class'MenuChoice_NewGamePlus'.default.value == 0)
moresettings.newgameplus_curve_scalar = -1;

return settings;
}

Expand Down
6 changes: 5 additions & 1 deletion DXRModules/DeusEx/Classes/DXRFlagsBase.uc
Original file line number Diff line number Diff line change
Expand Up @@ -315,6 +315,11 @@ simulated function string BindFlags(int mode, optional string str)
SetDifficulty(difficulty);
}

if(mode != Hashing) {
// things that don't affect the flagshash, but come after SetDifficulty (so they don't get overwritten)
FlagInt('Rando_newgameplus_curve_scalar', moresettings.newgameplus_curve_scalar, mode, str);
}

FlagInt('Rando_maxrando', maxrando, mode, str);
FlagInt('Rando_autosave', autosave, mode, str);
FlagInt('Rando_crowdcontrol', crowdcontrol, mode, str);
Expand Down Expand Up @@ -407,7 +412,6 @@ simulated function string BindFlags(int mode, optional string str)
FlagInt('Rando_starting_map', settings.starting_map, mode, str);
FlagInt('Rando_grenadeswap', moresettings.grenadeswap, mode, str);

FlagInt('Rando_newgameplus_curve_scalar', moresettings.newgameplus_curve_scalar, mode, str);
FlagInt('Rando_newgameplus_max_item_carryover', newgameplus_max_item_carryover, mode, str);
FlagInt('Rando_num_skill_downgrades', newgameplus_num_skill_downgrades, mode, str);
FlagInt('Rando_num_removed_augs', newgameplus_num_removed_augs, mode, str);
Expand Down
6 changes: 4 additions & 2 deletions DXRModules/DeusEx/Classes/DXRFlagsNGPMaxRando.uc
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,10 @@ simulated function RandomizeSettings(bool forceMenuOptions)
settings.aug_value_rando = 100;
settings.health += rng(100) - 50;
if (autosave != 5) { // don't steal health from players in ironman mode
settings.health += rng(100) - 50;
}
MaxRandoVal(settings.energy);
}
Expand Down Expand Up @@ -244,7 +247,6 @@ function NewGamePlus()
p.DeleteAllNotes();
p.DeleteAllGoals();
p.ResetConversationHistory();
p.RestoreAllHealth();
ClearDataVaultImages();
l("NewGamePlus skill points was "$p.SkillPointsAvail);
Expand Down
2 changes: 1 addition & 1 deletion DXRModules/DeusEx/Classes/DXRHints.uc
Original file line number Diff line number Diff line change
Expand Up @@ -456,7 +456,7 @@ simulated function PlayerAnyEntry(#var(PlayerPawn) player)
}
player.AddNote(msg, false, i==numHints-1);
}
player.ClientMessage("Press G or F2 to check your Goals/Notes screen!");
player.ClientMessage("Press G or F2 to check your Goals/Notes screen!",, true);
}
}

Expand Down
1 change: 1 addition & 0 deletions DXRModules/DeusEx/Classes/DXRHordeMode.uc
Original file line number Diff line number Diff line change
Expand Up @@ -563,6 +563,7 @@ function GenerateEnemies()
}

maxdifficulty = float(wave-1)*difficulty_per_wave + difficulty_first_wave;
maxdifficulty *= float(dxr.flags.settings.enemiesrandomized) * 0.03;
numEnemies = int(maxdifficulty*2);
for(i=0; i<numEnemies || difficulty < 0.1 ; i++) {
difficulty += GenerateEnemy(dxre);
Expand Down
11 changes: 6 additions & 5 deletions DXRModules/DeusEx/Classes/DXRPasswords.uc
Original file line number Diff line number Diff line change
Expand Up @@ -178,18 +178,19 @@ function FixCodes()
case "15_AREA51_PAGE":
newpassword = GeneratePasscode("7243");
ReplacePassword("724", Left(newpassword, 3) );
FixArea51BlueFusionReactorCodes(Right(newpassword, 1));
FixArea51BlueFusionReactorCodes();
break;
}
}

function FixArea51BlueFusionReactorCodes(string validCode)
function FixArea51BlueFusionReactorCodes()
{
local #var(prefix)Keypad kp;
local #var(injectsprefix)Keypad kp;

foreach AllActors(class'#var(prefix)Keypad', kp) {
foreach AllActors(class'#var(injectsprefix)Keypad', kp) {
if(kp.validCode == "7243") {
kp.validCode = validCode;
kp.Group = 'BFRKeypads';
kp.bGrouped = true;
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion DXRModules/DeusEx/Classes/DXRPlayerStats.uc
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ function CapHealth(out int health, int d)

simulated function FirstEntry()
{
if(dxr.dxInfo.missionNumber == 0) {
if((class'DXRStartMap'.static._IsStartMap(dxr) && dxr.flags.autosave != 5) || dxr.dxInfo.missionNumber == 0) {
player().RestoreAllHealth();
}
}
24 changes: 15 additions & 9 deletions DXRModules/DeusEx/Classes/DXRStartMap.uc
Original file line number Diff line number Diff line change
Expand Up @@ -244,7 +244,7 @@ static function string GetStartMap(Actor a, int start_map_val)
return startMap;
}
function bool IsStartMap()
static function bool _IsStartMap(DXRando dxr)
{
local string startMapName;
Expand All @@ -254,6 +254,11 @@ function bool IsStartMap()
return startMapName ~= dxr.localURL;
}
function bool IsStartMap()
{
return _IsStartMap(dxr);
}
static function string _GetStartMap(int start_map_val, optional out string friendlyName, optional out int bShowInMenu)
{
friendlyName = ""; // clear the out param to protect against reuse by the caller
Expand Down Expand Up @@ -554,11 +559,11 @@ function PreFirstEntryStartMapFixes(#var(PlayerPawn) player, FlagBase flagbase,
MarkConvPlayed("DL_SubwayComplete", bFemale);
flagbase.SetBool('SubTerroristsDead',true,,-1);
MarkConvPlayed("MS_DL", bFemale);
GivePlayerImage(player, class'Image02_Ambrosia_Flyer');
GiveImage(player, class'Image02_Ambrosia_Flyer');
break;

case 37:
GivePlayerImage(player, class'Image03_NYC_Airfield');
GiveImage(player, class'Image03_NYC_Airfield');
MarkConvPlayed("DL_LebedevKill_Played", bFemale);
// fallthrough
case 36:
Expand All @@ -583,7 +588,7 @@ function PreFirstEntryStartMapFixes(#var(PlayerPawn) player, FlagBase flagbase,
flagbase.SetBool('GatesOpen',true,,5);
AddGoalFromConv(player, 'InvestigateNSF', 'PaulInjured');
MarkConvPlayed("PaulInjured", bFemale);
GivePlayerImage(player, class'Image04_NSFHeadquarters');
GiveImage(player, class'Image04_NSFHeadquarters');
break;

case 75:
Expand Down Expand Up @@ -616,17 +621,18 @@ function PreFirstEntryStartMapFixes(#var(PlayerPawn) player, FlagBase flagbase,
break;

case 105:
GivePlayerImage(player, class'Image10_Paris_CatacombsTunnels');
GiveImage(player, class'Image10_Paris_CatacombsTunnels');
break;
case 106:
case 109:
GivePlayerImage(player, class'Image10_Paris_CatacombsTunnels');
GivePlayerImage(player, class'Image10_Paris_Metro');
GiveImage(player, class'Image10_Paris_CatacombsTunnels');
GiveImage(player, class'Image10_Paris_Metro');
break;

case 115:
flagbase.SetBool('templar_upload',true,,-1);
flagbase.SetBool('GuntherHermann_Dead',true,,-1);
GiveKey(player, 'cathedralgatekey', "Gatekeeper's Key");
break;

case 129:
Expand All @@ -648,7 +654,7 @@ function PreFirstEntryStartMapFixes(#var(PlayerPawn) player, FlagBase flagbase,
flagbase.SetBool('MS_PaulOrGaryAppeared',true,,-1); // It let me through... I can't believe it.
MarkConvPlayed("MeetHelios", bFemale); // You will go to Sector 4 and deactivate the uplink locks, yes.
flagbase.SetBool('MS_TongAppeared',true,,-1); // We can get you into Sector 3 -- but no further.
GivePlayerImage(player, class'Image15_Area51_Sector3');
GiveImage(player, class'Image15_Area51_Sector3');
// fallthrough
case 152:
MarkConvPlayed("DL_Final_Page02", bFemale); // Barely a scratch.
Expand All @@ -671,7 +677,7 @@ function PreFirstEntryStartMapFixes(#var(PlayerPawn) player, FlagBase flagbase,
MarkConvPlayed("DL_Bunker_Elevator", bFemale); // The power to the elevator is down.
MarkConvPlayed("DL_Bunker_blastdoor", bFemale); // The schematics show an elevator to the west, but utility power is down.
MarkConvPlayed("DL_blastdoor_shut", bFemale); // These blast doors are the reason I don't have to worry about nukes -- or you.
GivePlayerImage(player, class'Image15_Area51Bunker');
GiveImage(player, class'Image15_Area51Bunker');
break;
}
}
Expand Down
4 changes: 2 additions & 2 deletions DXRVanilla/DeusEx/Classes/Computers.uc
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ state On
}
else if (VSize(curFrobber.Location - Location) > 150)// DXRando: reduced from 1500 down to 150
{
curFrobber.ClientMessage(ItemName$" is too far to use!");
curFrobber.ClientMessage(ItemName$" is too far to use!",, true);
termwindow.CloseScreen("EXIT");
}
}
Expand All @@ -120,7 +120,7 @@ Begin:
bOn = True;
bAnimating = False;
if (VSize(curFrobber.Location - Location) > 150) {// DXRando
curFrobber.ClientMessage(ItemName$" is too far to use!");
curFrobber.ClientMessage(ItemName$" is too far to use!",, true);
GotoState('Off');
} else {
ChangePlayerVisibility(False);
Expand Down
Loading

0 comments on commit 0c5a781

Please sign in to comment.