Merge pull request #1939 from CIB/master

Misc stuff
This commit is contained in:
Hawk-v3
2012-11-14 10:29:57 -08:00
11 changed files with 151 additions and 80 deletions

View File

@@ -1007,19 +1007,14 @@ proc/spread_germs_to_organ(datum/organ/external/E, mob/living/carbon/human/user)
//////////////////////////////////////////////////////////////////
// ALIEN SURGERY //
// RIBCAGE SURGERY(LUNGS AND ALIENS) //
//////////////////////////////////////////////////////////////////
/datum/surgery_step/alien
/datum/surgery_step/ribcage
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 target_zone == "chest"
return embryo && target_zone == "chest"
/datum/surgery_step/alien/saw_ribcage
/datum/surgery_step/ribcage/saw_ribcage
required_tool = /obj/item/weapon/circular_saw
min_duration = 50
@@ -1027,7 +1022,7 @@ proc/spread_germs_to_organ(datum/organ/external/E, mob/living/carbon/human/user)
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.embryo_op_stage == 0 && affected.open >= 2
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].", \
@@ -1037,21 +1032,21 @@ proc/spread_germs_to_organ(datum/organ/external/E, mob/living/carbon/human/user)
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.embryo_op_stage = 1
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/alien/retract_ribcage
/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.embryo_op_stage == 1
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]."
@@ -1063,7 +1058,7 @@ proc/spread_germs_to_organ(datum/organ/external/E, mob/living/carbon/human/user)
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.embryo_op_stage = 2
target.ribcage_op_stage = 2
// Whoops!
if(prob(10))
@@ -1077,14 +1072,64 @@ proc/spread_germs_to_organ(datum/organ/external/E, mob/living/carbon/human/user)
var/datum/organ/external/affected = target.get_organ(target_zone)
affected.fracture()
/datum/surgery_step/alien/remove_embryo
/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 = "[user] bends [target]'s ribcage back into place with \the [tool]."
var/self_msg = "You bends [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 = "[user] applied \the [tool] to [target]'s ribcage."
var/self_msg = "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)
return ..() && target.embryo_op_stage == 2
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]."
@@ -1099,52 +1144,32 @@ proc/spread_germs_to_organ(datum/organ/external/E, mob/living/carbon/human/user)
var/mob/living/carbon/alien/larva/stupid = new(target.loc)
stupid.death(0)
target.embryo_op_stage = 3
for(var/datum/disease/alien_embryo in target.viruses)
alien_embryo.cure()
/datum/surgery_step/alien/close_ribcage
required_tool = /obj/item/weapon/retractor
/datum/surgery_step/ribcage/fix_lungs
required_tool = /obj/item/weapon/scalpel
min_duration = 20
max_duration = 40
min_duration = 70
max_duration = 90
can_use(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
return target.embryo_op_stage >= 2
return ..() && target.is_lung_ruptured()
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)
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/msg = "[user] bends [target]'s ribcage back into place with \the [tool]."
var/self_msg = "You bends [target]'s ribcage back into place with \the [tool]."
user.visible_message(msg, self_msg)
var/datum/organ/external/chest/affected = target.get_organ("chest")
user.visible_message("[user] mends the rupture in [target]'s lungs with \the [tool].", \
"You mend the rupture in [target]'s lungs with \the [tool]." )
affected.ruptured_lungs = 0
target.embryo_op_stage = 1
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)
/datum/surgery_step/alien/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.embryo_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 = "[user] applied \the [tool] to [target]'s ribcage."
var/self_msg = "You applied \the [tool] to [target]'s ribcage."
user.visible_message(msg, self_msg)
target.embryo_op_stage = 0

View File

@@ -189,12 +189,11 @@
W.open_wound(0.1 * wound_update_accuracy)
owner.vessel.remove_reagent("blood",0.2 * W.damage * wound_update_accuracy)
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))
@@ -527,6 +526,7 @@
max_damage = 150
min_broken_damage = 75
body_part = UPPER_TORSO
var/ruptured_lungs = 0
/datum/organ/external/groin
name = "groin"

View File

@@ -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

View File

@@ -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,18 @@
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)
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 +121,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 +152,5 @@
else
H.equip_to_slot_or_del(new /obj/item/weapon/storage/box/survival(H.back), slot_in_backpack)
return 1
*/

View File

@@ -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)

View File

@@ -279,9 +279,12 @@
var/bled = ""
var/splint = ""
var/internal_bleeding = ""
var/lung_ruptured = ""
for(var/datum/wound/W in e.wounds) if(W.internal)
internal_bleeding = "<br>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)
@@ -295,7 +298,7 @@
if(!AN && !open && !infected & !imp)
AN = "None:"
if(!(e.status & ORGAN_DESTROYED))
dat += "<td>[e.display_name]</td><td>[e.burn_dam]</td><td>[e.brute_dam]</td><td>[bled][AN][splint][open][infected][imp][internal_bleeding]</td>"
dat += "<td>[e.display_name]</td><td>[e.burn_dam]</td><td>[e.brute_dam]</td><td>[bled][AN][splint][open][infected][imp][internal_bleeding][lung_ruptured]</td>"
else
dat += "<td>[e.display_name]</td><td>-</td><td>-</td><td>Not Found</td>"
dat += "</tr>"

