From 755d2d711aaac1034495da19980b9df042ff9ce0 Mon Sep 17 00:00:00 2001 From: SkyMarshal Date: Sun, 1 Jan 2012 18:58:28 -0700 Subject: [PATCH] Nuke revamp, some tweaking. --- code/game/communications.dm | 1 + code/game/gamemodes/nuclear/nuclear.dm | 25 ++++--- code/game/objects/devices/PDA/uplink.dm | 8 +++ code/game/objects/items/weapons/explosives.dm | 6 +- .../objects/items/weapons/implants/implant.dm | 66 +++++++++++++++++-- .../items/weapons/implants/implantcase.dm | 2 +- .../items/weapons/implants/implantfreedom.dm | 1 + code/game/objects/items/weapons/uplinks.dm | 9 ++- code/game/objects/radio/radio.dm | 4 ++ code/modules/mob/living/carbon/human/emote.dm | 7 ++ code/stylesheet.dm | 5 ++ data/mode.txt | 2 +- 12 files changed, 115 insertions(+), 21 deletions(-) diff --git a/code/game/communications.dm b/code/game/communications.dm index 0608c47f703..aac6202bc16 100644 --- a/code/game/communications.dm +++ b/code/game/communications.dm @@ -113,6 +113,7 @@ var/list/radiochannels = list( var/list/DEPT_FREQS = list(1351,1355,1357,1359,1213,1441,1349,1347) var/const/COMM_FREQ = 1353 //command, colored gold in chat window var/const/SYND_FREQ = 1213 +var/NUKE_FREQ = 1199 //Never accessable except on nuke rounds. #define TRANSMISSION_WIRE 0 #define TRANSMISSION_RADIO 1 diff --git a/code/game/gamemodes/nuclear/nuclear.dm b/code/game/gamemodes/nuclear/nuclear.dm index 2318c4a6d7d..9795c495b66 100644 --- a/code/game/gamemodes/nuclear/nuclear.dm +++ b/code/game/gamemodes/nuclear/nuclear.dm @@ -6,7 +6,7 @@ name = "nuclear emergency" config_tag = "nuclear" required_players = 3 - required_enemies = 3 + required_enemies = 2 var/const/agents_possible = 5 //If we ever need more syndicate agents. var/const/waittime_l = 600 //lower bound on time before intercept arrives (in tenths of seconds) @@ -110,6 +110,9 @@ var/nuke_code = "[rand(10000, 99999)]" var/leader_selected = 0 + var/freq = random_radio_frequency() + radiochannels += list("Nuclear" = freq) + NUKE_FREQ = freq //var/agent_number = 1 for(var/datum/mind/synd_mind in syndicates) @@ -126,7 +129,7 @@ //synd_mind.current.real_name = "[syndicate_name()] Operative #[agent_number]" //agent_number++ - equip_syndicate(synd_mind.current) + equip_syndicate(synd_mind.current,freq) update_synd_icons_added(synd_mind) update_all_synd_icons() @@ -182,7 +185,7 @@ P.loc = H.loc else - nuke_code = "code will be proveded later" + nuke_code = "code will be provided later" synd_mind.current << "Nuclear Explosives 101:\n\tHello and thank you for choosing the Syndicate for your nuclear information needs.\nToday's crash course will deal with the operation of a Fusion Class Nanotrasen made Nuclear Device.\nFirst and foremost, DO NOT TOUCH ANYTHING UNTIL THE BOMB IS IN PLACE.\nPressing any button on the compacted bomb will cause it to extend and bolt itself into place.\nIf this is done to unbolt it one must compeltely log in which at this time may not be possible.\nTo make the device functional:\n1. Place bomb in designated detonation zone\n2. Extend and anchor bomb (attack with hand).\n3. Insert Nuclear Auth. Disk into slot.\n4. Type numeric code into keypad ([nuke_code]).\n\tNote: If you make a mistake press R to reset the device.\n5. Press the E button to log onto the device\nYou now have activated the device. To deactivate the buttons at anytime for example when\nyou've already prepped the bomb for detonation remove the auth disk OR press the R ont he keypad.\nNow the bomb CAN ONLY be detonated using the timer. A manual det. is not an option.\n\tNote: Nanotrasen is a pain in the neck.\nToggle off the SAFETY.\n\tNote: You wouldn't believe how many Syndicate Operatives with doctorates have forgotten this step\nSo use the - - and + + to set a det time between 5 seconds and 10 minutes.\nThen press the timer toggle button to start the countdown.\nNow remove the auth. disk so that the buttons deactivate.\n\tNote: THE BOMB IS STILL SET AND WILL DETONATE\nNow before you remove the disk if you need to move the bomb you can:\nToggle off the anchor, move it, and re-anchor.\n\nGood luck. Remember the order:\nDisk, Code, Safety, Timer, Disk, RUN!\nIntelligence Analysts believe that they are hiding the disk in the bridge. Your space ship will not leave until the bomb is armed and timing.\nGood luck!" return @@ -204,16 +207,17 @@ /datum/game_mode/proc/random_radio_frequency() - return 1337 - - -/datum/game_mode/proc/equip_syndicate(mob/living/carbon/human/synd_mob) - var/radio_freq = random_radio_frequency() + var/tempfreq = 1459 + do + tempfreq = rand(1400,1600) + while(tempfreq in radiochannels || (tempfreq > 1441 && tempfreq < 1489)) + return tempfreq +/datum/game_mode/proc/equip_syndicate(mob/living/carbon/human/synd_mob,radio_freq) var/obj/item/device/radio/R = new /obj/item/device/radio/headset(synd_mob) R.set_frequency(radio_freq) + R.freerange = 1 synd_mob.equip_if_possible(R, synd_mob.slot_ears) - synd_mob.equip_if_possible(new /obj/item/clothing/under/syndicate(synd_mob), synd_mob.slot_w_uniform) synd_mob.equip_if_possible(new /obj/item/clothing/shoes/black(synd_mob), synd_mob.slot_shoes) synd_mob.equip_if_possible(new /obj/item/clothing/suit/armor/vest(synd_mob), synd_mob.slot_wear_suit) @@ -225,9 +229,10 @@ synd_mob.equip_if_possible(new /obj/item/ammo_magazine/a12mm(synd_mob), synd_mob.slot_in_backpack) synd_mob.equip_if_possible(new /obj/item/weapon/reagent_containers/pill/cyanide(synd_mob), synd_mob.slot_in_backpack) synd_mob.equip_if_possible(new /obj/item/weapon/gun/projectile/automatic/c20r(synd_mob), synd_mob.slot_belt) - var/obj/item/weapon/implant/explosive/E = new/obj/item/weapon/implant/explosive(synd_mob) + var/obj/item/weapon/implant/dexplosive/E = new/obj/item/weapon/implant/dexplosive(synd_mob) E.imp_in = synd_mob E.implanted = 1 + return 1 diff --git a/code/game/objects/devices/PDA/uplink.dm b/code/game/objects/devices/PDA/uplink.dm index 6c77009d990..7186c52d2e8 100644 --- a/code/game/objects/devices/PDA/uplink.dm +++ b/code/game/objects/devices/PDA/uplink.dm @@ -49,6 +49,7 @@ //When given the choice, people have been P2W menu_message += "Sleepy Pen (4)
" //Terrible -Pete. menu_message += "
" + menu_message += "Explosive Implant (with injector) (6)
" menu_message += "Detomatix Cartridge (3)
" menu_message += "Plastic Explosives (2)
" menu_message += "Power Sink (5)
" @@ -144,6 +145,13 @@ uses -= 10 var/obj/item/weapon/implanter/O = new /obj/item/weapon/implanter(get_turf(hostpda)) O.imp = new /obj/item/weapon/implant/uplink(O) + if("imp_exp") + if (src.uses >= 6) + src.uses -= 6 + var/obj/item/weapon/implanter/O = new /obj/item/weapon/implanter(get_turf(hostpda)) + O.imp = new /obj/item/weapon/implant/explosive(O) + O.name = "(BIO-HAZARD) BIO-detpack" + O.update() if("sleepypen") if (uses >= 4) uses -= 4 diff --git a/code/game/objects/items/weapons/explosives.dm b/code/game/objects/items/weapons/explosives.dm index 106106d1b96..ff360919317 100644 --- a/code/game/objects/items/weapons/explosives.dm +++ b/code/game/objects/items/weapons/explosives.dm @@ -6,12 +6,12 @@ /obj/item/weapon/plastique/afterattack(atom/target as obj|turf, mob/user as mob, flag) if (!flag) return - if (istype(target, /turf/unsimulated) || istype(target, /turf/simulated/shuttle) || istype(target, /obj/item/weapon/storage/)) + if (istype(target, /turf/unsimulated) || istype(target, /turf/simulated/shuttle) || istype(target, /obj/item/weapon/storage/) || ismob(target)) return user << "Planting explosives..." - if(ismob(target)) +/* if(ismob(target)) user.attack_log += "\[[time_stamp()]\] [user.real_name] tried planting [name] on [target:real_name] ([target:ckey])" - user.visible_message("\red [user.name] is trying to plant some kind of explosive on [target.name]!") + user.visible_message("\red [user.name] is trying to plant some kind of explosive on [target.name]!") */ if(do_after(user, 50) && in_range(user, target)) user.drop_item() target = target diff --git a/code/game/objects/items/weapons/implants/implant.dm b/code/game/objects/items/weapons/implants/implant.dm index 010711a0769..b52cde554a0 100644 --- a/code/game/objects/items/weapons/implants/implant.dm +++ b/code/game/objects/items/weapons/implants/implant.dm @@ -45,8 +45,9 @@ implanted(mob/source as mob) - source.mind.store_memory("Uplink implant can be activated by using the [activation_emote] emote, say *[activation_emote] to attempt to activate.", 0, 0) - source << "The implanted uplink implant can be activated by using the [activation_emote] emote, say *[activation_emote] to attempt to activate." + activation_emote = input("Choose activation emote:") in list("blink", "blink_r", "eyebrow", "chuckle", "twitch_s", "frown", "nod", "blush", "giggle", "grin", "groan", "shrug", "smile", "pale", "sniff", "whimper", "wink") + source.mind.store_memory("Uplink implant can be activated by using the [src.activation_emote] emote, say *[src.activation_emote] to attempt to activate.", 0, 0) + source << "The implanted uplink implant can be activated by using the [src.activation_emote] emote, say *[src.activation_emote] to attempt to activate." return @@ -82,11 +83,15 @@ Implant Specifics:
"} return dat - -/obj/item/weapon/implant/explosive +//Nuke Agent Explosive +/obj/item/weapon/implant/dexplosive name = "explosive" desc = "And boom goes the weasel." + var/activation_emote = "deathgasp" + var/coded = 0 + New() + verbs += /obj/item/weapon/implant/dexplosive/proc/set_emote get_data() var/dat = {" @@ -103,7 +108,7 @@ Implant Specifics:
"} trigger(emote, source as mob) - if(emote == "deathgasp") + if(emote == activation_emote) src.activate("death") return @@ -114,6 +119,20 @@ Implant Specifics:
"} if(src.imp_in) src.imp_in.gib() + proc/set_emote() + set name = "Set Emote" + set category = "Object" + set src in usr + if(coded != 0) + usr << "You've already set up your implant!" + return + activation_emote = input("Choose activation emote:") in list("deathgasp","blink", "blink_r", "eyebrow", "chuckle", "twitch_s", "frown", "nod", "blush", "giggle", "grin", "groan", "shrug", "smile", "pale", "sniff", "whimper", "wink") + usr.mind.store_memory("Explosive implant can be activated by using the [src.activation_emote] emote, say *[src.activation_emote] to attempt to activate.", 0, 0) + usr << "The implanted explosive implant can be activated by using the [src.activation_emote] emote, say *[src.activation_emote] to attempt to activate." + coded = 1 + verbs -= /obj/item/weapon/implant/dexplosive/proc/set_emote + return + /obj/item/weapon/implant/chem @@ -195,3 +214,40 @@ the implant may become unstable and either pre-maturely inject the subject or si ticker.mode:remove_revolutionary(H.mind) H << "\blue You feel a surge of loyalty towards NanoTrasen." return + + +//BS12 Explosive +/obj/item/weapon/implant/explosive + name = "explosive" + desc = "And boom goes the weasel." + var/phrase = "die" + + + get_data() + var/dat = {" +Implant Specifications:
+Name: Robust Corp RX-78 Intimidation Class Implant
+Life: Activates upon codephrase.
+Important Notes: Explodes
+
+Implant Details:
+Function: Contains a compact, electrically detonated explosive that detonates upon receiving a specially encoded signal or upon host death.
+Special Features: Explodes
+Integrity: Implant will occasionally be degraded by the body's immune system and thus will occasionally malfunction."} + return dat + + hear_talk(M as mob, var/msg) + if(findtext(msg,phrase)) + if(istype(loc, /mob/)) + var/mob/T = loc + T.gib() + explosion(find_loc(src), 1, 3, 4, 6, 3) + var/turf/t = find_loc(src) + if(t) + t.hotspot_expose(3500,125) + del(src) + + implanted(mob/source as mob) + phrase = input("Choose activation phrase:") as text + usr.mind.store_memory("Explosive implant in [source] can be activated by saying something containing the phrase ''[src.phrase]'', say [src.phrase] to attempt to activate.", 0, 0) + usr << "The implanted explosive implant in [source] can be activated by saying something containing the phrase ''[src.phrase]'', say [src.phrase] to attempt to activate." \ No newline at end of file diff --git a/code/game/objects/items/weapons/implants/implantcase.dm b/code/game/objects/items/weapons/implants/implantcase.dm index 073c913a9ec..313e6ae352e 100644 --- a/code/game/objects/items/weapons/implants/implantcase.dm +++ b/code/game/objects/items/weapons/implants/implantcase.dm @@ -79,7 +79,7 @@ /obj/item/weapon/implantcase/explosive - name = "Glass Case- 'Explosive'" + name = "Glass Case- '(BIO-HAZARD) BIO-detpack'" desc = "A case containing an explosive implant." icon = 'items.dmi' icon_state = "implantcase-r" diff --git a/code/game/objects/items/weapons/implants/implantfreedom.dm b/code/game/objects/items/weapons/implants/implantfreedom.dm index 09826c7a2d2..6d40b6aa56e 100644 --- a/code/game/objects/items/weapons/implants/implantfreedom.dm +++ b/code/game/objects/items/weapons/implants/implantfreedom.dm @@ -33,6 +33,7 @@ implanted(mob/source as mob) + activation_emote = input("Choose activation emote:") in list("blink", "blink_r", "eyebrow", "chuckle", "twitch_s", "frown", "nod", "blush", "giggle", "grin", "groan", "shrug", "smile", "pale", "sniff", "whimper", "wink") source.mind.store_memory("Freedom implant can be activated by using the [src.activation_emote] emote, say *[src.activation_emote] to attempt to activate.", 0, 0) source << "The implanted freedom implant can be activated by using the [src.activation_emote] emote, say *[src.activation_emote] to attempt to activate." return diff --git a/code/game/objects/items/weapons/uplinks.dm b/code/game/objects/items/weapons/uplinks.dm index ecd247490ef..971862d44aa 100644 --- a/code/game/objects/items/weapons/uplinks.dm +++ b/code/game/objects/items/weapons/uplinks.dm @@ -48,9 +48,9 @@ SYNDICATE UPLINK dat += "
" dat += "Freedom Implant (with injector) (3)
" // dat += "Paralysis Pen (3)
" //Note that this goes to the updated sleepypen now. - dat += "Sleepy Pen (4)
" //Terrible -Pete. //Reinstated -Skymarshal dat += "
" + dat += "Explosive Implant (with injector) (6)
" dat += "Detomatix Cartridge (3)
" dat += "Plastic Explosives (2)
" dat += "Power Sink (5)
" @@ -133,6 +133,13 @@ SYNDICATE UPLINK src.uses -= 3 var/obj/item/weapon/implanter/O = new /obj/item/weapon/implanter(get_turf(src)) O.imp = new /obj/item/weapon/implant/freedom(O) + if("imp_exp") + if (src.uses >= 6) + src.uses -= 6 + var/obj/item/weapon/implanter/O = new /obj/item/weapon/implanter(get_turf(src)) + O.imp = new /obj/item/weapon/implant/explosive(O) + O.name = "(BIO-HAZARD) BIO-detpack" + O.update() if("sleepypen") if (src.uses >= 4) src.uses -= 4 diff --git a/code/game/objects/radio/radio.dm b/code/game/objects/radio/radio.dm index b88f743a4f1..472d51d9ecc 100644 --- a/code/game/objects/radio/radio.dm +++ b/code/game/objects/radio/radio.dm @@ -259,6 +259,8 @@ freq_text = "Mining" if(1347) freq_text = "Cargo" + if(connection.frequency == NUKE_FREQ) + freq_text = "Agent" //There's probably a way to use the list var of channels in code\game\communications.dm to make the dept channels non-hardcoded, but I wasn't in an experimentive mood. --NEO if(!freq_text) @@ -269,6 +271,8 @@ if (display_freq==SYND_FREQ) part_a = "" + if (display_freq==NUKE_FREQ) + part_a = "" else if (display_freq==COMM_FREQ) part_a = "" else if (display_freq in DEPT_FREQS) diff --git a/code/modules/mob/living/carbon/human/emote.dm b/code/modules/mob/living/carbon/human/emote.dm index a927977985f..85e1b925d5a 100644 --- a/code/modules/mob/living/carbon/human/emote.dm +++ b/code/modules/mob/living/carbon/human/emote.dm @@ -15,6 +15,9 @@ if(src.stat == 2.0 && (act != "deathgasp")) return + if(src.stat != 2.0 && act == "deathgasp" && !src.mind.special_role == "Syndicate") + src << "You are not dead. No." + return switch(act) if ("airguitar") if (!src.restrained()) @@ -187,6 +190,10 @@ message = "[src] seizes up and falls limp, \his eyes dead and lifeless..." m_type = 1 + if ("struckdown") + message = "[src], Station Dweller, has been struck down." + m_type = 2 + if ("giggle") if (!muzzled) message = "[src] giggles." diff --git a/code/stylesheet.dm b/code/stylesheet.dm index f973a4d2dee..0cc4bfb71e9 100644 --- a/code/stylesheet.dm +++ b/code/stylesheet.dm @@ -102,6 +102,11 @@ h1, h2, h3, h4, h5, h6 color: #6D3F40; } +.nukeradio +{ + color: #FF3300; +} + .alert { color: #ff0000; diff --git a/data/mode.txt b/data/mode.txt index bd81a61cbfd..60f44763824 100644 --- a/data/mode.txt +++ b/data/mode.txt @@ -1 +1 @@ -traitor +nuclear