Permalink
Browse files

added bin lid asset to maps

  • Loading branch information...
1 parent 78e72d7 commit 81562a4cbf540b1df1674c86b697d676235ef2e3 @Sketchy502 committed Oct 5, 2016
Showing with 12 additions and 8 deletions.
  1. +2 −1 sdv/imagegeneration/assets.py
  2. +2 −0 sdv/imagegeneration/farm.py
  3. +8 −7 tools/farm.py
@@ -140,7 +140,8 @@ def loadFarmAssets():
'mill':Image.open(os.path.join(asset_dir, 'farm', 'buildings', 'Mill.png')),
'shed': Image.open(os.path.join(asset_dir, 'farm', 'buildings', 'Shed.png')),
'water obelisk': Image.open(os.path.join(asset_dir, 'farm', 'buildings', 'Water Obelisk.png'))
- }
+ },
+ 'binLid': Image.open(os.path.join(asset_dir, 'farm', 'looseSprites', 'binLid.png'))
}
return assets
@@ -278,6 +278,8 @@ def generateFarm(season, data, assets=None):
assets['overlays'][type][season][0])
farm_base.paste(assets['overlays'][type][season][1], (0, 0),
assets['overlays'][type][season][1])
+ #bin lid
+ farm_base.paste(assets['binLid'], (1136, 210), mask=assets['binLid'])
except Exception as e:
print(e)
View
@@ -85,7 +85,6 @@ def copy_farm():
# Barns
# Normal
- src_directory = os.getcwd() + os.path.join(os.path.sep, 'assets')
assets = Image.open(os.path.join(src_directory, 'Buildings', 'Barn.png'))
barn = assets.crop((0, 0, 112, 112))
@@ -96,7 +95,6 @@ def copy_farm():
barn.save(os.path.join(base_path, 'farm', 'buildings', 'Barn.png'))
# Big
- src_directory = os.getcwd() + os.path.join(os.path.sep, 'assets')
assets = Image.open(os.path.join(src_directory, 'Buildings', 'Big Barn.png'))
barn = assets.crop((0, 0, 112, 112))
@@ -107,7 +105,6 @@ def copy_farm():
barn.save(os.path.join(base_path, 'farm', 'buildings', 'Big Barn.png'))
# Deluxe
- src_directory = os.getcwd() + os.path.join(os.path.sep, 'assets')
assets = Image.open(os.path.join(src_directory, 'Buildings', 'Deluxe Barn.png'))
barn = assets.crop((0, 0, 112, 112))
@@ -119,7 +116,6 @@ def copy_farm():
# Coops
# Normal
- src_directory = os.getcwd() + os.path.join(os.path.sep, 'assets')
assets = Image.open(os.path.join(src_directory, 'Buildings', 'Coop.png'))
coop = assets.crop((0, 0, 96, 112))
@@ -128,7 +124,6 @@ def copy_farm():
coop.save(os.path.join(base_path, 'farm', 'buildings', 'Coop.png'))
# Big
- src_directory = os.getcwd() + os.path.join(os.path.sep, 'assets')
assets = Image.open(os.path.join(src_directory, 'Buildings', 'Big Coop.png'))
coop = assets.crop((0, 0, 96, 112))
@@ -137,10 +132,16 @@ def copy_farm():
coop.save(os.path.join(base_path, 'farm', 'buildings', 'Big Coop.png'))
# Delux
- src_directory = os.getcwd() + os.path.join(os.path.sep, 'assets')
assets = Image.open(os.path.join(src_directory, 'Buildings', 'Deluxe Coop.png'))
coop = assets.crop((0, 0, 96, 112))
door = assets.crop((0, 112, 16, 112 + 16))
coop.paste(door, box=(32, 96), mask=door)
- coop.save(os.path.join(base_path, 'farm', 'buildings', 'Deluxe Coop.png'))
+ coop.save(os.path.join(base_path, 'farm', 'buildings', 'Deluxe Coop.png'))
+
+ # Copy Bin Lid
+ asset = Image.open(os.path.join(src_directory, 'loosesprites', 'cursors.png'))
+ x = 132
+ y = 235
+ bin_lid = asset.crop((x, y, x+ 32, y + 16))
+ bin_lid.save(os.path.join(base_path, 'farm', 'looseSprites', 'binLid.png'))

0 comments on commit 81562a4

Please sign in to comment.