OpenDreamProject / OpenDream

A project for running games made in the DM programming language
MIT License
200 stars 109 forks source link

Implement `as` syntax for multiple base types (`mob|obj|turf`) #1917

Open MyNameIsRomayne opened 1 month ago

MyNameIsRomayne commented 1 month ago

This is an attempt to support code like

for (var/atom/A as mob|obj|turf|area in view(null, null))

to continue the implementation parity between OD and DM

MyNameIsRomayne commented 1 month ago

This is probably not a great first project (it was supposedly easy at first, but the proper implementation is slightly more complicated) for me, so the code quality is dubious.

Current issues are something along the lines of Error OD0000 at code/mob/living/silicon/ai.dm:1102:11: Negative stack size though this should all work fine once these errors are resolved (?)

MyNameIsRomayne commented 1 month ago

It compiles without errors so I'm undrafting this and re-requesting review