OpenDream icon indicating copy to clipboard operation
OpenDream copied to clipboard

Object definition var declaration not considered constant when it should be

Open ike709 opened this issue 3 years ago • 2 comments

Case 1: var/static/list/all_drawables = graffiti + symbols + drawings + oriented + runes + graffiti_large_h

The declared var and all of the vars that comprise it are static lists on /obj/item/toy/crayon.

Add calls TryAsConstant() on LHS & RHS and eventually it gets to GlobalField.TryAsConstant() which is false because they're not considered const.

Case 2: A datum definition declares var/static/list/list_symptoms = subtypesof(/datum/symptom) which the preproc evaluates as var/static/list/list_symptoms = typesof(/datum/symptom) - /datum/symptom

This fails because ProcCall the way we currently handle it is not considered constant.

Both need to be resolved for TG.

ike709 avatar May 16 '22 07:05 ike709

This is what causes the Invalid initial value error right?

Hinaichigo avatar Jun 16 '22 02:06 Hinaichigo

Yes

wixoaGit avatar Jun 16 '22 02:06 wixoaGit

Pretty sure this is fixed.

ike709 avatar Apr 12 '23 02:04 ike709