mirror of
https://github.com/Refactorio/RedMew.git
synced 2025-03-03 14:53:01 +02:00
Merge pull request #914 from theorangeangle/vanilla_sprinkles
Added Rocky Road as a map, fixed car body feature.
This commit is contained in:
commit
b85d1bca35
24
map_gen/maps/rocky_road.lua
Normal file
24
map_gen/maps/rocky_road.lua
Normal file
@ -0,0 +1,24 @@
|
||||
local b = require 'map_gen.shared.builders'
|
||||
require 'map_gen.shared.car_body'
|
||||
local RS = require 'map_gen.shared.redmew_surface'
|
||||
local MGSP = require 'resources.map_gen_settings'
|
||||
local ScenarioInfo = require 'features.gui.info'
|
||||
|
||||
local loot = require 'map_gen.shared.loot_items'
|
||||
|
||||
ScenarioInfo.set_map_name('Rocky Road')
|
||||
ScenarioInfo.set_map_description(
|
||||
'We want a vanilla map, they said.\nYou might get the vanilla terrain,\nBut not the vanilla character! Enjoy driving yourself crazy with this one :D'
|
||||
)
|
||||
ScenarioInfo.add_map_extra_info('Players stuck in cars, day/night cycle modified to make solar a pain.')
|
||||
|
||||
RS.set_map_gen_settings(
|
||||
{
|
||||
MGSP.cliff_high
|
||||
}
|
||||
)
|
||||
|
||||
local map = b.full_shape
|
||||
map = b.apply_entity(map, loot)
|
||||
|
||||
return map
|
@ -1,10 +1,11 @@
|
||||
local Event = require 'utils.event'
|
||||
require 'map_gen.shared.redmew_surface'
|
||||
|
||||
local drivers_group = 'Drivers'
|
||||
local random = math.random
|
||||
|
||||
local function transfer_body(player)
|
||||
-- Remove the player from their character and place them in a car.
|
||||
--Place player in a car.
|
||||
local surface = player.surface
|
||||
local force = player.force
|
||||
local pos = force.get_spawn_position(surface)
|
||||
@ -12,11 +13,6 @@ local function transfer_body(player)
|
||||
-- Choose a random direction for the car to face
|
||||
local dir = random(0, 7)
|
||||
|
||||
-- Remove the players' character
|
||||
if player.character then
|
||||
player.character.destroy()
|
||||
end
|
||||
|
||||
--Find a place for a car, place a car, and place fuel+ammo in it
|
||||
local car_pos = surface.find_non_colliding_position('car', pos, 0, 3)
|
||||
local car = surface.create_entity {name = 'car', position = car_pos, direction = dir, force = force}
|
||||
|
Loading…
x
Reference in New Issue
Block a user