mirror of
https://github.com/PolarisSS13/Polaris.git
synced 2026-07-16 02:32:55 +01:00
examine signature changed to include distance
- distance is INFINITE, 0, or a positive integer based on get_dist() between the examiner and examinee's turfs when they are on the same Z. When the examiner is dead or a ghost, distance is always 0. - also updates /examine( implementations to use it! - adds w_class_to_name proc for reusing "It is a X item." examine behavior.
This commit is contained in:
@@ -171,9 +171,9 @@
|
||||
if(id_card)
|
||||
return id_card
|
||||
|
||||
/obj/item/electronic_assembly/examine(mob/user)
|
||||
/obj/item/electronic_assembly/examine(mob/user, distance, infix, suffix)
|
||||
. = ..()
|
||||
if(Adjacent(user))
|
||||
if(distance < 2)
|
||||
for(var/obj/item/integrated_circuit/IC in contents)
|
||||
. += IC.external_examine(user)
|
||||
if(opened)
|
||||
@@ -359,4 +359,4 @@
|
||||
|
||||
// Returns TRUE if I is something that could/should have a valid interaction. Used to tell circuitclothes to hit the circuit with something instead of the clothes
|
||||
/obj/item/electronic_assembly/proc/is_valid_tool(var/obj/item/I)
|
||||
return I.is_crowbar() || I.is_screwdriver() || istype(I, /obj/item/integrated_circuit) || istype(I, /obj/item/cell/device) || istype(I, /obj/item/integrated_electronics)
|
||||
return I.is_crowbar() || I.is_screwdriver() || istype(I, /obj/item/integrated_circuit) || istype(I, /obj/item/cell/device) || istype(I, /obj/item/integrated_electronics)
|
||||
|
||||
@@ -46,10 +46,10 @@
|
||||
IC.emp_act(severity)
|
||||
..()
|
||||
|
||||
/obj/item/clothing/examine(mob/user)
|
||||
/obj/item/clothing/examine(mob/user, distance, infix, suffix)
|
||||
. = ..()
|
||||
if(IC)
|
||||
. += IC.examine(user)
|
||||
. += IC.examine(user, distance, infix, suffix)
|
||||
|
||||
/obj/item/clothing/CtrlShiftClick(mob/user)
|
||||
var/turf/T = get_turf(src)
|
||||
@@ -178,4 +178,4 @@
|
||||
|
||||
/obj/item/clothing/suit/circuitry/Initialize()
|
||||
setup_integrated_circuit(/obj/item/electronic_assembly/clothing/large)
|
||||
return ..()
|
||||
return ..()
|
||||
|
||||
@@ -45,7 +45,7 @@
|
||||
I.do_work()
|
||||
return
|
||||
|
||||
/obj/item/assembly/electronic_assembly/examine(mob/user)
|
||||
/obj/item/assembly/electronic_assembly/examine(mob/user, distance, infix, suffix)
|
||||
. = ..()
|
||||
if(EA)
|
||||
for(var/obj/item/integrated_circuit/IC in EA.contents)
|
||||
@@ -81,4 +81,3 @@
|
||||
if(!CanInteract(user, state = deep_inventory_state))
|
||||
return 0
|
||||
return 1
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
a creative player the means to solve many problems. Circuits are held inside an electronic assembly, and are wired using special tools.
|
||||
*/
|
||||
|
||||
/obj/item/integrated_circuit/examine(mob/user)
|
||||
/obj/item/integrated_circuit/examine(mob/user, distance, infix, suffix)
|
||||
. = ..()
|
||||
. += external_examine(user)
|
||||
interact(user)
|
||||
@@ -401,4 +401,4 @@ a creative player the means to solve many problems. Circuits are held inside an
|
||||
return
|
||||
|
||||
/obj/item/integrated_circuit/proc/on_unanchored()
|
||||
return
|
||||
return
|
||||
|
||||
Reference in New Issue
Block a user