Alarm - PC-Logix/OpenSecurity GitHub Wiki

Alarm

Computer or Redstone controlled though right now there is no way to change the alarm sound outside of computer control.

Can be used as Upgrade for Drones/Microcontrollers/Robots/Tablets

custom sounds can be placed in minecraft/mods/OpenSecurity/assets/opensecurity/sounds/alarms if you play on a server they have to exist on server and all clients to be played correct

Methods

alarm = require("component").os_alarm

alarm.setAlarm("klaxon2") -- Allows you to change the alarm played, 
--the default config is klaxon1 and klaxon2 and the default sound is klaxon1

alarm.setRange(Integer:range) 
-- Sets the range in blocks from the alarm block, allowed range is 0-15

alarm.activate() -- It.. activates the alarm.

alarm.listSounds() -- returns a table of configured alarms.

alarm.deactivate() -- It.. deactivates the alarm.