Merge pull request #7104 from VOREStation/pol-aiborgrefac

Refactor some job joining things related to robofriends
This commit is contained in:
Atermonera
2020-05-10 15:29:14 -07:00
committed by GitHub
17 changed files with 147 additions and 103 deletions
+10 -3
View File
@@ -13,6 +13,7 @@ var/list/spawntypes = list()
var/list/restrict_job = null
var/list/disallow_job = null
var/announce_channel = "Common"
var/allowed_mob_types = JOB_SILICON|JOB_CARBON
proc/check_job_spawning(job)
if(restrict_job && !(job in restrict_job))
@@ -22,9 +23,15 @@ var/list/spawntypes = list()
return 0
var/datum/job/J = SSjob.get_job(job)
if(J?.offmap_spawn && !(job in restrict_job))
if(!J) // Couldn't find, admin shenanigans? Allow it
return 1
if(J.offmap_spawn && !(job in restrict_job))
return 0
if(!(J.mob_type & allowed_mob_types))
return 0
return 1
/datum/spawnpoint/proc/get_spawn_position()
@@ -57,7 +64,7 @@ var/list/spawntypes = list()
/datum/spawnpoint/cryo
display_name = "Cryogenic Storage"
msg = "has completed cryogenic revival"
disallow_job = list("Cyborg")
allowed_mob_types = JOB_CARBON
/datum/spawnpoint/cryo/New()
..()
@@ -66,7 +73,7 @@ var/list/spawntypes = list()
/datum/spawnpoint/cyborg
display_name = "Cyborg Storage"
msg = "has been activated from storage"
restrict_job = list("Cyborg")
allowed_mob_types = JOB_SILICON
/datum/spawnpoint/cyborg/New()
..()