Nulliparous Type Paths in Tutorials & Snippets
|
|
proc/nulliparous(type) var/tmp/list/types = typesof(type); return (types.len == 1)
proc/nulliparae(type) var/list/types = typesof(type) - type; . = list() for(var/nutype in types) if(nulliparous(nutype)) . += nutype
mob person player nonplayer monster goblin green_goblin red_goblin hobgoblin obj item equipment weapon sword short_sword bow long_bow short_bow crossbow heavy_crossbow light_crossbow shieldbow tool adze axe chisel drill article clothing shirt pants armour body plate_mail chain_mail legs plate_leggings chain_leggings
mob/verb/test_nulliparae(type in typesof(/datum)) usr << "Nulliparae of [type]:" var/list/types = nulliparae(type) for(var/nutype in types) usr << nutype usr << "Total nulliparous / total derived nodes: [length(types)] / \ [length(typesof(type) - type)]" usr << ""
mob/verb/test_nulliparous(type in typesof(/datum)) if(nulliparous(type)) usr << "[type] is nulliparous" else usr << "[type] is not nulliparous"
|
|