mirror of
https://github.com/PolarisSS13/Polaris.git
synced 2026-01-04 14:33:30 +00:00
Rewrite examine() to pass a list around (#7038)
This commit is contained in:
@@ -29,10 +29,10 @@
|
||||
var/force_holder = null //
|
||||
|
||||
/obj/item/weapon/gripper/examine(mob/user)
|
||||
..()
|
||||
. = ..()
|
||||
if(wrapped)
|
||||
to_chat(user, "<span class='notice'>\The [src] is holding \the [wrapped].</span>")
|
||||
wrapped.examine(user)
|
||||
. += "<span class='notice'>\The [src] is holding \the [wrapped].</span>"
|
||||
. += wrapped.examine(user)
|
||||
|
||||
/obj/item/weapon/gripper/CtrlClick(mob/user)
|
||||
drop_item()
|
||||
|
||||
@@ -63,9 +63,9 @@
|
||||
visible_message("\The [src] voices a strident beep, indicating a drone chassis is prepared.")
|
||||
|
||||
/obj/machinery/drone_fabricator/examine(mob/user)
|
||||
..(user)
|
||||
. = ..()
|
||||
if(produce_drones && drone_progress >= 100 && istype(user,/mob/observer/dead) && config.allow_drone_spawn && count_drones() < config.max_maint_drones)
|
||||
to_chat(user, "<BR><B>A drone is prepared. Select 'Join As Drone' from the Ghost tab to spawn as a maintenance drone.</B>")
|
||||
. += "<br><B>A drone is prepared. Select 'Join As Drone' from the Ghost tab to spawn as a maintenance drone.</B>"
|
||||
|
||||
/obj/machinery/drone_fabricator/proc/create_drone(var/client/player)
|
||||
|
||||
|
||||
@@ -1,46 +1,41 @@
|
||||
/mob/living/silicon/robot/examine(mob/user)
|
||||
var/custom_infix = custom_name ? ", [modtype] [braintype]" : ""
|
||||
..(user, infix = custom_infix)
|
||||
. = ..(user, infix = custom_infix)
|
||||
|
||||
var/msg = ""
|
||||
msg += "<span class='warning'>"
|
||||
if (src.getBruteLoss())
|
||||
if (src.getBruteLoss() < 75)
|
||||
msg += "It looks slightly dented.\n"
|
||||
. += "<span class='warning'>It looks slightly dented.</span>"
|
||||
else
|
||||
msg += "<B>It looks severely dented!</B>\n"
|
||||
. += "<span class='warning'><B>It looks severely dented!</B></span>"
|
||||
if (src.getFireLoss())
|
||||
if (src.getFireLoss() < 75)
|
||||
msg += "It looks slightly charred.\n"
|
||||
. += "<span class='warning'>It looks slightly charred.</span>"
|
||||
else
|
||||
msg += "<B>It looks severely burnt and heat-warped!</B>\n"
|
||||
msg += "</span>"
|
||||
. += "<span class='warning'><B>It looks severely burnt and heat-warped!</B></span>"
|
||||
|
||||
if(opened)
|
||||
msg += "<span class='warning'>Its cover is open and the power cell is [cell ? "installed" : "missing"].</span>\n"
|
||||
. += "<span class='warning'>Its cover is open and the power cell is [cell ? "installed" : "missing"].</span>"
|
||||
else
|
||||
msg += "Its cover is closed.\n"
|
||||
. += "Its cover is closed."
|
||||
|
||||
if(!has_power)
|
||||
msg += "<span class='warning'>It appears to be running on backup power.</span>\n"
|
||||
. += "<span class='warning'>It appears to be running on backup power.</span>"
|
||||
|
||||
switch(src.stat)
|
||||
if(CONSCIOUS)
|
||||
if(shell)
|
||||
msg += "It appears to be an [deployed ? "active" : "empty"] AI shell.\n"
|
||||
. += "It appears to be an [deployed ? "active" : "empty"] AI shell."
|
||||
else if(!src.client)
|
||||
msg += "It appears to be in stand-by mode.\n" //afk
|
||||
if(UNCONSCIOUS) msg += "<span class='warning'>It doesn't seem to be responding.</span>\n"
|
||||
if(DEAD) msg += "<span class='deadsay'>It looks completely unsalvageable.</span>\n"
|
||||
msg += "*---------*"
|
||||
. += "It appears to be in stand-by mode." //afk
|
||||
if(UNCONSCIOUS) . += "<span class='warning'>It doesn't seem to be responding.</span>"
|
||||
if(DEAD) . += "<span class='deadsay'>It looks completely unsalvageable.</span>"
|
||||
. += "*---------*"
|
||||
|
||||
if(print_flavor_text()) msg += "\n[print_flavor_text()]\n"
|
||||
if(print_flavor_text()) . += "<br>[print_flavor_text()]"
|
||||
|
||||
if (pose)
|
||||
if( findtext(pose,".",length(pose)) == 0 && findtext(pose,"!",length(pose)) == 0 && findtext(pose,"?",length(pose)) == 0 )
|
||||
if(!findtext(pose, regex("\[.?!]$"))) // Will be zero if the last character is not a member of [.?!]
|
||||
pose = addtext(pose,".") //Makes sure all emotes end with a period.
|
||||
msg += "\nIt is [pose]"
|
||||
. += "<br>It is [pose]" //Extra <br> intentional
|
||||
|
||||
to_chat(user,msg)
|
||||
user.showLaws(src)
|
||||
return
|
||||
|
||||
@@ -430,10 +430,9 @@
|
||||
max_doors = 5
|
||||
|
||||
/obj/item/weapon/inflatable_dispenser/examine(var/mob/user)
|
||||
if(!..(user))
|
||||
return
|
||||
to_chat(user, "It has [stored_walls] wall segment\s and [stored_doors] door segment\s stored.")
|
||||
to_chat(user, "It is set to deploy [mode ? "doors" : "walls"]")
|
||||
. = ..()
|
||||
. += "It has [stored_walls] wall segment\s and [stored_doors] door segment\s stored."
|
||||
. += "It is set to deploy [mode ? "doors" : "walls"]"
|
||||
|
||||
/obj/item/weapon/inflatable_dispenser/attack_self()
|
||||
mode = !mode
|
||||
|
||||
Reference in New Issue
Block a user