ac8dddb00f
This PR adds a lot of changes so I'll list them one by one, this is a continuation of my original NPS PR, however with criticism taken on: #24161 Centcom Nanotrasen Security. The centcom docks now have two NT private security officers, though they don't seem very lifelike (AKA: Cardboard cutout). New NT Private Sec cardboard cutout, can be acquired in game as you do with every other cardboard cutout. New passive, retaliate, NT Private Security NPCs. These NPCs are akin to their aggressive versions, however these officers will only attack someone who attacks them first. If attacked they will call for backup and engage the perpetrator with extreme prejudice. They are also apart of the 'nanotrasanprivate' faction, meaning they will not attack each other, their aggressive counterparts or player controlled Human Private Sec. Currently none spawn on any map. New cyropod Private Security Officer pods. These function akin to lavaland roles in that you click the sleeper and you become that role. The Cyro PSO is currently admin only, but spawns as apart of the same faction as the NPCs. They have all access to centcom
472 lines
14 KiB
Plaintext
472 lines
14 KiB
Plaintext
//If someone can do this in a neater way, be my guest-Kor
|
|
|
|
//To do: Allow corpses to appear mangled, bloody, etc. Allow customizing the bodies appearance (they're all bald and white right now).
|
|
|
|
/obj/effect/mob_spawn
|
|
name = "Unknown"
|
|
var/mob_type = null
|
|
var/mob_name = ""
|
|
var/mob_gender = null
|
|
var/death = TRUE //Kill the mob
|
|
var/roundstart = TRUE //fires on initialize
|
|
var/instant = FALSE //fires on New
|
|
var/flavour_text = "The mapper forgot to set this!"
|
|
var/faction = null
|
|
var/permanent = FALSE //If true, the spawner will not disappear upon running out of uses.
|
|
var/random = FALSE //Don't set a name or gender, just go random
|
|
var/objectives = null
|
|
var/uses = 1 //how many times can we spawn from it. set to -1 for infinite.
|
|
var/brute_damage = 0
|
|
var/oxy_damage = 0
|
|
density = 1
|
|
anchored = 1
|
|
var/banType = "lavaland"
|
|
|
|
/obj/effect/mob_spawn/attack_ghost(mob/user)
|
|
if(!SSticker.HasRoundStarted() || !loc)
|
|
return
|
|
if(!uses)
|
|
to_chat(user, "<span class='warning'>This spawner is out of charges!</span>")
|
|
return
|
|
if(jobban_isbanned(user, banType))
|
|
to_chat(user, "<span class='warning'>You are jobanned!</span>")
|
|
return
|
|
var/ghost_role = alert("Become [mob_name]? (Warning, You can no longer be cloned!)",,"Yes","No")
|
|
if(ghost_role == "No" || !loc)
|
|
return
|
|
log_game("[user.ckey] became [mob_name]")
|
|
create(ckey = user.ckey)
|
|
|
|
/obj/effect/mob_spawn/Initialize(mapload)
|
|
. = ..()
|
|
if(instant || (roundstart && (mapload || (SSticker && SSticker.current_state > GAME_STATE_SETTING_UP))))
|
|
create()
|
|
else
|
|
GLOB.poi_list |= src
|
|
|
|
/obj/effect/mob_spawn/Destroy()
|
|
GLOB.poi_list.Remove(src)
|
|
. = ..()
|
|
|
|
/obj/effect/mob_spawn/proc/special(mob/M)
|
|
return
|
|
|
|
/obj/effect/mob_spawn/proc/equip(mob/M)
|
|
return
|
|
|
|
/obj/effect/mob_spawn/proc/create(ckey, flavour = TRUE, name)
|
|
var/mob/living/M = new mob_type(get_turf(src)) //living mobs only
|
|
if(!random)
|
|
M.real_name = mob_name ? mob_name : M.name
|
|
if(!mob_gender)
|
|
mob_gender = pick(MALE, FEMALE)
|
|
M.gender = mob_gender
|
|
if(faction)
|
|
M.faction = list(faction)
|
|
if(death)
|
|
M.death(1) //Kills the new mob
|
|
|
|
M.adjustOxyLoss(oxy_damage)
|
|
M.adjustBruteLoss(brute_damage)
|
|
equip(M)
|
|
|
|
if(ckey)
|
|
M.ckey = ckey
|
|
if(flavour)
|
|
to_chat(M, "[flavour_text]")
|
|
var/datum/mind/MM = M.mind
|
|
if(objectives)
|
|
for(var/objective in objectives)
|
|
MM.objectives += new/datum/objective(objective)
|
|
special(M, name)
|
|
MM.name = M.real_name
|
|
if(uses > 0)
|
|
uses--
|
|
if(!permanent && !uses)
|
|
qdel(src)
|
|
|
|
// Base version - place these on maps/templates.
|
|
/obj/effect/mob_spawn/human
|
|
mob_type = /mob/living/carbon/human
|
|
//Human specific stuff.
|
|
var/mob_species = null //Set to make them a mutant race such as lizard or skeleton. Uses the datum typepath instead of the ID.
|
|
var/datum/outfit/outfit = /datum/outfit //If this is a path, it will be instanced in Initialize()
|
|
var/disable_pda = TRUE
|
|
//All of these only affect the ID that the outfit has placed in the ID slot
|
|
var/id_job = null //Such as "Clown" or "Chef." This just determines what the ID reads as, not their access
|
|
var/id_access = null //This is for access. See access.dm for which jobs give what access. Use "Captain" if you want it to be all access.
|
|
var/id_access_list = null //Allows you to manually add access to an ID card.
|
|
|
|
var/husk = null
|
|
//these vars are for lazy mappers to override parts of the outfit
|
|
//these cannot be null by default, or mappers cannot set them to null if they want nothing in that slot
|
|
var/uniform = -1
|
|
var/r_hand = -1
|
|
var/l_hand = -1
|
|
var/suit = -1
|
|
var/shoes = -1
|
|
var/gloves = -1
|
|
var/ears = -1
|
|
var/glasses = -1
|
|
var/mask = -1
|
|
var/head = -1
|
|
var/belt = -1
|
|
var/r_pocket = -1
|
|
var/l_pocket = -1
|
|
var/back = -1
|
|
var/id = -1
|
|
|
|
/obj/effect/mob_spawn/human/Initialize()
|
|
if(ispath(outfit))
|
|
outfit = new outfit()
|
|
if(!outfit)
|
|
outfit = new /datum/outfit
|
|
return ..()
|
|
|
|
/obj/effect/mob_spawn/human/equip(mob/living/carbon/human/H)
|
|
if(mob_species)
|
|
H.set_species(mob_species)
|
|
if(husk)
|
|
H.Drain()
|
|
|
|
if(outfit)
|
|
var/static/list/slots = list("uniform", "r_hand", "l_hand", "suit", "shoes", "gloves", "ears", "glasses", "mask", "head", "belt", "r_pocket", "l_pocket", "back", "id")
|
|
for(var/slot in slots)
|
|
var/T = vars[slot]
|
|
if(!isnum(T))
|
|
outfit.vars[slot] = T
|
|
H.equipOutfit(outfit)
|
|
if(disable_pda)
|
|
// We don't want corpse PDAs to show up in the messenger list.
|
|
var/obj/item/device/pda/PDA = locate(/obj/item/device/pda) in H
|
|
if(PDA)
|
|
PDA.toff = TRUE
|
|
var/obj/item/weapon/card/id/W = H.wear_id
|
|
if(W)
|
|
if(id_access)
|
|
for(var/jobtype in typesof(/datum/job))
|
|
var/datum/job/J = new jobtype
|
|
if(J.title == id_access)
|
|
W.access = J.get_access()
|
|
break
|
|
if(id_access_list)
|
|
if(!islist(W.access))
|
|
W.access = list()
|
|
W.access |= id_access_list
|
|
if(id_job)
|
|
W.assignment = id_job
|
|
W.registered_name = H.real_name
|
|
W.update_label()
|
|
|
|
//Instant version - use when spawning corpses during runtime
|
|
/obj/effect/mob_spawn/human/corpse
|
|
roundstart = FALSE
|
|
instant = TRUE
|
|
|
|
/obj/effect/mob_spawn/human/corpse/damaged
|
|
brute_damage = 1000
|
|
|
|
/obj/effect/mob_spawn/human/alive
|
|
icon = 'icons/obj/Cryogenic2.dmi'
|
|
icon_state = "sleeper"
|
|
death = FALSE
|
|
roundstart = FALSE //you could use these for alive fake humans on roundstart but this is more common scenario
|
|
|
|
|
|
//Non-human spawners
|
|
|
|
/obj/effect/mob_spawn/AICorpse/create() //Creates a corrupted AI
|
|
var/A = locate(/mob/living/silicon/ai) in loc
|
|
if(A)
|
|
return
|
|
var/mob/living/silicon/ai/spawned/M = new(loc) //spawn new AI at landmark as var M
|
|
M.name = src.name
|
|
M.real_name = src.name
|
|
M.aiPDA.toff = 1 //turns the AI's PDA messenger off, stopping it showing up on player PDAs
|
|
M.death() //call the AI's death proc
|
|
qdel(src)
|
|
|
|
/obj/effect/mob_spawn/slime
|
|
mob_type = /mob/living/simple_animal/slime
|
|
var/mobcolour = "grey"
|
|
icon = 'icons/mob/slimes.dmi'
|
|
icon_state = "grey baby slime" //sets the icon in the map editor
|
|
|
|
/obj/effect/mob_spawn/slime/equip(mob/living/simple_animal/slime/S)
|
|
S.colour = mobcolour
|
|
|
|
/obj/effect/mob_spawn/human/facehugger/create() //Creates a squashed facehugger
|
|
var/obj/item/clothing/mask/facehugger/O = new(src.loc) //variable O is a new facehugger at the location of the landmark
|
|
O.name = src.name
|
|
O.Die() //call the facehugger's death proc
|
|
qdel(src)
|
|
|
|
/obj/effect/mob_spawn/mouse
|
|
name = "sleeper"
|
|
mob_type = /mob/living/simple_animal/mouse
|
|
death = FALSE
|
|
roundstart = FALSE
|
|
icon = 'icons/obj/Cryogenic2.dmi'
|
|
icon_state = "sleeper"
|
|
|
|
/obj/effect/mob_spawn/cow
|
|
name = "sleeper"
|
|
mob_type = /mob/living/simple_animal/cow
|
|
death = FALSE
|
|
roundstart = FALSE
|
|
mob_gender = FEMALE
|
|
icon = 'icons/obj/Cryogenic2.dmi'
|
|
icon_state = "sleeper"
|
|
|
|
// I'll work on making a list of corpses people request for maps, or that I think will be commonly used. Syndicate operatives for example.
|
|
|
|
///////////Civilians//////////////////////
|
|
|
|
/obj/effect/mob_spawn/human/cook
|
|
name = "Cook"
|
|
outfit = /datum/outfit/job/cook
|
|
|
|
|
|
/obj/effect/mob_spawn/human/doctor
|
|
name = "Doctor"
|
|
outfit = /datum/outfit/job/doctor
|
|
|
|
|
|
/obj/effect/mob_spawn/human/doctor/alive
|
|
death = FALSE
|
|
roundstart = FALSE
|
|
random = TRUE
|
|
name = "sleeper"
|
|
icon = 'icons/obj/Cryogenic2.dmi'
|
|
icon_state = "sleeper"
|
|
flavour_text = "You are a space doctor!"
|
|
|
|
/obj/effect/mob_spawn/human/doctor/alive/equip(mob/living/carbon/human/H)
|
|
..()
|
|
// Remove radio and PDA so they wouldn't annoy station crew.
|
|
var/list/del_types = list(/obj/item/device/pda, /obj/item/device/radio/headset)
|
|
for(var/del_type in del_types)
|
|
var/obj/item/I = locate(del_type) in H
|
|
qdel(I)
|
|
|
|
/obj/effect/mob_spawn/human/engineer
|
|
name = "Engineer"
|
|
outfit = /datum/outfit/job/engineer/gloved
|
|
|
|
/obj/effect/mob_spawn/human/engineer/rig
|
|
outfit = /datum/outfit/job/engineer/gloved/rig
|
|
|
|
/obj/effect/mob_spawn/human/clown
|
|
name = "Clown"
|
|
outfit = /datum/outfit/job/clown
|
|
|
|
/obj/effect/mob_spawn/human/scientist
|
|
name = "Scientist"
|
|
outfit = /datum/outfit/job/scientist
|
|
|
|
/obj/effect/mob_spawn/human/miner
|
|
name = "Shaft Miner"
|
|
outfit = /datum/outfit/job/miner/asteroid
|
|
|
|
/obj/effect/mob_spawn/human/miner/rig
|
|
outfit = /datum/outfit/job/miner/equipped/asteroid
|
|
|
|
/obj/effect/mob_spawn/human/miner/explorer
|
|
outfit = /datum/outfit/job/miner/equipped
|
|
|
|
|
|
/obj/effect/mob_spawn/human/plasmaman
|
|
mob_species = /datum/species/plasmaman
|
|
outfit = /datum/outfit/plasmaman
|
|
|
|
|
|
/obj/effect/mob_spawn/human/bartender
|
|
name = "Space Bartender"
|
|
id_job = "Bartender"
|
|
id_access_list = list(GLOB.access_bar)
|
|
outfit = /datum/outfit/spacebartender
|
|
|
|
/obj/effect/mob_spawn/human/bartender/alive
|
|
death = FALSE
|
|
roundstart = FALSE
|
|
random = TRUE
|
|
name = "bartender sleeper"
|
|
icon = 'icons/obj/Cryogenic2.dmi'
|
|
icon_state = "sleeper"
|
|
flavour_text = "You are a space bartender!"
|
|
|
|
/datum/outfit/spacebartender
|
|
name = "Space Bartender"
|
|
uniform = /obj/item/clothing/under/rank/bartender
|
|
back = /obj/item/weapon/storage/backpack
|
|
shoes = /obj/item/clothing/shoes/sneakers/black
|
|
suit = /obj/item/clothing/suit/armor/vest
|
|
glasses = /obj/item/clothing/glasses/sunglasses/reagent
|
|
id = /obj/item/weapon/card/id
|
|
|
|
|
|
/obj/effect/mob_spawn/human/beach
|
|
outfit = /datum/outfit/beachbum
|
|
|
|
/obj/effect/mob_spawn/human/beach/alive
|
|
death = FALSE
|
|
roundstart = FALSE
|
|
random = TRUE
|
|
mob_name = "Beach Bum"
|
|
name = "beach bum sleeper"
|
|
icon = 'icons/obj/Cryogenic2.dmi'
|
|
icon_state = "sleeper"
|
|
flavour_text = "You are a beach bum!"
|
|
|
|
/datum/outfit/beachbum
|
|
name = "Beach Bum"
|
|
glasses = /obj/item/clothing/glasses/sunglasses
|
|
uniform = /obj/item/clothing/under/shorts/red
|
|
r_pocket = /obj/item/weapon/storage/wallet/random
|
|
|
|
/datum/outfit/beachbum/post_equip(mob/living/carbon/human/H, visualsOnly = FALSE)
|
|
..()
|
|
if(visualsOnly)
|
|
return
|
|
H.dna.add_mutation(STONER)
|
|
|
|
/////////////////Officers+Nanotrasen Security//////////////////////
|
|
|
|
/obj/effect/mob_spawn/human/bridgeofficer
|
|
name = "Bridge Officer"
|
|
id_job = "Bridge Officer"
|
|
id_access_list = list(GLOB.access_cent_captain)
|
|
outfit = /datum/outfit/nanotrasenbridgeofficercorpse
|
|
|
|
/datum/outfit/nanotrasenbridgeofficercorpse
|
|
name = "Bridge Officer Corpse"
|
|
ears = /obj/item/device/radio/headset/heads/hop
|
|
uniform = /obj/item/clothing/under/rank/centcom_officer
|
|
suit = /obj/item/clothing/suit/armor/bulletproof
|
|
shoes = /obj/item/clothing/shoes/sneakers/black
|
|
glasses = /obj/item/clothing/glasses/sunglasses
|
|
id = /obj/item/weapon/card/id
|
|
|
|
|
|
/obj/effect/mob_spawn/human/commander
|
|
name = "Commander"
|
|
id_job = "Commander"
|
|
id_access_list = list(GLOB.access_cent_captain, GLOB.access_cent_general, GLOB.access_cent_specops, GLOB.access_cent_medical, GLOB.access_cent_storage)
|
|
outfit = /datum/outfit/nanotrasencommandercorpse
|
|
|
|
/datum/outfit/nanotrasencommandercorpse
|
|
name = "Nanotrasen Private Security Commander"
|
|
uniform = /obj/item/clothing/under/rank/centcom_commander
|
|
suit = /obj/item/clothing/suit/armor/bulletproof
|
|
ears = /obj/item/device/radio/headset/heads/captain
|
|
glasses = /obj/item/clothing/glasses/eyepatch
|
|
mask = /obj/item/clothing/mask/cigarette/cigar/cohiba
|
|
head = /obj/item/clothing/head/centhat
|
|
gloves = /obj/item/clothing/gloves/combat
|
|
shoes = /obj/item/clothing/shoes/combat/swat
|
|
r_pocket = /obj/item/weapon/lighter
|
|
id = /obj/item/weapon/card/id
|
|
|
|
|
|
/obj/effect/mob_spawn/human/nanotrasensoldier
|
|
name = "Nanotrasen Private Security Officer"
|
|
id_job = "Private Security Force"
|
|
id_access_list = list(GLOB.access_cent_captain, GLOB.access_cent_general, GLOB.access_cent_specops, GLOB.access_cent_medical, GLOB.access_cent_storage, GLOB.access_security)
|
|
outfit = /datum/outfit/nanotrasensoldiercorpse
|
|
|
|
/datum/outfit/nanotrasensoldiercorpse
|
|
name = "NT Private Security Officer Corpse"
|
|
uniform = /obj/item/clothing/under/rank/security
|
|
suit = /obj/item/clothing/suit/armor/vest
|
|
shoes = /obj/item/clothing/shoes/combat
|
|
gloves = /obj/item/clothing/gloves/combat
|
|
mask = /obj/item/clothing/mask/gas/sechailer/swat
|
|
head = /obj/item/clothing/head/helmet/swat/nanotrasen
|
|
back = /obj/item/weapon/storage/backpack/security
|
|
id = /obj/item/weapon/card/id
|
|
|
|
|
|
/obj/effect/mob_spawn/human/commander/alive
|
|
death = FALSE
|
|
roundstart = FALSE
|
|
mob_name = "Nanotrasen Commander"
|
|
name = "sleeper"
|
|
icon = 'icons/obj/Cryogenic2.dmi'
|
|
icon_state = "sleeper"
|
|
flavour_text = "You are a Nanotrasen Commander!"
|
|
|
|
/obj/effect/mob_spawn/human/nanotrasensoldier/alive
|
|
death = FALSE
|
|
roundstart = FALSE
|
|
mob_name = "Private Security Officer"
|
|
name = "sleeper"
|
|
icon = 'icons/obj/Cryogenic2.dmi'
|
|
icon_state = "sleeper"
|
|
faction = "nanotrasenprivate"
|
|
flavour_text = "You are a Nanotrasen Private Security Officer!"
|
|
|
|
|
|
/////////////////Spooky Undead//////////////////////
|
|
|
|
/obj/effect/mob_spawn/human/skeleton
|
|
name = "skeletal remains"
|
|
mob_name = "skeleton"
|
|
mob_species = /datum/species/skeleton
|
|
mob_gender = NEUTER
|
|
|
|
/obj/effect/mob_spawn/human/skeleton/alive
|
|
death = FALSE
|
|
roundstart = FALSE
|
|
icon = 'icons/effects/blood.dmi'
|
|
icon_state = "remains"
|
|
flavour_text = "By unknown powers, your skeletal remains have been reanimated! Walk this mortal plain and terrorize all living adventurers who dare cross your path."
|
|
|
|
/obj/effect/mob_spawn/human/zombie
|
|
name = "rotting corpse"
|
|
mob_name = "zombie"
|
|
mob_species = /datum/species/zombie
|
|
|
|
/obj/effect/mob_spawn/human/zombie/alive
|
|
death = FALSE
|
|
roundstart = FALSE
|
|
icon = 'icons/effects/blood.dmi'
|
|
icon_state = "remains"
|
|
flavour_text = "By unknown powers, your rotting remains have been resurrected! Walk this mortal plain and terrorize all living adventurers who dare cross your path."
|
|
|
|
|
|
/obj/effect/mob_spawn/human/abductor
|
|
name = "abductor"
|
|
mob_name = "alien"
|
|
mob_species = /datum/species/abductor
|
|
outfit = /datum/outfit/abductorcorpse
|
|
|
|
/datum/outfit/abductorcorpse
|
|
name = "Abductor Corpse"
|
|
uniform = /obj/item/clothing/under/color/grey
|
|
shoes = /obj/item/clothing/shoes/combat
|
|
|
|
|
|
//For ghost bar.
|
|
/obj/effect/mob_spawn/human/alive/space_bar_patron
|
|
name = "Bar cryogenics"
|
|
mob_name = "Bar patron"
|
|
random = TRUE
|
|
permanent = TRUE
|
|
uses = -1
|
|
outfit = /datum/outfit/spacebartender
|
|
|
|
/obj/effect/mob_spawn/human/alive/space_bar_patron/attack_hand(mob/user)
|
|
var/despawn = alert("Return to cryosleep? (Warning, Your mob will be deleted!)",,"Yes","No")
|
|
if(despawn == "No" || !loc || !Adjacent(user))
|
|
return
|
|
user.visible_message("<span class='notice'>[user.name] climbs back into cryosleep...</span>")
|
|
qdel(user)
|
|
|
|
/datum/outfit/cryobartender
|
|
name = "Cryogenic Bartender"
|
|
uniform = /obj/item/clothing/under/rank/bartender
|
|
back = /obj/item/weapon/storage/backpack
|
|
shoes = /obj/item/clothing/shoes/sneakers/black
|
|
suit = /obj/item/clothing/suit/armor/vest
|
|
glasses = /obj/item/clothing/glasses/sunglasses/reagent
|