Skip to content

Commit c6b876a

Browse files
committed
2.1.1
1 parent e5995e6 commit c6b876a

7 files changed

Lines changed: 42 additions & 48 deletions

File tree

CHANGELOG.md

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,20 @@
1+
2.1.1
2+
--Fixed bug in PowerSystems
3+
--Changed how Clock UI gets current time
4+
5+
2.1.0
6+
--Added PowerSystems UI
7+
--Added Notepad UI
8+
--Adjusted core moveui to use local data storage, increases client and server performance.
9+
--Decreased the amount of space used by FactionNotifier
10+
--Dynamic UI's now shrink and grow depending on the individual UI.
11+
112
1.4.0
213
--Added Clock UI, Thxs DNightmare
314
--Added FactionNotifier UI
415
--Added ability to delete scrapyard licenses data from the UI
516
--Removed Vanilla files from zip, follow installation instructions please
6-
17+
718
1.3.0
819
--Every UI now utilizes delayed server/client communication
920
Will help tremendously with any high ping issues.

README.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,11 @@ A UI that displays notes added via the MoveUI Menu.
8888
___
8989
1. Download the zip file
9090
2. Drag and Drop the contents into the /Avorion/ directory,
91+
File structure:
92+
/avorion
93+
|---->/data
94+
|---->/mods
95+
|---->/MoveUI
9196

9297
3. Place this line at the bottom of this file: data/scripts/entity/merchants/scrapyard.lua
9398

@@ -108,6 +113,8 @@ I encourage all modders to adopt this file structure as default, as its likely t
108113

109114
## Downloads
110115
___
116+
https://github.com/dirtyredz/MoveUI/releases/download/2.1.1/MoveUI.v2.1.1.zip
117+
111118
https://github.com/dirtyredz/MoveUI/releases/download/2.1.0/MoveUI.v2.1.0.zip
112119

113120
https://github.com/dirtyredz/MoveUI/releases/download/1.4.0/MoveUI.v1.4.0.zip
@@ -125,6 +132,10 @@ https://github.com/dirtyredz/MoveUI/releases/download/1.0.0/MoveUI.v1.0.0.zip
125132

126133
## Changelog
127134
___
135+
2.1.1
136+
--Fixed bug in PowerSystems
137+
--Changed how Clock UI gets current time
138+
128139
2.1.0
129140
--Added PowerSystems UI
130141
--Added Notepad UI

README.txt

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,12 @@ A UI that displays notes added via the MoveUI Menu.
8686
[hr]
8787
1. Download the zip file
8888
2. Drag and Drop the contents into the /Avorion/ directory,
89+
File structure:
90+
/avorion
91+
|---->/data
92+
|---->/mods
93+
|---->/MoveUI
94+
8995

9096
3. Place this line at the bottom of this file: data/scripts/entity/merchants/scrapyard.lua
9197
[code]if not pcall(require, 'mods.MoveUI.scripts.entity.merchants.scrapyard') then print('Mod: MoveUI, failed to extend scrapyard.lua!') end[/code]
@@ -106,10 +112,12 @@ I encourage all modders to adopt this file structure as default, as its likely t
106112

