1
0
mirror of https://github.com/Refactorio/RedMew.git synced 2024-12-04 09:42:30 +02:00

Remove map_selection.lua, tweak build script

This commit is contained in:
plague006 2019-02-01 11:03:02 -05:00
parent ddbae68baf
commit 63eca3d50b
4 changed files with 23 additions and 38 deletions

1
.gitignore vendored Normal file
View File

@ -0,0 +1 @@
/map_selection.lua

View File

@ -30,7 +30,7 @@ before_deploy:
- ./.travis/release_builder.sh
deploy:
on:
condition: $TRAVIS_EVENT_TYPE = cron
condition: $TRAVIS_EVENT_TYPE = cron or $TRAVIS_EVENT_TYPE = api
repo: Refactorio/RedMew
branch: develop
provider: releases
@ -41,6 +41,13 @@ deploy:
- Diggy.zip
- Crashsite.zip
- Tetris.zip
- Beach.zip
- Danger_Ores.zip
- Grid_Islands_Rotated.zip
- Toxic_Danger_Ore_Jungle.zip
- Hub_Spiral.zip
- Bacon_Islands.zip
- Triangle_of_Death.zip
skip_cleanup: true
prerelease: true
name: "$RELEASE_NAME"

View File

@ -12,6 +12,8 @@ echo "Writing the version file"
echo "global.redmew_version=$DATE_FORMATTED-$COMMIT_SHA" > working_copy/resources/version.lua
echo "Contents of the version file:"
cat working_copy/resources/version.lua
echo "Copying map_selection.lua.sample to map_selection.lua"
cp working_copy/map_selection.lua.sample working_copy/map_selection.lua
#Create zips for each of the major maps/scenarios
function process_map (){
@ -19,11 +21,11 @@ function process_map (){
echo "-----$1-----"
#Rename the directory per map
mv "$3" "$1"
# Write the contents to map_selection.lua
echo "return require 'map_gen.maps.$2'" > "$1/map_selection.lua"
echo "Contents of map_selection:"
#Display the contents of map_selection.lua for verification
cat "$1/map_selection.lua"
# Overwrite the first line of map_selection.lua
sed -i "1s/.*/return require 'map_gen.maps.$2'/" "$1/map_selection.lua"
echo "First line of map_selection:"
#Display the first line of map_selection.lua for verification
head -1 "$1/map_selection.lua"
if [ "$4" != true ]; then #Base RedMew can't be deflated
echo "Remove binary files (images)"
#Remove the binary files that don't compress well
@ -47,3 +49,10 @@ process_map "RedMew" "default" "working_copy" true
process_map "Diggy" "diggy" "$PREVIOUS_NAME"
process_map "Crashsite" "crash_site" "$PREVIOUS_NAME"
process_map "Tetris" "tetris" "$PREVIOUS_NAME"
process_map "Beach" "beach" "$PREVIOUS_NAME"
process_map "Danger_Ores" "danger_ores" "$PREVIOUS_NAME"
process_map "Grid_Islands_Rotated" "grid_islands_rotated" "$PREVIOUS_NAME"
process_map "Toxic_Danger_Ore_Jungle" "toxic_danger_ore_jungle" "$PREVIOUS_NAME"
process_map "Hub_Spiral" "hub_spiral" "$PREVIOUS_NAME"
process_map "Bacon_Islands" "bacon_islands" "$PREVIOUS_NAME"
process_map "Triangle_of_Death" "triangle_of_death" "$PREVIOUS_NAME"

View File

@ -1,32 +0,0 @@
return require 'map_gen.maps.default'
--[[
Replace the word default in the quotes above with the name of the map you want to play then save this file.
Example: If you want to play beach, line 1 should look like:
return require 'map_gen.maps.beach'
If default is left in place, you will get a vanilla world.
You can get the full list of maps by looking in map_gen/maps/
Names of some popular maps:
diggy
crash_site
beach
connected_dots
crosses
danger_ores
diagonal_ribbon
double_beach
fractal_balls
fruit_loops
grid_islands
grid_islands_rotated
line_and_tree
line_and_trees
lines_and_balls
lines_and_squares
maltease_crossings
rotten_apples
spiral_of_spirals
tetris
triangle_of_death
void_gears
]]