Replaced mob spawner vars with outfits

This commit is contained in:
CitadelStationBot
2017-05-23 07:57:42 -05:00
parent 6ae72fded4
commit e02290bf2b
13 changed files with 365 additions and 256 deletions
+121 -147
View File
@@ -38,7 +38,7 @@
create(ckey = user.ckey)
/obj/effect/mob_spawn/Initialize(mapload)
..()
. = ..()
if(instant || (roundstart && (mapload || (SSticker && SSticker.current_state > GAME_STATE_SETTING_UP))))
create()
else
@@ -90,29 +90,39 @@
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/outfit_type = null //Will start with this if exists then apply specific slots. Job outfits are generated with IDs and disabled PDAs.
var/uniform = null //Set this to an object path to have the slot filled with said object on the corpse.
var/r_hand = null
var/l_hand = null
var/suit = null
var/shoes = null
var/gloves = null
var/radio = null
var/glasses = null
var/mask = null
var/neck = null
var/helmet = null
var/belt = null
var/pocket1 = null
var/pocket2 = null
var/back = null
var/has_id = FALSE //Set to TRUE if you want them to have an 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/id_icon = null //For setting it to be a gold, silver, centcom etc ID
var/husk = null
var/list/implants = list()
//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
/obj/effect/mob_spawn/human/equip(mob/living/carbon/human/H)
if(mob_species)
@@ -120,48 +130,20 @@
if(husk)
H.Drain()
if(outfit_type)
H.equipOutfit(outfit_type)
// 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
if(uniform)
H.equip_to_slot_or_del(new uniform(H), slot_w_uniform)
if(suit)
H.equip_to_slot_or_del(new suit(H), slot_wear_suit)
if(shoes)
H.equip_to_slot_or_del(new shoes(H), slot_shoes)
if(gloves)
H.equip_to_slot_or_del(new gloves(H), slot_gloves)
if(radio)
H.equip_to_slot_or_del(new radio(H), slot_ears)
if(glasses)
H.equip_to_slot_or_del(new glasses(H), slot_glasses)
if(mask)
H.equip_to_slot_or_del(new mask(H), slot_wear_mask)
if(neck)
H.equip_to_slot_or_del(new neck(H), slot_neck)
if(helmet)
H.equip_to_slot_or_del(new helmet(H), slot_head)
if(belt)
H.equip_to_slot_or_del(new belt(H), slot_belt)
if(pocket1)
H.equip_to_slot_or_del(new pocket1(H), slot_r_store)
if(pocket2)
H.equip_to_slot_or_del(new pocket2(H), slot_l_store)
if(back)
H.equip_to_slot_or_del(new back(H), slot_back)
if(l_hand)
H.put_in_hands_or_del(new l_hand(H))
if(r_hand)
H.put_in_hands_or_del(new r_hand(H))
if(has_id)
var/obj/item/weapon/card/id/W = new(H)
if(id_icon)
W.icon_state = id_icon
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
@@ -176,15 +158,6 @@
W.assignment = id_job
W.registered_name = H.real_name
W.update_label()
H.equip_to_slot_or_del(W, slot_wear_id)
for(var/I in implants)
var/obj/item/weapon/implant/X = new I
X.implant(H)
if(!H.head && istype(H.wear_suit, /obj/item/clothing/suit/space/hardsuit))
var/obj/item/clothing/suit/space/hardsuit/HS = H.wear_suit
HS.ToggleHelmet()
//Instant version - use when spawning corpses during runtime
/obj/effect/mob_spawn/human/corpse
@@ -248,52 +221,22 @@
// 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.
/obj/effect/mob_spawn/human/syndicatesoldier
name = "Syndicate Operative"
uniform = /obj/item/clothing/under/syndicate
suit = /obj/item/clothing/suit/armor/vest
shoes = /obj/item/clothing/shoes/combat
gloves = /obj/item/clothing/gloves/combat
radio = /obj/item/device/radio/headset
mask = /obj/item/clothing/mask/gas
helmet = /obj/item/clothing/head/helmet/swat
back = /obj/item/weapon/storage/backpack
has_id = 1
id_job = "Operative"
id_access_list = list(GLOB.access_syndicate)
/obj/effect/mob_spawn/human/syndicatecommando
name = "Syndicate Commando"
uniform = /obj/item/clothing/under/syndicate
suit = /obj/item/clothing/suit/space/hardsuit/syndi
shoes = /obj/item/clothing/shoes/combat
gloves = /obj/item/clothing/gloves/combat
radio = /obj/item/device/radio/headset
mask = /obj/item/clothing/mask/gas/syndicate
back = /obj/item/weapon/tank/jetpack/oxygen
pocket1 = /obj/item/weapon/tank/internals/emergency_oxygen
has_id = 1
id_job = "Operative"
id_access_list = list(GLOB.access_syndicate)
///////////Civilians//////////////////////
/obj/effect/mob_spawn/human/cook
name = "Cook"
outfit_type = /datum/outfit/job/cook
outfit = /datum/outfit/job/cook
/obj/effect/mob_spawn/human/doctor
name = "Doctor"
outfit_type = /datum/outfit/job/doctor
outfit = /datum/outfit/job/doctor
/obj/effect/mob_spawn/human/doctor/alive
death = FALSE
roundstart = FALSE
random = TRUE
radio = null
back = null
name = "sleeper"
icon = 'icons/obj/Cryogenic2.dmi'
icon_state = "sleeper"
@@ -309,49 +252,40 @@
/obj/effect/mob_spawn/human/engineer
name = "Engineer"
outfit_type = /datum/outfit/job/engineer
gloves = /obj/item/clothing/gloves/color/yellow
outfit = /datum/outfit/job/engineer/gloved
/obj/effect/mob_spawn/human/engineer/rig
outfit_type = /datum/outfit/job/engineer/rig
outfit = /datum/outfit/job/engineer/gloved/rig
/obj/effect/mob_spawn/human/clown
name = "Clown"
outfit_type = /datum/outfit/job/clown
outfit = /datum/outfit/job/clown
/obj/effect/mob_spawn/human/scientist
name = "Scientist"
outfit_type = /datum/outfit/job/scientist
outfit = /datum/outfit/job/scientist
/obj/effect/mob_spawn/human/miner
name = "Shaft Miner"
outfit_type = /datum/outfit/job/miner/asteroid
outfit = /datum/outfit/job/miner/asteroid
/obj/effect/mob_spawn/human/miner/rig
outfit_type = /datum/outfit/job/miner/equipped/asteroid
outfit = /datum/outfit/job/miner/equipped/asteroid
/obj/effect/mob_spawn/human/miner/explorer
outfit_type = /datum/outfit/job/miner/equipped
outfit = /datum/outfit/job/miner/equipped
/obj/effect/mob_spawn/human/plasmaman
mob_species = /datum/species/plasmaman
helmet = /obj/item/clothing/head/helmet/space/plasmaman
uniform = /obj/item/clothing/under/plasmaman
back = /obj/item/weapon/tank/internals/plasmaman/full
mask = /obj/item/clothing/mask/breath
outfit = /datum/outfit/plasmaman
/obj/effect/mob_spawn/human/bartender
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
has_id = 1
id_job = "Bartender"
id_access_list = list(GLOB.access_bar)
outfit = /datum/outfit/spacebartender
/obj/effect/mob_spawn/human/bartender/alive
death = FALSE
@@ -362,10 +296,18 @@
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
glasses = /obj/item/clothing/glasses/sunglasses
uniform = /obj/item/clothing/under/shorts/red
pocket1 = /obj/item/weapon/storage/wallet/random
outfit = /datum/outfit/beachbum
/obj/effect/mob_spawn/human/beach/alive
death = FALSE
@@ -377,46 +319,68 @@
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
/////////////////Officers+Nanotrasen Security//////////////////////
/obj/effect/mob_spawn/human/bridgeofficer
name = "Bridge Officer"
radio = /obj/item/device/radio/headset/heads/hop
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
has_id = 1
id_job = "Bridge Officer"
id_access_list = list(GLOB.access_cent_captain)
id = /obj/item/weapon/card/id
/obj/effect/mob_spawn/human/commander
name = "Commander"
uniform = /obj/item/clothing/under/rank/centcom_commander
suit = /obj/item/clothing/suit/armor/bulletproof
radio = /obj/item/device/radio/headset/heads/captain
glasses = /obj/item/clothing/glasses/eyepatch
mask = /obj/item/clothing/mask/cigarette/cigar/cohiba
helmet = /obj/item/clothing/head/centhat
gloves = /obj/item/clothing/gloves/combat
shoes = /obj/item/clothing/shoes/combat/swat
pocket1 = /obj/item/weapon/lighter
has_id = 1
id_job = "Commander"
id_access_list = list(GLOB.access_cent_captain)
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_specops)
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
helmet = /obj/item/clothing/head/helmet/swat/nanotrasen
head = /obj/item/clothing/head/helmet/swat/nanotrasen
back = /obj/item/weapon/storage/backpack/security
has_id = 1
id_job = "Private Security Force"
id_access_list = list(GLOB.access_cent_specops)
id = /obj/item/weapon/card/id
/obj/effect/mob_spawn/human/commander/alive
death = FALSE
@@ -427,6 +391,7 @@
icon_state = "sleeper"
flavour_text = "You are a Nanotrasen Commander!"
/////////////////Spooky Undead//////////////////////
/obj/effect/mob_spawn/human/skeleton
@@ -459,9 +424,14 @@
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"
@@ -469,11 +439,7 @@
random = TRUE
permanent = TRUE
uses = -1
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
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")
@@ -481,3 +447,11 @@
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