SpacemanDMM icon indicating copy to clipboard operation
SpacemanDMM copied to clipboard

[Feature Request] Lint again initial(thing.var), where var is a list

Open Mothblocks opened this issue 4 years ago • 0 comments

The following code is never correct:

/datum/species
    var/list/allowed_traits = list(1, 2, 3)

/proc/do_something(datum/species/species_type)
    if (1 in initial(species.allowed_traits))

...because lists are made on init, the initial value is always null.

Mothblocks avatar Sep 14 '21 07:09 Mothblocks