ID:260639
 
I had a mildly lucid thought in Chatters this afternoon -- some way for a developer to generate a compile-time warning intentionally.

The primary purpose of this would be to generate a //todo comment with the convenience of high visibility and double-click line jumping. Something like this was what passed through my mind:

mob/verb/attack()
var/mob/m = locate() in get_step(usr,usr.dir)
if(m && istype(m))
WARN("finish attack formula")
var/dmg = rand(1,100)
m.health = max(0,(m.health-dmg))
if(!m.health) m.die()
Sounds like a programmatic equivalent to [link].
In response to Stephen001
Stephen001 wrote:
Sounds like a programmatic equivalent to [link].

Seems so -- I don't recall reading that post, so perhaps I stole the idea subconsciously.
In response to Mobius Evalon
I doubt it, it's a generally logical suggestion. Your warn() suggestion presents a better facility for run-time logging, more than compile-time warning I think.