Merge pull request #4471 from Firecage/mobabsolutes

Absolute paths for files in the mob folder
This commit is contained in:
Alex
2014-08-17 13:45:38 +01:00
12 changed files with 4233 additions and 4240 deletions
@@ -68,404 +68,403 @@
handle_regular_hud_updates()
/mob/living/carbon/alien/humanoid
proc/handle_disabilities()
if (disabilities & EPILEPSY)
if ((prob(1) && paralysis < 10))
src << "\red You have a seizure!"
Paralyse(10)
if (disabilities & COUGHING)
if ((prob(5) && paralysis <= 1))
drop_item()
spawn( 0 )
emote("cough")
return
if (disabilities & TOURETTES)
if ((prob(10) && paralysis <= 1))
Stun(10)
spawn( 0 )
emote("twitch")
return
if (disabilities & NERVOUS)
if (prob(10))
stuttering = max(10, stuttering)
/mob/living/carbon/alien/humanoid/proc/handle_disabilities()
if (disabilities & EPILEPSY)
if ((prob(1) && paralysis < 10))
src << "\red You have a seizure!"
Paralyse(10)
if (disabilities & COUGHING)
if ((prob(5) && paralysis <= 1))
drop_item()
spawn( 0 )
emote("cough")
return
if (disabilities & TOURETTES)
if ((prob(10) && paralysis <= 1))
Stun(10)
spawn( 0 )
emote("twitch")
return
if (disabilities & NERVOUS)
if (prob(10))
stuttering = max(10, stuttering)
proc/breathe()
if(reagents)
if(reagents.has_reagent("lexorin")) return
if(istype(loc, /obj/machinery/atmospherics/unary/cryo_cell)) return
/mob/living/carbon/alien/humanoid/proc/breathe()
if(reagents)
if(reagents.has_reagent("lexorin")) return
if(istype(loc, /obj/machinery/atmospherics/unary/cryo_cell)) return
var/datum/gas_mixture/environment = loc.return_air()
var/datum/gas_mixture/breath
// HACK NEED CHANGING LATER
if(health <= config.health_threshold_crit)
losebreath++
var/datum/gas_mixture/environment = loc.return_air()
var/datum/gas_mixture/breath
// HACK NEED CHANGING LATER
if(health <= config.health_threshold_crit)
losebreath++
if(losebreath>0) //Suffocating so do not take a breath
losebreath--
if (prob(75)) //High chance of gasping for air
spawn emote("gasp")
if(losebreath>0) //Suffocating so do not take a breath
losebreath--
if (prob(75)) //High chance of gasping for air
spawn emote("gasp")
if(istype(loc, /obj/))
var/obj/location_as_object = loc
location_as_object.handle_internal_lifeform(src, 0)
else
//First, check for air from internal atmosphere (using an air tank and mask generally)
breath = get_breath_from_internal(BREATH_VOLUME)
//No breath from internal atmosphere so get breath from location
if(!breath)
if(istype(loc, /obj/))
var/obj/location_as_object = loc
breath = location_as_object.handle_internal_lifeform(src, BREATH_VOLUME)
else if(istype(loc, /turf/))
var/breath_moles = 0
/*if(environment.return_pressure() > ONE_ATMOSPHERE)
// Loads of air around (pressure effect will be handled elsewhere), so lets just take a enough to fill our lungs at normal atmos pressure (using n = Pv/RT)
breath_moles = (ONE_ATMOSPHERE*BREATH_VOLUME/R_IDEAL_GAS_EQUATION*environment.temperature)
else*/
// Not enough air around, take a percentage of what's there to model this properly
breath_moles = environment.total_moles()*BREATH_PERCENTAGE
breath = loc.remove_air(breath_moles)
// Handle chem smoke effect -- Doohl
for(var/obj/effect/effect/chem_smoke/smoke in view(1, src))
if(smoke.reagents.total_volume)
smoke.reagents.reaction(src, INGEST)
spawn(5)
if(smoke)
smoke.reagents.copy_to(src, 10) // I dunno, maybe the reagents enter the blood stream through the lungs?
break // If they breathe in the nasty stuff once, no need to continue checking
else //Still give containing object the chance to interact
if(istype(loc, /obj/))
var/obj/location_as_object = loc
location_as_object.handle_internal_lifeform(src, 0)
else
//First, check for air from internal atmosphere (using an air tank and mask generally)
breath = get_breath_from_internal(BREATH_VOLUME)
//No breath from internal atmosphere so get breath from location
if(!breath)
if(istype(loc, /obj/))
var/obj/location_as_object = loc
breath = location_as_object.handle_internal_lifeform(src, BREATH_VOLUME)
else if(istype(loc, /turf/))
var/breath_moles = 0
/*if(environment.return_pressure() > ONE_ATMOSPHERE)
// Loads of air around (pressure effect will be handled elsewhere), so lets just take a enough to fill our lungs at normal atmos pressure (using n = Pv/RT)
breath_moles = (ONE_ATMOSPHERE*BREATH_VOLUME/R_IDEAL_GAS_EQUATION*environment.temperature)
else*/
// Not enough air around, take a percentage of what's there to model this properly
breath_moles = environment.total_moles()*BREATH_PERCENTAGE
handle_breath(breath)
breath = loc.remove_air(breath_moles)
// Handle chem smoke effect -- Doohl
for(var/obj/effect/effect/chem_smoke/smoke in view(1, src))
if(smoke.reagents.total_volume)
smoke.reagents.reaction(src, INGEST)
spawn(5)
if(smoke)
smoke.reagents.copy_to(src, 10) // I dunno, maybe the reagents enter the blood stream through the lungs?
break // If they breathe in the nasty stuff once, no need to continue checking
if(breath)
loc.assume_air(breath)
else //Still give containing object the chance to interact
if(istype(loc, /obj/))
var/obj/location_as_object = loc
location_as_object.handle_internal_lifeform(src, 0)
handle_breath(breath)
if(breath)
loc.assume_air(breath)
proc/get_breath_from_internal(volume_needed)
/mob/living/carbon/alien/humanoid/proc/get_breath_from_internal(volume_needed)
if(internal)
if (!contents.Find(internal))
internal = null
if (!wear_mask || !(wear_mask.flags & MASKINTERNALS) )
internal = null
if(internal)
if (!contents.Find(internal))
internal = null
if (!wear_mask || !(wear_mask.flags & MASKINTERNALS) )
internal = null
if(internal)
if (internals)
internals.icon_state = "internal1"
return internal.remove_air_volume(volume_needed)
else
if (internals)
internals.icon_state = "internal0"
return null
proc/handle_breath(datum/gas_mixture/breath)
if(status_flags & GODMODE)
return
if(!breath || (breath.total_moles() == 0))
//Aliens breathe in vaccuum
return 0
var/toxins_used = 0
var/breath_pressure = (breath.total_moles()*R_IDEAL_GAS_EQUATION*breath.temperature)/BREATH_VOLUME
//Partial pressure of the toxins in our breath
var/Toxins_pp = (breath.toxins/breath.total_moles())*breath_pressure
if(Toxins_pp) // Detect toxins in air
adjustToxLoss(breath.toxins*250)
toxins_alert = max(toxins_alert, 1)
toxins_used = breath.toxins
if (internals)
internals.icon_state = "internal1"
return internal.remove_air_volume(volume_needed)
else
toxins_alert = 0
if (internals)
internals.icon_state = "internal0"
return null
//Breathe in toxins and out oxygen
breath.toxins -= toxins_used
breath.oxygen += toxins_used
/mob/living/carbon/alien/humanoid/proc/handle_breath(datum/gas_mixture/breath)
if(status_flags & GODMODE)
return
if(breath.temperature > (T0C+66) && !(COLD_RESISTANCE in mutations)) // Hot air hurts :(
if(prob(20))
src << "<span class='danger'>You feel a searing heat in your lungs!>/span>"
fire_alert = max(fire_alert, 1)
else
fire_alert = 0
if(!breath || (breath.total_moles() == 0))
//Aliens breathe in vaccuum
return 0
//Temporary fixes to the alerts.
var/toxins_used = 0
var/breath_pressure = (breath.total_moles()*R_IDEAL_GAS_EQUATION*breath.temperature)/BREATH_VOLUME
return 1
//Partial pressure of the toxins in our breath
var/Toxins_pp = (breath.toxins/breath.total_moles())*breath_pressure
if(Toxins_pp) // Detect toxins in air
adjustToxLoss(breath.toxins*250)
toxins_alert = max(toxins_alert, 1)
toxins_used = breath.toxins
else
toxins_alert = 0
//Breathe in toxins and out oxygen
breath.toxins -= toxins_used
breath.oxygen += toxins_used
if(breath.temperature > (T0C+66) && !(COLD_RESISTANCE in mutations)) // Hot air hurts :(
if(prob(20))
src << "<span class='danger'>You feel a searing heat in your lungs!>/span>"
fire_alert = max(fire_alert, 1)
else
fire_alert = 0
//Temporary fixes to the alerts.
return 1
proc/adjust_body_temperature(current, loc_temp, boost)
var/temperature = current
var/difference = abs(current-loc_temp) //get difference
var/increments// = difference/10 //find how many increments apart they are
if(difference > 50)
increments = difference/5
else
increments = difference/10
var/change = increments*boost // Get the amount to change by (x per increment)
var/temp_change
if(current < loc_temp)
temperature = min(loc_temp, temperature+change)
else if(current > loc_temp)
temperature = max(loc_temp, temperature-change)
temp_change = (temperature - current)
return temp_change
/mob/living/carbon/alien/humanoid/proc/adjust_body_temperature(current, loc_temp, boost)
var/temperature = current
var/difference = abs(current-loc_temp) //get difference
var/increments// = difference/10 //find how many increments apart they are
if(difference > 50)
increments = difference/5
else
increments = difference/10
var/change = increments*boost // Get the amount to change by (x per increment)
var/temp_change
if(current < loc_temp)
temperature = min(loc_temp, temperature+change)
else if(current > loc_temp)
temperature = max(loc_temp, temperature-change)
temp_change = (temperature - current)
return temp_change
/*
proc/get_thermal_protection()
var/thermal_protection = 1.0
//Handle normal clothing
if(head && (head.body_parts_covered & HEAD))
thermal_protection += 0.5
if(wear_suit && (wear_suit.body_parts_covered & CHEST))
thermal_protection += 0.5
if(wear_suit && (wear_suit.body_parts_covered & LEGS))
thermal_protection += 0.2
if(wear_suit && (wear_suit.body_parts_covered & ARMS))
thermal_protection += 0.2
if(wear_suit && (wear_suit.body_parts_covered & HANDS))
thermal_protection += 0.2
if(wear_suit && (wear_suit.flags & SUITSPACE))
thermal_protection += 3
if(COLD_RESISTANCE in mutations)
thermal_protection += 5
/mob/living/carbon/alien/humanoid/proc/get_thermal_protection()
var/thermal_protection = 1.0
//Handle normal clothing
if(head && (head.body_parts_covered & HEAD))
thermal_protection += 0.5
if(wear_suit && (wear_suit.body_parts_covered & CHEST))
thermal_protection += 0.5
if(wear_suit && (wear_suit.body_parts_covered & LEGS))
thermal_protection += 0.2
if(wear_suit && (wear_suit.body_parts_covered & ARMS))
thermal_protection += 0.2
if(wear_suit && (wear_suit.body_parts_covered & HANDS))
thermal_protection += 0.2
if(wear_suit && (wear_suit.flags & SUITSPACE))
thermal_protection += 3
if(COLD_RESISTANCE in mutations)
thermal_protection += 5
return thermal_protection
return thermal_protection
proc/add_fire_protection(var/temp)
var/fire_prot = 0
if(head)
if(head.protective_temperature > temp)
fire_prot += (head.protective_temperature/10)
if(wear_mask)
if(wear_mask.protective_temperature > temp)
fire_prot += (wear_mask.protective_temperature/10)
if(wear_suit)
if(wear_suit.protective_temperature > temp)
fire_prot += (wear_suit.protective_temperature/10)
/mob/living/carbon/alien/humanoid/proc/add_fire_protection(var/temp)
var/fire_prot = 0
if(head)
if(head.protective_temperature > temp)
fire_prot += (head.protective_temperature/10)
if(wear_mask)
if(wear_mask.protective_temperature > temp)
fire_prot += (wear_mask.protective_temperature/10)
if(wear_suit)
if(wear_suit.protective_temperature > temp)
fire_prot += (wear_suit.protective_temperature/10)
return fire_prot
*/
return fire_prot
*/
proc/handle_chemicals_in_body()
/mob/living/carbon/alien/humanoid/proc/handle_chemicals_in_body()
if(reagents) reagents.metabolize(src)
if(reagents) reagents.metabolize(src)
if(FAT in mutations)
if(nutrition < 100)
if(prob(round((50 - nutrition) / 100)))
src << "<span class='info'>You feel fit again!</span>"
mutations.Remove(FAT)
else
if(nutrition > 500)
if(prob(5 + round((nutrition - 200) / 2)))
src << "<span class='danger'>You suddenly feel blubbery!</span>"
mutations.Add(FAT)
if(FAT in mutations)
if(nutrition < 100)
if(prob(round((50 - nutrition) / 100)))
src << "<span class='info'>You feel fit again!</span>"
mutations.Remove(FAT)
else
if(nutrition > 500)
if(prob(5 + round((nutrition - 200) / 2)))
src << "<span class='danger'>You suddenly feel blubbery!</span>"
mutations.Add(FAT)
if (nutrition > 0)
nutrition -= HUNGER_FACTOR
if (nutrition > 0)
nutrition -= HUNGER_FACTOR
if (drowsyness)
drowsyness--
eye_blurry = max(2, eye_blurry)
if (prob(5))
sleeping += 1
Paralyse(5)
if (drowsyness)
drowsyness--
eye_blurry = max(2, eye_blurry)
if (prob(5))
sleeping += 1
Paralyse(5)
confused = max(0, confused - 1)
// decrement dizziness counter, clamped to 0
if(resting)
dizziness = max(0, dizziness - 5)
jitteriness = max(0, jitteriness - 5)
else
dizziness = max(0, dizziness - 1)
jitteriness = max(0, jitteriness - 1)
confused = max(0, confused - 1)
// decrement dizziness counter, clamped to 0
if(resting)
dizziness = max(0, dizziness - 5)
jitteriness = max(0, jitteriness - 5)
else
dizziness = max(0, dizziness - 1)
jitteriness = max(0, jitteriness - 1)
updatehealth()
updatehealth()
return //TODO: DEFERRED
return //TODO: DEFERRED
proc/handle_regular_status_updates()
updatehealth()
/mob/living/carbon/alien/humanoid/proc/handle_regular_status_updates()
updatehealth()
if(stat == DEAD) //DEAD. BROWN BREAD. SWIMMING WITH THE SPESS CARP
if(stat == DEAD) //DEAD. BROWN BREAD. SWIMMING WITH THE SPESS CARP
blinded = 1
silent = 0
else //ALIVE. LIGHTS ARE ON
if(health < config.health_threshold_dead || !getorgan(/obj/item/organ/brain))
death()
blinded = 1
stat = DEAD
silent = 0
else //ALIVE. LIGHTS ARE ON
if(health < config.health_threshold_dead || !getorgan(/obj/item/organ/brain))
death()
blinded = 1
stat = DEAD
silent = 0
return 1
return 1
//UNCONSCIOUS. NO-ONE IS HOME
if( (getOxyLoss() > 50) || (config.health_threshold_crit >= health) )
if( health <= 20 && prob(1) )
spawn(0)
emote("gasp")
if(!reagents.has_reagent("inaprovaline"))
adjustOxyLoss(1)
Paralyse(3)
//UNCONSCIOUS. NO-ONE IS HOME
if( (getOxyLoss() > 50) || (config.health_threshold_crit >= health) )
if( health <= 20 && prob(1) )
spawn(0)
emote("gasp")
if(!reagents.has_reagent("inaprovaline"))
adjustOxyLoss(1)
Paralyse(3)
if(paralysis)
AdjustParalysis(-1)
blinded = 1
stat = UNCONSCIOUS
else if(sleeping)
sleeping = max(sleeping-1, 0)
blinded = 1
stat = UNCONSCIOUS
if( prob(10) && health )
spawn(0)
emote("hiss")
//CONSCIOUS
else
stat = CONSCIOUS
if(paralysis)
AdjustParalysis(-1)
blinded = 1
stat = UNCONSCIOUS
else if(sleeping)
sleeping = max(sleeping-1, 0)
blinded = 1
stat = UNCONSCIOUS
if( prob(10) && health )
spawn(0)
emote("hiss")
//CONSCIOUS
else
stat = CONSCIOUS
/* What in the living hell is this?*/
if(move_delay_add > 0)
move_delay_add = max(0, move_delay_add - rand(1, 2))
/* What in the living hell is this?*/
if(move_delay_add > 0)
move_delay_add = max(0, move_delay_add - rand(1, 2))
//Eyes
if(sdisabilities & BLIND) //disabled-blind, doesn't get better on its own
blinded = 1
else if(eye_blind) //blindness, heals slowly over time
eye_blind = max(eye_blind-1,0)
blinded = 1
else if(eye_blurry) //blurry eyes heal slowly
eye_blurry = max(eye_blurry-1, 0)
//Eyes
if(sdisabilities & BLIND) //disabled-blind, doesn't get better on its own
blinded = 1
else if(eye_blind) //blindness, heals slowly over time
eye_blind = max(eye_blind-1,0)
blinded = 1
else if(eye_blurry) //blurry eyes heal slowly
eye_blurry = max(eye_blurry-1, 0)
//Ears
if(sdisabilities & DEAF) //disabled-deaf, doesn't get better on its own
ear_deaf = max(ear_deaf, 1)
else if(ear_deaf) //deafness, heals slowly over time
ear_deaf = max(ear_deaf-1, 0)
else if(ear_damage < 25) //ear damage heals slowly under this threshold. otherwise you'll need earmuffs
ear_damage = max(ear_damage-0.05, 0)
//Ears
if(sdisabilities & DEAF) //disabled-deaf, doesn't get better on its own
ear_deaf = max(ear_deaf, 1)
else if(ear_deaf) //deafness, heals slowly over time
ear_deaf = max(ear_deaf-1, 0)
else if(ear_damage < 25) //ear damage heals slowly under this threshold. otherwise you'll need earmuffs
ear_damage = max(ear_damage-0.05, 0)
//Other
if(stunned)
AdjustStunned(-1)
if(!stunned)
update_icons()
//Other
if(stunned)
AdjustStunned(-1)
if(!stunned)
update_icons()
if(weakened)
weakened = max(weakened-1,0)
if(weakened)
weakened = max(weakened-1,0)
if(stuttering)
stuttering = max(stuttering-1, 0)
if(stuttering)
stuttering = max(stuttering-1, 0)
if(silent)
silent = max(silent-1, 0)
if(silent)
silent = max(silent-1, 0)
if(druggy)
druggy = max(druggy-1, 0)
return 1
if(druggy)
druggy = max(druggy-1, 0)
return 1
proc/handle_regular_hud_updates()
/mob/living/carbon/alien/humanoid/proc/handle_regular_hud_updates()
if (stat == 2 || (XRAY in mutations))
sight |= SEE_TURFS
sight |= SEE_MOBS
sight |= SEE_OBJS
see_in_dark = 8
see_invisible = SEE_INVISIBLE_LEVEL_TWO
else if (stat != 2)
sight |= SEE_MOBS
sight &= ~SEE_TURFS
sight &= ~SEE_OBJS
see_in_dark = 4
see_invisible = SEE_INVISIBLE_LEVEL_TWO
if(see_override)
see_invisible = see_override
if (healths)
if (stat != 2)
switch(health)
if(100 to INFINITY)
healths.icon_state = "health0"
if(75 to 100)
healths.icon_state = "health1"
if(50 to 75)
healths.icon_state = "health2"
if(25 to 50)
healths.icon_state = "health3"
if(0 to 25)
healths.icon_state = "health4"
else
healths.icon_state = "health5"
else
healths.icon_state = "health6"
if(pullin)
if(pulling)
pullin.icon_state = "pull"
else
pullin.icon_state = "pull0"
if (toxin) toxin.icon_state = "tox[toxins_alert ? 1 : 0]"
if (oxygen) oxygen.icon_state = "oxy[oxygen_alert ? 1 : 0]"
if (fire) fire.icon_state = "fire[fire_alert ? 1 : 0]"
//NOTE: the alerts dont reset when youre out of danger. dont blame me,
//blame the person who coded them. Temporary fix added.
client.screen.Remove(global_hud.blurry,global_hud.druggy,global_hud.vimpaired)
if ((blind && stat != 2))
if ((blinded))
blind.layer = 18
else
blind.layer = 0
if (disabilities & NEARSIGHTED)
client.screen += global_hud.vimpaired
if (eye_blurry)
client.screen += global_hud.blurry
if (druggy)
client.screen += global_hud.druggy
if (stat == 2 || (XRAY in mutations))
sight |= SEE_TURFS
sight |= SEE_MOBS
sight |= SEE_OBJS
see_in_dark = 8
see_invisible = SEE_INVISIBLE_LEVEL_TWO
else if (stat != 2)
sight |= SEE_MOBS
sight &= ~SEE_TURFS
sight &= ~SEE_OBJS
see_in_dark = 4
see_invisible = SEE_INVISIBLE_LEVEL_TWO
if(see_override)
see_invisible = see_override
if (healths)
if (stat != 2)
if (machine)
if (!( machine.check_eye(src) ))
reset_view(null)
else
if(!client.adminobs)
reset_view(null)
switch(health)
if(100 to INFINITY)
healths.icon_state = "health0"
if(75 to 100)
healths.icon_state = "health1"
if(50 to 75)
healths.icon_state = "health2"
if(25 to 50)
healths.icon_state = "health3"
if(0 to 25)
healths.icon_state = "health4"
else
healths.icon_state = "health5"
else
healths.icon_state = "health6"
return 1
if(pullin)
if(pulling)
pullin.icon_state = "pull"
else
pullin.icon_state = "pull0"
proc/handle_stomach()
spawn(0)
for(var/mob/living/M in stomach_contents)
if(M.loc != src)
if (toxin) toxin.icon_state = "tox[toxins_alert ? 1 : 0]"
if (oxygen) oxygen.icon_state = "oxy[oxygen_alert ? 1 : 0]"
if (fire) fire.icon_state = "fire[fire_alert ? 1 : 0]"
//NOTE: the alerts dont reset when youre out of danger. dont blame me,
//blame the person who coded them. Temporary fix added.
client.screen.Remove(global_hud.blurry,global_hud.druggy,global_hud.vimpaired)
if ((blind && stat != 2))
if ((blinded))
blind.layer = 18
else
blind.layer = 0
if (disabilities & NEARSIGHTED)
client.screen += global_hud.vimpaired
if (eye_blurry)
client.screen += global_hud.blurry
if (druggy)
client.screen += global_hud.druggy
if (stat != 2)
if (machine)
if (!( machine.check_eye(src) ))
reset_view(null)
else
if(!client.adminobs)
reset_view(null)
return 1
/mob/living/carbon/alien/humanoid/proc/handle_stomach()
spawn(0)
for(var/mob/living/M in stomach_contents)
if(M.loc != src)
stomach_contents.Remove(M)
continue
if(istype(M, /mob/living/carbon) && stat != 2)
if(M.stat == 2)
M.death(1)
stomach_contents.Remove(M)
qdel(M)
continue
if(istype(M, /mob/living/carbon) && stat != 2)
if(M.stat == 2)
M.death(1)
stomach_contents.Remove(M)
qdel(M)
continue
if(air_master.current_cycle%3==1)
if(!(status_flags & GODMODE))
M.adjustBruteLoss(5)
nutrition += 10
if(air_master.current_cycle%3==1)
if(!(status_flags & GODMODE))
M.adjustBruteLoss(5)
nutrition += 10
+303 -305
View File
@@ -62,327 +62,325 @@
handle_regular_hud_updates()
/mob/living/carbon/alien/larva
/mob/living/carbon/alien/larva/proc/breathe()
proc/breathe()
if(reagents.has_reagent("lexorin")) return
if(istype(loc, /obj/machinery/atmospherics/unary/cryo_cell)) return
if(reagents.has_reagent("lexorin")) return
if(istype(loc, /obj/machinery/atmospherics/unary/cryo_cell)) return
var/datum/gas_mixture/environment = loc.return_air()
var/datum/gas_mixture/breath
// HACK NEED CHANGING LATER
if(health <= config.health_threshold_crit)
losebreath++
var/datum/gas_mixture/environment = loc.return_air()
var/datum/gas_mixture/breath
// HACK NEED CHANGING LATER
if(health <= config.health_threshold_crit)
losebreath++
if(losebreath>0) //Suffocating so do not take a breath
losebreath--
if (prob(75)) //High chance of gasping for air
spawn emote("gasp")
if(istype(loc, /obj/))
var/obj/location_as_object = loc
location_as_object.handle_internal_lifeform(src, 0)
else
//First, check for air from internal atmosphere (using an air tank and mask generally)
breath = get_breath_from_internal(BREATH_VOLUME)
if(losebreath>0) //Suffocating so do not take a breath
losebreath--
if (prob(75)) //High chance of gasping for air
spawn emote("gasp")
//No breath from internal atmosphere so get breath from location
if(!breath)
if(istype(loc, /obj/))
var/obj/location_as_object = loc
breath = location_as_object.handle_internal_lifeform(src, BREATH_VOLUME)
else if(istype(loc, /turf/))
var/breath_moles = 0
/*if(environment.return_pressure() > ONE_ATMOSPHERE)
// Loads of air around (pressure effect will be handled elsewhere), so lets just take a enough to fill our lungs at normal atmos pressure (using n = Pv/RT)
breath_moles = (ONE_ATMOSPHERE*BREATH_VOLUME/R_IDEAL_GAS_EQUATION*environment.temperature)
else*/
// Not enough air around, take a percentage of what's there to model this properly
breath_moles = environment.total_moles()*BREATH_PERCENTAGE
breath = loc.remove_air(breath_moles)
// Handle chem smoke effect -- Doohl
for(var/obj/effect/effect/chem_smoke/smoke in view(1, src))
if(smoke.reagents.total_volume)
smoke.reagents.reaction(src, INGEST)
spawn(5)
if(smoke)
smoke.reagents.copy_to(src, 10) // I dunno, maybe the reagents enter the blood stream through the lungs?
break // If they breathe in the nasty stuff once, no need to continue checking
else //Still give containing object the chance to interact
if(istype(loc, /obj/))
var/obj/location_as_object = loc
location_as_object.handle_internal_lifeform(src, 0)
else
//First, check for air from internal atmosphere (using an air tank and mask generally)
breath = get_breath_from_internal(BREATH_VOLUME)
//No breath from internal atmosphere so get breath from location
if(!breath)
if(istype(loc, /obj/))
var/obj/location_as_object = loc
breath = location_as_object.handle_internal_lifeform(src, BREATH_VOLUME)
else if(istype(loc, /turf/))
var/breath_moles = 0
/*if(environment.return_pressure() > ONE_ATMOSPHERE)
// Loads of air around (pressure effect will be handled elsewhere), so lets just take a enough to fill our lungs at normal atmos pressure (using n = Pv/RT)
breath_moles = (ONE_ATMOSPHERE*BREATH_VOLUME/R_IDEAL_GAS_EQUATION*environment.temperature)
else*/
// Not enough air around, take a percentage of what's there to model this properly
breath_moles = environment.total_moles()*BREATH_PERCENTAGE
handle_breath(breath)
breath = loc.remove_air(breath_moles)
// Handle chem smoke effect -- Doohl
for(var/obj/effect/effect/chem_smoke/smoke in view(1, src))
if(smoke.reagents.total_volume)
smoke.reagents.reaction(src, INGEST)
spawn(5)
if(smoke)
smoke.reagents.copy_to(src, 10) // I dunno, maybe the reagents enter the blood stream through the lungs?
break // If they breathe in the nasty stuff once, no need to continue checking
if(breath)
loc.assume_air(breath)
else //Still give containing object the chance to interact
if(istype(loc, /obj/))
var/obj/location_as_object = loc
location_as_object.handle_internal_lifeform(src, 0)
handle_breath(breath)
if(breath)
loc.assume_air(breath)
proc/get_breath_from_internal(volume_needed)
/mob/living/carbon/alien/larva/proc/get_breath_from_internal(volume_needed)
if(internal)
if (!contents.Find(internal))
internal = null
if (!wear_mask || !(wear_mask.flags & MASKINTERNALS) )
internal = null
if(internal)
if (!contents.Find(internal))
internal = null
if (!wear_mask || !(wear_mask.flags & MASKINTERNALS) )
internal = null
if(internal)
if (internals)
internals.icon_state = "internal1"
return internal.remove_air_volume(volume_needed)
else
if (internals)
internals.icon_state = "internal0"
return null
proc/handle_breath(datum/gas_mixture/breath)
if(status_flags & GODMODE)
return
if(!breath || (breath.total_moles() == 0))
//Aliens breathe in vaccuum
return 0
var/toxins_used = 0
var/breath_pressure = (breath.total_moles()*R_IDEAL_GAS_EQUATION*breath.temperature)/BREATH_VOLUME
//Partial pressure of the toxins in our breath
var/Toxins_pp = (breath.toxins/breath.total_moles())*breath_pressure
if(Toxins_pp) // Detect toxins in air
adjustToxLoss(breath.toxins*250)
toxins_alert = max(toxins_alert, 1)
toxins_used = breath.toxins
if (internals)
internals.icon_state = "internal1"
return internal.remove_air_volume(volume_needed)
else
toxins_alert = 0
if (internals)
internals.icon_state = "internal0"
return null
//Breathe in toxins and out oxygen
breath.toxins -= toxins_used
breath.oxygen += toxins_used
if(breath.temperature > (T0C+66) && !(COLD_RESISTANCE in mutations)) // Hot air hurts :(
if(prob(20))
src << "<span class='danger'>You feel a searing heat in your lungs!</span>"
fire_alert = max(fire_alert, 1)
else
fire_alert = 0
//Temporary fixes to the alerts.
return 1
proc/handle_chemicals_in_body()
if(reagents) reagents.metabolize(src)
if(FAT in mutations)
if(nutrition < 100)
if(prob(round((50 - nutrition) / 100)))
src << "<span class='info'>You feel fit again!</span>"
mutations.Add(FAT)
else
if(nutrition > 500)
if(prob(5 + round((nutrition - max_grown) / 2)))
src << "<span class='danger'>You suddenly feel blubbery!</span>"
mutations.Add(FAT)
if (nutrition > 0)
nutrition-= HUNGER_FACTOR
if (drowsyness)
drowsyness--
eye_blurry = max(2, eye_blurry)
if (prob(5))
sleeping += 1
Paralyse(5)
confused = max(0, confused - 1)
// decrement dizziness counter, clamped to 0
if(resting)
dizziness = max(0, dizziness - 5)
jitteriness = max(0, jitteriness - 5)
else
dizziness = max(0, dizziness - 1)
jitteriness = max(0, jitteriness - 1)
updatehealth()
return //TODO: DEFERRED
proc/handle_regular_status_updates()
updatehealth()
if(stat == DEAD) //DEAD. BROWN BREAD. SWIMMING WITH THE SPESS CARP
blinded = 1
silent = 0
else //ALIVE. LIGHTS ARE ON
if(health < -25 || !getorgan(/obj/item/organ/brain))
death()
blinded = 1
silent = 0
return 1
//UNCONSCIOUS. NO-ONE IS HOME
if( (getOxyLoss() > 25) || (config.health_threshold_crit >= health) )
//if( health <= 20 && prob(1) )
// spawn(0)
// emote("gasp")
if(!reagents.has_reagent("inaprovaline"))
adjustOxyLoss(1)
Paralyse(3)
if(paralysis)
AdjustParalysis(-2)
blinded = 1
stat = UNCONSCIOUS
else if(sleeping)
sleeping = max(sleeping-1, 0)
blinded = 1
stat = UNCONSCIOUS
if( prob(10) && health )
spawn(0)
emote("hiss_")
//CONSCIOUS
else
stat = CONSCIOUS
/* What in the living hell is this?*/
if(move_delay_add > 0)
move_delay_add = max(0, move_delay_add - rand(1, 2))
//Eyes
if(sdisabilities & BLIND) //disabled-blind, doesn't get better on its own
blinded = 1
else if(eye_blind) //blindness, heals slowly over time
eye_blind = max(eye_blind-1,0)
blinded = 1
else if(eye_blurry) //blurry eyes heal slowly
eye_blurry = max(eye_blurry-1, 0)
//Ears
if(sdisabilities & DEAF) //disabled-deaf, doesn't get better on its own
ear_deaf = max(ear_deaf, 1)
else if(ear_deaf) //deafness, heals slowly over time
ear_deaf = max(ear_deaf-1, 0)
else if(ear_damage < 25) //ear damage heals slowly under this threshold.
ear_damage = max(ear_damage-0.05, 0)
//Other
if(stunned)
AdjustStunned(-1)
if(weakened)
weakened = max(weakened-1,0)
if(stuttering)
stuttering = max(stuttering-1, 0)
if(silent)
silent = max(silent-1, 0)
if(druggy)
druggy = max(druggy-1, 0)
return 1
proc/handle_regular_hud_updates()
if (stat == 2 || (XRAY in mutations))
sight |= SEE_TURFS
sight |= SEE_MOBS
sight |= SEE_OBJS
see_in_dark = 8
see_invisible = SEE_INVISIBLE_LEVEL_TWO
else if (stat != 2)
sight |= SEE_MOBS
sight &= ~SEE_TURFS
sight &= ~SEE_OBJS
see_in_dark = 4
see_invisible = SEE_INVISIBLE_LEVEL_TWO
if(see_override)
see_invisible = see_override
if (healths)
if (stat != 2)
switch(health)
if(25 to INFINITY)
healths.icon_state = "health0"
if(19 to 25)
healths.icon_state = "health1"
if(13 to 19)
healths.icon_state = "health2"
if(7 to 13)
healths.icon_state = "health3"
if(0 to 7)
healths.icon_state = "health4"
else
healths.icon_state = "health5"
else
healths.icon_state = "health6"
if(pullin)
if(pulling)
pullin.icon_state = "pull"
else
pullin.icon_state = "pull0"
if (toxin) toxin.icon_state = "tox[toxins_alert ? 1 : 0]"
if (oxygen) oxygen.icon_state = "oxy[oxygen_alert ? 1 : 0]"
if (fire) fire.icon_state = "fire[fire_alert ? 1 : 0]"
//NOTE: the alerts dont reset when youre out of danger. dont blame me,
//blame the person who coded them. Temporary fix added.
client.screen.Remove(global_hud.blurry,global_hud.druggy,global_hud.vimpaired)
if ((blind && stat != 2))
if ((blinded))
blind.layer = 18
else
blind.layer = 0
if (disabilities & NEARSIGHTED)
client.screen += global_hud.vimpaired
if (eye_blurry)
client.screen += global_hud.blurry
if (druggy)
client.screen += global_hud.druggy
if (stat != 2)
if (machine)
if (!( machine.check_eye(src) ))
reset_view(null)
else
if(!client.adminobs)
reset_view(null)
return 1
proc/handle_random_events()
/mob/living/carbon/alien/larva/proc/handle_breath(datum/gas_mixture/breath)
if(status_flags & GODMODE)
return
if(!breath || (breath.total_moles() == 0))
//Aliens breathe in vaccuum
return 0
proc/handle_stomach()
spawn(0)
for(var/mob/living/M in stomach_contents)
if(M.loc != src)
var/toxins_used = 0
var/breath_pressure = (breath.total_moles()*R_IDEAL_GAS_EQUATION*breath.temperature)/BREATH_VOLUME
//Partial pressure of the toxins in our breath
var/Toxins_pp = (breath.toxins/breath.total_moles())*breath_pressure
if(Toxins_pp) // Detect toxins in air
adjustToxLoss(breath.toxins*250)
toxins_alert = max(toxins_alert, 1)
toxins_used = breath.toxins
else
toxins_alert = 0
//Breathe in toxins and out oxygen
breath.toxins -= toxins_used
breath.oxygen += toxins_used
if(breath.temperature > (T0C+66) && !(COLD_RESISTANCE in mutations)) // Hot air hurts :(
if(prob(20))
src << "<span class='danger'>You feel a searing heat in your lungs!</span>"
fire_alert = max(fire_alert, 1)
else
fire_alert = 0
//Temporary fixes to the alerts.
return 1
/mob/living/carbon/alien/larva/proc/handle_chemicals_in_body()
if(reagents) reagents.metabolize(src)
if(FAT in mutations)
if(nutrition < 100)
if(prob(round((50 - nutrition) / 100)))
src << "<span class='info'>You feel fit again!</span>"
mutations.Add(FAT)
else
if(nutrition > 500)
if(prob(5 + round((nutrition - max_grown) / 2)))
src << "<span class='danger'>You suddenly feel blubbery!</span>"
mutations.Add(FAT)
if (nutrition > 0)
nutrition-= HUNGER_FACTOR
if (drowsyness)
drowsyness--
eye_blurry = max(2, eye_blurry)
if (prob(5))
sleeping += 1
Paralyse(5)
confused = max(0, confused - 1)
// decrement dizziness counter, clamped to 0
if(resting)
dizziness = max(0, dizziness - 5)
jitteriness = max(0, jitteriness - 5)
else
dizziness = max(0, dizziness - 1)
jitteriness = max(0, jitteriness - 1)
updatehealth()
return //TODO: DEFERRED
/mob/living/carbon/alien/larva/proc/handle_regular_status_updates()
updatehealth()
if(stat == DEAD) //DEAD. BROWN BREAD. SWIMMING WITH THE SPESS CARP
blinded = 1
silent = 0
else //ALIVE. LIGHTS ARE ON
if(health < -25 || !getorgan(/obj/item/organ/brain))
death()
blinded = 1
silent = 0
return 1
//UNCONSCIOUS. NO-ONE IS HOME
if( (getOxyLoss() > 25) || (config.health_threshold_crit >= health) )
//if( health <= 20 && prob(1) )
// spawn(0)
// emote("gasp")
if(!reagents.has_reagent("inaprovaline"))
adjustOxyLoss(1)
Paralyse(3)
if(paralysis)
AdjustParalysis(-2)
blinded = 1
stat = UNCONSCIOUS
else if(sleeping)
sleeping = max(sleeping-1, 0)
blinded = 1
stat = UNCONSCIOUS
if( prob(10) && health )
spawn(0)
emote("hiss_")
//CONSCIOUS
else
stat = CONSCIOUS
/* What in the living hell is this?*/
if(move_delay_add > 0)
move_delay_add = max(0, move_delay_add - rand(1, 2))
//Eyes
if(sdisabilities & BLIND) //disabled-blind, doesn't get better on its own
blinded = 1
else if(eye_blind) //blindness, heals slowly over time
eye_blind = max(eye_blind-1,0)
blinded = 1
else if(eye_blurry) //blurry eyes heal slowly
eye_blurry = max(eye_blurry-1, 0)
//Ears
if(sdisabilities & DEAF) //disabled-deaf, doesn't get better on its own
ear_deaf = max(ear_deaf, 1)
else if(ear_deaf) //deafness, heals slowly over time
ear_deaf = max(ear_deaf-1, 0)
else if(ear_damage < 25) //ear damage heals slowly under this threshold.
ear_damage = max(ear_damage-0.05, 0)
//Other
if(stunned)
AdjustStunned(-1)
if(weakened)
weakened = max(weakened-1,0)
if(stuttering)
stuttering = max(stuttering-1, 0)
if(silent)
silent = max(silent-1, 0)
if(druggy)
druggy = max(druggy-1, 0)
return 1
/mob/living/carbon/alien/larva/proc/handle_regular_hud_updates()
if (stat == 2 || (XRAY in mutations))
sight |= SEE_TURFS
sight |= SEE_MOBS
sight |= SEE_OBJS
see_in_dark = 8
see_invisible = SEE_INVISIBLE_LEVEL_TWO
else if (stat != 2)
sight |= SEE_MOBS
sight &= ~SEE_TURFS
sight &= ~SEE_OBJS
see_in_dark = 4
see_invisible = SEE_INVISIBLE_LEVEL_TWO
if(see_override)
see_invisible = see_override
if (healths)
if (stat != 2)
switch(health)
if(25 to INFINITY)
healths.icon_state = "health0"
if(19 to 25)
healths.icon_state = "health1"
if(13 to 19)
healths.icon_state = "health2"
if(7 to 13)
healths.icon_state = "health3"
if(0 to 7)
healths.icon_state = "health4"
else
healths.icon_state = "health5"
else
healths.icon_state = "health6"
if(pullin)
if(pulling)
pullin.icon_state = "pull"
else
pullin.icon_state = "pull0"
if (toxin) toxin.icon_state = "tox[toxins_alert ? 1 : 0]"
if (oxygen) oxygen.icon_state = "oxy[oxygen_alert ? 1 : 0]"
if (fire) fire.icon_state = "fire[fire_alert ? 1 : 0]"
//NOTE: the alerts dont reset when youre out of danger. dont blame me,
//blame the person who coded them. Temporary fix added.
client.screen.Remove(global_hud.blurry,global_hud.druggy,global_hud.vimpaired)
if ((blind && stat != 2))
if ((blinded))
blind.layer = 18
else
blind.layer = 0
if (disabilities & NEARSIGHTED)
client.screen += global_hud.vimpaired
if (eye_blurry)
client.screen += global_hud.blurry
if (druggy)
client.screen += global_hud.druggy
if (stat != 2)
if (machine)
if (!( machine.check_eye(src) ))
reset_view(null)
else
if(!client.adminobs)
reset_view(null)
return 1
/mob/living/carbon/alien/larva/proc/handle_random_events()
return
/mob/living/carbon/alien/larva/proc/handle_stomach()
spawn(0)
for(var/mob/living/M in stomach_contents)
if(M.loc != src)
stomach_contents.Remove(M)
continue
if(istype(M, /mob/living/carbon) && stat != 2)
if(M.stat == 2)
M.death(1)
stomach_contents.Remove(M)
qdel(M)
continue
if(istype(M, /mob/living/carbon) && stat != 2)
if(M.stat == 2)
M.death(1)
stomach_contents.Remove(M)
qdel(M)
continue
if(air_master.current_cycle%3==1)
if(!(M.status_flags & GODMODE))
M.adjustBruteLoss(5)
nutrition += 10
if(air_master.current_cycle%3==1)
if(!(M.status_flags & GODMODE))
M.adjustBruteLoss(5)
nutrition += 10
+33 -33
View File
@@ -6,43 +6,43 @@
var/emp_damage = 0//Handles a type of MMI damage
var/alert = null
New()
create_reagents(1000)
..()
/mob/living/carbon/brain/New()
create_reagents(1000)
..()
Destroy()
if(key) //If there is a mob connected to this thing. Have to check key twice to avoid false death reporting.
if(stat!=DEAD) //If not dead.
death(1) //Brains can die again. AND THEY SHOULD AHA HA HA HA HA HA
ghostize() //Ghostize checks for key so nothing else is necessary.
..()
/mob/living/carbon/brain/Destroy()
if(key) //If there is a mob connected to this thing. Have to check key twice to avoid false death reporting.
if(stat!=DEAD) //If not dead.
death(1) //Brains can die again. AND THEY SHOULD AHA HA HA HA HA HA
ghostize() //Ghostize checks for key so nothing else is necessary.
..()
say_understands(var/other)//Goddamn is this hackish, but this say code is so odd
if (istype(other, /mob/living/silicon/ai))
if(!(container && istype(container, /obj/item/device/mmi)))
return 0
else
return 1
if (istype(other, /mob/living/silicon/decoy))
if(!(container && istype(container, /obj/item/device/mmi)))
return 0
else
return 1
if (istype(other, /mob/living/silicon/pai))
if(!(container && istype(container, /obj/item/device/mmi)))
return 0
else
return 1
if (istype(other, /mob/living/silicon/robot))
if(!(container && istype(container, /obj/item/device/mmi)))
return 0
else
return 1
if (istype(other, /mob/living/carbon/human))
/mob/living/carbon/brain/say_understands(var/other)//Goddamn is this hackish, but this say code is so odd
if (istype(other, /mob/living/silicon/ai))
if(!(container && istype(container, /obj/item/device/mmi)))
return 0
else
return 1
if (istype(other, /mob/living/carbon/slime))
if (istype(other, /mob/living/silicon/decoy))
if(!(container && istype(container, /obj/item/device/mmi)))
return 0
else
return 1
return ..()
if (istype(other, /mob/living/silicon/pai))
if(!(container && istype(container, /obj/item/device/mmi)))
return 0
else
return 1
if (istype(other, /mob/living/silicon/robot))
if(!(container && istype(container, /obj/item/device/mmi)))
return 0
else
return 1
if (istype(other, /mob/living/carbon/human))
return 1
if (istype(other, /mob/living/carbon/slime))
return 1
return ..()
/mob/living/carbon/brain/update_canmove()
+200 -201
View File
@@ -32,244 +32,243 @@
handle_regular_hud_updates()
/mob/living/carbon/brain/
proc/handle_mutations_and_radiation()
/mob/living/carbon/brain/proc/handle_mutations_and_radiation()
if (radiation)
if (radiation > 100)
radiation = 100
if(!container)//If it's not in an MMI
src << "\red You feel weak."
else//Fluff-wise, since the brain can't detect anything itself, the MMI handles thing like that
src << "\red STATUS: CRITICAL AMOUNTS OF RADIATION DETECTED."
if (radiation)
if (radiation > 100)
radiation = 100
if(!container)//If it's not in an MMI
src << "\red You feel weak."
else//Fluff-wise, since the brain can't detect anything itself, the MMI handles thing like that
src << "\red STATUS: CRITICAL AMOUNTS OF RADIATION DETECTED."
switch(radiation)
if(1 to 49)
radiation--
if(prob(25))
adjustToxLoss(1)
updatehealth()
if(50 to 74)
radiation -= 2
switch(radiation)
if(1 to 49)
radiation--
if(prob(25))
adjustToxLoss(1)
if(prob(5))
radiation -= 5
if(!container)
src << "\red You feel weak."
else
src << "\red STATUS: DANGEROUS LEVELS OF RADIATION DETECTED."
updatehealth()
if(75 to 100)
radiation -= 3
adjustToxLoss(3)
updatehealth()
if(50 to 74)
radiation -= 2
adjustToxLoss(1)
if(prob(5))
radiation -= 5
if(!container)
src << "\red You feel weak."
else
src << "\red STATUS: DANGEROUS LEVELS OF RADIATION DETECTED."
updatehealth()
if(75 to 100)
radiation -= 3
adjustToxLoss(3)
updatehealth()
proc/handle_environment(datum/gas_mixture/environment)
if(!environment)
return
var/environment_heat_capacity = environment.heat_capacity()
if(istype(get_turf(src), /turf/space))
var/turf/heat_turf = get_turf(src)
environment_heat_capacity = heat_turf.heat_capacity
/mob/living/carbon/brain/proc/handle_environment(datum/gas_mixture/environment)
if(!environment)
return
var/environment_heat_capacity = environment.heat_capacity()
if(istype(get_turf(src), /turf/space))
var/turf/heat_turf = get_turf(src)
environment_heat_capacity = heat_turf.heat_capacity
if((environment.temperature > (T0C + 50)) || (environment.temperature < (T0C + 10)))
var/transfer_coefficient = 1
if((environment.temperature > (T0C + 50)) || (environment.temperature < (T0C + 10)))
var/transfer_coefficient = 1
handle_temperature_damage(HEAD, environment.temperature, environment_heat_capacity*transfer_coefficient)
handle_temperature_damage(HEAD, environment.temperature, environment_heat_capacity*transfer_coefficient)
if(stat==2)
bodytemperature += 0.1*(environment.temperature - bodytemperature)*environment_heat_capacity/(environment_heat_capacity + 270000)
if(stat==2)
bodytemperature += 0.1*(environment.temperature - bodytemperature)*environment_heat_capacity/(environment_heat_capacity + 270000)
//Account for massive pressure differences
//Account for massive pressure differences
return //TODO: DEFERRED
return //TODO: DEFERRED
proc/handle_temperature_damage(body_part, exposed_temperature, exposed_intensity)
if(status_flags & GODMODE) return
/mob/living/carbon/brain/proc/handle_temperature_damage(body_part, exposed_temperature, exposed_intensity)
if(status_flags & GODMODE) return
if(exposed_temperature > bodytemperature)
var/discomfort = min( abs(exposed_temperature - bodytemperature)*(exposed_intensity)/2000000, 1.0)
//adjustFireLoss(2.5*discomfort)
//adjustFireLoss(5.0*discomfort)
adjustFireLoss(20.0*discomfort)
if(exposed_temperature > bodytemperature)
var/discomfort = min( abs(exposed_temperature - bodytemperature)*(exposed_intensity)/2000000, 1.0)
//adjustFireLoss(2.5*discomfort)
//adjustFireLoss(5.0*discomfort)
adjustFireLoss(20.0*discomfort)
else
var/discomfort = min( abs(exposed_temperature - bodytemperature)*(exposed_intensity)/2000000, 1.0)
//adjustFireLoss(2.5*discomfort)
adjustFireLoss(5.0*discomfort)
else
var/discomfort = min( abs(exposed_temperature - bodytemperature)*(exposed_intensity)/2000000, 1.0)
//adjustFireLoss(2.5*discomfort)
adjustFireLoss(5.0*discomfort)
proc/handle_chemicals_in_body()
/mob/living/carbon/brain/proc/handle_chemicals_in_body()
if(reagents) reagents.metabolize(src)
if(reagents) reagents.metabolize(src)
confused = max(0, confused - 1)
// decrement dizziness counter, clamped to 0
if(resting)
dizziness = max(0, dizziness - 5)
else
dizziness = max(0, dizziness - 1)
confused = max(0, confused - 1)
// decrement dizziness counter, clamped to 0
if(resting)
dizziness = max(0, dizziness - 5)
else
dizziness = max(0, dizziness - 1)
updatehealth()
updatehealth()
return //TODO: DEFERRED
return //TODO: DEFERRED
proc/handle_regular_status_updates() //TODO: comment out the unused bits >_>
updatehealth()
/mob/living/carbon/brain/proc/handle_regular_status_updates() //TODO: comment out the unused bits >_>
updatehealth()
if(stat == DEAD) //DEAD. BROWN BREAD. SWIMMING WITH THE SPESS CARP
if(stat == DEAD) //DEAD. BROWN BREAD. SWIMMING WITH THE SPESS CARP
blinded = 1
silent = 0
else //ALIVE. LIGHTS ARE ON
if( !container && (health < config.health_threshold_dead || ((world.time - timeofhostdeath) > config.revival_brain_life)) )
death()
blinded = 1
silent = 0
else //ALIVE. LIGHTS ARE ON
if( !container && (health < config.health_threshold_dead || ((world.time - timeofhostdeath) > config.revival_brain_life)) )
death()
blinded = 1
silent = 0
return 1
return 1
//Handling EMP effect in the Life(), it's made VERY simply, and has some additional effects handled elsewhere
if(emp_damage) //This is pretty much a damage type only used by MMIs, dished out by the emp_act
if(!(container && istype(container, /obj/item/device/mmi)))
emp_damage = 0
else
emp_damage = round(emp_damage,1)//Let's have some nice numbers to work with
switch(emp_damage)
if(31 to INFINITY)
emp_damage = 30//Let's not overdo it
if(21 to 30)//High level of EMP damage, unable to see, hear, or speak
eye_blind = 1
blinded = 1
ear_deaf = 1
silent = 1
if(!alert)//Sounds an alarm, but only once per 'level'
emote("alarm")
src << "\red Major electrical distruption detected: System rebooting."
alert = 1
if(prob(75))
emp_damage -= 1
if(20)
alert = 0
blinded = 0
eye_blind = 0
ear_deaf = 0
silent = 0
emp_damage -= 1
if(11 to 19)//Moderate level of EMP damage, resulting in nearsightedness and ear damage
eye_blurry = 1
ear_damage = 1
if(!alert)
emote("alert")
src << "\red Primary systems are now online."
alert = 1
if(prob(50))
emp_damage -= 1
if(10)
alert = 0
eye_blurry = 0
ear_damage = 0
emp_damage -= 1
if(2 to 9)//Low level of EMP damage, has few effects(handled elsewhere)
if(!alert)
emote("notice")
src << "\red System reboot nearly complete."
alert = 1
if(prob(25))
emp_damage -= 1
if(1)
alert = 0
src << "\red All systems restored."
emp_damage -= 1
//Other
/* commented out because none of these should happen
if(stunned)
AdjustStunned(-1)
if(weakened)
weakened = max(weakened-1,0)
if(stuttering)
stuttering = max(stuttering-1, 0)
if(silent)
silent = max(silent-1, 0)
if(druggy)
druggy = max(druggy-1, 0)
*/
return 1
proc/handle_regular_hud_updates()
if (stat == 2 || (XRAY in src.mutations))
sight |= SEE_TURFS
sight |= SEE_MOBS
sight |= SEE_OBJS
see_in_dark = 8
see_invisible = SEE_INVISIBLE_LEVEL_TWO
else if (stat != 2)
sight &= ~SEE_TURFS
sight &= ~SEE_MOBS
sight &= ~SEE_OBJS
see_in_dark = 2
see_invisible = SEE_INVISIBLE_LIVING
if(see_override)
see_invisible = see_override
if (healths)
if (stat != 2)
switch(health)
if(100 to INFINITY)
healths.icon_state = "health0"
if(80 to 100)
healths.icon_state = "health1"
if(60 to 80)
healths.icon_state = "health2"
if(40 to 60)
healths.icon_state = "health3"
if(20 to 40)
healths.icon_state = "health4"
if(0 to 20)
healths.icon_state = "health5"
else
healths.icon_state = "health6"
//Handling EMP effect in the Life(), it's made VERY simply, and has some additional effects handled elsewhere
if(emp_damage) //This is pretty much a damage type only used by MMIs, dished out by the emp_act
if(!(container && istype(container, /obj/item/device/mmi)))
emp_damage = 0
else
healths.icon_state = "health7"
emp_damage = round(emp_damage,1)//Let's have some nice numbers to work with
switch(emp_damage)
if(31 to INFINITY)
emp_damage = 30//Let's not overdo it
if(21 to 30)//High level of EMP damage, unable to see, hear, or speak
eye_blind = 1
blinded = 1
ear_deaf = 1
silent = 1
if(!alert)//Sounds an alarm, but only once per 'level'
emote("alarm")
src << "\red Major electrical distruption detected: System rebooting."
alert = 1
if(prob(75))
emp_damage -= 1
if(20)
alert = 0
blinded = 0
eye_blind = 0
ear_deaf = 0
silent = 0
emp_damage -= 1
if(11 to 19)//Moderate level of EMP damage, resulting in nearsightedness and ear damage
eye_blurry = 1
ear_damage = 1
if(!alert)
emote("alert")
src << "\red Primary systems are now online."
alert = 1
if(prob(50))
emp_damage -= 1
if(10)
alert = 0
eye_blurry = 0
ear_damage = 0
emp_damage -= 1
if(2 to 9)//Low level of EMP damage, has few effects(handled elsewhere)
if(!alert)
emote("notice")
src << "\red System reboot nearly complete."
alert = 1
if(prob(25))
emp_damage -= 1
if(1)
alert = 0
src << "\red All systems restored."
emp_damage -= 1
if(pullin) pullin.icon_state = "pull[pulling ? 1 : 0]"
//Other
/* commented out because none of these should happen
if(stunned)
AdjustStunned(-1)
client.screen.Remove(global_hud.blurry,global_hud.druggy,global_hud.vimpaired)
if(weakened)
weakened = max(weakened-1,0)
if ((blind && stat != 2))
if ((blinded))
blind.layer = 18
else
blind.layer = 0
if(stuttering)
stuttering = max(stuttering-1, 0)
if (disabilities & NEARSIGHTED)
client.screen += global_hud.vimpaired
if(silent)
silent = max(silent-1, 0)
if (eye_blurry)
client.screen += global_hud.blurry
if(druggy)
druggy = max(druggy-1, 0)
*/
return 1
if (druggy)
client.screen += global_hud.druggy
/mob/living/carbon/brain/proc/handle_regular_hud_updates()
if (stat == 2 || (XRAY in src.mutations))
sight |= SEE_TURFS
sight |= SEE_MOBS
sight |= SEE_OBJS
see_in_dark = 8
see_invisible = SEE_INVISIBLE_LEVEL_TWO
else if (stat != 2)
sight &= ~SEE_TURFS
sight &= ~SEE_MOBS
sight &= ~SEE_OBJS
see_in_dark = 2
see_invisible = SEE_INVISIBLE_LIVING
if(see_override)
see_invisible = see_override
if (healths)
if (stat != 2)
if (machine)
if (!( machine.check_eye(src) ))
reset_view(null)
else
if(!client.adminobs)
reset_view(null)
switch(health)
if(100 to INFINITY)
healths.icon_state = "health0"
if(80 to 100)
healths.icon_state = "health1"
if(60 to 80)
healths.icon_state = "health2"
if(40 to 60)
healths.icon_state = "health3"
if(20 to 40)
healths.icon_state = "health4"
if(0 to 20)
healths.icon_state = "health5"
else
healths.icon_state = "health6"
else
healths.icon_state = "health7"
return 1
if(pullin) pullin.icon_state = "pull[pulling ? 1 : 0]"
client.screen.Remove(global_hud.blurry,global_hud.druggy,global_hud.vimpaired)
if ((blind && stat != 2))
if ((blinded))
blind.layer = 18
else
blind.layer = 0
if (disabilities & NEARSIGHTED)
client.screen += global_hud.vimpaired
if (eye_blurry)
client.screen += global_hud.blurry
if (druggy)
client.screen += global_hud.druggy
if (stat != 2)
if (machine)
if (!( machine.check_eye(src) ))
reset_view(null)
else
if(!client.adminobs)
reset_view(null)
return 1
/*/mob/living/carbon/brain/emp_act(severity)
@@ -283,4 +282,4 @@
emp_damage += rand(10,20)
if(3)
emp_damage += rand(0,10)
..()*/
..()*/
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
+468 -470
View File
@@ -76,519 +76,517 @@
..()
return pressure
/mob/living/carbon/monkey
/mob/living/carbon/monkey/proc/handle_disabilities()
proc/handle_disabilities()
if (disabilities & EPILEPSY)
if ((prob(1) && paralysis < 10))
src << "\red You have a seizure!"
Paralyse(10)
if (disabilities & COUGHING)
if ((prob(5) && paralysis <= 1))
drop_item()
spawn( 0 )
emote("cough")
return
if (disabilities & TOURETTES)
if ((prob(10) && paralysis <= 1))
Stun(10)
spawn( 0 )
emote("twitch")
return
if (disabilities & NERVOUS)
if (prob(10))
stuttering = max(10, stuttering)
if (disabilities & EPILEPSY)
if ((prob(1) && paralysis < 10))
src << "\red You have a seizure!"
Paralyse(10)
if (disabilities & COUGHING)
if ((prob(5) && paralysis <= 1))
drop_item()
spawn( 0 )
emote("cough")
return
if (disabilities & TOURETTES)
if ((prob(10) && paralysis <= 1))
Stun(10)
spawn( 0 )
emote("twitch")
return
if (disabilities & NERVOUS)
if (prob(10))
stuttering = max(10, stuttering)
/mob/living/carbon/monkey/proc/handle_mutations_and_radiation()
proc/handle_mutations_and_radiation()
if(getFireLoss())
if((COLD_RESISTANCE in mutations) && prob(50))
switch(getFireLoss())
if(1 to 50)
adjustFireLoss(-1)
if(51 to 100)
adjustFireLoss(-5)
if(getFireLoss())
if((COLD_RESISTANCE in mutations) && prob(50))
switch(getFireLoss())
if(1 to 50)
adjustFireLoss(-1)
if(51 to 100)
adjustFireLoss(-5)
if ((HULK in mutations) && health <= 25)
mutations.Remove(HULK)
src << "\red You suddenly feel very weak."
Weaken(3)
emote("collapse")
if ((HULK in mutations) && health <= 25)
mutations.Remove(HULK)
src << "\red You suddenly feel very weak."
Weaken(3)
if (radiation)
if (radiation > 100)
radiation = 100
Weaken(10)
src << "\red You feel weak."
emote("collapse")
if (radiation)
if (radiation > 100)
radiation = 100
Weaken(10)
src << "\red You feel weak."
emote("collapse")
switch(radiation)
if(1 to 49)
radiation--
if(prob(25))
adjustToxLoss(1)
updatehealth()
if(50 to 74)
radiation -= 2
switch(radiation)
if(1 to 49)
radiation--
if(prob(25))
adjustToxLoss(1)
if(prob(5))
radiation -= 5
Weaken(3)
src << "\red You feel weak."
emote("collapse")
updatehealth()
if(75 to 100)
radiation -= 3
adjustToxLoss(3)
if(prob(1))
src << "\red You mutate!"
randmutb(src)
domutcheck(src,null)
emote("gasp")
updatehealth()
if(50 to 74)
radiation -= 2
adjustToxLoss(1)
if(prob(5))
radiation -= 5
Weaken(3)
src << "\red You feel weak."
emote("collapse")
updatehealth()
if(75 to 100)
radiation -= 3
adjustToxLoss(3)
if(prob(1))
src << "\red You mutate!"
randmutb(src)
domutcheck(src,null)
emote("gasp")
updatehealth()
proc/breathe()
if(reagents)
/mob/living/carbon/monkey/proc/breathe()
if(reagents)
if(reagents.has_reagent("lexorin")) return
if(reagents.has_reagent("lexorin")) return
if(!loc) return //probably ought to make a proper fix for this, but :effort: --NeoFite
if(!loc) return //probably ought to make a proper fix for this, but :effort: --NeoFite
var/datum/gas_mixture/environment = loc.return_air()
var/datum/gas_mixture/breath
if(health <= config.health_threshold_crit)
losebreath++
if(losebreath>0) //Suffocating so do not take a breath
losebreath--
if (prob(75)) //High chance of gasping for air
spawn emote("gasp")
var/datum/gas_mixture/environment = loc.return_air()
var/datum/gas_mixture/breath
if(health <= config.health_threshold_crit)
losebreath++
if(losebreath>0) //Suffocating so do not take a breath
losebreath--
if (prob(75)) //High chance of gasping for air
spawn emote("gasp")
if(istype(loc, /obj/))
var/obj/location_as_object = loc
location_as_object.handle_internal_lifeform(src, 0)
else
//First, check for air from internal atmosphere (using an air tank and mask generally)
breath = get_breath_from_internal(BREATH_VOLUME)
//No breath from internal atmosphere so get breath from location
if(!breath)
if(istype(loc, /obj/))
var/obj/location_as_object = loc
breath = location_as_object.handle_internal_lifeform(src, BREATH_VOLUME)
else if(istype(loc, /turf/))
var/breath_moles = environment.total_moles()*BREATH_PERCENTAGE
breath = loc.remove_air(breath_moles)
// Handle chem smoke effect -- Doohl
var/block = 0
if(wear_mask)
if(istype(wear_mask, /obj/item/clothing/mask/gas))
block = 1
if(!block)
for(var/obj/effect/effect/chem_smoke/smoke in view(1, src))
if(smoke.reagents.total_volume)
smoke.reagents.reaction(src, INGEST)
spawn(5)
if(smoke)
smoke.reagents.copy_to(src, 10) // I dunno, maybe the reagents enter the blood stream through the lungs?
break // If they breathe in the nasty stuff once, no need to continue checking
else //Still give containing object the chance to interact
if(istype(loc, /obj/))
var/obj/location_as_object = loc
location_as_object.handle_internal_lifeform(src, 0)
else
//First, check for air from internal atmosphere (using an air tank and mask generally)
breath = get_breath_from_internal(BREATH_VOLUME)
//No breath from internal atmosphere so get breath from location
if(!breath)
if(istype(loc, /obj/))
var/obj/location_as_object = loc
breath = location_as_object.handle_internal_lifeform(src, BREATH_VOLUME)
else if(istype(loc, /turf/))
var/breath_moles = environment.total_moles()*BREATH_PERCENTAGE
breath = loc.remove_air(breath_moles)
handle_breath(breath)
// Handle chem smoke effect -- Doohl
var/block = 0
if(wear_mask)
if(istype(wear_mask, /obj/item/clothing/mask/gas))
block = 1
if(!block)
for(var/obj/effect/effect/chem_smoke/smoke in view(1, src))
if(smoke.reagents.total_volume)
smoke.reagents.reaction(src, INGEST)
spawn(5)
if(smoke)
smoke.reagents.copy_to(src, 10) // I dunno, maybe the reagents enter the blood stream through the lungs?
break // If they breathe in the nasty stuff once, no need to continue checking
if(breath)
loc.assume_air(breath)
else //Still give containing object the chance to interact
if(istype(loc, /obj/))
var/obj/location_as_object = loc
location_as_object.handle_internal_lifeform(src, 0)
handle_breath(breath)
if(breath)
loc.assume_air(breath)
proc/get_breath_from_internal(volume_needed)
/mob/living/carbon/monkey/proc/get_breath_from_internal(volume_needed)
if(internal)
if (!contents.Find(internal))
internal = null
if (!wear_mask || !(wear_mask.flags|MASKINTERNALS) )
internal = null
if(internal)
if (!contents.Find(internal))
internal = null
if (!wear_mask || !(wear_mask.flags|MASKINTERNALS) )
internal = null
if(internal)
if (internals)
internals.icon_state = "internal1"
return internal.remove_air_volume(volume_needed)
else
if (internals)
internals.icon_state = "internal0"
return null
proc/handle_breath(datum/gas_mixture/breath)
if(status_flags & GODMODE)
return
if(!breath || (breath.total_moles() == 0))
adjustOxyLoss(7)
oxygen_alert = max(oxygen_alert, 1)
return 0
var/safe_oxygen_min = 16 // Minimum safe partial pressure of O2, in kPa
//var/safe_oxygen_max = 140 // Maximum safe partial pressure of O2, in kPa (Not used for now)
var/safe_co2_max = 10 // Yes it's an arbitrary value who cares?
var/safe_toxins_max = 0.5
var/SA_para_min = 0.5
var/SA_sleep_min = 5
var/oxygen_used = 0
var/breath_pressure = (breath.total_moles()*R_IDEAL_GAS_EQUATION*breath.temperature)/BREATH_VOLUME
//Partial pressure of the O2 in our breath
var/O2_pp = (breath.oxygen/breath.total_moles())*breath_pressure
// Same, but for the toxins
var/Toxins_pp = (breath.toxins/breath.total_moles())*breath_pressure
// 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
if(O2_pp < safe_oxygen_min) // Too little oxygen
if(prob(20))
spawn(0) emote("gasp")
if (O2_pp == 0)
O2_pp = 0.01
var/ratio = safe_oxygen_min/O2_pp
adjustOxyLoss(min(5*ratio, 7)) // Don't fuck them up too fast (space only does 7 after all!)
oxygen_used = breath.oxygen*ratio/6
oxygen_alert = max(oxygen_alert, 1)
/*else if (O2_pp > safe_oxygen_max) // Too much oxygen (commented this out for now, I'll deal with pressure damage elsewhere I suppose)
spawn(0) emote("cough")
var/ratio = O2_pp/safe_oxygen_max
oxyloss += 5*ratio
oxygen_used = breath.oxygen*ratio/6
oxygen_alert = max(oxygen_alert, 1)*/
else // We're in safe limits
adjustOxyLoss(-5)
oxygen_used = breath.oxygen/6
oxygen_alert = 0
breath.oxygen -= oxygen_used
breath.carbon_dioxide += oxygen_used
if(CO2_pp > safe_co2_max)
if(!co2overloadtime) // If it's the first breath with too much CO2 in it, lets start a counter, then have them pass out after 12s or so.
co2overloadtime = world.time
else if(world.time - co2overloadtime > 120)
Paralyse(3)
adjustOxyLoss(3) // Lets hurt em a little, let them know we mean business
if(world.time - co2overloadtime > 300) // They've been in here 30s now, lets start to kill them for their own good!
adjustOxyLoss(8)
if(prob(20)) // Lets give them some chance to know somethings not right though I guess.
spawn(0) emote("cough")
if (internals)
internals.icon_state = "internal1"
return internal.remove_air_volume(volume_needed)
else
co2overloadtime = 0
if(Toxins_pp > safe_toxins_max) // Too much toxins
var/ratio = (breath.toxins/safe_toxins_max) * 10
//adjustToxLoss(Clamp(ratio, MIN_PLASMA_DAMAGE, MAX_PLASMA_DAMAGE)) //Limit amount of damage toxin exposure can do per second
if(reagents)
reagents.add_reagent("plasma", Clamp(ratio, MIN_PLASMA_DAMAGE, MAX_PLASMA_DAMAGE))
toxins_alert = max(toxins_alert, 1)
else
toxins_alert = 0
if(breath.trace_gases.len) // If there's some other shit in the air lets deal with it here.
for(var/datum/gas/sleeping_agent/SA in breath.trace_gases)
var/SA_pp = (SA.moles/breath.total_moles())*breath_pressure
if(SA_pp > SA_para_min) // Enough to make us paralysed for a bit
Paralyse(3) // 3 gives them one second to wake up and run away a bit!
if(SA_pp > SA_sleep_min) // Enough to make us sleep as well
sleeping = max(sleeping+2, 10)
else if(SA_pp > 0.01) // There is sleeping gas in their lungs, but only a little, so give them a bit of a warning
if(prob(20))
spawn(0) emote(pick("giggle", "laugh"))
if(breath.temperature > (T0C+66)) // Hot air hurts :(
if(prob(20))
src << "\red You feel a searing heat in your lungs!"
fire_alert = max(fire_alert, 2)
else
fire_alert = 0
//Temporary fixes to the alerts.
return 1
proc/handle_environment(datum/gas_mixture/environment)
if(!environment)
return
var/environment_heat_capacity = environment.heat_capacity()
if(istype(get_turf(src), /turf/space))
var/turf/heat_turf = get_turf(src)
environment_heat_capacity = heat_turf.heat_capacity
if(!on_fire)
if((environment.temperature > (T0C + 50)) || (environment.temperature < (T0C + 10)))
var/transfer_coefficient = 1
handle_temperature_damage(HEAD, environment.temperature, environment_heat_capacity*transfer_coefficient)
if(stat != 2)
bodytemperature += 0.1*(environment.temperature - bodytemperature)*environment_heat_capacity/(environment_heat_capacity + 270000)
//Account for massive pressure differences
var/pressure = environment.return_pressure()
var/adjusted_pressure = calculate_affecting_pressure(pressure) //Returns how much pressure actually affects the mob.
switch(adjusted_pressure)
if(HAZARD_HIGH_PRESSURE to INFINITY)
adjustBruteLoss( min( ( (adjusted_pressure / HAZARD_HIGH_PRESSURE) -1 )*PRESSURE_DAMAGE_COEFFICIENT , MAX_HIGH_PRESSURE_DAMAGE) )
pressure_alert = 2
if(WARNING_HIGH_PRESSURE to HAZARD_HIGH_PRESSURE)
pressure_alert = 1
if(WARNING_LOW_PRESSURE to WARNING_HIGH_PRESSURE)
pressure_alert = 0
if(HAZARD_LOW_PRESSURE to WARNING_LOW_PRESSURE)
pressure_alert = -1
else
if( !(COLD_RESISTANCE in mutations) )
adjustBruteLoss( LOW_PRESSURE_DAMAGE )
pressure_alert = -2
else
pressure_alert = -1
if (internals)
internals.icon_state = "internal0"
return null
/mob/living/carbon/monkey/proc/handle_breath(datum/gas_mixture/breath)
if(status_flags & GODMODE)
return
proc/handle_temperature_damage(body_part, exposed_temperature, exposed_intensity)
if(status_flags & GODMODE) return
var/discomfort = min( abs(exposed_temperature - bodytemperature)*(exposed_intensity)/2000000, 1.0)
//adjustFireLoss(2.5*discomfort)
if(!breath || (breath.total_moles() == 0))
adjustOxyLoss(7)
if(exposed_temperature > bodytemperature)
adjustFireLoss(20.0*discomfort)
oxygen_alert = max(oxygen_alert, 1)
return 0
var/safe_oxygen_min = 16 // Minimum safe partial pressure of O2, in kPa
//var/safe_oxygen_max = 140 // Maximum safe partial pressure of O2, in kPa (Not used for now)
var/safe_co2_max = 10 // Yes it's an arbitrary value who cares?
var/safe_toxins_max = 0.5
var/SA_para_min = 0.5
var/SA_sleep_min = 5
var/oxygen_used = 0
var/breath_pressure = (breath.total_moles()*R_IDEAL_GAS_EQUATION*breath.temperature)/BREATH_VOLUME
//Partial pressure of the O2 in our breath
var/O2_pp = (breath.oxygen/breath.total_moles())*breath_pressure
// Same, but for the toxins
var/Toxins_pp = (breath.toxins/breath.total_moles())*breath_pressure
// 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
if(O2_pp < safe_oxygen_min) // Too little oxygen
if(prob(20))
spawn(0) emote("gasp")
if (O2_pp == 0)
O2_pp = 0.01
var/ratio = safe_oxygen_min/O2_pp
adjustOxyLoss(min(5*ratio, 7)) // Don't fuck them up too fast (space only does 7 after all!)
oxygen_used = breath.oxygen*ratio/6
oxygen_alert = max(oxygen_alert, 1)
/*else if (O2_pp > safe_oxygen_max) // Too much oxygen (commented this out for now, I'll deal with pressure damage elsewhere I suppose)
spawn(0) emote("cough")
var/ratio = O2_pp/safe_oxygen_max
oxyloss += 5*ratio
oxygen_used = breath.oxygen*ratio/6
oxygen_alert = max(oxygen_alert, 1)*/
else // We're in safe limits
adjustOxyLoss(-5)
oxygen_used = breath.oxygen/6
oxygen_alert = 0
breath.oxygen -= oxygen_used
breath.carbon_dioxide += oxygen_used
if(CO2_pp > safe_co2_max)
if(!co2overloadtime) // If it's the first breath with too much CO2 in it, lets start a counter, then have them pass out after 12s or so.
co2overloadtime = world.time
else if(world.time - co2overloadtime > 120)
Paralyse(3)
adjustOxyLoss(3) // Lets hurt em a little, let them know we mean business
if(world.time - co2overloadtime > 300) // They've been in here 30s now, lets start to kill them for their own good!
adjustOxyLoss(8)
if(prob(20)) // Lets give them some chance to know somethings not right though I guess.
spawn(0) emote("cough")
else
co2overloadtime = 0
if(Toxins_pp > safe_toxins_max) // Too much toxins
var/ratio = (breath.toxins/safe_toxins_max) * 10
//adjustToxLoss(Clamp(ratio, MIN_PLASMA_DAMAGE, MAX_PLASMA_DAMAGE)) //Limit amount of damage toxin exposure can do per second
if(reagents)
reagents.add_reagent("plasma", Clamp(ratio, MIN_PLASMA_DAMAGE, MAX_PLASMA_DAMAGE))
toxins_alert = max(toxins_alert, 1)
else
toxins_alert = 0
if(breath.trace_gases.len) // If there's some other shit in the air lets deal with it here.
for(var/datum/gas/sleeping_agent/SA in breath.trace_gases)
var/SA_pp = (SA.moles/breath.total_moles())*breath_pressure
if(SA_pp > SA_para_min) // Enough to make us paralysed for a bit
Paralyse(3) // 3 gives them one second to wake up and run away a bit!
if(SA_pp > SA_sleep_min) // Enough to make us sleep as well
sleeping = max(sleeping+2, 10)
else if(SA_pp > 0.01) // There is sleeping gas in their lungs, but only a little, so give them a bit of a warning
if(prob(20))
spawn(0) emote(pick("giggle", "laugh"))
if(breath.temperature > (T0C+66)) // Hot air hurts :(
if(prob(20))
src << "\red You feel a searing heat in your lungs!"
fire_alert = max(fire_alert, 2)
else
fire_alert = 0
//Temporary fixes to the alerts.
return 1
/mob/living/carbon/monkey/proc/handle_environment(datum/gas_mixture/environment)
if(!environment)
return
var/environment_heat_capacity = environment.heat_capacity()
if(istype(get_turf(src), /turf/space))
var/turf/heat_turf = get_turf(src)
environment_heat_capacity = heat_turf.heat_capacity
if(!on_fire)
if((environment.temperature > (T0C + 50)) || (environment.temperature < (T0C + 10)))
var/transfer_coefficient = 1
handle_temperature_damage(HEAD, environment.temperature, environment_heat_capacity*transfer_coefficient)
if(stat != 2)
bodytemperature += 0.1*(environment.temperature - bodytemperature)*environment_heat_capacity/(environment_heat_capacity + 270000)
//Account for massive pressure differences
var/pressure = environment.return_pressure()
var/adjusted_pressure = calculate_affecting_pressure(pressure) //Returns how much pressure actually affects the mob.
switch(adjusted_pressure)
if(HAZARD_HIGH_PRESSURE to INFINITY)
adjustBruteLoss( min( ( (adjusted_pressure / HAZARD_HIGH_PRESSURE) -1 )*PRESSURE_DAMAGE_COEFFICIENT , MAX_HIGH_PRESSURE_DAMAGE) )
pressure_alert = 2
if(WARNING_HIGH_PRESSURE to HAZARD_HIGH_PRESSURE)
pressure_alert = 1
if(WARNING_LOW_PRESSURE to WARNING_HIGH_PRESSURE)
pressure_alert = 0
if(HAZARD_LOW_PRESSURE to WARNING_LOW_PRESSURE)
pressure_alert = -1
else
adjustFireLoss(5.0*discomfort)
proc/handle_chemicals_in_body()
if(reagents) reagents.metabolize(src)
if (drowsyness)
drowsyness--
eye_blurry = max(2, eye_blurry)
if (prob(5))
sleeping += 1
Paralyse(5)
confused = max(0, confused - 1)
// decrement dizziness counter, clamped to 0
if(resting)
dizziness = max(0, dizziness - 5)
else
dizziness = max(0, dizziness - 1)
updatehealth()
return //TODO: DEFERRED
proc/handle_regular_status_updates()
updatehealth()
if(stat == DEAD) //DEAD. BROWN BREAD. SWIMMING WITH THE SPESS CARP
blinded = 1
silent = 0
else //ALIVE. LIGHTS ARE ON
if(health < config.health_threshold_dead || !getorgan(/obj/item/organ/brain))
death()
blinded = 1
stat = DEAD
silent = 0
return 1
//UNCONSCIOUS. NO-ONE IS HOME
if( (getOxyLoss() > 25) || (config.health_threshold_crit >= health) )
if( health <= 20 && prob(1) )
spawn(0)
emote("gasp")
if(!reagents.has_reagent("inaprovaline"))
adjustOxyLoss(1)
Paralyse(3)
if(paralysis)
AdjustParalysis(-1)
blinded = 1
stat = UNCONSCIOUS
else if(sleeping)
sleeping = max(sleeping-1, 0)
blinded = 1
stat = UNCONSCIOUS
if( prob(10) && health )
spawn(0)
emote("snore")
//CONSCIOUS
if( !(COLD_RESISTANCE in mutations) )
adjustBruteLoss( LOW_PRESSURE_DAMAGE )
pressure_alert = -2
else
stat = CONSCIOUS
pressure_alert = -1
//Eyes
if(sdisabilities & BLIND) //disabled-blind, doesn't get better on its own
blinded = 1
else if(eye_blind) //blindness, heals slowly over time
eye_blind = max(eye_blind-1,0)
blinded = 1
else if(eye_blurry) //blurry eyes heal slowly
eye_blurry = max(eye_blurry-1, 0)
return
//Ears
if(sdisabilities & DEAF) //disabled-deaf, doesn't get better on its own
ear_deaf = max(ear_deaf, 1)
else if(ear_deaf) //deafness, heals slowly over time
ear_deaf = max(ear_deaf-1, 0)
else if(ear_damage < 25) //ear damage heals slowly under this threshold. otherwise you'll need earmuffs
ear_damage = max(ear_damage-0.05, 0)
/mob/living/carbon/monkey/proc/handle_temperature_damage(body_part, exposed_temperature, exposed_intensity)
if(status_flags & GODMODE) return
var/discomfort = min( abs(exposed_temperature - bodytemperature)*(exposed_intensity)/2000000, 1.0)
//adjustFireLoss(2.5*discomfort)
//Other
if(stunned)
AdjustStunned(-1)
if(exposed_temperature > bodytemperature)
adjustFireLoss(20.0*discomfort)
if(weakened)
weakened = max(weakened-1,0)
else
adjustFireLoss(5.0*discomfort)
if(stuttering)
stuttering = max(stuttering-1, 0)
/mob/living/carbon/monkey/proc/handle_chemicals_in_body()
if(silent)
silent = max(silent-1, 0)
if(reagents) reagents.metabolize(src)
if (drowsyness)
drowsyness--
eye_blurry = max(2, eye_blurry)
if (prob(5))
sleeping += 1
Paralyse(5)
confused = max(0, confused - 1)
// decrement dizziness counter, clamped to 0
if(resting)
dizziness = max(0, dizziness - 5)
else
dizziness = max(0, dizziness - 1)
updatehealth()
return //TODO: DEFERRED
/mob/living/carbon/monkey/proc/handle_regular_status_updates()
updatehealth()
if(stat == DEAD) //DEAD. BROWN BREAD. SWIMMING WITH THE SPESS CARP
blinded = 1
silent = 0
else //ALIVE. LIGHTS ARE ON
if(health < config.health_threshold_dead || !getorgan(/obj/item/organ/brain))
death()
blinded = 1
stat = DEAD
silent = 0
return 1
//UNCONSCIOUS. NO-ONE IS HOME
if( (getOxyLoss() > 25) || (config.health_threshold_crit >= health) )
if( health <= 20 && prob(1) )
spawn(0)
emote("gasp")
if(!reagents.has_reagent("inaprovaline"))
adjustOxyLoss(1)
Paralyse(3)
if(paralysis)
AdjustParalysis(-1)
blinded = 1
stat = UNCONSCIOUS
else if(sleeping)
sleeping = max(sleeping-1, 0)
blinded = 1
stat = UNCONSCIOUS
if( prob(10) && health )
spawn(0)
emote("snore")
//CONSCIOUS
else
stat = CONSCIOUS
//Eyes
if(sdisabilities & BLIND) //disabled-blind, doesn't get better on its own
blinded = 1
else if(eye_blind) //blindness, heals slowly over time
eye_blind = max(eye_blind-1,0)
blinded = 1
else if(eye_blurry) //blurry eyes heal slowly
eye_blurry = max(eye_blurry-1, 0)
//Ears
if(sdisabilities & DEAF) //disabled-deaf, doesn't get better on its own
ear_deaf = max(ear_deaf, 1)
else if(ear_deaf) //deafness, heals slowly over time
ear_deaf = max(ear_deaf-1, 0)
else if(ear_damage < 25) //ear damage heals slowly under this threshold. otherwise you'll need earmuffs
ear_damage = max(ear_damage-0.05, 0)
//Other
if(stunned)
AdjustStunned(-1)
if(weakened)
weakened = max(weakened-1,0)
if(stuttering)
stuttering = max(stuttering-1, 0)
if(silent)
silent = max(silent-1, 0)
if(druggy)
druggy = max(druggy-1, 0)
CheckStamina()
return 1
/mob/living/carbon/monkey/proc/handle_regular_hud_updates()
if (stat == 2 || (XRAY in mutations))
sight |= SEE_TURFS
sight |= SEE_MOBS
sight |= SEE_OBJS
see_in_dark = 8
see_invisible = SEE_INVISIBLE_LEVEL_TWO
else if (stat != 2)
sight &= ~SEE_TURFS
sight &= ~SEE_MOBS
sight &= ~SEE_OBJS
see_in_dark = 2
see_invisible = SEE_INVISIBLE_LIVING
if(see_override)
see_invisible = see_override
if (healths)
if (stat != 2)
switch(health)
if(100 to INFINITY)
healths.icon_state = "health0"
if(80 to 100)
healths.icon_state = "health1"
if(60 to 80)
healths.icon_state = "health2"
if(40 to 60)
healths.icon_state = "health3"
if(20 to 40)
healths.icon_state = "health4"
if(0 to 20)
healths.icon_state = "health5"
else
healths.icon_state = "health6"
else
healths.icon_state = "health7"
if(pressure)
pressure.icon_state = "pressure[pressure_alert]"
if(pullin)
if(pulling)
pullin.icon_state = "pull"
else
pullin.icon_state = "pull0"
if (toxin) toxin.icon_state = "tox[toxins_alert ? 1 : 0]"
if (oxygen) oxygen.icon_state = "oxy[oxygen_alert ? 1 : 0]"
if (fire) fire.icon_state = "fire[fire_alert ? 2 : 0]"
//NOTE: the alerts dont reset when youre out of danger. dont blame me,
//blame the person who coded them. Temporary fix added.
if(bodytemp)
switch(bodytemperature) //310.055 optimal body temp
if(345 to INFINITY)
bodytemp.icon_state = "temp4"
if(335 to 345)
bodytemp.icon_state = "temp3"
if(327 to 335)
bodytemp.icon_state = "temp2"
if(316 to 327)
bodytemp.icon_state = "temp1"
if(300 to 316)
bodytemp.icon_state = "temp0"
if(295 to 300)
bodytemp.icon_state = "temp-1"
if(280 to 295)
bodytemp.icon_state = "temp-2"
if(260 to 280)
bodytemp.icon_state = "temp-3"
else
bodytemp.icon_state = "temp-4"
client.screen.Remove(global_hud.blurry,global_hud.druggy,global_hud.vimpaired)
if(blind && stat != DEAD)
if(blinded)
blind.layer = 18
else
blind.layer = 0
if(disabilities & NEARSIGHTED)
client.screen += global_hud.vimpaired
if(eye_blurry)
client.screen += global_hud.blurry
if(druggy)
druggy = max(druggy-1, 0)
client.screen += global_hud.druggy
CheckStamina()
return 1
if (stat != 2)
if (machine)
if (!( machine.check_eye(src) ))
reset_view(null)
else
if(!client.adminobs)
reset_view(null)
return 1
/mob/living/carbon/monkey/proc/handle_random_events()
if (prob(1) && prob(2))
spawn(0)
emote("scratch")
return
proc/handle_regular_hud_updates()
if (stat == 2 || (XRAY in mutations))
sight |= SEE_TURFS
sight |= SEE_MOBS
sight |= SEE_OBJS
see_in_dark = 8
see_invisible = SEE_INVISIBLE_LEVEL_TWO
else if (stat != 2)
sight &= ~SEE_TURFS
sight &= ~SEE_MOBS
sight &= ~SEE_OBJS
see_in_dark = 2
see_invisible = SEE_INVISIBLE_LIVING
if(see_override)
see_invisible = see_override
if (healths)
if (stat != 2)
switch(health)
if(100 to INFINITY)
healths.icon_state = "health0"
if(80 to 100)
healths.icon_state = "health1"
if(60 to 80)
healths.icon_state = "health2"
if(40 to 60)
healths.icon_state = "health3"
if(20 to 40)
healths.icon_state = "health4"
if(0 to 20)
healths.icon_state = "health5"
else
healths.icon_state = "health6"
else
healths.icon_state = "health7"
if(pressure)
pressure.icon_state = "pressure[pressure_alert]"
if(pullin)
if(pulling)
pullin.icon_state = "pull"
else
pullin.icon_state = "pull0"
if (toxin) toxin.icon_state = "tox[toxins_alert ? 1 : 0]"
if (oxygen) oxygen.icon_state = "oxy[oxygen_alert ? 1 : 0]"
if (fire) fire.icon_state = "fire[fire_alert ? 2 : 0]"
//NOTE: the alerts dont reset when youre out of danger. dont blame me,
//blame the person who coded them. Temporary fix added.
if(bodytemp)
switch(bodytemperature) //310.055 optimal body temp
if(345 to INFINITY)
bodytemp.icon_state = "temp4"
if(335 to 345)
bodytemp.icon_state = "temp3"
if(327 to 335)
bodytemp.icon_state = "temp2"
if(316 to 327)
bodytemp.icon_state = "temp1"
if(300 to 316)
bodytemp.icon_state = "temp0"
if(295 to 300)
bodytemp.icon_state = "temp-1"
if(280 to 295)
bodytemp.icon_state = "temp-2"
if(260 to 280)
bodytemp.icon_state = "temp-3"
else
bodytemp.icon_state = "temp-4"
client.screen.Remove(global_hud.blurry,global_hud.druggy,global_hud.vimpaired)
if(blind && stat != DEAD)
if(blinded)
blind.layer = 18
else
blind.layer = 0
if(disabilities & NEARSIGHTED)
client.screen += global_hud.vimpaired
if(eye_blurry)
client.screen += global_hud.blurry
if(druggy)
client.screen += global_hud.druggy
if (stat != 2)
if (machine)
if (!( machine.check_eye(src) ))
reset_view(null)
else
if(!client.adminobs)
reset_view(null)
return 1
proc/handle_random_events()
if (prob(1) && prob(2))
spawn(0)
emote("scratch")
return
proc/handle_changeling()
if(mind && mind.changeling)
mind.changeling.regenerate()
hud_used.lingchemdisplay.invisibility = 0
hud_used.lingchemdisplay.maptext = "<div align='center' valign='middle' style='position:relative; top:0px; left:6px'> <font color='#dd66dd'>[src.mind.changeling.chem_charges]</font></div>"
/mob/living/carbon/monkey/proc/handle_changeling()
if(mind && mind.changeling)
mind.changeling.regenerate()
hud_used.lingchemdisplay.invisibility = 0
hud_used.lingchemdisplay.maptext = "<div align='center' valign='middle' style='position:relative; top:0px; left:6px'> <font color='#dd66dd'>[src.mind.changeling.chem_charges]</font></div>"
///FIRE CODE
handle_fire()
if(..())
return
adjustFireLoss(6)
/mob/living/carbon/monkey/handle_fire()
if(..())
return
//END FIRE CODE
adjustFireLoss(6)
return
//END FIRE CODE
+171 -171
View File
@@ -20,198 +20,198 @@ var/datum/paiController/paiController // Global handler for pAI candidates
var/askDelay = 10 * 60 * 1 // One minute [ms * sec * min]
Topic(href, href_list[])
if(href_list["download"])
var/datum/paiCandidate/candidate = locate(href_list["candidate"])
var/obj/item/device/paicard/card = locate(href_list["device"])
if(card.pai)
/datum/paiController/Topic(href, href_list[])
if(href_list["download"])
var/datum/paiCandidate/candidate = locate(href_list["candidate"])
var/obj/item/device/paicard/card = locate(href_list["device"])
if(card.pai)
return
if(istype(card,/obj/item/device/paicard) && istype(candidate,/datum/paiCandidate))
var/mob/living/silicon/pai/pai = new(card)
if(!candidate.name)
pai.name = pick(ninja_names)
else
pai.name = candidate.name
pai.real_name = pai.name
pai.key = candidate.key
card.setPersonality(pai)
card.looking_for_personality = 0
ticker.mode.update_cult_icons_removed(card.pai.mind)
ticker.mode.update_rev_icons_removed(card.pai.mind)
pai_candidates -= candidate
usr << browse(null, "window=findPai")
if(href_list["new"])
var/datum/paiCandidate/candidate = locate(href_list["candidate"])
var/option = href_list["option"]
var/t = ""
switch(option)
if("name")
t = input("Enter a name for your pAI", "pAI Name", candidate.name) as text
if(t)
candidate.name = copytext(sanitize(t),1,MAX_NAME_LEN)
if("desc")
t = input("Enter a description for your pAI", "pAI Description", candidate.description) as message
if(t)
candidate.description = copytext(sanitize(t),1,MAX_MESSAGE_LEN)
if("role")
t = input("Enter a role for your pAI", "pAI Role", candidate.role) as text
if(t)
candidate.role = copytext(sanitize(t),1,MAX_MESSAGE_LEN)
if("ooc")
t = input("Enter any OOC comments", "pAI OOC Comments", candidate.comments) as message
if(t)
candidate.comments = copytext(sanitize(t),1,MAX_MESSAGE_LEN)
if("save")
candidate.savefile_save(usr)
if("load")
candidate.savefile_load(usr)
//In case people have saved unsanitized stuff.
if(candidate.name)
candidate.name = copytext(sanitize(candidate.name),1,MAX_NAME_LEN)
if(candidate.description)
candidate.description = copytext(sanitize(candidate.description),1,MAX_MESSAGE_LEN)
if(candidate.role)
candidate.role = copytext(sanitize(candidate.role),1,MAX_MESSAGE_LEN)
if(candidate.comments)
candidate.comments = copytext(sanitize(candidate.comments),1,MAX_MESSAGE_LEN)
if("submit")
if(candidate)
candidate.ready = 1
for(var/obj/item/device/paicard/p in world)
if(p.looking_for_personality == 1)
p.alertUpdate()
usr << browse(null, "window=paiRecruit")
return
if(istype(card,/obj/item/device/paicard) && istype(candidate,/datum/paiCandidate))
var/mob/living/silicon/pai/pai = new(card)
if(!candidate.name)
pai.name = pick(ninja_names)
else
pai.name = candidate.name
pai.real_name = pai.name
pai.key = candidate.key
recruitWindow(usr)
card.setPersonality(pai)
card.looking_for_personality = 0
ticker.mode.update_cult_icons_removed(card.pai.mind)
ticker.mode.update_rev_icons_removed(card.pai.mind)
pai_candidates -= candidate
usr << browse(null, "window=findPai")
if(href_list["new"])
var/datum/paiCandidate/candidate = locate(href_list["candidate"])
var/option = href_list["option"]
var/t = ""
switch(option)
if("name")
t = input("Enter a name for your pAI", "pAI Name", candidate.name) as text
if(t)
candidate.name = copytext(sanitize(t),1,MAX_NAME_LEN)
if("desc")
t = input("Enter a description for your pAI", "pAI Description", candidate.description) as message
if(t)
candidate.description = copytext(sanitize(t),1,MAX_MESSAGE_LEN)
if("role")
t = input("Enter a role for your pAI", "pAI Role", candidate.role) as text
if(t)
candidate.role = copytext(sanitize(t),1,MAX_MESSAGE_LEN)
if("ooc")
t = input("Enter any OOC comments", "pAI OOC Comments", candidate.comments) as message
if(t)
candidate.comments = copytext(sanitize(t),1,MAX_MESSAGE_LEN)
if("save")
candidate.savefile_save(usr)
if("load")
candidate.savefile_load(usr)
//In case people have saved unsanitized stuff.
if(candidate.name)
candidate.name = copytext(sanitize(candidate.name),1,MAX_NAME_LEN)
if(candidate.description)
candidate.description = copytext(sanitize(candidate.description),1,MAX_MESSAGE_LEN)
if(candidate.role)
candidate.role = copytext(sanitize(candidate.role),1,MAX_MESSAGE_LEN)
if(candidate.comments)
candidate.comments = copytext(sanitize(candidate.comments),1,MAX_MESSAGE_LEN)
if("submit")
if(candidate)
candidate.ready = 1
for(var/obj/item/device/paicard/p in world)
if(p.looking_for_personality == 1)
p.alertUpdate()
usr << browse(null, "window=paiRecruit")
return
recruitWindow(usr)
proc/recruitWindow(var/mob/M as mob)
var/datum/paiCandidate/candidate
for(var/datum/paiCandidate/c in pai_candidates)
if(c.key == M.key)
candidate = c
if(!candidate)
candidate = new /datum/paiCandidate()
candidate.key = M.key
pai_candidates.Add(candidate)
/datum/paiController/proc/recruitWindow(var/mob/M as mob)
var/datum/paiCandidate/candidate
for(var/datum/paiCandidate/c in pai_candidates)
if(c.key == M.key)
candidate = c
if(!candidate)
candidate = new /datum/paiCandidate()
candidate.key = M.key
pai_candidates.Add(candidate)
var/dat = ""
dat += {"
<style type="text/css">
var/dat = ""
dat += {"
<style type="text/css">
p.top {
background-color: #AAAAAA; color: black;
}
p.top {
background-color: #AAAAAA; color: black;
}
tr.d0 td {
background-color: #CC9999; color: black;
}
tr.d1 td {
background-color: #9999CC; color: black;
}
</style>
"}
tr.d0 td {
background-color: #CC9999; color: black;
}
tr.d1 td {
background-color: #9999CC; color: black;
}
</style>
"}
dat += "<p class=\"top\">Please configure your pAI personality's options. Remember, what you enter here could determine whether or not the user requesting a personality chooses you!</p>"
dat += "<table>"
dat += "<tr class=\"d0\"><td>Name:</td><td>[candidate.name]</td></tr>"
dat += "<tr class=\"d1\"><td><a href='byond://?src=\ref[src];option=name;new=1;candidate=\ref[candidate]'>\[Edit\]</a></td><td>What you plan to call yourself. Suggestions: Any character name you would choose for a station character OR an AI.</td></tr>"
dat += "<p class=\"top\">Please configure your pAI personality's options. Remember, what you enter here could determine whether or not the user requesting a personality chooses you!</p>"
dat += "<table>"
dat += "<tr class=\"d0\"><td>Name:</td><td>[candidate.name]</td></tr>"
dat += "<tr class=\"d1\"><td><a href='byond://?src=\ref[src];option=name;new=1;candidate=\ref[candidate]'>\[Edit\]</a></td><td>What you plan to call yourself. Suggestions: Any character name you would choose for a station character OR an AI.</td></tr>"
dat += "<tr class=\"d0\"><td>Description:</td><td>[candidate.description]</td></tr>"
dat += "<tr class=\"d1\"><td><a href='byond://?src=\ref[src];option=desc;new=1;candidate=\ref[candidate]'>\[Edit\]</a></td><td>What sort of pAI you typically play; your mannerisms, your quirks, etc. This can be as sparse or as detailed as you like.</td></tr>"
dat += "<tr class=\"d0\"><td>Description:</td><td>[candidate.description]</td></tr>"
dat += "<tr class=\"d1\"><td><a href='byond://?src=\ref[src];option=desc;new=1;candidate=\ref[candidate]'>\[Edit\]</a></td><td>What sort of pAI you typically play; your mannerisms, your quirks, etc. This can be as sparse or as detailed as you like.</td></tr>"
dat += "<tr class=\"d0\"><td>Preferred Role:</td><td>[candidate.role]</td></tr>"
dat += "<tr class=\"d1\"><td><a href='byond://?src=\ref[src];option=role;new=1;candidate=\ref[candidate]'>\[Edit\]</a></td><td>Do you like to partner with sneaky social ninjas? Like to help security hunt down thugs? Enjoy watching an engineer's back while he saves the station yet again? This doesn't have to be limited to just station jobs. Pretty much any general descriptor for what you'd like to be doing works here.</td></tr>"
dat += "<tr class=\"d0\"><td>Preferred Role:</td><td>[candidate.role]</td></tr>"
dat += "<tr class=\"d1\"><td><a href='byond://?src=\ref[src];option=role;new=1;candidate=\ref[candidate]'>\[Edit\]</a></td><td>Do you like to partner with sneaky social ninjas? Like to help security hunt down thugs? Enjoy watching an engineer's back while he saves the station yet again? This doesn't have to be limited to just station jobs. Pretty much any general descriptor for what you'd like to be doing works here.</td></tr>"
dat += "<tr class=\"d0\"><td>OOC Comments:</td><td>[candidate.comments]</td></tr>"
dat += "<tr class=\"d1\"><td><a href='byond://?src=\ref[src];option=ooc;new=1;candidate=\ref[candidate]'>\[Edit\]</a></td><td>Anything you'd like to address specifically to the player reading this in an OOC manner. \"I prefer more serious RP.\", \"I'm still learning the interface!\", etc. Feel free to leave this blank if you want.</td></tr>"
dat += "<tr class=\"d0\"><td>OOC Comments:</td><td>[candidate.comments]</td></tr>"
dat += "<tr class=\"d1\"><td><a href='byond://?src=\ref[src];option=ooc;new=1;candidate=\ref[candidate]'>\[Edit\]</a></td><td>Anything you'd like to address specifically to the player reading this in an OOC manner. \"I prefer more serious RP.\", \"I'm still learning the interface!\", etc. Feel free to leave this blank if you want.</td></tr>"
dat += "</table>"
dat += "</table>"
dat += "<br>"
dat += "<h3><a href='byond://?src=\ref[src];option=submit;new=1;candidate=\ref[candidate]'>Submit Personality</a></h3><br>"
dat += "<a href='byond://?src=\ref[src];option=save;new=1;candidate=\ref[candidate]'>Save Personality</a><br>"
dat += "<a href='byond://?src=\ref[src];option=load;new=1;candidate=\ref[candidate]'>Load Personality</a><br>"
dat += "<br>"
dat += "<h3><a href='byond://?src=\ref[src];option=submit;new=1;candidate=\ref[candidate]'>Submit Personality</a></h3><br>"
dat += "<a href='byond://?src=\ref[src];option=save;new=1;candidate=\ref[candidate]'>Save Personality</a><br>"
dat += "<a href='byond://?src=\ref[src];option=load;new=1;candidate=\ref[candidate]'>Load Personality</a><br>"
M << browse(dat, "window=paiRecruit")
M << browse(dat, "window=paiRecruit")
proc/findPAI(var/obj/item/device/paicard/p, var/mob/user)
requestRecruits()
var/list/available = list()
for(var/datum/paiCandidate/c in paiController.pai_candidates)
if(c.ready)
var/found = 0
for(var/mob/dead/observer/o in player_list)
if(o.key == c.key)
found = 1
if(found)
available.Add(c)
var/dat = ""
/datum/paiController/proc/findPAI(var/obj/item/device/paicard/p, var/mob/user)
requestRecruits()
var/list/available = list()
for(var/datum/paiCandidate/c in paiController.pai_candidates)
if(c.ready)
var/found = 0
for(var/mob/dead/observer/o in player_list)
if(o.key == c.key)
found = 1
if(found)
available.Add(c)
var/dat = ""
dat += {"
<style type="text/css">
dat += {"
<style type="text/css">
p.top {
background-color: #AAAAAA; color: black;
}
p.top {
background-color: #AAAAAA; color: black;
}
tr.d0 td {
background-color: #CC9999; color: black;
}
tr.d1 td {
background-color: #9999CC; color: black;
}
tr.d2 td {
background-color: #99CC99; color: black;
}
</style>
"}
dat += "<p class=\"top\">Requesting AI personalities from central database... If there are no entries, or if a suitable entry is not listed, check again later as more personalities may be added.</p>"
tr.d0 td {
background-color: #CC9999; color: black;
}
tr.d1 td {
background-color: #9999CC; color: black;
}
tr.d2 td {
background-color: #99CC99; color: black;
}
</style>
"}
dat += "<p class=\"top\">Requesting AI personalities from central database... If there are no entries, or if a suitable entry is not listed, check again later as more personalities may be added.</p>"
dat += "<table>"
dat += "<table>"
for(var/datum/paiCandidate/c in available)
dat += "<tr class=\"d0\"><td>Name:</td><td>[c.name]</td></tr>"
dat += "<tr class=\"d1\"><td>Description:</td><td>[c.description]</td></tr>"
dat += "<tr class=\"d0\"><td>Preferred Role:</td><td>[c.role]</td></tr>"
dat += "<tr class=\"d1\"><td>OOC Comments:</td><td>[c.comments]</td></tr>"
dat += "<tr class=\"d2\"><td><a href='byond://?src=\ref[src];download=1;candidate=\ref[c];device=\ref[p]'>\[Download [c.name]\]</a></td><td></td></tr>"
for(var/datum/paiCandidate/c in available)
dat += "<tr class=\"d0\"><td>Name:</td><td>[c.name]</td></tr>"
dat += "<tr class=\"d1\"><td>Description:</td><td>[c.description]</td></tr>"
dat += "<tr class=\"d0\"><td>Preferred Role:</td><td>[c.role]</td></tr>"
dat += "<tr class=\"d1\"><td>OOC Comments:</td><td>[c.comments]</td></tr>"
dat += "<tr class=\"d2\"><td><a href='byond://?src=\ref[src];download=1;candidate=\ref[c];device=\ref[p]'>\[Download [c.name]\]</a></td><td></td></tr>"
dat += "</table>"
dat += "</table>"
user << browse(dat, "window=findPai")
user << browse(dat, "window=findPai")
proc/requestRecruits()
for(var/mob/dead/observer/O in player_list)
if(jobban_isbanned(O, "pAI"))
/datum/paiController/proc/requestRecruits()
for(var/mob/dead/observer/O in player_list)
if(jobban_isbanned(O, "pAI"))
continue
if(asked.Find(O.key))
if(world.time < asked[O.key] + askDelay)
continue
if(asked.Find(O.key))
if(world.time < asked[O.key] + askDelay)
continue
else
asked.Remove(O.key)
if(O.client)
var/hasSubmitted = 0
for(var/datum/paiCandidate/c in paiController.pai_candidates)
if(c.key == O.key)
hasSubmitted = 1
if(!hasSubmitted && (O.client.prefs.be_special & BE_PAI))
question(O.client)
else
asked.Remove(O.key)
if(O.client)
var/hasSubmitted = 0
for(var/datum/paiCandidate/c in paiController.pai_candidates)
if(c.key == O.key)
hasSubmitted = 1
if(!hasSubmitted && (O.client.prefs.be_special & BE_PAI))
question(O.client)
proc/question(var/client/C)
spawn(0)
if(!C) return
asked.Add(C.key)
asked[C.key] = world.time
var/response = alert(C, "Someone is requesting a pAI personality. Would you like to play as a personal AI?", "pAI Request", "Yes", "No", "Never for this round")
if(!C) return //handle logouts that happen whilst the alert is waiting for a response.
if(response == "Yes")
recruitWindow(C.mob)
else if (response == "Never for this round")
asked[C.key] = INFINITY
/datum/paiController/proc/question(var/client/C)
spawn(0)
if(!C) return
asked.Add(C.key)
asked[C.key] = world.time
var/response = alert(C, "Someone is requesting a pAI personality. Would you like to play as a personal AI?", "pAI Request", "Yes", "No", "Never for this round")
if(!C) return //handle logouts that happen whilst the alert is waiting for a response.
if(response == "Yes")
recruitWindow(C.mob)
else if (response == "Never for this round")
asked[C.key] = INFINITY
@@ -61,176 +61,177 @@
/obj/item/weapon/robot_module/standard
name = "standard robot module"
New()
..()
modules += new /obj/item/weapon/melee/baton/loaded(src)
modules += new /obj/item/weapon/extinguisher(src)
modules += new /obj/item/weapon/wrench(src)
modules += new /obj/item/weapon/crowbar(src)
modules += new /obj/item/device/healthanalyzer(src)
emag = new /obj/item/weapon/melee/energy/sword(src)
/obj/item/weapon/robot_module/standard/New()
..()
modules += new /obj/item/weapon/melee/baton/loaded(src)
modules += new /obj/item/weapon/extinguisher(src)
modules += new /obj/item/weapon/wrench(src)
modules += new /obj/item/weapon/crowbar(src)
modules += new /obj/item/device/healthanalyzer(src)
emag = new /obj/item/weapon/melee/energy/sword(src)
/obj/item/weapon/robot_module/medical
name = "medical robot module"
New()
..()
modules += new /obj/item/borg/sight/hud/med(src)
modules += new /obj/item/device/healthanalyzer(src)
modules += new /obj/item/weapon/reagent_containers/borghypo(src)
modules += new /obj/item/weapon/reagent_containers/glass/beaker/large(src)
modules += new /obj/item/weapon/reagent_containers/dropper(src)
modules += new /obj/item/weapon/reagent_containers/syringe(src)
modules += new /obj/item/weapon/extinguisher/mini(src)
emag = new /obj/item/weapon/reagent_containers/spray(src)
/obj/item/weapon/robot_module/medical/New()
..()
modules += new /obj/item/borg/sight/hud/med(src)
modules += new /obj/item/device/healthanalyzer(src)
modules += new /obj/item/weapon/reagent_containers/borghypo(src)
modules += new /obj/item/weapon/reagent_containers/glass/beaker/large(src)
modules += new /obj/item/weapon/reagent_containers/dropper(src)
modules += new /obj/item/weapon/reagent_containers/syringe(src)
modules += new /obj/item/weapon/extinguisher/mini(src)
emag = new /obj/item/weapon/reagent_containers/spray(src)
emag.reagents.add_reagent("pacid", 250)
emag.name = "polyacid spray"
emag.reagents.add_reagent("pacid", 250)
emag.name = "polyacid spray"
/obj/item/weapon/robot_module/engineering
name = "engineering robot module"
New()
..()
modules += new /obj/item/borg/sight/meson(src)
emag = new /obj/item/borg/stun(src)
modules += new /obj/item/weapon/rcd/borg(src)
modules += new /obj/item/weapon/extinguisher(src)
modules += new /obj/item/weapon/weldingtool/largetank/cyborg(src)
modules += new /obj/item/weapon/screwdriver(src)
modules += new /obj/item/weapon/wrench(src)
modules += new /obj/item/weapon/crowbar(src)
modules += new /obj/item/weapon/wirecutters(src)
modules += new /obj/item/device/multitool(src)
modules += new /obj/item/device/t_scanner(src)
modules += new /obj/item/device/analyzer(src)
/obj/item/weapon/robot_module/engineering/New()
..()
modules += new /obj/item/borg/sight/meson(src)
emag = new /obj/item/borg/stun(src)
modules += new /obj/item/weapon/rcd/borg(src)
modules += new /obj/item/weapon/extinguisher(src)
modules += new /obj/item/weapon/weldingtool/largetank/cyborg(src)
modules += new /obj/item/weapon/screwdriver(src)
modules += new /obj/item/weapon/wrench(src)
modules += new /obj/item/weapon/crowbar(src)
modules += new /obj/item/weapon/wirecutters(src)
modules += new /obj/item/device/multitool(src)
modules += new /obj/item/device/t_scanner(src)
modules += new /obj/item/device/analyzer(src)
var/datum/robot_energy_storage/metal/metstore = new /datum/robot_energy_storage/metal(src)
var/datum/robot_energy_storage/glass/glastore = new /datum/robot_energy_storage/glass(src)
var/datum/robot_energy_storage/wire/wirestore = new /datum/robot_energy_storage/wire(src)
var/datum/robot_energy_storage/metal/metstore = new /datum/robot_energy_storage/metal(src)
var/datum/robot_energy_storage/glass/glastore = new /datum/robot_energy_storage/glass(src)
var/datum/robot_energy_storage/wire/wirestore = new /datum/robot_energy_storage/wire(src)
var/obj/item/stack/sheet/metal/cyborg/M = new /obj/item/stack/sheet/metal/cyborg(src)
M.source = metstore
modules += M
var/obj/item/stack/sheet/metal/cyborg/M = new /obj/item/stack/sheet/metal/cyborg(src)
M.source = metstore
modules += M
var/obj/item/stack/sheet/glass/cyborg/Q = new /obj/item/stack/sheet/glass/cyborg(src)
Q.source = glastore
modules += Q
var/obj/item/stack/sheet/glass/cyborg/Q = new /obj/item/stack/sheet/glass/cyborg(src)
Q.source = glastore
modules += Q
var/obj/item/stack/sheet/rglass/cyborg/G = new /obj/item/stack/sheet/rglass/cyborg(src)
G.metsource = metstore
G.glasource = glastore
modules += G
var/obj/item/stack/sheet/rglass/cyborg/G = new /obj/item/stack/sheet/rglass/cyborg(src)
G.metsource = metstore
G.glasource = glastore
modules += G
var/obj/item/stack/rods/cyborg/R = new /obj/item/stack/rods/cyborg(src)
R.source = metstore
modules += R
var/obj/item/stack/rods/cyborg/R = new /obj/item/stack/rods/cyborg(src)
R.source = metstore
modules += R
var/obj/item/stack/cable_coil/cyborg/W = new /obj/item/stack/cable_coil/cyborg(src)
W.source = wirestore
modules += W
var/obj/item/stack/cable_coil/cyborg/W = new /obj/item/stack/cable_coil/cyborg(src)
W.source = wirestore
modules += W
var/obj/item/stack/tile/plasteel/cyborg/F = new /obj/item/stack/tile/plasteel/cyborg(src) //"Plasteel" is the normal metal floor tile, Don't be confused - RR
F.source = metstore
modules += F //'F' for floor tile - RR(src)
var/obj/item/stack/tile/plasteel/cyborg/F = new /obj/item/stack/tile/plasteel/cyborg(src) //"Plasteel" is the normal metal floor tile, Don't be confused - RR
F.source = metstore
modules += F //'F' for floor tile - RR(src)
storages += metstore
storages += glastore
storages += wirestore
storages += metstore
storages += glastore
storages += wirestore
/obj/item/weapon/robot_module/security
name = "security robot module"
New()
..()
modules += new /obj/item/borg/sight/hud/sec(src)
modules += new /obj/item/weapon/handcuffs/cyborg(src)
modules += new /obj/item/weapon/melee/baton/loaded(src)
modules += new /obj/item/weapon/gun/energy/taser/cyborg(src)
modules += new /obj/item/clothing/mask/gas/sechailer/cyborg(src)
emag = new /obj/item/weapon/gun/energy/laser/cyborg(src)
/obj/item/weapon/robot_module/security/New()
..()
modules += new /obj/item/borg/sight/hud/sec(src)
modules += new /obj/item/weapon/handcuffs/cyborg(src)
modules += new /obj/item/weapon/melee/baton/loaded(src)
modules += new /obj/item/weapon/gun/energy/taser/cyborg(src)
modules += new /obj/item/clothing/mask/gas/sechailer/cyborg(src)
emag = new /obj/item/weapon/gun/energy/laser/cyborg(src)
/obj/item/weapon/robot_module/janitor
name = "janitorial robot module"
New()
..()
modules += new /obj/item/weapon/soap/nanotrasen(src)
modules += new /obj/item/weapon/storage/bag/trash/cyborg(src)
modules += new /obj/item/weapon/mop/cyborg(src)
modules += new /obj/item/device/lightreplacer/cyborg(src)
emag = new /obj/item/weapon/reagent_containers/spray(src)
/obj/item/weapon/robot_module/janitor/New()
..()
modules += new /obj/item/weapon/soap/nanotrasen(src)
modules += new /obj/item/weapon/storage/bag/trash/cyborg(src)
modules += new /obj/item/weapon/mop/cyborg(src)
modules += new /obj/item/device/lightreplacer/cyborg(src)
emag = new /obj/item/weapon/reagent_containers/spray(src)
emag.reagents.add_reagent("lube", 250)
emag.name = "lube spray"
emag.reagents.add_reagent("lube", 250)
emag.name = "lube spray"
/obj/item/weapon/robot_module/butler
name = "service robot module"
New()
..()
modules += new /obj/item/weapon/reagent_containers/food/drinks/drinkingglass(src)
modules += new /obj/item/weapon/reagent_containers/food/condiment/enzyme(src)
modules += new /obj/item/weapon/pen(src)
modules += new /obj/item/weapon/razor(src)
modules += new /obj/item/device/violin(src)
/obj/item/weapon/robot_module/butler/New()
..()
modules += new /obj/item/weapon/reagent_containers/food/drinks/drinkingglass(src)
modules += new /obj/item/weapon/reagent_containers/food/condiment/enzyme(src)
modules += new /obj/item/weapon/pen(src)
modules += new /obj/item/weapon/razor(src)
modules += new /obj/item/device/violin(src)
var/obj/item/weapon/rsf/M = new /obj/item/weapon/rsf(src)
M.matter = 30
modules += M
var/obj/item/weapon/rsf/M = new /obj/item/weapon/rsf(src)
M.matter = 30
modules += M
modules += new /obj/item/weapon/reagent_containers/dropper(src)
modules += new /obj/item/weapon/reagent_containers/dropper(src)
var/obj/item/weapon/lighter/zippo/L = new /obj/item/weapon/lighter/zippo(src)
L.lit = 1
modules += L
var/obj/item/weapon/lighter/zippo/L = new /obj/item/weapon/lighter/zippo(src)
L.lit = 1
modules += L
modules += new /obj/item/weapon/storage/bag/tray(src)
modules += new /obj/item/weapon/reagent_containers/borghypo/borgshaker(src)
emag = new /obj/item/weapon/reagent_containers/borghypo/borgshaker/hacked(src)
modules += new /obj/item/weapon/storage/bag/tray(src)
modules += new /obj/item/weapon/reagent_containers/borghypo/borgshaker(src)
emag = new /obj/item/weapon/reagent_containers/borghypo/borgshaker/hacked(src)
/obj/item/weapon/robot_module/miner
name = "miner robot module"
New()
..()
var/mob/living/silicon/robot/R = loc
modules += new /obj/item/borg/sight/meson(src)
emag = new /obj/item/borg/stun(src)
modules += new /obj/item/weapon/storage/bag/ore(src)
if(R.emagged)
modules += new /obj/item/weapon/pickaxe/diamonddrill(src)
else
modules += new /obj/item/weapon/pickaxe/borgdrill(src)
modules += new /obj/item/weapon/storage/bag/sheetsnatcher/borg(src)
modules += new /obj/item/device/mining_scanner(src)
modules += new /obj/item/weapon/gun/energy/kinetic_accelerator(src)
on_emag()
..()
for(var/obj/item/weapon/pickaxe/borgdrill/D in modules)
qdel(D)
/obj/item/weapon/robot_module/miner/New()
..()
var/mob/living/silicon/robot/R = loc
modules += new /obj/item/borg/sight/meson(src)
emag = new /obj/item/borg/stun(src)
modules += new /obj/item/weapon/storage/bag/ore(src)
if(R.emagged)
modules += new /obj/item/weapon/pickaxe/diamonddrill(src)
rebuild()
else
modules += new /obj/item/weapon/pickaxe/borgdrill(src)
modules += new /obj/item/weapon/storage/bag/sheetsnatcher/borg(src)
modules += new /obj/item/device/mining_scanner(src)
modules += new /obj/item/weapon/gun/energy/kinetic_accelerator(src)
/obj/item/weapon/robot_module/miner/on_emag()
..()
for(var/obj/item/weapon/pickaxe/borgdrill/D in modules)
qdel(D)
modules += new /obj/item/weapon/pickaxe/diamonddrill(src)
rebuild()
/obj/item/weapon/robot_module/syndicate
name = "syndicate robot module"
New()
..()
modules += new /obj/item/weapon/melee/energy/sword/cyborg(src)
modules += new /obj/item/weapon/gun/energy/crossbow/cyborg(src)
modules += new /obj/item/weapon/card/emag(src)
modules += new /obj/item/weapon/gun/energy/laser/cyborg(src)
modules += new /obj/item/weapon/tank/jetpack/carbondioxide(src)
modules += new /obj/item/weapon/crowbar(src)
emag = null
/obj/item/weapon/robot_module/syndicate/New()
..()
modules += new /obj/item/weapon/melee/energy/sword/cyborg(src)
modules += new /obj/item/weapon/gun/energy/crossbow/cyborg(src)
modules += new /obj/item/weapon/card/emag(src)
modules += new /obj/item/weapon/gun/energy/laser/cyborg(src)
modules += new /obj/item/weapon/tank/jetpack/carbondioxide(src)
modules += new /obj/item/weapon/crowbar(src)
emag = null
/datum/robot_energy_storage
var/name = "Generic energy storage"
+326 -326
View File
@@ -14,353 +14,353 @@
anchored = 1 // don't get pushed around
New()
tag = "mob_[next_mob_id++]"
mob_list += src
/mob/new_player/New()
tag = "mob_[next_mob_id++]"
mob_list += src
proc/new_player_panel()
/mob/new_player/proc/new_player_panel()
var/output = "<center><p><a href='byond://?src=\ref[src];show_preferences=1'>Setup Character</A></p>"
var/output = "<center><p><a href='byond://?src=\ref[src];show_preferences=1'>Setup Character</A></p>"
if(!ticker || ticker.current_state <= GAME_STATE_PREGAME)
if(!ready) output += "<p><a href='byond://?src=\ref[src];ready=1'>Declare Ready</A></p>"
else output += "<p><b>You are ready</b> <a href='byond://?src=\ref[src];ready=0'>Cancel</A></p>"
if(!ticker || ticker.current_state <= GAME_STATE_PREGAME)
if(!ready) output += "<p><a href='byond://?src=\ref[src];ready=1'>Declare Ready</A></p>"
else output += "<p><b>You are ready</b> <a href='byond://?src=\ref[src];ready=0'>Cancel</A></p>"
else
output += "<p><a href='byond://?src=\ref[src];late_join=1'>Join Game!</A></p>"
else
output += "<p><a href='byond://?src=\ref[src];late_join=1'>Join Game!</A></p>"
output += "<p><a href='byond://?src=\ref[src];observe=1'>Observe</A></p>"
output += "<p><a href='byond://?src=\ref[src];observe=1'>Observe</A></p>"
if(!IsGuestKey(src.key))
establish_db_connection()
if(!IsGuestKey(src.key))
establish_db_connection()
if(dbcon.IsConnected())
var/isadmin = 0
if(src.client && src.client.holder)
isadmin = 1
var/DBQuery/query = dbcon.NewQuery("SELECT id FROM erro_poll_question WHERE [(isadmin ? "" : "adminonly = false AND")] Now() BETWEEN starttime AND endtime AND id NOT IN (SELECT pollid FROM erro_poll_vote WHERE ckey = \"[ckey]\") AND id NOT IN (SELECT pollid FROM erro_poll_textreply WHERE ckey = \"[ckey]\")")
query.Execute()
var/newpoll = 0
while(query.NextRow())
newpoll = 1
break
if(newpoll)
output += "<p><b><a href='byond://?src=\ref[src];showpoll=1'>Show Player Polls</A> (NEW!)</b></p>"
else
output += "<p><a href='byond://?src=\ref[src];showpoll=1'>Show Player Polls</A></p>"
output += "</center>"
//src << browse(output,"window=playersetup;size=210x240;can_close=0")
var/datum/browser/popup = new(src, "playersetup", "<div align='center'>New Player Options</div>", 210, 240)
popup.set_window_options("can_close=0")
popup.set_content(output)
popup.open(0)
return
Stat()
..()
statpanel("Lobby")
if(client.statpanel == "Lobby" && ticker)
if(ticker.hide_mode)
stat("Game Mode:", "Secret")
else
stat("Game Mode:", "[master_mode]")
if((ticker.current_state == GAME_STATE_PREGAME) && going)
stat("Time To Start:", ticker.pregame_timeleft)
if((ticker.current_state == GAME_STATE_PREGAME) && !going)
stat("Time To Start:", "DELAYED")
if(ticker.current_state == GAME_STATE_PREGAME)
stat("Players: [totalPlayers]", "Players Ready: [totalPlayersReady]")
totalPlayers = 0
totalPlayersReady = 0
for(var/mob/new_player/player in player_list)
stat("[player.key]", (player.ready)?("(Playing)"):(null))
totalPlayers++
if(player.ready)totalPlayersReady++
Topic(href, href_list[])
if(src != usr)
return 0
if(!client) return 0
if(href_list["show_preferences"])
client.prefs.ShowChoices(src)
return 1
if(href_list["ready"])
ready = text2num(href_list["ready"])
if(href_list["refresh"])
src << browse(null, "window=playersetup") //closes the player setup window
new_player_panel()
if(href_list["observe"])
if(alert(src,"Are you sure you wish to observe? You will not be able to play this round!","Player Setup","Yes","No") == "Yes")
if(!client) return 1
var/mob/dead/observer/observer = new()
spawning = 1
src << sound(null, repeat = 0, wait = 0, volume = 85, channel = 1) // MAD JAMS cant last forever yo
observer.started_as_observer = 1
close_spawn_windows()
var/obj/O = locate("landmark*Observer-Start")
src << "\blue Now teleporting."
observer.loc = O.loc
if(client.prefs.be_random_name)
client.prefs.real_name = random_name(gender)
observer.real_name = client.prefs.real_name
observer.name = observer.real_name
observer.key = key
qdel(mind)
qdel(src)
return 1
if(href_list["late_join"])
if(!ticker || ticker.current_state != GAME_STATE_PLAYING)
usr << "\red The round is either not ready, or has already finished..."
return
LateChoices()
if(href_list["SelectedJob"])
if(!enter_allowed)
usr << "\blue There is an administrative lock on entering the game!"
return
AttemptLateSpawn(href_list["SelectedJob"])
return
if(href_list["privacy_poll"])
establish_db_connection()
if(!dbcon.IsConnected())
return
var/voted = 0
//First check if the person has not voted yet.
var/DBQuery/query = dbcon.NewQuery("SELECT * FROM erro_privacy WHERE ckey='[src.ckey]'")
if(dbcon.IsConnected())
var/isadmin = 0
if(src.client && src.client.holder)
isadmin = 1
var/DBQuery/query = dbcon.NewQuery("SELECT id FROM erro_poll_question WHERE [(isadmin ? "" : "adminonly = false AND")] Now() BETWEEN starttime AND endtime AND id NOT IN (SELECT pollid FROM erro_poll_vote WHERE ckey = \"[ckey]\") AND id NOT IN (SELECT pollid FROM erro_poll_textreply WHERE ckey = \"[ckey]\")")
query.Execute()
var/newpoll = 0
while(query.NextRow())
voted = 1
newpoll = 1
break
//This is a safety switch, so only valid options pass through
var/option = "UNKNOWN"
switch(href_list["privacy_poll"])
if("signed")
option = "SIGNED"
if("anonymous")
option = "ANONYMOUS"
if("nostats")
option = "NOSTATS"
if("later")
usr << browse(null,"window=privacypoll")
return
if("abstain")
option = "ABSTAIN"
if(newpoll)
output += "<p><b><a href='byond://?src=\ref[src];showpoll=1'>Show Player Polls</A> (NEW!)</b></p>"
else
output += "<p><a href='byond://?src=\ref[src];showpoll=1'>Show Player Polls</A></p>"
if(option == "UNKNOWN")
return
output += "</center>"
if(!voted)
var/sql = "INSERT INTO erro_privacy VALUES (null, Now(), '[src.ckey]', '[option]')"
var/DBQuery/query_insert = dbcon.NewQuery(sql)
query_insert.Execute()
usr << "<b>Thank you for your vote!</b>"
usr << browse(null,"window=privacypoll")
//src << browse(output,"window=playersetup;size=210x240;can_close=0")
var/datum/browser/popup = new(src, "playersetup", "<div align='center'>New Player Options</div>", 210, 240)
popup.set_window_options("can_close=0")
popup.set_content(output)
popup.open(0)
return
if(!ready && href_list["preference"])
if(client)
client.prefs.process_link(src, href_list)
else if(!href_list["late_join"])
new_player_panel()
/mob/new_player/Stat()
..()
if(href_list["showpoll"])
handle_player_polling()
return
if(href_list["pollid"])
var/pollid = href_list["pollid"]
if(istext(pollid))
pollid = text2num(pollid)
if(isnum(pollid))
src.poll_player(pollid)
return
if(href_list["votepollid"] && href_list["votetype"])
var/pollid = text2num(href_list["votepollid"])
var/votetype = href_list["votetype"]
switch(votetype)
if("OPTION")
var/optionid = text2num(href_list["voteoptionid"])
vote_on_poll(pollid, optionid)
if("TEXT")
var/replytext = href_list["replytext"]
log_text_poll_reply(pollid, replytext)
if("NUMVAL")
var/id_min = text2num(href_list["minid"])
var/id_max = text2num(href_list["maxid"])
if( (id_max - id_min) > 100 ) //Basic exploit prevention
usr << "The option ID difference is too big. Please contact administration or the database admin."
return
for(var/optionid = id_min; optionid <= id_max; optionid++)
if(!isnull(href_list["o[optionid]"])) //Test if this optionid was replied to
var/rating
if(href_list["o[optionid]"] == "abstain")
rating = null
else
rating = text2num(href_list["o[optionid]"])
if(!isnum(rating))
return
vote_on_numval_poll(pollid, optionid, rating)
if("MULTICHOICE")
var/id_min = text2num(href_list["minoptionid"])
var/id_max = text2num(href_list["maxoptionid"])
if( (id_max - id_min) > 100 ) //Basic exploit prevention
usr << "The option ID difference is too big. Please contact administration or the database admin."
return
for(var/optionid = id_min; optionid <= id_max; optionid++)
if(!isnull(href_list["option_[optionid]"])) //Test if this optionid was selected
vote_on_poll(pollid, optionid, 1)
proc/IsJobAvailable(rank)
var/datum/job/job = job_master.GetJob(rank)
if(!job) return 0
if((job.current_positions >= job.total_positions) && job.total_positions != -1) return 0
if(jobban_isbanned(src,rank)) return 0
if(!job.player_old_enough(src.client)) return 0
return 1
proc/AttemptLateSpawn(rank)
if(!IsJobAvailable(rank))
src << alert("[rank] is not available. Please try another.")
return 0
job_master.AssignRole(src, rank, 1)
var/mob/living/carbon/human/character = create_character() //creates the human and transfers vars and mind
job_master.EquipRank(character, rank, 1) //equips the human
character.loc = pick(latejoin)
character.lastarea = get_area(loc)
if(character.mind.assigned_role != "Cyborg")
data_core.manifest_inject(character)
ticker.minds += character.mind//Cyborgs and AIs handle this in the transform proc. //TODO!!!!! ~Carn
AnnounceArrival(character, rank)
statpanel("Lobby")
if(client.statpanel == "Lobby" && ticker)
if(ticker.hide_mode)
stat("Game Mode:", "Secret")
else
character.Robotize()
stat("Game Mode:", "[master_mode]")
joined_player_list += character.ckey
if((ticker.current_state == GAME_STATE_PREGAME) && going)
stat("Time To Start:", ticker.pregame_timeleft)
if((ticker.current_state == GAME_STATE_PREGAME) && !going)
stat("Time To Start:", "DELAYED")
if(config.allow_latejoin_antagonists && emergency_shuttle.timeleft() > 300) //Don't make them antags if the station is evacuating
ticker.mode.make_antag_chance(character)
qdel(src)
if(ticker.current_state == GAME_STATE_PREGAME)
stat("Players: [totalPlayers]", "Players Ready: [totalPlayersReady]")
totalPlayers = 0
totalPlayersReady = 0
for(var/mob/new_player/player in player_list)
stat("[player.key]", (player.ready)?("(Playing)"):(null))
totalPlayers++
if(player.ready)totalPlayersReady++
proc/AnnounceArrival(var/mob/living/carbon/human/character, var/rank)
if (ticker.current_state == GAME_STATE_PLAYING)
var/ailist[] = list()
for (var/mob/living/silicon/ai/A in living_mob_list)
ailist += A
if (ailist.len)
var/mob/living/silicon/ai/announcer = pick(ailist)
if(character.mind)
if((character.mind.assigned_role != "Cyborg") && (character.mind.special_role != "MODE"))
announcer.say("[character.real_name] has signed up as [rank].")
proc/LateChoices()
var/mills = world.time // 1/10 of a second, not real milliseconds but whatever
//var/secs = ((mills % 36000) % 600) / 10 //Not really needed, but I'll leave it here for refrence.. or something
var/mins = (mills % 36000) / 600
var/hours = mills / 36000
var/dat = "<div class='notice'>Round Duration: [round(hours)]h [round(mins)]m</div>"
if(emergency_shuttle) //In case Nanotrasen decides reposess Centcom's shuttles.
if(emergency_shuttle.direction == 2) //Shuttle is going to centcom, not recalled
dat += "<div class='notice red'>The station has been evacuated.</div><br>"
if(emergency_shuttle.direction == 1 && emergency_shuttle.timeleft() < 300) //Shuttle is past the point of no recall
dat += "<div class='notice red'>The station is currently undergoing evacuation procedures.</div><br>"
var/available_job_count = 0
for(var/datum/job/job in job_master.occupations)
if(job && IsJobAvailable(job.title))
available_job_count++;
dat += "<div class='clearBoth'>Choose from the following open positions:</div><br>"
dat += "<div class='jobs'><div class='jobsColumn'>"
var/job_count = 0
for(var/datum/job/job in job_master.occupations)
if(job && IsJobAvailable(job.title))
job_count++;
if (job_count > round(available_job_count / 2))
dat += "</div><div class='jobsColumn'>"
var/position_class = "otherPosition"
if (job.title in command_positions)
position_class = "commandPosition"
dat += "<a class='[position_class]' href='byond://?src=\ref[src];SelectedJob=[job.title]'>[job.title] ([job.current_positions])</a><br>"
dat += "</div></div>"
// Removing the old window method but leaving it here for reference
//src << browse(dat, "window=latechoices;size=300x640;can_close=1")
// Added the new browser window method
var/datum/browser/popup = new(src, "latechoices", "Choose Profession", 440, 500)
popup.add_stylesheet("playeroptions", 'html/browser/playeroptions.css')
popup.set_content(dat)
popup.open(0) // 0 is passed to open so that it doesn't use the onclose() proc
proc/create_character()
spawning = 1
close_spawn_windows()
var/mob/living/carbon/human/new_character = new(loc)
new_character.lastarea = get_area(loc)
create_dna(new_character)
if(config.force_random_names || appearance_isbanned(src))
client.prefs.random_character()
client.prefs.real_name = random_name(gender)
client.prefs.copy_to(new_character)
src << sound(null, repeat = 0, wait = 0, volume = 85, channel = 1) // MAD JAMS cant last forever yo
if(mind)
mind.active = 0 //we wish to transfer the key manually
mind.transfer_to(new_character) //won't transfer key since the mind is not active
new_character.name = real_name
ready_dna(new_character, client.prefs.blood_type)
new_character.key = key //Manually transfer the key to log them in
return new_character
Move()
/mob/new_player/Topic(href, href_list[])
if(src != usr)
return 0
if(!client) return 0
proc/close_spawn_windows()
if(href_list["show_preferences"])
client.prefs.ShowChoices(src)
return 1
src << browse(null, "window=latechoices") //closes late choices window
if(href_list["ready"])
ready = text2num(href_list["ready"])
if(href_list["refresh"])
src << browse(null, "window=playersetup") //closes the player setup window
src << browse(null, "window=preferences") //closes job selection
src << browse(null, "window=mob_occupation")
src << browse(null, "window=latechoices") //closes late job selection
new_player_panel()
if(href_list["observe"])
if(alert(src,"Are you sure you wish to observe? You will not be able to play this round!","Player Setup","Yes","No") == "Yes")
if(!client) return 1
var/mob/dead/observer/observer = new()
spawning = 1
src << sound(null, repeat = 0, wait = 0, volume = 85, channel = 1) // MAD JAMS cant last forever yo
observer.started_as_observer = 1
close_spawn_windows()
var/obj/O = locate("landmark*Observer-Start")
src << "\blue Now teleporting."
observer.loc = O.loc
if(client.prefs.be_random_name)
client.prefs.real_name = random_name(gender)
observer.real_name = client.prefs.real_name
observer.name = observer.real_name
observer.key = key
qdel(mind)
qdel(src)
return 1
if(href_list["late_join"])
if(!ticker || ticker.current_state != GAME_STATE_PLAYING)
usr << "\red The round is either not ready, or has already finished..."
return
LateChoices()
if(href_list["SelectedJob"])
if(!enter_allowed)
usr << "\blue There is an administrative lock on entering the game!"
return
AttemptLateSpawn(href_list["SelectedJob"])
return
if(href_list["privacy_poll"])
establish_db_connection()
if(!dbcon.IsConnected())
return
var/voted = 0
//First check if the person has not voted yet.
var/DBQuery/query = dbcon.NewQuery("SELECT * FROM erro_privacy WHERE ckey='[src.ckey]'")
query.Execute()
while(query.NextRow())
voted = 1
break
//This is a safety switch, so only valid options pass through
var/option = "UNKNOWN"
switch(href_list["privacy_poll"])
if("signed")
option = "SIGNED"
if("anonymous")
option = "ANONYMOUS"
if("nostats")
option = "NOSTATS"
if("later")
usr << browse(null,"window=privacypoll")
return
if("abstain")
option = "ABSTAIN"
if(option == "UNKNOWN")
return
if(!voted)
var/sql = "INSERT INTO erro_privacy VALUES (null, Now(), '[src.ckey]', '[option]')"
var/DBQuery/query_insert = dbcon.NewQuery(sql)
query_insert.Execute()
usr << "<b>Thank you for your vote!</b>"
usr << browse(null,"window=privacypoll")
if(!ready && href_list["preference"])
if(client)
client.prefs.process_link(src, href_list)
else if(!href_list["late_join"])
new_player_panel()
if(href_list["showpoll"])
handle_player_polling()
return
if(href_list["pollid"])
var/pollid = href_list["pollid"]
if(istext(pollid))
pollid = text2num(pollid)
if(isnum(pollid))
src.poll_player(pollid)
return
if(href_list["votepollid"] && href_list["votetype"])
var/pollid = text2num(href_list["votepollid"])
var/votetype = href_list["votetype"]
switch(votetype)
if("OPTION")
var/optionid = text2num(href_list["voteoptionid"])
vote_on_poll(pollid, optionid)
if("TEXT")
var/replytext = href_list["replytext"]
log_text_poll_reply(pollid, replytext)
if("NUMVAL")
var/id_min = text2num(href_list["minid"])
var/id_max = text2num(href_list["maxid"])
if( (id_max - id_min) > 100 ) //Basic exploit prevention
usr << "The option ID difference is too big. Please contact administration or the database admin."
return
for(var/optionid = id_min; optionid <= id_max; optionid++)
if(!isnull(href_list["o[optionid]"])) //Test if this optionid was replied to
var/rating
if(href_list["o[optionid]"] == "abstain")
rating = null
else
rating = text2num(href_list["o[optionid]"])
if(!isnum(rating))
return
vote_on_numval_poll(pollid, optionid, rating)
if("MULTICHOICE")
var/id_min = text2num(href_list["minoptionid"])
var/id_max = text2num(href_list["maxoptionid"])
if( (id_max - id_min) > 100 ) //Basic exploit prevention
usr << "The option ID difference is too big. Please contact administration or the database admin."
return
for(var/optionid = id_min; optionid <= id_max; optionid++)
if(!isnull(href_list["option_[optionid]"])) //Test if this optionid was selected
vote_on_poll(pollid, optionid, 1)
/mob/new_player/proc/IsJobAvailable(rank)
var/datum/job/job = job_master.GetJob(rank)
if(!job) return 0
if((job.current_positions >= job.total_positions) && job.total_positions != -1) return 0
if(jobban_isbanned(src,rank)) return 0
if(!job.player_old_enough(src.client)) return 0
return 1
/mob/new_player/proc/AttemptLateSpawn(rank)
if(!IsJobAvailable(rank))
src << alert("[rank] is not available. Please try another.")
return 0
job_master.AssignRole(src, rank, 1)
var/mob/living/carbon/human/character = create_character() //creates the human and transfers vars and mind
job_master.EquipRank(character, rank, 1) //equips the human
character.loc = pick(latejoin)
character.lastarea = get_area(loc)
if(character.mind.assigned_role != "Cyborg")
data_core.manifest_inject(character)
ticker.minds += character.mind//Cyborgs and AIs handle this in the transform proc. //TODO!!!!! ~Carn
AnnounceArrival(character, rank)
else
character.Robotize()
joined_player_list += character.ckey
if(config.allow_latejoin_antagonists && emergency_shuttle.timeleft() > 300) //Don't make them antags if the station is evacuating
ticker.mode.make_antag_chance(character)
qdel(src)
/mob/new_player/proc/AnnounceArrival(var/mob/living/carbon/human/character, var/rank)
if (ticker.current_state == GAME_STATE_PLAYING)
var/ailist[] = list()
for (var/mob/living/silicon/ai/A in living_mob_list)
ailist += A
if (ailist.len)
var/mob/living/silicon/ai/announcer = pick(ailist)
if(character.mind)
if((character.mind.assigned_role != "Cyborg") && (character.mind.special_role != "MODE"))
announcer.say("[character.real_name] has signed up as [rank].")
/mob/new_player/proc/LateChoices()
var/mills = world.time // 1/10 of a second, not real milliseconds but whatever
//var/secs = ((mills % 36000) % 600) / 10 //Not really needed, but I'll leave it here for refrence.. or something
var/mins = (mills % 36000) / 600
var/hours = mills / 36000
var/dat = "<div class='notice'>Round Duration: [round(hours)]h [round(mins)]m</div>"
if(emergency_shuttle) //In case Nanotrasen decides reposess Centcom's shuttles.
if(emergency_shuttle.direction == 2) //Shuttle is going to centcom, not recalled
dat += "<div class='notice red'>The station has been evacuated.</div><br>"
if(emergency_shuttle.direction == 1 && emergency_shuttle.timeleft() < 300) //Shuttle is past the point of no recall
dat += "<div class='notice red'>The station is currently undergoing evacuation procedures.</div><br>"
var/available_job_count = 0
for(var/datum/job/job in job_master.occupations)
if(job && IsJobAvailable(job.title))
available_job_count++;
dat += "<div class='clearBoth'>Choose from the following open positions:</div><br>"
dat += "<div class='jobs'><div class='jobsColumn'>"
var/job_count = 0
for(var/datum/job/job in job_master.occupations)
if(job && IsJobAvailable(job.title))
job_count++;
if (job_count > round(available_job_count / 2))
dat += "</div><div class='jobsColumn'>"
var/position_class = "otherPosition"
if (job.title in command_positions)
position_class = "commandPosition"
dat += "<a class='[position_class]' href='byond://?src=\ref[src];SelectedJob=[job.title]'>[job.title] ([job.current_positions])</a><br>"
dat += "</div></div>"
// Removing the old window method but leaving it here for reference
//src << browse(dat, "window=latechoices;size=300x640;can_close=1")
// Added the new browser window method
var/datum/browser/popup = new(src, "latechoices", "Choose Profession", 440, 500)
popup.add_stylesheet("playeroptions", 'html/browser/playeroptions.css')
popup.set_content(dat)
popup.open(0) // 0 is passed to open so that it doesn't use the onclose() proc
/mob/new_player/proc/create_character()
spawning = 1
close_spawn_windows()
var/mob/living/carbon/human/new_character = new(loc)
new_character.lastarea = get_area(loc)
create_dna(new_character)
if(config.force_random_names || appearance_isbanned(src))
client.prefs.random_character()
client.prefs.real_name = random_name(gender)
client.prefs.copy_to(new_character)
src << sound(null, repeat = 0, wait = 0, volume = 85, channel = 1) // MAD JAMS cant last forever yo
if(mind)
mind.active = 0 //we wish to transfer the key manually
mind.transfer_to(new_character) //won't transfer key since the mind is not active
new_character.name = real_name
ready_dna(new_character, client.prefs.blood_type)
new_character.key = key //Manually transfer the key to log them in
return new_character
/mob/new_player/Move()
return 0
/mob/new_player/proc/close_spawn_windows()
src << browse(null, "window=latechoices") //closes late choices window
src << browse(null, "window=playersetup") //closes the player setup window
src << browse(null, "window=preferences") //closes job selection
src << browse(null, "window=mob_occupation")
src << browse(null, "window=latechoices") //closes late job selection
+337 -337
View File
@@ -1,351 +1,351 @@
datum/preferences
//The mob should have a gender you want before running this proc. Will run fine without H
proc/random_character(gender_override)
if(gender_override)
gender = gender_override
else
gender = pick(MALE,FEMALE)
underwear = random_underwear(gender)
skin_tone = random_skin_tone()
hair_style = random_hair_style(gender)
facial_hair_style = random_facial_hair_style(gender)
hair_color = random_short_color()
facial_hair_color = hair_color
eye_color = random_eye_color()
pref_species = new /datum/species/human()
backbag = 2
age = rand(AGE_MIN,AGE_MAX)
/datum/preferences/proc/random_character(gender_override)
if(gender_override)
gender = gender_override
else
gender = pick(MALE,FEMALE)
underwear = random_underwear(gender)
skin_tone = random_skin_tone()
hair_style = random_hair_style(gender)
facial_hair_style = random_facial_hair_style(gender)
hair_color = random_short_color()
facial_hair_color = hair_color
eye_color = random_eye_color()
pref_species = new /datum/species/human()
backbag = 2
age = rand(AGE_MIN,AGE_MAX)
proc/update_preview_icon() //seriously. This is horrendous.
del(preview_icon_front)
del(preview_icon_side)
var/icon/preview_icon = null
/datum/preferences/proc/update_preview_icon() //seriously. This is horrendous.
del(preview_icon_front)
del(preview_icon_side)
var/icon/preview_icon = null
var/g = "m"
if(gender == FEMALE) g = "f"
var/g = "m"
if(gender == FEMALE) g = "f"
if(pref_species.id == "human" || !config.mutant_races)
preview_icon = new /icon('icons/mob/human.dmi', "[skin_tone]_[g]_s")
else
preview_icon = new /icon('icons/mob/human.dmi', "[pref_species.id]_[g]_s")
preview_icon.Blend("#[mutant_color]", ICON_MULTIPLY)
if(pref_species.id == "human" || !config.mutant_races)
preview_icon = new /icon('icons/mob/human.dmi', "[skin_tone]_[g]_s")
else
preview_icon = new /icon('icons/mob/human.dmi', "[pref_species.id]_[g]_s")
preview_icon.Blend("#[mutant_color]", ICON_MULTIPLY)
var/datum/sprite_accessory/S
if(underwear)
S = underwear_all[underwear]
if(S)
preview_icon.Blend(new /icon(S.icon, "[S.icon_state]_s"), ICON_OVERLAY)
var/datum/sprite_accessory/S
if(underwear)
S = underwear_all[underwear]
if(S)
preview_icon.Blend(new /icon(S.icon, "[S.icon_state]_s"), ICON_OVERLAY)
var/icon/eyes_s = new/icon()
if(EYECOLOR in pref_species.specflags)
eyes_s = new/icon("icon" = 'icons/mob/human_face.dmi', "icon_state" = "[pref_species.eyes]_s")
eyes_s.Blend("#[eye_color]", ICON_MULTIPLY)
var/icon/eyes_s = new/icon()
if(EYECOLOR in pref_species.specflags)
eyes_s = new/icon("icon" = 'icons/mob/human_face.dmi', "icon_state" = "[pref_species.eyes]_s")
eyes_s.Blend("#[eye_color]", ICON_MULTIPLY)
S = hair_styles_list[hair_style]
if(S && (HAIR in pref_species.specflags))
var/icon/hair_s = new/icon("icon" = S.icon, "icon_state" = "[S.icon_state]_s")
hair_s.Blend("#[hair_color]", ICON_MULTIPLY)
eyes_s.Blend(hair_s, ICON_OVERLAY)
S = hair_styles_list[hair_style]
if(S && (HAIR in pref_species.specflags))
var/icon/hair_s = new/icon("icon" = S.icon, "icon_state" = "[S.icon_state]_s")
hair_s.Blend("#[hair_color]", ICON_MULTIPLY)
eyes_s.Blend(hair_s, ICON_OVERLAY)
S = facial_hair_styles_list[facial_hair_style]
if(S && (FACEHAIR in pref_species.specflags))
var/icon/facial_s = new/icon("icon" = S.icon, "icon_state" = "[S.icon_state]_s")
facial_s.Blend("#[facial_hair_color]", ICON_MULTIPLY)
eyes_s.Blend(facial_s, ICON_OVERLAY)
S = facial_hair_styles_list[facial_hair_style]
if(S && (FACEHAIR in pref_species.specflags))
var/icon/facial_s = new/icon("icon" = S.icon, "icon_state" = "[S.icon_state]_s")
facial_s.Blend("#[facial_hair_color]", ICON_MULTIPLY)
eyes_s.Blend(facial_s, ICON_OVERLAY)
var/icon/clothes_s = null
if(job_civilian_low & ASSISTANT)//This gives the preview icon clothes depending on which job(if any) is set to 'high'
clothes_s = new /icon('icons/mob/uniform.dmi', "grey_s")
clothes_s.Blend(new /icon('icons/mob/feet.dmi', "black"), ICON_UNDERLAY)
if(backbag == 2)
clothes_s.Blend(new /icon('icons/mob/back.dmi', "backpack"), ICON_OVERLAY)
else if(backbag == 3)
clothes_s.Blend(new /icon('icons/mob/back.dmi', "satchel"), ICON_OVERLAY)
var/icon/clothes_s = null
if(job_civilian_low & ASSISTANT)//This gives the preview icon clothes depending on which job(if any) is set to 'high'
clothes_s = new /icon('icons/mob/uniform.dmi', "grey_s")
clothes_s.Blend(new /icon('icons/mob/feet.dmi', "black"), ICON_UNDERLAY)
if(backbag == 2)
clothes_s.Blend(new /icon('icons/mob/back.dmi', "backpack"), ICON_OVERLAY)
else if(backbag == 3)
clothes_s.Blend(new /icon('icons/mob/back.dmi', "satchel"), ICON_OVERLAY)
else if(job_civilian_high)//I hate how this looks, but there's no reason to go through this switch if it's empty
switch(job_civilian_high)
if(HOP)
clothes_s = new /icon('icons/mob/uniform.dmi', "hop_s")
clothes_s.Blend(new /icon('icons/mob/feet.dmi', "brown"), ICON_UNDERLAY)
clothes_s.Blend(new /icon('icons/mob/head.dmi', "hopcap"), ICON_OVERLAY)
if(backbag == 2)
clothes_s.Blend(new /icon('icons/mob/back.dmi', "backpack"), ICON_OVERLAY)
else if(backbag == 3)
clothes_s.Blend(new /icon('icons/mob/back.dmi', "satchel-norm"), ICON_OVERLAY)
if(BARTENDER)
clothes_s = new /icon('icons/mob/uniform.dmi', "ba_suit_s")
clothes_s.Blend(new /icon('icons/mob/feet.dmi', "black"), ICON_UNDERLAY)
clothes_s.Blend(new /icon('icons/mob/suit.dmi', "armor"), ICON_OVERLAY)
if(backbag == 2)
clothes_s.Blend(new /icon('icons/mob/back.dmi', "backpack"), ICON_OVERLAY)
else if(backbag == 3)
clothes_s.Blend(new /icon('icons/mob/back.dmi', "satchel-norm"), ICON_OVERLAY)
if(BOTANIST)
clothes_s = new /icon('icons/mob/uniform.dmi', "hydroponics_s")
clothes_s.Blend(new /icon('icons/mob/feet.dmi', "black"), ICON_UNDERLAY)
clothes_s.Blend(new /icon('icons/mob/hands.dmi', "ggloves"), ICON_UNDERLAY)
clothes_s.Blend(new /icon('icons/mob/suit.dmi', "apron"), ICON_OVERLAY)
if(backbag == 2)
clothes_s.Blend(new /icon('icons/mob/back.dmi', "backpack"), ICON_OVERLAY)
else if(backbag == 3)
clothes_s.Blend(new /icon('icons/mob/back.dmi', "satchel-hyd"), ICON_OVERLAY)
if(CHEF)
clothes_s = new /icon('icons/mob/uniform.dmi', "chef_s")
clothes_s.Blend(new /icon('icons/mob/feet.dmi', "black"), ICON_UNDERLAY)
clothes_s.Blend(new /icon('icons/mob/head.dmi', "chef"), ICON_OVERLAY)
if(backbag == 2)
clothes_s.Blend(new /icon('icons/mob/back.dmi', "backpack"), ICON_OVERLAY)
if(backbag == 3)
clothes_s.Blend(new /icon('icons/mob/back.dmi', "satchel-norm"), ICON_OVERLAY)
if(JANITOR)
clothes_s = new /icon('icons/mob/uniform.dmi', "janitor_s")
clothes_s.Blend(new /icon('icons/mob/feet.dmi', "black"), ICON_UNDERLAY)
if(backbag == 2)
clothes_s.Blend(new /icon('icons/mob/back.dmi', "backpack"), ICON_OVERLAY)
if(backbag == 3)
clothes_s.Blend(new /icon('icons/mob/back.dmi', "satchel-norm"), ICON_OVERLAY)
if(LIBRARIAN)
clothes_s = new /icon('icons/mob/uniform.dmi', "red_suit_s")
clothes_s.Blend(new /icon('icons/mob/feet.dmi', "black"), ICON_UNDERLAY)
if(backbag == 2)
clothes_s.Blend(new /icon('icons/mob/back.dmi', "backpack"), ICON_OVERLAY)
if(backbag == 3)
clothes_s.Blend(new /icon('icons/mob/back.dmi', "satchel-norm"), ICON_OVERLAY)
if(QUARTERMASTER)
clothes_s = new /icon('icons/mob/uniform.dmi', "qm_s")
clothes_s.Blend(new /icon('icons/mob/feet.dmi', "brown"), ICON_UNDERLAY)
clothes_s.Blend(new /icon('icons/mob/hands.dmi', "bgloves"), ICON_UNDERLAY)
clothes_s.Blend(new /icon('icons/mob/eyes.dmi', "sun"), ICON_OVERLAY)
clothes_s.Blend(new /icon('icons/mob/items_righthand.dmi', "clipboard"), ICON_UNDERLAY)
if(backbag == 2)
clothes_s.Blend(new /icon('icons/mob/back.dmi', "backpack"), ICON_OVERLAY)
if(backbag == 3)
clothes_s.Blend(new /icon('icons/mob/back.dmi', "satchel-norm"), ICON_OVERLAY)
if(CARGOTECH)
clothes_s = new /icon('icons/mob/uniform.dmi', "cargotech_s")
clothes_s.Blend(new /icon('icons/mob/feet.dmi', "black"), ICON_UNDERLAY)
clothes_s.Blend(new /icon('icons/mob/hands.dmi', "bgloves"), ICON_UNDERLAY)
if(backbag == 2)
clothes_s.Blend(new /icon('icons/mob/back.dmi', "backpack"), ICON_OVERLAY)
if(backbag == 3)
clothes_s.Blend(new /icon('icons/mob/back.dmi', "satchel-norm"), ICON_OVERLAY)
if(MINER)
clothes_s = new /icon('icons/mob/uniform.dmi', "miner_s")
clothes_s.Blend(new /icon('icons/mob/feet.dmi', "black"), ICON_UNDERLAY)
clothes_s.Blend(new /icon('icons/mob/hands.dmi', "bgloves"), ICON_UNDERLAY)
if(backbag == 2)
clothes_s.Blend(new /icon('icons/mob/back.dmi', "engiepack"), ICON_OVERLAY)
if(backbag == 3)
clothes_s.Blend(new /icon('icons/mob/back.dmi', "satchel-eng"), ICON_OVERLAY)
if(LAWYER)
clothes_s = new /icon('icons/mob/uniform.dmi', "lawyer_blue_s")
clothes_s.Blend(new /icon('icons/mob/feet.dmi', "brown"), ICON_UNDERLAY)
clothes_s.Blend(new /icon('icons/mob/items_righthand.dmi', "briefcase"), ICON_UNDERLAY)
if(backbag == 2)
clothes_s.Blend(new /icon('icons/mob/back.dmi', "backpack"), ICON_OVERLAY)
if(backbag == 3)
clothes_s.Blend(new /icon('icons/mob/back.dmi', "satchel-norm"), ICON_OVERLAY)
if(CHAPLAIN)
clothes_s = new /icon('icons/mob/uniform.dmi', "chapblack_s")
clothes_s.Blend(new /icon('icons/mob/feet.dmi', "black"), ICON_UNDERLAY)
if(backbag == 2)
clothes_s.Blend(new /icon('icons/mob/back.dmi', "backpack"), ICON_OVERLAY)
if(backbag == 3)
clothes_s.Blend(new /icon('icons/mob/back.dmi', "satchel-norm"), ICON_OVERLAY)
if(CLOWN)
clothes_s = new /icon('icons/mob/uniform.dmi', "clown_s")
clothes_s.Blend(new /icon('icons/mob/feet.dmi', "clown"), ICON_UNDERLAY)
clothes_s.Blend(new /icon('icons/mob/mask.dmi', "clown"), ICON_OVERLAY)
clothes_s.Blend(new /icon('icons/mob/back.dmi', "clownpack"), ICON_OVERLAY)
if(MIME)
clothes_s = new /icon('icons/mob/uniform.dmi', "mime_s")
clothes_s.Blend(new /icon('icons/mob/feet.dmi', "black"), ICON_UNDERLAY)
clothes_s.Blend(new /icon('icons/mob/hands.dmi', "lgloves"), ICON_UNDERLAY)
clothes_s.Blend(new /icon('icons/mob/mask.dmi', "mime"), ICON_OVERLAY)
clothes_s.Blend(new /icon('icons/mob/head.dmi', "beret"), ICON_OVERLAY)
clothes_s.Blend(new /icon('icons/mob/suit.dmi', "suspenders"), ICON_OVERLAY)
if(backbag == 2)
clothes_s.Blend(new /icon('icons/mob/back.dmi', "mimepack"), ICON_OVERLAY)
if(backbag == 3)
clothes_s.Blend(new /icon('icons/mob/back.dmi', "satchel-norm"), ICON_OVERLAY)
else if(job_civilian_high)//I hate how this looks, but there's no reason to go through this switch if it's empty
switch(job_civilian_high)
if(HOP)
clothes_s = new /icon('icons/mob/uniform.dmi', "hop_s")
clothes_s.Blend(new /icon('icons/mob/feet.dmi', "brown"), ICON_UNDERLAY)
clothes_s.Blend(new /icon('icons/mob/head.dmi', "hopcap"), ICON_OVERLAY)
if(backbag == 2)
clothes_s.Blend(new /icon('icons/mob/back.dmi', "backpack"), ICON_OVERLAY)
else if(backbag == 3)
clothes_s.Blend(new /icon('icons/mob/back.dmi', "satchel-norm"), ICON_OVERLAY)
if(BARTENDER)
clothes_s = new /icon('icons/mob/uniform.dmi', "ba_suit_s")
clothes_s.Blend(new /icon('icons/mob/feet.dmi', "black"), ICON_UNDERLAY)
clothes_s.Blend(new /icon('icons/mob/suit.dmi', "armor"), ICON_OVERLAY)
if(backbag == 2)
clothes_s.Blend(new /icon('icons/mob/back.dmi', "backpack"), ICON_OVERLAY)
else if(backbag == 3)
clothes_s.Blend(new /icon('icons/mob/back.dmi', "satchel-norm"), ICON_OVERLAY)
if(BOTANIST)
clothes_s = new /icon('icons/mob/uniform.dmi', "hydroponics_s")
clothes_s.Blend(new /icon('icons/mob/feet.dmi', "black"), ICON_UNDERLAY)
clothes_s.Blend(new /icon('icons/mob/hands.dmi', "ggloves"), ICON_UNDERLAY)
clothes_s.Blend(new /icon('icons/mob/suit.dmi', "apron"), ICON_OVERLAY)
if(backbag == 2)
clothes_s.Blend(new /icon('icons/mob/back.dmi', "backpack"), ICON_OVERLAY)
else if(backbag == 3)
clothes_s.Blend(new /icon('icons/mob/back.dmi', "satchel-hyd"), ICON_OVERLAY)
if(CHEF)
clothes_s = new /icon('icons/mob/uniform.dmi', "chef_s")
clothes_s.Blend(new /icon('icons/mob/feet.dmi', "black"), ICON_UNDERLAY)
clothes_s.Blend(new /icon('icons/mob/head.dmi', "chef"), ICON_OVERLAY)
if(backbag == 2)
clothes_s.Blend(new /icon('icons/mob/back.dmi', "backpack"), ICON_OVERLAY)
if(backbag == 3)
clothes_s.Blend(new /icon('icons/mob/back.dmi', "satchel-norm"), ICON_OVERLAY)
if(JANITOR)
clothes_s = new /icon('icons/mob/uniform.dmi', "janitor_s")
clothes_s.Blend(new /icon('icons/mob/feet.dmi', "black"), ICON_UNDERLAY)
if(backbag == 2)
clothes_s.Blend(new /icon('icons/mob/back.dmi', "backpack"), ICON_OVERLAY)
if(backbag == 3)
clothes_s.Blend(new /icon('icons/mob/back.dmi', "satchel-norm"), ICON_OVERLAY)
if(LIBRARIAN)
clothes_s = new /icon('icons/mob/uniform.dmi', "red_suit_s")
clothes_s.Blend(new /icon('icons/mob/feet.dmi', "black"), ICON_UNDERLAY)
if(backbag == 2)
clothes_s.Blend(new /icon('icons/mob/back.dmi', "backpack"), ICON_OVERLAY)
if(backbag == 3)
clothes_s.Blend(new /icon('icons/mob/back.dmi', "satchel-norm"), ICON_OVERLAY)
if(QUARTERMASTER)
clothes_s = new /icon('icons/mob/uniform.dmi', "qm_s")
clothes_s.Blend(new /icon('icons/mob/feet.dmi', "brown"), ICON_UNDERLAY)
clothes_s.Blend(new /icon('icons/mob/hands.dmi', "bgloves"), ICON_UNDERLAY)
clothes_s.Blend(new /icon('icons/mob/eyes.dmi', "sun"), ICON_OVERLAY)
clothes_s.Blend(new /icon('icons/mob/items_righthand.dmi', "clipboard"), ICON_UNDERLAY)
if(backbag == 2)
clothes_s.Blend(new /icon('icons/mob/back.dmi', "backpack"), ICON_OVERLAY)
if(backbag == 3)
clothes_s.Blend(new /icon('icons/mob/back.dmi', "satchel-norm"), ICON_OVERLAY)
if(CARGOTECH)
clothes_s = new /icon('icons/mob/uniform.dmi', "cargotech_s")
clothes_s.Blend(new /icon('icons/mob/feet.dmi', "black"), ICON_UNDERLAY)
clothes_s.Blend(new /icon('icons/mob/hands.dmi', "bgloves"), ICON_UNDERLAY)
if(backbag == 2)
clothes_s.Blend(new /icon('icons/mob/back.dmi', "backpack"), ICON_OVERLAY)
if(backbag == 3)
clothes_s.Blend(new /icon('icons/mob/back.dmi', "satchel-norm"), ICON_OVERLAY)
if(MINER)
clothes_s = new /icon('icons/mob/uniform.dmi', "miner_s")
clothes_s.Blend(new /icon('icons/mob/feet.dmi', "black"), ICON_UNDERLAY)
clothes_s.Blend(new /icon('icons/mob/hands.dmi', "bgloves"), ICON_UNDERLAY)
if(backbag == 2)
clothes_s.Blend(new /icon('icons/mob/back.dmi', "engiepack"), ICON_OVERLAY)
if(backbag == 3)
clothes_s.Blend(new /icon('icons/mob/back.dmi', "satchel-eng"), ICON_OVERLAY)
if(LAWYER)
clothes_s = new /icon('icons/mob/uniform.dmi', "lawyer_blue_s")
clothes_s.Blend(new /icon('icons/mob/feet.dmi', "brown"), ICON_UNDERLAY)
clothes_s.Blend(new /icon('icons/mob/items_righthand.dmi', "briefcase"), ICON_UNDERLAY)
if(backbag == 2)
clothes_s.Blend(new /icon('icons/mob/back.dmi', "backpack"), ICON_OVERLAY)
if(backbag == 3)
clothes_s.Blend(new /icon('icons/mob/back.dmi', "satchel-norm"), ICON_OVERLAY)
if(CHAPLAIN)
clothes_s = new /icon('icons/mob/uniform.dmi', "chapblack_s")
clothes_s.Blend(new /icon('icons/mob/feet.dmi', "black"), ICON_UNDERLAY)
if(backbag == 2)
clothes_s.Blend(new /icon('icons/mob/back.dmi', "backpack"), ICON_OVERLAY)
if(backbag == 3)
clothes_s.Blend(new /icon('icons/mob/back.dmi', "satchel-norm"), ICON_OVERLAY)
if(CLOWN)
clothes_s = new /icon('icons/mob/uniform.dmi', "clown_s")
clothes_s.Blend(new /icon('icons/mob/feet.dmi', "clown"), ICON_UNDERLAY)
clothes_s.Blend(new /icon('icons/mob/mask.dmi', "clown"), ICON_OVERLAY)
clothes_s.Blend(new /icon('icons/mob/back.dmi', "clownpack"), ICON_OVERLAY)
if(MIME)
clothes_s = new /icon('icons/mob/uniform.dmi', "mime_s")
clothes_s.Blend(new /icon('icons/mob/feet.dmi', "black"), ICON_UNDERLAY)
clothes_s.Blend(new /icon('icons/mob/hands.dmi', "lgloves"), ICON_UNDERLAY)
clothes_s.Blend(new /icon('icons/mob/mask.dmi', "mime"), ICON_OVERLAY)
clothes_s.Blend(new /icon('icons/mob/head.dmi', "beret"), ICON_OVERLAY)
clothes_s.Blend(new /icon('icons/mob/suit.dmi', "suspenders"), ICON_OVERLAY)
if(backbag == 2)
clothes_s.Blend(new /icon('icons/mob/back.dmi', "mimepack"), ICON_OVERLAY)
if(backbag == 3)
clothes_s.Blend(new /icon('icons/mob/back.dmi', "satchel-norm"), ICON_OVERLAY)
else if(job_medsci_high)
switch(job_medsci_high)
if(RD)
clothes_s = new /icon('icons/mob/uniform.dmi', "director_s")
clothes_s.Blend(new /icon('icons/mob/feet.dmi', "brown"), ICON_UNDERLAY)
clothes_s.Blend(new /icon('icons/mob/items_righthand.dmi', "clipboard"), ICON_UNDERLAY)
clothes_s.Blend(new /icon('icons/mob/suit.dmi', "labcoat_open"), ICON_OVERLAY)
if(backbag == 2)
clothes_s.Blend(new /icon('icons/mob/back.dmi', "backpack"), ICON_OVERLAY)
if(backbag == 3)
clothes_s.Blend(new /icon('icons/mob/back.dmi', "satchel-tox"), ICON_OVERLAY)
if(SCIENTIST)
clothes_s = new /icon('icons/mob/uniform.dmi', "toxinswhite_s")
clothes_s.Blend(new /icon('icons/mob/feet.dmi', "white"), ICON_UNDERLAY)
clothes_s.Blend(new /icon('icons/mob/suit.dmi', "labcoat_tox_open"), ICON_OVERLAY)
if(backbag == 2)
clothes_s.Blend(new /icon('icons/mob/back.dmi', "backpack"), ICON_OVERLAY)
if(backbag == 3)
clothes_s.Blend(new /icon('icons/mob/back.dmi', "satchel-tox"), ICON_OVERLAY)
if(CHEMIST)
clothes_s = new /icon('icons/mob/uniform.dmi', "chemistrywhite_s")
clothes_s.Blend(new /icon('icons/mob/feet.dmi', "white"), ICON_UNDERLAY)
clothes_s.Blend(new /icon('icons/mob/suit.dmi', "labcoat_chem_open"), ICON_OVERLAY)
if(backbag == 2)
clothes_s.Blend(new /icon('icons/mob/back.dmi', "backpack"), ICON_OVERLAY)
if(backbag == 3)
clothes_s.Blend(new /icon('icons/mob/back.dmi', "satchel-chem"), ICON_OVERLAY)
if(CMO)
clothes_s = new /icon('icons/mob/uniform.dmi', "cmo_s")
clothes_s.Blend(new /icon('icons/mob/feet.dmi', "brown"), ICON_UNDERLAY)
clothes_s.Blend(new /icon('icons/mob/items_lefthand.dmi', "firstaid"), ICON_UNDERLAY)
clothes_s.Blend(new /icon('icons/mob/suit.dmi', "labcoat_cmo_open"), ICON_OVERLAY)
if(backbag == 2)
clothes_s.Blend(new /icon('icons/mob/back.dmi', "medicalpack"), ICON_OVERLAY)
if(backbag == 3)
clothes_s.Blend(new /icon('icons/mob/back.dmi', "satchel-med"), ICON_OVERLAY)
if(DOCTOR)
clothes_s = new /icon('icons/mob/uniform.dmi', "medical_s")
clothes_s.Blend(new /icon('icons/mob/feet.dmi', "white"), ICON_UNDERLAY)
clothes_s.Blend(new /icon('icons/mob/items_lefthand.dmi', "firstaid"), ICON_UNDERLAY)
clothes_s.Blend(new /icon('icons/mob/suit.dmi', "labcoat_open"), ICON_OVERLAY)
if(backbag == 2)
clothes_s.Blend(new /icon('icons/mob/back.dmi', "medicalpack"), ICON_OVERLAY)
if(backbag == 3)
clothes_s.Blend(new /icon('icons/mob/back.dmi', "satchel-med"), ICON_OVERLAY)
if(GENETICIST)
clothes_s = new /icon('icons/mob/uniform.dmi', "geneticswhite_s")
clothes_s.Blend(new /icon('icons/mob/feet.dmi', "white"), ICON_UNDERLAY)
clothes_s.Blend(new /icon('icons/mob/suit.dmi', "labcoat_gen_open"), ICON_OVERLAY)
if(backbag == 2)
clothes_s.Blend(new /icon('icons/mob/back.dmi', "backpack"), ICON_OVERLAY)
if(backbag == 3)
clothes_s.Blend(new /icon('icons/mob/back.dmi', "satchel-gen"), ICON_OVERLAY)
if(VIROLOGIST)
clothes_s = new /icon('icons/mob/uniform.dmi', "virologywhite_s")
clothes_s.Blend(new /icon('icons/mob/feet.dmi', "white"), ICON_UNDERLAY)
clothes_s.Blend(new /icon('icons/mob/mask.dmi', "sterile"), ICON_OVERLAY)
clothes_s.Blend(new /icon('icons/mob/suit.dmi', "labcoat_vir_open"), ICON_OVERLAY)
if(backbag == 2)
clothes_s.Blend(new /icon('icons/mob/back.dmi', "medicalpack"), ICON_OVERLAY)
if(backbag == 3)
clothes_s.Blend(new /icon('icons/mob/back.dmi', "satchel-vir"), ICON_OVERLAY)
if(ROBOTICIST)
clothes_s = new /icon('icons/mob/uniform.dmi', "robotics_s")
clothes_s.Blend(new /icon('icons/mob/feet.dmi', "black"), ICON_UNDERLAY)
clothes_s.Blend(new /icon('icons/mob/hands.dmi', "bgloves"), ICON_UNDERLAY)
clothes_s.Blend(new /icon('icons/mob/items_righthand.dmi', "toolbox_blue"), ICON_OVERLAY)
clothes_s.Blend(new /icon('icons/mob/suit.dmi', "labcoat_open"), ICON_OVERLAY)
if(backbag == 2)
clothes_s.Blend(new /icon('icons/mob/back.dmi', "backpack"), ICON_OVERLAY)
if(backbag == 3)
clothes_s.Blend(new /icon('icons/mob/back.dmi', "satchel-norm"), ICON_OVERLAY)
else if(job_medsci_high)
switch(job_medsci_high)
if(RD)
clothes_s = new /icon('icons/mob/uniform.dmi', "director_s")
clothes_s.Blend(new /icon('icons/mob/feet.dmi', "brown"), ICON_UNDERLAY)
clothes_s.Blend(new /icon('icons/mob/items_righthand.dmi', "clipboard"), ICON_UNDERLAY)
clothes_s.Blend(new /icon('icons/mob/suit.dmi', "labcoat_open"), ICON_OVERLAY)
if(backbag == 2)
clothes_s.Blend(new /icon('icons/mob/back.dmi', "backpack"), ICON_OVERLAY)
if(backbag == 3)
clothes_s.Blend(new /icon('icons/mob/back.dmi', "satchel-tox"), ICON_OVERLAY)
if(SCIENTIST)
clothes_s = new /icon('icons/mob/uniform.dmi', "toxinswhite_s")
clothes_s.Blend(new /icon('icons/mob/feet.dmi', "white"), ICON_UNDERLAY)
clothes_s.Blend(new /icon('icons/mob/suit.dmi', "labcoat_tox_open"), ICON_OVERLAY)
if(backbag == 2)
clothes_s.Blend(new /icon('icons/mob/back.dmi', "backpack"), ICON_OVERLAY)
if(backbag == 3)
clothes_s.Blend(new /icon('icons/mob/back.dmi', "satchel-tox"), ICON_OVERLAY)
if(CHEMIST)
clothes_s = new /icon('icons/mob/uniform.dmi', "chemistrywhite_s")
clothes_s.Blend(new /icon('icons/mob/feet.dmi', "white"), ICON_UNDERLAY)
clothes_s.Blend(new /icon('icons/mob/suit.dmi', "labcoat_chem_open"), ICON_OVERLAY)
if(backbag == 2)
clothes_s.Blend(new /icon('icons/mob/back.dmi', "backpack"), ICON_OVERLAY)
if(backbag == 3)
clothes_s.Blend(new /icon('icons/mob/back.dmi', "satchel-chem"), ICON_OVERLAY)
if(CMO)
clothes_s = new /icon('icons/mob/uniform.dmi', "cmo_s")
clothes_s.Blend(new /icon('icons/mob/feet.dmi', "brown"), ICON_UNDERLAY)
clothes_s.Blend(new /icon('icons/mob/items_lefthand.dmi', "firstaid"), ICON_UNDERLAY)
clothes_s.Blend(new /icon('icons/mob/suit.dmi', "labcoat_cmo_open"), ICON_OVERLAY)
if(backbag == 2)
clothes_s.Blend(new /icon('icons/mob/back.dmi', "medicalpack"), ICON_OVERLAY)
if(backbag == 3)
clothes_s.Blend(new /icon('icons/mob/back.dmi', "satchel-med"), ICON_OVERLAY)
if(DOCTOR)
clothes_s = new /icon('icons/mob/uniform.dmi', "medical_s")
clothes_s.Blend(new /icon('icons/mob/feet.dmi', "white"), ICON_UNDERLAY)
clothes_s.Blend(new /icon('icons/mob/items_lefthand.dmi', "firstaid"), ICON_UNDERLAY)
clothes_s.Blend(new /icon('icons/mob/suit.dmi', "labcoat_open"), ICON_OVERLAY)
if(backbag == 2)
clothes_s.Blend(new /icon('icons/mob/back.dmi', "medicalpack"), ICON_OVERLAY)
if(backbag == 3)
clothes_s.Blend(new /icon('icons/mob/back.dmi', "satchel-med"), ICON_OVERLAY)
if(GENETICIST)
clothes_s = new /icon('icons/mob/uniform.dmi', "geneticswhite_s")
clothes_s.Blend(new /icon('icons/mob/feet.dmi', "white"), ICON_UNDERLAY)
clothes_s.Blend(new /icon('icons/mob/suit.dmi', "labcoat_gen_open"), ICON_OVERLAY)
if(backbag == 2)
clothes_s.Blend(new /icon('icons/mob/back.dmi', "backpack"), ICON_OVERLAY)
if(backbag == 3)
clothes_s.Blend(new /icon('icons/mob/back.dmi', "satchel-gen"), ICON_OVERLAY)
if(VIROLOGIST)
clothes_s = new /icon('icons/mob/uniform.dmi', "virologywhite_s")
clothes_s.Blend(new /icon('icons/mob/feet.dmi', "white"), ICON_UNDERLAY)
clothes_s.Blend(new /icon('icons/mob/mask.dmi', "sterile"), ICON_OVERLAY)
clothes_s.Blend(new /icon('icons/mob/suit.dmi', "labcoat_vir_open"), ICON_OVERLAY)
if(backbag == 2)
clothes_s.Blend(new /icon('icons/mob/back.dmi', "medicalpack"), ICON_OVERLAY)
if(backbag == 3)
clothes_s.Blend(new /icon('icons/mob/back.dmi', "satchel-vir"), ICON_OVERLAY)
if(ROBOTICIST)
clothes_s = new /icon('icons/mob/uniform.dmi', "robotics_s")
clothes_s.Blend(new /icon('icons/mob/feet.dmi', "black"), ICON_UNDERLAY)
clothes_s.Blend(new /icon('icons/mob/hands.dmi', "bgloves"), ICON_UNDERLAY)
clothes_s.Blend(new /icon('icons/mob/items_righthand.dmi', "toolbox_blue"), ICON_OVERLAY)
clothes_s.Blend(new /icon('icons/mob/suit.dmi', "labcoat_open"), ICON_OVERLAY)
if(backbag == 2)
clothes_s.Blend(new /icon('icons/mob/back.dmi', "backpack"), ICON_OVERLAY)
if(backbag == 3)
clothes_s.Blend(new /icon('icons/mob/back.dmi', "satchel-norm"), ICON_OVERLAY)
else if(job_engsec_high)
switch(job_engsec_high)
if(CAPTAIN)
clothes_s = new /icon('icons/mob/uniform.dmi', "captain_s")
clothes_s.Blend(new /icon('icons/mob/feet.dmi', "brown"), ICON_UNDERLAY)
clothes_s.Blend(new /icon('icons/mob/head.dmi', "captain"), ICON_OVERLAY)
clothes_s.Blend(new /icon('icons/mob/eyes.dmi', "sun"), ICON_OVERLAY)
clothes_s.Blend(new /icon('icons/mob/suit.dmi', "capcarapace"), ICON_OVERLAY)
if(backbag == 2)
clothes_s.Blend(new /icon('icons/mob/back.dmi', "backpack"), ICON_OVERLAY)
if(backbag == 3)
clothes_s.Blend(new /icon('icons/mob/back.dmi', "satchel-norm"), ICON_OVERLAY)
if(HOS)
clothes_s = new /icon('icons/mob/uniform.dmi', "hosred_s")
clothes_s.Blend(new /icon('icons/mob/feet.dmi', "jackboots"), ICON_UNDERLAY)
clothes_s.Blend(new /icon('icons/mob/hands.dmi', "bgloves"), ICON_UNDERLAY)
clothes_s.Blend(new /icon('icons/mob/head.dmi', "hoscap"), ICON_OVERLAY)
clothes_s.Blend(new /icon('icons/mob/eyes.dmi', "sunhud"), ICON_OVERLAY)
clothes_s.Blend(new /icon('icons/mob/suit.dmi', "hos"), ICON_OVERLAY)
if(backbag == 2)
clothes_s.Blend(new /icon('icons/mob/back.dmi', "securitypack"), ICON_OVERLAY)
if(backbag == 3)
clothes_s.Blend(new /icon('icons/mob/back.dmi', "satchel-sec"), ICON_OVERLAY)
if(WARDEN)
clothes_s = new /icon('icons/mob/uniform.dmi', "warden_s")
clothes_s.Blend(new /icon('icons/mob/feet.dmi', "jackboots"), ICON_UNDERLAY)
clothes_s.Blend(new /icon('icons/mob/hands.dmi', "bgloves"), ICON_UNDERLAY)
clothes_s.Blend(new /icon('icons/mob/head.dmi', "policehelm"), ICON_OVERLAY)
clothes_s.Blend(new /icon('icons/mob/eyes.dmi', "sunhud"), ICON_OVERLAY)
clothes_s.Blend(new /icon('icons/mob/suit.dmi', "warden_jacket"), ICON_OVERLAY)
if(backbag == 2)
clothes_s.Blend(new /icon('icons/mob/back.dmi', "securitypack"), ICON_OVERLAY)
if(backbag == 3)
clothes_s.Blend(new /icon('icons/mob/back.dmi', "satchel-sec"), ICON_OVERLAY)
if(DETECTIVE)
clothes_s = new /icon('icons/mob/uniform.dmi', "detective_s")
clothes_s.Blend(new /icon('icons/mob/feet.dmi', "brown"), ICON_UNDERLAY)
clothes_s.Blend(new /icon('icons/mob/hands.dmi', "bgloves"), ICON_UNDERLAY)
clothes_s.Blend(new /icon('icons/mob/mask.dmi', "cigaron"), ICON_OVERLAY)
clothes_s.Blend(new /icon('icons/mob/head.dmi', "detective"), ICON_OVERLAY)
clothes_s.Blend(new /icon('icons/mob/suit.dmi', "detective"), ICON_OVERLAY)
if(backbag == 2)
clothes_s.Blend(new /icon('icons/mob/back.dmi', "backpack"), ICON_OVERLAY)
if(backbag == 3)
clothes_s.Blend(new /icon('icons/mob/back.dmi', "satchel-norm"), ICON_OVERLAY)
if(OFFICER)
clothes_s = new /icon('icons/mob/uniform.dmi', "secred_s")
clothes_s.Blend(new /icon('icons/mob/feet.dmi', "jackboots"), ICON_UNDERLAY)
clothes_s.Blend(new /icon('icons/mob/head.dmi', "helmet"), ICON_OVERLAY)
clothes_s.Blend(new /icon('icons/mob/suit.dmi', "armor"), ICON_OVERLAY)
if(backbag == 2)
clothes_s.Blend(new /icon('icons/mob/back.dmi', "securitypack"), ICON_OVERLAY)
if(backbag == 3)
clothes_s.Blend(new /icon('icons/mob/back.dmi', "satchel-sec"), ICON_OVERLAY)
if(CHIEF)
clothes_s = new /icon('icons/mob/uniform.dmi', "chief_s")
clothes_s.Blend(new /icon('icons/mob/feet.dmi', "brown"), ICON_UNDERLAY)
clothes_s.Blend(new /icon('icons/mob/hands.dmi', "bgloves"), ICON_UNDERLAY)
clothes_s.Blend(new /icon('icons/mob/belt.dmi', "utility"), ICON_OVERLAY)
clothes_s.Blend(new /icon('icons/mob/mask.dmi', "cigaron"), ICON_OVERLAY)
clothes_s.Blend(new /icon('icons/mob/head.dmi', "hardhat0_white"), ICON_OVERLAY)
if(backbag == 2)
clothes_s.Blend(new /icon('icons/mob/back.dmi', "engiepack"), ICON_OVERLAY)
if(backbag == 3)
clothes_s.Blend(new /icon('icons/mob/back.dmi', "satchel-eng"), ICON_OVERLAY)
if(ENGINEER)
clothes_s = new /icon('icons/mob/uniform.dmi', "engine_s")
clothes_s.Blend(new /icon('icons/mob/feet.dmi', "orange"), ICON_UNDERLAY)
clothes_s.Blend(new /icon('icons/mob/belt.dmi', "utility"), ICON_OVERLAY)
clothes_s.Blend(new /icon('icons/mob/head.dmi', "hardhat0_yellow"), ICON_OVERLAY)
if(backbag == 2)
clothes_s.Blend(new /icon('icons/mob/back.dmi', "engiepack"), ICON_OVERLAY)
if(backbag == 3)
clothes_s.Blend(new /icon('icons/mob/back.dmi', "satchel-eng"), ICON_OVERLAY)
if(ATMOSTECH)
clothes_s = new /icon('icons/mob/uniform.dmi', "atmos_s")
clothes_s.Blend(new /icon('icons/mob/feet.dmi', "black"), ICON_UNDERLAY)
clothes_s.Blend(new /icon('icons/mob/hands.dmi', "bgloves"), ICON_UNDERLAY)
clothes_s.Blend(new /icon('icons/mob/belt.dmi', "utility"), ICON_OVERLAY)
if(backbag == 2)
clothes_s.Blend(new /icon('icons/mob/back.dmi', "backpack"), ICON_OVERLAY)
if(backbag == 3)
clothes_s.Blend(new /icon('icons/mob/back.dmi', "satchel-norm"), ICON_OVERLAY)
if(AI)//Gives AI and borgs assistant-wear, so they can still customize their character
clothes_s = new /icon('icons/mob/uniform.dmi', "grey_s")
clothes_s.Blend(new /icon('icons/mob/feet.dmi', "black"), ICON_UNDERLAY)
if(backbag == 2)
clothes_s.Blend(new /icon('icons/mob/back.dmi', "backpack"), ICON_OVERLAY)
else if(backbag == 3)
clothes_s.Blend(new /icon('icons/mob/back.dmi', "satchel"), ICON_OVERLAY)
if(CYBORG)
clothes_s = new /icon('icons/mob/uniform.dmi', "grey_s")
clothes_s.Blend(new /icon('icons/mob/feet.dmi', "black"), ICON_UNDERLAY)
if(backbag == 2)
clothes_s.Blend(new /icon('icons/mob/back.dmi', "backpack"), ICON_OVERLAY)
else if(backbag == 3)
clothes_s.Blend(new /icon('icons/mob/back.dmi', "satchel"), ICON_OVERLAY)
else if(job_engsec_high)
switch(job_engsec_high)
if(CAPTAIN)
clothes_s = new /icon('icons/mob/uniform.dmi', "captain_s")
clothes_s.Blend(new /icon('icons/mob/feet.dmi', "brown"), ICON_UNDERLAY)
clothes_s.Blend(new /icon('icons/mob/head.dmi', "captain"), ICON_OVERLAY)
clothes_s.Blend(new /icon('icons/mob/eyes.dmi', "sun"), ICON_OVERLAY)
clothes_s.Blend(new /icon('icons/mob/suit.dmi', "capcarapace"), ICON_OVERLAY)
if(backbag == 2)
clothes_s.Blend(new /icon('icons/mob/back.dmi', "backpack"), ICON_OVERLAY)
if(backbag == 3)
clothes_s.Blend(new /icon('icons/mob/back.dmi', "satchel-norm"), ICON_OVERLAY)
if(HOS)
clothes_s = new /icon('icons/mob/uniform.dmi', "hosred_s")
clothes_s.Blend(new /icon('icons/mob/feet.dmi', "jackboots"), ICON_UNDERLAY)
clothes_s.Blend(new /icon('icons/mob/hands.dmi', "bgloves"), ICON_UNDERLAY)
clothes_s.Blend(new /icon('icons/mob/head.dmi', "hoscap"), ICON_OVERLAY)
clothes_s.Blend(new /icon('icons/mob/eyes.dmi', "sunhud"), ICON_OVERLAY)
clothes_s.Blend(new /icon('icons/mob/suit.dmi', "hos"), ICON_OVERLAY)
if(backbag == 2)
clothes_s.Blend(new /icon('icons/mob/back.dmi', "securitypack"), ICON_OVERLAY)
if(backbag == 3)
clothes_s.Blend(new /icon('icons/mob/back.dmi', "satchel-sec"), ICON_OVERLAY)
if(WARDEN)
clothes_s = new /icon('icons/mob/uniform.dmi', "warden_s")
clothes_s.Blend(new /icon('icons/mob/feet.dmi', "jackboots"), ICON_UNDERLAY)
clothes_s.Blend(new /icon('icons/mob/hands.dmi', "bgloves"), ICON_UNDERLAY)
clothes_s.Blend(new /icon('icons/mob/head.dmi', "policehelm"), ICON_OVERLAY)
clothes_s.Blend(new /icon('icons/mob/eyes.dmi', "sunhud"), ICON_OVERLAY)
clothes_s.Blend(new /icon('icons/mob/suit.dmi', "warden_jacket"), ICON_OVERLAY)
if(backbag == 2)
clothes_s.Blend(new /icon('icons/mob/back.dmi', "securitypack"), ICON_OVERLAY)
if(backbag == 3)
clothes_s.Blend(new /icon('icons/mob/back.dmi', "satchel-sec"), ICON_OVERLAY)
if(DETECTIVE)
clothes_s = new /icon('icons/mob/uniform.dmi', "detective_s")
clothes_s.Blend(new /icon('icons/mob/feet.dmi', "brown"), ICON_UNDERLAY)
clothes_s.Blend(new /icon('icons/mob/hands.dmi', "bgloves"), ICON_UNDERLAY)
clothes_s.Blend(new /icon('icons/mob/mask.dmi', "cigaron"), ICON_OVERLAY)
clothes_s.Blend(new /icon('icons/mob/head.dmi', "detective"), ICON_OVERLAY)
clothes_s.Blend(new /icon('icons/mob/suit.dmi', "detective"), ICON_OVERLAY)
if(backbag == 2)
clothes_s.Blend(new /icon('icons/mob/back.dmi', "backpack"), ICON_OVERLAY)
if(backbag == 3)
clothes_s.Blend(new /icon('icons/mob/back.dmi', "satchel-norm"), ICON_OVERLAY)
if(OFFICER)
clothes_s = new /icon('icons/mob/uniform.dmi', "secred_s")
clothes_s.Blend(new /icon('icons/mob/feet.dmi', "jackboots"), ICON_UNDERLAY)
clothes_s.Blend(new /icon('icons/mob/head.dmi', "helmet"), ICON_OVERLAY)
clothes_s.Blend(new /icon('icons/mob/suit.dmi', "armor"), ICON_OVERLAY)
if(backbag == 2)
clothes_s.Blend(new /icon('icons/mob/back.dmi', "securitypack"), ICON_OVERLAY)
if(backbag == 3)
clothes_s.Blend(new /icon('icons/mob/back.dmi', "satchel-sec"), ICON_OVERLAY)
if(CHIEF)
clothes_s = new /icon('icons/mob/uniform.dmi', "chief_s")
clothes_s.Blend(new /icon('icons/mob/feet.dmi', "brown"), ICON_UNDERLAY)
clothes_s.Blend(new /icon('icons/mob/hands.dmi', "bgloves"), ICON_UNDERLAY)
clothes_s.Blend(new /icon('icons/mob/belt.dmi', "utility"), ICON_OVERLAY)
clothes_s.Blend(new /icon('icons/mob/mask.dmi', "cigaron"), ICON_OVERLAY)
clothes_s.Blend(new /icon('icons/mob/head.dmi', "hardhat0_white"), ICON_OVERLAY)
if(backbag == 2)
clothes_s.Blend(new /icon('icons/mob/back.dmi', "engiepack"), ICON_OVERLAY)
if(backbag == 3)
clothes_s.Blend(new /icon('icons/mob/back.dmi', "satchel-eng"), ICON_OVERLAY)
if(ENGINEER)
clothes_s = new /icon('icons/mob/uniform.dmi', "engine_s")
clothes_s.Blend(new /icon('icons/mob/feet.dmi', "orange"), ICON_UNDERLAY)
clothes_s.Blend(new /icon('icons/mob/belt.dmi', "utility"), ICON_OVERLAY)
clothes_s.Blend(new /icon('icons/mob/head.dmi', "hardhat0_yellow"), ICON_OVERLAY)
if(backbag == 2)
clothes_s.Blend(new /icon('icons/mob/back.dmi', "engiepack"), ICON_OVERLAY)
if(backbag == 3)
clothes_s.Blend(new /icon('icons/mob/back.dmi', "satchel-eng"), ICON_OVERLAY)
if(ATMOSTECH)
clothes_s = new /icon('icons/mob/uniform.dmi', "atmos_s")
clothes_s.Blend(new /icon('icons/mob/feet.dmi', "black"), ICON_UNDERLAY)
clothes_s.Blend(new /icon('icons/mob/hands.dmi', "bgloves"), ICON_UNDERLAY)
clothes_s.Blend(new /icon('icons/mob/belt.dmi', "utility"), ICON_OVERLAY)
if(backbag == 2)
clothes_s.Blend(new /icon('icons/mob/back.dmi', "backpack"), ICON_OVERLAY)
if(backbag == 3)
clothes_s.Blend(new /icon('icons/mob/back.dmi', "satchel-norm"), ICON_OVERLAY)
if(AI)//Gives AI and borgs assistant-wear, so they can still customize their character
clothes_s = new /icon('icons/mob/uniform.dmi', "grey_s")
clothes_s.Blend(new /icon('icons/mob/feet.dmi', "black"), ICON_UNDERLAY)
if(backbag == 2)
clothes_s.Blend(new /icon('icons/mob/back.dmi', "backpack"), ICON_OVERLAY)
else if(backbag == 3)
clothes_s.Blend(new /icon('icons/mob/back.dmi', "satchel"), ICON_OVERLAY)
if(CYBORG)
clothes_s = new /icon('icons/mob/uniform.dmi', "grey_s")
clothes_s.Blend(new /icon('icons/mob/feet.dmi', "black"), ICON_UNDERLAY)
if(backbag == 2)
clothes_s.Blend(new /icon('icons/mob/back.dmi', "backpack"), ICON_OVERLAY)
else if(backbag == 3)
clothes_s.Blend(new /icon('icons/mob/back.dmi', "satchel"), ICON_OVERLAY)
preview_icon.Blend(eyes_s, ICON_OVERLAY)
if(clothes_s)
preview_icon.Blend(clothes_s, ICON_OVERLAY)
preview_icon_front = new(preview_icon, dir = SOUTH)
preview_icon_side = new(preview_icon, dir = WEST)
preview_icon.Blend(eyes_s, ICON_OVERLAY)
if(clothes_s)
preview_icon.Blend(clothes_s, ICON_OVERLAY)
preview_icon_front = new(preview_icon, dir = SOUTH)
preview_icon_side = new(preview_icon, dir = WEST)
del(preview_icon)
del(eyes_s)
del(clothes_s)
del(preview_icon)
del(eyes_s)
del(clothes_s)
+368 -368
View File
@@ -48,285 +48,285 @@
/datum/sprite_accessory/hair
icon = 'icons/mob/human_face.dmi' // default icon for all hairs
short
name = "Short Hair" // try to capatilize the names please~
icon_state = "hair_a" // you do not need to define _s or _l sub-states, game automatically does this for you
/datum/sprite_accessory/hair/short
name = "Short Hair" // try to capatilize the names please~
icon_state = "hair_a" // you do not need to define _s or _l sub-states, game automatically does this for you
shorthair2
name = "Short Hair 2"
icon_state = "hair_shorthair2"
/datum/sprite_accessory/hair/shorthair2
name = "Short Hair 2"
icon_state = "hair_shorthair2"
cut
name = "Cut Hair"
icon_state = "hair_c"
/datum/sprite_accessory/hair/cut
name = "Cut Hair"
icon_state = "hair_c"
long
name = "Shoulder-length Hair"
icon_state = "hair_b"
/datum/sprite_accessory/hair/long
name = "Shoulder-length Hair"
icon_state = "hair_b"
longer
name = "Long Hair"
icon_state = "hair_vlong"
/datum/sprite_accessory/hair/longer
name = "Long Hair"
icon_state = "hair_vlong"
long_over_eye
name = "Over eye"
icon_state = "hair_longovereye"
/datum/sprite_accessory/hair/long_over_eye
name = "Over eye"
icon_state = "hair_longovereye"
longest
name = "Very Long Hair"
icon_state = "hair_longest"
/datum/sprite_accessory/hair/longest
name = "Very Long Hair"
icon_state = "hair_longest"
longest2
name = "Very Long Over Eye"
icon_state = "hair_longest2"
/datum/sprite_accessory/hair/longest2
name = "Very Long Over Eye"
icon_state = "hair_longest2"
longfringe
name = "Long Fringe"
icon_state = "hair_longfringe"
/datum/sprite_accessory/hair/longfringe
name = "Long Fringe"
icon_state = "hair_longfringe"
longestalt
name = "Longer Fringe"
icon_state = "hair_vlongfringe"
/datum/sprite_accessory/hair/longestalt
name = "Longer Fringe"
icon_state = "hair_vlongfringe"
gentle
name = "Gentle"
icon_state = "hair_gentle"
/datum/sprite_accessory/hair/gentle
name = "Gentle"
icon_state = "hair_gentle"
halfbang
name = "Half-banged Hair"
icon_state = "hair_halfbang"
/datum/sprite_accessory/hair/halfbang
name = "Half-banged Hair"
icon_state = "hair_halfbang"
halfbangalt
name = "Half-banged Hair Alt"
icon_state = "hair_halfbang_alt"
/datum/sprite_accessory/hair/halfbangalt
name = "Half-banged Hair Alt"
icon_state = "hair_halfbang_alt"
ponytail1
name = "Ponytail 1"
icon_state = "hair_ponytail"
/datum/sprite_accessory/hair/ponytail1
name = "Ponytail 1"
icon_state = "hair_ponytail"
ponytail2
name = "Ponytail 2"
icon_state = "hair_pa"
/datum/sprite_accessory/hair/ponytail2
name = "Ponytail 2"
icon_state = "hair_pa"
ponytail3
name = "Ponytail 3"
icon_state = "hair_ponytail3"
/datum/sprite_accessory/hair/ponytail3
name = "Ponytail 3"
icon_state = "hair_ponytail3"
side_tail
name = "Side Pony"
icon_state = "hair_sidetail"
/datum/sprite_accessory/hair/side_tail
name = "Side Pony"
icon_state = "hair_sidetail"
side_tail2
name = "Side Pony 2"
icon_state = "hair_sidetail2"
/datum/sprite_accessory/hair/side_tail2
name = "Side Pony 2"
icon_state = "hair_sidetail2"
side_tail3
name = "Side Pony 3"
icon_state = "hair_stail"
/datum/sprite_accessory/hair/side_tail3
name = "Side Pony 3"
icon_state = "hair_stail"
oneshoulder
name = "One Shoulder"
icon_state = "hair_oneshoulder"
/datum/sprite_accessory/hair/oneshoulder
name = "One Shoulder"
icon_state = "hair_oneshoulder"
tressshoulder
name = "Tress Shoulder"
icon_state = "hair_tressshoulder"
/datum/sprite_accessory/hair/tressshoulder
name = "Tress Shoulder"
icon_state = "hair_tressshoulder"
parted
name = "Parted"
icon_state = "hair_parted"
/datum/sprite_accessory/hair/parted
name = "Parted"
icon_state = "hair_parted"
pompadour
name = "Pompadour"
icon_state = "hair_pompadour"
/datum/sprite_accessory/hair/pompadour
name = "Pompadour"
icon_state = "hair_pompadour"
quiff
name = "Quiff"
icon_state = "hair_quiff"
/datum/sprite_accessory/hair/quiff
name = "Quiff"
icon_state = "hair_quiff"
bedhead
name = "Bedhead"
icon_state = "hair_bedhead"
/datum/sprite_accessory/hair/bedhead
name = "Bedhead"
icon_state = "hair_bedhead"
bedhead2
name = "Bedhead 2"
icon_state = "hair_bedheadv2"
/datum/sprite_accessory/hair/bedhead2
name = "Bedhead 2"
icon_state = "hair_bedheadv2"
bedhead3
name = "Bedhead 3"
icon_state = "hair_bedheadv3"
/datum/sprite_accessory/hair/bedhead3
name = "Bedhead 3"
icon_state = "hair_bedheadv3"
messy
name = "Messy"
icon_state = "hair_messy"
/datum/sprite_accessory/hair/messy
name = "Messy"
icon_state = "hair_messy"
beehive
name = "Beehive"
icon_state = "hair_beehive"
/datum/sprite_accessory/hair/beehive
name = "Beehive"
icon_state = "hair_beehive"
bobcurl
name = "Bobcurl"
icon_state = "hair_bobcurl"
/datum/sprite_accessory/hair/bobcurl
name = "Bobcurl"
icon_state = "hair_bobcurl"
bob
name = "Bob"
icon_state = "hair_bobcut"
/datum/sprite_accessory/hair/bob
name = "Bob"
icon_state = "hair_bobcut"
bowl
name = "Bowl"
icon_state = "hair_bowlcut"
/datum/sprite_accessory/hair/bowl
name = "Bowl"
icon_state = "hair_bowlcut"
buzz
name = "Buzzcut"
icon_state = "hair_buzzcut"
/datum/sprite_accessory/hair/buzz
name = "Buzzcut"
icon_state = "hair_buzzcut"
crew
name = "Crewcut"
icon_state = "hair_crewcut"
/datum/sprite_accessory/hair/crew
name = "Crewcut"
icon_state = "hair_crewcut"
combover
name = "Combover"
icon_state = "hair_combover"
/datum/sprite_accessory/hair/combover
name = "Combover"
icon_state = "hair_combover"
devillock
name = "Devil Lock"
icon_state = "hair_devilock"
/datum/sprite_accessory/hair/devillock
name = "Devil Lock"
icon_state = "hair_devilock"
dreadlocks
name = "Dreadlocks"
icon_state = "hair_dreads"
/datum/sprite_accessory/hair/dreadlocks
name = "Dreadlocks"
icon_state = "hair_dreads"
curls
name = "Curls"
icon_state = "hair_curls"
/datum/sprite_accessory/hair/curls
name = "Curls"
icon_state = "hair_curls"
afro
name = "Afro"
icon_state = "hair_afro"
/datum/sprite_accessory/hair/afro
name = "Afro"
icon_state = "hair_afro"
afro2
name = "Afro 2"
icon_state = "hair_afro2"
/datum/sprite_accessory/hair/afro2
name = "Afro 2"
icon_state = "hair_afro2"
afro_large
name = "Big Afro"
icon_state = "hair_bigafro"
/datum/sprite_accessory/hair/afro_large
name = "Big Afro"
icon_state = "hair_bigafro"
sargeant
name = "Flat Top"
icon_state = "hair_sargeant"
/datum/sprite_accessory/hair/sargeant
name = "Flat Top"
icon_state = "hair_sargeant"
emo
name = "Emo"
icon_state = "hair_emo"
/datum/sprite_accessory/hair/emo
name = "Emo"
icon_state = "hair_emo"
fag
name = "Flow Hair"
icon_state = "hair_f"
/datum/sprite_accessory/hair/fag
name = "Flow Hair"
icon_state = "hair_f"
feather
name = "Feather"
icon_state = "hair_feather"
/datum/sprite_accessory/hair/feather
name = "Feather"
icon_state = "hair_feather"
hitop
name = "Hitop"
icon_state = "hair_hitop"
/datum/sprite_accessory/hair/hitop
name = "Hitop"
icon_state = "hair_hitop"
mohawk
name = "Mohawk"
icon_state = "hair_d"
/datum/sprite_accessory/hair/mohawk
name = "Mohawk"
icon_state = "hair_d"
jensen
name = "Adam Jensen Hair"
icon_state = "hair_jensen"
/datum/sprite_accessory/hair/jensen
name = "Adam Jensen Hair"
icon_state = "hair_jensen"
gelled
name = "Gelled Back"
icon_state = "hair_gelled"
/datum/sprite_accessory/hair/gelled
name = "Gelled Back"
icon_state = "hair_gelled"
spiky
name = "Spiky"
icon_state = "hair_spikey"
/datum/sprite_accessory/hair/spiky
name = "Spiky"
icon_state = "hair_spikey"
protagonist
name = "Slightly long"
icon_state = "hair_protagonist"
/datum/sprite_accessory/hair/protagonist
name = "Slightly long"
icon_state = "hair_protagonist"
kusangi
name = "Kusanagi Hair"
icon_state = "hair_kusanagi"
/datum/sprite_accessory/hair/kusangi
name = "Kusanagi Hair"
icon_state = "hair_kusanagi"
kagami
name = "Pigtails"
icon_state = "hair_kagami"
/datum/sprite_accessory/hair/kagami
name = "Pigtails"
icon_state = "hair_kagami"
himecut
name = "Hime Cut"
icon_state = "hair_himecut"
/datum/sprite_accessory/hair/himecut
name = "Hime Cut"
icon_state = "hair_himecut"
antenna
name = "Ahoge"
icon_state = "hair_antenna"
/datum/sprite_accessory/hair/antenna
name = "Ahoge"
icon_state = "hair_antenna"
pigtail
name = "Pig tails"
icon_state = "hair_pigtails"
/datum/sprite_accessory/hair/pigtail
name = "Pig tails"
icon_state = "hair_pigtails"
front_braid
name = "Braided front"
icon_state = "hair_braidfront"
/datum/sprite_accessory/hair/front_braid
name = "Braided front"
icon_state = "hair_braidfront"
lowbraid
name = "Low Braid"
icon_state = "hair_hbraid"
/datum/sprite_accessory/hair/lowbraid
name = "Low Braid"
icon_state = "hair_hbraid"
not_floorlength_braid
name = "High Braid"
icon_state = "hair_braid2"
/datum/sprite_accessory/hair/not_floorlength_braid
name = "High Braid"
icon_state = "hair_braid2"
braid
name = "Floorlength Braid"
icon_state = "hair_braid"
/datum/sprite_accessory/hair/braid
name = "Floorlength Braid"
icon_state = "hair_braid"
odango
name = "Odango"
icon_state = "hair_odango"
/datum/sprite_accessory/hair/odango
name = "Odango"
icon_state = "hair_odango"
ombre
name = "Ombre"
icon_state = "hair_ombre"
/datum/sprite_accessory/hair/ombre
name = "Ombre"
icon_state = "hair_ombre"
updo
name = "Updo"
icon_state = "hair_updo"
/datum/sprite_accessory/hair/updo
name = "Updo"
icon_state = "hair_updo"
skinhead
name = "Skinhead"
icon_state = "hair_skinhead"
/datum/sprite_accessory/hair/skinhead
name = "Skinhead"
icon_state = "hair_skinhead"
longbangs
name = "Long Bangs"
icon_state = "hair_lbangs"
/datum/sprite_accessory/hair/longbangs
name = "Long Bangs"
icon_state = "hair_lbangs"
balding
name = "Balding Hair"
icon_state = "hair_e"
/datum/sprite_accessory/hair/balding
name = "Balding Hair"
icon_state = "hair_e"
bald
name = "Bald"
icon_state = null
/datum/sprite_accessory/hair/bald
name = "Bald"
icon_state = null
parted
name = "Side Part"
icon_state = "hair_part"
/datum/sprite_accessory/hair/parted
name = "Side Part"
icon_state = "hair_part"
braided
name = "Braided"
icon_state = "hair_braided"
/datum/sprite_accessory/hair/braided
name = "Braided"
icon_state = "hair_braided"
bun
name = "Bun Head"
icon_state = "hair_bun"
/datum/sprite_accessory/hair/bun
name = "Bun Head"
icon_state = "hair_bun"
/////////////////////////////
// Facial Hair Definitions //
@@ -335,82 +335,82 @@
icon = 'icons/mob/human_face.dmi'
gender = MALE // barf (unless you're a dorf, dorfs dig chix w/ beards :P)
shaved
name = "Shaved"
icon_state = null
gender = NEUTER
/datum/sprite_accessory/facial_hair/shaved
name = "Shaved"
icon_state = null
gender = NEUTER
watson
name = "Watson Mustache"
icon_state = "facial_watson"
/datum/sprite_accessory/facial_hair/watson
name = "Watson Mustache"
icon_state = "facial_watson"
hogan
name = "Hulk Hogan Mustache"
icon_state = "facial_hogan" //-Neek
/datum/sprite_accessory/facial_hair/hogan
name = "Hulk Hogan Mustache"
icon_state = "facial_hogan" //-Neek
vandyke
name = "Van Dyke Mustache"
icon_state = "facial_vandyke"
/datum/sprite_accessory/facial_hair/vandyke
name = "Van Dyke Mustache"
icon_state = "facial_vandyke"
chaplin
name = "Square Mustache"
icon_state = "facial_chaplin"
/datum/sprite_accessory/facial_hair/chaplin
name = "Square Mustache"
icon_state = "facial_chaplin"
selleck
name = "Selleck Mustache"
icon_state = "facial_selleck"
/datum/sprite_accessory/facial_hair/selleck
name = "Selleck Mustache"
icon_state = "facial_selleck"
neckbeard
name = "Neckbeard"
icon_state = "facial_neckbeard"
/datum/sprite_accessory/facial_hair/neckbeard
name = "Neckbeard"
icon_state = "facial_neckbeard"
fullbeard
name = "Full Beard"
icon_state = "facial_fullbeard"
/datum/sprite_accessory/facial_hair/fullbeard
name = "Full Beard"
icon_state = "facial_fullbeard"
longbeard
name = "Long Beard"
icon_state = "facial_longbeard"
/datum/sprite_accessory/facial_hair/longbeard
name = "Long Beard"
icon_state = "facial_longbeard"
vlongbeard
name = "Very Long Beard"
icon_state = "facial_wise"
/datum/sprite_accessory/facial_hair/vlongbeard
name = "Very Long Beard"
icon_state = "facial_wise"
elvis
name = "Elvis Sideburns"
icon_state = "facial_elvis"
/datum/sprite_accessory/facial_hair/elvis
name = "Elvis Sideburns"
icon_state = "facial_elvis"
abe
name = "Abraham Lincoln Beard"
icon_state = "facial_abe"
/datum/sprite_accessory/facial_hair/abe
name = "Abraham Lincoln Beard"
icon_state = "facial_abe"
chinstrap
name = "Chinstrap"
icon_state = "facial_chin"
/datum/sprite_accessory/facial_hair/chinstrap
name = "Chinstrap"
icon_state = "facial_chin"
hip
name = "Hipster Beard"
icon_state = "facial_hip"
/datum/sprite_accessory/facial_hair/hip
name = "Hipster Beard"
icon_state = "facial_hip"
gt
name = "Goatee"
icon_state = "facial_gt"
/datum/sprite_accessory/facial_hair/gt
name = "Goatee"
icon_state = "facial_gt"
jensen
name = "Adam Jensen Beard"
icon_state = "facial_jensen"
/datum/sprite_accessory/facial_hair/jensen
name = "Adam Jensen Beard"
icon_state = "facial_jensen"
dwarf
name = "Dwarf Beard"
icon_state = "facial_dwarf"
/datum/sprite_accessory/facial_hair/dwarf
name = "Dwarf Beard"
icon_state = "facial_dwarf"
fiveoclock
name = "Five o Clock Shadow"
icon_state = "facial_fiveoclock"
/datum/sprite_accessory/facial_hair/fiveoclock
name = "Five o Clock Shadow"
icon_state = "facial_fiveoclock"
fu
name = "Fu Manchu"
icon_state = "facial_fumanchu"
/datum/sprite_accessory/facial_hair/fu
name = "Fu Manchu"
icon_state = "facial_fumanchu"
///////////////////////////
// Underwear Definitions //
@@ -418,127 +418,127 @@
/datum/sprite_accessory/underwear
icon = 'icons/mob/underwear.dmi'
nude
name = "Nude"
icon_state = null
gender = NEUTER
/datum/sprite_accessory/underwear/nude
name = "Nude"
icon_state = null
gender = NEUTER
male_white
name = "Mens White"
icon_state = "male_white"
gender = MALE
/datum/sprite_accessory/underwear/male_white
name = "Mens White"
icon_state = "male_white"
gender = MALE
male_grey
name = "Mens Grey"
icon_state = "male_grey"
gender = MALE
/datum/sprite_accessory/underwear/male_grey
name = "Mens Grey"
icon_state = "male_grey"
gender = MALE
male_green
name = "Mens Green"
icon_state = "male_green"
gender = MALE
/datum/sprite_accessory/underwear/male_green
name = "Mens Green"
icon_state = "male_green"
gender = MALE
male_blue
name = "Mens Blue"
icon_state = "male_blue"
gender = MALE
/datum/sprite_accessory/underwear/male_blue
name = "Mens Blue"
icon_state = "male_blue"
gender = MALE
male_black
name = "Mens Black"
icon_state = "male_black"
gender = MALE
/datum/sprite_accessory/underwear/male_black
name = "Mens Black"
icon_state = "male_black"
gender = MALE
male_mankini
name = "Mankini"
icon_state = "male_mankini"
gender = MALE
/datum/sprite_accessory/underwear/male_mankini
name = "Mankini"
icon_state = "male_mankini"
gender = MALE
male_hearts
name = "Mens Hearts Boxer"
icon_state = "male_hearts"
gender = MALE
/datum/sprite_accessory/underwear/male_hearts
name = "Mens Hearts Boxer"
icon_state = "male_hearts"
gender = MALE
male_blackalt
name = "Mens Black Boxer"
icon_state = "male_blackalt"
gender = MALE
/datum/sprite_accessory/underwear/male_blackalt
name = "Mens Black Boxer"
icon_state = "male_blackalt"
gender = MALE
male_greyalt
name = "Mens Grey Boxer"
icon_state = "male_greyalt"
gender = MALE
/datum/sprite_accessory/underwear/male_greyalt
name = "Mens Grey Boxer"
icon_state = "male_greyalt"
gender = MALE
male_stripe
name = "Mens Striped Boxer"
icon_state = "male_stripe"
gender = MALE
/datum/sprite_accessory/underwear/male_stripe
name = "Mens Striped Boxer"
icon_state = "male_stripe"
gender = MALE
male_kinky
name = "Mens Kinky"
icon_state = "male_kinky"
gender = MALE
/datum/sprite_accessory/underwear/male_kinky
name = "Mens Kinky"
icon_state = "male_kinky"
gender = MALE
male_red
name = "Mens Red"
icon_state = "male_red"
gender = MALE
/datum/sprite_accessory/underwear/male_red
name = "Mens Red"
icon_state = "male_red"
gender = MALE
female_red
name = "Ladies Red"
icon_state = "female_red"
gender = FEMALE
/datum/sprite_accessory/underwear/female_red
name = "Ladies Red"
icon_state = "female_red"
gender = FEMALE
female_white
name = "Ladies White"
icon_state = "female_white"
gender = FEMALE
/datum/sprite_accessory/underwear/female_white
name = "Ladies White"
icon_state = "female_white"
gender = FEMALE
female_yellow
name = "Ladies Yellow"
icon_state = "female_yellow"
gender = FEMALE
/datum/sprite_accessory/underwear/female_yellow
name = "Ladies Yellow"
icon_state = "female_yellow"
gender = FEMALE
female_blue
name = "Ladies Blue"
icon_state = "female_blue"
gender = FEMALE
/datum/sprite_accessory/underwear/female_blue
name = "Ladies Blue"
icon_state = "female_blue"
gender = FEMALE
female_black
name = "Ladies Black"
icon_state = "female_black"
gender = FEMALE
/datum/sprite_accessory/underwear/female_black
name = "Ladies Black"
icon_state = "female_black"
gender = FEMALE
female_thong
name = "Ladies Thong"
icon_state = "female_thong"
gender = FEMALE
/datum/sprite_accessory/underwear/female_thong
name = "Ladies Thong"
icon_state = "female_thong"
gender = FEMALE
female_babydoll
name = "Babydoll"
icon_state = "female_babydoll"
gender = FEMALE
/datum/sprite_accessory/underwear/female_babydoll
name = "Babydoll"
icon_state = "female_babydoll"
gender = FEMALE
female_babyblue
name = "Ladies Baby-Blue"
icon_state = "female_babyblue"
gender = FEMALE
/datum/sprite_accessory/underwear/female_babyblue
name = "Ladies Baby-Blue"
icon_state = "female_babyblue"
gender = FEMALE
female_green
name = "Ladies Green"
icon_state = "female_green"
gender = FEMALE
/datum/sprite_accessory/underwear/female_green
name = "Ladies Green"
icon_state = "female_green"
gender = FEMALE
female_pink
name = "Ladies Pink"
icon_state = "female_pink"
gender = FEMALE
/datum/sprite_accessory/underwear/female_pink
name = "Ladies Pink"
icon_state = "female_pink"
gender = FEMALE
female_kinky
name = "Ladies Kinky"
icon_state = "female_kinky"
gender = FEMALE
/datum/sprite_accessory/underwear/female_kinky
name = "Ladies Kinky"
icon_state = "female_kinky"
gender = FEMALE
female_tankini
name = "Tankini"
icon_state = "female_tankini"
gender = FEMALE
/datum/sprite_accessory/underwear/female_tankini
name = "Tankini"
icon_state = "female_tankini"
gender = FEMALE