diff --git a/code/game/gamemodes/nuclear/pinpointer.dm b/code/game/gamemodes/nuclear/pinpointer.dm index 1e8143c582a..2507d56eab6 100644 --- a/code/game/gamemodes/nuclear/pinpointer.dm +++ b/code/game/gamemodes/nuclear/pinpointer.dm @@ -173,8 +173,87 @@ +/obj/item/weapon/pinpointer/nukeop//Used by nuke ops specifically so they can get their asses back to the shuttle + var/mode = 0 // Mode 0 locates disk, mode 1 locates the shuttle + var/location = null//Follow that shuttle! + var/obj/machinery/computer/syndicate_station/home = null + attack_self() + if(!active) + active = 1 + if(mode == 0) + workdisk() + if(mode == 1) + worklocation() + usr << "\blue You activate the pinpointer" + else + active = 0 + icon_state = "pinoff" + usr << "\blue You deactivate the pinpointer" +/obj/item/weapon/pinpointer/nukeop/workdisk() + if(!active) return + if(!the_disk) + the_disk = locate() + if(!the_disk) + icon_state = "pinonnull" + return + if(src.loc.z >1)//If you are on a different z-level from the station + icon_state = "pinonalert" + else + src.dir = get_dir(src,the_disk) + switch(get_dist(src,the_disk)) + if(0) + icon_state = "pinondirect" + if(1 to 8) + icon_state = "pinonclose" + if(9 to 16) + icon_state = "pinonmedium" + if(16 to INFINITY) + icon_state = "pinonfar" + spawn(5) .() + +/obj/item/weapon/pinpointer/nukeop/proc/worklocation() + if(!active) + return + if(!home) + home = locate() + if(!home) + icon_state = "pinonnull" + return + if(src.loc.z >2)//If you are on a different z-level from the shuttle + icon_state = "pinonalert" + else + src.dir = get_dir(src,home) + switch(get_dist(src,home)) + if(0) + icon_state = "pinondirect" + if(1 to 8) + icon_state = "pinonclose" + if(9 to 16) + icon_state = "pinonmedium" + if(16 to INFINITY) + icon_state = "pinonfar" + + spawn(5) .() + +/obj/item/weapon/pinpointer/nukeop/verb/toggle_mode() + set category = "Object" + set name = "Toggle Pinpointer Mode" + set src in view(1) + + active = 0 + icon_state = "pinoff" + + if(mode) + mode = 0 + usr << "Nuclear Disk locator active." + return attack_self() + + else + mode = 1 + usr << "Shuttle locator active." + return attack_self() /*/obj/item/weapon/pinpointer/New() diff --git a/code/game/objects/closets/nuclear.dm b/code/game/objects/closets/nuclear.dm index 916ed714558..cbe8b8ebd1c 100644 --- a/code/game/objects/closets/nuclear.dm +++ b/code/game/objects/closets/nuclear.dm @@ -13,11 +13,11 @@ new /obj/item/weapon/gun/energy/gun(src) new /obj/item/weapon/gun/energy/gun(src) new /obj/item/weapon/gun/energy/gun(src) - new /obj/item/weapon/pinpointer(src) - new /obj/item/weapon/pinpointer(src) - new /obj/item/weapon/pinpointer(src) - new /obj/item/weapon/pinpointer(src) - new /obj/item/weapon/pinpointer(src) + new /obj/item/weapon/pinpointer/nukeop(src) + new /obj/item/weapon/pinpointer/nukeop(src) + new /obj/item/weapon/pinpointer/nukeop(src) + new /obj/item/weapon/pinpointer/nukeop(src) + new /obj/item/weapon/pinpointer/nukeop(src) new /obj/item/device/pda/syndicate(src) var/obj/item/device/uplink/radio/U = new /obj/item/device/uplink/radio(src) U.uses = 40 diff --git a/code/modules/clothing/spacesuits/rig.dm b/code/modules/clothing/spacesuits/rig.dm index 5d7c87f1866..9a563ce9888 100644 --- a/code/modules/clothing/spacesuits/rig.dm +++ b/code/modules/clothing/spacesuits/rig.dm @@ -61,7 +61,7 @@ name = "engineering hardsuit" desc = "A special suit that protects against hazardous, low pressure environments. Has radiation shielding." icon_state = "rig-engineering" - item_state = "rig_suit" + item_state = "eng_hardsuit" protective_temperature = 5000 //For not dying near a fire, but still not being great in a full inferno slowdown = 2 armor = list(melee = 40, bullet = 5, laser = 20,energy = 5, bomb = 35, bio = 100, rad = 60) @@ -70,15 +70,18 @@ /obj/item/clothing/suit/space/rig/mining icon_state = "rig-mining" name = "mining hardsuit" + item_state = "mining_hardsuit" /obj/item/clothing/suit/space/rig/elite icon_state = "rig-white" name = "advanced hardsuit" + item_state = "ce_hardsuit" protective_temperature = 10000 /obj/item/clothing/suit/space/rig/syndi icon_state = "rig-syndi" name = "blood-red hardsuit" + item_state = "syndie_hardsuit" slowdown = 1 w_class = 3 armor = list(melee = 60, bullet = 50, laser = 30, energy = 15, bomb = 35, bio = 100, rad = 60) diff --git a/code/modules/mob/living/carbon/brain/MMI.dm b/code/modules/mob/living/carbon/brain/MMI.dm index 027ba4bdb77..a924bd80094 100644 --- a/code/modules/mob/living/carbon/brain/MMI.dm +++ b/code/modules/mob/living/carbon/brain/MMI.dm @@ -126,3 +126,16 @@ radio.listening = radio.listening==1 ? 0 : 1 brainmob << "\blue Radio is [radio.listening==1 ? "now" : "no longer"] receiving broadcast." + +/obj/item/device/mmi/emp_act(severity) + if(!brainmob) + return + else + switch(severity) + if(1) + brainmob.emp_damage += rand(20,30) + if(2) + brainmob.emp_damage += rand(10,20) + if(3) + brainmob.emp_damage += rand(0,10) + ..() \ No newline at end of file diff --git a/code/modules/mob/living/carbon/brain/brain.dm b/code/modules/mob/living/carbon/brain/brain.dm index 1d486f4a26c..362d79a83cd 100644 --- a/code/modules/mob/living/carbon/brain/brain.dm +++ b/code/modules/mob/living/carbon/brain/brain.dm @@ -3,6 +3,8 @@ /mob/living/carbon/brain var/obj/item/container = null var/timeofhostdeath = 0 + var/emp_damage = 0//Handles a type of MMI damage + var/alert = null New() var/datum/reagents/R = new/datum/reagents(1000) diff --git a/code/modules/mob/living/carbon/brain/emote.dm b/code/modules/mob/living/carbon/brain/emote.dm new file mode 100644 index 00000000000..2667422352a --- /dev/null +++ b/code/modules/mob/living/carbon/brain/emote.dm @@ -0,0 +1,64 @@ +/mob/living/carbon/brain/emote(var/act,var/m_type=1,var/message = null) + if(!(container && istype(container, /obj/item/device/mmi)))//No MMI, no emotes + return + + if (findtext(act, "-", 1, null)) + var/t1 = findtext(act, "-", 1, null) + act = copytext(act, 1, t1) + + if(src.stat == DEAD) + return + switch(act) + if ("alarm") + src << "You sound an alarm." + message = "[src] sounds an alarm." + m_type = 2 + if ("alert") + src << "You let out a distressed noise." + message = "[src] lets out a distressed noise." + m_type = 2 + if ("notice") + src << "You play a loud tone." + message = "[src] plays a loud tone." + m_type = 2 + if ("flash") + message = "The lights on [src] flash quickly." + m_type = 1 + if ("blink") + message = "[src] blinks." + m_type = 1 + if ("whistle") + src << "You whistle." + message = "[src] whistles." + m_type = 2 + if ("beep") + src << "You beep." + message = "[src] beeps." + m_type = 2 + if ("boop") + src << "You boop." + message = "[src] boops." + m_type = 2 + if ("help") + src << "alarm,alert,notice,flash,blink,whistle,beep,boop" + else + src << "\blue Unusable emote '[act]'. Say *help for a list." + + if (message) + log_emote("[name]/[key] : [message]") + + for(var/mob/M in world) + if (!M.client) + continue //skip monkeys and leavers + if (istype(M, /mob/new_player)) + continue + if(M.stat == 2 && M.client.ghost_sight && !(M in viewers(src,null))) + M.show_message(message) + + + if (m_type & 1) + for (var/mob/O in viewers(src, null)) + O.show_message(message, m_type) + else if (m_type & 2) + for (var/mob/O in hearers(src.loc, null)) + O.show_message(message, m_type) \ No newline at end of file diff --git a/code/modules/mob/living/carbon/brain/life.dm b/code/modules/mob/living/carbon/brain/life.dm index ab29ec93bdc..e8ab20231a2 100644 --- a/code/modules/mob/living/carbon/brain/life.dm +++ b/code/modules/mob/living/carbon/brain/life.dm @@ -40,8 +40,10 @@ if (radiation) if (radiation > 100) radiation = 100 - Weaken(10) - src << "\red You feel weak." + if(!container)//If it's not in an MMI + src << "\red You feel weak." + else//Fluff-wise, since the brain can't detect anything itself, the MMI handles thing like that + src << "\red STATUS: CRITICAL AMOUNTS OF RADIATION DETECTED." switch(radiation) if(1 to 49) @@ -55,19 +57,15 @@ adjustToxLoss(1) if(prob(5)) radiation -= 5 - Weaken(3) - src << "\red You feel weak." -// emote("collapse") + if(!container) + src << "\red You feel weak." + else + src << "\red STATUS: DANGEROUS LEVELS OF RADIATION DETECTED." updatehealth() if(75 to 100) radiation -= 3 adjustToxLoss(3) - if(prob(1)) - src << "\red You mutate!" - randmutb(src) - domutcheck(src,null) - emote("gasp") updatehealth() @@ -115,13 +113,6 @@ if(reagents) reagents.metabolize(src) - if (drowsyness) - drowsyness-- - eye_blurry = max(2, eye_blurry) - if (prob(5)) - sleeping += 1 - Paralyse(5) - confused = max(0, confused - 1) // decrement dizziness counter, clamped to 0 if(resting) @@ -147,47 +138,58 @@ silent = 0 return 1 - //UNCONSCIOUS. NO-ONE IS HOME - if( (getOxyLoss() > 25) || (config.health_threshold_crit > health) ) - if( health <= 20 && prob(1) ) - spawn(0) - emote("gasp") - if(!reagents.has_reagent("inaprovaline")) - adjustOxyLoss(1) - Paralyse(3) - - if(paralysis) - AdjustParalysis(-1) - blinded = 1 - stat = UNCONSCIOUS - else if(sleeping) - sleeping = max(sleeping-1, 0) - blinded = 1 - stat = UNCONSCIOUS - if( prob(10) && health ) - spawn(0) - emote("snore") - //CONSCIOUS - else - stat = CONSCIOUS - - - //Eyes - if(sdisabilities & BLIND) //disabled-blind, doesn't get better on its own - blinded = 1 - else if(eye_blind) //blindness, heals slowly over time - eye_blind = max(eye_blind-1,0) - blinded = 1 - else if(eye_blurry) //blurry eyes heal slowly - eye_blurry = max(eye_blurry-1, 0) - - //Ears - if(sdisabilities & DEAF) //disabled-deaf, doesn't get better on its own - ear_deaf = max(ear_deaf, 1) - else if(ear_deaf) //deafness, heals slowly over time - ear_deaf = max(ear_deaf-1, 0) - else if(ear_damage < 25) //ear damage heals slowly under this threshold. otherwise you'll need earmuffs - ear_damage = max(ear_damage-0.05, 0) + //Handling EMP effect in the Life(), it's made VERY simply, and has some additional effects handled elsewhere + if(emp_damage) //This is pretty much a damage type only used by MMIs, dished out by the emp_act + if(!(container && istype(container, /obj/item/device/mmi))) + emp_damage = 0 + else + emp_damage = round(emp_damage,1)//Let's have some nice numbers to work with + switch(emp_damage) + if(31 to INFINITY) + emp_damage = 30//Let's not overdo it + if(21 to 30)//High level of EMP damage, unable to see, hear, or speak + eye_blind = 1 + blinded = 1 + ear_deaf = 1 + silent = 1 + if(!alert)//Sounds an alarm, but only once per 'level' + emote("alarm") + src << "\red Major electrical distruption detected: System rebooting." + alert = 1 + if(prob(75)) + emp_damage -= 1 + if(20) + alert = 0 + blinded = 0 + eye_blind = 0 + ear_deaf = 0 + silent = 0 + emp_damage -= 1 + if(11 to 19)//Moderate level of EMP damage, resulting in nearsightedness and ear damage + eye_blurry = 1 + ear_damage = 1 + if(!alert) + emote("alert") + src << "\red Primary systems are now online." + alert = 1 + if(prob(50)) + emp_damage -= 1 + if(10) + alert = 0 + eye_blurry = 0 + ear_damage = 0 + emp_damage -= 1 + if(2 to 9)//Low level of EMP damage, has few effects(handled elsewhere) + if(!alert) + emote("notice") + src << "\red System reboot nearly complete." + alert = 1 + if(prob(25)) + emp_damage -= 1 + if(1) + alert = 0 + src << "\red All systems restored." + emp_damage -= 1 //Other if(stunned) @@ -280,4 +282,17 @@ if(bodytemperature > 409) for(var/datum/disease/D in viruses) D.cure() - return \ No newline at end of file + return + +/*/mob/living/carbon/brain/emp_act(severity) + if(!(container && istype(container, /obj/item/device/mmi))) + return + else + switch(severity) + if(1) + emp_damage += rand(20,30) + if(2) + emp_damage += rand(10,20) + if(3) + emp_damage += rand(0,10) + ..()*/ \ No newline at end of file diff --git a/code/modules/mob/living/carbon/brain/say.dm b/code/modules/mob/living/carbon/brain/say.dm index 2067b496021..9a885d9a97a 100644 --- a/code/modules/mob/living/carbon/brain/say.dm +++ b/code/modules/mob/living/carbon/brain/say.dm @@ -4,4 +4,12 @@ if(!(container && istype(container, /obj/item/device/mmi))) return //No MMI, can't speak, bucko./N - else ..() \ No newline at end of file + else + if(prob(emp_damage*4)) + if(prob(10))//10% chane to drop the message entirely + return + else + message = Gibberish(message, (emp_damage*6))//scrambles the message, gets worse when emp_damage is higher + ..() + else + ..() \ No newline at end of file diff --git a/code/modules/mob/mob_helpers.dm b/code/modules/mob/mob_helpers.dm index c4f6cffa04b..c0d759505fd 100644 --- a/code/modules/mob/mob_helpers.dm +++ b/code/modules/mob/mob_helpers.dm @@ -187,7 +187,7 @@ proc/isorgan(A) return copytext(sanitize(t),1,MAX_MESSAGE_LEN) -proc/Gibberish(t, p) +proc/Gibberish(t, p)//t is the inputted message, and any value higher than 70 for p will cause letters to be replaced instead of added /* Turn text into complete gibberish! */ var/returntext = "" for(var/i = 1, i <= length(t), i++) diff --git a/icons/mob/items_lefthand.dmi b/icons/mob/items_lefthand.dmi index e92accff6bb..c2bfadba19c 100644 Binary files a/icons/mob/items_lefthand.dmi and b/icons/mob/items_lefthand.dmi differ diff --git a/icons/mob/items_righthand.dmi b/icons/mob/items_righthand.dmi index add55cc370e..f4cea77ad93 100644 Binary files a/icons/mob/items_righthand.dmi and b/icons/mob/items_righthand.dmi differ diff --git a/icons/obj/device.dmi b/icons/obj/device.dmi index c411a998f29..36b56d53070 100644 Binary files a/icons/obj/device.dmi and b/icons/obj/device.dmi differ