Merge branch 'bleeding-edge-freeze' of https://github.com/Baystation12/Baystation12 into bleeding-edge-freeze

This commit is contained in:
MisterBook
2013-06-05 18:39:43 -05:00
62 changed files with 1111 additions and 815 deletions

View File

@@ -4,6 +4,7 @@
voice_name = "unknown"
icon = 'icons/mob/human.dmi'
icon_state = "body_m_s"
var/list/hud_list = list()
/mob/living/carbon/human/dummy
@@ -20,6 +21,9 @@
if(!dna)
dna = new /datum/dna(null)
for(var/i=0;i<7;i++) // 2 for medHUDs and 5 for secHUDs
hud_list += image('icons/mob/hud.dmi', src, "hudunknown")
..()
if(dna)
@@ -807,6 +811,8 @@
return "Tajaran"
if("skrell")
return "Skrell"
if("vox")
return "Vox"
if("plant")
return "Mobile vegetation"
if("golem")
@@ -822,6 +828,8 @@
return "Skrell"
else if(src.dna.mutantrace == "tajaran")
return "Tajaran"
else if(src.dna.mutantrace == "vox")
return "vox"
/mob/living/carbon/proc/update_mutantrace_languages()
if(src.dna)
@@ -831,6 +839,8 @@
src.skrell_talk_understand = 1
else if(src.dna.mutantrace == "tajaran")
src.tajaran_talk_understand = 1
else if(src.dna.mutantrace == "vox")
src.vox_talk_understand = 1
/mob/living/carbon/human/proc/play_xylophone()
if(!src.xylophone)
@@ -1101,4 +1111,4 @@
.=..()
if(istype(feet_blood_DNA, /list) && feet_blood_DNA.len)
del(feet_blood_DNA)
return 1
return 1

View File

@@ -392,6 +392,7 @@
var/SA_para_min = 1
var/SA_sleep_min = 5
var/oxygen_used = 0
var/nitrogen_used = 0
var/breath_pressure = (breath.total_moles()*R_IDEAL_GAS_EQUATION*breath.temperature)/BREATH_VOLUME
//Partial pressure of the O2 in our breath
@@ -401,8 +402,10 @@
// And CO2, lets say a PP of more than 10 will be bad (It's a little less really, but eh, being passed out all round aint no fun)
var/CO2_pp = (breath.carbon_dioxide/breath.total_moles())*breath_pressure // Tweaking to fit the hacky bullshit I've done with atmo -- TLE
//var/CO2_pp = (breath.carbon_dioxide/breath.total_moles())*0.5 // The default pressure value
// Nitrogen, for Vox.
var/Nitrogen_pp = (breath.nitrogen/breath.total_moles())*breath_pressure
if(O2_pp < safe_oxygen_min) // Too little oxygen
if(O2_pp < safe_oxygen_min && src.dna.mutantrace!="vox") // Too little oxygen
if(prob(20))
spawn(0) emote("gasp")
if(O2_pp > 0)
@@ -420,6 +423,19 @@
oxyloss += 5*ratio
oxygen_used = breath.oxygen*ratio/6
oxygen_alert = max(oxygen_alert, 1)*/
else if(Nitrogen_pp < safe_oxygen_min && src.dna.mutantrace=="vox") //Vox breathe nitrogen, not oxygen.
if(prob(20))
spawn(0) emote("gasp")
if(Nitrogen_pp > 0)
var/ratio = safe_oxygen_min/Nitrogen_pp
adjustOxyLoss(min(5*ratio, HUMAN_MAX_OXYLOSS))
failed_last_breath = 1
nitrogen_used = breath.nitrogen*ratio/6
else
adjustOxyLoss(HUMAN_MAX_OXYLOSS)
failed_last_breath = 1
oxygen_alert = max(oxygen_alert, 1)
else // We're in safe limits
failed_last_breath = 0
adjustOxyLoss(-5)
@@ -427,6 +443,7 @@
oxygen_alert = 0
breath.oxygen -= oxygen_used
breath.nitrogen -= nitrogen_used
breath.carbon_dioxide += oxygen_used
//CO2 does not affect failed_last_breath. So if there was enough oxygen in the air but too much co2, this will hurt you, but only once per 4 ticks, instead of once per tick.
@@ -1029,7 +1046,7 @@
for(var/image/hud in client.images)
if(copytext(hud.icon_state,1,4) == "hud") //ugly, but icon comparison is worse, I believe
del(hud)
client.images.Remove(hud)
client.screen.Remove(global_hud.blurry, global_hud.druggy, global_hud.vimpaired, global_hud.darkMask)

