Merge branch 'dev' into ofResearchAndPrototypes

Conflicts:
	code/modules/mob/living/carbon/brain/posibrain.dm
This commit is contained in:
Kelenius
2015-05-25 20:35:46 +03:00
113 changed files with 2503 additions and 1776 deletions
-4
View File
@@ -634,10 +634,6 @@ datum/preferences
dat += "</br><b>Has a variety of eye colours.</b>"
if(current_species.flags & IS_PLANT)
dat += "</br><b>Has a plantlike physiology.</b>"
if(current_species.flags & IS_SYNTHETIC)
dat += "</br><b>Is machine-based.</b>"
if(current_species.flags & REGENERATES_LIMBS)
dat += "</br><b>Has a plantlike physiology.</b>"
dat += "</small></td>"
dat += "</tr>"
dat += "</table><center><hr/>"
+114
View File
@@ -0,0 +1,114 @@
// This system is used to grab a ghost from observers with the required preferences and
// lack of bans set. See posibrain.dm for an example of how they are called/used. ~Z
var/list/ghost_traps
proc/get_ghost_trap(var/trap_key)
if(!ghost_traps)
populate_ghost_traps()
return ghost_traps[trap_key]
proc/populate_ghost_traps()
ghost_traps = list()
for(var/traptype in typesof(/datum/ghosttrap))
var/datum/ghosttrap/G = new traptype
ghost_traps[G.object] = G
/datum/ghosttrap
var/object = "positronic brain"
var/list/ban_checks = list("AI","Cyborg")
var/pref_check = BE_AI
var/ghost_trap_message = "They are occupying a positronic brain now."
var/ghost_trap_role = "Positronic Brain"
// Check for bans, proper atom types, etc.
/datum/ghosttrap/proc/assess_candidate(var/mob/dead/observer/candidate)
if(!istype(candidate) || !candidate.client || !candidate.ckey)
return 0
if(!candidate.MayRespawn())
candidate << "You have made use of the AntagHUD and hence cannot enter play as \a [object]."
return 0
if(islist(ban_checks))
for(var/bantype in ban_checks)
if(jobban_isbanned(candidate, "[bantype]"))
candidate << "You are banned from one or more required roles and hence cannot enter play as \a [object]."
return 0
return 1
// Print a message to all ghosts with the right prefs/lack of bans.
/datum/ghosttrap/proc/request_player(var/mob/target, var/request_string)
if(!target)
return
for(var/mob/dead/observer/O in player_list)
if(!O.MayRespawn())
continue
if(islist(ban_checks))
for(var/bantype in ban_checks)
if(jobban_isbanned(O, "[bantype]"))
continue
if(pref_check && !(O.client.prefs.be_special & pref_check))
continue
if(O.client)
O << "[request_string]<a href='?src=\ref[src];candidate=\ref[O];target=\ref[target]'>Click here</a> if you wish to play as this option."
// Handles a response to request_player().
/datum/ghosttrap/Topic(href, href_list)
if(..())
return 1
if(href_list["candidate"] && href_list["target"])
var/mob/dead/observer/candidate = locate(href_list["candidate"]) // BYOND magic.
var/mob/target = locate(href_list["target"]) // So much BYOND magic.
if(!target || !candidate)
return
if(candidate == usr && assess_candidate(candidate) && !target.ckey)
transfer_personality(candidate,target)
return 1
// Shunts the ckey/mind into the target mob.
/datum/ghosttrap/proc/transfer_personality(var/mob/candidate, var/mob/target)
if(!assess_candidate(candidate))
return 0
target.ckey = candidate.ckey
if(target.mind)
target.mind.assigned_role = "[ghost_trap_role]"
announce_ghost_joinleave(candidate, 0, "[ghost_trap_message]")
welcome_candidate(target)
set_new_name(target)
return 1
// Fluff!
/datum/ghosttrap/proc/welcome_candidate(var/mob/target)
target << "<b>You are a positronic brain, brought into existence on [station_name()].</b>"
target << "<b>As a synthetic intelligence, you answer to all crewmembers, as well as the AI.</b>"
target << "<b>Remember, the purpose of your existence is to serve the crew and the station. Above all else, do no harm.</b>"
target << "<b>Use say :b to speak to other artificial intelligences.</b>"
var/turf/T = get_turf(target)
T.visible_message("<span class='notice'>\The [src] chimes quietly.</span>")
var/obj/item/device/mmi/digital/posibrain/P = target.loc
if(!istype(P)) //wat
return
P.searching = 0
P.name = "positronic brain ([P.brainmob.name])"
P.icon_state = "posibrain-occupied"
// Allows people to set their own name. May or may not need to be removed for posibrains if people are dumbasses.
/datum/ghosttrap/proc/set_new_name(var/mob/target)
var/newname = sanitizeSafe(input(target,"Enter a name, or leave blank for the default name.", "Name change","") as text, MAX_NAME_LEN)
if (newname != "")
target.real_name = newname
target.name = target.real_name
// Doona pods and walking mushrooms.
/datum/ghosttrap/plant
object = "living plant"
ban_checks = list("Dionaea")
pref_check = BE_PLANT
ghost_trap_message = "They are occupying a living plant now."
ghost_trap_role = "Plant"
/datum/ghosttrap/plant/welcome_candidate(var/mob/target)
target << "<span class='alium><B>You awaken slowly, stirring into sluggish motion as the air caresses you.</B></span>"
// This is a hack, replace with some kind of species blurb proc.
if(istype(host,/mob/living/carbon/alien/diona))
target << "<B>You are \a [target], one of a race of drifting interstellar plantlike creatures that sometimes share their seeds with human traders.</B>"
target << "<B>Too much darkness will send you into shock and starve you, but light will help you heal.</B>"
+1 -1
View File
@@ -98,7 +98,7 @@
descriptors |= "shiny"
if(reagents.has_reagent("lube"))
descriptors |= "slippery"
if(reagents.has_reagent("pacid") || reagents.has_reagent("sacid"))
if(reagents.has_reagent("pacid") || reagents.has_reagent("sacid") || reagents.has_reagent("hclacid"))
descriptors |= "acidic"
if(seed.get_trait(TRAIT_JUICY))
descriptors |= "juicy"
+3 -2
View File
@@ -408,7 +408,9 @@
"slimejelly",
"cyanide",
"mindbreaker",
"stoxin"
"stoxin",
"acetone",
"hydrazine"
)
for(var/x=1;x<=additional_chems;x++)
@@ -678,7 +680,6 @@
total_yield = get_trait(TRAIT_YIELD) + rand(yield_mod)
total_yield = max(1,total_yield)
currently_querying = list()
for(var/i = 0;i<total_yield;i++)
var/obj/item/product
if(has_mob_product)
+3 -63
View File
@@ -1,15 +1,11 @@
/datum/seed
var/list/currently_querying // Used to avoid asking the same ghost repeatedly.
// The following procs are used to grab players for mobs produced by a seed (mostly for dionaea).
/datum/seed/proc/handle_living_product(var/mob/living/host)
if(!host || !istype(host)) return
spawn(0)
request_player(host)
if(istype(host,/mob/living/simple_animal))
return
var/datum/ghosttrap/plant/P = get_ghost_trap("living plant")
P.request_player(host, "Someone is harvesting [display_name]. ")
spawn(75)
if(!host.ckey && !host.client)
host.death() // This seems redundant, but a lot of mobs don't
@@ -21,59 +17,3 @@
var/obj/item/seeds/S = new(get_turf(host))
S.seed_type = name
S.update_seed()
/datum/seed/proc/request_player(var/mob/living/host)
if(!host) return
for(var/mob/dead/observer/O in player_list)
if(jobban_isbanned(O, "Dionaea"))
continue
if(O.client && O.MayRespawn())
if(O.client.prefs.be_special & BE_PLANT && !(O.client in currently_querying))
currently_querying |= O.client
question(O.client,host)
/datum/seed/proc/question(var/client/C,var/mob/living/host)
spawn(0)
if(!C || !host || !(C.mob && istype(C.mob,/mob/dead))) return // We don't want to spam them repeatedly if they're already in a mob.
var/response = alert(C, "Someone is harvesting [display_name]. Would you like to play as one?", "Sentient plant harvest", "Yes", "No", "Never for this round.")
if(!C || !host || !(C.mob && istype(C.mob,/mob/dead))) return // ...or accidentally accept an invalid argument for transfer.
if(response == "Yes")
transfer_personality(C,host)
else if (response == "Never for this round")
C.prefs.be_special ^= BE_PLANT
currently_querying -= C
/datum/seed/proc/transfer_personality(var/client/player,var/mob/living/host)
//Something is wrong, abort.
if(!player || !host) return
//Host already has a controller, pike off slowpoke.
if(host.client && host.ckey) return
//Transfer them over.
host.ckey = player.ckey
if(player.mob && player.mob.mind)
player.mob.mind.transfer_to(host)
if(host.dna) host.dna.real_name = host.real_name
// Update mode specific HUD icons.
callHook("harvest_podman", list(host))
host << "\green <B>You awaken slowly, stirring into sluggish motion as the air caresses you.</B>"
// This is a hack, replace with some kind of species blurb proc.
if(istype(host,/mob/living/carbon/alien/diona))
host << "<B>You are [host], one of a race of drifting interstellar plantlike creatures that sometimes share their seeds with human traders.</B>"
host << "<B>Too much darkness will send you into shock and starve you, but light will help you heal.</B>"
var/newname = sanitizeSafe(input(host,"Enter a name, or leave blank for the default name.", "Name change","") as text, MAX_NAME_LEN)
if (newname != "")
host.real_name = newname
host.name = host.real_name
+23 -8
View File
@@ -47,9 +47,10 @@
var/global/list/toxic_reagents = list(
"anti_toxin" = -2,
"toxin" = 2,
"fluorine" = 2.5,
"chlorine" = 1.5,
"hydrazine" = 2.5,
"acetone" = 1,
"sacid" = 1.5,
"hclacid" = 1.5,
"pacid" = 3,
"plantbgone" = 3,
"cryoxadone" = -3,
@@ -70,11 +71,11 @@
"left4zed" = 1
)
var/global/list/weedkiller_reagents = list(
"fluorine" = -4,
"chlorine" = -3,
"hydrazine" = -4,
"phosphorus" = -2,
"sugar" = 2,
"sacid" = -2,
"hclacid" = -2,
"pacid" = -4,
"plantbgone" = -8,
"adminordrazine" = -5
@@ -89,8 +90,7 @@
"adminordrazine" = 1,
"milk" = 0.9,
"beer" = 0.7,
"fluorine" = -0.5,
"chlorine" = -0.5,
"hydrazine" = -2,
"phosphorus" = -0.5,
"water" = 1,
"sodawater" = 1,
@@ -99,11 +99,11 @@
// Beneficial reagents also have values for modifying yield_mod and mut_mod (in that order).
var/global/list/beneficial_reagents = list(
"beer" = list( -0.05, 0, 0 ),
"fluorine" = list( -2, 0, 0 ),
"chlorine" = list( -1, 0, 0 ),
"hydrazine" = list( -2, 0, 0 ),
"phosphorus" = list( -0.75, 0, 0 ),
"sodawater" = list( 0.1, 0, 0 ),
"sacid" = list( -1, 0, 0 ),
"hclacid" = list( -1, 0, 0 ),
"pacid" = list( -2, 0, 0 ),
"plantbgone" = list( -2, 0, 0.2),
"cryoxadone" = list( 3, 0, 0 ),
@@ -129,7 +129,22 @@
return
return ..()
/obj/machinery/portable_atmospherics/hydroponics/attack_ghost(var/mob/dead/observer/user)
if(!(harvest && seed && seed.has_mob_product))
return
var/datum/ghosttrap/plant/G = get_ghost_trap("living plant")
if(!G.assess_candidate(user))
return
var/response = alert(user, "Are you sure you want to harvest this [seed.display_name]?", "Living plant request", "Yes", "No")
if(response == "Yes")
harvest()
return
/obj/machinery/portable_atmospherics/hydroponics/attack_generic(var/mob/user)
// Why did I ever think this was a good idea. TODO: move this onto the nymph mob.
if(istype(user,/mob/living/carbon/alien/diona))
var/mob/living/carbon/alien/diona/nymph = user
+16
View File
@@ -74,6 +74,22 @@
icon_state = "cat"
origin_tech = null
/obj/item/weapon/holder/mouse
name = "mouse"
desc = "It's a small rodent."
icon_state = "mouse_gray"
origin_tech = null
w_class = 1
/obj/item/weapon/holder/mouse/gray
icon_state = "mouse_gray"
/obj/item/weapon/holder/mouse/white
icon_state = "mouse_white"
/obj/item/weapon/holder/mouse/brown
icon_state = "mouse_brown"
/obj/item/weapon/holder/borer
name = "cortical borer"
desc = "It's a slimy brain slug. Gross."
+19
View File
@@ -94,6 +94,25 @@
else
return ..()
/datum/language/machine
name = "Encoded Audio Language"
desc = "A language of encoded tones that allow for IPCs to communicate auditorily between each other in a manner that allows for easier transfer of information."
speech_verb = "beeps"
ask_verb = "beeps"
exclaim_verb = "loudly beeps"
colour = "changeling"
key = "6"
flags = RESTRICTED | NO_STUTTER
syllables = list("beep","beep","beep","beep","beep","boop","boop","boop","bop","bop","dee","dee","doo","doo","hiss","hss","buzz","buzz","bzz","ksssh","keey","wurr","wahh","tzzz")
space_chance = 10
/datum/language/machine/get_random_name()
if(prob(70))
name = "[pick(list("PBU","HIU","SINA","ARMA","OSI"))]-[rand(100, 999)]"
else
name = pick(ai_names)
return name
//Syllable Lists
/*
This list really long, mainly because I can't make up my mind about which mandarin syllables should be removed,
@@ -92,4 +92,4 @@
desc = "A tightly furled roll of paper, covered with indecipherable runes."
robotic = 2
icon = 'icons/obj/wizard.dmi'
icon_state = "scroll"
icon_state = "scroll"
@@ -5,47 +5,41 @@
icon_state = "posibrain"
w_class = 3
origin_tech = list(TECH_ENGINERING = 4, TECH_MATERIAL = 4, TECH_BLUESPACE = 2, TECH_DATA = 4)
var/searching = 0
construction_cost = list(DEFAULT_WALL_MATERIAL=500,"glass"=500,"silver"=200,"gold"=200,"phoron"=100,"diamond"=10)
construction_time = 75
var/searching = 0
var/askDelay = 10 * 60 * 1
req_access = list(access_robotics)
locked = 0
mecha = null//This does not appear to be used outside of reference in mecha.dm.
/obj/item/device/mmi/digital/posibrain/New()
..()
brainmob.name = "[pick(list("PBU","HIU","SINA","ARMA","OSI"))]-[rand(100, 999)]"
brainmob.real_name = src.brainmob.name
/obj/item/device/mmi/digital/posibrain/attack_self(mob/user as mob)
if(brainmob && !brainmob.key && searching == 0)
/obj/item/device/mmi/digital/posibrain/attack_self(var/mob/user)
if(brainmob && !brainmob.key && !searching)
//Start the process of searching for a new user.
user << "\blue You carefully locate the manual activation switch and start the positronic brain's boot process."
user << "<span class='notice'>You carefully locate the manual activation switch and start the positronic brain's boot process.</span>"
icon_state = "posibrain-searching"
src.searching = 1
src.request_player()
searching = 1
var/datum/ghosttrap/G = get_ghost_trap("positronic brain")
G.request_player(brainmob, "A [src.name] has been booted by \the [user] in [get_area(user)]. ")
spawn(600) reset_search()
/obj/item/device/mmi/digital/posibrain/proc/request_player()
for(var/mob/dead/observer/O in player_list)
if(!O.MayRespawn())
continue
if(jobban_isbanned(O, "AI") && jobban_isbanned(O, "Cyborg"))
continue
if(O.client)
if(O.client.prefs.be_special & BE_AI)
question(O.client)
/obj/item/device/mmi/digital/posibrain/proc/question(var/client/C)
spawn(0)
if(!C) return
var/response = alert(C, "Someone is requesting a personality for a positronic brain. Would you like to play as one?", "Positronic brain request", "Yes", "No", "Never for this round")
if(response == "Yes")
response = alert(C, "Are you sure you want to play as a positronic brain?", "Positronic brain request", "Yes", "No")
if(!C || brainmob.key || 0 == searching) return //handle logouts that happen whilst the alert is waiting for a response, and responses issued after a brain has been located.
if(response == "Yes")
transfer_personality(C.mob)
else if (response == "Never for this round")
C.prefs.be_special ^= BE_AI
/obj/item/device/mmi/digital/posibrain/attack_ghost(var/mob/dead/observer/user)
var/datum/ghosttrap/G = get_ghost_trap("positronic brain")
if(!G.assess_candidate(user))
return
var/response = alert(user, "Are you sure you want to play as a positronic brain?", "Positronic brain request", "Yes", "No")
if(response == "Yes")
if(G.transfer_personality(user, brainmob))
var/turf/T = get_turf(src)
T.visible_message("<span class='notice'>\The [src] chimes quietly.</span>")
searching = 0
name = "positronic brain ([brainmob.name])"
icon_state = "posibrain-occupied"
return
/obj/item/device/mmi/digital/posibrain/transfer_identity(var/mob/living/carbon/H)
..()
@@ -55,33 +49,13 @@
icon_state = "posibrain-occupied"
return
/obj/item/device/mmi/digital/posibrain/proc/transfer_personality(var/mob/candidate)
announce_ghost_joinleave(candidate, 0, "They are occupying a positronic brain now.")
src.searching = 0
src.brainmob.mind = candidate.mind
src.brainmob.ckey = candidate.ckey
src.name = "positronic brain ([src.brainmob.name])"
src.brainmob << "<b>You are a positronic brain, brought into existence on [station_name()].</b>"
src.brainmob << "<b>As a synthetic intelligence, you answer to all crewmembers, as well as the AI.</b>"
src.brainmob << "<b>Remember, the purpose of your existence is to serve the crew and the station. Above all else, do no harm.</b>"
src.brainmob << "<b>Use say :b to speak to other artificial intelligences.</b>"
src.brainmob.mind.assigned_role = "Positronic Brain"
var/turf/T = get_turf_or_move(src.loc)
for (var/mob/M in viewers(T))
M.show_message("\blue The positronic brain chimes quietly.")
icon_state = "posibrain-occupied"
/obj/item/device/mmi/digital/posibrain/proc/reset_search() //We give the players sixty seconds to decide, then reset the timer.
if(src.brainmob && src.brainmob.key) return
src.searching = 0
/obj/item/device/mmi/digital/posibrain/proc/reset_search()
if(!searching || (src.brainmob && src.brainmob.key))
return
searching = 0
icon_state = "posibrain"
var/turf/T = get_turf_or_move(src.loc)
for (var/mob/M in viewers(T))
M.show_message("\blue The positronic brain buzzes quietly, and the golden lights fade away. Perhaps you could try again?")
var/turf/T = get_turf(src)
T.visible_message("<span class='notice'>\The [src] brain buzzes quietly, and the golden lights fade away. Perhaps you could try again?</span>")
/obj/item/device/mmi/digital/posibrain/examine(mob/user)
if(!..(user))
@@ -115,7 +89,3 @@
src.brainmob.emp_damage += rand(0,10)
..()
/obj/item/device/mmi/digital/posibrain/New()
..()
src.brainmob.name = "[pick(list("PBU","HIU","SINA","ARMA","OSI"))]-[rand(100, 999)]"
src.brainmob.real_name = src.brainmob.name
+9 -9
View File
@@ -2,14 +2,14 @@
/mob/living/carbon/proc/breathe()
//if(istype(loc, /obj/machinery/atmospherics/unary/cryo_cell)) return
if(species && (species.flags & NO_BREATHE || species.flags & IS_SYNTHETIC)) return
if(species && (species.flags & NO_BREATHE)) return
var/datum/gas_mixture/breath = null
//First, check if we can breathe at all
if(health < config.health_threshold_crit && !(CE_STABLE in chem_effects)) //crit aka circulatory shock
losebreath++
if(losebreath>0) //Suffocating so do not take a breath
losebreath--
if (prob(10)) //Gasp per 10 ticks? Sounds about right.
@@ -17,9 +17,9 @@
else
//Okay, we can breathe, now check if we can get air
breath = get_breath_from_internal() //First, check for air from internals
if(!breath)
if(!breath)
breath = get_breath_from_environment() //No breath from internals so let's try to get air from our location
handle_breath(breath)
handle_post_breath(breath)
@@ -40,15 +40,15 @@
/mob/living/carbon/proc/get_breath_from_environment(var/volume_needed=BREATH_VOLUME)
var/datum/gas_mixture/breath = null
var/datum/gas_mixture/environment
if(loc)
environment = loc.return_air_for_internal_lifeform()
if(environment)
breath = environment.remove_volume(volume_needed)
handle_chemical_smoke(environment) //handle chemical smoke while we're at it
if(breath)
//handle mask filtering
if(istype(wear_mask, /obj/item/clothing/mask) && breath)
@@ -118,6 +118,7 @@
b_skin = blue
force_update_limbs()
update_body()
return 1
/mob/living/carbon/human/proc/change_skin_tone(var/tone)
@@ -127,6 +128,7 @@
s_tone = tone
force_update_limbs()
update_body()
return 1
/mob/living/carbon/human/proc/update_dna()
@@ -270,9 +270,8 @@
if(temp)
if(temp.status & ORGAN_ROBOT)
if(!(temp.brute_dam + temp.burn_dam))
if(!species.flags & IS_SYNTHETIC)
wound_flavor_text["[temp.name]"] = "<span class='warning'>[t_He] has a robot [temp.name]!</span>\n"
continue
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[temp.get_wounds_desc()]!</span>\n"
else if(temp.wounds.len > 0 || temp.open)
+29 -12
View File
@@ -746,10 +746,17 @@
xylophone=0
return
/mob/living/carbon/human/proc/check_has_mouth()
// Todo, check stomach organ when implemented.
var/obj/item/organ/external/head/H = get_organ("head")
if(!H || !H.can_intake_reagents)
return 0
return 1
/mob/living/carbon/human/proc/vomit()
if(species.flags & IS_SYNTHETIC)
return //Machines don't throw up.
if(!check_has_mouth())
return
if(!lastpuke)
lastpuke = 1
@@ -1078,7 +1085,7 @@
usr << "<span class='danger'>[src] has no pulse!</span>" //it is REALLY UNLIKELY that a dead person would check his own pulse
return
usr << "You must [self ? "" : "both"] stand until counting is finished."
usr << "You must[self ? "" : " both"] remain still until counting is finished."
if(do_mob(usr, src, 60))
usr << "<span class='notice'>[self ? "Your" : "[src]'s"] pulse is [src.get_pulse(GETPULSE_HAND)].</span>"
else
@@ -1217,16 +1224,26 @@
else
target_zone = user.zone_sel.selecting
switch(target_zone)
if("head")
if(head && head.flags & THICKMATERIAL)
. = 0
else
if(wear_suit && wear_suit.flags & THICKMATERIAL)
. = 0
var/obj/item/organ/external/affecting = get_organ(target_zone)
var/fail_msg
if(!affecting)
. = 0
fail_msg = "They are missing that limb."
else if (affecting.status & ORGAN_ROBOT)
. = 0
fail_msg = "That limb is robotic."
else
switch(target_zone)
if("head")
if(head && head.flags & THICKMATERIAL)
. = 0
else
if(wear_suit && wear_suit.flags & THICKMATERIAL)
. = 0
if(!. && error_msg && user)
// Might need re-wording.
user << "<span class='alert'>There is no exposed flesh or thin material [target_zone == "head" ? "on their head" : "on their body"] to inject into.</span>"
if(!fail_msg)
fail_msg = "There is no exposed flesh or thin material [target_zone == "head" ? "on their head" : "on their body"] to inject into."
user << "<span class='alert'>[fail_msg]</span>"
/mob/living/carbon/human/print_flavor_text(var/shrink = 1)
var/list/equipment = list(src.head,src.wear_mask,src.glasses,src.w_uniform,src.wear_suit,src.gloves,src.shoes)
@@ -48,6 +48,12 @@
switch(M.a_intent)
if(I_HELP)
if(istype(H) && health < config.health_threshold_crit && health > config.health_threshold_dead)
if(!H.check_has_mouth())
H << "<span class='danger'>You don't have a mouth, you cannot perform CPR!</span>"
return
if(!check_has_mouth())
H << "<span class='danger'>They don't have a mouth, you cannot perform CPR!</span>"
return
if((H.head && (H.head.flags & HEADCOVERSMOUTH)) || (H.wear_mask && (H.wear_mask.flags & MASKCOVERSMOUTH)))
H << "<span class='notice'>Remove your mask!</span>"
return 0
@@ -178,8 +184,13 @@
miss_type = 2
// See what attack they use
var/possible_moves = list()
var/datum/unarmed_attack/attack = null
for(var/datum/unarmed_attack/u_attack in H.species.unarmed_attacks)
for(var/part in list("l_hand","r_hand","l_foot","r_foot","head"))
var/obj/item/organ/external/E = H.get_organ(part)
possible_moves |= E.species.unarmed_attacks
for(var/datum/unarmed_attack/u_attack in possible_moves)
if(!u_attack.is_usable(H, src, hit_zone))
continue
else
@@ -142,12 +142,12 @@
..()
/mob/living/carbon/human/getCloneLoss()
if(species.flags & (IS_SYNTHETIC | NO_SCAN))
if(species.flags & (NO_SCAN))
cloneloss = 0
return ..()
/mob/living/carbon/human/setCloneLoss(var/amount)
if(species.flags & (IS_SYNTHETIC | NO_SCAN))
if(species.flags & (NO_SCAN))
cloneloss = 0
else
..()
@@ -155,7 +155,7 @@
/mob/living/carbon/human/adjustCloneLoss(var/amount)
..()
if(species.flags & (IS_SYNTHETIC | NO_SCAN))
if(species.flags & (NO_SCAN))
cloneloss = 0
return
@@ -179,12 +179,6 @@ emp_act
for(var/obj/O in src)
if(!O) continue
O.emp_act(severity)
for(var/obj/item/organ/external/O in organs)
if(O.status & ORGAN_DESTROYED) continue
O.emp_act(severity)
for(var/obj/item/organ/I in O.internal_organs)
if(I.robotic == 0) continue
I.emp_act(severity)
..()
+13 -13
View File
@@ -258,9 +258,6 @@
proc/handle_mutations_and_radiation()
if(species.flags & IS_SYNTHETIC) //Robots don't suffer from mutations or radloss.
return
if(getFireLoss())
if((COLD_RESISTANCE in mutations) || (prob(1)))
heal_organ_damage(0,1)
@@ -709,9 +706,9 @@
*/
proc/stabilize_body_temperature()
if (species.flags & IS_SYNTHETIC)
bodytemperature += species.synth_temp_gain //just keep putting out heat.
return
if (species.passive_temp_gain) // We produce heat naturally.
bodytemperature += species.passive_temp_gain
var/body_temperature_difference = species.body_temperature - bodytemperature
@@ -858,15 +855,16 @@
proc/handle_chemicals_in_body()
if(reagents && !(species.flags & IS_SYNTHETIC)) //Synths don't process reagents.
if(reagents)
chem_effects.Cut()
analgesic = 0
var/alien = 0
if(species && species.reagent_tag)
alien = species.reagent_tag
touching.metabolize(alien, CHEM_TOUCH)
ingested.metabolize(alien, CHEM_INGEST)
reagents.metabolize(alien, CHEM_BLOOD)
if(!(species.flags & NO_BLOOD))
ingested.metabolize(alien, CHEM_INGEST)
reagents.metabolize(alien, CHEM_BLOOD)
if(CE_PAINKILLER in chem_effects)
analgesic = chem_effects[CE_PAINKILLER]
@@ -931,7 +929,8 @@
take_overall_damage(2,0)
traumatic_shock++
if(!(species.flags & IS_SYNTHETIC)) handle_trace_chems()
// TODO: stomach and bloodstream organ.
handle_trace_chems()
updatehealth()
@@ -1133,7 +1132,7 @@
if(damageoverlay.overlays)
damageoverlay.overlays = list()
if(stat == UNCONSCIOUS)
//Critical damage passage overlay
if(health <= 0)
@@ -1268,7 +1267,7 @@
if(2) healths.icon_state = "health7"
else
//switch(health - halloss)
switch(100 - ((species && species.flags & NO_PAIN & !IS_SYNTHETIC) ? 0 : traumatic_shock))
switch(100 - ((species.flags & NO_PAIN) ? 0 : traumatic_shock))
if(100 to INFINITY) healths.icon_state = "health0"
if(80 to 100) healths.icon_state = "health1"
if(60 to 80) healths.icon_state = "health2"
@@ -1504,7 +1503,8 @@
if(life_tick % 5) return pulse //update pulse every 5 life ticks (~1 tick/sec, depending on server load)
if(species && species.flags & NO_BLOOD) return PULSE_NONE //No blood, no pulse.
if(species && species.flags & NO_BLOOD)
return PULSE_NONE //No blood, no pulse.
if(stat == DEAD)
return PULSE_NONE //that's it, you're dead, nothing can influence your pulse
+2 -1
View File
@@ -170,8 +170,9 @@
/mob/living/carbon/human/handle_message_mode(message_mode, message, verb, speaking, used_radios, alt_name)
switch(message_mode)
if("intercom")
for(var/obj/item/device/radio/intercom/I in view(1, null))
for(var/obj/item/device/radio/intercom/I in view(1))
I.talk_into(src, message, verb, speaking)
I.add_fingerprint(src)
used_radios += I
if("headset")
if(l_ear && istype(l_ear,/obj/item/device/radio))
@@ -29,6 +29,7 @@
var/icon/icon_template // Used for mob icon generation for non-32x32 species.
var/is_small
var/show_ssd = 1
var/virus_immune
// Language/culture vars.
var/default_language = "Galactic Common" // Default language is used when 'say' is used without modifiers.
@@ -69,7 +70,7 @@
var/heat_level_1 = 360 // Heat damage level 1 above this point.
var/heat_level_2 = 400 // Heat damage level 2 above this point.
var/heat_level_3 = 1000 // Heat damage level 3 above this point.
var/synth_temp_gain = 0 // IS_SYNTHETIC species will gain this much temperature every second
var/passive_temp_gain = 0 // Species will gain this much temperature every second
var/hazard_high_pressure = HAZARD_HIGH_PRESSURE // Dangerously high pressure.
var/warning_high_pressure = WARNING_HIGH_PRESSURE // High pressure warning.
var/warning_low_pressure = WARNING_LOW_PRESSURE // Low pressure warning.
@@ -213,13 +214,6 @@
for(var/obj/item/organ/external/O in H.organs)
O.owner = H
if(flags & IS_SYNTHETIC)
for(var/obj/item/organ/external/E in H.organs)
if(E.status & ORGAN_CUT_AWAY || E.status & ORGAN_DESTROYED) continue
E.robotize()
for(var/obj/item/organ/I in H.internal_organs)
I.robotize()
/datum/species/proc/hug(var/mob/living/carbon/human/H,var/mob/living/target)
var/t_him = "them"
@@ -8,7 +8,7 @@
language = "Sol Common" //todo?
unarmed_types = list(/datum/unarmed_attack/slime_glomp)
flags = IS_RESTRICTED | NO_BLOOD | NO_SCAN | NO_SLIP | NO_BREATHE
flags = IS_RESTRICTED | NO_SCAN | NO_SLIP | NO_BREATHE
siemens_coefficient = 3
darksight = 3
@@ -30,17 +30,17 @@
push_flags = MONKEY|SLIME|SIMPLE_ANIMAL
has_limbs = list(
"chest" = list("path" = /obj/item/organ/external/chest/slime),
"groin" = list("path" = /obj/item/organ/external/groin/slime),
"head" = list("path" = /obj/item/organ/external/head/slime),
"l_arm" = list("path" = /obj/item/organ/external/arm/slime),
"r_arm" = list("path" = /obj/item/organ/external/arm/right/slime),
"l_leg" = list("path" = /obj/item/organ/external/leg/slime),
"r_leg" = list("path" = /obj/item/organ/external/leg/right/slime),
"l_hand" = list("path" = /obj/item/organ/external/hand/slime),
"r_hand" = list("path" = /obj/item/organ/external/hand/right/slime),
"l_foot" = list("path" = /obj/item/organ/external/foot/slime),
"r_foot" = list("path" = /obj/item/organ/external/foot/right/slime)
"chest" = list("path" = /obj/item/organ/external/chest/unbreakable),
"groin" = list("path" = /obj/item/organ/external/groin/unbreakable),
"head" = list("path" = /obj/item/organ/external/head/unbreakable),
"l_arm" = list("path" = /obj/item/organ/external/arm/unbreakable),
"r_arm" = list("path" = /obj/item/organ/external/arm/right/unbreakable),
"l_leg" = list("path" = /obj/item/organ/external/leg/unbreakable),
"r_leg" = list("path" = /obj/item/organ/external/leg/right/unbreakable),
"l_hand" = list("path" = /obj/item/organ/external/hand/unbreakable),
"r_hand" = list("path" = /obj/item/organ/external/hand/right/unbreakable),
"l_foot" = list("path" = /obj/item/organ/external/foot/unbreakable),
"r_foot" = list("path" = /obj/item/organ/external/foot/right/unbreakable)
)
/datum/species/slime/handle_death(var/mob/living/carbon/human/H)
@@ -195,7 +195,7 @@
body_temperature = T0C + 15 //make the plant people have a bit lower body temperature, why not
flags = CAN_JOIN | IS_WHITELISTED | NO_BREATHE | NO_SCAN | IS_PLANT | NO_BLOOD | NO_PAIN | NO_SLIP | REGENERATES_LIMBS
flags = CAN_JOIN | IS_WHITELISTED | NO_BREATHE | NO_SCAN | IS_PLANT | NO_BLOOD | NO_PAIN | NO_SLIP
blood_color = "#004400"
flesh_color = "#907E4A"
@@ -231,21 +231,28 @@
else
qdel(D)
H.visible_message("\red[H] splits apart with a wet slithering noise!")
H.visible_message("<span class='danger'>[H] splits apart with a wet slithering noise!</span>")
/datum/species/machine
name = "Machine"
name_plural = "machines"
blurb = "Positronic intelligence really took off in the 26th century, and it is not uncommon to see independant, free-willed \
robots on many human stations, particularly in fringe systems where standards are slightly lax and public opinion less relevant \
to corporate operations. IPCs (Integrated Positronic Chassis) are a loose category of self-willed robots with a humanoid form, \
generally self-owned after being 'born' into servitude; they are reliable and dedicated workers, albeit more than slightly \
inhuman in outlook and perspective."
icobase = 'icons/mob/human_races/r_machine.dmi'
deform = 'icons/mob/human_races/r_machine.dmi'
language = "Tradeband"
language = "Encoded Audio Language"
unarmed_types = list(/datum/unarmed_attack/punch)
rarity_value = 2
eyes = "blank_eyes"
brute_mod = 0.5
burn_mod = 1
brute_mod = 2.5 // 100% * 2.5 * 0.6 (robolimbs) ~= 150%
burn_mod = 2.5 // So they take 50% extra damage from brute/burn overall.
warning_low_pressure = 50
hazard_low_pressure = 0
@@ -254,24 +261,41 @@
cold_level_2 = -1
cold_level_3 = -1
heat_level_1 = 500 //gives them about 25 seconds in space before taking damage
heat_level_1 = 500 // Gives them about 25 seconds in space before taking damage
heat_level_2 = 1000
heat_level_3 = 2000
synth_temp_gain = 10 //this should cause IPCs to stabilize at ~80 C in a 20 C environment.
passive_temp_gain = 10 // This should cause IPCs to stabilize at ~80 C in a 20 C environment.
siemens_coefficient = 0 // Insulated.
flags = CAN_JOIN | IS_WHITELISTED | NO_BREATHE | NO_SCAN | NO_BLOOD | NO_PAIN | IS_SYNTHETIC
flags = CAN_JOIN | IS_WHITELISTED | NO_BREATHE | NO_SCAN | NO_BLOOD | NO_PAIN | NO_POISON
blood_color = "#1F181F"
flesh_color = "#575757"
virus_immune = 1
reagent_tag = IS_MACHINE
has_organ = list() //TODO: Positronic brain.
has_organ = list(
"brain" = /obj/item/organ/mmi_holder/posibrain,
"cell" = /obj/item/organ/cell
)
/datum/species/machine/equip_survival_gear(var/mob/living/carbon/human/H)
has_limbs = list(
"chest" = list("path" = /obj/item/organ/external/chest/ipc),
"groin" = list("path" = /obj/item/organ/external/groin/ipc),
"head" = list("path" = /obj/item/organ/external/head/ipc),
"l_arm" = list("path" = /obj/item/organ/external/arm/ipc),
"r_arm" = list("path" = /obj/item/organ/external/arm/right/ipc),
"l_leg" = list("path" = /obj/item/organ/external/leg/ipc),
"r_leg" = list("path" = /obj/item/organ/external/leg/right/ipc),
"l_hand" = list("path" = /obj/item/organ/external/hand/ipc),
"r_hand" = list("path" = /obj/item/organ/external/hand/right/ipc),
"l_foot" = list("path" = /obj/item/organ/external/foot/ipc),
"r_foot" = list("path" = /obj/item/organ/external/foot/right/ipc)
)
/datum/species/machine/handle_death(var/mob/living/carbon/human/H)
..()
if(flags & IS_SYNTHETIC)
H.h_style = ""
spawn(100)
if(H) H.update_hair()
H.h_style = ""
spawn(100)
if(H) H.update_hair()
@@ -234,15 +234,13 @@ var/global/list/damage_icon_parts = list()
var/hulk = (HULK in src.mutations)
var/skeleton = (SKELETON in src.mutations)
var/g = (gender == FEMALE ? "f" : "m")
//CACHING: Generate an index key from visible bodyparts.
//0 = destroyed, 1 = normal, 2 = robotic, 3 = necrotic.
//Create a new, blank icon for our mob to use.
if(stand_icon)
qdel(stand_icon)
stand_icon = new(species.icon_template ? species.icon_template : 'icons/mob/human.dmi',"blank")
var/icon_key = "[species.race_key][g][s_tone][r_skin][g_skin][b_skin]"
var/icon_key = ""
var/obj/item/organ/eyes/eyes = internal_organs_by_name["eyes"]
if(eyes)
@@ -260,7 +258,12 @@ var/global/list/damage_icon_parts = list()
icon_key += "3"
else
icon_key += "1"
if(part)
icon_key += "[part.species.race_key]"
icon_key += "[part.dna.GetUIState(DNA_UI_GENDER)]"
icon_key += "[part.dna.GetUIValue(DNA_UI_SKIN_TONE)]"
if(part.s_col)
icon_key += "[rgb(part.s_col[1],part.s_col[2],part.s_col[3])]"
icon_key = "[icon_key][husk ? 1 : 0][fat ? 1 : 0][hulk ? 1 : 0][skeleton ? 1 : 0]"
var/icon/base_icon
@@ -894,22 +897,22 @@ var/global/list/damage_icon_parts = list()
/mob/living/carbon/human/proc/get_tail_icon()
var/icon_key = "[species.race_key][r_skin][g_skin][b_skin]"
var/icon/tail_icon = tail_icon_cache[icon_key]
if(!tail_icon)
if(!tail_icon)
//generate a new one
tail_icon = new/icon(icon = (species.tail_animation? species.tail_animation : 'icons/effects/species.dmi'))
tail_icon.Blend(rgb(r_skin, g_skin, b_skin), ICON_ADD)
tail_icon_cache[icon_key] = tail_icon
return tail_icon
/mob/living/carbon/human/proc/set_tail_state(var/t_state)
var/image/tail_overlay = overlays_standing[TAIL_LAYER]
if(tail_overlay && species.tail_animation)
tail_overlay.icon_state = t_state
return tail_overlay
@@ -919,30 +922,30 @@ var/global/list/damage_icon_parts = list()
//Update this if the ability to flick() images or make looping animation start at the first frame is ever added.
/mob/living/carbon/human/proc/animate_tail_once(var/update_icons=1)
var/t_state = "[species.tail]_once"
var/image/tail_overlay = overlays_standing[TAIL_LAYER]
if(tail_overlay && tail_overlay.icon_state == t_state)
return //let the existing animation finish
tail_overlay = set_tail_state(t_state)
if(tail_overlay)
spawn(15)
//check that the animation hasn't changed in the meantime
if(overlays_standing[TAIL_LAYER] == tail_overlay && tail_overlay.icon_state == t_state)
animate_tail_stop()
if(update_icons)
update_icons()
/mob/living/carbon/human/proc/animate_tail_start(var/update_icons=1)
set_tail_state("[species.tail]_slow[rand(0,9)]")
if(update_icons)
update_icons()
/mob/living/carbon/human/proc/animate_tail_fast(var/update_icons=1)
set_tail_state("[species.tail]_loop[rand(0,9)]")
if(update_icons)
update_icons()
@@ -951,14 +954,14 @@ var/global/list/damage_icon_parts = list()
set_tail_state("[species.tail]_idle[rand(0,9)]")
else
set_tail_state("[species.tail]_static")
if(update_icons)
update_icons()
/mob/living/carbon/human/proc/animate_tail_stop(var/update_icons=1)
set_tail_state("[species.tail]_static")
if(update_icons)
update_icons()
@@ -26,54 +26,70 @@
user.show_message("\blue Key: Suffocation/Toxin/Burns/Brute", 1)
user.show_message("\blue Body Temperature: ???", 1)
return
if(!(istype(user, /mob/living/carbon/human) || ticker) && ticker.mode.name != "monkey")
user << "\red You don't have the dexterity to do this!"
return
if(!istype(M, /mob/living/silicon/robot) && !(ishuman(M) && (M:species.flags & IS_SYNTHETIC)))
var/scan_type
if(istype(M, /mob/living/silicon/robot))
scan_type = "robot"
else if(istype(M, /mob/living/carbon/human))
scan_type = "prosthetics"
else
user << "\red You can't analyze non-robotic things!"
return
user.visible_message("<span class='notice'> [user] has analyzed [M]'s components.","<span class='notice'> You have analyzed [M]'s components.")
var/BU = M.getFireLoss() > 50 ? "<b>[M.getFireLoss()]</b>" : M.getFireLoss()
var/BR = M.getBruteLoss() > 50 ? "<b>[M.getBruteLoss()]</b>" : M.getBruteLoss()
user.show_message("\blue Analyzing Results for [M]:\n\t Overall Status: [M.stat > 1 ? "fully disabled" : "[M.health - M.halloss]% functional"]")
user.show_message("\t Key: <font color='#FFA500'>Electronics</font>/<font color='red'>Brute</font>", 1)
user.show_message("\t Damage Specifics: <font color='#FFA500'>[BU]</font> - <font color='red'>[BR]</font>")
if(M.tod && M.stat == DEAD)
user.show_message("\blue Time of Disable: [M.tod]")
user.visible_message("<span class='notice'>\The [user] has analyzed [M]'s components.","<span class='notice'>You have analyzed [M]'s components.")
switch(scan_type)
if("robot")
var/BU = M.getFireLoss() > 50 ? "<b>[M.getFireLoss()]</b>" : M.getFireLoss()
var/BR = M.getBruteLoss() > 50 ? "<b>[M.getBruteLoss()]</b>" : M.getBruteLoss()
user.show_message("\blue Analyzing Results for [M]:\n\t Overall Status: [M.stat > 1 ? "fully disabled" : "[M.health - M.halloss]% functional"]")
user.show_message("\t Key: <font color='#FFA500'>Electronics</font>/<font color='red'>Brute</font>", 1)
user.show_message("\t Damage Specifics: <font color='#FFA500'>[BU]</font> - <font color='red'>[BR]</font>")
if(M.tod && M.stat == DEAD)
user.show_message("\blue Time of Disable: [M.tod]")
var/mob/living/silicon/robot/H = M
var/list/damaged = H.get_damaged_components(1,1,1)
user.show_message("\blue Localized Damage:",1)
if(length(damaged)>0)
for(var/datum/robot_component/org in damaged)
user.show_message(text("\blue \t []: [][] - [] - [] - []", \
capitalize(org.name), \
(org.installed == -1) ? "<font color='red'><b>DESTROYED</b></font> " :"",\
(org.electronics_damage > 0) ? "<font color='#FFA500'>[org.electronics_damage]</font>" :0, \
(org.brute_damage > 0) ? "<font color='red'>[org.brute_damage]</font>" :0, \
(org.toggled) ? "Toggled ON" : "<font color='red'>Toggled OFF</font>",\
(org.powered) ? "Power ON" : "<font color='red'>Power OFF</font>"),1)
else
user.show_message("\blue \t Components are OK.",1)
if(H.emagged && prob(5))
user.show_message("\red \t ERROR: INTERNAL SYSTEMS COMPROMISED",1)
user.show_message("\blue Operating Temperature: [M.bodytemperature-T0C]&deg;C ([M.bodytemperature*1.8-459.67]&deg;F)", 1)
if (istype(M, /mob/living/silicon/robot))
var/mob/living/silicon/robot/H = M
var/list/damaged = H.get_damaged_components(1,1,1)
user.show_message("\blue Localized Damage:",1)
if(length(damaged)>0)
for(var/datum/robot_component/org in damaged)
user.show_message(text("\blue \t []: [][] - [] - [] - []", \
capitalize(org.name), \
(org.installed == -1) ? "<font color='red'><b>DESTROYED</b></font> " :"",\
(org.electronics_damage > 0) ? "<font color='#FFA500'>[org.electronics_damage]</font>" :0, \
(org.brute_damage > 0) ? "<font color='red'>[org.brute_damage]</font>" :0, \
(org.toggled) ? "Toggled ON" : "<font color='red'>Toggled OFF</font>",\
(org.powered) ? "Power ON" : "<font color='red'>Power OFF</font>"),1)
else
user.show_message("\blue \t Components are OK.",1)
if(H.emagged && prob(5))
user.show_message("\red \t ERROR: INTERNAL SYSTEMS COMPROMISED",1)
if("prosthetics")
var/mob/living/carbon/human/H = M
user << "<span class='notice'>Analyzing Results for \the [H]:</span>"
user << "Key: <font color='#FFA500'>Electronics</font>/<font color='red'>Brute</font>"
if (ishuman(M) && (M:species.flags & IS_SYNTHETIC))
var/mob/living/carbon/human/H = M
var/list/damaged = H.get_damaged_organs(1,1)
user.show_message("\blue Localized Damage, Brute/Electronics:",1)
if(length(damaged)>0)
for(var/obj/item/organ/external/org in damaged)
user.show_message(text("\blue \t []: [] - []", \
capitalize(org.name), \
(org.brute_dam > 0) ? "\red [org.brute_dam]" :0, \
(org.burn_dam > 0) ? "<font color='#FFA500'>[org.burn_dam]</font>" :0),1)
else
user.show_message("\blue \t Components are OK.",1)
user.show_message("\blue Operating Temperature: [M.bodytemperature-T0C]&deg;C ([M.bodytemperature*1.8-459.67]&deg;F)", 1)
user << "<span class='notice'>External prosthetics:</span>"
var/organ_found
if(H.internal_organs.len)
for(var/obj/item/organ/external/E in H.organs)
if(!(E.status & ORGAN_ROBOT))
continue
organ_found = 1
user << "[E.name]: <font color='red'>[E.brute_dam]</font> <font color='#FFA500'>[E.burn_dam]</font>"
if(!organ_found)
user << "No prosthetics located."
user << "<hr>"
user << "<span class='notice'>Internal prosthetics:</span>"
organ_found = null
if(H.internal_organs.len)
for(var/obj/item/organ/O in H.internal_organs)
if(!(O.status & ORGAN_ROBOT))
continue
organ_found = 1
user << "[O.name]: <font color='red'>[O.damage]</font>"
if(!organ_found)
user << "No prosthetics located."
src.add_fingerprint(user)
return
@@ -28,6 +28,7 @@
maxbodytemp = 323 //Above 50 Degrees Celcius
universal_speak = 0
universal_understand = 1
holder_type = /obj/item/weapon/holder/mouse
mob_size = 1
/mob/living/simple_animal/mouse/Life()
@@ -62,6 +63,13 @@
if(!body_color)
body_color = pick( list("brown","gray","white") )
switch(body_color)
if("brown")
holder_type = /obj/item/weapon/holder/mouse/brown
if("gray")
holder_type = /obj/item/weapon/holder/mouse/gray
if("white")
holder_type = /obj/item/weapon/holder/mouse/white
icon_state = "mouse_[body_color]"
icon_living = "mouse_[body_color]"
icon_dead = "mouse_[body_color]_dead"
@@ -76,6 +84,22 @@
if(client)
client.time_died_as_mouse = world.time
/mob/living/simple_animal/mouse/MouseDrop(atom/over_object)
var/mob/living/carbon/H = over_object
if(!istype(H) || !Adjacent(H)) return ..()
if(H.a_intent == "help")
get_scooped(H)
return
else
return ..()
/mob/living/simple_animal/mouse/get_scooped(var/mob/living/carbon/grabber)
if (stat >= DEAD)
return
..()
/mob/living/simple_animal/mouse/start_pulling(var/atom/movable/AM)//Prevents mouse from pulling things
src << "<span class='warning'>You are too small to pull anything.</span>"
return
@@ -101,14 +125,17 @@
/mob/living/simple_animal/mouse/white
body_color = "white"
icon_state = "mouse_white"
holder_type = /obj/item/weapon/holder/mouse/white
/mob/living/simple_animal/mouse/gray
body_color = "gray"
icon_state = "mouse_gray"
holder_type = /obj/item/weapon/holder/mouse/gray
/mob/living/simple_animal/mouse/brown
body_color = "brown"
icon_state = "mouse_brown"
holder_type = /obj/item/weapon/holder/mouse/brown
//TOM IS ALIVE! SQUEEEEEEEE~K :)
/mob/living/simple_animal/mouse/brown/Tom
+5 -1
View File
@@ -104,7 +104,11 @@
return 0
/mob/living/carbon/human/isSynthetic()
return species.flags & IS_SYNTHETIC
// If they are 100% robotic, they count as synthetic.
for(var/obj/item/organ/external/E in organs)
if(!(E.status & ORGAN_ROBOT))
return 0
return 1
/mob/living/silicon/isSynthetic()
return 1
@@ -208,7 +208,7 @@ datum/preferences
if(!dummy.mind)
dummy.mind = new
dummy.mind.role_alt_title = alt
J.equip(dummy)
J.equip_preview(dummy)
break
dummy.update_eyes()
dummy.force_update_limbs()
+1 -1
View File
@@ -214,7 +214,7 @@ var/const/BLOOD_VOLUME_SURVIVE = 122
//Transfers blood from reagents to vessel, respecting blood types compatability.
/mob/living/carbon/human/inject_blood(var/datum/reagent/blood/injected, var/amount)
if(species && species.flags & NO_BLOOD)
if(species.flags & NO_BLOOD)
reagents.add_reagent("blood", amount, injected.data)
reagents.update_total()
return
+70
View File
@@ -0,0 +1,70 @@
//CORTICAL BORER ORGANS.
/obj/item/organ/borer/process()
// Borer husks regenerate health, feel no pain, and are resistant to stuns and brainloss.
for(var/chem in list("tricordrazine","tramadol","hyperzine","alkysine"))
if(owner.reagents.get_reagent_amount(chem) < 3)
owner.reagents.add_reagent(chem, 5)
// They're also super gross and ooze ichor.
if(prob(5))
var/mob/living/carbon/human/H = owner
if(!istype(H))
return
var/datum/reagent/blood/B = locate(/datum/reagent/blood) in H.vessel.reagent_list
blood_splatter(H,B,1)
var/obj/effect/decal/cleanable/blood/splatter/goo = locate() in get_turf(owner)
if(goo)
goo.name = "husk ichor"
goo.desc = "It's thick and stinks of decay."
goo.basecolor = "#412464"
goo.update_icon()
/obj/item/organ/borer
name = "cortical borer"
icon = 'icons/obj/objects.dmi'
icon_state = "borer"
organ_tag = "brain"
desc = "A disgusting space slug."
parent_organ = "head"
vital = 1
/obj/item/organ/borer/removed(var/mob/living/user)
..()
var/mob/living/simple_animal/borer/B = owner.has_brain_worms()
if(B)
B.leave_host()
B.ckey = owner.ckey
spawn(0)
qdel(src)
//VOX ORGANS.
/obj/item/organ/stack
name = "cortical stack"
parent_organ = "head"
robotic = 2
vital = 1
var/backup_time = 0
var/datum/mind/backup
/obj/item/organ/stack/process()
if(owner && owner.stat != DEAD && !is_broken())
backup_time = world.time
if(owner.mind) backup = owner.mind
/obj/item/organ/stack/vox
/obj/item/organ/stack/vox/stack
/obj/item/organ/stack
name = "cortical stack"
icon_state = "brain-prosthetic"
organ_tag = "stack"
robotic = 2
/obj/item/organ/stack/vox
name = "vox cortical stack"
+43 -41
View File
@@ -23,6 +23,8 @@ var/list/organ_cache = list()
var/list/trace_chemicals = list() // traces of chemicals in the organ,
// links chemical IDs to number of ticks for which they'll stay in the blood
germ_level = 0
var/datum/dna/dna
var/datum/species/species
/obj/item/organ/proc/update_health()
return
@@ -34,6 +36,12 @@ var/list/organ_cache = list()
max_damage = min_broken_damage * 2
if(istype(holder))
src.owner = holder
species = all_species["Human"]
if(holder.dna)
dna = holder.dna.Clone()
species = all_species[dna.species]
else
log_debug("[src] at [loc] spawned without a proper DNA.")
var/mob/living/carbon/human/H = holder
if(istype(H))
if(internal)
@@ -42,10 +50,10 @@ var/list/organ_cache = list()
if(E.internal_organs == null)
E.internal_organs = list()
E.internal_organs |= src
if(H.dna)
if(dna)
if(!blood_DNA)
blood_DNA = list()
blood_DNA[H.dna.unique_enzymes] = H.dna.b_type
blood_DNA[dna.unique_enzymes] = dna.b_type
if(internal)
holder.internal_organs |= src
@@ -53,16 +61,18 @@ var/list/organ_cache = list()
if(status & ORGAN_ROBOT)
return
damage = max_damage
status |= ORGAN_DEAD
processing_objects -= src
if(dead_icon)
icon_state = dead_icon
/obj/item/organ/process()
// Don't process if we're in a freezer, an MMI or a stasis bag. //TODO: ambient temperature?
if(istype(loc,/obj/item/device/mmi) || istype(loc,/obj/item/bodybag/cryobag) || istype(loc,/obj/structure/closet/crate/freezer))
// Don't process if we're in a freezer, an MMI or a stasis bag.or a freezer or something I dunno
if(istype(loc,/obj/item/device/mmi))
return
if(istype(loc,/obj/structure/closet/body_bag/cryobag) || istype(loc,/obj/structure/closet/crate/freezer) || istype(loc,/obj/item/weapon/storage/box/freezer))
return
//Process infections
if (robotic >= 2 || (owner && owner.species && (owner.species.flags & IS_PLANT)))
germ_level = 0
@@ -76,8 +86,10 @@ var/list/organ_cache = list()
if(B && prob(40))
reagents.remove_reagent("blood",0.1)
blood_splatter(src,B,1)
damage += rand(1,3)
if(damage >= max_damage)
germ_level += rand(2,6)
if(germ_level >= INFECTION_LEVEL_TWO)
germ_level += rand(2,6)
if(germ_level >= INFECTION_LEVEL_THREE)
die()
else if(owner.bodytemperature >= 170) //cryo stops germs from moving and doing their bad stuffs
@@ -86,6 +98,11 @@ var/list/organ_cache = list()
handle_rejection()
handle_germ_effects()
/obj/item/organ/examine(mob/user)
..(user)
if(status & ORGAN_DEAD)
user << "<span class='notice'>The decay has set in.</span>"
/obj/item/organ/proc/handle_germ_effects()
//** Handle the effects of infections
var/antibiotics = owner.reagents.get_reagent_amount("spaceacillin")
@@ -114,24 +131,23 @@ var/list/organ_cache = list()
/obj/item/organ/proc/handle_rejection()
// Process unsuitable transplants. TODO: consider some kind of
// immunosuppressant that changes transplant data to make it match.
if(transplant_data)
if(!rejecting && prob(20) && owner.dna && blood_incompatible(transplant_data["blood_type"],owner.dna.b_type,owner.species,transplant_data["species"]))
rejecting = 1
if(dna)
if(!rejecting)
if(blood_incompatible(dna.b_type, owner.dna.b_type, species, owner.species))
rejecting = 1
else
rejecting++ //Rejection severity increases over time.
if(rejecting % 10 == 0) //Only fire every ten rejection ticks.
switch(rejecting)
if(1 to 50)
take_damage(1)
germ_level++
if(51 to 200)
owner.reagents.add_reagent("toxin", 1)
take_damage(1)
germ_level += rand(1,2)
if(201 to 500)
take_damage(rand(2,3))
owner.reagents.add_reagent("toxin", 2)
germ_level += rand(2,3)
if(501 to INFINITY)
take_damage(4)
owner.reagents.add_reagent("toxin", rand(3,5))
germ_level += rand(3,5)
owner.reagents.add_reagent("toxin", rand(1,2))
/obj/item/organ/proc/receive_chem(chemical as obj)
return 0
@@ -204,31 +220,17 @@ var/list/organ_cache = list()
min_broken_damage = 35
/obj/item/organ/emp_act(severity)
switch(robotic)
if(0)
if(!(status & ORGAN_ROBOT))
return
switch (severity)
if (1.0)
take_damage(0,20)
return
if(1)
switch (severity)
if (1.0)
take_damage(20,0)
return
if (2.0)
take_damage(7,0)
return
if(3.0)
take_damage(3,0)
return
if(2)
switch (severity)
if (1.0)
take_damage(40,0)
return
if (2.0)
take_damage(15,0)
return
if(3.0)
take_damage(10,0)
return
if (2.0)
take_damage(0,7)
return
if(3.0)
take_damage(0,3)
/obj/item/organ/proc/removed(var/mob/living/user)
+12 -181
View File
@@ -141,20 +141,11 @@
/obj/item/organ/external/take_damage(brute, burn, sharp, edge, used_weapon = null, list/forbidden_limbs = list())
if((brute <= 0) && (burn <= 0))
return 0
if(status & ORGAN_DESTROYED)
return 0
if(status & ORGAN_ROBOT )
var/brmod = 0.66
var/bumod = 0.66
if(istype(owner,/mob/living/carbon/human))
var/mob/living/carbon/human/H = owner
if(H.species && H.species.flags & IS_SYNTHETIC)
brmod = H.species.brute_mod
bumod = H.species.burn_mod
brute *= brmod //~2/3 damage for ROBOLIMBS
burn *= bumod //~2/3 damage for ROBOLIMBS
@@ -322,10 +313,14 @@ This function completely restores a damaged organ to perfect condition.
var/datum/wound/W = pick(compatible_wounds)
W.open_wound(damage)
if(prob(25))
//maybe have a separate message for BRUISE type damage?
owner.visible_message("\red The wound on [owner.name]'s [name] widens with a nasty ripping noise.",\
"\red The wound on your [name] widens with a nasty ripping noise.",\
"You hear a nasty ripping noise, as if flesh is being torn apart.")
if(status & ORGAN_ROBOT)
owner.visible_message("\red The damage to [owner.name]'s [name] worsens.",\
"\red The damage to your [name] worsens.",\
"You hear the screech of abused metal.")
else
owner.visible_message("\red The wound on [owner.name]'s [name] widens with a nasty ripping noise.",\
"\red The wound on your [name] widens with a nasty ripping noise.",\
"You hear a nasty ripping noise, as if flesh is being torn apart.")
return
//Creating wound
@@ -354,7 +349,7 @@ This function completely restores a damaged organ to perfect condition.
//Determines if we even need to process this organ.
/obj/item/organ/external/proc/need_process()
if(status && status != ORGAN_ROBOT) // If it's robotic, that's fine it will have a status.
if(status & (ORGAN_CUT_AWAY|ORGAN_GAUZED|ORGAN_BLEEDING|ORGAN_BROKEN|ORGAN_DESTROYED|ORGAN_SPLINTED|ORGAN_DEAD|ORGAN_MUTATED))
return 1
if(brute_dam || burn_dam)
return 1
@@ -369,11 +364,6 @@ This function completely restores a damaged organ to perfect condition.
/obj/item/organ/external/process()
if(owner)
//Dismemberment
if(status & ORGAN_DESTROYED)
if(config.limbs_can_break)
droplimb(0,DROPLIMB_EDGE) //Might be worth removing this check since take_damage handles it.
return
if(parent)
if(parent.status & ORGAN_DESTROYED)
status |= ORGAN_DESTROYED
@@ -933,6 +923,9 @@ Note that amputating the affected organ does in fact remove the infection from t
/obj/item/organ/external/proc/get_wounds_desc()
. = ""
if(status & ORGAN_DESTROYED && !is_stump())
. += "tear at [amputation_point] so bad it barely hangs on few tendons"
if(status & ORGAN_ROBOT)
if(brute_dam)
switch(brute_dam)
@@ -983,165 +976,3 @@ Note that amputating the affected organ does in fact remove the infection from t
if(6 to INFINITY)
flavor_text += "a ton of [wound]\s"
return english_list(flavor_text)
/****************************************************
ORGAN DEFINES
****************************************************/
/obj/item/organ/external/chest
name = "upper body"
limb_name = "chest"
icon_name = "torso"
health = 100
min_broken_damage = 35
body_part = UPPER_TORSO
vital = 1
amputation_point = "spine"
joint = "neck"
dislocated = -1
gendered_icon = 1
cannot_amputate = 1
parent_organ = null
encased = "ribcage"
/obj/item/organ/external/groin
name = "lower body"
limb_name = "groin"
icon_name = "groin"
health = 100
min_broken_damage = 35
body_part = LOWER_TORSO
vital = 1
parent_organ = "chest"
amputation_point = "lumbar"
joint = "hip"
dislocated = -1
gendered_icon = 1
/obj/item/organ/external/arm
limb_name = "l_arm"
name = "left arm"
icon_name = "l_arm"
health = 50
min_broken_damage = 30
body_part = ARM_LEFT
parent_organ = "chest"
joint = "left elbow"
amputation_point = "left shoulder"
can_grasp = 1
/obj/item/organ/external/arm/right
limb_name = "r_arm"
name = "right arm"
icon_name = "r_arm"
body_part = ARM_RIGHT
joint = "right elbow"
amputation_point = "right shoulder"
/obj/item/organ/external/leg
limb_name = "l_leg"
name = "left leg"
icon_name = "l_leg"
health = 50
min_broken_damage = 30
body_part = LEG_LEFT
icon_position = LEFT
parent_organ = "groin"
joint = "left knee"
amputation_point = "left hip"
can_stand = 1
/obj/item/organ/external/leg/right
limb_name = "r_leg"
name = "right leg"
icon_name = "r_leg"
body_part = LEG_RIGHT
icon_position = RIGHT
joint = "right knee"
amputation_point = "right hip"
/obj/item/organ/external/foot
limb_name = "l_foot"
name = "left foot"
icon_name = "l_foot"
health = 30
min_broken_damage = 15
body_part = FOOT_LEFT
icon_position = LEFT
parent_organ = "l_leg"
joint = "left ankle"
amputation_point = "left ankle"
can_stand = 1
/obj/item/organ/external/foot/removed()
if(owner) owner.u_equip(owner.shoes)
..()
/obj/item/organ/external/foot/right
limb_name = "r_foot"
name = "right foot"
icon_name = "r_foot"
body_part = FOOT_RIGHT
icon_position = RIGHT
parent_organ = "r_leg"
joint = "right ankle"
amputation_point = "right ankle"
/obj/item/organ/external/hand
limb_name = "l_hand"
name = "left hand"
icon_name = "l_hand"
health = 30
min_broken_damage = 15
body_part = HAND_LEFT
parent_organ = "l_arm"
joint = "left wrist"
amputation_point = "left wrist"
can_grasp = 1
/obj/item/organ/external/hand/removed()
owner.u_equip(owner.gloves)
..()
/obj/item/organ/external/hand/right
limb_name = "r_hand"
name = "right hand"
icon_name = "r_hand"
body_part = HAND_RIGHT
parent_organ = "r_arm"
joint = "right wrist"
amputation_point = "right wrist"
/obj/item/organ/external/head
limb_name = "head"
icon_name = "head"
name = "head"
health = 75
min_broken_damage = 35
body_part = HEAD
vital = 1
parent_organ = "chest"
joint = "jaw"
amputation_point = "neck"
gendered_icon = 1
encased = "skull"
/obj/item/organ/external/head/removed()
if(owner)
name = "[owner.real_name]'s head"
owner.u_equip(owner.glasses)
owner.u_equip(owner.head)
owner.u_equip(owner.l_ear)
owner.u_equip(owner.r_ear)
owner.u_equip(owner.wear_mask)
spawn(1)
owner.update_hair()
..()
/obj/item/organ/external/head/take_damage(brute, burn, sharp, edge, used_weapon = null, list/forbidden_limbs = list())
..(brute, burn, sharp, edge, used_weapon, forbidden_limbs)
if (!disfigured)
if (brute_dam > 40)
if (prob(50))
disfigure("brute")
if (burn_dam > 40)
disfigure("burn")
+23 -11
View File
@@ -17,11 +17,23 @@ var/global/list/limb_icon_cache = list()
s_col = null
if(status & ORGAN_ROBOT)
return
if(species && human.species && species.name != human.species.name)
return
if(!isnull(human.s_tone) && (human.species.flags & HAS_SKIN_TONE))
s_tone = human.s_tone
if(human.species.flags & HAS_SKIN_COLOR)
s_col = list(human.r_skin, human.g_skin, human.b_skin)
/obj/item/organ/external/proc/sync_colour_to_dna()
s_tone = null
s_col = null
if(status & ORGAN_ROBOT)
return
if(!isnull(dna.GetUIValue(DNA_UI_SKIN_TONE)) && (species.flags & HAS_SKIN_TONE))
s_tone = dna.GetUIValue(DNA_UI_SKIN_TONE)
if(species.flags & HAS_SKIN_COLOR)
s_col = list(dna.GetUIValue(DNA_UI_SKIN_R), dna.GetUIValue(DNA_UI_SKIN_G), dna.GetUIValue(DNA_UI_SKIN_B))
/obj/item/organ/external/head/sync_colour_to_human(var/mob/living/carbon/human/human)
..()
var/obj/item/organ/eyes/eyes = owner.internal_organs_by_name["eyes"]
@@ -35,10 +47,10 @@ var/global/list/limb_icon_cache = list()
..()
overlays.Cut()
if(owner.species.has_organ["eyes"])
if(species.has_organ["eyes"])
var/obj/item/organ/eyes/eyes = owner.internal_organs_by_name["eyes"]
if(owner.species.eyes)
var/icon/eyes_icon = new/icon('icons/mob/human_face.dmi', owner.species.eyes)
if(species.eyes)
var/icon/eyes_icon = new/icon('icons/mob/human_face.dmi', species.eyes)
if(eyes)
eyes_icon.Blend(rgb(eyes.eye_colour[1], eyes.eye_colour[2], eyes.eye_colour[3]), ICON_ADD)
else
@@ -46,14 +58,14 @@ var/global/list/limb_icon_cache = list()
mob_icon.Blend(eyes_icon, ICON_OVERLAY)
overlays |= eyes_icon
if(owner.lip_style && (owner.species && (owner.species.flags & HAS_LIPS)))
if(owner.lip_style && (species && (species.flags & HAS_LIPS)))
var/icon/lip_icon = new/icon('icons/mob/human_face.dmi', "lips_[owner.lip_style]_s")
overlays |= lip_icon
mob_icon.Blend(lip_icon, ICON_OVERLAY)
if(owner.f_style)
var/datum/sprite_accessory/facial_hair_style = facial_hair_styles_list[owner.f_style]
if(facial_hair_style && facial_hair_style.species_allowed && (owner.species.name in facial_hair_style.species_allowed))
if(facial_hair_style && facial_hair_style.species_allowed && (species.name in facial_hair_style.species_allowed))
var/icon/facial_s = new/icon("icon" = facial_hair_style.icon, "icon_state" = "[facial_hair_style.icon_state]_s")
if(facial_hair_style.do_colouration)
facial_s.Blend(rgb(owner.r_facial, owner.g_facial, owner.b_facial), ICON_ADD)
@@ -61,7 +73,7 @@ var/global/list/limb_icon_cache = list()
if(owner.h_style && !(owner.head && (owner.head.flags & BLOCKHEADHAIR)))
var/datum/sprite_accessory/hair_style = hair_styles_list[owner.h_style]
if(hair_style && (owner.species.name in hair_style.species_allowed))
if(hair_style && (species.name in hair_style.species_allowed))
var/icon/hair_s = new/icon("icon" = hair_style.icon, "icon_state" = "[hair_style.icon_state]_s")
if(hair_style.do_colouration)
hair_s.Blend(rgb(owner.r_hair, owner.g_hair, owner.b_hair), ICON_ADD)
@@ -75,25 +87,25 @@ var/global/list/limb_icon_cache = list()
if(force_icon)
mob_icon = new /icon(force_icon, "[icon_name]")
else
if(!owner)
if(!dna)
mob_icon = new /icon('icons/mob/human_races/r_human.dmi', "[icon_name][gendered_icon ? "_f" : ""]")
else
if(gendered_icon)
if(owner.gender == FEMALE)
if(dna.GetUIState(DNA_UI_GENDER))
gender = "f"
else
gender = "m"
if(skeletal)
mob_icon = new /icon('icons/mob/human_races/r_skeleton.dmi', "[icon_name][gender ? "_[gender]" : ""]")
else if ((status & ORGAN_ROBOT) && !(owner.species && owner.species.flags & IS_SYNTHETIC))
else if (status & ORGAN_ROBOT)
mob_icon = new /icon('icons/mob/human_races/robotic.dmi', "[icon_name][gender ? "_[gender]" : ""]")
else
if (status & ORGAN_MUTATED)
mob_icon = new /icon(owner.species.deform, "[icon_name][gender ? "_[gender]" : ""]")
mob_icon = new /icon(species.deform, "[icon_name][gender ? "_[gender]" : ""]")
else
mob_icon = new /icon(owner.species.icobase, "[icon_name][gender ? "_[gender]" : ""]")
mob_icon = new /icon(species.icobase, "[icon_name][gender ? "_[gender]" : ""]")
if(status & ORGAN_DEAD)
mob_icon.ColorTone(rgb(10,50,0))
-1
View File
@@ -2,7 +2,6 @@
name = "limb stump"
icon_name = ""
dislocated = -1
cannot_amputate = 1
/obj/item/organ/external/stump/New(var/mob/living/carbon/holder, var/internal, var/obj/item/organ/external/limb)
if(istype(limb))
+7
View File
@@ -7,6 +7,7 @@ var/global/datum/robolimb/basic_robolimb
for(var/limb_type in typesof(/datum/robolimb))
var/datum/robolimb/R = new limb_type()
all_robolimbs[R.company] = R
world << "Adding [R.company] as [R], [R.type]"
if(!R.unavailable_at_chargen)
chargen_robolimbs[R.company] = R
@@ -35,3 +36,9 @@ var/global/datum/robolimb/basic_robolimb
company = "Xion Manufacturing Group"
desc = "This limb has a minimalist black and red casing."
icon = 'icons/mob/human_races/cyberlimbs/xion.dmi'
/datum/robolimb/ipc
company = "Morpheus Cyberkinetics"
desc = "This limb is simple and functional; no effort has been made to make it look human."
icon = 'icons/mob/human_races/cyberlimbs/ipc.dmi'
unavailable_at_chargen = 1
@@ -1,15 +1,10 @@
/proc/spawn_diona_nymph_from_organ(var/obj/item/organ/organ)
if(!istype(organ))
return
//This is a terrible hack and I should be ashamed.
var/datum/seed/diona = plant_controller.seeds["diona"]
if(!diona)
qdel(src)
spawn(1) // So it has time to be thrown about by the gib() proc.
var/mob/living/carbon/alien/diona/D = new(get_turf(organ))
diona.request_player(D)
var/datum/ghosttrap/plant/P = get_ghost_trap("living plant")
P.request_player(D, "A diona nymph has split off from its gestalt. ")
qdel(organ)
/obj/item/organ/external/diona
@@ -201,189 +196,3 @@
/obj/item/organ/diona/node/removed()
return
//CORTICAL BORER ORGANS.
/obj/item/organ/borer
name = "cortical borer"
parent_organ = "head"
vital = 1
/obj/item/organ/borer/process()
// Borer husks regenerate health, feel no pain, and are resistant to stuns and brainloss.
for(var/chem in list("tricordrazine","tramadol","hyperzine","alkysine"))
if(owner.reagents.get_reagent_amount(chem) < 3)
owner.reagents.add_reagent(chem, 5)
// They're also super gross and ooze ichor.
if(prob(5))
var/mob/living/carbon/human/H = owner
if(!istype(H))
return
var/datum/reagent/blood/B = locate(/datum/reagent/blood) in H.vessel.reagent_list
blood_splatter(H,B,1)
var/obj/effect/decal/cleanable/blood/splatter/goo = locate() in get_turf(owner)
if(goo)
goo.name = "husk ichor"
goo.desc = "It's thick and stinks of decay."
goo.basecolor = "#412464"
goo.update_icon()
/obj/item/organ/borer
name = "cortical borer"
icon = 'icons/obj/objects.dmi'
icon_state = "borer"
organ_tag = "brain"
desc = "A disgusting space slug."
/obj/item/organ/borer/removed(var/mob/living/user)
..()
var/mob/living/simple_animal/borer/B = owner.has_brain_worms()
if(B)
B.leave_host()
B.ckey = owner.ckey
spawn(0)
qdel(src)
//XENOMORPH ORGANS
/obj/item/organ/xenos/eggsac
name = "egg sac"
parent_organ = "groin"
/obj/item/organ/xenos/plasmavessel
name = "plasma vessel"
parent_organ = "chest"
var/stored_plasma = 0
var/max_plasma = 500
/obj/item/organ/xenos/plasmavessel/queen
name = "bloated plasma vessel"
stored_plasma = 200
max_plasma = 500
/obj/item/organ/xenos/plasmavessel/sentinel
stored_plasma = 100
max_plasma = 250
/obj/item/organ/xenos/plasmavessel/hunter
name = "tiny plasma vessel"
stored_plasma = 100
max_plasma = 150
/obj/item/organ/xenos/acidgland
name = "acid gland"
parent_organ = "head"
/obj/item/organ/xenos/hivenode
name = "hive node"
parent_organ = "chest"
/obj/item/organ/xenos/resinspinner
name = "resin spinner"
parent_organ = "head"
/obj/item/organ/xenos
name = "xeno organ"
icon = 'icons/effects/blood.dmi'
desc = "It smells like an accident in a chemical factory."
/obj/item/organ/xenos/eggsac
name = "egg sac"
icon_state = "xgibmid1"
organ_tag = "egg sac"
/obj/item/organ/xenos/plasmavessel
name = "plasma vessel"
icon_state = "xgibdown1"
organ_tag = "plasma vessel"
/obj/item/organ/xenos/acidgland
name = "acid gland"
icon_state = "xgibtorso"
organ_tag = "acid gland"
/obj/item/organ/xenos/hivenode
name = "hive node"
icon_state = "xgibmid2"
organ_tag = "hive node"
/obj/item/organ/xenos/resinspinner
name = "hive node"
icon_state = "xgibmid2"
organ_tag = "resin spinner"
//VOX ORGANS.
/obj/item/organ/stack
name = "cortical stack"
parent_organ = "head"
robotic = 2
vital = 1
var/backup_time = 0
var/datum/mind/backup
/obj/item/organ/stack/process()
if(owner && owner.stat != 2 && !is_broken())
backup_time = world.time
if(owner.mind) backup = owner.mind
/obj/item/organ/stack/vox
/obj/item/organ/stack/vox/stack
/obj/item/organ/stack
name = "cortical stack"
icon_state = "brain-prosthetic"
organ_tag = "stack"
robotic = 2
/obj/item/organ/stack/vox
name = "vox cortical stack"
// Slime limbs.
/obj/item/organ/external/chest/slime
cannot_break = 1
dislocated = -1
/obj/item/organ/external/groin/slime
cannot_break = 1
dislocated = -1
/obj/item/organ/external/arm/slime
cannot_break = 1
dislocated = -1
/obj/item/organ/external/arm/right/slime
cannot_break = 1
dislocated = -1
/obj/item/organ/external/leg/slime
cannot_break = 1
dislocated = -1
/obj/item/organ/external/leg/right/slime
cannot_break = 1
dislocated = -1
/obj/item/organ/external/foot/slime
cannot_break = 1
dislocated = -1
/obj/item/organ/external/foot/right/slime
cannot_break = 1
dislocated = -1
/obj/item/organ/external/hand/slime
cannot_break = 1
dislocated = -1
/obj/item/organ/external/hand/right/slime
cannot_break = 1
dislocated = -1
/obj/item/organ/external/head/slime
cannot_break = 1
dislocated = -1
+141
View File
@@ -0,0 +1,141 @@
// IPC limbs.
/obj/item/organ/external/head/ipc
dislocated = -1
can_intake_reagents = 0
encased = null
/obj/item/organ/external/head/ipc/New()
robotize("Morpheus Cyberkinetics")
..()
/obj/item/organ/external/chest/ipc
dislocated = -1
encased = null
/obj/item/organ/external/chest/ipc/New()
robotize("Morpheus Cyberkinetics")
..()
/obj/item/organ/external/groin/ipc
dislocated = -1
/obj/item/organ/external/groin/ipc/New()
robotize("Morpheus Cyberkinetics")
..()
/obj/item/organ/external/arm/ipc
dislocated = -1
/obj/item/organ/external/arm/ipc/New()
robotize("Morpheus Cyberkinetics")
..()
/obj/item/organ/external/arm/right/ipc
dislocated = -1
/obj/item/organ/external/arm/right/ipc/New()
robotize("Morpheus Cyberkinetics")
..()
/obj/item/organ/external/leg/ipc
dislocated = -1
/obj/item/organ/external/leg/ipc/New()
robotize("Morpheus Cyberkinetics")
..()
/obj/item/organ/external/leg/right/ipc
dislocated = -1
/obj/item/organ/external/leg/right/ipc/New()
robotize("Morpheus Cyberkinetics")
..()
/obj/item/organ/external/foot/ipc
dislocated = -1
/obj/item/organ/external/foot/ipc/New()
robotize("Morpheus Cyberkinetics")
..()
/obj/item/organ/external/foot/right/ipc
dislocated = -1
/obj/item/organ/external/foot/right/ipc/New()
robotize("Morpheus Cyberkinetics")
..()
/obj/item/organ/external/hand/ipc
dislocated = -1
/obj/item/organ/external/hand/ipc/New()
robotize("Morpheus Cyberkinetics")
..()
/obj/item/organ/external/hand/right/ipc
dislocated = -1
/obj/item/organ/external/hand/right/ipc/New()
robotize("Morpheus Cyberkinetics")
..()
/obj/item/organ/cell
name = "microbattery"
desc = "A small, powerful cell for use in fully prosthetic bodies."
icon = 'icons/obj/power.dmi'
icon_state = "scell"
organ_tag = "cell"
parent_organ = "chest"
vital = 1
/obj/item/organ/cell/New()
robotize()
..()
/obj/item/organ/cell/replaced()
..()
// This is very ghetto way of rebooting an IPC. TODO better way.
if(owner && owner.stat == DEAD)
owner.stat = 0
owner.visible_message("<span class='danger'>\The [owner] twitches visibly!</span>")
// Used for an MMI or posibrain being installed into a human.
/obj/item/organ/mmi_holder
name = "brain"
organ_tag = "brain"
parent_organ = "head"
vital = 1
var/obj/item/device/mmi/stored_mmi
/obj/item/organ/mmi_holder/proc/update_from_mmi()
if(!stored_mmi)
return
name = stored_mmi.name
desc = stored_mmi.desc
icon = stored_mmi.icon
icon_state = stored_mmi.icon_state
/obj/item/organ/mmi_holder/removed(var/mob/living/user)
if(stored_mmi)
stored_mmi.loc = get_turf(src)
if(owner.mind)
owner.mind.transfer_to(stored_mmi.brainmob)
..()
var/mob/living/holder_mob = loc
if(istype(holder_mob))
holder_mob.drop_from_inventory(src)
qdel(src)
/obj/item/organ/mmi_holder/New()
..()
// This is very ghetto way of rebooting an IPC. TODO better way.
spawn(1)
if(owner && owner.stat == DEAD)
owner.stat = 0
owner.visible_message("<span class='danger'>\The [owner] twitches visibly!</span>")
/obj/item/organ/mmi_holder/posibrain/New()
robotize()
stored_mmi = new /obj/item/device/mmi/digital/posibrain(src)
..()
spawn(1)
if(owner)
stored_mmi.name = "positronic brain ([owner.name])"
stored_mmi.brainmob.real_name = owner.name
stored_mmi.brainmob.name = stored_mmi.brainmob.real_name
stored_mmi.icon_state = "posibrain-occupied"
update_from_mmi()
else
stored_mmi.loc = get_turf(src)
qdel(src)
+163
View File
@@ -0,0 +1,163 @@
/****************************************************
ORGAN DEFINES
****************************************************/
/obj/item/organ/external/chest
name = "upper body"
limb_name = "chest"
icon_name = "torso"
health = 100
min_broken_damage = 35
body_part = UPPER_TORSO
vital = 1
amputation_point = "spine"
joint = "neck"
dislocated = -1
gendered_icon = 1
cannot_amputate = 1
parent_organ = null
encased = "ribcage"
/obj/item/organ/external/groin
name = "lower body"
limb_name = "groin"
icon_name = "groin"
health = 100
min_broken_damage = 35
body_part = LOWER_TORSO
vital = 1
parent_organ = "chest"
amputation_point = "lumbar"
joint = "hip"
dislocated = -1
gendered_icon = 1
/obj/item/organ/external/arm
limb_name = "l_arm"
name = "left arm"
icon_name = "l_arm"
health = 50
min_broken_damage = 30
body_part = ARM_LEFT
parent_organ = "chest"
joint = "left elbow"
amputation_point = "left shoulder"
can_grasp = 1
/obj/item/organ/external/arm/right
limb_name = "r_arm"
name = "right arm"
icon_name = "r_arm"
body_part = ARM_RIGHT
joint = "right elbow"
amputation_point = "right shoulder"
/obj/item/organ/external/leg
limb_name = "l_leg"
name = "left leg"
icon_name = "l_leg"
health = 50
min_broken_damage = 30
body_part = LEG_LEFT
icon_position = LEFT
parent_organ = "groin"
joint = "left knee"
amputation_point = "left hip"
can_stand = 1
/obj/item/organ/external/leg/right
limb_name = "r_leg"
name = "right leg"
icon_name = "r_leg"
body_part = LEG_RIGHT
icon_position = RIGHT
joint = "right knee"
amputation_point = "right hip"
/obj/item/organ/external/foot
limb_name = "l_foot"
name = "left foot"
icon_name = "l_foot"
health = 30
min_broken_damage = 15
body_part = FOOT_LEFT
icon_position = LEFT
parent_organ = "l_leg"
joint = "left ankle"
amputation_point = "left ankle"
can_stand = 1
/obj/item/organ/external/foot/removed()
if(owner) owner.u_equip(owner.shoes)
..()
/obj/item/organ/external/foot/right
limb_name = "r_foot"
name = "right foot"
icon_name = "r_foot"
body_part = FOOT_RIGHT
icon_position = RIGHT
parent_organ = "r_leg"
joint = "right ankle"
amputation_point = "right ankle"
/obj/item/organ/external/hand
limb_name = "l_hand"
name = "left hand"
icon_name = "l_hand"
health = 30
min_broken_damage = 15
body_part = HAND_LEFT
parent_organ = "l_arm"
joint = "left wrist"
amputation_point = "left wrist"
can_grasp = 1
/obj/item/organ/external/hand/removed()
owner.u_equip(owner.gloves)
..()
/obj/item/organ/external/hand/right
limb_name = "r_hand"
name = "right hand"
icon_name = "r_hand"
body_part = HAND_RIGHT
parent_organ = "r_arm"
joint = "right wrist"
amputation_point = "right wrist"
/obj/item/organ/external/head
limb_name = "head"
icon_name = "head"
name = "head"
health = 75
min_broken_damage = 35
body_part = HEAD
vital = 1
parent_organ = "chest"
joint = "jaw"
amputation_point = "neck"
gendered_icon = 1
encased = "skull"
var/can_intake_reagents = 1
/obj/item/organ/external/head/removed()
if(owner)
name = "[owner.real_name]'s head"
owner.u_equip(owner.glasses)
owner.u_equip(owner.head)
owner.u_equip(owner.l_ear)
owner.u_equip(owner.r_ear)
owner.u_equip(owner.wear_mask)
spawn(1)
owner.update_hair()
..()
/obj/item/organ/external/head/take_damage(brute, burn, sharp, edge, used_weapon = null, list/forbidden_limbs = list())
..(brute, burn, sharp, edge, used_weapon, forbidden_limbs)
if (!disfigured)
if (brute_dam > 40)
if (prob(50))
disfigure("brute")
if (burn_dam > 40)
disfigure("burn")
@@ -0,0 +1,44 @@
// Slime limbs.
/obj/item/organ/external/chest/unbreakable
cannot_break = 1
dislocated = -1
/obj/item/organ/external/groin/unbreakable
cannot_break = 1
dislocated = -1
/obj/item/organ/external/arm/unbreakable
cannot_break = 1
dislocated = -1
/obj/item/organ/external/arm/right/unbreakable
cannot_break = 1
dislocated = -1
/obj/item/organ/external/leg/unbreakable
cannot_break = 1
dislocated = -1
/obj/item/organ/external/leg/right/unbreakable
cannot_break = 1
dislocated = -1
/obj/item/organ/external/foot/unbreakable
cannot_break = 1
dislocated = -1
/obj/item/organ/external/foot/right/unbreakable
cannot_break = 1
dislocated = -1
/obj/item/organ/external/hand/unbreakable
cannot_break = 1
dislocated = -1
/obj/item/organ/external/hand/right/unbreakable
cannot_break = 1
dislocated = -1
/obj/item/organ/external/head/unbreakable
cannot_break = 1
dislocated = -1
+52
View File
@@ -0,0 +1,52 @@
//XENOMORPH ORGANS
/obj/item/organ/xenos
name = "xeno organ"
icon = 'icons/effects/blood.dmi'
desc = "It smells like an accident in a chemical factory."
/obj/item/organ/xenos/eggsac
name = "egg sac"
parent_organ = "groin"
icon_state = "xgibmid1"
organ_tag = "egg sac"
/obj/item/organ/xenos/plasmavessel
name = "plasma vessel"
parent_organ = "chest"
icon_state = "xgibdown1"
organ_tag = "plasma vessel"
var/stored_plasma = 0
var/max_plasma = 500
/obj/item/organ/xenos/plasmavessel/queen
name = "bloated plasma vessel"
stored_plasma = 200
max_plasma = 500
/obj/item/organ/xenos/plasmavessel/sentinel
stored_plasma = 100
max_plasma = 250
/obj/item/organ/xenos/plasmavessel/hunter
name = "tiny plasma vessel"
stored_plasma = 100
max_plasma = 150
/obj/item/organ/xenos/acidgland
name = "acid gland"
parent_organ = "head"
icon_state = "xgibtorso"
organ_tag = "acid gland"
/obj/item/organ/xenos/hivenode
name = "hive node"
parent_organ = "chest"
icon_state = "xgibmid2"
organ_tag = "hive node"
/obj/item/organ/xenos/resinspinner
name = "resin spinner"
parent_organ = "head"
icon_state = "xgibmid2"
organ_tag = "resin spinner"
+1 -28
View File
@@ -664,34 +664,7 @@
if(istype(user,/mob/living/carbon/human))
var/mob/living/carbon/human/H = user
if(H.species.flags & IS_SYNTHETIC && H.a_intent == I_GRAB)
if(emagged || stat & BROKEN)
var/datum/effect/effect/system/spark_spread/s = new /datum/effect/effect/system/spark_spread
s.set_up(3, 1, src)
s.start()
H << "\red The APC power currents surge eratically, damaging your chassis!"
H.adjustFireLoss(10,0)
else if(src.cell && src.cell.charge > 0)
if(H.nutrition < 450)
if(src.cell.charge >= 500)
H.nutrition += 50
src.cell.charge -= 500
else
H.nutrition += src.cell.charge/10
src.cell.charge = 0
user << "\blue You slot your fingers into the APC interface and siphon off some of the stored charge for your own use."
if(src.cell.charge < 0) src.cell.charge = 0
if(H.nutrition > 500) H.nutrition = 500
src.charging = 1
else
user << "\blue You are already fully charged."
else
user << "There is no charge to draw from that APC."
return
else if(H.species.can_shred(H))
if(H.species.can_shred(H))
user.visible_message("\red [user.name] slashes at the [src.name]!", "\blue You slash at the [src.name]!")
playsound(src.loc, 'sound/weapons/slash.ogg', 100, 1)
+5 -7
View File
@@ -519,14 +519,12 @@ obj/structure/cable/proc/cableColor(var/colorC)
if(!(S.status & ORGAN_ROBOT) || user.a_intent != "help")
return ..()
if(H.species.flags & IS_SYNTHETIC)
if(M == user)
user << "\red You can't repair damage to your own body - it's against OH&S."
return
if(S.burn_dam > 0 && use(1))
S.heal_damage(0,15,0,1)
user.visible_message("\red \The [user] repairs some burn damage on \the [M]'s [S.name] with \the [src].")
if(S.burn_dam < ROBOLIMB_SELF_REPAIR_CAP)
S.heal_damage(0,15,0,1)
user.visible_message("\red \The [user] repairs some burn damage on \the [M]'s [S.name] with \the [src].")
else
user << "\red The damage is far too severe to patch over externally."
return
else
user << "Nothing to fix!"
+5 -1
View File
@@ -200,7 +200,11 @@
else if (temperature > upper_limit)
bias = max(round((temperature - average)/TEMPERATURE_DIVISOR, 1), -TEMPERATURE_CHANGE_MAX)
temperature += rand(-7 + bias, 7 + bias)
//limit temperature increase so that it cannot raise temperature above upper_limit,
//or if it is already above upper_limit, limit the increase to 0.
var/inc_limit = max(upper_limit - temperature, 0)
var/dec_limit = min(temperature - lower_limit, 0)
temperature += between(dec_limit, rand(-7 + bias, 7 + bias), inc_limit)
if (temperature > max_temperature)
overheat()
+7 -7
View File
@@ -1,11 +1,11 @@
/datum/reagent
var/name = "Reagent"
var/id = "reagent"
var/description = "A non-descript chemical."
var/description = "A non-descript chemical."
var/datum/reagents/holder = null
var/reagent_state = SOLID
var/list/data = null
var/volume = 0
var/volume = 0
var/metabolism = REM // This would be 0.2 normally
var/ingest_met = 0
var/touch_met = 0
@@ -13,11 +13,11 @@
var/max_dose = 0
var/overdose = 0
var/scannable = 0 // Shows up on health analyzers.
var/affects_dead = 0
var/affects_dead = 0
var/glass_icon_state = null
var/glass_name = null
var/glass_desc = null
var/glass_center_of_mass = null
var/glass_center_of_mass = null
var/color = "#000000"
var/color_weight = 1
@@ -86,11 +86,11 @@
return data.Copy()
else if(data)
return data
return null
return null
/datum/reagent/Destroy() // This should only be called by the holder, so it's already handled clearing its references
..()
holder = null
holder = null
/* DEPRECATED - TODO: REMOVE EVERYWHERE */
@@ -108,4 +108,4 @@
id = "woodpulp"
description = "A mass of wood fibers."
reagent_state = LIQUID
color = "#B97A57"
color = "#B97A57"
@@ -57,6 +57,8 @@
M.adjustToxLoss(removed)
/datum/reagent/blood/affect_touch(var/mob/living/carbon/M, var/alien, var/removed)
if(alien == IS_MACHINE)
return
if(data && data["viruses"])
for(var/datum/disease/D in data["viruses"])
if(D.spread_type == SPECIAL || D.spread_type == NON_CONTAGIOUS)
@@ -181,6 +183,7 @@
description = "Required for welders. Flamable."
reagent_state = LIQUID
color = "#660000"
touch_met = 5
glass_icon_state = "dr_gibb_glass"
glass_name = "glass of welder fuel"
@@ -1,3 +1,31 @@
/datum/reagent/acetone
name = "Acetone"
id = "acetone"
description = "A colorless liquid solvent used in chemical synthesis."
reagent_state = LIQUID
color = "#808080"
metabolism = REM * 0.2
/datum/reagent/acetone/affect_blood(var/mob/living/carbon/M, var/alien, var/removed)
M.adjustToxLoss(removed * 3)
/datum/reagent/acetone/touch_obj(var/obj/O) //I copied this wholesale from ethanol and could likely be converted into a shared proc. ~Techhead
if(istype(O, /obj/item/weapon/paper))
var/obj/item/weapon/paper/paperaffected = O
paperaffected.clearpaper()
usr << "The solution dissolves the ink on the paper."
return
if(istype(O, /obj/item/weapon/book))
if(volume < 5)
return
if(istype(O, /obj/item/weapon/book/tome))
usr << "<span class='notice'>The solution does nothing. Whatever this is, it isn't normal ink.</span>"
return
var/obj/item/weapon/book/affectedbook = O
affectedbook.dat = null
usr << "<span class='notice'>The solution dissolves the ink on the book.</span>"
return
/datum/reagent/aluminum
name = "Aluminum"
id = "aluminum"
@@ -5,6 +33,20 @@
reagent_state = SOLID
color = "#A8A8A8"
/datum/reagent/ammonia
name = "Ammonia"
id = "ammonia"
description = "A caustic substance commonly used in fertilizer or household cleaners."
reagent_state = LIQUID
color = "#404030"
metabolism = REM * 0.5
/datum/reagent/ammonia/affect_blood(var/mob/living/carbon/M, var/alien, var/removed)
if(alien == IS_VOX)
M.adjustOxyLoss(-removed * 10)
else if(alien != IS_DIONA)
M.adjustToxLoss(removed * 1.5)
/datum/reagent/carbon
name = "Carbon"
id = "carbon"
@@ -32,19 +74,6 @@
else
dirtoverlay.alpha = min(dirtoverlay.alpha + volume * 30, 255)
/datum/reagent/chlorine
name = "Chlorine"
id = "chlorine"
description = "A chemical element with a characteristic odour."
reagent_state = GAS
color = "#808080"
/datum/reagent/chlorine/affect_blood(var/mob/living/carbon/M, var/alien, var/removed)
M.take_organ_damage(1*REM, 0)
/datum/reagent/chlorine/affect_touch(var/mob/living/carbon/M, var/alien, var/removed)
M.take_organ_damage(1*REM, 0)
/datum/reagent/copper
name = "Copper"
id = "copper"
@@ -57,6 +86,7 @@
description = "A well-known alcohol with a variety of applications."
reagent_state = LIQUID
color = "#404030"
touch_met = 5
var/nutriment_factor = 0
var/strength = 10 // This is, essentially, units between stages - the lower, the stronger. Less fine tuning, more clarity.
var/toxicity = 1
@@ -133,25 +163,26 @@
usr << "<span class='notice'>The solution dissolves the ink on the book.</span>"
return
/datum/reagent/fluorine
name = "Fluorine"
id = "fluorine"
description = "A highly-reactive chemical element."
reagent_state = GAS
/datum/reagent/hydrazine
name = "Hydrazine"
id = "hydrazine"
description = "A toxic, colorless, flammable liquid with a strong ammonia-like odor, in hydrate form."
reagent_state = LIQUID
color = "#808080"
metabolism = REM * 0.2
touch_met = 5
/datum/reagent/fluorine/affect_blood(var/mob/living/carbon/M, var/alien, var/removed)
M.adjustToxLoss(removed)
/datum/reagent/hydrazine/affect_blood(var/mob/living/carbon/M, var/alien, var/removed)
M.adjustToxLoss(4 * removed)
/datum/reagent/fluorine/affect_touch(var/mob/living/carbon/M, var/alien, var/removed)
M.adjustToxLoss(removed)
/datum/reagent/hydrazine/affect_touch(var/mob/living/carbon/M, var/alien, var/removed) // Hydrazine is both toxic and flammable.
M.adjust_fire_stacks(removed / 12)
M.adjustToxLoss(0.2 * removed)
/datum/reagent/hydrogen
name = "Hydrogen"
id = "hydrogen"
description = "A colorless, odorless, nonmetallic, tasteless, highly combustible diatomic gas."
reagent_state = GAS
color = "#808080"
/datum/reagent/hydrazine/touch_turf(var/turf/T)
new /obj/effect/decal/cleanable/liquid_fuel(T, volume)
remove_self(volume)
return
/datum/reagent/iron
name = "Iron"
@@ -193,28 +224,6 @@
M.emote(pick("twitch", "drool", "moan"))
M.adjustBrainLoss(2)
/datum/reagent/nitrogen
name = "Nitrogen"
id = "nitrogen"
description = "A colorless, odorless, tasteless gas."
reagent_state = GAS
color = "#808080"
/datum/reagent/nitrogen/affect_blood(var/mob/living/carbon/M, var/alien, var/removed)
if(alien == IS_VOX)
M.adjustOxyLoss(-removed * 3)
/datum/reagent/oxygen
name = "Oxygen"
id = "oxygen"
description = "A colorless, odorless gas."
reagent_state = GAS
color = "#808080"
/datum/reagent/oxygen/affect_blood(var/mob/living/carbon/M, var/alien, var/removed)
if(alien == IS_VOX)
M.adjustToxLoss(removed * 3)
/datum/reagent/phosphorus
name = "Phosphorus"
id = "phosphorus"
@@ -345,6 +354,15 @@
qdel(O)
remove_self(meltdose) // 10 units of acid will not melt EVERYTHING on the tile
/datum/reagent/acid/hydrochloric //Like sulfuric, but less toxic and more acidic.
name = "Hydrochloric Acid"
id = "hclacid"
description = "A very corrosive mineral acid with the molecular formula HCl."
reagent_state = LIQUID
color = "#808080"
power = 3
meltdose = 8
/datum/reagent/silicon
name = "Silicon"
id = "silicon"
@@ -226,11 +226,11 @@
M.adjustToxLoss(0.5 * removed)
/datum/reagent/capsaicin/affect_ingest(var/mob/living/carbon/M, var/alien, var/removed)
if(alien == IS_DIONA)
if(alien == IS_DIONA || alien == IS_MACHINE)
return
if(ishuman(M))
var/mob/living/carbon/human/H = M
if(H.species && (H.species.flags & (NO_PAIN | IS_SYNTHETIC)))
if(H.species && (H.species.flags & (NO_PAIN)))
return
if(dose < 5 && (dose == metabolism || prob(5)))
M << "<span class='danger'>Your insides feel uncomfortably hot!</span>"
@@ -307,7 +307,7 @@
/datum/reagent/condensedcapsaicin/affect_ingest(var/mob/living/carbon/M, var/alien, var/removed)
if(ishuman(M))
var/mob/living/carbon/human/H = M
if(H.species && (H.species.flags & (NO_PAIN | IS_SYNTHETIC)))
if(H.species && (H.species.flags & (NO_PAIN)))
return
if(dose == metabolism)
M << "<span class='danger'>You feel like your insides are burning!</span>"
@@ -220,13 +220,6 @@
T.holy = 1
return
/datum/reagent/ammonia
name = "Ammonia"
id = "ammonia"
description = "A caustic substance commonly used in fertilizer or household cleaners."
reagent_state = GAS
color = "#404030"
/datum/reagent/diethylamine
name = "Diethylamine"
id = "diethylamine"
@@ -234,10 +227,10 @@
reagent_state = LIQUID
color = "#604030"
/datum/reagent/fluorosurfactant // Foam precursor
name = "Fluorosurfactant"
id = "fluorosurfactant"
description = "A perfluoronated sulfonic acid that forms a foam when mixed with water."
/datum/reagent/surfactant // Foam precursor
name = "Azosurfactant"
id = "surfactant"
description = "A isocyanate liquid that forms a foam when mixed with water."
reagent_state = LIQUID
color = "#9E6B38"
@@ -44,10 +44,13 @@
reagent_state = LIQUID
color = "#9D14DB"
strength = 30
touch_met = 5
/datum/reagent/toxin/phoron/affect_touch(var/mob/living/carbon/M, var/alien, var/removed)
..()
M.adjust_fire_stacks(removed / 5)
if(prob(50))
M.pl_effects()
/datum/reagent/toxin/phoron/touch_turf(var/turf/simulated/T)
if(!istype(T))
@@ -226,6 +229,9 @@
affect_blood(M, alien, removed)
/datum/reagent/mutagen/affect_blood(var/mob/living/carbon/M, var/alien, var/removed)
var/mob/living/carbon/human/H = M
if(istype(H) && (H.species.flags & NO_SCAN))
return
if(M.dna)
if(prob(removed * 0.1)) // Approx. one mutation per 10 injected/20 ingested/30 touching units
randmuti(M)
+32 -46
View File
@@ -24,21 +24,21 @@
name = "Inaprovaline"
id = "inaprovaline"
result = "inaprovaline"
required_reagents = list("oxygen" = 1, "carbon" = 1, "sugar" = 1)
required_reagents = list("acetone" = 1, "carbon" = 1, "sugar" = 1)
result_amount = 3
/datum/chemical_reaction/dylovene
name = "Dylovene"
id = "anti_toxin"
result = "anti_toxin"
required_reagents = list("silicon" = 1, "potassium" = 1, "nitrogen" = 1)
required_reagents = list("silicon" = 1, "potassium" = 1, "ammonia" = 1)
result_amount = 3
/datum/chemical_reaction/tramadol
name = "Tramadol"
id = "tramadol"
result = "tramadol"
required_reagents = list("inaprovaline" = 1, "ethanol" = 1, "oxygen" = 1)
required_reagents = list("inaprovaline" = 1, "ethanol" = 1, "acetone" = 1)
result_amount = 3
/datum/chemical_reaction/paracetamol
@@ -60,35 +60,28 @@
name = "Sterilizine"
id = "sterilizine"
result = "sterilizine"
required_reagents = list("ethanol" = 1, "anti_toxin" = 1, "chlorine" = 1)
required_reagents = list("ethanol" = 1, "anti_toxin" = 1, "hclacid" = 1)
result_amount = 3
/datum/chemical_reaction/silicate
name = "Silicate"
id = "silicate"
result = "silicate"
required_reagents = list("aluminum" = 1, "silicon" = 1, "oxygen" = 1)
required_reagents = list("aluminum" = 1, "silicon" = 1, "acetone" = 1)
result_amount = 3
/datum/chemical_reaction/mutagen
name = "Unstable mutagen"
id = "mutagen"
result = "mutagen"
required_reagents = list("radium" = 1, "phosphorus" = 1, "chlorine" = 1)
required_reagents = list("radium" = 1, "phosphorus" = 1, "hclacid" = 1)
result_amount = 3
/datum/chemical_reaction/water
name = "Water"
id = "water"
result = "water"
required_reagents = list("oxygen" = 1, "hydrogen" = 2)
result_amount = 1
/datum/chemical_reaction/thermite
name = "Thermite"
id = "thermite"
result = "thermite"
required_reagents = list("aluminum" = 1, "iron" = 1, "oxygen" = 1)
required_reagents = list("aluminum" = 1, "iron" = 1, "acetone" = 1)
result_amount = 3
/datum/chemical_reaction/space_drugs
@@ -102,14 +95,14 @@
name = "Space Lube"
id = "lube"
result = "lube"
required_reagents = list("water" = 1, "silicon" = 1, "oxygen" = 1)
required_reagents = list("water" = 1, "silicon" = 1, "acetone" = 1)
result_amount = 4
/datum/chemical_reaction/pacid
name = "Polytrinic acid"
id = "pacid"
result = "pacid"
required_reagents = list("sacid" = 1, "chlorine" = 1, "potassium" = 1)
required_reagents = list("sacid" = 1, "hclacid" = 1, "potassium" = 1)
result_amount = 3
/datum/chemical_reaction/synaptizine
@@ -130,14 +123,14 @@
name = "Arithrazine"
id = "arithrazine"
result = "arithrazine"
required_reagents = list("hyronalin" = 1, "hydrogen" = 1)
required_reagents = list("hyronalin" = 1, "hydrazine" = 1)
result_amount = 2
/datum/chemical_reaction/impedrezene
name = "Impedrezene"
id = "impedrezene"
result = "impedrezene"
required_reagents = list("mercury" = 1, "oxygen" = 1, "sugar" = 1)
required_reagents = list("mercury" = 1, "acetone" = 1, "sugar" = 1)
result_amount = 2
/datum/chemical_reaction/kelotane
@@ -174,7 +167,7 @@
name = "Cryptobiolin"
id = "cryptobiolin"
result = "cryptobiolin"
required_reagents = list("potassium" = 1, "oxygen" = 1, "sugar" = 1)
required_reagents = list("potassium" = 1, "acetone" = 1, "sugar" = 1)
result_amount = 3
/datum/chemical_reaction/tricordrazine
@@ -188,14 +181,14 @@
name = "Alkysine"
id = "alkysine"
result = "alkysine"
required_reagents = list("chlorine" = 1, "nitrogen" = 1, "anti_toxin" = 1)
required_reagents = list("hclacid" = 1, "ammonia" = 1, "anti_toxin" = 1)
result_amount = 2
/datum/chemical_reaction/dexalin
name = "Dexalin"
id = "dexalin"
result = "dexalin"
required_reagents = list("oxygen" = 2, "phoron" = 0.1)
required_reagents = list("acetone" = 2, "phoron" = 0.1)
catalysts = list("phoron" = 1)
inhibitors = list("water" = 1) // Messes with cryox
result_amount = 1
@@ -204,7 +197,7 @@
name = "Dermaline"
id = "dermaline"
result = "dermaline"
required_reagents = list("oxygen" = 1, "phosphorus" = 1, "kelotane" = 1)
required_reagents = list("acetone" = 1, "phosphorus" = 1, "kelotane" = 1)
result_amount = 3
/datum/chemical_reaction/dexalinp
@@ -240,7 +233,7 @@
name = "Cryoxadone"
id = "cryoxadone"
result = "cryoxadone"
required_reagents = list("dexalin" = 1, "water" = 1, "oxygen" = 1)
required_reagents = list("dexalin" = 1, "water" = 1, "acetone" = 1)
result_amount = 3
/datum/chemical_reaction/clonexadone
@@ -262,14 +255,14 @@
name = "imidazoline"
id = "imidazoline"
result = "imidazoline"
required_reagents = list("carbon" = 1, "hydrogen" = 1, "anti_toxin" = 1)
required_reagents = list("carbon" = 1, "hydrazine" = 1, "anti_toxin" = 1)
result_amount = 2
/datum/chemical_reaction/ethylredoxrazine
name = "Ethylredoxrazine"
id = "ethylredoxrazine"
result = "ethylredoxrazine"
required_reagents = list("oxygen" = 1, "anti_toxin" = 1, "carbon" = 1)
required_reagents = list("acetone" = 1, "anti_toxin" = 1, "carbon" = 1)
result_amount = 3
/datum/chemical_reaction/soporific
@@ -284,7 +277,7 @@
name = "Chloral Hydrate"
id = "chloralhydrate"
result = "chloralhydrate"
required_reagents = list("ethanol" = 1, "chlorine" = 3, "water" = 1)
required_reagents = list("ethanol" = 1, "hclacid" = 3, "water" = 1)
result_amount = 1
/datum/chemical_reaction/potassium_chloride
@@ -312,7 +305,7 @@
name = "Mindbreaker Toxin"
id = "mindbreaker"
result = "mindbreaker"
required_reagents = list("silicon" = 1, "hydrogen" = 1, "anti_toxin" = 1)
required_reagents = list("silicon" = 1, "hydrazine" = 1, "anti_toxin" = 1)
result_amount = 3
/datum/chemical_reaction/lipozine
@@ -323,19 +316,12 @@
result_amount = 3
/datum/chemical_reaction/surfactant
name = "Foam surfactant"
id = "foam surfactant"
result = "fluorosurfactant"
required_reagents = list("fluorine" = 2, "carbon" = 2, "sacid" = 1)
name = "Azosurfactant"
id = "surfactant"
result = "surfactant"
required_reagents = list("hydrazine" = 2, "carbon" = 2, "sacid" = 1)
result_amount = 5
/datum/chemical_reaction/ammonia
name = "Ammonia"
id = "ammonia"
result = "ammonia"
required_reagents = list("hydrogen" = 3, "nitrogen" = 1)
result_amount = 3
/datum/chemical_reaction/diethylamine
name = "Diethylamine"
id = "diethylamine"
@@ -361,7 +347,7 @@
name = "Foaming Agent"
id = "foaming_agent"
result = "foaming_agent"
required_reagents = list("lithium" = 1, "hydrogen" = 1)
required_reagents = list("lithium" = 1, "hydrazine" = 1)
result_amount = 1
/datum/chemical_reaction/glycerol
@@ -375,7 +361,7 @@
name = "Sodium Chloride"
id = "sodiumchloride"
result = "sodiumchloride"
required_reagents = list("sodium" = 1, "chlorine" = 1)
required_reagents = list("sodium" = 1, "hclacid" = 1)
result_amount = 2
/datum/chemical_reaction/condensedcapsaicin
@@ -390,7 +376,7 @@
name = "Coolant"
id = "coolant"
result = "coolant"
required_reagents = list("tungsten" = 1, "oxygen" = 1, "water" = 1)
required_reagents = list("tungsten" = 1, "acetone" = 1, "water" = 1)
result_amount = 3
/datum/chemical_reaction/rezadone
@@ -404,14 +390,14 @@
name = "Lexorin"
id = "lexorin"
result = "lexorin"
required_reagents = list("phoron" = 1, "hydrogen" = 1, "nitrogen" = 1)
required_reagents = list("phoron" = 1, "hydrazine" = 1, "ammonia" = 1)
result_amount = 3
/datum/chemical_reaction/methylphenidate
name = "Methylphenidate"
id = "methylphenidate"
result = "methylphenidate"
required_reagents = list("mindbreaker" = 1, "hydrogen" = 1)
required_reagents = list("mindbreaker" = 1, "hydrazine" = 1)
result_amount = 3
/datum/chemical_reaction/citalopram
@@ -426,7 +412,7 @@
name = "Paroxetine"
id = "paroxetine"
result = "paroxetine"
required_reagents = list("mindbreaker" = 1, "oxygen" = 1, "inaprovaline" = 1)
required_reagents = list("mindbreaker" = 1, "acetone" = 1, "inaprovaline" = 1)
result_amount = 3
/* Solidification */
@@ -579,7 +565,7 @@
name = "Foam"
id = "foam"
result = null
required_reagents = list("fluorosurfactant" = 1, "water" = 1)
required_reagents = list("surfactant" = 1, "water" = 1)
result_amount = 2
mix_message = "The solution violently bubbles!"
@@ -1922,7 +1908,7 @@ datum
name = "Lithium Sodium Tungstate"
id = "lithiumsodiumtungstate"
result = "lithiumsodiumtungstate"
required_reagents = list("lithium" = 1, "sodium" = 2, "tungsten" = 1, "oxygen" = 4)
required_reagents = list("lithium" = 1, "sodium" = 2, "tungsten" = 1, "acetone" = 4)
result_amount = 8
density_separated_liquid
@@ -10,18 +10,17 @@
sugar spawn_reagent = "sugar"
// Chemistry
hydrogen spawn_reagent = "hydrogen"
hydrazine spawn_reagent = "hydrazine"
lithium spawn_reagent = "lithium"
carbon spawn_reagent = "carbon"
nitrogen spawn_reagent = "nitrogen"
oxygen spawn_reagent = "oxygen"
fluorine spawn_reagent = "fluorine"
ammonia spawn_reagent = "ammonia"
acetone spawn_reagent = "acetone"
sodium spawn_reagent = "sodium"
aluminum spawn_reagent = "aluminum"
silicon spawn_reagent = "silicon"
phosphorus spawn_reagent = "phosphorus"
sulfur spawn_reagent = "sulfur"
chlorine spawn_reagent = "chlorine"
hclacid spawn_reagent = "hclacid"
potassium spawn_reagent = "potassium"
iron spawn_reagent = "iron"
copper spawn_reagent = "copper"
@@ -1,17 +1,16 @@
/obj/machinery/chemical_dispenser/full
spawn_cartridges = list(
/obj/item/weapon/reagent_containers/chem_disp_cartridge/hydrogen,
/obj/item/weapon/reagent_containers/chem_disp_cartridge/hydrazine,
/obj/item/weapon/reagent_containers/chem_disp_cartridge/lithium,
/obj/item/weapon/reagent_containers/chem_disp_cartridge/carbon,
/obj/item/weapon/reagent_containers/chem_disp_cartridge/nitrogen,
/obj/item/weapon/reagent_containers/chem_disp_cartridge/oxygen,
/obj/item/weapon/reagent_containers/chem_disp_cartridge/fluorine,
/obj/item/weapon/reagent_containers/chem_disp_cartridge/ammonia,
/obj/item/weapon/reagent_containers/chem_disp_cartridge/acetone,
/obj/item/weapon/reagent_containers/chem_disp_cartridge/sodium,
/obj/item/weapon/reagent_containers/chem_disp_cartridge/aluminum,
/obj/item/weapon/reagent_containers/chem_disp_cartridge/silicon,
/obj/item/weapon/reagent_containers/chem_disp_cartridge/phosphorus,
/obj/item/weapon/reagent_containers/chem_disp_cartridge/sulfur,
/obj/item/weapon/reagent_containers/chem_disp_cartridge/chlorine,
/obj/item/weapon/reagent_containers/chem_disp_cartridge/hclacid,
/obj/item/weapon/reagent_containers/chem_disp_cartridge/potassium,
/obj/item/weapon/reagent_containers/chem_disp_cartridge/iron,
/obj/item/weapon/reagent_containers/chem_disp_cartridge/copper,
+8 -10
View File
@@ -31,18 +31,17 @@
/datum/supply_packs/reagents
name = "Chemistry dispenser refill"
contains = list(
/obj/item/weapon/reagent_containers/chem_disp_cartridge/hydrogen,
/obj/item/weapon/reagent_containers/chem_disp_cartridge/hydrazine,
/obj/item/weapon/reagent_containers/chem_disp_cartridge/lithium,
/obj/item/weapon/reagent_containers/chem_disp_cartridge/carbon,
/obj/item/weapon/reagent_containers/chem_disp_cartridge/nitrogen,
/obj/item/weapon/reagent_containers/chem_disp_cartridge/oxygen,
/obj/item/weapon/reagent_containers/chem_disp_cartridge/fluorine,
/obj/item/weapon/reagent_containers/chem_disp_cartridge/ammonia,
/obj/item/weapon/reagent_containers/chem_disp_cartridge/acetone,
/obj/item/weapon/reagent_containers/chem_disp_cartridge/sodium,
/obj/item/weapon/reagent_containers/chem_disp_cartridge/aluminum,
/obj/item/weapon/reagent_containers/chem_disp_cartridge/silicon,
/obj/item/weapon/reagent_containers/chem_disp_cartridge/phosphorus,
/obj/item/weapon/reagent_containers/chem_disp_cartridge/sulfur,
/obj/item/weapon/reagent_containers/chem_disp_cartridge/chlorine,
/obj/item/weapon/reagent_containers/chem_disp_cartridge/hclacid,
/obj/item/weapon/reagent_containers/chem_disp_cartridge/potassium,
/obj/item/weapon/reagent_containers/chem_disp_cartridge/iron,
/obj/item/weapon/reagent_containers/chem_disp_cartridge/copper,
@@ -153,18 +152,17 @@
// Chemistry-restricted (raw reagents excluding sugar/water)
// Datum path Contents type Supply pack name Container name Cost Container access
SEC_PACK(hydrogen, /obj/item/weapon/reagent_containers/chem_disp_cartridge/hydrogen, "Reagent refill - Hydrogen", "hydrogen reagent cartridge crate", 15, access_chemistry)
SEC_PACK(hydrazine, /obj/item/weapon/reagent_containers/chem_disp_cartridge/hydrazine, "Reagent refill - Hydrazine", "hydrazine reagent cartridge crate", 15, access_chemistry)
SEC_PACK(lithium, /obj/item/weapon/reagent_containers/chem_disp_cartridge/lithium, "Reagent refill - Lithium", "lithium reagent cartridge crate", 15, access_chemistry)
SEC_PACK(carbon, /obj/item/weapon/reagent_containers/chem_disp_cartridge/carbon, "Reagent refill - Carbon", "carbon reagent cartridge crate", 15, access_chemistry)
SEC_PACK(nitrogen, /obj/item/weapon/reagent_containers/chem_disp_cartridge/nitrogen, "Reagent refill - Nitrogen", "nitrogen reagent cartridge crate", 15, access_chemistry)
SEC_PACK(oxygen, /obj/item/weapon/reagent_containers/chem_disp_cartridge/oxygen, "Reagent refill - Oxygen", "oxygen reagent cartridge crate", 15, access_chemistry)
SEC_PACK(fluorine, /obj/item/weapon/reagent_containers/chem_disp_cartridge/fluorine, "Reagent refill - Fluorine", "fluorine reagent cartridge crate", 15, access_chemistry)
SEC_PACK(ammonia, /obj/item/weapon/reagent_containers/chem_disp_cartridge/ammonia, "Reagent refill - Ammonia", "ammonia reagent cartridge crate", 15, access_chemistry)
SEC_PACK(oxygen, /obj/item/weapon/reagent_containers/chem_disp_cartridge/acetone, "Reagent refill - Acetone", "acetone reagent cartridge crate", 15, access_chemistry)
SEC_PACK(sodium, /obj/item/weapon/reagent_containers/chem_disp_cartridge/sodium, "Reagent refill - Sodium", "sodium reagent cartridge crate", 15, access_chemistry)
SEC_PACK(aluminium, /obj/item/weapon/reagent_containers/chem_disp_cartridge/aluminum, "Reagent refill - Aluminum", "aluminum reagent cartridge crate", 15, access_chemistry)
SEC_PACK(silicon, /obj/item/weapon/reagent_containers/chem_disp_cartridge/silicon, "Reagent refill - Silicon", "silicon reagent cartridge crate", 15, access_chemistry)
SEC_PACK(phosphorus,/obj/item/weapon/reagent_containers/chem_disp_cartridge/phosphorus, "Reagent refill - Phosphorus", "phosphorus reagent cartridge crate", 15, access_chemistry)
SEC_PACK(sulfur, /obj/item/weapon/reagent_containers/chem_disp_cartridge/sulfur, "Reagent refill - Sulfur", "sulfur reagent cartridge crate", 15, access_chemistry)
SEC_PACK(chlorine, /obj/item/weapon/reagent_containers/chem_disp_cartridge/chlorine, "Reagent refill - Chlorine", "chlorine reagent cartridge crate", 15, access_chemistry)
SEC_PACK(hclacid, /obj/item/weapon/reagent_containers/chem_disp_cartridge/hclacid, "Reagent refill - Hydrochloric Acid", "hydrochloric acid reagent cartridge crate", 15, access_chemistry)
SEC_PACK(potassium, /obj/item/weapon/reagent_containers/chem_disp_cartridge/potassium, "Reagent refill - Potassium", "potassium reagent cartridge crate", 15, access_chemistry)
SEC_PACK(iron, /obj/item/weapon/reagent_containers/chem_disp_cartridge/iron, "Reagent refill - Iron", "iron reagent cartridge crate", 15, access_chemistry)
SEC_PACK(copper, /obj/item/weapon/reagent_containers/chem_disp_cartridge/copper, "Reagent refill - Copper", "copper reagent cartridge crate", 15, access_chemistry)
+8 -10
View File
@@ -25,9 +25,9 @@
/obj/item/weapon/reagent_containers/attack_self(mob/user as mob)
return
/obj/item/weapon/reagent_containers/attack(mob/M as mob, mob/user as mob, def_zone)
/obj/item/weapon/reagent_containers/attack(mob/M as mob, mob/user as mob, def_zone)
if(can_operate(M))//Checks if mob is lying down on table for surgery
if(do_surgery(M, user, src))
if(do_surgery(M, user, src))
return
/obj/item/weapon/reagent_containers/afterattack(obj/target, mob/user, flag)
@@ -98,10 +98,9 @@
if(target == user)
if(istype(user, /mob/living/carbon/human))
var/mob/living/carbon/human/H = user
if(H.species.flags & IS_SYNTHETIC)
H << "<span class='notice'>You have a monitor for a head, where do you think you're going to put that?</span>"
return 1
if(!H.check_has_mouth())
user << "Where do you intend to put \the [src]? You don't have a mouth!"
return
var/obj/item/blocked = H.check_mouth_coverage()
if(blocked)
user << "<span class='warning'>\The [blocked] is in the way!</span>"
@@ -114,10 +113,9 @@
else
if(istype(user, /mob/living/carbon/human))
var/mob/living/carbon/human/H = target
if(H.species.flags & IS_SYNTHETIC)
H << "<span class='notice'>They have a monitor for a head, where do you think you're going to put that?</span>"
if(!H.check_has_mouth())
user << "Where do you intend to put \the [src]? \The [H] doesn't have a mouth!"
return
var/obj/item/blocked = H.check_mouth_coverage()
if(blocked)
user << "<span class='warning'>\The [blocked] is in the way!</span>"
@@ -153,4 +151,4 @@
var/trans = reagents.trans_to(target, amount_per_transfer_from_this)
user << "<span class='notice'>You transfer [trans] units of the solution to [target].</span>"
return 1
return 1
@@ -65,6 +65,16 @@
if (!istype(M))
return
var/mob/living/carbon/human/H = M
if(istype(H))
var/obj/item/organ/external/affected = H.get_organ(user.zone_sel.selecting)
if(!affected)
user << "<span class='danger'>\The [H] is missing that limb!</span>"
return
else if(affected.status & ORGAN_ROBOT)
user << "<span class='danger'>You cannot inject a robotic limb.</span>"
return
if (R.total_volume && M.can_inject(user, 1))
user << "<span class='notice'>You inject [M] with the injector.</span>"
M << "<span class='notice'>You feel a tiny prick!</span>"
@@ -45,10 +45,9 @@
if(M == user) //If you're eating it yourself
if(istype(M,/mob/living/carbon/human))
var/mob/living/carbon/human/H = M
if(H.species.flags & IS_SYNTHETIC)
H << "<span class='danger'>You have a monitor for a head, where do you think you're going to put that?</span>"
if(!H.check_has_mouth())
user << "Where do you intend to put \the [src]? You don't have a mouth!"
return
var/obj/item/blocked = H.check_mouth_coverage()
if(blocked)
user << "<span class='warning'>\The [blocked] is in the way!</span>"
@@ -68,10 +67,9 @@
else
if(istype(M,/mob/living/carbon/human))
var/mob/living/carbon/human/H = M
if(H.species.flags & IS_SYNTHETIC)
user << "<span class='danger'>They have a monitor for a head, where do you think you're going to put that?</span>"
if(!H.check_has_mouth())
user << "Where do you intend to put \the [src]? \The [H] doesn't have a mouth!"
return
var/obj/item/blocked = H.check_mouth_coverage()
if(blocked)
user << "<span class='warning'>\The [blocked] is in the way!</span>"
@@ -25,6 +25,17 @@
return
if (!istype(M))
return
var/mob/living/carbon/human/H = M
if(istype(H))
var/obj/item/organ/external/affected = H.get_organ(user.zone_sel.selecting)
if(!affected)
user << "<span class='danger'>\The [H] is missing that limb!</span>"
return
else if(affected.status & ORGAN_ROBOT)
user << "<span class='danger'>You cannot inject a robotic limb.</span>"
return
user << "<span class='notice'>You inject [M] with [src].</span>"
M << "<span class='notice'>You feel a tiny prick!</span>"
@@ -21,10 +21,9 @@
if(istype(M, /mob/living/carbon/human))
var/mob/living/carbon/human/H = M
if(H.species.flags & IS_SYNTHETIC)
H << "<span class='notice'>You have a monitor for a head, where do you think you're going to put that?</span>"
if(!H.check_has_mouth())
user << "Where do you intend to put \the [src]? You don't have a mouth!"
return
var/obj/item/blocked = H.check_mouth_coverage()
if(blocked)
user << "<span class='warning'>\The [blocked] is in the way!</span>"
@@ -40,12 +39,10 @@
else if(istype(M, /mob/living/carbon/human))
var/mob/living/carbon/human/H = M
if(H.species.flags & IS_SYNTHETIC)
H << "<span class='notice'>They have a monitor for a head, where do you think you're going to put that?</span>"
if(!H.check_has_mouth())
user << "Where do you intend to put \the [src]? \The [H] doesn't have a mouth!"
return
var/obj/item/blocked = H.check_mouth_coverage()
if(blocked)
user << "<span class='warning'>\The [blocked] is in the way!</span>"
return
@@ -142,13 +142,21 @@
user << "<span class='notice'>[target] is full.</span>"
return
var/mob/living/carbon/human/H = target
if(istype(H))
var/obj/item/organ/external/affected = H.get_organ(user.zone_sel.selecting)
if(!affected)
user << "<span class='danger'>\The [H] is missing that limb!</span>"
return
else if(affected.status & ORGAN_ROBOT)
user << "<span class='danger'>You cannot inject a robotic limb.</span>"
return
if(ismob(target) && target != user)
var/injtime = time //Injecting through a hardsuit takes longer due to needing to find a port.
if(istype(target, /mob/living/carbon/human))
var/mob/living/carbon/human/H = target
if(istype(H))
if(H.wear_suit)
if(istype(H.wear_suit, /obj/item/clothing/suit/space))
injtime = injtime * 2
+35 -5
View File
@@ -120,12 +120,17 @@
if(lum != light_range || clr != light_color)
set_light(lum, l_color = clr)
/obj/machinery/power/supermatter/proc/announce_warning()
/obj/machinery/power/supermatter/proc/get_integrity()
var/integrity = damage / explosion_point
integrity = round(100 - integrity * 100)
integrity = integrity < 0 ? 0 : integrity
return integrity
/obj/machinery/power/supermatter/proc/announce_warning()
var/integrity = get_integrity()
var/alert_msg = " Integrity at [integrity]%"
if(damage > emergency_point)
alert_msg = emergency_alert + alert_msg
lastwarning = world.timeofday - WARNING_DELAY * 4
@@ -148,7 +153,7 @@
else if(safe_warned && public_alert)
radio.autosay(alert_msg, "Supermatter Monitor")
public_alert = 0
/obj/machinery/power/supermatter/process()
@@ -267,11 +272,11 @@
if(Adjacent(user))
return attack_hand(user)
else
user << "<span class = \"warning\">You attempt to interface with the control circuits but find they are not connected to your network. Maybe in a future firmware update.</span>"
ui_interact(user)
return
/obj/machinery/power/supermatter/attack_ai(mob/user as mob)
user << "<span class = \"warning\">You attempt to interface with the control circuits but find they are not connected to your network. Maybe in a future firmware update.</span>"
ui_interact(user)
/obj/machinery/power/supermatter/attack_hand(mob/user as mob)
user.visible_message("<span class=\"warning\">\The [user] reaches out and touches \the [src], inducing a resonance... \his body starts to glow and bursts into flames before flashing into ash.</span>",\
@@ -280,6 +285,31 @@
Consume(user)
// This is purely informational UI that may be accessed by AIs or robots
/obj/machinery/power/supermatter/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null, var/force_open = 1)
var/data[0]
data["integrity_percentage"] = round(get_integrity())
var/datum/gas_mixture/env = null
if(!istype(src.loc, /turf/space))
env = src.loc.return_air()
if(!env)
data["ambient_temp"] = 0
data["ambient_pressure"] = 0
else
data["ambient_temp"] = round(env.temperature)
data["ambient_pressure"] = round(env.return_pressure())
data["detonating"] = grav_pulling
ui = nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open)
if (!ui)
ui = new(user, src, ui_key, "supermatter_crystal.tmpl", "Supermatter Crystal", 500, 300)
ui.set_initial_data(data)
ui.open()
ui.set_auto_update(1)
/*
/obj/machinery/power/supermatter/proc/transfer_energy()
for(var/obj/machinery/power/rad_collector/R in rad_collectors)
+4 -4
View File
@@ -18,7 +18,7 @@
if (!hasorgans(target))
return 0
var/obj/item/organ/external/affected = target.get_organ(target_zone)
return affected && affected.open >= 2 && affected.stage == 0
return affected && !(affected.status & ORGAN_ROBOT) && affected.open >= 2 && affected.stage == 0
begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
var/obj/item/organ/external/affected = target.get_organ(target_zone)
@@ -52,7 +52,7 @@
if (!hasorgans(target))
return 0
var/obj/item/organ/external/affected = target.get_organ(target_zone)
return affected && affected.name != "head" && affected.open >= 2 && affected.stage == 1
return affected && affected.name != "head" && !(affected.status & ORGAN_ROBOT) && affected.open >= 2 && affected.stage == 1
begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
var/obj/item/organ/external/affected = target.get_organ(target_zone)
@@ -91,7 +91,7 @@
if (!hasorgans(target))
return 0
var/obj/item/organ/external/affected = target.get_organ(target_zone)
return affected && affected.name == "head" && affected.open >= 2 && affected.stage == 1
return affected && affected.name == "head" && !(affected.status & ORGAN_ROBOT) && affected.open >= 2 && affected.stage == 1
begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
user.visible_message("[user] is beginning to piece together [target]'s skull with \the [tool]." , \
@@ -127,7 +127,7 @@
if (!hasorgans(target))
return 0
var/obj/item/organ/external/affected = target.get_organ(target_zone)
return affected && affected.open >= 2 && affected.stage == 2
return affected && affected.open >= 2 && !(affected.status & ORGAN_ROBOT) && affected.stage == 2
begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
var/obj/item/organ/external/affected = target.get_organ(target_zone)
-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/material/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)
+1 -1
View File
@@ -12,7 +12,7 @@
return 0
var/obj/item/organ/external/affected = target.get_organ(target_zone)
return affected && affected.encased && affected.open >= 2
return affected && !(affected.status & ORGAN_ROBOT) && affected.encased && affected.open >= 2
/datum/surgery_step/open_encased/saw
-147
View File
@@ -1,147 +0,0 @@
//Procedures in this file: Eye mending surgery
//////////////////////////////////////////////////////////////////
// EYE SURGERY //
//////////////////////////////////////////////////////////////////
/datum/surgery_step/eye
priority = 2
can_infect = 1
can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
if (!hasorgans(target))
return 0
var/obj/item/organ/external/affected = target.get_organ(target_zone)
if (!affected)
return 0
var/obj/item/organ/eyes = target.internal_organs_by_name["eyes"]
return target_zone == "eyes" && eyes
/datum/surgery_step/eye/cut_open
allowed_tools = list(
/obj/item/weapon/scalpel = 100, \
/obj/item/weapon/material/knife = 75, \
/obj/item/weapon/material/shard = 50, \
)
min_duration = 90
max_duration = 110
can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
return ..()
begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
user.visible_message("[user] starts to separate the corneas on [target]'s eyes with \the [tool].", \
"You start to separate the corneas on [target]'s eyes with \the [tool].")
..()
end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
user.visible_message("\blue [user] has separated the corneas on [target]'s eyes with \the [tool]." , \
"\blue You have separated the corneas on [target]'s eyes with \the [tool].",)
target.op_stage.eyes = 1
target.blinded += 1.5
fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
var/obj/item/organ/eyes/eyes = target.internal_organs_by_name["eyes"]
var/obj/item/organ/external/affected = target.get_organ(target_zone)
user.visible_message("\red [user]'s hand slips, slicing [target]'s eyes wth \the [tool]!" , \
"\red Your hand slips, slicing [target]'s eyes wth \the [tool]!" )
affected.createwound(CUT, 10)
eyes.take_damage(5, 0)
/datum/surgery_step/eye/lift_eyes
allowed_tools = list(
/obj/item/weapon/retractor = 100, \
/obj/item/weapon/material/kitchen/utensil/fork = 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.eyes == 1
begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
user.visible_message("[user] starts lifting corneas from [target]'s eyes with \the [tool].", \
"You start lifting corneas from [target]'s eyes with \the [tool].")
..()
end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
user.visible_message("\blue [user] has lifted the corneas from [target]'s eyes from with \the [tool]." , \
"\blue You has lifted the corneas from [target]'s eyes from with \the [tool]." )
target.op_stage.eyes = 2
fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
var/obj/item/organ/eyes/eyes = target.internal_organs_by_name["eyes"]
var/obj/item/organ/external/affected = target.get_organ(target_zone)
user.visible_message("\red [user]'s hand slips, damaging [target]'s eyes with \the [tool]!", \
"\red Your hand slips, damaging [target]'s eyes with \the [tool]!")
target.apply_damage(10, BRUTE, affected)
eyes.take_damage(5, 0)
/datum/surgery_step/eye/mend_eyes
allowed_tools = list(
/obj/item/weapon/hemostat = 100, \
/obj/item/stack/cable_coil = 75, \
/obj/item/device/assembly/mousetrap = 10 //I don't know. Don't ask me. But I'm leaving it because hilarity.
)
min_duration = 80
max_duration = 100
can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
return ..() && target.op_stage.eyes == 2
begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
user.visible_message("[user] starts mending the nerves and lenses in [target]'s eyes with \the [tool].", \
"You start mending the nerves and lenses in [target]'s eyes with the [tool].")
..()
end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
user.visible_message("\blue [user] mends the nerves and lenses in [target]'s with \the [tool]." , \
"\blue You mend the nerves and lenses in [target]'s with \the [tool].")
target.op_stage.eyes = 3
fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
var/obj/item/organ/eyes/eyes = target.internal_organs_by_name["eyes"]
var/obj/item/organ/external/affected = target.get_organ(target_zone)
user.visible_message("\red [user]'s hand slips, stabbing \the [tool] into [target]'s eye!", \
"\red Your hand slips, stabbing \the [tool] into [target]'s eye!")
target.apply_damage(10, BRUTE, affected, sharp=1)
eyes.take_damage(5, 0)
/datum/surgery_step/eye/cauterize
allowed_tools = list(
/obj/item/weapon/cautery = 100, \
/obj/item/clothing/mask/smokable/cigarette = 75, \
/obj/item/weapon/flame/lighter = 50, \
/obj/item/weapon/weldingtool = 25
)
min_duration = 70
max_duration = 100
can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
return ..()
begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
user.visible_message("[user] is beginning to cauterize the incision around [target]'s eyes with \the [tool]." , \
"You are beginning to cauterize the incision around [target]'s eyes with \the [tool].")
end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
var/obj/item/organ/eyes/eyes = target.internal_organs_by_name["eyes"]
user.visible_message("\blue [user] cauterizes the incision around [target]'s eyes with \the [tool].", \
"\blue You cauterize the incision around [target]'s eyes with \the [tool].")
if (target.op_stage.eyes == 3)
target.disabilities &= ~NEARSIGHTED
target.sdisabilities &= ~BLIND
eyes.damage = 0
target.op_stage.eyes = 0
fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
var/obj/item/organ/eyes/eyes = target.internal_organs_by_name["eyes"]
var/obj/item/organ/external/affected = target.get_organ(target_zone)
user.visible_message("\red [user]'s hand slips, searing [target]'s eyes with \the [tool]!", \
"\red Your hand slips, searing [target]'s eyes with \the [tool]!")
target.apply_damage(5, BURN, affected)
eyes.take_damage(5, 0)
+1 -1
View File
@@ -10,7 +10,7 @@
if (!hasorgans(target))
return 0
var/obj/item/organ/external/affected = target.get_organ(target_zone)
if (!affected)
if (!affected || (affected.status & ORGAN_ROBOT))
return 0
return target_zone == "mouth"
-2
View File
@@ -17,8 +17,6 @@
return 0
if (affected.status & ORGAN_DESTROYED)
return 0
if (target_zone == "head" && target.species && (target.species.flags & IS_SYNTHETIC))
return 1
if (affected.status & ORGAN_ROBOT)
return 0
return 1
-33
View File
@@ -1,33 +0,0 @@
//This is an uguu head restoration surgery TOTALLY not yoinked from chinsky's limb reattacher
/datum/surgery_step/attach_head/
priority = 3 // Must be higher than /datum/surgery_step/internal
allowed_tools = list(/obj/item/organ/external/head = 100)
can_infect = 0
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/head = target.get_organ(target_zone)
return isnull(head) && target_zone == "head" && !isnull(target.species.has_limbs["head"])
begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
user.visible_message("[user] starts attaching [tool] to [target]'s neck.", \
"You start attaching [tool] to [target]'s neck.")
end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
user.visible_message("\blue [user] has attached [target]'s head to the body.", \
"\blue You have attached [target]'s head to the body.")
var/obj/item/organ/external/head = tool
user.drop_from_inventory(head)
head.replaced(target)
head.loc = target
head.status = 0
target.update_body()
target.updatehealth()
target.UpdateDamageIcon()
fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
user.visible_message("\red [user]'s hand slips, damaging [target]'s neck!", \
"\red Your hand slips, damaging [target]'s neck!")
target.apply_damage(10, BRUTE, null, sharp=1)
+13 -27
View File
@@ -32,6 +32,12 @@
return "abdominal"
return ""
fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
var/obj/item/organ/external/chest/affected = target.get_organ(target_zone)
user.visible_message("\red [user]'s hand slips, scraping around inside [target]'s [affected.name] with \the [tool]!", \
"\red Your hand slips, scraping around inside [target]'s [affected.name] with \the [tool]!")
affected.createwound(CUT, 20)
/datum/surgery_step/cavity/make_space
allowed_tools = list(
/obj/item/weapon/surgicaldrill = 100, \
@@ -60,12 +66,6 @@
user.visible_message("\blue [user] makes some space inside [target]'s [get_cavity(affected)] cavity with \the [tool].", \
"\blue You make some space inside [target]'s [get_cavity(affected)] cavity with \the [tool]." )
fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
var/obj/item/organ/external/chest/affected = target.get_organ(target_zone)
user.visible_message("\red [user]'s hand slips, scraping tissue inside [target]'s [affected.name] with \the [tool]!", \
"\red Your hand slips, scraping tissue inside [target]'s [affected.name] with \the [tool]!")
affected.createwound(CUT, 20)
/datum/surgery_step/cavity/close_space
priority = 2
allowed_tools = list(
@@ -96,12 +96,6 @@
user.visible_message("\blue [user] mends [target]'s [get_cavity(affected)] cavity walls with \the [tool].", \
"\blue You mend [target]'s [get_cavity(affected)] cavity walls with \the [tool]." )
fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
var/obj/item/organ/external/chest/affected = target.get_organ(target_zone)
user.visible_message("\red [user]'s hand slips, scraping tissue inside [target]'s [affected.name] with \the [tool]!", \
"\red Your hand slips, scraping tissue inside [target]'s [affected.name] with \the [tool]!")
affected.createwound(CUT, 20)
/datum/surgery_step/cavity/place_item
priority = 0
allowed_tools = list(/obj/item = 100)
@@ -126,7 +120,7 @@
user.visible_message("\blue [user] puts \the [tool] inside [target]'s [get_cavity(affected)] cavity.", \
"\blue You put \the [tool] inside [target]'s [get_cavity(affected)] cavity." )
if (tool.w_class > get_max_wclass(affected)/2 && prob(50))
if (tool.w_class > get_max_wclass(affected)/2 && prob(50) && !(affected.status & ORGAN_ROBOT))
user << "\red You tear some blood vessels trying to fit such a big object in this cavity."
var/datum/wound/internal_bleeding/I = new (10)
affected.wounds += I
@@ -136,12 +130,6 @@
tool.loc = target
affected.cavity = 0
fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
var/obj/item/organ/external/chest/affected = target.get_organ(target_zone)
user.visible_message("\red [user]'s hand slips, scraping tissue inside [target]'s [affected.name] with \the [tool]!", \
"\red Your hand slips, scraping tissue inside [target]'s [affected.name] with \the [tool]!")
affected.createwound(CUT, 20)
//////////////////////////////////////////////////////////////////
// IMPLANT/ITEM REMOVAL SURGERY //
//////////////////////////////////////////////////////////////////
@@ -162,9 +150,9 @@
begin_step(mob/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("[user] starts poking around inside the incision on [target]'s [affected.name] with \the [tool].", \
"You start poking around inside the incision on [target]'s [affected.name] with \the [tool]" )
target.custom_pain("The pain in your chest is living hell!",1)
user.visible_message("[user] starts poking around inside [target]'s [affected.name] with \the [tool].", \
"You start poking around inside [target]'s [affected.name] with \the [tool]" )
target.custom_pain("The pain in your [affected.name] is living hell!",1)
..()
end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
@@ -209,8 +197,8 @@
user.visible_message("\blue [user] removes \the [tool] from [target]'s [affected.name].", \
"\blue There's something inside [target]'s [affected.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.name] with \the [tool].", \
"\blue You take something out of incision on [target]'s [affected.name]s with \the [tool]." )
user.visible_message("\blue [user] takes something out of [target]'s [affected.name] with \the [tool].", \
"\blue You take something out of [target]'s [affected.name]s with \the [tool]." )
affected.hidden.loc = get_turf(target)
if(!affected.hidden.blood_DNA)
affected.hidden.blood_DNA = list()
@@ -223,10 +211,8 @@
"\blue You could not find anything inside [target]'s [affected.name]." )
fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
..()
var/obj/item/organ/external/chest/affected = target.get_organ(target_zone)
user.visible_message("\red [user]'s hand slips, scraping tissue inside [target]'s [affected.name] with \the [tool]!", \
"\red Your hand slips, scraping tissue inside [target]'s [affected.name] with \the [tool]!")
affected.createwound(CUT, 20)
if (affected.implants.len)
var/fail_prob = 10
fail_prob += 100 - tool_quality(tool)
+129
View File
@@ -0,0 +1,129 @@
//Procedures in this file: Robotic limbs attachment, meat limbs attachment
//////////////////////////////////////////////////////////////////
// LIMB SURGERY //
//////////////////////////////////////////////////////////////////
/datum/surgery_step/limb/
priority = 3 // Must be higher than /datum/surgery_step/internal
can_infect = 0
can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
if (!hasorgans(target))
return 0
var/obj/item/organ/external/affected = target.get_organ(target_zone)
if (affected)
return 0
var/list/organ_data = target.species.has_limbs["[target_zone]"]
return !isnull(organ_data)
/datum/surgery_step/limb/attach
allowed_tools = list(/obj/item/organ/external = 100)
min_duration = 50
max_duration = 70
begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
var/obj/item/organ/external/E = tool
user.visible_message("[user] starts attaching [E.name] to [target]'s [E.amputation_point].", \
"You start attaching [E.name] to [target]'s [E.amputation_point].")
end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
var/obj/item/organ/external/E = tool
user.visible_message("<span class='notice'>[user] has attached [target]'s [E.name] to the [E.amputation_point].</span>>", \
"<span class='notice'>You have attached [target]'s [E.name] to the [E.amputation_point].</span>")
user.drop_from_inventory(E)
E.replaced(target)
E.loc = target
target.update_body()
target.updatehealth()
target.UpdateDamageIcon()
fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
var/obj/item/organ/external/E = tool
user.visible_message("<span class='warning'> [user]'s hand slips, damaging [target]'s [E.amputation_point]!</span>", \
"<span class='warning'> Your hand slips, damaging [target]'s [E.amputation_point]!</span>")
target.apply_damage(10, BRUTE, null, sharp=1)
/datum/surgery_step/limb/connect
allowed_tools = list(
/obj/item/weapon/hemostat = 100, \
/obj/item/stack/cable_coil = 75, \
/obj/item/device/assembly/mousetrap = 20
)
can_infect = 1
min_duration = 100
max_duration = 120
can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
var/obj/item/organ/external/E = target.get_organ(target_zone)
return E && !E.is_stump() && (E.status & ORGAN_DESTROYED)
begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
var/obj/item/organ/external/E = target.get_organ(target_zone)
user.visible_message("[user] starts connecting tendons and muscles in [target]'s [E.amputation_point] with [tool].", \
"You start connecting tendons and muscle in [target]'s [E.amputation_point].")
end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
var/obj/item/organ/external/E = target.get_organ(target_zone)
user.visible_message("<span class='notice'>[user] has connected tendons and muscles in [target]'s [E.amputation_point] with [tool].</span>", \
"<span class='notice'>You have connected tendons and muscles in [target]'s [E.amputation_point] with [tool].</span>")
E.status &= ~ORGAN_DESTROYED
if(E.children)
for(var/obj/item/organ/external/C in E.children)
C.status &= ~ORGAN_DESTROYED
target.update_body()
target.updatehealth()
target.UpdateDamageIcon()
fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
var/obj/item/organ/external/E = tool
user.visible_message("<span class='warning'> [user]'s hand slips, damaging [target]'s [E.amputation_point]!</span>", \
"<span class='warning'> Your hand slips, damaging [target]'s [E.amputation_point]!</span>")
target.apply_damage(10, BRUTE, null, sharp=1)
/datum/surgery_step/limb/mechanize
allowed_tools = list(/obj/item/robot_parts = 100)
min_duration = 80
max_duration = 100
can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
if(..())
var/obj/item/robot_parts/p = tool
if (p.part)
if (!(target_zone in p.part))
return 0
return isnull(target.get_organ(target_zone))
begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
user.visible_message("[user] starts attaching \the [tool] to [target].", \
"You start attaching \the [tool] to [target].")
end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
var/obj/item/robot_parts/L = tool
user.visible_message("<span class='notice'>[user] has attached \the [tool] to [target].</span>", \
"<span class='notice'>You have attached \the [tool] to [target].</span>")
if(L.part)
for(var/part_name in L.part)
if(!isnull(target.get_organ(part_name)))
continue
var/list/organ_data = target.species.has_limbs["[part_name]"]
if(!organ_data)
continue
var/new_limb_type = organ_data["path"]
var/obj/item/organ/external/new_limb = new new_limb_type(target)
new_limb.robotize(L.model_info)
if(L.sabotaged)
new_limb.sabotaged = 1
target.update_body()
target.updatehealth()
target.UpdateDamageIcon()
qdel(tool)
fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
user.visible_message("<span class='warning'> [user]'s hand slips, damaging [target]'s flesh!</span>", \
"<span class='warning'> Your hand slips, damaging [target]'s flesh!</span>")
target.apply_damage(10, BRUTE, null, sharp=1)
+14 -74
View File
@@ -138,75 +138,6 @@
if(I && I.damage > 0)
I.take_damage(dam_amt,0)
/datum/surgery_step/internal/fix_organ_robotic //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)
if (!hasorgans(target))
return
var/obj/item/organ/external/affected = target.get_organ(target_zone)
if(!affected) return
var/is_organ_damaged = 0
for(var/obj/item/organ/I in affected.internal_organs)
if(I.damage > 0 && I.robotic >= 2)
is_organ_damaged = 1
break
return ..() && is_organ_damaged
begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
if (!hasorgans(target))
return
var/obj/item/organ/external/affected = target.get_organ(target_zone)
for(var/obj/item/organ/I in affected.internal_organs)
if(I && I.damage > 0)
if(I.robotic >= 2)
user.visible_message("[user] starts mending the damage to [target]'s [I.name]'s mechanisms.", \
"You start mending the damage to [target]'s [I.name]'s mechanisms." )
target.custom_pain("The pain in your [affected.name] is living hell!",1)
..()
end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
if (!hasorgans(target))
return
var/obj/item/organ/external/affected = target.get_organ(target_zone)
for(var/obj/item/organ/I in affected.internal_organs)
if(I && I.damage > 0)
if(I.robotic >= 2)
user.visible_message("\blue [user] repairs [target]'s [I.name] with [tool].", \
"\blue You repair [target]'s [I.name] with [tool]." )
I.damage = 0
fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
if (!hasorgans(target))
return
var/obj/item/organ/external/affected = target.get_organ(target_zone)
user.visible_message("\red [user]'s hand slips, gumming up the mechanisms inside of [target]'s [affected.name] with \the [tool]!", \
"\red Your hand slips, gumming up the mechanisms inside of [target]'s [affected.name] with \the [tool]!")
target.adjustToxLoss(5)
affected.createwound(CUT, 5)
for(var/obj/item/organ/I in affected.internal_organs)
if(I)
I.take_damage(rand(3,5),0)
/datum/surgery_step/internal/detatch_organ
allowed_tools = list(
@@ -223,12 +154,17 @@
if (!..())
return 0
var/obj/item/organ/external/affected = target.get_organ(target_zone)
if(!(affected && !(affected.status & ORGAN_ROBOT)))
return 0
target.op_stage.current_organ = null
var/list/attached_organs = list()
for(var/organ in target.internal_organs_by_name)
var/obj/item/organ/I = target.internal_organs_by_name[organ]
if(I && !I.status && I.parent_organ == target_zone)
if(I && !(I.status & ORGAN_CUT_AWAY) && I.parent_organ == target_zone)
attached_organs |= organ
var/organ_to_remove = input(user, "Which organ do you want to prepare for removal?") as null|anything in attached_organs
@@ -283,7 +219,7 @@
var/list/removable_organs = list()
for(var/organ in target.internal_organs_by_name)
var/obj/item/organ/I = target.internal_organs_by_name[organ]
if(I.status & ORGAN_CUT_AWAY && I.parent_organ == target_zone)
if((I.status & ORGAN_CUT_AWAY) && I.parent_organ == target_zone)
removable_organs |= organ
var/organ_to_remove = input(user, "Which organ do you want to remove?") as null|anything in removable_organs
@@ -312,8 +248,8 @@
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, damaging the flesh in [target]'s [affected.name] with \the [tool]!", \
"\red Your hand slips, damaging the flesh in [target]'s [affected.name] with \the [tool]!")
user.visible_message("\red [user]'s hand slips, damaging [target]'s [affected.name] with \the [tool]!", \
"\red Your hand slips, damaging [target]'s [affected.name] with \the [tool]!")
affected.createwound(BRUISE, 20)
/datum/surgery_step/internal/replace_organ
@@ -335,6 +271,10 @@
if(!istype(O))
return 0
if((affected.status & ORGAN_ROBOT) && !(O.status & ORGAN_ROBOT))
user << "<span class='danger'>You cannot install a naked organ into a robotic body.</span>"
return 2
if(!target.species)
user << "\red You have no idea what species this person is. Report this on the bug tracker."
return 2
@@ -410,7 +350,7 @@
var/list/removable_organs = list()
for(var/organ in target.internal_organs_by_name)
var/obj/item/organ/I = target.internal_organs_by_name[organ]
if(I && I.status & ORGAN_CUT_AWAY && I.parent_organ == target_zone)
if(I && (I.status & ORGAN_CUT_AWAY) && !(I.status & ORGAN_ROBOT) && I.parent_organ == target_zone)
removable_organs |= organ
var/organ_to_replace = input(user, "Which organ do you want to reattach?") as null|anything in removable_organs
+1 -1
View File
@@ -186,7 +186,7 @@
return 0
if(istype(tool,/obj/item/weapon/weldingtool))
var/obj/item/weapon/weldingtool/welder = tool
if(!welder.isOn())
if(!welder.isOn() || !welder.remove_fuel(1,user))
return 0
return (target_zone == "chest") && istype(target.back, /obj/item/weapon/rig) && !(target.back.canremove)
-62
View File
@@ -1,62 +0,0 @@
//Procedures in this file: Robotic limbs attachment
//////////////////////////////////////////////////////////////////
// LIMB SURGERY //
//////////////////////////////////////////////////////////////////
/datum/surgery_step/limb/
can_infect = 0
can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
if (!hasorgans(target))
return 0
var/obj/item/organ/external/affected = target.get_organ(target_zone)
if (affected)
return 0
var/list/organ_data = target.species.has_limbs["[target_zone]"]
return !isnull(organ_data) && !(target_zone in list("head","groin","chest"))
/datum/surgery_step/limb/attach
allowed_tools = list(/obj/item/robot_parts = 100)
min_duration = 80
max_duration = 100
can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
if(..())
var/obj/item/robot_parts/p = tool
if (p.part)
if (!(target_zone in p.part))
return 0
return isnull(target.get_organ(target_zone))
begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
user.visible_message("[user] starts attaching \the [tool] to [target].", \
"You start attaching \the [tool] to [target].")
end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
var/obj/item/robot_parts/L = tool
user.visible_message("\blue [user] has attached \the [tool] to [target].", \
"\blue You have attached \the [tool] to [target].")
if(L.part)
for(var/part_name in L.part)
if(!isnull(target.get_organ(part_name)))
continue
var/list/organ_data = target.species.has_limbs["[part_name]"]
if(!organ_data)
continue
var/new_limb_type = organ_data["path"]
var/obj/item/organ/external/new_limb = new new_limb_type(target)
new_limb.robotize(L.model_info)
if(L.sabotaged)
new_limb.sabotaged = 1
target.update_body()
target.updatehealth()
target.UpdateDamageIcon()
qdel(tool)
fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
user.visible_message("\red [user]'s hand slips, damaging [target]'s flesh!", \
"\red Your hand slips, damaging [target]'s flesh!")
target.apply_damage(10, BRUTE, null, sharp=1)
+421
View File
@@ -0,0 +1,421 @@
//Procedures in this file: Gneric surgery steps
//////////////////////////////////////////////////////////////////
// COMMON STEPS //
//////////////////////////////////////////////////////////////////
/datum/surgery_step/robotics/
can_infect = 0
can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
if (isslime(target))
return 0
if (target_zone == "eyes") //there are specific steps for eye surgery
return 0
if (!hasorgans(target))
return 0
var/obj/item/organ/external/affected = target.get_organ(target_zone)
if (affected == null)
return 0
if (affected.status & ORGAN_DESTROYED)
return 0
if (!(affected.status & ORGAN_ROBOT))
return 0
return 1
/datum/surgery_step/robotics/unscrew_hatch
allowed_tools = list(
/obj/item/weapon/screwdriver = 100,
/obj/item/weapon/coin = 50,
/obj/item/weapon/material/kitchen/utensil/knife = 50
)
min_duration = 90
max_duration = 110
can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
if(..())
var/obj/item/organ/external/affected = target.get_organ(target_zone)
return affected && affected.open == 0 && target_zone != "mouth"
begin_step(mob/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("[user] starts to unscrew the maintenance hatch on [target]'s [affected.name] with \the [tool].", \
"You start to unscrew the maintenance hatch on [target]'s [affected.name] with \the [tool].")
..()
end_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("\blue [user] has opened the maintenance hatch on [target]'s [affected.name] with \the [tool].", \
"\blue You have opened the maintenance hatch on [target]'s [affected.name] with \the [tool].",)
affected.open = 1
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 [tool.name] slips, failing to unscrew [target]'s [affected.name].", \
"\red Your [tool] slips, failing to unscrew [target]'s [affected.name].")
/datum/surgery_step/robotics/open_hatch
allowed_tools = list(
/obj/item/weapon/retractor = 100,
/obj/item/weapon/crowbar = 100,
/obj/item/weapon/material/kitchen/utensil = 50
)
min_duration = 30
max_duration = 40
can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
if(..())
var/obj/item/organ/external/affected = target.get_organ(target_zone)
return affected && affected.open == 1
begin_step(mob/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("[user] starts to pry open the maintenance hatch on [target]'s [affected.name] with \the [tool].",
"You start to pry open the maintenance hatch on [target]'s [affected.name] with \the [tool].")
..()
end_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("\blue [user] open the maintenance hatch on [target]'s [affected.name] with \the [tool].", \
"\blue You open the maintenance hatch on [target]'s [affected.name] with \the [tool]." )
affected.open = 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 [tool.name] slips, failing to open the hatch on [target]'s [affected.name].",
"\red Your [tool] slips, failing to open the hatch on [target]'s [affected.name].")
/datum/surgery_step/robotics/close_hatch
allowed_tools = list(
/obj/item/weapon/retractor = 100,
/obj/item/weapon/crowbar = 100,
/obj/item/weapon/material/kitchen/utensil = 50
)
min_duration = 70
max_duration = 100
can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
if(..())
var/obj/item/organ/external/affected = target.get_organ(target_zone)
return affected && affected.open && target_zone != "mouth"
begin_step(mob/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("[user] begins to close and secure the hatch on [target]'s [affected.name] with \the [tool]." , \
"You begin to close and secure the hatch on [target]'s [affected.name] with \the [tool].")
..()
end_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("\blue [user] closes and secures the hatch on [target]'s [affected.name] with \the [tool].", \
"\blue You close and secure the hatch on [target]'s [affected.name] with \the [tool].")
affected.open = 0
affected.germ_level = 0
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 [tool.name] slips, failing to close the hatch on [target]'s [affected.name].",
"\red Your [tool.name] slips, failing to close the hatch on [target]'s [affected.name].")
/datum/surgery_step/robotics/repair_brute
allowed_tools = list(
/obj/item/weapon/weldingtool = 100,
/obj/item/weapon/pickaxe/plasmacutter = 50
)
min_duration = 50
max_duration = 60
can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
if(..())
var/obj/item/organ/external/affected = target.get_organ(target_zone)
if(istype(tool,/obj/item/weapon/weldingtool))
var/obj/item/weapon/weldingtool/welder = tool
if(!welder.isOn() || !welder.remove_fuel(1,user))
return 0
return affected && affected.open && affected.brute_dam > 0 && target_zone != "mouth"
begin_step(mob/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("[user] begins to patch damage to [target]'s [affected.name]'s support structure with \the [tool]." , \
"You begin to patch damage to [target]'s [affected.name]'s support structure with \the [tool].")
..()
end_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("\blue [user] finishes patching damage to [target]'s [affected.name] with \the [tool].", \
"\blue You finish patching damage to [target]'s [affected.name] with \the [tool].")
affected.heal_damage(rand(30,50),0)
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 [tool.name] slips, damaging the internal structure of [target]'s [affected.name].",
"\red Your [tool.name] slips, damaging the internal structure of [target]'s [affected.name].")
target.apply_damage(rand(5,10), BURN, affected)
/datum/surgery_step/robotics/repair_burn
allowed_tools = list(
/obj/item/stack/cable_coil = 100
)
min_duration = 50
max_duration = 60
can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
if(..())
var/obj/item/organ/external/affected = target.get_organ(target_zone)
return affected && affected.open && affected.burn_dam > 0 && target_zone != "mouth"
begin_step(mob/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("[user] begins to splice new cabling into [target]'s [affected.name]." , \
"You begin to splice new cabling into [target]'s [affected.name].")
..()
end_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("\blue [user] finishes splicing cable into [target]'s [affected.name].", \
"\blue You finishes splicing new cable into [target]'s [affected.name].")
affected.heal_damage(0,rand(30,50))
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] causes a short circuit in [target]'s [affected.name]!",
"\red You cause a short circuit in [target]'s [affected.name]!")
target.apply_damage(rand(5,10), BURN, affected)
/datum/surgery_step/robotics/fix_organ_robotic //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)
if (!hasorgans(target))
return
var/obj/item/organ/external/affected = target.get_organ(target_zone)
if(!affected) return
var/is_organ_damaged = 0
for(var/obj/item/organ/I in affected.internal_organs)
if(I.damage > 0 && I.robotic >= 2)
is_organ_damaged = 1
break
return affected.open == 2 && is_organ_damaged
begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
if (!hasorgans(target))
return
var/obj/item/organ/external/affected = target.get_organ(target_zone)
for(var/obj/item/organ/I in affected.internal_organs)
if(I && I.damage > 0)
if(I.robotic >= 2)
user.visible_message("[user] starts mending the damage to [target]'s [I.name]'s mechanisms.", \
"You start mending the damage to [target]'s [I.name]'s mechanisms." )
target.custom_pain("The pain in your [affected.name] is living hell!",1)
..()
end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
if (!hasorgans(target))
return
var/obj/item/organ/external/affected = target.get_organ(target_zone)
for(var/obj/item/organ/I in affected.internal_organs)
if(I && I.damage > 0)
if(I.robotic >= 2)
user.visible_message("\blue [user] repairs [target]'s [I.name] with [tool].", \
"\blue You repair [target]'s [I.name] with [tool]." )
I.damage = 0
fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
if (!hasorgans(target))
return
var/obj/item/organ/external/affected = target.get_organ(target_zone)
user.visible_message("\red [user]'s hand slips, gumming up the mechanisms inside of [target]'s [affected.name] with \the [tool]!", \
"\red Your hand slips, gumming up the mechanisms inside of [target]'s [affected.name] with \the [tool]!")
target.adjustToxLoss(5)
affected.createwound(CUT, 5)
for(var/obj/item/organ/I in affected.internal_organs)
if(I)
I.take_damage(rand(3,5),0)
/datum/surgery_step/robotics/detatch_organ_robotic
allowed_tools = list(
/obj/item/device/multitool = 100
)
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 && (affected.status & ORGAN_ROBOT)))
return 0
if(affected.open != 2)
return 0
target.op_stage.current_organ = null
var/list/attached_organs = list()
for(var/organ in target.internal_organs_by_name)
var/obj/item/organ/I = target.internal_organs_by_name[organ]
if(I && !(I.status & ORGAN_CUT_AWAY) && I.parent_organ == target_zone)
attached_organs |= organ
var/organ_to_remove = input(user, "Which organ do you want to prepare for removal?") as null|anything in attached_organs
if(!organ_to_remove)
return 0
target.op_stage.current_organ = organ_to_remove
return ..() && organ_to_remove
begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
user.visible_message("[user] starts to decouple [target]'s [target.op_stage.current_organ] with \the [tool].", \
"You start to decouple [target]'s [target.op_stage.current_organ] with \the [tool]." )
..()
end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
user.visible_message("\blue [user] has decoupled [target]'s [target.op_stage.current_organ] with \the [tool]." , \
"\blue You have decoupled [target]'s [target.op_stage.current_organ] with \the [tool].")
var/obj/item/organ/I = target.internal_organs_by_name[target.op_stage.current_organ]
if(I && istype(I))
I.status |= ORGAN_CUT_AWAY
fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
user.visible_message("\red [user]'s hand slips, disconnecting \the [tool].", \
"\red Your hand slips, disconnecting \the [tool].")
/datum/surgery_step/robotics/attach_organ_robotic
allowed_tools = list(
/obj/item/weapon/screwdriver = 100,
)
min_duration = 100
max_duration = 120
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 && (affected.status & ORGAN_ROBOT)))
return 0
if(affected.open != 2)
return 0
target.op_stage.current_organ = null
var/list/removable_organs = list()
for(var/organ in target.internal_organs_by_name)
var/obj/item/organ/I = target.internal_organs_by_name[organ]
if(I && (I.status & ORGAN_CUT_AWAY) && (I.status & ORGAN_ROBOT) && I.parent_organ == target_zone)
removable_organs |= organ
var/organ_to_replace = input(user, "Which organ do you want to reattach?") as null|anything in removable_organs
if(!organ_to_replace)
return 0
target.op_stage.current_organ = organ_to_replace
return ..()
begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
user.visible_message("[user] begins reattaching [target]'s [target.op_stage.current_organ] with \the [tool].", \
"You start reattaching [target]'s [target.op_stage.current_organ] with \the [tool].")
..()
end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
user.visible_message("\blue [user] has reattached [target]'s [target.op_stage.current_organ] with \the [tool]." , \
"\blue You have reattached [target]'s [target.op_stage.current_organ] with \the [tool].")
var/obj/item/organ/I = target.internal_organs_by_name[target.op_stage.current_organ]
if(I && istype(I))
I.status &= ~ORGAN_CUT_AWAY
fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
user.visible_message("\red [user]'s hand slips, disconnecting \the [tool].", \
"\red Your hand slips, disconnecting \the [tool].")
/datum/surgery_step/robotics/install_mmi
allowed_tools = list(
/obj/item/device/mmi = 100
)
min_duration = 60
max_duration = 80
can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
if(target_zone != "head")
return
var/obj/item/device/mmi/M = tool
var/obj/item/organ/external/affected = target.get_organ(target_zone)
if(!(affected && affected.open == 2))
return 0
if(!istype(M))
return 0
if(!M.brainmob || !M.brainmob.client || !M.brainmob.ckey || M.brainmob.stat >= DEAD)
user << "<span class='danger'>That brain is not usable.</span>"
return 2
if(!(affected.status & ORGAN_ROBOT))
user << "<span class='danger'>You cannot install a computer brain into a meat skull.</span>"
return 2
if(!target.species)
user << "<span class='danger'>You have no idea what species this person is. Report this on the bug tracker.</span>"
return 2
if(!target.species.has_organ["brain"])
user << "<span class='danger'>You're pretty sure [target.species.name_plural] don't normally have a brain.</span>"
return 2
if(!isnull(target.internal_organs["brain"]))
user << "<span class='danger'>Your subject already has a brain.</span>"
return 2
return 1
begin_step(mob/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("[user] starts installing \the [tool] into [target]'s [affected.name].", \
"You start installing \the [tool] into [target]'s [affected.name].")
..()
end_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("\blue [user] has installed \the [tool] into [target]'s [affected.name].", \
"\blue You have installed \the [tool] into [target]'s [affected.name].")
var/obj/item/device/mmi/M = tool
var/obj/item/organ/mmi_holder/holder = new(target, 1)
target.internal_organs_by_name["brain"] = holder
user.drop_from_inventory(tool)
tool.loc = holder
holder.stored_mmi = tool
holder.update_from_mmi()
if(M.brainmob && M.brainmob.mind)
M.brainmob.mind.transfer_to(target)
fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
user.visible_message("\red [user]'s hand slips.", \
"\red Your hand slips.")
+5 -4
View File
@@ -73,10 +73,11 @@
var/f = 1
for(var/k in all_species)
var/datum/species/S = all_species[k]
if(!(S.flags & IS_SYNTHETIC))
if(!f) H += " | "
else f = 0
H += "<a href='?src=\ref[src];what=species;toggle=[k]' style='color:[(k in species) ? "#006600" : "#ff0000"]'>[k]</a>"
if(S.virus_immune)
continue
if(!f) H += " | "
else f = 0
H += "<a href='?src=\ref[src];what=species;toggle=[k]' style='color:[(k in species) ? "#006600" : "#ff0000"]'>[k]</a>"
H += {"
<a href="?src=\ref[src];what=species;reset=1" style="color:#0000aa">Reset</a>
<br />
+7 -1
View File
@@ -45,7 +45,7 @@
var/list/res = list()
for (var/specie in all_species)
var/datum/species/S = all_species[specie]
if(!(S.flags & IS_SYNTHETIC))
if(!S.virus_immune)
meat += S.name
if(meat.len)
var/num = rand(1,meat.len)
@@ -66,6 +66,12 @@
if(prob(5))
mob.antibodies |= antigen // 20% immunity is a good chance IMO, because it allows finding an immune person easily
// Some species are flat out immune to organic viruses.
var/mob/living/carbon/human/H = mob
if(istype(H) && H.species.virus_immune)
cure(mob)
return
if(mob.radiation > 50)
if(prob(1))
majormutate()
+13 -12
View File
@@ -3,25 +3,26 @@ proc/infection_check(var/mob/living/carbon/M, var/vector = "Airborne")
if (!istype(M))
return 0
var/mob/living/carbon/human/H = M
if(istype(H) && H.species.virus_immune)
return 0
var/protection = M.getarmor(null, "bio") //gets the full body bio armour value, weighted by body part coverage.
var/score = round(0.06*protection) //scales 100% protection to 6.
switch(vector)
if("Airborne")
if(M.internal)
score = 6 //not breathing infected air helps greatly
var/obj/item/I = M.wear_mask
//masks provide a small bonus and can replace overall bio protection
if(I)
score = max(score, round(0.06*I.armor["bio"]))
if (istype(I, /obj/item/clothing/mask))
score += 1 //this should be added after
if(M.internal) //not breathing infected air helps greatly
return 0
var/obj/item/I = M.wear_mask
//masks provide a small bonus and can replace overall bio protection
if(I)
score = max(score, round(0.06*I.armor["bio"]))
if (istype(I, /obj/item/clothing/mask))
score += 1 //this should be added after
if("Contact")
if(istype(M, /mob/living/carbon/human))
var/mob/living/carbon/human/H = M
if(istype(H))
//gloves provide a larger bonus
if (istype(H.gloves, /obj/item/clothing/gloves))
score += 2
+1 -1
View File
@@ -16,7 +16,7 @@
var/mob/living/carbon/C = M
if (istype(C,/mob/living/carbon/human/))
var/mob/living/carbon/human/H = C
if(H.species && H.species.flags & NO_BLOOD)
if(H.species.flags & NO_BLOOD)
report("Scan aborted: The target does not have blood.", user)
return