From 4d64af69f4c7f57dfd57a5fa50cf41cd612bcd84 Mon Sep 17 00:00:00 2001 From: Zuhayr Date: Fri, 9 May 2014 21:29:44 +0930 Subject: [PATCH 1/7] Fixes #4923 --- code/game/objects/structures/grille.dm | 6 ++++++ code/game/objects/structures/window.dm | 5 +++++ 2 files changed, 11 insertions(+) diff --git a/code/game/objects/structures/grille.dm b/code/game/objects/structures/grille.dm index bfdad4e2bc..97d7657d36 100644 --- a/code/game/objects/structures/grille.dm +++ b/code/game/objects/structures/grille.dm @@ -93,7 +93,13 @@ return !density /obj/structure/grille/bullet_act(var/obj/item/projectile/Proj) + if(!Proj) return + + //Tasers and the like should not damage grilles. + if(Proj.damage_type == HALLOSS) + return + src.health -= Proj.damage*0.2 healthcheck() return 0 diff --git a/code/game/objects/structures/window.dm b/code/game/objects/structures/window.dm index 843ab7dd37..0f73a44ffb 100644 --- a/code/game/objects/structures/window.dm +++ b/code/game/objects/structures/window.dm @@ -18,6 +18,11 @@ /obj/structure/window/bullet_act(var/obj/item/projectile/Proj) + + //Tasers and the like should not damage windows. + if(Proj.damage_type == HALLOSS) + return + health -= Proj.damage ..() if(health <= 0) From 1e63e27f3b5c815527dc010c236e2daf43c2d179 Mon Sep 17 00:00:00 2001 From: Zuhayr Date: Sat, 10 May 2014 00:27:18 +0930 Subject: [PATCH 2/7] Fixes #4918 --- code/modules/mob/hear_say.dm | 31 +++++++++++++++++++++--- code/modules/mob/living/silicon/ai/ai.dm | 20 +++++++++++---- 2 files changed, 42 insertions(+), 9 deletions(-) diff --git a/code/modules/mob/hear_say.dm b/code/modules/mob/hear_say.dm index ab500a9630..7aa359c2c4 100644 --- a/code/modules/mob/hear_say.dm +++ b/code/modules/mob/hear_say.dm @@ -19,7 +19,7 @@ if(language) verb = language.speech_verb style = language.colour - + var/speaker_name = speaker.name if(istype(speaker, /mob/living/carbon/human)) var/mob/living/carbon/human/H = speaker @@ -71,7 +71,7 @@ verb = language.speech_verb style = language.colour - + if(hard_to_hear) message = stars(message) @@ -89,11 +89,28 @@ if(hard_to_hear) speaker_name = "unknown" + var/changed_voice + if(istype(src, /mob/living/silicon/ai) && !hard_to_hear) var/jobname // the mob's "job" + var/mob/living/carbon/human/impersonating //The crewmember being impersonated, if any. + if (ishuman(speaker)) var/mob/living/carbon/human/H = speaker - jobname = H.get_assignment() + + if((H.wear_id && istype(H.wear_id,/obj/item/weapon/card/id/syndicate)) && (H.wear_mask && istype(H.wear_mask,/obj/item/clothing/mask/gas/voice))) + + changed_voice = 1 + var/mob/living/carbon/human/I = locate(speaker_name) + + if(I) + impersonating = I + jobname = impersonating.get_assignment() + else + jobname = "Unknown" + else + jobname = H.get_assignment() + else if (iscarbon(speaker)) // Nonhuman carbon mob jobname = "No id" else if (isAI(speaker)) @@ -105,7 +122,13 @@ else jobname = "Unknown" - track = "[speaker_name] ([jobname])" + if(changed_voice) + if(impersonating) + track = "[speaker_name] ([jobname])" + else + track = "[speaker_name] ([jobname])" + else + track = "[speaker_name] ([jobname])" if(istype(src, /mob/dead/observer)) if(speaker_name != speaker.real_name && !isAI(speaker)) //Announce computer and various stuff that broadcasts doesn't use it's real name but AI's can't pretend to be other mobs. diff --git a/code/modules/mob/living/silicon/ai/ai.dm b/code/modules/mob/living/silicon/ai/ai.dm index 62331233a8..88c1c9b79d 100644 --- a/code/modules/mob/living/silicon/ai/ai.dm +++ b/code/modules/mob/living/silicon/ai/ai.dm @@ -94,7 +94,7 @@ var/list/ai_list = list() /mob/living/silicon/ai/proc/ai_camera_list, /mob/living/silicon/ai/proc/ai_network_change, \ /mob/living/silicon/ai/proc/ai_statuschange, /mob/living/silicon/ai/proc/ai_hologram_change, \ /mob/living/silicon/ai/proc/toggle_camera_light) - + if(!safety)//Only used by AIize() to successfully spawn an AI. if (!B)//If there is no player/brain inside. @@ -146,7 +146,7 @@ var/list/ai_list = list() /obj/machinery/ai_powersupply name="Power Supply" active_power_usage=1000 - use_power = 2 + use_power = 2 power_channel = EQUIP var/mob/living/silicon/ai/powered_ai = null invisibility = 100 @@ -155,12 +155,12 @@ var/list/ai_list = list() powered_ai = ai if(isnull(powered_ai)) Del() - + loc = powered_ai.loc use_power(1) // Just incase we need to wake up the power system. ..() - + /obj/machinery/ai_powersupply/process() if(!powered_ai || powered_ai.stat & DEAD) Del() @@ -410,8 +410,18 @@ var/list/ai_list = list() if(A && target) A.ai_actual_track(target) */ - if(target) + + //Strip off any "(as Derplord)". + //If there's a way to do this via a var that doesn't give the AI extra info, please let me know. + var/seeking = target.name + var/index = findtext(seeking, "(as ") + if(index) + seeking = copytext(seeking, 1, index-1) + + if(target && href_list["trackname"] == seeking) ai_actual_track(target) + else + src << "\red System error. Cannot locate [href_list["trackname"]]." return else if (href_list["faketrack"]) From 9f2f5fb488e42dd4d4224cc334e3b4e502057951 Mon Sep 17 00:00:00 2001 From: Zuhayr Date: Sat, 10 May 2014 00:30:03 +0930 Subject: [PATCH 3/7] Fixes #4808 --- code/game/objects/items/weapons/manuals.dm | 62 ++++++++-------------- 1 file changed, 22 insertions(+), 40 deletions(-) diff --git a/code/game/objects/items/weapons/manuals.dm b/code/game/objects/items/weapons/manuals.dm index ed51855f21..bca330cc4e 100644 --- a/code/game/objects/items/weapons/manuals.dm +++ b/code/game/objects/items/weapons/manuals.dm @@ -123,7 +123,7 @@