View File

@@ -123,12 +123,12 @@ MASS SPECTROMETER
TX = M.getToxLoss() > 50 ? "<font color='green'><b>Dangerous amount of toxins detected</b></font>" : "Subject bloodstream toxin level minimal"
BU = M.getFireLoss() > 50 ? "<font color='#FFA500'><b>Severe burn damage detected</b></font>" : "Subject burn injury status O.K"
BR = M.getBruteLoss() > 50 ? "<font color='red'><b>Severe anatomical damage detected</b></font>" : "Subject brute-force injury status O.K"
if(M.status_flags & FAKEDEATH)
if(M.status_flags & FAKEDEATH)
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."))
user.show_message(text("\red Warning: Unknown substance detected in subject's blood."))
if (M.getCloneLoss())
user.show_message("\red Subject appears to have been imperfectly cloned.")
for(var/datum/disease/D in M.viruses)
@@ -152,7 +152,7 @@ MASS SPECTROMETER
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)
@@ -162,7 +162,7 @@ MASS SPECTROMETER
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 <b>Warning: Blood Level LOW: [blood_percent]% [blood_volume]cl")
else if(blood_volume <= 336)
user.show_message("\red <b>Warning: Blood Level CRITICAL: [blood_percent]% [blood_volume]cl")

View File

@@ -2,7 +2,7 @@
gender = MALE
var/list/stomach_contents = list()
var/brain_op_stage = 0.0
var/embryo_op_stage = 0
var/ribcage_op_stage = 0
/*
var/eye_op_stage = 0.0
var/appendix_op_stage = 0.0
@@ -19,4 +19,4 @@
var/analgesic = 0 // when this is set, the mob isn't affected by shock or pain
// life should decrease this by 1 every tick
// total amount of wounds on mob, used to spread out healing and the like over all wounds
var/number_wounds = 0
var/number_wounds = 0

View File

@@ -949,7 +949,7 @@
gloves.germ_level += n
else
germ_level += n
/mob/living/carbon/human/revive()
for (var/datum/organ/external/O in organs)
O.status &= ~ORGAN_BROKEN
@@ -970,4 +970,18 @@
del(H)
..()
..()
/mob/living/carbon/human/proc/is_lung_ruptured()
var/datum/organ/external/chest/E = get_organ("chest")
return E.ruptured_lungs
/mob/living/carbon/human/proc/rupture_lung()
var/datum/organ/external/chest/E = get_organ("chest")
if(E.ruptured_lungs == 0)
src.custom_pain("You feel a stabbing pain in your chest!", 1)
E.ruptured_lungs = 1

View File

@@ -1,8 +1,8 @@
//This file was auto-corrected by findeclaration.exe on 25.5.2012 20:42:32
//NOTE: Breathing happens once per FOUR TICKS, unless the last breath fails. In which case it happens once per ONE TICK! So oxyloss healing is done once per 4 ticks while oxyloss damage is applied once per tick!
#define HUMAN_MAX_OXYLOSS 3 //Defines how much oxyloss humans can get per tick. A tile with no air at all (such as space) applies this value, otherwise it's a percentage of it.
#define HUMAN_CRIT_MAX_OXYLOSS ( (last_tick_duration) /3) //The amount of damage you'll get when in critical condition. We want this to be a 5 minute deal = 300s. There are 100HP to get through, so (1/3)*last_tick_duration per second. Breaths however only happen every 4 ticks.
#define HUMAN_MAX_OXYLOSS 1 //Defines how much oxyloss humans can get per tick. A tile with no air at all (such as space) applies this value, otherwise it's a percentage of it.
#define HUMAN_CRIT_MAX_OXYLOSS ( (last_tick_duration) /5) //The amount of damage you'll get when in critical condition. We want this to be a 5 minute deal = 300s. There are 100HP to get through, so (1/3)*last_tick_duration per second. Breaths however only happen every 4 ticks.
#define HEAT_DAMAGE_LEVEL_1 2 //Amount of damage applied when your body temperature just passes the 360.15k safety point
#define HEAT_DAMAGE_LEVEL_2 4 //Amount of damage applied when your body temperature passes the 400K point
@@ -488,16 +488,22 @@
proc/breathe()
if(reagents.has_reagent("lexorin")) return
if(istype(loc, /obj/machinery/atmospherics/unary/cryo_cell)) return
var/lung_ruptured = is_lung_ruptured()
if(lung_ruptured && prob(2))
spawn emote("me", 1, "coughs up blood!")
src.drip(10)
var/datum/gas_mixture/environment = loc.return_air()
var/datum/gas_mixture/breath
// HACK NEED CHANGING LATER
if(health < 0)
losebreath++
if(lung_ruptured && prob(4))
spawn emote("me", 1, "gasps for air!")
losebreath += 5
if(losebreath>0) //Suffocating so do not take a breath
losebreath--
if (prob(10)) //Gasp per 10 ticks? Sounds about right.
@@ -700,6 +706,9 @@
apply_damage(HEAT_GAS_DAMAGE_LEVEL_3, BURN, "head")
fire_alert = max(fire_alert, 2)
if(oxyloss >= 50 && prob(oxyloss / 5))
rupture_lung()
//Temporary fixes to the alerts.
return 1