Skip to content

Commit

Permalink
Make generic datacube spawning functions and modify existing spawns to
Browse files Browse the repository at this point in the history
use the appropriate ones
  • Loading branch information
theastropath committed Aug 7, 2023
1 parent 7c92baa commit f4c63d7
Show file tree
Hide file tree
Showing 8 changed files with 64 additions and 33 deletions.
53 changes: 51 additions & 2 deletions DXRCore/DeusEx/Classes/DXRActorsBase.uc
Original file line number Diff line number Diff line change
Expand Up @@ -764,7 +764,11 @@ function #var(prefix)Containers AddBox(class<#var(prefix)Containers> c, vector l
return box;
}

function #var(prefix)InformationDevices SpawnDatacube(vector loc, rotator rot, string text, optional bool dont_move)
#ifdef injections
function #var(prefix)InformationDevices SpawnDatacube(vector loc, rotator rot, optional bool dont_move)
#else
function DXRInformationDevices SpawnDatacube(vector loc, rotator rot, optional bool dont_move)
#endif
{
#ifdef injections
local #var(prefix)DataCube dc;
Expand All @@ -775,7 +779,6 @@ function #var(prefix)InformationDevices SpawnDatacube(vector loc, rotator rot, s
#endif

if(dc != None) {
dc.plaintext = text;
dc.bIsSecretGoal = dont_move;
info("SpawnDatacube "$dc$" at ("$loc$"), ("$rot$")");
if(dxr.flags.settings.infodevices > 0)
Expand All @@ -786,6 +789,52 @@ function #var(prefix)InformationDevices SpawnDatacube(vector loc, rotator rot, s
return dc;
}
function #var(prefix)InformationDevices SpawnDatacubePlaintext(vector loc, rotator rot, string text, optional bool dont_move)
{
#ifdef injections
local #var(prefix)InformationDevices dc;
#else
local DXRInformationDevices dc;
#endif
dc = SpawnDatacube(loc,rot,dont_move);
if(dc != None) {
dc.plaintext = text;
}
return dc;
}
function #var(prefix)InformationDevices SpawnDatacubeTextTag(vector loc, rotator rot, name texttag, optional bool dont_move)
{
#ifdef injections
local #var(prefix)InformationDevices dc;
#else
local DXRInformationDevices dc;
#endif
dc = SpawnDatacube(loc,rot,dont_move);
if(dc != None) {
dc.textTag = texttag;
}
return dc;
}
function #var(prefix)InformationDevices SpawnDatacubeImage(vector loc, rotator rot, class<DataVaultImage> imageClass, optional bool dont_move)
{
#ifdef injections
local #var(prefix)InformationDevices dc;
#else
local DXRInformationDevices dc;
#endif
dc = SpawnDatacube(loc,rot,dont_move);
if(dc != None) {
dc.imageClass = imageClass;
}
return dc;
}
// used by DXRReplaceActors
function Actor SpawnReplacement(Actor a, class<Actor> newclass, optional bool dont_copy_appearance)
{
Expand Down
7 changes: 1 addition & 6 deletions DXRMapFixups/DeusEx/Classes/DXRFixupM06.uc
Original file line number Diff line number Diff line change
Expand Up @@ -200,12 +200,7 @@ function PreFirstEntryMapFixes()
pad.bHidden = False;
}

#ifdef injections
dc = Spawn(class'#var(prefix)DataCube',,, vectm(-1194.700195,-789.460266,-750.628357), rotm(0,0,0));
#else
dc = Spawn(class'DXRInformationDevices',,, vectm(-1194.700195,-789.460266,-750.628357), rotm(0,0,0));
#endif
dc.imageClass=Class'DeusEx.Image15_GrayDisection';
SpawnDatacubeImage(vectm(-1194.700195,-789.460266,-750.628357), rotm(0,0,0),Class'DeusEx.Image15_GrayDisection');

Spawn(class'PlaceholderItem',,, vectm(-1.95,1223.1,810.3)); //Table over entrance
Spawn(class'PlaceholderItem',,, vectm(1022.24,-1344.15,450.3)); //Bathroom counter
Expand Down
27 changes: 7 additions & 20 deletions DXRMapFixups/DeusEx/Classes/DXRFixupM15.uc
Original file line number Diff line number Diff line change
Expand Up @@ -247,11 +247,7 @@ function PreFirstEntryMapFixes_Page()
local ComputerPersonal comp_per;
local int i;
local vector cloneCubeLoc[4];
#ifdef injections
local #var(prefix)DataCube dc[4];
#else
local DXRInformationDevices dc[4];
#endif
local string cloneCubeText[4];

foreach AllActors(class'ComputerSecurity', c) {
if( c.UserList[0].userName != "graytest" || c.UserList[0].Password != "Lab12" ) continue;
Expand Down Expand Up @@ -281,27 +277,18 @@ function PreFirstEntryMapFixes_Page()
}
}

