Merge branch 'dev' of https://github.com/Baystation12/Baystation12 into frankenstein

This commit is contained in:
Chinsky
2015-05-20 08:52:46 +03:00
33 changed files with 415 additions and 178 deletions
+1 -1
View File
@@ -259,7 +259,7 @@
siemens_coefficient = 1
/obj/item/clothing/under/stripper/mankini
name = "the mankini"
name = "mankini"
desc = "No honest man would wear this abomination"
icon_state = "mankini"
siemens_coefficient = 1
@@ -91,24 +91,42 @@
if(MALE) their = "his"
if(FEMALE) their = "her"
var/sound = "pulse"
var/sound_strength
var/sound = "heartbeat"
var/sound_strength = "cannot hear"
var/heartbeat = 0
if(M.species && M.species.has_organ["heart"])
var/obj/item/organ/heart/heart = M.internal_organs_by_name["heart"]
if(heart && !heart.robotic)
heartbeat = 1
if(M.stat == DEAD || (M.status_flags&FAKEDEATH))
sound_strength = "cannot hear"
sound = "anything"
else
sound_strength = "hear a weak"
switch(body_part)
if("chest")
if(M.oxyloss < 50)
sound_strength = "hear a healthy"
sound = "pulse and respiration"
sound_strength = "hear"
sound = "no heartbeat"
if(heartbeat)
var/obj/item/organ/heart/heart = M.internal_organs_by_name["heart"]
if(heart.is_bruised() || M.getOxyLoss() > 50)
sound = "[pick("odd noises in","weak")] heartbeat"
else
sound = "healthy heartbeat"
var/obj/item/organ/heart/L = M.internal_organs_by_name["lungs"]
if(!L || M.losebreath)
sound += " and no respiration"
else if(M.is_lung_ruptured() || M.getOxyLoss() > 50)
sound += " and [pick("wheezing","gurgling")] sounds"
else
sound += " and healthy respiration"
if("eyes","mouth")
sound_strength = "cannot hear"
sound = "anything"
else
sound_strength = "hear a weak"
if(heartbeat)
sound_strength = "hear a weak"
sound = "pulse"
user.visible_message("[user] places [src] against [M]'s [body_part] and listens attentively.", "You place [src] against [their] [body_part]. You [sound_strength] [sound].")
return
@@ -16,13 +16,13 @@
seed.set_trait(TRAIT_SPREAD,2) // So it will function properly as vines.
seed.set_trait(TRAIT_POTENCY,rand(potency_min, potency_max)) // 70-100 potency will help guarantee a wide spread and powerful effects.
seed.set_trait(TRAIT_MATURATION,rand(maturation_min, maturation_max))
//make vine zero start off fully matured
var/obj/effect/plant/vine = new(T,seed)
vine.health = vine.max_health
vine.mature_time = 0
vine.process()
message_admins("<span class='notice'>Event: Spacevines spawned at [T.loc] ([T.x],[T.y],[T.z])</span>")
/obj/effect/dead_plant
@@ -49,6 +49,7 @@
icon_state = "bush4-1"
layer = 3
pass_flags = PASSTABLE
mouse_opacity = 2
var/health = 10
var/max_health = 100
+34 -24
View File
@@ -173,7 +173,7 @@
)
for(var/obj/item/organ/external/org in H.organs)
var/status = ""
var/list/status = list()
var/brutedamage = org.brute_dam
var/burndamage = org.burn_dam
if(halloss > 0)
@@ -181,29 +181,39 @@
brutedamage += halloss
if(prob(30))
burndamage += halloss
switch(brutedamage)
if(1 to 20)
status += "bruised"
if(20 to 40)
status += "wounded"
if(40 to INFINITY)
status += "mangled"
if(brutedamage > 0)
status = "bruised"
if(brutedamage > 20)
status = "bleeding"
if(brutedamage > 40)
status = "mangled"
if(brutedamage > 0 && burndamage > 0)
status += " and "
if(burndamage > 40)
status += "peeling away"
switch(burndamage)
if(1 to 10)
status += "numb"
if(10 to 40)
status += "blistered"
if(40 to INFINITY)
status += "peeling away"
else if(burndamage > 10)
status += "blistered"
else if(burndamage > 0)
status += "numb"
if(org.status & ORGAN_DESTROYED)
status = "MISSING!"
status += "MISSING"
if(org.status & ORGAN_MUTATED)
status = "weirdly shapen."
if(status == "")
status = "OK"
src.show_message(text("\t []My [] is [].",status=="OK"?"\blue ":"\red ",org.name,status),1)
status += "weirdly shapen"
if(org.dislocated == 2)
status += "dislocated"
if(org.status & ORGAN_BROKEN)
status += "hurts when touched"
if(org.status & ORGAN_DEAD)
status += "is bruised and necrotic"
if(!org.is_usable())
status += "dangling uselessly"
if(status.len)
src.show_message("My [org.name] is <span class='warning'> [english_list(status)].",1)
else
src.show_message("My [org.name] is <span class='notice'> OK.",1)
if((SKELETON in H.mutations) && (!H.w_uniform) && (!H.wear_suit))
H.play_xylophone()
else if (on_fire)
@@ -452,17 +462,17 @@
Stun(stun_duration)
Weaken(Floor(stun_duration/2))
return 1
/mob/living/carbon/proc/add_chemical_effect(var/effect, var/magnitude = 1)
if(effect in chem_effects)
chem_effects[effect] += magnitude
else
chem_effects[effect] = magnitude
chem_effects[effect] = magnitude
/mob/living/carbon/get_default_language()
if(default_language)
return default_language
if(!species)
return null
return species.default_language ? all_languages[species.default_language] : null
return species.default_language ? all_languages[species.default_language] : null
+13 -72
View File
@@ -274,76 +274,17 @@
wound_flavor_text["[temp.name]"] = "<span class='warning'>[t_He] has a robot [temp.name]!</span>\n"
continue
else
wound_flavor_text["[temp.name]"] = "<span class='warning'>[t_He] has a robot [temp.name]. It has"
if(temp.brute_dam) switch(temp.brute_dam)
if(0 to 20)
wound_flavor_text["[temp.name]"] += " some dents"
if(21 to INFINITY)
wound_flavor_text["[temp.name]"] += pick(" a lot of dents"," severe denting")
if(temp.brute_dam && temp.burn_dam)
wound_flavor_text["[temp.name]"] += " and"
if(temp.burn_dam) switch(temp.burn_dam)
if(0 to 20)
wound_flavor_text["[temp.name]"] += " some burns"
if(21 to INFINITY)
wound_flavor_text["[temp.name]"] += pick(" a lot of burns"," severe melting")
if(wound_flavor_text["[temp.name]"])
wound_flavor_text["[temp.name]"] += "!</span>\n"
else if(temp.wounds.len > 0)
var/list/wound_descriptors = list()
for(var/datum/wound/W in temp.wounds)
if(W.internal && !temp.open) continue // can't see internal wounds
var/this_wound_desc = W.desc
if(W.damage_type == BURN && W.salved) this_wound_desc = "salved [this_wound_desc]"
if(W.bleeding()) this_wound_desc = "bleeding [this_wound_desc]"
else if(W.bandaged) this_wound_desc = "bandaged [this_wound_desc]"
if(W.germ_level > 600) this_wound_desc = "badly infected [this_wound_desc]"
else if(W.germ_level > 330) this_wound_desc = "lightly infected [this_wound_desc]"
if(this_wound_desc in wound_descriptors)
wound_descriptors[this_wound_desc] += W.amount
continue
wound_descriptors[this_wound_desc] = W.amount
if(wound_descriptors.len)
var/list/flavor_text = list()
var/list/no_exclude = list("gaping wound", "big gaping wound", "massive wound", "large bruise",\
"huge bruise", "massive bruise", "severe burn", "large burn", "deep burn", "carbonised area")
for(var/wound in wound_descriptors)
switch(wound_descriptors[wound])
if(1)
if(!flavor_text.len)
flavor_text += "<span class='warning'>[t_He] has[prob(10) && !(wound in no_exclude) ? " what might be" : ""] a [wound]"
else
flavor_text += "[prob(10) && !(wound in no_exclude) ? " what might be" : ""] a [wound]"
if(2)
if(!flavor_text.len)
flavor_text += "<span class='warning'>[t_He] has[prob(10) && !(wound in no_exclude) ? " what might be" : ""] a pair of [wound]s"
else
flavor_text += "[prob(10) && !(wound in no_exclude) ? " what might be" : ""] a pair of [wound]s"
if(3 to 5)
if(!flavor_text.len)
flavor_text += "<span class='warning'>[t_He] has several [wound]s"
else
flavor_text += " several [wound]s"
if(6 to INFINITY)
if(!flavor_text.len)
flavor_text += "<span class='warning'>[t_He] has a bunch of [wound]s"
else
flavor_text += " a ton of [wound]\s"
var/flavor_text_string = ""
for(var/text = 1, text <= flavor_text.len, text++)
if(text == flavor_text.len && flavor_text.len > 1)
flavor_text_string += ", and"
else if(flavor_text.len > 1 && text > 1)
flavor_text_string += ","
flavor_text_string += flavor_text[text]
flavor_text_string += " on [t_his] [temp.name].</span><br>"
wound_flavor_text["[temp.name]"] = flavor_text_string
else
wound_flavor_text["[temp.name]"] = ""
wound_flavor_text["[temp.name]"] = "<span class='warning'>[t_He] has a robot [temp.name]. It has[temp.get_wounds_desc()]!</span>\n"
else if(temp.wounds.len > 0 || temp.open)
wound_flavor_text["[temp.name]"] = "<span class='warning'>[t_He] has [temp.get_wounds_desc()] on [t_his] [temp.name].</span><br>"
if(temp.status & ORGAN_BLEEDING)
is_bleeding["[temp.name]"] = 1
else
wound_flavor_text["[temp.name]"] = ""
if(temp.dislocated == 2)
wound_flavor_text["[temp.name]"] += "<span class='warning'>[capitalize(t_his)] [temp.joint] is dislocated!</span><br>"
if(((temp.status & ORGAN_BROKEN) && temp.brute_dam > temp.min_broken_damage) || (temp.status & ORGAN_MUTATED))
wound_flavor_text["[temp.name]"] += "<span class='warning'>[capitalize(t_his)] [temp.name] is dented and swollen!</span><br>"
//Handles the text strings being added to the actual description.
//If they have something that covers the limb, and it is not missing, put flavortext. If it is covered but bleeding, add other flavortext.
@@ -354,9 +295,9 @@
msg += wound_flavor_text["head"]
else if(is_bleeding["head"])
msg += "<span class='warning'>[src] has blood running down [t_his] face!</span>\n"
if(wound_flavor_text["chest"] && !w_uniform && !skipjumpsuit) //No need. A missing chest gibs you.
msg += wound_flavor_text["chest"]
else if(is_bleeding["chest"])
if(wound_flavor_text["upper body"] && !w_uniform && !skipjumpsuit) //No need. A missing chest gibs you.
msg += wound_flavor_text["upper body"]
else if(is_bleeding["upper body"])
display_chest = 1
if(wound_flavor_text["left arm"] && (is_destroyed["left arm"] || (!w_uniform && !skipjumpsuit)))
msg += wound_flavor_text["left arm"]
@@ -374,9 +315,9 @@
msg += wound_flavor_text["right hand"]
else if(is_bleeding["right hand"])
display_gloves = 1
if(wound_flavor_text["groin"] && (is_destroyed["groin"] || (!w_uniform && !skipjumpsuit)))
msg += wound_flavor_text["groin"]
else if(is_bleeding["groin"])
if(wound_flavor_text["lower body"] && (is_destroyed["lower body"] || (!w_uniform && !skipjumpsuit)))
msg += wound_flavor_text["lower body"]
else if(is_bleeding["lower body"])
display_chest = 1
if(wound_flavor_text["left leg"] && (is_destroyed["left leg"] || (!w_uniform && !skipjumpsuit)))
msg += wound_flavor_text["left leg"]
@@ -129,7 +129,10 @@
return
if(istype(target,/obj/machinery/portable_atmospherics/hydroponics))
var/obj/machinery/portable_atmospherics/hydroponics/T = target
T.harvest(user)
if(T.harvest) //Try to harvest, assuming it's alive.
T.harvest(user)
else if(T.dead) //It's probably dead otherwise.
T.remove_dead(user)
else
user << "Harvesting \a [target] is not the purpose of this tool. The [src] is for plants being grown."
+37
View File
@@ -297,6 +297,43 @@
assailant << "<span class='warning'>You are no longer pinning [affecting] to the ground.</span>"
force_down = 0
return
var/mob/living/carbon/human/H = M
var/obj/item/organ/external/E = H.get_organ(hit_zone)
if(E && !(E.status & ORGAN_DESTROYED))
assailant.visible_message("<span class='notice'>[assailant] starts inspecting [affecting]'s [E.name] carefully.</span>")
if(do_mob(assailant,H, 10))
if(E.wounds.len)
assailant << "<span class='warning'>You find [E.get_wounds_desc()]</span>"
else
assailant << "<span class='notice'>You find no visible wounds.</span>"
else
assailant << "<span class='notice'>You must stand still to inspect [E] for wounds.</span>"
assailant << "<span class='notice'>Checking bones now...</span>"
if(do_mob(assailant, H, 20))
if(E.status & ORGAN_BROKEN)
assailant << "<span class='warning'>The [E.encased ? E.encased : "bone in the [E.name]"] moves slightly when you poke it!</span>"
H.custom_pain("Your [E.name] hurts where it's poked.")
else
assailant << "<span class='notice'>The [E.encased ? E.encased : "bones in the [E.name]"] seem to be fine.</span>"
else
assailant << "<span class='notice'>You must stand still to feel [E] for fractures.</span>"
assailant << "<span class='notice'>Checking skin now...</span>"
if(do_mob(assailant, H, 10))
var/bad = 0
if(H.getToxLoss() >= 40)
assailant << "<span class='warning'>[H] has an unhealthy skin discoloration.</span>"
bad = 1
if(H.getOxyLoss() >= 20)
assailant << "<span class='warning'>[H]'s skin is unusaly pale.</span>"
bad = 1
if(E.status & ORGAN_DEAD)
assailant << "<span class='warning'>[E] is decaying!</span>"
if(!bad)
assailant << "<span class='notice'>[H]'s skin is normal.</span>"
else
assailant << "<span class='notice'>You must stand still to check [H]'s skin for abnormalities.</span>"
else
assailant << "<span class='notice'>[H] is missing that bodypart.</span>"
if(I_GRAB)
if(state < GRAB_AGGRESSIVE)
assailant << "<span class='warning'>You require a better grab to do this.</span>"
+4 -2
View File
@@ -106,7 +106,8 @@
O.add_ai_verbs()
O.rename_self("ai",1)
qdel(src)
spawn(0) // Mobs still instantly del themselves, thus we need to spawn or O will never be returned
qdel(src)
return O
//human -> robot
@@ -158,7 +159,8 @@
callHook("borgify", list(O))
O.Namepick()
qdel(src)
spawn(0) // Mobs still instantly del themselves, thus we need to spawn or O will never be returned
qdel(src)
return O
//human -> alien
+52
View File
@@ -926,6 +926,58 @@ Note that amputating the affected organ does in fact remove the infection from t
"\red You hear a sickening sizzle.")
disfigured = 1
/obj/item/organ/external/proc/get_wounds_desc()
. = ""
if(status & ORGAN_ROBOT)
if(brute_dam)
switch(brute_dam)
if(0 to 20)
. += " some dents"
if(21 to INFINITY)
. += pick(" a lot of dents"," severe denting")
if(brute_dam && burn_dam)
. += " and"
if(burn_dam)
switch(burn_dam)
if(0 to 20)
. += " some burns"
if(21 to INFINITY)
. += pick(" a lot of burns"," severe melting")
return
var/list/wound_descriptors = list()
if(open > 1)
wound_descriptors["an open incision"] = 1
else if (open)
wound_descriptors["an incision"] = 1
for(var/datum/wound/W in wounds)
if(W.internal && !open) continue // can't see internal wounds
var/this_wound_desc = W.desc
if(W.damage_type == BURN && W.salved) this_wound_desc = "salved [this_wound_desc]"
if(W.bleeding()) this_wound_desc = "bleeding [this_wound_desc]"
else if(W.bandaged) this_wound_desc = "bandaged [this_wound_desc]"
if(W.germ_level > 600) this_wound_desc = "badly infected [this_wound_desc]"
else if(W.germ_level > 330) this_wound_desc = "lightly infected [this_wound_desc]"
if(wound_descriptors[this_wound_desc])
wound_descriptors[this_wound_desc] += W.amount
else
wound_descriptors[this_wound_desc] = W.amount
if(wound_descriptors.len)
var/list/flavor_text = list()
var/list/no_exclude = list("gaping wound", "big gaping wound", "massive wound", "large bruise",\
"huge bruise", "massive bruise", "severe burn", "large burn", "deep burn", "carbonised area")
for(var/wound in wound_descriptors)
switch(wound_descriptors[wound])
if(1)
flavor_text += "[prob(10) && !(wound in no_exclude) ? "what might be " : ""]a [wound]"
if(2)
flavor_text += "[prob(10) && !(wound in no_exclude) ? "what might be " : ""]a pair of [wound]s"
if(3 to 5)
flavor_text += "several [wound]s"
if(6 to INFINITY)
flavor_text += "a ton of [wound]\s"
return english_list(flavor_text)
/****************************************************
ORGAN DEFINES
****************************************************/
@@ -11,6 +11,17 @@
description = "A chemical element, the builing block of life."
reagent_state = SOLID
color = "#1C1300"
ingest_met = REM * 5
/datum/reagent/carbon/affect_ingest(var/mob/living/carbon/M, var/alien, var/removed)
if(alien == IS_DIONA)
return
if(M.ingested && M.ingested.reagent_list.len > 1) // Need to have at least 2 reagents - cabon and something to remove
var/effect = 1 / (M.ingested.reagent_list.len - 1)
for(var/datum/reagent/R in M.ingested.reagent_list)
if(R == src)
continue
M.ingested.remove_reagent(R.id, removed * effect)
/datum/reagent/carbon/touch_turf(var/turf/T)
if(!istype(T, /turf/space))
@@ -329,7 +329,7 @@
M.stuttering = 0
M.confused = 0
if(M.ingested)
for(var/datum/reagent/R in M.ingested)
for(var/datum/reagent/R in M.ingested.reagent_list)
if(istype(R, /datum/reagent/ethanol))
R.dose = max(R.dose - removed * 5, 0)
@@ -191,7 +191,7 @@
if(9)
item_type = "[pick("wicked","evil","byzantine","dangerous")] looking [pick("device","contraption","thing","trap")]"
apply_prefix = 0
new_item = new /obj/item/weapon/legcuffs/beartrap(src.loc)
new_item = new /obj/item/weapon/beartrap(src.loc)
additional_desc = "[pick("It looks like it could take a limb off",\
"Could be some kind of animal trap",\
"There appear to be [pick("dark red","dark purple","dark green","dark blue")] stains along part of it")]."
+1 -1
View File
@@ -123,7 +123,7 @@
break_to_parts()
return
if(!material)
if(can_plate && !material)
user << "<span class='warning'>There's nothing to put \the [W] on! Try adding plating to \the [src] first.</span>"
return