From 36ea39861ed7d82f97f9d9a052e0aea3161b49eb Mon Sep 17 00:00:00 2001 From: "theastropath@gmail.com" Date: Sun, 3 Dec 2023 14:13:09 -0500 Subject: [PATCH] Make phone call bingo goal work in Revision maps. Minor adjustment for the bingo viewer when pushing json information. --- BingoDisplay.py | 2 ++ DXRModules/DeusEx/Classes/DXREvents.uc | 41 ++++++++++++++++++++++---- 2 files changed, 38 insertions(+), 5 deletions(-) diff --git a/BingoDisplay.py b/BingoDisplay.py index 1df37e683..420a500dd 100644 --- a/BingoDisplay.py +++ b/BingoDisplay.py @@ -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"]) diff --git a/DXRModules/DeusEx/Classes/DXREvents.uc b/DXRModules/DeusEx/Classes/DXREvents.uc index 94715238f..0343690ac 100644 --- a/DXRModules/DeusEx/Classes/DXREvents.uc +++ b/DXRModules/DeusEx/Classes/DXREvents.uc @@ -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 @@ -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() {