1
0
mirror of https://github.com/Refactorio/RedMew.git synced 2025-09-16 09:16:22 +02:00

created getter/setter for info. reverted info change

This commit is contained in:
Maik Wild
2018-09-11 16:55:20 +02:00
parent 0cae822a7c
commit d1030b5198
2 changed files with 62 additions and 15 deletions

View File

@@ -19,22 +19,12 @@ local new_info_key = 4
local welcomed_players = {}
local editable_info = {
[map_name_key] = 'Cave Miner',
[map_name_key] = 'This Map has no name',
[map_description_key] = [[
Diggy Diggy Hole.
]],
[map_extra_info_key] = [[
Delve deep for greater treasures, but also face increased dangers.
Mining productivity research, will overhaul your whole mining equipment,
reinforcing your pickaxe as well as increasing the size of your backpack.
Darkness is a hazard in the mines, stay near your lamps.
Breaking rocks is exhausting work and will make you hungry.
So don´t forget to eat some fish once in a while to stay well fed.
But be careful, eating too much might have it´s consequences too...
]],
By default this section is blank as it's supposed to be filled out on a per map basis.
(If you're seeing this message, ping the admin team to get a description added for
this map)]],
[map_extra_info_key] = 'This map has no extra infomation',
[new_info_key] = 'Nothing is new. The world is at peace'
}
@@ -711,3 +701,39 @@ Gui.on_custom_close(
Gui.destroy(event.element)
end
)
local Public = {}
function Public.get_map_name()
return editable_info[map_name_key]
end
function Public.set_map_name(value)
editable_info[map_name_key] = value
end
function Public.get_map_description()
return editable_info[map_description_key]
end
function Public.set_map_description(value)
editable_info[map_description_key] = value
end
function Public.get_map_extra_info()
return editable_info[map_extra_info_key]
end
function Public.set_map_extra_info(value)
editable_info[map_extra_info_key] = value
end
function Public.get_new_info()
return editable_info[new_info_key]
end
function Public.set_new_info(value)
editable_info[new_info_key] = value
end
return Public

View File

@@ -17,6 +17,27 @@ local simplex_noise = require 'map_gen.shared.simplex_noise'
local Event = require 'utils.event'
local market_items = require "map_gen.combined.cave_miner.market_items"
local Info = require 'info'
Info.set_map_name('Cave Miner')
Info.set_map_description([[
Diggy Diggy Hole.
]])
Info.set_map_extra_info([[
Delve deep for greater treasures, but also face increased dangers.
Mining productivity research, will overhaul your whole mining equipment,
reinforcing your pickaxe as well as increasing the size of your backpack.
Darkness is a hazard in the mines, stay near your lamps.
Breaking rocks is exhausting work and will make you hungry.
So don´t forget to eat some fish once in a while to stay well fed.
But be careful, eating too much might have it´s consequences too...
]])
if global.scenario and global.config then
if global.config.player_list then
global.scenario.config.player_list.enable_coin_col = nil