diff --git a/baystation12.dme b/baystation12.dme
index 9de1e153ca6..3945fe4883c 100644
--- a/baystation12.dme
+++ b/baystation12.dme
@@ -6,12 +6,232 @@
// BEGIN_FILE_DIR
#define FILE_DIR .
#define FILE_DIR "code"
+#define FILE_DIR "code/__HELPERS"
+#define FILE_DIR "code/ATMOSPHERICS"
+#define FILE_DIR "code/ATMOSPHERICS/components"
+#define FILE_DIR "code/ATMOSPHERICS/components/binary_devices"
+#define FILE_DIR "code/ATMOSPHERICS/components/trinary_devices"
+#define FILE_DIR "code/ATMOSPHERICS/components/unary"
+#define FILE_DIR "code/controllers"
+#define FILE_DIR "code/datums"
+#define FILE_DIR "code/datums/diseases"
+#define FILE_DIR "code/datums/diseases/advance"
+#define FILE_DIR "code/datums/diseases/advance/symptoms"
+#define FILE_DIR "code/datums/helper_datums"
+#define FILE_DIR "code/datums/organs"
+#define FILE_DIR "code/datums/spells"
+#define FILE_DIR "code/defines"
+#define FILE_DIR "code/defines/obj"
+#define FILE_DIR "code/defines/obj/clothing"
+#define FILE_DIR "code/defines/procs"
+#define FILE_DIR "code/defines/sd_procs"
+#define FILE_DIR "code/FEA"
+#define FILE_DIR "code/game"
+#define FILE_DIR "code/game/area"
+#define FILE_DIR "code/game/events"
+#define FILE_DIR "code/game/events/EventProcs"
+#define FILE_DIR "code/game/events/Events"
+#define FILE_DIR "code/game/gamemodes"
+#define FILE_DIR "code/game/gamemodes/autotraitor"
+#define FILE_DIR "code/game/gamemodes/blob"
+#define FILE_DIR "code/game/gamemodes/blob/blobs"
+#define FILE_DIR "code/game/gamemodes/changeling"
+#define FILE_DIR "code/game/gamemodes/cult"
+#define FILE_DIR "code/game/gamemodes/epidemic"
+#define FILE_DIR "code/game/gamemodes/events"
+#define FILE_DIR "code/game/gamemodes/events/holidays"
+#define FILE_DIR "code/game/gamemodes/extended"
+#define FILE_DIR "code/game/gamemodes/malfunction"
+#define FILE_DIR "code/game/gamemodes/meme"
+#define FILE_DIR "code/game/gamemodes/meteor"
+#define FILE_DIR "code/game/gamemodes/nuclear"
+#define FILE_DIR "code/game/gamemodes/revolution"
+#define FILE_DIR "code/game/gamemodes/sandbox"
+#define FILE_DIR "code/game/gamemodes/traitor"
+#define FILE_DIR "code/game/gamemodes/wizard"
+#define FILE_DIR "code/game/jobs"
+#define FILE_DIR "code/game/jobs/job"
+#define FILE_DIR "code/game/machinery"
+#define FILE_DIR "code/game/machinery/atmoalter"
+#define FILE_DIR "code/game/machinery/bots"
+#define FILE_DIR "code/game/machinery/camera"
+#define FILE_DIR "code/game/machinery/computer"
+#define FILE_DIR "code/game/machinery/doors"
+#define FILE_DIR "code/game/machinery/embedded_controller"
+#define FILE_DIR "code/game/machinery/kitchen"
+#define FILE_DIR "code/game/machinery/pipe"
+#define FILE_DIR "code/game/machinery/telecomms"
+#define FILE_DIR "code/game/magic"
+#define FILE_DIR "code/game/mecha"
+#define FILE_DIR "code/game/mecha/combat"
+#define FILE_DIR "code/game/mecha/equipment"
+#define FILE_DIR "code/game/mecha/equipment/tools"
+#define FILE_DIR "code/game/mecha/equipment/weapons"
+#define FILE_DIR "code/game/mecha/medical"
+#define FILE_DIR "code/game/mecha/working"
+#define FILE_DIR "code/game/objects"
+#define FILE_DIR "code/game/objects/closets"
+#define FILE_DIR "code/game/objects/closets/secure"
+#define FILE_DIR "code/game/objects/effects"
+#define FILE_DIR "code/game/objects/effects/decals"
+#define FILE_DIR "code/game/objects/effects/decals/Cleanable"
+#define FILE_DIR "code/game/objects/effects/spawners"
+#define FILE_DIR "code/game/objects/items"
+#define FILE_DIR "code/game/objects/items/devices"
+#define FILE_DIR "code/game/objects/items/devices/PDA"
+#define FILE_DIR "code/game/objects/items/devices/radio"
+#define FILE_DIR "code/game/objects/items/robot"
+#define FILE_DIR "code/game/objects/items/stacks"
+#define FILE_DIR "code/game/objects/items/stacks/sheets"
+#define FILE_DIR "code/game/objects/items/stacks/tiles"
+#define FILE_DIR "code/game/objects/items/weapons"
+#define FILE_DIR "code/game/objects/items/weapons/grenades"
+#define FILE_DIR "code/game/objects/items/weapons/implants"
+#define FILE_DIR "code/game/objects/items/weapons/secstorage"
+#define FILE_DIR "code/game/objects/items/weapons/storage"
+#define FILE_DIR "code/game/objects/items/weapons/tanks"
+#define FILE_DIR "code/game/objects/storage"
+#define FILE_DIR "code/game/objects/structures"
+#define FILE_DIR "code/game/objects/structures/crates_lockers"
+#define FILE_DIR "code/game/objects/structures/crates_lockers/closets"
+#define FILE_DIR "code/game/objects/structures/crates_lockers/closets/secure"
+#define FILE_DIR "code/game/objects/structures/stool_bed_chair_nest"
+#define FILE_DIR "code/game/structure"
+#define FILE_DIR "code/game/turfs"
+#define FILE_DIR "code/game/turfs/simulated"
+#define FILE_DIR "code/game/turfs/space"
+#define FILE_DIR "code/game/turfs/unsimulated"
+#define FILE_DIR "code/game/vehicles"
+#define FILE_DIR "code/game/vehicles/airtight"
+#define FILE_DIR "code/game/verbs"
+#define FILE_DIR "code/js"
+#define FILE_DIR "code/modules"
+#define FILE_DIR "code/modules/admin"
+#define FILE_DIR "code/modules/admin/DB ban"
+#define FILE_DIR "code/modules/admin/permissionverbs"
+#define FILE_DIR "code/modules/admin/verbs"
+#define FILE_DIR "code/modules/assembly"
+#define FILE_DIR "code/modules/awaymissions"
+#define FILE_DIR "code/modules/awaymissions/maploader"
+#define FILE_DIR "code/modules/chemical"
+#define FILE_DIR "code/modules/client"
+#define FILE_DIR "code/modules/clothing"
+#define FILE_DIR "code/modules/clothing/glasses"
+#define FILE_DIR "code/modules/clothing/gloves"
+#define FILE_DIR "code/modules/clothing/head"
+#define FILE_DIR "code/modules/clothing/masks"
+#define FILE_DIR "code/modules/clothing/shoes"
+#define FILE_DIR "code/modules/clothing/spacesuits"
+#define FILE_DIR "code/modules/clothing/suits"
+#define FILE_DIR "code/modules/clothing/under"
+#define FILE_DIR "code/modules/clothing/under/jobs"
+#define FILE_DIR "code/modules/clothing/uniforms"
+#define FILE_DIR "code/modules/critters"
+#define FILE_DIR "code/modules/critters/hivebots"
+#define FILE_DIR "code/modules/customitems"
+#define FILE_DIR "code/modules/DetectiveWork"
+#define FILE_DIR "code/modules/flufftext"
+#define FILE_DIR "code/modules/food"
+#define FILE_DIR "code/modules/genetics"
+#define FILE_DIR "code/modules/icon generation"
+#define FILE_DIR "code/modules/library"
+#define FILE_DIR "code/modules/liquid"
+#define FILE_DIR "code/modules/maps"
+#define FILE_DIR "code/modules/mining"
+#define FILE_DIR "code/modules/mob"
+#define FILE_DIR "code/modules/mob/dead"
+#define FILE_DIR "code/modules/mob/dead/observer"
+#define FILE_DIR "code/modules/mob/living"
+#define FILE_DIR "code/modules/mob/living/blob"
+#define FILE_DIR "code/modules/mob/living/carbon"
+#define FILE_DIR "code/modules/mob/living/carbon/alien"
+#define FILE_DIR "code/modules/mob/living/carbon/alien/humanoid"
+#define FILE_DIR "code/modules/mob/living/carbon/alien/humanoid/caste"
+#define FILE_DIR "code/modules/mob/living/carbon/alien/larva"
+#define FILE_DIR "code/modules/mob/living/carbon/alien/special"
+#define FILE_DIR "code/modules/mob/living/carbon/amorph"
+#define FILE_DIR "code/modules/mob/living/carbon/brain"
+#define FILE_DIR "code/modules/mob/living/carbon/human"
+#define FILE_DIR "code/modules/mob/living/carbon/metroid"
+#define FILE_DIR "code/modules/mob/living/carbon/monkey"
+#define FILE_DIR "code/modules/mob/living/parasite"
+#define FILE_DIR "code/modules/mob/living/silicon"
+#define FILE_DIR "code/modules/mob/living/silicon/ai"
+#define FILE_DIR "code/modules/mob/living/silicon/ai/freelook"
+#define FILE_DIR "code/modules/mob/living/silicon/decoy"
+#define FILE_DIR "code/modules/mob/living/silicon/pai"
+#define FILE_DIR "code/modules/mob/living/silicon/robot"
+#define FILE_DIR "code/modules/mob/living/simple_animal"
+#define FILE_DIR "code/modules/mob/living/simple_animal/friendly"
+#define FILE_DIR "code/modules/mob/living/simple_animal/hostile"
+#define FILE_DIR "code/modules/mob/new_player"
+#define FILE_DIR "code/modules/mob/simple_animal"
+#define FILE_DIR "code/modules/paperwork"
+#define FILE_DIR "code/modules/power"
+#define FILE_DIR "code/modules/power/antimatter"
+#define FILE_DIR "code/modules/power/singularity"
+#define FILE_DIR "code/modules/power/singularity/particle_accelerator"
+#define FILE_DIR "code/modules/projectiles"
+#define FILE_DIR "code/modules/projectiles/ammunition"
+#define FILE_DIR "code/modules/projectiles/guns"
+#define FILE_DIR "code/modules/projectiles/guns/energy"
+#define FILE_DIR "code/modules/projectiles/guns/projectile"
+#define FILE_DIR "code/modules/projectiles/projectile"
+#define FILE_DIR "code/modules/reagents"
+#define FILE_DIR "code/modules/reagents/reagent_containers"
+#define FILE_DIR "code/modules/reagents/reagent_containers/food"
+#define FILE_DIR "code/modules/reagents/reagent_containers/food/drinks"
+#define FILE_DIR "code/modules/reagents/reagent_containers/food/drinks/bottle"
+#define FILE_DIR "code/modules/reagents/reagent_containers/food/snacks"
+#define FILE_DIR "code/modules/reagents/reagent_containers/glass"
+#define FILE_DIR "code/modules/reagents/reagent_containers/glass/bottle"
+#define FILE_DIR "code/modules/recycling"
+#define FILE_DIR "code/modules/research"
+#define FILE_DIR "code/modules/research/xenoarchaeology"
+#define FILE_DIR "code/modules/scripting"
+#define FILE_DIR "code/modules/scripting/AST"
+#define FILE_DIR "code/modules/scripting/AST/Operators"
+#define FILE_DIR "code/modules/scripting/Implementations"
+#define FILE_DIR "code/modules/scripting/Interpreter"
+#define FILE_DIR "code/modules/scripting/Parser"
+#define FILE_DIR "code/modules/scripting/Scanner"
+#define FILE_DIR "code/modules/security levels"
#define FILE_DIR "code/TriDimension"
+#define FILE_DIR "code/unused"
+#define FILE_DIR "code/unused/beast"
+#define FILE_DIR "code/unused/computer2"
+#define FILE_DIR "code/unused/disease2"
+#define FILE_DIR "code/unused/gamemodes"
+#define FILE_DIR "code/unused/hivebot"
+#define FILE_DIR "code/unused/mining"
+#define FILE_DIR "code/unused/optics"
+#define FILE_DIR "code/unused/pda2"
+#define FILE_DIR "code/unused/powerarmor"
+#define FILE_DIR "code/unused/spacecraft"
#define FILE_DIR "code/WorkInProgress"
+#define FILE_DIR "code/WorkInProgress/AI_Visibility"
+#define FILE_DIR "code/WorkInProgress/animusstation"
+#define FILE_DIR "code/WorkInProgress/Apples"
#define FILE_DIR "code/WorkInProgress/Cael_Aislinn"
#define FILE_DIR "code/WorkInProgress/Cael_Aislinn/Rust"
#define FILE_DIR "code/WorkInProgress/Cael_Aislinn/Supermatter"
+#define FILE_DIR "code/WorkInProgress/carn"
+#define FILE_DIR "code/WorkInProgress/Chinsky"
+#define FILE_DIR "code/WorkInProgress/mapload"
+#define FILE_DIR "code/WorkInProgress/Mini"
+#define FILE_DIR "code/WorkInProgress/Mloc"
+#define FILE_DIR "code/WorkInProgress/organs"
+#define FILE_DIR "code/WorkInProgress/Ported"
+#define FILE_DIR "code/WorkInProgress/Ported/Abi79"
+#define FILE_DIR "code/WorkInProgress/Ported/Bureaucracy"
+#define FILE_DIR "code/WorkInProgress/Ported/Spawners"
+#define FILE_DIR "code/WorkInProgress/SkyMarshal"
#define FILE_DIR "code/WorkInProgress/Susan"
+#define FILE_DIR "code/WorkInProgress/Tastyfish"
+#define FILE_DIR "code/WorkInProgress/virus2"
+#define FILE_DIR "code/WorkInProgress/virus2/Disease2"
+#define FILE_DIR "code/WorkInProgress/Wrongnumber"
+#define FILE_DIR "code/ZAS"
#define FILE_DIR "html"
#define FILE_DIR "icons"
#define FILE_DIR "icons/48x48"
@@ -33,7 +253,9 @@
#define FILE_DIR "icons/turf"
#define FILE_DIR "icons/vehicles"
#define FILE_DIR "icons/vending_icons"
+#define FILE_DIR "interface"
#define FILE_DIR "maps"
+#define FILE_DIR "maps/RandomZLevels"
#define FILE_DIR "sound"
#define FILE_DIR "sound/AI"
#define FILE_DIR "sound/ambience"
@@ -49,6 +271,8 @@
#define FILE_DIR "sound/violin"
#define FILE_DIR "sound/voice"
#define FILE_DIR "sound/weapons"
+#define FILE_DIR "tools"
+#define FILE_DIR "tools/Redirector"
// END_FILE_DIR
// BEGIN_PREFERENCES
@@ -864,6 +1088,7 @@
#include "code\modules\mob\living\carbon\brain\hud.dm"
#include "code\modules\mob\living\carbon\brain\life.dm"
#include "code\modules\mob\living\carbon\brain\MMI.dm"
+#include "code\modules\mob\living\carbon\brain\posibrain.dm"
#include "code\modules\mob\living\carbon\brain\say.dm"
#include "code\modules\mob\living\carbon\human\death.dm"
#include "code\modules\mob\living\carbon\human\emote.dm"
diff --git a/code/ATMOSPHERICS/components/tvalve.dm b/code/ATMOSPHERICS/components/tvalve.dm
index 61cd0f6c6e7..5683df4bf71 100644
--- a/code/ATMOSPHERICS/components/tvalve.dm
+++ b/code/ATMOSPHERICS/components/tvalve.dm
@@ -395,7 +395,7 @@ obj/machinery/atmospherics/tvalve/mirrored
return
..()
- //Radio remote control
+ //Radio remote control -eh?
proc
set_frequency(new_frequency)
diff --git a/code/ATMOSPHERICS/pipes.dm b/code/ATMOSPHERICS/pipes.dm
index cbff1f1b643..e13a58f6018 100644
--- a/code/ATMOSPHERICS/pipes.dm
+++ b/code/ATMOSPHERICS/pipes.dm
@@ -721,7 +721,7 @@ obj/machinery/atmospherics/pipe
icon_state = "manifold_[connected]_[unconnected]"
- if(!connected)
+ if(!connected)
del(src)
return
@@ -832,7 +832,7 @@ obj/machinery/atmospherics/pipe
icon_state = "manifold-y-f"
manifold4w
- icon = 'pipe_manifold.dmi'
+ icon = 'icons/obj/atmospherics/pipe_manifold.dmi'
icon_state = "manifold4w-f"
name = "4-way pipe manifold"
@@ -841,7 +841,7 @@ obj/machinery/atmospherics/pipe
volume = 140
dir = SOUTH
- initialize_directions = EAST|NORTH|WEST|SOUTH
+ initialize_directions = NORTH|SOUTH|EAST|WEST
var/obj/machinery/atmospherics/node1
var/obj/machinery/atmospherics/node2
@@ -849,6 +849,7 @@ obj/machinery/atmospherics/pipe
var/obj/machinery/atmospherics/node4
level = 1
+ layer = 2.4 //under wires with their 2.44
hide(var/i)
if(level == 1 && istype(loc, /turf/simulated))
@@ -862,7 +863,7 @@ obj/machinery/atmospherics/pipe
if(!parent)
..()
else
- machines.Remove(src)
+ . = PROCESS_KILL
/*
if(!node1)
parent.mingle_with_turf(loc, 70)
@@ -913,14 +914,13 @@ obj/machinery/atmospherics/pipe
if(reference == node4)
if(istype(node4, /obj/machinery/atmospherics/pipe))
del(parent)
- node3 = null
+ node4 = null
update_icon()
..()
update_icon()
- overlays = new()
if(node1&&node2&&node3&&node4)
var/C = ""
switch(color)
@@ -934,7 +934,7 @@ obj/machinery/atmospherics/pipe
else
icon_state = "manifold4w_ex"
- var/icon/con = new/icon('pipe_manifold.dmi',"manifold4w_con")
+ var/icon/con = new/icon('pipe_manifold.dmi',"manifold4w_con") //Since 4-ways are supposed to be directionless, they need an overlay instead it seems.
if(node1)
overlays += new/image(con,dir=1)
@@ -950,23 +950,24 @@ obj/machinery/atmospherics/pipe
return
initialize()
+
for(var/obj/machinery/atmospherics/target in get_step(src,1))
- if(target.initialize_directions & get_dir(target,src))
+ if(target.initialize_directions & 2)
node1 = target
break
for(var/obj/machinery/atmospherics/target in get_step(src,2))
- if(target.initialize_directions & get_dir(target,src))
+ if(target.initialize_directions & 1)
node2 = target
break
for(var/obj/machinery/atmospherics/target in get_step(src,4))
- if(target.initialize_directions & get_dir(target,src))
+ if(target.initialize_directions & 8)
node3 = target
break
for(var/obj/machinery/atmospherics/target in get_step(src,8))
- if(target.initialize_directions & get_dir(target,src))
+ if(target.initialize_directions & 4)
node4 = target
break
@@ -1026,6 +1027,88 @@ obj/machinery/atmospherics/pipe
manifold4w/general/hidden
level = 1
icon_state = "manifold4w-f"
+
+ cap
+ name = "pipe endcap"
+ desc = "An endcap for pipes"
+ icon = 'pipes.dmi'
+ icon_state = "cap"
+ level = 2
+ layer = 2.4 //under wires with their 2.44
+
+ volume = 35
+
+ dir = SOUTH
+ initialize_directions = NORTH
+
+ var/obj/machinery/atmospherics/node
+
+ New()
+ ..()
+ switch(dir)
+ if(SOUTH)
+ initialize_directions = NORTH
+ if(NORTH)
+ initialize_directions = SOUTH
+ if(WEST)
+ initialize_directions = EAST
+ if(EAST)
+ initialize_directions = WEST
+
+ hide(var/i)
+ if(level == 1 && istype(loc, /turf/simulated))
+ invisibility = i ? 101 : 0
+ update_icon()
+
+ pipeline_expansion()
+ return list(node)
+
+ process()
+ if(!parent)
+ ..()
+ else
+ . = PROCESS_KILL
+ Del()
+ if(node)
+ node.disconnect(src)
+
+ ..()
+
+ disconnect(obj/machinery/atmospherics/reference)
+ if(reference == node)
+ if(istype(node, /obj/machinery/atmospherics/pipe))
+ del(parent)
+ node = null
+
+ update_icon()
+
+ ..()
+
+ update_icon()
+ overlays = new()
+
+ icon_state = "cap[invisibility ? "-f" : ""]"
+ return
+
+ initialize()
+ for(var/obj/machinery/atmospherics/target in get_step(src, dir))
+ if(target.initialize_directions & get_dir(target,src))
+ node = target
+ break
+
+ var/turf/T = src.loc // hide if turf is not intact
+ hide(T.intact)
+ //update_icon()
+ update_icon()
+
+ visible
+ level = 2
+ icon_state = "cap"
+
+ hidden
+ level = 1
+ icon_state = "cap-f"
+
obj/machinery/atmospherics/pipe/attackby(var/obj/item/weapon/W as obj, var/mob/user as mob)
if (istype(src, /obj/machinery/atmospherics/pipe/tank))
diff --git a/code/WorkInProgress/surgery.dm b/code/WorkInProgress/surgery.dm
index 404afdbb859..f07cf4b1f05 100644
--- a/code/WorkInProgress/surgery.dm
+++ b/code/WorkInProgress/surgery.dm
@@ -39,6 +39,16 @@
// evil infection stuff that will make everyone hate me
var/can_infect = 0
+ proc/isright(obj/item/tool) //is it is a required surgical tool for this step
+ return (istype(tool,required_tool))
+
+ proc/isacceptable(obj/item/tool) //is it is an accepted replacement tool for this step
+ if (allowed_tools)
+ for (var/T in allowed_tools)
+ if (istype(tool,T))
+ return 1
+ return 0
+
// Build this list by iterating over all typesof(/datum/surgery_step) and sorting the results by priority
@@ -1226,3 +1236,68 @@ proc/spread_germs_to_organ(datum/organ/external/E, mob/living/carbon/human/user)
user:bloody_hands(target, 0)
user:bloody_body(target)
+//////////////////////////////////////////////////////////////////
+// IMPLANT REMOVAL SURGERY //
+//////////////////////////////////////////////////////////////////
+
+/datum/surgery_step/implant_removal
+ required_tool = /obj/item/weapon/hemostat
+ allowed_tools = list(/obj/item/weapon/wirecutters, /obj/item/weapon/kitchen/utensil/fork)
+
+ min_duration = 80
+ max_duration = 100
+
+ can_use(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
+ var/datum/organ/external/affected = target.get_organ(target_zone)
+ return affected.open == 2 && !(affected.status & ORGAN_BLEEDING)
+
+ begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
+ var/datum/organ/external/affected = target.get_organ(target_zone)
+ user.visible_message("[user] starts poking around inside the incision on [target]'s [affected.display_name] with \the [tool].", \
+ "You start poking around inside the incision on [target]'s [affected.display_name] with \the [tool]" )
+ target.custom_pain("The pain in your chest is living hell!",1)
+
+ end_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
+ var/datum/organ/external/chest/affected = target.get_organ("chest")
+
+ var/find_prob = 0
+ if (affected.implants.len)
+ var/obj/item/weapon/implant/imp = affected.implants[1]
+ if (imp.islegal())
+ find_prob +=60
+ else
+ find_prob +=40
+ if (isright(tool))
+ find_prob +=20
+
+ if (prob(find_prob))
+ user.visible_message("\blue [user] takes something out of incision on [target]'s [affected.display_name] with \the [tool].", \
+ "\blue You take something out of incision on [target]'s [affected.display_name]s with \the [tool]." )
+ var/obj/item/weapon/implant/imp = affected.implants[1]
+ affected.implants -= imp
+ imp.loc = get_turf(target)
+ imp.imp_in = null
+ imp.implanted = 0
+ else
+ user.visible_message("\blue [user] could not find anything inside [target]'s [affected.display_name], and pulls \the [tool] out.", \
+ "\blue You could not find anything inside [target]'s [affected.display_name]." )
+ if (ishuman(user) && prob(80)) user:bloody_hands(target, 0)
+
+ fail_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
+ var/datum/organ/external/chest/affected = target.get_organ(target_zone)
+ user.visible_message("\red [user]'s hand slips, scraping tissue inside [target]'s [affected.display_name] with \the [tool]!", \
+ "\red Your hand slips, scraping tissue inside [target]'s [affected.display_name] with \the [tool]!")
+ affected.createwound(CUT, 20)
+ if (affected.implants.len)
+ var/fail_prob = 10
+ if (!isright(tool))
+ fail_prob += 30
+ if (prob(fail_prob))
+ var/obj/item/weapon/implant/imp = affected.implants[1]
+ user.visible_message("\red Something beeps inside [target]'s [affected.display_name]!")
+ playsound(imp.loc, 'sound/weapons/armbomb.ogg', 75, 1, -3)
+ spawn(15)
+ imp.activate()
+ if (ishuman(user))
+ user:bloody_hands(target, 0)
+ user:bloody_body(target)
\ No newline at end of file
diff --git a/code/datums/organs/organ_external.dm b/code/datums/organs/organ_external.dm
index 06f46ed1927..167cbe6f0b1 100644
--- a/code/datums/organs/organ_external.dm
+++ b/code/datums/organs/organ_external.dm
@@ -34,6 +34,7 @@
var/open = 0
var/stage = 0
+ var/list/implants = list()
// INTERNAL germs inside the organ, this is BAD if it's greater 0
var/germ_level = 0
diff --git a/code/game/gamemodes/game_mode.dm b/code/game/gamemodes/game_mode.dm
index 74113ce65c8..638cecdb566 100644
--- a/code/game/gamemodes/game_mode.dm
+++ b/code/game/gamemodes/game_mode.dm
@@ -62,6 +62,8 @@ Devices and Tools;
Whitespace:Seperator;
Implants;
/obj/item/weapon/storage/syndie_kit/imp_freedom:3:Freedom Implant;
+/obj/item/weapon/implant/explosive:6:Explosive Implant (DANGER!);
+/obj/item/weapon/implant/compressed:4:Compressed Matter Implant;
/obj/item/weapon/storage/syndie_kit/imp_uplink:10:Uplink Implant (Contains 5 Telecrystals);
Whitespace:Seperator;
(Pointless) Badassery;
@@ -419,4 +421,4 @@ proc/display_roundstart_logout_report()
for(var/mob/M in mob_list)
if(M.client && M.client.holder)
- M << msg
+ M << msg
diff --git a/code/game/machinery/adv_med.dm b/code/game/machinery/adv_med.dm
index 3bb0f83bad9..ef556cbc701 100644
--- a/code/game/machinery/adv_med.dm
+++ b/code/game/machinery/adv_med.dm
@@ -296,7 +296,7 @@
AN = "[e.broken_description]:"
if(e.open)
open = "Open:"
- if(e.implant)
+ if(e.implants.len)
imp = "Implanted:"
if(!AN && !open && !infected & !imp)
AN = "None:"
diff --git a/code/game/machinery/pipe/construction.dm b/code/game/machinery/pipe/construction.dm
index a8488e8c2d5..1babba054e6 100644
--- a/code/game/machinery/pipe/construction.dm
+++ b/code/game/machinery/pipe/construction.dm
@@ -20,6 +20,9 @@ Buildable meters
#define PIPE_PASSIVE_GATE 15
#define PIPE_VOLUME_PUMP 16
#define PIPE_HEAT_EXCHANGE 17
+#define PIPE_MTVALVE 18
+#define PIPE_MANIFOLD4W 19
+#define PIPE_CAP 20
/obj/item/pipe
name = "pipe"
@@ -75,6 +78,12 @@ Buildable meters
src.pipe_type = PIPE_VOLUME_PUMP
else if(istype(make_from, /obj/machinery/atmospherics/unary/heat_exchanger))
src.pipe_type = PIPE_HEAT_EXCHANGE
+ else if(istype(make_from, /obj/machinery/atmospherics/tvalve))
+ src.pipe_type = PIPE_MTVALVE
+ else if(istype(make_from, /obj/machinery/atmospherics/pipe/manifold4w))
+ src.pipe_type = PIPE_MANIFOLD4W
+ else if(istype(make_from, /obj/machinery/atmospherics/pipe/cap))
+ src.pipe_type = PIPE_CAP
else
src.pipe_type = pipe_type
src.dir = dir
@@ -105,6 +114,9 @@ Buildable meters
"passive gate", \
"volume pump", \
"heat exchanger", \
+ "t-valve", \
+ "4-way manifold", \
+ "pipe cap", \
)
name = nlist[pipe_type+1] + " fitting"
var/list/islist = list( \
@@ -126,6 +138,9 @@ Buildable meters
"passivegate", \
"volumepump", \
"heunary", \
+ "mtvalve", \
+ "manifold4w", \
+ "cap", \
)
icon_state = islist[pipe_type + 1]
@@ -149,6 +164,8 @@ Buildable meters
dir = 1
else if(dir==8)
dir = 4
+ else if (pipe_type == PIPE_MANIFOLD4W)
+ dir = 2
//src.pipe_dir = get_pipe_dir()
return
@@ -188,10 +205,14 @@ Buildable meters
return dir //dir|acw
if(PIPE_CONNECTOR,PIPE_UVENT,PIPE_SCRUBBER,PIPE_HEAT_EXCHANGE)
return dir
+ if(PIPE_MANIFOLD4W)
+ return dir|flip|cw|acw
if(PIPE_MANIFOLD)
return flip|cw|acw
- if(PIPE_GAS_FILTER, PIPE_GAS_MIXER)
+ if(PIPE_GAS_FILTER, PIPE_GAS_MIXER,PIPE_MTVALVE)
return dir|flip|cw
+ if(PIPE_CAP)
+ return flip
return 0
/obj/item/pipe/proc/get_pdir() //endpoints for regular pipes
@@ -241,6 +262,8 @@ Buildable meters
dir = 1
else if(dir==8)
dir = 4
+ else if (pipe_type == PIPE_MANIFOLD4W)
+ dir = 2
var/pipe_dir = get_pipe_dir()
for(var/obj/machinery/atmospherics/M in src.loc)
@@ -325,6 +348,31 @@ Buildable meters
if (M.node3)
M.node3.initialize()
M.node3.build_network()
+
+ if(PIPE_MANIFOLD4W) //4-way manifold
+ var/obj/machinery/atmospherics/pipe/manifold4w/M = new( src.loc )
+ M.dir = dir
+ M.initialize_directions = pipe_dir
+ //M.New()
+ var/turf/T = M.loc
+ M.level = T.intact ? 2 : 1
+ M.initialize()
+ if (!M)
+ usr << "There's nothing to connect this manifold to! (with how the pipe code works, at least one end needs to be connected to something, otherwise the game deletes the segment)"
+ return 1
+ M.build_network()
+ if (M.node1)
+ M.node1.initialize()
+ M.node1.build_network()
+ if (M.node2)
+ M.node2.initialize()
+ M.node2.build_network()
+ if (M.node3)
+ M.node3.initialize()
+ M.node3.build_network()
+ if (M.node4)
+ M.node4.initialize()
+ M.node4.build_network()
if(PIPE_JUNCTION)
var/obj/machinery/atmospherics/pipe/simple/heat_exchanging/junction/P = new ( src.loc )
@@ -467,6 +515,36 @@ Buildable meters
if (P.node2)
P.node2.initialize()
P.node2.build_network()
+
+ if(PIPE_MTVALVE) //manual t-valve
+ var/obj/machinery/atmospherics/tvalve/V = new(src.loc)
+ V.dir = dir
+ V.initialize_directions = pipe_dir
+ if (pipename)
+ V.name = pipename
+ var/turf/T = V.loc
+ V.level = T.intact ? 2 : 1
+ V.initialize()
+ V.build_network()
+ if (V.node1)
+ V.node1.initialize()
+ V.node1.build_network()
+ if (V.node2)
+ V.node2.initialize()
+ V.node2.build_network()
+ if (V.node3)
+ V.node3.initialize()
+ V.node3.build_network()
+
+ if(PIPE_CAP)
+ var/obj/machinery/atmospherics/pipe/cap/C = new(src.loc)
+ C.dir = dir
+ C.initialize_directions = pipe_dir
+ C.initialize()
+ C.build_network()
+ if(C.node)
+ C.node.initialize()
+ C.node.build_network()
if(PIPE_PASSIVE_GATE) //passive gate
var/obj/machinery/atmospherics/binary/passive_gate/P = new(src.loc)
@@ -551,7 +629,7 @@ Buildable meters
playsound(src.loc, 'sound/items/Ratchet.ogg', 50, 1)
user << "\blue You have fastened the meter to the pipe"
del(src)
-
+//not sure why these are necessary
#undef PIPE_SIMPLE_STRAIGHT
#undef PIPE_SIMPLE_BENT
#undef PIPE_HE_STRAIGHT
@@ -569,4 +647,6 @@ Buildable meters
#undef PIPE_GAS_MIXER
#undef PIPE_PASSIVE_GATE
#undef PIPE_VOLUME_PUMP
-#undef PIPE_OUTLET_INJECT
\ No newline at end of file
+#undef PIPE_OUTLET_INJECT
+#undef PIPE_MTVALVE
+//#undef PIPE_MANIFOLD4W
\ No newline at end of file
diff --git a/code/game/machinery/pipe/pipe_dispenser.dm b/code/game/machinery/pipe/pipe_dispenser.dm
index d5da74c5696..87001bcf473 100644
--- a/code/game/machinery/pipe/pipe_dispenser.dm
+++ b/code/game/machinery/pipe/pipe_dispenser.dm
@@ -19,6 +19,9 @@
Bent Pipe
Manifold
Manual Valve
+Pipe Cap
+4-Way Manifold
+Manual T-Valve
Devices:
Connector
Unary Vent
@@ -37,8 +40,9 @@
Insulated pipes:
Pipe
Bent Pipe
-"}
+"}
+//What number the make points to is in the define # at the top of construction.dm in same folder
user << browse("