Skip to content
This repository has been archived by the owner on Oct 27, 2018. It is now read-only.

Commit

Permalink
Fix: tripmine interaction text
Browse files Browse the repository at this point in the history
  • Loading branch information
KashEight committed Sep 2, 2017
1 parent 365beaa commit 535b011
Showing 1 changed file with 12 additions and 14 deletions.
26 changes: 12 additions & 14 deletions lua/InteractionExt.lua
Original file line number Diff line number Diff line change
Expand Up @@ -38,20 +38,18 @@ function BaseInteractionExt:selected(player)
local _text_id = self._tweak_data.text_id
local _string_macros = {}
self:_add_string_macros(_string_macros)
if _text_id then
if self.tweak_data ~= TripMineBase:get_name_id() then
local basic_text = managers.localization:text(_text_id, _string_macros)
managers.hud:show_interact({
text = basic_text .. " (" .. self:check_interact_time() .. " s)",
icon = self._tweak_data.icon
})
else
local basic_text = managers.localization:text(TripMineBase:interaction_text_id(), _string_macros)
managers.hud:show_interact({
text = basic_text .. " (0.0 s)",
icon = "equipment_trip_mine"
})
end
if self.tweak_data ~= TripMineBase:get_name_id() then
local basic_text = managers.localization:text(_text_id, _string_macros)
managers.hud:show_interact({
text = basic_text .. " (" .. self:check_interact_time() .. " s)",
icon = self._tweak_data.icon
})
elseif self.tweak_data == TripMineBase:get_name_id() then
local basic_text = managers.localization:text(TripMineBase:interaction_text_id(), _string_macros)
managers.hud:show_interact({
text = basic_text .. " (0.0 s)",
icon = "equipment_trip_mine"
})
else
selected_original(self, player)
end
Expand Down

0 comments on commit 535b011

Please sign in to comment.