View File

@@ -313,6 +313,8 @@ proc/get_damage_icon_part(damage_state, body_part)
//Eyes
if(!skeleton)
var/icon/eyes_s = new/icon('icons/mob/human_face.dmi', "eyes_s")
if(src.get_species()=="Vox")
eyes_s = new/icon('icons/mob/human_face.dmi', "vox_eyes_s")
eyes_s.Blend(rgb(r_eyes, g_eyes, b_eyes), ICON_ADD)
stand_icon.Blend(eyes_s, ICON_OVERLAY)
@@ -442,6 +444,9 @@ proc/get_damage_icon_part(damage_state, body_part)
if("skrell")
race_icon = 'icons/mob/human_races/r_skrell.dmi'
deform_icon = 'icons/mob/human_races/r_def_skrell.dmi'
if("vox")
race_icon = 'icons/mob/human_races/r_vox.dmi'
deform_icon = 'icons/mob/human_races/r_def_vox.dmi'
else
race_icon = 'icons/mob/human_races/r_human.dmi'
deform_icon = 'icons/mob/human_races/r_def_human.dmi'

View File

@@ -18,6 +18,7 @@ var/list/department_radio_keys = list(
":k" = "skrell", "#k" = "skrell", ".k" = "skrell",
":j" = "tajaran", "#j" = "tajaran", ".j" = "tajaran",
":o" = "soghun", "#o" = "soghun", ".o" = "soghun",
":v" = "vox", "#v" = "vox", ".v" = "vox",
":R" = "right hand", "#R" = "right hand", ".R" = "right hand",
":L" = "left hand", "#L" = "left hand", ".L" = "left hand",
@@ -37,6 +38,7 @@ var/list/department_radio_keys = list(
":K" = "skrell", "#K" = "skrell", ".K" = "skrell",
":J" = "tajaran", "#J" = "tajaran", ".J" = "tajaran",
":O" = "soghun", "#O" = "soghun", ".O" = "soghun",
":V" = "vox", "#V" = "vox", ".V" = "vox",
//kinda localization -- rastaf0
//same keys as above, but on russian keyboard layout. This file uses cp1251 as encoding.
@@ -185,6 +187,7 @@ var/list/department_radio_keys = list(
var/is_speaking_skrell = 0
var/is_speaking_soghun = 0
var/is_speaking_taj = 0
var/is_speaking_vox = 0
var/is_speaking_radio = 0
switch (message_mode)
@@ -283,6 +286,10 @@ var/list/department_radio_keys = list(
if(skrell_talk_understand || universal_speak)
is_speaking_skrell = 1
if ("vox")
if(vox_talk_understand || universal_speak)
is_speaking_vox = 1
if("changeling")
if(mind && mind.changeling)
for(var/mob/Changeling in mob_list)
@@ -370,7 +377,7 @@ var/list/department_radio_keys = list(
for (var/M in listening)
if(hascall(M,"say_understands"))
if (M:say_understands(src) && !is_speaking_skrell && !is_speaking_soghun && !is_speaking_taj)
if (M:say_understands(src) && !is_speaking_skrell && !is_speaking_soghun && !is_speaking_vox && !is_speaking_taj)
heard_a += M
else if(ismob(M))
if(is_speaking_skrell && (M:skrell_talk_understand || M:universal_speak))
@@ -379,6 +386,8 @@ var/list/department_radio_keys = list(
heard_a += M
else if(is_speaking_taj && (M:tajaran_talk_understand || M:universal_speak))
heard_a += M
else if(is_speaking_vox && (M:vox_talk_understand || M:universal_speak))
heard_a += M
else
heard_b += M
else
@@ -394,7 +403,7 @@ var/list/department_radio_keys = list(
var/rendered = null
if (length(heard_a))
var/message_a = say_quote(message,is_speaking_soghun,is_speaking_skrell,is_speaking_taj)
var/message_a = say_quote(message,is_speaking_soghun,is_speaking_skrell,is_speaking_taj,is_speaking_vox)
if (italics)
message_a = "<i>[message_a]</i>"
@@ -419,7 +428,7 @@ var/list/department_radio_keys = list(
message_b = voice_message
else
message_b = stars(message)
message_b = say_quote(message_b,is_speaking_soghun,is_speaking_skrell,is_speaking_taj)
message_b = say_quote(message_b,is_speaking_soghun,is_speaking_skrell,is_speaking_taj,is_speaking_vox)
if (italics)
message_b = "<i>[message_b]</i>"

View File

@@ -2,36 +2,53 @@
if(client)
for(var/image/hud in client.images)
if(copytext(hud.icon_state,1,4) == "hud")
del(hud)
client.images -= hud
/mob/living/silicon/pai/proc/securityHUD()
if(client)
var/icon/tempHud = 'icons/mob/hud.dmi'
var/image/holder
var/turf/T = get_turf_or_move(src.loc)
for(var/mob/living/carbon/human/perp in view(T))
var/perpname = "wot"
holder = perp.hud_list[ID_HUD]
if(perp.wear_id)
client.images += image(tempHud,perp,"hud[ckey(perp:wear_id:GetJobRealName())]")
var/perpname = "wot"
if(istype(perp.wear_id,/obj/item/weapon/card/id))
perpname = perp.wear_id:registered_name
else if(istype(perp.wear_id,/obj/item/device/pda))
var/obj/item/device/pda/tempPda = perp.wear_id
perpname = tempPda.owner
for (var/datum/data/record/E in data_core.general)
if (E.fields["name"] == perpname)
for (var/datum/data/record/R in data_core.security)
if ((R.fields["id"] == E.fields["id"]) && (R.fields["criminal"] == "*Arrest*"))
client.images += image(tempHud,perp,"hudwanted")
break
else if((R.fields["id"] == E.fields["id"]) && (R.fields["criminal"] == "Incarcerated"))
client.images += image(tempHud,perp,"hudprisoner")
break
var/obj/item/weapon/card/id/I = perp.wear_id.GetID()
if(I)
perpname = I.registered_name
holder.icon_state = "hud[ckey(perp:wear_id:GetJobName())]"
client.images += holder
else
perpname = perp.name
holder.icon_state = "hudunknown"
client.images += holder
else
client.images += image(tempHud,perp,"hudunknown")
holder.icon_state = "hudunknown"
client.images += holder
for(var/datum/data/record/E in data_core.general)
if(E.fields["name"] == perpname)
holder = perp.hud_list[WANTED_HUD]
for(var/datum/data/record/R in data_core.security)
if((R.fields["id"] == E.fields["id"]) && (R.fields["criminal"] == "*Arrest*"))
holder.icon_state = "hudwanted"
client.images += holder
break
else if((R.fields["id"] == E.fields["id"]) && (R.fields["criminal"] == "Incarcerated"))
holder.icon_state = "hudprisoner"
client.images += holder
break
else if((R.fields["id"] == E.fields["id"]) && (R.fields["criminal"] == "Parolled"))
holder.icon_state = "hudparolled"
client.images += holder
break
else if((R.fields["id"] == E.fields["id"]) && (R.fields["criminal"] == "Released"))
holder.icon_state = "hudreleased"
client.images += holder
break
/mob/living/silicon/pai/proc/medicalHUD()
if(client)
var/icon/tempHud = 'icons/mob/hud.dmi'
var/image/holder
var/turf/T = get_turf_or_move(src.loc)
for(var/mob/living/carbon/human/patient in view(T))
@@ -40,15 +57,24 @@
if(!D.hidden[SCANNER])
foundVirus = 1
client.images += image(tempHud,patient,"hud[RoundHealth(patient.health)]")
holder = patient.hud_list[HEALTH_HUD]
if(patient.stat == 2)
client.images += image(tempHud,patient,"huddead")
else if(patient.status_flags & XENO_HOST)
client.images += image(tempHud,patient,"hudxeno")
else if(foundVirus)
client.images += image(tempHud,patient,"hudill")
holder.icon_state = "hudhealth-100"
client.images += holder
else
client.images += image(tempHud,patient,"hudhealthy")
holder.icon_state = "hud[RoundHealth(patient.health)]"
client.images += holder
holder = patient.hud_list[STATUS_HUD]
if(patient.stat == 2)
holder.icon_state = "huddead"
else if(patient.status_flags & XENO_HOST)
holder.icon_state = "hudxeno"
else if(foundVirus)
holder.icon_state = "hudill"
else
holder.icon_state = "hudhealthy"
client.images += holder
/mob/living/silicon/pai/proc/RoundHealth(health)
switch(health)

View File

@@ -160,7 +160,7 @@
for(var/image/hud in client.images) //COPIED FROM the human handle_regular_hud_updates() proc
if(copytext(hud.icon_state,1,4) == "hud") //ugly, but icon comparison is worse, I believe
del(hud)
client.images.Remove(hud)
var/obj/item/borg/sight/hud/hud = (locate(/obj/item/borg/sight/hud) in src)
if(hud && hud.hud) hud.hud.process_hud(src)

View File

@@ -61,7 +61,7 @@
stop_automated_movement = 1
stance_step++
if(stance_step >= 10) //rests for 10 ticks
if(target_mob && target_mob in ListTargets())
if(target_mob && target_mob in ListTargets(10))
stance = HOSTILE_STANCE_ATTACK //If the mob he was chasing is still nearby, resume the attack, otherwise go idle.
else
stance = HOSTILE_STANCE_IDLE
@@ -69,7 +69,7 @@
if(HOSTILE_STANCE_ALERT)
stop_automated_movement = 1
var/found_mob = 0
if(target_mob && target_mob in ListTargets())
if(target_mob && target_mob in ListTargets(10))
if(!(SA_attackable(target_mob)))
stance_step = max(0, stance_step) //If we have not seen a mob in a while, the stance_step will be negative, we need to reset it to 0 as soon as we see a mob again.
stance_step++

View File

@@ -100,7 +100,7 @@
..()
if(!stat)
if(stance == HOSTILE_STANCE_IDLE)
var/list/can_see = ListTargets()
var/list/can_see = view(src, 10)
//30% chance to stop wandering and do something
if(!busy && prob(30))
//first, check for potential food nearby to cocoon

View File

@@ -18,7 +18,7 @@
var/atom/T = null
stop_automated_movement = 0
for(var/atom/A in ListTargets())
for(var/atom/A in ListTargets(10))
if(A == src)
continue
@@ -40,7 +40,7 @@
T = L
break
if(istype(A, /obj/mecha))
else if(istype(A, /obj/mecha)) // Our line of sight stuff was already done in ListTargets().
var/obj/mecha/M = A
if (M.occupant)
stance = HOSTILE_STANCE_ATTACK
@@ -63,7 +63,7 @@
stop_automated_movement = 1
if(!target_mob || SA_attackable(target_mob))
stance = HOSTILE_STANCE_IDLE
if(target_mob in ListTargets())
if(target_mob in ListTargets(10))
if(ranged)
if(get_dist(src, target_mob) <= 6)
OpenFire(target_mob)
@@ -79,7 +79,7 @@
if(!target_mob || SA_attackable(target_mob))
LoseTarget()
return 0
if(!(target_mob in ListTargets()))
if(!(target_mob in ListTargets(10)))
LostTarget()
return 0
if(get_dist(src, target_mob) <= 1) //Attacking
@@ -109,8 +109,10 @@
walk(src, 0)
/mob/living/simple_animal/hostile/proc/ListTargets()
return view(src, 10)
/mob/living/simple_animal/hostile/proc/ListTargets(var/dist = 7)
var/list/L = hearers(src, dist)
L += mechas_list
return L
/mob/living/simple_animal/hostile/Die()
..()

View File

@@ -77,7 +77,7 @@
/mob/living/simple_animal/hostile/mimic/crate/ListTargets()
if(attempt_open)
return view(src, 10)
return ..()
return view(src, 1)
/mob/living/simple_animal/hostile/mimic/crate/FindTarget()
@@ -149,7 +149,8 @@ var/global/list/protected_objects = list(/obj/structure/table, /obj/structure/ca
/mob/living/simple_animal/hostile/mimic/copy/ListTargets()
// Return a list of targets that isn't the creator
return view(src, 7) - creator
. = ..()
return . - creator
/mob/living/simple_animal/hostile/mimic/copy/proc/CopyObject(var/obj/O, var/mob/living/creator)

View File

@@ -211,6 +211,7 @@
var/tajaran_talk_understand = 0
var/soghun_talk_understand = 0
var/skrell_talk_understand = 0
var/vox_talk_understand = 0
var/has_limbs = 1 //Whether this mob have any limbs he can move with
var/can_stand = 1 //Whether this mob have ability to stand

View File

@@ -349,6 +349,10 @@
if(is_alien_whitelisted(src, "Skrell"|| !config.usealienwhitelist))
new_character.dna.mutantrace = "skrell"
new_character.skrell_talk_understand = 1
if(client.prefs.species == "Vox")
if(is_alien_whitelisted(src, "Vox"|| !config.usealienwhitelist))
new_character.dna.mutantrace = "vox"
new_character.vox_talk_understand = 1
if(ticker.random_players)
new_character.gender = pick(MALE, FEMALE)

View File

@@ -144,6 +144,8 @@ datum/preferences
icobase = 'icons/mob/human_races/r_lizard.dmi'
if("Skrell")
icobase = 'icons/mob/human_races/r_skrell.dmi'
if("Vox")
icobase = 'icons/mob/human_races/r_vox.dmi'
else
icobase = 'icons/mob/human_races/r_human.dmi'
preview_icon = new /icon(icobase, "torso_[g]")
@@ -172,6 +174,9 @@ datum/preferences
preview_icon.Blend(rgb(-s_tone, -s_tone, -s_tone), ICON_SUBTRACT)
var/icon/eyes_s = new/icon("icon" = 'icons/mob/human_face.dmi', "icon_state" = "eyes_s")
if(species=="Vox")
eyes_s = new/icon("icon" = 'icons/mob/human_face.dmi', "icon_state" = "vox_eyes_s")
eyes_s.Blend(rgb(r_eyes, g_eyes, b_eyes), ICON_ADD)
var/datum/sprite_accessory/hair_style = hair_styles_list[h_style]

View File

@@ -306,7 +306,7 @@
name = "Shaved"
icon_state = "bald"
gender = NEUTER
species_allowed = list("Human","Unathi","Tajaran","Skrell")
species_allowed = list("Human","Unathi","Tajaran","Skrell","Vox")
watson
name = "Watson Mustache"
@@ -493,6 +493,11 @@
icon_state = "hair_messy"
species_allowed = list("Tajaran")
vox_quills_short
name = "Short Vox Quills"
icon_state = "vox_shortquills"
species_allowed = list("Vox")
/datum/sprite_accessory/facial_hair
taj_sideburns

View File

@@ -69,7 +69,7 @@
return 1
return 0
/mob/proc/say_quote(var/text,var/is_speaking_soghun,var/is_speaking_skrell,var/is_speaking_tajaran)
/mob/proc/say_quote(var/text,var/is_speaking_soghun,var/is_speaking_skrell,var/is_speaking_tajaran,var/is_speaking_vox)
if(!text)
return "says, \"...\""; //not the best solution, but it will stop a large number of runtimes. The cause is somewhere in the Tcomms code
//tcomms code is still runtiming somewhere here
@@ -80,6 +80,8 @@
return "<span class='say_quote'>warbles</span>, \"<span class='skrell'>[text]</span>\"";
if (is_speaking_tajaran)
return "<span class='say_quote'>mrowls</span>, \"<span class='tajaran'>[text]</span>\"";
if (is_speaking_vox)
return "<span class='say_quote'>chirps</span>, \"<span class='vox'>[text]</span>\"";
//Needs Virus2
// if (src.disease_symptoms & DISEASE_HOARSE)
// return "rasps, \"[text]\"";