Skip to content

Commit

Permalink
Add bingo goal for playing pinball
Browse files Browse the repository at this point in the history
  • Loading branch information
theastropath committed Jun 24, 2023
1 parent afb6f04 commit dbe333b
Show file tree
Hide file tree
Showing 3 changed files with 36 additions and 0 deletions.
1 change: 1 addition & 0 deletions DXRModules/DeusEx/Classes/DXREvents.uc
Original file line number Diff line number Diff line change
Expand Up @@ -2216,6 +2216,7 @@ defaultproperties
bingo_options(196)=(event="PianoSongPlayed",desc="Play %s different songs on the piano",max=5,missions=64)
bingo_options(197)=(event="PianoSong0Played",desc="Play the theme song on the piano",max=1,missions=64)
bingo_options(198)=(event="PianoSong7Played",desc="Stauf Says...",max=1,missions=64)
bingo_options(199)=(event="PinballWizard",desc="Play %s different pinball machines",max=10,missions=37246)

mutually_exclusive(0)=(e1="PaulDenton_Dead",e2="SavedPaul")
mutually_exclusive(1)=(e1="JockBlewUp",e2="GotHelicopterInfo")
Expand Down
18 changes: 18 additions & 0 deletions DXRModules/DeusEx/Classes/DXRReplaceActors.uc
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,9 @@ function ReplaceActors()
else if( #var(prefix)Poolball(a) != None ) {
ReplacePoolball(#var(prefix)Poolball(a));
}
else if( #var(prefix)Pinball(a) != None ) {
ReplacePinball(#var(prefix)Pinball(a));
}
#ifdef gmdx
else if( WeaponGEPGun(a) != None ) {
ReplaceGepGun(WeaponGEPGun(a));
Expand Down Expand Up @@ -236,6 +239,21 @@ function ReplacePoolball(#var(prefix)Poolball a)
a.Destroy();
}

function ReplacePinball(#var(prefix)Pinball a)
{
local DXRPinball n;
n = DXRPinball(SpawnReplacement(a, class'DXRPinball'));
if(n == None)
return;

// probably doesn't need this since it's all defaults
//ReplaceDecoration(a, n);
#ifdef hx
n.PrecessorName = a.PrecessorName;
#endif
a.Destroy();
}

function ReplaceToilet(#var(prefix)Toilet a)
{
local DXRToilet n;
Expand Down
17 changes: 17 additions & 0 deletions DXRando/DeusEx/Classes/Pinball.uc
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
class DXRPinball injects #var(prefix)Pinball;

var bool bAlreadyUsed;

function Frob(actor Frobber, Inventory frobWith)
{
local DXRando dxr;

if (!bUsing && !bAlreadyUsed){
bAlreadyUsed=True;
foreach AllActors(class'DXRando', dxr) {
class'DXREvents'.static.MarkBingo(dxr,"PinballWizard");
}
}

Super.Frob(Frobber,frobWith);
}

0 comments on commit dbe333b

Please sign in to comment.