mirror of
https://github.com/ComfyFactory/ComfyFactorio.git
synced 2025-01-28 03:57:22 +02:00
Mtn v3 - minor fixes
This commit is contained in:
parent
19f463ae80
commit
81b91f9c9b
@ -31,7 +31,7 @@ level_name=LEVEL
|
||||
experience_name=EXPERIENCE
|
||||
next_level_name=NEXT LEVEL
|
||||
strength_name=STRENGTH
|
||||
strength_tooltip=Increases inventory slots, mining speed.\nIncreases melee damage and amount of robot followers.\nIncreases range damage.
|
||||
strength_tooltip=Increases inventory slots, mining speed.\nIncreases melee damage and amount of robot followers.\nIncreases damage of magazine ammunition.
|
||||
magic_name=MAGIC
|
||||
magic_tooltip=Increases reach distance.\nIncreases repair speed.\nEnables spawning entities.
|
||||
dexterity_name=DEXTERITY
|
||||
|
@ -409,6 +409,10 @@ local function kick_player_from_surface(player, target)
|
||||
local c = get_owner_car_object(cars, player)
|
||||
local car = cars[c]
|
||||
|
||||
if not validate_entity(car) then
|
||||
return
|
||||
end
|
||||
|
||||
if not validate_entity(car.entity) then
|
||||
return
|
||||
end
|
||||
|
@ -108,8 +108,13 @@ local function transfer_player_table(player, new_player)
|
||||
local renders = ICT.get('renders')
|
||||
local c = Functions.get_owner_car_object(cars, player)
|
||||
local car = cars[c]
|
||||
if not car then
|
||||
return error('Car was not found! This should not happen!', 2)
|
||||
end
|
||||
car.owner = new_player.index
|
||||
|
||||
car.entity.minable = true
|
||||
|
||||
Functions.render_owner_text(renders, player, car.entity, new_player)
|
||||
|
||||
remove_toolbar(player)
|
||||
|
@ -2,9 +2,6 @@ local Event = require 'utils.event'
|
||||
local Global = require 'utils.global'
|
||||
local Gui = require 'utils.gui'
|
||||
local Task = require 'utils.task_token'
|
||||
local Server = require 'utils.server'
|
||||
local try_get_data = Server.try_get_data
|
||||
-- local set_data = Server.set_data
|
||||
|
||||
local this = {
|
||||
players = {},
|
||||
@ -35,7 +32,6 @@ local set_location
|
||||
local destroy_frame
|
||||
local remove_player
|
||||
local get_player_data
|
||||
local bottom_dataset = 'bottom_frame_data'
|
||||
|
||||
local main_frame_name = Gui.uid_name()
|
||||
|
||||
@ -54,7 +50,7 @@ local sections = {
|
||||
[12] = 6
|
||||
}
|
||||
|
||||
local restore_bottom_location_token =
|
||||
--[[ local restore_bottom_location_token =
|
||||
Task.register(
|
||||
function(event)
|
||||
local player_index = event.player_index
|
||||
@ -79,8 +75,7 @@ local restore_bottom_location_token =
|
||||
|
||||
set_location(player, state)
|
||||
end
|
||||
)
|
||||
|
||||
) ]]
|
||||
local check_bottom_buttons_token =
|
||||
Task.register(
|
||||
function(event)
|
||||
@ -374,20 +369,6 @@ set_location = function(player, state)
|
||||
Event.raise(Public.events.bottom_quickbar_location_changed, {player_index = player.index, data = data})
|
||||
|
||||
data.state = state
|
||||
|
||||
-- local secs = Server.get_current_time()
|
||||
-- if secs ~= nil then
|
||||
-- set_data(
|
||||
-- bottom_dataset,
|
||||
-- player.name,
|
||||
-- {
|
||||
-- bottom_state = data.bottom_state,
|
||||
-- above = data.above,
|
||||
-- state = data.state
|
||||
-- }
|
||||
-- )
|
||||
-- end
|
||||
|
||||
create_frame(player, alignment, location, data)
|
||||
refresh_inner_frames(player)
|
||||
end
|
||||
@ -558,10 +539,6 @@ Event.add(
|
||||
local player = game.get_player(event.player_index)
|
||||
local data = get_player_data(player)
|
||||
set_location(player, data.state)
|
||||
local secs = Server.get_current_time()
|
||||
if secs ~= nil then
|
||||
try_get_data(bottom_dataset, bottom_dataset.index, restore_bottom_location_token)
|
||||
end
|
||||
end
|
||||
end
|
||||
)
|
||||
|
Loading…
x
Reference in New Issue
Block a user