Ghost Spawner: Better Integration for Atoms (#10160)

This commit is contained in:
Werner
2020-10-09 18:24:01 +02:00
committed by GitHub
parent 04bedcc2a3
commit 6003581ca6
41 changed files with 243 additions and 324 deletions
@@ -0,0 +1,10 @@
/datum/ghostspawner/borer
short_name = "borer"
name = "Cortical Borer"
desc = "Infest crew, reproduce, repeat."
tags = list("Antagonist")
loc_type = GS_LOC_ATOM
atom_add_message = "A borer has been birthed!"
spawn_mob = /mob/living/simple_animal/borer
@@ -0,0 +1,11 @@
/datum/ghostspawner/golem
short_name = "golem"
name = "Bluespace Golem"
desc = "Serve your Master."
tags = list("Xenobiology")
respawn_flag = ANIMAL
loc_type = GS_LOC_ATOM
atom_add_message = "A golem rune has been created!"
spawn_mob = /mob/living/carbon/human/golem
@@ -0,0 +1,12 @@
/datum/ghostspawner/mining_drone
short_name = "mining_drone"
name = "Mining Drone"
desc = "Join in as a Mining Drone, assist the miners, get lost on the asteroid and cry synthetic tears."
tags = list("Stationbound")
respawn_flag = MINISYNTH //Flag to check for when trying to spawn someone of that type (CREW, ANIMAL, MINISYNTH)
jobban_job = "Cyborg"
loc_type = GS_LOC_ATOM
atom_add_message = "Someone is attempting to reboot a mining drone!"
spawn_mob = /mob/living/silicon/robot/drone/mining
@@ -0,0 +1,13 @@
/datum/ghostspawner/posibrain
short_name = "posibrain"
name = "Positronic Brain"
desc = "Enter a synthetic brain, capable of piloting a spiderbrain, operating an android, becoming an AI, or being a pocketbuddy."
show_on_job_select = FALSE
tags = list("Stationbound")
respawn_flag = MINISYNTH //Flag to check for when trying to spawn someone of that type (CREW, ANIMAL, MINISYNTH)
jobban_job = "Cyborg"
loc_type = GS_LOC_ATOM
atom_add_message = "A posibrain has started its boot process!"
spawn_mob = /mob/living/carbon/brain
@@ -0,0 +1,10 @@
/datum/ghostspawner/skeleton
short_name = "skeleton"
name = "Risen Skeleton"
desc = "Serve your Master. Fight things."
tags = list("Antagonist")
loc_type = GS_LOC_ATOM
atom_add_message = "A skeleton has been created!"
spawn_mob = /mob/living/carbon/human/skeleton
@@ -0,0 +1,12 @@
/datum/ghostspawner/syndiborg
short_name = "syndiborg"
name = "Syndicate Cyborg"
desc = "Join in as a Syndicate Cyborg, assist your summoner in their goals, try and make the round fun for the people you're overequipped to deal with."
tags = list("Antagonist")
respawn_flag = MINISYNTH //Flag to check for when trying to spawn someone of that type (CREW, ANIMAL, MINISYNTH)
jobban_job = "Cyborg"
loc_type = GS_LOC_ATOM
atom_add_message = "A syndicate cyborg has started its boot process!"
spawn_mob = /mob/living/silicon/robot/syndicate
@@ -0,0 +1,16 @@
/datum/ghostspawner/wizard_familiar
short_name = "wizard_familiar"
name = "Wizard Familiar"
desc = "Be a Familiar, act cute, probably end up killing many people somehow."
tags = list("Antagonist")
loc_type = GS_LOC_ATOM
atom_add_message = "A wizard familiar has been summoned"
spawn_mob = /mob/living/simple_animal
/datum/ghostspawner/wizard_familiar/post_spawn(mob/user)
var/mob/living/simple_animal/A = user
if(A.wizard_master)
A.add_spell(new /spell/contract/return_master(A.wizard_master), "const_spell_ready")
to_chat(src, "<B>You are [src], a familiar to [A.wizard_master]. He is your master and your friend. Aid him in his wizarding duties to the best of your ability.</B>")
@@ -0,0 +1,10 @@
/datum/ghostspawner/apprentice
short_name = "apprentice"
name = "Wizard Apprentice"
desc = "Serve your Master. Cast Spells."
tags = list("Antagonist")
loc_type = GS_LOC_ATOM
atom_add_message = "A wizard apprentice pebble has been created!"
spawn_mob = /mob/living/carbon/human
+56 -35
View File
@@ -2,14 +2,19 @@
var/short_name = null
var/name = null
var/desc = null
var/show_on_job_select = TRUE // Determines if the ghost spawner role is considered unique or not.
var/show_on_job_select = TRUE // Determines if the ghost spawner role is considered unique or not.
var/welcome_message = null
var/list/tags = list() //Tags associated with that spawner
//Vars regarding the spawnpoints and conditions of the spawner
var/list/spawnpoints = null //List of the applicable spawnpoints (by name)
var/list/spawn_atoms = list() // List of atoms you can spawn at
var/landmark_name = null //Alternatively you can specify a landmark name
var/list/spawn_atoms = list() // List of atoms you can spawn at - Use loc_type: GS_LOC_ATOM
var/atom_add_message = null // Message to display to the ghosts if a spawn atom has been added. The "spawn instructions" are appended automatically
var/list/spawnpoints = null //List of the applicable spawnpoints (by name) - Use loc_type: GS_LOC_POS
var/landmark_name = null //Alternatively you can specify a landmark name - Use loc_type: GS_LOC_POS
var/loc_type = GS_LOC_POS
var/max_count = 0 //How often can this spawner be used
var/count = 0 //How ofen has this spawner been used
var/req_perms = null //What permission flags are required to use this spawner
@@ -46,15 +51,18 @@
else
return "Missing Permissions"
if(!enabled && !can_edit(user)) //If its not enabled and the user cant edit it, dont show it
return "Currently Disabled"
if(loc_type == GS_LOC_ATOM && !length(spawn_atoms))
return "No spawn atoms available"
if(req_head_whitelist && !check_whitelist(user))
return "Missing Head of Staff Whitelist"
if(jobban_job && jobban_isbanned(user,jobban_job))
return "Job Banned"
if(!enabled && !can_edit(user)) //If its not enabled and the user cant edit it, dont show it
return "Currently Disabled"
if(req_species_whitelist)
if(!is_alien_whitelisted(user, req_species_whitelist))
return "Missing Species Whitelist"
@@ -81,9 +89,13 @@
if(max_count && count > max_count)
return "No more slots are available."
//Check if a spawnpoint is available
var/T = select_spawnpoint(FALSE)
if(!T)
return "No spawnpoint available."
if(loc_type == GS_LOC_POS)
var/T = select_spawnlocation(FALSE)
if(!T)
return "No spawnpoint available."
else
if(!length(spawn_atoms))
return "No mobs are available to spawn."
return FALSE
//Proc executed before someone is spawned in
@@ -93,13 +105,11 @@
enabled = FALSE
return TRUE
//This proc selects the spawnpoint to use.
/datum/ghostspawner/proc/select_spawnpoint(var/use=TRUE)
if(length(spawn_atoms))
var/chosen_spawn_atom = pick(spawn_atoms)
var/turf/T = get_turf(chosen_spawn_atom)
if(T)
return T
//This proc selects the spawnpoint to use. - Only used when mode is GS_LOC_POS
/datum/ghostspawner/proc/select_spawnlocation(var/use=TRUE)
if(loc_type != GS_LOC_POS)
log_debug("Ghostspawner: select_spawnlocation is not valid for spawner [short_name] as it is not position based")
return null
if(!isnull(spawnpoints))
for(var/spawnpoint in spawnpoints) //Loop through the applicable spawnpoints
var/turf/T = SSghostroles.get_spawnpoint(spawnpoint, use) //Gets the first matching spawnpoint or null if none are available
@@ -116,10 +126,33 @@
return null //If we dont have anything return null
//Selects a spawnatom from the list of available atoms and removes it if use is set to true (default)
/datum/ghostspawner/proc/select_spawnatom(var/use=TRUE)
if(loc_type != GS_LOC_ATOM)
log_debug("Ghostspawner: select_spawnatom is not valid for spawner [short_name] as it is not atom based")
return null
var/atom/A = pick(spawn_atoms)
if(use)
spawn_atoms -= A
return A
//The proc to actually spawn in the user
/datum/ghostspawner/proc/spawn_mob(mob/user)
//OVERWRITE THIS IN THE CHILD IMPLEMENTATIONS to return the spawned in mob !!!
return null
//This is a basic proc for atom based spawners.
// Location based spawners usually need a bit more logic
// Atom based spanwers select a atom using the select_spawnatom() proc and then assigned a player to it
// by calling assign_player() with the current mob of the player that should be assigned as a argument.
if(loc_type != GS_LOC_ATOM)
return null
var/atom/A = select_spawnatom()
if(A)
return A.assign_player(user)
to_chat(user, SPAN_DANGER("There are no spawn atoms available to spawn at!"))
return FALSE
//Proc executed after someone is spawned in
/datum/ghostspawner/proc/post_spawn(mob/user)
@@ -136,6 +169,8 @@
return FALSE
/datum/ghostspawner/proc/is_enabled()
if(loc_type == GS_LOC_ATOM)
return enabled && !!length(spawn_atoms)
if(max_count)
return enabled && count < max_count
return enabled
@@ -157,21 +192,7 @@
//Proc to disable the ghostspawner
/datum/ghostspawner/proc/disable()
enabled = FALSE
for(var/i in SSghostroles.spawnpoints)
SSghostroles.update_spawnpoint_status_by_identifier(i)
if(loc_type == GS_LOC_POS)
for(var/i in SSghostroles.spawnpoints)
SSghostroles.update_spawnpoint_status_by_identifier(i)
return TRUE
/datum/ghostspawner/simplemob/spawn_mob(mob/user)
//Select a spawnpoint (if available)
var/turf/T = select_spawnpoint()
var/mob/living/simple_animal/S
if (T)
S = new spawn_mob(T)
else
to_chat(user, "<span class='warning'>Unable to find any spawn point. </span>")
if(S)
announce_ghost_joinleave(user, 0, "They are now a [name].")
S.ckey = user.ckey
return S
@@ -1,24 +0,0 @@
/datum/ghostspawner/human/skeleton
short_name = "skeleton"
name = "Risen Skeleton"
desc = "Serve your Master. Fight things."
tags = list("Antagonist")
enabled = FALSE
spawn_mob = /mob/living/carbon/human/skeleton
/datum/ghostspawner/human/skeleton/select_spawnpoint(var/use)
return TRUE //We just fake it here, since the spawnpoint is selected if someone is spawned in.
//The proc to actually spawn in the user
/datum/ghostspawner/human/skeleton/spawn_mob(mob/user)
if(!length(spawn_atoms))
to_chat(user, SPAN_DANGER("There are no available skeletons to spawn at!"))
return FALSE
var/mob/living/carbon/human/skeleton/skeleton = pick(spawn_atoms)
if(user && skeleton)
return skeleton.spawn_skeleton(user)
return FALSE
@@ -1,24 +0,0 @@
/datum/ghostspawner/human/apprentice
short_name = "apprentice"
name = "Wizard Apprentice"
desc = "Serve your Master. Cast Spells."
tags = list("Antagonist")
enabled = FALSE
spawn_mob = /mob/living/carbon/human
/datum/ghostspawner/human/apprentice/select_spawnpoint(var/use)
return TRUE //We just fake it here, since the spawnpoint is selected if someone is spawned in.
//The proc to actually spawn in the user
/datum/ghostspawner/human/apprentice/spawn_mob(mob/user)
if(!length(spawn_atoms))
to_chat(user, SPAN_DANGER("There are no available apprentice pebbles to spawn at!"))
return FALSE
var/obj/item/apprentice_pebble/pebble = pick(spawn_atoms)
if(user && pebble)
return pebble.spawn_apprentice(user)
return FALSE
@@ -52,7 +52,7 @@
outfit = /datum/outfit/admin/pod/smuggler
possible_species = list(SPECIES_HUMAN,SPECIES_SKRELL,SPECIES_UNATHI)
/datum/ghostspawner/human/rescuepodsurv/select_spawnpoint(var/use=TRUE)
/datum/ghostspawner/human/rescuepodsurv/select_spawnlocation(var/use=TRUE)
//Randomly select a Turf on the asteroid.
var/turf/T = pick_area_turf(/area/mine/unexplored)
if(!use) //If we are just checking if we can get one, return the turf we found
@@ -1,25 +0,0 @@
/datum/ghostspawner/human/golem
short_name = "golem"
name = "Bluespace Golem"
desc = "Serve your Master."
tags = list("Xenobiology")
respawn_flag = ANIMAL
enabled = FALSE
spawn_mob = /mob/living/carbon/human/golem
/datum/ghostspawner/human/golem/select_spawnpoint(var/use)
return TRUE //We just fake it here, since the spawnpoint is selected if someone is spawned in.
//The proc to actually spawn in the user
/datum/ghostspawner/human/golem/spawn_mob(mob/user)
if(!length(spawn_atoms))
to_chat(user, SPAN_DANGER("There are no available golem runes to spawn at!"))
return FALSE
var/obj/effect/golemrune/rune = pick(spawn_atoms)
if(user && rune)
return rune.spawn_golem(user)
return FALSE
+13 -8
View File
@@ -28,7 +28,7 @@
/datum/ghostspawner/human/pre_spawn(mob/user)
. = ..()
/datum/ghostspawner/human/proc/get_mob_name(mob/user, var/species)
/datum/ghostspawner/human/proc/get_mob_name(mob/user, var/species, var/gender)
var/mname = mob_name
if(isnull(mname))
var/pick_message = "[mob_name_pick_message] ([species])"
@@ -37,9 +37,12 @@
if(mob_name_suffix)
pick_message = "[pick_message] Auto Suffix: \"[mob_name_suffix]\" "
mname = sanitizeSafe(input(user, pick_message, "Name for a [species] (without prefix/suffix)"))
if(!mname)
mname = pick(last_names)
if(!length(mname))
if(mob_name_prefix || mob_name_suffix)
mname = capitalize(pick(last_names))
else
mname = random_name(gender,species)
if(mob_name_prefix)
mname = replacetext(mname,mob_name_prefix,"") //Remove the prefix if it exists in the string
@@ -52,7 +55,7 @@
//The proc to actually spawn in the user
/datum/ghostspawner/human/spawn_mob(mob/user)
//Select a spawnpoint (if available)
var/turf/T = select_spawnpoint()
var/turf/T = select_spawnlocation()
if(!T)
log_debug("GhostSpawner: Unable to select spawnpoint for [short_name]")
return FALSE
@@ -69,15 +72,17 @@
if(!picked_species)
picked_species = possible_species[1]
var/datum/species/S = all_species[picked_species]
var/assigned_gender = pick(S.default_genders)
//Get the name / age from them first
var/mname = get_mob_name(user, picked_species)
var/mname = get_mob_name(user, picked_species, assigned_gender)
var/age = input(user, "Enter your characters age:","Num") as num
//Spawn in the mob
var/mob/living/carbon/human/M = new spawn_mob(newplayer_start)
var/datum/species/S = all_species[picked_species]
M.change_gender(pick(S.default_genders))
M.change_gender(assigned_gender)
M.set_species(picked_species)
@@ -22,5 +22,5 @@
enable_chance = 10
/datum/ghostspawner/human/visitor/select_spawnpoint(var/use = TRUE)
/datum/ghostspawner/human/visitor/select_spawnlocation(var/use = TRUE)
return pick(latejoin)
@@ -1,26 +0,0 @@
/datum/ghostspawner/mining_drone
short_name = "mining_drone"
name = "Mining Drone"
desc = "Join in as a Mining Drone, assist the miners, get lost on the asteroid and cry synthetic tears."
tags = list("Stationbound")
respawn_flag = MINISYNTH //Flag to check for when trying to spawn someone of that type (CREW, ANIMAL, MINISYNTH)
jobban_job = "Cyborg"
enabled = FALSE
spawn_mob = /mob/living/silicon/robot/drone/mining
/datum/ghostspawner/mining_drone/select_spawnpoint(var/use)
return TRUE //We just fake it here, since the spawnpoint is selected if someone is spawned in.
//The proc to actually spawn in the user
/datum/ghostspawner/mining_drone/spawn_mob(mob/user)
if(!length(spawn_atoms))
to_chat(user, SPAN_DANGER("There are no available mining drones to spawn at!"))
return FALSE
var/mob/living/silicon/robot/drone/mining/spawn_mining_drone = pick(spawn_atoms)
if(user && spawn_mining_drone)
return spawn_mining_drone.spawn_into_mining_drone(user)
return FALSE
@@ -1,27 +0,0 @@
/datum/ghostspawner/posibrain
short_name = "posibrain"
name = "Positronic Brain"
desc = "Enter a synthetic brain, capable of piloting a spiderbrain, operating an android, becoming an AI, or being a pocketbuddy."
show_on_job_select = FALSE
tags = list("Stationbound")
respawn_flag = MINISYNTH //Flag to check for when trying to spawn someone of that type (CREW, ANIMAL, MINISYNTH)
jobban_job = "Cyborg"
enabled = FALSE
spawn_mob = /mob/living/carbon/brain
/datum/ghostspawner/posibrain/select_spawnpoint(var/use)
return TRUE //We just fake it here, since the spawnpoint is selected if someone is spawned in.
//The proc to actually spawn in the user
/datum/ghostspawner/posibrain/spawn_mob(mob/user)
if(!length(spawn_atoms))
to_chat(user, SPAN_DANGER("There are no available posibrains to spawn at!"))
return FALSE
var/obj/item/device/mmi/digital/posibrain/spawn_posibrain = pick(spawn_atoms)
if(user && spawn_posibrain)
return spawn_posibrain.spawn_into_posibrain(user)
return FALSE
@@ -1,26 +0,0 @@
/datum/ghostspawner/syndiborg
short_name = "syndiborg"
name = "Syndicate Cyborg"
desc = "Join in as a Syndicate Cyborg, assist your summoner in their goals, try and make the round fun for the people you're overequipped to deal with."
tags = list("Antagonist")
respawn_flag = MINISYNTH //Flag to check for when trying to spawn someone of that type (CREW, ANIMAL, MINISYNTH)
jobban_job = "Cyborg"
enabled = FALSE
spawn_mob = /mob/living/silicon/robot/syndicate
/datum/ghostspawner/syndiborg/select_spawnpoint(var/use)
return TRUE //We just fake it here, since the spawnpoint is selected if someone is spawned in.
//The proc to actually spawn in the user
/datum/ghostspawner/syndiborg/spawn_mob(mob/user)
if(!length(spawn_atoms))
to_chat(user, SPAN_DANGER("There are no available syndiborgs to spawn at!"))
return FALSE
var/mob/living/silicon/robot/syndicate/spawn_syndiborg = pick(spawn_atoms)
if(user && spawn_syndiborg)
return spawn_syndiborg.spawn_into_syndiborg(user)
return FALSE
@@ -1,24 +0,0 @@
/datum/ghostspawner/simplemob/borer
short_name = "borer"
name = "Cortical Borer"
desc = "Infest crew, reproduce, repeat."
tags = list("Antagonist")
enabled = FALSE
spawn_mob = /mob/living/simple_animal/borer
/datum/ghostspawner/simplemob/borer/select_spawnpoint(var/use)
return TRUE //We just fake it here, since the spawnpoint is selected if someone is spawned in.
//The proc to actually spawn in the user
/datum/ghostspawner/simplemob/borer/spawn_mob(mob/user)
if(!length(spawn_atoms))
to_chat(user, SPAN_DANGER("There are no available borers to spawn at!"))
return FALSE
var/mob/living/simple_animal/borer/spawn_borer = pick(spawn_atoms)
if(user && spawn_borer)
return spawn_borer.spawn_into_borer(user)
return FALSE
@@ -7,6 +7,7 @@
respawn_flag = MINISYNTH //Flag to check for when trying to spawn someone of that type (CREW, ANIMAL, MINISYNTH)
jobban_job = "Cyborg"
loc_type = GS_LOC_ATOM
//Vars regarding the mob to use
spawn_mob = /mob/living/simple_animal/rat //The mob that should be spawned
@@ -16,9 +17,6 @@
return "Spawning as drone is disabled"
return ..()
/datum/ghostspawner/simplemob/maintdrone/select_spawnpoint(var/use)
return TRUE //We just fake it here, since the spawnpoint is selected if someone is spawned in.
//The proc to actually spawn in the user
/datum/ghostspawner/simplemob/maintdrone/spawn_mob(mob/user)
var/obj/machinery/drone_fabricator/fabricator
@@ -39,4 +37,4 @@
if(user && fabricator && !((fabricator.stat & NOPOWER) || !fabricator.produce_drones || fabricator.drone_progress < 100))
return fabricator.create_drone(user.client)
return FALSE
return FALSE
@@ -10,10 +10,9 @@
//Vars regarding the mob to use
spawn_mob = /mob/living/simple_animal/rat //The mob that should be spawned
//This proc selects the spawnpoint to use.
/datum/ghostspawner/simplemob/rat/select_spawnpoint()
/datum/ghostspawner/simplemob/rat/select_spawnlocation()
//find a viable mouse candidate
var/obj/machinery/atmospherics/unary/vent_pump/spawnpoint = find_mouse_spawnpoint(pick(current_map.station_levels))
return get_turf(spawnpoint)
@@ -26,7 +25,7 @@
//The proc to actually spawn in the user
/datum/ghostspawner/simplemob/rat/spawn_mob(mob/user)
//Select a spawnpoint (if available)
var/turf/T = select_spawnpoint()
var/turf/T = select_spawnlocation()
var/mob/living/simple_animal/S
if (T)
S = new spawn_mob(T)
@@ -39,4 +38,4 @@
announce_ghost_joinleave(user, 0, "They are now a [name].")
S.ckey = user.ckey
return S
return S
@@ -0,0 +1,24 @@
/datum/ghostspawner/simplemob/spawn_mob(mob/user)
//Select a spawnpoint (if available)
if(loc_type == GS_LOC_POS)
var/turf/T = select_spawnlocation()
var/mob/living/simple_animal/S
if (T)
S = new spawn_mob(T)
else
to_chat(user, "<span class='warning'>Unable to find any spawn point. </span>")
return
if(S)
announce_ghost_joinleave(user, 0, "They are now a [name].")
S.ckey = user.ckey
return S
else
var/mob/living/simple_animal/S = select_spawnatom()
if(!S)
to_chat(user, "<span class='warning'>Unable to find any spawn mob. </span>")
return
announce_ghost_joinleave(user, 0, "They are now a [name].")
return S.assign_player(user)
@@ -1,23 +0,0 @@
/datum/ghostspawner/simplemob/wizard_familiar
short_name = "wizard_familiar"
name = "Wizard Familiar"
desc = "Be a Familiar, act cute, probably end up killing many people somehow."
tags = list("Antagonist")
enabled = FALSE
spawn_mob = /mob/living/simple_animal
/datum/ghostspawner/simplemob/wizard_familiar/select_spawnpoint(var/use)
return TRUE //We just fake it here, since the spawnpoint is selected if someone is spawned in.
//The proc to actually spawn in the user
/datum/ghostspawner/simplemob/wizard_familiar/spawn_mob(mob/user)
if(!length(spawn_atoms))
to_chat(user, SPAN_DANGER("There are no available wizard familiars to spawn at!"))
return FALSE
var/mob/living/simple_animal/spawn_wizard_familiar = pick(spawn_atoms)
if(user && spawn_wizard_familiar)
return spawn_wizard_familiar.spawn_into_wizard_familiar(user)
return FALSE
+4 -5
View File
@@ -64,18 +64,17 @@
return
seeking_player = TRUE
SSghostroles.add_spawn_atom("mining_drone", src)
var/area/A = get_area(src)
if(A)
say_dead_direct("Someone is attempting to reboot a mining drone in [A.name]! Spawn in as it by using the ghost spawner menu in the ghost tab.")
/mob/living/silicon/robot/drone/mining/proc/spawn_into_mining_drone(var/mob/user)
/mob/living/silicon/robot/drone/mining/assign_player(var/mob/user)
if(src.ckey)
SSghostroles.remove_spawn_atom("mining_drone", src)
return
src.ckey = user.ckey
SSghostroles.remove_spawn_atom("mining_drone", src)
seeking_player = FALSE
welcome_drone()
return src
/mob/living/silicon/robot/drone/mining/welcome_drone()
to_chat(src, SPAN_DANGER("<b>You are a mining drone, a tiny-brained robotic industrial machine.</b>"))
to_chat(src, SPAN_DANGER("You have little individual will, some personality, and no drives or urges other than your laws and the art of mining."))
@@ -316,9 +316,7 @@ INITIALIZE_IMMEDIATE(/mob/abstract/new_player)
var/datum/ghostspawner/G = SSghostroles.spawners[ghost_role]
if(!G.show_on_job_select)
continue
if(!G.enabled)
continue
if(!isnull(G.req_perms))
if(G.cant_see(src))
continue
unique_role_available = TRUE
break
@@ -19,37 +19,33 @@
if(brainmob.ckey)
to_chat(user, SPAN_WARNING("\The [src] already has an active occupant!"))
return
var/area/A = get_area(src)
if(brainmob && !brainmob.key)
if(!searching)
to_chat(user, SPAN_NOTICE("You carefully locate the manual activation switch and start \the [src]'s boot process."))
icon_state = "posibrain-searching"
searching = TRUE
SSghostroles.add_spawn_atom("posibrain", src)
if(A)
say_dead_direct("A posibrain has started its boot process in [A.name]! Spawn in as it by using the ghost spawner menu in the ghost tab.")
else
to_chat(user, SPAN_NOTICE("You carefully locate the manual activation switch and disable \the [src]'s boot process."))
icon_state = initial(icon_state)
searching = FALSE
SSghostroles.remove_spawn_atom("posibrain", src)
if(A)
say_dead_direct("A posibrain is no longer booting up in [A.name]. Seems someone disabled it.")
/obj/item/device/mmi/digital/posibrain/proc/spawn_into_posibrain(var/mob/user)
/obj/item/device/mmi/digital/posibrain/assign_player(var/mob/user)
if(brainmob.ckey)
return
brainmob.ckey = user.ckey
name = "positronic brain ([brainmob.name])"
icon_state = "posibrain-occupied"
searching = FALSE
SSghostroles.remove_spawn_atom("posibrain", src)
to_chat(brainmob, "<b>You are a positronic brain, brought into existence on [station_name()].</b>")
to_chat(brainmob, "<b>As a synthetic intelligence, you answer to all crewmembers, as well as the AI.</b>")
to_chat(brainmob, "<b>Remember, the purpose of your existence is to serve the crew and the station. Above all else, do no harm.</b>")
visible_message(SPAN_NOTICE("\The [src] chimes quietly."))
return src
/obj/item/device/mmi/digital/posibrain/examine(mob/user)
if(!..(user))
return
@@ -4,11 +4,11 @@
/mob/living/carbon/human/skeleton
var/master
/mob/living/carbon/human/skeleton/proc/spawn_skeleton(var/mob/user)
/mob/living/carbon/human/skeleton/assign_player(var/mob/user)
src.ckey = user.ckey
if(master)
to_chat(src, "<B>You are a skeleton minion to [master], they are your master. Obey and protect your master at all costs, you have no free will.</B>")
SSghostroles.remove_spawn_atom("skeleton", src)
return src
/datum/species/skeleton //SPOOKY
name = SPECIES_SKELETON
@@ -286,4 +286,4 @@
remains_type = /obj/effect/decal/remains/xeno
default_h_style = "Skrell Short Tentacles"
default_h_style = "Skrell Short Tentacles"
@@ -230,7 +230,6 @@
/obj/effect/golemrune/Initialize()
. = ..()
START_PROCESSING(SSprocessing, src)
announce_to_ghosts()
SSghostroles.add_spawn_atom("golem", src)
/obj/effect/golemrune/random_type/Initialize()
@@ -255,7 +254,7 @@
else
icon_state = "golem"
/obj/effect/golemrune/proc/spawn_golem(var/mob/user)
/obj/effect/golemrune/assign_player(var/mob/user)
var/obj/item/stack/material/O = (locate(/obj/item/stack/material) in src.loc)
if(O?.amount >= 10)
if(O.material.golem)
@@ -271,12 +270,10 @@
G.name = G.species.get_random_name()
G.real_name = G.name
to_chat(G, SPAN_NOTICE("You are a golem. Serve your master, and assist them in completing their goals at any cost."))
qdel(src)
/obj/effect/golemrune/proc/announce_to_ghosts()
var/area/A = get_area(src)
if(A)
say_dead_direct("A golem rune has been created in [A.name]! Access using the ghost spawner menu in the ghost tab.")
return G
/obj/effect/golemrune/wizard
wizardy = TRUE
@@ -42,17 +42,17 @@
explosion(get_turf(src), 1, 2, 3, 5)
qdel(src)
/mob/living/silicon/robot/syndicate/proc/spawn_into_syndiborg(var/mob/user)
/mob/living/silicon/robot/syndicate/assign_player(var/mob/user)
if(src.ckey)
return
src.ckey = user.ckey
SSghostroles.remove_spawn_atom("syndiborg", src)
if(assigned_antagonist)
assigned_antagonist.add_antagonist_mind(src.mind, TRUE)
if(assigned_antagonist.get_antag_radio())
module.channels[assigned_antagonist.get_antag_radio()] = TRUE
radio.recalculateChannels()
say("Boot sequence complete!")
return src
//syndicate borg gear
@@ -125,4 +125,4 @@
if(R.cell)
R.cell.use(350)
return TRUE
return FALSE
return FALSE
@@ -55,9 +55,6 @@
truename = "[pick("Primary","Secondary","Tertiary","Quaternary")]-[rand(1000,9999)]"
if(request_player && !ckey && !client)
SSghostroles.add_spawn_atom("borer", src)
var/area/A = get_area(src)
if(A)
say_dead_direct("A borer has been birthed in [A.name]! Spawn in as it by using the ghost spawner menu in the ghost tab.")
/mob/living/simple_animal/borer/death(gibbed, deathmessage)
SSghostroles.remove_spawn_atom("borer", src)
@@ -161,10 +158,9 @@
host = null
return
/mob/living/simple_animal/borer/proc/spawn_into_borer(var/mob/user)
/mob/living/simple_animal/borer/assign_player(var/mob/user)
ckey = user.ckey
qdel(user)
SSghostroles.remove_spawn_atom("borer", src)
return src
/mob/living/simple_animal/borer/cannot_use_vents()
return
@@ -757,15 +757,6 @@ mob/living/simple_animal/bullet_act(var/obj/item/projectile/Proj)
B.transform = M.Scale(scale)
B.update_icon()
/mob/living/simple_animal/proc/spawn_into_wizard_familiar(var/mob/user)
if(src.ckey)
return
src.ckey = user.ckey
SSghostroles.remove_spawn_atom("wizard_familiar", src)
if(wizard_master)
add_spell(new /spell/contract/return_master(wizard_master), "const_spell_ready")
to_chat(src, "<B>You are [src], a familiar to [wizard_master]. He is your master and your friend. Aid him in his wizarding duties to the best of your ability.</B>")
/mob/living/simple_animal/get_resist_power()
return resist_mod
+4
View File
@@ -1181,3 +1181,7 @@ proc/is_blind(A)
for(var/mob/M in contents)
M.flash_eyes(intensity, override_blindness_check, affect_silicon, visual, type)
M.flash_eyes(intensity, override_blindness_check, affect_silicon, visual, type)
/mob/assign_player(var/mob/user)
ckey = user.ckey
return src
@@ -11,17 +11,14 @@
. = ..()
contract = new /obj/item/contract/apprentice(src)
SSghostroles.add_spawn_atom("apprentice", src)
var/area/A = get_area(src)
if(A)
say_dead_direct("A wizard apprentice pebble has been created in [A.name]! Spawn at it by using the ghost spawner menu in the ghost tab.")
/obj/item/apprentice_pebble/Destroy()
if(contract)
QDEL_NULL(contract)
SSghostroles.remove_spawn_atom("apprentice", src)
return ..()
/obj/item/apprentice_pebble/proc/spawn_apprentice(var/mob/user)
/obj/item/apprentice_pebble/assign_player(var/mob/user)
var/mob/living/carbon/human/G = new /mob/living/carbon/human(get_turf(src))
G.ckey = user.ckey
G.real_name = "[pick(wizard_first)] [pick(wizard_second)]"
@@ -39,9 +36,11 @@
qdel(src)
return G
/obj/item/apprentice_pebble/pickup(mob/living/user)
..()
if(!user.is_wizard())
to_chat(user, SPAN_WARNING("As you pick up \the [src], you feel a wave of power wash over you."))
for(var/obj/machinery/light/P in view(7, user))
P.flicker(1)
P.flicker(1)
@@ -75,9 +75,6 @@
F.faction = usr.faction
temp = "You have attempted summoning \the [F]"
SSghostroles.add_spawn_atom("wizard_familiar", F)
var/area/A = get_area(src)
if(A)
say_dead_direct("A wizard familiar has been summoned in [A.name]! Spawn in as it by using the ghost spawner menu in the ghost tab.")
uses--
if(Adjacent(usr))
@@ -36,9 +36,6 @@
var/mob/living/carbon/human/skeleton/F = new /mob/living/carbon/human/skeleton(get_turf(target))
SSghostroles.add_spawn_atom("skeleton", F)
var/area/A = get_area(F)
if(A)
say_dead_direct("A skeleton has been created in [A.name]! Spawn in as it by using the ghost spawner menu in the ghost tab.")
target.visible_message("<span class='cult'>\The [target] explodes in a shower of gore, a skeleton emerges from the remains!</span>")
target.gib()