ID:149895
 
I need to check the following to enable my Bumpmode code to work.

1) PC has pick in their contents
2) Pick's pick var is set to pick = 1

If these two are true, and the user bumps into the area which this code is for, then mining will take place.

But it will not work if the PC does not have the pick equipped, or does not have a pick at all.

LJR
atom/proc/Bump(atom/O)
..()
O.Bumped(src)

atom/proc/Bumped(atom/O)
return

turf/rock
name = "Rock"
icon = 'Mountain.dmi'
icon_state = "rock"
density = 1
Bumped(atom/O)
for(var/obj/pick/P in O.contents)
if(P.pick)
del(src)
O << "You mine the mountain!"

Something like that should work...
In response to Foomer
Foomer wrote:
del(src)
O << "You mine the mountain!"</DM>

Slight problem here: You need to put del(src) last or else the message will never be sent.

It might be desirable to change the player's location to where the mountain segment used to be, but then again it might not.

Lummox JR