Some refactors, DMDoc and UT (#18365)

* dsfa

* accessories fix

* fixed "has been hit by" message with intent check

* sdfa
This commit is contained in:
Fluffy
2024-02-12 15:32:23 +00:00
committed by GitHub
parent 58dbaf8be6
commit 9afe761db3
620 changed files with 5733 additions and 5200 deletions
@@ -17,17 +17,17 @@
return
power_usage = power_usage_occupied
/obj/item/computer_hardware/ai_slot/attackby(obj/item/W, mob/user)
/obj/item/computer_hardware/ai_slot/attackby(obj/item/attacking_item, mob/user)
if(..())
return TRUE
if(istype(W, /obj/item/aicard))
if(istype(attacking_item, /obj/item/aicard))
if(stored_card)
to_chat(user, SPAN_WARNING("\The [src] is already occupied."))
return
user.drop_from_inventory(W, src)
stored_card = W
user.drop_from_inventory(attacking_item, src)
stored_card = attacking_item
update_power_usage()
if(W.isscrewdriver())
if(attacking_item.isscrewdriver())
to_chat(user, SPAN_NOTICE("You manually remove \the [stored_card] from \the [src]."))
stored_card.forceMove(get_turf(src))
stored_card = null
@@ -175,8 +175,8 @@
remove_file(F)
install_default_programs()
/obj/item/computer_hardware/hard_drive/attackby(obj/item/W, mob/living/user)
if(istype(W, /obj/item/card/tech_support))
/obj/item/computer_hardware/hard_drive/attackby(obj/item/attacking_item, mob/user)
if(istype(attacking_item, /obj/item/card/tech_support))
reset_drive()
to_chat(user, SPAN_NOTICE("Drive successfully reset."))
else
@@ -26,21 +26,21 @@
return disable()
return enable()
/obj/item/computer_hardware/attackby(obj/item/W, mob/living/user)
/obj/item/computer_hardware/attackby(obj/item/attacking_item, mob/user)
// Multitool. Runs diagnostics
if(W.ismultitool())
if(attacking_item.ismultitool())
to_chat(user, SPAN_NOTICE("***** DIAGNOSTICS REPORT *****"))
diagnostics(user)
to_chat(user, SPAN_NOTICE("******************************"))
return 1
// Nanopaste. Repair all damage if present for a single unit.
var/obj/item/stack/S = W
var/obj/item/stack/S = attacking_item
if(istype(S, /obj/item/stack/nanopaste))
if(!damage)
to_chat(user, SPAN_WARNING("\The [src] doesn't seem to require repairs."))
return TRUE
if(S.use(1))
to_chat(user, SPAN_NOTICE("You apply a bit of \the [W] to \the [src], repairing it fully."))
to_chat(user, SPAN_NOTICE("You apply a bit of \the [attacking_item] to \the [src], repairing it fully."))
damage = 0
return TRUE
// Cable coil. Works as repair method, but will probably require multiple applications and more cable.
@@ -49,7 +49,7 @@
to_chat(user, SPAN_WARNING("\The [src] doesn't seem to require repairs."))
return TRUE
if(S.use(1))
to_chat(user, SPAN_NOTICE("You patch up \the [src] with a bit of \the [W]."))
to_chat(user, SPAN_NOTICE("You patch up \the [src] with a bit of \the [attacking_item]."))
take_damage(-10)
return TRUE
return ..()
@@ -31,13 +31,13 @@
stored_paper--
return P
/obj/item/computer_hardware/nano_printer/attackby(obj/item/W, mob/user)
if(istype(W, /obj/item/paper))
/obj/item/computer_hardware/nano_printer/attackby(obj/item/attacking_item, mob/user)
if(istype(attacking_item, /obj/item/paper))
if(stored_paper >= max_paper)
to_chat(user, SPAN_WARNING("You try to add \the [W] to the [src], but its paper bin is full."))
to_chat(user, SPAN_WARNING("You try to add \the [attacking_item] to the [src], but its paper bin is full."))
return
to_chat(user, SPAN_NOTICE("You insert \the [W] into [src]."))
qdel(W)
to_chat(user, SPAN_NOTICE("You insert \the [attacking_item] into [src]."))
qdel(attacking_item)
stored_paper++
else
..()