# turf

Source: https://ref.dm-lang.org/turf/

Turfs cover the surface of the map. They are derived from `/turf` which derives from `/atom`.

This example defines the turf prototype `/turf/floor` and `/turf/wall`.

```dm
turf
  floor
    desc = "A wood plank floor."
  wall
    desc = "A stone wall."
    density = 1
```

Turfs cannot be moved. They can only be created or destroyed by changing `world.maxx`, `world.maxy`, or `world.maxz`. When you create a new turf with `new()`, it always replaces the old one.

```dm
// replace old_turf with a wall
var/turf/wall/T = new(old_turf)
```

### See also
- [atom](https://ref.dm-lang.org/atom/index.md)
- [procs (turf)](https://ref.dm-lang.org/turf/proc.md)
- [vars (turf)](https://ref.dm-lang.org/turf/var/index.md)
- [Map](https://ref.dm-lang.org/map.md)

## Pages

- [procs (turf)](https://ref.dm-lang.org/turf/proc.md)
- [vars (turf)](https://ref.dm-lang.org/turf/var/index.md)
