pai sounds (#14579)

This commit is contained in:
Wowzewow (Wezzy)
2022-08-18 19:34:07 +02:00
committed by GitHub
parent 508482a1b5
commit 9e3467bb72
10 changed files with 75 additions and 33 deletions
+2 -2
View File
@@ -165,13 +165,13 @@
/obj/item/aicard/see_emote(mob/living/M, text)
if(carded_ai && carded_ai.client)
var/rendered = "<span class='message'>[text]</span>"
var/rendered = span("message", "[text]")
carded_ai.show_message(rendered, 2)
..()
/obj/item/aicard/show_message(msg, type, alt, alt_type)
if(carded_ai && carded_ai.client)
var/rendered = "<span class='message'>[msg]</span>"
var/rendered = span("message", "[msg]")
carded_ai.show_message(rendered, type)
..()
+10 -9
View File
@@ -108,17 +108,17 @@
//Possible TODO in future, allow emagging a paicard to let it work like an agent ID, accumulating access from any ID
/obj/item/device/paicard/proc/scan_ID(var/obj/item/card/id/card, var/mob/user)
if (!pai)
to_chat(user, "<span class='warning'>Error: ID Registration failed. No pAI personality installed.</span>")
to_chat(user, SPAN_WARNING("Error: ID Registration failed. No pAI personality installed."))
playsound(src.loc, 'sound/machines/buzz-two.ogg', 20, 0)
return 0
if (!pai.master_dna)
to_chat(user, "<span class='warning'>Error: ID Registration failed. User not registered as owner. Please complete imprinting process first.</span>")
to_chat(user, SPAN_WARNING("Error: ID Registration failed. User not registered as owner. Please complete imprinting process first."))
playsound(src.loc, 'sound/machines/buzz-two.ogg', 20, 0)
return 0
if (pai.master_dna != card.dna_hash)
to_chat(user, "<span class='warning'>Error: ID Registration failed. Biometric data on ID card does not match DNA sample of registered owner.</span>")
to_chat(user, SPAN_WARNING("Error: ID Registration failed. Biometric data on ID card does not match DNA sample of registered owner."))
playsound(src.loc, 'sound/machines/buzz-two.ogg', 20, 0)
return 0
@@ -126,14 +126,14 @@
pai.id_card.access = card.access.Copy()
pai.id_card.registered_name = card.registered_name
playsound(src.loc, 'sound/machines/ping.ogg', 50, 0)
to_chat(user, "<span class='notice'>ID Registration for [pai.id_card.registered_name] is a success. PAI access updated!</span>")
to_chat(user, SPAN_NOTICE("ID Registration for [pai.id_card.registered_name] is a success. PAI access updated!"))
return 1
/obj/item/device/paicard/proc/ID_readout()
if (pai.id_card.registered_name)
return "<span class='notice'>Identity of owner: [pai.id_card.registered_name] registered.</span>"
return SPAN_NOTICE("Identity of owner: [pai.id_card.registered_name] registered.")
else
return "<span class='warning'>No ID card registered! Please scan your ID to share access.</span>"
return SPAN_WARNING("No ID card registered! Please scan your ID to share access.")
/obj/item/device/paicard/attack_self(mob/user)
if (!in_range(src, user))
@@ -390,6 +390,7 @@
/obj/item/device/paicard/proc/setPersonality(mob/living/silicon/pai/personality)
src.pai = personality
add_overlay("pai-happy")
playsound(src, 'sound/effects/pai/pai_restore.ogg', 75)
/obj/item/device/paicard/proc/removePersonality()
src.pai = null
@@ -425,7 +426,7 @@
/obj/item/device/paicard/proc/alertUpdate()
var/turf/T = get_turf_or_move(src.loc)
for (var/mob/M in viewers(T))
M.show_message("<span class='notice'>\The [src] flashes a message across its screen, \"Additional personalities available for download.\"</span>", 3, "<span class='notice'>\The [src] bleeps electronically.</span>", 2)
M.show_message(SPAN_NOTICE("\The [src] flashes a message across its screen, \"Additional personalities available for download.\""), 3, SPAN_NOTICE("\The [src] bleeps electronically."), 2)
/obj/item/device/paicard/emp_act(severity)
for(var/mob/M in src)
@@ -439,7 +440,7 @@
/obj/item/device/paicard/see_emote(mob/living/M, text)
if(pai && pai.client && !pai.canmove)
var/rendered = "<span class='message'>[text]</span>"
var/rendered = span("message", "[text]")
pai.show_message(rendered, 2)
..()
@@ -468,6 +469,6 @@
/obj/item/device/paicard/show_message(msg, type, alt, alt_type)
if(pai && pai.client)
var/rendered = "<span class='message'>[msg]</span>"
var/rendered = span("message", "[msg]")
pai.show_message(rendered, type)
..()
+2 -2
View File
@@ -238,7 +238,7 @@ when portals are shortly lived, or when portals are made to be obvious with spec
for(var/thing in mobs_to_relay)
var/mob/mob = thing
var/rendered = "<span class='message'>[text]</span>"
var/rendered = span("message", "[text]")
mob.show_message(rendered)
..()
@@ -247,7 +247,7 @@ when portals are shortly lived, or when portals are made to be obvious with spec
/obj/effect/map_effect/portal/master/show_message(msg, type, alt, alt_type)
if(!counterpart)
return
var/rendered = "<span class='message'>[msg]</span>"
var/rendered = span("message", "[msg]")
var/turf/T = counterpart.get_focused_turf()
var/list/mobs_to_relay = list()
var/list/objs = list()
+2 -2
View File
@@ -4,10 +4,10 @@
desc = "Noises"
key = ""
flags = RESTRICTED|NONGLOBAL|INNATE|NO_TALK_MSG|NO_STUTTER|TCOMSSIM
allow_accents = TRUE
allow_accents = TRUE
/datum/language/noise/format_message(message, verb)
return "<span class='message'><span class='[colour]'>[message]</span></span>"
return span(message, "<span class='[colour]'>[message]</span>")
/datum/language/noise/format_message_plain(message, verb)
return message
+1 -1
View File
@@ -28,7 +28,7 @@
log_say("[key_name(speaker)] : ([name]) [message]",ckey=key_name(speaker))
var/message_start = "<span style='font-size: [speaker.get_binary_font_size()];'><i><span class='game say'>[name], <span class='name'>[get_speaker_name(speaker)]</span>"
var/message_body = "<span class='message'>[speaker.say_quote(message)], \"[message]\"</span></span></i></span>"
var/message_body = span(message, "[speaker.say_quote(message)], \"[message]\"</span></span></i>")
for (var/mob/M as anything in dead_mob_list)
if(!istype(M,/mob/abstract/new_player) && !istype(M,/mob/living/carbon/brain)) //No meta-evesdropping
+17 -17
View File
@@ -204,16 +204,13 @@
/mob/living/silicon/pai/LateLogin()
greet()
..()
/mob/living/silicon/pai/proc/greet()
if (!greeted)
if(!greeted)
// Basic intro text.
to_chat(src, "<span class='danger'><font size=3>You are a Personal AI!</font></span>")
to_chat(src, "<span class='notice'>You are a small artificial intelligence contained inside a portable tablet, and you are bound to a master. Your primary directive is to serve them and follow their instructions, follow this prime directive above all others. Check your Software interface to spend ram on programs that can help, and unfold your chassis to take a holographic form and move around the world.</span>")
to_chat(src, SPAN_DANGER("<font size=3>You are a Personal AI!</font>"))
to_chat(src, SPAN_NOTICE("You are a small artificial intelligence contained inside a portable tablet, and you are bound to a master. Your primary directive is to serve them and follow their instructions, follow this prime directive above all others. Check your Software interface to spend ram on programs that can help, and unfold your chassis to take a holographic form and move around the world."))
playsound(usr, 'sound/effects/pai/pai_login.ogg', 75)
greeted = 1
..()
// this function shows the information about being silenced as a pAI in the Status panel
/mob/living/silicon/pai/proc/show_silenced()
@@ -248,7 +245,7 @@
if(prob(20))
var/turf/T = get_turf_or_move(src.loc)
for (var/mob/M in viewers(T))
M.show_message("<span class='warning'>A shower of sparks spray from [src]'s inner workings.</span>", 3, "<span class='warning'>You hear and smell the ozone hiss of electrical sparks being expelled violently.</span>", 2)
M.show_message(SPAN_WARNING("A shower of sparks spray from [src]'s inner workings."), 3, SPAN_WARNING("You hear and smell the ozone hiss of electrical sparks being expelled violently."), 2)
return src.death(0)
switch(pick(1,2,3))
@@ -353,6 +350,7 @@
var/turf/T = get_turf(src)
if(loud && istype(T))
T.visible_message(SPAN_NOTICE("<b>[src]</b> folds outwards, expanding into a mobile form."))
playsound(src, 'sound/items/rped.ogg', 40, TRUE)
canmove = TRUE
resting = FALSE
@@ -427,7 +425,7 @@
else
resting = !resting
icon_state = resting ? "[chassis]_rest" : "[chassis]"
to_chat(src, "<span class='notice'>You are now [resting ? "resting" : "getting up"].</span>")
to_chat(src, SPAN_NOTICE("You are now [resting ? "resting" : "getting up"]."))
canmove = !resting
@@ -448,15 +446,15 @@
return
if(W.force)
visible_message("<span class='danger'>[user.name] attacks [src] with [W]!</span>")
visible_message(SPAN_DANGER("[user.name] attacks [src] with [W]!"))
src.adjustBruteLoss(W.force)
src.updatehealth()
else
visible_message("<span class='warning'>[user.name] bonks [src] harmlessly with [W].</span>")
visible_message(SPAN_WARNING("[user.name] bonks [src] harmlessly with [W]."))
/mob/living/silicon/pai/AltClick(mob/user as mob)
if(!user || user.stat || user.lying || user.restrained() || !Adjacent(user)) return
visible_message("<span class='danger'>[user.name] boops [src] on the head.</span>")
visible_message(SPAN_DANGER("[user.name] boops [src] on the head."))
close_up()
//I'm not sure how much of this is necessary, but I would rather avoid issues.
@@ -468,7 +466,9 @@
return
var/turf/T = get_turf(src)
if(istype(T)) T.visible_message("<b>[src]</b> neatly folds inwards, compacting down to a rectangular card.")
if(istype(T))
T.visible_message("<b>[src]</b> neatly folds inwards, compacting down to a rectangular card.")
playsound(src, 'sound/items/rped.ogg', 40, TRUE)
src.stop_pulling()
if (client)
@@ -521,12 +521,12 @@
if(istype(AM,/obj/item))
var/obj/item/O = AM
if(O.w_class > can_pull_size)
to_chat(src, "<span class='warning'>You are too small to pull that.</span>")
to_chat(src, SPAN_WARNING("You are too small to pull that."))
return
else
..()
else
to_chat(src, "<span class='warning'>You are too small to pull that.</span>")
to_chat(src, SPAN_WARNING("You are too small to pull that."))
return
/mob/living/silicon/pai/UnarmedAttack(atom/A, proximity)
@@ -539,7 +539,7 @@
if(stat || sleeping || paralysis || weakened)
return
var/selection = input(src, "Choose an icon for you card.") in pai_emotions
var/selection = input(src, "Choose an icon for your card.") in pai_emotions
card.setEmotion(pai_emotions[selection])
/mob/living/silicon/pai/set_respawn_time()
+41
View File
@@ -0,0 +1,41 @@
################################
# Example Changelog File
#
# Note: This file, and files beginning with ".", and files that don't end in ".yml" will not be read. If you change this file, you will look really dumb.
#
# Your changelog will be merged with a master changelog. (New stuff added only, and only on the date entry for the day it was merged.)
# When it is, any changes listed below will disappear.
#
# Valid Prefixes:
# bugfix
# wip (For works in progress)
# tweak
# soundadd
# sounddel
# rscadd (general adding of nice things)
# rscdel (general deleting of nice things)
# imageadd
# imagedel
# maptweak
# spellcheck (typo fixes)
# experiment
# balance
# admin
# backend
# security
# refactor
#################################
# Your name.
author: Wowzewow (Wezzy)
# Optional: Remove this file after generating master changelog. Useful for PR changelogs that won't get used again.
delete-after: True
# Any changes you've made. See valid prefix list above.
# INDENT WITH TWO SPACES. NOT TABS. SPACES.
# SCREW THIS UP AND IT WON'T WORK.
# Also, all entries are changed into a single [] after a master changelog generation. Just remove the brackets when you add new entries.
# Please surround your changes in double quotes ("), as certain characters otherwise screws up compiling. The quotes will not show up in the changelog.
changes:
- soundadd: "Adds some sounds for pAIs."
Binary file not shown.
Binary file not shown.
Binary file not shown.