Skip to content

Instantly share code, notes, and snippets.

@Lucjari
Last active February 14, 2018 03:28
Show Gist options
  • Select an option

  • Save Lucjari/21388cb07e6ae9ec416d330bb25a49fa to your computer and use it in GitHub Desktop.

Select an option

Save Lucjari/21388cb07e6ae9ec416d330bb25a49fa to your computer and use it in GitHub Desktop.
Switches between the normal maps and the out of bounds maps for Penumbra: Black Plague.
@echo off
:: Checks if maps_backup or maps_oob exists.
IF NOT EXIST "redist\maps_backup" (
RENAME "redist\maps" "maps_backup"
RENAME "redist\maps_oob" "maps"
) ELSE (
RENAME "redist\maps" "maps_oob"
RENAME "redist\maps_backup" "maps"
)
:: Deletes cache for all the maps affected.
del "redist\core\cache\level01_cells.collcach"
del "redist\core\cache\level02_vents.collcach"
del "redist\core\cache\level04_messhall.collcach"
del "redist\core\cache\level07_residential_corridors.collcach"
del "redist\core\cache\level08_computer_room.collcach"
del "redist\core\cache\level10_machine_room.collcach"
del "redist\core\cache\level11_infirmary.collcach"
del "redist\core\cache\level16_infected_corridors.collcach"
del "redist\core\cache\level17_kennel.collcach"
del "redist\core\cache\level19_chemical_laboratory.collcach"
del "redist\core\cache\level20_Examination_Room.collcach"
del "redist\core\cache\level21_tower_2.collcach"
del "redist\core\cache\level22_ending.collcach"
@Glaived

Glaived commented Dec 25, 2017

Copy link
Copy Markdown
@echo off
:: Checks if maps_backup or maps_oob exists.

IF NOT EXIST "redist\maps_backup" (
    RENAME "redist\maps" "maps_backup"
    RENAME "redist\maps_oob" "maps"
) ELSE (
    RENAME "redist\maps" "maps_oob"
    RENAME "redist\maps_backup" "maps"
)

:: Deletes cache for all the maps.

for %%v in (".\redist\core\cache\level*.collcach") do (
    del %%v
)

Why not delete all cache files from all the maps ?

@Lucjari

Lucjari commented Feb 14, 2018

Copy link
Copy Markdown
Author

Because deleting cache means longer loading the next time you play the map you deleted the cache for.
And since we don't affect all the maps I think it would be a waste to delete all the cache files.
Even though I think your code looks a lot neater.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment