mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2026-08-24 05:23:22 +01:00
Modular Computer Message Slider (#11659)
This commit is contained in:
@@ -28,7 +28,8 @@ var/global/ntnrc_uid = 0
|
||||
for(var/datum/computer_file/program/chat_client/Cl in U.clients)
|
||||
var/notification_text = message.format_chat_notification(src, Cl)
|
||||
if(notification_text && Cl.can_receive_notification(message.client))
|
||||
Cl.computer.output_message(notification_text, 0)
|
||||
if(!Cl.message_mute)
|
||||
Cl.computer.output_message(notification_text, 0)
|
||||
if(message.play_sound)
|
||||
Cl.play_notification_sound(message.client)
|
||||
|
||||
|
||||
@@ -19,6 +19,8 @@
|
||||
var/set_offline = FALSE // appear "invisible"
|
||||
|
||||
var/ringtone = "beep"
|
||||
var/message_mute = FALSE
|
||||
|
||||
var/syndi_auth = FALSE
|
||||
|
||||
|
||||
@@ -29,7 +31,7 @@
|
||||
return ((program_state > PROGRAM_STATE_KILLED || service_state > PROGRAM_STATE_KILLED) && from != src && get_signal(NTNET_COMMUNICATION))
|
||||
|
||||
/datum/computer_file/program/chat_client/proc/play_notification_sound(var/datum/computer_file/program/chat_client/from)
|
||||
if(!silent && src != from && program_state == PROGRAM_STATE_BACKGROUND)
|
||||
if(!silent && src != from && (program_state == PROGRAM_STATE_BACKGROUND || (program_state == PROGRAM_STATE_KILLED && service_state == PROGRAM_STATE_ACTIVE)))
|
||||
playsound(computer, 'sound/machines/twobeep.ogg', 50, 1)
|
||||
computer.output_message("[icon2html(computer, world)] *[ringtone]*", 2)
|
||||
|
||||
@@ -48,6 +50,10 @@
|
||||
newRingtone = sanitize(newRingtone, 20)
|
||||
ringtone = newRingtone
|
||||
SSvueui.check_uis_for_change(src)
|
||||
|
||||
if(href_list["mute_message"])
|
||||
message_mute = !message_mute
|
||||
SSvueui.check_uis_for_change(src)
|
||||
|
||||
// User only commands
|
||||
if(!istype(my_user))
|
||||
@@ -220,6 +226,7 @@
|
||||
data["ringtone"] = ringtone
|
||||
data["netadmin_mode"] = netadmin_mode
|
||||
data["can_netadmin_mode"] = can_run(user, FALSE, access_network)
|
||||
data["message_mute"] = message_mute
|
||||
|
||||
if(data["registered"] && data["service"] && data["signal"])
|
||||
data["channels"] = list()
|
||||
|
||||
@@ -61,6 +61,12 @@
|
||||
var/new_brightness = Clamp(0, data["brightness"]/10, 1)
|
||||
computer.flashlight.tweak_brightness(new_brightness)
|
||||
|
||||
VUEUI_SET_CHECK_IFNOTSET(data["message_range"], computer.message_output_range, ., data)
|
||||
VUEUI_SET_CHECK_IFNOTSET(data["max_message_range"], initial(computer.message_output_range) + 3, ., data)
|
||||
|
||||
if(data["message_range"])
|
||||
computer.message_output_range = clamp(data["message_range"], 0, initial(computer.message_output_range) + 3)
|
||||
|
||||
LAZYINITLIST(data["hardware"])
|
||||
for(var/obj/item/computer_hardware/H in hardware)
|
||||
LAZYINITLIST(data["hardware"][H.name])
|
||||
|
||||
@@ -0,0 +1,7 @@
|
||||
author: Geeves
|
||||
|
||||
delete-after: True
|
||||
|
||||
changes:
|
||||
- rscadd: "Added a slider to the modular computer hardware configurator that affects how far audible alerts will get output, 0 being only to the person directly holding it."
|
||||
- rscadd: "Added a Mute Messages button to the chat client that makes it so that received messages don't appear in your chat. Running the chat in the background will still make the beeps, however."
|
||||
@@ -12,6 +12,7 @@
|
||||
<input type="text" v-model="ringtone" @keypress.enter="set_ringtone">
|
||||
<vui-button @click="set_ringtone">Set ringtone</vui-button>
|
||||
</template>
|
||||
<vui-button :class="{'selected': s.message_mute == true}" :params="{mute_message: 1}">{{ s.message_mute == true ? "Unmute Messages" : "Mute Messages" }}</vui-button>
|
||||
</div>
|
||||
<div>
|
||||
<vui-button :class="{ on: active == null }" @click="active = null">Explore</vui-button>
|
||||
|
||||
@@ -23,6 +23,9 @@
|
||||
<vui-item v-if="brightness !== null" label="Brightness:">
|
||||
<vui-input-slider :min="0" :max="10" v-model="brightness"/>
|
||||
</vui-item>
|
||||
<vui-item label="Audible Message Output Range:">
|
||||
<vui-input-slider :min="0" :max="max_message_range" v-model="message_range"/>
|
||||
</vui-item>
|
||||
<h2>Computer Components</h2>
|
||||
<div v-for="(h, name) in hardware" :key="name">
|
||||
<h3>{{name}}</h3>
|
||||
|
||||
Reference in New Issue
Block a user