update README

This commit is contained in:
Serhii Mozhaiskyi 2019-12-17 17:29:16 +02:00
parent 03497a26e1
commit 2bd0f61b77

160
README.md

@ -1,80 +1,80 @@
# Ham Radio # Ham Radio
![Ham Radio screenshot](screenshot.png?raw=true) ![Ham Radio screenshot](screenshot.png?raw=true)
This mod brings radio transmitters and receivers to the Minetest world. This mod brings radio transmitters and receivers to the Minetest world.
Dependencies: Dependencies:
``` ```
default default
basic_materials? basic_materials?
technic? technic?
digilines? digilines?
``` ```
Craft recipes depend of the mods installed. Craft recipes depend of the mods installed.
## Transmitter ## Transmitter
Craft a transmitter and place it in the world. Right click on transmitter to open configuration dialog, then set frequency and RDS message. Craft a transmitter and place it in the world. Right click on transmitter to open configuration dialog, then set frequency and RDS message.
- Empty frequency turns transmitter off. - Empty frequency turns transmitter off.
- Transmitter information is displayed as info text when player points at it. - Transmitter information is displayed as info text when player points at it.
- RDS message can be multiline. However, it is transmitted line by line. - RDS message can be multiline. However, it is transmitted line by line.
- RDS message and frequency can be set via digiline. Also, you can read transmitter configuration via digiline too. - RDS message and frequency can be set via digiline. Also, you can read transmitter configuration via digiline too.
## Beacon ## Beacon
Beacon is a simplified transmitter. After placement it automatically tunes on a random unoccupied frequency from predefined range. Beacon frequency range is determined by `beacon_frequency` setting. Beacon is a simplified transmitter. After placement it automatically tunes on a random unoccupied frequency from predefined range. Beacon frequency range is determined by `beacon_frequency` setting.
- Beacon frequency is displayed as info text when player points at it. - Beacon frequency is displayed as info text when player points at it.
## Receiver ## Receiver
Handheld receiver is a wielded tool. Handheld receiver is a wielded tool.
- Left click opens configuration dialog to set frequency. Empty string turns receiver off. - Left click opens configuration dialog to set frequency. Empty string turns receiver off.
- Shift + left click toggles reception of RDS messages. - Shift + left click toggles reception of RDS messages.
When receiver is tuned to a frequency where at least one transmitter is present, HUD signal meter bar shows signal power. The signal power depends on distance and direction to the transmitter. When receiver is tuned to a frequency where at least one transmitter is present, HUD signal meter bar shows signal power. The signal power depends on distance and direction to the transmitter.
If RDS reception is toggled on, the RDS messages from all transmitters on this frequency are enqueued and will be send one by one as a chat messages to the player with 10 seconds interval. When RDS message queue becomes empty, it refills and starts over again. If RDS reception is toggled on, the RDS messages from all transmitters on this frequency are enqueued and will be send one by one as a chat messages to the player with 10 seconds interval. When RDS message queue becomes empty, it refills and starts over again.
## Stationary Receiver ## Stationary Receiver
Right click on receiver opens configuration window to set frequency. Receiver displays RDS messages as infotext in the same way as handheld receiver. It does not have signal power meter. Right click on receiver opens configuration window to set frequency. Receiver displays RDS messages as infotext in the same way as handheld receiver. It does not have signal power meter.
- You can operate the receiver in the same way as the transmitter. - You can operate the receiver via digiline in the same way as the transmitter.
## Digiline ## Digiline
```lua ```lua
-- channel "ham_radio_rds" accepts plain text -- channel "ham_radio_rds" accepts plain text
digiline.send('ham_radio_rds', 'new RDS message') digiline.send('ham_radio_rds', 'new RDS message')
-- get transmitter info -- get transmitter info
digiline.send('ham_radio', { command = 'get' }) digiline.send('ham_radio', { command = 'get' })
-- returns { frequency = 12345, rds_message = 'text' } -- returns { frequency = 12345, rds_message = 'text' }
-- set frequency -- set frequency
digiline.send('ham_radio', { command = 'set_frequency', value = '12345' }) digiline.send('ham_radio', { command = 'set_frequency', value = '12345' })
-- returns { update = 'frequency', success = true/false, message = errorMessage } -- returns { update = 'frequency', success = true/false, message = errorMessage }
-- set RDS message -- set RDS message
digiline.send('ham_radio', { command = 'set_rds_message', value = 'new RDS message' }) digiline.send('ham_radio', { command = 'set_rds_message', value = 'new RDS message' })
-- returns { update = 'rds_message', success = true } -- returns { update = 'rds_message', success = true }
``` ```
## What's next? ## What's next?
- Place beacons or transmitters anywhere in the world, give frequency to other players and let them search for them - Place beacons or transmitters anywhere in the world, give frequency to other players and let them search for them
- Pick a frequency which all players can use for their announcements to organize radio bulletin board - Pick a frequency which all players can use for their announcements to organize radio bulletin board
- Operate your transmitters with digiline to receive notification on radio - Operate your transmitters with digiline to receive notification on radio
- ??? - ???
- PROFIT - PROFIT
## Author and license ## Author and license
(c) techniX 2019 (c) techniX 2019
Source code: MIT Source code: MIT
Textures: CC BY-SA 3.0 Textures: CC BY-SA 3.0
Sounds: cut from "G32-20-Tuning Radio" by craigsmith, CC 0 Sounds: cut from "G32-20-Tuning Radio" by craigsmith, CC 0