From 0e789fcf510b06e8cfcab5a2ba55acc203906c80 Mon Sep 17 00:00:00 2001 From: Qwertytoforty <52090703+Qwertytoforty@users.noreply.github.com> Date: Thu, 4 Mar 2021 08:45:39 -0500 Subject: [PATCH] Apply suggestions from code review Co-authored-by: dearmochi --- code/game/gamemodes/objective.dm | 4 ++-- code/game/objects/items/theft_items.dm | 16 ++++++++-------- code/modules/power/supermatter/supermatter.dm | 14 +++++++------- 3 files changed, 17 insertions(+), 17 deletions(-) diff --git a/code/game/gamemodes/objective.dm b/code/game/gamemodes/objective.dm index c822a5c4a94..4d79a8d2468 100644 --- a/code/game/gamemodes/objective.dm +++ b/code/game/gamemodes/objective.dm @@ -434,7 +434,7 @@ GLOBAL_LIST_INIT(potential_theft_objectives, (subtypesof(/datum/theft_objective) /datum/objective/steal/proc/give_supermatter_kit() var/mob/living/carbon/human/mob = owner.current var/T = new /obj/item/storage/box/syndie_kit/supermatter - var/list/slots = list ( + var/list/slots = list( "backpack" = slot_in_backpack, "left pocket" = slot_l_store, "right pocket" = slot_r_store, @@ -443,7 +443,7 @@ GLOBAL_LIST_INIT(potential_theft_objectives, (subtypesof(/datum/theft_objective) ) var/where = mob.equip_in_one_of_slots(T, slots) if(where) - to_chat(mob, "

[where] is a box containing items and instructions to help you obtain a sliver of the supermatter.
") + to_chat(mob, "

In your [where] is a box containing items and instructions to help you obtain a sliver of the supermatter.
") else to_chat(mob, "Unfortunately, you weren't able to get a supermatter sliver stealing kit. This is very bad and you should adminhelp immediately (press F1).") mob.update_icons() diff --git a/code/game/objects/items/theft_items.dm b/code/game/objects/items/theft_items.dm index ad0106f0840..98f65b844f0 100644 --- a/code/game/objects/items/theft_items.dm +++ b/code/game/objects/items/theft_items.dm @@ -132,18 +132,18 @@ /obj/item/nuke_core/supermatter_sliver/attackby(obj/item/W, mob/living/user, params) if(istype(W, /obj/item/hemostat/supermatter)) var/obj/item/hemostat/supermatter/tongs = W - if (tongs.sliver) - to_chat(user, "\The [tongs] is already holding a supermatter sliver!") + if(tongs.sliver) + to_chat(user, "[tongs] is already holding a supermatter sliver!") return FALSE forceMove(tongs) tongs.sliver = src tongs.icon_state = "supermatter_tongs_loaded" tongs.item_state = "supermatter_tongs_loaded" to_chat(user, "You carefully pick up [src] with [tongs].") - else if(istype(W, /obj/item/scalpel/supermatter) || istype(W, /obj/item/nuke_core_container/supermatter/)) // we don't want it to dust + else if(istype(W, /obj/item/scalpel/supermatter) || istype(W, /obj/item/nuke_core_container/supermatter)) // we don't want it to dust return else - to_chat(user, "As it touches \the [src], both \the [src] and \the [W] burst into dust!") + to_chat(user, "As it touches [src], both [src] and [W] burst into dust!") radiation_pulse(user, 100) playsound(src, 'sound/effects/supermatter.ogg', 50, TRUE) qdel(W) @@ -201,11 +201,11 @@ T.item_state = "supermatter_tongs" icon_state = "supermatter_container_loaded" to_chat(user, "Container is sealing...") - addtimer(CALLBACK(src, .proc/seal), 50) + addtimer(CALLBACK(src, .proc/seal), 5 SECONDS) return TRUE /obj/item/nuke_core_container/supermatter/seal() - if(istype(sliver)) + if(!QDELETED(sliver)) STOP_PROCESSING(SSobj, sliver) icon_state = "supermatter_container_sealed" playsound(src, 'sound/items/Deconstruct.ogg', 60, TRUE) @@ -259,7 +259,7 @@ /obj/item/hemostat/supermatter/throw_impact(atom/hit_atom, datum/thrownthing/throwingdatum) // no instakill supermatter javelins if(sliver) sliver.forceMove(loc) - visible_message("\The [sliver] falls out of \the [src] as it hits the ground.") + visible_message("[sliver] falls out of [src] as it hits the ground.") sliver = null icon_state = "supermatter_tongs" item_state = "supermatter_tongs" @@ -282,7 +282,7 @@ qdel(AM) if (user) add_attack_logs(user, AM, "[AM] and [user] consumed by melee attack with [src] by [user]") - user.visible_message("As [user] touches [AM] with \the [src], both flash into dust and silence fills the room...",\ + user.visible_message("As [user] touches [AM] with [src], both flash into dust and silence fills the room...",\ "You touch [AM] with [src], and everything suddenly goes silent.\n[AM] and [sliver] flash into dust, and soon as you can register this, you do as well.",\ "Everything suddenly goes silent.") user.dust() diff --git a/code/modules/power/supermatter/supermatter.dm b/code/modules/power/supermatter/supermatter.dm index 60117f93806..68c4d1654fd 100644 --- a/code/modules/power/supermatter/supermatter.dm +++ b/code/modules/power/supermatter/supermatter.dm @@ -711,17 +711,17 @@ return if(istype(I, /obj/item/scalpel/supermatter)) var/obj/item/scalpel/supermatter/scalpel = I - to_chat(user, "You carefully begin to scrape \the [src] with \the [I]...") - if(I.use_tool(src, user, 100, volume=100)) - if (scalpel.usesLeft) - to_chat(user, "You extract a sliver from \the [src]. \The [src] begins to react violently!") + to_chat(user, "You carefully begin to scrape [src] with [I]...") + if(I.use_tool(src, user, 10 SECONDS, volume = 100)) + if(scalpel.usesLeft) + to_chat(user, "You extract a sliver from [src]. [src] begins to react violently!") new /obj/item/nuke_core/supermatter_sliver(drop_location()) matter_power += 800 scalpel.usesLeft-- - if (!scalpel.usesLeft) - to_chat(user, "A tiny piece of \the [I] falls off, rendering it useless!") + if(!scalpel.usesLeft) + to_chat(user, "A tiny piece of [I] falls off, rendering it useless!") else - to_chat(user, "You fail to extract a sliver from \The [src]! \the [I] isn't sharp enough anymore.") + to_chat(user, "You fail to extract a sliver from [src]! [I] isn't sharp enough anymore.") else if(user.drop_item()) user.visible_message("As [user] touches [src] with \a [I], silence fills the room...",\ "You touch [src] with [I], and everything suddenly goes silent.\n[I] flashes into dust as you flinch away from [src].",\