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

This commit is contained in:
meyar
2013-06-12 17:24:54 -04:00
35 changed files with 1644 additions and 870 deletions
+1
View File
@@ -2,6 +2,7 @@
var/const/commandos_possible = 6 //if more Commandos are needed in the future
var/global/sent_strike_team = 0
/client/proc/strike_team()
if(!ticker)
usr << "<font color='red'>The game hasn't started yet!</font>"
+3 -3
View File
@@ -364,7 +364,7 @@ datum/preferences
user << browse(dat, "window=preferences;size=560x580")
proc/SetChoices(mob/user, limit = 17, list/splitJobs = list("Chief Engineer"), width = 550, height = 550)
proc/SetChoices(mob/user, limit = 16, list/splitJobs = list("Chief Medical Officer"), width = 550, height = 550)
if(!job_master)
return
@@ -436,7 +436,7 @@ datum/preferences
else
HTML += " <font color=red>\[NEVER]</font>"
if(job.alt_titles)
HTML += "</a><br> <a href=\"byond://?src=\ref[user];preference=job;task=alt_title;job=\ref[job]\">\[[GetPlayerAltTitle(job)]\]</a></td></tr>"
HTML += "</a></td></tr><tr bgcolor='[lastJob.selection_color]'><td width='60%' align='center'><a>&nbsp</a></td><td><a href=\"byond://?src=\ref[user];preference=job;task=alt_title;job=\ref[job]\">\[[GetPlayerAltTitle(job)]\]</a></td></tr>"
HTML += "</a></td></tr>"
HTML += "</td'></tr></table>"
@@ -449,7 +449,7 @@ datum/preferences
if(BE_ASSISTANT)
HTML += "<center><br><u><a href='?_src_=prefs;preference=job;task=random'><font color=red>Be assistant if preference unavailable</font></a></u></center><br>"
if(RETURN_TO_LOBBY)
HTML += "<center><br><u><a href='?_src_=prefs;preference=job;task=random'><font color=purple>Return to lobby if prefernce unavailable</font></a></u></center><br>"
HTML += "<center><br><u><a href='?_src_=prefs;preference=job;task=random'><font color=purple>Return to lobby if preference unavailable</font></a></u></center><br>"
HTML += "<center><a href='?_src_=prefs;preference=job;task=reset'>\[Reset\]</a></center>"
HTML += "</tt>"
+31
View File
@@ -167,9 +167,13 @@ BLIND // can't see anything
hastie = I
I.loc = src
user << "<span class='notice'>You attach [I] to [src].</span>"
if (istype(hastie,/obj/item/clothing/tie/holster))
verbs += /obj/item/clothing/under/proc/holster
if (istype(hastie,/obj/item/clothing/tie/storage))
verbs += /obj/item/clothing/under/proc/storage
if(istype(loc, /mob/living/carbon/human))
var/mob/living/carbon/human/H = loc
H.update_inv_w_uniform()
@@ -230,9 +234,16 @@ BLIND // can't see anything
if(hastie)
usr.put_in_hands(hastie)
hastie = null
if (istype(hastie,/obj/item/clothing/tie/holster))
verbs -= /obj/item/clothing/under/proc/holster
if (istype(hastie,/obj/item/clothing/tie/storage))
verbs -= /obj/item/clothing/under/proc/storage
var/obj/item/clothing/tie/storage/W = hastie
if (W.hold)
W.hold.loc = hastie
if(istype(loc, /mob/living/carbon/human))
var/mob/living/carbon/human/H = loc
H.update_inv_w_uniform()
@@ -277,3 +288,23 @@ BLIND // can't see anything
"\blue You draw \the [H.holstered], pointing it at the ground.")
usr.put_in_hands(H.holstered)
H.holstered = null
/obj/item/clothing/under/proc/storage()
set name = "Look in storage"
set category = "Object"
set src in usr
if(!istype(usr, /mob/living)) return
if(usr.stat) return
if (!hastie || !istype(hastie,/obj/item/clothing/tie/storage))
usr << "\red You need something to store items in for that!"
return
var/obj/item/clothing/tie/storage/W = hastie
if (!istype(W.hold))
return
W.hold.loc = usr
W.hold.attack_hand(usr)
+53
View File
@@ -174,3 +174,56 @@
desc = "A handgun holster. Made of expensive leather."
icon_state = "holster"
color = "holster_low"
/obj/item/clothing/tie/storage
name = "load beearing equipment"
desc = "Used to hold things when you don't have enough hands for that."
icon_state = "webbing"
color = "webbing"
var/slots = 3
var/obj/item/weapon/storage/pockets/hold
/obj/item/clothing/tie/storage/New()
hold = new /obj/item/weapon/storage/pockets(src)
hold.master_item = src
hold.storage_slots = slots
/obj/item/clothing/tie/storage/attack_self(mob/user as mob)
user << "<span class='notice'>You empty [src].</span>"
var/turf/T = get_turf(src)
hold.hide_from(usr)
for(var/obj/item/I in hold.contents)
hold.remove_from_storage(I, T)
src.add_fingerprint(user)
/obj/item/clothing/tie/storage/attackby(obj/item/weapon/W as obj, mob/user as mob)
hold.attackby(W,user)
src.add_fingerprint(user)
/obj/item/weapon/storage/pockets
name = "webbing pockets"
var/master_item //item it belongs to
/obj/item/weapon/storage/pockets/close(mob/user as mob)
..()
loc = master_item
/obj/item/clothing/tie/storage/webbing
name = "webbing"
desc = "Strudy mess of synthcotton belts and buckles, ready to share your burden."
icon_state = "webbing"
color = "webbing"
/obj/item/clothing/tie/storage/black_vest
name = "black webbing vest"
desc = "Robust black synthcotton vest with lots of pockets to hold whatever you need, but cannot hold in hands."
icon_state = "vest_black"
color = "vest_black"
slots = 5
/obj/item/clothing/tie/storage/brown_vest
name = "black webbing vest"
desc = "Worn brownish synthcotton vest with lots of pockets to unload your hands."
icon_state = "vest_brown"
color = "vest_brown"
slots = 5
@@ -381,7 +381,8 @@
if(display_gloves)
msg += "<span class='warning'><b>[src] has blood running from under [t_his] gloves!</b></span>\n"
for(var/implant in get_visible_implants(1))
msg += "<span class='warning'><b>[src] has \a [implant] sticking out of their flesh!</span>\n"
if(digitalcamo)
msg += "[t_He] [t_is] repulsively uncanny!\n"
@@ -1112,3 +1112,79 @@
if(istype(feet_blood_DNA, /list) && feet_blood_DNA.len)
del(feet_blood_DNA)
return 1
/mob/living/carbon/human/verb/yank_out_object()
set name = "Yank out object"
set desc = "Remove an embedded item at the cost of bleeding and pain."
set category = "Object"
if(!isliving(usr) || usr.next_move > world.time)
return
usr.next_move = world.time + 20
var/list/valid_objects = get_visible_implants(1)
var/datum/organ/external/affected = null
if(!valid_objects.len)
src << "You have nothing stuck in your wounds that is large enough to remove without surgery."
return
if(src.stat == 1)
src << "You are unconcious and cannot do that!"
return
if(src.restrained())
src << "You are restrained and cannot do that!"
return
var/obj/item/weapon/selection = input("What do you want to yank out?", "Embedded objects") in valid_objects
for(var/datum/organ/external/organ in src.organs) //Grab the organ holding the implant. Messy as Hell, TBD: fix.
for(var/obj/item/weapon/O in organ.implants)
if(O == selection)
affected = organ
src << "<span class='warning'>You attempt to get a good grip on the [selection] in your [affected] with bloody fingers.</span>"
bloody_hands(src)
spawn(80)
visible_message("<span class='warning'><b>[src] rips [selection] out of their [affected] in a welter of blood.</b></span>","<span class='warning'><b>You rip [selection] out of your [affected] in a welter of blood.</b></span>")
selection.loc = get_turf(src)
affected.implants -= selection
shock_stage+=10
if(prob(10)) //I'M SO ANEMIC I COULD JUST -DIE-.
var/datum/wound/internal_bleeding/I = new (15)
affected.wounds += I
src.custom_pain("Something tears wetly in your [affected] as [selection] is pulled free!", 1)
return 1
/mob/living/carbon/human/proc/get_visible_implants(var/class = 0)
var/list/visible_implants = list()
for(var/datum/organ/external/organ in src.organs)
for(var/obj/item/weapon/O in organ.implants)
if(!istype(O,/obj/item/weapon/implant) && O.w_class > class)
visible_implants += O
return(visible_implants)
/mob/living/carbon/human/proc/handle_embedded_objects()
for(var/datum/organ/external/organ in src.organs)
for(var/obj/item/weapon/O in organ.implants)
if(!istype(O,/obj/item/weapon/implant) && prob(5)) //Moving with things stuck in you could be bad.
// All kinds of embedded objects cause bleeding.
var/msg = null
switch(rand(1,3))
if(1)
msg ="<span class='warning'>A spike of pain jolts your [organ] as you bump [O] inside.</span>"
if(2)
msg ="<span class='warning'>Your movement jostles [O] in your [organ] painfully.</span>"
if(3)
msg ="<span class='warning'>[O] in your [organ] twists painfully as you move.</span>"
src << msg
organ.status |= ORGAN_BLEEDING
organ.take_damage(rand(1,3), 0, 0)
src.adjustToxLoss(rand(1,3))
@@ -190,7 +190,9 @@
zone = "head"
return organs_by_name[zone]
/mob/living/carbon/human/apply_damage(var/damage = 0,var/damagetype = BRUTE, var/def_zone = null, var/blocked = 0, var/sharp = 0, var/used_weapon = null)
/mob/living/carbon/human/apply_damage(var/damage = 0,var/damagetype = BRUTE, var/def_zone = null, var/blocked = 0, var/sharp = 0, var/obj/used_weapon = null)
//visible_message("Hit debug. [damage] | [damagetype] | [def_zone] | [blocked] | [sharp] | [used_weapon]")
if((damagetype != BRUTE) && (damagetype != BURN))
..(damage, damagetype, def_zone, blocked)
return 1
@@ -219,6 +221,22 @@
UpdateDamageIcon()
// Will set our damageoverlay icon to the next level, which will then be set back to the normal level the next mob.Life().
updatehealth()
return 1
//Embedded projectile code.
if(!organ) return
if(istype(used_weapon,/obj/item/weapon))
var/obj/item/weapon/W = used_weapon
if(damage > (5*W.w_class) && (prob(damage/W.w_class) || sharp)) //The larger it is, the harder it needs to hit to stick.
W.loc = organ //Sharp objects will always embed if they do enough damage.
organ.implants += W
visible_message("<span class='danger'>\The [W] sticks in the wound!</span>")
W.add_blood(src)
else if(istype(used_weapon,/obj/item/projectile)) //We don't want to use the actual projectile item, so we spawn some shrapnel.
if(prob(50) && damagetype == BRUTE)
var/obj/item/weapon/shard/shrapnel/S = new()
S.loc = organ
organ.implants += S
visible_message("<span class='danger'>The projectile sticks in the wound!</span>")
S.add_blood(src)
return 1
@@ -170,7 +170,7 @@ emp_act
if(armor >= 2) return 0
if(!I.force) return 0
apply_damage(I.force, I.damtype, affecting, armor , is_sharp(I), I.name)
apply_damage(I.force, I.damtype, affecting, armor , is_sharp(I), I)
var/bloody = 0
if(((I.damtype == BRUTE) || (I.damtype == HALLOSS)) && prob(25 + (I.force * 2)))
@@ -7,6 +7,8 @@
if (istype(loc, /turf/space)) return -1 // It's hard to be slowed down in space by... anything
handle_embedded_objects() //Moving with objects stuck in you can cause bad times.
var/health_deficiency = (100 - health - halloss)
if(health_deficiency >= 40) tally += (health_deficiency / 25)
+2 -2
View File
@@ -57,7 +57,7 @@
P.on_hit(src,2)
return 2
if(!P.nodamage)
apply_damage((P.damage/(absorb+1)), P.damage_type, def_zone, used_weapon = "Projectile([P.name])")
apply_damage((P.damage/(absorb+1)), P.damage_type, def_zone, absorb, 0, P)
P.on_hit(src, absorb)
return absorb
@@ -72,7 +72,7 @@
src.visible_message("\red [src] has been hit by [O].")
var/armor = run_armor_check(zone, "melee", "Your armor has protected your [zone].", "Your armor has softened hit to your [zone].")
if(armor < 2)
apply_damage(O.throwforce*(speed/5), dtype, zone, armor, O)
apply_damage(O.throwforce*(speed/5), dtype, zone, armor, O.sharp, O)
if(!O.fingerprintslast)
return
var/client/assailant = directory[ckey(O.fingerprintslast)]
+5 -3
View File
@@ -62,9 +62,11 @@
name = "storage"
master = null
/obj/screen/storage/attackby(W, mob/user as mob)
src.master.attackby(W, user)
return
/obj/screen/storage/attack_hand(mob/user)
if(master)
var/obj/item/I = user.get_active_hand()
if(I)
master.attackby(I, user)
/obj/screen/zone_sel
name = "Damage Zone"
+2 -2
View File
@@ -142,8 +142,8 @@
/datum/surgery_step/brain/hematoma
allowed_tools = list(
/obj/item/weapon/FixOVein , \
/obj/item/weapon/cable_coil
/obj/item/weapon/FixOVein = 100, \
/obj/item/weapon/cable_coil = 75
)
min_duration = 90
+22 -9
View File
@@ -163,19 +163,32 @@
var/datum/organ/external/chest/affected = target.get_organ(target_zone)
var/find_prob = 0
if (affected.implants.len)
var/obj/item/weapon/implant/imp = affected.implants[1]
if (imp.islegal())
find_prob +=60
var/obj/item/weapon/obj = affected.implants[1]
if(istype(obj,/obj/item/weapon/implant))
var/obj/item/weapon/implant/imp = obj
if (imp.islegal())
find_prob +=60
else
find_prob +=40
else
find_prob +=40
find_prob +=50
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]." )
affected.implants -= imp
imp.loc = get_turf(target)
imp.imp_in = null
imp.implanted = 0
"\blue You take [obj] out of incision on [target]'s [affected.display_name]s with \the [tool]." )
affected.implants -= obj
obj.loc = get_turf(target)
if(istype(obj,/obj/item/weapon/implant))
var/obj/item/weapon/implant/imp = obj
imp.imp_in = null
imp.implanted = 0
else
user.visible_message("\blue [user] removes \the [tool] from [target]'s [affected.display_name].", \
"\blue There's something inside [target]'s [affected.display_name], but you just missed it this time." )
else if (affected.hidden)
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]." )
+2 -2
View File
@@ -7,8 +7,8 @@
/datum/surgery_step/fix_vein
priority = 2
allowed_tools = list(
/obj/item/weapon/circular_saw = 100, \
/obj/item/weapon/hatchet = 75
/obj/item/weapon/FixOVein = 100, \
/obj/item/weapon/cable_coil = 75
)
can_infect = 1
blood_level = 1