Merge remote-tracking branch 'upstream/master' into dev

Signed-off-by: Mloc-Argent <colmohici@gmail.com>

Conflicts:
	code/modules/mob/living/carbon/human/human_damage.dm
This commit is contained in:
Mloc-Argent
2014-07-06 17:50:53 +01:00
114 changed files with 1625 additions and 1334 deletions
+3 -4
View File
@@ -216,10 +216,9 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp
if(ticker.mode:malf_mode_declared)
stat(null, "Time left: [max(ticker.mode:AI_win_timeleft/(ticker.mode:apcs/3), 0)]")
if(emergency_shuttle)
if(emergency_shuttle.has_eta() && !emergency_shuttle.returned())
var/timeleft = emergency_shuttle.estimate_arrival_time()
if (timeleft)
stat(null, "ETA-[(timeleft / 60) % 60]:[add_zero(num2text(timeleft % 60), 2)]")
var/eta_status = emergency_shuttle.get_status_panel_eta()
if(eta_status)
stat(null, eta_status)
/mob/dead/observer/verb/reenter_corpse()
set category = "Ghost"
+1
View File
@@ -4,6 +4,7 @@
desc = "You shouldn't ever see this."
icon = 'icons/obj/objects.dmi'
slot_flags = SLOT_HEAD
sprite_sheets = list("Vox" = 'icons/mob/species/vox/head.dmi')
/obj/item/weapon/holder/New()
..()
@@ -159,10 +159,9 @@
stat(null, "Plasma Stored: [getPlasma()]/[max_plasma]")
if(emergency_shuttle)
if(emergency_shuttle.has_eta() && !emergency_shuttle.returned())
var/timeleft = emergency_shuttle.estimate_arrival_time()
if (timeleft)
stat(null, "ETA-[(timeleft / 60) % 60]:[add_zero(num2text(timeleft % 60), 2)]")
var/eta_status = emergency_shuttle.get_status_panel_eta()
if(eta_status)
stat(null, eta_status)
/mob/living/carbon/alien/Stun(amount)
if(status_flags & CANSTUN)
+23 -8
View File
@@ -43,7 +43,7 @@
if(!species)
if(new_species)
set_species(new_species)
set_species(new_species,null,1)
else
set_species()
@@ -112,7 +112,7 @@
return
//BubbleWrap: people in handcuffs are always switched around as if they were on 'help' intent to prevent a person being pulled from being seperated from their puller
if((tmob.a_intent == "help" || tmob.restrained()) && (a_intent == "help" || src.restrained()) && tmob.canmove && canmove) // mutual brohugs all around!
if((tmob.a_intent == "help" || tmob.restrained()) && (a_intent == "help" || src.restrained()) && tmob.canmove && !tmob.buckled && canmove) // mutual brohugs all around!
var/turf/oldloc = loc
loc = tmob.loc
tmob.loc = oldloc
@@ -171,10 +171,9 @@
if(ticker.mode:malf_mode_declared)
stat(null, "Time left: [max(ticker.mode:AI_win_timeleft/(ticker.mode:apcs/3), 0)]")
if(emergency_shuttle)
if(emergency_shuttle.has_eta() && !emergency_shuttle.returned())
var/timeleft = emergency_shuttle.estimate_arrival_time()
if (timeleft)
stat(null, "ETA-[(timeleft / 60) % 60]:[add_zero(num2text(timeleft % 60), 2)]")
var/eta_status = emergency_shuttle.get_status_panel_eta()
if(eta_status)
stat(null, eta_status)
if (client.statpanel == "Status")
if (internal)
@@ -1227,7 +1226,7 @@
else
usr << "\blue [self ? "Your" : "[src]'s"] pulse is [src.get_pulse(GETPULSE_HAND)]."
/mob/living/carbon/human/proc/set_species(var/new_species, var/force_organs)
/mob/living/carbon/human/proc/set_species(var/new_species, var/force_organs, var/default_colour)
if(!dna)
if(!new_species)
@@ -1252,11 +1251,22 @@
if(species.language)
add_language(species.language)
if(species.base_color && default_colour)
//Apply colour.
r_skin = hex2num(copytext(species.base_color,2,4))
g_skin = hex2num(copytext(species.base_color,4,6))
b_skin = hex2num(copytext(species.base_color,6,8))
else
r_skin = 0
g_skin = 0
b_skin = 0
species.handle_post_spawn(src)
spawn(0)
update_icons()
if(species)
species.handle_post_spawn(src)
return 1
else
return 0
@@ -1387,6 +1397,11 @@
T.Weaken(5)
//Only official raider vox get the grab and no self-prone."
if(src.mind && src.mind.special_role != "Vox Raider")
src.Weaken(5)
return
var/use_hand = "left"
if(l_hand)
if(r_hand)
@@ -297,12 +297,18 @@ This function restores all organs.
updatehealth()
hud_updateflag |= 1 << HEALTH_HUD
//Embedded projectile code.
//Embedded object code.
if(!organ) return
if(istype(used_weapon,/obj/item/weapon))
var/obj/item/weapon/W = used_weapon //Sharp objects will always embed if they do enough damage.
if( (damage > (5*W.w_class)) && ( (sharp && !ismob(W.loc)) || prob((damage*1.5)/W.w_class) ) )
organ.embed(W)
if(istype(used_weapon,/obj/item))
var/obj/item/W = used_weapon
if (!W.is_robot_module())
//blunt objects should really not be embedding in things unless a huge amount of force is involved
var/embed_chance = sharp? damage/W.w_class : damage/(W.w_class*3)
var/embed_threshold = sharp? 5*W.w_class : 15*W.w_class
//Sharp objects will always embed if they do enough damage.
if((sharp && damage > (10*W.w_class)) || (sharp && !ismob(W.loc)) || (damage > embed_threshold && prob(embed_chance)))
organ.embed(W)
else if( (damage > (5*W.w_class)) && ((!ismob(W.loc) && !sharp)) || (prob((damage - 2)/W.w_class) ) )
organ.embed(W)
@@ -236,7 +236,7 @@ emp_act
if(armor >= 2) return 0
if(!I.force) return 0
apply_damage(I.force, I.damtype, affecting, armor , sharp=weapon_sharp, edge=weapon_edge, I)
apply_damage(I.force, I.damtype, affecting, armor, sharp=weapon_sharp, edge=weapon_edge, used_weapon=I)
var/bloody = 0
if(((I.damtype == BRUTE) || (I.damtype == HALLOSS)) && prob(25 + (I.force * 2)))
@@ -308,6 +308,6 @@ emp_act
if(damtype != BURN && damtype != BRUTE) return
var/obj/item/clothing/suit/space/SS = wear_suit
var/penetrated_dam = max(0,(damage - max(0,(SS.breach_threshold - SS.damage))))
var/penetrated_dam = max(0,(damage - SS.breach_threshold)) // - SS.damage)) - Consider uncommenting this if suits seem too hardy on dev.
if(penetrated_dam) SS.create_breaches(damtype, penetrated_dam)
@@ -35,7 +35,7 @@
else if(E.status & ORGAN_BROKEN)
tally += 1.5
if(pulledby && istype(pulledby, /obj/structure/stool/bed/chair/wheelchair))
if(buckled && istype(buckled, /obj/structure/stool/bed/chair/wheelchair))
for(var/organ_name in list("l_hand","r_hand","l_arm","r_arm"))
var/datum/organ/external/E = get_organ(organ_name)
if(!E || (E.status & ORGAN_DESTROYED))
@@ -110,6 +110,7 @@
head = null
if((W.flags & BLOCKHAIR) || (W.flags & BLOCKHEADHAIR))
update_hair(0) //rebuild hair
update_inv_ears(0)
success = 1
update_inv_head()
else if (W == l_ear)
@@ -133,6 +134,7 @@
success = 1
if((W.flags & BLOCKHAIR) || (W.flags & BLOCKHEADHAIR))
update_hair(0) //rebuild hair
update_inv_ears(0)
if(internal)
if(internals)
internals.icon_state = "internal0"
@@ -214,6 +216,7 @@
src.wear_mask = W
if((wear_mask.flags & BLOCKHAIR) || (wear_mask.flags & BLOCKHEADHAIR))
update_hair(redraw_mob) //rebuild hair
update_inv_ears(0)
W.equipped(src, slot)
update_inv_wear_mask(redraw_mob)
if(slot_handcuffed)
@@ -269,6 +272,7 @@
src.head = W
if((head.flags & BLOCKHAIR) || (head.flags & BLOCKHEADHAIR))
update_hair(redraw_mob) //rebuild hair
update_inv_ears(0)
if(istype(W,/obj/item/clothing/head/kitty))
W.update_icon(src)
W.equipped(src, slot)
+42 -40
View File
@@ -132,7 +132,7 @@
//Much like get_heat_protection(), this returns a 0 - 1 value, which corresponds to the percentage of protection based on what you're wearing and what you're exposed to.
/mob/living/carbon/human/proc/get_pressure_protection()
var/pressure_adjustment_coefficient = 1 //Determins how much the clothing you are wearing protects you in percent.
if(head && (head.flags & STOPSPRESSUREDMAGE))
pressure_adjustment_coefficient -= PRESSURE_HEAD_REDUCTION_COEFFICIENT
@@ -145,9 +145,9 @@
if(S.can_breach && S.damage)
var/pressure_loss = S.damage * 0.1
pressure_adjustment_coefficient += pressure_loss
pressure_adjustment_coefficient = min(1,max(pressure_adjustment_coefficient,0)) //So it isn't less than 0 or larger than 1.
return 1 - pressure_adjustment_coefficient //want 0 to be bad protection, 1 to be good protection
/mob/living/carbon/human/calculate_affecting_pressure(var/pressure)
@@ -261,9 +261,11 @@
if (radiation)
if (radiation > 100)
radiation = 100
Weaken(10)
src << "\red You feel weak."
emote("collapse")
if(!(species.flags & RAD_ABSORB))
Weaken(10)
if(!lying)
src << "\red You feel weak."
emote("collapse")
if (radiation < 0)
radiation = 0
@@ -296,8 +298,9 @@
if(prob(5))
radiation -= 5
Weaken(3)
src << "\red You feel weak."
emote("collapse")
if(!lying)
src << "\red You feel weak."
emote("collapse")
updatehealth()
if(75 to 100)
@@ -464,7 +467,7 @@
var/exhaling
var/poison
var/no_exhale
var/failed_inhale = 0
var/failed_exhale = 0
@@ -555,30 +558,30 @@
if (!co2_alert|| prob(15))
var/word = pick("extremely dizzy","short of breath","faint","confused")
src << "\red <b>You feel [word].</b>"
adjustOxyLoss(HUMAN_MAX_OXYLOSS)
co2_alert = 1
failed_exhale = 1
else if(exhaled_pp > safe_exhaled_max * 0.7)
if (!co2_alert || prob(1))
var/word = pick("dizzy","short of breath","faint","momentarily confused")
src << "\red You feel [word]."
//scale linearly from 0 to 1 between safe_exhaled_max and safe_exhaled_max*0.7
var/ratio = 1.0 - (safe_exhaled_max - exhaled_pp)/(safe_exhaled_max*0.3)
//give them some oxyloss, up to the limit - we don't want people falling unconcious due to CO2 alone until they're pretty close to safe_exhaled_max.
if (getOxyLoss() < 50*ratio)
adjustOxyLoss(HUMAN_MAX_OXYLOSS)
co2_alert = 1
failed_exhale = 1
else if(exhaled_pp > safe_exhaled_max * 0.6)
if (prob(0.3))
var/word = pick("a little dizzy","short of breath")
src << "\red You feel [word]."
else
co2_alert = 0
@@ -611,16 +614,16 @@
if(prob(20))
spawn(0) emote(pick("giggle", "laugh"))
SA.moles = 0
// Were we able to breathe?
if (failed_inhale || failed_exhale)
failed_last_breath = 1
else
failed_last_breath = 0
adjustOxyLoss(-5)
// Hot air hurts :(
if( (breath.temperature < species.cold_level_1 || breath.temperature > species.heat_level_1) && !(COLD_RESISTANCE in mutations))
if( (breath.temperature < species.cold_level_1 || breath.temperature > species.heat_level_1) && !(COLD_RESISTANCE in mutations))
if(status_flags & GODMODE)
return 1
@@ -651,17 +654,17 @@
if(species.heat_level_3 to INFINITY)
apply_damage(HEAT_GAS_DAMAGE_LEVEL_3, BURN, "head", used_weapon = "Excessive Heat")
fire_alert = max(fire_alert, 2)
//breathing in hot/cold air also heats/cools you a bit
var/temp_adj = breath.temperature - bodytemperature
if (temp_adj < 0)
temp_adj /= (BODYTEMP_COLD_DIVISOR * 5) //don't raise temperature as much as if we were directly exposed
else
temp_adj /= (BODYTEMP_HEAT_DIVISOR * 5) //don't raise temperature as much as if we were directly exposed
var/relative_density = breath.total_moles() / (MOLES_CELLSTANDARD * BREATH_PERCENTAGE)
temp_adj *= relative_density
if (temp_adj > BODYTEMP_HEATING_MAX) temp_adj = BODYTEMP_HEATING_MAX
if (temp_adj < BODYTEMP_COOLING_MAX) temp_adj = BODYTEMP_COOLING_MAX
//world << "Breath: [breath.temperature], [src]: [bodytemperature], Adjusting: [temp_adj]"
@@ -699,11 +702,11 @@
var/thermal_protection = get_heat_protection(loc_temp) //This returns a 0 - 1 value, which corresponds to the percentage of protection based on what you're wearing and what you're exposed to.
if(thermal_protection < 1)
temp_adj = (1-thermal_protection) * ((loc_temp - bodytemperature) / BODYTEMP_HEAT_DIVISOR)
//Use heat transfer as proportional to the gas density. However, we only care about the relative density vs standard 101 kPa/20 C air. Therefore we can use mole ratios
var/relative_density = environment.total_moles() / MOLES_CELLSTANDARD
temp_adj *= relative_density
if (temp_adj > BODYTEMP_HEATING_MAX) temp_adj = BODYTEMP_HEATING_MAX
if (temp_adj < BODYTEMP_COOLING_MAX) temp_adj = BODYTEMP_COOLING_MAX
//world << "Environment: [loc_temp], [src]: [bodytemperature], Adjusting: [temp_adj]"
@@ -783,17 +786,17 @@
temp_change = (temperature - current)
return temp_change
*/
proc/stabilize_body_temperature()
if (species.flags & IS_SYNTHETIC)
bodytemperature += species.synth_temp_gain //just keep putting out heat.
return
var/body_temperature_difference = species.body_temperature - bodytemperature
if (abs(body_temperature_difference) < 0.5)
return //fuck this precision
if(bodytemperature < species.cold_level_1) //260.15 is 310.15 - 50, the temperature where you start to feel effects.
if(nutrition >= 2) //If we are very, very cold we'll use up quite a bit of nutriment to heat us up.
nutrition -= 2
@@ -991,19 +994,18 @@
proc/handle_chemicals_in_body()
if(reagents && !(species.flags & IS_SYNTHETIC)) //Synths don't process reagents.
var/alien = 0 //Not the best way to handle it, but neater than checking this for every single reagent proc.
if(species && species.name == "Diona")
alien = 1
else if(species && species.name == "Vox")
alien = 2
var/alien = 0
if(species && species.reagent_tag)
alien = species.reagent_tag
reagents.metabolize(src,alien)
var/total_phoronloss = 0
for(var/obj/item/I in src)
if(I.contaminated)
total_phoronloss += vsc.plc.CONTAMINATION_LOSS
var/total_phoronloss = 0
for(var/obj/item/I in src)
if(I.contaminated)
total_phoronloss += vsc.plc.CONTAMINATION_LOSS
if(!(status_flags & GODMODE)) adjustToxLoss(total_phoronloss)
if(status_flags & GODMODE) return 0 //godmode
adjustToxLoss(total_phoronloss)
if(species.flags & REQUIRE_LIGHT)
var/light_amount = 0 //how much light there is in the place, affects receiving nutrition and healing
@@ -1473,7 +1475,7 @@
var/temp_step
if (bodytemperature >= species.body_temperature)
temp_step = (species.heat_level_1 - species.body_temperature)/4
if (bodytemperature >= species.heat_level_1)
bodytemp.icon_state = "temp4"
else if (bodytemperature >= species.body_temperature + temp_step*3)
@@ -1484,10 +1486,10 @@
bodytemp.icon_state = "temp1"
else
bodytemp.icon_state = "temp0"
else if (bodytemperature < species.body_temperature)
temp_step = (species.body_temperature - species.cold_level_1)/4
if (bodytemperature <= species.cold_level_1)
bodytemp.icon_state = "temp-4"
else if (bodytemperature <= species.body_temperature - temp_step*3)
+33 -32
View File
@@ -14,7 +14,9 @@
if(stat == 2)
return say_dead(message)
if (istype(wear_mask, /obj/item/clothing/mask/muzzle)) //Todo: Add this to speech_problem_flag checks.
var/message_mode = parse_message_mode(message, "headset")
if (istype(wear_mask, /obj/item/clothing/mask/muzzle) && message_mode != "changeling") //Todo: Add this to speech_problem_flag checks.
return
if(copytext(message,1,2) == "*")
@@ -22,22 +24,21 @@
if(name != GetVoice())
alt_name = "(as [get_id_name("Unknown")])"
//parse the radio code and consume it
var/message_mode = parse_message_mode(message, "headset")
if (message_mode)
if (message_mode == "headset")
message = copytext(message,2) //it would be really nice if the parse procs could do this for us.
else
message = copytext(message,3)
//parse the language code and consume it
var/datum/language/speaking = parse_language(message)
if (speaking)
verb = speaking.speech_verb
message = copytext(message,3)
message = capitalize(trim(message))
message = capitalize(trim(message))
if(speech_problem_flag)
var/list/handle_r = handle_speech_problems(message)
@@ -121,13 +122,13 @@
else if(r_ear && istype(r_ear,/obj/item/device/radio))
r_ear.talk_into(src,message, message_mode, verb, speaking)
used_radios += r_ear
var/sound/speech_sound
var/sound_vol
if((species.name == "Vox" || species.name == "Vox Armalis") && prob(20))
speech_sound = sound('sound/voice/shriek1.ogg')
sound_vol = 50
..(message, speaking, verb, alt_name, italics, message_range, used_radios, speech_sound, sound_vol) //ohgod we should really be passing a datum here.
/mob/living/carbon/human/say_understands(var/mob/other,var/datum/language/speaking = null)
@@ -146,7 +147,7 @@
return 1
if (istype(other, /mob/living/carbon/slime))
return 1
//This is already covered by mob/say_understands()
//if (istype(other, /mob/living/simple_animal))
// if((other.universal_speak && !speaking) || src.universal_speak || src.universal_understand)
@@ -180,29 +181,29 @@
/mob/living/carbon/human/proc/GetSpecialVoice()
return special_voice
/*
***Deprecated***
let this be handled at the hear_say or hear_radio proc
This is left in for robot speaking when humans gain binary channel access until I get around to rewriting
robot_talk() proc.
There is no language handling build into it however there is at the /mob level so we accept the call
for it but just ignore it.
*/
/mob/living/carbon/human/say_quote(var/message, var/datum/language/speaking = null)
var/verb = "says"
var/ending = copytext(message, length(message))
if(ending=="!")
verb=pick("exclaims","shouts","yells")
else if(ending=="?")
verb="asks"
return verb
/*
***Deprecated***
let this be handled at the hear_say or hear_radio proc
This is left in for robot speaking when humans gain binary channel access until I get around to rewriting
robot_talk() proc.
There is no language handling build into it however there is at the /mob level so we accept the call
for it but just ignore it.
*/
/mob/living/carbon/human/say_quote(var/message, var/datum/language/speaking = null)
var/verb = "says"
var/ending = copytext(message, length(message))
if(ending=="!")
verb=pick("exclaims","shouts","yells")
else if(ending=="?")
verb="asks"
return verb
/mob/living/carbon/human/proc/handle_speech_problems(var/message)
var/list/returns[3]
var/verb = "says"
@@ -113,13 +113,13 @@ Please contact me on #coderbus IRC. ~Carn x
#define ID_LAYER 6
#define SHOES_LAYER 7
#define GLOVES_LAYER 8
#define EARS_LAYER 9
#define SUIT_LAYER 10
#define GLASSES_LAYER 11
#define BELT_LAYER 12 //Possible make this an overlay of somethign required to wear a belt?
#define SUIT_STORE_LAYER 13
#define BACK_LAYER 14
#define HAIR_LAYER 15 //TODO: make part of head layer?
#define SUIT_LAYER 9
#define GLASSES_LAYER 10
#define BELT_LAYER 11 //Possible make this an overlay of somethign required to wear a belt?
#define SUIT_STORE_LAYER 12
#define BACK_LAYER 13
#define HAIR_LAYER 14 //TODO: make part of head layer?
#define EARS_LAYER 15
#define FACEMASK_LAYER 16
#define HEAD_LAYER 17
#define COLLAR_LAYER 18
@@ -639,6 +639,11 @@ proc/get_damage_icon_part(damage_state, body_part)
if(update_icons) update_icons()
/mob/living/carbon/human/update_inv_ears(var/update_icons=1)
overlays_standing[EARS_LAYER] = null
if( (head && (head.flags & (BLOCKHAIR | BLOCKHEADHAIR))) || (wear_mask && (wear_mask.flags & (BLOCKHAIR | BLOCKHEADHAIR))))
if(update_icons) update_icons()
return
if(l_ear || r_ear)
if(l_ear)
@@ -863,9 +868,6 @@ proc/get_damage_icon_part(damage_state, body_part)
if(r_hand.icon_override)
t_state = "[t_state]_r"
overlays_standing[R_HAND_LAYER] = image("icon" = r_hand.icon_override, "icon_state" = "[t_state]")
else if(r_hand.sprite_sheets && r_hand.sprite_sheets[species.name])
t_state = "[t_state]_r"
overlays_standing[R_HAND_LAYER] = image("icon" = r_hand.sprite_sheets[species.name], "icon_state" = "[t_state]")
else
overlays_standing[R_HAND_LAYER] = image("icon" = 'icons/mob/items_righthand.dmi', "icon_state" = "[t_state]")
@@ -884,9 +886,6 @@ proc/get_damage_icon_part(damage_state, body_part)
if(l_hand.icon_override)
t_state = "[t_state]_l"
overlays_standing[L_HAND_LAYER] = image("icon" = l_hand.icon_override, "icon_state" = "[t_state]")
else if(l_hand.sprite_sheets && l_hand.sprite_sheets[species.name])
t_state = "[t_state]_l"
overlays_standing[L_HAND_LAYER] = image("icon" = l_hand.sprite_sheets[species.name], "icon_state" = "[t_state]")
else
overlays_standing[L_HAND_LAYER] = image("icon" = 'icons/mob/items_lefthand.dmi', "icon_state" = "[t_state]")
@@ -139,8 +139,9 @@
if (radiation > 100)
radiation = 100
Weaken(10)
src << "\red You feel weak."
emote("collapse")
if(!lying)
src << "\red You feel weak."
emote("collapse")
switch(radiation)
if(1 to 49)
@@ -154,8 +155,9 @@
if(prob(5))
radiation -= 5
Weaken(3)
src << "\red You feel weak."
emote("collapse")
if(!lying)
src << "\red You feel weak."
emote("collapse")
if(75 to 100)
radiation -= 3
+15 -1
View File
@@ -31,6 +31,7 @@
var/body_temperature = 310.15 //non-IS_SYNTHETIC species will try to stabilize at this temperature. (also affects temperature processing)
var/synth_temp_gain = 0 //IS_SYNTHETIC species will gain this much temperature every second
var/reagent_tag //Used for metabolizing reagents.
var/darksight = 2
var/hazard_high_pressure = HAZARD_HIGH_PRESSURE // Dangerously high pressure.
@@ -47,6 +48,7 @@
var/blood_color = "#A10808" //Red.
var/flesh_color = "#FFC896" //Pink.
var/base_color //Used when setting species.
//Used in icon caching.
var/race_key = 0
@@ -137,6 +139,9 @@
flesh_color = "#34AF10"
reagent_tag = IS_UNATHI
base_color = "#066000"
/datum/species/tajaran
name = "Tajaran"
icobase = 'icons/mob/human_races/r_tajaran.dmi'
@@ -160,6 +165,7 @@
flags = IS_WHITELISTED | HAS_LIPS | HAS_UNDERWEAR | HAS_TAIL | HAS_SKIN_COLOR
flesh_color = "#AFA59E"
base_color = "#333333"
/datum/species/skrell
name = "Skrell"
@@ -173,6 +179,8 @@
flesh_color = "#8CD7A3"
reagent_tag = IS_SKRELL
/datum/species/vox
name = "Vox"
icobase = 'icons/mob/human_races/r_vox.dmi'
@@ -192,11 +200,13 @@
breath_type = "nitrogen"
poison_type = "oxygen"
flags = NO_SCAN | NO_BLOOD | IS_WHITELISTED
flags = NO_SCAN | IS_WHITELISTED
blood_color = "#2299FC"
flesh_color = "#808D11"
reagent_tag = IS_VOX
/datum/species/vox/handle_post_spawn(var/mob/living/carbon/human/H)
H.verbs += /mob/living/carbon/human/proc/leap
@@ -240,6 +250,8 @@
tail = "armalis_tail"
icon_template = 'icons/mob/human_races/r_armalis.dmi'
reagent_tag = IS_VOX
/datum/species/diona
name = "Diona"
icobase = 'icons/mob/human_races/r_diona.dmi'
@@ -266,6 +278,8 @@
blood_color = "#004400"
flesh_color = "#907E4A"
reagent_tag = IS_DIONA
/datum/species/diona/handle_post_spawn(var/mob/living/carbon/human/H)
H.gender = NEUTER
+6 -3
View File
@@ -59,7 +59,7 @@
if ((proj_sharp || proj_edge) && prob(getarmor(def_zone, P.flag)))
proj_sharp = 0
proj_edge = 0
if(!P.nodamage)
apply_damage(P.damage, P.damage_type, def_zone, absorb, 0, P, sharp=proj_sharp, edge=proj_edge)
P.on_hit(src, absorb, def_zone)
@@ -75,8 +75,9 @@
dtype = W.damtype
src.visible_message("\red [src] has been hit by [O].")
var/armor = run_armor_check(zone, "melee", "Your armor has protected your [zone].", "Your armor has softened hit to your [zone].")
if(armor < 2)
apply_damage(O.throwforce*(speed/5), dtype, zone, armor, O, sharp=is_sharp(O), edge=has_edge(O))
apply_damage(O.throwforce*(speed/5), dtype, zone, armor, is_sharp(O), has_edge(O), O)
if(!O.fingerprintslast)
return
@@ -92,7 +93,7 @@
// Begin BS12 momentum-transfer code.
if(speed >= 20)
if(speed >= 15)
var/obj/item/weapon/W = O
var/momentum = speed/2
var/dir = get_dir(M,src)
@@ -100,6 +101,8 @@
visible_message("\red [src] staggers under the impact!","\red You stagger under the impact!")
src.throw_at(get_edge_target_turf(src,dir),1,momentum)
if(!W || !src) return
if(istype(W.loc,/mob/living) && W.sharp) //Projectile is embedded and suitable for pinning.
if(!istype(src,/mob/living/carbon/human)) //Handles embedding for non-humans and simple_animals.
+4 -4
View File
@@ -103,7 +103,7 @@ var/list/ai_list = list()
add_language("Rootspeak", 0)
add_language("Tradeband", 1)
add_language("Gutter", 0)
if(!safety)//Only used by AIize() to successfully spawn an AI.
if (!B)//If there is no player/brain inside.
new/obj/structure/AIcore/deactivated(loc)//New empty terminal.
@@ -410,8 +410,8 @@ var/list/ai_list = list()
if(target && (!istype(target, /mob/living/carbon/human) || html_decode(href_list["trackname"]) == target:get_face_name()))
ai_actual_track(target)
src << "\red System error. Cannot locate [html_decode(href_list["trackname"])]."
else
src << "\red System error. Cannot locate [html_decode(href_list["trackname"])]."
return
else if (href_list["faketrack"])
@@ -612,7 +612,7 @@ var/list/ai_list = list()
if(usr.stat == 2)
usr <<"You cannot change your emotional status because you are dead!"
return
var/list/ai_emotions = list("Very Happy", "Happy", "Neutral", "Unsure", "Confused", "Sad", "BSOD", "Blank", "Problems?", "Awesome", "Facepalm", "Friend Computer")
var/list/ai_emotions = list("Very Happy", "Happy", "Neutral", "Unsure", "Confused", "Surprised", "Sad", "Upset", "Angry", "Awesome", "BSOD", "Blank", "Problems?", "Facepalm", "Friend Computer")
var/emote = input("Please, select a status!", "AI Status", null, null) in ai_emotions
for (var/obj/machinery/M in machines) //change status
if(istype(M, /obj/machinery/ai_status_display))
@@ -131,18 +131,6 @@
else if(M.stat == 2 && M.client.prefs.toggles & CHAT_GHOSTEARS)
if(M.client) M << "<b>[src]</b> transmits, \"[message]\""
//Sick of trying to get this to display properly without redefining it.
/mob/living/silicon/robot/drone/show_system_integrity()
if(!src.stat)
var/temphealth = health+35 //Brings it to 0.
if(temphealth<0) temphealth = 0
//Convert to percentage.
temphealth = (temphealth / (maxHealth*2)) * 100
stat(null, text("System integrity: [temphealth]%"))
else
stat(null, text("Systems nonfunctional"))
//Drones cannot be upgraded with borg modules so we need to catch some items before they get used in ..().
/mob/living/silicon/robot/drone/attackby(obj/item/weapon/W as obj, mob/user as mob)
@@ -326,7 +314,13 @@
src << "<b>If a crewmember has noticed you, <i>you are probably breaking your third law</i></b>."
/mob/living/silicon/robot/drone/Bump(atom/movable/AM as mob|obj, yes)
if (!yes || ( !istype(AM,/obj/machinery/door) && !istype(AM,/obj/machinery/recharge_station) && !istype(AM,/obj/machinery/disposal/deliveryChute) ) ) return
if (!yes || ( \
!istype(AM,/obj/machinery/door) && \
!istype(AM,/obj/machinery/recharge_station) && \
!istype(AM,/obj/machinery/disposal/deliveryChute && \
!istype(AM,/obj/machinery/teleport/hub) && \
!istype(AM,/obj/effect/portal)
))) return
..()
return
@@ -132,10 +132,6 @@
else
src.blinded = 1
if(!is_component_functioning("actuator"))
src.Paralyse(3)
return 1
/mob/living/silicon/robot/proc/handle_regular_hud_updates()
@@ -321,6 +317,6 @@
weaponlock_time = 120
/mob/living/silicon/robot/update_canmove()
if(paralysis || stunned || weakened || buckled || lockcharge) canmove = 0
if(paralysis || stunned || weakened || buckled || lockcharge || !is_component_functioning("actuator")) canmove = 0
else canmove = 1
return canmove
@@ -343,4 +343,13 @@
var/obj/item/device/lightreplacer/LR = locate() in src.modules
LR.Charge(R)
return
return
//checks whether this item is a module of the robot it is located in.
/obj/item/proc/is_robot_module()
if (!istype(src.loc, /mob/living/silicon/robot))
return 0
var/mob/living/silicon/robot/R = src.loc
return (src in R.module.modules)
+6 -7
View File
@@ -6,7 +6,7 @@
var/datum/ai_laws/laws = null//Now... THEY ALL CAN ALL HAVE LAWS
immune_to_ssd = 1
var/list/hud_list[9]
var/list/speech_synthesizer_langs = list() //which languages can be vocalized by the speech synthesizer
var/list/speech_synthesizer_langs = list() //which languages can be vocalized by the speech synthesizer
/mob/living/silicon/proc/show_laws()
return
@@ -80,7 +80,7 @@
// this function shows the health of the pAI in the Status panel
/mob/living/silicon/proc/show_system_integrity()
if(!src.stat)
stat(null, text("System integrity: [(src.health+100)/2]%"))
stat(null, text("System integrity: [round((health/maxHealth)*100)]%"))
else
stat(null, text("Systems nonfunctional"))
@@ -98,10 +98,9 @@
// this function displays the shuttles ETA in the status panel if the shuttle has been called
/mob/living/silicon/proc/show_emergency_shuttle_eta()
if(emergency_shuttle)
if(emergency_shuttle.has_eta() && !emergency_shuttle.returned())
var/timeleft = emergency_shuttle.estimate_arrival_time()
if (timeleft)
stat(null, "ETA-[(timeleft / 60) % 60]:[add_zero(num2text(timeleft % 60), 2)]")
var/eta_status = emergency_shuttle.get_status_panel_eta()
if(eta_status)
stat(null, eta_status)
// This adds the basic clock, shuttle recall timer, and malf_ai info to all silicon lifeforms
@@ -158,4 +157,4 @@
dat += "<b>[L.name] (:[L.key])</b><br/>Speech Synthesizer: <i>[(L in speech_synthesizer_langs)? "YES":"NOT SUPPORTED"]</i><br/>[L.desc]<br/><br/>"
src << browse(dat, "window=checklanguage")
return
return
@@ -146,10 +146,9 @@
statpanel("Status")
if(emergency_shuttle)
if(emergency_shuttle.has_eta() && !emergency_shuttle.returned())
var/timeleft = emergency_shuttle.estimate_arrival_time()
if (timeleft)
stat(null, "ETA-[(timeleft / 60) % 60]:[add_zero(num2text(timeleft % 60), 2)]")
var/eta_status = emergency_shuttle.get_status_panel_eta()
if(eta_status)
stat(null, eta_status)
if (client.statpanel == "Status")
stat("Chemicals", chemicals)
+2 -2
View File
@@ -755,7 +755,7 @@ note dizziness decrements automatically in the mob's Life() proc.
//Updates canmove, lying and icons. Could perhaps do with a rename but I can't think of anything to describe it.
/mob/proc/update_canmove()
if(buckled)
if(buckled && (!buckled.movable))
anchored = 1
canmove = 0
if( istype(buckled,/obj/structure/stool/bed/chair) )
@@ -778,7 +778,7 @@ note dizziness decrements automatically in the mob's Life() proc.
anchored = 1
canmove = 0
lying = 0
else
else if (!buckled)
lying = !can_stand
canmove = has_limbs
+2 -3
View File
@@ -199,8 +199,7 @@
if(!mob.canmove)
if (mob.buckled && (istype(mob.buckled, /obj/structure/stool/bed/chair/wheelchair) || istype(mob.buckled, /obj/vehicle))) // Exception for wheelchairs
else return
return
//if(istype(mob.loc, /turf/space) || (mob.flags & NOGRAV))
// if(!mob.Process_Spacemove(0)) return 0
@@ -264,7 +263,7 @@
var/mob/living/carbon/human/driver = mob.buckled
var/datum/organ/external/l_hand = driver.get_organ("l_hand")
var/datum/organ/external/r_hand = driver.get_organ("r_hand")
if((!l_hand || l_hand.status & ORGAN_DESTROYED) && (!r_hand || r_hand.status & ORGAN_DESTROYED))
if((!l_hand || (l_hand.status & ORGAN_DESTROYED)) && (!r_hand || (r_hand.status & ORGAN_DESTROYED)))
return // No hands to drive your chair? Tough luck!
move_delay += 2
return mob.buckled.relaymove(mob,direct)