From 45406a145013d1d3ec32b1ebb9b67fd516e6672f Mon Sep 17 00:00:00 2001 From: PJB3005 Date: Fri, 17 Feb 2017 17:37:57 +0100 Subject: [PATCH] Stuff for uploading to PyPI and bugfixes. --- README.rst | 4 ++++ rsi/rsi.py | 10 ++++++++-- setup.py | 17 +++++++++++++++-- 3 files changed, 27 insertions(+), 4 deletions(-) create mode 100644 README.rst diff --git a/README.rst b/README.rst new file mode 100644 index 0000000..68cc2f3 --- /dev/null +++ b/README.rst @@ -0,0 +1,4 @@ +RSI.py +====== + +RSI.py is a library for using RSI files used in the SS13 remake YASSS13RTWCF. diff --git a/rsi/rsi.py b/rsi/rsi.py index f8ba526..2b7925a 100644 --- a/rsi/rsi.py +++ b/rsi/rsi.py @@ -86,7 +86,7 @@ def write(self, path: Union[str, Path]) -> None: row = count % sheetdimensions[0] # type: int column = count // sheetdimensions[0] # type: int - point = row * self.size[0], column * self.size[0] # type: Tuple[int, int] + point = row * self.size[0], column * self.size[1] # type: Tuple[int, int] image.paste(icon, box=point) count += 1 @@ -154,7 +154,13 @@ def from_dmi(cls: Type[T], path: str) -> T: # BYOND does not permit direction specific delays so this is easy. for x in range(rsstate.directions): - rsstate.delays[x] = dmstate.delay.copy() + rsstate.delays[x] = [] + # Circumvent around a BYOND bug (?) where states have more delays than actual frames. + for y in range(dmstate.frames): + if dmstate.frames != 1: + delay = float(dmstate.delay[x]) + rsstate.delays[x].append(delay) + rsstate.icons[x] = dmstate.icons[x * dmstate.frames:(x + 1) * dmstate.frames] return rsi diff --git a/setup.py b/setup.py index 0fe267d..cb67702 100644 --- a/setup.py +++ b/setup.py @@ -2,11 +2,24 @@ setup( name="RSI.py", - version="1.0.1", + version="1.0.2", description="A library for manipulation of the RSI format used in YASSS13RTWCF.", url="https://github.com/NanotrasenInc/RSI.py", author="Pieter-Jan Briers", author_email="pieterjan.briers@gmail.com", license="MIT", - packages=["rsi"] + packages=["rsi"], + python_requires=">=3.5", + install_requires=[ + "Pillow" + ], + classifiers=[ + "Development Status :: 3 - Alpha", + "Intended Audience :: Developers", + "License :: OSI Approved :: MIT License", + "Operating System :: OS Independent", + "Programming Language :: Python :: 3.5", + "Programming Language :: Python :: 3.6", + "Topic :: Software Development :: Libraries :: Python Modules" + ] )