From 54ca5de61144f895cd226973e24282dc682b2306 Mon Sep 17 00:00:00 2001 From: Aronai Sieyes Date: Sun, 30 May 2021 23:17:56 -0400 Subject: [PATCH 01/12] Couple more runefixes --- code/datums/chat_message.dm | 6 +++++- code/datums/components/_component.dm | 4 ++-- code/modules/mob/hear_say.dm | 8 ++++++-- 3 files changed, 13 insertions(+), 5 deletions(-) diff --git a/code/datums/chat_message.dm b/code/datums/chat_message.dm index 5a826d4a3c..82d4aff167 100644 --- a/code/datums/chat_message.dm +++ b/code/datums/chat_message.dm @@ -73,9 +73,9 @@ var/list/runechat_image_cache = list() /datum/chatmessage/Destroy() if(owned_by) + UnregisterSignal(owned_by, COMSIG_PARENT_QDELETING) LAZYREMOVEASSOC(owned_by.seen_messages, message_loc, src) owned_by.images.Remove(message) - UnregisterSignal(owned_by, COMSIG_PARENT_QDELETING) if(message_loc) UnregisterSignal(message_loc, COMSIG_PARENT_QDELETING) owned_by = null @@ -96,6 +96,10 @@ var/list/runechat_image_cache = list() /datum/chatmessage/proc/generate_image(text, atom/target, mob/owner, list/extra_classes, lifespan) set waitfor = FALSE + if(!target || !owner) + qdel(src) + return + // Register client who owns this message owned_by = owner.client RegisterSignal(owned_by, COMSIG_PARENT_QDELETING, .proc/qdel_self) diff --git a/code/datums/components/_component.dm b/code/datums/components/_component.dm index 1cb9e0b1c4..c4ee090ce8 100644 --- a/code/datums/components/_component.dm +++ b/code/datums/components/_component.dm @@ -213,10 +213,10 @@ * * Arguments: * * datum/target Datum to stop listening to signals from - * * sig_typeor_types Signal string key or list of signal keys to stop listening to specifically + * * sig_type_or_types Signal string key or list of signal keys to stop listening to specifically */ /datum/proc/UnregisterSignal(datum/target, sig_type_or_types) - var/list/lookup = target.comp_lookup + var/list/lookup = target?.comp_lookup if(!signal_procs || !signal_procs[target] || !lookup) return if(!islist(sig_type_or_types)) diff --git a/code/modules/mob/hear_say.dm b/code/modules/mob/hear_say.dm index 8e4fd3970e..18cd0ab750 100644 --- a/code/modules/mob/hear_say.dm +++ b/code/modules/mob/hear_say.dm @@ -13,9 +13,13 @@ if(SP.speaking && SP.speaking.flags & INNATE) // Snowflake for noise lang if(radio) - return SP.speaking.format_message_radio(piece) + .["formatted"] = SP.speaking.format_message_radio(piece) + .["raw"] = piece + return else - return SP.speaking.format_message(piece) + .["formatted"] = SP.speaking.format_message(piece) + .["raw"] = piece + return if(iteration_count == 1) piece = capitalize(piece) From 47e17b2ae1dcfc3b02bf646e7c54ddbc5ab6c0b4 Mon Sep 17 00:00:00 2001 From: Aronai Sieyes Date: Sun, 30 May 2021 23:12:56 -0400 Subject: [PATCH 02/12] Satisfy SSmobs slightly more whenever a mob moves --- code/controllers/subsystems/mobs.dm | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/code/controllers/subsystems/mobs.dm b/code/controllers/subsystems/mobs.dm index b44b9ac5d6..1c80497983 100644 --- a/code/controllers/subsystems/mobs.dm +++ b/code/controllers/subsystems/mobs.dm @@ -25,13 +25,10 @@ SUBSYSTEM_DEF(mobs) /datum/controller/subsystem/mobs/fire(resumed = 0) if (!resumed) src.currentrun = mob_list.Copy() - process_z.Cut() + process_z.len = GLOB.living_players_by_zlevel.len slept_mobs = 0 - var/level = 1 - while(process_z.len < GLOB.living_players_by_zlevel.len) - process_z.len++ + for(var/level in 1 to process_z.len) process_z[level] = GLOB.living_players_by_zlevel[level].len - level++ //cache for sanic speed (lists are references anyways) var/list/currentrun = src.currentrun From 631ac7756bc00fb08ba373cca23f82d457ac69de Mon Sep 17 00:00:00 2001 From: Aronai Sieyes Date: Sun, 30 May 2021 23:13:09 -0400 Subject: [PATCH 03/12] Fix a typo in detective outfit --- code/datums/outfits/jobs/security.dm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/datums/outfits/jobs/security.dm b/code/datums/outfits/jobs/security.dm index 9441a06da0..ca4a0a4b85 100644 --- a/code/datums/outfits/jobs/security.dm +++ b/code/datums/outfits/jobs/security.dm @@ -41,7 +41,7 @@ /decl/hierarchy/outfit/job/security/detective/forensic name = OUTFIT_JOB_NAME("Forensic technician") head = null - suit = /datum/gear/uniform/detective_alt2 + suit = /obj/item/clothing/suit/storage/det_trench/alt2 uniform = /obj/item/clothing/under/det //VOREStation Edit End From 7cd269d126942e8e5e607795b0e2083ead0f1fa5 Mon Sep 17 00:00:00 2001 From: Aronai Sieyes Date: Sun, 30 May 2021 23:13:18 -0400 Subject: [PATCH 04/12] Make mine turfs a bit more happy --- code/modules/mining/mine_turfs.dm | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/code/modules/mining/mine_turfs.dm b/code/modules/mining/mine_turfs.dm index 10c6701a57..fd41dc7e13 100644 --- a/code/modules/mining/mine_turfs.dm +++ b/code/modules/mining/mine_turfs.dm @@ -240,8 +240,10 @@ turf/simulated/mineral/floor/light_corner spawn(1) // Otherwise most of the ore is lost to the explosion, which makes this rather moot. for(var/ore in resources) var/amount_to_give = rand(CEILING(resources[ore]/2, 1), resources[ore]) // Should result in at least one piece of ore. + var/oretype = ore_types[ore] + if(!oretype) + return // this turf can't give that type for(var/i=1, i <= amount_to_give, i++) - var/oretype = ore_types[ore] new oretype(src) resources[ore] = 0 From 3b2ed264831ba60a533af6b65287f3b173389a2d Mon Sep 17 00:00:00 2001 From: Aronai Sieyes Date: Sun, 30 May 2021 23:15:38 -0400 Subject: [PATCH 05/12] Fix ghosts trying to follow to null --- code/modules/mob/dead/observer/observer.dm | 3 +++ 1 file changed, 3 insertions(+) diff --git a/code/modules/mob/dead/observer/observer.dm b/code/modules/mob/dead/observer/observer.dm index 865952471b..c4484d4007 100644 --- a/code/modules/mob/dead/observer/observer.dm +++ b/code/modules/mob/dead/observer/observer.dm @@ -481,6 +481,9 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp /mob/proc/update_following() . = get_turf(src) for(var/mob/observer/dead/M in following_mobs) + if(!.) + M.stop_following() + if(M.following != src) following_mobs -= M else From 5e037c8263c439564442fd9f5573a9619d03c547 Mon Sep 17 00:00:00 2001 From: Aronai Sieyes Date: Sun, 30 May 2021 23:15:47 -0400 Subject: [PATCH 06/12] VS: Remove tin from tether turfs --- maps/tether/tether_turfs.dm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/maps/tether/tether_turfs.dm b/maps/tether/tether_turfs.dm index e1fadf2653..5bec9aef79 100644 --- a/maps/tether/tether_turfs.dm +++ b/maps/tether/tether_turfs.dm @@ -70,7 +70,7 @@ VIRGO3B_TURF_CREATE(/turf/simulated/mineral/floor) "platinum" = 10, "hematite" = 20, "copper" = 8, - "tin" = 4, +// "tin" = 4, "bauxite" = 4, "rutile" = 4, "carbon" = 20, @@ -87,7 +87,7 @@ VIRGO3B_TURF_CREATE(/turf/simulated/mineral/floor) "platinum" = 5, "hematite" = 35, "copper" = 15, - "tin" = 10, +// "tin" = 10, "bauxite" = 10, "rutile" = 10, "carbon" = 35, From f1c96ce398216988f6a8479c24d15148147af1ae Mon Sep 17 00:00:00 2001 From: Aronai Sieyes Date: Mon, 31 May 2021 11:33:32 -0400 Subject: [PATCH 07/12] Enable encoding chat emphasis in runechat --- code/datums/chat_message.dm | 2 ++ 1 file changed, 2 insertions(+) diff --git a/code/datums/chat_message.dm b/code/datums/chat_message.dm index 82d4aff167..e262f369dd 100644 --- a/code/datums/chat_message.dm +++ b/code/datums/chat_message.dm @@ -156,6 +156,8 @@ var/list/runechat_image_cache = list() text = "[prefixes?.Join(" ")][text]" + text = encode_html_emphasis(text) + // We dim italicized text to make it more distinguishable from regular text var/tgt_color = extra_classes.Find("italics") ? target.chat_color_darkened : target.chat_color From 34ca6d45312828140c8d559a422f07865212f5e0 Mon Sep 17 00:00:00 2001 From: izac112 Date: Mon, 31 May 2021 18:41:04 +0200 Subject: [PATCH 08/12] Update cryogaia_turfs.dm --- maps/yw/cryogaia_turfs.dm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/maps/yw/cryogaia_turfs.dm b/maps/yw/cryogaia_turfs.dm index 573ead8cfc..8d8393be4f 100644 --- a/maps/yw/cryogaia_turfs.dm +++ b/maps/yw/cryogaia_turfs.dm @@ -97,7 +97,7 @@ CRYOGAIA_TURF_CREATE(/turf/simulated/mineral/floor) "platinum" = 10, "hematite" = 20, "copper" = 8, - "tin" = 4, +// "tin" = 4, "bauxite" = 4, "rutile" = 4, "carbon" = 20, @@ -114,7 +114,7 @@ CRYOGAIA_TURF_CREATE(/turf/simulated/mineral/floor) "platinum" = 5, "hematite" = 35, "copper" = 15, - "tin" = 10, +// "tin" = 10, "bauxite" = 10, "rutile" = 10, "carbon" = 35, From 869520f8184ababccbaac0592dfba1cceb8e569e Mon Sep 17 00:00:00 2001 From: Aronai Sieyes Date: Mon, 31 May 2021 13:13:57 -0400 Subject: [PATCH 09/12] Remove extra asterisks from rune audible messages --- code/game/machinery/cloning.dm | 2 +- code/game/machinery/computer/arcade.dm | 4 ++-- code/game/objects/items/devices/defib.dm | 4 ++-- code/game/objects/items/devices/taperecorder.dm | 6 +++--- code/game/objects/items/devices/text_to_speech.dm | 2 +- code/modules/admin/verbs/smite_vr.dm | 2 +- .../modules/clothing/under/accessories/accessory_vr.dm | 2 +- code/modules/emotes/emote_mob.dm | 2 +- code/modules/multiz/ladders.dm | 2 +- code/modules/multiz/movement.dm | 8 ++++---- code/modules/overmap/ships/engines/gas_thruster.dm | 2 +- code/modules/paperwork/photocopier.dm | 10 +++++----- code/modules/projectiles/guns/magnetic/bore.dm | 6 +++--- code/modules/projectiles/guns/magnetic/magnetic.dm | 2 +- code/modules/research/message_server.dm | 4 ++-- code/modules/resleeving/machines.dm | 2 +- code/modules/shuttles/shuttles_web.dm | 2 +- code/modules/turbolift/turbolift.dm | 4 ++-- code/modules/turbolift/turbolift_console.dm | 4 ++-- code/modules/turbolift/turbolift_door.dm | 2 +- 20 files changed, 36 insertions(+), 36 deletions(-) diff --git a/code/game/machinery/cloning.dm b/code/game/machinery/cloning.dm index 197848d9ad..6993fa6e0f 100644 --- a/code/game/machinery/cloning.dm +++ b/code/game/machinery/cloning.dm @@ -206,7 +206,7 @@ else if((occupant.health >= heal_level || occupant.health == occupant.getMaxHealth()) && (!eject_wait)) playsound(src, 'sound/machines/medbayscanner1.ogg', 50, 1) - audible_message("\The [src] signals that the cloning process is complete.", runemessage = "* ding *") + audible_message("\The [src] signals that the cloning process is complete.", runemessage = "ding") connected_message("Cloning Process Complete.") locked = 0 go_out() diff --git a/code/game/machinery/computer/arcade.dm b/code/game/machinery/computer/arcade.dm index df72c0d767..14fae598ff 100644 --- a/code/game/machinery/computer/arcade.dm +++ b/code/game/machinery/computer/arcade.dm @@ -519,9 +519,9 @@ if(electronics) sleep(10) if(oldfuel > fuel && oldfood > food) - src.audible_message("\The [src] lets out a somehow reassuring chime.", runemessage = "* reassuring chime *") + src.audible_message("\The [src] lets out a somehow reassuring chime.", runemessage = "reassuring chime") else if(oldfuel < fuel || oldfood < food) - src.audible_message("\The [src] lets out a somehow ominous chime.", runemessage = "* ominous chime *") + src.audible_message("\The [src] lets out a somehow ominous chime.", runemessage = "ominous chime") food = oldfood fuel = oldfuel diff --git a/code/game/objects/items/devices/defib.dm b/code/game/objects/items/devices/defib.dm index 4bd2ac9a30..2058395d85 100644 --- a/code/game/objects/items/devices/defib.dm +++ b/code/game/objects/items/devices/defib.dm @@ -460,7 +460,7 @@ return playsound(src, 'sound/machines/defib_charge.ogg', 50, 0) - audible_message("\The [src] lets out a steadily rising hum...", runemessage = "* whines *") + audible_message("\The [src] lets out a steadily rising hum...", runemessage = "whines") if(!do_after(user, chargetime, H)) return @@ -527,7 +527,7 @@ H.setBrainLoss(brain_damage) /obj/item/weapon/shockpaddles/proc/make_announcement(var/message, var/msg_class) - audible_message("\The [src] [message]", "\The [src] vibrates slightly.", runemessage = "* buzz *") + audible_message("\The [src] [message]", "\The [src] vibrates slightly.", runemessage = "buzz") /obj/item/weapon/shockpaddles/emag_act(mob/user) if(safety) diff --git a/code/game/objects/items/devices/taperecorder.dm b/code/game/objects/items/devices/taperecorder.dm index 3e16975fbe..4e5032b6b9 100644 --- a/code/game/objects/items/devices/taperecorder.dm +++ b/code/game/objects/items/devices/taperecorder.dm @@ -264,7 +264,7 @@ playsleepseconds = 1 sleep(10) T = get_turf(src) - T.audible_message("Tape Recorder: End of recording.", runemessage = "* click *") + T.audible_message("Tape Recorder: End of recording.", runemessage = "click") break else playsleepseconds = mytape.timestamp[i+1] - mytape.timestamp[i] @@ -272,7 +272,7 @@ if(playsleepseconds > 14) sleep(10) T = get_turf(src) - T.audible_message("Tape Recorder: Skipping [playsleepseconds] seconds of silence", runemessage = "* tape winding *") + T.audible_message("Tape Recorder: Skipping [playsleepseconds] seconds of silence", runemessage = "tape winding") playsleepseconds = 1 sleep(10 * playsleepseconds) @@ -282,7 +282,7 @@ if(emagged) var/turf/T = get_turf(src) - T.audible_message("Tape Recorder: This tape recorder will self-destruct in... Five.", runemessage = "* beep beep *") + T.audible_message("Tape Recorder: This tape recorder will self-destruct in... Five.", runemessage = "beep beep") sleep(10) T = get_turf(src) T.audible_message("Tape Recorder: Four.") diff --git a/code/game/objects/items/devices/text_to_speech.dm b/code/game/objects/items/devices/text_to_speech.dm index edbb49b6a8..e962124022 100644 --- a/code/game/objects/items/devices/text_to_speech.dm +++ b/code/game/objects/items/devices/text_to_speech.dm @@ -24,6 +24,6 @@ var/message = sanitize(input(user,"Choose a message to relay to those around you.") as text|null) if(message) - audible_message("[bicon(src)] \The [src.name] states, \"[message]\"", runemessage = "* synthesized speech *") + audible_message("[bicon(src)] \The [src.name] states, \"[message]\"", runemessage = "synthesized speech") if(ismob(loc)) loc.audible_message("", runemessage = "\[TTS Voice\] [message]") diff --git a/code/modules/admin/verbs/smite_vr.dm b/code/modules/admin/verbs/smite_vr.dm index f065293a26..e8441b1b31 100644 --- a/code/modules/admin/verbs/smite_vr.dm +++ b/code/modules/admin/verbs/smite_vr.dm @@ -104,7 +104,7 @@ sleep(1 SECOND) shadekin.dir = SOUTH sleep(1 SECOND) - shadekin.audible_message("[shadekin] belches loudly!", runemessage = "* URRRRRP *") + shadekin.audible_message("[shadekin] belches loudly!", runemessage = "URRRRRP") sleep(2 SECONDS) shadekin.phase_shift() target.transforming = FALSE //Undo cheap hack diff --git a/code/modules/clothing/under/accessories/accessory_vr.dm b/code/modules/clothing/under/accessories/accessory_vr.dm index e9d1ae21ac..ba532f62a9 100644 --- a/code/modules/clothing/under/accessories/accessory_vr.dm +++ b/code/modules/clothing/under/accessories/accessory_vr.dm @@ -124,7 +124,7 @@ if(usr.stat) return if(!jingled) - usr.audible_message("[usr] jingles the [src]'s bell.", runemessage = "* jingle *") + usr.audible_message("[usr] jingles the [src]'s bell.", runemessage = "jingle") playsound(src, 'sound/items/pickup/ring.ogg', 50, 1) jingled = 1 addtimer(CALLBACK(src, .proc/jingledreset), 50) diff --git a/code/modules/emotes/emote_mob.dm b/code/modules/emotes/emote_mob.dm index 3baccce8e3..bd1dfc0bd6 100644 --- a/code/modules/emotes/emote_mob.dm +++ b/code/modules/emotes/emote_mob.dm @@ -87,7 +87,7 @@ if(use_emote.message_type == AUDIBLE_MESSAGE && is_muzzled()) var/muffle_message = use_emote.emote_message_muffled || "makes a muffled sound." - audible_message("\The [src] [muffle_message]", runemessage = "* [muffle_message] *") + audible_message("\The [src] [muffle_message]", runemessage = "[muffle_message]") return next_emote = world.time + use_emote.emote_delay diff --git a/code/modules/multiz/ladders.dm b/code/modules/multiz/ladders.dm index c979720302..b1f5b08f6d 100644 --- a/code/modules/multiz/ladders.dm +++ b/code/modules/multiz/ladders.dm @@ -98,7 +98,7 @@ "You begin climbing [direction] \the [src]!", "You hear the grunting and clanging of a metal ladder being used.") - target_ladder.audible_message("You hear something coming [direction] \the [src]", runemessage = "* clank clank *") + target_ladder.audible_message("You hear something coming [direction] \the [src]", runemessage = "clank clank") if(do_after(M, climb_time, src)) var/turf/T = get_turf(target_ladder) diff --git a/code/modules/multiz/movement.dm b/code/modules/multiz/movement.dm index 1c197530e5..4b6d666709 100644 --- a/code/modules/multiz/movement.dm +++ b/code/modules/multiz/movement.dm @@ -59,7 +59,7 @@ if(lattice) var/pull_up_time = max(5 SECONDS + (src.movement_delay() * 10), 1) to_chat(src, "You grab \the [lattice] and start pulling yourself upward...") - destination.audible_message("You hear something climbing up \the [lattice].", runemessage = "* clank clang *") + destination.audible_message("You hear something climbing up \the [lattice].", runemessage = "clank clang") if(do_after(src, pull_up_time)) to_chat(src, "You pull yourself up.") else @@ -74,7 +74,7 @@ if(!destination?.Enter(src, old_dest)) to_chat(src, "There's something in the way up above in that direction, try another.") return 0 - destination.audible_message("You hear something climbing up \the [catwalk].", runemessage = "* clank clang *") + destination.audible_message("You hear something climbing up \the [catwalk].", runemessage = "clank clang") if(do_after(src, pull_up_time)) to_chat(src, "You pull yourself up.") else @@ -90,8 +90,8 @@ return 0 var/fly_time = max(7 SECONDS + (H.movement_delay() * 10), 1) //So it's not too useful for combat. Could make this variable somehow, but that's down the road. to_chat(src, "You begin to fly upwards...") - destination.audible_message("You hear the flapping of wings.", runemessage = "* flap flap *") - H.audible_message("[H] begins to flap \his wings, preparing to move upwards!", runemessage = "* flap flap *") + destination.audible_message("You hear the flapping of wings.", runemessage = "flap flap") + H.audible_message("[H] begins to flap \his wings, preparing to move upwards!", runemessage = "flap flap") if(do_after(H, fly_time) && H.flying) to_chat(src, "You fly upwards.") else diff --git a/code/modules/overmap/ships/engines/gas_thruster.dm b/code/modules/overmap/ships/engines/gas_thruster.dm index 182fd6c3f3..40f2183dc7 100644 --- a/code/modules/overmap/ships/engines/gas_thruster.dm +++ b/code/modules/overmap/ships/engines/gas_thruster.dm @@ -150,7 +150,7 @@ if(!is_on()) return 0 if(!check_fuel() || (use_power_oneoff(charge_per_burn) < charge_per_burn) || check_blockage()) - audible_message(src,"[src] coughs once and goes silent!", runemessage = "* sputtercough *") + audible_message(src,"[src] coughs once and goes silent!", runemessage = "sputtercough") update_use_power(USE_POWER_OFF) return 0 diff --git a/code/modules/paperwork/photocopier.dm b/code/modules/paperwork/photocopier.dm index 2306b3eca1..441b0bcbb6 100644 --- a/code/modules/paperwork/photocopier.dm +++ b/code/modules/paperwork/photocopier.dm @@ -111,28 +111,28 @@ playsound(src, "sound/machines/copier.ogg", 100, 1) sleep(11) copy(copyitem) - audible_message("You can hear [src] whirring as it finishes printing.", runemessage = "* whirr *") + audible_message("You can hear [src] whirring as it finishes printing.", runemessage = "whirr") playsound(src, "sound/machines/buzzbeep.ogg", 30) else if (istype(copyitem, /obj/item/weapon/photo)) playsound(src, "sound/machines/copier.ogg", 100, 1) sleep(11) photocopy(copyitem) - audible_message("You can hear [src] whirring as it finishes printing.", runemessage = "* whirr *") + audible_message("You can hear [src] whirring as it finishes printing.", runemessage = "whirr") playsound(src, "sound/machines/buzzbeep.ogg", 30) else if (istype(copyitem, /obj/item/weapon/paper_bundle)) sleep(11) playsound(src, "sound/machines/copier.ogg", 100, 1) var/obj/item/weapon/paper_bundle/B = bundlecopy(copyitem) sleep(11*B.pages.len) - audible_message("You can hear [src] whirring as it finishes printing.", runemessage = "* whirr *") + audible_message("You can hear [src] whirring as it finishes printing.", runemessage = "whirr") playsound(src, "sound/machines/buzzbeep.ogg", 30) else if (has_buckled_mobs()) // VOREStation EDIT: For ass-copying. playsound(src, "sound/machines/copier.ogg", 100, 1) - audible_message("You can hear [src] whirring as it attempts to scan.", runemessage = "* whirr *") + audible_message("You can hear [src] whirring as it attempts to scan.", runemessage = "whirr") sleep(rand(20,45)) // Sit with your bare ass on the copier for a random time, feel like a fool, get stared at. copyass(user) sleep(15) - audible_message("You can hear [src] whirring as it finishes printing.", runemessage = "* whirr *") + audible_message("You can hear [src] whirring as it finishes printing.", runemessage = "whirr") playsound(src, "sound/machines/buzzbeep.ogg", 30) else to_chat(user, "\The [copyitem] can't be copied by [src].") diff --git a/code/modules/projectiles/guns/magnetic/bore.dm b/code/modules/projectiles/guns/magnetic/bore.dm index a39e383aff..eea444fbf6 100644 --- a/code/modules/projectiles/guns/magnetic/bore.dm +++ b/code/modules/projectiles/guns/magnetic/bore.dm @@ -208,7 +208,7 @@ /obj/item/weapon/gun/magnetic/matfed/phoronbore/process() if(generator_state && !mat_storage) - audible_message(SPAN_NOTICE("\The [src] goes quiet."),SPAN_NOTICE("A motor noise cuts out."), runemessage = "* goes quiet *") + audible_message(SPAN_NOTICE("\The [src] goes quiet."),SPAN_NOTICE("A motor noise cuts out."), runemessage = "goes quiet") soundloop.stop() generator_state = GEN_OFF @@ -258,12 +258,12 @@ soundloop.start() time_started = world.time cell?.use(100) - audible_message(SPAN_NOTICE("\The [src] starts chugging."),SPAN_NOTICE("A motor noise starts up."), runemessage = "* whirr *") + audible_message(SPAN_NOTICE("\The [src] starts chugging."),SPAN_NOTICE("A motor noise starts up."), runemessage = "whirr") generator_state = GEN_IDLE else if(generator_state > GEN_OFF && time_started + 3 SECONDS < world.time) soundloop.stop() - audible_message(SPAN_NOTICE("\The [src] goes quiet."),SPAN_NOTICE("A motor noise cuts out."), runemessage = "* goes quiet *") + audible_message(SPAN_NOTICE("\The [src] goes quiet."),SPAN_NOTICE("A motor noise cuts out."), runemessage = "goes quiet") generator_state = GEN_OFF /obj/item/weapon/gun/magnetic/matfed/phoronbore/loaded diff --git a/code/modules/projectiles/guns/magnetic/magnetic.dm b/code/modules/projectiles/guns/magnetic/magnetic.dm index babeb7643a..12d00c63ac 100644 --- a/code/modules/projectiles/guns/magnetic/magnetic.dm +++ b/code/modules/projectiles/guns/magnetic/magnetic.dm @@ -284,7 +284,7 @@ visible_message("\The [src] begins to rattle, its acceleration chamber collapsing in on itself!") removable_components = FALSE spawn(15) - audible_message("\The [src]'s power supply begins to overload as the device crumples!", runemessage = "* VWRRRRRRRR *") //Why are you still holding this? + audible_message("\The [src]'s power supply begins to overload as the device crumples!", runemessage = "VWRRRRRRRR") //Why are you still holding this? playsound(src, 'sound/effects/grillehit.ogg', 10, 1) var/datum/effect/effect/system/spark_spread/sparks = new /datum/effect/effect/system/spark_spread() var/turf/T = get_turf(src) diff --git a/code/modules/research/message_server.dm b/code/modules/research/message_server.dm index ae745dcc1f..be884e2c46 100644 --- a/code/modules/research/message_server.dm +++ b/code/modules/research/message_server.dm @@ -130,12 +130,12 @@ var/global/list/obj/machinery/message_server/message_servers = list() if(2) if(!Console.silent) playsound(Console, 'sound/machines/twobeep.ogg', 50, 1) - Console.audible_message(text("[bicon(Console)] *The Requests Console beeps: 'PRIORITY Alert in [sender]'"),,5, runemessage = "* beep! beep! *") + Console.audible_message(text("[bicon(Console)] *The Requests Console beeps: 'PRIORITY Alert in [sender]'"),,5, runemessage = "beep! beep!") Console.message_log += list(list("High Priority message from [sender]", "[authmsg]")) else if(!Console.silent) playsound(Console, 'sound/machines/twobeep.ogg', 50, 1) - Console.audible_message(text("[bicon(Console)] *The Requests Console beeps: 'Message from [sender]'"),,4, runemessage = "* beep beep *") + Console.audible_message(text("[bicon(Console)] *The Requests Console beeps: 'Message from [sender]'"),,4, runemessage = "beep beep") Console.message_log += list(list("Message from [sender]", "[authmsg]")) Console.set_light(2) diff --git a/code/modules/resleeving/machines.dm b/code/modules/resleeving/machines.dm index fc8d464fea..cfa2f75e5b 100644 --- a/code/modules/resleeving/machines.dm +++ b/code/modules/resleeving/machines.dm @@ -148,7 +148,7 @@ else if(((occupant.health == occupant.maxHealth)) && (!eject_wait)) playsound(src, 'sound/machines/ding.ogg', 50, 1) - audible_message("\The [src] signals that the growing process is complete.", runemessage = "* ding *") + audible_message("\The [src] signals that the growing process is complete.", runemessage = "ding") connected_message("Growing Process Complete.") locked = 0 go_out() diff --git a/code/modules/shuttles/shuttles_web.dm b/code/modules/shuttles/shuttles_web.dm index 7f4cc22aba..1112a384fe 100644 --- a/code/modules/shuttles/shuttles_web.dm +++ b/code/modules/shuttles/shuttles_web.dm @@ -119,7 +119,7 @@ continue if(!H.shuttle_comp || !(get_area(H) in shuttle_area)) H.shuttle_comp = null - H.audible_message("\The [H] pings as it loses it's connection with the ship.", runemessage = "* ping *") + H.audible_message("\The [H] pings as it loses it's connection with the ship.", runemessage = "ping") H.update_hud("discon") helmets -= H else diff --git a/code/modules/turbolift/turbolift.dm b/code/modules/turbolift/turbolift.dm index d8f8373f09..9468179122 100644 --- a/code/modules/turbolift/turbolift.dm +++ b/code/modules/turbolift/turbolift.dm @@ -28,7 +28,7 @@ priority_mode = TRUE cancel_pending_floors() update_ext_panel_icons() - control_panel_interior.audible_message("This turbolift is responding to a priority call. Please exit the lift when it stops and make way.", runemessage = "* BUZZ *") + control_panel_interior.audible_message("This turbolift is responding to a priority call. Please exit the lift when it stops and make way.", runemessage = "BUZZ") spawn(time) priority_mode = FALSE update_ext_panel_icons() @@ -158,7 +158,7 @@ doors_closing = 0 if(!fire_mode) open_doors() - control_panel_interior.audible_message("\The [current_floor.ext_panel] buzzes loudly.", runemessage = "* BUZZ *") + control_panel_interior.audible_message("\The [current_floor.ext_panel] buzzes loudly.", runemessage = "BUZZ") playsound(control_panel_interior, "sound/machines/buzz-two.ogg", 50, 1) return 0 diff --git a/code/modules/turbolift/turbolift_console.dm b/code/modules/turbolift/turbolift_console.dm index e3719bc97e..dddfb4e60f 100644 --- a/code/modules/turbolift/turbolift_console.dm +++ b/code/modules/turbolift/turbolift_console.dm @@ -130,10 +130,10 @@ return lift.update_fire_mode(!lift.fire_mode) if(lift.fire_mode) - audible_message("Firefighter Mode Activated. Door safeties disabled. Manual control engaged.", runemessage = "* SCREECH *") + audible_message("Firefighter Mode Activated. Door safeties disabled. Manual control engaged.", runemessage = "SCREECH") playsound(src, 'sound/machines/airalarm.ogg', 25, 0, 4, volume_channel = VOLUME_CHANNEL_ALARMS) else - audible_message("Firefighter Mode Deactivated. Door safeties enabled. Automatic control engaged.", runemessage = "* ding *") + audible_message("Firefighter Mode Deactivated. Door safeties enabled. Automatic control engaged.", runemessage = "ding") return . = ..() diff --git a/code/modules/turbolift/turbolift_door.dm b/code/modules/turbolift/turbolift_door.dm index d21e344097..7a41056ca1 100644 --- a/code/modules/turbolift/turbolift_door.dm +++ b/code/modules/turbolift/turbolift_door.dm @@ -40,7 +40,7 @@ if(!moved) // nowhere to go.... LM.gib() else // the mob is too big to just move, so we need to give up what we're doing - audible_message("\The [src]'s motors grind as they quickly reverse direction, unable to safely close.", runemessage = "* WRRRRR *") + audible_message("\The [src]'s motors grind as they quickly reverse direction, unable to safely close.", runemessage = "WRRRRR") cur_command = null // the door will just keep trying otherwise return 0 return ..() \ No newline at end of file From f6305155140f3f81c6b748781ead3707286dacd5 Mon Sep 17 00:00:00 2001 From: Aronai Sieyes Date: Mon, 31 May 2021 12:40:10 -0400 Subject: [PATCH 10/12] Make req_[one_]access lazy --- code/controllers/subsystems/supply.dm | 3 +- code/game/gamemodes/sandbox/h_sandbox.dm | 2 +- code/game/jobs/access.dm | 68 +++++++++++-------- code/game/machinery/deployable.dm | 4 +- code/game/machinery/door_control.dm | 6 +- code/game/machinery/doors/airlock.dm | 14 ++-- code/game/machinery/doors/windowdoor.dm | 22 +++--- code/modules/clothing/spacesuits/rig/rig.dm | 2 +- .../clothing/spacesuits/rig/rig_attackby.dm | 6 +- code/modules/customitems/item_spawning.dm | 2 +- code/modules/hydroponics/seed_storage.dm | 2 +- 11 files changed, 68 insertions(+), 63 deletions(-) diff --git a/code/controllers/subsystems/supply.dm b/code/controllers/subsystems/supply.dm index 21edbde50e..c55208d7df 100644 --- a/code/controllers/subsystems/supply.dm +++ b/code/controllers/subsystems/supply.dm @@ -205,10 +205,11 @@ SUBSYSTEM_DEF(supply) else if(islist(SP.access) && SP.one_access) var/list/L = SP.access // access var is a plain var, we need a list A.req_one_access = L.Copy() - A.req_access.Cut() + A.req_access = null else if(islist(SP.access) && !SP.one_access) var/list/L = SP.access A.req_access = L.Copy() + A.req_one_access = null else log_debug("Supply pack with invalid access restriction [SP.access] encountered!") diff --git a/code/game/gamemodes/sandbox/h_sandbox.dm b/code/game/gamemodes/sandbox/h_sandbox.dm index 11f070f2f5..4f476293dd 100644 --- a/code/game/gamemodes/sandbox/h_sandbox.dm +++ b/code/game/gamemodes/sandbox/h_sandbox.dm @@ -102,7 +102,7 @@ datum/hSB var/accesses = get_all_accesses() for(var/A in accesses) if(alert(usr, "Will this airlock require [get_access_desc(A)] access?", "Sandbox:", "Yes", "No") == "Yes") - hsb.req_access += A + LAZYADD(hsb.req_access, A) hsb.loc = usr.loc to_chat(usr, "Sandbox: Created an airlock.") diff --git a/code/game/jobs/access.dm b/code/game/jobs/access.dm index 7d0ae60d33..b7b1ab3aed 100644 --- a/code/game/jobs/access.dm +++ b/code/game/jobs/access.dm @@ -1,21 +1,9 @@ -//This file was auto-corrected by findeclaration.exe on 25.5.2012 20:42:31 - -/obj/var/list/req_access = list() -/obj/var/list/req_one_access = list() +/obj/var/list/req_access +/obj/var/list/req_one_access //returns 1 if this mob has sufficient access to use this object /obj/proc/allowed(mob/M) - //check if it doesn't require any access at all - if(src.check_access(null)) - return 1 - - var/id = M.GetIdCard() - if(id) - return check_access(id) - return 0 - -///obj/item/proc/GetAccess() -// return list() + return check_access(M?.GetIdCard()) /atom/movable/proc/GetAccess() var/obj/item/weapon/card/id/id = GetIdCard() @@ -25,25 +13,47 @@ return null /obj/proc/check_access(obj/item/I) - return check_access_list(I ? I.GetAccess() : list()) + return check_access_list(I ? I.GetAccess() : null) /obj/proc/check_access_list(var/list/L) - if(!req_access) req_access = list() - if(!req_one_access) req_one_access = list() - if(!L) return 0 - if(!istype(L, /list)) return 0 + // We don't require access + if(!LAZYLEN(req_access) && !LAZYLEN(req_one_access)) + return TRUE + + // They passed nothing, but we are something that requires access + if(!LAZYLEN(L)) + return FALSE + + // Run list comparisons return has_access(req_access, req_one_access, L) /proc/has_access(var/list/req_access, var/list/req_one_access, var/list/accesses) - for(var/req in req_access) - if(!(req in accesses)) //doesn't have this access - return 0 - if(req_one_access.len) - for(var/req in req_one_access) - if(req in accesses) //has an access from the single access list - return 1 - return 0 - return 1 + // Doesn't have access lists, always works + if(!LAZYLEN(req_access) && !LAZYLEN(req_one_access)) + return TRUE + + // Didn't pass anything to compare + if(!LAZYLEN(accesses)) + return FALSE + + // req_access list has priority if set + // Requires at least every access in list + if(LAZYLEN(req_access)) + for(var/req in req_access) + if(!(req in accesses)) + return FALSE + // Wasn't missing any accesses + return TRUE + + // req_one_access is secondary if set + // Requires at least one access in list + for(var/req in req_one_access) + if(req in accesses) + // Found at least one + return TRUE + + // Didn't find anything that matched + return FALSE /proc/get_centcom_access(job) switch(job) diff --git a/code/game/machinery/deployable.dm b/code/game/machinery/deployable.dm index 64a3cc1fc7..9b14dc68bb 100644 --- a/code/game/machinery/deployable.dm +++ b/code/game/machinery/deployable.dm @@ -130,8 +130,8 @@ Deployable items /obj/machinery/deployable/barrier/emag_act(var/remaining_charges, var/mob/user) if(emagged == 0) emagged = 1 - req_access.Cut() - req_one_access.Cut() + LAZYCLEARLIST(req_access) + LAZYCLEARLIST(req_one_access) to_chat(user, "You break the ID authentication lock on \the [src].") var/datum/effect/effect/system/spark_spread/s = new /datum/effect/effect/system/spark_spread s.set_up(2, 1, src) diff --git a/code/game/machinery/door_control.dm b/code/game/machinery/door_control.dm index 958101a3b9..674ff6e24d 100644 --- a/code/game/machinery/door_control.dm +++ b/code/game/machinery/door_control.dm @@ -28,9 +28,9 @@ return attack_hand(user) /obj/machinery/button/remote/emag_act(var/remaining_charges, var/mob/user) - if(req_access.len || req_one_access.len) - req_access = list() - req_one_access = list() + if(LAZYLEN(req_access) || LAZYLEN(req_one_access)) + LAZYCLEARLIST(req_access) + LAZYCLEARLIST(req_one_access) playsound(src, "sparks", 100, 1) return 1 diff --git a/code/game/machinery/doors/airlock.dm b/code/game/machinery/doors/airlock.dm index 39d54ef96d..97558066e9 100644 --- a/code/game/machinery/doors/airlock.dm +++ b/code/game/machinery/doors/airlock.dm @@ -1430,10 +1430,10 @@ About the new airlock wires panel: //update the door's access to match the electronics' secured_wires = electronics.secure if(electronics.one_access) - req_access.Cut() + LAZYCLEARLIST(req_access) req_one_access = src.electronics.conf_access else - req_one_access.Cut() + LAZYCLEARLIST(req_one_access) req_access = src.electronics.conf_access //get the name from the assembly @@ -1479,12 +1479,10 @@ About the new airlock wires panel: src.electronics = new/obj/item/weapon/airlock_electronics( src.loc ) //update the electronics to match the door's access - if(!src.req_access) - src.check_access() - if(src.req_access.len) - electronics.conf_access = src.req_access - else if (src.req_one_access.len) - electronics.conf_access = src.req_one_access + if(LAZYLEN(req_access)) + electronics.conf_access = req_access + else if (LAZYLEN(req_one_access)) + electronics.conf_access = req_one_access electronics.one_access = 1 /obj/machinery/door/airlock/emp_act(var/severity) diff --git a/code/game/machinery/doors/windowdoor.dm b/code/game/machinery/doors/windowdoor.dm index cfd0b3706c..a50e54ba75 100644 --- a/code/game/machinery/doors/windowdoor.dm +++ b/code/game/machinery/doors/windowdoor.dm @@ -20,7 +20,7 @@ /obj/machinery/door/window/New() ..() update_nearby_tiles() - if (src.req_access && src.req_access.len) + if(LAZYLEN(req_access)) src.icon_state = "[src.icon_state]" src.base_state = src.icon_state return @@ -38,12 +38,10 @@ var/obj/item/weapon/airlock_electronics/ae if(!electronics) ae = new/obj/item/weapon/airlock_electronics( src.loc ) - if(!src.req_access) - src.check_access() - if(src.req_access.len) - ae.conf_access = src.req_access - else if (src.req_one_access.len) - ae.conf_access = src.req_one_access + if(LAZYLEN(req_access)) + ae.conf_access = req_access + else if (LAZYLEN(req_one_access)) + ae.conf_access = req_one_access ae.one_access = 1 else ae = electronics @@ -241,12 +239,10 @@ else if(!electronics) wa.electronics = new/obj/item/weapon/airlock_electronics() - if(!src.req_access) - src.check_access() - if(src.req_access.len) - wa.electronics.conf_access = src.req_access - else if (src.req_one_access.len) - wa.electronics.conf_access = src.req_one_access + if(LAZYLEN(req_access)) + wa.electronics.conf_access = req_access + else if (LAZYLEN(req_one_access)) + wa.electronics.conf_access = req_one_access wa.electronics.one_access = 1 else wa.electronics = electronics diff --git a/code/modules/clothing/spacesuits/rig/rig.dm b/code/modules/clothing/spacesuits/rig/rig.dm index 9606205cc4..75f5e4af3c 100644 --- a/code/modules/clothing/spacesuits/rig/rig.dm +++ b/code/modules/clothing/spacesuits/rig/rig.dm @@ -120,7 +120,7 @@ item_state = icon_state wires = new(src) - if((!req_access || !req_access.len) && (!req_one_access || !req_one_access.len)) + if(!LAZYLEN(req_access) && !LAZYLEN(req_one_access)) locked = 0 spark_system = new() diff --git a/code/modules/clothing/spacesuits/rig/rig_attackby.dm b/code/modules/clothing/spacesuits/rig/rig_attackby.dm index 67080dd1e0..395484d53a 100644 --- a/code/modules/clothing/spacesuits/rig/rig_attackby.dm +++ b/code/modules/clothing/spacesuits/rig/rig_attackby.dm @@ -17,7 +17,7 @@ to_chat(user, "It looks like the locking system has been shorted out.") return - if((!req_access || !req_access.len) && (!req_one_access || !req_one_access.len)) + if(!LAZYLEN(req_access) && !LAZYLEN(req_one_access)) locked = 0 to_chat(user, "\The [src] doesn't seem to have a locking mechanism.") return @@ -190,8 +190,8 @@ /obj/item/weapon/rig/emag_act(var/remaining_charges, var/mob/user) if(!subverted) - req_access.Cut() - req_one_access.Cut() + LAZYCLEARLIST(req_access) + LAZYCLEARLIST(req_one_access) locked = 0 subverted = 1 to_chat(user, "You short out the access protocol for the suit.") diff --git a/code/modules/customitems/item_spawning.dm b/code/modules/customitems/item_spawning.dm index 5e85c0123c..aadafb9b66 100644 --- a/code/modules/customitems/item_spawning.dm +++ b/code/modules/customitems/item_spawning.dm @@ -190,7 +190,7 @@ // Check for required access. var/obj/item/weapon/card/id/current_id = M.wear_id - if(citem.req_access && citem.req_access > 0) + if(citem.req_access && citem.req_access > 0) // These are numbers, not lists if(!(istype(current_id) && (citem.req_access in current_id.access))) log_debug("Custom Item: [key_name(M)] Does not have required access.") continue diff --git a/code/modules/hydroponics/seed_storage.dm b/code/modules/hydroponics/seed_storage.dm index 96132945b6..392accde8f 100644 --- a/code/modules/hydroponics/seed_storage.dm +++ b/code/modules/hydroponics/seed_storage.dm @@ -417,7 +417,7 @@ if(lockdown) to_chat(user, "\The [src]'s control panel thunks, as its cover retracts.") lockdown = 0 - if(req_access || req_one_access) + if(LAZYLEN(req_access) || LAZYLEN(req_one_access)) req_access = list() req_one_access = list() to_chat(user, "\The [src]'s access mechanism shorts out.") From b5540d4b228c78bc7950d8536b64d55ea1e3b1c0 Mon Sep 17 00:00:00 2001 From: izac112 Date: Mon, 31 May 2021 19:45:19 +0200 Subject: [PATCH 11/12] Update mine_turfs.dm --- code/modules/mining/mine_turfs.dm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/modules/mining/mine_turfs.dm b/code/modules/mining/mine_turfs.dm index 4d92836733..498d7d6474 100644 --- a/code/modules/mining/mine_turfs.dm +++ b/code/modules/mining/mine_turfs.dm @@ -249,7 +249,7 @@ turf/simulated/mineral/floor/light_corner spawn(1) // Otherwise most of the ore is lost to the explosion, which makes this rather moot. for(var/ore in resources) var/amount_to_give = rand(CEILING(resources[ore]/2, 1), resources[ore]) // Should result in at least one piece of ore. - var/oretype = ore_types[ore] + var/oretype = GLOB.ore_types[ore] if(!oretype) return // this turf can't give that type for(var/i=1, i <= amount_to_give, i++) From 76c90ecebd96ec58907d11f68418cbca3bde05ec Mon Sep 17 00:00:00 2001 From: izac112 Date: Mon, 31 May 2021 19:48:48 +0200 Subject: [PATCH 12/12] Update mine_turfs.dm --- code/modules/mining/mine_turfs.dm | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/code/modules/mining/mine_turfs.dm b/code/modules/mining/mine_turfs.dm index 498d7d6474..de46c7a4ae 100644 --- a/code/modules/mining/mine_turfs.dm +++ b/code/modules/mining/mine_turfs.dm @@ -249,11 +249,10 @@ turf/simulated/mineral/floor/light_corner spawn(1) // Otherwise most of the ore is lost to the explosion, which makes this rather moot. for(var/ore in resources) var/amount_to_give = rand(CEILING(resources[ore]/2, 1), resources[ore]) // Should result in at least one piece of ore. - var/oretype = GLOB.ore_types[ore] + var/oretype = ore_types[ore] if(!oretype) return // this turf can't give that type for(var/i=1, i <= amount_to_give, i++) - var/oretype = GLOB.ore_types[ore] new oretype(src) resources[ore] = 0