SpaceManiac / SpacemanDMM

A BYOND language smartness provider, map renderer, and more.
https://marketplace.visualstudio.com/items?itemName=platymuus.dm-langclient
GNU General Public License v3.0
83 stars 83 forks source link

Feature Request: SHOULD_OVERRIDE / VIRTUAL #364

Open FluffyGhoster opened 1 year ago

FluffyGhoster commented 1 year ago

Basically, it would be cool to have a way to flag certain procs / variables so that you indicate that they must be overridden in derivate paths, eg:

/datum/food
    virtual var/taste = null

/datum/food/proc/effect()
    virtual

/datum/food/soup    <-- This should throw an error like "Not implementing proc: 'effect' "
    taste = "Sour"

/datum/food/spicynoodles    <-- This should throw an error like "Not implementing variable: 'taste' "

/datum/food/spicynoodles/effect()
    set_on_fire(usr)
Andrew-Fall commented 1 year ago

Abstract might be better than virtual given other language's use of the words