Skip to content

Commit

Permalink
v2.5.5 Merge pull request #568 from Die4Ever/develop
Browse files Browse the repository at this point in the history
v2.5.5
  • Loading branch information
Die4Ever authored Nov 30, 2023
2 parents 3a2ccff + d319a22 commit ffd3b70
Show file tree
Hide file tree
Showing 73 changed files with 1,514 additions and 232 deletions.
56 changes: 34 additions & 22 deletions BingoDisplay.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
import argparse
import time
import sys
import json
import os.path
import urllib.request
import urllib.parse
import re
from tkinter import filedialog as fd
from tkinter import font
Expand Down Expand Up @@ -38,7 +41,10 @@ def __init__(self,targetFile):
self.height=500
self.selectedMod=""
self.prevLines=None
self.bingoLineMatch = re.compile(r'bingoexport\[(?P<key>\d+)\]=\(Event="(?P<event>.*)",Desc="(?P<desc>.*)",Progress=(?P<progress>\d+),Max=(?P<max>\d+),Active=(?P<active>\d+)\)')
self.bingoLineMatch = re.compile(
r'bingoexport\[(?P<key>\d+)\]=\(Event="(?P<event>.*)",Desc="(?P<desc>.*)",Progress=(?P<progress>\d+),Max=(?P<max>\d+),Active=(?P<active>\d+)\)',
re.IGNORECASE
)
self.initDrawnBoard()

def closeWindow(self):
Expand Down Expand Up @@ -141,7 +147,7 @@ def parseBingoLine(self,bingoLine):
bingoMatches=self.bingoLineMatch.match(bingoLine)
if (bingoMatches==None):
return

bingoNumber=int(bingoMatches.group('key'))
bingoCoord = self.bingoNumberToCoord(bingoNumber)

Expand All @@ -157,8 +163,12 @@ def parseBingoLine(self,bingoLine):
def readBingoFile(self):
allLines = dict()
try:
with open(self.targetFile) as file:
bingoFile = file.readlines()
try:
with open(self.targetFile) as file:
bingoFile = file.readlines()
except Exception as e:
print("Couldn't read file, ignoring - "+str(e));
return False

for line in bingoFile:
if BINGO_MOD_LINE_DETECT in line:
Expand Down Expand Up @@ -213,29 +223,29 @@ def generateBingoStateJson(self):
square["possible"]=self.board[x][y]["active"]!=-1
#print(square)
board.append(square)
#return {"bingo":json.dumps({"bingo":board},indent=4)}
#return json.dumps(board,indent=4)
return {"bingo":json.dumps({"bingo":board},indent=4)}

def sendBingoState(self):
pass
# if not os.path.isfile(JSON_DEST_FILENAME):
# return
if not os.path.isfile(JSON_DEST_FILENAME):
return

# f = open(JSON_DEST_FILENAME,'r')
# desturl=f.readline()
# f.close()
f = open(JSON_DEST_FILENAME,'r')
desturl=f.readline()
f.close()

# if (desturl==""):
# print("Make sure to specify where you want to push your json!")
# return
if (desturl==""):
print("Make sure to specify where you want to push your json!")
return

# bingoState = self.generateBingoStateJson()
# #print(bingoState)
# try:
# r = urllib.request.urlopen(desturl,data=urllib.parse.urlencode(bingoState).encode('utf-8'))
# #print(r.status)
# #print(r.read().decode('utf-8'))
# except Exception as e:
# print("Couldn't push JSON to "+desturl+" - "+str(e))
bingoState = self.generateBingoStateJson()
#print(bingoState)
try:
r = urllib.request.urlopen(desturl,data=urllib.parse.urlencode(bingoState).encode('utf-8'))
#print(r.status)
#print(r.read().decode('utf-8'))
except Exception as e:
print("Couldn't push JSON to "+desturl+" - "+str(e))


