# Craft++ Missing Features Implementation Plan

## Phase 1: Core Language Features
- [x] **Operators**: bitwise (&, |, ^, ~, <<, >>), null coalescing (??), hex/binary literals, power (**)
- [x] **Control Flow**: do-while loops, goto/labels
- [x] **Variable Modifiers**: global, local, tmp, static, const
- [x] **Preprocessor**: #define, #undef, #include, #ifdef, #ifndef, #endif, #else, #elif, #if, #error, #warn, #pragma, function-like macros with stringify/token-paste, __LINE__, __FILE__, __DATE__, __TIME__
- [x] **DM Constants**: UP, DOWN, AREA_LAYER, TURF_LAYER, OBJ_LAYER, MOB_LAYER, FLY_LAYER, EFFECTS_LAYER, ALPHA_OPAQUE, ALPHA_INVISIBLE, ALPHA_TRANSPARENT, MOUSE_INACTIVE, MOUSE_ACTIVE, MOUSE_OPACITY_UNDERLAY, TILE_MOVEMENT, PIXEL_MOVEMENT, MOVEMENT_STEP, MOVEMENT_SLIDE

## Phase 2: Built-in Procs
- [x] **Math**: sin, cos, tan, sqrt, log, exp, floor, ceil, round, gradient()
- [x] **String**: findtext, sorttext, lowertext, uppertext, foldtext(), unfoldtext()
- [x] **List**: list2params, params2list, sort, sortTim(), filter, map, reduce, listclearnulls()
- [x] **File I/O**: fopen, fclose, fread, fwrite, fdel, copyfile(), copydir()
- [x] **System**: alert, prompt, shell, ftp, http
- [x] **Geometry**: get_angle(), angle(), getFlatIcon()
- [x] **Crypto**: md5(), sha1(), sha256(), sha384(), sha512()

## Phase 3: Data Types
- [x] **Matrix type**: /matrix with matrix operations
- [x] **Color type**: /color with RGBA support
- [x] **Savefile type**: /savefile for persistent storage

## Phase 4: Object System
- [x] **Verbs**: proc/verb(name) syntax
- [x] **Click handlers**: Click(), DoubleClick(), Drop(), etc.
- [x] **Movement callbacks**: Enter(), Exit(), Cross(), Bump()
- [x] **Overlay system**: overlay/underlay management
- [x] **Icon states**: state animations (PNG frame extraction + playback in editor)
- [x] **Async movement**: walk_rand() now schedules actual random walking with collision detection

## Phase 5: World & Simulation
- [x] **Z-levels**: multi-plane map system (map editor + Dream Seeker render all planes)
- [x] **Turf transformation**: paint/fill/edit tiles per plane in map editor
- [ ] **Light sources**: dynamic lighting
- [ ] **Atmosphere**: gas/pressure/temperature
- [ ] **Day/night cycle**: time-based lighting
- [ ] **Weather**: rain, snow, etc.

## Phase 6: Client & UI
- [x] **Stat panels**: stat() proc for UI panels
- [x] **Dream Seeker runtime view**: live world rendering from WorldRegistry, verbs, movement
- [x] **Client variables**: client perspective (`client.perspective`/`eye`/`view` drive the camera; `ClientCamera` + `MOB/EYE/EDGE/PIXEL_PERSPECTIVE` constants)
- [x] **Browse/window**: HTML rendering system (`browse()`/`browse_rsc()` deliver to named popup windows via `BrowserService`; `winshow` toggles them; `display=0` preloads hidden)
- [x] **JavaScript integration**: browser JS binding (`byond://?…` links and `window.location` calls route to `Topic(href, href_list)`)
