mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-07-18 10:33:30 +01:00
Replaces typesof with subtypesof where applicable
This commit is contained in:
@@ -57,7 +57,7 @@ var/global/datum/controller/processScheduler/processScheduler
|
||||
|
||||
var/process
|
||||
// Add all the processes we can find, except for the ticker
|
||||
for (process in typesof(/datum/controller/process) - /datum/controller/process)
|
||||
for (process in subtypesof(/datum/controller/process))
|
||||
if (!(process in deferredSetupList))
|
||||
addProcess(new process(src))
|
||||
|
||||
|
||||
@@ -35,7 +35,7 @@ var/global/datum/controller/holiday/holiday_master //This has to be defined befo
|
||||
var/MM = text2num(time2text(world.timeofday, "MM")) // get the current month
|
||||
var/DD = text2num(time2text(world.timeofday, "DD")) // get the current day
|
||||
|
||||
for(var/H in typesof(/datum/holiday) - /datum/holiday)
|
||||
for(var/H in subtypesof(/datum/holiday))
|
||||
var/datum/holiday/holiday = new H()
|
||||
if(holiday.shouldCelebrate(DD, MM, YY))
|
||||
holiday.celebrate()
|
||||
|
||||
@@ -161,7 +161,7 @@
|
||||
var/list/overflow_whitelist = list() //whitelist for overflow
|
||||
|
||||
/datum/configuration/New()
|
||||
var/list/L = typesof(/datum/game_mode) - /datum/game_mode
|
||||
var/list/L = subtypesof(/datum/game_mode)
|
||||
for (var/T in L)
|
||||
// I wish I didn't have to instance the game modes in order to look up
|
||||
// their information, but it is the only way (at least that I know of).
|
||||
@@ -688,7 +688,7 @@
|
||||
/datum/configuration/proc/pick_mode(mode_name)
|
||||
// I wish I didn't have to instance the game modes in order to look up
|
||||
// their information, but it is the only way (at least that I know of).
|
||||
for (var/T in (typesof(/datum/game_mode) - /datum/game_mode))
|
||||
for (var/T in subtypesof(/datum/game_mode))
|
||||
var/datum/game_mode/M = new T()
|
||||
if (M.config_tag && M.config_tag == mode_name)
|
||||
return M
|
||||
@@ -697,7 +697,7 @@
|
||||
|
||||
/datum/configuration/proc/get_runnable_modes()
|
||||
var/list/datum/game_mode/runnable_modes = new
|
||||
for (var/T in (typesof(/datum/game_mode) - /datum/game_mode))
|
||||
for (var/T in subtypesof(/datum/game_mode))
|
||||
var/datum/game_mode/M = new T()
|
||||
//world << "DEBUG: [T], tag=[M.config_tag], prob=[probabilities[M.config_tag]]"
|
||||
if (!(M.config_tag in modes))
|
||||
|
||||
Reference in New Issue
Block a user