def saveLastUsedBingoFile(f):
Expand All @@ -252,6 +262,8 @@ def getDefaultPath():
# Linux
Path.home() /'snap'/'steam'/'common'/'.local'/'share'/'Steam'/'steamapps'/'common'/'Deus Ex'/'System',
Path.home() /'.steam'/'steam'/'SteamApps'/'common'/'Deus Ex'/'System',
Path.home() /'.local'/'share'/'Steam'/'steamapps'/'compatdata'/'6910'/'pfx'/'drive_c'/'users'/'steamuser'/'Documents'/'Deus Ex'/'System',
Path.home() /'.local'/'share'/'Steam'/'steamapps'/'common'/'Deus Ex'/'System',
]
p:Path
for p in checks:
Expand Down
42 changes: 0 additions & 42 deletions DXRBalance/DeusEx/Classes/ScopeView.uc

This file was deleted.

8 changes: 3 additions & 5 deletions DXRBalance/DeusEx/Classes/ThrownProjectile.uc
Original file line number Diff line number Diff line change
Expand Up @@ -37,11 +37,9 @@ simulated function PreBeginPlay()
fuseLength += 3.0 * player.SkillSystem.GetSkillLevelValue(class'SkillDemolition');
fuseLength = FClamp(fuseLength, 0.2, 6);
} else if(!bProximityTriggered) {
// higher skill gives the enemies longer fuses for thrown grenades
player = #var(PlayerPawn)(GetPlayerPawn());
if(player != None) {
fuseLength -= player.SkillSystem.GetSkillLevelValue(class'SkillDemolition') * 2.0 + 0.5;
}
// enemy fuses for thrown grenades, a bit quicker than vanilla
fuseLength -= 0.4;
fuseLength = FClamp(fuseLength, 0.2, 6);
}
}

Expand Down
27 changes: 20 additions & 7 deletions DXRCore/DeusEx/Classes/DXRActorsBase.uc
Original file line number Diff line number Diff line change
Expand Up @@ -327,7 +327,7 @@ function Inventory MoveNextItemTo(Inventory item, vector Location, name Tag)
local Inventory nextItem;
local #var(PlayerPawn) player;
local int i;
info("MoveNextItemTo("$item@Location@Tag$")");
l("MoveNextItemTo("$item@Location@Tag$")");
// Find the next item we can process.
while(item != None && (item.IsA('NanoKeyRing') || (!item.bDisplayableInv) || Ammo(item) != None))
item = item.Inventory;
Expand All @@ -336,7 +336,7 @@ function Inventory MoveNextItemTo(Inventory item, vector Location, name Tag)

nextItem = item.Inventory;
player = #var(PlayerPawn)(item.owner);
info("MoveNextItemTo found: " $ item $ "(" $ item.Location $ ") with owner: " $ item.owner $ ", nextItem: " $ nextItem);
l("MoveNextItemTo found: " $ item $ "(" $ item.Location $ ") with owner: " $ item.owner $ ", nextItem: " $ nextItem);

