env_sprite's model

General discussion for off-topic subjects.
User avatar
iPlayer
Developer
Posts: 590
Joined: Sat Nov 14, 2015 8:37 am
Location: Moscow
Contact:

env_sprite's model

Postby iPlayer » Sun Dec 27, 2015 11:26 pm

User avatar
iPlayer
Developer
Posts: 590
Joined: Sat Nov 14, 2015 8:37 am
Location: Moscow
Contact:

Postby iPlayer » Sun Dec 27, 2015 11:34 pm

I can think of Hammer's logic though.

1. Remove all characters past the last dot in file name (if there are any dots) including the dot itself;
2. If there's no trailing '.spr' already, add one

Syntax: Select all

index = filename.rfind('.')
if index > 0:
filename = filename[:index]

if not filename.endswith('.spr'):
filename += '.spr'

Return to “Whatever”

Who is online

Users browsing this forum: No registered users and 20 guests