Files
VOREStation/code/modules/tools/tool_quality.dm
Cameron Lennox 37779acf01 Gets rid of hasvar usage and moves up some vars (#18262)
* Gets rid of hasvar usage

* thiiis

* moves damtype to /obj/item

* throwing

* Move vars moved

* matter as well

Pretty much only used for the robot lathe and when crafting...When you could only smelt down obj/item for its materials

* Update floor_light.dm

* exploitable

* this can be moved up...

* move persist to /item

you can't ever place /obj in storage anyway...It would imply you can store the supermatter, which I think we don't want.

* gets rid of being_used

I added this for xenoarch, that was a mistake

* move these

* move these to the base file

* Makes floorlight autolathe recipe not shit

* Update floor_light.dm

* Update floor_light.dm

* Mechs no longer gib when hitting things

---------

Co-authored-by: Selis <12716288+ItsSelis@users.noreply.github.com>
2025-08-21 23:08:10 +02:00

38 lines
1.1 KiB
Plaintext

/obj/item/examine(mob/user)
. = ..()
for(var/qual in tool_qualities)
var/msg
switch(tool_qualities[qual])
if(TOOL_QUALITY_WORST)
msg += "very poor "
if(TOOL_QUALITY_POOR)
msg += "poor "
if(TOOL_QUALITY_MEDIOCRE)
msg += "mediocre "
if(TOOL_QUALITY_STANDARD)
msg += ""
if(TOOL_QUALITY_DECENT)
msg += "decent "
if(TOOL_QUALITY_GOOD)
msg += "pretty good "
if(TOOL_QUALITY_BEST)
msg += "very good "
. += "It looks like it can be used as a [msg][qual]."
/atom/proc/get_tool_quality(tool_quality)
return TOOL_QUALITY_NONE
/// Used to check for a specific tool quality on an item.
/// Returns the value of `tool_quality` if it is found, else 0.
/obj/item/get_tool_quality(quality)
return LAZYACCESS(tool_qualities, quality)
/obj/item/proc/set_tool_quality(tool, quality)
tool_qualities[tool] = quality
/obj/item/proc/get_tool_speed(quality)
return LAZYACCESS(tool_qualities, quality)
/obj/item/proc/get_use_time(quality, base_time)
return LAZYACCESS(tool_qualities, quality) ? base_time / tool_qualities[quality] : -1