//== Y|y: Turn off any charged pickups we were using and remove the associated HUD. Per Lork on the OTP forums
if(player != None) {
Expand All @@ -354,7 +354,7 @@ function Inventory MoveNextItemTo(Inventory item, vector Location, name Tag)
item.DropFrom(Location);
item.Tag = Tag;// so we can find the item again later
item.bIsSecretGoal = true;// so they don't get deleted by DXRReduceItems
info("MoveNextItemTo "$item$" drop from: ("$Location$"), now at ("$item.Location$"), attempts: "$i);
l("MoveNextItemTo "$item$" drop from: ("$Location$"), now at ("$item.Location$"), attempts: "$i);

// restore any ammo amounts for a weapon to default; Y|y: except for grenades
if (item.IsA('Weapon') && (Weapon(item).AmmoType != None) && !item.IsA('WeaponLAM') && !item.IsA('WeaponGasGrenade') && !item.IsA('WeaponEMPGrenade') && !item.IsA('WeaponNanoVirusGrenade'))
Expand Down Expand Up @@ -737,6 +737,17 @@ static function int GetRotationOffset(class<Actor> c)
return 16384;
if(ClassIsChildOf(c, class'#var(prefix)ThrownProjectile'))
return 16384;
if(ClassIsChildOf(c, class'#var(prefix)WHRedCandleabra'))
return 16384;
if(ClassIsChildOf(c, class'#var(prefix)WeaponNanoSword'))
return 10755;
if(ClassIsChildOf(c, class'#var(prefix)ComputerSecurity'))
return 16384;
if(ClassIsChildOf(c, class'#var(prefix)ComputerPublic'))
return 16384;
//ComputerPersonal is fine without this, so just leave it commented out
//if(ClassIsChildOf(c, class'#var(prefix)ComputerPersonal'))
// return 32768;
if(ClassIsChildOf(c, class'Brush')) {
log("WARNING: GetRotationOffset for "$c$", Brushes/Movers have negative scaling so they don't need rotation adjustments!");
return -1;
Expand Down Expand Up @@ -944,7 +955,7 @@ function bool CheckFreeSpace(out vector loc, float radius, float height)
return true;
}

function vector GetRandomPosition(optional vector target, optional float mindist, optional float maxdist, optional bool allowWater, optional bool allowPain)
function vector GetRandomPosition(optional vector target, optional float mindist, optional float maxdist, optional bool allowWater, optional bool allowPain, optional bool allowSky)
{
local PathNode temp[4096];
local PathNode p;
Expand All @@ -955,6 +966,7 @@ function vector GetRandomPosition(optional vector target, optional float mindist
maxdist = 9999999;

foreach AllActors(class'PathNode', p) {
if( (!allowSky) && p.Region.Zone.IsA('SkyZoneInfo') ) continue;
if( (!allowWater) && p.Region.Zone.bWaterZone ) continue;
if( (!allowPain) && (p.Region.Zone.bKillZone || p.Region.Zone.bPainZone ) ) continue;
dist = VSize(p.Location-target);
Expand All @@ -974,10 +986,10 @@ function vector JitterPosition(vector loc)
return loc;
}

function vector GetRandomPositionFine(optional vector target, optional float mindist, optional float maxdist, optional bool allowWater, optional bool allowPain)
function vector GetRandomPositionFine(optional vector target, optional float mindist, optional float maxdist, optional bool allowWater, optional bool allowPain, optional bool allowSky)
{
local vector loc;
loc = GetRandomPosition(target, mindist, maxdist, allowWater, allowPain);
loc = GetRandomPosition(target, mindist, maxdist, allowWater, allowPain, allowSky);
loc = JitterPosition(loc);
return loc;
}
Expand Down Expand Up @@ -1363,13 +1375,14 @@ function bool PositionIsSafeLenient(Vector oldloc, Actor test, Vector newloc)
return _PositionIsSafeOctant(oldloc, GetCenter(test), newloc);
}

static function GlowUp(Actor a, optional byte hue)
static function GlowUp(Actor a, optional byte hue, optional byte saturation)
{
a.LightType=LT_Steady;
a.LightEffect=LE_None;
a.LightBrightness=160;
if(hue == 0) hue = 155;
a.LightHue=hue;
if(saturation !=0) a.LightSaturation=saturation;
a.LightRadius=6;
}

Expand Down
8 changes: 4 additions & 4 deletions DXRCore/DeusEx/Classes/DXRBase.uc
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ simulated function ReEntry(bool IsTravel);

simulated function bool CheckLogin(#var(PlayerPawn) player)
{
info("CheckLogin("$player$"), inited: "$inited$", dxr.flagbase: "$dxr.flagbase$", dxr.flags.flags_loaded: "$dxr.flags.flags_loaded$", player.SkillSystem: "$player.SkillSystem$", player.SkillSystem.FirstSkill: "$player.SkillSystem.FirstSkill);
l("CheckLogin("$player$"), inited: "$inited$", dxr.flagbase: "$dxr.flagbase$", dxr.flags.flags_loaded: "$dxr.flags.flags_loaded$", player.SkillSystem: "$player.SkillSystem$", player.SkillSystem.FirstSkill: "$player.SkillSystem.FirstSkill);
if( inited == false ) return false;
if( player == None ) return false;
if( player.SkillSystem == None ) return false;
Expand Down Expand Up @@ -275,7 +275,7 @@ simulated function bool RandoLevelValues(Actor a, float min, float max, float we

s = "(DXRando) " $ word $ ":|n " $ s;
info("RandoLevelValues "$a$" = "$s);
l("RandoLevelValues "$a$" = "$s);
ReapplySeed( oldseed );
if(add_desc != "") {
Expand Down Expand Up @@ -433,7 +433,7 @@ simulated function CreateMessageBox( String msgTitle, String msgText, int msgBox
local DXRMessageBoxWindow msgBox;
info(module$" CreateMessageBox "$msgTitle$" - "$msgText);
l(module$" CreateMessageBox "$msgTitle$" - "$msgText);
msgBox = DXRMessageBoxWindow(DeusExRootWindow(player().rootWindow).PushWindow(Class'DXRMessageBoxWindow', False, noPause ));
msgBox.SetTitle(msgTitle);
Expand All @@ -451,7 +451,7 @@ simulated function CreateCustomMessageBox (String msgTitle, String msgText, int
DXRBase module, int id, optional bool noPause) {
local DXRMessageBoxWindow msgBox;
info(module$" CreateCustomMessageBox "$msgTitle$" - "$msgText);
l(module$" CreateCustomMessageBox "$msgTitle$" - "$msgText);
msgBox = DXRMessageBoxWindow(DeusExRootWindow(player().rootWindow).PushWindow(Class'DXRMessageBoxWindow', False, noPause ));
msgBox.SetTitle(msgTitle);
Expand Down
3 changes: 1 addition & 2 deletions DXRCore/DeusEx/Classes/DXRMenuSetupRando.uc
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,7 @@ function BindControls(optional string action)
EnumOption("Ocean Lab", 140, f.settings.starting_map);
EnumOption("Area 51", 150, f.settings.starting_map);
if(EnumOption("Random", -1)) {
f.SetGlobalSeed("random starting map");
f.settings.starting_map = class'DXRStartMap'.static.ChooseRandomStartMap(f.dxr,0);
f.settings.starting_map = class'DXRStartMap'.static.ChooseRandomStartMap(f, 0);
}

BreakLine();
Expand Down
4 changes: 2 additions & 2 deletions DXRCore/DeusEx/Classes/DXRVersion.uc
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ simulated static function CurrentVersion(optional out int major, optional out in
{
major=2;
minor=5;
patch=4;
build=7;//build can't be higher than 99
patch=5;
build=6;//build can't be higher than 99
}

simulated static function string VersionString(optional bool full)
Expand Down
6 changes: 6 additions & 0 deletions DXRFixes/DeusEx/Classes/RiotCop.uc
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
class DXRRiotCopy injects RiotCop;

function GotoDisabledState(name damageType, EHitLocation hitPos)
{
Super(HumanMilitary).GotoDisabledState(damageType, hitPos);
}
6 changes: 4 additions & 2 deletions DXRMapFixups/DeusEx/Classes/DXRFixupM01.uc
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ function PostFirstEntryMapFixes()

switch(dxr.localURL) {
case "01_NYC_UNATCOISLAND":
AddBox(class'#var(prefix)CrateUnbreakableSmall', vectm(6720.866211, -3346.700684, -445.899597));// electrical hut
foreach AllActors(class'DeusExMover', m, 'UN_maindoor') {
m.bBreakable = false;
m.bPickable = false;
Expand Down Expand Up @@ -83,10 +84,11 @@ function PreFirstEntryMapFixes()
FixUNATCOCarterCloset();

#ifdef injections
foreach AllActors(class'#var(prefix)Newspaper',np){
foreach AllActors(class'#var(prefix)Newspaper',np)
#else
foreach AllActors(class'DXRInformationDevices',np){
foreach AllActors(class'DXRInformationDevices',np)
#endif
{
//Make both Joe Greene articles in HQ the same one
if (np.textTag=='01_Newspaper06'){
np.textTag='01_Newspaper08';
Expand Down
Loading

0 comments on commit ffd3b70

Please sign in to comment.