examine-code refactor (#44636)

* 1/4 done? maybe?

* more

* stuff

* incremental stuff

* stuff

* stuff & things

* mostly done but not yet

* stuffing

* stuffing 2: electric boogaloo

* Git Commit and the Kingdom of the Crystal Skull

* make it actually compile

* found more stuff

* fixes

* fix AI laws appearing out of order

* fix windows

* should be the remaining stuff

* this time for real

* i guess it should compile too

* fix sechuds
This commit is contained in:
vuonojenmustaturska
2019-06-19 22:07:57 +02:00
committed by AnturK
parent 5f414eb359
commit 8ddc9677c7
363 changed files with 1491 additions and 1597 deletions
@@ -26,6 +26,7 @@
/obj/proc/get_modular_computer_parts_examine(mob/user)
. = list()
if(!is_modular_computer())
return
@@ -35,12 +36,12 @@
if(ai_slot)
if(ai_slot.stored_card)
if(user_is_adjacent)
to_chat(user, "It has a slot installed for an intelliCard which contains: [ai_slot.stored_card.name]")
. += "It has a slot installed for an intelliCard which contains: [ai_slot.stored_card.name]"
else
to_chat(user, "It has a slot installed for an intelliCard, which appears to be occupied.")
to_chat(user, "<span class='info'>Alt-click to eject the intelliCard.</span>")
. += "It has a slot installed for an intelliCard, which appears to be occupied."
. += "<span class='info'>Alt-click to eject the intelliCard.</span>"
else
to_chat(user, "It has a slot installed for an intelliCard.")
. += "It has a slot installed for an intelliCard."
var/obj/item/computer_hardware/card_slot/card_slot = get_modular_computer_part(MC_CARD)
if(card_slot)
@@ -49,15 +50,15 @@
var/obj/item/card/id/second_ID = card_slot.stored_card2
var/multiple_cards = istype(first_ID) && istype(second_ID)
if(user_is_adjacent)
to_chat(user, "It has two slots for identification cards installed[multiple_cards ? " which contain [first_ID] and [second_ID]" : ", one of which contains [first_ID ? first_ID : second_ID]"].")
. += "It has two slots for identification cards installed[multiple_cards ? " which contain [first_ID] and [second_ID]" : ", one of which contains [first_ID ? first_ID : second_ID]"]."
else
to_chat(user, "It has two slots for identification cards installed, [multiple_cards ? "both of which appear" : "and one of them appears"] to be occupied.")
to_chat(user, "<span class='info'>Alt-click [src] to eject the identification card[multiple_cards ? "s":""].</span>")
. += "It has two slots for identification cards installed, [multiple_cards ? "both of which appear" : "and one of them appears"] to be occupied."
. += "<span class='info'>Alt-click [src] to eject the identification card[multiple_cards ? "s":""].</span>"
else
to_chat(user, "It has two slots installed for identification cards.")
. += "It has two slots installed for identification cards."
var/obj/item/computer_hardware/printer/printer_slot = get_modular_computer_part(MC_PRINT)
if(printer_slot)
to_chat(user, "It has a printer installed.")
. += "It has a printer installed."
if(user_is_adjacent)
to_chat(user, "The printer's paper levels are at: [printer_slot.stored_paper]/[printer_slot.max_paper].</span>]")
. += "The printer's paper levels are at: [printer_slot.stored_paper]/[printer_slot.max_paper].</span>]"
@@ -187,13 +187,13 @@
return 1
/obj/item/modular_computer/examine(mob/user)
..()
. = ..()
if(obj_integrity <= integrity_failure)
to_chat(user, "<span class='danger'>It is heavily damaged!</span>")
. += "<span class='danger'>It is heavily damaged!</span>"
else if(obj_integrity < max_integrity)
to_chat(user, "<span class='warning'>It is damaged.</span>")
. += "<span class='warning'>It is damaged.</span>"
get_modular_computer_parts_examine(user)
. += get_modular_computer_parts_examine(user)
/obj/item/modular_computer/update_icon()
cut_overlays()
@@ -22,9 +22,9 @@
var/slowdown_open = TRUE
/obj/item/modular_computer/laptop/examine(mob/user)
..()
. = ..()
if(screen_on)
to_chat(user, "<span class='notice'>Alt-click to close it.</span>")
. += "<span class='notice'>Alt-click to close it.</span>"
/obj/item/modular_computer/laptop/Initialize()
. = ..()
@@ -37,8 +37,8 @@
return ..()
/obj/machinery/modular_computer/examine(mob/user)
..()
get_modular_computer_parts_examine(user)
. = ..()
. += get_modular_computer_parts_examine(user)
/obj/machinery/modular_computer/attack_ghost(mob/dead/observer/user)
. = ..()
@@ -75,11 +75,11 @@
/obj/item/computer_hardware/examine(var/mob/user)
. = ..()
if(damage > damage_failure)
to_chat(user, "<span class='danger'>It seems to be severely damaged!</span>")
. += "<span class='danger'>It seems to be severely damaged!</span>"
else if(damage > damage_malfunction)
to_chat(user, "<span class='warning'>It seems to be damaged!</span>")
. += "<span class='warning'>It seems to be damaged!</span>"
else if(damage)
to_chat(user, "<span class='notice'>It seems to be slightly damaged.</span>")
. += "<span class='notice'>It seems to be slightly damaged.</span>"
// Component-side compatibility check.
/obj/item/computer_hardware/proc/can_install(obj/item/modular_computer/M, mob/living/user = null)
@@ -15,9 +15,9 @@
. = ..()
/obj/item/computer_hardware/ai_slot/examine(mob/user)
..()
. = ..()
if(stored_card)
to_chat(user, "There appears to be an intelliCard loaded. There appears to be a pinhole protecting a manual eject button. A screwdriver could probably press it.")
. += "There appears to be an intelliCard loaded. There appears to be a pinhole protecting a manual eject button. A screwdriver could probably press it."
/obj/item/computer_hardware/ai_slot/on_install(obj/item/modular_computer/M, mob/living/user = null)
M.add_verb(device_type)
@@ -71,4 +71,4 @@
if(I.tool_behaviour == TOOL_SCREWDRIVER)
to_chat(user, "<span class='notice'>You press down on the manual eject button with \the [I].</span>")
try_eject(,user,1)
return
return
@@ -118,6 +118,6 @@
return
/obj/item/computer_hardware/card_slot/examine(mob/user)
..()
. = ..()
if(stored_card || stored_card2)
to_chat(user, "There appears to be something loaded in the card slots.")
. += "There appears to be something loaded in the card slots."
@@ -19,8 +19,8 @@
store_file(new/datum/computer_file/program/filemanager(src)) // File manager, allows text editor functions and basic file manipulation.
/obj/item/computer_hardware/hard_drive/examine(user)
..()
to_chat(user, "<span class='notice'>It has [max_capacity] GQ of storage capacity.</span>")
. = ..()
. += "<span class='notice'>It has [max_capacity] GQ of storage capacity.</span>"
/obj/item/computer_hardware/hard_drive/diagnostics(var/mob/user)
..()
@@ -121,7 +121,7 @@
return ..()
/obj/item/computer_hardware/hard_drive/Initialize()
. = ..()
. = ..()
install_default_programs()
@@ -13,8 +13,8 @@
to_chat(user, "Paper level: [stored_paper]/[max_paper].")
/obj/item/computer_hardware/printer/examine(mob/user)
..()
to_chat(user, "<span class='notice'>Paper level: [stored_paper]/[max_paper].</span>")
. = ..()
. += "<span class='notice'>Paper level: [stored_paper]/[max_paper].</span>"
/obj/item/computer_hardware/printer/proc/print_text(var/text_to_print, var/paper_title = "")
@@ -59,4 +59,4 @@
icon_state = "printer_mini"
w_class = WEIGHT_CLASS_TINY
stored_paper = 5
max_paper = 15
max_paper = 15