O2-Reaction Mode

- + The second mode for running the engine uses a gas mixture to produce a reaction within the supermatter. This mode requires the CE's or Atmospheric's help to set up. This is called 'O2-Reaction Mode.'

THIS MODE CAN CAUSE A RUNAWAY REACTION, LEADING TO CATASTROPHIC FAILURE IF NOT MAINTAINED. NEVER FORGET ABOUT THE ENGINE IN THIS MODE.

@@ -225,7 +225,7 @@

Power outage

A power problem has made the entire station lose power? Could be station-wide wiring problems or syndicate power sinks. In any case follow these steps: - +
  1. PANIC!
  2. Get your ass over to engineering! QUICKLY!!!
  3. @@ -284,7 +284,7 @@

Note that for a successful harvest, the body from which the blood was taken from must be dead BEFORE harvesting the pod, however the pod can be growing while they are still alive. Otherwise, the soul would not be able to migrate to the new Diona body.

- + It really is that easy! Good luck! @@ -447,7 +447,7 @@

  • Secure the external reinforced armor plating with a wrench.
  • Weld the external reinforced armor plating to the chassis.
  • - +

    Additional Information:

    • The firefighting variation is made in a similar fashion.
    • @@ -499,7 +499,7 @@ In addition to this important purpose, the R&D console has a disk menu that lets you transfer data from the database onto disk or from the disk into the database. It also has a settings menu that lets you re-sync with nearby R&D devices (if they've become disconnected), lock the console from the unworthy, upload the data to all other R&D consoles in the network (all R&D consoles are networked by default), connect/disconnect from the network, and purge all data from the database.

      - + NOTE: The technology list screen, circuit imprinter, and protolathe menus are accessible by non-scientists. This is intended to allow 'public' systems for the plebians to utilize some new devices.

      Destructive Analyzer

      @@ -687,7 +687,7 @@

      Cyborg Repairs

      Occasionally a Cyborg may become damaged. This could be in the form of impact damage from a heavy or fast-travelling object, or it could be heat damage from high temperatures, or even lasers or Electromagnetic Pulses (EMPs). - +

      Dents

      If a cyborg becomes damaged due to impact from heavy or fast-moving objects, it will become dented. Sure, a dent may not seem like much, but it can compromise the structural integrity of the cyborg, possibly causing a critical failure. Dents in a cyborg's frame are rather easy to repair, all you need is to apply a welding tool to the dented area, and the high-tech cyborg frame will repair the dent under the heat of the welder. @@ -779,9 +779,9 @@

      The Oath

      - + The Medical Oath sworn by recognised medical practitioners in the employ of NanoTrasen
      - +
      1. Now, as a new doctor, I solemnly promise that I will, to the best of my ability, serve humanity-caring for the sick, promoting good health, and alleviating pain and suffering.
      2. I recognise that the practice of medicine is a privilege with which comes considerable responsibility and I will not abuse my position.
      3. @@ -922,7 +922,7 @@

        Irish Cream:

        Mix cream and whiskey into a glass. - +

        The Manly Dorf:

        Mix ale and beer into a glass. @@ -1000,9 +1000,9 @@

        Nuclear Explosives 101

        Hello and thank you for choosing the Syndicate for your nuclear information needs. Today's crash course will deal with the operation of a Fusion Class NanoTrasen made Nuclear Device.

        - + First and foremost, DO NOT TOUCH ANYTHING UNTIL THE BOMB IS IN PLACE. Pressing any button on the compacted bomb will cause it to extend and bolt itself into place. If this is done, to unbolt it, one must completely log in, which at this time may not be possible.
        - +

        To make the nuclear device functional

        • Place the nuclear device in the designated detonation zone.
        • @@ -1012,20 +1012,20 @@ Note: If you make a mistake, press R to reset the device.
        • Press the E button to log on to the device.

        - + You now have activated the device. To deactivate the buttons at anytime, for example when you've already prepped the bomb for detonation, remove the authentication disk OR press R on the keypad.

        Now the bomb CAN ONLY be detonated using the timer. Manual detonation is not an option. Toggle off the SAFETY.
        Note: You wouldn't believe how many Syndicate Operatives with doctorates have forgotten this step.

        - - So use the - - and + + to set a detonation time between 5 seconds and 10 minutes. Then press the timer toggle button to start the countdown. Now remove the authentication disk so that the buttons deactivate.
        + + So use the - - and + + to set a detonation time between 5 seconds and 10 minutes. Then press the timer toggle button to start the countdown. Now remove the authentication disk so that the buttons deactivate.
        Note: THE BOMB IS STILL SET AND WILL DETONATE

        - + Now before you remove the disk, if you need to move the bomb, you can toggle off the anchor, move it, and re-anchor.

        - + Remember the order:
        Disk, Code, Safety, Timer, Disk, RUN!

        Intelligence Analysts believe that normal NanoTrasen procedure is for the Captain to secure the nuclear authentication disk.

        - + Good luck! @@ -1048,7 +1048,7 @@ - +

        Contents

        1. Author's Foreword
        2. @@ -1077,7 +1077,6 @@
          • Straight pipes: They're pipes. One-meter sections. Straight line. Pretty simple. Just about every pipe and device is based around this standard one-meter size, so most things will take up as much space as one of these.
          • -<<<<<<< HEAD
          • Bent pipes: Pipes with a 90 degree bend at the half-meter mark. My goodness.
          • Pipe manifolds: Pipes that are essentially a "T" shape, allowing you to connect three things at one point.
          • 4-way manifold: A four-way junction.
          • @@ -1085,9 +1084,8 @@
          • Manual valve: A valve that will block off airflow when turned. Can't be used by the AI or cyborgs, because they don't have hands.
          • Manual T-valve: Like a manual valve, but at the center of a manifold instead of a straight pipe.


          - +

          Insulated Pipes

          -=======
        3. Bent pipes: Pipes with a 90 degree bend at the half-meter mark. My goodness.
        4. Pipe manifolds: Pipes that are essentially a "T" shape, allowing you to connect three things at one point.
        5. 4-way manifold: A four-way junction.
        6. @@ -1096,7 +1094,6 @@
        7. Manual T-Valve: Like a manual valve, but at the center of a manifold instead of a straight pipe.


        8. Insulated Pipes


          ->>>>>>> 4b04be7536168ccf4a73c91dcaa4681e4db18a4e Special Public Service Announcement.
          Our regular pipes are already insulated. These are completely worthless. Punch anyone who uses them.

          @@ -1105,12 +1102,8 @@ This is usually where people get frightened, afraid, and start calling on their gods and/or cowering in fear. Yes, I can see you doing that right now. Stop it. It's unbecoming. Most of these are fairly straightforward.
          -<<<<<<< HEAD
          • Gas pump: Take a wild guess. It moves gas in the direction it's pointing (marked by the red line on one end). It moves it based on pressure, the maximum output being 4500 kPa (kilopascals). -======= -
          • Gas pump: Take a wild guess. It moves gas in the direction it's pointing (marked by the red line on one end). It moves it based on pressure, the maximum output being 4500 kPa (kilopascals). ->>>>>>> 4b04be7536168ccf4a73c91dcaa4681e4db18a4e Ordinary atmospheric pressure, for comparison, is 101.3 kPa, and the minimum pressure of room-temperature pure oxygen needed to not suffocate in a matter of minutes is 16 kPa (though 18 kPa is preferred using internals, for various reasons).
          • Volume pump: This pump goes based on volume, instead of pressure, and the possible maximum pressure it can create in the pipe on the receiving end is double the gas pump because of this, @@ -1127,28 +1120,17 @@
          • Gas filter: Essentially the opposite of a gas mixer. One side is input. The other two sides are output. One gas type will be filtered into the perpendicular output pipe, the rest will continue out the other side. Can also output from 0-4500 kPa.
          - +

          Heat Exchange Systems

          Will not set you on fire.
          These systems are used to only transfer heat between two pipes. They will not move gases or any other element, but will equalize the temperature (eventually). Note that because of how gases work (remember: pv=nRt), a higher temperature will raise pressure, and a lower one will lower temperature.
          -<<<<<<< HEAD -
            -
          • Pipe: This is a pipe that will exchange heat with the surrounding atmosphere. Place in fire for superheating. Place in space for supercooling.
          • -
          • Bent pipe: Take a wild guess.
          • -
          • Junction: The point where you connect your normal pipes to heat exchange pipes. Not necessary for heat exchangers, but necessary for H/E pipes/bent pipes.
          • -
          • Heat exchanger: These funky-looking bits attach to an open pipe end. Put another heat exchanger directly across from it, and you can transfer heat across two pipes without having to have the gases touch. - This normally shouldn't exchange with the ambient air, despite being totally exposed. Just don't ask questions...
          • -

          -=======
        9. Pipe: This is a pipe that will exchange heat with the surrounding atmosphere. Place in fire for superheating. Place in space for supercooling.
        10. Bent pipe: Take a wild guess.
        11. Junction: The point where you connect your normal pipes to heat exchange pipes. Not necessary for heat exchangers, but necessary for H/E pipes/bent pipes.
        12. Heat exchanger: These funky-looking bits attach to an open pipe end. Put another heat exchanger directly across from it, and you can transfer heat across two pipes without having to have the gases touch. This normally shouldn't exchange with the ambient air, despite being totally exposed. Just don't ask questions...

        13. ->>>>>>> 4b04be7536168ccf4a73c91dcaa4681e4db18a4e - That's about it for pipes. Go forth, armed with this knowledge, and try not to break, burn down, or kill anything. Please. @@ -1173,10 +1155,10 @@ - +

          EVA Gear and You: Not Spending All Day Inside

          Or: How not to suffocate because there's a hole in your shoes
          - +

          Contents

          1. A foreword on using EVA gear
          2. From 1dc85149ce96ec3b0cbddc1bff379b45677d5069 Mon Sep 17 00:00:00 2001 From: Zuhayr Date: Sat, 10 May 2014 00:33:09 +0930 Subject: [PATCH 4/7] Fixes #4716 --- code/modules/projectiles/targeting.dm | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/code/modules/projectiles/targeting.dm b/code/modules/projectiles/targeting.dm index 11e31828f4..f2c57c0f0e 100644 --- a/code/modules/projectiles/targeting.dm +++ b/code/modules/projectiles/targeting.dm @@ -1,8 +1,10 @@ /obj/item/weapon/gun/verb/toggle_firerate() set name = "Toggle Firerate" set category = "Object" + firerate = !firerate - if (firerate == 0) + + if (firerate) loc << "You will now continue firing when your target moves." else loc << "You will now only fire once, then lower your aim, when your target moves." From a95dd47de34ca54a9c4e21ea7301c1ac0b905f84 Mon Sep 17 00:00:00 2001 From: Zuhayr Date: Sat, 10 May 2014 00:40:20 +0930 Subject: [PATCH 5/7] Fixes #4744 --- code/modules/mob/death.dm | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/code/modules/mob/death.dm b/code/modules/mob/death.dm index 86f7ce0b49..797715c33e 100644 --- a/code/modules/mob/death.dm +++ b/code/modules/mob/death.dm @@ -48,6 +48,12 @@ /mob/proc/death(gibbed) + + //Quick fix for corpses kept propped up in chairs. ~Z + drop_r_hand() + drop_l_hand() + //End of fix. + timeofdeath = world.time living_mob_list -= src From 8d6b5e6d5c198c07ecb8215b12714fe3e03aa736 Mon Sep 17 00:00:00 2001 From: Zuhayr Date: Sat, 10 May 2014 01:23:29 +0930 Subject: [PATCH 6/7] Fixes #4911 --- code/game/objects/effects/spawners/bombspawner.dm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/code/game/objects/effects/spawners/bombspawner.dm b/code/game/objects/effects/spawners/bombspawner.dm index 1d59701bb7..26d56c153e 100644 --- a/code/game/objects/effects/spawners/bombspawner.dm +++ b/code/game/objects/effects/spawners/bombspawner.dm @@ -137,8 +137,8 @@ OT.master = V PT.air_contents.temperature = PLASMA_FLASHPOINT - PT.air_contents.toxins = 3 - PT.air_contents.carbon_dioxide = 17 + PT.air_contents.toxins = 12 + PT.air_contents.carbon_dioxide = 8 PT.air_contents.update_values() OT.air_contents.temperature = PLASMA_FLASHPOINT From a68c4e9c554939d4984a6ff3a65108acf8380a46 Mon Sep 17 00:00:00 2001 From: Zuhayr Date: Sat, 10 May 2014 10:26:05 +0930 Subject: [PATCH 7/7] Fixes #3993 --- code/game/atoms.dm | 12 +++++++----- code/modules/clothing/clothing.dm | 4 ++-- code/modules/clothing/head/helmet.dm | 2 +- code/modules/clothing/suits/armor.dm | 2 +- code/modules/mob/living/carbon/human/human.dm | 19 +++++++++++++++++++ .../mob/living/carbon/human/human_defense.dm | 2 +- code/modules/mob/living/living.dm | 3 +++ code/modules/mob/living/living_defense.dm | 2 +- code/modules/mob/living/silicon/silicon.dm | 6 ++++++ code/modules/paperwork/pen.dm | 11 ++++++++--- .../reagents/reagent_containers/borghydro.dm | 7 ++++--- .../reagents/reagent_containers/syringes.dm | 16 ++++++++++++++-- code/modules/reagents/syringe_gun.dm | 12 ++++++++++-- code/setup.dm | 1 + 14 files changed, 78 insertions(+), 21 deletions(-) diff --git a/code/game/atoms.dm b/code/game/atoms.dm index 47903bbc30..23eb17a7be 100644 --- a/code/game/atoms.dm +++ b/code/game/atoms.dm @@ -100,8 +100,10 @@ /atom/proc/emp_act(var/severity) return -/atom/proc/bullet_act(var/obj/item/projectile/Proj) - return 0 + +/atom/proc/bullet_act(obj/item/projectile/P, def_zone) + P.on_hit(src, 0, def_zone) + . = 0 /atom/proc/in_contents_of(container)//can take class or object instance as argument if(ispath(container)) @@ -317,7 +319,7 @@ its easier to just keep the beam vertical. var/full_print = md5(H.dna.uni_identity) // Add the fingerprints - // + // if(fingerprints[full_print]) switch(stringpercent(fingerprints[full_print])) //tells us how many stars are in the current prints. @@ -326,7 +328,7 @@ its easier to just keep the beam vertical. fingerprints[full_print] = full_print // You rolled a one buddy. else fingerprints[full_print] = stars(full_print, rand(0,40)) // 24 to 32 - + if(24 to 27) if(prob(3)) fingerprints[full_print] = full_print //Sucks to be you. @@ -353,7 +355,7 @@ its easier to just keep the beam vertical. else fingerprints[full_print] = stars(full_print, rand(0, 20)) //Initial touch, not leaving much evidence the first time. - + return 1 else diff --git a/code/modules/clothing/clothing.dm b/code/modules/clothing/clothing.dm index b670d1a295..da36e5544a 100644 --- a/code/modules/clothing/clothing.dm +++ b/code/modules/clothing/clothing.dm @@ -194,7 +194,7 @@ BLIND // can't see anything name = "Space helmet" icon_state = "space" desc = "A special helmet designed for work in a hazardous, low-pressure environment." - flags = FPRINT | TABLEPASS | HEADCOVERSEYES | BLOCKHAIR | HEADCOVERSMOUTH | STOPSPRESSUREDMAGE + flags = FPRINT | TABLEPASS | HEADCOVERSEYES | BLOCKHAIR | HEADCOVERSMOUTH | STOPSPRESSUREDMAGE | THICKMATERIAL item_state = "space" permeability_coefficient = 0.01 armor = list(melee = 0, bullet = 0, laser = 0,energy = 0, bomb = 0, bio = 100, rad = 50) @@ -212,7 +212,7 @@ BLIND // can't see anything w_class = 4//bulky item gas_transfer_coefficient = 0.01 permeability_coefficient = 0.02 - flags = FPRINT | TABLEPASS | STOPSPRESSUREDMAGE + flags = FPRINT | TABLEPASS | STOPSPRESSUREDMAGE | THICKMATERIAL body_parts_covered = UPPER_TORSO|LOWER_TORSO|LEGS|FEET|ARMS|HANDS allowed = list(/obj/item/device/flashlight,/obj/item/weapon/tank/emergency_oxygen) slowdown = 3 diff --git a/code/modules/clothing/head/helmet.dm b/code/modules/clothing/head/helmet.dm index c4b3c6224f..9b5f6bd3d1 100644 --- a/code/modules/clothing/head/helmet.dm +++ b/code/modules/clothing/head/helmet.dm @@ -2,7 +2,7 @@ name = "helmet" desc = "Standard Security gear. Protects the head from impacts." icon_state = "helmet" - flags = FPRINT | TABLEPASS | HEADCOVERSEYES + flags = FPRINT | TABLEPASS | HEADCOVERSEYES | THICKMATERIAL item_state = "helmet" armor = list(melee = 50, bullet = 15, laser = 50,energy = 10, bomb = 25, bio = 0, rad = 0) flags_inv = HIDEEARS|HIDEEYES diff --git a/code/modules/clothing/suits/armor.dm b/code/modules/clothing/suits/armor.dm index 56ef9b7773..39ff06677c 100644 --- a/code/modules/clothing/suits/armor.dm +++ b/code/modules/clothing/suits/armor.dm @@ -2,7 +2,7 @@ /obj/item/clothing/suit/armor allowed = list(/obj/item/weapon/gun/energy,/obj/item/weapon/reagent_containers/spray/pepper,/obj/item/weapon/gun/projectile,/obj/item/ammo_magazine,/obj/item/ammo_casing,/obj/item/weapon/melee/baton,/obj/item/weapon/handcuffs) body_parts_covered = UPPER_TORSO|LOWER_TORSO - flags = FPRINT | TABLEPASS + flags = FPRINT | TABLEPASS | THICKMATERIAL cold_protection = UPPER_TORSO|LOWER_TORSO min_cold_protection_temperature = ARMOR_MIN_COLD_PROTECTION_TEMPERATURE diff --git a/code/modules/mob/living/carbon/human/human.dm b/code/modules/mob/living/carbon/human/human.dm index 89f3b8eccc..2dfb42bb34 100644 --- a/code/modules/mob/living/carbon/human/human.dm +++ b/code/modules/mob/living/carbon/human/human.dm @@ -1291,3 +1291,22 @@ W.update_icon() W.message = message W.add_fingerprint(src) + +/mob/living/carbon/human/can_inject(var/mob/user, var/error_msg, var/target_zone) + . = 1 + + if(!user) + target_zone = pick("chest","chest","chest","left leg","right leg","left arm", "right arm", "head") + else if(!target_zone) + target_zone = user.zone_sel.selecting + + switch(target_zone) + if("head") + if(head && head.flags & THICKMATERIAL) + . = 0 + else + if(wear_suit && wear_suit.flags & THICKMATERIAL) + . = 0 + if(!. && error_msg && user) + // Might need re-wording. + user << "There is no exposed flesh or thin material [target_zone == "head" ? "on their head" : "on their body"] to inject into." \ No newline at end of file diff --git a/code/modules/mob/living/carbon/human/human_defense.dm b/code/modules/mob/living/carbon/human/human_defense.dm index c3e6cb4397..44deb248ca 100644 --- a/code/modules/mob/living/carbon/human/human_defense.dm +++ b/code/modules/mob/living/carbon/human/human_defense.dm @@ -52,7 +52,7 @@ emp_act return -1 // complete projectile permutation if(check_shields(P.damage, "the [P.name]")) - P.on_hit(src, 2) + P.on_hit(src, 2, def_zone) return 2 //BEGIN BOOK'S TASER NERF. diff --git a/code/modules/mob/living/living.dm b/code/modules/mob/living/living.dm index 93a3298b89..4998c4cbc8 100644 --- a/code/modules/mob/living/living.dm +++ b/code/modules/mob/living/living.dm @@ -211,6 +211,9 @@ O.emp_act(severity) ..() +/mob/living/proc/can_inject() + return 1 + /mob/living/proc/get_organ_target() var/mob/shooter = src var/t = shooter:zone_sel.selecting diff --git a/code/modules/mob/living/living_defense.dm b/code/modules/mob/living/living_defense.dm index 9e94ab6ac3..508ff93e23 100644 --- a/code/modules/mob/living/living_defense.dm +++ b/code/modules/mob/living/living_defense.dm @@ -58,7 +58,7 @@ return 2 if(!P.nodamage) apply_damage((P.damage/(absorb+1)), P.damage_type, def_zone, absorb, 0, P) - P.on_hit(src, absorb) + P.on_hit(src, absorb, def_zone) return absorb /mob/living/hitby(atom/movable/AM as mob|obj,var/speed = 5)//Standardization and logging -Sieve diff --git a/code/modules/mob/living/silicon/silicon.dm b/code/modules/mob/living/silicon/silicon.dm index afdeeb81d4..944063d9e0 100644 --- a/code/modules/mob/living/silicon/silicon.dm +++ b/code/modules/mob/living/silicon/silicon.dm @@ -201,3 +201,9 @@ dat += "
            " src << browse(dat, "window=airoster") onclose(src, "airoster") + +//can't inject synths +/mob/living/silicon/can_inject(var/mob/user, var/error_msg) + if(error_msg) + user << "The armoured plating is too tough." + return 0 diff --git a/code/modules/paperwork/pen.dm b/code/modules/paperwork/pen.dm index 2548c764ec..369f1a7819 100644 --- a/code/modules/paperwork/pen.dm +++ b/code/modules/paperwork/pen.dm @@ -90,12 +90,17 @@ origin_tech = "materials=2;syndicate=5" -/obj/item/weapon/pen/paralysis/attack(mob/M as mob, mob/user as mob) +/obj/item/weapon/pen/paralysis/attack(mob/living/M as mob, mob/user as mob) + if(!(istype(M,/mob))) return + ..() - if(reagents.total_volume) - if(M.reagents) reagents.trans_to(M, 50) + + + if(M.can_inject(user,1)) + if(reagents.total_volume) + if(M.reagents) reagents.trans_to(M, 50) return diff --git a/code/modules/reagents/reagent_containers/borghydro.dm b/code/modules/reagents/reagent_containers/borghydro.dm index 8491c35fa8..a8d88bcf20 100644 --- a/code/modules/reagents/reagent_containers/borghydro.dm +++ b/code/modules/reagents/reagent_containers/borghydro.dm @@ -62,14 +62,15 @@ var/datum/reagents/R = reagent_list[reagent_list.len] R.add_reagent(reagent, 30) -/obj/item/weapon/reagent_containers/borghypo/attack(mob/M as mob, mob/user as mob) +/obj/item/weapon/reagent_containers/borghypo/attack(mob/living/M as mob, mob/user as mob) var/datum/reagents/R = reagent_list[mode] if(!R.total_volume) user << "\red The injector is empty." return - if (!( istype(M, /mob) )) + if (!(istype(M))) return - if (R.total_volume) + + if (R.total_volume && M.can_inject(user,1)) user << "\blue You inject [M] with the injector." M << "\red You feel a tiny prick!" diff --git a/code/modules/reagents/reagent_containers/syringes.dm b/code/modules/reagents/reagent_containers/syringes.dm index 72275227e3..183e74fba0 100644 --- a/code/modules/reagents/reagent_containers/syringes.dm +++ b/code/modules/reagents/reagent_containers/syringes.dm @@ -140,11 +140,23 @@ return if(ismob(target) && target != user) + var/time = 30 //Injecting through a hardsuit takes longer due to needing to find a port. + if(istype(target,/mob/living/carbon/human)) + var/mob/living/carbon/human/H = target - if(H.wear_suit && istype(H.wear_suit,/obj/item/clothing/suit/space)) - time = 60 + if(H.wear_suit) + if(istype(H.wear_suit,/obj/item/clothing/suit/space)) + time = 60 + else if(!H.can_inject(user, 1)) + return + + else if(isliving(target)) + + var/mob/living/M = target + if(!M.can_inject(user, 1)) + return for(var/mob/O in viewers(world.view, user)) if(time == 30) diff --git a/code/modules/reagents/syringe_gun.dm b/code/modules/reagents/syringe_gun.dm index 2600d11676..07693c086d 100644 --- a/code/modules/reagents/syringe_gun.dm +++ b/code/modules/reagents/syringe_gun.dm @@ -93,10 +93,18 @@ M.attack_log += "\[[time_stamp()]\] UNKNOWN SUBJECT (No longer exists) shot [M]/[M.ckey] with a syringegun ([R])" msg_admin_attack("UNKNOWN shot [M] ([M.ckey]) with a syringegun ([R]) (JMP)") - if(D.reagents) - D.reagents.trans_to(M, 15) + var/mob/living/T + if(istype(M,/mob/living)) + T = M + M.visible_message("[M] is hit by the syringe!") + if(T && istype(T) && T.can_inject()) + if(D.reagents) + D.reagents.trans_to(M, 15) + else + M.visible_message("The syringe bounces off [M]!") + del(D) break if(D) diff --git a/code/setup.dm b/code/setup.dm index 837846e2ba..f3f3895c29 100644 --- a/code/setup.dm +++ b/code/setup.dm @@ -199,6 +199,7 @@ var/MAX_EXPLOSION_RANGE = 14 #define MASKCOVERSMOUTH 2048 // on other items, these are just for mask/head #define HEADCOVERSMOUTH 2048 +#define THICKMATERIAL 1024 //From /tg: prevents syringes, parapens and hypos if the external suit or helmet (if targeting head) has this flag. Example: space suits, biosuit, bombsuits, thick suits that cover your body. (NOTE: flag shared with NOSLIP for shoes) #define NOSLIP 1024 //prevents from slipping on wet floors, in space etc #define OPENCONTAINER 4096 // is an open container for chemistry purposes