mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-28 15:47:15 +01:00
Adds subtypesof(). It's shorthand for typesof(path) - path.
Replaces typesof(path) - path with subtypesof(path) in obvious places. I was a bit conservative, there's probably a few more places that could use this.
This commit is contained in:
@@ -20,7 +20,7 @@
|
||||
|
||||
|
||||
//filling the barsigns list
|
||||
for(var/bartype in typesof(/datum/barsign) - /datum/barsign)
|
||||
for(var/bartype in subtypesof(/datum/barsign))
|
||||
var/datum/barsign/signinfo = new bartype
|
||||
if(!signinfo.hidden)
|
||||
barsigns += signinfo
|
||||
|
||||
@@ -131,7 +131,7 @@
|
||||
|
||||
/obj/structure/mirror/magic/New()
|
||||
if(!choosable_races.len)
|
||||
for(var/speciestype in typesof(/datum/species) - /datum/species)
|
||||
for(var/speciestype in subtypesof(/datum/species))
|
||||
var/datum/species/S = new speciestype()
|
||||
if(!(S.id in races_blacklist))
|
||||
choosable_races += S.id
|
||||
@@ -142,7 +142,7 @@
|
||||
..()
|
||||
|
||||
/obj/structure/mirror/magic/badmin/New()
|
||||
for(var/speciestype in typesof(/datum/species) - /datum/species)
|
||||
for(var/speciestype in subtypesof(/datum/species))
|
||||
var/datum/species/S = new speciestype()
|
||||
choosable_races += S.id
|
||||
..()
|
||||
|
||||
Reference in New Issue
Block a user