From a817bd6115a2a97203f353578eac53361ea26b39 Mon Sep 17 00:00:00 2001 From: Ghommie <42542238+Ghommie@users.noreply.github.com> Date: Sat, 7 Mar 2020 00:12:50 +0100 Subject: [PATCH] Porting the musician and curator beacons. --- code/datums/traits/good.dm | 6 +- .../game/objects/items/devices/instruments.dm | 26 ++++++ code/game/objects/items/holy_weapons.dm | 50 +++++------ code/game/objects/items/miscellaneous.dm | 89 +++++++++++++++++++ code/game/objects/items/religion.dm | 6 ++ .../crates_lockers/closets/job_closets.dm | 2 +- code/modules/jobs/job_types/curator.dm | 2 +- code/modules/vending/wardrobes.dm | 26 +++--- 8 files changed, 161 insertions(+), 46 deletions(-) diff --git a/code/datums/traits/good.dm b/code/datums/traits/good.dm index 0d4a6a7b3f..f6ac0e26af 100644 --- a/code/datums/traits/good.dm +++ b/code/datums/traits/good.dm @@ -106,9 +106,9 @@ /datum/quirk/musician/on_spawn() var/mob/living/carbon/human/H = quirk_holder - var/obj/item/instrument/guitar/guitar = new(get_turf(H)) - H.put_in_hands(guitar) - H.equip_to_slot(guitar, SLOT_IN_BACKPACK) + var/obj/item/choice_beacon/music/B = new(get_turf(H)) + H.put_in_hands(B) + H.equip_to_slot(B, SLOT_IN_BACKPACK) var/obj/item/musicaltuner/musicaltuner = new(get_turf(H)) H.put_in_hands(musicaltuner) H.equip_to_slot(musicaltuner, SLOT_IN_BACKPACK) diff --git a/code/game/objects/items/devices/instruments.dm b/code/game/objects/items/devices/instruments.dm index 4c46d064c4..8dedc2cb86 100644 --- a/code/game/objects/items/devices/instruments.dm +++ b/code/game/objects/items/devices/instruments.dm @@ -289,3 +289,29 @@ item_state = "electronic" lefthand_file = 'icons/mob/inhands/misc/devices_lefthand.dmi' righthand_file = 'icons/mob/inhands/misc/devices_righthand.dmi' + +/obj/item/choice_beacon/music + name = "instrument delivery beacon" + desc = "Summon your tool of art." + icon_state = "gangtool-red" + +/obj/item/choice_beacon/music/generate_display_names() + var/static/list/instruments + if(!instruments) + instruments = list() + var/list/templist = list(/obj/item/instrument/violin, + /obj/item/instrument/piano_synth, + /obj/item/instrument/guitar, + /obj/item/instrument/eguitar, + /obj/item/instrument/glockenspiel, + /obj/item/instrument/accordion, + /obj/item/instrument/trumpet, + /obj/item/instrument/saxophone, + /obj/item/instrument/trombone, + /obj/item/instrument/recorder, + /obj/item/instrument/harmonica + ) + for(var/V in templist) + var/atom/A = V + instruments[initial(A.name)] = A + return instruments diff --git a/code/game/objects/items/holy_weapons.dm b/code/game/objects/items/holy_weapons.dm index 4d275e2034..e58bf5d4e4 100644 --- a/code/game/objects/items/holy_weapons.dm +++ b/code/game/objects/items/holy_weapons.dm @@ -51,43 +51,37 @@ item_state = "knight_hospitaller" // CITADEL CHANGES ENDS HERE -/obj/item/holybeacon +/obj/item/choice_beacon/holy name = "armaments beacon" desc = "Contains a set of armaments for the chaplain." - icon = 'icons/obj/device.dmi' - icon_state = "gangtool-red" - item_state = "radio" -/obj/item/holybeacon/attack_self(mob/user) - if(user.mind && (user.mind.isholy) && !GLOB.holy_armor_type) - beacon_armor(user) +/obj/item/choice_beacon/holy/canUseBeacon(mob/living/user) + if(user.mind && user.mind.isholy) + return ..() else playsound(src, 'sound/machines/buzz-sigh.ogg', 40, 1) + return FALSE -/obj/item/holybeacon/proc/beacon_armor(mob/living/L) - var/list/holy_armor_list = typesof(/obj/item/storage/box/holy) - var/list/display_names = list() - for(var/V in holy_armor_list) - var/atom/A = V - display_names += list(initial(A.name) = A) +/obj/item/choice_beacon/holy/generate_display_names() + var/static/list/holy_item_list + if(!holy_item_list) + holy_item_list = list() + var/list/templist = typesof(/obj/item/storage/box/holy) + for(var/V in templist) + var/atom/A = V + holy_item_list[initial(A.name)] = A + return holy_item_list - var/choice = input(L,"What holy armor kit would you like to order?","Holy Armor Theme") as null|anything in display_names - var/turf/T = get_turf(src) - if(!T || QDELETED(src) || !choice || !CHECK_MOBILITY(L, MOBILITY_USE) || !in_range(L, src) || GLOB.holy_armor_type) +/obj/item/choice_beacon/holy/spawn_option(obj/choice,mob/living/M) + if(!GLOB.holy_armor_type) + ..() + playsound(src, 'sound/effects/pray_chaplain.ogg', 40, 1) + SSblackbox.record_feedback("tally", "chaplain_armor", 1, "[choice]") + GLOB.holy_armor_type = choice + else + to_chat(M, "A selection has already been made. Self-Destructing...") return - var/index = display_names.Find(choice) - var/A = holy_armor_list[index] - - GLOB.holy_armor_type = A - var/holy_armor_box = new A(T) - - SSblackbox.record_feedback("tally", "chaplain_armor", 1, "[choice]") - - if(holy_armor_box) - qdel(src) - L.put_in_hands(holy_armor_box) - /obj/item/storage/box/holy name = "Templar Kit" diff --git a/code/game/objects/items/miscellaneous.dm b/code/game/objects/items/miscellaneous.dm index ee169cc661..787a5ad2d8 100644 --- a/code/game/objects/items/miscellaneous.dm +++ b/code/game/objects/items/miscellaneous.dm @@ -12,6 +12,95 @@ w_class = WEIGHT_CLASS_SMALL attack_verb = list("warned", "cautioned", "smashed") +/obj/item/choice_beacon + name = "choice beacon" + desc = "Hey, why are you viewing this?!! Please let Centcom know about this odd occurance." + icon = 'icons/obj/device.dmi' + icon_state = "gangtool-blue" + item_state = "radio" + +/obj/item/choice_beacon/attack_self(mob/user) + if(canUseBeacon(user)) + generate_options(user) + +/obj/item/choice_beacon/proc/generate_display_names() // return the list that will be used in the choice selection. entries should be in (type.name = type) fashion. see choice_beacon/hero for how this is done. + return list() + +/obj/item/choice_beacon/proc/canUseBeacon(mob/living/user) + if(user.canUseTopic(src, BE_CLOSE, FALSE, NO_TK)) + return TRUE + else + playsound(src, 'sound/machines/buzz-sigh.ogg', 40, 1) + return FALSE + +/obj/item/choice_beacon/proc/generate_options(mob/living/M) + var/list/display_names = generate_display_names() + if(!display_names.len) + return + var/choice = input(M,"Which item would you like to order?","Select an Item") as null|anything in display_names + if(!choice || !M.canUseTopic(src, BE_CLOSE, FALSE, NO_TK)) + return + + spawn_option(display_names[choice],M) + qdel(src) + +/obj/item/choice_beacon/proc/spawn_option(obj/choice,mob/living/M) + var/obj/new_item = new choice() + var/obj/structure/closet/supplypod/bluespacepod/pod = new() + pod.explosionSize = list(0,0,0,0) + new_item.forceMove(pod) + var/msg = "After making your selection, you notice a strange target on the ground. It might be best to step back!" + if(ishuman(M)) + var/mob/living/carbon/human/H = M + if(istype(H.ears, /obj/item/radio/headset)) + msg = "You hear something crackle in your ears for a moment before a voice speaks. \"Please stand by for a message from Central Command. Message as follows: Item request received. Your package is inbound, please stand back from the landing site. Message ends.\"" + to_chat(M, msg) + + new /obj/effect/abstract/DPtarget(get_turf(src), pod) + +/obj/item/choice_beacon/hero + name = "heroic beacon" + desc = "To summon heroes from the past to protect the future." + +/obj/item/choice_beacon/hero/generate_display_names() + var/static/list/hero_item_list + if(!hero_item_list) + hero_item_list = list() + var/list/templist = typesof(/obj/item/storage/box/hero) //we have to convert type = name to name = type, how lovely! + for(var/V in templist) + var/atom/A = V + hero_item_list[initial(A.name)] = A + return hero_item_list + + +/obj/item/storage/box/hero + name = "Courageous Tomb Raider - 1940's." + +/obj/item/storage/box/hero/PopulateContents() + new /obj/item/clothing/head/fedora/curator(src) + new /obj/item/clothing/suit/curator(src) + new /obj/item/clothing/under/rank/curator/treasure_hunter(src) + new /obj/item/clothing/shoes/workboots/mining(src) + new /obj/item/melee/curator_whip(src) + +/obj/item/storage/box/hero/astronaut + name = "First Man on the Moon - 1960's." + +/obj/item/storage/box/hero/astronaut/PopulateContents() + new /obj/item/clothing/suit/space/nasavoid(src) + new /obj/item/clothing/head/helmet/space/nasavoid(src) + new /obj/item/tank/internals/emergency_oxygen/double(src) + new /obj/item/gps(src) + +/obj/item/storage/box/hero/scottish + name = "Braveheart, the Scottish rebel - 1300's." + +/obj/item/storage/box/hero/scottish/PopulateContents() + new /obj/item/clothing/under/kilt(src) + new /obj/item/claymore/weak/ceremonial(src) + new /obj/item/toy/crayon/spraycan(src) + new /obj/item/clothing/shoes/sandal(src) + /obj/item/skub desc = "It's skub." name = "skub" diff --git a/code/game/objects/items/religion.dm b/code/game/objects/items/religion.dm index cc466d73fc..b89a2983f5 100644 --- a/code/game/objects/items/religion.dm +++ b/code/game/objects/items/religion.dm @@ -314,3 +314,9 @@ desc = "This one is rusted." force = 30 armour_penetration = 15 + +/obj/item/claymore/weak/ceremonial + desc = "A rusted claymore, once at the heart of a powerful scottish clan struck down and oppressed by tyrants, it has been passed down the ages as a symbol of defiance." + force = 15 + block_chance = 30 + armour_penetration = 5 \ No newline at end of file diff --git a/code/game/objects/structures/crates_lockers/closets/job_closets.dm b/code/game/objects/structures/crates_lockers/closets/job_closets.dm index fae3625ccc..897e921e07 100644 --- a/code/game/objects/structures/crates_lockers/closets/job_closets.dm +++ b/code/game/objects/structures/crates_lockers/closets/job_closets.dm @@ -107,7 +107,7 @@ icon_door = "black" /obj/structure/closet/wardrobe/chaplain_black/PopulateContents() - new /obj/item/holybeacon(src) + new /obj/item/choice_beacon/holy(src) new /obj/item/clothing/accessory/pocketprotector/cosmetology(src) new /obj/item/clothing/under/rank/chaplain(src) new /obj/item/clothing/shoes/sneakers/black(src) diff --git a/code/modules/jobs/job_types/curator.dm b/code/modules/jobs/job_types/curator.dm index 0c762637ac..dc4b23662a 100644 --- a/code/modules/jobs/job_types/curator.dm +++ b/code/modules/jobs/job_types/curator.dm @@ -29,7 +29,7 @@ l_pocket = /obj/item/laser_pointer accessory = /obj/item/clothing/accessory/pocketprotector/full backpack_contents = list( - /obj/item/melee/curator_whip = 1, + /obj/item/choice_beacon/hero = 1, /obj/item/soapstone = 1, /obj/item/barcodescanner = 1 ) diff --git a/code/modules/vending/wardrobes.dm b/code/modules/vending/wardrobes.dm index ba5e511612..f4011d3526 100644 --- a/code/modules/vending/wardrobes.dm +++ b/code/modules/vending/wardrobes.dm @@ -190,17 +190,18 @@ name = "CuraDrobe" desc = "A lowstock vendor only capable of vending clothing for curators and librarians." icon_state = "curadrobe" - product_ads = "Our clothes are endorsed by treasure hunters everywhere!" + product_ads = "Glasses for your eyes and literature for your soul, Curadrobe has it all!; Impress & enthrall your library guests with Curadrobe's extended line of pens!" vend_reply = "Thank you for using the CuraDrobe!" - products = list(/obj/item/clothing/head/fedora/curator = 2, - /obj/item/clothing/suit/curator = 2, - /obj/item/clothing/under/rank/curator/skirt = 2, - /obj/item/clothing/under/gimmick/rank/captain/suit/skirt = 2, - /obj/item/clothing/under/gimmick/rank/head_of_personnel/suit/skirt = 2, - /obj/item/clothing/under/rank/curator/treasure_hunter = 2, - /obj/item/clothing/shoes/workboots/mining = 2, - /obj/item/storage/backpack/satchel/explorer = 2, - /obj/item/storage/bag/books = 2) + products = list(/obj/item/pen = 4, + /obj/item/pen/red = 2, + /obj/item/pen/blue = 2, + /obj/item/pen/fourcolor = 1, + /obj/item/pen/fountain = 2, + /obj/item/clothing/accessory/pocketprotector = 2, + /obj/item/storage/backpack/satchel/explorer = 1, + /obj/item/clothing/glasses/regular = 2, + /obj/item/clothing/glasses/regular/jamjar = 1, + /obj/item/storage/bag/books = 1) refill_canister = /obj/item/vending_refill/wardrobe/curator_wardrobe /obj/item/vending_refill/wardrobe/curator_wardrobe @@ -327,7 +328,7 @@ icon_state = "chapdrobe" product_ads = "Are you being bothered by cultists or pesky revenants? Then come and dress like the holy man!;Clothes for men of the cloth!" vend_reply = "Thank you for using the ChapDrobe!" - products = list(/obj/item/holybeacon = 1, + products = list(/obj/item/choice_beacon/holy = 1, /obj/item/storage/backpack/cultpack = 2, /obj/item/clothing/accessory/pocketprotector/cosmetology = 2, /obj/item/clothing/under/rank/chaplain = 2, @@ -415,7 +416,7 @@ req_access = list(ACCESS_CAPTAIN) vend_reply = "A wonderful day to you, great leader." products = list(/obj/item/clothing/suit/hooded/wintercoat/captain = 1, - /obj/item/storage/backpack/captain = 1, + /obj/item/storage/backpack/captain = 1, /obj/item/storage/backpack/satchel/cap = 1, /obj/item/storage/backpack/duffelbag/captain = 1, /obj/item/clothing/neck/cloak/cap = 1, @@ -436,4 +437,3 @@ /obj/item/vending_refill/wardrobe/cap_wardrobe machine_name = "Captain's Wardrobe" icon_state = "refill_caps" - \ No newline at end of file