From 2bf89ef4beff6af6caa595acb1d3d3e8acc3e3de Mon Sep 17 00:00:00 2001 From: KorPhaeron Date: Sun, 26 Jul 2015 13:49:50 -0500 Subject: [PATCH 1/4] Chameleon Eyewear --- code/game/gamemodes/gang/gang.dm | 9 ++++- code/game/gamemodes/revolution/revolution.dm | 7 ++++ code/modules/clothing/glasses/glasses.dm | 32 +++++++++++++++-- code/modules/clothing/glasses/hud.dm | 9 +++++ html/changelogs/KOR-PR-CHAMELEON.yml | 37 ++++++++++++++++++++ 5 files changed, 90 insertions(+), 4 deletions(-) create mode 100644 html/changelogs/KOR-PR-CHAMELEON.yml diff --git a/code/game/gamemodes/gang/gang.dm b/code/game/gamemodes/gang/gang.dm index b9ee7887e88..d0ea6e9996c 100644 --- a/code/game/gamemodes/gang/gang.dm +++ b/code/game/gamemodes/gang/gang.dm @@ -106,6 +106,7 @@ var/list/gang_colors_pool = list("red","orange","yellow","green","blue","purple" var/obj/item/device/gangtool/gangtool = new(mob) var/obj/item/weapon/pen/gang/T = new(mob) var/obj/item/toy/crayon/spraycan/gang/SC = new(mob,gang) + var/obj/item/clothing/glasses/hud/security/chameleon/C = new(mob,gang) var/list/slots = list ( "backpack" = slot_in_backpack, @@ -139,8 +140,14 @@ var/list/gang_colors_pool = list("red","orange","yellow","green","blue","purple" . += 1 else mob << "The territory spraycan in your [where3] can be used to claim areas of the station for your gang. The more territory your gang controls, the more influence you get. All gangsters can use these, so distribute them to grow your influence faster." - mob.update_icons() + var/where4 = mob.equip_in_one_of_slots(C, slots) + if (!where4) + mob << "Your Syndicate benefactors were unfortunately unable to get you a chameleon security HUD." + . += 1 + else + mob << "The chameleon security HUD in your [where4] will help you keep track of who is loyalty-implanted, and unable to be recruited." + mob.update_icons() return . diff --git a/code/game/gamemodes/revolution/revolution.dm b/code/game/gamemodes/revolution/revolution.dm index c198a583328..3a3f84d4d02 100644 --- a/code/game/gamemodes/revolution/revolution.dm +++ b/code/game/gamemodes/revolution/revolution.dm @@ -128,6 +128,7 @@ var/obj/item/device/flash/T = new(mob) var/obj/item/toy/crayon/spraycan/R = new(mob) + var/obj/item/clothing/glasses/hud/security/chameleon/C = new(mob) var/list/slots = list ( "backpack" = slot_in_backpack, @@ -137,10 +138,16 @@ "right hand" = slot_r_hand, ) var/where = mob.equip_in_one_of_slots(T, slots) + var/where2 = mob.equip_in_one_of_slots(C, slots) mob.equip_in_one_of_slots(R,slots) mob.update_icons() + if (!where2) + mob << "The Syndicate were unfortunately unable to get you chameleon security HUD." + else + mob << "The chameleon security HUD in your [where] will help you keep track of who is loyalty-implanted, and unable to be recruited." + if (!where) mob << "The Syndicate were unfortunately unable to get you a flash." else diff --git a/code/modules/clothing/glasses/glasses.dm b/code/modules/clothing/glasses/glasses.dm index 48735b7a688..d9048033175 100644 --- a/code/modules/clothing/glasses/glasses.dm +++ b/code/modules/clothing/glasses/glasses.dm @@ -188,12 +188,14 @@ ..() /obj/item/clothing/glasses/thermal/syndi //These are now a traitor item, concealed as mesons. -Pete - name = "Optical Meson Scanner" - desc = "Used by engineering and mining staff to see basic structural and terrain layouts through walls, regardless of lighting condition." - icon_state = "meson" + name = "Chameleon Thermals" + desc = "A pair of thermal optic goggles with an onboard chameleon generator. Toggle to disguise." origin_tech = "magnets=3;syndicate=4" flash_protect = -1 +/obj/item/clothing/glasses/thermal/syndi/attack_self(mob/user) + chameleon(user) + /obj/item/clothing/glasses/thermal/monocle name = "Thermoncle" desc = "A monocle thermal." @@ -230,3 +232,27 @@ icon_state = "redglasses" item_state = "redglasses" + +/obj/item/clothing/glasses/proc/chameleon(var/mob/user) + var/list/glasses_types = typesof(/obj/item/clothing/glasses) - src.type - /obj/item/clothing/glasses/hud - /obj/item/clothing/glasses/night/shadowling - /obj/item/clothing/glasses/hud/toggle - /obj/item/clothing/glasses + var/list/glasses = list() + + // Generate them into a list + for(var/glasses_type in glasses_types) + var/obj/item/clothing/glasses/S = new glasses_type + glasses[capitalize(S.name)] = S + + var/list/show_glasses = list("EXIT" = null) + sortList(glasses) // the list that will be shown to the user to pick from + + var/input_glasses = input(user, "Choose a piece of eyewear to disguise as.", "Choose glasses style.") in show_glasses + + if(user && src in user.contents) + + var/obj/item/clothing/glasses/chosen_glasses = glasses[capitalize(input_glasses)] + + if(chosen_glasses) + name = chosen_glasses.name + icon_state = chosen_glasses.icon_state + item_state = chosen_glasses.item_state + desc = chosen_glasses.desc + diff --git a/code/modules/clothing/glasses/hud.dm b/code/modules/clothing/glasses/hud.dm index 0f7365a3417..c6ac3201107 100644 --- a/code/modules/clothing/glasses/hud.dm +++ b/code/modules/clothing/glasses/hud.dm @@ -46,6 +46,15 @@ icon_state = "securityhud" hud_type = DATA_HUD_SECURITY_ADVANCED +/obj/item/clothing/glasses/hud/security/chameleon + name = "Chamleon Security HUD" + desc = "A stolen security HUD integrated with Syndicate chameleon technology. Toggle to disguise the HUD. Provides flash protection." + flash_protect = 1 + +/obj/item/clothing/glasses/hud/security/chameleon/attack_self(mob/user) + chameleon(user) + + /obj/item/clothing/glasses/hud/security/sunglasses/eyepatch name = "Eyepatch HUD" desc = "A heads-up display that connects directly to the optical nerve of the user, replacing the need for that useless eyeball." diff --git a/html/changelogs/KOR-PR-CHAMELEON.yml b/html/changelogs/KOR-PR-CHAMELEON.yml new file mode 100644 index 00000000000..01af414b942 --- /dev/null +++ b/html/changelogs/KOR-PR-CHAMELEON.yml @@ -0,0 +1,37 @@ +################################ +# Example Changelog File +# +# Note: This file, and files beginning with ".", and files that don't end in ".yml" will not be read. If you change this file, you will look really dumb. +# +# Your changelog will be merged with a master changelog. (New stuff added only, and only on the date entry for the day it was merged.) +# When it is, any changes listed below will disappear. +# +# Valid Prefixes: +# bugfix +# wip (For works in progress) +# tweak +# soundadd +# sounddel +# rscadd (general adding of nice things) +# rscdel (general deleting of nice things) +# imageadd +# imagedel +# spellcheck (typo fixes) +# experiment +# tgs (TG-ported fixes?) +################################# + +# Your name. +author: Kor + +# Optional: Remove this file after generating master changelog. Useful for PR changelogs that won't get used again. +delete-after: True + +# Any changes you've made. See valid prefix list above. +# INDENT WITH TWO SPACES. NOT TABS. SPACES. +# SCREW THIS UP AND IT WON'T WORK. +# Also, this gets changed to [] after reading. Just remove the brackets when you add new shit. +# Please surround your changes in double quotes ("). It works without them, but if you use certain characters it screws up compiling. The quotes will not show up in the changelog. +changes: + - rscadd: "Revheads and Gang leaders now spawn with chameleon security HUDs, for keeping track of loyalty implanted crew." + - rscadd: "Syndicate thermals now have a chameleon function as well, allowing you to disguise the goggles to match your job." From 488ecf1a51c5a6b313fb24bc712d637f1c425146 Mon Sep 17 00:00:00 2001 From: KorPhaeron Date: Sun, 26 Jul 2015 13:58:05 -0500 Subject: [PATCH 2/4] Typo --- code/game/gamemodes/revolution/revolution.dm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/game/gamemodes/revolution/revolution.dm b/code/game/gamemodes/revolution/revolution.dm index 3a3f84d4d02..3877c24af26 100644 --- a/code/game/gamemodes/revolution/revolution.dm +++ b/code/game/gamemodes/revolution/revolution.dm @@ -146,7 +146,7 @@ if (!where2) mob << "The Syndicate were unfortunately unable to get you chameleon security HUD." else - mob << "The chameleon security HUD in your [where] will help you keep track of who is loyalty-implanted, and unable to be recruited." + mob << "The chameleon security HUD in your [where2] will help you keep track of who is loyalty-implanted, and unable to be recruited." if (!where) mob << "The Syndicate were unfortunately unable to get you a flash." From 485203efc53c589e8527b412dcc7f4b06820099c Mon Sep 17 00:00:00 2001 From: KorPhaeron Date: Sun, 26 Jul 2015 16:14:56 -0500 Subject: [PATCH 3/4] typo --- code/game/gamemodes/revolution/revolution.dm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/game/gamemodes/revolution/revolution.dm b/code/game/gamemodes/revolution/revolution.dm index 3877c24af26..81434d27969 100644 --- a/code/game/gamemodes/revolution/revolution.dm +++ b/code/game/gamemodes/revolution/revolution.dm @@ -144,7 +144,7 @@ mob.update_icons() if (!where2) - mob << "The Syndicate were unfortunately unable to get you chameleon security HUD." + mob << "The Syndicate were unfortunately unable to get you a chameleon security HUD." else mob << "The chameleon security HUD in your [where2] will help you keep track of who is loyalty-implanted, and unable to be recruited." From ccbb9c1e5207c3547268d15f0b6b0fff55d4c5a8 Mon Sep 17 00:00:00 2001 From: KorPhaeron Date: Sun, 26 Jul 2015 16:38:00 -0500 Subject: [PATCH 4/4] Redid chameleon proc --- code/modules/clothing/glasses/glasses.dm | 68 +++++++++++++++++------- 1 file changed, 48 insertions(+), 20 deletions(-) diff --git a/code/modules/clothing/glasses/glasses.dm b/code/modules/clothing/glasses/glasses.dm index d9048033175..92645f50a67 100644 --- a/code/modules/clothing/glasses/glasses.dm +++ b/code/modules/clothing/glasses/glasses.dm @@ -234,25 +234,53 @@ /obj/item/clothing/glasses/proc/chameleon(var/mob/user) - var/list/glasses_types = typesof(/obj/item/clothing/glasses) - src.type - /obj/item/clothing/glasses/hud - /obj/item/clothing/glasses/night/shadowling - /obj/item/clothing/glasses/hud/toggle - /obj/item/clothing/glasses - var/list/glasses = list() - - // Generate them into a list - for(var/glasses_type in glasses_types) - var/obj/item/clothing/glasses/S = new glasses_type - glasses[capitalize(S.name)] = S - - var/list/show_glasses = list("EXIT" = null) + sortList(glasses) // the list that will be shown to the user to pick from - - var/input_glasses = input(user, "Choose a piece of eyewear to disguise as.", "Choose glasses style.") in show_glasses + var/input_glasses = input(user, "Choose a piece of eyewear to disguise as.", "Choose glasses style.") as null|anything in list("Sunglasses", "Medical HUD", "Mesons", "Science Goggles", "Glasses", "Security Sunglasses","Eyepatch","Welding","Gar") if(user && src in user.contents) - - var/obj/item/clothing/glasses/chosen_glasses = glasses[capitalize(input_glasses)] - - if(chosen_glasses) - name = chosen_glasses.name - icon_state = chosen_glasses.icon_state - item_state = chosen_glasses.item_state - desc = chosen_glasses.desc - + switch(input_glasses) + if("Sunglasses") + desc = "Strangely ancient technology used to help provide rudimentary eye cover. Enhanced shielding blocks many flashes." + name = "sunglasses" + icon_state = "sun" + item_state = "sunglasses" + if("Medical HUD") + name = "Health Scanner HUD" + desc = "A heads-up display that scans the humans in view and provides accurate data about their health status." + icon_state = "healthhud" + item_state = "healthhud" + if("Mesons") + name = "Optical Meson Scanner" + desc = "Used by engineering and mining staff to see basic structural and terrain layouts through walls, regardless of lighting condition." + icon_state = "meson" + item_state = "meson" + if("Science Goggles") + name = "Science Goggles" + desc = "A pair of snazzy goggles used to protect against chemical spills." + icon_state = "purple" + item_state = "glasses" + if("Glasses") + name = "Prescription Glasses" + desc = "Made by Nerd. Co." + icon_state = "glasses" + item_state = "glasses" + if("Security Sunglasses") + name = "HUDSunglasses" + desc = "Sunglasses with a HUD." + icon_state = "sunhud" + item_state = "sunglasses" + if("Eyepatch") + name = "eyepatch" + desc = "Yarr." + icon_state = "eyepatch" + item_state = "eyepatch" + if("Welding") + name = "welding goggles" + desc = "Protects the eyes from welders; approved by the mad scientist association." + icon_state = "welding-g" + item_state = "welding-g" + if("Gar") + desc = "Just who the hell do you think I am?!" + name = "gar glasses" + icon_state = "gar" + item_state = "gar" +