forked from SilverStudioGames/WTS
Bug Fix (Windows)
* Replaced os.path.join with posixpath.join in some instances to enforce UNIX paths
This commit is contained in:
parent
fb8e3aab0f
commit
7d1e761308
@ -20,7 +20,7 @@ init 1 python:
|
||||
|
||||
@functools.cache
|
||||
def get_layers(self, hash):
|
||||
path = os.path.join(self.modpath, "characters", self.name, self.char.pose, "bodyparts", self.type, self.id)
|
||||
path = posixpath.join(self.modpath, "characters", self.name, self.char.pose, "bodyparts", self.type, self.id)
|
||||
|
||||
extensions = self.extensions
|
||||
types = self.layer_types
|
||||
|
@ -58,7 +58,7 @@ init python:
|
||||
|
||||
@functools.cache
|
||||
def get_layers(self, hash):
|
||||
path = os.path.join(self.modpath, "characters", self.name, self.char.pose, "clothes", self.type, self.id)
|
||||
path = posixpath.join(self.modpath, "characters", self.name, self.char.pose, "clothes", self.type, self.id)
|
||||
|
||||
extensions = self.extensions
|
||||
types = self.layer_types
|
||||
|
@ -34,7 +34,7 @@ init python:
|
||||
|
||||
@functools.cache
|
||||
def get_layers(self, hash, _ignore_equipped=False):
|
||||
path = os.path.join(self.modpath, "characters", self.name, self.char.pose, "clothes", self.type, self.id)
|
||||
path = posixpath.join(self.modpath, "characters", self.name, self.char.pose, "clothes", self.type, self.id)
|
||||
_tracking = self._tracking
|
||||
|
||||
def _negative_lookahead():
|
||||
@ -43,7 +43,7 @@ init python:
|
||||
def _lookahead(path):
|
||||
tracking_object = self.tracking_object
|
||||
tracking_id = tracking_object.id if tracking_object else None
|
||||
path = os.path.join(path, tracking_id)
|
||||
path = posixpath.join(path, tracking_id)
|
||||
|
||||
if not any(fp.startswith(path) for fp in renpy.list_files()):
|
||||
return "default"
|
||||
@ -102,7 +102,7 @@ init python:
|
||||
print(f"Invalid tracker for object: {self}")
|
||||
return {}
|
||||
|
||||
path = os.path.join(path, tracking_id)
|
||||
path = posixpath.join(path, tracking_id)
|
||||
|
||||
extensions = self.extensions
|
||||
types = self.layer_types
|
||||
|
@ -53,14 +53,14 @@ init python:
|
||||
if part in face_layers:
|
||||
zorder = face_layers.get(part)
|
||||
identifier = active_faces.get(part, "default")
|
||||
path = os.path.join(self.char.modpath, "characters", self.char.name, self.char.pose, "cum", part, name, identifier)
|
||||
path = posixpath.join(self.char.modpath, "characters", self.char.name, self.char.pose, "cum", part, name, identifier)
|
||||
else:
|
||||
|
||||
cloth, zorder, is_worn = active_clothes.get(part, [None, None, None])
|
||||
|
||||
if is_worn is None:
|
||||
# Backwards compatibility for old layering system
|
||||
path = os.path.join("characters", self.char.name, self.char.pose, "cum", part, name)
|
||||
path = posixpath.join("characters", self.char.name, self.char.pose, "cum", part, name)
|
||||
|
||||
if config.developer:
|
||||
renpy.notify(f"Using old-type cum layer, consider updating the code; Layer: \"{part}\"")
|
||||
@ -74,8 +74,8 @@ init python:
|
||||
modpath = cloth.modpath
|
||||
zorder = cloth.zorder + 1
|
||||
|
||||
path = os.path.join(modpath, "characters", self.char.name, self.char.pose, "cum", part, name, identifier)
|
||||
path = path if _lookahead(path) else os.path.join(os.path.split(path)[0], (identifier := "default"))
|
||||
path = posixpath.join(modpath, "characters", self.char.name, self.char.pose, "cum", part, name, identifier)
|
||||
path = path if _lookahead(path) else posixpath.join(os.path.split(path)[0], (identifier := "default"))
|
||||
|
||||
for f in renpy.list_files():
|
||||
fp, fn = os.path.split(f)
|
||||
|
@ -41,7 +41,7 @@ init python:
|
||||
if name is None:
|
||||
continue
|
||||
|
||||
path = os.path.join(self.char.modpath, "characters", self.char.name, self.char.pose, "face", part, name)
|
||||
path = posixpath.join(self.char.modpath, "characters", self.char.name, self.char.pose, "face", part, name)
|
||||
|
||||
for f in renpy.list_files():
|
||||
fp, fn = os.path.split(f)
|
||||
|
@ -467,7 +467,7 @@ init python:
|
||||
self.show()
|
||||
|
||||
def set_pose(self, pose):
|
||||
pose = "" if pose is None else os.path.join("poses", pose)
|
||||
pose = "" if pose is None else posixpath.join("poses", pose)
|
||||
self.pose = pose
|
||||
self.body.is_stale()
|
||||
self.face.is_stale()
|
||||
|
@ -20,7 +20,7 @@ init python:
|
||||
print(f"Invalid tracker for object: {self}")
|
||||
return []
|
||||
|
||||
path = os.path.join(self.modpath, "characters", self.name, self.char.pose, "clothes", self.type, self.id, tracking)
|
||||
path = posixpath.join(self.modpath, "characters", self.name, self.char.pose, "clothes", self.type, self.id, tracking)
|
||||
|
||||
extensions = self.extensions
|
||||
types = self.layer_types
|
||||
|
@ -24,7 +24,7 @@ init python in studio:
|
||||
|
||||
for part in charobj.face._face.keys():
|
||||
|
||||
path = os.path.join("characters", charname, charobj.pose, "face", part)
|
||||
path = posixpath.join("characters", charname, charobj.pose, "face", part)
|
||||
|
||||
for f in renpy.list_files():
|
||||
fp, fn = os.path.split(f)
|
||||
|
Loading…
Reference in New Issue
Block a user