Skip to content

Commit

Permalink
Use colors and show amount of tick left during transitions
Browse files Browse the repository at this point in the history
  • Loading branch information
veger committed Jul 20, 2023
1 parent 89df774 commit ba91d5e
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
8 changes: 4 additions & 4 deletions locale/en/locale.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ signal-target-south-east=South-east corner of the snapshot target
signal-target-south-west=South-west corner of the snapshot target

[stats]
all-paused=All cameras paused
disabled=Disabled
transition=Transitioning
recording=Recording
all-paused=[color=1, 0.8, 0]All cameras paused[/color]
disabled=[color=1,0,0]Disabled[/color]
transition=[color=0, 0.75, 1]Transitioning (__1__ __plural_for_parameter_1_{1=tick|rest=ticks}__)[/color]
recording=[color=0,1,0]Recording[/color]
8 changes: 4 additions & 4 deletions scripts/camera.lua
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ local targetBox = {
nw = { name = "signal-target-north-west", type = "virtual" },
}

local Camera = {}

--- @class Camera.camera
--- @field centerPos table
--- @field enabled boolean
Expand All @@ -41,8 +43,6 @@ local targetBox = {
--- @field transitionTicks number Time (in ticks) a transition should take (calculated from transitionPeriod)
--- @field transitionData Camera.cameraTransition|nil When set, a transition is active

local Camera = {}

--- @class Camera.cameraTransition
--- @field ticks integer Number of ticks (screenshots) the transitions takes
--- @field transitionTicksLeft integer Number of ticks (screenshots) left of the transition
Expand Down Expand Up @@ -371,11 +371,11 @@ function Camera.recordingSensor(player)
local cameraStatuses = {}
for _, camera in pairs(playerSettings.cameras) do
table.insert(cameraStatuses, ", ")
table.insert(cameraStatuses, camera.name .. ": ")
table.insert(cameraStatuses, camera.name .. " = ")
if not camera.enabled then
table.insert(cameraStatuses, { "stats.disabled" })
elseif camera.transitionData ~= nil then
table.insert(cameraStatuses, { "stats.transition" })
table.insert(cameraStatuses, { "stats.transition", camera.transitionData.transitionTicksLeft })
else
table.insert(cameraStatuses, { "stats.recording" })
end
Expand Down

0 comments on commit ba91d5e

Please sign in to comment.