mirror of
https://github.com/ComfyFactory/ComfyFactorio.git
synced 2025-02-03 13:12:11 +02:00
Don't set numbers in localized strings
This commit is contained in:
parent
718c97475b
commit
a19e40bbfe
@ -254,7 +254,7 @@ function Public.toggle_window(player)
|
||||
flow3.style.minimal_width = 95
|
||||
flow3.style.font = "default-bold"
|
||||
flow3.style.font_color = { r = 0.10, g = 0.10, b = 0.10 }
|
||||
flow3.tooltip = { "pirates.gui_crew_window_captains_actions_tax_tooltip", Common.coin_tax_percentage }
|
||||
flow3.tooltip = { "pirates.gui_crew_window_captains_actions_tax_tooltip", tostring(Common.coin_tax_percentage) }
|
||||
|
||||
flow2 = flow.add({
|
||||
name = "undock_tip",
|
||||
@ -362,7 +362,7 @@ function Public.full_update(player)
|
||||
end
|
||||
GuiCommon.update_listbox(flow.members.body.members_listbox, wrappedcrew)
|
||||
|
||||
flow.members.header.caption = { "pirates.gui_crew_window_crew_count", (#memory.crewplayerindices or 0) }
|
||||
flow.members.header.caption = { "pirates.gui_crew_window_crew_count", tostring(#memory.crewplayerindices or 0) }
|
||||
end
|
||||
|
||||
-- if flow.captain.body.capn_undock_normal.visible then
|
||||
|
@ -993,7 +993,7 @@ function Public.update_gui(player)
|
||||
flow1 = pirates_flow.fuel_flow
|
||||
-- flow1 = pirates_flow.fuel_piratebutton_flow_1
|
||||
|
||||
local tooltip = { "pirates.fuel_tooltip", Math.floor(memory.stored_fuel or 0) }
|
||||
local tooltip = { "pirates.fuel_tooltip", tostring(Math.floor(memory.stored_fuel or 0)) }
|
||||
flow1.tooltip = tooltip
|
||||
-- flow1.fuel_piratebutton.tooltip = {'pirates.fuel_tooltip', Math.floor(memory.stored_fuel or 0)}
|
||||
|
||||
@ -1015,7 +1015,7 @@ function Public.update_gui(player)
|
||||
flow1 = pirates_flow.progress_piratebutton_frame.progress_piratebutton
|
||||
|
||||
flow1.number = (memory.overworldx or 0)
|
||||
flow1.tooltip = { "pirates.gui_progress_tooltip", memory.overworldx or 0, CoreData.victory_x }
|
||||
flow1.tooltip = { "pirates.gui_progress_tooltip", tostring(memory.overworldx or 0), tostring(CoreData.victory_x) }
|
||||
-- pirates_flow.destination_piratebutton_frame.destination_piratebutton.number = memory.destinationsvisited_indices and #memory.destinationsvisited_indices or 0
|
||||
|
||||
--== State-checking bools ==--
|
||||
|
@ -114,7 +114,7 @@ function Public.full_update(player)
|
||||
end
|
||||
|
||||
flow.current_location.header.caption = { "pirates.gui_progress_current_location", name }
|
||||
flow.distance_travelled.body.leagues.caption = { "pirates.gui_progress_leagues", memory.overworldx or 0 }
|
||||
flow.distance_travelled.body.leagues.caption = { "pirates.gui_progress_leagues", tostring(memory.overworldx or 0) }
|
||||
|
||||
-- local daynighttype
|
||||
-- if destination.static_params and destination.static_params.daynightcycletype then
|
||||
|
@ -535,7 +535,7 @@ function Public.full_update(player)
|
||||
) / 60
|
||||
)
|
||||
or 0
|
||||
ongoing_runs.body.wait_to_join.caption = { "pirates.gui_runs_wait_to_join", wait_time }
|
||||
ongoing_runs.body.wait_to_join.caption = { "pirates.gui_runs_wait_to_join", tostring(wait_time) }
|
||||
end
|
||||
|
||||
ongoing_runs.body.leaving_prompt.visible = playercrew_status.leaving
|
||||
|
@ -287,11 +287,11 @@ function Public.create_hold_surface(nth)
|
||||
else
|
||||
if nth == 2 then
|
||||
if memory.shiphold_rendering_1 then
|
||||
memory.shiphold_rendering_1.text = { "pirates.surface_label_hold_nth", 1 }
|
||||
memory.shiphold_rendering_1.text = { "pirates.surface_label_hold_nth", "1" }
|
||||
end
|
||||
end
|
||||
rendering.draw_text({
|
||||
text = { "pirates.surface_label_hold_nth", nth },
|
||||
text = { "pirates.surface_label_hold_nth", tostring(nth) },
|
||||
surface = surface,
|
||||
target = Public.Data.surfacename_rendering_pos,
|
||||
color = CoreData.colors.renderingtext_yellow,
|
||||
@ -402,16 +402,16 @@ function Public.nth_hold_connect_linked_belts(nth) --assumes both are in standar
|
||||
{ 7, 15 },
|
||||
{ 8, 16 },
|
||||
}
|
||||
for i, c in pairs(connections) do
|
||||
for _, c in pairs(connections) do
|
||||
local b1 = boat.hold_whitebelts[nth][c[1]]
|
||||
local b2 = boat.hold_whitebelts[nth - 1][c[2]]
|
||||
b1.connect_linked_belts(b2)
|
||||
end
|
||||
|
||||
boat.hold_helper_renderings[nth][3].text = { "pirates.hold_connections_label_from", nth - 1 }
|
||||
boat.hold_helper_renderings[nth - 1][3].text = { "pirates.hold_connections_label_to", nth }
|
||||
boat.hold_helper_renderings[nth][4].text = { "pirates.hold_connections_label_from", nth - 1 }
|
||||
boat.hold_helper_renderings[nth - 1][4].text = { "pirates.hold_connections_label_to", nth }
|
||||
boat.hold_helper_renderings[nth][3].text = { "pirates.hold_connections_label_from", tostring(nth - 1) }
|
||||
boat.hold_helper_renderings[nth - 1][3].text = { "pirates.hold_connections_label_to", tostring(nth) }
|
||||
boat.hold_helper_renderings[nth][4].text = { "pirates.hold_connections_label_from", tostring(nth - 1) }
|
||||
boat.hold_helper_renderings[nth - 1][4].text = { "pirates.hold_connections_label_to", tostring(nth) }
|
||||
else
|
||||
connections = {
|
||||
{ 5, 5 },
|
||||
@ -425,10 +425,10 @@ function Public.nth_hold_connect_linked_belts(nth) --assumes both are in standar
|
||||
b1.connect_linked_belts(b2)
|
||||
end
|
||||
|
||||
boat.hold_helper_renderings[nth][3].text = { "pirates.hold_connections_label_from", nth - 1 }
|
||||
boat.hold_helper_renderings[nth - 1][3].text = { "pirates.hold_connections_label_to", nth }
|
||||
boat.hold_helper_renderings[nth][4].text = { "pirates.hold_connections_label_from", nth - 1 }
|
||||
boat.hold_helper_renderings[nth - 1][4].text = { "pirates.hold_connections_label_to", nth }
|
||||
boat.hold_helper_renderings[nth][3].text = { "pirates.hold_connections_label_from", tostring(nth - 1) }
|
||||
boat.hold_helper_renderings[nth - 1][3].text = { "pirates.hold_connections_label_to", tostring(nth) }
|
||||
boat.hold_helper_renderings[nth][4].text = { "pirates.hold_connections_label_from", tostring(nth - 1) }
|
||||
boat.hold_helper_renderings[nth - 1][4].text = { "pirates.hold_connections_label_to", tostring(nth) }
|
||||
end
|
||||
connections = {
|
||||
{ 1, 9 },
|
||||
@ -442,10 +442,10 @@ function Public.nth_hold_connect_linked_belts(nth) --assumes both are in standar
|
||||
b1.connect_linked_belts(b2)
|
||||
end
|
||||
|
||||
boat.hold_helper_renderings[nth][1].text = { "pirates.hold_connections_label_to", 1 }
|
||||
boat.hold_helper_renderings[1][1].text = { "pirates.hold_connections_label_from", nth }
|
||||
boat.hold_helper_renderings[nth][2].text = { "pirates.hold_connections_label_to", 1 }
|
||||
boat.hold_helper_renderings[1][2].text = { "pirates.hold_connections_label_from", nth }
|
||||
boat.hold_helper_renderings[nth][1].text = { "pirates.hold_connections_label_to", "1" }
|
||||
boat.hold_helper_renderings[1][1].text = { "pirates.hold_connections_label_from", tostring(nth) }
|
||||
boat.hold_helper_renderings[nth][2].text = { "pirates.hold_connections_label_to", "1" }
|
||||
boat.hold_helper_renderings[1][2].text = { "pirates.hold_connections_label_from", tostring(nth) }
|
||||
else
|
||||
connections = {
|
||||
{ 1, 1 },
|
||||
@ -459,10 +459,10 @@ function Public.nth_hold_connect_linked_belts(nth) --assumes both are in standar
|
||||
b1.connect_linked_belts(b2)
|
||||
end
|
||||
|
||||
boat.hold_helper_renderings[nth][1].text = { "pirates.hold_connections_label_from", nth - 1 }
|
||||
boat.hold_helper_renderings[nth - 1][1].text = { "pirates.hold_connections_label_to", nth }
|
||||
boat.hold_helper_renderings[nth][2].text = { "pirates.hold_connections_label_from", nth - 1 }
|
||||
boat.hold_helper_renderings[nth - 1][2].text = { "pirates.hold_connections_label_to", nth }
|
||||
boat.hold_helper_renderings[nth][1].text = { "pirates.hold_connections_label_from", tostring(nth - 1) }
|
||||
boat.hold_helper_renderings[nth - 1][1].text = { "pirates.hold_connections_label_to", tostring(nth) }
|
||||
boat.hold_helper_renderings[nth][2].text = { "pirates.hold_connections_label_from", tostring(nth - 1) }
|
||||
boat.hold_helper_renderings[nth - 1][2].text = { "pirates.hold_connections_label_to", tostring(nth) }
|
||||
|
||||
connections = {
|
||||
{ 5, 9 },
|
||||
@ -476,10 +476,10 @@ function Public.nth_hold_connect_linked_belts(nth) --assumes both are in standar
|
||||
b1.connect_linked_belts(b2)
|
||||
end
|
||||
|
||||
boat.hold_helper_renderings[nth][3].text = { "pirates.hold_connections_label_to", 1 }
|
||||
boat.hold_helper_renderings[1][1].text = { "pirates.hold_connections_label_from", nth }
|
||||
boat.hold_helper_renderings[nth][4].text = { "pirates.hold_connections_label_to", 1 }
|
||||
boat.hold_helper_renderings[1][2].text = { "pirates.hold_connections_label_from", nth }
|
||||
boat.hold_helper_renderings[nth][3].text = { "pirates.hold_connections_label_to", "1" }
|
||||
boat.hold_helper_renderings[1][1].text = { "pirates.hold_connections_label_from", tostring(nth) }
|
||||
boat.hold_helper_renderings[nth][4].text = { "pirates.hold_connections_label_to", "1" }
|
||||
boat.hold_helper_renderings[1][2].text = { "pirates.hold_connections_label_from", tostring(nth) }
|
||||
end
|
||||
end
|
||||
end
|
||||
|
Loading…
x
Reference in New Issue
Block a user