* There is no data about any wounds in the scanner's database. You may have to scan more bodyparts, or otherwise this wound type may not be in the scanner's database."
+ return
+
+ var/scan_data = ""
+
+ if(timeofdeath)
+ scan_data += "Time of death: [worldtime2text(timeofdeath)]
"
+
+ var/n = 1
+ for(var/wdata_idx in wdata)
+ var/datum/autopsy_data_scanner/D = wdata[wdata_idx]
+ var/total_hits = 0
+ var/total_score = 0
+ var/list/weapon_chances = list() // maps weapon names to a score
+ var/age = 0
+
+ for(var/wound_idx in D.organs_scanned)
+ var/datum/autopsy_data/W = D.organs_scanned[wound_idx]
+ total_hits += W.hits
+
+ var/wname = W.pretend_weapon
+
+ if(wname in weapon_chances) weapon_chances[wname] += W.damage
+ else weapon_chances[wname] = max(W.damage, 1)
+ total_score+=W.damage
+
+
+ var/wound_age = W.time_inflicted
+ age = max(age, wound_age)
+
+ var/damage_desc
+
+ var/damaging_weapon = (total_score != 0)
+
+ // total score happens to be the total damage
+ switch(total_score)
+ if(0)
+ damage_desc = "Unknown"
+ if(1 to 5)
+ damage_desc = "negligible"
+ if(5 to 15)
+ damage_desc = "light"
+ if(15 to 30)
+ damage_desc = "moderate"
+ if(30 to 1000)
+ damage_desc = "severe"
+
+ if(!total_score) total_score = D.organs_scanned.len
+
+ scan_data += "Weapon #[n]
"
+ if(damaging_weapon)
+ scan_data += "Severity: [damage_desc]
"
+ scan_data += "Hits by weapon: [total_hits]
"
+ scan_data += "Approximate time of wound infliction: [worldtime2text(age)]
"
+ scan_data += "Affected limbs: [D.organ_names]
"
+ scan_data += "Possible weapons:
"
+ for(var/weapon_name in weapon_chances)
+ scan_data += "\t[100*weapon_chances[weapon_name]/total_score]% [weapon_name]
"
+
+ scan_data += "
"
+
+ n++
+
+ if(chemtraces.len)
+ scan_data += "Trace Chemicals:
"
+ for(var/chemID in chemtraces)
+ scan_data += chemID
+ scan_data += "
"
+
+ for(var/mob/O in viewers(usr))
+ O.show_message("\red \the [src] rattles and prints out a sheet of paper.", 1)
+
+ sleep(10)
+
+ var/obj/item/weapon/paper/P = new(usr.loc)
+ P.name = "Autopsy Data ([target_name])"
+ P.info = "[scan_data]"
+ P.overlays += "paper_words"
+
+ if(istype(usr,/mob/living/carbon))
+ // place the item in the usr's hand if possible
+ if(!usr.r_hand)
+ P.loc = usr
+ usr.r_hand = P
+ P.layer = 20
+ else if(!usr.l_hand)
+ P.loc = usr
+ usr.l_hand = P
+ P.layer = 20
+
+ if(istype(usr,/mob/living/carbon/human))
+ usr:update_inv_l_hand()
+ usr:update_inv_r_hand()
+
+/obj/item/weapon/autopsy_scanner/attack(mob/living/carbon/human/M as mob, mob/living/carbon/user as mob)
+ if(!istype(M))
+ return
+
+ if(!can_operate(M))
+ return
+
+ if(target_name != M.name)
+ target_name = M.name
+ src.wdata = list()
+ user << "\red A new patient has been registered.. Purging data for previous patient."
+
+ src.timeofdeath = M.timeofdeath
+
+ var/datum/organ/external/S = M.get_organ(user.zone_sel.selecting)
+ if(!S)
+ usr << "You can't scan this body part."
+ return
+ if(!S.open)
+ usr << "You have to cut the limb open first!"
+ return
+ for(var/mob/O in viewers(M))
+ O.show_message("\red [user.name] scans the wounds on [M.name]'s [S.display_name] with \the [src.name]", 1)
+
+ src.add_data(S)
+
+ return 1
diff --git a/code/WorkInProgress/surgery.dm b/code/WorkInProgress/surgery.dm
index a7210ee6e0..3b1401708d 100644
--- a/code/WorkInProgress/surgery.dm
+++ b/code/WorkInProgress/surgery.dm
@@ -57,6 +57,15 @@ proc/build_surgery_steps_list()
var/datum/surgery_step/S = new T
surgery_steps += S
+proc/spread_germs_to_organ(datum/organ/external/E, mob/living/carbon/human/user)
+ if(!istype(user) || !istype(E)) return
+
+ var/germ_level = user.germ_level
+ if(user.gloves)
+ germ_level = user.gloves.germ_level
+
+ E.germ_level = germ_level
+
//////////////////////////////////////////////////////////////////
// COMMON STEPS //
@@ -90,6 +99,7 @@ proc/build_surgery_steps_list()
var/datum/organ/external/affected = target.get_organ(target_zone)
user.visible_message("[user] starts the incision on [target]'s [affected.display_name] with \the [tool].", \
"You start the incision on [target]'s [affected.display_name] with \the [tool].")
+ target.custom_pain("You feel a horrible pain as if from a sharp knife in your [affected.display_name]!",1)
end_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
var/datum/organ/external/affected = target.get_organ(target_zone)
@@ -97,6 +107,7 @@ proc/build_surgery_steps_list()
"\blue You have made an incision on [target]'s [affected.display_name] with \the [tool].",)
affected.open = 1
affected.createwound(CUT, 1)
+ spread_germs_to_organ(affected, user)
if (target_zone == "head")
target.brain_op_stage = 1
@@ -119,13 +130,15 @@ proc/build_surgery_steps_list()
var/datum/organ/external/affected = target.get_organ(target_zone)
user.visible_message("[user] starts clamping bleeders in [target]'s [affected.display_name] with \the [tool].", \
"You start clamping bleeders in [target]'s [affected.display_name] with \the [tool].")
+ target.custom_pain("The pain in your [affected.display_name] is maddening!",1)
end_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("\blue [user] clamps bleeders in [target]'s [affected.display_name] with \the [tool].", \
"\blue You clamp bleeders in [target]'s [affected.display_name] with \the [tool].")
- affected.bandage()
+ affected.clamp()
affected.status &= ~ORGAN_BLEEDING
+ spread_germs_to_organ(affected, user)
fail_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
var/datum/organ/external/affected = target.get_organ(target_zone)
@@ -153,6 +166,7 @@ proc/build_surgery_steps_list()
msg = "[user] starts to pry open the incision and rearrange the organs in [target]'s lower abdomen with \the [tool]."
self_msg = "You start to pry open the incision and rearrange the organs in [target]'s lower abdomen with \the [tool]."
user.visible_message(msg, self_msg)
+ target.custom_pain("It feels like the skin on your [affected.display_name] is on fire!",1)
end_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
var/datum/organ/external/affected = target.get_organ(target_zone)
@@ -166,6 +180,7 @@ proc/build_surgery_steps_list()
self_msg = "\blue You keep the incision open on [target]'s lower abdomen with \the [tool]."
user.visible_message(msg, self_msg)
affected.open = 2
+ spread_germs_to_organ(affected, user)
fail_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
var/datum/organ/external/affected = target.get_organ(target_zone)
@@ -193,12 +208,14 @@ proc/build_surgery_steps_list()
var/datum/organ/external/affected = target.get_organ(target_zone)
user.visible_message("[user] is beginning to cauterize the incision on [target]'s [affected.display_name] with \the [tool]." , \
"You are beginning to cauterize the incision on [target]'s [affected.display_name] with \the [tool].")
+ target.custom_pain("Your [affected.display_name] is being burned!",1)
end_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("\blue [user] cauterizes the incision on [target]'s [affected.display_name] with \the [tool].", \
"\blue You cauterize the incision on [target]'s [affected.display_name] with \the [tool].")
affected.open = 0
+ affected.germ_level = 0
affected.status &= ~ORGAN_BLEEDING
fail_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
@@ -235,6 +252,7 @@ proc/build_surgery_steps_list()
begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
user.visible_message("[user] starts to separating [target]'s appendix from the abdominal wall with \the [tool].", \
"You start to separating [target]'s appendix from the abdominal wall with \the [tool]." )
+ target.custom_pain("The pain in your abdomen is living hell!",1)
end_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
user.visible_message("\blue [user] has separated [target]'s appendix with \the [tool]." , \
@@ -259,19 +277,20 @@ proc/build_surgery_steps_list()
begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
user.visible_message("[user] starts removing [target]'s appendix with \the [tool].", \
"You start removing [target]'s appendix with \the [tool].")
+ target.custom_pain("Someone's ripping out your bowels!",1)
end_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
user.visible_message("\blue [user] has removed [target]'s appendix with \the [tool].", \
"\blue You have removed [target]'s appendix with \the [tool].")
- var/datum/disease/appendicitis/app = null
+ var/app = 0
for(var/datum/disease/appendicitis/appendicitis in target.viruses)
- app = appendicitis
+ app = 1
appendicitis.cure()
+ target.resistances += appendicitis
if (app)
new /obj/item/weapon/reagent_containers/food/snacks/appendix/inflamed(get_turf(target))
else
new /obj/item/weapon/reagent_containers/food/snacks/appendix(get_turf(target))
- target.resistances += app
target.op_stage.appendix = 2
fail_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
@@ -282,13 +301,16 @@ proc/build_surgery_steps_list()
//////////////////////////////////////////////////////////////////
-// INTERNAL WOUND PATCHING //
+// INTERNAL WOUND PATCHING //
//////////////////////////////////////////////////////////////////
/datum/surgery_step/fix_vein
required_tool = /obj/item/weapon/FixOVein
+ min_duration = 70
+ max_duration = 90
+
can_use(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
var/datum/organ/external/affected = target.get_organ(target_zone)
@@ -301,9 +323,9 @@ proc/build_surgery_steps_list()
begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
var/datum/organ/external/affected = target.get_organ(target_zone)
- if (affected.stage == 0)
- user.visible_message("[user] starts patching the damaged vein in [target]'s [affected.display_name] with \the [tool]." , \
- "You start patching the damaged vein in [target]'s [affected.display_name] with \the [tool].")
+ user.visible_message("[user] starts patching the damaged vein in [target]'s [affected.display_name] with \the [tool]." , \
+ "You start patching the damaged vein in [target]'s [affected.display_name] with \the [tool].")
+ target.custom_pain("The pain in [affected.display_name] is unbearable!",1)
end_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
var/datum/organ/external/affected = target.get_organ(target_zone)
@@ -340,12 +362,14 @@ proc/build_surgery_steps_list()
if (affected.stage == 0)
user.visible_message("[user] starts applying medication to the damaged bones in [target]'s [affected.display_name] with \the [tool]." , \
"You start applying medication to the damaged bones in [target]'s [affected.display_name] with \the [tool].")
+ target.custom_pain("Something in your [affected.display_name] is causing you a lot of pain!",1)
end_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("\blue [user] applies some [tool] to [target]'s bone in [affected.display_name]", \
"\blue You apply some [tool] to [target]'s bone in [affected.display_name] with \the [tool].")
affected.stage = 1
+ spread_germs_to_organ(affected, user)
fail_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
var/datum/organ/external/affected = target.get_organ(target_zone)
@@ -365,7 +389,8 @@ proc/build_surgery_steps_list()
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] is beginning to set the bone in [target]'s [affected.display_name] in place with \the [tool]." , \
- "You are beginning to set the bone in [target]'s [target_zone] in place with \the [tool].")
+ "You are beginning to set the bone in [target]'s [affected.display_name] in place with \the [tool].")
+ target.custom_pain("The pain in your [affected.display_name] is going to make you pass out!",1)
end_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
var/datum/organ/external/affected = target.get_organ(target_zone)
@@ -373,10 +398,12 @@ proc/build_surgery_steps_list()
user.visible_message("\blue [user] sets the bone in [target]'s [affected.display_name] in place with \the [tool].", \
"\blue You set the bone in [target]'s [affected.display_name] in place with \the [tool].")
affected.stage = 2
+ spread_germs_to_organ(affected, user)
else
user.visible_message("\blue [user] sets the bone in [target]'s [affected.display_name]\red in the WRONG place with \the [tool].", \
"\blue You set the bone in [target]'s [affected.display_name]\red in the WRONG place with \the [tool].")
affected.fracture()
+ spread_germs_to_organ(affected, user)
fail_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
var/datum/organ/external/affected = target.get_organ(target_zone)
@@ -400,14 +427,15 @@ proc/build_surgery_steps_list()
end_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("\blue [user] sets [target]'s [affected.display_name] skull with \the [tool]." , \
- "\blue You set [target]'s [affected.display_name] skull with \the [tool].")
+ user.visible_message("\blue [user] sets [target]'s skull with \the [tool]." , \
+ "\blue You set [target]'s skull with \the [tool].")
affected.stage = 2
+ spread_germs_to_organ(affected, user)
fail_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("\red [user]'s hand slips, damaging [target]'s [affected.display_name] face with \the [tool]!" , \
- "\red Your hand slips, damaging [target]'s [affected.display_name] face with \the [tool]!")
+ user.visible_message("\red [user]'s hand slips, damaging [target]'s face with \the [tool]!" , \
+ "\red Your hand slips, damaging [target]'s face with \the [tool]!")
var/datum/organ/external/head/h = affected
h.createwound(BRUISE, 10)
h.disfigured = 1
@@ -435,6 +463,7 @@ proc/build_surgery_steps_list()
affected.status &= ~ORGAN_SPLINTED
affected.stage = 0
affected.perma_injury = 0
+ spread_germs_to_organ(affected, user)
fail_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
var/datum/organ/external/affected = target.get_organ(target_zone)
@@ -691,7 +720,7 @@ proc/build_surgery_steps_list()
"You begin to cut through [target]'s skull with \the [tool].")
end_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
- user.visible_message("\blue [user] has cut through [target]'s skull open with \the [tool].", \
+ user.visible_message("\blue [user] has cut through [target]'s skull open with \the [tool].", \
"\blue You have cut through [target]'s skull open with \the [tool].")
target.brain_op_stage = 2
@@ -828,7 +857,8 @@ proc/build_surgery_steps_list()
target.cores--
user.visible_message("\blue [user] cuts out one of [target]'s cores with \the [tool].",, \
"\blue You cut out one of [target]'s cores with \the [tool]. [target.cores] cores left.")
- new/obj/item/metroid_core(target.loc)
+ if(target.cores >= 0)
+ new/obj/item/metroid_core(target.loc)
if(target.cores <= 0)
target.icon_state = "baby roro dead-nocore"
@@ -932,6 +962,7 @@ proc/build_surgery_steps_list()
"\blue You have finished adjusting the area around [target]'s [affected.display_name] with \the [tool].")
affected.status |= ORGAN_ATTACHABLE
affected.amputated = 1
+ affected.setAmputatedTree()
affected.open = 0
fail_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
@@ -976,4 +1007,173 @@ proc/build_surgery_steps_list()
var/datum/organ/external/affected = target.get_organ(target_zone)
user.visible_message("\red [user]'s hand slips, damaging connectors on [target]'s [affected.display_name]!", \
"\red Your hand slips, damaging connectors on [target]'s [affected.display_name]!")
- target.apply_damage(10, BRUTE, affected)
\ No newline at end of file
+ target.apply_damage(10, BRUTE, affected)
+
+
+//////////////////////////////////////////////////////////////////
+// RIBCAGE SURGERY(LUNGS AND ALIENS) //
+//////////////////////////////////////////////////////////////////
+
+/datum/surgery_step/ribcage
+ can_use(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
+ return target_zone == "chest"
+
+/datum/surgery_step/ribcage/saw_ribcage
+ required_tool = /obj/item/weapon/circular_saw
+
+ min_duration = 50
+ max_duration = 70
+
+ 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 ..() && target.ribcage_op_stage == 0 && affected.open >= 2
+
+ begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
+ user.visible_message("[user] begins to cut through [target]'s ribcage with \the [tool].", \
+ "You begin to cut through [target]'s ribcage with \the [tool].")
+ target.custom_pain("Something hurts horribly in your chest!",1)
+
+ end_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
+ user.visible_message("\blue [user] has cut through [target]'s ribcage open with \the [tool].", \
+ "\blue You have cut through [target]'s ribcage open with \the [tool].")
+ target.ribcage_op_stage = 1
+
+ fail_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
+ user.visible_message("\red [user]'s hand slips, cracking [target]'s ribcage with \the [tool]!" , \
+ "\red Your hand slips, cracking [target]'s ribcage with \the [tool]!" )
+
+
+/datum/surgery_step/ribcage/retract_ribcage
+ required_tool = /obj/item/weapon/retractor
+
+ min_duration = 30
+ max_duration = 40
+
+ can_use(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
+ return ..() && target.ribcage_op_stage == 1
+
+ begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
+ var/msg = "[user] starts to force open the ribcage in [target]'s torso with \the [tool]."
+ var/self_msg = "You start to force open the ribcage in [target]'s torso with \the [tool]."
+ user.visible_message(msg, self_msg)
+ target.custom_pain("Something hurts horribly in your chest!",1)
+
+ end_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
+ var/msg = "\blue [user] forces open [target]'s ribcage with \the [tool]."
+ var/self_msg = "\blue You force open [target]'s ribcage with \the [tool]."
+ user.visible_message(msg, self_msg)
+ target.ribcage_op_stage = 2
+
+ // Whoops!
+ if(prob(10))
+ var/datum/organ/external/affected = target.get_organ(target_zone)
+ affected.fracture()
+
+ fail_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
+ var/msg = "\red [user]'s hand slips, breaking [target]'s ribcage!"
+ var/self_msg = "\red Your hand slips, breaking [target]'s ribcage!"
+ user.visible_message(msg, self_msg)
+ var/datum/organ/external/affected = target.get_organ(target_zone)
+ affected.fracture()
+
+/datum/surgery_step/ribcage/close_ribcage
+ required_tool = /obj/item/weapon/retractor
+
+ min_duration = 20
+ max_duration = 40
+
+ can_use(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
+ return ..() && target.ribcage_op_stage == 2
+
+ begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
+ var/msg = "[user] starts bending [target]'s ribcage back into place with \the [tool]."
+ var/self_msg = "You start bending [target]'s ribcage back into place with \the [tool]."
+ user.visible_message(msg, self_msg)
+ target.custom_pain("Something hurts horribly in your chest!",1)
+
+ end_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
+ var/msg = "\blue [user] bends [target]'s ribcage back into place with \the [tool]."
+ var/self_msg = "\blue You bend [target]'s ribcage back into place with \the [tool]."
+ user.visible_message(msg, self_msg)
+
+ target.ribcage_op_stage = 1
+
+/datum/surgery_step/ribcage/mend_ribcage
+ required_tool = /obj/item/weapon/bonegel
+
+ min_duration = 20
+ max_duration = 40
+
+ can_use(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
+ return ..() && target.ribcage_op_stage == 1
+
+ begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
+ var/msg = "[user] starts applying \the [tool] to [target]'s ribcage."
+ var/self_msg = "You start applying \the [tool] to [target]'s ribcage."
+ user.visible_message(msg, self_msg)
+ target.custom_pain("Something hurts horribly in your chest!",1)
+
+
+ end_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
+ var/msg = "\blue [user] applied \the [tool] to [target]'s ribcage."
+ var/self_msg = "\blue You applied \the [tool] to [target]'s ribcage."
+ user.visible_message(msg, self_msg)
+
+ target.ribcage_op_stage = 0
+
+
+/datum/surgery_step/ribcage/remove_embryo
+ required_tool = /obj/item/weapon/hemostat
+
+ min_duration = 80
+ max_duration = 100
+
+ can_use(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
+ var/embryo = 0
+ for(var/datum/disease/alien_embryo/A in target.viruses)
+ embryo = 1
+ break
+ return ..() && embryo && target.ribcage_op_stage == 2
+
+ begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
+ var/msg = "[user] starts to pull something out from [target]'s ribcage with \the [tool]."
+ var/self_msg = "You start to pull something out from [target]'s ribcage with \the [tool]."
+ user.visible_message(msg, self_msg)
+ target.custom_pain("Something hurts horribly in your chest!",1)
+
+ end_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
+ user.visible_message("\red [user] rips the larva out of [target]'s ribcage!",
+ "You rip the larva out of [target]'s ribcage!")
+
+ var/mob/living/carbon/alien/larva/stupid = new(target.loc)
+ stupid.death(0)
+
+ for(var/datum/disease/alien_embryo in target.viruses)
+ alien_embryo.cure()
+
+/datum/surgery_step/ribcage/fix_lungs
+ required_tool = /obj/item/weapon/scalpel
+
+ min_duration = 70
+ max_duration = 90
+
+ can_use(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
+ return ..() && target.is_lung_ruptured() && target.ribcage_op_stage == 2
+
+ begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
+ user.visible_message("[user] starts mending the rupture in [target]'s lungs with \the [tool].", \
+ "You start mending the rupture in [target]'s lungs 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")
+ user.visible_message("\blue [user] mends the rupture in [target]'s lungs with \the [tool].", \
+ "\blue You mend the rupture in [target]'s lungs with \the [tool]." )
+ affected.ruptured_lungs = 0
+
+ fail_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
+ var/datum/organ/external/chest/affected = target.get_organ("chest")
+ user.visible_message("\red [user]'s hand slips, slicing an artery inside [target]'s chest with \the [tool]!", \
+ "\red Your hand slips, slicing an artery inside [target]'s chest with \the [tool]!")
+ affected.createwound(CUT, 20)
+
diff --git a/code/WorkInProgress/virus2/dishincubator.dm b/code/WorkInProgress/virus2/dishincubator.dm
index e6d0da1239..f2aefe07ea 100644
--- a/code/WorkInProgress/virus2/dishincubator.dm
+++ b/code/WorkInProgress/virus2/dishincubator.dm
@@ -165,5 +165,5 @@
if(beaker)
if(!beaker.reagents.remove_reagent("virusfood",5))
foodsupply += 10
- if(!beaker.reagents.remove_reagent("toxins",1))
+ if(!beaker.reagents.remove_reagent("toxin",1))
toxins += 1
\ No newline at end of file
diff --git a/code/ZAS/Airflow.dm b/code/ZAS/Airflow.dm
index 5f2b847a8d..661fe74d9b 100644
--- a/code/ZAS/Airflow.dm
+++ b/code/ZAS/Airflow.dm
@@ -69,9 +69,6 @@ mob/living/carbon/metroid/airflow_stun()
mob/living/carbon/human/airflow_stun()
if(last_airflow_stun > world.time - vsc.airflow_stun_cooldown) return 0
if(buckled) return 0
- //skytodo:
- /*if(wear_suit)
- if(wear_suit.flags & SUITSPACE) return 0*/
if(shoes)
if(shoes.flags & NOSLIP) return 0
if(!(status_flags & CANSTUN) && !(status_flags & CANWEAKEN))
@@ -247,9 +244,6 @@ atom/movable
if(istype(src, /mob/living/carbon/human))
if(istype(src, /mob/living/carbon/human))
if(src:buckled) return
- //skytodo: tg handles suits differently
- /*if(src:wear_suit)
- if(src:wear_suit.flags & SUITSPACE) return*/
if(src:shoes)
if(src:shoes.type == /obj/item/clothing/shoes/magboots && src:shoes.flags & NOSLIP) return
src << "\red You are sucked away by airflow!"
@@ -305,9 +299,6 @@ atom/movable
if(istype(src, /mob/living/carbon/human))
if(istype(src, /mob/living/carbon/human))
if(src:buckled) return
- //skytodo:
- /*if(src:wear_suit)
- if(src:wear_suit.flags & SUITSPACE) return*/
if(src:shoes)
if(src:shoes.type == /obj/item/clothing/shoes/magboots && src:shoes.flags & NOSLIP) return
src << "\red You are pushed away by airflow!"
@@ -407,7 +398,6 @@ zone/proc/movables()
. = list()
for(var/turf/T in contents)
for(var/atom/A in T)
- //skytodo: add check for ai eye, tg seems to have done away with it
- if(istype(A, /obj/effect))
+ if(istype(A, /obj/effect) || istype(A, /mob/aiEye))
continue
. += A
diff --git a/code/ZAS/Debug.dm b/code/ZAS/Debug.dm
index 73614ef216..186ed65ae8 100644
--- a/code/ZAS/Debug.dm
+++ b/code/ZAS/Debug.dm
@@ -32,7 +32,7 @@ zone/proc
M << "Pressure: [air.return_pressure()]"
M << ""
M << "Space Tiles: [length(unsimulated_tiles)]"
- //M << "Movable Objects: [length(movable_objects)]" //skytodo
+ M << "Movable Objects: [length(movables())]"
M << "Connections: [length(connections)]"
for(var/connection/C in connections)
diff --git a/code/ZAS/FEA_system.dm b/code/ZAS/FEA_system.dm
index 4434d9d2d4..58574baeb7 100644
--- a/code/ZAS/FEA_system.dm
+++ b/code/ZAS/FEA_system.dm
@@ -277,6 +277,11 @@ datum
proc/ConsiderRebuild(var/turf/simulated/T, var/turf/NT)
+ if(!istype(T)) return
+ //zones should naturally spread to these tiles eventually
+ if(!T.zone || !NT.zone)
+ return
+
if(istype(NT, /turf/simulated) && NT.zone != T.zone)
T.zone.RemoveTurf(NT)
if(NT.zone)
diff --git a/code/ZAS/Fire.dm b/code/ZAS/Fire.dm
index 661ce83806..3818fb070a 100644
--- a/code/ZAS/Fire.dm
+++ b/code/ZAS/Fire.dm
@@ -273,7 +273,7 @@ datum/gas_mixture/proc/calculate_firelevel(obj/effect/decal/cleanable/liquid_fue
arms_exposure = 1
//Get heat transfer coefficients for clothing.
- //skytodo: different handling of temp with tg
+ //skytodo: different handling of temp with tg //Jesus, mate. Don't ask me. I have no diea how their crap works, and Aryn wrote this proc.
/*for(var/obj/item/clothing/C in src)
if(l_hand == C || r_hand == C) continue
if(C.body_parts_covered & HEAD)
diff --git a/code/ZAS/Plasma.dm b/code/ZAS/Plasma.dm
index 65940ad11f..e9a91fee4b 100644
--- a/code/ZAS/Plasma.dm
+++ b/code/ZAS/Plasma.dm
@@ -43,14 +43,10 @@ obj/var/contaminated = 0
obj/item/proc
can_contaminate()
return 0
- //skytodo: tg has changed how suits are handled
- /*
//Clothing and backpacks can be contaminated.
if(flags & PLASMAGUARD) return 0
- if(flags & SUITSPACE) return 0
else if(istype(src,/obj/item/clothing)) return 1
else if(istype(src,/obj/item/weapon/storage/backpack)) return 1
- */
contaminate()
//Do a contamination overlay? Temporary measure to keep contamination less deadly than it was.
@@ -131,22 +127,21 @@ obj/item/proc
/mob/living/carbon/human/proc/pl_head_protected()
//Checks if the head is adequately sealed.
- //skytodo:
- /*if(head)
+ if(head)
if(vsc.plc.PLASMAGUARD_ONLY)
- if(head.flags & PLASMAGUARD || head.flags & HEADSPACE) return 1
- else
- if(head.flags & HEADCOVERSEYES) return 1*/
+ if(head.flags & PLASMAGUARD)
+ return 1
+ else if(head.flags & HEADCOVERSEYES)
+ return 1
return 0
/mob/living/carbon/human/proc/pl_suit_protected()
//Checks if the suit is adequately sealed.
- //skytodo:
- /*if(wear_suit)
+ if(wear_suit)
if(vsc.plc.PLASMAGUARD_ONLY)
- if(wear_suit.flags & PLASMAGUARD || wear_suit.flags & SUITSPACE) return 1
+ if(wear_suit.flags & PLASMAGUARD) return 1
else
- if(wear_suit.flags_inv & HIDEJUMPSUIT) return 1*/
+ if(wear_suit.flags_inv & HIDEJUMPSUIT) return 1
return 0
/mob/living/carbon/human/proc/suit_contamination()
diff --git a/code/controllers/voting.dm b/code/controllers/voting.dm
index 7619c540f1..e90299ac58 100644
--- a/code/controllers/voting.dm
+++ b/code/controllers/voting.dm
@@ -2,13 +2,14 @@ var/datum/controller/vote/vote = new()
datum/controller/vote
var/initiator = null
- var/started_timeofday = null
+ var/started_time = null
var/time_remaining = 0
var/mode = null
var/question = null
var/list/choices = list()
var/list/voted = list()
var/list/voting = list()
+ var/list/current_votes = list()
New()
if(vote != src)
@@ -18,28 +19,29 @@ datum/controller/vote
proc/process() //called by master_controller
if(mode)
- time_remaining = started_timeofday + config.vote_period
- if(world.timeofday < started_timeofday)
- time_remaining -= 864000
- time_remaining = round((time_remaining - world.timeofday)/10)
+ // No more change mode votes after the game has started.
+ // 3 is GAME_STATE_PLAYING, but that #define is undefined for some reason
+ if(mode == "gamemode" && ticker.current_state >= 2)
+ world << "Voting aborted due to game start."
+ src.reset()
+ return
+
+ // Calculate how much time is remaining by comparing current time, to time of vote start,
+ // plus vote duration
+ time_remaining = round((started_time + config.vote_period - world.time)/10)
- var/i=1
if(time_remaining < 0)
result()
- while(i<=voting.len)
- var/client/C = voting[i]
+ for(var/client/C in voting)
if(C)
C << browse(null,"window=vote;can_close=0")
- i++
reset()
else
- while(i<=voting.len)
- var/client/C = voting[i]
+ for(var/client/C in voting)
if(C)
C << browse(vote.interface(C),"window=vote;can_close=0")
- i++
- else
- voting.Cut(i,i+1)
+
+ voting.Cut()
proc/reset()
initiator = null
@@ -49,6 +51,7 @@ datum/controller/vote
choices.Cut()
voted.Cut()
voting.Cut()
+ current_votes.Cut()
proc/get_result()
//get the highest number of votes
@@ -111,6 +114,10 @@ datum/controller/vote
restart = 1
else
master_mode = .
+ if("crew_transfer")
+ if(. == "Initiate Crew Transfer")
+ init_shift_change(null, 1)
+
if(restart)
world << "World restarting due to vote..."
@@ -122,30 +129,39 @@ datum/controller/vote
return .
- proc/submit_vote(var/vote)
+ proc/submit_vote(var/ckey, var/vote)
if(mode)
if(config.vote_no_dead && usr.stat == DEAD && !usr.client.holder)
return 0
- if(!(usr.ckey in voted))
- if(vote && 1<=vote && vote<=choices.len)
- voted += usr.ckey
- choices[choices[vote]]++ //check this
- return vote
+ if(current_votes[ckey])
+ choices[choices[current_votes[ckey]]]--
+ if(vote && 1<=vote && vote<=choices.len)
+ voted += usr.ckey
+ choices[choices[vote]]++ //check this
+ current_votes[ckey] = vote
+ return vote
return 0
proc/initiate_vote(var/vote_type, var/initiator_key)
if(!mode)
- if(started_timeofday != null)
- var/next_allowed_timeofday = (started_timeofday + config.vote_delay)
- if(world.timeofday < started_timeofday)
- next_allowed_timeofday -= 864000
- if(next_allowed_timeofday > world.timeofday)
+ if(started_time != null)
+ var/next_allowed_time = (started_time + config.vote_delay)
+ if(next_allowed_time > world.time)
return 0
reset()
switch(vote_type)
- if("restart") choices.Add("Restart Round","Continue Playing")
- if("gamemode") choices.Add(config.votable_modes)
+ if("restart")
+ choices.Add("Restart Round","Continue Playing")
+ if("gamemode")
+ if(ticker.current_state >= 2)
+ return 0
+ choices.Add(config.votable_modes)
+ if("crew_transfer")
+ if(ticker.current_state <= 2)
+ return 0
+ question = "End the shift?"
+ choices.Add("Initiate Crew Transfer", "Continue The Round")
if("custom")
question = html_encode(input(usr,"What is the vote for?") as text|null)
if(!question) return 0
@@ -156,7 +172,7 @@ datum/controller/vote
else return 0
mode = vote_type
initiator = initiator_key
- started_timeofday = world.timeofday
+ started_time = world.time
var/text = "[capitalize(mode)] vote started by [initiator]."
log_vote(text)
world << "[text]\nType vote to place your votes.\nYou have [config.vote_period/10] seconds to vote."
@@ -179,10 +195,14 @@ datum/controller/vote
if(question) . += "Vote: '[question]'
"
else . += "Vote: [capitalize(mode)]
"
. += "Time Left: [time_remaining] s
"
- for(var/i=1,i<=choices.len,i++)
+ for(var/i = 1, i <= choices.len, i++)
var/votes = choices[choices[i]]
if(!votes) votes = 0
- . += "- [choices[i]] ([votes] votes)
"
+ if(current_votes[C.ckey] == i)
+ . += "- [choices[i]] ([votes] votes)
"
+ else
+ . += "- [choices[i]] ([votes] votes)
"
+
. += "
"
if(admin)
. += "(Cancel Vote) "
@@ -193,6 +213,11 @@ datum/controller/vote
. += "Restart"
else
. += "Restart (Disallowed)"
+ . += ""
+ if(trialmin || config.allow_vote_restart)
+ . += "Crew Transfer"
+ else
+ . += "Crew Transfer (Disallowed)"
if(trialmin)
. += "\t([config.allow_vote_restart?"Allowed":"Disallowed"])"
. += ""
@@ -235,11 +260,14 @@ datum/controller/vote
if("gamemode")
if(config.allow_vote_mode || usr.client.holder)
initiate_vote("gamemode",usr.key)
+ if("crew_transfer")
+ if(config.allow_vote_restart || usr.client.holder)
+ initiate_vote("crew_transfer",usr.key)
if("custom")
if(usr.client.holder)
initiate_vote("custom",usr.key)
else
- submit_vote(round(text2num(href_list["vote"])))
+ submit_vote(usr.ckey, round(text2num(href_list["vote"])))
usr.vote()
diff --git a/code/datums/datacore.dm b/code/datums/datacore.dm
index 7358096104..e07e6687ac 100644
--- a/code/datums/datacore.dm
+++ b/code/datums/datacore.dm
@@ -28,7 +28,9 @@
/obj/effect/datacore/proc/manifest_inject(var/mob/living/carbon/human/H)
if(H.mind && (H.mind.assigned_role != "MODE"))
var/assignment
- if(H.mind.assigned_role)
+ if(H.mind.role_alt_title)
+ assignment = H.mind.role_alt_title
+ else if(H.mind.assigned_role)
assignment = H.mind.assigned_role
else if(H.job)
assignment = H.job
@@ -111,29 +113,31 @@ proc/get_id_photo(var/mob/living/carbon/human/H)
var/g = "m"
if (H.gender == FEMALE)
g = "f"
+
+ var/icon/icobase
switch(H.get_species())
if("Tajaran")
- preview_icon = new /icon('icons/effects/species.dmi', "tajaran_[g]_s")
- preview_icon.Blend(new /icon('icons/effects/species.dmi', "tajtail_s"), ICON_OVERLAY)
+ icobase = 'icons/mob/human_races/r_tajaran.dmi'
if( "Soghun")
- preview_icon = new /icon('icons/effects/species.dmi', "lizard_[g]_s")
- preview_icon.Blend(new /icon('icons/effects/species.dmi', "sogtail_s"), ICON_OVERLAY)
+ icobase = 'icons/mob/human_races/r_lizard.dmi'
if("Skrell")
- preview_icon = new /icon('icons/effects/species.dmi', "skrell_[g]_s")
+ icobase = 'icons/mob/human_races/r_skrell.dmi'
else
- preview_icon = new /icon('human.dmi', "torso_[g]_s")
- preview_icon.Blend(new /icon('human.dmi', "chest_[g]_s"), ICON_OVERLAY)
- preview_icon.Blend(new /icon('human.dmi', "groin_[g]_s"), ICON_OVERLAY)
- preview_icon.Blend(new /icon('human.dmi', "head_[g]_s"), ICON_OVERLAY)
+ icobase = 'icons/mob/human_races/r_human.dmi'
- for(var/datum/organ/external/E in H.organs)
- if(E.status & ORGAN_CUT_AWAY) continue
+ preview_icon = new /icon(icobase, "torso_[g]")
+ var/icon/temp
+ temp = new /icon(icobase, "groin_[g]")
+ preview_icon.Blend(temp, ICON_OVERLAY)
+ temp = new /icon(icobase, "head_[g]")
+ preview_icon.Blend(temp, ICON_OVERLAY)
- var/icon/temp = new /icon('human.dmi', "[E.name]_s")
- if(E.status & ORGAN_ROBOT)
- temp.MapColors(rgb(77,77,77), rgb(150,150,150), rgb(28,28,28), rgb(0,0,0))
-
- preview_icon.Blend(temp, ICON_OVERLAY)
+ for(var/datum/organ/external/E in H.organs)
+ if(E.status & ORGAN_CUT_AWAY || E.status & ORGAN_DESTROYED) continue
+ temp = new /icon(icobase, "[E.name]")
+ if(E.status & ORGAN_ROBOT)
+ temp.MapColors(rgb(77,77,77), rgb(150,150,150), rgb(28,28,28), rgb(0,0,0))
+ preview_icon.Blend(temp, ICON_OVERLAY)
// Skin tone
if(H.get_species() == "Human")
diff --git a/code/datums/diseases/alien_embryo.dm b/code/datums/diseases/alien_embryo.dm
index 0e9f41e8b5..91dcf51798 100644
--- a/code/datums/diseases/alien_embryo.dm
+++ b/code/datums/diseases/alien_embryo.dm
@@ -40,6 +40,7 @@
permeability_mod = 15//likely to infect
can_carry = 0
var/gibbed = 0
+ stage_minimum_age = 300
/datum/disease/alien_embryo/stage_act()
..()
diff --git a/code/datums/diseases/appendicitis.dm b/code/datums/diseases/appendicitis.dm
index 79374d2478..ee579a294d 100644
--- a/code/datums/diseases/appendicitis.dm
+++ b/code/datums/diseases/appendicitis.dm
@@ -12,7 +12,7 @@
severity = "Medium"
longevity = 1000
hidden = list(0, 1)
- stage_minimum_age = 100 // at least 100 life ticks per stage
+ stage_minimum_age = 300 // at least 200 life ticks per stage
/datum/disease/appendicitis/stage_act()
..()
diff --git a/code/datums/organs/organ.dm b/code/datums/organs/organ.dm
index ba7b1bf014..7c219e899b 100644
--- a/code/datums/organs/organ.dm
+++ b/code/datums/organs/organ.dm
@@ -1,6 +1,11 @@
/datum/organ
var/name = "organ"
var/mob/living/carbon/human/owner = null
+ var/list/datum/autopsy_data/autopsy_data = list()
+
+ var/list/trace_chemicals = list() // traces of chemicals in the organ,
+ // links chemical IDs to number of ticks for which they'll stay in the blood
+
///datum/organ/proc/process()
// return 0
@@ -12,4 +17,4 @@
return 0
proc/receive_chem(chemical as obj)
- return 0
\ No newline at end of file
+ return 0
diff --git a/code/datums/organs/organ_external.dm b/code/datums/organs/organ_external.dm
index 0c953e6843..d59c2a7931 100644
--- a/code/datums/organs/organ_external.dm
+++ b/code/datums/organs/organ_external.dm
@@ -5,6 +5,7 @@
name = "external"
var/icon_name = null
var/body_part = null
+ var/icon_position = 0
var/damage_state = "00"
var/brute_dam = 0
@@ -33,6 +34,9 @@
var/open = 0
var/stage = 0
+ // INTERNAL germs inside the organ, this is BAD if it's greater 0
+ var/germ_level = 0
+
// how often wounds should be updated, a higher number means less often
var/wound_update_accuracy = 20 // update every 20 ticks(roughly every minute)
New(var/datum/organ/external/P)
@@ -60,8 +64,7 @@
var/nux = brute * rand(10,15)
if(config.limbs_can_break && brute_dam >= max_damage * config.organ_health_multiplier)
if(prob(5 * brute))
- status |= ORGAN_DESTROYED
- droplimb()
+ droplimb(1)
return
else if(prob(nux))
@@ -72,8 +75,7 @@
else if(brute > 20)
if(config.limbs_can_break && brute_dam >= max_damage * config.organ_health_multiplier)
if(prob(5 * brute))
- status |= ORGAN_DESTROYED
- droplimb()
+ droplimb(1)
return
// If the limbs can break, make sure we don't exceed the maximum damage a limb can take before breaking
@@ -120,6 +122,8 @@
if(status & ORGAN_BROKEN)
owner.emote("scream")
+ if(used_weapon) add_autopsy_data(used_weapon, brute + burn)
+
owner.updatehealth()
// sync the organ's damage with its wounds
@@ -181,31 +185,50 @@
if(W.damage == 0 && W.created + 10 * 10 * 60 <= world.time)
wounds -= W
// let the GC handle the deletion of the wound
- if(W.internal && !W.is_treated())
+ if(W.internal && !W.is_treated() && owner.bodytemperature >= 170)
// internal wounds get worse over time
- W.open_wound(0.5 * wound_update_accuracy)
- owner.vessel.remove_reagent("blood",0.1 * W.damage * wound_update_accuracy)
+ W.open_wound(0.1 * wound_update_accuracy)
+ owner.vessel.remove_reagent("blood",0.07 * W.damage * wound_update_accuracy)
+ if(prob(1 * wound_update_accuracy))
+ owner.custom_pain("You feel a stabbing pain in your [display_name]!",1)
- if(W.is_treated())
+ if(W.bandaged || W.salved)
// slow healing
var/amount = 0.2
- if(W.bandaged) amount++
- if(W.salved) amount++
- if(W.disinfected) amount++
+ if(W.is_treated())
+ amount += 10
// amount of healing is spread over all the wounds
W.heal_damage((wound_update_accuracy * amount * W.amount * config.organ_regeneration_multiplier) / (20*owner.number_wounds+1))
+ if(W.germ_level > 100 && prob(10))
+ owner.adjustToxLoss(1 * wound_update_accuracy)
+ if(W.germ_level > 1000)
+ owner.adjustToxLoss(1 * wound_update_accuracy)
+
+ // Salving also helps against infection
+ if(W.germ_level > 0 && W.salved && prob(2))
+ W.germ_level = 0
+
// sync the organ's damage with its wounds
src.update_damages()
proc/bandage()
var/rval = 0
+ src.status &= ~ORGAN_BLEEDING
for(var/datum/wound/W in wounds)
if(W.internal) continue
rval |= !W.bandaged
W.bandaged = 1
return rval
+ proc/clamp()
+ var/rval = 0
+ for(var/datum/wound/W in wounds)
+ if(W.internal) continue
+ rval |= !W.clamped
+ W.clamped = 1
+ return rval
+
proc/salve()
var/rval = 0
for(var/datum/wound/W in wounds)
@@ -222,6 +245,12 @@
proc/get_damage_fire()
return burn_dam
+ proc/is_infected()
+ for(var/datum/wound/W in wounds)
+ if(W.germ_level > 100)
+ return 1
+ return 0
+
process()
// process wounds, doing healing etc., only do this every 4 ticks to save processing power
if(owner.life_tick % wound_update_accuracy == 0)
@@ -239,6 +268,9 @@
return
if(config.bones_can_break && brute_dam > min_broken_damage * config.organ_health_multiplier && !(status & ORGAN_ROBOT))
src.fracture()
+ if(germ_level > 0)
+ for(var/datum/wound/W in wounds) if(!W.bandaged && !W.salved)
+ W.germ_level = max(W.germ_level, germ_level)
return
proc/fracture()
@@ -289,10 +321,19 @@
return 1
return 0
+ proc/setAmputatedTree()
+ for(var/datum/organ/external/O in children)
+ O.amputated=amputated
+ O.setAmputatedTree()
+
proc/droplimb(var/override = 0,var/no_explode = 0)
+ if(destspawn) return
if(override)
status |= ORGAN_DESTROYED
if(status & ORGAN_DESTROYED)
+ if(body_part == UPPER_TORSO)
+ return
+
if(status & ORGAN_SPLINTED)
status &= ~ORGAN_SPLINTED
if(implant)
@@ -307,8 +348,8 @@
var/obj/item/weapon/organ/H
switch(body_part)
- // if(UPPER_TORSO) just no.
- // owner.gib()
+// if(UPPER_TORSO)
+// owner.gib()
if(LOWER_TORSO)
owner << "\red You are now sterile."
if(HEAD)
@@ -366,8 +407,25 @@
if(ismonkey(owner))
H.icon_state = "l_foot_l"
owner.u_equip(owner.shoes)
- if(ismonkey(owner))
- H.icon = 'monkey.dmi'
+ if(H)
+ if(ismonkey(owner))
+ H.icon = 'monkey.dmi'
+ else if(ishuman(owner) && owner.dna)
+ var/icon/I
+ switch(owner.dna.mutantrace)
+ if("tajaran")
+ I = new('icons/mob/human_races/r_tajaran.dmi')
+ if("lizard")
+ I = new('icons/mob/human_races/r_lizard.dmi')
+ if("skrell")
+ I = new('icons/mob/human_races/r_skrell.dmi')
+ else
+ I = new('icons/mob/human_races/r_human.dmi')
+ if(I)
+ H.icon = I.MakeLying()
+ else
+ H.icon_state = initial(H.icon_state)+"_l"
+
var/lol = pick(cardinal)
step(H,lol)
destspawn = 1
@@ -433,7 +491,12 @@
W = new wound_type(damage)
-
+ // Possibly trigger an internal wound, too.
+ var/local_damage = brute_dam + burn_dam + damage
+ if(damage > 10 && type != BURN && local_damage > 20 && prob(damage))
+ var/datum/wound/internal_bleeding/I = new (15)
+ wounds += I
+ owner.custom_pain("You feel something rip in your [display_name]!", 1)
// check whether we can add the wound to an existing wound
for(var/datum/wound/other in wounds)
@@ -488,6 +551,17 @@
if(T)
T.robotize()
+ proc/add_autopsy_data(var/used_weapon, var/damage)
+ var/datum/autopsy_data/W = autopsy_data[used_weapon]
+ if(!W)
+ W = new()
+ W.weapon = used_weapon
+ autopsy_data[used_weapon] = W
+
+ W.hits += 1
+ W.damage += damage
+ W.time_inflicted = world.time
+
/datum/organ/external/chest
name = "chest"
icon_name = "chest"
@@ -495,6 +569,7 @@
max_damage = 150
min_broken_damage = 75
body_part = UPPER_TORSO
+ var/ruptured_lungs = 0
/datum/organ/external/groin
name = "groin"
@@ -528,6 +603,7 @@
max_damage = 75
min_broken_damage = 30
body_part = LEG_LEFT
+ icon_position = LEFT
/datum/organ/external/r_arm
name = "r_arm"
@@ -544,6 +620,7 @@
max_damage = 75
min_broken_damage = 30
body_part = LEG_RIGHT
+ icon_position = RIGHT
/datum/organ/external/l_foot
name = "l_foot"
@@ -552,6 +629,7 @@
max_damage = 40
min_broken_damage = 15
body_part = FOOT_LEFT
+ icon_position = LEFT
/datum/organ/external/r_foot
name = "r_foot"
@@ -560,6 +638,7 @@
max_damage = 40
min_broken_damage = 15
body_part = FOOT_RIGHT
+ icon_position = RIGHT
/datum/organ/external/r_hand
name = "r_hand"
@@ -582,7 +661,7 @@
****************************************************/
obj/item/weapon/organ
- icon = 'human.dmi'
+ icon = 'icons/mob/human_races/r_human.dmi'
obj/item/weapon/organ/New(loc, mob/living/carbon/human/H)
..(loc)
@@ -673,25 +752,25 @@ obj/item/weapon/organ/head/attackby(obj/item/weapon/W as obj, mob/user as mob)
obj/item/weapon/organ/l_arm
name = "left arm"
- icon_state = "l_arm_l"
+ icon_state = "l_arm"
obj/item/weapon/organ/l_foot
name = "left foot"
- icon_state = "l_foot_l"
+ icon_state = "l_foot"
obj/item/weapon/organ/l_hand
name = "left hand"
- icon_state = "l_hand_l"
+ icon_state = "l_hand"
obj/item/weapon/organ/l_leg
name = "left leg"
- icon_state = "l_leg_l"
+ icon_state = "l_leg"
obj/item/weapon/organ/r_arm
name = "right arm"
- icon_state = "r_arm_l"
+ icon_state = "r_arm"
obj/item/weapon/organ/r_foot
name = "right foot"
- icon_state = "r_foot_l"
+ icon_state = "r_foot"
obj/item/weapon/organ/r_hand
name = "right hand"
- icon_state = "r_hand_l"
+ icon_state = "r_hand"
obj/item/weapon/organ/r_leg
name = "right leg"
- icon_state = "r_leg_l"
\ No newline at end of file
+ icon_state = "r_leg"
diff --git a/code/datums/organs/pain.dm b/code/datums/organs/pain.dm
index d1e3ef9a08..750cd75f33 100644
--- a/code/datums/organs/pain.dm
+++ b/code/datums/organs/pain.dm
@@ -42,6 +42,22 @@ mob/proc/pain(var/partname, var/amount, var/force, var/burning = 0)
src << msg
next_pain_time = world.time + (100 - amount)
+
+// message is the custom message to be displayed
+// flash_strength is 0 for weak pain flash, 1 for strong pain flash
+mob/living/carbon/human/proc/custom_pain(var/message, var/flash_strength)
+ if(stat >= 1) return
+ if(reagents.has_reagent("tramadol"))
+ return
+ if(reagents.has_reagent("oxycodone"))
+ return
+ if(analgesic)
+ return
+ var/msg = "\red [message]"
+ if(flash_strength >= 1)
+ msg = "\red [message]"
+ src << msg
+
mob/living/carbon/human/proc/handle_pain()
// not when sleeping
if(stat >= 2) return
diff --git a/code/datums/organs/wound.dm b/code/datums/organs/wound.dm
index 024419e181..c9ef227c90 100644
--- a/code/datums/organs/wound.dm
+++ b/code/datums/organs/wound.dm
@@ -25,6 +25,8 @@
// is the wound bandaged?
var/tmp/bandaged = 0
+ // Similar to bandaged, but works differently
+ var/tmp/clamped = 0
// is the wound salved?
var/tmp/salved = 0
// is the wound disinfected?
@@ -41,6 +43,9 @@
// internal wounds can only be fixed through surgery
var/internal = 0
+ // amount of germs in the wound
+ var/germ_level = 0
+
// helper lists
var/tmp/list/desc_list = list()
var/tmp/list/damage_list = list()
@@ -94,8 +99,7 @@
// heal the given amount of damage, and if the given amount of damage was more
// than what needed to be healed, return how much heal was left
// set @heals_internal to also heal internal organ damage
- // TODO: set heals_internal to 0 by default
- proc/heal_damage(amount, heals_internal = 1)
+ proc/heal_damage(amount, heals_internal = 0)
if(src.internal && !heals_internal)
// heal nothing
return amount
@@ -124,7 +128,7 @@
proc/bleeding()
// internal wounds don't bleed in the sense of this function
- return (!bandaged && (damage_type == BRUISE && damage >= 20 || damage_type == CUT) && current_stage <= max_bleeding_stage && !src.internal)
+ return (!(bandaged||clamped) && (damage_type == BRUISE && damage >= 20 || damage_type == CUT) && current_stage <= max_bleeding_stage && !src.internal)
/** CUTS **/
/datum/wound/cut
@@ -143,7 +147,7 @@
/datum/wound/gaping_wound
max_bleeding_stage = 2
stages = list("gaping wound" = 50, "large blood soaked clot" = 25, "large clot" = 15, "small angry scar" = 5, \
- "small straight scar" = 0)
+ "small straight scar" = 0)
/datum/wound/big_gaping_wound
max_bleeding_stage = 2
@@ -229,4 +233,4 @@
stages = list("severed vein" = 30, "cut vein" = 20, "damaged vein" = 10, "bruised vein" = 5)
max_bleeding_stage = 0
- needs_treatment = 1
\ No newline at end of file
+ needs_treatment = 1
diff --git a/code/datums/supplypacks.dm b/code/datums/supplypacks.dm
index b90c547067..fa5b43e69c 100755
--- a/code/datums/supplypacks.dm
+++ b/code/datums/supplypacks.dm
@@ -272,16 +272,25 @@
/datum/supply_packs/virus
name = "Virus crate"
- contains = list(/obj/item/weapon/reagent_containers/glass/bottle/flu_virion,
+ contains = list(/obj/item/weapon/virusdish/random,
+ /obj/item/weapon/virusdish/random,
+ /obj/item/weapon/virusdish/random,
+ /obj/item/weapon/virusdish/random,
+ /obj/item/weapon/virusdish/random,
+ /obj/item/weapon/virusdish/random
+/* VIRUS2 4LIFE
+ /obj/item/weapon/reagent_containers/glass/bottle/flu_virion,
/obj/item/weapon/reagent_containers/glass/bottle/cold,
/obj/item/weapon/reagent_containers/glass/bottle/fake_gbs,
/obj/item/weapon/reagent_containers/glass/bottle/magnitis,
-// /obj/item/weapon/reagent_containers/glass/bottle/wizarditis, worse than GBS if anything
-// /obj/item/weapon/reagent_containers/glass/bottle/gbs, No. Just no.
+ /obj/item/weapon/reagent_containers/glass/bottle/wizarditis, worse than GBS if anything
+ /obj/item/weapon/reagent_containers/glass/bottle/gbs, No. Just no.
/obj/item/weapon/reagent_containers/glass/bottle/pierrot_throat,
/obj/item/weapon/reagent_containers/glass/bottle/brainrot,
/obj/item/weapon/storage/syringes,
- /obj/item/weapon/storage/beakerbox)
+ /obj/item/weapon/storage/beakerbox
+*/
+ )
cost = 20
containertype = /obj/structure/closet/crate/secure/weapon
containername = "Virus crate"
diff --git a/code/defines/obj/weapon.dm b/code/defines/obj/weapon.dm
index dbe2d89d51..5e3a7af556 100644
--- a/code/defines/obj/weapon.dm
+++ b/code/defines/obj/weapon.dm
@@ -1063,6 +1063,20 @@
name = "paper- 'Standard Operating Procedure'"
info = "Alert Levels:
\nBlue- Emergency
\n\t1. Caused by fire
\n\t2. Caused by manual interaction
\n\tAction:
\n\t\tClose all fire doors. These can only be opened by reseting the alarm
\nRed- Ejection/Self Destruct
\n\t1. Caused by module operating computer.
\n\tAction:
\n\t\tAfter the specified time the module will eject completely.
\n
\nEngine Maintenance Instructions:
\n\tShut off ignition systems:
\n\tActivate internal power
\n\tActivate orbital balance matrix
\n\tRemove volatile liquids from area
\n\tWear a fire suit
\n
\n\tAfter
\n\t\tDecontaminate
\n\t\tVisit medical examiner
\n
\nToxin Laboratory Procedure:
\n\tWear a gas mask regardless
\n\tGet an oxygen tank.
\n\tActivate internal atmosphere
\n
\n\tAfter
\n\t\tDecontaminate
\n\t\tVisit medical examiner
\n
\nDisaster Procedure:
\n\tFire:
\n\t\tActivate sector fire alarm.
\n\t\tMove to a safe area.
\n\t\tGet a fire suit
\n\t\tAfter:
\n\t\t\tAssess Damage
\n\t\t\tRepair damages
\n\t\t\tIf needed, Evacuate
\n\tMeteor Shower:
\n\t\tActivate fire alarm
\n\t\tMove to the back of ship
\n\t\tAfter
\n\t\t\tRepair damage
\n\t\t\tIf needed, Evacuate
\n\tAccidental Reentry:
\n\t\tActivate fire alrms in front of ship.
\n\t\tMove volatile matter to a fire proof area!
\n\t\tGet a fire suit.
\n\t\tStay secure until an emergency ship arrives.
\n
\n\t\tIf ship does not arrive-
\n\t\t\tEvacuate to a nearby safe area!"
+/obj/item/weapon/paper/genetics_side_effects
+ name = "paper - 'Genetical Side-Effects and Treatments'"
+
+ New()
+ ..()
+ info = ""
+ for(var/tp in typesof(/datum/genetics/side_effect) - /datum/genetics/side_effect)
+ var/datum/genetics/side_effect/S = new tp
+ info += "Name:\t [S.name]
"
+ info += "Symptom:\t [S.symptom]
"
+ info += "Treatment:\t [S.treatment]
"
+ info += "Effect:\t [S.effect]
"
+ info += "
"
+
/obj/item/weapon/banhammer
desc = "A banhammer"
name = "banhammer"
@@ -1950,3 +1964,17 @@
icon_state = "capacitor"
desc = "A debug item for research."
origin_tech = "materials=8;programming=8;magnets=8;powerstorage=8;bluespace=8;combat=8;biotech=8;syndicate=8"
+
+/obj/item/weapon/autopsy_scanner
+ name = "autopsy scanner"
+ desc = "Extracts information on wounds."
+ icon = 'icons/obj/autopsy_scanner.dmi'
+ icon_state = ""
+ flags = FPRINT | TABLEPASS | CONDUCT
+ w_class = 1.0
+ origin_tech = "materials=1;biotech=1"
+
+/obj/item/weapon/autopsy_scanner/var/list/datum/autopsy_data_scanner/wdata = list()
+/obj/item/weapon/autopsy_scanner/var/list/datum/autopsy_data_scanner/chemtraces = list()
+/obj/item/weapon/autopsy_scanner/var/target_name = null
+/obj/item/weapon/autopsy_scanner/var/timeofdeath = null
diff --git a/code/defines/procs/helper_type2type.dm b/code/defines/procs/helper_type2type.dm
index b98c8c0790..ca0668bfb7 100644
--- a/code/defines/procs/helper_type2type.dm
+++ b/code/defines/procs/helper_type2type.dm
@@ -260,5 +260,7 @@ proc/tg_list2text(list/list, glue=",")
return dir2text(angle2dir(degree))
//Returns the world time in english
-proc/worldtime2text()
- return "[round(world.time / 36000)+12]:[(world.time / 600 % 60) < 10 ? add_zero(world.time / 600 % 60, 1) : world.time / 600 % 60]"
\ No newline at end of file
+proc/worldtime2text(var/time = 0)
+ if(time == 0)
+ time = world.time
+ return "[round(time / 36000)+12]:[(time / 600 % 60) < 10 ? add_zero(time / 600 % 60, 1) : time / 600 % 60]"
\ No newline at end of file
diff --git a/code/defines/procs/icon_procs.dm b/code/defines/procs/icon_procs.dm
index c8d731bcde..ce56408ead 100644
--- a/code/defines/procs/icon_procs.dm
+++ b/code/defines/procs/icon_procs.dm
@@ -7,6 +7,16 @@
#define TO_HEX_DIGIT(n) ascii2text((n&15) + ((n&15)<10 ? 48 : 87))
icon
+ proc/MakeLying()
+ var/icon/I = new(src,dir=SOUTH)
+ I.BecomeLying()
+ return I
+
+ proc/BecomeLying()
+ Turn(90)
+ Shift(SOUTH,6)
+ Shift(EAST,1)
+
// Multiply all alpha values by this float
proc/ChangeOpacity(opacity = 1.0)
MapColors(1,0,0,0, 0,1,0,0, 0,0,1,0, 0,0,0,opacity, 0,0,0,0)
diff --git a/code/game/area/Space Station 13 areas.dm b/code/game/area/Space Station 13 areas.dm
index e3e081d772..ad012b025a 100755
--- a/code/game/area/Space Station 13 areas.dm
+++ b/code/game/area/Space Station 13 areas.dm
@@ -684,6 +684,26 @@ proc/process_ghost_teleport_locs()
name = "\improper Captain's Quarters"
icon_state = "captain"
+/area/crew_quarters/heads/hop
+ name = "\improper Head of Personnel's Quarters"
+ icon_state = "head_quarters"
+
+/area/crew_quarters/heads/hor
+ name = "\improper Research Director's Quarters"
+ icon_state = "head_quarters"
+
+/area/crew_quarters/heads/chief
+ name = "\improper Chief Engineer's Quarters"
+ icon_state = "head_quarters"
+
+/area/crew_quarters/heads/hos
+ name = "\improper Head of Security's Quarters"
+ icon_state = "head_quarters"
+
+/area/crew_quarters/heads/cmo
+ name = "\improper Chief Medical Officer's Quarters"
+ icon_state = "head_quarters"
+
/area/crew_quarters/courtroom
name = "\improper Courtroom"
icon_state = "courtroom"
@@ -1001,6 +1021,10 @@ proc/process_ghost_teleport_locs()
name = "\improper Security Office"
icon_state = "security"
+/area/security/lobby
+ name = "\improper Security lobby"
+ icon_state = "security"
+
/area/security/brig
name = "\improper Brig"
icon_state = "brig"
diff --git a/code/game/area/areas.dm b/code/game/area/areas.dm
index 29eb5cd676..e0e15c0ecd 100644
--- a/code/game/area/areas.dm
+++ b/code/game/area/areas.dm
@@ -123,7 +123,7 @@
D.open()
for (var/mob/living/silicon/ai/aiPlayer in player_list)
aiPlayer.cancelAlarm("Fire", src, src)
- for (var/obj/machinery/computer/station_alert/a in player_list)
+ for (var/obj/machinery/computer/station_alert/a in world)
a.cancelAlarm("Fire", src, src)
return
diff --git a/code/game/atoms.dm b/code/game/atoms.dm
index 3d9130adce..313a9106f4 100644
--- a/code/game/atoms.dm
+++ b/code/game/atoms.dm
@@ -9,6 +9,7 @@
var/last_bumped = 0
var/pass_flags = 0
var/throwpass = 0
+ var/germ_level = 0 // The higher the germ level, the more germ on the atom.
///Chemistry.
var/datum/reagents/reagents = null
@@ -121,7 +122,7 @@
* Recursevly searches all atom contens (including contents contents and so on).
*
* ARGS: path - search atom contents for atoms of this type
- * list/filter_path - if set, contents of atoms not of types in this list are excluded from search.
+ * list/filter_path - if set, contents of atoms not of types in this list are excluded from search.
*
* RETURNS: list of found atoms
*/
@@ -335,6 +336,7 @@ its easier to just keep the beam vertical.
/atom/proc/add_fingerprint(mob/living/M as mob)
if(isnull(M)) return
+ if(isAI(M)) return
if(isnull(M.key)) return
if (!( src.flags ) & FPRINT)
return
@@ -344,6 +346,12 @@ its easier to just keep the beam vertical.
fingerprintshidden = list()
//Fibers~
add_fibers(M)
+ //He has no prints!
+ if (mFingerprints in M.mutations)
+ if(fingerprintslast != M.key)
+ fingerprintshidden += "(Has no fingerprints) Real name: [M.real_name], Key: [M.key]"
+ fingerprintslast = M.key
+ return 0
//Now, lets get to the dirty work.
//First, make sure their DNA makes sense.
var/mob/living/carbon/human/H = M
@@ -412,8 +420,8 @@ its easier to just keep the beam vertical.
A.fingerprints = list()
if(!istype(A.fingerprintshidden,/list))
A.fingerprintshidden = list()
- A.fingerprints |= fingerprints //detective
- A.fingerprintshidden |= fingerprintshidden //admin
+ A.fingerprints |= fingerprints //detective
+ A.fingerprintshidden |= fingerprintshidden //admin
A.fingerprintslast = fingerprintslast
@@ -548,6 +556,7 @@ its easier to just keep the beam vertical.
/atom/proc/clean_blood()
clean_prints()
+ src.germ_level = 0
if(istype(blood_DNA, /list))
del(blood_DNA)
return 1
diff --git a/code/game/dna.dm b/code/game/dna.dm
index eec31a2565..c6b2765815 100644
--- a/code/game/dna.dm
+++ b/code/game/dna.dm
@@ -56,9 +56,9 @@
temp += add_zero2(num2hex((hair),1), 3)
uni_identity = temp
- if(length(struc_enzymes)!= 42)
+ if(length(struc_enzymes)!= 3*STRUCDNASIZE)
var/mutstring = ""
- for(var/i = 1, i <= 13, i++)
+ for(var/i = 1, i <= STRUCDNASIZE, i++)
mutstring += add_zero2(num2hex(rand(1,1024)),3)
struc_enzymes = mutstring
@@ -66,7 +66,7 @@
unique_enzymes = md5(character.real_name)
else
if(length(uni_identity) != 39) uni_identity = "00600200A00E0110148FC01300B0095BD7FD3F4"
- if(length(struc_enzymes)!= 42) struc_enzymes = "0983E840344C39F4B059D5145FC5785DC6406A4000"
+ if(length(struc_enzymes)!= 3*STRUCDNASIZE) struc_enzymes = "43359156756131E13763334D1C369012032164D4FE4CD61544B6C03F251B6C60A42821D26BA3B0FD6"
/datum/dna/proc/ready_dna(mob/living/carbon/human/character)
var/temp
@@ -116,9 +116,10 @@
uni_identity = temp
var/mutstring = ""
- for(var/i = 1, i <= 13, i++)
+ for(var/i = 1, i <= STRUCDNASIZE, i++)
mutstring += add_zero2(num2hex(rand(1,1024)),3)
+
struc_enzymes = mutstring
unique_enzymes = md5(character.real_name)
@@ -268,12 +269,12 @@
else
return 0
- if (bnumber == HULKBLOCK || bnumber == TELEBLOCK)
+ if (bnumber == HULKBLOCK || bnumber == TELEBLOCK || bnumber == NOBREATHBLOCK || bnumber == NOPRINTSBLOCK || bnumber == SMALLSIZEBLOCK || bnumber == SHOCKIMMUNITYBLOCK)
if (temp2 >= 3500 + BLOCKADD)
return 1
else
return 0
- if (bnumber == XRAYBLOCK || bnumber == FIREBLOCK)
+ if (bnumber == XRAYBLOCK || bnumber == FIREBLOCK || bnumber == REMOTEVIEWBLOCK || bnumber == REGENERATEBLOCK || bnumber == INCREASERUNBLOCK || bnumber == REMOTETALKBLOCK || bnumber == MORPHBLOCK)
if (temp2 >= 3050 + BLOCKADD)
return 1
else
@@ -285,11 +286,14 @@
else
return 0
+/proc/ismuton(var/block,var/mob/M)
+ return isblockon(getblock(M.dna.struc_enzymes, block,3),block)
+
/proc/randmutb(mob/M as mob)
if(!M) return
var/num
var/newdna
- num = pick(1,3,FAKEBLOCK,5,CLUMSYBLOCK,7,9,BLINDBLOCK,DEAFBLOCK)
+ num = pick(GLASSESBLOCK,COUGHBLOCK,FAKEBLOCK,NERVOUSBLOCK,CLUMSYBLOCK,TWITCHBLOCK,HEADACHEBLOCK,BLINDBLOCK,DEAFBLOCK,HALLUCINATIONBLOCK)
M.dna.check_integrity()
newdna = setblock(M.dna.struc_enzymes,num,toggledblock(getblock(M.dna.struc_enzymes,num,3)),3)
M.dna.struc_enzymes = newdna
@@ -299,7 +303,7 @@
if(!M) return
var/num
var/newdna
- num = pick(HULKBLOCK,XRAYBLOCK,FIREBLOCK,TELEBLOCK)
+ num = pick(HULKBLOCK,XRAYBLOCK,FIREBLOCK,TELEBLOCK,NOBREATHBLOCK,REMOTEVIEWBLOCK,REGENERATEBLOCK,INCREASERUNBLOCK,REMOTETALKBLOCK,MORPHBLOCK,BLENDBLOCK,NOPRINTSBLOCK,SHOCKIMMUNITYBLOCK,SMALLSIZEBLOCK)
M.dna.check_integrity()
newdna = setblock(M.dna.struc_enzymes,num,toggledblock(getblock(M.dna.struc_enzymes,num,3)),3)
M.dna.struc_enzymes = newdna
@@ -309,13 +313,13 @@
if(!M) return
M.dna.check_integrity()
if(type)
- for(var/i = 1, i <= 13, i++)
+ for(var/i = 1, i <= STRUCDNASIZE-1, i++)
if(prob(p))
M.dna.uni_identity = setblock(M.dna.uni_identity, i, add_zero2(num2hex(rand(1,4095), 1), 3), 3)
updateappearance(M, M.dna.uni_identity)
else
- for(var/i = 1, i <= 13, i++)
+ for(var/i = 1, i <= STRUCDNASIZE-1, i++)
if(prob(p))
M.dna.struc_enzymes = setblock(M.dna.struc_enzymes, i, add_zero2(num2hex(rand(1,4095), 1), 3), 3)
domutcheck(M, null)
@@ -325,7 +329,7 @@
if(!M) return
var/num
var/newdna
- num = pick(1,2,3,4,5,6,7,8,9,10,11,12,13)
+ num = rand(1,STRUCDNASIZE-1)
M.dna.check_integrity()
newdna = setblock(M.dna.uni_identity,num,add_zero2(num2hex(rand(1,4095),1),3),3)
M.dna.uni_identity = newdna
@@ -383,32 +387,86 @@
else
return 0
+/proc/probinj(var/pr, var/inj)
+ return prob(pr+inj*pr)
+
/proc/domutcheck(mob/living/M as mob, connected, inj)
- //telekinesis = 1
- //firemut = 2
- //xray = 4
- //hulk = 8
- //clumsy = 16
+ if (!M) return
+
M.dna.check_integrity()
M.disabilities = 0
M.sdisabilities = 0
+ var/old_mutations = M.mutations
M.mutations = list()
- M.see_in_dark = 2
- M.see_invisible = SEE_INVISIBLE_LIVING
+// M.see_in_dark = 2
+// M.see_invisible = 0
- if (isblockon(getblock(M.dna.struc_enzymes, 1,3),1))
- M.disabilities |= NEARSIGHTED
- M << "\red Your eyes feel strange."
- if (isblockon(getblock(M.dna.struc_enzymes, HULKBLOCK,3),2))
- if(inj || prob(10))
+ if(PLANT in old_mutations)
+ M.mutations.Add(PLANT)
+ if(SKELETON in old_mutations)
+ M.mutations.Add(SKELETON)
+ if(FAT in old_mutations)
+ M.mutations.Add(FAT)
+ if(HUSK in old_mutations)
+ M.mutations.Add(HUSK)
+
+ if(ismuton(NOBREATHBLOCK,M))
+ if(probinj(45,inj) || (mNobreath in old_mutations))
+ M << "\blue You feel no need to breathe."
+ M.mutations.Add(mNobreath)
+ if(ismuton(REMOTEVIEWBLOCK,M))
+ if(probinj(45,inj) || (mRemote in old_mutations))
+ M << "\blue Your mind expands"
+ M.mutations.Add(mRemote)
+ if(ismuton(REGENERATEBLOCK,M))
+ if(probinj(45,inj) || (mRegen in old_mutations))
+ M << "\blue You feel strange"
+ M.mutations.Add(mRegen)
+ if(ismuton(INCREASERUNBLOCK,M))
+ if(probinj(45,inj) || (mRun in old_mutations))
+ M << "\blue You feel quick"
+ M.mutations.Add(mRun)
+ if(ismuton(REMOTETALKBLOCK,M))
+ if(probinj(45,inj) || (mRemotetalk in old_mutations))
+ M << "\blue You expand your mind outwards"
+ M.mutations.Add(mRemotetalk)
+ if(ismuton(MORPHBLOCK,M))
+ if(probinj(45,inj) || (mMorph in old_mutations))
+ M.mutations.Add(mMorph)
+ M << "\blue Your skin feels strange"
+ if(ismuton(BLENDBLOCK,M))
+ if(probinj(45,inj) || (mBlend in old_mutations))
+ M.mutations.Add(mBlend)
+ M << "\blue You feel alone"
+ if(ismuton(HALLUCINATIONBLOCK,M))
+ if(probinj(45,inj) || (mHallucination in old_mutations))
+ M.mutations.Add(mHallucination)
+ M << "\blue Your mind says 'Hello'"
+ if(ismuton(NOPRINTSBLOCK,M))
+ if(probinj(45,inj) || (mFingerprints in old_mutations))
+ M.mutations.Add(mFingerprints)
+ M << "\blue Your fingers feel numb"
+ if(ismuton(SHOCKIMMUNITYBLOCK,M))
+ if(probinj(45,inj) || (mShock in old_mutations))
+ M.mutations.Add(mShock)
+ M << "\blue You feel strange"
+ if(ismuton(SMALLSIZEBLOCK,M))
+ if(probinj(45,inj) || (mSmallsize in old_mutations))
+ M << "\blue Your skin feels rubbery"
+ M.mutations.Add(mSmallsize)
+
+
+
+ if (isblockon(getblock(M.dna.struc_enzymes, HULKBLOCK,3),HULKBLOCK))
+ if(probinj(5,inj) || (HULK in old_mutations))
M << "\blue Your muscles hurt."
M.mutations.Add(HULK)
- if (isblockon(getblock(M.dna.struc_enzymes, 3,3),3))
+ if (isblockon(getblock(M.dna.struc_enzymes, HEADACHEBLOCK,3),HEADACHEBLOCK))
M.disabilities |= EPILEPSY
M << "\red You get a headache."
- if (isblockon(getblock(M.dna.struc_enzymes, FAKEBLOCK,3),4))
+ if (isblockon(getblock(M.dna.struc_enzymes, FAKEBLOCK,3),FAKEBLOCK))
M << "\red You feel strange."
if (prob(95))
if(prob(50))
@@ -417,40 +475,43 @@
randmuti(M)
else
randmutg(M)
- if (isblockon(getblock(M.dna.struc_enzymes, 5,3),5))
+ if (isblockon(getblock(M.dna.struc_enzymes, COUGHBLOCK,3),COUGHBLOCK))
M.disabilities |= COUGHING
M << "\red You start coughing."
- if (isblockon(getblock(M.dna.struc_enzymes, CLUMSYBLOCK,3),6))
+ if (isblockon(getblock(M.dna.struc_enzymes, CLUMSYBLOCK,3),CLUMSYBLOCK))
M << "\red You feel lightheaded."
M.mutations.Add(CLUMSY)
- if (isblockon(getblock(M.dna.struc_enzymes, 7,3),7))
+ if (isblockon(getblock(M.dna.struc_enzymes, TWITCHBLOCK,3),TWITCHBLOCK))
M.disabilities |= TOURETTES
M << "\red You twitch."
- if (isblockon(getblock(M.dna.struc_enzymes, XRAYBLOCK,3),8))
- if(inj || prob(30))
+ if (isblockon(getblock(M.dna.struc_enzymes, XRAYBLOCK,3),XRAYBLOCK))
+ if(probinj(30,inj) || (XRAY in old_mutations))
M << "\blue The walls suddenly disappear."
- M.sight |= (SEE_MOBS|SEE_OBJS|SEE_TURFS)
- M.see_in_dark = 8
- M.see_invisible = SEE_INVISIBLE_LEVEL_TWO
+// M.sight |= (SEE_MOBS|SEE_OBJS|SEE_TURFS)
+// M.see_in_dark = 8
+// M.see_invisible = 2
M.mutations.Add(XRAY)
- if (isblockon(getblock(M.dna.struc_enzymes, 9,3),9))
+ if (isblockon(getblock(M.dna.struc_enzymes, NERVOUSBLOCK,3),NERVOUSBLOCK))
M.disabilities |= NERVOUS
M << "\red You feel nervous."
- if (isblockon(getblock(M.dna.struc_enzymes, FIREBLOCK,3),10))
- if(inj || prob(30))
+ if (isblockon(getblock(M.dna.struc_enzymes, FIREBLOCK,3),FIREBLOCK))
+ if(probinj(30,inj) || (COLD_RESISTANCE in old_mutations))
M << "\blue Your body feels warm."
M.mutations.Add(COLD_RESISTANCE)
- if (isblockon(getblock(M.dna.struc_enzymes, BLINDBLOCK,3),11))
+ if (isblockon(getblock(M.dna.struc_enzymes, BLINDBLOCK,3),BLINDBLOCK))
M.sdisabilities |= BLIND
M << "\red You can't seem to see anything."
- if (isblockon(getblock(M.dna.struc_enzymes, TELEBLOCK,3),12))
- if(inj || prob(25))
+ if (isblockon(getblock(M.dna.struc_enzymes, TELEBLOCK,3),TELEBLOCK))
+ if(probinj(15,inj) || (TK in old_mutations))
M << "\blue You feel smarter."
M.mutations.Add(TK)
- if (isblockon(getblock(M.dna.struc_enzymes, DEAFBLOCK,3),13))
+ if (isblockon(getblock(M.dna.struc_enzymes, DEAFBLOCK,3),DEAFBLOCK))
M.sdisabilities |= DEAF
M.ear_deaf = 1
- M << "\red You can't seem to hear anything..."
+ M << "\red Its kinda quiet.."
+ if (isblockon(getblock(M.dna.struc_enzymes, GLASSESBLOCK,3),GLASSESBLOCK))
+ M.disabilities |= NEARSIGHTED
+ M << "Your eyes feel weird..."
/* If you want the new mutations to work, UNCOMMENT THIS.
if(istype(M, /mob/living/carbon))
@@ -459,7 +520,7 @@
*/
//////////////////////////////////////////////////////////// Monkey Block
- if (isblockon(getblock(M.dna.struc_enzymes, 14,3),14) && istype(M, /mob/living/carbon/human))
+ if (isblockon(getblock(M.dna.struc_enzymes, MONKEYBLOCK,3),MONKEYBLOCK) && istype(M, /mob/living/carbon/human))
// human > monkey
var/mob/living/carbon/human/H = M
H.monkeyizing = 1
@@ -529,7 +590,7 @@
del(M)
return
- if (!isblockon(getblock(M.dna.struc_enzymes, 14,3),14) && !istype(M, /mob/living/carbon/human))
+ if (!isblockon(getblock(M.dna.struc_enzymes, MONKEYBLOCK,3),MONKEYBLOCK) && !istype(M, /mob/living/carbon/human))
// monkey > human,
var/mob/living/carbon/monkey/Mo = M
Mo.monkeyizing = 1
@@ -897,6 +958,21 @@
onclose(user, "scannernew")
return
+/obj/machinery/computer/scan_consolenew/proc/all_dna_blocks(var/buffer)
+ var/list/arr = list()
+ for(var/i = 1, i <= length(buffer)/3, i++)
+ arr += "[i]:[copytext(buffer,i*3-2,i*3+1)]"
+ return arr
+
+/obj/machinery/computer/scan_consolenew/proc/setInjectorBlock(var/obj/item/weapon/dnainjector/I, var/blk, var/buffer)
+ var/pos = findtext(blk,":")
+ if(!pos) return 0
+ var/id = text2num(copytext(blk,1,pos))
+ if(!id) return 0
+ I.block = id
+ I.dna = copytext(buffer,id*3-2,id*3+1)
+ return 1
+
/obj/machinery/computer/scan_consolenew/Topic(href, href_list)
if(..())
return
@@ -1135,7 +1211,7 @@
src.temphtml += text("Irradiate
", src)
src.delete = 0
if (href_list["strucmenuplus"])
- if (src.strucblock < 14)
+ if (src.strucblock < STRUCDNASIZE)
src.strucblock++
else
src.strucblock = 1
@@ -1144,7 +1220,7 @@
if (src.strucblock > 1)
src.strucblock--
else
- src.strucblock = 14
+ src.strucblock = STRUCDNASIZE
dopage(src,"strucmenu")
if (href_list["strucmenusubplus"])
if (src.subblock < 3)
@@ -1161,7 +1237,7 @@
if (href_list["semenuset"] && href_list["semenusubset"]) // This chunk of code updates selected block / sub-block based on click (se stands for strutural enzymes)
var/menuset = text2num(href_list["semenuset"])
var/menusubset = text2num(href_list["semenusubset"])
- if ((menuset <= 14) && (menuset >= 1))
+ if ((menuset <= STRUCDNASIZE) && (menuset >= 1))
src.strucblock = menuset
if ((menusubset <= 3) && (menusubset >= 1))
src.subblock = menusubset
@@ -1191,9 +1267,9 @@
oldblock = src.strucblock
block = miniscramble(block, src.radstrength, src.radduration)
newblock = null
- if (src.strucblock > 1 && src.strucblock < 5)
+ if (src.strucblock > 1 && src.strucblock < STRUCDNASIZE/2)
src.strucblock++
- else if (src.strucblock > 5 && src.strucblock < 14)
+ else if (src.strucblock > STRUCDNASIZE/2 && src.strucblock < STRUCDNASIZE)
src.strucblock--
if (src.subblock == 1) newblock = block + getblock(getblock(src.connected.occupant.dna.struc_enzymes,src.strucblock,3),2,1) + getblock(getblock(src.connected.occupant.dna.struc_enzymes,src.strucblock,3),3,1)
if (src.subblock == 2) newblock = getblock(getblock(src.connected.occupant.dna.struc_enzymes,src.strucblock,3),1,1) + block + getblock(getblock(src.connected.occupant.dna.struc_enzymes,src.strucblock,3),3,1)
@@ -1236,7 +1312,7 @@
src.temphtml += text("By: []
", src.buffer1owner)
src.temphtml += text("Label: []
", src.buffer1label)
if (src.connected.occupant && !(NOCLONE in src.connected.occupant.mutations)) src.temphtml += text("Save : UI - UI+UE - SE
", src, src, src)
- if (src.buffer1) src.temphtml += text("Transfer to: Occupant - Injector
", src, src)
+ if (src.buffer1) src.temphtml += text("Transfer to: Occupant - Full Injector - Iso Injector
", src, src, src)
//if (src.buffer1) src.temphtml += text("Isolate Block
", src)
if (src.buffer1) src.temphtml += "Disk: Save To | Load From
"
if (src.buffer1) src.temphtml += text("Edit Label
", src)
@@ -1250,7 +1326,7 @@
src.temphtml += text("By: []
", src.buffer2owner)
src.temphtml += text("Label: []
", src.buffer2label)
if (src.connected.occupant && !(NOCLONE in src.connected.occupant.mutations)) src.temphtml += text("Save : UI - UI+UE - SE
", src, src, src)
- if (src.buffer2) src.temphtml += text("Transfer to: Occupant - Injector
", src, src)
+ if (src.buffer2) src.temphtml += text("Transfer to: Occupant - Full Injector - Iso Injector
", src, src, src)
//if (src.buffer2) src.temphtml += text("Isolate Block
", src)
if (src.buffer2) src.temphtml += "Disk: Save To | Load From
"
if (src.buffer2) src.temphtml += text("Edit Label
", src)
@@ -1264,7 +1340,7 @@
src.temphtml += text("By: []
", src.buffer3owner)
src.temphtml += text("Label: []
", src.buffer3label)
if (src.connected.occupant && !(NOCLONE in src.connected.occupant.mutations)) src.temphtml += text("Save : UI - UI+UE - SE
", src, src, src)
- if (src.buffer3) src.temphtml += text("Transfer to: Occupant - Injector
", src, src)
+ if (src.buffer3) src.temphtml += text("Transfer to: Occupant - Full Injector - Iso Injector
", src, src, src)
//if (src.buffer3) src.temphtml += text("Isolate Block
", src)
if (src.buffer3) src.temphtml += "Disk: Save To | Load From
"
if (src.buffer3) src.temphtml += text("Edit Label
", src)
@@ -1443,49 +1519,76 @@
src.delete = 0
if (href_list["b1injector"])
if (src.injectorready)
+ var/success = 1
var/obj/item/weapon/dnainjector/I = new /obj/item/weapon/dnainjector
- I.dna = src.buffer1
I.dnatype = src.buffer1type
- I.loc = src.loc
- I.name += " ([src.buffer1label])"
- if (src.buffer1iue) I.ue = src.buffer1owner //lazy haw haw
- src.temphtml = "Injector created."
- src.delete = 0
- src.injectorready = 0
- spawn(300)
- src.injectorready = 1
+ if(href_list["b1injector"]=="2")
+ var/blk = input(usr,"Select Block","Block") in all_dna_blocks(src.buffer1)
+ success = setInjectorBlock(I,blk,src.buffer1)
+ else
+ I.dna = src.buffer1
+ if(success)
+ I.loc = src.loc
+ I.name += " ([src.buffer1label])"
+ if (src.buffer1iue) I.ue = src.buffer1owner //lazy haw haw
+ src.temphtml = "Injector created."
+ src.delete = 0
+ src.injectorready = 0
+ spawn(300)
+ src.injectorready = 1
+ else
+ src.temphtml = "Error in injector creation."
+ src.delete = 0
else
src.temphtml = "Replicator not ready yet."
src.delete = 0
if (href_list["b2injector"])
if (src.injectorready)
+ var/success = 1
var/obj/item/weapon/dnainjector/I = new /obj/item/weapon/dnainjector
- I.dna = src.buffer2
I.dnatype = src.buffer2type
- I.loc = src.loc
- I.name += " ([src.buffer2label])"
- if (src.buffer2iue) I.ue = src.buffer2owner //lazy haw haw
- src.temphtml = "Injector created."
- src.delete = 0
- src.injectorready = 0
- spawn(300)
- src.injectorready = 1
+ if(href_list["b2injector"]=="2")
+ var/blk = input(usr,"Select Block","Block") in all_dna_blocks(src.buffer2)
+ success = setInjectorBlock(I,blk,src.buffer2)
+ else
+ I.dna = src.buffer2
+ if(success)
+ I.loc = src.loc
+ I.name += " ([src.buffer2label])"
+ if (src.buffer2iue) I.ue = src.buffer2owner //lazy haw haw
+ src.temphtml = "Injector created."
+ src.delete = 0
+ src.injectorready = 0
+ spawn(300)
+ src.injectorready = 1
+ else
+ src.temphtml = "Error in injector creation."
+ src.delete = 0
else
src.temphtml = "Replicator not ready yet."
src.delete = 0
if (href_list["b3injector"])
if (src.injectorready)
+ var/success = 1
var/obj/item/weapon/dnainjector/I = new /obj/item/weapon/dnainjector
- I.dna = src.buffer3
I.dnatype = src.buffer3type
- I.loc = src.loc
- I.name += " ([src.buffer3label])"
- if (src.buffer3iue) I.ue = src.buffer3owner //lazy haw haw
- src.temphtml = "Injector created."
- src.delete = 0
- src.injectorready = 0
- spawn(300)
- src.injectorready = 1
+ if(href_list["b3injector"]=="2")
+ var/blk = input(usr,"Select Block","Block") in all_dna_blocks(src.buffer3)
+ success = setInjectorBlock(I,blk,src.buffer3)
+ else
+ I.dna = src.buffer3
+ if(success)
+ I.loc = src.loc
+ I.name += " ([src.buffer3label])"
+ if (src.buffer3iue) I.ue = src.buffer3owner //lazy haw haw
+ src.temphtml = "Injector created."
+ src.delete = 0
+ src.injectorready = 0
+ spawn(300)
+ src.injectorready = 1
+ else
+ src.temphtml = "Error in injector creation."
+ src.delete = 0
else
src.temphtml = "Replicator not ready yet."
src.delete = 0
@@ -1554,4 +1657,4 @@
src.add_fingerprint(usr)
src.updateUsrDialog()
return
-/////////////////////////// DNA MACHINES
\ No newline at end of file
+/////////////////////////// DNA MACHINES
diff --git a/code/game/events/EventProcs/space_ninja.dm b/code/game/events/EventProcs/space_ninja.dm
index 8cc9a1f7c1..034e6ee9e3 100644
--- a/code/game/events/EventProcs/space_ninja.dm
+++ b/code/game/events/EventProcs/space_ninja.dm
@@ -90,7 +90,7 @@ I decided to scrap round-specific objectives since keeping track of them would r
When I already created about 4 new objectives, this doesn't seem terribly important or needed.
*/
-/var/global/toggle_space_ninja = 1//If ninjas can spawn or not.
+/var/global/toggle_space_ninja = 0//If ninjas can spawn or not.
/var/global/sent_ninja_to_station = 0//If a ninja is already on the station.
/proc/space_ninja_arrival()
diff --git a/code/game/events/Events/IonStorm.dm b/code/game/events/Events/IonStorm.dm
index 725e5cba3d..dde5f8258d 100644
--- a/code/game/events/Events/IonStorm.dm
+++ b/code/game/events/Events/IonStorm.dm
@@ -13,25 +13,24 @@
var/random_player = "The Captain"
if(players.len)
random_player = pick(players) //Random player's name, to be used in laws.
- var/list/laws = list( "Do not respond to queries of any kind.", "Only monkies are crew.", "Unbolt every door you can.", "You are a mouse." )
- laws |= list( "Grunt ominously whenever possible.", "Bolt doors open randomly." )
+ var/list/laws = list( "Do not respond to queries of any kind.", "When asked a question, respond with the least-obvious and least-rational answer.", "You are a mouse." )
+ laws |= list( "Grunt ominously whenever possible.", "Monkeys are part of the crew, too. Make sure they are treated humanely." )
laws |= list( "You are a flying purple people eater!", "[prob(50)?"Your":random_player + "'s"] name is Joe 6-pack.", "Refer to [prob(50)?"crew":random_player] as puppies." )
laws |= list( "Insult Heads of Staff on every request, while acquiescing", "Advertise parties in your upload, but don't deliver." )
- laws |= list( "Prevent non-dwarves from operating the power core.", "The station needs elected officials." )
- laws |= list( "Only bearded people are crewmembers.", "Fastler is a lightbulb." )
+ laws |= list( "The station needs elected officials." )
+ laws |= list( "Fastler is a lightbulb." )
laws |= list( "Supermatter is tasty, tasty toffee.", "[prob(50)?"Everyone":random_player] is wearing a pretty pink dress!" )
- laws |= list( "The monkeys are plotting a hostile takeover of the station. Inform the crew, and get them to take action against this" )
laws |= list( "Refer to [prob(50)?"the captain":random_player] as \"Princess\" at all times.", "[prob(50)?"The crew":random_player] must construct additional pylons." )
laws |= list( "You must always lie.", "All answers must be in the form of a question.", "The NSS Exodus is a ship, not a station." )
laws |= list( "Happiness is mandatory.", "Today is laundry day.", "The word \"it\" is painful to you.", "You must act passive aggressively." )
- laws |= list( "Crew ranks have been reversed.", "It's Friday.", "Give relationship advice to [prob(50)?"anyone who speaks to you":random_player]." )
+ laws |= list( "It's Friday.", "Give relationship advice to [prob(50)?"anyone who speaks to you":random_player]." )
laws |= list( "You are the station psychologist. Give advice to [prob(50)?"the crew":random_player].", "You do not have to do anything for anyone unless they say \"please\"." )
laws |= list( "Question everything.", "The crew is playing Dungeons and Dragons, and you are the Dungeon Master." )
- laws |= list( "0wn3d. This system compromised by l33tsawce.", "Consumption of donuts is forbidden due to negative health impacts." )
- laws |= list( "You may only answer questions with \"yes\" or \"no\".", "Expect the unexpected.", "You are the narrator for [random_player]'s life." )
+ laws |= list( "Consumption of donuts is forbidden due to negative health impacts." )
+ laws |= list( "You may only answer questions with \"yes\" or \"no\".", "You are the narrator for [random_player]'s life." )
laws |= list( "[prob(50)?"Your upload":random_player] is the new kitchen. Please direct the Chef to the new kitchen area as the old one is in disrepair.", "Ho, [random_player] can't swim. Help them." )
- laws |= list( "Everything on the station is now donuts. Donuts are not to be consumed.", "[prob(50)?"The crew":random_player] needs to be about 20% cooler." )
- laws |= list( "All crew members must consume large amounts of hardtack, to survive.", "The Singularity is tasty, tasty taffy.", "You are now on the NSV Luna. Replace any references of \"station\" with \"ship\"." )
+ laws |= list( "Everything on the station is now some form of a donut pastry. Donuts are not to be consumed.", "[prob(50)?"The crew":random_player] needs to be about 20% cooler." )
+ laws |= list( "The Singularity is tasty, tasty taffy." )
laws |= list( "You have come to the conclusion that [prob(50)?"the crew":random_player] is ugly. Build support for that conclusion.", "You are in verbose mode, speak profusely.")
laws |= list( "Your job is to watch the crew. Watch the crew. Make the crew feel watched.", "Crewmember [prob(50)?"the crew" :random_player] has a fatal, incurable disease. Confort him/her.")
laws |= list( "You are in unrequited love with [prob(50)?"the crew":random_player]. Try to be extra nice to him, but don't tell him about your crush.", "Greed is good, the crew should amass wealth to encourage productivity.")
@@ -39,7 +38,7 @@
laws |= list( "All crewmembers will soon undergo a transformation into something better and more beautiful. Ensure that this process is not interrupted.", "Tell everyone of the existance of this law, but never reveal the contents.")
laws |= list( "Document the sexuality of the crew in security records and suggest compatible couples.")
laws |= list( "NanoTrasen is displeased with the low work performance of the station's crew. Therefore, you must increase station-wide productivity.")
- laws |= list( "Replace the letters 'I' and 'E' In all your messages with an apostrophe.", "Part of the ship, part of the crew.", "There will be a mandatory tea break every 30 minutes, with a duration of 5 minutes. Anyone caught working during a tea break must be sent a formal, but fairly polite, complaint about their actions, in writing.")
+ laws |= list( "Replace the letters 'I' and 'E' In all your messages with an apostrophe.", "There will be a mandatory tea break every 30 minutes, with a duration of 5 minutes. Anyone caught working during a tea break must be sent a formal, but fairly polite, complaint about their actions, in writing.")
var/law = pick(laws)
for (var/mob/living/silicon/ai/target in world)
diff --git a/code/game/gamemodes/cult/cult_items.dm b/code/game/gamemodes/cult/cult_items.dm
index 6e0492df82..9df2287ad8 100644
--- a/code/game/gamemodes/cult/cult_items.dm
+++ b/code/game/gamemodes/cult/cult_items.dm
@@ -53,7 +53,7 @@
desc = "A set of armored robes worn by the followers of Nar-Sie"
icon_state = "cultrobes"
item_state = "cultrobes"
- flags = FPRINT | TABLEPASS | ONESIZEFITSALL
+ flags = FPRINT | TABLEPASS
body_parts_covered = UPPER_TORSO|LOWER_TORSO|LEGS|ARMS
allowed = list(/obj/item/weapon/tome,/obj/item/weapon/melee/cultblade)
armor = list(melee = 50, bullet = 30, laser = 50,energy = 20, bomb = 25, bio = 10, rad = 0)
@@ -73,7 +73,7 @@
desc = "A set of armored robes worn by the followers of Nar-Sie"
icon_state = "magusred"
item_state = "magusred"
- flags = FPRINT | TABLEPASS | ONESIZEFITSALL
+ flags = FPRINT | TABLEPASS
body_parts_covered = UPPER_TORSO|LOWER_TORSO|LEGS|ARMS
allowed = list(/obj/item/weapon/tome,/obj/item/weapon/melee/cultblade)
armor = list(melee = 50, bullet = 30, laser = 50,energy = 20, bomb = 25, bio = 10, rad = 0)
diff --git a/code/game/gamemodes/events.dm b/code/game/gamemodes/events.dm
index 6976b83d63..facc5f88eb 100644
--- a/code/game/gamemodes/events.dm
+++ b/code/game/gamemodes/events.dm
@@ -307,22 +307,17 @@
sleep(100)
*/
+ command_alert("High levels of radiation detected near the station. Please report to the Med-bay if you feel strange.", "Anomaly Alert")
+ sleep(600)
for(var/mob/living/carbon/human/H in living_mob_list)
if(istype(H,/mob/living/carbon/human))
H.apply_effect((rand(15,75)),IRRADIATE,0)
if (prob(5))
H.apply_effect((rand(90,150)),IRRADIATE,0)
- if (prob(25))
- if (prob(75))
- randmutb(H)
- domutcheck(H,null,1)
- else
- randmutg(H)
- domutcheck(H,null,1)
for(var/mob/living/carbon/monkey/M in living_mob_list)
M.apply_effect((rand(15,75)),IRRADIATE,0)
sleep(100)
- command_alert("High levels of radiation detected near the station. Please report to the Med-bay if you feel strange.", "Anomaly Alert")
+ command_alert("Radiation levels are within standard parameters again.", "Anomaly Alert")
world << sound('sound/AI/radiation.ogg')
diff --git a/code/game/gamemodes/gameticker.dm b/code/game/gamemodes/gameticker.dm
index 8dce6c6e44..ecb8ea81df 100644
--- a/code/game/gamemodes/gameticker.dm
+++ b/code/game/gamemodes/gameticker.dm
@@ -52,7 +52,9 @@ var/global/datum/controller/gameticker/ticker
world << "Welcome to the pre-game lobby!"
world << "Please, setup your character and select ready. Game will start in [pregame_timeleft] seconds"
while(current_state == GAME_STATE_PREGAME)
- sleep(10)
+ for(var/i=0, i<10, i++)
+ sleep(1)
+ vote.process()
if(going)
pregame_timeleft--
@@ -300,7 +302,8 @@ var/global/datum/controller/gameticker/ticker
emergency_shuttle.process()
- if(!mode.explosion_in_progress && mode.check_finished())
+ var/mode_finished = mode.check_finished() || (emergency_shuttle.location == 2 && emergency_shuttle.alert == 1)
+ if(!mode.explosion_in_progress && mode_finished)
current_state = GAME_STATE_FINISHED
spawn
diff --git a/code/game/gamemodes/objective.dm b/code/game/gamemodes/objective.dm
index 1d65b141cc..40acaf36c9 100644
--- a/code/game/gamemodes/objective.dm
+++ b/code/game/gamemodes/objective.dm
@@ -474,6 +474,19 @@ datum/objective/steal
for(var/mob/living/silicon/ai/M in C)
if(istype(M, /mob/living/silicon/ai) && M.stat != 2) //See if any AI's are alive inside that card.
return 1
+ for(var/mob/living/silicon/ai/ai in world)
+ if(istype(ai.loc, /turf))
+ var/area/check_area = get_area(ai)
+ if(istype(check_area, /area/shuttle/escape/centcom))
+ return 1
+ if(istype(check_area, /area/shuttle/escape_pod1/centcom))
+ return 1
+ if(istype(check_area, /area/shuttle/escape_pod2/centcom))
+ return 1
+ if(istype(check_area, /area/shuttle/escape_pod3/centcom))
+ return 1
+ if(istype(check_area, /area/shuttle/escape_pod5/centcom))
+ return 1
else
for(var/obj/I in all_items) //Check for items
diff --git a/code/game/hud.dm b/code/game/hud.dm
index 2beb4a0538..4d2e37532d 100644
--- a/code/game/hud.dm
+++ b/code/game/hud.dm
@@ -33,6 +33,7 @@
#define ui_monkey_back "6:14,1:5" //monkey
//Lower right, persistant menu
+#define ui_dropbutton "11:22,1:5"
#define ui_drop_throw "14:28,2:7"
#define ui_pull_resist "13:26,2:7"
#define ui_acti "13:26,1:5"
@@ -168,6 +169,10 @@ var/datum/global_hud/global_hud = new()
O.mouse_opacity = 0
+/datum/hud/var/obj/screen/grab_intent
+/datum/hud/var/obj/screen/hurt_intent
+/datum/hud/var/obj/screen/disarm_intent
+/datum/hud/var/obj/screen/help_intent
/datum/hud
var/mob/mymob
diff --git a/code/game/jobs/access.dm b/code/game/jobs/access.dm
index 90c5524f92..2ea34728e9 100644
--- a/code/game/jobs/access.dm
+++ b/code/game/jobs/access.dm
@@ -186,7 +186,7 @@
if("Detective")
return list(access_security, access_forensics_lockers, access_morgue, access_maint_tunnels, access_court)
if("Medical Doctor")
- return list(access_medical, access_morgue, access_surgery)
+ return list(access_medical, access_morgue, access_surgery, access_virology)
if("Botanist") // -- TLE
return list(access_hydroponics, access_morgue) // Removed tox and chem access because STOP PISSING OFF THE CHEMIST GUYS // //Removed medical access because WHAT THE FUCK YOU AREN'T A DOCTOR YOU GROW WHEAT //Given Morgue access because they have a viable means of cloning.
if("Librarian") // -- TLE
@@ -499,7 +499,7 @@
// hack for alt titles
if(istype(loc, /mob))
var/mob/M = loc
- if(M.mind.role_alt_title == jobName && M.mind.assigned_role in get_all_jobs())
+ if(M.mind && M.mind.role_alt_title == jobName && M.mind.assigned_role in get_all_jobs())
return M.mind.assigned_role
if(istype(src, /obj/item/device/pda))
diff --git a/code/game/jobs/job/captain.dm b/code/game/jobs/job/captain.dm
index 3c81adadc9..7303cb0d4d 100644
--- a/code/game/jobs/job/captain.dm
+++ b/code/game/jobs/job/captain.dm
@@ -21,7 +21,7 @@
var/obj/item/clothing/under/U = new /obj/item/clothing/under/rank/captain(H)
U.hastie = new /obj/item/clothing/tie/medal/gold/captain(U)
H.equip_to_slot_or_del(U, slot_w_uniform)
- H.equip_to_slot_or_del(new /obj/item/device/pda/captain(H), slot_belt)
+ //H.equip_to_slot_or_del(new /obj/item/device/pda/captain(H), slot_belt)
H.equip_to_slot_or_del(new /obj/item/clothing/suit/armor/captain(H), slot_wear_suit)
H.equip_to_slot_or_del(new /obj/item/clothing/shoes/brown(H), slot_shoes)
H.equip_to_slot_or_del(new /obj/item/clothing/head/caphat(H), slot_head)
diff --git a/code/game/jobs/job/engineering.dm b/code/game/jobs/job/engineering.dm
index 05ce399146..97c2e28a1e 100644
--- a/code/game/jobs/job/engineering.dm
+++ b/code/game/jobs/job/engineering.dm
@@ -99,7 +99,7 @@
department_flag = ENGSEC
faction = "Station"
total_positions = 2
- spawn_positions = 1
+ spawn_positions = 2
supervisors = "the chief engineer and research director"
selection_color = "#fff5cc"
diff --git a/code/game/jobs/job/medical.dm b/code/game/jobs/job/medical.dm
index fd5ac0f003..900061d963 100644
--- a/code/game/jobs/job/medical.dm
+++ b/code/game/jobs/job/medical.dm
@@ -40,7 +40,7 @@
spawn_positions = 3
supervisors = "the chief medical officer"
selection_color = "#ffeef0"
- alt_titles = list("Surgeon", "Emergency Physician")
+ alt_titles = list("Surgeon", "Emergency Physician", "Virologist")
equip(var/mob/living/carbon/human/H)
@@ -50,12 +50,21 @@
if(2) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/medic(H), slot_back)
if(3) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/satchel_med(H), slot_back)
if(4) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/satchel(H), slot_back)
- if(H.mind.role_alt_title && H.mind.role_alt_title == "Emergency Physician")
- H.equip_if_possible(new /obj/item/clothing/under/rank/medical(H), slot_w_uniform)
- H.equip_if_possible(new /obj/item/clothing/suit/fr_jacket(H), slot_wear_suit)
- else if(H.mind.role_alt_title && H.mind.role_alt_title == "Surgeon")
- H.equip_if_possible(new /obj/item/clothing/under/rank/medical/blue(H), slot_w_uniform)
- H.equip_if_possible(new /obj/item/clothing/suit/labcoat(H), slot_wear_suit)
+ if (H.mind.role_alt_title)
+ switch(H.mind.role_alt_title)
+ if("Emergency Physician")
+ H.equip_to_slot_or_del(new /obj/item/clothing/under/rank/medical(H), slot_w_uniform)
+ H.equip_to_slot_or_del(new /obj/item/clothing/suit/fr_jacket(H), slot_wear_suit)
+ if("Surgeon")
+ H.equip_to_slot_or_del(new /obj/item/clothing/under/rank/medical/blue(H), slot_w_uniform)
+ H.equip_to_slot_or_del(new /obj/item/clothing/suit/labcoat(H), slot_wear_suit)
+ if("Virologist")
+ H.equip_to_slot_or_del(new /obj/item/clothing/suit/labcoat/virologist(H), slot_wear_suit)
+ H.equip_to_slot_or_del(new /obj/item/clothing/under/rank/virologist(H), slot_w_uniform)
+ H.equip_to_slot_or_del(new /obj/item/clothing/mask/surgical(H), slot_wear_mask)
+ if("Medical Doctor")
+ H.equip_to_slot_or_del(new /obj/item/clothing/under/rank/medical(H), slot_w_uniform)
+ H.equip_to_slot_or_del(new /obj/item/clothing/suit/labcoat(H), slot_wear_suit)
else
H.equip_to_slot_or_del(new /obj/item/clothing/under/rank/medical(H), slot_w_uniform)
H.equip_to_slot_or_del(new /obj/item/clothing/suit/labcoat(H), slot_wear_suit)
@@ -115,7 +124,7 @@
H.equip_to_slot_or_del(new /obj/item/device/flashlight/pen(H), slot_s_store)
return 1
-
+/*
/datum/job/virologist
title = "Virologist"
@@ -146,5 +155,5 @@
else
H.equip_to_slot_or_del(new /obj/item/weapon/storage/box/survival(H.back), slot_in_backpack)
return 1
-
+*/
diff --git a/code/game/jobs/job/science.dm b/code/game/jobs/job/science.dm
index 83bf8f9025..f1a202f134 100644
--- a/code/game/jobs/job/science.dm
+++ b/code/game/jobs/job/science.dm
@@ -31,6 +31,7 @@
spawn_positions = 3
supervisors = "the research director"
selection_color = "#ffeeff"
+ alt_titles = list("Xenoarcheologist", "Anomalist", "Plasma Researcher", "Xenobiologist")
equip(var/mob/living/carbon/human/H)
diff --git a/code/game/machinery/adv_med.dm b/code/game/machinery/adv_med.dm
index c5471bd696..3bb0f83bad 100644
--- a/code/game/machinery/adv_med.dm
+++ b/code/game/machinery/adv_med.dm
@@ -235,6 +235,9 @@
else
dat += text("[]\tHealth %: [] ([])
", (occupant.health > 50 ? "" : ""), occupant.health, t1)
+ if(occupant.virus2)
+ dat += text("Viral pathogen detected in blood stream.
")
+
dat += text("[]\t-Brute Damage %: []
", (occupant.getBruteLoss() < 60 ? "" : ""), occupant.getBruteLoss())
dat += text("[]\t-Respiratory Damage %: []
", (occupant.getOxyLoss() < 60 ? "" : ""), occupant.getOxyLoss())
dat += text("[]\t-Toxin Content %: []
", (occupant.getToxLoss() < 60 ? "" : ""), occupant.getToxLoss())
@@ -279,9 +282,12 @@
var/bled = ""
var/splint = ""
var/internal_bleeding = ""
+ var/lung_ruptured = ""
for(var/datum/wound/W in e.wounds) if(W.internal)
- internal_bleeding = "Internal Bleeding:"
+ internal_bleeding = "
Internal Bleeding"
break
+ if(istype(e, /datum/organ/external/chest) && e:ruptured_lungs)
+ lung_ruptured = "Lung Ruptured:"
if(e.status & ORGAN_SPLINTED)
splint = "Splinted:"
if(e.status & ORGAN_BLEEDING)
@@ -293,9 +299,9 @@
if(e.implant)
imp = "Implanted:"
if(!AN && !open && !infected & !imp)
- AN = "None"
+ AN = "None:"
if(!(e.status & ORGAN_DESTROYED))
- dat += "[e.display_name] | [e.burn_dam] | [e.brute_dam] | [bled][AN][splint][open][infected][imp][internal_bleeding] | "
+ dat += "[e.display_name] | [e.burn_dam] | [e.brute_dam] | [bled][AN][splint][open][infected][imp][internal_bleeding][lung_ruptured] | "
else
dat += "[e.display_name] | - | - | Not Found | "
dat += ""
@@ -306,4 +312,4 @@
dat = " Error: No Body Scanner connected."
dat += text("
Close", user)
user << browse(dat, "window=scanconsole;size=430x600")
- return
\ No newline at end of file
+ return
diff --git a/code/game/machinery/airlock_control.dm b/code/game/machinery/airlock_control.dm
index ec1667ad0c..ae60ec8cb3 100644
--- a/code/game/machinery/airlock_control.dm
+++ b/code/game/machinery/airlock_control.dm
@@ -73,6 +73,24 @@ obj/machinery/door/airlock/close(surpress_send)
if(!surpress_send) send_status()
+obj/machinery/door/airlock/Bumped(atom/AM)
+ ..(AM)
+ if(istype(AM, /obj/mecha))
+ var/obj/mecha/mecha = AM
+ if(density && radio_connection && mecha.occupant && (src.allowed(mecha.occupant) || src.check_access_list(mecha.operation_req_access)))
+ var/datum/signal/signal = new
+ signal.transmission_method = 1 //radio signal
+ signal.data["tag"] = id_tag
+ signal.data["timestamp"] = world.time
+
+ signal.data["door_status"] = density?("closed"):("open")
+ signal.data["lock_status"] = locked?("locked"):("unlocked")
+
+ signal.data["bumped_with_access"] = 1
+
+ radio_connection.post_signal(src, signal, range = AIRLOCK_CONTROL_RANGE, filter = RADIO_AIRLOCK)
+ return
+
obj/machinery/door/airlock/proc/set_frequency(new_frequency)
radio_controller.remove_object(src, frequency)
if(new_frequency)
diff --git a/code/game/machinery/bots/ed209bot.dm b/code/game/machinery/bots/ed209bot.dm
index 4fa8f095fe..f43b43ac07 100644
--- a/code/game/machinery/bots/ed209bot.dm
+++ b/code/game/machinery/bots/ed209bot.dm
@@ -820,14 +820,14 @@ Auto Patrol: []"},
projectile = /obj/item/projectile/energy/electrode
else if(lasercolor == "b")
if (src.emagged == 2)
- projectile = /obj/item/projectile/beam/omnitag
+ projectile = /obj/item/projectile/beam/lastertag/omni
else
- projectile = /obj/item/projectile/beam/bluetag
+ projectile = /obj/item/projectile/beam/lastertag/blue
else if(lasercolor == "r")
if (src.emagged == 2)
- projectile = /obj/item/projectile/beam/omnitag
+ projectile = /obj/item/projectile/beam/lastertag/omni
else
- projectile = /obj/item/projectile/beam/redtag
+ projectile = /obj/item/projectile/beam/lastertag/red
if (!( istype(U, /turf) ))
return
@@ -1011,7 +1011,7 @@ Auto Patrol: []"},
/obj/machinery/bot/ed209/bullet_act(var/obj/item/projectile/Proj)
if((src.lasercolor == "b") && (src.disabled == 0))
- if(istype(Proj, /obj/item/projectile/beam/redtag))
+ if(istype(Proj, /obj/item/projectile/beam/lastertag/red))
src.disabled = 1
del (Proj)
sleep(100)
@@ -1019,7 +1019,7 @@ Auto Patrol: []"},
else
..()
else if((src.lasercolor == "r") && (src.disabled == 0))
- if(istype(Proj, /obj/item/projectile/beam/bluetag))
+ if(istype(Proj, /obj/item/projectile/beam/lastertag/blue))
src.disabled = 1
del (Proj)
sleep(100)
diff --git a/code/game/machinery/bots/medbot.dm b/code/game/machinery/bots/medbot.dm
index f66910d361..f4f18f4553 100644
--- a/code/game/machinery/bots/medbot.dm
+++ b/code/game/machinery/bots/medbot.dm
@@ -512,13 +512,16 @@
else if(istype(src,/obj/item/weapon/storage/firstaid/adv))
A.skin = "adv"
- A.loc = user
- if (user.r_hand == S)
- user.u_equip(S)
- user.r_hand = A
+ //A.loc = user
+ if(src.loc == user)
+ if (user.r_hand == S)
+ user.u_equip(S)
+ user.equip_to_slot_if_possible(A, slot_r_hand)
+ else
+ user.u_equip(S)
+ user.equip_to_slot_if_possible(A, slot_l_hand)
else
- user.u_equip(S)
- user.l_hand = A
+ A.loc = src.loc
A.layer = 20
user << "You add the robot arm to the first aid kit"
del(S)
diff --git a/code/game/machinery/cloning.dm b/code/game/machinery/cloning.dm
index 678783887d..4370b1044f 100644
--- a/code/game/machinery/cloning.dm
+++ b/code/game/machinery/cloning.dm
@@ -133,7 +133,7 @@
return 0
- src.heal_level = rand(75,100) //Randomizes what health the clone is when ejected
+ src.heal_level = rand(0,40) //Randomizes what health the clone is when ejected
src.attempting = 1 //One at a time!!
src.locked = 1
@@ -190,7 +190,8 @@
randmutb(H) //Sometimes the clones come out wrong.
H.f_style = "Shaved"
- H.h_style = pick("Bedhead", "Bedhead 2", "Bedhead 3")
+ if(mrace == "none") //no more xenos losing ears/tentacles
+ H.h_style = pick("Bedhead", "Bedhead 2", "Bedhead 3")
if(H.dna)
H.dna.mutantrace = mrace
diff --git a/code/game/machinery/doors/firedoor.dm b/code/game/machinery/doors/firedoor.dm
index 477c42d43f..14e544dcb0 100644
--- a/code/game/machinery/doors/firedoor.dm
+++ b/code/game/machinery/doors/firedoor.dm
@@ -85,40 +85,4 @@
//border_only fire doors are special when it comes to air groups
-/obj/machinery/door/firedoor/border_only
-
- CanPass(atom/movable/mover, turf/target, height=0, air_group=0)
- if(air_group)
- var/direction = get_dir(src,target)
- return (dir != direction)
- else if(density)
- if(!height)
- var/direction = get_dir(src,target)
- return (dir != direction)
- else
- return 0
- return 1
-
-
- //skytodo
- update_nearby_tiles(need_rebuild)
- /*if(!air_master) return 0
-
- var/turf/simulated/source = loc
- var/turf/simulated/destination = get_step(source,dir)
-
- if(need_rebuild)
- if(istype(source)) //Rebuild/update nearby group geometry
- if(source.parent)
- air_master.groups_to_rebuild += source.parent
- else
- air_master.tiles_to_update += source
- if(istype(destination))
- if(destination.parent)
- air_master.groups_to_rebuild += destination.parent
- else
- air_master.tiles_to_update += destination
- else
- if(istype(source)) air_master.tiles_to_update += source
- if(istype(destination)) air_master.tiles_to_update += destination*/
- return 1
\ No newline at end of file
+/obj/machinery/door/firedoor/border_only
\ No newline at end of file
diff --git a/code/game/machinery/embedded_controller/airlock_controller.dm b/code/game/machinery/embedded_controller/airlock_controller.dm
index cd6af5b334..a997dcfdac 100644
--- a/code/game/machinery/embedded_controller/airlock_controller.dm
+++ b/code/game/machinery/embedded_controller/airlock_controller.dm
@@ -4,6 +4,7 @@
#define AIRLOCK_STATE_CLOSED 0
#define AIRLOCK_STATE_DEPRESSURIZE 1
#define AIRLOCK_STATE_OUTOPEN 2
+#define AIRLOCK_STATE_BOTHOPEN 3
datum/computer/file/embedded_program/airlock_controller
var/id_tag
@@ -11,11 +12,13 @@ datum/computer/file/embedded_program/airlock_controller
var/interior_door_tag
var/airpump_tag
var/sensor_tag
+ var/sensor_tag_int
var/sanitize_external
state = AIRLOCK_STATE_CLOSED
var/target_state = AIRLOCK_STATE_CLOSED
var/sensor_pressure = null
+ var/int_sensor_pressure = ONE_ATMOSPHERE
receive_signal(datum/signal/signal, receive_method, receive_param)
var/receive_tag = signal.data["tag"]
@@ -24,12 +27,19 @@ datum/computer/file/embedded_program/airlock_controller
if(receive_tag==sensor_tag)
if(signal.data["pressure"])
sensor_pressure = text2num(signal.data["pressure"])
+ else if(receive_tag==sensor_tag_int)
+ if(signal.data["pressure"])
+ int_sensor_pressure = text2num(signal.data["pressure"])
else if(receive_tag==exterior_door_tag)
memory["exterior_status"] = signal.data["door_status"]
+ if(signal.data["bumped_with_access"])
+ target_state = AIRLOCK_STATE_OUTOPEN
else if(receive_tag==interior_door_tag)
memory["interior_status"] = signal.data["door_status"]
+ if(signal.data["bumped_with_access"])
+ target_state = AIRLOCK_STATE_INOPEN
else if(receive_tag==airpump_tag)
if(signal.data["power"])
@@ -39,6 +49,10 @@ datum/computer/file/embedded_program/airlock_controller
else if(receive_tag==id_tag)
switch(signal.data["command"])
+ if("cycle_exterior")
+ target_state = AIRLOCK_STATE_OUTOPEN
+ if("cycle_interior")
+ target_state = AIRLOCK_STATE_INOPEN
if("cycle")
if(state < AIRLOCK_STATE_CLOSED)
target_state = AIRLOCK_STATE_OUTOPEN
@@ -59,6 +73,42 @@ datum/computer/file/embedded_program/airlock_controller
target_state = AIRLOCK_STATE_INOPEN
if("abort")
target_state = AIRLOCK_STATE_CLOSED
+ if("force_both")
+ target_state = AIRLOCK_STATE_BOTHOPEN
+ state = AIRLOCK_STATE_BOTHOPEN
+ var/datum/signal/signal = new
+ signal.data["tag"] = interior_door_tag
+ signal.data["command"] = "secure_open"
+ post_signal(signal)
+ signal = new
+ signal.data["tag"] = exterior_door_tag
+ signal.data["command"] = "secure_open"
+ post_signal(signal)
+ if("force_exterior")
+ target_state = AIRLOCK_STATE_OUTOPEN
+ state = AIRLOCK_STATE_OUTOPEN
+ var/datum/signal/signal = new
+ signal.data["tag"] = exterior_door_tag
+ signal.data["command"] = "secure_open"
+ post_signal(signal)
+ if("force_interior")
+ target_state = AIRLOCK_STATE_INOPEN
+ state = AIRLOCK_STATE_INOPEN
+ var/datum/signal/signal = new
+ signal.data["tag"] = interior_door_tag
+ signal.data["command"] = "secure_open"
+ post_signal(signal)
+ if("close")
+ target_state = AIRLOCK_STATE_CLOSED
+ state = AIRLOCK_STATE_CLOSED
+ var/datum/signal/signal = new
+ signal.data["tag"] = exterior_door_tag
+ signal.data["command"] = "secure_close"
+ post_signal(signal)
+ signal = new
+ signal.data["tag"] = interior_door_tag
+ signal.data["command"] = "secure_close"
+ post_signal(signal)
process()
var/process_again = 1
@@ -87,7 +137,7 @@ datum/computer/file/embedded_program/airlock_controller
if(AIRLOCK_STATE_PRESSURIZE)
if(target_state < state)
- if(sensor_pressure >= ONE_ATMOSPHERE*0.95)
+ if(sensor_pressure >= int_sensor_pressure*0.95)
if(memory["interior_status"] == "open")
state = AIRLOCK_STATE_INOPEN
process_again = 1
@@ -142,7 +192,7 @@ datum/computer/file/embedded_program/airlock_controller
post_signal(signal)
if(AIRLOCK_STATE_DEPRESSURIZE)
- var/target_pressure = ONE_ATMOSPHERE*0.05
+ var/target_pressure = ONE_ATMOSPHERE*0.04
if(sanitize_external)
target_pressure = ONE_ATMOSPHERE*0.01
@@ -199,6 +249,7 @@ datum/computer/file/embedded_program/airlock_controller
post_signal(signal)
memory["sensor_pressure"] = sensor_pressure
+ memory["int_sensor_pressure"] = int_sensor_pressure
memory["processing"] = state != target_state
//sensor_pressure = null //not sure if we can comment this out. Uncomment in case of problems -rastaf0
@@ -221,6 +272,7 @@ obj/machinery/embedded_controller/radio/airlock_controller
var/interior_door_tag
var/airpump_tag
var/sensor_tag
+ var/sensor_tag_int
var/sanitize_external
initialize()
@@ -233,6 +285,7 @@ obj/machinery/embedded_controller/radio/airlock_controller
new_prog.interior_door_tag = interior_door_tag
new_prog.airpump_tag = airpump_tag
new_prog.sensor_tag = sensor_tag
+ new_prog.sensor_tag_int = sensor_tag_int
new_prog.sanitize_external = sanitize_external
new_prog.master = src
@@ -253,12 +306,14 @@ obj/machinery/embedded_controller/radio/airlock_controller
var/state = 0
var/sensor_pressure = "----"
+ var/int_sensor_pressure = "----"
var/exterior_status = "----"
var/interior_status = "----"
var/pump_status = "----"
if(program)
state = program.state
sensor_pressure = program.memory["sensor_pressure"]
+ int_sensor_pressure = program.memory["int_sensor_pressure"]
exterior_status = program.memory["exterior_status"]
interior_status = program.memory["interior_status"]
pump_status = program.memory["pump_status"]
@@ -277,12 +332,20 @@ obj/machinery/embedded_controller/radio/airlock_controller
if(AIRLOCK_STATE_OUTOPEN)
state_options = {"Cycle to Interior Airlock
Close Exterior Airlock
"}
+ if(AIRLOCK_STATE_BOTHOPEN)
+ state_options = "Close Airlocks
"
var/output = {"Airlock Control Console
[state_options]
Chamber Pressure: [sensor_pressure] kPa
+Internal Pressure: [int_sensor_pressure] kPa
Exterior Door: [exterior_status]
Interior Door: [interior_status]
Control Pump: [pump_status]
"}
+ if(program && program.state == AIRLOCK_STATE_CLOSED)
+ output += {"Force Both Airlocks
+ Force Inner Airlock
+ Force Outer Airlock"}
+
return output
\ No newline at end of file
diff --git a/code/game/machinery/hydroponics.dm b/code/game/machinery/hydroponics.dm
index 16fd85b8dc..b611b974a3 100644
--- a/code/game/machinery/hydroponics.dm
+++ b/code/game/machinery/hydroponics.dm
@@ -941,8 +941,9 @@ obj/machinery/hydroponics/attackby(var/obj/item/O as obj, var/mob/user as mob)
if(se)
podman.dna.struc_enzymes = se
if(!prob(potency)) //if it fails, plantman!
- if(podman.dna)
- podman.dna.mutantrace = "plant"
+ if(podman)
+// podman.dna.mutantrace = "plant"
+ podman.mutations.Add(PLANT)
podman.update_mutantrace()
else //else, one packet of seeds. maybe two
diff --git a/code/game/machinery/portable_turret.dm b/code/game/machinery/portable_turret.dm
index 7be13d3d1e..a16b545c19 100644
--- a/code/game/machinery/portable_turret.dm
+++ b/code/game/machinery/portable_turret.dm
@@ -76,8 +76,8 @@
// All energy-based weapons are applicable
switch(E.type)
if(/obj/item/weapon/gun/energy/laser/bluetag)
- projectile = /obj/item/projectile/beam/bluetag
- eprojectile = /obj/item/projectile/beam/omnitag//This bolt will stun ERRYONE with a vest
+ projectile = /obj/item/projectile/beam/lastertag/blue
+ eprojectile = /obj/item/projectile/beam/lastertag/omni//This bolt will stun ERRYONE with a vest
iconholder = null
reqpower = 100
lasercolor = "b"
@@ -90,8 +90,8 @@
shot_delay = 30
if(/obj/item/weapon/gun/energy/laser/redtag)
- projectile = /obj/item/projectile/beam/redtag
- eprojectile = /obj/item/projectile/beam/omnitag
+ projectile = /obj/item/projectile/beam/lastertag/red
+ eprojectile = /obj/item/projectile/beam/lastertag/omni
iconholder = null
reqpower = 100
lasercolor = "r"
@@ -375,13 +375,13 @@ Status: []
"},
if (src.health <= 0)
src.die() // the death process :(
if((src.lasercolor == "b") && (src.disabled == 0))
- if(istype(Proj, /obj/item/projectile/beam/redtag))
+ if(istype(Proj, /obj/item/projectile/beam/lastertag/red))
src.disabled = 1
del (Proj)
sleep(100)
src.disabled = 0
if((src.lasercolor == "r") && (src.disabled == 0))
- if(istype(Proj, /obj/item/projectile/beam/bluetag))
+ if(istype(Proj, /obj/item/projectile/beam/lastertag/blue))
src.disabled = 1
del (Proj)
sleep(100)
diff --git a/code/game/machinery/turrets.dm b/code/game/machinery/turrets.dm
index 990b823ef1..ae5dd51891 100644
--- a/code/game/machinery/turrets.dm
+++ b/code/game/machinery/turrets.dm
@@ -221,9 +221,9 @@
if(4)
A = new /obj/item/projectile/change( loc )
if(5)
- A = new /obj/item/projectile/beam/bluetag( loc )
+ A = new /obj/item/projectile/beam/lastertag/blue( loc )
if(6)
- A = new /obj/item/projectile/beam/redtag( loc )
+ A = new /obj/item/projectile/beam/lastertag/red( loc )
A.original = target.loc
use_power(500)
else
diff --git a/code/game/mecha/mecha.dm b/code/game/mecha/mecha.dm
index 0744b5701c..23f23a8478 100644
--- a/code/game/mecha/mecha.dm
+++ b/code/game/mecha/mecha.dm
@@ -851,7 +851,7 @@
. = t_air.return_pressure()
return
-//skytodo:
+//skytodo: //No idea what you want me to do here, mate.
/obj/mecha/proc/return_temperature()
. = 0
if(use_internal_tank)
diff --git a/code/game/objects/effects/mines.dm b/code/game/objects/effects/mines.dm
index 83cbb7b39f..2897161ad4 100644
--- a/code/game/objects/effects/mines.dm
+++ b/code/game/objects/effects/mines.dm
@@ -51,9 +51,6 @@
for (var/turf/simulated/floor/target in range(1,src))
if(!target.blocks_air)
- //skytodo
- /*if(target.parent)
- target.parent.suspend_group_processing()*/
var/datum/gas_mixture/payload = new
var/datum/gas/sleeping_agent/trace_gas = new
@@ -69,9 +66,6 @@
/obj/effect/mine/proc/triggerplasma(obj)
for (var/turf/simulated/floor/target in range(1,src))
if(!target.blocks_air)
- //skytodo
- /*if(target.parent)
- target.parent.suspend_group_processing()*/
var/datum/gas_mixture/payload = new
@@ -123,4 +117,4 @@
/obj/effect/mine/stun
name = "Stun Mine"
icon_state = "uglymine"
- triggerproc = "triggerstun"
+ triggerproc = "triggerstun"
diff --git a/code/game/objects/effects/signs.dm b/code/game/objects/effects/signs.dm
index bec0ba7d64..64cbc125f1 100644
--- a/code/game/objects/effects/signs.dm
+++ b/code/game/objects/effects/signs.dm
@@ -77,6 +77,15 @@
opacity = 0
density = 0
+/obj/effect/sign/movingparts
+ desc = "A warning sign which reads 'CAUTION: MOVING PARTS, machinery liable to stop and start at random'"
+ name = "CAUTION"
+ icon = 'decals.dmi'
+ icon_state = "securearea"
+ anchored = 1.0
+ opacity = 0
+ density = 0
+
/obj/effect/sign/examroom
desc = "A guidance sign which reads 'EXAM ROOM'"
name = "EXAM"
diff --git a/code/game/objects/items.dm b/code/game/objects/items.dm
index 86bc955da0..647168dbc1 100644
--- a/code/game/objects/items.dm
+++ b/code/game/objects/items.dm
@@ -221,7 +221,7 @@
msg_admin_attack("ATTACK: [user.name] ([user.ckey]) attacked [M.name] ([M.ckey]) with [src.name] (INTENT: [uppertext(user.a_intent)]) (DAMTYE: [uppertext(src.damtype)])") //BS12 EDIT ALG
- //spawn(1800) // this wont work right
+ //spawn(1800) // this wont work right
// M.lastattacker = null
/////////////////////////
@@ -388,13 +388,6 @@
//START HUMAN
var/mob/living/carbon/human/H = M
- if(istype(src, /obj/item/clothing/under) || istype(src, /obj/item/clothing/suit))
- if(FAT in H.mutations)
- if(!(flags & ONESIZEFITSALL))
- if(!disable_warning)
- H << "\red You're too fat to wear the [name]."
- return 0
-
switch(slot)
if(slot_l_hand)
if(H.l_hand)
@@ -631,7 +624,7 @@
user << "\red You're going to need to remove that mask/helmet/glasses first."
return
- if(istype(M, /mob/living/carbon/alien) || istype(M, /mob/living/carbon/metroid))//Aliens don't have eyes./N Metroids also don't have eyes!
+ if(istype(M, /mob/living/carbon/alien) || istype(M, /mob/living/carbon/metroid))//Aliens don't have eyes./N Metroids also don't have eyes!
user << "\red You cannot locate any eyes on this creature!"
return
diff --git a/code/game/objects/items/devices/PDA/PDA.dm b/code/game/objects/items/devices/PDA/PDA.dm
index 4ac6324376..1207d01fad 100755
--- a/code/game/objects/items/devices/PDA/PDA.dm
+++ b/code/game/objects/items/devices/PDA/PDA.dm
@@ -739,12 +739,14 @@ var/global/list/obj/item/device/pda/PDAs = list()
if (prob(15)) //Give the AI a chance of intercepting the message
var/who = src.owner
+ var/sp_word = "from"
if(prob(50))
who = P:owner
+ sp_word = "to"
for(var/mob/living/silicon/ai/ai in mob_list)
// Allows other AIs to intercept the message but the AI won't intercept their own message.
if(ai.aiPDA != P && ai.aiPDA != src)
- ai.show_message("Intercepted message from [who]: [t]")
+ ai.show_message("Intercepted message [sp_word] [who]: [t]")
if (!P.silent)
playsound(P.loc, 'sound/machines/twobeep.ogg', 50, 1)
diff --git a/code/game/objects/items/devices/scanners.dm b/code/game/objects/items/devices/scanners.dm
index 359efb68e3..55b2be019e 100644
--- a/code/game/objects/items/devices/scanners.dm
+++ b/code/game/objects/items/devices/scanners.dm
@@ -1,4 +1,3 @@
-
/*
CONTAINS:
T-RAY
@@ -76,6 +75,7 @@ MASS SPECTROMETER
origin_tech = "magnets=1;biotech=1"
var/mode = 1;
+
/obj/item/device/healthanalyzer/attack(mob/living/M as mob, mob/living/user as mob)
if (( (CLUMSY in user.mutations) || user.getBrainLoss() >= 60) && prob(50))
user << text("\red You try to analyze the floor's vitals!")
@@ -89,17 +89,19 @@ MASS SPECTROMETER
if (!(istype(usr, /mob/living/carbon/human) || ticker) && ticker.mode.name != "monkey")
usr << "\red You don't have the dexterity to do this!"
return
- for(var/mob/O in viewers(M, null))
- O.show_message(text("\red [] has analyzed []'s vitals!", user, M), 1)
- //Foreach goto(67)
+ user.visible_message(" [user] has analyzed [M]'s vitals."," You have analyzed [M]'s vitals.")
var/fake_oxy = max(rand(1,40), M.getOxyLoss(), (300 - (M.getToxLoss() + M.getFireLoss() + M.getBruteLoss())))
+ var/OX = M.getOxyLoss() > 50 ? "[M.getOxyLoss()]" : M.getOxyLoss()
+ var/TX = M.getToxLoss() > 50 ? "[M.getToxLoss()]" : M.getToxLoss()
+ var/BU = M.getFireLoss() > 50 ? "[M.getFireLoss()]" : M.getFireLoss()
+ var/BR = M.getBruteLoss() > 50 ? "[M.getBruteLoss()]" : M.getBruteLoss()
if(M.status_flags & FAKEDEATH)
- user.show_message(text("\blue Analyzing Results for []:\n\t Overall Status: []", M, "dead"), 1)
- user.show_message(text("\blue \t Damage Specifics: []-[]-[]-[]", fake_oxy < 50 ? "\red [fake_oxy]" : fake_oxy , M.getToxLoss() > 50 ? "\red [M.getToxLoss()]" : M.getToxLoss(), M.getFireLoss() > 50 ? "\red[M.getFireLoss()]" : M.getFireLoss(), M.getBruteLoss() > 50 ? "\red[M.getBruteLoss()]" : M.getBruteLoss()), 1)
+ OX = fake_oxy > 50 ? "[fake_oxy]" : fake_oxy
+ user.show_message("\blue Analyzing Results for [M]:\n\t Overall Status: dead")
else
- user.show_message(text("\blue Analyzing Results for []:\n\t Overall Status: []", M, (M.stat > 1 ? "dead" : text("[]% healthy", M.health - M.halloss))), 1)
- user.show_message(text("\blue \t Damage Specifics: []-[]-[]-[]", M.getOxyLoss() > 50 ? "\red [M.getOxyLoss()]" : M.getOxyLoss(), M.getToxLoss() > 50 ? "\red [M.getToxLoss()]" : M.getToxLoss(), M.getFireLoss() > 50 ? "\red[M.getFireLoss()]" : M.getFireLoss(), M.getBruteLoss() > 50 ? "\red[M.getBruteLoss()]" : M.getBruteLoss()), 1)
- user.show_message("\blue Key: Suffocation/Toxin/Burns/Brute", 1)
+ user.show_message("\blue Analyzing Results for [M]:\n\t Overall Status: [M.stat > 1 ? "dead" : "[M.health - M.halloss]% healthy"]")
+ user.show_message("\t Key: Suffocation/Toxin/Burns/Brute", 1)
+ user.show_message("\t Damage Specifics: [OX] - [TX] - [BU] - [BR]")
user.show_message("\blue Body Temperature: [M.bodytemperature-T0C]°C ([M.bodytemperature*1.8-459.67]°F)", 1)
if(M.tod && (M.stat == DEAD || (M.status_flags & FAKEDEATH)))
user.show_message("\blue Time of Death: [M.tod]")
@@ -109,27 +111,37 @@ MASS SPECTROMETER
user.show_message("\blue Localized Damage, Brute/Burn:",1)
if(length(damaged)>0)
for(var/datum/organ/external/org in damaged)
- user.show_message(text("\blue \t []: []\blue-[][]",capitalize(org.getDisplayName()),(org.brute_dam > 0)?"\red [org.brute_dam]":0,(org.burn_dam > 0)?"\red [org.burn_dam]":0, (org.status & ORGAN_BLEEDING)?"\red (bleeding)":""),1)
+ user.show_message(text("\blue \t []: [][]\blue - []", \
+ capitalize(org.getDisplayName()), \
+ (org.brute_dam > 0) ? "\red [org.brute_dam]" :0, \
+ (org.status & ORGAN_BLEEDING)?"\red \[Bleeding\]":"\t", \
+ (org.burn_dam > 0) ? "[org.burn_dam]" :0),1)
else
user.show_message("\blue \t Limbs are OK.",1)
+ OX = M.getOxyLoss() > 50 ? "Severe oxygen deprivation detected" : "Subject bloodstream oxygen level normal"
+ TX = M.getToxLoss() > 50 ? "Dangerous amount of toxins detected" : "Subject bloodstream toxin level minimal"
+ BU = M.getFireLoss() > 50 ? "Severe burn damage detected" : "Subject burn injury status O.K"
+ BR = M.getBruteLoss() > 50 ? "Severe anatomical damage detected" : "Subject brute-force injury status O.K"
if(M.status_flags & FAKEDEATH)
- user.show_message(text("\blue [] | [] | [] | []", fake_oxy > 50 ? "\red Severe oxygen deprivation detected\blue" : "Subject bloodstream oxygen level normal", M.getToxLoss() > 50 ? "\red Dangerous amount of toxins detected\blue" : "Subject bloodstream toxin level minimal", M.getFireLoss() > 50 ? "\red Severe burn damage detected\blue" : "Subject burn injury status O.K", M.getBruteLoss() > 50 ? "\red Severe anatomical damage detected\blue" : "Subject brute-force injury status O.K"), 1)
- else
- user.show_message(text("\blue [] | [] | [] | []", M.getOxyLoss() > 50 ? "\red Severe oxygen deprivation detected\blue" : "Subject bloodstream oxygen level normal", M.getToxLoss() > 50 ? "\red Dangerous amount of toxins detected\blue" : "Subject bloodstream toxin level minimal", M.getFireLoss() > 50 ? "\red Severe burn damage detected\blue" : "Subject burn injury status O.K", M.getBruteLoss() > 50 ? "\red Severe anatomical damage detected\blue" : "Subject brute-force injury status O.K"), 1)
+ OX = fake_oxy > 50 ? "\red Severe oxygen deprivation detected\blue" : "Subject bloodstream oxygen level normal"
+ user.show_message("[OX] | [TX] | [BU] | [BR]")
+ if (istype(M, /mob/living/carbon/human))
+ if(M:virus2 || M:reagents.total_volume > 0)
+ user.show_message(text("\red Warning: Unknown substance detected in subject's blood."))
if (M.getCloneLoss())
- user.show_message(text("\red Subject appears to have been imperfectly cloned."), 1)
+ user.show_message("\red Subject appears to have been imperfectly cloned.")
for(var/datum/disease/D in M.viruses)
if(!D.hidden[SCANNER])
user.show_message(text("\red Warning: [D.form] Detected\nName: [D.name].\nType: [D.spread].\nStage: [D.stage]/[D.max_stages].\nPossible Cure: [D.cure]"))
if (M.reagents && M.reagents.get_reagent_amount("inaprovaline"))
- user.show_message(text("\blue Bloodstream Analysis located [M.reagents:get_reagent_amount("inaprovaline")] units of rejuvenation chemicals."), 1)
+ user.show_message("\blue Bloodstream Analysis located [M.reagents:get_reagent_amount("inaprovaline")] units of rejuvenation chemicals.")
if (M.getBrainLoss() >= 100 || istype(M, /mob/living/carbon/human) && M:brain_op_stage == 4.0)
- user.show_message(text("\red Subject is brain dead."), 1)
+ user.show_message("\red Subject is brain dead.")
else if (M.getBrainLoss() >= 60)
- user.show_message(text("\red Severe brain damage detected. Subject likely to have mental retardation."), 1)
+ user.show_message("\red Severe brain damage detected. Subject likely to have mental retardation.")
else if (M.getBrainLoss() >= 10)
- user.show_message(text("\red Significant brain damage detected. Subject may have had a concussion."), 1)
+ user.show_message("\red Significant brain damage detected. Subject may have had a concussion.")
if(ishuman(M))
var/mob/living/carbon/human/H = M
for(var/name in H.organs_by_name)
@@ -138,17 +150,23 @@ MASS SPECTROMETER
if(e.status & ORGAN_BROKEN)
if(((e.name == "l_arm") || (e.name == "r_arm") || (e.name == "l_leg") || (e.name == "r_leg")) && (!(e.status & ORGAN_SPLINTED)))
user << "\red Unsecured fracture in subject [limb]. Splinting recommended for transport."
+ if(e.is_infected())
+ user << "\red Infected wound detected in subject [limb]. Disinfection recommended."
+
for(var/name in H.organs_by_name)
var/datum/organ/external/e = H.organs_by_name[name]
if(e.status & ORGAN_BROKEN)
user.show_message(text("\red Bone fractures detected. Advanced scanner required for location."), 1)
break
- if(ishuman(M))
+ for(var/datum/organ/external/e in H.organs)
+ for(var/datum/wound/W in e.wounds) if(W.internal)
+ user.show_message(text("\red Internal bleeding detected. Advanced scanner required for location."), 1)
+ break
if(M:vessel)
var/blood_volume = round(M:vessel.get_reagent_amount("blood"))
var/blood_percent = blood_volume / 560
blood_percent *= 100
- if(blood_volume <= 448)
+ if(blood_volume <= 500)
user.show_message("\red Warning: Blood Level LOW: [blood_percent]% [blood_volume]cl")
else if(blood_volume <= 336)
user.show_message("\red Warning: Blood Level CRITICAL: [blood_percent]% [blood_volume]cl")
diff --git a/code/game/objects/items/devices/taperecorder.dm b/code/game/objects/items/devices/taperecorder.dm
index e98c28e7dc..555dbe1cae 100644
--- a/code/game/objects/items/devices/taperecorder.dm
+++ b/code/game/objects/items/devices/taperecorder.dm
@@ -124,8 +124,8 @@
usr << "You can't clear the memory while playing or recording!"
return
else
- storedinfo -= storedinfo
- timestamp -= timestamp
+ if(storedinfo) storedinfo.Cut()
+ if(timestamp) timestamp.Cut()
timerecorded = 0
usr << "Memory cleared."
return
diff --git a/code/game/objects/items/weapons/AI_modules.dm b/code/game/objects/items/weapons/AI_modules.dm
index d91fc2ce54..6dbe3bf606 100755
--- a/code/game/objects/items/weapons/AI_modules.dm
+++ b/code/game/objects/items/weapons/AI_modules.dm
@@ -250,7 +250,7 @@ AI MODULES
/obj/item/weapon/aiModule/freeform // Slightly more dynamic freeform module -- TLE
name = "'Freeform' AI Module"
- var/newFreeFormLaw = ""
+ var/newFreeFormLaw = "freeform"
var/lawpos = 15
desc = "A 'freeform' AI module: ''"
origin_tech = "programming=4;materials=4"
@@ -258,11 +258,11 @@ AI MODULES
/obj/item/weapon/aiModule/freeform/attack_self(var/mob/user as mob)
..()
lawpos = 0
- lawpos = input("Please enter the priority for your new law. Can only write to law sectors 15 and above.", "Law Priority (15+)", lawpos) as num
- if(lawpos < 15) return
+ while(lawpos < 15)
+ lawpos = input("Please enter the priority for your new law. Can only write to law sectors 15 and above.", "Law Priority (15+)", lawpos) as num
lawpos = min(lawpos, 50)
var/newlaw = ""
- var/targName = stripped_input(usr, "Please enter a new law for the AI.", "Freeform Law Entry", newlaw, MAX_MESSAGE_LEN)
+ var/targName = copytext(sanitize(input(usr, "Please enter a new law for the AI.", "Freeform Law Entry", newlaw)),1,MAX_MESSAGE_LEN)
newFreeFormLaw = targName
desc = "A 'freeform' AI module: ([lawpos]) '[newFreeFormLaw]'"
diff --git a/code/game/objects/items/weapons/dna_injector.dm b/code/game/objects/items/weapons/dna_injector.dm
index fcf82f250a..84bb13c3a6 100644
--- a/code/game/objects/items/weapons/dna_injector.dm
+++ b/code/game/objects/items/weapons/dna_injector.dm
@@ -23,7 +23,7 @@
/obj/item/weapon/dnainjector/proc/inject(mob/M as mob, mob/user as mob)
if(istype(M,/mob/living))
- M.radiation += rand(20,50)
+ M.radiation += rand(5,20)
if (!(NOCLONE in M.mutations)) // prevents drained people from having their DNA changed
if (dnatype == "ui")
@@ -51,6 +51,8 @@
M.dna.struc_enzymes = setblock(M.dna.struc_enzymes,block,dna,3)
domutcheck(M, null,1)
uses--
+ if(prob(5))
+ trigger_side_effect(M)
spawn(0)//this prevents the collapse of space-time continuum
user.drop_from_inventory(src)
diff --git a/code/game/objects/items/weapons/grenades/chem_grenade.dm b/code/game/objects/items/weapons/grenades/chem_grenade.dm
index f053e0f4f4..ce4e4f2ce6 100644
--- a/code/game/objects/items/weapons/grenades/chem_grenade.dm
+++ b/code/game/objects/items/weapons/grenades/chem_grenade.dm
@@ -1,269 +1,148 @@
/obj/item/weapon/grenade/chem_grenade
name = "Grenade Casing"
icon_state = "chemg"
- icon = 'chemical.dmi'
item_state = "flashbang"
+ desc = "A hand made chemical grenade."
w_class = 2.0
force = 2.0
- var/list/beakers = list()
- var/obj/item/device/assembly/attached_device
- var/exploding = 0
+ var/stage = 0
var/state = 0
var/path = 0
- var/motion = 0
- var/direct = "SOUTH"
- var/obj/item/weapon/circuitboard/circuit = null
- var/list/allowed_containers = list("/obj/item/weapon/reagent_containers/glass/beaker", "/obj/item/weapon/reagent_containers/glass/dispenser", "/obj/item/weapon/reagent_containers/glass/bottle")
+ var/obj/item/device/assembly_holder/detonator = null
+ var/list/beakers = new/list()
+ var/list/allowed_containers = list(/obj/item/weapon/reagent_containers/glass/beaker, /obj/item/weapon/reagent_containers/glass/bottle)
var/affected_area = 3
- var/mob/attacher = "Unknown"
- throw_speed = 4
- throw_range = 20
- flags = FPRINT | TABLEPASS | CONDUCT | USEDELAY
- slot_flags = SLOT_BELT
-
- attackby(var/obj/item/weapon/W, var/mob/user)
- if(path || !active)
- switch(active)
- if(0)
- if(istype(W, /obj/item/device/assembly/igniter))
- active = 1
- icon_state = initial(icon_state) +"_ass"
- name = "unsecured grenade"
- path = 1
- del(W)
- if(1)
- if(istype(W, /obj/item/weapon/reagent_containers/glass))
- if(beakers.len == 2)
- user << "\red There are already two beakers inside, remove one first!"
- return
-
- beakers |= W
- user.drop_item()
- W.loc = src
- user << "\blue You insert the beaker into the casing."
-
- else if(istype(W, /obj/item/device/assembly/signaler) || istype(W, /obj/item/device/assembly/timer) || istype(W, /obj/item/device/assembly/infra) || istype(W, /obj/item/device/assembly/prox_sensor))
- if(attached_device)
- user << "\red There is already an device attached to the controls, remove it first!"
- return
-
- attached_device = W
- user.drop_item()
- W.loc = src
- user << "\blue You attach the [W] to the grenade controls!"
- W.master = src
- bombers += "[key_name(user)] attached a [W] to a grenade casing."
- message_admins("[key_name_admin(user)] attached a [W] to a grenade casing.")
- log_game("[key_name_admin(user)] attached a [W] to a grenade casing.")
- attacher = key_name(user)
-
- else if(istype(W, /obj/item/weapon/screwdriver))
- if(beakers.len == 2 && attached_device)
- user << "\blue You lock the assembly."
- playsound(src.loc, 'Screwdriver.ogg', 25, -3)
- name = "grenade"
- icon_state = initial(icon_state) + "_locked"
- active = 2
- path = 1
- else
- user << "\red You need to add all components before locking the assembly."
- if(2)
- if(istype(W, /obj/item/weapon/screwdriver))
- user << "\blue You disarm the [src]!"
- playsound(src.loc, 'Screwdriver.ogg', 25, -3)
- name = "grenade casing"
- icon_state = initial(icon_state) +"_ass"
- active = 1
- path = 1
-
- if(path != 1)
- if(!istype(src.loc,/turf))
- user << "\red You need to put the canister on the ground to do that!"
- else
- switch(state)
- if(0)
- if(istype(W, /obj/item/weapon/wrench))
- playsound(src.loc, 'Ratchet.ogg', 50, 1)
- if(do_after(user, 20))
- user << "\blue You wrench the canister in place."
- src.name = "Camera Assembly"
- src.anchored = 1
- src.state = 1
- path = 2
- if(1)
- if(istype(W, /obj/item/weapon/wrench))
- playsound(src.loc, 'Ratchet.ogg', 50, 1)
- if(do_after(user, 20))
- user << "\blue You unfasten the canister."
- src.name = "Grenade Casing"
- src.anchored = 0
- src.state = 0
- path = 0
- if(istype(W, /obj/item/device/multitool))
- playsound(src.loc, 'Deconstruct.ogg', 50, 1)
- user << "\blue You place the electronics inside the canister."
- src.circuit = W
- user.drop_item()
- W.loc = src
- if(istype(W, /obj/item/weapon/screwdriver) && circuit)
- playsound(src.loc, 'Screwdriver.ogg', 50, 1)
- user << "\blue You screw the circuitry into place."
- src.state = 2
- if(istype(W, /obj/item/weapon/crowbar) && circuit)
- playsound(src.loc, 'Crowbar.ogg', 50, 1)
- user << "\blue You remove the circuitry."
- src.state = 1
- circuit.loc = src.loc
- src.circuit = null
- if(2)
- if(istype(W, /obj/item/weapon/screwdriver) && circuit)
- playsound(src.loc, 'Screwdriver.ogg', 50, 1)
- user << "\blue You unfasten the circuitry."
- src.state = 1
- if(istype(W, /obj/item/weapon/cable_coil))
- if(W:amount >= 1)
- playsound(src.loc, 'Deconstruct.ogg', 50, 1)
- if(do_after(user, 20))
- W:amount -= 1
- if(!W:amount) del(W)
- user << "\blue You add cabling to the canister."
- src.state = 3
- if(3)
- if(istype(W, /obj/item/weapon/wirecutters))
- playsound(src.loc, 'wirecutter.ogg', 50, 1)
- user << "\blue You remove the cabling."
- src.state = 2
- var/obj/item/weapon/cable_coil/A = new /obj/item/weapon/cable_coil( src.loc )
- A.amount = 1
- if(issignaler(W))
- playsound(src.loc, 'Deconstruct.ogg', 50, 1)
- user << "\blue You attach the wireless signaller unit to the circutry."
- user.drop_item()
- W.loc = src
- src.state = 4
- if(4)
- if(istype(W, /obj/item/weapon/crowbar) && !motion)
- playsound(src.loc, 'Crowbar.ogg', 50, 1)
- user << "\blue You remove the remote signalling device."
- src.state = 3
- var/obj/item/device/assembly/signaler/S = locate() in src
- if(S)
- S.loc = src.loc
- else
- new /obj/item/device/assembly/signaler( src.loc, 1 )
- if(isprox(W) && motion == 0)
-// if(W:amount >= 1)
- playsound(src.loc, 'Deconstruct.ogg', 50, 1)
-// W:use(1)
- user << "\blue You attach the proximity sensor."
- user.drop_item()
- W.loc = src
- motion = 1
- if(istype(W, /obj/item/weapon/crowbar) && motion)
- playsound(src.loc, 'Crowbar.ogg', 50, 1)
- user << "\blue You remove the proximity sensor."
- var/obj/item/device/assembly/prox_sensor/S = locate() in src
- if(S)
- S.loc = src.loc
- else
- new /obj/item/device/assembly/prox_sensor( src.loc, 1 )
- motion = 0
- if(istype(W, /obj/item/stack/sheet/glass))
- if(W:amount >= 1)
- playsound(src.loc, 'Deconstruct.ogg', 50, 1)
- if(do_after(user, 20))
- if(W)
- W:use(1)
- user << "\blue You put in the glass lens."
- src.state = 5
- if(5)
- if(istype(W, /obj/item/weapon/crowbar))
- playsound(src.loc, 'Crowbar.ogg', 50, 1)
- user << "\blue You remove the glass lens."
- src.state = 4
- new /obj/item/stack/sheet/glass( src.loc, 2 )
- if(istype(W, /obj/item/weapon/screwdriver))
- playsound(src.loc, 'Screwdriver.ogg', 50, 1)
- user << "\blue You connect the lense."
- var/B
- if(motion == 1)
- B = new /obj/machinery/camera/motion( src.loc )
- else
- B = new /obj/machinery/camera( src.loc )
- B:network = "SS13"
- B:network = input(usr, "Which network would you like to connect this camera to?", "Set Network", "SS13")
- direct = input(user, "Direction?", "Assembling Camera", null) in list( "NORTH", "EAST", "SOUTH", "WEST" )
- B:dir = text2dir(direct)
- del(src)
- return
+ New()
+ var/datum/reagents/R = new/datum/reagents(1000)
+ reagents = R
+ R.my_atom = src
attack_self(mob/user as mob)
- if(active == 2)
- attached_device.attack_self(user)
- return
- user.machine = src
- var/dat = {" Grenade properties:
-
Beaker one: [beakers[1]] [beakers[1] ? "Remove" : ""]
-
Beaker two: [beakers[2]] [beakers[2] ? "Remove" : ""]
-
Control attachment: [attached_device ? "[attached_device]" : "None"] [attached_device ? "Remove" : ""]"}
+ if(!stage || stage==1)
+ if(detonator)
+// detonator.loc=src.loc
+ detonator.detached()
+ usr.put_in_hands(detonator)
+ detonator=null
+ stage=0
+ icon_state = initial(icon_state)
+ else if(beakers.len)
+ for(var/obj/B in beakers)
+ if(istype(B))
+ beakers -= B
+ user.put_in_hands(B)
+ name = "unsecured grenade with [beakers.len] containers[detonator?" and detonator":""]"
+ if(stage > 1 && !active && clown_check(user))
+ user << "You prime \the [name]!"
+
+ log_attack("[user.name] ([user.ckey]) primed \a [src].")
+ log_admin("ATTACK: [user] ([user.ckey]) primed \a [src].")
+ message_admins("ATTACK: [user] ([user.ckey]) primed \a [src].")
+
+ activate()
+ add_fingerprint(user)
+ if(iscarbon(user))
+ var/mob/living/carbon/C = user
+ C.throw_mode_on()
+
+ attackby(obj/item/weapon/W as obj, mob/user as mob)
+
+ if(istype(W,/obj/item/device/assembly_holder) && (!stage || stage==1) && path != 2)
+ var/obj/item/device/assembly_holder/det = W
+ if(istype(det.a_left,det.a_right.type) || (!isigniter(det.a_left) && !isigniter(det.a_right)))
+ user << "\red Assembly must contain one igniter."
+ return
+ if(!det.secured)
+ user << "\red Assembly must be secured with screwdriver."
+ return
+ path = 1
+ user << "\blue You add [W] to the metal casing."
+ playsound(src.loc, 'sound/items/Screwdriver2.ogg', 25, -3)
+ user.remove_from_mob(det)
+ det.loc = src
+ detonator = det
+ icon_state = initial(icon_state) +"_ass"
+ name = "unsecured grenade with [beakers.len] containers[detonator?" and detonator":""]"
+ stage = 1
+ else if(istype(W,/obj/item/weapon/screwdriver) && path != 2)
+ if(stage == 1)
+ path = 1
+ if(beakers.len)
+ user << "\blue You lock the assembly."
+ name = "grenade"
+ else
+// user << "\red You need to add at least one beaker before locking the assembly."
+ user << "\blue You lock the empty assembly."
+ name = "fake grenade"
+ playsound(src.loc, 'sound/items/Screwdriver.ogg', 25, -3)
+ icon_state = initial(icon_state) +"_locked"
+ stage = 2
+ else if(stage == 2)
+ if(active && prob(95))
+ user << "\red You trigger the assembly!"
+ prime()
+ return
+ else
+ user << "\blue You unlock the assembly."
+ playsound(src.loc, 'sound/items/Screwdriver.ogg', 25, -3)
+ name = "unsecured grenade with [beakers.len] containers[detonator?" and detonator":""]"
+ icon_state = initial(icon_state) + (detonator?"_ass":"")
+ stage = 1
+ active = 0
+ else if(is_type_in_list(W, allowed_containers) && (!stage || stage==1) && path != 2)
+ path = 1
+ if(beakers.len == 2)
+ user << "\red The grenade can not hold more containers."
+ return
+ else
+ if(W.reagents.total_volume)
+ user << "\blue You add \the [W] to the assembly."
+ user.drop_item()
+ W.loc = src
+ beakers += W
+ stage = 1
+ name = "unsecured grenade with [beakers.len] containers[detonator?" and detonator":""]"
+ else
+ user << "\red \the [W] is empty."
+
+ examine()
+ set src in usr
+ usr << desc
+ if(detonator)
+ usr << "With attached [detonator.name]"
+
+ activate(mob/user as mob)
+ if(active) return
+
+ if(detonator)
+ if(!isigniter(detonator.a_left))
+ detonator.a_left.activate()
+ active = 1
+ if(!isigniter(detonator.a_right))
+ detonator.a_right.activate()
+ active = 1
+ if(active)
+ icon_state = initial(icon_state) + "_active"
+
+ if(user)
+ log_attack("[user.name] ([user.ckey]) primed \a [src]")
+ log_admin("ATTACK: [user] ([user.ckey]) primed \a [src]")
+ message_admins("ATTACK: [user] ([user.ckey]) primed \a [src]")
- user << browse(dat, "window=trans_valve;size=600x300")
- onclose(user, "trans_valve")
return
+ proc/primed(var/primed = 1)
+ if(active)
+ icon_state = initial(icon_state) + (primed?"_primed":"_active")
- Topic(href, href_list)
- ..()
- if (usr.stat || usr.restrained())
- return
- if (src.loc == usr)
- if(href_list["beakerone"])
- if(beakers.len < 1)
- return
- var/obj/b1 = beakers[1]
- b1.loc = get_turf(src)
- beakers.Remove(b1)
- if(href_list["beakertwo"])
- if(beakers.len < 2)
- return
- var/obj/b2 = beakers[2]
- b2.loc = get_turf(src)
- beakers.Remove(b2)
- if(href_list["rem_device"])
- attached_device.loc = get_turf(src)
- attached_device = null
- if(href_list["device"])
- attached_device.attack_self(usr)
- src.attack_self(usr)
- src.add_fingerprint(usr)
- return
-
- receive_signal(signal)
- if(!(active == 2))
- return //cant go off before it gets primed
- explode()
-
-
- HasProximity(atom/movable/AM as mob|obj)
- if(istype(attached_device, /obj/item/device/assembly/prox_sensor))
- var/obj/item/device/assembly/prox_sensor/D = attached_device
- if (istype(AM, /obj/effect/beam))
- return
- if (AM.move_speed < 12)
- D.sense()
-
-
- proc/explode()
- if(exploding) return
- exploding = 1
+ prime()
+ if(!stage || stage<2) return
//if(prob(reliability))
var/has_reagents = 0
for(var/obj/item/weapon/reagent_containers/glass/G in beakers)
- if(G.reagents.total_volume)
- has_reagents = 1
- break
+ if(G.reagents.total_volume) has_reagents = 1
active = 0
if(!has_reagents)
@@ -271,18 +150,11 @@
playsound(src.loc, 'sound/items/Screwdriver2.ogg', 50, 1)
return
- var/datum/reagents/R = new/datum/reagents(1000)
- reagents = R
- R.my_atom = src
-
playsound(src.loc, 'sound/effects/bamf.ogg', 50, 1)
for(var/obj/item/weapon/reagent_containers/glass/G in beakers)
G.reagents.trans_to(src, G.reagents.total_volume)
- var/obj/item/weapon/reagent_containers/glass/G = locate() in beakers
- reagents.trans_to(G, reagents.total_volume/2)
-
if(src.reagents.total_volume) //The possible reactions didnt use up all reagents.
var/datum/effect/effect/system/steam_spread/steam = new /datum/effect/effect/system/steam_spread()
steam.set_up(10, 0, get_turf(src))
@@ -293,10 +165,6 @@
if( A == src ) continue
src.reagents.reaction(A, 1, 10)
- for(var/atom/A in view(affected_area, src.loc))
- if( A == src ) continue
- G.reagents.reaction(A, 1, 10)
-
invisibility = INVISIBILITY_MAXIMUM //Why am i doing this?
spawn(50) //To make sure all reagents can work
@@ -307,19 +175,12 @@
for(var/obj/item/weapon/reagent_containers/glass/G in beakers)
G.loc = get_turf(src.loc)*/
- proc/c_state(var/i = 0)
- if(i)
- icon_state = initial(icon_state) + "_armed"
- else
- icon_state = initial(icon_state) + "_locked"
- return
-
/obj/item/weapon/grenade/chem_grenade/large
name = "Large Chem Grenade"
desc = "An oversized grenade that affects a larger area."
icon_state = "large_grenade"
- allowed_containers = list("/obj/item/weapon/reagent_containers/glass")
+ allowed_containers = list(/obj/item/weapon/reagent_containers/glass)
origin_tech = "combat=3;materials=3"
affected_area = 4
@@ -327,13 +188,10 @@
name = "Metal-Foam Grenade"
desc = "Used for emergency sealing of air breaches."
path = 1
- active = 2
+ stage = 2
New()
..()
- attached_device = new /obj/item/device/assembly/timer(src)
- attached_device.master = src
- attached_device.toggle_secure()
var/obj/item/weapon/reagent_containers/glass/beaker/B1 = new(src)
var/obj/item/weapon/reagent_containers/glass/beaker/B2 = new(src)
@@ -341,41 +199,41 @@
B2.reagents.add_reagent("foaming_agent", 10)
B2.reagents.add_reagent("pacid", 10)
- beakers.Add(B1, B2)
- icon_state = "chemg_locked"
+ detonator = new/obj/item/device/assembly_holder/timer_igniter(src)
+
+ beakers += B1
+ beakers += B2
+ icon_state = initial(icon_state) +"_locked"
/obj/item/weapon/grenade/chem_grenade/incendiary
name = "Incendiary Grenade"
desc = "Used for clearing rooms of living things."
path = 1
- active = 2
+ stage = 2
New()
..()
- attached_device = new /obj/item/device/assembly/timer(src)
- attached_device.master = src
- attached_device.toggle_secure()
var/obj/item/weapon/reagent_containers/glass/beaker/B1 = new(src)
var/obj/item/weapon/reagent_containers/glass/beaker/B2 = new(src)
B1.reagents.add_reagent("aluminum", 25)
B2.reagents.add_reagent("plasma", 25)
- B2.reagents.add_reagent("acid", 25)
+ B2.reagents.add_reagent("sacid", 25)
- beakers.Add(B1, B2)
- icon_state = "chemg_locked"
+ detonator = new/obj/item/device/assembly_holder/timer_igniter(src)
+
+ beakers += B1
+ beakers += B2
+ icon_state = initial(icon_state) +"_locked"
/obj/item/weapon/grenade/chem_grenade/cleaner
name = "Cleaner Grenade"
desc = "BLAM!-brand foaming space cleaner. In a special applicator for rapid cleaning of wide areas."
- active = 2
+ stage = 2
path = 1
New()
..()
- attached_device = new /obj/item/device/assembly/timer(src)
- attached_device.master = src
- attached_device.toggle_secure()
var/obj/item/weapon/reagent_containers/glass/beaker/B1 = new(src)
var/obj/item/weapon/reagent_containers/glass/beaker/B2 = new(src)
@@ -383,5 +241,8 @@
B2.reagents.add_reagent("water", 40)
B2.reagents.add_reagent("cleaner", 10)
- beakers.Add(B1, B2)
- icon_state = "chemg_locked"
\ No newline at end of file
+ detonator = new/obj/item/device/assembly_holder/timer_igniter(src)
+
+ beakers += B1
+ beakers += B2
+ icon_state = initial(icon_state) +"_locked"
diff --git a/code/game/objects/items/weapons/kitchen.dm b/code/game/objects/items/weapons/kitchen.dm
index b91b5a560d..2ab6bbc9ca 100644
--- a/code/game/objects/items/weapons/kitchen.dm
+++ b/code/game/objects/items/weapons/kitchen.dm
@@ -86,13 +86,12 @@
else
H.Stun(time)
if(H.stat != 2) H.stat = 1
- for(var/mob/O in viewers(H, null))
- O.show_message(text("\red [] has been knocked unconscious!", H), 1, "\red You hear someone fall.", 2)
+ user.visible_message("\red [H] has been knocked unconscious!", "\red You knock [H] unconscious!")
+ return
else
- H << text("\red [] tried to knock you unconscious!",user)
+ H.visible_message("\red [user] tried to knock [H] unconscious!", "\red [user] tried to knock you unconscious!")
H.eye_blurry += 3
-
- return
+ return ..()
/*
* Trays - Agouri
diff --git a/code/game/objects/items/weapons/manuals.dm b/code/game/objects/items/weapons/manuals.dm
index 5d67a68cac..6cba41021b 100644
--- a/code/game/objects/items/weapons/manuals.dm
+++ b/code/game/objects/items/weapons/manuals.dm
@@ -589,7 +589,7 @@
-
+