Converts jobs and admin equipment to use outfits (#5827)

Converts the jobs and admin equipment to use outfit datums.
This commit is contained in:
Werner
2019-02-19 23:58:05 +02:00
committed by Erki
parent 1bc27306a0
commit b823b4eb05
38 changed files with 1802 additions and 1447 deletions
+49 -471
View File
@@ -378,489 +378,67 @@
set category = "Fun"
set name = "Select equipment"
if(!check_rights(R_FUN))
return
var/mob/living/carbon/human/M = input("Select mob.", "Select equipment.") as null|anything in human_mob_list
if(!M) return
//log_admin("[key_name(src)] has alienized [M.key].")
var/list/dresspacks = list(
var/list/choices = list(
"strip",
"job",
"standard space gear",
"tournament standard red",
"tournament standard green",
"tournament gangster",
"tournament chef",
"tournament janitor",
"pirate",
"space pirate",
"soviet admiral",
"tunnel clown",
"masked killer",
"assassin",
"death commando",
"syndicate commando",
"special ops officer",
"blue wizard",
"red wizard",
"marisa wizard",
"emergency response team",
"nanotrasen representative",
"nanotrasen officer",
"nanotrasen captain",
"protection detail",
"leading trooper",
"ert commander",
"odin security"
)
var/dresscode = input("Select dress for [M]", "Robust quick dress shop") as null|anything in dresspacks
"as job...",
"emergency response team"
)
var/admin_outfits = subtypesof(/datum/outfit/admin)
for(var/type in admin_outfits)
var/datum/outfit/O = type
var/name = initial(O.name)
if(name != "Naked")
choices[initial(O.name)] = type
var/dostrip = 0
switch(alert("Strip [M] before dressing?", "Strip?", "Yes", "No", "Cancel"))
if("Yes")
dostrip = 1
if("Cancel")
return
var/dresscode = input("Select dress for [M]", "Robust quick dress shop") as null|anything in choices
if (isnull(dresscode))
return
feedback_add_details("admin_verb","SEQ") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
for (var/obj/item/I in M)
if (istype(I, /obj/item/weapon/implant))
continue
M.drop_from_inventory(I)
if(I.loc != M)
qdel(I)
switch(dresscode)
if ("strip")
//do nothing
if ("job")
var/selected_job = input("Select job", "Robust quick dress shop") as null|anything in joblist
if (isnull(selected_job))
return
var/datum/job/job = SSjobs.GetJob(selected_job)
if(!job)
return
job.equip(M)
job.apply_fingerprints(M)
SSjobs.spawnId(M, selected_job)
if ("standard space gear")
M.equip_to_slot_or_del(new /obj/item/clothing/shoes/black(M), slot_shoes)
M.equip_to_slot_or_del(new /obj/item/clothing/under/color/grey(M), slot_w_uniform)
M.equip_to_slot_or_del(new /obj/item/clothing/suit/space(M), slot_wear_suit)
M.equip_to_slot_or_del(new /obj/item/clothing/head/helmet/space(M), slot_head)
var /obj/item/weapon/tank/jetpack/J = new /obj/item/weapon/tank/jetpack/oxygen(M)
M.equip_to_slot_or_del(J, slot_back)
J.toggle()
M.equip_to_slot_or_del(new /obj/item/clothing/mask/breath(M), slot_wear_mask)
J.Topic(null, list("stat" = 1))
if ("tournament standard red","tournament standard green") //we think stunning weapon is too overpowered to use it on tournaments. --rastaf0
if (dresscode=="tournament standard red")
M.equip_to_slot_or_del(new /obj/item/clothing/under/color/red(M), slot_w_uniform)
else
M.equip_to_slot_or_del(new /obj/item/clothing/under/color/green(M), slot_w_uniform)
M.equip_to_slot_or_del(new /obj/item/clothing/shoes/black(M), slot_shoes)
M.equip_to_slot_or_del(new /obj/item/clothing/suit/armor/vest(M), slot_wear_suit)
M.equip_to_slot_or_del(new /obj/item/clothing/head/helmet/thunderdome(M), slot_head)
M.equip_to_slot_or_del(new /obj/item/weapon/gun/energy/rifle/pulse/destroyer(M), slot_r_hand)
M.equip_to_slot_or_del(new /obj/item/weapon/material/knife(M), slot_l_hand)
M.equip_to_slot_or_del(new /obj/item/weapon/grenade/smokebomb(M), slot_r_store)
if ("tournament gangster") //gangster are supposed to fight each other. --rastaf0
M.equip_to_slot_or_del(new /obj/item/clothing/under/det(M), slot_w_uniform)
M.equip_to_slot_or_del(new /obj/item/clothing/shoes/black(M), slot_shoes)
M.equip_to_slot_or_del(new /obj/item/clothing/suit/storage/toggle/det_trench(M), slot_wear_suit)
M.equip_to_slot_or_del(new /obj/item/clothing/glasses/thermal/plain/monocle(M), slot_glasses)
M.equip_to_slot_or_del(new /obj/item/clothing/head/det(M), slot_head)
M.equip_to_slot_or_del(new /obj/item/weapon/cloaking_device(M), slot_r_store)
M.equip_to_slot_or_del(new /obj/item/weapon/gun/projectile/revolver(M), slot_r_hand)
M.equip_to_slot_or_del(new /obj/item/ammo_magazine/a357(M), slot_l_store)
if ("tournament chef") //Steven Seagal FTW
M.equip_to_slot_or_del(new /obj/item/clothing/under/rank/chef(M), slot_w_uniform)
M.equip_to_slot_or_del(new /obj/item/clothing/suit/chef(M), slot_wear_suit)
M.equip_to_slot_or_del(new /obj/item/clothing/shoes/black(M), slot_shoes)
M.equip_to_slot_or_del(new /obj/item/clothing/head/chefhat(M), slot_head)
M.equip_to_slot_or_del(new /obj/item/weapon/material/kitchen/rollingpin(M), slot_r_hand)
M.equip_to_slot_or_del(new /obj/item/weapon/material/knife(M), slot_l_hand)
M.equip_to_slot_or_del(new /obj/item/weapon/material/knife(M), slot_r_store)
M.equip_to_slot_or_del(new /obj/item/weapon/material/knife(M), slot_s_store)
if ("tournament janitor")
M.equip_to_slot_or_del(new /obj/item/clothing/under/rank/janitor(M), slot_w_uniform)
M.equip_to_slot_or_del(new /obj/item/clothing/shoes/black(M), slot_shoes)
var/obj/item/weapon/storage/backpack/backpack = new(M)
for(var/obj/item/I in backpack)
if(dostrip)
for (var/obj/item/I in M)
if (istype(I, /obj/item/weapon/implant))
continue
M.drop_from_inventory(I)
if(I.loc != M)
qdel(I)
M.equip_to_slot_or_del(backpack, slot_back)
M.equip_to_slot_or_del(new /obj/item/weapon/mop(M), slot_r_hand)
var/obj/item/weapon/reagent_containers/glass/bucket/bucket = new(M)
bucket.reagents.add_reagent("water", 70)
M.equip_to_slot_or_del(bucket, slot_l_hand)
M.equip_to_slot_or_del(new /obj/item/weapon/grenade/chem_grenade/cleaner(M), slot_r_store)
M.equip_to_slot_or_del(new /obj/item/weapon/grenade/chem_grenade/cleaner(M), slot_l_store)
M.equip_to_slot_or_del(new /obj/item/stack/tile/floor(M), slot_in_backpack)
M.equip_to_slot_or_del(new /obj/item/stack/tile/floor(M), slot_in_backpack)
M.equip_to_slot_or_del(new /obj/item/stack/tile/floor(M), slot_in_backpack)
M.equip_to_slot_or_del(new /obj/item/stack/tile/floor(M), slot_in_backpack)
M.equip_to_slot_or_del(new /obj/item/stack/tile/floor(M), slot_in_backpack)
M.equip_to_slot_or_del(new /obj/item/stack/tile/floor(M), slot_in_backpack)
M.equip_to_slot_or_del(new /obj/item/stack/tile/floor(M), slot_in_backpack)
if ("pirate")
M.equip_to_slot_or_del(new /obj/item/clothing/under/pirate(M), slot_w_uniform)
M.equip_to_slot_or_del(new /obj/item/clothing/shoes/brown(M), slot_shoes)
M.equip_to_slot_or_del(new /obj/item/clothing/head/bandana(M), slot_head)
M.equip_to_slot_or_del(new /obj/item/clothing/glasses/eyepatch(M), slot_glasses)
M.equip_to_slot_or_del(new /obj/item/weapon/melee/energy/sword/pirate(M), slot_r_hand)
if ("space pirate")
M.equip_to_slot_or_del(new /obj/item/clothing/under/pirate(M), slot_w_uniform)
M.equip_to_slot_or_del(new /obj/item/clothing/shoes/brown(M), slot_shoes)
M.equip_to_slot_or_del(new /obj/item/clothing/suit/space/pirate(M), slot_wear_suit)
M.equip_to_slot_or_del(new /obj/item/clothing/head/helmet/space/pirate(M), slot_head)
M.equip_to_slot_or_del(new /obj/item/clothing/glasses/eyepatch(M), slot_glasses)
M.equip_to_slot_or_del(new /obj/item/weapon/melee/energy/sword/pirate(M), slot_r_hand)
if ("soviet soldier")
M.equip_to_slot_or_del(new /obj/item/clothing/under/soviet(M), slot_w_uniform)
M.equip_to_slot_or_del(new /obj/item/clothing/shoes/black(M), slot_shoes)
M.equip_to_slot_or_del(new /obj/item/clothing/head/ushanka(M), slot_head)
if("tunnel clown")//Tunnel clowns rule!
M.equip_to_slot_or_del(new /obj/item/clothing/under/rank/clown(M), slot_w_uniform)
M.equip_to_slot_or_del(new /obj/item/clothing/shoes/clown_shoes(M), slot_shoes)
M.equip_to_slot_or_del(new /obj/item/clothing/gloves/black(M), slot_gloves)
M.equip_to_slot_or_del(new /obj/item/clothing/mask/gas/clown_hat(M), slot_wear_mask)
M.equip_to_slot_or_del(new /obj/item/clothing/head/chaplain_hood(M), slot_head)
M.equip_to_slot_or_del(new /obj/item/device/radio/headset(M), slot_l_ear)
M.equip_to_slot_or_del(new /obj/item/clothing/glasses/thermal/plain/monocle(M), slot_glasses)
M.equip_to_slot_or_del(new /obj/item/clothing/suit/chaplain_hoodie(M), slot_wear_suit)
M.equip_to_slot_or_del(new /obj/item/weapon/bikehorn(M), slot_r_store)
var/obj/item/weapon/card/id/W = new(M)
W.name = "[M.real_name]'s ID Card"
W.access = get_all_station_access()
W.assignment = "Tunnel Clown!"
W.registered_name = M.real_name
M.equip_to_slot_or_del(W, slot_wear_id)
var/obj/item/weapon/material/twohanded/fireaxe/fire_axe = new(M)
M.equip_to_slot_or_del(fire_axe, slot_r_hand)
if("masked killer")
M.equip_to_slot_or_del(new /obj/item/clothing/under/overalls(M), slot_w_uniform)
M.equip_to_slot_or_del(new /obj/item/clothing/shoes/white(M), slot_shoes)
M.equip_to_slot_or_del(new /obj/item/clothing/gloves/latex(M), slot_gloves)
M.equip_to_slot_or_del(new /obj/item/clothing/mask/surgical(M), slot_wear_mask)
M.equip_to_slot_or_del(new /obj/item/clothing/head/welding(M), slot_head)
M.equip_to_slot_or_del(new /obj/item/device/radio/headset(M), slot_l_ear)
M.equip_to_slot_or_del(new /obj/item/clothing/glasses/thermal/plain/monocle(M), slot_glasses)
M.equip_to_slot_or_del(new /obj/item/clothing/suit/apron(M), slot_wear_suit)
M.equip_to_slot_or_del(new /obj/item/weapon/material/knife(M), slot_l_store)
M.equip_to_slot_or_del(new /obj/item/weapon/scalpel(M), slot_r_store)
var/obj/item/weapon/material/twohanded/fireaxe/fire_axe = new(M)
M.equip_to_slot_or_del(fire_axe, slot_r_hand)
for(var/obj/item/carried_item in M.contents)
if(!istype(carried_item, /obj/item/weapon/implant))//If it's not an implant.
carried_item.add_blood(M)//Oh yes, there will be blood...
if("assassin")
M.equip_to_slot_or_del(new /obj/item/clothing/under/suit_jacket(M), slot_w_uniform)
M.equip_to_slot_or_del(new /obj/item/clothing/shoes/black(M), slot_shoes)
M.equip_to_slot_or_del(new /obj/item/clothing/gloves/black(M), slot_gloves)
M.equip_to_slot_or_del(new /obj/item/device/radio/headset(M), slot_l_ear)
M.equip_to_slot_or_del(new /obj/item/clothing/glasses/sunglasses(M), slot_glasses)
M.equip_to_slot_or_del(new /obj/item/clothing/suit/wcoat(M), slot_wear_suit)
M.equip_to_slot_or_del(new /obj/item/weapon/melee/energy/sword(M), slot_l_store)
M.equip_to_slot_or_del(new /obj/item/weapon/cloaking_device(M), slot_r_store)
var/obj/item/weapon/storage/secure/briefcase/sec_briefcase = new(M)
for(var/obj/item/briefcase_item in sec_briefcase)
qdel(briefcase_item)
for(var/i=3, i>0, i--)
sec_briefcase.contents += new /obj/item/weapon/spacecash/c1000
sec_briefcase.contents += new /obj/item/weapon/gun/energy/crossbow
sec_briefcase.contents += new /obj/item/weapon/gun/projectile/revolver/mateba
sec_briefcase.contents += new /obj/item/ammo_magazine/a357
sec_briefcase.contents += new /obj/item/weapon/plastique
M.equip_to_slot_or_del(sec_briefcase, slot_l_hand)
var/obj/item/device/pda/heads/pda = new(M)
pda.owner = M.real_name
pda.ownjob = "Reaper"
pda.name = "PDA-[M.real_name] ([pda.ownjob])"
M.equip_to_slot_or_del(pda, slot_belt)
var/obj/item/weapon/card/id/syndicate/W = new(M)
W.name = "[M.real_name]'s ID Card"
W.access = get_all_station_access()
W.assignment = "Reaper"
W.registered_name = M.real_name
M.equip_to_slot_or_del(W, slot_wear_id)
if("death commando")//Was looking to add this for a while.
deathsquad.equip(M)
if("syndicate commando")
commandos.equip(M)
if("nanotrasen representative")
M.equip_to_slot_or_del(new /obj/item/clothing/under/rank/centcom(M), slot_w_uniform)
M.equip_to_slot_or_del(new /obj/item/clothing/shoes/laceup(M), slot_shoes)
M.equip_to_slot_or_del(new /obj/item/clothing/gloves/white(M), slot_gloves)
M.equip_to_slot_or_del(new /obj/item/device/radio/headset/heads/hop(M), slot_l_ear)
var/obj/item/device/pda/heads/pda = new(M)
pda.owner = M.real_name
pda.ownjob = "NanoTrasen Navy Representative"
pda.name = "PDA-[M.real_name] ([pda.ownjob])"
M.equip_to_slot_or_del(pda, slot_r_store)
M.equip_to_slot_or_del(new /obj/item/clothing/glasses/sunglasses(M), slot_l_store)
M.equip_to_slot_or_del(new /obj/item/weapon/clipboard(M), slot_belt)
var/obj/item/weapon/card/id/W = new(M)
W.name = "[M.real_name]'s ID Card"
W.icon_state = "centcom"
W.item_state = "id_inv"
W.access = get_all_station_access()
W.access += list("VIP Guest","Custodian","Thunderdome Overseer","Intel Officer","Medical Officer","Death Commando","Research Officer")
W.assignment = "NanoTrasen Navy Representative"
W.registered_name = M.real_name
M.equip_to_slot_or_del(W, slot_wear_id)
if("nanotrasen officer")
M.equip_to_slot_or_del(new /obj/item/clothing/under/rank/centcom_officer(M), slot_w_uniform)
M.equip_to_slot_or_del(new /obj/item/clothing/shoes/laceup(M), slot_shoes)
M.equip_to_slot_or_del(new /obj/item/clothing/gloves/white(M), slot_gloves)
M.equip_to_slot_or_del(new /obj/item/device/radio/headset/heads/captain(M), slot_l_ear)
M.equip_to_slot_or_del(new /obj/item/clothing/head/beret/centcom/officer(M), slot_head)
var/obj/item/device/pda/heads/pda = new(M)
pda.owner = M.real_name
pda.ownjob = "NanoTrasen Navy Officer"
pda.name = "PDA-[M.real_name] ([pda.ownjob])"
M.equip_to_slot_or_del(pda, slot_r_store)
M.equip_to_slot_or_del(new /obj/item/clothing/glasses/sunglasses(M), slot_l_store)
M.equip_to_slot_or_del(new /obj/item/weapon/gun/energy/pistol(M), slot_belt)
var/obj/item/weapon/card/id/centcom/W = new(M)
W.name = "[M.real_name]'s ID Card"
W.access = get_all_accesses()
W.access += get_all_centcom_access()
W.assignment = "NanoTrasen Navy Officer"
W.registered_name = M.real_name
M.equip_to_slot_or_del(W, slot_wear_id)
if("nanotrasen captain")
M.equip_to_slot_or_del(new /obj/item/clothing/under/rank/centcom_captain(M), slot_w_uniform)
M.equip_to_slot_or_del(new /obj/item/clothing/shoes/laceup(M), slot_shoes)
M.equip_to_slot_or_del(new /obj/item/clothing/gloves/white(M), slot_gloves)
M.equip_to_slot_or_del(new /obj/item/device/radio/headset/heads/captain(M), slot_l_ear)
M.equip_to_slot_or_del(new /obj/item/clothing/head/beret/centcom/captain(M), slot_head)
var/obj/item/device/pda/heads/pda = new(M)
pda.owner = M.real_name
pda.ownjob = "NanoTrasen Navy Captain"
pda.name = "PDA-[M.real_name] ([pda.ownjob])"
M.equip_to_slot_or_del(pda, slot_r_store)
M.equip_to_slot_or_del(new /obj/item/clothing/glasses/sunglasses(M), slot_l_store)
M.equip_to_slot_or_del(new /obj/item/weapon/gun/energy/pistol(M), slot_belt)
var/obj/item/weapon/card/id/centcom/W = new(M)
W.name = "[M.real_name]'s ID Card"
W.access = get_all_accesses()
W.access += get_all_centcom_access()
W.assignment = "NanoTrasen Navy Captain"
W.registered_name = M.real_name
M.equip_to_slot_or_del(W, slot_wear_id)
switch(dresscode)
if("strip")
//do nothing
if("as job...")
var/datum/job/jobdatum
var/jobname = input("Select job", "Robust quick dress shop") as null|anything in get_all_jobs()
jobdatum = SSjobs.GetJob(jobname)
if(jobdatum)
dresscode = "[jobdatum.title]"
M.job = jobdatum.title
jobdatum.equip(M)
if("emergency response team")
ert.equip(M)
if("protection detail")
M.equip_to_slot_or_del(new /obj/item/clothing/under/ccpolice(M), slot_w_uniform)
M.equip_to_slot_or_del(new /obj/item/clothing/suit/storage/vest/heavy/ert/peacekeeper(M), slot_wear_suit)
M.equip_to_slot_or_del(new /obj/item/clothing/shoes/swat(M), slot_shoes)
M.equip_to_slot_or_del(new /obj/item/clothing/gloves/swat(M), slot_gloves)
M.equip_to_slot_or_del(new /obj/item/device/radio/headset/ert(M), slot_l_ear)
M.equip_to_slot_or_del(new /obj/item/clothing/glasses/sunglasses/sechud(M), slot_glasses)
M.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/satchel(M), slot_back)
M.equip_to_slot_or_del(new /obj/item/weapon/gun/energy/gun(M.back), slot_in_backpack)
M.equip_to_slot_or_del(new /obj/item/clothing/head/helmet/swat/peacekeeper(M.back), slot_in_backpack)
M.equip_to_slot_or_del(new /obj/item/clothing/accessory/holster/hip(M.back), slot_in_backpack)
M.equip_to_slot_or_del(new /obj/item/weapon/gun/energy/pistol(M.back), slot_in_backpack)
M.equip_to_slot_or_del(new /obj/item/clothing/head/beret/centcom/officer(M), slot_head)
var/obj/item/weapon/card/id/W = new(M)
W.name = "[M.real_name]'s ID Card"
W.icon_state = "centcom"
W.access = get_all_accesses()
W.access += get_all_centcom_access()
W.assignment = "ERT Protection Detail"
W.registered_name = M.real_name
M.equip_to_slot_or_del(W, slot_wear_id)
if("leading trooper")
M.equip_to_slot_or_del(new /obj/item/clothing/under/ert(M), slot_w_uniform)
M.equip_to_slot_or_del(new /obj/item/clothing/suit/storage/vest/heavy/ert/lead(M), slot_wear_suit)
M.equip_to_slot_or_del(new /obj/item/clothing/shoes/swat(M), slot_shoes)
M.equip_to_slot_or_del(new /obj/item/clothing/gloves/swat(M), slot_gloves)
M.equip_to_slot_or_del(new /obj/item/device/radio/headset/ert(M), slot_l_ear)
M.equip_to_slot_or_del(new /obj/item/clothing/glasses/sunglasses/sechud(M), slot_glasses)
M.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/satchel(M), slot_back)
M.equip_to_slot_or_del(new /obj/item/weapon/gun/energy/gun/nuclear(M.back), slot_in_backpack)
M.equip_to_slot_or_del(new /obj/item/clothing/accessory/holster/hip(M.back), slot_in_backpack)
M.equip_to_slot_or_del(new /obj/item/weapon/gun/energy/gun(M.back), slot_in_backpack)
M.equip_to_slot_or_del(new /obj/item/clothing/head/beret/centcom/officer(M), slot_head)
var/obj/item/weapon/card/id/W = new(M)
W.name = "[M.real_name]'s ID Card"
W.icon_state = "centcom"
W.access = get_all_accesses()
W.access += get_all_centcom_access()
W.assignment = "Leading Trooper"
W.registered_name = M.real_name
M.equip_to_slot_or_del(W, slot_wear_id)
if("ert commander")
M.equip_to_slot_or_del(new /obj/item/clothing/under/rank/centcom_commander(M), slot_w_uniform)
M.equip_to_slot_or_del(new /obj/item/clothing/suit/storage/vest/heavy/ert/commander(M), slot_wear_suit)
M.equip_to_slot_or_del(new /obj/item/clothing/shoes/swat(M), slot_shoes)
M.equip_to_slot_or_del(new /obj/item/clothing/gloves/swat(M), slot_gloves)
M.equip_to_slot_or_del(new /obj/item/device/radio/headset/ert(M), slot_l_ear)
M.equip_to_slot_or_del(new /obj/item/clothing/glasses/sunglasses/sechud(M), slot_glasses)
M.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/satchel(M), slot_back)
M.equip_to_slot_or_del(new /obj/item/weapon/storage/fancy/cigar(M.back), slot_in_backpack)
M.equip_to_slot_or_del(new /obj/item/weapon/flame/lighter/zippo(M), slot_r_store)
M.equip_to_slot_or_del(new /obj/item/clothing/accessory/medal/gold/heroism(M), slot_l_store)
M.equip_to_slot_or_del(new /obj/item/clothing/head/beret/centcom/commander(M), slot_head)
var/obj/item/weapon/card/id/W = new(M)
W.name = "[M.real_name]'s ID Card"
W.icon_state = "centcom"
W.access = get_all_accesses()
W.access += get_all_centcom_access()
W.assignment = "ERT Commander"
W.registered_name = M.real_name
M.equip_to_slot_or_del(W, slot_wear_id)
if("odin security")
M.equip_to_slot_or_del(new /obj/item/clothing/under/ccpolice(M), slot_w_uniform)
M.equip_to_slot_or_del(new /obj/item/clothing/suit/storage/vest/heavy/ert/peacekeeper(M), slot_wear_suit)
M.equip_to_slot_or_del(new /obj/item/clothing/shoes/swat(M), slot_shoes)
M.equip_to_slot_or_del(new /obj/item/clothing/gloves/swat(M), slot_gloves)
M.equip_to_slot_or_del(new /obj/item/device/radio/headset/ert(M), slot_l_ear)
M.equip_to_slot_or_del(new /obj/item/clothing/glasses/sunglasses/sechud/tactical(M), slot_glasses)
M.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/satchel(M), slot_back)
M.equip_to_slot_or_del(new /obj/item/clothing/mask/gas/tactical(M), slot_wear_mask)
M.equip_to_slot_or_del(new /obj/item/clothing/head/helmet/swat/peacekeeper(M), slot_head)
M.equip_to_slot_or_del(new /obj/item/weapon/gun/projectile/automatic/x9(M.back), slot_in_backpack)
M.equip_to_slot_or_del(new /obj/item/ammo_magazine/c45x(M.back), slot_in_backpack)
M.equip_to_slot_or_del(new /obj/item/ammo_magazine/c45x(M.back), slot_in_backpack)
M.equip_to_slot_or_del(new /obj/item/clothing/accessory/holster/hip(M.back), slot_in_backpack)
M.equip_to_slot_or_del(new /obj/item/weapon/gun/energy/gun(M.back), slot_in_backpack)
M.equip_to_slot_or_del(new /obj/item/weapon/handcuffs/ziptie(M), slot_r_store)
M.equip_to_slot_or_del(new /obj/item/weapon/grenade/chem_grenade/gas(M), slot_l_store)
M.equip_to_slot_or_del(new /obj/item/weapon/shield/riot/tact(M), slot_l_hand)
var/obj/item/weapon/card/id/W = new(M)
W.name = "[M.real_name]'s ID Card"
W.icon_state = "centcom"
W.access = get_all_accesses()
W.access += get_all_centcom_access()
W.assignment = "[current_map.dock_name] Security Specialist"
W.registered_name = M.real_name
M.equip_to_slot_or_del(W, slot_wear_id)
if("special ops officer")
M.equip_to_slot_or_del(new /obj/item/clothing/under/syndicate/combat(M), slot_w_uniform)
M.equip_to_slot_or_del(new /obj/item/clothing/suit/armor/swat/officer(M), slot_wear_suit)
M.equip_to_slot_or_del(new /obj/item/clothing/shoes/combat(M), slot_shoes)
M.equip_to_slot_or_del(new /obj/item/clothing/gloves/combat(M), slot_gloves)
M.equip_to_slot_or_del(new /obj/item/device/radio/headset/heads/captain(M), slot_l_ear)
M.equip_to_slot_or_del(new /obj/item/clothing/glasses/eyepatch/hud/thermal(M), slot_glasses)
M.equip_to_slot_or_del(new /obj/item/clothing/mask/smokable/cigarette/cigar/havana(M), slot_wear_mask)
M.equip_to_slot_or_del(new /obj/item/clothing/head/helmet/space/deathsquad/beret(M), slot_head)
M.equip_to_slot_or_del(new /obj/item/weapon/gun/energy/pulse/pistol(M), slot_belt)
M.equip_to_slot_or_del(new /obj/item/weapon/flame/lighter/zippo(M), slot_r_store)
M.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/satchel(M), slot_back)
var/obj/item/weapon/card/id/W = new(M)
W.name = "[M.real_name]'s ID Card"
W.icon_state = "centcom"
W.access = get_all_accesses()
W.access += get_all_centcom_access()
W.assignment = "Special Operations Officer"
W.registered_name = M.real_name
M.equip_to_slot_or_del(W, slot_wear_id)
if("blue wizard")
M.equip_to_slot_or_del(new /obj/item/clothing/under/lightpurple(M), slot_w_uniform)
M.equip_to_slot_or_del(new /obj/item/clothing/suit/wizrobe(M), slot_wear_suit)
M.equip_to_slot_or_del(new /obj/item/clothing/shoes/sandal(M), slot_shoes)
M.equip_to_slot_or_del(new /obj/item/device/radio/headset(M), slot_l_ear)
M.equip_to_slot_or_del(new /obj/item/clothing/head/wizard(M), slot_head)
M.equip_to_slot_or_del(new /obj/item/weapon/teleportation_scroll(M), slot_r_store)
M.equip_to_slot_or_del(new /obj/item/weapon/spellbook(M), slot_r_hand)
M.equip_to_slot_or_del(new /obj/item/weapon/staff(M), slot_l_hand)
M.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack(M), slot_back)
M.equip_to_slot_or_del(new /obj/item/weapon/storage/box(M), slot_in_backpack)
if("red wizard")
M.equip_to_slot_or_del(new /obj/item/clothing/under/lightpurple(M), slot_w_uniform)
M.equip_to_slot_or_del(new /obj/item/clothing/suit/wizrobe/red(M), slot_wear_suit)
M.equip_to_slot_or_del(new /obj/item/clothing/shoes/sandal(M), slot_shoes)
M.equip_to_slot_or_del(new /obj/item/device/radio/headset(M), slot_l_ear)
M.equip_to_slot_or_del(new /obj/item/clothing/head/wizard/red(M), slot_head)
M.equip_to_slot_or_del(new /obj/item/weapon/teleportation_scroll(M), slot_r_store)
M.equip_to_slot_or_del(new /obj/item/weapon/spellbook(M), slot_r_hand)
M.equip_to_slot_or_del(new /obj/item/weapon/staff(M), slot_l_hand)
M.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack(M), slot_back)
M.equip_to_slot_or_del(new /obj/item/weapon/storage/box(M), slot_in_backpack)
if("marisa wizard")
M.equip_to_slot_or_del(new /obj/item/clothing/under/lightpurple(M), slot_w_uniform)
M.equip_to_slot_or_del(new /obj/item/clothing/suit/wizrobe/marisa(M), slot_wear_suit)
M.equip_to_slot_or_del(new /obj/item/clothing/shoes/sandal/marisa(M), slot_shoes)
M.equip_to_slot_or_del(new /obj/item/device/radio/headset(M), slot_l_ear)
M.equip_to_slot_or_del(new /obj/item/clothing/head/wizard/marisa(M), slot_head)
M.equip_to_slot_or_del(new /obj/item/weapon/teleportation_scroll(M), slot_r_store)
M.equip_to_slot_or_del(new /obj/item/weapon/spellbook(M), slot_r_hand)
M.equip_to_slot_or_del(new /obj/item/weapon/staff(M), slot_l_hand)
M.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack(M), slot_back)
M.equip_to_slot_or_del(new /obj/item/weapon/storage/box(M), slot_in_backpack)
if("soviet admiral")
M.equip_to_slot_or_del(new /obj/item/clothing/head/hgpiratecap(M), slot_head)
M.equip_to_slot_or_del(new /obj/item/clothing/shoes/combat(M), slot_shoes)
M.equip_to_slot_or_del(new /obj/item/clothing/gloves/combat(M), slot_gloves)
M.equip_to_slot_or_del(new /obj/item/device/radio/headset/heads/captain(M), slot_l_ear)
M.equip_to_slot_or_del(new /obj/item/clothing/glasses/eyepatch/hud/thermal(M), slot_glasses)
M.equip_to_slot_or_del(new /obj/item/clothing/suit/hgpirate(M), slot_wear_suit)
M.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/satchel(M), slot_back)
M.equip_to_slot_or_del(new /obj/item/weapon/gun/projectile/revolver/mateba(M), slot_belt)
M.equip_to_slot_or_del(new /obj/item/clothing/under/soviet(M), slot_w_uniform)
var/obj/item/weapon/card/id/W = new(M)
W.name = "[M.real_name]'s ID Card"
W.icon_state = "centcom"
W.access = get_all_station_access()
W.access += get_all_centcom_access()
W.assignment = "Admiral"
W.registered_name = M.real_name
M.equip_to_slot_or_del(W, slot_wear_id)
else
var/datum/outfit/O = choices[dresscode]
if(O)
M.preEquipOutfit(O,FALSE)
M.equipOutfit(O,FALSE)
M.regenerate_icons()
@@ -7,6 +7,9 @@
/datum/gear_tweak/proc/get_default()
return
/datum/gear_tweak/proc/get_random()
return get_default()
/datum/gear_tweak/proc/tweak_gear_data(var/metadata, var/datum/gear_data)
return
@@ -32,6 +35,9 @@ var/datum/gear_tweak/color/gear_tweak_free_color_choice = new()
/datum/gear_tweak/color/get_default()
return valid_colors ? valid_colors[1] : COLOR_GRAY
/datum/gear_tweak/color/get_random()
return valid_colors ? pick(valid_colors) : COLOR_GRAY
/datum/gear_tweak/color/get_metadata(var/user, var/metadata)
if(valid_colors)
return input(user, "Choose an item color.", "Character Preference", metadata) as null|anything in valid_colors
@@ -59,6 +65,9 @@ Path adjustment
/datum/gear_tweak/path/get_default()
return valid_paths[1]
/datum/gear_tweak/path/get_random()
return pick(valid_paths)
/datum/gear_tweak/path/get_metadata(var/user, var/metadata)
return input(user, "Choose a type.", "Character Preference", metadata) as null|anything in valid_paths
@@ -116,8 +125,6 @@ Content adjustment
/*
Reagents adjustment
*/
/datum/gear_tweak/reagents
var/list/valid_reagents
@@ -238,8 +238,23 @@ var/list/gear_datums = list()
/datum/gear/proc/spawn_item(var/location, var/metadata)
var/datum/gear_data/gd = new(path, location)
for(var/datum/gear_tweak/gt in gear_tweaks)
gt.tweak_gear_data(metadata["[gt]"], gd)
if(metadata["[gt]"])
gt.tweak_gear_data(metadata["[gt]"], gd)
else
gt.tweak_gear_data(gt.get_default(), gd)
var/item = new gd.path(gd.location)
for(var/datum/gear_tweak/gt in gear_tweaks)
gt.tweak_item(item, metadata["[gt]"])
if(metadata["[gt]"])
gt.tweak_item(item, metadata["[gt]"])
else
gt.tweak_item(item, gt.get_default())
return item
/datum/gear/proc/spawn_random(var/location)
var/datum/gear_data/gd = new(path, location)
for(var/datum/gear_tweak/gt in gear_tweaks)
gt.tweak_gear_data(gt.get_random(), gd)
var/item = new gd.path(gd.location)
for(var/datum/gear_tweak/gt in gear_tweaks)
gt.tweak_item(item, gt.get_random())
return item
+3
View File
@@ -8,6 +8,9 @@
heat_protection = FEET
max_heat_protection_temperature = SHOE_MAX_HEAT_PROTECTION_TEMPERATURE
/obj/item/clothing/shoes/black/noslip
item_flags = NOSLIP
/obj/item/clothing/shoes/brown
name = "brown shoes"
desc = "A pair of brown shoes."
+4 -4
View File
@@ -206,9 +206,9 @@
continue
// Check for required access.
var/obj/item/weapon/card/id/current_id = M.wear_id
var/obj/item/I = M.wear_id
if(citem.req_access && citem.req_access > 0)
if(!(istype(current_id) && (citem.req_access in current_id.access)))
if(!(istype(I) && (citem.req_access in I.GetAccess())))
continue
// Check for required job title.
@@ -224,8 +224,8 @@
// ID cards and PDAs are applied directly to the existing object rather than spawned fresh.
var/obj/item/existing_item
if(citem.item_path == /obj/item/weapon/card/id && istype(current_id)) //Set earlier.
existing_item = M.wear_id
if(citem.item_path == /obj/item/weapon/card/id)
existing_item = locate(/obj/item/weapon/card/id) in M.get_contents() //TODO: Improve this ?
else if(citem.item_path == /obj/item/device/pda)
existing_item = locate(/obj/item/device/pda) in M.contents
-98
View File
@@ -1,98 +0,0 @@
/datum/job/intern_sec
title = "Security Cadet"
flag = INTERN_SEC
department_flag = ENGSEC
faction = "Station"
total_positions = 2
spawn_positions = 2
supervisors = "the Head of Security"
selection_color = "#ffeeee"
access = list(access_security, access_sec_doors, access_maint_tunnels)
minimal_access = list(access_security, access_sec_doors, access_maint_tunnels)
bag_type = /obj/item/weapon/storage/backpack/security
satchel_type = /obj/item/weapon/storage/backpack/satchel_sec
duffel_type = /obj/item/weapon/storage/backpack/duffel/sec
messenger_bag_type = /obj/item/weapon/storage/backpack/messenger/sec
equip(var/mob/living/carbon/human/H)
if(!H) return 0
H.equip_to_slot_or_del(new /obj/item/clothing/under/rank/security2(H), slot_w_uniform)
H.equip_to_slot_or_del(new /obj/item/clothing/shoes/jackboots(H), slot_shoes)
H.equip_to_slot_or_del(new /obj/item/device/radio/headset/headset_sec(H), slot_l_ear)
H.equip_to_slot_or_del(new /obj/item/clothing/head/beret/sec(H), slot_head)
return 1
/datum/job/intern_med
title = "Medical Resident"
flag = INTERN_MED
department_flag = MEDSCI
faction = "Station"
total_positions = 2
spawn_positions = 2
supervisors = "the Chief Medical Officer"
selection_color = "#ffeef0"
access = list(access_medical, access_surgery, access_medical_equip)
minimal_access = list(access_medical, access_surgery, access_medical_equip)
alt_titles = list("Medical Intern")
bag_type = /obj/item/weapon/storage/backpack/medic
satchel_type = /obj/item/weapon/storage/backpack/satchel_med
duffel_type = /obj/item/weapon/storage/backpack/duffel/med
messenger_bag_type = /obj/item/weapon/storage/backpack/messenger/med
equip(var/mob/living/carbon/human/H)
if(!H) return 0
H.equip_to_slot_or_del(new /obj/item/clothing/under/rank/medical(H), slot_w_uniform)
H.equip_to_slot_or_del(new /obj/item/clothing/shoes/white(H), slot_shoes)
H.equip_to_slot_or_del(new /obj/item/device/radio/headset/headset_med(H), slot_l_ear)
return 1
/datum/job/intern_sci
title = "Lab Assistant"
flag = INTERN_SCI
department_flag = MEDSCI
faction = "Station"
total_positions = 2
spawn_positions = 2
supervisors = "the Research Director"
selection_color = "#ffeeff"
access = list(access_research, access_tox)
minimal_access = list(access_research, access_tox)
bag_type = /obj/item/weapon/storage/backpack/toxins
satchel_type = /obj/item/weapon/storage/backpack/satchel_tox
duffel_type = /obj/item/weapon/storage/backpack/duffel/tox
messenger_bag_type = /obj/item/weapon/storage/backpack/messenger/tox
equip(var/mob/living/carbon/human/H)
if(!H) return 0
H.equip_to_slot_or_del(new /obj/item/clothing/under/rank/scientist(H), slot_w_uniform)
H.equip_to_slot_or_del(new /obj/item/clothing/shoes/white(H), slot_shoes)
H.equip_to_slot_or_del(new /obj/item/device/radio/headset/headset_sci(H), slot_l_ear)
return 1
/datum/job/intern_eng
title = "Engineering Apprentice"
flag = INTERN_ENG
department_flag = ENGSEC
faction = "Station"
total_positions = 2
spawn_positions = 2
supervisors = "the Chief Engineer"
selection_color = "#fff5cc"
access = list(access_maint_tunnels, access_construction, access_engine_equip, access_engine)
minimal_access = list(access_maint_tunnels, access_construction, access_engine_equip, access_engine)
bag_type = /obj/item/weapon/storage/backpack/industrial
satchel_type = /obj/item/weapon/storage/backpack/satchel_eng
duffel_type = /obj/item/weapon/storage/backpack/duffel/eng
messenger_bag_type = /obj/item/weapon/storage/backpack/messenger/engi
equip(var/mob/living/carbon/human/H)
if(!H) return 0
H.equip_to_slot_or_del(new /obj/item/clothing/under/rank/engineer(H), slot_w_uniform)
H.equip_to_slot_or_del(new /obj/item/clothing/shoes/orange(H), slot_shoes)
H.equip_to_slot_or_del(new /obj/item/clothing/head/beret/engineering(H), slot_head)
H.equip_to_slot_or_del(new /obj/item/device/radio/headset/headset_eng(H), slot_l_ear)
return 1
@@ -425,9 +425,6 @@ INITIALIZE_IMMEDIATE(/mob/abstract/new_player)
if(mind)
mind.active = 0 //we wish to transfer the key manually
if(mind.assigned_role == "Clown") //give them a clownname if they are a clown
new_character.real_name = pick(clown_names) //I hate this being here of all places but unfortunately dna is based on real_name!
new_character.rename_self("clown")
mind.original = new_character
mind.transfer_to(new_character) //won't transfer key since the mind is not active
+51 -2
View File
@@ -29,7 +29,7 @@
qdel(W)
else
if(!disable_warning)
src << "<span class='warning'>You are unable to equip that.</span>" //Only print if del_on_fail is false
to_chat(src, "<span class='warning'>You are unable to equip [W].</span>") //Only print if del_on_fail is false
return 0
equip_to_slot(W, slot, redraw_mob) //This proc should not ever fail.
@@ -43,7 +43,29 @@
//This is just a commonly used configuration for the equip_to_slot_if_possible() proc, used to equip people when the rounds tarts and when events happen and such.
/mob/proc/equip_to_slot_or_del(obj/item/W as obj, slot)
. = equip_to_slot_if_possible(W, slot, TRUE, TRUE, FALSE, ignore_blocked = TRUE)
. = equip_to_slot_if_possible(W, slot, TRUE, TRUE, FALSE, TRUE)
// Convinience proc. Collects crap that fails to equip either onto the mob's back, or drops it.
// Used in job equipping so shit doesn't pile up at the start loc.
/mob/living/carbon/human/proc/equip_or_collect(var/obj/item/W, var/slot)
if(!istype(W))
log_debug("MobEquip: Error when equipping [W] for [src] in [slot]")
return
if(W.mob_can_equip(src, slot, TRUE, TRUE))
//Mob can equip. Equip it.
equip_to_slot_or_del(W, slot)
else
//Mob can't equip it. Put it their backpack or toss it on the floor
if(istype(back, /obj/item/weapon/storage))
var/obj/item/weapon/storage/S = back
//Now, B represents a container we can insert W into.
S.handle_item_insertion(W,1)
return S
var/turf/T = get_turf(src)
if(istype(T))
W.forceMove(T)
return T
//The list of slots by priority. equip_to_appropriate_slot() uses this list. Doesn't matter if a mob type doesn't have a slot.
var/list/slot_equipment_priority = list( \
@@ -345,3 +367,30 @@ var/list/slot_equipment_priority = list( \
qdel(entry)
/mob/living/carbon/human/proc/equipOutfit(outfit, visualsOnly = FALSE)
var/datum/outfit/O = null
if(ispath(outfit))
O = new outfit
else
O = outfit
if(!istype(O))
return FALSE
if(!O)
return FALSE
return O.equip(src, visualsOnly)
/mob/living/carbon/human/proc/preEquipOutfit(outfit, visualsOnly = FALSE)
var/datum/outfit/O = null
if(ispath(outfit))
O = new outfit
else
O = outfit
if(!istype(O))
return FALSE
if(!O)
return FALSE
return O.pre_equip(src, visualsOnly)
+1 -1
View File
@@ -320,7 +320,7 @@
/mob/living/bot/farmbot/proc/check_tank()
if(!tank)
return FALSE
return ((!target && refills_water && tank.reagents.total_volume < tank.reagents.maximum_volume) || ((tank.reagents.total_volume ) / reagents.maximum_volume) <= 0.3)
return ((!target && refills_water && tank.reagents.total_volume < tank.reagents.maximum_volume) || ((tank.reagents.total_volume ) / tank.reagents.maximum_volume) <= 0.3)
/obj/item/weapon/farmbot_arm_assembly
name = "water tank/robot arm assembly"
@@ -70,7 +70,7 @@
default_h_style = "Short Vox Quills"
/datum/species/vox/equip_survival_gear(var/mob/living/carbon/human/H)
/datum/species/vox/before_equip(mob/living/carbon/human/H, visualsOnly, datum/job/J)
H.equip_to_slot_or_del(new /obj/item/clothing/mask/breath(H), slot_wear_mask)
if(H.backbag == 1)
H.equip_to_slot_or_del(new /obj/item/weapon/tank/nitrogen(H), slot_back)
@@ -267,13 +267,11 @@
return "unknown"
return species_language.get_random_name(gender)
/datum/species/proc/equip_survival_gear(var/mob/living/carbon/human/H,var/extendedtank = 1)
if(H.backbag == 1)
if (extendedtank) H.equip_to_slot_or_del(new /obj/item/weapon/storage/box/engineer(H), slot_r_hand)
else H.equip_to_slot_or_del(new /obj/item/weapon/storage/box/survival(H), slot_r_hand)
else
if (extendedtank) H.equip_to_slot_or_del(new /obj/item/weapon/storage/box/engineer(H.back), slot_in_backpack)
else H.equip_to_slot_or_del(new /obj/item/weapon/storage/box/survival(H.back), slot_in_backpack)
/datum/species/proc/before_equip(mob/living/carbon/human/H, visualsOnly = FALSE, datum/job/J)
return
/datum/species/proc/after_equip(mob/living/carbon/human/H, visualsOnly = FALSE, datum/job/J)
return
/datum/species/proc/create_organs(var/mob/living/carbon/human/H) //Handles creation of mob organs.
@@ -65,7 +65,8 @@
/datum/species/machine/shell/handle_death(var/mob/living/carbon/human/H)
return
/datum/species/machine/shell/equip_survival_gear(var/mob/living/carbon/human/H)
/datum/species/machine/shell/before_equip(var/mob/living/carbon/human/H)
. = ..()
check_tag(H, H.client)
/datum/species/machine/industrial
@@ -119,8 +119,8 @@
move_trail = /obj/effect/decal/cleanable/blood/tracks/claw
/datum/species/unathi/equip_survival_gear(var/mob/living/carbon/human/H)
..()
/datum/species/unathi/before_equip(var/mob/living/carbon/human/H)
. = ..()
var/obj/item/clothing/shoes/sandal/S = new /obj/item/clothing/shoes/sandal(H)
if(H.equip_to_slot_or_del(S,slot_shoes))
S.autodrobe_no_remove = 1
@@ -191,8 +191,8 @@
default_h_style = "Tajaran Ears"
/datum/species/tajaran/equip_survival_gear(var/mob/living/carbon/human/H)
..()
/datum/species/tajaran/before_equip(var/mob/living/carbon/human/H)
. = ..()
var/obj/item/clothing/shoes/sandal/S = new /obj/item/clothing/shoes/sandal(H)
if(H.equip_to_slot_or_del(S,slot_shoes))
S.autodrobe_no_remove = 1
@@ -379,7 +379,8 @@
return 1
return 0
/datum/species/diona/equip_survival_gear(var/mob/living/carbon/human/H)
/datum/species/diona/before_equip(var/mob/living/carbon/human/H)
. = ..()
var/obj/item/device/flashlight/flare/F = new /obj/item/device/flashlight/flare(H)
if(H.backbag == 1)
H.equip_to_slot_or_del(F, slot_r_hand)
@@ -641,7 +642,8 @@ datum/species/machine/handle_post_spawn(var/mob/living/carbon/human/H)
if ("yellow IPC screen")
return LIGHT_COLOR_YELLOW
/datum/species/machine/equip_survival_gear(var/mob/living/carbon/human/H)
/datum/species/machine/before_equip(var/mob/living/carbon/human/H)
. = ..()
check_tag(H, H.client)
H.gender = NEUTER
@@ -746,7 +748,8 @@ datum/species/machine/handle_post_spawn(var/mob/living/carbon/human/H)
move_trail = /obj/effect/decal/cleanable/blood/tracks/claw
/datum/species/bug/equip_survival_gear(var/mob/living/carbon/human/H)
/datum/species/bug/before_equip(var/mob/living/carbon/human/H)
. = ..()
H.gender = NEUTER
if(H.backbag == 1)
H.equip_to_slot_or_del(new /obj/item/weapon/storage/box/vaurca(H), slot_r_hand)
@@ -78,9 +78,6 @@
/mob/living/carbon/human/proc/hivenet
)
/datum/species/bug/type_c/equip_survival_gear(var/mob/living/carbon/human/H)
return
/datum/species/bug/type_c/handle_post_spawn(var/mob/living/carbon/human/H)
..()
H.gender = FEMALE
@@ -154,9 +151,6 @@
"filtration bit" = /obj/item/organ/vaurca/filtrationbit
)
/datum/species/bug/type_big/equip_survival_gear(var/mob/living/carbon/human/H)
return
/datum/species/bug/type_big/handle_post_spawn(var/mob/living/carbon/human/H)
H.mutations.Add(HULK)
return ..()