Adds helpers to avoid << use

This commit is contained in:
CitadelStationBot
2017-08-08 22:28:16 -05:00
parent 41f42aabca
commit cc7ad81f79
85 changed files with 241 additions and 217 deletions
+14 -14
View File
@@ -109,14 +109,14 @@ GLOBAL_PROTECT(Banlist)
else
GLOB.Banlist.dir.Add("[ckey][computerid]")
GLOB.Banlist.cd = "/base/[ckey][computerid]"
GLOB.Banlist["key"] << ckey
GLOB.Banlist["id"] << computerid
GLOB.Banlist["ip"] << address
GLOB.Banlist["reason"] << reason
GLOB.Banlist["bannedby"] << bannedby
GLOB.Banlist["temp"] << temp
WRITE_FILE(GLOB.Banlist["key"], ckey)
WRITE_FILE(GLOB.Banlist["id"], computerid)
WRITE_FILE(GLOB.Banlist["ip"], address)
WRITE_FILE(GLOB.Banlist["reason"], reason)
WRITE_FILE(GLOB.Banlist["bannedby"], bannedby)
WRITE_FILE(GLOB.Banlist["temp"], temp)
if (temp)
GLOB.Banlist["minutes"] << bantimestamp
WRITE_FILE(GLOB.Banlist["minutes"], bantimestamp)
if(!temp)
create_message("note", ckey, bannedby, "Permanently banned - [reason]", null, null, 0, 0)
else
@@ -211,17 +211,17 @@ GLOBAL_PROTECT(Banlist)
GLOB.Banlist.cd = "/base"
GLOB.Banlist.dir.Add("trash[i]trashid[i]")
GLOB.Banlist.cd = "/base/trash[i]trashid[i]"
GLOB.Banlist["key"] << "trash[i]"
WRITE_FILE(GLOB.Banlist["key"], "trash[i]")
else
GLOB.Banlist.cd = "/base"
GLOB.Banlist.dir.Add("[last]trashid[i]")
GLOB.Banlist.cd = "/base/[last]trashid[i]"
GLOB.Banlist["key"] << last
GLOB.Banlist["id"] << "trashid[i]"
GLOB.Banlist["reason"] << "Trashban[i]."
GLOB.Banlist["temp"] << a
GLOB.Banlist["minutes"] << GLOB.CMinutes + rand(1,2000)
GLOB.Banlist["bannedby"] << "trashmin"
WRITE_FILE(GLOB.Banlist["key"], last)
WRITE_FILE(GLOB.Banlist["id"], "trashid[i]")
WRITE_FILE(GLOB.Banlist["reason"], "Trashban[i].")
WRITE_FILE(GLOB.Banlist["temp"], a)
WRITE_FILE(GLOB.Banlist["minutes"], GLOB.CMinutes + rand(1,2000))
WRITE_FILE(GLOB.Banlist["bannedby"], "trashmin")
last = "trash[i]"
GLOB.Banlist.cd = "/base"
+1 -1
View File
@@ -595,7 +595,7 @@
log_admin("[key_name(usr)] delayed the round start.")
else
to_chat(world, "<b>The game will start in [newtime] seconds.</b>")
world << 'sound/ai/attention.ogg'
SEND_SOUND(world, sound('sound/ai/attention.ogg'))
log_admin("[key_name(usr)] set the pre-game delay to [newtime] seconds.")
SSblackbox.add_details("admin_verb","Delay Game Start") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
@@ -0,0 +1,10 @@
diff a/code/modules/admin/admin_investigate.dm b/code/modules/admin/admin_investigate.dm (rejected hunks)
@@ -2,7 +2,7 @@
if(!message || !subject)
return
var/F = file("[GLOB.log_directory]/[subject].html")
- F << "<small>[time_stamp()] \ref[src] ([x],[y],[z])</small> || [src] [message]<br>"
+ WRITE_FILE(F, "<small>[time_stamp()] \ref[src] ([x],[y],[z])</small> || [src] [message]<br>")
/client/proc/investigate_show(subject in list("hrefs","notes, memos, watchlist", INVESTIGATE_PORTAL, INVESTIGATE_SINGULO, INVESTIGATE_WIRES, INVESTIGATE_TELESCI, INVESTIGATE_GRAVITY, INVESTIGATE_RECORDS, INVESTIGATE_CARGO, INVESTIGATE_SUPERMATTER, INVESTIGATE_ATMOS, INVESTIGATE_EXPERIMENTOR, INVESTIGATE_BOTANY, INVESTIGATE_HALLUCINATIONS) )
+2 -2
View File
@@ -142,7 +142,7 @@ GLOBAL_PROTECT(admin_ranks)
else
if(!SSdbcore.Connect())
log_world("Failed to connect to database in load_admin_ranks(). Reverting to legacy system.")
GLOB.world_game_log << "Failed to connect to database in load_admin_ranks(). Reverting to legacy system."
WRITE_FILE(GLOB.world_game_log, "Failed to connect to database in load_admin_ranks(). Reverting to legacy system.")
config.admin_legacy_system = 1
load_admin_ranks()
return
@@ -220,7 +220,7 @@ GLOBAL_PROTECT(admin_ranks)
else
if(!SSdbcore.Connect())
log_world("Failed to connect to database in load_admins(). Reverting to legacy system.")
GLOB.world_game_log << "Failed to connect to database in load_admins(). Reverting to legacy system."
WRITE_FILE(GLOB.world_game_log, "Failed to connect to database in load_admins(). Reverting to legacy system.")
config.admin_legacy_system = 1
load_admins()
return
+1 -1
View File
@@ -390,7 +390,7 @@
SSblackbox.add_details("admin_secrets_fun_used","Chinese Cartoons")
message_admins("[key_name_admin(usr)] made everything kawaii.")
for(var/mob/living/carbon/human/H in GLOB.mob_list)
H << sound('sound/ai/animes.ogg')
SEND_SOUND(H, sound('sound/ai/animes.ogg'))
if(H.dna.species.id == "human")
if(H.dna.features["tail_human"] == "None" || H.dna.features["ears"] == "None")
+5 -5
View File
@@ -506,10 +506,10 @@
ban_unban_log_save("[key_name(usr)] edited [banned_key]'s ban. Reason: [reason] Duration: [duration]")
message_admins("<span class='adminnotice'>[key_name_admin(usr)] edited [banned_key]'s ban. Reason: [reason] Duration: [duration]</span>")
GLOB.Banlist.cd = "/base/[banfolder]"
GLOB.Banlist["reason"] << reason
GLOB.Banlist["temp"] << temp
GLOB.Banlist["minutes"] << minutes
GLOB.Banlist["bannedby"] << usr.ckey
WRITE_FILE(GLOB.Banlist["reason"], reason)
WRITE_FILE(GLOB.Banlist["temp"], temp)
WRITE_FILE(GLOB.Banlist["minutes"], minutes)
WRITE_FILE(GLOB.Banlist["bannedby"], usr.ckey)
GLOB.Banlist.cd = "/base"
SSblackbox.inc("ban_edit",1)
unbanpanel()
@@ -1697,7 +1697,7 @@
message_admins("[key_name(H)] got their cookie, spawned by [key_name(src.owner)].")
SSblackbox.inc("admin_cookies_spawned",1)
to_chat(H, "<span class='adminnotice'>Your prayers have been answered!! You received the <b>best cookie</b>!</span>")
H << 'sound/effects/pray_chaplain.ogg'
SEND_SOUND(H, sound('sound/effects/pray_chaplain.ogg'))
else if(href_list["adminsmite"])
if(!check_rights(R_ADMIN|R_FUN))
+1 -1
View File
@@ -28,7 +28,7 @@
if(text)
var/F = file("broken_icons.txt")
fdel(F)
F << text
WRITE_FILE(F, text)
to_chat(world, "Completely successfully and written to [F]")
+2 -2
View File
@@ -258,7 +258,7 @@ GLOBAL_DATUM_INIT(ahelp_tickets, /datum/admin_help_tickets, new)
for(var/client/X in GLOB.admins)
if(X.prefs.toggles & SOUND_ADMINHELP)
X << 'sound/effects/adminhelp.ogg'
SEND_SOUND(X, sound('sound/effects/adminhelp.ogg'))
window_flash(X, ignorepref = TRUE)
to_chat(X, chat_msg)
@@ -346,7 +346,7 @@ GLOBAL_DATUM_INIT(ahelp_tickets, /datum/admin_help_tickets, new)
if(initiator)
initiator.giveadminhelpverb()
initiator << 'sound/effects/adminhelp.ogg'
SEND_SOUND(initiator, sound('sound/effects/adminhelp.ogg'))
to_chat(initiator, "<font color='red' size='4'><b>- AdminHelp Rejected! -</b></font>")
to_chat(initiator, "<font color='red'><b>Your admin help was rejected.</b> The adminhelp verb has been returned to you so that you may try again.</font>")
+3 -3
View File
@@ -167,7 +167,7 @@
//play the recieving admin the adminhelp sound (if they have them enabled)
if(recipient.prefs.toggles & SOUND_ADMINHELP)
recipient << 'sound/effects/adminhelp.ogg'
SEND_SOUND(recipient, sound('sound/effects/adminhelp.ogg'))
else
if(holder) //sender is an admin but recipient is not. Do BIG RED TEXT
@@ -182,7 +182,7 @@
admin_ticket_log(recipient, "<font color='blue'>PM From [key_name_admin(src)]: [keywordparsedmsg]</font>")
//always play non-admin recipients the adminhelp sound
recipient << 'sound/effects/adminhelp.ogg'
SEND_SOUND(recipient, sound('sound/effects/adminhelp.ogg'))
//AdminPM popup for ApocStation and anybody else who wants to use it. Set it with POPUP_ADMIN_PM in config.txt ~Carn
if(config.popup_admin_pm)
@@ -301,7 +301,7 @@
window_flash(C, ignorepref = TRUE)
//always play non-admin recipients the adminhelp sound
C << 'sound/effects/adminhelp.ogg'
SEND_SOUND(C, 'sound/effects/adminhelp.ogg')
C.ircreplyamount = IRCREPLYCOUNT
+2 -2
View File
@@ -30,7 +30,7 @@
for(var/mob/M in GLOB.player_list)
if(M.client.prefs.toggles & SOUND_MIDI)
M << admin_sound
SEND_SOUND(M, admin_sound)
SSblackbox.add_details("admin_verb","Play Global Sound") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
@@ -68,5 +68,5 @@
message_admins("[key_name_admin(src)] stopped all currently playing sounds.")
for(var/mob/M in GLOB.player_list)
if(M.client)
M << sound(null)
SEND_SOUND(M, sound(null))
SSblackbox.add_details("admin_verb","Stop All Playing Sounds") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
+1 -1
View File
@@ -40,7 +40,7 @@
to_chat(C, msg)
if(C.prefs.toggles & SOUND_PRAYERS)
if(usr.job == "Chaplain")
C << 'sound/effects/pray.ogg'
SEND_SOUND(C, sound('sound/effects/pray.ogg'))
to_chat(usr, "Your prayers have been received by the gods.")
SSblackbox.add_details("admin_verb","Prayer") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
+1 -1
View File
@@ -73,7 +73,7 @@
return
//Logs all hrefs
GLOB.world_href_log << "<small>[time_stamp(show_ds = TRUE)] [src] (usr:[usr])</small> || [hsrc ? "[hsrc] " : ""][href]<br>"
WRITE_FILE(GLOB.world_href_log, "<small>[time_stamp(show_ds = TRUE)] [src] (usr:[usr])</small> || [hsrc ? "[hsrc] " : ""][href]<br>")
// Admin PM
if(href_list["priv_msg"])
+2 -2
View File
@@ -273,7 +273,7 @@ SAVEFILE UPDATING/VERSIONING - 'Simplified', or rather, more coder-friendly ~Car
slot = sanitize_integer(slot, 1, max_save_slots, initial(default_slot))
if(slot != default_slot)
default_slot = slot
S["default_slot"] << slot
WRITE_FILE(S["default_slot"] , slot)
S.cd = "/character[slot]"
var/needs_update = savefile_needs_update(S)
@@ -292,7 +292,7 @@ SAVEFILE UPDATING/VERSIONING - 'Simplified', or rather, more coder-friendly ~Car
pref_species = new rando_race()
if(!S["features["mcolor"]"] || S["features["mcolor"]"] == "#000")
S["features["mcolor"]"] << "#FFF"
WRITE_FILE(S["features["mcolor"]"] , "#FFF")
//Character
S["OOC_Notes"] >> metadata
@@ -0,0 +1,10 @@
diff a/code/modules/client/preferences_savefile.dm b/code/modules/client/preferences_savefile.dm (rejected hunks)
@@ -193,7 +193,7 @@ SAVEFILE UPDATING/VERSIONING - 'Simplified', or rather, more coder-friendly ~Car
return 0
S.cd = "/"
- WRITE_FILE(S["version"] , SAVEFILE_VERSION_MAX //updates (or failing that the sanity checks) will ensure data is not invalid at load. Assume up-to-date)
+ WRITE_FILE(S["version"] , SAVEFILE_VERSION_MAX) //updates (or failing that the sanity checks) will ensure data is not invalid at load. Assume up-to-date
//general preferences
WRITE_FILE(S["ooccolor"], ooccolor)
+1 -1
View File
@@ -229,7 +229,7 @@ TOGGLE_CHECKBOX(/datum/verbs/menu/Settings/Sound, toggleprayersounds)()
set name = "Stop Sounds"
set category = "Preferences"
set desc = "Stop Current Sounds"
usr << sound(null)
SEND_SOUND(usr, sound(null))
SSblackbox.add_details("preferences_verb","Stop Self Sounds") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
@@ -17,19 +17,16 @@
if(M.wear_suit)
fibertext = "Material from \a [M.wear_suit]."
if(prob(10*item_multiplier) && !(fibertext in suit_fibers))
//world.log << "Added fibertext: [fibertext]"
suit_fibers += fibertext
if(!(M.wear_suit.body_parts_covered & CHEST))
if(M.w_uniform)
fibertext = "Fibers from \a [M.w_uniform]."
if(prob(12*item_multiplier) && !(fibertext in suit_fibers)) //Wearing a suit means less of the uniform exposed.
//world.log << "Added fibertext: [fibertext]"
suit_fibers += fibertext
if(!(M.wear_suit.body_parts_covered & HANDS))
if(M.gloves)
fibertext = "Material from a pair of [M.gloves.name]."
if(prob(20*item_multiplier) && !(fibertext in suit_fibers))
//world.log << "Added fibertext: [fibertext]"
suit_fibers += fibertext
else if(M.w_uniform)
fibertext = "Fibers from \a [M.w_uniform]."
@@ -39,12 +36,10 @@
if(M.gloves)
fibertext = "Material from a pair of [M.gloves.name]."
if(prob(20*item_multiplier) && !(fibertext in suit_fibers))
//world.log << "Added fibertext: [fibertext]"
suit_fibers += "Material from a pair of [M.gloves.name]."
else if(M.gloves)
fibertext = "Material from a pair of [M.gloves.name]."
if(prob(20*item_multiplier) && !(fibertext in suit_fibers))
//world.log << "Added fibertext: [fibertext]"
suit_fibers += "Material from a pair of [M.gloves.name]."
+3 -3
View File
@@ -55,7 +55,7 @@ GLOBAL_VAR_INIT(total_runtimes_skipped, 0)
var/skipcount = abs(error_cooldown[erroruid]) - 1
error_cooldown[erroruid] = 0
if(skipcount > 0)
world.log << "\[[time_stamp()]] Skipped [skipcount] runtimes in [E.file],[E.line]."
SEND_TEXT(world.log, "\[[time_stamp()]] Skipped [skipcount] runtimes in [E.file],[E.line].")
GLOB.error_cache.log_error(E, skip_count = skipcount)
error_last_seen[erroruid] = world.time
@@ -92,9 +92,9 @@ GLOBAL_VAR_INIT(total_runtimes_skipped, 0)
if(GLOB.error_cache)
GLOB.error_cache.log_error(E, desclines)
world.log << "\[[time_stamp()]] Runtime in [E.file],[E.line]: [E]"
SEND_TEXT(world.log, "\[[time_stamp()]] Runtime in [E.file],[E.line]: [E]")
for(var/line in desclines)
world.log << line
SEND_TEXT(world.log, line)
/* This logs the runtime in the old format */
+1 -1
View File
@@ -70,7 +70,7 @@
if(!H.client || !istype(H))
return
to_chat(H, "<span class='danger'>Honk...</span>")
H << 'sound/spookoween/scary_clown_appear.ogg'
SEND_SOUND(H, sound('sound/spookoween/scary_clown_appear.ogg'))
var/turf/T = get_turf(H)
if(T)
new /obj/effect/hallucination/simple/clown(T, H, 50)
+2 -2
View File
@@ -68,11 +68,11 @@
/datum/round_event/portal_storm/announce()
set waitfor = 0
playsound_global('sound/magic/lightning_chargeup.ogg', repeat=0, channel=1, volume=100)
sound_to_playing_players('sound/magic/lightning_chargeup.ogg')
sleep(80)
priority_announce("Massive bluespace anomaly detected en route to [station_name()]. Brace for impact.")
sleep(20)
playsound_global('sound/magic/lightningbolt.ogg', repeat=0, channel=1, volume=100)
sound_to_playing_players('sound/magic/lightningbolt.ogg')
/datum/round_event/portal_storm/tick()
spawn_effects()
+1 -2
View File
@@ -6,6 +6,5 @@
earliest_start = 0
/datum/round_event/wizard/fake_explosion/start()
for(var/mob/M in GLOB.player_list)
M << 'sound/machines/alarm.ogg'
sound_to_playing_players('sound/machines/alarm.ogg')
addtimer(CALLBACK(SSticker, /datum/controller/subsystem/ticker/.proc/station_explosion_cinematic, 1, "fake"), 100) //:o)
+1 -1
View File
@@ -55,4 +55,4 @@
I.log_message("<font color='red'>Is an imposter!</font>", INDIVIDUAL_ATTACK_LOG)
to_chat(I, "<B>You are an imposter! Trick and confuse the crew to misdirect malice from your handsome original!</B>")
I << sound('sound/effects/magic.ogg')
SEND_SOUND(I, sound('sound/effects/magic.ogg'))
+3 -4
View File
@@ -100,7 +100,7 @@ GLOBAL_DATUM_INIT(iconCache, /savefile, new("data/iconCache.sav")) //Cache of ic
sendClientData()
//do not convert to to_chat()
owner << {"<span class="userdanger">If you can see this, update byond.</span>"}
SEND_TEXT(owner, "<span class=\"userdanger\">If you can see this, update byond.</span>")
pingLoop()
@@ -172,7 +172,7 @@ GLOBAL_DATUM_INIT(iconCache, /savefile, new("data/iconCache.sav")) //Cache of ic
/proc/icon2base64(icon/icon, iconKey = "misc")
if (!isicon(icon))
return FALSE
GLOB.iconCache[iconKey] << icon
WRITE_FILE(GLOB.iconCache[iconKey], icon)
var/iconData = GLOB.iconCache.ExportText(iconKey)
var/list/partial = splittext(iconData, "{")
return replacetext(copytext(partial[2], 3, -5), "\n", "")
@@ -224,7 +224,6 @@ GLOBAL_DATUM_INIT(iconCache, /savefile, new("data/iconCache.sav")) //Cache of ic
//Ok so I did my best but I accept that some calls to this will be for shit like sound and images
//It stands that we PROBABLY don't want to output those to the browser output so just handle them here
if (istype(message, /image) || istype(message, /sound) || istype(target, /savefile))
target << message
CRASH("Invalid message! [message]")
if(!istext(message))
@@ -255,7 +254,7 @@ GLOBAL_DATUM_INIT(iconCache, /savefile, new("data/iconCache.sav")) //Cache of ic
continue
//Send it to the old style output window.
C << original_message
SEND_TEXT(C, original_message)
if(!C.chatOutput || C.chatOutput.broken) // A player who hasn't updated his skin file.
continue
+1 -1
View File
@@ -32,7 +32,7 @@
CRASH("Debug Error Handling encountered an error! This is highly ironic! File: '[fileName]' has exceeded the filesize limit of: [src.logFileLimit] bytes")
message = "\[[time2text(world.realtime, "YYYY-MM-DD hh:mm:ss")]\] Client: \[[C && C.key ? C.key : "Unknown Client"]\] triggered: [message]"
logFile << message
WRITE_FILE(logFile, message)
return 1
/datum/debugFileOutput/proc/clear(fileName)
+1 -1
View File
@@ -351,7 +351,7 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp
source.plane = old_plane
to_chat(src, "<span class='ghostalert'><a href=?src=\ref[src];reenter=1>(Click to re-enter)</a></span>")
if(sound)
src << sound(sound)
SEND_SOUND(src, sound(sound))
/mob/dead/observer/proc/dead_tele()
set category = "Ghost"
@@ -87,7 +87,7 @@
var/atom/xeno_loc = get_turf(owner)
var/mob/living/carbon/alien/larva/new_xeno = new(xeno_loc)
new_xeno.key = ghost.key
new_xeno << sound('sound/voice/hiss5.ogg',0,0,0,100) //To get the player's attention
SEND_SOUND(new_xeno, sound('sound/voice/hiss5.ogg',0,0,0,100)) //To get the player's attention
new_xeno.canmove = 0 //so we don't move during the bursting animation
new_xeno.notransform = 1
new_xeno.invisibility = INVISIBILITY_MAXIMUM
@@ -337,7 +337,7 @@
// you need earmuffs, inacusiate, or replacement
else if(ears.ear_damage >= 5)
to_chat(src, "<span class='warning'>Your ears start to ring!</span>")
src << sound('sound/weapons/flash_ring.ogg',0,1,0,250)
SEND_SOUND(src, sound('sound/weapons/flash_ring.ogg',0,1,0,250))
return effect_amount //how soundbanged we are
@@ -97,7 +97,7 @@
if(voice_saved)
return
var/savefile/S = new /savefile("data/npc_saves/snpc.sav")
S["knownStrings"] << knownStrings
WRITE_FILE(S["knownStrings"], knownStrings)
//botPool funcs
/mob/living/carbon/human/interactive/proc/takeDelegate(mob/living/carbon/human/interactive/from,doReset=TRUE)
+11 -11
View File
@@ -51,23 +51,23 @@
/mob/living/carbon/monkey/punpun/proc/Write_Memory(dead, gibbed)
var/savefile/S = new /savefile("data/npc_saves/Punpun.sav")
if(gibbed)
S["ancestor_name"] << null
S["ancestor_chain"] << 1
S["relic_hat"] << null
S["relic_mask"] << null
WRITE_FILE(S["ancestor_name"], null)
WRITE_FILE(S["ancestor_chain"], 1)
WRITE_FILE(S["relic_hat"], null)
WRITE_FILE(S["relic_mask"], null)
return
if(dead)
S["ancestor_name"] << ancestor_name
S["ancestor_chain"] << ancestor_chain + 1
WRITE_FILE(S["ancestor_name"], ancestor_name)
WRITE_FILE(S["ancestor_chain"], ancestor_chain + 1)
if(!ancestor_name) //new monkey name this round
S["ancestor_name"] << name
WRITE_FILE(S["ancestor_name"], name)
if(head)
S["relic_hat"] << head.type
WRITE_FILE(S["relic_hat"], head.type)
else
S["relic_hat"] << null
WRITE_FILE(S["relic_hat"], null)
if(wear_mask)
S["relic_mask"] << wear_mask.type
WRITE_FILE(S["relic_mask"], wear_mask.type)
else
S["relic_mask"] << null
WRITE_FILE(S["relic_mask"], null)
if(!dead)
memory_saved = 1
+1 -1
View File
@@ -316,7 +316,7 @@
GLOB.cult_narsie.souls += 1
if((GLOB.cult_narsie.souls == GLOB.cult_narsie.soul_goal) && (GLOB.cult_narsie.resolved == FALSE))
GLOB.cult_narsie.resolved = TRUE
world << sound('sound/machines/alarm.ogg')
sound_to_playing_players('sound/machines/alarm.ogg')
addtimer(CALLBACK(GLOBAL_PROC, .proc/cult_ending_helper, 1), 120)
addtimer(CALLBACK(GLOBAL_PROC, .proc/ending_helper), 270)
if(client)
+2 -2
View File
@@ -163,9 +163,9 @@
if(M.client && M.can_hear() && (M.client.prefs.toggles & SOUND_ANNOUNCEMENTS))
var/turf/T = get_turf(M)
if(T.z == z_level)
M << voice
SEND_SOUND(M, voice)
else
only_listener << voice
SEND_SOUND(only_listener, voice)
return 1
return 0
@@ -17,12 +17,12 @@
var/savefile/F = new /savefile(src.savefile_path(user))
F["name"] << src.name
F["description"] << src.description
F["role"] << src.role
F["comments"] << src.comments
WRITE_FILE(F["name"], name)
WRITE_FILE(F["description"], description)
WRITE_FILE(F["role"], role)
WRITE_FILE(F["comments"], comments)
F["version"] << 1
WRITE_FILE(F["version"], 1)
return 1
@@ -130,7 +130,7 @@
family[C.type] += 1
else
family[C.type] = 1
S["family"] << family
WRITE_FILE(S["family"], family)
memory_saved = 1
/mob/living/simple_animal/pet/cat/Runtime/proc/Deploy_The_Cats()
@@ -344,14 +344,14 @@
/mob/living/simple_animal/pet/dog/corgi/Ian/proc/Write_Memory(dead)
var/savefile/S = new /savefile("data/npc_saves/Ian.sav")
if(!dead)
S["age"] << age + 1
WRITE_FILE(S["age"], age + 1)
if((age + 1) > record_age)
S["record_age"] << record_age + 1
WRITE_FILE(S["record_age"], record_age + 1)
if(inventory_head)
S["saved_head"] << inventory_head.type
WRITE_FILE(S["saved_head"], inventory_head.type)
else
S["age"] << 0
S["saved_head"] << null
WRITE_FILE(S["age"], 0)
WRITE_FILE(S["saved_head"], null)
memory_saved = 1
@@ -283,7 +283,7 @@ Difficulty: Very Hard
for(var/obj/O in (contents-component_parts))
stored_items += O.type
S["stored_items"] << stored_items
WRITE_FILE(S["stored_items"], stored_items)
memory_saved = TRUE
/obj/machinery/smartfridge/black_box/proc/ReadMemory()
@@ -936,10 +936,10 @@
/mob/living/simple_animal/parrot/Poly/proc/Write_Memory()
var/savefile/S = new /savefile("data/npc_saves/Poly.sav")
if(islist(speech_buffer))
S["phrases"] << speech_buffer
S["roundssurvived"] << rounds_survived
S["longestsurvival"] << longest_survival
S["longestdeathstreak"] << longest_deathstreak
WRITE_FILE(S["phrases"], speech_buffer)
WRITE_FILE(S["roundssurvived"], rounds_survived)
WRITE_FILE(S["longestsurvival"], longest_survival)
WRITE_FILE(S["longestdeathstreak"], longest_deathstreak)
memory_saved = 1
/mob/living/simple_animal/parrot/Poly/ghost
+1 -1
View File
@@ -384,7 +384,7 @@ It's fairly easy to fix if dealing with single letters but not so much with comp
if(O.client)
to_chat(O, "<span class='ghostalert'>[message][(enter_link) ? " [enter_link]" : ""]<span>")
if(ghost_sound)
O << sound(ghost_sound)
SEND_SOUND(O, sound(ghost_sound))
if(flashwindow)
window_flash(O.client)
if(source)
+1 -4
View File
@@ -892,7 +892,7 @@
transfer_in_progress = TRUE
user.visible_message("<span class='notice'>[user] slots [card] into [src]...</span>", "<span class='notice'>Transfer process initiated. Sending request for AI approval...</span>")
playsound(src, 'sound/machines/click.ogg', 50, 1)
occupier << sound('sound/misc/notice2.ogg') //To alert the AI that someone's trying to card them if they're tabbed out
SEND_SOUND(occupier, sound('sound/misc/notice2.ogg')) //To alert the AI that someone's trying to card them if they're tabbed out
if(alert(occupier, "[user] is attempting to transfer you to \a [card.name]. Do you consent to this?", "APC Transfer", "Yes - Transfer Me", "No - Keep Me Here") == "No - Keep Me Here")
to_chat(user, "<span class='danger'>AI denied transfer request. Process terminated.</span>")
playsound(src, 'sound/machines/buzz-sigh.ogg', 50, 1)
@@ -986,9 +986,6 @@
else
main_status = 2
//if(debug)
// world.log << "Status: [main_status] - Excess: [excess] - Last Equip: [lastused_equip] - Last Light: [lastused_light] - Longterm: [longtermpower]"
if(cell && !shorted)
// draw power from cell as before to power the area
var/cellused = min(cell.charge, GLOB.CELLRATE * lastused_total) // clamp deduction to a max, amount left in cell
-1
View File
@@ -216,7 +216,6 @@
//remove the old powernet and replace it with a new one throughout the network.
/proc/propagate_network(obj/O, datum/powernet/PN)
//world.log << "propagating new network"
var/list/worklist = list()
var/list/found_machines = list()
var/index = 1
+1 -1
View File
@@ -71,7 +71,7 @@
sleep(1150)
if(resolved == FALSE)
resolved = TRUE
world << sound('sound/machines/alarm.ogg')
sound_to_playing_players('sound/machines/alarm.ogg')
addtimer(CALLBACK(GLOBAL_PROC, .proc/cult_ending_helper), 120)
addtimer(CALLBACK(GLOBAL_PROC, .proc/ending_helper), 220)
@@ -219,7 +219,7 @@
var/turf/T = get_turf(src)
for(var/mob/M in GLOB.mob_list)
if(M.z == z)
M << 'sound/magic/charge.ogg'
SEND_SOUND(M, 'sound/magic/charge.ogg')
to_chat(M, "<span class='boldannounce'>You feel reality distort for a moment...</span>")
if(combined_gas > MOLE_PENALTY_THRESHOLD)
investigate_log("has collapsed into a singularity.", INVESTIGATE_SUPERMATTER)
@@ -457,7 +457,7 @@
visible_message("<span class='userdanger'>[src] is consumed by the singularity!</span>")
for(var/mob/M in GLOB.mob_list)
if(M.z == z)
M << 'sound/effects/supermatter.ogg' //everyone goan know bout this
SEND_SOUND(M, 'sound/effects/supermatter.ogg') //everyone goan know bout this
to_chat(M, "<span class='boldannounce'>A horrible screeching fills your ears, and a wave of dread washes over you...</span>")
qdel(src)
return gain
+1 -1
View File
@@ -13,7 +13,7 @@
action_icon_state = "knock"
/obj/effect/proc_holder/spell/aoe_turf/knock/cast(list/targets,mob/user = usr)
user << sound('sound/magic/knock.ogg')
SEND_SOUND(user, sound('sound/magic/knock.ogg'))
for(var/turf/T in targets)
for(var/obj/machinery/door/door in T.contents)
INVOKE_ASYNC(src, .proc/open_door, door)
@@ -75,5 +75,5 @@ Also, you never added distance checking after target is selected. I've went ahea
//Here we knock both mobs out for a time.
caster.Unconscious(unconscious_amount_caster)
victim.Unconscious(unconscious_amount_victim)
caster << sound('sound/magic/mandswap.ogg')
victim << sound('sound/magic/mandswap.ogg')// only the caster and victim hear the sounds, that way no one knows for sure if the swap happened
SEND_SOUND(caster, sound('sound/magic/mandswap.ogg'))
SEND_SOUND(victim, sound('sound/magic/mandswap.ogg'))// only the caster and victim hear the sounds, that way no one knows for sure if the swap happened
+1 -1
View File
@@ -13,7 +13,7 @@
/obj/vehicle/bicycle/buckle_mob(mob/living/M, force = 0, check_loc = 1)
if(prob(easter_egg_chance) || (SSevents.holidays && SSevents.holidays[APRIL_FOOLS]))
M << sound(pick(bike_music), repeat = 1, wait = 0, volume = 80, channel = CHANNEL_BICYCLE)
SEND_SOUND(M, sound(pick(bike_music), repeat = 1, wait = 0, volume = 80, channel = CHANNEL_BICYCLE))
. = ..()
/obj/vehicle/bicycle/unbuckle_mob(mob/living/buckled_mob,force = 0)