Merge remote-tracking branch 'upstream/master' into rcs-update

This commit is contained in:
Fox-McCloud
2015-09-23 01:19:28 -04:00
86 changed files with 1403 additions and 2019 deletions
+2
View File
@@ -13,6 +13,8 @@
for(var/turf/T in A)
if(T.density)
continue
if(locate(/obj/structure/grille, T)) // Quick check to not spawn in windows
continue
turfs.Add(T)
var/turf/T = pick_n_take(turfs)
+5
View File
@@ -11,6 +11,7 @@
var/datum/money_account/detailed_account_view
var/creating_new_account = 0
var/activated = 1
var/const/fund_cap = 1000000
light_color = LIGHT_COLOR_GREEN
@@ -175,6 +176,10 @@
if("finalise_create_account")
var/account_name = href_list["holder_name"]
var/starting_funds = max(text2num(href_list["starting_funds"]), 0)
starting_funds = Clamp(starting_funds, 0, station_account.money) // Not authorized to put the station in debt.
starting_funds = min(starting_funds, fund_cap) // Not authorized to give more than the fund cap.
create_account(account_name, starting_funds, src)
if(starting_funds > 0)
//subtract the money
-58
View File
@@ -1,58 +0,0 @@
//Misc
#define DEAD_PLANT_COLOUR "#C2A180"
// Definitions for genes (trait groupings)
#define GENE_BIOCHEMISTRY "biochemistry"
#define GENE_HARDINESS "hardiness"
#define GENE_ENVIRONMENT "environment"
#define GENE_METABOLISM "metabolism"
#define GENE_STRUCTURE "appearance"
#define GENE_DIET "diet"
#define GENE_PIGMENT "pigment"
#define GENE_OUTPUT "output"
#define GENE_ATMOSPHERE "atmosphere"
#define GENE_VIGOUR "vigour"
#define GENE_FRUIT "fruit"
#define GENE_SPECIAL "special"
#define ALL_GENES list(GENE_BIOCHEMISTRY,GENE_HARDINESS,GENE_ENVIRONMENT,GENE_METABOLISM,GENE_STRUCTURE,GENE_DIET,GENE_PIGMENT,GENE_OUTPUT,GENE_ATMOSPHERE,GENE_VIGOUR,GENE_FRUIT,GENE_SPECIAL)
//Definitions for traits (individual descriptors)
#define TRAIT_CHEMS 1
#define TRAIT_EXUDE_GASSES 2
#define TRAIT_ALTER_TEMP 3
#define TRAIT_POTENCY 4
#define TRAIT_HARVEST_REPEAT 5
#define TRAIT_PRODUCES_POWER 6
#define TRAIT_JUICY 7
#define TRAIT_PRODUCT_ICON 8
#define TRAIT_PLANT_ICON 0
#define TRAIT_CONSUME_GASSES 10
#define TRAIT_REQUIRES_NUTRIENTS 11
#define TRAIT_NUTRIENT_CONSUMPTION 12
#define TRAIT_REQUIRES_WATER 13
#define TRAIT_WATER_CONSUMPTION 14
#define TRAIT_CARNIVOROUS 15
#define TRAIT_PARASITE 16
#define TRAIT_STINGS 17
#define TRAIT_IDEAL_HEAT 18
#define TRAIT_HEAT_TOLERANCE 19
#define TRAIT_IDEAL_LIGHT 20
#define TRAIT_LIGHT_TOLERANCE 21
#define TRAIT_LOWKPA_TOLERANCE 22
#define TRAIT_HIGHKPA_TOLERANCE 23
#define TRAIT_EXPLOSIVE 24
#define TRAIT_TOXINS_TOLERANCE 25
#define TRAIT_PEST_TOLERANCE 26
#define TRAIT_WEED_TOLERANCE 27
#define TRAIT_ENDURANCE 28
#define TRAIT_YIELD 29
#define TRAIT_SPREAD 30
#define TRAIT_MATURATION 31
#define TRAIT_PRODUCTION 32
#define TRAIT_TELEPORTING 33
#define TRAIT_PLANT_COLOUR 34
#define TRAIT_PRODUCT_COLOUR 35
#define TRAIT_BIOLUM 36
#define TRAIT_BIOLUM_COLOUR 37
#define TRAIT_IMMUTABLE 38
+1
View File
@@ -47,6 +47,7 @@
set_trait(TRAIT_PLANT_ICON, 0) // Icon to use for the plant growing in the tray.
set_trait(TRAIT_PRODUCT_COLOUR, 0) // Colour to apply to product icon.
set_trait(TRAIT_BIOLUM_COLOUR, 0) // The colour of the plant's radiance.
set_trait(TRAIT_RARITY, 0) // How rare the plant is. Used for giving points to cargo when shipping off to Centcom.
set_trait(TRAIT_POTENCY, 1) // General purpose plant strength value.
set_trait(TRAIT_REQUIRES_NUTRIENTS, 1) // The plant can starve.
set_trait(TRAIT_REQUIRES_WATER, 1) // The plant can become dehydrated.
+24
View File
@@ -33,6 +33,7 @@
set_trait(TRAIT_MATURATION,4)
set_trait(TRAIT_PRODUCTION,4)
set_trait(TRAIT_PRODUCT_COLOUR,"#00EDC6")
set_trait(TRAIT_RARITY,20)
/datum/seed/chili/ghost
name = "ghostchili"
@@ -49,6 +50,7 @@
set_trait(TRAIT_PRODUCTION,10)
set_trait(TRAIT_YIELD,3)
set_trait(TRAIT_PRODUCT_COLOUR,"#00EDC6")
set_trait(TRAIT_RARITY,20)
// Berry plants/variants.
/datum/seed/berry
@@ -90,6 +92,7 @@
set_trait(TRAIT_YIELD,2)
set_trait(TRAIT_POTENCY,10)
set_trait(TRAIT_PRODUCT_COLOUR,"c9fa16")
set_trait(TRAIT_RARITY,20)
/datum/seed/berry/poison
name = "poisonberries"
@@ -103,6 +106,7 @@
/datum/seed/berry/poison/New()
..()
set_trait(TRAIT_PRODUCT_COLOUR,"#6DC961")
set_trait(TRAIT_RARITY,10) // Mildly poisonous berries are common in reality
/datum/seed/berry/poison/death
name = "deathberries"
@@ -117,6 +121,7 @@
set_trait(TRAIT_YIELD,3)
set_trait(TRAIT_POTENCY,50)
set_trait(TRAIT_PRODUCT_COLOUR,"#7A5454")
set_trait(TRAIT_RARITY,30)
// Nettles/variants.
/datum/seed/nettle
@@ -155,6 +160,7 @@
set_trait(TRAIT_YIELD,2)
set_trait(TRAIT_PRODUCT_COLOUR,"#8C5030")
set_trait(TRAIT_PLANT_COLOUR,"#634941")
set_trait(TRAIT_RARITY,10)
//Tomatoes/variants.
/datum/seed/tomato
@@ -192,6 +198,7 @@
..()
set_trait(TRAIT_YIELD,3)
set_trait(TRAIT_PRODUCT_COLOUR,"#FF0000")
set_trait(TRAIT_RARITY,20)
/datum/seed/tomato/killer
name = "killertomato"
@@ -206,6 +213,7 @@
..()
set_trait(TRAIT_YIELD,2)
set_trait(TRAIT_PRODUCT_COLOUR,"#A86747")
set_trait(TRAIT_RARITY,30)
/datum/seed/tomato/blue
name = "bluetomato"
@@ -219,6 +227,7 @@
..()
set_trait(TRAIT_PRODUCT_COLOUR,"#4D86E8")
set_trait(TRAIT_PLANT_COLOUR,"#070AAD")
set_trait(TRAIT_RARITY,20)
/datum/seed/tomato/blue/teleport
name = "bluespacetomato"
@@ -234,6 +243,7 @@
set_trait(TRAIT_PRODUCT_COLOUR,"#00E5FF")
set_trait(TRAIT_BIOLUM,1)
set_trait(TRAIT_BIOLUM_COLOUR,"#4DA4A8")
set_trait(TRAIT_RARITY,50)
//Eggplants/varieties.
/datum/seed/eggplant
@@ -299,6 +309,7 @@
set_trait(TRAIT_YIELD,3)
set_trait(TRAIT_PRODUCT_COLOUR,"#FFDD00")
set_trait(TRAIT_PLANT_COLOUR,"#D6B44D")
set_trait(TRAIT_RARITY,40) // Alchemy!
//Ambrosia/varieties.
/datum/seed/ambrosia
@@ -330,6 +341,10 @@
kitchen_tag = "ambrosiadeus"
preset_icon = "ambrosiadeus"
/datum/seed/ambrosia/deus/New()
..()
set_trait(TRAIT_RARITY,40)
//Tobacco/varieties
/datum/seed/tobacco
name = "tobacco"
@@ -366,6 +381,7 @@
set_trait(TRAIT_POTENCY, 5)
set_trait(TRAIT_PRODUCT_COLOUR,"#A3F0AD")
set_trait(TRAIT_PLANT_COLOUR,"#2A9C61")
set_trait(TRAIT_RARITY,20)
//Tea/varieties
/datum/seed/teaaspera
@@ -405,6 +421,7 @@
set_trait(TRAIT_PRODUCT_COLOUR,"#A3F0AD")
set_trait(TRAIT_PLANT_COLOUR,"#2A9C61")
set_trait(TRAIT_PLANT_ICON,"tree6")
set_trait(TRAIT_RARITY,20)
//Coffee/varieties
/datum/seed/coffeea
@@ -445,6 +462,7 @@
set_trait(TRAIT_PRODUCT_ICON,"coffee")
set_trait(TRAIT_PRODUCT_COLOUR,"#A22043")
set_trait(TRAIT_PLANT_ICON,"bush8")
set_trait(TRAIT_RARITY,20)
//Mushrooms/varieties.
/datum/seed/mushroom
@@ -519,6 +537,7 @@
set_trait(TRAIT_YIELD,1)
set_trait(TRAIT_PRODUCT_COLOUR,"#FAC0F2")
set_trait(TRAIT_PLANT_COLOUR,"#C4B1C2")
set_trait(TRAIT_RARITY,30)
/datum/seed/mushroom/hallucinogenic
name = "reishi"
@@ -594,6 +613,7 @@
set_trait(TRAIT_PRODUCT_COLOUR,"#EDE8EA")
set_trait(TRAIT_PLANT_COLOUR,"#E6D8DD")
set_trait(TRAIT_PLANT_ICON,"mushroom5")
set_trait(TRAIT_RARITY,30)
/datum/seed/mushroom/towercap
name = "towercap"
@@ -631,6 +651,7 @@
set_trait(TRAIT_PRODUCT_COLOUR,"#DDFAB6")
set_trait(TRAIT_PLANT_COLOUR,"#EFFF8A")
set_trait(TRAIT_PLANT_ICON,"mushroom7")
set_trait(TRAIT_RARITY,20)
/datum/seed/mushroom/plastic
name = "plastic"
@@ -716,6 +737,7 @@
set_trait(TRAIT_PRODUCT_ICON,"flower2")
set_trait(TRAIT_PRODUCT_COLOUR,"#B5ABDD")
set_trait(TRAIT_PLANT_ICON,"flower2")
set_trait(TRAIT_RARITY,10)
/datum/seed/flower/novaflower
name = "novaflowers"
@@ -805,6 +827,7 @@
set_trait(TRAIT_PRODUCT_ICON,"bean")
set_trait(TRAIT_PRODUCT_COLOUR,"#EBE7C0")
set_trait(TRAIT_PLANT_ICON,"stalk")
set_trait(TRAIT_RARITY,20)
//Everything else
/datum/seed/peanuts
@@ -1178,6 +1201,7 @@
set_trait(TRAIT_PRODUCT_COLOUR,"#96D278")
set_trait(TRAIT_PLANT_COLOUR,"#6F7A63")
set_trait(TRAIT_PLANT_ICON,"vine2")
set_trait(TRAIT_RARITY,30)
/datum/seed/diona
name = "diona"
@@ -113,6 +113,7 @@
dat += "<tr><td><b>Maturation time</b></td><td>[grown_seed.get_trait(TRAIT_MATURATION)]</td></tr>"
dat += "<tr><td><b>Production time</b></td><td>[grown_seed.get_trait(TRAIT_PRODUCTION)]</td></tr>"
dat += "<tr><td><b>Potency</b></td><td>[grown_seed.get_trait(TRAIT_POTENCY)]</td></tr>"
dat += "<tr><td><b>Species Discovery Value</b></td><td>[grown_seed.get_trait(TRAIT_RARITY)]</td></tr>"
//--FalseIncarnate
//Tray-specific stats like Age and Mutation Modifier, not shown if target was not a hydroponics tray or soil
+1 -1
View File
@@ -73,7 +73,7 @@
/datum/species/proc/handle_autohiss(message, datum/language/lang, mode)
if(!autohiss_basic_map)
return message
if(autohiss_exempt && (lang.name in autohiss_exempt))
if(autohiss_exempt && (lang && (lang.name in autohiss_exempt)))
return message
var/map = autohiss_basic_map.Copy()
@@ -62,14 +62,11 @@
/mob/living/carbon/brain/blob_act()
return
/mob/living/carbon/brain/on_forcemove(atom/newloc)
if(container)
container.loc = newloc
else //something went very wrong.
CRASH("Brainmob without container.")
loc = container
/mob/living/carbon/brain/binarycheck()
return istype(loc, /obj/item/device/mmi/posibrain)
loc = container
+10 -1
View File
@@ -25,4 +25,13 @@
if(R.radio)
spawn(0) R.radio.hear_talk(src, trim(sanitize(radio_MMI_message)), say_quote(radio_MMI_message), speaking)
..(message)
..(message)
/mob/living/carbon/brain/can_speak(var/datum/language/speaking)
if(speaking == all_languages["Robot Talk"] && istype(loc, /obj/item/device/mmi/posibrain)) //so posibrains can speak binary; less messy than adding the language
return 1
else return ..()
/mob/living/carbon/brain/binarycheck()
return istype(loc, /obj/item/device/mmi/posibrain)
@@ -285,7 +285,7 @@
while(limbs_affected != 0 && valid_limbs.len > 0)
processing_dismember = pick(valid_limbs)
if(processing_dismember.limb_name != "chest" && processing_dismember.limb_name != "head" && processing_dismember.limb_name != "groin")
processing_dismember.droplimb(1,pick(0,1,2),0,1)
processing_dismember.droplimb(1,DROPLIMB_EDGE,0,1)
valid_limbs -= processing_dismember
limbs_affected -= 1
else valid_limbs -= processing_dismember
@@ -316,7 +316,7 @@
while(limbs_affected != 0 && valid_limbs.len > 0)
processing_dismember = pick(valid_limbs)
if(processing_dismember.limb_name != "chest" && processing_dismember.limb_name != "head" && processing_dismember.limb_name != "groin")
processing_dismember.droplimb(1,pick(0,2),0,1)
processing_dismember.droplimb(1,DROPLIMB_EDGE,0,1)
valid_limbs -= processing_dismember
limbs_affected -= 1
else valid_limbs -= processing_dismember
@@ -341,7 +341,7 @@
while(limbs_affected != 0 && valid_limbs.len > 0)
processing_dismember = pick(valid_limbs)
if(processing_dismember.limb_name != "chest" && processing_dismember.limb_name != "head" && processing_dismember.limb_name != "groin")
processing_dismember.droplimb(1,1,0,1)
processing_dismember.droplimb(1,DROPLIMB_EDGE,0,1)
valid_limbs -= processing_dismember
limbs_affected -= 1
else valid_limbs -= processing_dismember
@@ -1780,9 +1780,8 @@
prot["head"] = max(1 - I.permeability_coefficient, prot["head"])
var/protection = (prot["head"] + prot["arms"] + prot["feet"] + prot["legs"] + prot["groin"] + prot["chest"] + prot["hands"])/7
return protection
/mob/living/carbon/human/proc/get_full_print()
if(!dna || !dna.uni_identity)
return
return md5(dna.uni_identity)
@@ -262,7 +262,7 @@ emp_act
else
visible_message("\red <B>[src] has been attacked in the [hit_area] with [I.name] by [user]!</B>")
var/armor = run_armor_check(affecting, "melee", "Your armor has protected your [hit_area].", "Your armor has softened hit to your [hit_area].")
var/armor = run_armor_check(affecting, "melee", "Your armor has protected your [hit_area].", "Your armor has softened hit to your [hit_area].", armour_penetration = I.armour_penetration)
var/weapon_sharp = is_sharp(I)
var/weapon_edge = has_edge(I)
if ((weapon_sharp || weapon_edge) && prob(getarmor(user.zone_sel.selecting, "melee")))
+13 -138
View File
@@ -2,150 +2,25 @@
/mob/living/carbon/human/whisper(message as text)
var/alt_name = ""
message = trim_strip_html_properly(message)
log_whisper("[src.name]/[src.key] : [message]")
if (src.client)
if (src.client.prefs.muted & MUTE_IC)
src << "\red You cannot whisper (muted)."
return
if (src.client.handle_spam_prevention(message,MUTE_IC))
return
if (src.stat == 2)
return src.say_dead(message)
if (src.stat)
return
if(name != GetVoice())
alt_name = "(as [get_id_name("Unknown")])"
message = trim_strip_html_properly(message) //bit of duplicate code, acceptable because the workaround would be annoying
//parse the language code and consume it
var/datum/language/speaking = parse_language(message)
if (speaking)
message = copytext(message,2+length(speaking.key))
whisper_say(message, speaking, alt_name)
//This is used by both the whisper verb and human/say() to handle whispering
/mob/living/carbon/human/proc/whisper_say(var/message, var/datum/language/speaking = null, var/alt_name="", var/verb="whispers")
if (istype(src.wear_mask, /obj/item/clothing/mask/muzzle))
src << "<span class='danger'>You're muzzled and cannot speak!</span>"
return
var/message_range = 1
var/eavesdropping_range = 2
var/watching_range = 5
var/italics = 1
var/not_heard //the message displayed to people who could not hear the whispering
if (speaking)
if (speaking.whisper_verb)
verb = speaking.whisper_verb
not_heard = "[verb] something"
else
var/adverb = pick("quietly", "softly")
verb = "[speaking.speech_verb] [adverb]"
not_heard = "[speaking.speech_verb] something [adverb]"
if(speaking)
message = copytext(message, 2 + length(speaking.key))
else
not_heard = "[verb] something" //TODO get rid of the null language and just prevent speech if language is null
speaking = get_default_language()
message = capitalize(trim(message))
// This is broadcast to all mobs with the language,
// irrespective of distance or anything else.
if(speaking && (speaking.flags & HIVEMIND))
speaking.broadcast(src,trim(message))
return 1
if(speech_problem_flag)
var/list/handle_r = handle_speech_problems(message)
message = handle_r[1]
verb = handle_r[2]
if(verb == "yells loudly")
verb = "slurs emphatically"
else
var/adverb = pick("quietly", "softly")
verb = "[verb] [adverb]"
message = trim_left(message)
message = handle_autohiss(message, speaking)
speech_problem_flag = handle_r[3]
if(!message || message=="")
return
//looks like this only appears in whisper. Should it be elsewhere as well? Maybe handle_speech_problems?
/*var/voice_sub
for(var/obj/item/gear in list(wear_mask,wear_suit,head))
if(!gear)
continue
var/obj/item/voice_changer/changer = locate() in gear
if(changer && changer.active && changer.voice)
voice_sub = changer.voice
if(voice_sub == "Unknown")
if(copytext(message, 1, 2) != "*")
var/list/temp_message = text2list(message, " ")
var/list/pick_list = list()
for(var/i = 1, i <= temp_message.len, i++)
pick_list += i
for(var/i=1, i <= abs(temp_message.len/3), i++)
var/H = pick(pick_list)
if(findtext(temp_message[H], "*") || findtext(temp_message[H], ";") || findtext(temp_message[H], ":")) continue
temp_message[H] = ninjaspeak(temp_message[H])
pick_list -= H
message = list2text(temp_message, " ")
message = replacetext(message, "o", "")
message = replacetext(message, "p", "")
message = replacetext(message, "l", "")
message = replacetext(message, "s", "")
message = replacetext(message, "u", "")
message = replacetext(message, "b", "")*/
var/list/listening = hearers(message_range, src)
listening |= src
//ghosts
for (var/mob/M in dead_mob_list) //does this include players who joined as observers as well?
if (!(M.client))
continue
if(M.stat == DEAD && M.client && (M.client.prefs.toggles & CHAT_GHOSTEARS))
listening |= M
//Pass whispers on to anything inside the immediate listeners.
for(var/mob/L in listening)
for(var/mob/C in L.contents)
if(istype(C,/mob/living))
listening += C
//pass on the message to objects that can hear us.
for (var/obj/O in view(message_range, src))
spawn (0)
if (O)
O.hear_talk(src, message, verb, speaking)
var/list/eavesdropping = hearers(eavesdropping_range, src)
eavesdropping -= src
eavesdropping -= listening
var/list/watching = hearers(watching_range, src)
watching -= src
watching -= listening
watching -= eavesdropping
//now mobs
var/speech_bubble_test = say_test(message)
var/image/speech_bubble = image('icons/mob/talk.dmi',src,"h[speech_bubble_test]")
spawn(30) qdel(speech_bubble)
for(var/mob/M in listening)
M << speech_bubble
M.hear_say(message, verb, speaking, alt_name, italics, src)
if (eavesdropping.len)
var/new_message = stars(message) //hopefully passing the message twice through stars() won't hurt... I guess if you already don't understand the language, when they speak it too quietly to hear normally you would be able to catch even less.
for(var/mob/M in eavesdropping)
M << speech_bubble
M.hear_say(new_message, verb, speaking, alt_name, italics, src)
if (watching.len)
var/rendered = "<span class='game say'><span class='name'>[src.name]</span> [not_heard].</span>"
for (var/mob/M in watching)
M.show_message(rendered, 2)
whisper_say(message, speaking, alt_name)
+11
View File
@@ -311,6 +311,10 @@
if (C.legcuffed && !initial(C.legcuffed))
C.unEquip(C.legcuffed)
C.legcuffed = initial(C.legcuffed)
if(C.reagents)
for(var/datum/reagent/R in C.reagents.reagent_list)
C.reagents.clear_reagents()
C.reagents.addiction_list.Cut()
hud_updateflag |= 1 << HEALTH_HUD
hud_updateflag |= 1 << STATUS_HUD
@@ -322,10 +326,16 @@
setCloneLoss(0)
setBrainLoss(0)
setStaminaLoss(0)
SetSleeping(0)
setHalLoss(0)
SetParalysis(0)
SetStunned(0)
SetWeakened(0)
losebreath = 0
dizziness = 0
jitteriness = 0
confused = 0
drowsyness = 0
radiation = 0
nutrition = 400
bodytemperature = 310
@@ -337,6 +347,7 @@
ear_deaf = 0
ear_damage = 0
heal_overall_damage(1000, 1000)
ExtinguishMob()
fire_stacks = 0
on_fire = 0
suiciding = 0
+10 -2
View File
@@ -10,8 +10,16 @@
1 - halfblock
2 - fullblock
*/
/mob/living/proc/run_armor_check(var/def_zone = null, var/attack_flag = "melee", var/absorb_text = null, var/soften_text = null)
/mob/living/proc/run_armor_check(var/def_zone = null, var/attack_flag = "melee", var/absorb_text = null, var/soften_text = null, armour_penetration, penetrated_text)
var/armor = getarmor(def_zone, attack_flag)
//the if "armor" check is because this is used for everything on /living, including humans
if(armor && armor < 100 && armour_penetration) // Armor with 100+ protection can not be penetrated for admin items
armor = max(0, armor - armour_penetration)
if(penetrated_text)
src << "<span class='userdanger'>[penetrated_text]</span>"
else
src << "<span class='userdanger'>Your armor was penetrated!</span>"
if(armor >= 100)
if(absorb_text)
@@ -42,7 +50,7 @@
Stun(2)
//Armor
var/armor = run_armor_check(def_zone, P.flag)
var/armor = run_armor_check(def_zone, P.flag, armour_penetration = P.armour_penetration)
var/proj_sharp = is_sharp(P)
var/proj_edge = has_edge(P)
if ((proj_sharp || proj_edge) && prob(getarmor(def_zone, P.flag)))
+131 -4
View File
@@ -76,9 +76,6 @@ proc/get_radio_key_from_channel(var/channel)
verb = pick("yells","roars","hollers")
speech_problem_flag = 1
if(COMIC in mutations)
message = "<span class='sans'>[message]</span>"
if(slurring)
message = slur(message)
verb = "slurs"
@@ -88,12 +85,19 @@ proc/get_radio_key_from_channel(var/channel)
verb = "stammers"
speech_problem_flag = 1
if(COMIC in mutations)
message = "<span class='sans'>[message]</span>"
returns[1] = message
returns[2] = verb
returns[3] = speech_problem_flag
return returns
/mob/living/proc/handle_message_mode(message_mode, message, verb, speaking, used_radios, alt_name)
switch(message_mode)
if("whisper") //all mobs can whisper by default
whisper_say(message, speaking, alt_name)
return 1
return 0
/mob/living/proc/handle_speech_sound()
@@ -291,4 +295,127 @@ proc/get_radio_key_from_channel(var/channel)
else //everything else failed, emote is probably invalid
if(act == "help") return //except help, because help is handled individually
src << "\blue Unusable emote '[act]'. Say *help for a list."
src << "\blue Unusable emote '[act]'. Say *help for a list."
/mob/living/whisper(message as text)
message = trim_strip_html_properly(message)
//parse the language code and consume it
var/datum/language/speaking = parse_language(message)
if(speaking)
message = copytext(message, 2 + length(speaking.key))
else
speaking = get_default_language()
// This is broadcast to all mobs with the language,
// irrespective of distance or anything else.
if(speaking && (speaking.flags & HIVEMIND))
speaking.broadcast(src,trim(message))
return 1
message = trim_left(message)
message = handle_autohiss(message, speaking)
whisper_say(message, speaking)
/mob/living/proc/whisper_say(var/message, var/datum/language/speaking = null, var/alt_name="", var/verb="whispers")
if(client)
if(client.prefs.muted & MUTE_IC)
src << "<span class='danger'>You cannot speak in IC (Muted).</span>"
return
if(stat)
if(stat == 2)
return say_dead(message)
return
if(is_muzzled())
src << "<span class='danger'>You're muzzled and cannot speak!</span>"
return
var/message_range = 1
var/eavesdropping_range = 2
var/watching_range = 5
var/italics = 1
var/not_heard //the message displayed to people who could not hear the whispering
if(speaking)
if(speaking.whisper_verb)
verb = speaking.whisper_verb
not_heard = "[verb] something"
else
var/adverb = pick("quietly", "softly")
verb = "[speaking.speech_verb] [adverb]"
not_heard = "[speaking.speech_verb] something [adverb]"
else
not_heard = "[verb] something" //TODO get rid of the null language and just prevent speech if language is null
message = trim(message)
var/speech_problem_flag = 0
var/list/handle_s = handle_speech_problems(message, verb)
message = handle_s[1]
verb = handle_s[2]
speech_problem_flag = handle_s[3]
if(verb == "yells loudly")
verb = "slurs emphatically"
else if(speech_problem_flag)
var/adverb = pick("quietly", "softly")
verb = "[verb] [adverb]"
if(!message || message=="")
return
var/list/listening = hearers(message_range, src)
listening |= src
//ghosts
for(var/mob/M in dead_mob_list) //does this include players who joined as observers as well?
if(!M.client)
continue
if(M.stat == DEAD && M.client && (M.client.prefs.toggles & CHAT_GHOSTEARS))
listening |= M
//Pass whispers on to anything inside the immediate listeners.
for(var/mob/L in listening)
for(var/mob/C in L.contents)
if(istype(C,/mob/living))
listening += C
//pass on the message to objects that can hear us.
for(var/obj/O in view(message_range, src))
spawn(0)
if(O)
O.hear_talk(src, message, verb, speaking)
var/list/eavesdropping = hearers(eavesdropping_range, src)
eavesdropping -= src
eavesdropping -= listening
var/list/watching = hearers(watching_range, src)
watching -= src
watching -= listening
watching -= eavesdropping
//now mobs
var/speech_bubble_test = say_test(message)
var/image/speech_bubble = image('icons/mob/talk.dmi',src,"h[speech_bubble_test]")
spawn(30) qdel(speech_bubble)
for(var/mob/M in listening)
M << speech_bubble
M.hear_say(message, verb, speaking, alt_name, italics, src)
if(eavesdropping.len)
var/new_message = stars(message) //hopefully passing the message twice through stars() won't hurt... I guess if you already don't understand the language, when they speak it too quietly to hear normally you would be able to catch even less.
for(var/mob/M in eavesdropping)
M << speech_bubble
M.hear_say(new_message, verb, speaking, alt_name, italics, src)
if(watching.len)
var/rendered = "<span class='game say'><span class='name'>[src.name]</span> [not_heard].</span>"
for (var/mob/M in watching)
M.show_message(rendered, 2)
log_whisper("[src.name]/[src.key] : [message]")
return 1
@@ -37,4 +37,8 @@
else if(M.stat == 2 && M.client.prefs.toggles & CHAT_GHOSTEARS)
if(M.client) M << "<b>[src]</b> transmits, \"[message]\""
return 1
return ..(message, 0)
return ..(message, 0)
/mob/living/silicon/robot/drone/whisper_say(var/message, var/datum/language/speaking = null, var/alt_name="", var/verb="whispers")
say(message) //drones do not get to whisper, only speak normally
return 1
+8 -3
View File
@@ -1,8 +1,11 @@
/mob/living/silicon/handle_message_mode(message_mode, message, verb, speaking, used_radios, alt_name)
log_say("[key_name(src)] : [message]")
if(..())
return 1
/mob/living/silicon/robot/handle_message_mode(message_mode, message, verb, speaking, used_radios, alt_name)
..()
if(..())
return 1
if(message_mode)
if(!is_component_functioning("radio"))
src << "<span class='warning'>Your radio isn't functional at this time.</span>"
@@ -12,7 +15,8 @@
return radio.talk_into(src,message,message_mode,verb,speaking)
/mob/living/silicon/ai/handle_message_mode(message_mode, message, verb, speaking, used_radios, alt_name)
..()
if(..())
return 1
if(message_mode == "department")
return holopad_talk(message, verb, speaking)
else if(message_mode)
@@ -24,7 +28,8 @@
return aiRadio.talk_into(src,message,message_mode,verb,speaking)
/mob/living/silicon/pai/handle_message_mode(message_mode, message, verb, speaking, used_radios, alt_name)
..()
if(..())
return 1
if(message_mode)
if(message_mode == "general")
message_mode = null
+2 -2
View File
@@ -2,7 +2,7 @@
/mob/proc/say()
return
/mob/verb/whisper()
/mob/verb/whisper(message as text)
set name = "Whisper"
set category = "IC"
return
@@ -35,7 +35,7 @@
set_typing_indicator(0)
if(use_me)
usr.emote("me",usr.emote_type,message)
custom_emote(usr.emote_type, message)
else
usr.emote(message)
+1
View File
@@ -5,6 +5,7 @@
item_state = "energy_katana"
force = 40
throwforce = 20
armour_penetration = 15
var/cooldown = 0 // Because spam aint cool, yo.
var/datum/effect/effect/system/spark_spread/spark_system
+1 -1
View File
@@ -70,7 +70,7 @@
user << "\red You must hold \the [P] steady to burn \the [src]."
/obj/item/weapon/photo/examine(mob/user)
if(..(user, 1))
if(..(user, 1) || isobserver(user))
show(user)
else
user << "<span class='notice'>It is too far away.</span>"
+4 -3
View File
@@ -29,7 +29,8 @@
M.powernet = null
powernets -= src
return ..()
..()
return QDEL_HINT_QUEUE
//Returns the amount of excess power (before refunding to SMESs) from last tick.
//This is for machines that might adjust their power consumption using this data.
@@ -51,7 +52,7 @@
cables -= C
C.powernet = null
if(is_empty())//the powernet is now empty...
del(src)///... delete it - qdel
qdel(src)///... delete it - qdel
//add a cable to the current powernet
//Warning : this proc DON'T check if the cable exists
@@ -71,7 +72,7 @@
nodes -=M
M.powernet = null
if(is_empty())//the powernet is now empty...
del(src)///... delete it - qdel
qdel(src)///... delete it - qdel
//add a power machine to the current powernet
@@ -24,7 +24,21 @@
desc = "A 9mm bullet casing."
caliber = "9mm"
projectile_type = "/obj/item/projectile/bullet/weakbullet3"
/obj/item/ammo_casing/c9mmap
desc = "A 9mm bullet casing."
caliber = "9mm"
projectile_type =/obj/item/projectile/bullet/armourpiercing
/obj/item/ammo_casing/c9mmtox
desc = "A 9mm bullet casing."
caliber = "9mm"
projectile_type = /obj/item/projectile/bullet/toxinbullet
/obj/item/ammo_casing/c9mminc
desc = "A 9mm bullet casing."
caliber = "9mm"
projectile_type = /obj/item/projectile/bullet/incendiary/firebullet
/obj/item/ammo_casing/c45
desc = "A .45 bullet casing."
@@ -132,11 +132,23 @@
icon_state = "smg9mm"
ammo_type = "/obj/item/ammo_casing/c9mm"
caliber = "9mm"
max_ammo = 20
max_ammo = 30
/obj/item/ammo_box/magazine/smgm9mm/ap
name = "SMG magazine (Armour Piercing 9mm)"
ammo_type = /obj/item/ammo_casing/c9mmap
/obj/item/ammo_box/magazine/smgm9mm/toxin
name = "SMG magazine (Toxin Tipped 9mm)"
ammo_type = /obj/item/ammo_casing/c9mmtox
/obj/item/ammo_box/magazine/smgm9mm/fire
name = "SMG Magazine (Incendiary 9mm)"
ammo_type = /obj/item/ammo_casing/c9mminc
/obj/item/ammo_box/magazine/smgm9mm/update_icon()
..()
icon_state = "[initial(icon_state)]-[round(ammo_count(),5)]"
icon_state = "[initial(icon_state)]-[round(ammo_count(),6)]"
/obj/item/ammo_box/magazine/smgm45
name = "SMG magazine (.45)"
@@ -27,6 +27,18 @@
/obj/item/projectile/bullet/weakbullet3
damage = 20
/obj/item/projectile/bullet/toxinbullet
damage = 15
damage_type = TOX
/obj/item/projectile/bullet/incendiary/firebullet
damage = 10
/obj/item/projectile/bullet/armourpiercing
damage = 17
armour_penetration = 10
/obj/item/projectile/bullet/pellet
name = "pellet"
@@ -53,7 +53,7 @@
var/mob/living/carbon/human/H = target
var/headarmor = 0 // Target's head armour
armor_block = H.run_armor_check(affecting, "melee") // For normal attack damage
armor_block = H.run_armor_check(affecting, "melee", armour_penetration = armour_penetration) // For normal attack damage
//If they have a hat/helmet and the user is targeting their head.
if(istype(H.head, /obj/item/clothing/head) && affecting == "head")
@@ -126,13 +126,34 @@
/datum/design/mag_smg
name = "Saber Submachine Gun Magazine (9mm)"
desc = "A 20-round magazine for the Saber submachine gun."
desc = "A 30-round magazine for the Saber submachine gun."
id = "mag_smg"
req_tech = list("combat" = 4, "materials" = 3)
build_type = PROTOLATHE
materials = list(MAT_METAL = 2000)
build_path = /obj/item/ammo_box/magazine/smgm9mm
category = list("Weapons")
/datum/design/mag_smg/ap_mag
name = "Saber Submachine Gun Magazine (9mmAP)"
desc = "A 30-round armour piercing magazine for the Saber submachine gun. Deals slightly less damage but bypasses most armor."
id = "mag_smg_ap"
materials = list(MAT_METAL = 3000, MAT_SILVER = 100)
build_path = /obj/item/ammo_box/magazine/smgm9mm/ap
/datum/design/mag_smg/incin_mag
name = "Saber Submachine Gun Magazine (9mmIC)"
desc = "A 30-round incendiary round magazine for the Saber submachine gun. Deals significantly less damage but sets the target on fire."
id = "mag_smg_ic"
materials = list(MAT_METAL = 3000, MAT_SILVER = 100, MAT_GLASS = 400)
build_path = /obj/item/ammo_box/magazine/smgm9mm/fire
/datum/design/mag_smg/incin_tox
name = "Saber Submachine Gun Magazine (9mmTX)"
desc = "A 30-round uranium tipped round magazine for the Saber submachine gun. Deals toxin damage, but less overall damage."
id = "mag_smg_tx"
materials = list(MAT_METAL = 3000, MAT_GLASS = 200, MAT_URANIUM = 1000)
build_path = /obj/item/ammo_box/magazine/smgm9mm/toxin
/datum/design/rapidsyringe
name = "Rapid Syringe Gun"
+1
View File
@@ -62,6 +62,7 @@ Note: Must be placed west/left of and R&D console to function.
/obj/machinery/r_n_d/protolathe/Destroy()
qdel(materials)
materials = null
return ..()
/obj/machinery/r_n_d/protolathe/RefreshParts()
+15 -9
View File
@@ -102,8 +102,8 @@ won't update every console in existence) but it's more of a hassle to do. Also,
return return_name
/obj/machinery/computer/rdconsole/proc/SyncRDevices() //Makes sure it is properly sync'ed up with the devices attached to it (if any).
for(var/obj/machinery/r_n_d/D in oview(3,src))
if(D.linked_console != null || D.disabled || D.panel_open)
for(var/obj/machinery/r_n_d/D in range(3,src))
if(!isnull(D.linked_console) || D.disabled || D.panel_open)
continue
if(istype(D, /obj/machinery/r_n_d/destructive_analyzer))
if(linked_destroy == null)
@@ -144,6 +144,7 @@ won't update every console in existence) but it's more of a hassle to do. Also,
break
/obj/machinery/computer/rdconsole/initialize()
..()
SyncRDevices()
/* Instead of calling this every tick, it is only being called when needed
@@ -181,7 +182,10 @@ won't update every console in existence) but it's more of a hassle to do. Also,
/obj/machinery/computer/rdconsole/Topic(href, href_list)
if(..())
return
return 1
if(!allowed(usr))
return 1
add_fingerprint(usr)
@@ -601,7 +605,10 @@ won't update every console in existence) but it's more of a hassle to do. Also,
/obj/machinery/computer/rdconsole/attack_hand(mob/user as mob)
if(..())
return
return 1
if(!allowed(user))
user << "<span class='warning'>Access denied.</span>"
return 1
interact(user)
/obj/machinery/computer/rdconsole/interact(mob/user)
@@ -1113,15 +1120,13 @@ won't update every console in existence) but it's more of a hassle to do. Also,
name = "Robotics R&D Console"
desc = "A console used to interface with R&D tools."
id = 2
req_access = null
req_access_txt = "29"
req_access = list(access_robotics)
/obj/machinery/computer/rdconsole/mechanics
name = "Mechanics R&D Console"
desc = "A console used to interface with R&D tools."
id = 4
req_access = null
req_access_txt = "70"
req_access = list(access_mechanic)
/obj/machinery/computer/rdconsole/core
name = "Core R&D Console"
@@ -1131,4 +1136,5 @@ won't update every console in existence) but it's more of a hassle to do. Also,
/obj/machinery/computer/rdconsole/experiment
name = "E.X.P.E.R.I-MENTOR R&D Console"
desc = "A console used to interface with R&D tools."
id = 3
id = 3
-89
View File
@@ -1,89 +0,0 @@
//Procedures in this file: Appendectomy
//////////////////////////////////////////////////////////////////
// APPENDECTOMY //
//////////////////////////////////////////////////////////////////
/datum/surgery_step/appendectomy/
priority = 2
can_infect = 1
blood_level = 1
can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
if (target_zone != "groin")
return 0
var/obj/item/organ/external/groin = target.get_organ("groin")
if (!groin)
return 0
if (groin.open < 2)
return 0
return 1
/datum/surgery_step/appendectomy/cut_appendix
allowed_tools = list(
/obj/item/weapon/scalpel = 100, \
/obj/item/weapon/kitchenknife = 75, \
/obj/item/weapon/shard = 50, \
)
min_duration = 70
max_duration = 90
can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
if (!ishuman(target))
return 0
return ..() && target.op_stage.appendix == 0
begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
user.visible_message("[user] starts to separate [target]'s appendix from the abdominal wall with \the [tool].", \
"You start to separate [target]'s appendix from the abdominal wall with \the [tool]." )
target.custom_pain("The pain in your abdomen is living hell!",1)
..()
end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
user.visible_message("\blue [user] has separated [target]'s appendix with \the [tool]." , \
"\blue You have separated [target]'s appendix with \the [tool].")
target.op_stage.appendix = 1
fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
var/obj/item/organ/external/groin = target.get_organ("groin")
user.visible_message("\red [user]'s hand slips, slicing an artery inside [target]'s abdomen with \the [tool]!", \
"\red Your hand slips, slicing an artery inside [target]'s abdomen with \the [tool]!")
groin.createwound(CUT, 50, 1)
/datum/surgery_step/appendectomy/remove_appendix
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
can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
return ..() && target.op_stage.appendix == 1
begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
user.visible_message("[user] starts removing [target]'s appendix with \the [tool].", \
"You start removing [target]'s appendix with \the [tool].")
target.custom_pain("Someone's ripping out your bowels!",1)
..()
end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
user.visible_message("\blue [user] has removed [target]'s appendix with \the [tool].", \
"\blue You have removed [target]'s appendix with \the [tool].")
var/app = 0
for(var/datum/disease/appendicitis/appendicitis in target.viruses)
app = 1
appendicitis.cure()
target.resistances += appendicitis
if (app)
new /obj/item/weapon/reagent_containers/food/snacks/appendix/inflamed(get_turf(target))
else
new /obj/item/weapon/reagent_containers/food/snacks/appendix(get_turf(target))
target.op_stage.appendix = 2
fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
var/obj/item/organ/external/affected = target.get_organ(target_zone)
user.visible_message("\red [user]'s hand slips, nicking internal organs in [target]'s abdomen with \the [tool]!", \
"\red Your hand slips, nicking internal organs in [target]'s abdomen with \the [tool]!")
affected.createwound(BRUISE, 20)
-267
View File
@@ -1,267 +0,0 @@
//Procedures in this file: Brain extraction. Brain fixing. Slime Core extraction.
//////////////////////////////////////////////////////////////////
// BRAIN SURGERY //
//////////////////////////////////////////////////////////////////
/datum/surgery_step/brain/
priority = 2
blood_level = 1
can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
return target_zone == "head" && hasorgans(target)
/datum/surgery_step/brain/saw_skull
allowed_tools = list(
/obj/item/weapon/circular_saw = 100, \
/obj/item/weapon/hatchet = 75, \
/obj/item/weapon/melee/arm_blade = 60 // Dr. Chang E. Ling, MD
)
min_duration = 50
max_duration = 70
can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
return ..() && target_zone == "head" && target.brain_op_stage == 1
begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
user.visible_message("[user] begins to cut through [target]'s skull with \the [tool].", \
"You begin to cut through [target]'s skull with \the [tool].")
..()
end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
user.visible_message("\blue [user] has cut through [target]'s skull open with \the [tool].", \
"\blue You have cut through [target]'s skull open with \the [tool].")
target.brain_op_stage = 2
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(max(10, tool.force), BRUTE, "head")
/datum/surgery_step/brain/cut_brain
allowed_tools = list(
/obj/item/weapon/scalpel = 100, \
/obj/item/weapon/kitchenknife = 75, \
/obj/item/weapon/shard = 50, \
)
min_duration = 80
max_duration = 100
can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
return ..() && target.brain_op_stage == 2
begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
user.visible_message("[user] starts separating connections to [target]'s brain with \the [tool].", \
"You start separating connections to [target]'s brain with \the [tool].")
..()
end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
user.visible_message("\blue [user] separates connections to [target]'s brain with \the [tool].", \
"\blue You separate connections to [target]'s brain with \the [tool].")
target.brain_op_stage = 3
fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
user.visible_message("\red [user]'s hand slips, cutting a vein in [target]'s brain with \the [tool]!", \
"\red Your hand slips, cutting a vein in [target]'s brain with \the [tool]!")
target.apply_damage(50, BRUTE, "head", 1, sharp=1)
/datum/surgery_step/brain/saw_spine
allowed_tools = list(
/obj/item/weapon/circular_saw = 100, \
/obj/item/weapon/hatchet = 75, \
/obj/item/weapon/melee/arm_blade = 60
)
min_duration = 50
max_duration = 70
can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
return ..() && target.brain_op_stage == 3
begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
user.visible_message("[user] starts separating [target]'s brain from \his spine with \the [tool].", \
"You start separating [target]'s brain from spine with \the [tool].")
..()
end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
user.visible_message("\blue [user] separates [target]'s brain from \his spine with \the [tool].", \
"\blue You separate [target]'s brain from spine with \the [tool].")
var/mob/living/simple_animal/borer/borer = target.has_brain_worms()
if(borer)
borer.detatch() //Should remove borer if the brain is removed - RR
user.attack_log += "\[[time_stamp()]\]<font color='red'> Debrained [key_name(target)] with [tool.name] (INTENT: [uppertext(user.a_intent)])</font>"
target.attack_log += "\[[time_stamp()]\]<font color='orange'> Debrained by [key_name(user)] with [tool.name] (INTENT: [uppertext(user.a_intent)])</font>"
msg_admin_attack("[key_name_admin(user)] debrained [key_name_admin(target)] with [tool.name]")
var/obj/item/organ/brain/B = target.internal_organs_by_name["brain"]
if(B && istype(B))
B.removed(user)
fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
user.visible_message("\red [user]'s hand slips, cutting a vein in [target]'s brain with \the [tool]!", \
"\red Your hand slips, cutting a vein in [target]'s brain with \the [tool]!")
target.apply_damage(30, BRUTE, "head", 1, sharp=1)
if (ishuman(user))
user:bloody_body(target)
user:bloody_hands(target, 0)
//////////////////////////////////////////////////////////////////
// BRAIN DAMAGE FIXING //
//////////////////////////////////////////////////////////////////
/datum/surgery_step/brain/bone_chips
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
can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
return ..() && target.brain_op_stage == 2
begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
user.visible_message("[user] starts taking out bone chips and out of [target]'s brain with \the [tool].", \
"You start taking out bone chips and out of [target]'s brain with \the [tool].")
..()
end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
user.visible_message("\blue [user] takes out all bone chips out of [target]'s brain with \the [tool].", \
"\blue You take out all bone chips out of [target]'s brain with \the [tool].")
target.brain_op_stage = 3
fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
user.visible_message("\red [user]'s hand slips, jabbing \the [tool] in [target]'s brain!", \
"\red Your hand slips, jabbing \the [tool] in [target]'s brain!")
target.apply_damage(30, BRUTE, "head", 1, sharp=1)
/datum/surgery_step/brain/hematoma
allowed_tools = list(
/obj/item/weapon/FixOVein = 100, \
/obj/item/stack/cable_coil = 75
)
min_duration = 90
max_duration = 110
can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
return ..() && target.brain_op_stage == 3
begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
user.visible_message("[user] starts mending hematoma in [target]'s brain with \the [tool].", \
"You start mending hematoma in [target]'s brain with \the [tool].")
..()
end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
user.visible_message("\blue [user] mends hematoma in [target]'s brain with \the [tool].", \
"\blue You mend hematoma in [target]'s brain with \the [tool].")
var/obj/item/organ/brain/sponge = target.internal_organs_by_name["brain"]
if (sponge)
sponge.damage = 0
fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
user.visible_message("\red [user]'s hand slips, bruising [target]'s brain with \the [tool]!", \
"\red Your hand slips, bruising [target]'s brain with \the [tool]!")
target.apply_damage(20, BRUTE, "head", 1, sharp=1)
//////////////////////////////////////////////////////////////////
// SLIME CORE EXTRACTION //
//////////////////////////////////////////////////////////////////
/datum/surgery_step/slime
is_valid_target(mob/living/carbon/slime/target)
return istype(target, /mob/living/carbon/slime/)
can_use(mob/living/user, mob/living/carbon/slime/target, target_zone, obj/item/tool)
return target.stat == 2
/datum/surgery_step/slime/cut_flesh
allowed_tools = list(
/obj/item/weapon/scalpel = 100, \
/obj/item/weapon/kitchenknife = 75, \
/obj/item/weapon/shard = 50, \
)
min_duration = 30
max_duration = 50
can_use(mob/living/user, mob/living/carbon/slime/target, target_zone, obj/item/tool)
return ..() && target.brain_op_stage == 0
begin_step(mob/user, mob/living/carbon/slime/target, target_zone, obj/item/tool)
user.visible_message("[user] starts cutting [target]'s flesh with \the [tool].", \
"You start cutting [target]'s flesh with \the [tool].")
end_step(mob/living/user, mob/living/carbon/slime/target, target_zone, obj/item/tool)
user.visible_message("\blue [user] cuts [target]'s flesh with \the [tool].", \
"\blue You cut [target]'s flesh with \the [tool], exposing the cores")
target.brain_op_stage = 1
fail_step(mob/living/user, mob/living/carbon/slime/target, target_zone, obj/item/tool)
user.visible_message("\red [user]'s hand slips, tearing [target]'s flesh with \the [tool]!", \
"\red Your hand slips, tearing [target]'s flesh with \the [tool]!")
/datum/surgery_step/slime/cut_innards
allowed_tools = list(
/obj/item/weapon/scalpel = 100, \
/obj/item/weapon/kitchenknife = 75, \
/obj/item/weapon/shard = 50, \
)
min_duration = 30
max_duration = 50
can_use(mob/living/user, mob/living/carbon/slime/target, target_zone, obj/item/tool)
return ..() && target.brain_op_stage == 1
begin_step(mob/user, mob/living/carbon/slime/target, target_zone, obj/item/tool)
user.visible_message("[user] starts cutting [target]'s silky innards apart with \the [tool].", \
"You start cutting [target]'s silky innards apart with \the [tool].")
end_step(mob/living/user, mob/living/carbon/slime/target, target_zone, obj/item/tool)
user.visible_message("\blue [user] cuts [target]'s innards apart with \the [tool], exposing the cores", \
"\blue You cut [target]'s innards apart with \the [tool], exposing the cores")
target.brain_op_stage = 2
fail_step(mob/living/user, mob/living/carbon/slime/target, target_zone, obj/item/tool)
user.visible_message("\red [user]'s hand slips, tearing [target]'s innards with \the [tool]!", \
"\red Your hand slips, tearing [target]'s innards with \the [tool]!")
/datum/surgery_step/slime/saw_core
allowed_tools = list(
/obj/item/weapon/circular_saw = 100, \
/obj/item/weapon/hatchet = 75
)
min_duration = 50
max_duration = 70
can_use(mob/living/user, mob/living/carbon/slime/target, target_zone, obj/item/tool)
return ..() && target.brain_op_stage == 2 && target.cores > 0
begin_step(mob/user, mob/living/carbon/slime/target, target_zone, obj/item/tool)
user.visible_message("[user] starts cutting out one of [target]'s cores with \the [tool].", \
"You start cutting out one of [target]'s cores with \the [tool].")
end_step(mob/living/user, mob/living/carbon/slime/target, target_zone, obj/item/tool)
target.cores--
user.visible_message("\blue [user] cuts out one of [target]'s cores with \the [tool].",, \
"\blue You cut out one of [target]'s cores with \the [tool]. [target.cores] cores left.")
if(target.cores >= 0)
new target.coretype(target.loc)
if(target.cores <= 0)
target.icon_state = "[target.colour] baby slime dead-nocore"
fail_step(mob/living/user, mob/living/carbon/slime/target, target_zone, obj/item/tool)
user.visible_message("\red [user]'s hand slips, failing to cut core out!", \
"\red Your hand slips, failing to cut core out!")
-70
View File
@@ -1,70 +0,0 @@
//////////////////////////////////////////////////////////////////
// BRAIN DAMAGE FIXING //
//////////////////////////////////////////////////////////////////
/datum/surgery_step/brain/bone_chips
allowed_tools = list(
/obj/item/weapon/hemostat = 100, \
/obj/item/weapon/wirecutters = 75, \
/obj/item/weapon/kitchen/utensil/fork = 20
)
priority = 3
min_duration = 80
max_duration = 100
can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
var/obj/item/organ/external/affected = target.get_organ(target_zone)
if(!affected) return
var/obj/item/organ/brain/sponge = target.internal_organs_by_name["brain"]
return (sponge && sponge.damage > 0 && sponge.damage <= 20) && affected.open == 3
begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
user.visible_message("[user] starts taking bone chips out of [target]'s brain with \the [tool].", \
"You start taking bone chips out of [target]'s brain with \the [tool].")
..()
end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
user.visible_message("\blue [user] takes out all the bone chips in [target]'s brain with \the [tool].", \
"\blue You take out all the bone chips in [target]'s brain with \the [tool].")
var/obj/item/organ/brain/sponge = target.internal_organs_by_name["brain"]
if (sponge)
sponge.damage = 0
fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
user.visible_message("\red [user]'s hand slips, jabbing \the [tool] in [target]'s brain!", \
"\red Your hand slips, jabbing \the [tool] in [target]'s brain!")
target.apply_damage(30, BRUTE, "head", 1, sharp=1)
/datum/surgery_step/brain/hematoma
allowed_tools = list(
/obj/item/weapon/FixOVein = 100, \
/obj/item/stack/cable_coil = 75
)
priority = 3
min_duration = 90
max_duration = 110
can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
var/obj/item/organ/external/affected = target.get_organ(target_zone)
if(!affected) return
var/obj/item/organ/brain/sponge = target.internal_organs_by_name["brain"]
return (sponge && sponge.damage > 20) && affected.open == 3
begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
user.visible_message("[user] starts mending hematoma in [target]'s brain with \the [tool].", \
"You start mending hematoma in [target]'s brain with \the [tool].")
..()
end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
user.visible_message("\blue [user] mends hematoma in [target]'s brain with \the [tool].", \
"\blue You mend hematoma in [target]'s brain with \the [tool].")
var/obj/item/organ/brain/sponge = target.internal_organs_by_name["brain"]
if (sponge)
sponge.damage = 20
fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
user.visible_message("\red [user]'s hand slips, bruising [target]'s brain with \the [tool]!", \
"\red Your hand slips, bruising [target]'s brain with \the [tool]!")
target.apply_damage(20, BRUTE, "head", 1, sharp=1)
-405
View File
@@ -1,405 +0,0 @@
//Procedures in this file: Generic ribcage opening steps, Removing alien embryo, Fixing internal organs.
//////////////////////////////////////////////////////////////////
// GENERIC RIBCAGE SURGERY //
//////////////////////////////////////////////////////////////////
/datum/surgery_step/ribcage
priority = 2
can_infect = 1
blood_level = 1
can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
return target_zone == "chest"
/datum/surgery_step/ribcage/saw_ribcage
allowed_tools = list(
/obj/item/weapon/circular_saw = 100, \
/obj/item/weapon/hatchet = 75, \
/obj/item/weapon/melee/arm_blade = 60
)
min_duration = 50
max_duration = 70
can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
if (!ishuman(target))
return 0
var/obj/item/organ/external/affected = target.get_organ(target_zone)
return ..() && target.op_stage.ribcage == 0 && affected.open >= 2
begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
user.visible_message("[user] begins to cut through [target]'s ribcage with \the [tool].", \
"You begin to cut through [target]'s ribcage with \the [tool].")
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)
user.visible_message("\blue [user] has cut through [target]'s ribcage open with \the [tool].", \
"\blue You have cut through [target]'s ribcage open with \the [tool].")
target.op_stage.ribcage = 1
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 ribcage with \the [tool]!" , \
"\red Your hand slips, cracking [target]'s ribcage with \the [tool]!" )
var/obj/item/organ/external/affected = target.get_organ(target_zone)
affected.createwound(CUT, 20)
affected.fracture()
/datum/surgery_step/ribcage/retract_ribcage
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
can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
return ..() && target.op_stage.ribcage == 1
begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
var/msg = "[user] starts to force open the ribcage in [target]'s torso with \the [tool]."
var/self_msg = "You start to force open the ribcage in [target]'s torso with \the [tool]."
user.visible_message(msg, self_msg)
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] forces open [target]'s ribcage with \the [tool]."
var/self_msg = "\blue You force open [target]'s ribcage with \the [tool]."
user.visible_message(msg, self_msg)
target.op_stage.ribcage = 2
// Whoops!
if(prob(10))
var/obj/item/organ/external/affected = target.get_organ(target_zone)
affected.fracture()
fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
var/msg = "\red [user]'s hand slips, breaking [target]'s ribcage!"
var/self_msg = "\red Your hand slips, breaking [target]'s ribcage!"
user.visible_message(msg, self_msg)
var/obj/item/organ/external/affected = target.get_organ(target_zone)
affected.createwound(BRUISE, 20)
affected.fracture()
/datum/surgery_step/ribcage/close_ribcage
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
can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
return ..() && target.op_stage.ribcage == 2
begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
var/msg = "[user] starts bending [target]'s ribcage back into place with \the [tool]."
var/self_msg = "You start bending [target]'s ribcage back into place with \the [tool]."
user.visible_message(msg, self_msg)
target.custom_pain("Something hurts horribly in your chest!",1)
..()
end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
var/msg = "\blue [user] bends [target]'s ribcage back into place with \the [tool]."
var/self_msg = "\blue You bend [target]'s ribcage back into place with \the [tool]."
user.visible_message(msg, self_msg)
target.op_stage.ribcage = 1
fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
var/msg = "\red [user]'s hand slips, bending [target]'s ribcage in a wrong shape!"
var/self_msg = "\red Your hand slips, bending [target]'s ribcage in a wrong shape!"
user.visible_message(msg, self_msg)
var/obj/item/organ/external/chest/affected = target.get_organ("chest")
affected.createwound(BRUISE, 20)
affected.fracture()
if (prob(40))
user.visible_message("\red Rib pierces the lung!")
target.rupture_lung()
/datum/surgery_step/ribcage/mend_ribcage
allowed_tools = list(
/obj/item/weapon/bonegel = 100, \
/obj/item/weapon/screwdriver = 75
)
min_duration = 20
max_duration = 40
can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
return ..() && target.op_stage.ribcage == 1
begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
var/msg = "[user] starts applying \the [tool] to [target]'s ribcage."
var/self_msg = "You start applying \the [tool] to [target]'s ribcage."
user.visible_message(msg, self_msg)
target.custom_pain("Something hurts horribly in your chest!",1)
..()
end_step(mob/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."
user.visible_message(msg, self_msg)
target.op_stage.ribcage = 0
//////////////////////////////////////////////////////////////////
// ALIEN EMBRYO SURGERY //
//////////////////////////////////////////////////////////////////
/datum/surgery_step/ribcage/remove_embryo
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
max_duration = 100
can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
var/embryo = 0
for(var/obj/item/alien_embryo/A in target)
embryo = 1
break
return ..() && embryo && target.op_stage.ribcage == 2
begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
var/msg = "[user] starts to pull something out from [target]'s ribcage with \the [tool]."
var/self_msg = "You start to pull something out from [target]'s ribcage with \the [tool]."
user.visible_message(msg, self_msg)
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)
user.visible_message("\red [user] rips the larva out of [target]'s ribcage!",
"You rip the larva out of [target]'s ribcage!")
for(var/obj/item/alien_embryo/A in target)
A.loc = A.loc.loc
//////////////////////////////////////////////////////////////////
// CHEST INTERNAL ORGAN SURGERY //
//////////////////////////////////////////////////////////////////
/datum/surgery_step/ribcage/fix_chest_internal
allowed_tools = list(
/obj/item/stack/medical/advanced/bruise_pack= 100, \
/obj/item/stack/medical/bruise_pack = 20, \
/obj/item/stack/medical/bruise_pack/tajaran = 70, \
)
min_duration = 70
max_duration = 90
can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
if (!ishuman(target))
return 0
var/is_chest_organ_damaged = 0
var/obj/item/organ/external/chest/chest = target.get_organ("chest")
for(var/obj/item/organ/I in chest.internal_organs)
if(I.damage > 0)
is_chest_organ_damaged = 1
break
return ..() && is_chest_organ_damaged && target.op_stage.ribcage == 2
begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
var/obj/item/organ/internal/heart/heart = target.internal_organs_by_name["heart"]
var/obj/item/organ/internal/lungs/lungs = target.internal_organs_by_name["lungs"]
var/obj/item/organ/internal/liver/liver = target.internal_organs_by_name["liver"]
var/obj/item/organ/internal/liver/kidney = target.internal_organs_by_name["kidney"]
if (istype(tool, /obj/item/stack/medical/advanced/bruise_pack))
if(lungs.damage > 0)
user.visible_message("[user] starts sealing the rupture in [target]'s lungs with regenerative membrane.", \
"You start mending the rupture in [target]'s lungs with regenerative membrane." )
if(heart.damage > 0)
if(!heart.desc == "Mechanical")
user.visible_message("[user] starts mending the bruises on [target]'s heart with regenerative membrane.", \
"You start mending the bruises on [target]'s heart with regenerative membrane." )
else
user.visible_message("\blue [user] attempts to repair [target]'s mechanical heart with regenerative membrane...", \
"\blue You attempt to repair [target]'s heart with regenerative membrane...")
if(liver.damage > 0)
user.visible_message("[user] starts mending the bruises on [target]'s liver with regenerative membrane.", \
"You start mending the bruises on [target]'s liver with regenerative membrane." )
if(kidney.damage > 0)
user.visible_message("[user] starts mending the bruises on [target]'s kidney with regenerative membrane.", \
"You start mending the bruises on [target]'s kidney with regenerative membrane." )
if (istype(tool, /obj/item/stack/medical/bruise_pack))
if (istype(tool, /obj/item/stack/medical/bruise_pack/tajaran/))
if(lungs.damage > 0)
user.visible_message("[user] starts covering the rupture in [target]'s lungs with the poultice.", \
"You start covering the rupture in [target]'s lungs with the poultice." )
if(heart.damage > 0)
if(!heart.desc == "Mechanical")
user.visible_message("[user] starts mending the bruises on [target]'s heart with the poultice.", \
"You start mending the bruises on [target]'s heart with the poultice." )
else
user.visible_message("\blue [user] attempts to repair [target]'s mechanical heart with \the [tool]...", \
"\blue You attempt to repair [target]'s heart with \the [tool]...")
if(liver.damage > 0)
user.visible_message("[user] starts putting the poultice to the bruises on [target]'s liver.", \
"You start putting the poultice to the bruises on [target]'s liver." )
if(kidney.damage > 0)
user.visible_message("[user] starts putting the poultice to the bruises on [target]'s kidney.", \
"You start putting the poultice to the bruises on [target]'s kidney." )
if(lungs.damage > 0)
user.visible_message("[user] starts mending the rupture in [target]'s lungs with \the [tool].", \
"You start mending the rupture in [target]'s lungs \the [tool]." )
else
if(heart.damage > 0)
if(!heart.desc == "Mechanical")
user.visible_message("[user] starts mending the bruises on [target]'s heart with \the [tool].", \
"You start mending the bruises on [target]'s heart with \the [tool]." )
else
user.visible_message("\blue [user] attempts to repair [target]'s mechanical heart with \the [tool]...", \
"\blue You attempt to repair [target]'s heart with \the [tool]...")
if(liver.damage > 0)
user.visible_message("[user] starts mending the bruises on [target]'s liver with \the [tool].", \
"You start mending the bruises on [target]'s liver with \the [tool]." )
if(kidney.damage > 0)
user.visible_message("[user] starts mending the bruises on [target]'s kidney with \the [tool].", \
"You start mending the bruises on [target]'s kidney with \the [tool]." )
target.custom_pain("The pain in your chest is living hell!",1)
..()
end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
var/obj/item/organ/internal/heart/heart = target.internal_organs_by_name["heart"]
var/obj/item/organ/internal/lungs/lungs = target.internal_organs_by_name["lungs"]
var/obj/item/organ/internal/liver/liver = target.internal_organs_by_name["liver"]
var/obj/item/organ/internal/liver/kidney = target.internal_organs_by_name["kidney"]
if(lungs.damage > 0)
user.visible_message("\blue [user] mends the rupture in [target]'s lungs with \the [tool].", \
"\blue You mend the rupture in [target]'s lungs with \the [tool]." )
lungs.damage = 0
if(heart.damage > 0)
if(heart.desc == "Mechanical")
user.visible_message("\blue [user] pokes [target]'s mechanical heart with \the [tool].", \
"\red [target]'s heart is not organic, you cannot operate on it with \the [tool]!")
else
user.visible_message("\blue [user] treats the bruises on [target]'s heart with \the [tool].", \
"\blue You treat the bruises on [target]'s heart with \the [tool]." )
heart.damage = 0
if(liver.damage > 0)
user.visible_message("\blue [user] treats the bruises on [target]'s liver with \the [tool].", \
"\blue You treats the bruises on [target]'s liver with \the [tool]." )
liver.damage = 0
if(kidney.damage > 0)
user.visible_message("\blue [user] treats the bruises on [target]'s kidney with \the [tool].", \
"\blue You treats the bruises on [target]'s kidney with \the [tool]." )
kidney.damage = 0
fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
var/obj/item/organ/internal/heart/heart = target.internal_organs_by_name["heart"]
var/obj/item/organ/internal/lungs/lungs = target.internal_organs_by_name["lungs"]
var/obj/item/organ/internal/liver/liver = target.internal_organs_by_name["liver"]
var/obj/item/organ/internal/liver/kidney = target.internal_organs_by_name["kidney"]
var/obj/item/organ/external/chest/affected = target.get_organ("chest")
user.visible_message("\red [user]'s hand slips, getting mess and tearing the inside of [target]'s chest with \the [tool]!", \
"\red Your hand slips, getting mess and tearing the inside of [target]'s chest with \the [tool]!")
switch(tool)
if(/obj/item/stack/medical/advanced/bruise_pack)
if(heart.damage > 0)
heart.take_damage(2, 0)
if(liver.damage > 0)
liver.take_damage(2, 0)
if(kidney.damage > 0)
kidney.take_damage(2, 0)
if(lungs.damage > 0)
lungs.take_damage(2, 0)
target.adjustToxLoss(5)
if(/obj/item/stack/medical/bruise_pack/tajaran)
if(heart.damage > 0)
heart.take_damage(2, 0)
if(liver.damage > 0)
liver.take_damage(2, 0)
if(kidney.damage > 0)
kidney.take_damage(2, 0)
if(lungs.damage > 0)
lungs.take_damage(2, 0)
target.adjustToxLoss(7)
if(/obj/item/stack/medical/bruise_pack)
if(heart.damage > 0)
heart.take_damage(5, 0)
if(liver.damage > 0)
liver.take_damage(5, 0)
if(kidney.damage > 0)
kidney.take_damage(5, 0)
if(lungs.damage > 0)
lungs.take_damage(5, 0)
target.adjustToxLoss(10)
affected.createwound(CUT, 5)
/datum/surgery_step/ribcage/fix_chest_internal_robot //For artificial organs
allowed_tools = list(
/obj/item/stack/nanopaste = 100, \
/obj/item/weapon/bonegel = 30, \
/obj/item/weapon/screwdriver = 70, \
)
min_duration = 70
max_duration = 90
can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
var/is_chest_organ_damaged = 0
var/obj/item/organ/external/chest/chest = target.get_organ("chest")
for(var/obj/item/organ/I in chest.internal_organs) if(I.damage > 0)
is_chest_organ_damaged = 1
break
return ..() && is_chest_organ_damaged && target.op_stage.ribcage == 2
begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
var/obj/item/organ/internal/heart/heart = target.internal_organs_by_name["heart"]
if(heart.damage > 0)
if(heart.desc == "Mechanical")
user.visible_message("[user] starts mending the mechanisms on [target]'s heart with \the [tool].", \
"You start mending the mechanisms on [target]'s heart with \the [tool]." )
else
user.visible_message("[user] cannot mend an organic heart with this!")
return
target.custom_pain("The pain in your chest is living hell!",1)
..()
end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
var/obj/item/organ/internal/heart/heart = target.internal_organs_by_name["heart"]
if(heart.damage > 0)
if(heart.desc == "Mechanical")
user.visible_message("\blue [user] repairs [target]'s heart with \the [tool].", \
"\blue You repair [target]'s heart with \the [tool]." )
heart.damage = 0
fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
var/obj/item/organ/internal/heart/heart = target.internal_organs_by_name["heart"]
user.visible_message("\red [user]'s hand slips, smearing [tool] in the incision in [target]'s heart, gumming it up!!" , \
"\red Your hand slips, smearing [tool] in the incision in [target]'s heart, gumming it up!")
heart.take_damage(5, 0)
target.adjustToxLoss(5)
//////////////////////////////////////////////////////////////////
// HEART SURGERY //
//////////////////////////////////////////////////////////////////
/datum/surgery_step/ribcage/heart/cut
allowed_tools = list(
/obj/item/weapon/scalpel = 100, \
/obj/item/weapon/kitchenknife = 75, \
/obj/item/weapon/shard = 50, \
)
min_duration = 30
max_duration = 40
can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
return ..() && target.op_stage.ribcage == 2
+20 -1
View File
@@ -15,7 +15,7 @@
/datum/disease2/effectholder/proc/getrandomeffect(var/badness = 1)
var/list/datum/disease2/effect/list = list()
for(var/e in subtypesof(/datum/disease2/effect))
for(var/e in subtypesof(/datum/disease2/effect) - /datum/disease2/effect/organs/vampire)
var/datum/disease2/effect/f = new e
if (f.badness > badness) //we don't want such strong effects
continue
@@ -104,6 +104,25 @@
////////////////////////STAGE 4/////////////////////////////////
/datum/disease2/effect/borg
name = "Borgification Disorder"
stage = 4
badness = 2
activate(var/mob/living/carbon/mob,var/multiplier)
mob << "<span class = 'warning'>You feel like beeping and booping...</span>"
mob.adjustBruteLoss(10)
mob.updatehealth()
if(prob(40))
if(mob.client)
if(!jobban_isbanned(mob, "Cyborg") && !jobban_isbanned(mob,"nonhumandept"))
var/mob/living/silicon/robot/O = new /mob/living/silicon/robot(get_turf(mob.loc))
mob.mind.transfer_to(O)
else
new/mob/living/silicon/robot(get_turf(mob.loc))
var/datum/disease2/disease/D = mob.virus2
mob.gib()
qdel(D)
/datum/disease2/effect/omnizine
name = "Panacea Effect"
stage = 4