Skip to content

Commit

Permalink
Updates/frontier v8 (#1434)
Browse files Browse the repository at this point in the history
* Fix player pockets

* Add scenario manager gui

* tweak terrain gen

* Add discord notifications

* Add restart UI
  • Loading branch information
RedRafe authored Sep 13, 2024
1 parent 4b040d1 commit 5152d64
Show file tree
Hide file tree
Showing 13 changed files with 652 additions and 65 deletions.
6 changes: 4 additions & 2 deletions features/gui/admin_panel/core.lua
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ function Public.get_main_frame(player)
vertically_stretchable = true,
horizontal_align = 'center',
padding = 10,
vertical_spacing = 10,
vertical_spacing = 5,
})

for _, page in pairs(pages) do
Expand Down Expand Up @@ -157,7 +157,9 @@ function Public.close_all_pages(player)
end

for _, button in pairs(Gui.get_data(frame).left.children) do
button.toggled = false
if button.type == 'button' or button.type == 'sprite-button' then
button.toggled = false
end
end
end

Expand Down
2 changes: 1 addition & 1 deletion features/gui/admin_panel/lua_console.lua
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ local function draw_gui(player)
button_flow.add { type = 'button', name = clear_button_name, style = 'red_back_button', caption = 'Clear' }
local dry_run = button_flow.add { type = 'button', name = dry_run_button_name, style = 'forward_button', caption = 'Dry run' }
local confirm = button_flow.add { type = 'button', name = confirm_button_name, style = 'confirm_double_arrow_button', caption = 'Confirm', tooltip = 'Run input code' }
Gui.set_style(confirm, { left_margin = - 4 })
Gui.set_style(confirm, { left_margin = -9 })

Gui.set_data(dry_run, { input = input, output = output })
Gui.set_data(confirm, { input = input, output = output })
Expand Down
1 change: 1 addition & 0 deletions locale/en/redmew_maps.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -189,6 +189,7 @@ earn_coin=[achievement=steamrolled] you steal another treasure [item=coin] from
empty_rocket=[color=purple][Kraken][/color] The God of the Sea accepts your rocket offer and rewards you with magic fishes
kraken_eat=[color=purple][Kraken][/color] ate __1__ and was delicious!
loot_chest=[achievement=golem] You find an hidden [color=orange]treasure[/color] beneath the enemy forces
abort=[color=blue][Mapkeeper][/color] Aborting map restart
restart=[color=blue][Mapkeeper][/color] Map is restarting in __1__ __plural_for_parameter_1_{1=second|rest=seconds}__
rocket_launched=[color=blue][Mapkeeper][/color] __1__ __plural_for_parameter_1_{1=rocket|rest=rockets}__ launched, __2__ __plural_for_parameter_2_{1=rocket|rest=rockets}__ to go!
rockets_to_launch=Remaining rockets to launch
Expand Down
2 changes: 1 addition & 1 deletion map_gen/maps/danger_ores/modules/restart_command.lua
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ return function(config)
ore_totals_message = ore_totals_message..ore_name:gsub( "-ore", "")..": "..format_number(count, true)..", "
end
ore_totals_message = ore_totals_message:sub(1, -3)..')' -- remove the last ", " and add a bracket
ore_totals_message = "Total ore mined: "..format_number(total_ore, true).. "\\n"..ore_totals_message
ore_totals_message = format_number(total_ore, true).. "\\n"..ore_totals_message

local statistics_message = statistics.scenario..' completed!\\n\\n'..
'Statistics:\\n'..
Expand Down
3 changes: 3 additions & 0 deletions map_gen/maps/frontier/modules/enemy.lua
Original file line number Diff line number Diff line change
Expand Up @@ -371,6 +371,9 @@ end

function Enemy.spawn_turret_outpost(position)
local this = Public.get()
if not this.spawn_enemy_outpost then
return
end
if position.x < this.right_boundary * 32 + this.wall_width then
return
end
Expand Down
7 changes: 1 addition & 6 deletions map_gen/maps/frontier/modules/lobby.lua
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,7 @@ function Lobby.get_surface()
end

function Lobby.teleport_to(player)
for k = 1, player.get_max_inventory_index() do
local inv = player.get_inventory(k)
if inv and inv.valid then
inv.clear()
end
end
player.clear_items_inside()

local surface = Lobby.get_surface()
local position = surface.find_non_colliding_position('character', {0, 0}, 0, 0.2)
Expand Down
Loading

0 comments on commit 5152d64

Please sign in to comment.