//Spawn dupes of the clone cubes
//Rather than duplicating the existing cubes, add new clone text so there are more possibilities
cloneCubeLoc[0]=vectm(6197.620117,-8455.201172,-5117.649902); //Weird little window near broken door (on Page side)
cloneCubeLoc[1]=vectm(5663.339355,-7955.502441,-5557.624512); //On boxes outside middle level UC door
cloneCubeLoc[2]=vectm(6333.112305,-7241.149414,-5557.636719); //On boxes right near middle level blue fusion reactor
cloneCubeLoc[3]=vectm(7687.463867,-8845.201172,-5940.627441); //On control panel that has flame button in coolant area
cloneCubeText[0]="SUBJECT MJID-5493OP2702|nINCEPT DATE: 3/19/65|nASSIGNED BIRTH DATE: 7/20/41|nASSIGNED BIRTH NAME: Stan Carnegie|nBASE GENETIC SAMPLE: SIMONSWALTON32A|nPROFILE: AABCAAB|nVITALS: 45/80/0.89/33/1.2|n|n [[[[[PENDING]]]]]";
cloneCubeText[1]="SUBJECT MJID-2938BU3209|nINCEPT DATE: 7/30/66|nASSIGNED BIRTH DATE: 9/07/40|nASSIGNED BIRTH NAME: Greg Pequod|nBASE GENETIC SAMPLE: |nPAGEBOB86G|nPROFILE: BAABACA|nVITALS: 51/72/1.02/20/2.1|n|n [[[[[PENDING]]]]]";
cloneCubeText[2]="SUBJECT MJID-3209FG2938|nINCEPT DATE: 7/30/66|nASSIGNED BIRTH DATE: 9/07/40|nASSIGNED BIRTH NAME: Jacob Queequeg|nBASE GENETIC SAMPLE: STRONGHOWARD52L|nPROFILE: CAAGATA|nVITALS: 52/73/1.01/20/2.2|n|n [[[[[PENDING]]]]]";
cloneCubeText[3]="SUBJECT MJID-3209FG2938|nINCEPT DATE: 6/17/54|nASSIGNED BIRTH DATE: 11/30/35|nASSIGNED BIRTH NAME: Jason Frudnick|nBASE GENETIC SAMPLE: GARDNERKANE88J|nPROFILE: BABTAGA|nVITALS: 51/81/1.13/20/2.0|n|n [[[[[PENDING]]]]]";
for(i=0;i<4;i++){
#ifdef injections
dc[i] = Spawn(class'#var(prefix)DataCube',,, cloneCubeLoc[i], rotm(0,0,0));
#else
dc[i] = Spawn(class'DXRInformationDevices',,, cloneCubeLoc[i], rotm(0,0,0));
#endif
SpawnDatacubePlaintext(cloneCubeLoc[i],rotm(0,0,0),cloneCubeText[i]);
}
//dc[0].textTag='15_Datacube02';
//dc[1].textTag='15_Datacube03';
//dc[2].textTag='15_Datacube04';
//dc[3].textTag='15_Datacube05';
//Rather than duplicating the existing cubes, add new clone text so there are more possibilities
dc[0].plaintext="SUBJECT MJID-5493OP2702|nINCEPT DATE: 3/19/65|nASSIGNED BIRTH DATE: 7/20/41|nASSIGNED BIRTH NAME: Stan Carnegie|nBASE GENETIC SAMPLE: SIMONSWALTON32A|nPROFILE: AABCAAB|nVITALS: 45/80/0.89/33/1.2|n|n [[[[[PENDING]]]]]";
dc[1].plaintext="SUBJECT MJID-2938BU3209|nINCEPT DATE: 7/30/66|nASSIGNED BIRTH DATE: 9/07/40|nASSIGNED BIRTH NAME: Greg Pequod|nBASE GENETIC SAMPLE: |nPAGEBOB86G|nPROFILE: BAABACA|nVITALS: 51/72/1.02/20/2.1|n|n [[[[[PENDING]]]]]";
dc[2].plaintext="SUBJECT MJID-3209FG2938|nINCEPT DATE: 7/30/66|nASSIGNED BIRTH DATE: 9/07/40|nASSIGNED BIRTH NAME: Jacob Queequeg|nBASE GENETIC SAMPLE: STRONGHOWARD52L|nPROFILE: CAAGATA|nVITALS: 52/73/1.01/20/2.2|n|n [[[[[PENDING]]]]]";
dc[3].plaintext="SUBJECT MJID-3209FG2938|nINCEPT DATE: 6/17/54|nASSIGNED BIRTH DATE: 11/30/35|nASSIGNED BIRTH NAME: Jason Frudnick|nBASE GENETIC SAMPLE: GARDNERKANE88J|nPROFILE: BABTAGA|nVITALS: 51/81/1.13/20/2.0|n|n [[[[[PENDING]]]]]";
}

