mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-28 14:37:04 +01:00
Apply suggestions from code review
Co-authored-by: dearmochi <shenesis@gmail.com>
This commit is contained in:
co-authored by
dearmochi
parent
506f980d3d
commit
0e789fcf51
@@ -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, "<BR><BR><span class='info'>[where] is a box containing <b>items and instructions</b> to help you obtain a sliver of the supermatter.</span><BR>")
|
||||
to_chat(mob, "<br><br><span class='info'>In your [where] is a box containing <b>items and instructions</b> to help you obtain a sliver of the supermatter.</span><br>")
|
||||
else
|
||||
to_chat(mob, "<span class='userdanger'>Unfortunately, you weren't able to get a supermatter sliver stealing kit. This is very bad and you should adminhelp immediately (press F1).</span>")
|
||||
mob.update_icons()
|
||||
|
||||
@@ -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, "<span class='warning'>\The [tongs] is already holding a supermatter sliver!</span>")
|
||||
if(tongs.sliver)
|
||||
to_chat(user, "<span class='warning'>[tongs] is already holding a supermatter sliver!</span>")
|
||||
return FALSE
|
||||
forceMove(tongs)
|
||||
tongs.sliver = src
|
||||
tongs.icon_state = "supermatter_tongs_loaded"
|
||||
tongs.item_state = "supermatter_tongs_loaded"
|
||||
to_chat(user, "<span class='notice'>You carefully pick up [src] with [tongs].</span>")
|
||||
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, "<span class='notice'>As it touches \the [src], both \the [src] and \the [W] burst into dust!</span>")
|
||||
to_chat(user, "<span class='notice'>As it touches [src], both [src] and [W] burst into dust!</span>")
|
||||
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, "<span class='warning'>Container is sealing...</span>")
|
||||
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("<span class='notice'>\The [sliver] falls out of \the [src] as it hits the ground.</span>")
|
||||
visible_message("<span class='notice'>[sliver] falls out of [src] as it hits the ground.</span>")
|
||||
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("<span class='danger'>As [user] touches [AM] with \the [src], both flash into dust and silence fills the room...</span>",\
|
||||
user.visible_message("<span class='danger'>As [user] touches [AM] with [src], both flash into dust and silence fills the room...</span>",\
|
||||
"<span class='userdanger'>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.</span>",\
|
||||
"<span class='hear'>Everything suddenly goes silent.</span>")
|
||||
user.dust()
|
||||
|
||||
@@ -711,17 +711,17 @@
|
||||
return
|
||||
if(istype(I, /obj/item/scalpel/supermatter))
|
||||
var/obj/item/scalpel/supermatter/scalpel = I
|
||||
to_chat(user, "<span class='notice'>You carefully begin to scrape \the [src] with \the [I]...</span>")
|
||||
if(I.use_tool(src, user, 100, volume=100))
|
||||
if (scalpel.usesLeft)
|
||||
to_chat(user, "<span class='danger'>You extract a sliver from \the [src]. \The [src] begins to react violently!</span>")
|
||||
to_chat(user, "<span class='notice'>You carefully begin to scrape [src] with [I]...</span>")
|
||||
if(I.use_tool(src, user, 10 SECONDS, volume = 100))
|
||||
if(scalpel.usesLeft)
|
||||
to_chat(user, "<span class='danger'>You extract a sliver from [src]. [src] begins to react violently!</span>")
|
||||
new /obj/item/nuke_core/supermatter_sliver(drop_location())
|
||||
matter_power += 800
|
||||
scalpel.usesLeft--
|
||||
if (!scalpel.usesLeft)
|
||||
to_chat(user, "<span class='notice'>A tiny piece of \the [I] falls off, rendering it useless!</span>")
|
||||
if(!scalpel.usesLeft)
|
||||
to_chat(user, "<span class='notice'>A tiny piece of [I] falls off, rendering it useless!</span>")
|
||||
else
|
||||
to_chat(user, "<span class='warning'>You fail to extract a sliver from \The [src]! \the [I] isn't sharp enough anymore.</span>")
|
||||
to_chat(user, "<span class='warning'>You fail to extract a sliver from [src]! [I] isn't sharp enough anymore.</span>")
|
||||
else if(user.drop_item())
|
||||
user.visible_message("<span class='danger'>As [user] touches [src] with \a [I], silence fills the room...</span>",\
|
||||
"<span class='userdanger'>You touch [src] with [I], and everything suddenly goes silent.</span>\n<span class='notice'>[I] flashes into dust as you flinch away from [src].</span>",\
|
||||
|
||||
Reference in New Issue
Block a user