Skip to content

Commit

Permalink
Make phone call bingo goal work in Revision maps. Minor adjustment for
Browse files Browse the repository at this point in the history
the bingo viewer when pushing json information.
  • Loading branch information
theastropath committed Dec 3, 2023
1 parent 791ddef commit 36ea398
Show file tree
Hide file tree
Showing 2 changed files with 38 additions and 5 deletions.
2 changes: 2 additions & 0 deletions BingoDisplay.py
Original file line number Diff line number Diff line change
Expand Up @@ -216,6 +216,8 @@ def generateBingoStateJson(self):
square = dict()
square["x"]=x
square["y"]=y
if self.board[x][y]==None:
return {}
square["name"]=self.board[x][y]["desc"]
if self.board[x][y]["max"]>1:
square["name"]+="\n"+str(self.board[x][y]["progress"])+"/"+str(self.board[x][y]["max"])
Expand Down
41 changes: 36 additions & 5 deletions DXRModules/DeusEx/Classes/DXREvents.uc
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,10 @@ function WatchActors()
function AddPhoneTriggers(bool isRevision)
{
local #var(prefix)Phone p;
local BingoTrigger bt;
local #var(prefix)WHPhone wp;
#ifdef revision
local RevPhone rp;
#endif
local int i;

//Spawn invisible phones for the payphones
Expand Down Expand Up @@ -111,15 +114,43 @@ function AddPhoneTriggers(bool isRevision)
case "AI_phonecall_paris01":
break; //Covered by the Icarus call flag - IcarusCalls_Played
default:
bt = class'BingoTrigger'.static.Create(self,'PhoneCall',vectm(0,0,0));
bt.bDestroyOthers=False;
bt.tag=StringToName("PhoneCall"$i);
p.event=StringToName("PhoneCall"$i);
CreatePhoneTrigger(p,i);
i++;
break;
}
}
foreach AllActors(class'#var(prefix)WHPhone',wp){
switch(p.BindName){
case "AI_phonecall_paris01":
break; //Covered by the Icarus call flag - IcarusCalls_Played
default:
CreatePhoneTrigger(wp,i);
i++;
break;
}
}
#ifdef revision
foreach AllActors(class'RevPhone',rp){
switch(p.BindName){
case "AI_phonecall_paris01":
break; //Covered by the Icarus call flag - IcarusCalls_Played
default:
CreatePhoneTrigger(rp,i);
i++;
break;
}
}
#endif
}

function CreatePhoneTrigger(Actor phone, int num)
{
local BingoTrigger bt;

bt = class'BingoTrigger'.static.Create(self,'PhoneCall',phone.Location);
bt.bDestroyOthers=False;
bt.tag=StringToName("PhoneCall"$num);
phone.event=StringToName("PhoneCall"$num);
}

function SetWatchFlags() {
Expand Down

0 comments on commit 36ea398

Please sign in to comment.