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
+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()