1
0
mirror of https://github.com/ComfyFactory/ComfyFactorio.git synced 2024-12-30 23:17:53 +02:00

ICW surface sizes fix + rpg magic distances cap

This commit is contained in:
hanakocz 2021-01-30 21:09:31 +01:00
parent 5ca1694886
commit 41bde225ab
3 changed files with 14 additions and 6 deletions

View File

@ -713,6 +713,10 @@ function Public.create_car_room(ic, car)
end
construct_doors(ic, car)
local mgs = surface.map_gen_settings
mgs.width = area.right_bottom.x * 2
mgs.height = area.right_bottom.y * 2
surface.map_gen_settings = mgs
local lx, ly, rx, ry = 4, 1, 5, 1

View File

@ -433,6 +433,10 @@ function Public.create_wagon_room(icw, wagon)
end
construct_wagon_doors(icw, wagon)
local mgs = surface.map_gen_settings
mgs.width = area.right_bottom.x * 2
mgs.height = area.right_bottom.y * 2
surface.map_gen_settings = mgs
if wagon.entity.type == 'fluid-wagon' then
local height = area.right_bottom.y - area.left_top.y

View File

@ -474,12 +474,12 @@ function Public.update_player_stats(player)
local magic = rpg_t[player.index].magicka - 10
local v = magic * 0.22
player_modifiers[player.index].character_build_distance_bonus['rpg'] = math.round(v * 0.25, 3)
player_modifiers[player.index].character_item_drop_distance_bonus['rpg'] = math.round(v * 0.25, 3)
player_modifiers[player.index].character_reach_distance_bonus['rpg'] = math.round(v * 0.25, 3)
player_modifiers[player.index].character_loot_pickup_distance_bonus['rpg'] = math.round(v * 0.22, 3)
player_modifiers[player.index].character_item_pickup_distance_bonus['rpg'] = math.round(v * 0.25, 3)
player_modifiers[player.index].character_resource_reach_distance_bonus['rpg'] = math.round(v * 0.15, 3)
player_modifiers[player.index].character_build_distance_bonus['rpg'] = math.min(60, math.round(v * 0.25, 3))
player_modifiers[player.index].character_item_drop_distance_bonus['rpg'] = math.min(60, math.round(v * 0.25, 3))
player_modifiers[player.index].character_reach_distance_bonus['rpg'] = math.min(60, math.round(v * 0.25, 3))
player_modifiers[player.index].character_loot_pickup_distance_bonus['rpg'] = math.min(20, math.round(v * 0.22, 3))
player_modifiers[player.index].character_item_pickup_distance_bonus['rpg'] = math.min(20, math.round(v * 0.25, 3))
player_modifiers[player.index].character_resource_reach_distance_bonus['rpg'] = math.min(20, math.round(v * 0.15, 3))
if rpg_t[player.index].mana_max >= rpg_extra.mana_limit then
rpg_t[player.index].mana_max = rpg_extra.mana_limit
else