Merge branch 'bleeding-edge-freeze' of https://github.com/Baystation12/Baystation12 into bleeding-edge-freeze

This commit is contained in:
MisterBook
2013-06-04 22:42:45 -05:00
46 changed files with 1647 additions and 1264 deletions
@@ -1,33 +1,16 @@
/mob
var/bloody_hands = 0
var/mob/living/carbon/human/bloody_hands_mob
var/track_blood
var/mob/living/carbon/human/track_blood_mob
var/track_blood = 0
var/list/feet_blood_DNA
var/track_blood_type
/obj/item/clothing/gloves
var/transfer_blood = 0
var/mob/living/carbon/human/bloody_hands_mob
proc/blood_incompatible(donor,receiver)
if(!donor || !receiver) return 0
var
donor_antigen = copytext(donor,1,lentext(donor))
receiver_antigen = copytext(receiver,1,lentext(receiver))
donor_rh = (findtext(donor,"+")>0)
receiver_rh = (findtext(receiver,"+")>0)
if(donor_rh && !receiver_rh) return 1
switch(receiver_antigen)
if("A")
if(donor_antigen != "A" && donor_antigen != "O") return 1
if("B")
if(donor_antigen != "B" && donor_antigen != "O") return 1
if("O")
if(donor_antigen != "O") return 1
//AB is a universal receiver.
return 0
/obj/item/clothing/shoes/
var/track_blood = 0
/obj/item/weapon/reagent_containers/glass/rag
name = "damp rag"
+18 -1
View File
@@ -1084,4 +1084,21 @@
if (germs == 2500)
world << "Reached stage 3 in [ticks] ticks"
world << "Mob took [tdamage] tox damage"
*/
*/
//returns 1 if made bloody, returns 0 otherwise
/mob/living/carbon/human/add_blood(mob/living/carbon/human/M as mob)
if (!..())
return 0
//if this blood isn't already in the list, add it
if(blood_DNA[M.dna.unique_enzymes])
return 0 //already bloodied with this blood. Cannot add more.
blood_DNA[M.dna.unique_enzymes] = M.dna.b_type
src.update_inv_gloves() //handles bloody hands overlays and updating
return 1 //we applied blood to the item
/mob/living/carbon/human/clean_blood()
.=..()
if(istype(feet_blood_DNA, /list) && feet_blood_DNA.len)
del(feet_blood_DNA)
return 1
@@ -88,7 +88,6 @@
if (getCloneLoss() < 1)
for (var/datum/organ/external/O in organs)
world << "[O.display_name]!"
if (O.status & ORGAN_MUTATED)
O.unmutate()
src << "<span class = 'notice'>Your [O.display_name] is shaped normally again.</span>"
@@ -145,6 +145,8 @@ emp_act
if(!I || !user) return 0
var/target_zone = get_zone_with_miss_chance(user.zone_sel.selecting, src)
if(user == src) // Attacking yourself can't miss
target_zone = user.zone_sel.selecting
if(!target_zone)
visible_message("\red <B>[user] misses [src] with \the [I]!")
return
-2
View File
@@ -8,8 +8,6 @@
//Round specific stuff like hud updates
if(ticker && ticker.mode)
switch(ticker.mode.name)
if("sandbox")
CanBuild()
if("revolution")
if((mind in ticker.mode.revolutionaries) || (src.mind in ticker.mode:head_revolutionaries))
ticker.mode.update_rev_icons_added(src.mind)
@@ -198,6 +198,15 @@
m_type = 2
else
src << "You are not THE LAW, pal."
if("halt")
if (istype(module,/obj/item/weapon/robot_module/security))
message = "<B>[src]</B>'s speakers skreech, \"Halt! Security!\"."
playsound(src.loc, 'sound/voice/halt.ogg', 50, 0)
m_type = 2
else
src << "You are not security."
else
src << text("Invalid Emote: []", act)
if ((message && src.stat == 0))
+19 -1
View File
@@ -218,4 +218,22 @@ var/const/BLOOD_VOLUME_SURVIVE = 122
for(var/datum/reagent/blood/D in container.reagent_list)
if(D.data["donor"] == src)
return D
return res
return res
proc/blood_incompatible(donor,receiver)
if(!donor || !receiver) return 0
var
donor_antigen = copytext(donor,1,lentext(donor))
receiver_antigen = copytext(receiver,1,lentext(receiver))
donor_rh = (findtext(donor,"+")>0)
receiver_rh = (findtext(receiver,"+")>0)
if(donor_rh && !receiver_rh) return 1
switch(receiver_antigen)
if("A")
if(donor_antigen != "A" && donor_antigen != "O") return 1
if("B")
if(donor_antigen != "B" && donor_antigen != "O") return 1
if("O")
if(donor_antigen != "O") return 1
//AB is a universal receiver.
return 0
+7
View File
@@ -83,6 +83,13 @@
if(E.status & ORGAN_BROKEN && !(E.status & ORGAN_SPLINTED && prob(10)) )
broken = 1
//Moving around with fractured ribs won't do you any good
if (broken && internal_organs && prob(15))
if (!lying && world.timeofday - l_move_time < 15)
var/datum/organ/internal/I = pick(E.internal_organs)
custom_pain("You feel broken bones moving in your [E.display_name]!", 1)
I.take_damage(rand(3,5))
//Special effects for limbs.
if(E.name in list("l_hand","l_arm","r_hand","r_arm"))
var/obj/item/c_hand //Getting what's in this hand
+19 -11
View File
@@ -42,7 +42,7 @@
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)
var/wound_update_accuracy = 1
/datum/organ/external/New(var/datum/organ/external/P)
if(P)
@@ -305,7 +305,7 @@
parent.germ_level += round(GERM_TRANSFER_AMOUNT)
*/
//Updating wounds. Handles wound natural healing, internal bleedings and infections
//Updating wounds. Handles wound natural I had some free spachealing, internal bleedings and infections
/datum/organ/external/proc/update_wounds()
for(var/datum/wound/W in wounds)
// wounds can disappear after 10 minutes at the earliest
@@ -320,21 +320,29 @@
if(prob(1 * wound_update_accuracy))
owner.custom_pain("You feel a stabbing pain in your [display_name]!",1)
if(W.bandaged || W.salved)
// slow healing
var/amount = 0.2
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))
// slow healing
var/heal_amt = 0.2
if (W.damage > 20) //this thing's edges are not in day's travel of each other, what healing?
heal_amt = 0
if(W.is_treated())
heal_amt += 0.3
//we only update wounds once in [wound_update_accuracy] ticks so have to emulate realtime
heal_amt = heal_amt * wound_update_accuracy
//configurable regen speed woo, no-regen hardcore or instaheal hugbox, choose your destiny
heal_amt = heal_amt * config.organ_regeneration_multiplier
// amount of healing is spread over all the wounds
heal_amt = heal_amt / (wounds.len + 1)
// making it look prettier on scanners
heal_amt = round(heal_amt,0.1)
W.heal_damage(heal_amt)
// Salving also helps against infection
if(W.germ_level > 0 && W.salved && prob(2))
W.germ_level = 0
W.disinfected = 1
// sync the organ's damage with its wounds
src.update_damages()
+6
View File
@@ -143,6 +143,12 @@
else
user.update_inv_r_hand()
/obj/item/weapon/gun/proc/can_fire()
return load_into_chamber()
/obj/item/weapon/gun/proc/can_hit(var/mob/living/target as mob, var/mob/living/user as mob)
return in_chamber.check_fire(target,user)
/obj/item/weapon/gun/proc/click_empty(mob/user = null)
if (user)
user.visible_message("*click click*", "\red <b>*click*</b>")
+11 -3
View File
@@ -25,6 +25,13 @@
user.client.remove_gun_icons()
return ..()
/obj/item/weapon/gun/equipped(var/mob/user, var/slot)
if (slot != slot_l_hand && slot != slot_r_hand)
stop_aim()
if (user.client)
user.client.remove_gun_icons()
return ..()
//Removes lock fro mall targets
/obj/item/weapon/gun/proc/stop_aim()
if(target)
@@ -69,9 +76,10 @@
if(!istype(M)) return
if(src != M.equipped())
stop_aim()
return
M.last_move_intent = world.time
if(load_into_chamber())
var/firing_check = in_chamber.check_fire(T,usr) //0 if it cannot hit them, 1 if it is capable of hitting, and 2 if a special check is preventing it from firing.
if(can_fire())
var/firing_check = can_hit(T,usr) //0 if it cannot hit them, 1 if it is capable of hitting, and 2 if a special check is preventing it from firing.
if(firing_check > 0)
if(firing_check == 1)
Fire(T,usr, reflex = 1)
@@ -155,7 +163,7 @@ mob/living/proc/Targeted(var/obj/item/weapon/gun/I) //Self explanitory.
targeted_by += I
I.lock_time = world.time + 20 //Target has 2 second to realize they're targeted and stop (or target the opponent).
src << "((\red <b>Your character is being targeted. They have 2 seconds to stop any click or move actions.</b> \black While targeted, they may \
drag and drop items in or into the map, speak, and click on interface buttons. Clicking on the map, their items \
drag and drop items in or into the map, speak, and click on interface buttons. Clicking on the map objects (floors and walls are fine), their items \
(other than a weapon to de-target), or moving will result in being fired upon. \red The aggressor may also fire manually, \
so try not to get on their bad side.\black ))"
@@ -43,8 +43,23 @@
usr << "\blue [R.volume] units of [R.name]"
else
usr << "\blue Nothing."
if (!is_open_container())
usr << "\blue Airtight lid seals it completely."
attack_self()
..()
if (is_open_container())
usr << "<span class = 'notice'>You put the lid on \the [src]."
flags ^= OPENCONTAINER
else
usr << "<span class = 'notice'>You take the lid off \the [src]."
flags |= OPENCONTAINER
update_icon()
afterattack(obj/target, mob/user , flag)
if (!is_open_container())
return
for(var/type in src.can_be_placed_into)
if(istype(target, type))
return
@@ -149,6 +164,10 @@
filling.icon += mix_color_from_reagents(reagents.reagent_list)
overlays += filling
if (!is_open_container())
var/image/lid = image(icon, src, "lid_[initial(icon_state)]")
overlays += lid
/obj/item/weapon/reagent_containers/glass/beaker/large
name = "large beaker"
desc = "A large beaker. Can hold up to 100 units."
@@ -17,6 +17,13 @@
if(!icon_state)
icon_state = "bottle[rand(1,20)]"
update_icon()
overlays.Cut()
if (!is_open_container())
var/image/lid = image(icon, src, "lid_bottle")
overlays += lid
/obj/item/weapon/reagent_containers/glass/bottle/inaprovaline
name = "inaprovaline bottle"
desc = "A small bottle. Contains inaprovaline - used to stabilize patients."
+82 -75
View File
@@ -15,93 +15,100 @@
var/max_syringes = 1
m_amt = 2000
examine()
set src in view()
..()
if (!(usr in view(2)) && usr!=src.loc) return
usr << "\blue [syringes.len] / [max_syringes] syringes."
/obj/item/weapon/gun/syringe/examine()
set src in view()
..()
if (!(usr in view(2)) && usr!=src.loc) return
usr << "\blue [syringes.len] / [max_syringes] syringes."
attackby(obj/item/I as obj, mob/user as mob)
if(istype(I, /obj/item/weapon/reagent_containers/syringe))
var/obj/item/weapon/reagent_containers/syringe/S = I
if(S.mode != 2)//SYRINGE_BROKEN in syringes.dm
if(syringes.len < max_syringes)
user.drop_item()
I.loc = src
syringes += I
user << "\blue You put the syringe in [src]."
user << "\blue [syringes.len] / [max_syringes] syringes."
else
usr << "\red [src] cannot hold more syringes."
/obj/item/weapon/gun/syringe/attackby(obj/item/I as obj, mob/user as mob)
if(istype(I, /obj/item/weapon/reagent_containers/syringe))
var/obj/item/weapon/reagent_containers/syringe/S = I
if(S.mode != 2)//SYRINGE_BROKEN in syringes.dm
if(syringes.len < max_syringes)
user.drop_item()
I.loc = src
syringes += I
user << "\blue You put the syringe in [src]."
user << "\blue [syringes.len] / [max_syringes] syringes."
else
usr << "\red This syringe is broken!"
afterattack(obj/target, mob/user , flag)
if(!isturf(target.loc) || target == user) return
if(syringes.len)
spawn(0) fire_syringe(target,user)
usr << "\red [src] cannot hold more syringes."
else
usr << "\red [src] is empty."
usr << "\red This syringe is broken!"
proc
fire_syringe(atom/target, mob/user)
if (locate (/obj/structure/table, src.loc))
return
else
var/turf/trg = get_turf(target)
var/obj/effect/syringe_gun_dummy/D = new/obj/effect/syringe_gun_dummy(get_turf(src))
var/obj/item/weapon/reagent_containers/syringe/S = syringes[1]
if((!S) || (!S.reagents)) //ho boy! wot runtimes!
return
S.reagents.trans_to(D, S.reagents.total_volume)
syringes -= S
del(S)
D.icon_state = "syringeproj"
D.name = "syringe"
playsound(user.loc, 'sound/items/syringeproj.ogg', 50, 1)
for(var/i=0, i<6, i++)
if(!D) break
if(D.loc == trg) break
step_towards(D,trg)
/obj/item/weapon/gun/syringe/afterattack(obj/target, mob/user , flag)
if(!isturf(target.loc) || target == user) return
..()
if(D)
for(var/mob/living/carbon/M in D.loc)
if(!istype(M,/mob/living/carbon)) continue
if(M == user) continue
//Syringe gun attack logging by Yvarov
var/R
if(D.reagents)
for(var/datum/reagent/A in D.reagents.reagent_list)
R += A.id + " ("
R += num2text(A.volume) + "),"
if (istype(M, /mob))
M.attack_log += "\[[time_stamp()]\] <b>[user]/[user.ckey]</b> shot <b>[M]/[M.ckey]</b> with a <b>syringegun</b> ([R])"
user.attack_log += "\[[time_stamp()]\] <b>[user]/[user.ckey]</b> shot <b>[M]/[M.ckey]</b> with a <b>syringegun</b> ([R])"
log_attack("<font color='red'>[user] ([user.ckey]) shot [M] ([M.ckey]) with a syringegun ([R])</font>")
/obj/item/weapon/gun/syringe/can_fire()
return syringes.len
else
M.attack_log += "\[[time_stamp()]\] <b>UNKNOWN SUBJECT (No longer exists)</b> shot <b>[M]/[M.ckey]</b> with a <b>syringegun</b> ([R])"
log_attack("<font color='red'>UNKNOWN shot [M] ([M.ckey]) with a <b>syringegun</b> ([R])</font>")
/obj/item/weapon/gun/syringe/can_hit(var/mob/living/target as mob, var/mob/living/user as mob)
return 1 //SHOOT AND LET THE GOD GUIDE IT (probably will hit a wall anyway)
if(D.reagents)
D.reagents.trans_to(M, 15)
M.visible_message("<span class='danger'>[M] is hit by the syringe!</span>")
/obj/item/weapon/gun/syringe/Fire(atom/target as mob|obj|turf|area, mob/living/user as mob|obj, params, reflex = 0)
if(syringes.len)
spawn(0) fire_syringe(target,user)
else
usr << "\red [src] is empty."
del(D)
break
if(D)
for(var/atom/A in D.loc)
if(A == user) continue
if(A.density) del(D)
/obj/item/weapon/gun/syringe/proc/fire_syringe(atom/target, mob/user)
if (locate (/obj/structure/table, src.loc))
return
else
var/turf/trg = get_turf(target)
var/obj/effect/syringe_gun_dummy/D = new/obj/effect/syringe_gun_dummy(get_turf(src))
var/obj/item/weapon/reagent_containers/syringe/S = syringes[1]
if((!S) || (!S.reagents)) //ho boy! wot runtimes!
return
S.reagents.trans_to(D, S.reagents.total_volume)
syringes -= S
del(S)
D.icon_state = "syringeproj"
D.name = "syringe"
playsound(user.loc, 'sound/items/syringeproj.ogg', 50, 1)
sleep(1)
for(var/i=0, i<6, i++)
if(!D) break
if(D.loc == trg) break
step_towards(D,trg)
if (D) spawn(10) del(D)
if(D)
for(var/mob/living/carbon/M in D.loc)
if(!istype(M,/mob/living/carbon)) continue
if(M == user) continue
//Syringe gun attack logging by Yvarov
var/R
if(D.reagents)
for(var/datum/reagent/A in D.reagents.reagent_list)
R += A.id + " ("
R += num2text(A.volume) + "),"
if (istype(M, /mob))
M.attack_log += "\[[time_stamp()]\] <b>[user]/[user.ckey]</b> shot <b>[M]/[M.ckey]</b> with a <b>syringegun</b> ([R])"
user.attack_log += "\[[time_stamp()]\] <b>[user]/[user.ckey]</b> shot <b>[M]/[M.ckey]</b> with a <b>syringegun</b> ([R])"
log_attack("<font color='red'>[user] ([user.ckey]) shot [M] ([M.ckey]) with a syringegun ([R])</font>")
return
else
M.attack_log += "\[[time_stamp()]\] <b>UNKNOWN SUBJECT (No longer exists)</b> shot <b>[M]/[M.ckey]</b> with a <b>syringegun</b> ([R])"
log_attack("<font color='red'>UNKNOWN shot [M] ([M.ckey]) with a <b>syringegun</b> ([R])</font>")
if(D.reagents)
D.reagents.trans_to(M, 15)
M.visible_message("<span class='danger'>[M] is hit by the syringe!</span>")
del(D)
break
if(D)
for(var/atom/A in D.loc)
if(A == user) continue
if(A.density) del(D)
sleep(1)
if (D) spawn(10) del(D)
return
/obj/item/weapon/gun/syringe/rapidsyringe
name = "rapid syringe gun"
-10
View File
@@ -1328,13 +1328,3 @@
dirs = alldirs.Copy()
src.streak(dirs)
/obj/effect/decal/cleanable/blood/drip
name = "drips of blood"
desc = "It's red."
gender = PLURAL
density = 0
anchored = 1
layer = 2
icon = 'drip.dmi'
icon_state = "1"
+10 -4
View File
@@ -18,8 +18,11 @@
return 1
/datum/surgery_step/appendectomy/cut_appendix
required_tool = /obj/item/weapon/scalpel
allowed_tools = list(/obj/item/weapon/shard, /obj/item/weapon/kitchenknife)
allowed_tools = list(
/obj/item/weapon/scalpel = 100, \
/obj/item/weapon/kitchenknife = 75, \
/obj/item/weapon/shard = 50, \
)
min_duration = 70
max_duration = 90
@@ -45,8 +48,11 @@
groin.createwound(CUT, 50, 1)
/datum/surgery_step/appendectomy/remove_appendix
required_tool = /obj/item/weapon/hemostat
allowed_tools = list(/obj/item/weapon/wirecutters)
allowed_tools = list(
/obj/item/weapon/hemostat = 100, \
/obj/item/weapon/wirecutters = 75, \
/obj/item/weapon/kitchen/utensil/fork = 20
)
min_duration = 60
max_duration = 80
+16 -9
View File
@@ -4,9 +4,10 @@
//////////////////////////////////////////////////////////////////
/datum/surgery_step/glue_bone
priority = 2
required_tool = /obj/item/weapon/bonegel
allowed_tools = list(/obj/item/weapon/screwdriver)
allowed_tools = list(
/obj/item/weapon/bonegel = 100, \
/obj/item/weapon/screwdriver = 75
)
can_infect = 1
blood_level = 1
@@ -37,8 +38,10 @@
"\red Your hand slips, smearing [tool] in the incision in [target]'s [affected.display_name]!")
/datum/surgery_step/set_bone
required_tool = /obj/item/weapon/bonesetter
allowed_tools = list(/obj/item/weapon/wrench)
allowed_tools = list(
/obj/item/weapon/bonesetter = 100, \
/obj/item/weapon/wrench = 75 \
)
min_duration = 60
max_duration = 70
@@ -72,8 +75,10 @@
affected.createwound(BRUISE, 5)
/datum/surgery_step/mend_skull
required_tool = /obj/item/weapon/bonesetter
allowed_tools = list(/obj/item/weapon/wrench)
allowed_tools = list(
/obj/item/weapon/bonesetter = 100, \
/obj/item/weapon/wrench = 75 \
)
min_duration = 60
max_duration = 70
@@ -102,8 +107,10 @@
h.disfigured = 1
/datum/surgery_step/finish_bone
required_tool = /obj/item/weapon/bonegel
allowed_tools = list(/obj/item/weapon/screwdriver)
allowed_tools = list(
/obj/item/weapon/bonegel = 100, \
/obj/item/weapon/screwdriver = 75
)
can_infect = 1
blood_level = 1
+37 -14
View File
@@ -10,7 +10,10 @@
return target_zone == "head" && hasorgans(target)
/datum/surgery_step/brain/saw_skull
required_tool = /obj/item/weapon/circular_saw
allowed_tools = list(
/obj/item/weapon/circular_saw = 100, \
/obj/item/weapon/hatchet = 75
)
min_duration = 50
max_duration = 70
@@ -31,11 +34,14 @@
fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
user.visible_message("\red [user]'s hand slips, cracking [target]'s skull with \the [tool]!" , \
"\red Your hand slips, cracking [target]'s skull with \the [tool]!" )
target.apply_damage(10, BRUTE, "head")
target.apply_damage(max(10, tool.force), BRUTE, "head")
/datum/surgery_step/brain/cut_brain
required_tool = /obj/item/weapon/scalpel
allowed_tools = list(/obj/item/weapon/shard, /obj/item/weapon/kitchenknife)
allowed_tools = list(
/obj/item/weapon/scalpel = 100, \
/obj/item/weapon/kitchenknife = 75, \
/obj/item/weapon/shard = 50, \
)
min_duration = 80
max_duration = 100
@@ -59,7 +65,10 @@
target.apply_damage(50, BRUTE, "head", 1)
/datum/surgery_step/brain/saw_spine
required_tool = /obj/item/weapon/circular_saw
allowed_tools = list(
/obj/item/weapon/circular_saw = 100, \
/obj/item/weapon/hatchet = 75
)
min_duration = 50
max_duration = 70
@@ -103,8 +112,11 @@
//////////////////////////////////////////////////////////////////
/datum/surgery_step/brain/bone_chips
required_tool = /obj/item/weapon/hemostat
allowed_tools = list(/obj/item/weapon/wirecutters, /obj/item/weapon/kitchen/utensil/fork)
allowed_tools = list(
/obj/item/weapon/hemostat = 100, \
/obj/item/weapon/wirecutters = 75, \
/obj/item/weapon/kitchen/utensil/fork = 20
)
min_duration = 80
max_duration = 100
@@ -129,8 +141,10 @@
target.apply_damage(30, BRUTE, "head", 1)
/datum/surgery_step/brain/hematoma
required_tool = /obj/item/weapon/FixOVein
allowed_tools = list(/obj/item/weapon/cable_coil)
allowed_tools = list(
/obj/item/weapon/FixOVein , \
/obj/item/weapon/cable_coil
)
min_duration = 90
max_duration = 110
@@ -165,8 +179,11 @@
return istype(target, /mob/living/carbon/slime/) && target.stat == 2
/datum/surgery_step/slime/cut_flesh
required_tool = /obj/item/weapon/scalpel
allowed_tools = list(/obj/item/weapon/shard, /obj/item/weapon/kitchenknife)
allowed_tools = list(
/obj/item/weapon/scalpel = 100, \
/obj/item/weapon/kitchenknife = 75, \
/obj/item/weapon/shard = 50, \
)
min_duration = 30
max_duration = 50
@@ -188,8 +205,11 @@
"\red Your hand slips, tearing [target]'s flesh with \the [tool]!")
/datum/surgery_step/slime/cut_innards
required_tool = /obj/item/weapon/scalpel
allowed_tools = list(/obj/item/weapon/shard, /obj/item/weapon/kitchenknife)
allowed_tools = list(
/obj/item/weapon/scalpel = 100, \
/obj/item/weapon/kitchenknife = 75, \
/obj/item/weapon/shard = 50, \
)
min_duration = 30
max_duration = 50
@@ -211,7 +231,10 @@
"\red Your hand slips, tearing [target]'s innards with \the [tool]!")
/datum/surgery_step/slime/saw_core
required_tool = /obj/item/weapon/circular_saw
allowed_tools = list(
/obj/item/weapon/circular_saw = 100, \
/obj/item/weapon/hatchet = 75
)
min_duration = 50
max_duration = 70
+20 -8
View File
@@ -15,8 +15,11 @@
return target_zone == "eyes"
/datum/surgery_step/eye/cut_open
required_tool = /obj/item/weapon/scalpel
allowed_tools = list(/obj/item/weapon/shard, /obj/item/weapon/kitchenknife)
allowed_tools = list(
/obj/item/weapon/scalpel = 100, \
/obj/item/weapon/kitchenknife = 75, \
/obj/item/weapon/shard = 50, \
)
min_duration = 90
max_duration = 110
@@ -41,8 +44,10 @@
affected.createwound(CUT, 10)
/datum/surgery_step/eye/lift_eyes
required_tool = /obj/item/weapon/retractor
allowed_tools = list(/obj/item/weapon/kitchen/utensil/fork)
allowed_tools = list(
/obj/item/weapon/retractor = 100, \
/obj/item/weapon/kitchen/utensil/fork = 50
)
min_duration = 30
max_duration = 40
@@ -67,8 +72,11 @@
target.apply_damage(10, BRUTE, affected)
/datum/surgery_step/eye/mend_eyes
required_tool = /obj/item/weapon/hemostat
allowed_tools = list(/obj/item/weapon/cable_coil, /obj/item/device/assembly/mousetrap)
allowed_tools = list(
/obj/item/weapon/hemostat = 100, \
/obj/item/weapon/cable_coil = 75, \
/obj/item/device/assembly/mousetrap = 10 //I don't know. Don't ask me. But I'm leaving it because hilarity.
)
min_duration = 80
max_duration = 100
@@ -93,8 +101,12 @@
target.apply_damage(10, BRUTE, affected)
/datum/surgery_step/eye/cauterize
required_tool = /obj/item/weapon/cautery
allowed_tools = list(/obj/item/weapon/weldingtool, /obj/item/clothing/mask/cigarette, /obj/item/weapon/lighter)
allowed_tools = list(
/obj/item/weapon/cautery = 100, \
/obj/item/clothing/mask/cigarette = 75, \
/obj/item/weapon/lighter = 50, \
/obj/item/weapon/weldingtool = 25
)
min_duration = 70
max_duration = 100
+20 -8
View File
@@ -15,8 +15,11 @@
return target_zone == "mouth"
/datum/surgery_step/generic/cut_face
required_tool = /obj/item/weapon/scalpel
allowed_tools = list(/obj/item/weapon/shard, /obj/item/weapon/kitchenknife)
allowed_tools = list(
/obj/item/weapon/scalpel = 100, \
/obj/item/weapon/kitchenknife = 75, \
/obj/item/weapon/shard = 50, \
)
min_duration = 90
max_duration = 110
@@ -42,8 +45,11 @@
target.losebreath += 10
/datum/surgery_step/face/mend_vocal
required_tool = /obj/item/weapon/hemostat
allowed_tools = list(/obj/item/weapon/cable_coil, /obj/item/device/assembly/mousetrap)
allowed_tools = list(
/obj/item/weapon/hemostat = 100, \
/obj/item/weapon/cable_coil = 75, \
/obj/item/device/assembly/mousetrap = 10 //I don't know. Don't ask me. But I'm leaving it because hilarity.
)
min_duration = 70
max_duration = 90
@@ -67,8 +73,10 @@
target.losebreath += 10
/datum/surgery_step/face/fix_face
required_tool = /obj/item/weapon/retractor
allowed_tools = list(/obj/item/weapon/kitchen/utensil/fork)
allowed_tools = list(
/obj/item/weapon/retractor = 100, \
/obj/item/weapon/crowbar = 55, \
/obj/item/weapon/kitchen/utensil/fork = 75)
min_duration = 80
max_duration = 100
@@ -93,8 +101,12 @@
target.apply_damage(10, BRUTE, affected)
/datum/surgery_step/face/cauterize
required_tool = /obj/item/weapon/cautery
allowed_tools = list(/obj/item/weapon/weldingtool, /obj/item/clothing/mask/cigarette, /obj/item/weapon/lighter)
allowed_tools = list(
/obj/item/weapon/cautery = 100, \
/obj/item/clothing/mask/cigarette = 75, \
/obj/item/weapon/lighter = 50, \
/obj/item/weapon/weldingtool = 25
)
min_duration = 70
max_duration = 100
+26 -9
View File
@@ -20,8 +20,11 @@
return 1
/datum/surgery_step/generic/cut_open
required_tool = /obj/item/weapon/scalpel
allowed_tools = list(/obj/item/weapon/shard, /obj/item/weapon/kitchenknife)
allowed_tools = list(
/obj/item/weapon/scalpel = 100, \
/obj/item/weapon/kitchenknife = 75, \
/obj/item/weapon/shard = 50, \
)
min_duration = 90
max_duration = 110
@@ -42,6 +45,7 @@
user.visible_message("\blue [user] has made an incision on [target]'s [affected.display_name] with \the [tool].", \
"\blue You have made an incision on [target]'s [affected.display_name] with \the [tool].",)
affected.open = 1
affected.status |= ORGAN_BLEEDING
affected.createwound(CUT, 1)
if (target_zone == "head")
target.brain_op_stage = 1
@@ -53,8 +57,11 @@
affected.createwound(CUT, 10)
/datum/surgery_step/generic/clamp_bleeders
required_tool = /obj/item/weapon/hemostat
allowed_tools = list(/obj/item/weapon/cable_coil, /obj/item/device/assembly/mousetrap)
allowed_tools = list(
/obj/item/weapon/hemostat = 100, \
/obj/item/weapon/cable_coil = 75, \
/obj/item/device/assembly/mousetrap = 20
)
min_duration = 40
max_duration = 60
@@ -84,8 +91,11 @@
affected.createwound(CUT, 10)
/datum/surgery_step/generic/retract_skin
required_tool = /obj/item/weapon/retractor
allowed_tools = list(/obj/item/weapon/crowbar,/obj/item/weapon/kitchen/utensil/fork)
allowed_tools = list(
/obj/item/weapon/retractor = 100, \
/obj/item/weapon/crowbar = 75, \
/obj/item/weapon/kitchen/utensil/fork = 50
)
min_duration = 30
max_duration = 40
@@ -135,8 +145,12 @@
target.apply_damage(12, BRUTE, affected)
/datum/surgery_step/generic/cauterize
required_tool = /obj/item/weapon/cautery
allowed_tools = list(/obj/item/weapon/weldingtool, /obj/item/clothing/mask/cigarette, /obj/item/weapon/lighter)
allowed_tools = list(
/obj/item/weapon/cautery = 100, \
/obj/item/clothing/mask/cigarette = 75, \
/obj/item/weapon/lighter = 50, \
/obj/item/weapon/weldingtool = 25
)
min_duration = 70
max_duration = 100
@@ -167,7 +181,10 @@
target.apply_damage(3, BURN, affected)
/datum/surgery_step/generic/cut_limb
required_tool = /obj/item/weapon/circular_saw
allowed_tools = list(
/obj/item/weapon/circular_saw = 100, \
/obj/item/weapon/hatchet = 75
)
min_duration = 110
max_duration = 160
+18 -11
View File
@@ -31,8 +31,11 @@
return ""
/datum/surgery_step/cavity/make_space
required_tool = /obj/item/weapon/surgicaldrill
allowed_tools = list(/obj/item/weapon/pen,/obj/item/stack/rods)
allowed_tools = list(
/obj/item/weapon/surgicaldrill = 100, \
/obj/item/weapon/pen = 75, \
/obj/item/stack/rods = 50
)
min_duration = 60
max_duration = 80
@@ -62,8 +65,12 @@
/datum/surgery_step/cavity/close_space
priority = 2
required_tool = /obj/item/weapon/cautery
allowed_tools = list(/obj/item/weapon/weldingtool, /obj/item/clothing/mask/cigarette, /obj/item/weapon/lighter)
allowed_tools = list(
/obj/item/weapon/cautery = 100, \
/obj/item/clothing/mask/cigarette = 75, \
/obj/item/weapon/lighter = 50, \
/obj/item/weapon/weldingtool = 25
)
min_duration = 60
max_duration = 80
@@ -93,7 +100,7 @@
/datum/surgery_step/cavity/place_item
priority = 0
required_tool = /obj/item
allowed_tools = list(/obj/item = 100)
min_duration = 80
max_duration = 100
@@ -136,8 +143,11 @@
//////////////////////////////////////////////////////////////////
/datum/surgery_step/cavity/implant_removal
required_tool = /obj/item/weapon/hemostat
allowed_tools = list(/obj/item/weapon/wirecutters, /obj/item/weapon/kitchen/utensil/fork)
allowed_tools = list(
/obj/item/weapon/hemostat = 100, \
/obj/item/weapon/wirecutters = 75, \
/obj/item/weapon/kitchen/utensil/fork = 20
)
min_duration = 80
max_duration = 100
@@ -159,8 +169,6 @@
find_prob +=60
else
find_prob +=40
if (isright(tool))
find_prob +=20
if (prob(find_prob))
user.visible_message("\blue [user] takes something out of incision on [target]'s [affected.display_name] with \the [tool].", \
"\blue You take something out of incision on [target]'s [affected.display_name]s with \the [tool]." )
@@ -189,8 +197,7 @@
affected.createwound(CUT, 20)
if (affected.implants.len)
var/fail_prob = 10
if (!isright(tool))
fail_prob += 30
fail_prob += 100 - tool_quality(tool)
if (prob(fail_prob))
var/obj/item/weapon/implant/imp = affected.implants[1]
user.visible_message("\red Something beeps inside [target]'s [affected.display_name]!")
+4 -2
View File
@@ -6,8 +6,10 @@
/datum/surgery_step/fix_vein
priority = 2
required_tool = /obj/item/weapon/FixOVein
allowed_tools = list(/obj/item/weapon/cable_coil)
allowed_tools = list(
/obj/item/weapon/circular_saw = 100, \
/obj/item/weapon/hatchet = 75
)
can_infect = 1
blood_level = 1
+29 -10
View File
@@ -10,7 +10,10 @@
return target_zone == "chest"
/datum/surgery_step/ribcage/saw_ribcage
required_tool = /obj/item/weapon/circular_saw
allowed_tools = list(
/obj/item/weapon/circular_saw = 100, \
/obj/item/weapon/hatchet = 75
)
min_duration = 50
max_duration = 70
@@ -41,8 +44,11 @@
/datum/surgery_step/ribcage/retract_ribcage
required_tool = /obj/item/weapon/retractor
allowed_tools = list(/obj/item/weapon/crowbar)
allowed_tools = list(
/obj/item/weapon/retractor = 100, \
/obj/item/weapon/crowbar = 75, \
/obj/item/weapon/kitchen/utensil/fork = 20
)
min_duration = 30
max_duration = 40
@@ -77,8 +83,12 @@
affected.fracture()
/datum/surgery_step/ribcage/close_ribcage
required_tool = /obj/item/weapon/retractor
allowed_tools = list(/obj/item/weapon/crowbar)
allowed_tools = list(
/obj/item/weapon/retractor = 100, \
/obj/item/weapon/crowbar = 75, \
/obj/item/weapon/kitchen/utensil/fork = 20
)
min_duration = 20
max_duration = 40
@@ -112,7 +122,10 @@
target.rupture_lung()
/datum/surgery_step/ribcage/mend_ribcage
required_tool = /obj/item/weapon/bonegel
allowed_tools = list(
/obj/item/weapon/bonegel = 100, \
/obj/item/weapon/screwdriver = 75
)
min_duration = 20
max_duration = 40
@@ -127,7 +140,6 @@
target.custom_pain("Something hurts horribly in your chest!",1)
..()
end_step(mob/living/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."
@@ -139,7 +151,11 @@
// ALIEN EMBRYO SURGERY //
//////////////////////////////////////////////////////////////////
/datum/surgery_step/ribcage/remove_embryo
required_tool = /obj/item/weapon/hemostat
allowed_tools = list(
/obj/item/weapon/hemostat = 100, \
/obj/item/weapon/wirecutters = 75, \
/obj/item/weapon/kitchen/utensil/fork = 20
)
blood_level = 2
min_duration = 80
@@ -171,8 +187,11 @@
// CHEST INTERNAL ORGAN SURGERY //
//////////////////////////////////////////////////////////////////
/datum/surgery_step/ribcage/fix_chest_internal
required_tool = /obj/item/weapon/scalpel
allowed_tools = list(/obj/item/weapon/shard, /obj/item/weapon/kitchenknife)
allowed_tools = list(
/obj/item/weapon/scalpel = 100, \
/obj/item/weapon/kitchenknife = 75, \
/obj/item/weapon/shard = 50, \
)
min_duration = 70
max_duration = 90
+16 -7
View File
@@ -20,8 +20,11 @@
/datum/surgery_step/limb/cut
required_tool = /obj/item/weapon/scalpel
allowed_tools = list(/obj/item/weapon/shard, /obj/item/weapon/kitchenknife)
allowed_tools = list(
/obj/item/weapon/scalpel = 100, \
/obj/item/weapon/kitchenknife = 75, \
/obj/item/weapon/shard = 50, \
)
min_duration = 80
max_duration = 100
@@ -48,8 +51,10 @@
/datum/surgery_step/limb/mend
required_tool = /obj/item/weapon/retractor
allowed_tools = list(/obj/item/weapon/kitchen/utensil/fork)
allowed_tools = list(
/obj/item/weapon/retractor = 100, \
/obj/item/weapon/crowbar = 75, \
/obj/item/weapon/kitchen/utensil/fork = 50)
min_duration = 80
max_duration = 100
@@ -80,8 +85,12 @@
/datum/surgery_step/limb/prepare
required_tool = /obj/item/weapon/cautery
allowed_tools = list(/obj/item/weapon/weldingtool, /obj/item/clothing/mask/cigarette, /obj/item/weapon/lighter)
allowed_tools = list(
/obj/item/weapon/cautery = 100, \
/obj/item/clothing/mask/cigarette = 75, \
/obj/item/weapon/lighter = 50, \
/obj/item/weapon/weldingtool = 25
)
min_duration = 60
max_duration = 70
@@ -115,7 +124,7 @@
/datum/surgery_step/limb/attach
required_tool = /obj/item/robot_parts
allowed_tools = list(/obj/item/robot_parts = 100)
can_infect = 0
min_duration = 80
+11 -17
View File
@@ -2,10 +2,8 @@
/datum/surgery_step
var/priority = 0 //steps with higher priority would be attempted first
// type path referencing the required tool for this step
var/required_tool = null
// type path referencing tools that can be used as substitude for this step
// type path referencing tools that can be used for this step, and how well are they suited for it
var/list/allowed_tools = null
// duration of the step
@@ -17,16 +15,11 @@
//How much blood this step can get on surgeon. 1 - hands, 2 - full body.
var/blood_level = 0
//is it is a required surgical tool for this step
proc/isright(obj/item/tool)
return (istype(tool,required_tool))
//is it is an accepted replacement tool for this step
proc/isacceptable(obj/item/tool)
if (allowed_tools)
for (var/T in allowed_tools)
if (istype(tool,T))
return 1
//returns how well tool is suited for this step
proc/tool_quality(obj/item/tool)
for (var/T in allowed_tools)
if (istype(tool,T))
return allowed_tools[T]
return 0
// checks whether this step can be applied with the given user and target
@@ -69,10 +62,11 @@ proc/do_surgery(mob/living/M, mob/living/user, obj/item/tool)
if (user.a_intent == "harm") //check for Hippocratic Oath
return 0
for(var/datum/surgery_step/S in surgery_steps)
if( (S.isright(tool) || S.isacceptable(tool)) && \
S.can_use(user, M, user.zone_sel.selecting, tool)) //check if tool is right or close enough and if this step is possible
S.begin_step(user, M, user.zone_sel.selecting, tool) //start on it
if(do_mob(user, M, rand(S.min_duration, S.max_duration))) //if user did nto move or changed hands
//check if tool is right or close enough and if this step is possible
if( S.tool_quality(tool) && S.can_use(user, M, user.zone_sel.selecting, tool))
S.begin_step(user, M, user.zone_sel.selecting, tool) //start on it
//We had proper tools! (or RNG smiled.) and User did not move or change hands.
if( prob(S.tool_quality(tool)) && do_mob(user, M, rand(S.min_duration, S.max_duration)))
S.end_step(user, M, user.zone_sel.selecting, tool) //finish successfully
else //or
S.fail_step(user, M, user.zone_sel.selecting, tool) //malpractice~