Changes

Fix script error when ship does not remodel to or from another ship
Line 344: Line 344:  
table.insert(buildable_methods, Formatting:format_link(self._large_ship_construction_category, self._large_ship_construction))
 
table.insert(buildable_methods, Formatting:format_link(self._large_ship_construction_category, self._large_ship_construction))
 
end
 
end
self._vars.build_remodel_info = Formatting:format_stat_with_max(Formatting:seconds_to_hms(self._ship:build_time() * 60), table.concat(buildable_methods, ", "))
+
self._vars.build_remodel_info = Formatting:format_stat_with_max(Formatting:seconds_to_hms(self._ship:build_time() * 60), table.concat(buildable_methods, ", "))
 
else
 
else
 
local build_time = self._ship:build_time()
 
local build_time = self._ship:build_time()
self._vars.build_remodel_info = build_time and Formatting:tooltip(self._unbuildable, Formatting:seconds_to_hms(build_time * 60)) or self._unbuildable
+
self._vars.build_remodel_info = build_time and Formatting:tooltip(self._unbuildable, Formatting:seconds_to_hms(build_time * 60)) or self._unbuildable
 
end
 
end
 
self._vars.remodel_cost = ""
 
self._vars.remodel_cost = ""
 
end
 
end
   −
if remodel_from == self._ship:remodel_to() then
+
if remodel_from ~= false and remodel_from == self._ship:remodel_to() then
 
self._vars.reversion_cost = format{self._reversion_cost_template,  
 
self._vars.reversion_cost = format{self._reversion_cost_template,  
 
suffix = Formatting:format_stat(Ship(self._ship:remodel_to()):display_suffix()),  
 
suffix = Formatting:format_stat(Ship(self._ship:remodel_to()):display_suffix()),  
Anonymous user