107113
[b][size=24pt]Downloads[/size][/b]
108114
[hr]
109-
[url=https://github.com/dirtyredz/MoveUI/releases/download/2.1.0/MoveUI.v2.1.0.zip]MoveUI v2.1.0[/url]
115+
[url=https://github.com/dirtyredz/MoveUI/releases/download/2.1.1/MoveUI.v2.1.1.zip]MoveUI v2.1.1[/url]
110116

111117
Older Downloads
112118
[spoiler]
119+
[url=https://github.com/dirtyredz/MoveUI/releases/download/2.1.0/MoveUI.v2.1.0.zip]MoveUI v2.1.0[/url]
120+
113121
[url=https://github.com/dirtyredz/MoveUI/releases/download/1.4.0/MoveUI.v1.4.0.zip]MoveUI v1.4.0[/url]
114122

115123
[url=https://github.com/dirtyredz/MoveUI/releases/download/1.3.0/MoveUI.v1.3.0.zip]MoveUI v1.3.0[/url]
@@ -125,6 +133,10 @@ Older Downloads
125133

126134
[b][size=24pt]Changelog[/size][/b]
127135
[hr]
136+
2.1.1
137+
--Fixed bug in PowerSystems
138+
--Changed how Clock UI gets current time
139+
128140
2.1.0
129141
--Added PowerSystems UI
130142
--Added Notepad UI

mods/MoveUI/scripts/player/Clock.lua

Lines changed: 2 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -13,13 +13,9 @@ local Description = "Oh no, it's morning again :)"
1313
local rect
1414
local res
1515
local defaultPosition
16-
local currentDate
17-
local currentTime = ''
18-
local date
1916
local AllowMoving
2017
local player
2118

22-
2319
function Clock.initialize()
2420
if onClient() then
2521
player = Player()
@@ -32,19 +28,13 @@ function Clock.initialize()
3228
--MoveUI - Dirtyredz|David McClain
3329
defaultPosition = vec2(res.x * 0.7,res.y * 0.07)
3430
rect.position = MoveUI.CheckOverride(player, defaultPosition,OverridePosition,Title)
35-
Clock.getCurrentDate()
3631
end
3732
end
3833

3934
function Clock.buildTab(tabbedWindow)
4035
-- TODO: add alarm settings in here
4136
end
4237

43-
44-
function Clock.onSectorEntered()
45-
Clock.getCurrentDate() -- sync time with server on sector change
46-
end
47-
4838
function Clock.onPreRenderHud()
4939
if OverridePosition then
5040
rect.position = OverridePosition
@@ -59,41 +49,11 @@ function Clock.onPreRenderHud()
5949
drawTextRect(Title, rect, 0, 0,ColorRGB(1,1,1), 10, 0, 0, 0)
6050
return
6151
end
62-
63-
drawTextRect(currentTime, rect,0, 0,ColorRGB(1,1,1), 15, 0, 0, 0)
64-
end
65-
66-
function Clock.getCurrentDate(date)
67-
if onClient() then
68-
if date then
69-
currentDate = date
70-
return
71-
end
72-
invokeServerFunction('getCurrentDate')
73-
return
74-
end
75-
76-
local cDate = os.date ("*t")
77-
invokeClientFunction(Player(callingPlayer),'getCurrentDate', cDate)
52+
local DateTime = os.date("*t")
53+
drawTextRect(DateTime.hour..":"..DateTime.min..":"..DateTime.sec, rect,0, 0,ColorRGB(1,1,1), 15, 0, 0, 0)
7854
end
7955

8056
function Clock.updateClient(timeStep)
81-
if currentDate then
82-
currentDate.sec = math.floor(currentDate.sec + timeStep)
83-
if currentDate.sec >= 60 then
84-
currentDate.sec = 0
85-
currentDate.min = currentDate.min + 1
86-
if currentDate.min >= 60 then
87-
currentDate.min = 0
88-
currentDate.hours = currentDate.hour + 1
89-
-- TODO: add 12/24hr support
90-
if currentDate.hour >= 24 then
91-
currentDate.hour = 0
92-
end
93-
end
94-
end
95-
currentTime = string.format("%02d:%02d:%02d", currentDate.hour, currentDate.min, currentDate.sec)
96-
end
9757
AllowMoving = MoveUI.AllowedMoving()
9858
end
9959

mods/MoveUI/scripts/player/PowerSystems.lua

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,7 @@ function PowerSystems.onPreRenderHud()
101101
end
102102

103103
local HSplit = UIHorizontalMultiSplitter(NewRect, 20, 5, 5)
104+
if not player.craftIndex then return end
104105
local ES = ReadOnlyEnergySystem(player.craftIndex)
105106
if not ES then return end
106107
local FontSize = LoadedOptions.FS or 15

mods/MoveUI/scripts/player/ResourcesUI.lua

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -130,13 +130,12 @@ function ResourcesUI.getUpdateInterval()
130130
end
131131

132132
function updateResourcesInfo()
133-
134-
local allegiance = player.allianceIndex
133+
local allegiance = player.allianceIndex
135134
if LoadedOptions.SA and allegiance then
136135
local a = Alliance(allegiance)
137136
resources = {a:getResources()}
138137
money = a.money
139-
else
138+
else
140139
resources = {player:getResources()}
141140
money = player.money
142141
end

mods/MoveUI/scripts/player/ScrapyardLicenses.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@ function ScrapyardLicenses.onPreRenderHud()
144144
end
145145

146146
local InAllianceShip = false
147-
if not Entity(player.craftIndex) then return end
147+
if not player.craftIndex and not Entity(player.craftIndex) then return end
148148
if player.index ~= Entity(player.craftIndex).factionIndex then
149149
InAllianceShip = true
150150
end

0 commit comments

Comments
 (0)