From 1c77dda5524495f5ec0732379a2d09b4d0f7e9d0 Mon Sep 17 00:00:00 2001 From: Arokha Sieyes Date: Sat, 14 May 2016 18:02:36 -0400 Subject: [PATCH 1/4] Adds centcom jobs, headset, PDA, as-of-yet unused hud_vr soon-to-be-used --- code/game/jobs/access.dm | 4 +- code/game/jobs/job/special.dm | 83 +++++++++++++++++++ code/game/objects/items/devices/PDA/PDA_vr.dm | 5 ++ .../objects/items/devices/radio/headset_vr.dm | 13 +++ code/modules/clothing/glasses/hud_vr.dm | 0 vorestation.dme | 4 + 6 files changed, 108 insertions(+), 1 deletion(-) create mode 100644 code/game/jobs/job/special.dm create mode 100644 code/game/objects/items/devices/PDA/PDA_vr.dm create mode 100644 code/game/objects/items/devices/radio/headset_vr.dm create mode 100644 code/modules/clothing/glasses/hud_vr.dm diff --git a/code/game/jobs/access.dm b/code/game/jobs/access.dm index d95c555e0f7..074d90f6824 100644 --- a/code/game/jobs/access.dm +++ b/code/game/jobs/access.dm @@ -188,7 +188,9 @@ "BlackOps Commander", "Supreme Commander", "Emergency Response Team", - "Emergency Response Team Leader") + "Emergency Response Team Leader", + "Centcom Visitor", + "Centcom Officer") /mob/proc/GetIdCard() return null diff --git a/code/game/jobs/job/special.dm b/code/game/jobs/job/special.dm new file mode 100644 index 00000000000..f5a18e2f0b1 --- /dev/null +++ b/code/game/jobs/job/special.dm @@ -0,0 +1,83 @@ +/datum/job/centcom_officer //For Business + title = "Centcom Officer" + department = "Command" + head_position = 1 + faction = "Station" + total_positions = 2 + spawn_positions = 1 + supervisors = "company officials and Corporate Regulations" + selection_color = "#1D1D4F" + idtype = /obj/item/weapon/card/id/centcom + access = list() + minimal_access = list() + minimal_player_age = 14 + economic_modifier = 20 + whitelist_only = 1 + + minimum_character_age = 25 + ideal_character_age = 40 + + equip(var/mob/living/carbon/human/H) + if(!H) return 0 + H.equip_to_slot_or_del(new /obj/item/device/radio/headset/centcom(H), slot_l_ear) + switch(H.backbag) + if(2) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack(H), slot_back) + if(3) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/satchel(H), slot_back) + if(4) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/satchel(H), slot_back) + H.equip_to_slot_or_del(new /obj/item/clothing/under/rank/centcom, slot_w_uniform) + H.equip_to_slot_or_del(new /obj/item/device/pda/centcom(H), slot_belt) + H.equip_to_slot_or_del(new /obj/item/clothing/shoes/laceup(H), slot_shoes) + H.equip_to_slot_or_del(new /obj/item/clothing/gloves/white(H), slot_gloves) + H.equip_to_slot_or_del(new /obj/item/clothing/head/beret/centcom/officer(H), slot_head) + H.equip_to_slot_or_del(new /obj/item/clothing/glasses/hud/security(H), slot_l_store) + + H.implant_loyalty() + + return 1 + + get_access() + var/access = get_all_station_access() + access += list("VIP Guest","Custodian","Thunderdome Overseer","Intel Officer","Medical Officer","Death Commando","Research Officer") + return access + +/datum/job/centcom_visitor //For Pleasure + title = "Centcom Visitor" + department = "Civilian" + head_position = 1 + faction = "Station" + total_positions = 2 + spawn_positions = 1 + supervisors = "company officials and Corporate Regulations" + selection_color = "#1D1D4F" + idtype = /obj/item/weapon/card/id/centcom + access = list() + minimal_access = list() + minimal_player_age = 14 + economic_modifier = 20 + whitelist_only = 1 + + minimum_character_age = 25 + ideal_character_age = 40 + + equip(var/mob/living/carbon/human/H) + if(!H) return 0 + H.equip_to_slot_or_del(new /obj/item/device/radio/headset/centcom(H), slot_l_ear) + switch(H.backbag) + if(2) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack(H), slot_back) + if(3) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/satchel(H), slot_back) + if(4) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/satchel(H), slot_back) + H.equip_to_slot_or_del(new /obj/item/clothing/under/rank/centcom, slot_w_uniform) + H.equip_to_slot_or_del(new /obj/item/device/pda/centcom(H), slot_belt) + H.equip_to_slot_or_del(new /obj/item/clothing/shoes/laceup(H), slot_shoes) + H.equip_to_slot_or_del(new /obj/item/clothing/gloves/white(H), slot_gloves) + H.equip_to_slot_or_del(new /obj/item/clothing/head/beret/centcom/officer(H), slot_head) + H.equip_to_slot_or_del(new /obj/item/clothing/glasses/hud/security(H), slot_l_store) + + H.implant_loyalty() + + return 1 + + get_access() + var/access = get_all_station_access() + access += list("VIP Guest","Custodian","Thunderdome Overseer","Intel Officer","Medical Officer","Death Commando","Research Officer") + return access diff --git a/code/game/objects/items/devices/PDA/PDA_vr.dm b/code/game/objects/items/devices/PDA/PDA_vr.dm new file mode 100644 index 00000000000..037c9777acb --- /dev/null +++ b/code/game/objects/items/devices/PDA/PDA_vr.dm @@ -0,0 +1,5 @@ +/obj/item/device/pda/centcom + default_cartridge = /obj/item/weapon/cartridge/captain + icon_state = "pda-h" + detonate = 0 +// hidden = 1 \ No newline at end of file diff --git a/code/game/objects/items/devices/radio/headset_vr.dm b/code/game/objects/items/devices/radio/headset_vr.dm new file mode 100644 index 00000000000..6ead61ead1b --- /dev/null +++ b/code/game/objects/items/devices/radio/headset_vr.dm @@ -0,0 +1,13 @@ +/obj/item/device/radio/headset/centcom + name = "centcom radio headset" + desc = "The headset of the boss's boss." + icon_state = "com_headset" + item_state = "headset" + ks2type = /obj/item/device/encryptionkey/ert + +/obj/item/device/radio/headset/centcom/alt + name = "centcom bowman headset" + desc = "The headset of the boss's boss." + icon_state = "com_headset_alt" + item_state = "com_headset_alt" + ks2type = /obj/item/device/encryptionkey/ert \ No newline at end of file diff --git a/code/modules/clothing/glasses/hud_vr.dm b/code/modules/clothing/glasses/hud_vr.dm new file mode 100644 index 00000000000..e69de29bb2d diff --git a/vorestation.dme b/vorestation.dme index 717aa4dfb9a..ee2c666eb35 100644 --- a/vorestation.dme +++ b/vorestation.dme @@ -378,6 +378,7 @@ #include "code\game\jobs\job\science.dm" #include "code\game\jobs\job\security.dm" #include "code\game\jobs\job\silicon.dm" +#include "code\game\jobs\job\special.dm" #include "code\game\machinery\adv_med.dm" #include "code\game\machinery\adv_med_vr.dm" #include "code\game\machinery\ai_slipper.dm" @@ -649,11 +650,13 @@ #include "code\game\objects\items\devices\PDA\cart.dm" #include "code\game\objects\items\devices\PDA\chatroom.dm" #include "code\game\objects\items\devices\PDA\PDA.dm" +#include "code\game\objects\items\devices\PDA\PDA_vr.dm" #include "code\game\objects\items\devices\PDA\radio.dm" #include "code\game\objects\items\devices\radio\beacon.dm" #include "code\game\objects\items\devices\radio\electropack.dm" #include "code\game\objects\items\devices\radio\encryptionkey.dm" #include "code\game\objects\items\devices\radio\headset.dm" +#include "code\game\objects\items\devices\radio\headset_vr.dm" #include "code\game\objects\items\devices\radio\intercom.dm" #include "code\game\objects\items\devices\radio\radio.dm" #include "code\game\objects\items\robot\robot_items.dm" @@ -1039,6 +1042,7 @@ #include "code\modules\clothing\ears\skrell.dm" #include "code\modules\clothing\glasses\glasses.dm" #include "code\modules\clothing\glasses\hud.dm" +#include "code\modules\clothing\glasses\hud_vr.dm" #include "code\modules\clothing\gloves\arm_guards.dm" #include "code\modules\clothing\gloves\boxing.dm" #include "code\modules\clothing\gloves\color.dm" From 9da2307e3f2cd22386d94a363d60afb44818b287 Mon Sep 17 00:00:00 2001 From: Arokha Sieyes Date: Sat, 14 May 2016 17:50:12 -0400 Subject: [PATCH 2/4] Fixes Loyalty Implants Why would you define a proc on /mob/living/carbon/human for implanting something then ask to be passed your own src? Also why would you try to pass /job/datums as something to implant? Silly. --- code/datums/mind.dm | 2 +- code/game/antagonist/outsider/deathsquad.dm | 2 +- code/game/jobs/job/captain.dm | 2 +- code/game/jobs/job/civilian.dm | 2 +- code/game/jobs/job/security.dm | 2 +- code/modules/mob/living/carbon/human/human.dm | 14 +++++++------- 6 files changed, 12 insertions(+), 12 deletions(-) diff --git a/code/datums/mind.dm b/code/datums/mind.dm index fb5a2e754c9..824b52a2fe3 100644 --- a/code/datums/mind.dm +++ b/code/datums/mind.dm @@ -344,7 +344,7 @@ log_admin("[key_name_admin(usr)] has de-loyalty implanted [current].") if("add") H << "You somehow have become the recepient of a loyalty transplant, and it just activated!" - H.implant_loyalty(H, override = TRUE) + H.implant_loyalty(override = TRUE) log_admin("[key_name_admin(usr)] has loyalty implanted [current].") else else if (href_list["silicon"]) diff --git a/code/game/antagonist/outsider/deathsquad.dm b/code/game/antagonist/outsider/deathsquad.dm index 4cc8afff6ce..3a61152ab2b 100644 --- a/code/game/antagonist/outsider/deathsquad.dm +++ b/code/game/antagonist/outsider/deathsquad.dm @@ -49,7 +49,7 @@ var/datum/antagonist/deathsquad/deathsquad player.equip_to_slot_or_del(new /obj/item/weapon/gun/energy/pulse_rifle(player), slot_r_hand) player.equip_to_slot_or_del(new /obj/item/weapon/rig/ert/assetprotection(player), slot_back) player.equip_to_slot_or_del(new /obj/item/weapon/melee/energy/sword(player), slot_s_store) - player.implant_loyalty(player) + player.implant_loyalty() var/obj/item/weapon/card/id/id = create_id("Asset Protection", player) if(id) diff --git a/code/game/jobs/job/captain.dm b/code/game/jobs/job/captain.dm index d3a9246238e..015441f32f0 100644 --- a/code/game/jobs/job/captain.dm +++ b/code/game/jobs/job/captain.dm @@ -44,7 +44,7 @@ var/datum/announcement/minor/captain_announcement = new(do_newscast = 1) H.equip_to_slot_or_del(new /obj/item/weapon/storage/box/ids(H.back), slot_in_backpack) - H.implant_loyalty(src) + H.implant_loyalty() return 1 diff --git a/code/game/jobs/job/civilian.dm b/code/game/jobs/job/civilian.dm index 64dc22615ee..f4c3ca9e1bc 100644 --- a/code/game/jobs/job/civilian.dm +++ b/code/game/jobs/job/civilian.dm @@ -263,7 +263,7 @@ H.equip_to_slot_or_del(new /obj/item/device/pda/lawyer(H), slot_belt) H.equip_to_slot_or_del(new /obj/item/weapon/storage/briefcase(H), slot_l_hand) - H.implant_loyalty(H) + H.implant_loyalty() return 1 diff --git a/code/game/jobs/job/security.dm b/code/game/jobs/job/security.dm index 31884169f6c..dfb3659e0d6 100644 --- a/code/game/jobs/job/security.dm +++ b/code/game/jobs/job/security.dm @@ -41,7 +41,7 @@ H.equip_to_slot_or_del(new /obj/item/weapon/handcuffs(H), slot_l_store) else H.equip_to_slot_or_del(new /obj/item/weapon/handcuffs(H), slot_in_backpack) - H.implant_loyalty(H) + H.implant_loyalty() return 1 diff --git a/code/modules/mob/living/carbon/human/human.dm b/code/modules/mob/living/carbon/human/human.dm index 56482186b44..47853089cf0 100644 --- a/code/modules/mob/living/carbon/human/human.dm +++ b/code/modules/mob/living/carbon/human/human.dm @@ -150,21 +150,21 @@ update |= temp.take_damage(b_loss * 0.05, f_loss * 0.05, used_weapon = weapon_message) if(update) UpdateDamageIcon() -/mob/living/carbon/human/proc/implant_loyalty(mob/living/carbon/human/M, override = FALSE) // Won't override by default. +/mob/living/carbon/human/proc/implant_loyalty(override = FALSE) // Won't override by default. if(!config.use_loyalty_implants && !override) return // Nuh-uh. - var/obj/item/weapon/implant/loyalty/L = new/obj/item/weapon/implant/loyalty(M) - L.imp_in = M + var/obj/item/weapon/implant/loyalty/L = new/obj/item/weapon/implant/loyalty(src) + L.imp_in = src L.implanted = 1 - var/obj/item/organ/external/affected = M.organs_by_name[BP_HEAD] + var/obj/item/organ/external/affected = src.organs_by_name[BP_HEAD] affected.implants += L L.part = affected L.implanted(src) -/mob/living/carbon/human/proc/is_loyalty_implanted(mob/living/carbon/human/M) - for(var/L in M.contents) +/mob/living/carbon/human/proc/is_loyalty_implanted() + for(var/L in src.contents) if(istype(L, /obj/item/weapon/implant/loyalty)) - for(var/obj/item/organ/external/O in M.organs) + for(var/obj/item/organ/external/O in src.organs) if(L in O.implants) return 1 return 0 From 186ae560954b538550c19370da8ab683c3dfa985 Mon Sep 17 00:00:00 2001 From: Arokha Sieyes Date: Sat, 14 May 2016 19:47:45 -0400 Subject: [PATCH 3/4] More on job whitelist, think it's done. --- code/game/jobs/access.dm | 12 ++---- code/game/jobs/job/special.dm | 75 ++++++++++++++++++++++++++++++++++ code/game/jobs/whitelist_vr.dm | 7 ++-- 3 files changed, 82 insertions(+), 12 deletions(-) diff --git a/code/game/jobs/access.dm b/code/game/jobs/access.dm index 074d90f6824..df4059fda46 100644 --- a/code/game/jobs/access.dm +++ b/code/game/jobs/access.dm @@ -188,9 +188,7 @@ "BlackOps Commander", "Supreme Commander", "Emergency Response Team", - "Emergency Response Team Leader", - "Centcom Visitor", - "Centcom Officer") + "Emergency Response Team Leader") /mob/proc/GetIdCard() return null @@ -225,17 +223,15 @@ proc/get_all_job_icons() //For all existing HUD icons var/obj/item/weapon/card/id/I = GetID() if(I) + if(istype(I,/obj/item/weapon/card/id/centcom)) + return "Centcom" + var/job_icons = get_all_job_icons() if(I.assignment in job_icons) //Check if the job has a hud icon return I.assignment if(I.rank in job_icons) return I.rank - var/centcom = get_all_centcom_jobs() - if(I.assignment in centcom) //Return with the NT logo if it is a Centcom job - return "Centcom" - if(I.rank in centcom) - return "Centcom" else return diff --git a/code/game/jobs/job/special.dm b/code/game/jobs/job/special.dm index f5a18e2f0b1..9b5cc7b86fb 100644 --- a/code/game/jobs/job/special.dm +++ b/code/game/jobs/job/special.dm @@ -81,3 +81,78 @@ var/access = get_all_station_access() access += list("VIP Guest","Custodian","Thunderdome Overseer","Intel Officer","Medical Officer","Death Commando","Research Officer") return access + +/datum/job/clown + title = "Clown" + flag = CLOWN + department = "Civilian" + department_flag = CIVILIAN + faction = "Station" + total_positions = -1 + spawn_positions = -1 + supervisors = "the spirit of laughter" + selection_color = "#515151" + economic_modifier = 1 + access = list() + minimal_access = list() + alt_titles = list("Fun Mage","Happiness Witch","Joy Summoner","Asshole") + whitelist_only = 1 + + equip(var/mob/living/carbon/human/H) + if(!H) return 0 + H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/clown(H), slot_back) + H.equip_to_slot_or_del(new /obj/item/clothing/under/rank/clown(H), slot_w_uniform) + H.equip_to_slot_or_del(new /obj/item/clothing/shoes/clown_shoes(H), slot_shoes) + H.equip_to_slot_or_del(new /obj/item/clothing/mask/gas/clown_hat(H), slot_wear_mask) + H.equip_to_slot_or_del(new /obj/item/device/pda/clown(H), slot_belt) + + if(H.backbag > 0) + H.equip_to_slot_or_del(new /obj/item/weapon/stamp/clown(H.back), slot_in_backpack) + else + H.equip_to_slot_or_del(new /obj/item/weapon/stamp/clown(H), slot_l_hand) + + return 1 + +/datum/job/clown/get_access() + if(config.assistant_maint) + return list(access_maint_tunnels) + else + return list() + +/datum/job/mime + title = "Mime" + flag = MIME + department = "Civilian" + department_flag = CIVILIAN + faction = "Station" + total_positions = -1 + spawn_positions = -1 + supervisors = "the spirit of performance" + selection_color = "#515151" + economic_modifier = 1 + access = list() + minimal_access = list() + alt_titles = list("Silent One","The Performer","Kabuki","Asshole") + whitelist_only = 1 + + equip(var/mob/living/carbon/human/H) + if(!H) return 0 + H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack(H), slot_back) + H.equip_to_slot_or_del(new /obj/item/clothing/under/mime(H), slot_w_uniform) + H.equip_to_slot_or_del(new /obj/item/clothing/shoes/mime(H), slot_shoes) + H.equip_to_slot_or_del(new /obj/item/clothing/head/soft/mime(H), slot_head) + H.equip_to_slot_or_del(new /obj/item/clothing/mask/gas/mime(H), slot_wear_mask) + H.equip_to_slot_or_del(new /obj/item/device/pda/mime(H), slot_belt) + + if(H.backbag > 0) + H.equip_to_slot_or_del(new /obj/item/weapon/pen/crayon/mime(H.back), slot_in_backpack) + else + H.equip_to_slot_or_del(new /obj/item/weapon/pen/crayon/mime(H), slot_l_hand) + + return 1 + +/datum/job/mime/get_access() + if(config.assistant_maint) + return list(access_maint_tunnels) + else + return list() diff --git a/code/game/jobs/whitelist_vr.dm b/code/game/jobs/whitelist_vr.dm index f9180a9d256..0fce896808f 100644 --- a/code/game/jobs/whitelist_vr.dm +++ b/code/game/jobs/whitelist_vr.dm @@ -1,8 +1,7 @@ var/list/job_whitelist = list() /hook/startup/proc/loadJobWhitelist() - if(config.usewhitelist) - load_jobwhitelist() + load_jobwhitelist() return 1 /proc/load_jobwhitelist() @@ -24,9 +23,9 @@ var/list/job_whitelist = list() return 0 if(M && rank) for (var/s in job_whitelist) - if(findtext(s,"[M.ckey] - [rank]")) + if(findtext(s,"[lowertext(M.ckey)] - [lowertext(rank)]")) return 1 if(findtext(s,"[M.ckey] - All")) return 1 return 0 - + From 88dd4973c85053d297b00e2e2d6594ea37abb636 Mon Sep 17 00:00:00 2001 From: Arokha Sieyes Date: Sat, 14 May 2016 20:15:27 -0400 Subject: [PATCH 4/4] Hid latejoin_only jobs from occupations screen --- code/game/jobs/job/job_vr.dm | 5 ++++- code/game/jobs/job/special.dm | 4 ++++ .../modules/client/preference_setup/occupation/occupation.dm | 2 +- 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/code/game/jobs/job/job_vr.dm b/code/game/jobs/job/job_vr.dm index ee6a2049c36..d1bb79e7cc3 100644 --- a/code/game/jobs/job/job_vr.dm +++ b/code/game/jobs/job/job_vr.dm @@ -1,3 +1,6 @@ /datum/job + //Requires a ckey to be whitelisted in jobwhitelist.txt var/whitelist_only = 0 - + + //Does not display this job on the occupation setup screen + var/latejoin_only = 0 \ No newline at end of file diff --git a/code/game/jobs/job/special.dm b/code/game/jobs/job/special.dm index 9b5cc7b86fb..87579cbcfac 100644 --- a/code/game/jobs/job/special.dm +++ b/code/game/jobs/job/special.dm @@ -13,6 +13,7 @@ minimal_player_age = 14 economic_modifier = 20 whitelist_only = 1 + latejoin_only = 1 minimum_character_age = 25 ideal_character_age = 40 @@ -55,6 +56,7 @@ minimal_player_age = 14 economic_modifier = 20 whitelist_only = 1 + latejoin_only = 1 minimum_character_age = 25 ideal_character_age = 40 @@ -97,6 +99,7 @@ minimal_access = list() alt_titles = list("Fun Mage","Happiness Witch","Joy Summoner","Asshole") whitelist_only = 1 + latejoin_only = 1 equip(var/mob/living/carbon/human/H) if(!H) return 0 @@ -134,6 +137,7 @@ minimal_access = list() alt_titles = list("Silent One","The Performer","Kabuki","Asshole") whitelist_only = 1 + latejoin_only = 1 equip(var/mob/living/carbon/human/H) if(!H) return 0 diff --git a/code/modules/client/preference_setup/occupation/occupation.dm b/code/modules/client/preference_setup/occupation/occupation.dm index f37f7631cfe..b177b7773f5 100644 --- a/code/modules/client/preference_setup/occupation/occupation.dm +++ b/code/modules/client/preference_setup/occupation/occupation.dm @@ -68,7 +68,7 @@ var/datum/job/lastJob if (!job_master) return for(var/datum/job/job in job_master.occupations) - + if(job.latejoin_only) continue //VOREStation Code index += 1 if((index >= limit) || (job.title in splitJobs)) if((index < limit) && (lastJob != null))