mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-12 11:13:16 +00:00
Fixes broken guns
Exam now reveals the name of the parts needed instead of the path
This commit is contained in:
@@ -32,8 +32,19 @@
|
||||
if(do_after(user, 5 SECONDS))
|
||||
to_chat(user, "<span class='notice'>\The [src] can possibly be restored with:</span>")
|
||||
for(var/resource in material_needs)
|
||||
var/obj/item/res = resource
|
||||
if(material_needs[resource] > 0)
|
||||
to_chat(user, "<span class='notice'>- [bicon(resource)] x [material_needs[resource]] [resource]</span>")
|
||||
var/res_name = ""
|
||||
if(ispath(res,/obj/item/stack/material))
|
||||
var/obj/item/stack/material/mat_stack = res
|
||||
var/material/mat = get_material_by_name("[initial(mat_stack.default_type)]")
|
||||
if(material_needs[resource]>1)
|
||||
res_name = "[mat.use_name] [mat.sheet_plural_name]"
|
||||
else
|
||||
res_name = "[mat.use_name] [mat.sheet_singular_name]"
|
||||
else
|
||||
res_name = initial(res.name)
|
||||
to_chat(user, "<span class='notice'>- x [material_needs[resource]] [res_name]</span>")
|
||||
|
||||
/obj/item/weapon/broken_gun/proc/setup_gun(var/obj/item/weapon/gun/path)
|
||||
if(ispath(path))
|
||||
|
||||
Reference in New Issue
Block a user