Code:
turf
spikes
icon_state = "spikes"
New()
..()
var/obj/o = new /obj()
o.icon_state = "spikes-overlay"
o.layer = MOB_LAYER + 1
overlays += o
stepped_on(mob/m)
var/turf/t = locate(x,y+1,z)
if(istype(t,/turf/spikes)) //so instead of a lot of istype() I want to try checking from a list instead. I tried using the in operator but couldn't get that to work, so I'm doing it wrong or it can only be done with objects?
m.take_damage()
You can just make spikes group and place others in that group than locate it via bump.