Adds common proc to obtain the material of an object

Adds a common get_material() proc to objects, and implements overrides
where applicable
This commit is contained in:
mwerezak
2015-08-01 23:03:21 -04:00
parent f8799035f4
commit e3609bac94
7 changed files with 22 additions and 3 deletions
@@ -34,6 +34,9 @@
if(!isnull(matter[material_type]))
matter[material_type] *= force_divisor // May require a new var instead.
/obj/item/weapon/material/get_material()
return material
/obj/item/weapon/material/proc/update_force()
if(edge || sharp)
force = material.get_edge_damage()
@@ -44,6 +44,9 @@
update_nearby_tiles()
..()
/obj/structure/simple_door/get_material()
return material
/obj/structure/simple_door/Bumped(atom/user)
..()
if(!state)
@@ -33,6 +33,9 @@
padding_material = get_material_by_name(new_padding_material)
update_icon()
/obj/structure/bed/get_material()
return material
// Reuse the cache/code from stools, todo maybe unify.
/obj/structure/bed/update_icon()
// Prep icon.