Split examine verb and function, and improve it (#17251)

* Split examine verb and function, and include adjacency and distance checking in examine function

* Fix various issues

* Update code/modules/mob/examinations.dm

Co-authored-by: SleepyGemmy <99297919+SleepyGemmy@users.noreply.github.com>

* Add required define vars

* Update code/game/objects/items/stacks/wrap.dm

Co-authored-by: SleepyGemmy <99297919+SleepyGemmy@users.noreply.github.com>

---------

Co-authored-by: SleepyGemmy <99297919+SleepyGemmy@users.noreply.github.com>
This commit is contained in:
Cody Brittain
2023-09-09 08:07:36 +00:00
committed by GitHub
co-authored by SleepyGemmy
parent 39228d3a2c
commit ce5ac79e3c
241 changed files with 617 additions and 518 deletions
+3 -3
View File
@@ -176,8 +176,8 @@
system_error("Resource field depleted.")
update_icon()
/obj/machinery/mining/drill/examine(mob/user)
..(user)
/obj/machinery/mining/drill/examine(mob/user, distance, is_adjacent)
. = ..()
if(need_player_check)
to_chat(user, SPAN_WARNING("The drill error light is flashing. The cell panel is [panel_open ? "open" : "closed"]."))
else
@@ -185,7 +185,7 @@
if(panel_open)
to_chat(user, "The power cell is [cell ? "installed" : "missing"].")
to_chat(user, "The cell charge meter reads [cell ? round(cell.percent(),1) : 0]%.")
if(user.Adjacent(src))
if(is_adjacent)
if(attached_satchel)
to_chat(user, FONT_SMALL(SPAN_NOTICE("It has a [attached_satchel] attached to it.")))
if(current_error)
+2 -2
View File
@@ -843,7 +843,7 @@
update_icon()
/obj/item/lazarus_injector/examine(mob/user)
..()
. = ..()
if(!loaded)
to_chat(user, SPAN_INFO("\The [src] is empty."))
if(malfunctioning || emagged)
@@ -869,7 +869,7 @@
..()
/obj/item/card/mining_point_card/examine(mob/user)
..()
. = ..()
to_chat(user, SPAN_NOTICE("There's [points] point\s on the card."))
/**********************"Fultons"**********************/
+1 -1
View File
@@ -93,7 +93,7 @@ var/list/mineral_can_smooth_with = list(
return INITIALIZE_HINT_NORMAL
/turf/simulated/mineral/examine(mob/user)
..()
. = ..()
if(mineral)
switch(mined_ore)
if(0)
+2 -1
View File
@@ -19,7 +19,8 @@
var/list/ore_names
/obj/item/ore_detector/examine(mob/user, distance)
if(..(user, 1))
. = ..()
if(distance <= 1)
to_chat(user, FONT_SMALL(SPAN_NOTICE("Alt-click to set the ore you wish to search for.")))
/obj/item/ore_detector/Destroy()
+3 -3
View File
@@ -11,9 +11,9 @@
var/linked_beacon = FALSE // can't hold an actual beacon beclause storage code a shit
var/linked_beacon_uses = 3 // to hold the amount of uses the beacon had, storage code a shit.
/obj/item/storage/bag/ore/examine(mob/user)
..()
if(user.Adjacent(src) && linked_beacon)
/obj/item/storage/bag/ore/examine(mob/user, distance, is_adjacent)
. = ..()
if(is_adjacent && linked_beacon)
to_chat(user, FONT_SMALL(SPAN_NOTICE("It has a <b>warp extraction pack</b> inside.")))
/obj/item/storage/bag/ore/drone
+3 -3
View File
@@ -71,12 +71,12 @@
else
stored_ore[O.name] = 1
/obj/structure/ore_box/examine(mob/user)
..()
/obj/structure/ore_box/examine(mob/user, distance, is_adjacent)
. = ..()
// Borgs can now check contents too.
if((!istype(user, /mob/living/carbon/human)) && (!istype(user, /mob/living/silicon/robot)))
return
if(!Adjacent(user)) //Can only check the contents of ore boxes if you can physically reach them.
if(!is_adjacent) //Can only check the contents of ore boxes if you can physically reach them.
return
add_fingerprint(user)