Merge branch 'master' of https://github.com/ParadiseSS13/Paradise into HudRefactor

This commit is contained in:
Aurorablade
2015-12-10 06:47:43 -05:00
75 changed files with 1342 additions and 326 deletions
@@ -291,3 +291,30 @@ Des: Removes all infected images from the alien.
#undef HEAT_DAMAGE_LEVEL_1
#undef HEAT_DAMAGE_LEVEL_2
#undef HEAT_DAMAGE_LEVEL_3
/mob/living/carbon/alien/handle_footstep(turf/T)
if(..())
if(T.footstep_sounds["xeno"])
var/S = pick(T.footstep_sounds["xeno"])
if(S)
if(m_intent == "run")
if(!(step_count % 2)) //every other turf makes a sound
return 0
var/range = -(world.view - 2)
range -= 0.666 //-(7 - 2) = (-5) = -5 | -5 - (0.666) = -5.666 | (7 + -5.666) = 1.334 | 1.334 * 3 = 4.002 | range(4.002) = range(4)
var/volume = 5
if(m_intent == "walk")
return 0 //silent when walking
if(buckled || lying || throwing)
return 0 //people flying, lying down or sitting do not step
if(!has_gravity(src))
if(step_count % 3) //this basically says, every three moves make a noise
return 0 //1st - none, 1%3==1, 2nd - none, 2%3==2, 3rd - noise, 3%3==0
playsound(T, S, volume, 1, range)
return 1
return 0
@@ -95,4 +95,55 @@
if(!has_gravity(loc))
return
var/obj/item/clothing/shoes/S = shoes
S.step_action(src)
S.step_action(src)
/mob/living/carbon/human/handle_footstep(turf/T)
if(..())
if(T.footstep_sounds["human"])
var/S = pick(T.footstep_sounds["human"])
if(S)
if(m_intent == "run")
if(!(step_count % 2)) //every other turf makes a sound
return 0
var/range = -(world.view - 2)
if(m_intent == "walk")
range -= 0.333
if(!shoes)
range -= 0.333
//shoes + running
//-(7 - 2) = -(5) = -5 | -5 - 0 = -5 | (7 + -5) = 2 | 2 * 3 = 6 | range(6) = range(6)
//running OR shoes
//-(7 - 2) = (-5) = -5 | -5 - 0.333 = -5.333 | (7 + -5.333) = 1.667 | 1.667 * 3 = 5.001 | range(5.001) = range(5)
//walking AND no shoes
//-(7 - 2) = (-5) = -5 | -5 - (0.333 * 2) = -5.666 | (7 + -5.666) = 1.334 | 1.334 * 3 = 4.002 | range(4.002) = range(4)
var/volume = 13
if(m_intent == "walk")
volume -= 4
if(!shoes)
volume -= 4
if(istype(shoes, /obj/item/clothing/shoes))
var/obj/item/clothing/shoes/shooess = shoes
if(shooess.silence_steps)
return 0 //silent
if(!has_organ("l_foot") && !has_organ("r_foot"))
return 0 //no feet no footsteps
if(buckled || lying || throwing)
return 0 //people flying, lying down or sitting do not step
if(!has_gravity(src))
if(step_count % 3) //this basically says, every three moves make a noise
return 0 //1st - none, 1%3==1, 2nd - none, 2%3==2, 3rd - noise, 3%3==0
if(species.silent_steps)
return 0 //species is silent
playsound(T, S, volume, 1, range)
return 1
return 0
@@ -23,6 +23,7 @@
var/unarmed //For empty hand harm-intent attack
var/unarmed_type = /datum/unarmed_attack
var/slowdown = 0 // Passive movement speed malus (or boost, if negative)
var/silent_steps = 0 // Stops step noises
var/breath_type = "oxygen" // Non-oxygen gas breathed, if any.
var/poison_type = "plasma" // Poisonous air.
@@ -591,4 +592,4 @@
else
H.bodytemp.icon_state = "temp0"
return 1
return 1
+8
View File
@@ -481,10 +481,18 @@
if (s_active && !( s_active in contents ) && get_turf(s_active) != get_turf(src)) //check !( s_active in contents ) first so we hopefully don't have to call get_turf() so much.
s_active.close(src)
handle_footstep(loc)
step_count++
if(update_slimes)
for(var/mob/living/carbon/slime/M in view(1,src))
M.UpdateFeed(src)
/mob/living/proc/handle_footstep(turf/T)
if(istype(T))
return 1
return 0
/*//////////////////////
START RESIST PROCS
*///////////////////////
+2 -1
View File
@@ -51,4 +51,5 @@
var/list/icon/pipes_shown = list()
var/last_played_vent
var/list/datum/action/actions = list()
var/list/datum/action/actions = list()
var/step_count = 0
@@ -14,6 +14,7 @@
density = 0
req_access = list(access_engine, access_robotics)
local_transmit = 1
ventcrawler = 2
// We need to keep track of a few module items so we don't need to do list operations
// every time we need them. These get set in New() after the module is chosen.
@@ -211,12 +212,12 @@
//Drones killed by damage will gib.
/mob/living/silicon/robot/drone/handle_regular_status_updates()
if(health <= -35 && src.stat != 2)
if(health <= -35 && src.stat != DEAD)
timeofdeath = world.time
death() //Possibly redundant, having trouble making death() cooperate.
gib()
return
..()
return ..() // If you don't return anything here, you won't update status effects, like weakening
/mob/living/silicon/robot/drone/death(gibbed)
@@ -339,4 +340,4 @@
/mob/living/silicon/robot/drone/update_canmove()
. = ..()
density = 0 //this is reset every canmove update otherwise
density = 0 //this is reset every canmove update otherwise
@@ -5,9 +5,9 @@ datum/preferences
gender = gender_override
else
gender = pick(MALE, FEMALE)
underwear = random_underwear(gender)
undershirt = random_undershirt(gender)
socks = random_socks(gender)
underwear = random_underwear(gender, species)
undershirt = random_undershirt(gender, species)
socks = random_socks(gender, species)
if(species == "Human")
s_tone = random_skin_tone()
h_style = random_hair_style(gender, species)
@@ -804,7 +804,7 @@ datum/preferences
else if(backbag == 3 || backbag == 4)
clothes_s.Blend(new /icon('icons/mob/back.dmi', "satchel"), ICON_OVERLAY)
if(!current_species.bodyflags & NO_EYES)
if(!(current_species.bodyflags & NO_EYES))
preview_icon.Blend(eyes_s, ICON_OVERLAY)
if(underwear_s)
preview_icon.Blend(underwear_s, ICON_OVERLAY)
@@ -28,11 +28,11 @@
L[D.name] = D
switch(D.gender)
if(MALE) male += D.name
if(FEMALE) female += D.name
if(MALE) male[D.name] = D
if(FEMALE) female[D.name] = D
else
male += D.name
female += D.name
male[D.name] = D
female[D.name] = D
return L
/datum/sprite_accessory
@@ -1019,7 +1019,7 @@
/datum/sprite_accessory/underwear
icon = 'icons/mob/underwear.dmi'
species_allowed = list("Human","Unathi","Vox","Diona","Kidan","Grey","Plasmaman","Skellington")
species_allowed = list("Human","Unathi","Vox","Diona","Vulpkanin","Kidan","Grey","Plasmaman","Skellington")
nude
name = "Nude"
@@ -1092,7 +1092,7 @@
/datum/sprite_accessory/undershirt
icon = 'icons/mob/underwear.dmi'
species_allowed = list("Human","Unathi","Vox","Diona","Kidan","Grey","Plasmaman","Skellington")
species_allowed = list("Human","Unathi","Vox","Diona","Vulpkanin","Kidan","Grey","Plasmaman","Skellington")
/datum/sprite_accessory/undershirt/nude
name = "Nude"
@@ -1331,6 +1331,7 @@
///////////////////////
/datum/sprite_accessory/socks
icon = 'icons/mob/underwear.dmi'
species_allowed = list("Human","Unathi","Diona","Grey","Machine","Tajaran","Vulpkanin","Slime People","Skellington")
/datum/sprite_accessory/socks/nude
name = "Nude"
@@ -1343,111 +1344,95 @@
name = "Normal White"
icon_state = "white_norm"
gender = NEUTER
species_allowed = list("Human","Unathi","Diona","Grey","Machine","Tajaran","Vulpkanin","Slime People","Skellington")
/datum/sprite_accessory/socks/black_norm
name = "Normal Black"
icon_state = "black_norm"
gender = NEUTER
species_allowed = list("Human","Unathi","Diona","Grey","Machine","Tajaran","Vulpkanin","Slime People","Skellington")
/datum/sprite_accessory/socks/white_short
name = "Short White"
icon_state = "white_short"
gender = NEUTER
species_allowed = list("Human","Unathi","Diona","Grey","Machine","Tajaran","Vulpkanin","Slime People","Skellington")
/datum/sprite_accessory/socks/black_short
name = "Short Black"
icon_state = "black_short"
gender = NEUTER
species_allowed = list("Human","Unathi","Diona","Grey","Machine","Tajaran","Vulpkanin","Slime People","Skellington")
/datum/sprite_accessory/socks/white_knee
name = "Knee-high White"
icon_state = "white_knee"
gender = NEUTER
species_allowed = list("Human","Unathi","Diona","Grey","Machine","Tajaran","Vulpkanin","Slime People","Skellington")
/datum/sprite_accessory/socks/black_knee
name = "Knee-high Black"
icon_state = "black_knee"
gender = NEUTER
species_allowed = list("Human","Unathi","Diona","Grey","Machine","Tajaran","Vulpkanin","Slime People","Skellington")
/datum/sprite_accessory/socks/thin_knee
name = "Knee-high Thin"
icon_state = "thin_knee"
gender = FEMALE
species_allowed = list("Human","Unathi","Diona","Grey","Machine","Tajaran","Vulpkanin","Slime People","Skellington")
/datum/sprite_accessory/socks/striped_knee
name = "Knee-high Striped"
icon_state = "striped_knee"
gender = NEUTER
species_allowed = list("Human","Unathi","Diona","Grey","Machine","Tajaran","Vulpkanin","Slime People","Skellington")
/datum/sprite_accessory/socks/rainbow_knee
name = "Knee-high Rainbow"
icon_state = "rainbow_knee"
gender = NEUTER
species_allowed = list("Human","Unathi","Diona","Grey","Machine","Tajaran","Vulpkanin","Slime People","Skellington")
/datum/sprite_accessory/socks/white_thigh
name = "Thigh-high White"
icon_state = "white_thigh"
gender = NEUTER
species_allowed = list("Human","Unathi","Diona","Grey","Machine","Tajaran","Vulpkanin","Slime People","Skellington")
/datum/sprite_accessory/socks/black_thigh
name = "Thigh-high Black"
icon_state = "black_thigh"
gender = NEUTER
species_allowed = list("Human","Unathi","Diona","Grey","Machine","Tajaran","Vulpkanin","Slime People","Skellington")
/datum/sprite_accessory/socks/thin_thigh
name = "Thigh-high Thin"
icon_state = "thin_thigh"
gender = FEMALE
species_allowed = list("Human","Unathi","Diona","Grey","Machine","Tajaran","Vulpkanin","Slime People","Skellington")
/datum/sprite_accessory/socks/striped_thigh
name = "Thigh-high Striped"
icon_state = "striped_thigh"
gender = NEUTER
species_allowed = list("Human","Unathi","Diona","Grey","Machine","Tajaran","Vulpkanin","Slime People","Skellington")
/datum/sprite_accessory/socks/rainbow_thigh
name = "Thigh-high Rainbow"
icon_state = "rainbow_thigh"
gender = NEUTER
species_allowed = list("Human","Unathi","Diona","Grey","Machine","Tajaran","Vulpkanin","Slime People","Skellington")
/datum/sprite_accessory/socks/pantyhose
name = "Pantyhose"
icon_state = "pantyhose"
gender = FEMALE
species_allowed = list("Human","Unathi","Diona","Grey","Machine","Tajaran","Vulpkanin","Slime People","Skellington")
/datum/sprite_accessory/socks/black_fishnet
name = "Black Fishnet"
icon_state = "black_fishnet"
gender = NEUTER
species_allowed = list("Human","Unathi","Diona","Grey","Machine","Tajaran","Vulpkanin","Slime People","Skellington")
/datum/sprite_accessory/socks/vox_white
name = "Vox White"