mirror of
https://github.com/VOREStation/VOREStation.git
synced 2026-08-26 13:39:16 +01:00
Rewrite examine() to pass a list around
This commit is contained in:
@@ -22,12 +22,12 @@
|
||||
var/list/tools = list()
|
||||
var/current_tool = 1
|
||||
|
||||
/obj/item/weapon/combitool/examine()
|
||||
..()
|
||||
if(loc == usr && tools.len)
|
||||
to_chat(usr, "It has the following fittings:")
|
||||
/obj/item/weapon/combitool/examine(mob/user)
|
||||
. = ..()
|
||||
if(loc == user && tools.len)
|
||||
. += "It has the following fittings:"
|
||||
for(var/obj/item/tool in tools)
|
||||
to_chat(usr, "[bicon(tool)] - [tool.name][tools[current_tool]==tool?" (selected)":""]")
|
||||
. += "[bicon(tool)] - [tool.name][tools[current_tool]==tool?" (selected)":""]")
|
||||
|
||||
/obj/item/weapon/combitool/New()
|
||||
..()
|
||||
|
||||
@@ -56,9 +56,9 @@
|
||||
return ..()
|
||||
|
||||
/obj/item/weapon/weldingtool/examine(mob/user)
|
||||
if(..(user, 0))
|
||||
if(max_fuel)
|
||||
to_chat(user, "[bicon(src)] The [src.name] contains [get_fuel()]/[src.max_fuel] units of fuel!")
|
||||
. = ..()
|
||||
if(max_fuel && loc == user)
|
||||
. += "It contains [get_fuel()]/[src.max_fuel] units of fuel!"
|
||||
|
||||
/obj/item/weapon/weldingtool/attack(atom/A, mob/living/user, def_zone)
|
||||
if(ishuman(A) && user.a_intent == I_HELP)
|
||||
@@ -562,13 +562,12 @@
|
||||
return power_supply
|
||||
|
||||
/obj/item/weapon/weldingtool/electric/examine(mob/user)
|
||||
if(get_dist(src, user) > 1)
|
||||
to_chat(user, desc)
|
||||
else
|
||||
. = ..()
|
||||
if(Adjacent(user))
|
||||
if(power_supply)
|
||||
to_chat(user, "[bicon(src)] The [src.name] has [get_fuel()] charge left.")
|
||||
. += "It [src.name] has [get_fuel()] charge left."
|
||||
else
|
||||
to_chat(user, "[bicon(src)] The [src.name] has no power cell!")
|
||||
. += "It [src.name] has no power cell!"
|
||||
|
||||
/obj/item/weapon/weldingtool/electric/get_fuel()
|
||||
if(use_external_power)
|
||||
|
||||
Reference in New Issue
Block a user