function PreFirstEntryMapFixes()
Expand Down
2 changes: 1 addition & 1 deletion DXRMissions/DeusEx/Classes/DXRMissionsM01.uc
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,6 @@ function AfterMoveGoalToLocation(Goal g, GoalLocation Loc)
$ "|n|nPS: You can see all my possible locations by clicking the Goal Locations button on your Goals screen."
$ "|nIf you get really stuck then click on Show Spoilers, Show Nanokeys, or Show Datacubes.";

SpawnDatacube(vectm(2801.546387, 171.028091, 2545.382813), rotm(0,0,0), text, true);
SpawnDatacubePlaintext(vectm(2801.546387, 171.028091, 2545.382813), rotm(0,0,0), text, true);
}
}
2 changes: 1 addition & 1 deletion DXRMissions/DeusEx/Classes/DXRMissionsM05.uc
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ function AfterShuffleGoals(int goalsToLocations[32])

dctext = dctext $ "|n|nBoth using the DEMIURGE username. JC will never find them!";

SpawnDatacube(vectm(243.288742, -104.183029, 289.368256), rotm(0,0,0), dctext, true);
SpawnDatacubePlaintext(vectm(243.288742, -104.183029, 289.368256), rotm(0,0,0), dctext, true);
}

function PreFirstEntryMapFixes()
Expand Down
2 changes: 1 addition & 1 deletion DXRMissions/DeusEx/Classes/DXRMissionsM06.uc
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ function DeleteGoal(Goal g, GoalLocation Loc)

function GenerateDTSHintCube(Goal g, GoalLocation Loc)
{
SpawnDatacube(vectm(-1857.841064, -158.911865, 2051.345459), rotm(0,0,0),
SpawnDatacubePlaintext(vectm(-1857.841064, -158.911865, 2051.345459), rotm(0,0,0),
"I borrowed the sword but forgot it somewhere... Maybe "$Loc.name$"?", true);
}
Expand Down
2 changes: 1 addition & 1 deletion DXRMissions/DeusEx/Classes/DXRMissionsM15.uc
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ function AfterMoveGoalToLocation(Goal g, GoalLocation Loc)
dctext = dctext $ "\"a51\" and the password is \"xx15yz\".|n|n";
dctext = dctext $ "BTW, be careful -- a squad made it out before I managed to lock the doors: they headed for the warehouse and then I lost contact with them.|n|n--Hawkins";

dc2 = SpawnDatacube(dc1.Location, dc1.Rotation, dctext);
dc2 = SpawnDatacubePlaintext(dc1.Location, dc1.Rotation, dctext);
if( dc2 != None ){
l("DXRMissions spawned "$ dc2 @ dctext @ dc2.Location);
dc1.Destroy();
Expand Down
2 changes: 1 addition & 1 deletion DXRModules/DeusEx/Classes/DXRMachines.uc
Original file line number Diff line number Diff line change
Expand Up @@ -341,7 +341,7 @@ function #var(prefix)InformationDevices SpawnDatacubeForComputer(vector loc, #va
distrange.max = 16*50;
NearestFloor(locnorm, distrange);
d = SpawnDatacube(locnorm.loc, Rotator(locnorm.norm),
d = SpawnDatacubePlaintext(locnorm.loc, Rotator(locnorm.norm),
c.UserList[0].userName $ " password is " $ c.UserList[0].Password);
#ifdef injections
d.new_passwords[0] = c.UserList[0].Password;
Expand Down

0 comments on commit f4c63d7

Please sign in to comment.