ID:2878860
 
Applies to:
Status: Open

Issue hasn't been assigned a status value.
/datum/basic
var/category = "Undefined"
category::subtype = "subtype category"

/datum/basic/some_subtype
// category = "subtype category"
// It's already defined by parent

/datum/basic/another_subtype
// category = "subtype category"
// It's already defined by parent as well

/proc/main()
world.log << /datum/basic::category // this will tell "Undefined"
world.log << /datum/basic/another_subtype::category // this will tell "subtype category"


category::subtype is a suggesting format.
with a variable name with "::subtype", you'll be able to define all subtype variable except for its parent.

It will be handy.
I don't really follow what you're asking for here. Can you go into more detail?
Looks like they want to set the "inherited value" of a variable as a separate value from the current type's defined value for it.
Yes, Kaiochao is right. Sometimes you need to let only a parent of types have a specific value while inherited types shouldn't have what its parent has. It will become hard works when you have extreme amount of inherited types.

Doing it is similar to:
/datum/basic
var/category = "Undefined"

/datum/basic/New()
if(src != /datum/basic)
category = "Not /datum/basic"

This way would work the same in reference types, but you can not get the wanted value as initial() proc.


[a_variable::subtype = "value"] seems a bad proposed format, but I can not think any better format.