mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-22 03:27:05 +01:00
Replaces typesof with subtypesof where applicable
This commit is contained in:
@@ -57,7 +57,7 @@ won't update every console in existence) but it's more of a hassle to do. Also,
|
||||
/obj/machinery/computer/rdconsole/proc/CallTechName(var/ID) //A simple helper proc to find the name of a tech with a given ID.
|
||||
var/datum/tech/check_tech
|
||||
var/return_name = null
|
||||
for(var/T in typesof(/datum/tech) - /datum/tech)
|
||||
for(var/T in subtypesof(/datum/tech))
|
||||
check_tech = null
|
||||
check_tech = new T()
|
||||
if(check_tech.id == ID)
|
||||
@@ -91,7 +91,7 @@ won't update every console in existence) but it's more of a hassle to do. Also,
|
||||
if("clown")
|
||||
return_name = "Bananium"
|
||||
else
|
||||
for(var/R in typesof(/datum/reagent) - /datum/reagent)
|
||||
for(var/R in subtypesof(/datum/reagent))
|
||||
temp_reagent = null
|
||||
temp_reagent = new R()
|
||||
if(temp_reagent.id == ID)
|
||||
|
||||
@@ -53,9 +53,9 @@ research holder datum.
|
||||
var/list/known_designs = list() //List of available designs (at base reliability).
|
||||
|
||||
/datum/research/New() //Insert techs into possible_tech here. Known_tech automatically updated.
|
||||
for(var/T in typesof(/datum/tech) - /datum/tech)
|
||||
for(var/T in subtypesof(/datum/tech))
|
||||
possible_tech += new T(src)
|
||||
for(var/D in typesof(/datum/design) - /datum/design)
|
||||
for(var/D in subtypesof(/datum/design))
|
||||
possible_designs += new D(src)
|
||||
RefreshResearch()
|
||||
|
||||
@@ -140,7 +140,7 @@ research holder datum.
|
||||
D.reliability = min(100, D.reliability + rand(1,3))
|
||||
if(I.crit_fail)
|
||||
D.reliability = min(100, D.reliability + rand(3, 5))
|
||||
|
||||
|
||||
/datum/research/proc/FindDesignByID(var/id)
|
||||
for(var/datum/design/D in known_designs)
|
||||
if(D.id == id)
|
||||
@@ -148,9 +148,9 @@ research holder datum.
|
||||
|
||||
//Autolathe files
|
||||
/datum/research/autolathe/New()
|
||||
for(var/T in (typesof(/datum/tech) - /datum/tech))
|
||||
for(var/T in subtypesof(/datum/tech))
|
||||
possible_tech += new T(src)
|
||||
for(var/path in typesof(/datum/design) - /datum/design)
|
||||
for(var/path in subtypesof(/datum/design))
|
||||
var/datum/design/D = new path(src)
|
||||
possible_designs += D
|
||||
if((D.build_type & AUTOLATHE) && ("initial" in D.category)) //autolathe starts without hacked designs
|
||||
@@ -278,7 +278,7 @@ datum/tech/robotics
|
||||
/obj/item/weapon/disk/tech_disk/New()
|
||||
src.pixel_x = rand(-5.0, 5)
|
||||
src.pixel_y = rand(-5.0, 5)
|
||||
|
||||
|
||||
/obj/item/weapon/disk/design_disk
|
||||
name = "Component Design Disk"
|
||||
desc = "A disk for storing device design data for construction in lathes."
|
||||
|
||||
@@ -72,12 +72,12 @@ var/list/valid_secondary_effect_types = list(\
|
||||
..()
|
||||
|
||||
//setup primary effect - these are the main ones (mixed)
|
||||
var/effecttype = pick(typesof(/datum/artifact_effect) - /datum/artifact_effect)
|
||||
var/effecttype = pick(subtypesof(/datum/artifact_effect))
|
||||
my_effect = new effecttype(src)
|
||||
|
||||
//75% chance to have a secondary stealthy (and mostly bad) effect
|
||||
if(prob(75))
|
||||
effecttype = pick(typesof(/datum/artifact_effect) - /datum/artifact_effect)
|
||||
effecttype = pick(subtypesof(/datum/artifact_effect))
|
||||
secondary_effect = new effecttype(src)
|
||||
if(prob(75))
|
||||
secondary_effect.ToggleActivate(0)
|
||||
|
||||
@@ -324,8 +324,7 @@
|
||||
apply_image_decorations = 0
|
||||
apply_material_decorations = 0
|
||||
if(24)
|
||||
var/list/possible_spawns = typesof(/obj/item/weapon/stock_parts)
|
||||
possible_spawns -= /obj/item/weapon/stock_parts
|
||||
var/list/possible_spawns = subtypesof(/obj/item/weapon/stock_parts)
|
||||
possible_spawns -= /obj/item/weapon/stock_parts/subspace
|
||||
|
||||
var/new_type = pick(possible_spawns)
|
||||
|
||||
Reference in New Issue
Block a user