Short version
Akita built two new tablet features. We are finishing them together.
- Battery + charging: the tablet has a battery. It runs down while you use it. You charge it back up at a dock.
- Phone signal: the tablet shows signal bars. When there is no signal, online apps stop showing live numbers and show the last saved numbers instead.
This issue is our shared checklist, so we both know what "finished" means. It follows on from #93.
Two rules for everything here:
- It is all client-side. It must not break dedicated servers.
- The tablet is a per-player HUD. Battery and signal are local to each player. They never run on the server.
Who does what (agreed on Discord)
- Akita: the charging station, battery drain and charge timing, the network build, and tuning.
- Me (Tison): merge into the current tablet, all 26 languages, settings and console, saving, polish.
Where the code is now
All of it is in src/FarmTabletUI.lua.
Battery:
- setup
:133-140
- drain
:1312-1315
- empty screen
:1085-1113
- charging
:1116-1124 and :1294-1310
Network:
- setup
:142-161
- provider screen
:1019-1083
- signal
:1170-1260
- toasts
:1148-1168
What is still "test only" for now:
- Battery drops about 1% per real minute the tablet is open. It should use in-game time instead.
- Charging is just a button that fills up in about 5 real seconds. It should be a charging dock that takes 1 in-game hour.
- Nothing is saved yet, so it all resets on reload.
System 1: Battery + charging dock (do this first)
The idea
There is a charging dock. You walk up to it and press E. The tablet charges to full over 1 in-game hour. While it sits on the dock it is "put away": if you press the open key, you get a message instead of the tablet opening.
The dock
How charging works
Drain rework
Saving
Settings and console
Edge cases to check
System 2: Phone signal
The prototype already works well. The missing piece is meaning. Right now the signal is just for show. Let me make "no signal" actually do something so the system is worth having.
Provider
Signal bars
Outages
What "no signal" actually does (the important part)
Settings and console
Saving
Shared work (mostly mine)
Two things for us to agree on
- How fast the battery drains. Starting idea: a full tablet, left open the whole time, runs flat in about 2 in-game days. That makes it a gentle background thing, not a nag. We tune it together.
- One dock or a buyable one. Start with one fixed dock. If it feels good, we can add a buyable placeable later.
Tagging @Akita83 so we share the checklist. I will tick off the language, settings, and saving rows as I go.
Short version
Akita built two new tablet features. We are finishing them together.
This issue is our shared checklist, so we both know what "finished" means. It follows on from #93.
Two rules for everything here:
Who does what (agreed on Discord)
Where the code is now
All of it is in
src/FarmTabletUI.lua.Battery:
:133-140:1312-1315:1085-1113:1116-1124and:1294-1310Network:
:142-161:1019-1083:1170-1260:1148-1168What is still "test only" for now:
System 1: Battery + charging dock (do this first)
The idea
There is a charging dock. You walk up to it and press E. The tablet charges to full over 1 in-game hour. While it sits on the dock it is "put away": if you press the open key, you get a message instead of the tablet opening.
The dock
How charging works
Drain rework
Constants.lua(suggest about X% per in-game hour while open). Decide if it also drains a tiny bit while closed, or not at all, and write down which.Saving
FSCareerMissionInfo:saveToXMLFile), the same way settings are saved. If you only save on change, the save copy can wipe it.loadMission00Finished.Settings and console
TabletBatterySet <0-100>,TabletCharge,TabletBatterySystem on|off.Edge cases to check
System 2: Phone signal
The prototype already works well. The missing piece is meaning. Right now the signal is just for show. Let me make "no signal" actually do something so the system is worth having.
Provider
Signal bars
_calcLocalSignalBars, same bars at the same spot on the map). Good as is.Outages
What "no signal" actually does (the important part)
self.system.signal(already there at:1250-1257) so each app can decide what to do. Add a small helper likeself:hasSignal()so apps do not have to read the table by hand.Settings and console
TabletSignalSet <0-4>,TabletOutage on|off,TabletNetworkSystem on|off.Saving
Shared work (mostly mine)
ft_battery_*andft_network_*keys, plus all new settings and console text, in all 26 languages. They are only in DE and EN right now.SettingsUIclone helpers.SettingsManagerand the save hook.modDesc.xml, the README version line, and the in-tablet Updates list when this ships.Two things for us to agree on
Tagging @Akita83 so we share the checklist. I will tick off the language, settings, and saving rows as I go.