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
@@ -89,6 +89,6 @@ Bonus
if(brute_dam < 50)
M.adjustBruteLoss(3)
var/turf/pos = get_turf(M)
var/turf/simulated/pos = get_turf(M)
pos.add_blood_floor(M)
playsound(pos, 'sound/effects/splat.ogg', 50, 1)
+18
View File
@@ -867,6 +867,24 @@ proc/process_ghost_teleport_locs()
/area/holodeck/source_wildlife
name = "\improper Holodeck - Wildlife Simulation"
/area/holodeck/source_meetinghall
name = "\improper Holodeck - Meeting Hall"
/area/holodeck/source_theatre
name = "\improper Holodeck - Theatre"
/area/holodeck/source_picnicarea
name = "\improper Holodeck - Picnic Area"
/area/holodeck/source_snowfield
name = "\improper Holodeck - Snow Field"
/area/holodeck/source_desert
name = "\improper Holodeck - Desert"
/area/holodeck/source_space
name = "\improper Holodeck - Space"
+10 -81
View File
@@ -420,6 +420,7 @@ its easier to just keep the beam vertical.
//returns 1 if made bloody, returns 0 otherwise
/atom/proc/add_blood(mob/living/carbon/human/M as mob)
.=1
if (!( istype(M, /mob/living/carbon/human) ))
return 0
if (!istype(M.dna, /datum/dna))
@@ -431,55 +432,6 @@ its easier to just keep the beam vertical.
if(!blood_DNA || !istype(blood_DNA, /list)) //if our list of DNA doesn't exist yet (or isn't a list) initialise it.
blood_DNA = list()
//adding blood to items
if (istype(src, /obj/item)&&!istype(src, /obj/item/weapon/melee/energy))//Only regular items. Energy melee weapon are not affected.
var/obj/item/O = src
//if we haven't made our blood_overlay already
if( !O.blood_overlay )
var/icon/I = new /icon(O.icon, O.icon_state)
I.Blend(new /icon('icons/effects/blood.dmi', rgb(255,255,255)),ICON_ADD) //fills the icon_state with white (except where it's transparent)
I.Blend(new /icon('icons/effects/blood.dmi', "itemblood"),ICON_MULTIPLY) //adds blood and the remaining white areas become transparant
//not sure if this is worth it. It attaches the blood_overlay to every item of the same type if they don't have one already made.
for(var/obj/item/A in world)
if(A.type == O.type && !A.blood_overlay)
A.blood_overlay = I
//apply the blood-splatter overlay if it isn't already in there
if(!blood_DNA.len)
O.overlays += O.blood_overlay
//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
return 1 //we applied blood to the item
//adding blood to turfs
else if (istype(src, /turf/simulated))
var/turf/simulated/T = src
//get one blood decal and infect it with virus from M.viruses
for(var/obj/effect/decal/cleanable/blood/B in T.contents)
if(!B.blood_DNA[M.dna.unique_enzymes])
B.blood_DNA[M.dna.unique_enzymes] = M.dna.b_type
/*for(var/datum/disease/D in M.viruses)
var/datum/disease/newDisease = D.Copy(1)
B.viruses += newDisease
newDisease.holder = B*/
return 1 //we bloodied the floor
//if there isn't a blood decal already, make one.
var/obj/effect/decal/cleanable/blood/newblood = new /obj/effect/decal/cleanable/blood(T)
newblood.blood_DNA[M.dna.unique_enzymes] = M.dna.b_type
/*for(var/datum/disease/D in M.viruses)
var/datum/disease/newDisease = D.Copy(1)
newblood.viruses += newDisease
newDisease.holder = newblood*/
return 1 //we bloodied the floor
//adding blood to humans
else if (istype(src, /mob/living/carbon/human))
var/mob/living/carbon/human/H = src
@@ -499,37 +451,6 @@ its easier to just keep the beam vertical.
if(toxvomit)
this.icon_state = "vomittox_[pick(1,4)]"
/*for(var/datum/disease/D in M.viruses)
var/datum/disease/newDisease = D.Copy(1)
this.viruses += newDisease
newDisease.holder = this*/
// Only adds blood on the floor -- Skie
/atom/proc/add_blood_floor(mob/living/carbon/M as mob)
if( istype(M, /mob/living/carbon/monkey) || istype(M, /mob/living/carbon/human))
if( istype(src, /turf/simulated) )
var/turf/simulated/source1 = src
var/obj/effect/decal/cleanable/blood/this = new /obj/effect/decal/cleanable/blood(source1)
this.blood_DNA[M.dna.unique_enzymes] = M.dna.b_type
/*for(var/datum/disease/D in M.viruses)
var/datum/disease/newDisease = D.Copy(1)
this.viruses += newDisease
newDisease.holder = this*/
else if( istype(M, /mob/living/carbon/alien ))
if( istype(src, /turf/simulated) )
var/turf/simulated/source2 = src
var/obj/effect/decal/cleanable/xenoblood/this = new /obj/effect/decal/cleanable/xenoblood(source2)
this.blood_DNA["UNKNOWN BLOOD"] = "X*"
/*for(var/datum/disease/D in M.viruses)
var/datum/disease/newDisease = D.Copy(1)
this.viruses += newDisease
newDisease.holder = this*/
else if( istype(M, /mob/living/silicon/robot ))
if( istype(src, /turf/simulated) )
var/turf/simulated/source2 = src
new /obj/effect/decal/cleanable/oil(source2)
/atom/proc/clean_blood()
src.germ_level = 0
@@ -550,8 +471,16 @@ its easier to just keep the beam vertical.
/atom/Click(location,control,params)
//world << "atom.Click() on [src] by [usr] : src.type is [src.type]"
if(!istype(src,/obj/item/weapon/gun))
var/acting_bad = 1 //Check for gun targeting code.
if (istype(src,/obj/item/weapon/gun)) //Allow people to lower weapon
acting_bad = 0
if (istype(src, /turf) && istype(usr,/mob/living/carbon/human)) //Allow people to turn around
var/mob/living/carbon/human/H = usr
if (!H.equipped())
acting_bad = 0
if(acting_bad)
usr.last_target_click = world.time
if(usr.client.buildmode)
build_click(usr, usr.client.buildmode, location, control, params, src)
return
+42 -34
View File
@@ -135,30 +135,7 @@
if(!istype(location)) return//returns if loc is not simulated
var/datum/gas_mixture/environment = location.return_air()
var/partial_pressure = R_IDEAL_GAS_EQUATION*environment.temperature/environment.volume
var/list/current_settings = TLV["pressure"]
var/environment_pressure = environment.return_pressure()
var/pressure_dangerlevel = get_danger_level(environment_pressure, current_settings)
current_settings = TLV["oxygen"]
var/oxygen_dangerlevel = get_danger_level(environment.oxygen*partial_pressure, current_settings)
current_settings = TLV["carbon dioxide"]
var/co2_dangerlevel = get_danger_level(environment.carbon_dioxide*partial_pressure, current_settings)
current_settings = TLV["plasma"]
var/plasma_dangerlevel = get_danger_level(environment.toxins*partial_pressure, current_settings)
current_settings = TLV["other"]
var/other_moles = 0.0
for(var/datum/gas/G in environment.trace_gases)
other_moles+=G.moles
var/other_dangerlevel = get_danger_level(other_moles*partial_pressure, current_settings)
current_settings = TLV["temperature"]
var/temperature_dangerlevel = get_danger_level(environment.temperature, current_settings)
var/temperature_dangerlevel = get_danger_level(environment.temperature, TLV["temperature"])
//Handle temperature adjustment here.
if(temperature_dangerlevel || regulating_temperature)
//If it goes too far, we should adjust ourselves back before stopping.
@@ -194,18 +171,13 @@
"You hear a click as a faint electronic humming stops.")
var/old_danger_level = danger_level
danger_level = max(pressure_dangerlevel,
oxygen_dangerlevel,
co2_dangerlevel,
plasma_dangerlevel,
other_dangerlevel,
temperature_dangerlevel)
danger_level = overall_danger_level()
if (old_danger_level != danger_level)
apply_danger_level(danger_level)
if (alarm_area.master_air_alarm == src)
refresh_danger_level()
update_icon()
if (mode==AALARM_MODE_CYCLE && environment_pressure<ONE_ATMOSPHERE*0.05)
if (mode==AALARM_MODE_CYCLE && environment.return_pressure()<ONE_ATMOSPHERE*0.05)
mode=AALARM_MODE_FILL
apply_mode()
@@ -225,6 +197,33 @@
updateDialog()
return
proc/overall_danger_level()
var/turf/simulated/location = loc
if(!istype(location)) return//returns if loc is not simulated
var/datum/gas_mixture/environment = location.return_air()
var/partial_pressure = R_IDEAL_GAS_EQUATION*environment.temperature/environment.volume
var/environment_pressure = environment.return_pressure()
var/other_moles = 0.0
for(var/datum/gas/G in environment.trace_gases)
other_moles+=G.moles
var/pressure_dangerlevel = get_danger_level(environment_pressure, TLV["pressure"])
var/oxygen_dangerlevel = get_danger_level(environment.oxygen*partial_pressure, TLV["oxygen"])
var/co2_dangerlevel = get_danger_level(environment.carbon_dioxide*partial_pressure, TLV["carbon dioxide"])
var/plasma_dangerlevel = get_danger_level(environment.toxins*partial_pressure, TLV["plasma"])
var/temperature_dangerlevel = get_danger_level(environment.temperature, TLV["temperature"])
var/other_dangerlevel = get_danger_level(other_moles*partial_pressure, TLV["other"])
return max(
pressure_dangerlevel,
oxygen_dangerlevel,
co2_dangerlevel,
plasma_dangerlevel,
other_dangerlevel,
temperature_dangerlevel
)
proc/master_is_operating()
return alarm_area.master_air_alarm && !(alarm_area.master_air_alarm.stat & (NOPOWER|BROKEN))
@@ -383,6 +382,15 @@
update_icon()
proc/refresh_danger_level()
var/level = 0
for (var/area/A in alarm_area.related)
for (var/obj/machinery/alarm/AA in A)
if ( !(AA.stat & (NOPOWER|BROKEN)) && !AA.shorted)
if (AA.danger_level > level)
level = AA.danger_level
apply_danger_level(level)
proc/air_doors_close(manual)
var/area/A = get_area(src)
if(!A.master.air_doors_activated)
@@ -32,6 +32,12 @@
dat += "<A href='?src=\ref[src];basketball=1'>((Basketball Court)</font>)</A><BR>"
dat += "<A href='?src=\ref[src];thunderdomecourt=1'>((Thunderdome Court)</font>)</A><BR>"
dat += "<A href='?src=\ref[src];beach=1'>((Beach)</font>)</A><BR>"
dat += "<A href='?src=\ref[src];desert=1'>((Desert)</font>)</A><BR>"
dat += "<A href='?src=\ref[src];space=1'>((Space)</font>)</A><BR>"
dat += "<A href='?src=\ref[src];picnicarea=1'>((Picnic Area)</font>)</A><BR>"
dat += "<A href='?src=\ref[src];snowfield=1'>((Snow Field)</font>)</A><BR>"
dat += "<A href='?src=\ref[src];theatre=1'>((Theatre)</font>)</A><BR>"
dat += "<A href='?src=\ref[src];meetinghall=1'>((Meeting Hall)</font>)</A><BR>"
// dat += "<A href='?src=\ref[src];turnoff=1'>((Shutdown System)</font>)</A><BR>"
dat += "Please ensure that only holographic weapons are used in the holodeck if a combat simulation has been loaded.<BR>"
@@ -417,6 +423,11 @@
if(isrobot(user))
return
/obj/structure/table/holotable/wood
name = "table"
desc = "A square piece of wood standing on four wooden legs. It can not move."
icon = 'icons/obj/structures.dmi'
icon_state = "wood_table"
/obj/item/clothing/gloves/boxing/hologlove
@@ -1,3 +1,4 @@
#define DRYING_TIME 5 * 60*10 //for 1 unit of depth in puddle (amount var)
/obj/effect/decal/cleanable/blood
name = "blood"
desc = "It's red and gooey. Perhaps it's the chef's cooking?"
@@ -11,6 +12,7 @@
var/list/viruses = list()
blood_DNA = list()
var/datum/disease2/disease/virus2 = null
var/amount = 5
/obj/effect/decal/cleanable/blood/Del()
for(var/datum/disease/D in viruses)
@@ -25,16 +27,69 @@
if(src.loc && isturf(src.loc))
for(var/obj/effect/decal/cleanable/blood/B in src.loc)
if(B != src)
if (B.blood_DNA)
blood_DNA |= B.blood_DNA.Copy()
del(B)
spawn(DRYING_TIME * (amount+1))
dry()
/obj/effect/decal/cleanable/blood/HasEntered(mob/living/carbon/human/perp)
if (!istype(perp))
return
if(amount < 1)
return
if(perp.shoes)
perp.shoes:track_blood = max(amount,perp.shoes:track_blood) //Adding blood to shoes
if(!perp.shoes.blood_overlay)
perp.shoes.generate_blood_overlay()
if(!perp.shoes.blood_DNA)
perp.shoes.blood_DNA = list()
perp.shoes.overlays += perp.shoes.blood_overlay
perp.update_inv_shoes(1)
perp.shoes.blood_DNA |= blood_DNA.Copy()
else
perp.track_blood = max(amount,perp.track_blood) //Or feet
if(!perp.feet_blood_DNA)
perp.feet_blood_DNA = list()
perp.feet_blood_DNA |= blood_DNA.Copy()
amount--
/obj/effect/decal/cleanable/blood/proc/dry()
name = "dried [src]"
desc = "It's dark red and crusty. Someone is not doing their job."
var/icon/I = icon(icon,icon_state)
I.SetIntensity(0.7)
icon = I
amount = 0
/obj/effect/decal/cleanable/blood/splatter
random_icon_states = list("gibbl1", "gibbl2", "gibbl3", "gibbl4", "gibbl5")
amount = 2
/obj/effect/decal/cleanable/blood/footprints
name = "bloody footprints"
desc = "Whoops..."
icon='icons/effects/footprints.dmi'
icon_state = "blood1"
amount = 0
random_icon_states = null
/obj/effect/decal/cleanable/blood/tracks
icon_state = "tracks"
desc = "They look like tracks left by wheels."
gender = PLURAL
random_icon_states = null
amount = 0
/obj/effect/decal/cleanable/blood/drip
name = "drips of blood"
desc = "It's red."
gender = PLURAL
icon = 'drip.dmi'
icon_state = "1"
amount = 0
/obj/effect/decal/cleanable/blood/gibs
name = "gibs"
@@ -89,4 +144,4 @@
icon = 'blood.dmi'
icon_state = "mucus"
random_icon_states = list("mucus")
var/datum/disease2/disease/virus2 = null
var/datum/disease2/disease/virus2 = null
+3 -2
View File
@@ -5,7 +5,6 @@
layer = 2.1
anchored = 1
examine()
set src in view(2)
..()
@@ -32,4 +31,6 @@
shadeOverlay.Blend(shade,ICON_ADD)
overlays += mainOverlay
overlays += shadeOverlay
overlays += shadeOverlay
add_hiddenprint(usr)
+38 -2
View File
@@ -338,8 +338,8 @@
M.take_organ_damage(power)
if (prob(33)) // Added blood for whacking non-humans too
var/turf/location = M.loc
if (istype(location, /turf/simulated))
var/turf/simulated/location = M.loc
if (istype(location))
location.add_blood_floor(M)
if("fire")
if (!(COLD_RESISTANCE in M.mutations))
@@ -700,3 +700,39 @@
if(istype(src, /obj/item/clothing/gloves))
var/obj/item/clothing/gloves/G = src
G.transfer_blood = 0
/obj/item/add_blood(mob/living/carbon/human/M as mob)
if (!..())
return 0
if(istype(src, /obj/item/weapon/melee/energy))
return
//if we haven't made our blood_overlay already
if( !blood_overlay )
generate_blood_overlay()
//apply the blood-splatter overlay if it isn't already in there
if(!blood_DNA.len)
overlays += blood_overlay
//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
return 1 //we applied blood to the item
/obj/item/proc/generate_blood_overlay()
if(blood_overlay)
return
var/icon/I = new /icon(icon, icon_state)
I.Blend(new /icon('icons/effects/blood.dmi', rgb(255,255,255)),ICON_ADD) //fills the icon_state with white (except where it's transparent)
I.Blend(new /icon('icons/effects/blood.dmi', "itemblood"),ICON_MULTIPLY) //adds blood and the remaining white areas become transparant
//not sure if this is worth it. It attaches the blood_overlay to every item of the same type if they don't have one already made.
for(var/obj/item/A in world)
if(A.type == type && !A.blood_overlay)
A.blood_overlay = I
@@ -0,0 +1,21 @@
/obj/item/device/hailer
name = "hailer"
desc = "Used by obese officers to save their breath for running."
icon_state = "voice0"
item_state = "flashbang" //looks exactly like a flash (and nothing like a flashbang)
w_class = 1.0
flags = FPRINT | TABLEPASS| CONDUCT
var/spamcheck = 0
/obj/item/device/hailer/attack_self(mob/living/carbon/user as mob)
if (spamcheck)
return
playsound(get_turf(src), 'sound/voice/halt.ogg', 100, 1, vary = 0)
user.visible_message("<span class='warning'>[user]'s [name] rasps, \"Halt! Security!\"</span>")
spamcheck = 1
spawn(20)
spamcheck = 0
@@ -186,6 +186,7 @@
new /obj/item/weapon/gun/energy/taser(src)
new /obj/item/clothing/glasses/sunglasses/sechud(src)
new /obj/item/taperoll/police(src)
new /obj/item/device/hailer
return
@@ -26,8 +26,6 @@
new /obj/item/clothing/under/rank/security2(src)
new /obj/item/clothing/under/rank/security2(src)
new /obj/item/clothing/under/rank/security2(src)
new /obj/item/clothing/under/rank/dispatch(src)
new /obj/item/clothing/under/rank/dispatch(src)
new /obj/item/clothing/shoes/jackboots(src)
new /obj/item/clothing/shoes/jackboots(src)
new /obj/item/clothing/shoes/jackboots(src)
+55 -1
View File
@@ -34,6 +34,31 @@
else
playsound(src, "clownstep", 20, 1)
var/list/bloodDNA = null
if(H.shoes)
var/obj/item/clothing/shoes/S = H.shoes
if(S.track_blood && S.blood_DNA)
bloodDNA = S.blood_DNA
S.track_blood--
else
if(H.track_blood && H.feet_blood_DNA)
bloodDNA = H.feet_blood_DNA
H.track_blood--
if (bloodDNA)
var/obj/effect/decal/cleanable/blood/footprints/here = new(src)
here.icon_state = "blood1"
here.dir = H.dir
here.blood_DNA |= bloodDNA.Copy()
var/turf/simulated/from = get_step(H,reverse_direction(H.dir))
if(from)
var/obj/effect/decal/cleanable/blood/footprints/there = new(from)
there.icon_state = "blood2"
there.dir = H.dir
there.blood_DNA |= bloodDNA.Copy()
bloodDNA = null
switch (src.wet)
if(1)
if(istype(M, /mob/living/carbon/human)) // Added check since monkeys don't have shoes
@@ -72,4 +97,33 @@
playsound(src.loc, 'sound/misc/slip.ogg', 50, 1, -3)
M.Weaken(10)
..()
..()
//returns 1 if made bloody, returns 0 otherwise
/turf/simulated/add_blood(mob/living/carbon/human/M as mob)
if (!..())
return 0
for(var/obj/effect/decal/cleanable/blood/B in contents)
if(!B.blood_DNA[M.dna.unique_enzymes])
B.blood_DNA[M.dna.unique_enzymes] = M.dna.b_type
return 1 //we bloodied the floor
//if there isn't a blood decal already, make one.
var/obj/effect/decal/cleanable/blood/newblood = new /obj/effect/decal/cleanable/blood(src)
newblood.blood_DNA[M.dna.unique_enzymes] = M.dna.b_type
return 1 //we bloodied the floor
// Only adds blood on the floor -- Skie
/turf/simulated/proc/add_blood_floor(mob/living/carbon/M as mob)
if( istype(M, /mob/living/carbon/monkey) || istype(M, /mob/living/carbon/human))
var/obj/effect/decal/cleanable/blood/this = new /obj/effect/decal/cleanable/blood(src)
this.blood_DNA[M.dna.unique_enzymes] = M.dna.b_type
else if( istype(M, /mob/living/carbon/alien ))
var/obj/effect/decal/cleanable/xenoblood/this = new /obj/effect/decal/cleanable/xenoblood(src)
this.blood_DNA["UNKNOWN BLOOD"] = "X*"
else if( istype(M, /mob/living/silicon/robot ))
new /obj/effect/decal/cleanable/oil(src)
@@ -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~