mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-29 06:57:42 +01:00
Merge branch 'master' of https://github.com/Baystation12/Baystation12
This commit is contained in:
@@ -31,7 +31,7 @@ mob/proc/custom_emote(var/m_type=1,var/message = null)
|
||||
if (istype(M, /mob/new_player))
|
||||
continue
|
||||
if(findtext(message," snores.")) //Because we have so many sleeping people.
|
||||
continue
|
||||
break
|
||||
if(M.stat == 2 && M.client.ghost_sight && !(M in viewers(src,null)))
|
||||
M.show_message(message)
|
||||
|
||||
|
||||
@@ -418,8 +418,8 @@
|
||||
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 (client)
|
||||
client.screen.Remove(global_hud.blurry,global_hud.druggy,global_hud.vimpaired)
|
||||
|
||||
if ((blind && stat != 2))
|
||||
if ((blinded))
|
||||
@@ -441,7 +441,7 @@
|
||||
if (!( machine.check_eye(src) ))
|
||||
reset_view(null)
|
||||
else
|
||||
if(!client.adminobs)
|
||||
if(client && !client.adminobs)
|
||||
reset_view(null)
|
||||
|
||||
return 1
|
||||
|
||||
@@ -332,9 +332,8 @@ FUCK YOU MORE FAT CODE -Hawk*/
|
||||
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 (client)
|
||||
client.screen.Remove(global_hud.blurry,global_hud.druggy,global_hud.vimpaired)
|
||||
|
||||
if ((blind && stat != 2))
|
||||
if ((blinded))
|
||||
@@ -356,7 +355,7 @@ FUCK YOU MORE FAT CODE -Hawk*/
|
||||
if (!( machine.check_eye(src) ))
|
||||
reset_view(null)
|
||||
else
|
||||
if(!client.adminobs)
|
||||
if(client && !client.adminobs)
|
||||
reset_view(null)
|
||||
|
||||
return 1
|
||||
|
||||
@@ -242,8 +242,8 @@
|
||||
healths.icon_state = "health7"
|
||||
|
||||
if(pullin) pullin.icon_state = "pull[pulling ? 1 : 0]"
|
||||
|
||||
client.screen.Remove(global_hud.blurry,global_hud.druggy,global_hud.vimpaired)
|
||||
if (client)
|
||||
client.screen.Remove(global_hud.blurry,global_hud.druggy,global_hud.vimpaired)
|
||||
|
||||
if ((blind && stat != 2))
|
||||
if ((blinded))
|
||||
@@ -265,7 +265,7 @@
|
||||
if (!( machine.check_eye(src) ))
|
||||
reset_view(null)
|
||||
else
|
||||
if(!client.adminobs)
|
||||
if(client && !client.adminobs)
|
||||
reset_view(null)
|
||||
|
||||
return 1
|
||||
|
||||
@@ -141,7 +141,7 @@
|
||||
shock_damage *= siemens_coeff
|
||||
if (shock_damage<1)
|
||||
return 0
|
||||
src.take_overall_damage(0,shock_damage)
|
||||
src.take_overall_damage(0,shock_damage,used_weapon="Electrocution")
|
||||
//src.burn_skin(shock_damage)
|
||||
//src.adjustFireLoss(shock_damage) //burn_skin will do this for us
|
||||
//src.updatehealth()
|
||||
@@ -353,10 +353,12 @@
|
||||
if(H.gloves)
|
||||
if(H.gloves.clean_blood())
|
||||
H.update_inv_gloves(0)
|
||||
H.gloves.germ_level = 0
|
||||
else
|
||||
if(H.bloody_hands)
|
||||
H.bloody_hands = 0
|
||||
H.update_inv_gloves(0)
|
||||
H.germ_level = 0
|
||||
update_icons() //apply the now updated overlays to the mob
|
||||
|
||||
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
gender = MALE
|
||||
var/list/stomach_contents = list()
|
||||
var/brain_op_stage = 0.0
|
||||
var/ribcage_op_stage = 0
|
||||
/*
|
||||
var/eye_op_stage = 0.0
|
||||
var/appendix_op_stage = 0.0
|
||||
@@ -18,4 +19,4 @@
|
||||
var/analgesic = 0 // when this is set, the mob isn't affected by shock or pain
|
||||
// life should decrease this by 1 every tick
|
||||
// total amount of wounds on mob, used to spread out healing and the like over all wounds
|
||||
var/number_wounds = 0
|
||||
var/number_wounds = 0
|
||||
|
||||
@@ -482,9 +482,9 @@
|
||||
|
||||
|
||||
if (m_type & 1)
|
||||
for (var/mob/O in viewers(src, null))
|
||||
for (var/mob/O in get_mobs_in_view(world.view,src))
|
||||
O.show_message(message, m_type)
|
||||
else if (m_type & 2)
|
||||
for (var/mob/O in hearers(src.loc, null))
|
||||
for (var/mob/O in (hearers(src.loc, null) | get_mobs_in_view(world.view,src)))
|
||||
O.show_message(message, m_type)
|
||||
|
||||
|
||||
@@ -280,6 +280,8 @@
|
||||
var/this_wound_desc = W.desc
|
||||
if(W.bleeding()) this_wound_desc = "bleeding [this_wound_desc]"
|
||||
else if(W.bandaged) this_wound_desc = "bandaged [this_wound_desc]"
|
||||
if(W.germ_level > 1000) this_wound_desc = "badly infected [this_wound_desc]"
|
||||
else if(W.germ_level > 100) this_wound_desc = "lightly infected [this_wound_desc]"
|
||||
if(this_wound_desc in wound_descriptors)
|
||||
wound_descriptors[this_wound_desc] += W.amount
|
||||
continue
|
||||
|
||||
@@ -272,34 +272,36 @@
|
||||
|
||||
// focus most of the blast on one organ
|
||||
var/datum/organ/external/take_blast = pick(organs)
|
||||
update |= take_blast.take_damage(b_loss * 0.9, f_loss * 0.9)
|
||||
update |= take_blast.take_damage(b_loss * 0.9, f_loss * 0.9, used_weapon = "Explosive blast")
|
||||
|
||||
// distribute the remaining 10% on all limbs equally
|
||||
b_loss *= 0.1
|
||||
f_loss *= 0.1
|
||||
|
||||
var/weapon_message = "Explosive Blast"
|
||||
|
||||
for(var/datum/organ/external/temp in organs)
|
||||
switch(temp.name)
|
||||
if("head")
|
||||
update |= temp.take_damage(b_loss * 0.2, f_loss * 0.2)
|
||||
update |= temp.take_damage(b_loss * 0.2, f_loss * 0.2, used_weapon = weapon_message)
|
||||
if("chest")
|
||||
update |= temp.take_damage(b_loss * 0.4, f_loss * 0.4)
|
||||
update |= temp.take_damage(b_loss * 0.4, f_loss * 0.4, used_weapon = weapon_message)
|
||||
if("l_arm")
|
||||
update |= temp.take_damage(b_loss * 0.05, f_loss * 0.05)
|
||||
update |= temp.take_damage(b_loss * 0.05, f_loss * 0.05, used_weapon = weapon_message)
|
||||
if("r_arm")
|
||||
update |= temp.take_damage(b_loss * 0.05, f_loss * 0.05)
|
||||
update |= temp.take_damage(b_loss * 0.05, f_loss * 0.05, used_weapon = weapon_message)
|
||||
if("l_leg")
|
||||
update |= temp.take_damage(b_loss * 0.05, f_loss * 0.05)
|
||||
update |= temp.take_damage(b_loss * 0.05, f_loss * 0.05, used_weapon = weapon_message)
|
||||
if("r_leg")
|
||||
update |= temp.take_damage(b_loss * 0.05, f_loss * 0.05)
|
||||
update |= temp.take_damage(b_loss * 0.05, f_loss * 0.05, used_weapon = weapon_message)
|
||||
if("r_foot")
|
||||
update |= temp.take_damage(b_loss * 0.05, f_loss * 0.05)
|
||||
update |= temp.take_damage(b_loss * 0.05, f_loss * 0.05, used_weapon = weapon_message)
|
||||
if("l_foot")
|
||||
update |= temp.take_damage(b_loss * 0.05, f_loss * 0.05)
|
||||
update |= temp.take_damage(b_loss * 0.05, f_loss * 0.05, used_weapon = weapon_message)
|
||||
if("r_arm")
|
||||
update |= temp.take_damage(b_loss * 0.05, f_loss * 0.05)
|
||||
update |= temp.take_damage(b_loss * 0.05, f_loss * 0.05, used_weapon = weapon_message)
|
||||
if("l_arm")
|
||||
update |= temp.take_damage(b_loss * 0.05, f_loss * 0.05)
|
||||
update |= temp.take_damage(b_loss * 0.05, f_loss * 0.05, used_weapon = weapon_message)
|
||||
if(update) UpdateDamageIcon()
|
||||
|
||||
|
||||
@@ -819,6 +821,12 @@
|
||||
/mob/living/carbon/human/proc/morph()
|
||||
set name = "Morph"
|
||||
set category = "Superpower"
|
||||
|
||||
if(stat!=CONSCIOUS)
|
||||
reset_view(0)
|
||||
remoteview_target = null
|
||||
return
|
||||
|
||||
if(!(mMorph in mutations))
|
||||
src.verbs -= /mob/living/carbon/human/proc/morph
|
||||
return
|
||||
@@ -892,6 +900,12 @@
|
||||
/mob/living/carbon/human/proc/remotesay()
|
||||
set name = "Project mind"
|
||||
set category = "Superpower"
|
||||
|
||||
if(stat!=CONSCIOUS)
|
||||
reset_view(0)
|
||||
remoteview_target = null
|
||||
return
|
||||
|
||||
if(!(mRemotetalk in src.mutations))
|
||||
src.verbs -= /mob/living/carbon/human/proc/remotesay
|
||||
return
|
||||
@@ -915,12 +929,19 @@
|
||||
set name = "Remote View"
|
||||
set category = "Superpower"
|
||||
|
||||
if(stat!=CONSCIOUS)
|
||||
remoteview_target = null
|
||||
reset_view(0)
|
||||
return
|
||||
|
||||
if(!(mRemote in src.mutations))
|
||||
remoteview_target = null
|
||||
reset_view(0)
|
||||
src.verbs -= /mob/living/carbon/human/proc/remoteobserve
|
||||
return
|
||||
|
||||
if(client.eye != client.mob)
|
||||
remoteview_target = null
|
||||
reset_view(0)
|
||||
return
|
||||
|
||||
@@ -928,18 +949,62 @@
|
||||
|
||||
for(var/mob/living/carbon/h in world)
|
||||
var/turf/temp_turf = get_turf(h)
|
||||
if(temp_turf.z != 1 && temp_turf.z != 5) //Not on mining or the station.
|
||||
if((temp_turf.z != 1 && temp_turf.z != 5) || h.stat!=CONSCIOUS) //Not on mining or the station. Or dead
|
||||
continue
|
||||
creatures += h
|
||||
|
||||
var/mob/target = input ("Who do you want to project your mind to ?") as mob in creatures
|
||||
|
||||
if (target)
|
||||
remoteview_target = target
|
||||
reset_view(target)
|
||||
else
|
||||
remoteview_target = null
|
||||
reset_view(0)
|
||||
|
||||
/mob/living/carbon/human/proc/get_visible_gender()
|
||||
if(wear_suit && wear_suit.flags_inv & HIDEJUMPSUIT && ((head && head.flags_inv & HIDEMASK) || wear_mask))
|
||||
return NEUTER
|
||||
return gender
|
||||
|
||||
/mob/living/carbon/human/proc/increase_germ_level(n)
|
||||
if(gloves)
|
||||
gloves.germ_level += n
|
||||
else
|
||||
germ_level += n
|
||||
|
||||
/mob/living/carbon/human/revive()
|
||||
for (var/datum/organ/external/O in organs)
|
||||
O.status &= ~ORGAN_BROKEN
|
||||
O.status &= ~ORGAN_BLEEDING
|
||||
O.status &= ~ORGAN_SPLINTED
|
||||
O.status &= ~ORGAN_ATTACHABLE
|
||||
if (!O.amputated)
|
||||
O.status &= ~ORGAN_DESTROYED
|
||||
O.wounds.Cut()
|
||||
|
||||
vessel.add_reagent("blood",560-vessel.total_volume)
|
||||
fixblood()
|
||||
for (var/obj/item/weapon/organ/head/H in world)
|
||||
if(H.brainmob)
|
||||
if(H.brainmob.real_name == src.real_name)
|
||||
if(H.brainmob.mind)
|
||||
H.brainmob.mind.transfer_to(src)
|
||||
del(H)
|
||||
|
||||
|
||||
..()
|
||||
|
||||
/mob/living/carbon/human/proc/is_lung_ruptured()
|
||||
var/datum/organ/external/chest/E = get_organ("chest")
|
||||
return E.ruptured_lungs
|
||||
|
||||
|
||||
/mob/living/carbon/human/proc/rupture_lung()
|
||||
var/datum/organ/external/chest/E = get_organ("chest")
|
||||
|
||||
if(E.ruptured_lungs == 0)
|
||||
src.custom_pain("You feel a stabbing pain in your chest!", 1)
|
||||
|
||||
E.ruptured_lungs = 1
|
||||
|
||||
|
||||
@@ -61,6 +61,7 @@
|
||||
switch(M.a_intent)
|
||||
if("help")
|
||||
if(health > config.health_threshold_crit)
|
||||
diary << "\[[time2text(world.timeofday, "hh:mm.ss")]\] CPR BUGHINTING: [M] shakes [src]: health - [health], threshold - [config.health_threshold_crit]. Health details: OX [getOxyLoss()] TX [getToxLoss()] BU [getFireLoss()] BR [getBruteLoss()] Blood: [round(vessel.get_reagent_amount("blood"))] out of 560"
|
||||
help_shake_act(M)
|
||||
return 1
|
||||
// if(M.health < -75) return 0
|
||||
|
||||
@@ -116,7 +116,7 @@
|
||||
if(update) UpdateDamageIcon()
|
||||
|
||||
// damage MANY external organs, in random order
|
||||
/mob/living/carbon/human/take_overall_damage(var/brute, var/burn, var/sharp = 0)
|
||||
/mob/living/carbon/human/take_overall_damage(var/brute, var/burn, var/sharp = 0, var/used_weapon = null)
|
||||
if(nodamage) return //godmode
|
||||
var/list/datum/organ/external/parts = get_damageable_organs()
|
||||
var/update = 0
|
||||
@@ -126,7 +126,7 @@
|
||||
var/brute_was = picked.brute_dam
|
||||
var/burn_was = picked.burn_dam
|
||||
|
||||
update |= picked.take_damage(brute,burn,sharp)
|
||||
update |= picked.take_damage(brute,burn,sharp,used_weapon)
|
||||
|
||||
brute -= (picked.brute_dam - brute_was)
|
||||
burn -= (picked.burn_dam - burn_was)
|
||||
@@ -154,7 +154,7 @@
|
||||
zone = "head"
|
||||
return organs_by_name[zone]
|
||||
|
||||
/mob/living/carbon/human/apply_damage(var/damage = 0,var/damagetype = BRUTE, var/def_zone = null, var/blocked = 0, var/sharp = 0)
|
||||
/mob/living/carbon/human/apply_damage(var/damage = 0,var/damagetype = BRUTE, var/def_zone = null, var/blocked = 0, var/sharp = 0, var/used_weapon = null)
|
||||
if((damagetype != BRUTE) && (damagetype != BURN))
|
||||
..(damage, damagetype, def_zone, blocked)
|
||||
return 1
|
||||
@@ -176,10 +176,10 @@
|
||||
|
||||
switch(damagetype)
|
||||
if(BRUTE)
|
||||
if(organ.take_damage(damage, 0, sharp))
|
||||
if(organ.take_damage(damage, 0, sharp, used_weapon))
|
||||
UpdateDamageIcon()
|
||||
if(BURN)
|
||||
if(organ.take_damage(0, damage, sharp))
|
||||
if(organ.take_damage(0, damage, sharp, used_weapon))
|
||||
UpdateDamageIcon()
|
||||
updatehealth()
|
||||
return 1
|
||||
|
||||
@@ -133,7 +133,7 @@ emp_act
|
||||
if(armor >= 2) return 0
|
||||
if(!I.force) return 0
|
||||
|
||||
apply_damage(I.force, I.damtype, affecting, armor , I.sharp)
|
||||
apply_damage(I.force, I.damtype, affecting, armor , I.sharp, I.name)
|
||||
|
||||
var/bloody = 0
|
||||
if(((I.damtype == BRUTE) || (I.damtype == HALLOSS)) && prob(25 + (I.force * 2)))
|
||||
|
||||
@@ -55,4 +55,6 @@
|
||||
|
||||
var/failed_last_breath = 0 //This is used to determine if the mob failed a breath. If they did fail a brath, they will attempt to breathe each tick, otherwise just once per 4 ticks.
|
||||
|
||||
var/xylophone = 0 //For the spoooooooky xylophone cooldown
|
||||
var/xylophone = 0 //For the spoooooooky xylophone cooldown
|
||||
|
||||
var/mob/remoteview_target = null
|
||||
|
||||
@@ -433,8 +433,9 @@
|
||||
return
|
||||
message = "\red <B>[source] is trying to empty [target]'s pockets.</B>"
|
||||
if("CPR")
|
||||
if (target.cpr_time >= world.time + 3)
|
||||
if (!target.cpr_time)
|
||||
del(src)
|
||||
target.cpr_time = 0
|
||||
message = "\red <B>[source] is trying perform CPR on [target]!</B>"
|
||||
if("id")
|
||||
message = "\red <B>[source] is trying to take off [target.wear_id] from [target]'s uniform!</B>"
|
||||
@@ -460,6 +461,7 @@ The else statement is for equipping stuff to empty slots.
|
||||
It can still be worn/put on as normal.
|
||||
*/
|
||||
/obj/effect/equip_e/human/done() //TODO: And rewrite this :< ~Carn
|
||||
target.cpr_time = 1
|
||||
if(!source || !target) return //Target or source no longer exist
|
||||
if(source.loc != s_loc) return //source has moved
|
||||
if(target.loc != t_loc) return //target has moved
|
||||
@@ -540,10 +542,7 @@ It can still be worn/put on as normal.
|
||||
if (target.legcuffed)
|
||||
strip_item = target.legcuffed
|
||||
if("CPR")
|
||||
if (target.cpr_time >= world.time + 30)
|
||||
del(src)
|
||||
if ((target.health >= -99.0 && target.health <= 0))
|
||||
target.cpr_time = world.time
|
||||
var/suff = min(target.getOxyLoss(), 7)
|
||||
target.adjustOxyLoss(-suff)
|
||||
target.updatehealth()
|
||||
@@ -587,7 +586,7 @@ It can still be worn/put on as normal.
|
||||
target.internal = target.belt
|
||||
if (target.internal)
|
||||
for(var/mob/M in viewers(target, 1))
|
||||
M.show_message("[source] is now running on internals.", 1)
|
||||
M.show_message("[target] is now running on internals.", 1)
|
||||
target.internal.add_fingerprint(source)
|
||||
if (target.internals)
|
||||
target.internals.icon_state = "internal1"
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
//This file was auto-corrected by findeclaration.exe on 25.5.2012 20:42:32
|
||||
|
||||
//NOTE: Breathing happens once per FOUR TICKS, unless the last breath fails. In which case it happens once per ONE TICK! So oxyloss healing is done once per 4 ticks while oxyloss damage is applied once per tick!
|
||||
#define HUMAN_MAX_OXYLOSS 3 //Defines how much oxyloss humans can get per tick. A tile with no air at all (such as space) applies this value, otherwise it's a percentage of it.
|
||||
#define HUMAN_CRIT_MAX_OXYLOSS ( (last_tick_duration) /3) //The amount of damage you'll get when in critical condition. We want this to be a 5 minute deal = 300s. There are 100HP to get through, so (1/3)*last_tick_duration per second. Breaths however only happen every 4 ticks.
|
||||
#define HUMAN_MAX_OXYLOSS 1 //Defines how much oxyloss humans can get per tick. A tile with no air at all (such as space) applies this value, otherwise it's a percentage of it.
|
||||
#define HUMAN_CRIT_MAX_OXYLOSS ( (last_tick_duration) /5) //The amount of damage you'll get when in critical condition. We want this to be a 5 minute deal = 300s. There are 100HP to get through, so (1/3)*last_tick_duration per second. Breaths however only happen every 4 ticks.
|
||||
|
||||
#define HEAT_DAMAGE_LEVEL_1 2 //Amount of damage applied when your body temperature just passes the 360.15k safety point
|
||||
#define HEAT_DAMAGE_LEVEL_2 4 //Amount of damage applied when your body temperature passes the 400K point
|
||||
@@ -459,15 +459,18 @@
|
||||
radiation = 0
|
||||
|
||||
else
|
||||
var/damage = 0
|
||||
switch(radiation)
|
||||
if(1 to 49)
|
||||
radiation--
|
||||
if(prob(25))
|
||||
adjustToxLoss(1)
|
||||
damage = 1
|
||||
updatehealth()
|
||||
|
||||
if(50 to 74)
|
||||
radiation -= 2
|
||||
damage = 1
|
||||
adjustToxLoss(1)
|
||||
if(prob(5))
|
||||
radiation -= 5
|
||||
@@ -479,6 +482,7 @@
|
||||
if(75 to 100)
|
||||
radiation -= 3
|
||||
adjustToxLoss(3)
|
||||
damage = 1
|
||||
if(prob(1))
|
||||
src << "\red You mutate!"
|
||||
randmutb(src)
|
||||
@@ -486,18 +490,28 @@
|
||||
emote("gasp")
|
||||
updatehealth()
|
||||
|
||||
if(damage && organs.len)
|
||||
var/datum/organ/external/O = pick(organs)
|
||||
if(istype(O)) O.add_autopsy_data("Radiation Poisoning", damage)
|
||||
|
||||
proc/breathe()
|
||||
|
||||
if(reagents.has_reagent("lexorin")) return
|
||||
if(istype(loc, /obj/machinery/atmospherics/unary/cryo_cell)) return
|
||||
|
||||
var/lung_ruptured = is_lung_ruptured()
|
||||
|
||||
if(lung_ruptured && prob(2))
|
||||
spawn emote("me", 1, "coughs up blood!")
|
||||
src.drip(10)
|
||||
|
||||
var/datum/gas_mixture/environment = loc.return_air()
|
||||
var/datum/gas_mixture/breath
|
||||
// HACK NEED CHANGING LATER
|
||||
if(health < 0)
|
||||
losebreath++
|
||||
|
||||
if(lung_ruptured && prob(4))
|
||||
spawn emote("me", 1, "gasps for air!")
|
||||
losebreath += 5
|
||||
if(losebreath>0) //Suffocating so do not take a breath
|
||||
losebreath--
|
||||
if (prob(10)) //Gasp per 10 ticks? Sounds about right.
|
||||
@@ -552,6 +566,12 @@
|
||||
var/obj/location_as_object = loc
|
||||
location_as_object.handle_internal_lifeform(src, 0)
|
||||
|
||||
|
||||
if(!lung_ruptured && breath)
|
||||
if(breath.total_moles < BREATH_MOLES / 5 || breath.total_moles > BREATH_MOLES * 5)
|
||||
if(prob(5))
|
||||
rupture_lung()
|
||||
|
||||
handle_breath(breath)
|
||||
|
||||
if(breath)
|
||||
@@ -670,6 +690,7 @@
|
||||
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"))
|
||||
SA.moles = 0
|
||||
|
||||
if( (abs(310.15 - breath.temperature) > 50) && !(COLD_RESISTANCE in mutations)) // Hot air hurts :(
|
||||
if(breath.temperature < 260.15)
|
||||
@@ -681,22 +702,22 @@
|
||||
|
||||
switch(breath.temperature)
|
||||
if(-INFINITY to 120)
|
||||
apply_damage(COLD_GAS_DAMAGE_LEVEL_3, BURN, "head")
|
||||
apply_damage(COLD_GAS_DAMAGE_LEVEL_3, BURN, "head", used_weapon = "Excessive Cold")
|
||||
fire_alert = max(fire_alert, 1)
|
||||
if(120 to 200)
|
||||
apply_damage(COLD_GAS_DAMAGE_LEVEL_2, BURN, "head")
|
||||
apply_damage(COLD_GAS_DAMAGE_LEVEL_2, BURN, "head", used_weapon = "Excessive Cold")
|
||||
fire_alert = max(fire_alert, 1)
|
||||
if(200 to 260)
|
||||
apply_damage(COLD_GAS_DAMAGE_LEVEL_1, BURN, "head")
|
||||
apply_damage(COLD_GAS_DAMAGE_LEVEL_1, BURN, "head", used_weapon = "Excessive Cold")
|
||||
fire_alert = max(fire_alert, 1)
|
||||
if(360 to 400)
|
||||
apply_damage(HEAT_GAS_DAMAGE_LEVEL_1, BURN, "head")
|
||||
apply_damage(HEAT_GAS_DAMAGE_LEVEL_1, BURN, "head", used_weapon = "Excessive Heat")
|
||||
fire_alert = max(fire_alert, 2)
|
||||
if(400 to 1000)
|
||||
apply_damage(HEAT_GAS_DAMAGE_LEVEL_2, BURN, "head")
|
||||
apply_damage(HEAT_GAS_DAMAGE_LEVEL_2, BURN, "head", used_weapon = "Excessive Heat")
|
||||
fire_alert = max(fire_alert, 2)
|
||||
if(1000 to INFINITY)
|
||||
apply_damage(HEAT_GAS_DAMAGE_LEVEL_3, BURN, "head")
|
||||
apply_damage(HEAT_GAS_DAMAGE_LEVEL_3, BURN, "head", used_weapon = "Excessive Heat")
|
||||
fire_alert = max(fire_alert, 2)
|
||||
|
||||
//Temporary fixes to the alerts.
|
||||
@@ -987,7 +1008,8 @@
|
||||
proc/handle_chemicals_in_body()
|
||||
if(reagents) reagents.metabolize(src)
|
||||
|
||||
if(dna && dna.mutantrace == "plant") //couldn't think of a better place to place it, since it handles nutrition -- Urist
|
||||
// if(dna && dna.mutantrace == "plant") //couldn't think of a better place to place it, since it handles nutrition -- Urist
|
||||
if(PLANT in mutations)
|
||||
var/light_amount = 0 //how much light there is in the place, affects receiving nutrition and healing
|
||||
if(isturf(loc)) //else, there's considered to be no light
|
||||
var/turf/T = loc
|
||||
@@ -1033,7 +1055,8 @@
|
||||
if(overeatduration > 1)
|
||||
overeatduration -= 2 //doubled the unfat rate
|
||||
|
||||
if(dna && dna.mutantrace == "plant")
|
||||
// if(dna && dna.mutantrace == "plant")
|
||||
if(PLANT in mutations)
|
||||
if(nutrition < 200)
|
||||
take_overall_damage(2,0)
|
||||
|
||||
@@ -1053,6 +1076,19 @@
|
||||
dizziness = max(0, dizziness - 3)
|
||||
jitteriness = max(0, jitteriness - 3)
|
||||
|
||||
|
||||
if(life_tick % 10 == 0)
|
||||
// handle trace chemicals for autopsy
|
||||
for(var/datum/organ/O in organs)
|
||||
for(var/chemID in O.trace_chemicals)
|
||||
O.trace_chemicals[chemID] = O.trace_chemicals[chemID] - 1
|
||||
if(O.trace_chemicals[chemID] <= 0)
|
||||
O.trace_chemicals.Remove(chemID)
|
||||
for(var/datum/reagent/A in reagents.reagent_list)
|
||||
// add chemistry traces to a random organ
|
||||
var/datum/organ/O = pick(organs)
|
||||
O.trace_chemicals[A.name] = 100
|
||||
|
||||
updatehealth()
|
||||
|
||||
return //TODO: DEFERRED
|
||||
@@ -1116,8 +1152,9 @@
|
||||
else if(sleeping)
|
||||
handle_dreams()
|
||||
adjustHalLoss(-5)
|
||||
if(mind.active || immune_to_ssd)
|
||||
sleeping = max(sleeping-1, 0)
|
||||
if (mind)
|
||||
if(mind.active || immune_to_ssd)
|
||||
sleeping = max(sleeping-1, 0)
|
||||
blinded = 1
|
||||
stat = UNCONSCIOUS
|
||||
if( prob(10) && health && !hal_crit )
|
||||
@@ -1166,6 +1203,13 @@
|
||||
|
||||
if(druggy)
|
||||
druggy = max(druggy-1, 0)
|
||||
|
||||
// Increase germ_level regularly
|
||||
if(prob(40))
|
||||
germ_level += 1
|
||||
// If you're dirty, your gloves will become dirty, too.
|
||||
if(gloves && germ_level > gloves.germ_level && prob(10))
|
||||
gloves.germ_level += 1
|
||||
return 1
|
||||
|
||||
proc/handle_regular_hud_updates()
|
||||
@@ -1257,9 +1301,13 @@
|
||||
sight &= ~(SEE_TURFS|SEE_MOBS|SEE_OBJS)
|
||||
if(dna)
|
||||
switch(dna.mutantrace)
|
||||
if("lizard","metroid")
|
||||
if("metroid")
|
||||
see_in_dark = 3
|
||||
see_invisible = SEE_INVISIBLE_LEVEL_ONE
|
||||
if("lizard")
|
||||
see_in_dark = 3
|
||||
if("tajaran")
|
||||
see_in_dark = 8
|
||||
else
|
||||
see_in_dark = 2
|
||||
|
||||
@@ -1432,7 +1480,12 @@
|
||||
if(machine)
|
||||
if(!machine.check_eye(src)) reset_view(null)
|
||||
else
|
||||
if(!(mRemote in mutations) && !client.adminobs)
|
||||
var/isRemoteObserve = 0
|
||||
if((mRemote in mutations) && remoteview_target)
|
||||
if(remoteview_target.stat==CONSCIOUS)
|
||||
isRemoteObserve = 1
|
||||
if(!isRemoteObserve && client && !client.adminobs)
|
||||
remoteview_target = null
|
||||
reset_view(null)
|
||||
return 1
|
||||
|
||||
@@ -1535,4 +1588,4 @@
|
||||
Paralyse(rand(15,28))
|
||||
|
||||
#undef HUMAN_MAX_OXYLOSS
|
||||
#undef HUMAN_CRIT_MAX_OXYLOSS
|
||||
#undef HUMAN_CRIT_MAX_OXYLOSS
|
||||
|
||||
@@ -220,107 +220,133 @@ proc/get_damage_icon_part(damage_state, body_part)
|
||||
/mob/living/carbon/human/proc/update_body(var/update_icons=1)
|
||||
if(stand_icon) del(stand_icon)
|
||||
if(lying_icon) del(lying_icon)
|
||||
if(dna && dna.mutantrace) return
|
||||
|
||||
var/husk_color_mod = rgb(96,88,80)
|
||||
var/hulk_color_mod = rgb(48,224,40)
|
||||
var/plant_color_mod = rgb(144,224,144)
|
||||
|
||||
var/husk = (HUSK in src.mutations) //100% unnecessary -Agouri //nope, do you really want to iterate through src.mutations repeatedly? -Pete
|
||||
var/fat = (FAT in src.mutations)
|
||||
var/hulk = (HULK in src.mutations)
|
||||
var/skeleton = (SKELETON in src.mutations)
|
||||
var/plant = (PLANT in src.mutations)
|
||||
|
||||
var/g = "m"
|
||||
if(gender == FEMALE) g = "f"
|
||||
|
||||
// whether to draw the individual limbs
|
||||
var/individual_limbs = 0
|
||||
|
||||
//Base mob icon
|
||||
if(husk)
|
||||
stand_icon = new /icon('icons/mob/human.dmi', "husk_s")
|
||||
lying_icon = new /icon('icons/mob/human.dmi', "husk_l")
|
||||
else if(fat)
|
||||
stand_icon = new /icon('icons/mob/human.dmi', "fatbody_s")
|
||||
lying_icon = new /icon('icons/mob/human.dmi', "fatbody_l")
|
||||
else if(skeleton)
|
||||
stand_icon = new /icon('icons/mob/human.dmi', "skeleton_s")
|
||||
lying_icon = new /icon('icons/mob/human.dmi', "skeleton_l")
|
||||
var/icon/icobase
|
||||
if(skeleton)
|
||||
icobase = 'icons/mob/human_races/r_skeleton.dmi'
|
||||
else if(dna)
|
||||
switch(dna.mutantrace)
|
||||
if("tajaran")
|
||||
icobase = 'icons/mob/human_races/r_tajaran.dmi'
|
||||
if("lizard")
|
||||
icobase = 'icons/mob/human_races/r_lizard.dmi'
|
||||
if("skrell")
|
||||
icobase = 'icons/mob/human_races/r_skrell.dmi'
|
||||
else
|
||||
icobase = 'icons/mob/human_races/r_human.dmi'
|
||||
else
|
||||
stand_icon = new /icon('icons/mob/human.dmi', "torso_[g]_s")
|
||||
lying_icon = new /icon('icons/mob/human.dmi', "torso_[g]_l")
|
||||
individual_limbs = 1
|
||||
icobase = 'icons/mob/human_races/r_human.dmi'
|
||||
|
||||
// Draw each individual limb
|
||||
if(individual_limbs)
|
||||
stand_icon.Blend(new /icon('icons/mob/human.dmi', "chest_[g]_s"), ICON_OVERLAY)
|
||||
lying_icon.Blend(new /icon('icons/mob/human.dmi', "chest_[g]_l"), ICON_OVERLAY)
|
||||
if(!skeleton)
|
||||
stand_icon = new /icon(icobase, "torso_[g][fat?"_fat":""]")
|
||||
if(husk)
|
||||
stand_icon.ColorTone(husk_color_mod)
|
||||
else if(hulk)
|
||||
// stand_icon.ColorTone(hulk_color_mod)
|
||||
var/list/TONE = ReadRGB(hulk_color_mod)
|
||||
stand_icon.MapColors(rgb(TONE[1],0,0),rgb(0,TONE[2],0),rgb(0,0,TONE[3]))
|
||||
else if(plant)
|
||||
stand_icon.ColorTone(plant_color_mod)
|
||||
else
|
||||
stand_icon = new /icon(icobase, "torso")
|
||||
|
||||
var/datum/organ/external/head = get_organ("head")
|
||||
if(head && !(head.status & ORGAN_DESTROYED))
|
||||
stand_icon.Blend(new /icon('icons/mob/human.dmi', "head_[g]_s"), ICON_OVERLAY)
|
||||
lying_icon.Blend(new /icon('icons/mob/human.dmi', "head_[g]_l"), ICON_OVERLAY)
|
||||
var/datum/organ/external/head = get_organ("head")
|
||||
var/has_head = 0
|
||||
if(head && !(head.status & ORGAN_DESTROYED))
|
||||
has_head = 1
|
||||
|
||||
for(var/datum/organ/external/part in organs)
|
||||
if(!istype(part, /datum/organ/external/groin) \
|
||||
&& !istype(part, /datum/organ/external/chest) \
|
||||
&& !istype(part, /datum/organ/external/head) \
|
||||
&& !(part.status & ORGAN_DESTROYED))
|
||||
var/icon/temp = new /icon('human.dmi', "[part.icon_name]_s")
|
||||
if(part.status & ORGAN_ROBOT) temp.MapColors(rgb(77,77,77), rgb(150,150,150), rgb(28,28,28), rgb(0,0,0))
|
||||
for(var/datum/organ/external/part in organs)
|
||||
if(!istype(part, /datum/organ/external/chest) && !(part.status & ORGAN_DESTROYED))
|
||||
var/icon/temp
|
||||
if(istype(part, /datum/organ/external/groin))
|
||||
if(skeleton)
|
||||
temp = new /icon(icobase, "groin")
|
||||
else
|
||||
temp = new /icon(icobase, "groin_[g]")
|
||||
else if(istype(part, /datum/organ/external/head))
|
||||
if(skeleton)
|
||||
temp = new /icon(icobase, "head")
|
||||
else
|
||||
temp = new /icon(icobase, "head_[g]")
|
||||
else
|
||||
temp = new /icon(icobase, "[part.icon_name]")
|
||||
if(part.status & ORGAN_ROBOT)
|
||||
temp.GrayScale()
|
||||
else if(!skeleton)
|
||||
if(husk)
|
||||
temp.ColorTone(husk_color_mod)
|
||||
else if(hulk)
|
||||
// temp.ColorTone(hulk_color_mod)
|
||||
var/list/TONE = ReadRGB(hulk_color_mod)
|
||||
temp.MapColors(rgb(TONE[1],0,0),rgb(0,TONE[2],0),rgb(0,0,TONE[3]))
|
||||
else if(plant)
|
||||
temp.ColorTone(plant_color_mod)
|
||||
|
||||
//That part makes left and right legs drawn topmost and lowermost when human looks WEST or EAST
|
||||
//And no change in rendering for other parts (they icon_position is 0, so goes to 'else' part)
|
||||
if(part.icon_position&(LEFT|RIGHT))
|
||||
var/icon/temp2 = new('icons/mob/human.dmi',"blank")
|
||||
temp2.Insert(new/icon(temp,dir=NORTH),dir=NORTH)
|
||||
temp2.Insert(new/icon(temp,dir=SOUTH),dir=SOUTH)
|
||||
if(!(part.icon_position & LEFT))
|
||||
temp2.Insert(new/icon(temp,dir=EAST),dir=EAST)
|
||||
if(!(part.icon_position & RIGHT))
|
||||
temp2.Insert(new/icon(temp,dir=WEST),dir=WEST)
|
||||
stand_icon.Blend(temp2, ICON_OVERLAY)
|
||||
temp2 = new('icons/mob/human.dmi',"blank")
|
||||
if(part.icon_position & LEFT)
|
||||
temp2.Insert(new/icon(temp,dir=EAST),dir=EAST)
|
||||
if(part.icon_position & RIGHT)
|
||||
temp2.Insert(new/icon(temp,dir=WEST),dir=WEST)
|
||||
stand_icon.Blend(temp2, ICON_UNDERLAY)
|
||||
else
|
||||
stand_icon.Blend(temp, ICON_OVERLAY)
|
||||
temp = new /icon('human.dmi', "[part.icon_name]_l")
|
||||
if(part.status & ORGAN_ROBOT) temp.MapColors(rgb(77,77,77), rgb(150,150,150), rgb(28,28,28), rgb(0,0,0))
|
||||
lying_icon.Blend(temp , ICON_OVERLAY)
|
||||
|
||||
stand_icon.Blend(new /icon('human.dmi', "groin_[g]_s"), ICON_OVERLAY)
|
||||
lying_icon.Blend(new /icon('human.dmi', "groin_[g]_l"), ICON_OVERLAY)
|
||||
|
||||
if (husk)
|
||||
var/icon/husk_s = new /icon('human.dmi', "husk_s")
|
||||
var/icon/husk_l = new /icon('human.dmi', "husk_l")
|
||||
|
||||
for(var/datum/organ/external/part in organs)
|
||||
if(!istype(part, /datum/organ/external/groin) \
|
||||
&& !istype(part, /datum/organ/external/chest) \
|
||||
&& !istype(part, /datum/organ/external/head) \
|
||||
&& (part.status & ORGAN_DESTROYED))
|
||||
husk_s.Blend(new /icon('dam_mask.dmi', "[part.icon_name]"), ICON_SUBTRACT)
|
||||
husk_l.Blend(new /icon('dam_mask.dmi', "[part.icon_name]2"), ICON_SUBTRACT)
|
||||
|
||||
stand_icon.Blend(husk_s, ICON_OVERLAY)
|
||||
lying_icon.Blend(husk_l, ICON_OVERLAY)
|
||||
|
||||
//Skin tone
|
||||
if(!skeleton)
|
||||
if(!skeleton && !husk && !hulk && !plant)
|
||||
if(s_tone >= 0)
|
||||
stand_icon.Blend(rgb(s_tone, s_tone, s_tone), ICON_ADD)
|
||||
lying_icon.Blend(rgb(s_tone, s_tone, s_tone), ICON_ADD)
|
||||
else
|
||||
stand_icon.Blend(rgb(-s_tone, -s_tone, -s_tone), ICON_SUBTRACT)
|
||||
lying_icon.Blend(rgb(-s_tone, -s_tone, -s_tone), ICON_SUBTRACT)
|
||||
|
||||
//Eyes
|
||||
if(!skeleton)
|
||||
var/icon/eyes_s = new/icon('icons/mob/human_face.dmi', "eyes_s")
|
||||
var/icon/eyes_l = new/icon('icons/mob/human_face.dmi', "eyes_l")
|
||||
eyes_s.Blend(rgb(r_eyes, g_eyes, b_eyes), ICON_ADD)
|
||||
eyes_l.Blend(rgb(r_eyes, g_eyes, b_eyes), ICON_ADD)
|
||||
stand_icon.Blend(eyes_s, ICON_OVERLAY)
|
||||
lying_icon.Blend(eyes_l, ICON_OVERLAY)
|
||||
// Note: These used to be in update_face(), and the fact they're here will make it difficult to create a disembodied head
|
||||
var/icon/eyes_s = new/icon('icons/mob/human_face.dmi', "eyes_s")
|
||||
var/icon/eyes_l = new/icon('icons/mob/human_face.dmi', "eyes_l")
|
||||
eyes_s.Blend(rgb(r_eyes, g_eyes, b_eyes), ICON_ADD)
|
||||
eyes_l.Blend(rgb(r_eyes, g_eyes, b_eyes), ICON_ADD)
|
||||
stand_icon.Blend(eyes_s, ICON_OVERLAY)
|
||||
lying_icon.Blend(eyes_l, ICON_OVERLAY)
|
||||
if(husk)
|
||||
var/icon/mask = new(stand_icon)
|
||||
var/icon/husk_over = new(icobase,"overlay_husk")
|
||||
mask.MapColors(0,0,0,1, 0,0,0,1, 0,0,0,1, 0,0,0,1, 0,0,0,0)
|
||||
husk_over.Blend(mask, ICON_ADD)
|
||||
stand_icon.Blend(husk_over, ICON_OVERLAY)
|
||||
|
||||
if(has_head)
|
||||
//Eyes
|
||||
if(!skeleton)
|
||||
var/icon/eyes_s = new/icon('icons/mob/human_face.dmi', "eyes_s")
|
||||
eyes_s.Blend(rgb(r_eyes, g_eyes, b_eyes), ICON_ADD)
|
||||
stand_icon.Blend(eyes_s, ICON_OVERLAY)
|
||||
|
||||
//Mouth (lipstick!)
|
||||
if(lip_style) //skeletons are allowed to wear lipstick no matter what you think, agouri.
|
||||
stand_icon.Blend(new/icon('icons/mob/human_face.dmi', "lips_[lip_style]_s"), ICON_OVERLAY)
|
||||
lying_icon.Blend(new/icon('icons/mob/human_face.dmi', "lips_[lip_style]_l"), ICON_OVERLAY)
|
||||
|
||||
//Underwear
|
||||
if(underwear >0 && underwear < 12)
|
||||
if(!fat && !skeleton)
|
||||
stand_icon.Blend(new /icon('icons/mob/human.dmi', "underwear[underwear]_[g]_s"), ICON_OVERLAY)
|
||||
|
||||
lying_icon = stand_icon.MakeLying()
|
||||
|
||||
if(update_icons)
|
||||
update_icons()
|
||||
|
||||
@@ -419,27 +445,29 @@ proc/get_damage_icon_part(damage_state, body_part)
|
||||
var/fat
|
||||
if( FAT in mutations )
|
||||
fat = "fat"
|
||||
var/g = "m"
|
||||
if (gender == FEMALE) g = "f"
|
||||
// var/g = "m"
|
||||
// if (gender == FEMALE) g = "f"
|
||||
//BS12 EDIT
|
||||
if(dna)
|
||||
switch(dna.mutantrace)
|
||||
if("golem","metroid")
|
||||
overlays_lying[MUTANTRACE_LAYER] = image("icon" = 'icons/effects/genetics.dmi', "icon_state" = "[dna.mutantrace][fat]_l")
|
||||
overlays_standing[MUTANTRACE_LAYER] = image("icon" = 'icons/effects/genetics.dmi', "icon_state" = "[dna.mutantrace][fat]_s")
|
||||
if("lizard", "tajaran", "skrell")
|
||||
overlays_lying[MUTANTRACE_LAYER] = image("icon" = 'icons/effects/species.dmi', "icon_state" = "[dna.mutantrace]_[g]_l")
|
||||
overlays_standing[MUTANTRACE_LAYER] = image("icon" = 'icons/effects/species.dmi', "icon_state" = "[dna.mutantrace]_[g]_s")
|
||||
if("plant")
|
||||
if(stat == DEAD) //TODO
|
||||
overlays_lying[MUTANTRACE_LAYER] = image("icon" = 'icons/effects/genetics.dmi', "icon_state" = "[dna.mutantrace]_d")
|
||||
else
|
||||
overlays_lying[MUTANTRACE_LAYER] = image("icon" = 'icons/effects/genetics.dmi', "icon_state" = "[dna.mutantrace][fat]_[gender]_l")
|
||||
overlays_standing[MUTANTRACE_LAYER] = image("icon" = 'icons/effects/genetics.dmi', "icon_state" = "[dna.mutantrace][fat]_[gender]_s")
|
||||
var/icon/I = new('icons/effects/genetics.dmi',"[dna.mutantrace][fat]_s")
|
||||
overlays_standing[MUTANTRACE_LAYER] = image(I)
|
||||
overlays_lying[MUTANTRACE_LAYER] = image(I.MakeLying())
|
||||
// if("lizard", "tajaran", "skrell")
|
||||
// overlays_lying[MUTANTRACE_LAYER] = image("icon" = 'icons/effects/species.dmi', "icon_state" = "[dna.mutantrace]_[g]_l")
|
||||
// overlays_standing[MUTANTRACE_LAYER] = image("icon" = 'icons/effects/species.dmi', "icon_state" = "[dna.mutantrace]_[g]_s")
|
||||
// if("plant")
|
||||
// if(stat == DEAD) //TODO
|
||||
// overlays_lying[MUTANTRACE_LAYER] = image("icon" = 'icons/effects/genetics.dmi', "icon_state" = "[dna.mutantrace]_d")
|
||||
// else
|
||||
// overlays_lying[MUTANTRACE_LAYER] = image("icon" = 'icons/effects/genetics.dmi', "icon_state" = "[dna.mutantrace][fat]_[gender]_l")
|
||||
// overlays_standing[MUTANTRACE_LAYER] = image("icon" = 'icons/effects/genetics.dmi', "icon_state" = "[dna.mutantrace][fat]_[gender]_s")
|
||||
else
|
||||
overlays_lying[MUTANTRACE_LAYER] = null
|
||||
overlays_standing[MUTANTRACE_LAYER] = null
|
||||
update_body(0)
|
||||
if(!dna || !(dna.mutantrace in list("golem","metroid")))
|
||||
update_body(0)
|
||||
update_hair(0)
|
||||
if(update_icons) update_icons()
|
||||
|
||||
@@ -508,17 +536,9 @@ proc/get_damage_icon_part(damage_state, body_part)
|
||||
var/image/lying = image("icon_state" = "[t_color]_l")
|
||||
var/image/standing = image("icon_state" = "[t_color]_s")
|
||||
|
||||
if(FAT in mutations)
|
||||
if(w_uniform.flags&ONESIZEFITSALL)
|
||||
lying.icon = 'icons/mob/uniform_fat.dmi'
|
||||
standing.icon = 'icons/mob/uniform_fat.dmi'
|
||||
else
|
||||
src << "\red You burst out of \the [w_uniform]!"
|
||||
drop_from_inventory(w_uniform)
|
||||
return
|
||||
else
|
||||
lying.icon = 'icons/mob/uniform.dmi'
|
||||
standing.icon = 'icons/mob/uniform.dmi'
|
||||
|
||||
lying.icon = 'icons/mob/uniform.dmi'
|
||||
standing.icon = 'icons/mob/uniform.dmi'
|
||||
|
||||
if(w_uniform.blood_DNA)
|
||||
lying.overlays += image("icon" = 'icons/effects/blood.dmi', "icon_state" = "uniformblood2")
|
||||
@@ -665,35 +685,21 @@ proc/get_damage_icon_part(damage_state, body_part)
|
||||
var/image/lying = image("icon" = 'icons/mob/suit.dmi', "icon_state" = "[wear_suit.icon_state]2")
|
||||
var/image/standing = image("icon" = 'icons/mob/suit.dmi', "icon_state" = "[wear_suit.icon_state]")
|
||||
|
||||
if(FAT in mutations)
|
||||
if(!wear_suit.flags&ONESIZEFITSALL)
|
||||
src << "\red You burst out of \the [wear_suit]!"
|
||||
var/obj/item/clothing/c = wear_suit
|
||||
wear_suit = null
|
||||
if(client)
|
||||
client.screen -= c
|
||||
c.loc = loc
|
||||
c.dropped(src)
|
||||
c.layer = initial(c.layer)
|
||||
lying = null
|
||||
standing = null
|
||||
if( istype(wear_suit, /obj/item/clothing/suit/straight_jacket) )
|
||||
drop_from_inventory(handcuffed)
|
||||
drop_l_hand()
|
||||
drop_r_hand()
|
||||
|
||||
else
|
||||
if( istype(wear_suit, /obj/item/clothing/suit/straight_jacket) )
|
||||
drop_from_inventory(handcuffed)
|
||||
drop_l_hand()
|
||||
drop_r_hand()
|
||||
|
||||
if(wear_suit.blood_DNA)
|
||||
var/t_state
|
||||
if( istype(wear_suit, /obj/item/clothing/suit/armor/vest || /obj/item/clothing/suit/wcoat) )
|
||||
t_state = "armor"
|
||||
else if( istype(wear_suit, /obj/item/clothing/suit/det_suit || /obj/item/clothing/suit/labcoat) )
|
||||
t_state = "coat"
|
||||
else
|
||||
t_state = "suit"
|
||||
lying.overlays += image("icon" = 'icons/effects/blood.dmi', "icon_state" = "[t_state]blood2")
|
||||
standing.overlays += image("icon" = 'icons/effects/blood.dmi', "icon_state" = "[t_state]blood")
|
||||
if(wear_suit.blood_DNA)
|
||||
var/t_state
|
||||
if( istype(wear_suit, /obj/item/clothing/suit/armor/vest || /obj/item/clothing/suit/wcoat) )
|
||||
t_state = "armor"
|
||||
else if( istype(wear_suit, /obj/item/clothing/suit/det_suit || /obj/item/clothing/suit/labcoat) )
|
||||
t_state = "coat"
|
||||
else
|
||||
t_state = "suit"
|
||||
lying.overlays += image("icon" = 'icons/effects/blood.dmi', "icon_state" = "[t_state]blood2")
|
||||
standing.overlays += image("icon" = 'icons/effects/blood.dmi', "icon_state" = "[t_state]blood")
|
||||
|
||||
overlays_lying[SUIT_LAYER] = lying
|
||||
overlays_standing[SUIT_LAYER] = standing
|
||||
|
||||
@@ -551,7 +551,7 @@
|
||||
if (!( machine.check_eye(src) ))
|
||||
reset_view(null)
|
||||
else
|
||||
if(!client.adminobs)
|
||||
if(client && !client.adminobs)
|
||||
reset_view(null)
|
||||
|
||||
return 1
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
dna = new /datum/dna( null )
|
||||
dna.real_name = real_name
|
||||
dna.uni_identity = "00600200A00E0110148FC01300B009"
|
||||
dna.struc_enzymes = "0983E840344C39F4B059D5145FC5785DC6406A4BB8"
|
||||
dna.struc_enzymes = "43359156756131E13763334D1C369012032164D4FE4CD61544B6C03F251B6C60A42821D26BA3B0FD6"
|
||||
dna.unique_enzymes = md5(name)
|
||||
//////////blah
|
||||
var/gendervar
|
||||
|
||||
@@ -57,6 +57,6 @@
|
||||
P.on_hit(src,2)
|
||||
return 2
|
||||
if(!P.nodamage)
|
||||
apply_damage((P.damage/(absorb+1)), P.damage_type, def_zone)
|
||||
apply_damage((P.damage/(absorb+1)), P.damage_type, def_zone, used_weapon = "Projectile([P.name])")
|
||||
P.on_hit(src, absorb)
|
||||
return absorb
|
||||
return absorb
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
/mob/living/Logout()
|
||||
..()
|
||||
if(!key && mind) //key and mind have become seperated.
|
||||
mind.active = 0 //This is to stop say, a mind.transfer_to call on a corpse causing a ghost to re-enter its body.
|
||||
if(!immune_to_ssd && sleeping < 2 && mind.active)
|
||||
sleeping = 2
|
||||
if (mind)
|
||||
if(!key) //key and mind have become seperated.
|
||||
mind.active = 0 //This is to stop say, a mind.transfer_to call on a corpse causing a ghost to re-enter its body.
|
||||
if(!immune_to_ssd && sleeping < 2 && mind.active)
|
||||
sleeping = 2
|
||||
|
||||
@@ -372,7 +372,7 @@ var/list/department_radio_keys = list(
|
||||
|
||||
var/rendered = null
|
||||
if (length(heard_a))
|
||||
var/message_a = say_quote(message)
|
||||
var/message_a = say_quote(message,is_speaking_soghun,is_speaking_skrell,is_speaking_taj)
|
||||
|
||||
if (italics)
|
||||
message_a = "<i>[message_a]</i>"
|
||||
|
||||
@@ -117,9 +117,20 @@
|
||||
return
|
||||
|
||||
//if(icon_state == initial(icon_state))
|
||||
var/icontype = input("Please, select a display!", "AI", null/*, null*/) in list("Monochrome", "Blue", "Inverted", "Firewall", "Green", "Red", "Static")
|
||||
var/icontype = ""
|
||||
var/list/icons = list("Monochrome", "Blue", "Inverted", "Firewall", "Green", "Red", "Static")
|
||||
if (src.name == "B.A.N.N.E.D." && src.ckey == "spaceman96")
|
||||
icons += "B.A.N.N.E.D."
|
||||
if (src.name == "M00X-BC" && src.ckey == "searif")
|
||||
icons += "M00X-BC"
|
||||
if (src.name == "TRIBUNAL" && src.ckey == "serithi")
|
||||
icons += "Tribunal"
|
||||
icons += "Tribunal Malfunctioning"
|
||||
if (src.name == "Skuld" && src.ckey == "ravensdale")
|
||||
icons += "Skuld"
|
||||
/* if(icontype == "Clown")
|
||||
icon_state = "ai-clown2"*/
|
||||
icontype = input("Please, select a display!", "AI", null/*, null*/) in icons
|
||||
if(icontype == "Monochrome")
|
||||
icon_state = "ai-mono"
|
||||
else if(icontype == "Blue")
|
||||
@@ -134,6 +145,14 @@
|
||||
icon_state = "ai-malf"
|
||||
else if(icontype == "Static")
|
||||
icon_state = "ai-static"
|
||||
else if(icontype == "M00X-BC")
|
||||
icon_state = "ai-searif"
|
||||
else if(icontype == "Tribunal")
|
||||
icon_state = "ai-tribunal"
|
||||
else if(icontype == "Tribunal Malfunctioning")
|
||||
icon_state = "ai-tribunal-malf"
|
||||
else if(icontype == "Skuld")
|
||||
icon_state = "ai-ravensdale"
|
||||
//else
|
||||
//usr <<"You can only change your display once!"
|
||||
//return
|
||||
@@ -689,3 +708,25 @@
|
||||
src.current = camera
|
||||
src.current.SetLuminosity(AI_CAMERA_LUMINOSITY)
|
||||
camera_light_on = world.timeofday + 1 * 20 // Update the light every 2 seconds.
|
||||
|
||||
|
||||
/mob/living/silicon/ai/attackby(obj/item/weapon/W as obj, mob/user as mob)
|
||||
if(istype(W, /obj/item/weapon/wrench))
|
||||
if(anchored)
|
||||
user.visible_message("\blue \The [user] starts to unbolt \the [src] from the plating...")
|
||||
if(!do_after(user,40))
|
||||
user.visible_message("\blue \The [user] decides not to unbolt \the [src].")
|
||||
return
|
||||
user.visible_message("\blue \The [user] finishes unfastening \the [src]!")
|
||||
anchored = 0
|
||||
return
|
||||
else
|
||||
user.visible_message("\blue \The [user] starts to bolt \the [src] to the plating...")
|
||||
if(!do_after(user,40))
|
||||
user.visible_message("\blue \The [user] decides not to bolt \the [src].")
|
||||
return
|
||||
user.visible_message("\blue \The [user] finishes fastening down \the [src]!")
|
||||
anchored = 1
|
||||
return
|
||||
else
|
||||
return ..()
|
||||
@@ -1,8 +1,9 @@
|
||||
/mob/living/silicon/ai/death(gibbed)
|
||||
if(stat == DEAD) return
|
||||
stat = DEAD
|
||||
icon_state = "ai-crash"
|
||||
|
||||
if (src.name == "Skuld" && src.ckey == "ravensdale")//checks ID of AI and player to see if it needs to pull the custom death sprite and goes to blue-screen if it doesn't
|
||||
icon_state = "ai-ravensdale-crash"
|
||||
else icon_state = "ai-crash"
|
||||
update_canmove()
|
||||
if(src.eyeobj)
|
||||
src.eyeobj.setLoc(get_turf(src))
|
||||
|
||||
@@ -90,7 +90,7 @@
|
||||
src.see_in_dark = 0
|
||||
src.see_invisible = SEE_INVISIBLE_LIVING
|
||||
|
||||
if (((!loc.master.power_equip) || istype(T, /turf/space)) && !istype(src.loc,/obj/item))
|
||||
if (((!loc.master.power_equip) || istype(T, /turf/space)) && !istype(src.loc,/obj/item) && !istype(get_area(src), /area/shuttle))
|
||||
if (src:aiRestorePowerRoutine==0)
|
||||
src:aiRestorePowerRoutine = 1
|
||||
|
||||
|
||||
@@ -255,7 +255,7 @@
|
||||
if (!( src.machine.check_eye(src) ))
|
||||
src.reset_view(null)
|
||||
else
|
||||
if(!client.adminobs)
|
||||
if(client && !client.adminobs)
|
||||
reset_view(null)
|
||||
|
||||
return 1
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
var/datum/ai_laws/laws = null//Now... THEY ALL CAN ALL HAVE LAWS
|
||||
var/list/alarms_to_show = list()
|
||||
var/list/alarms_to_clear = list()
|
||||
|
||||
immune_to_ssd = 1
|
||||
|
||||
var/list/alarm_types_show = list("Motion" = 0, "Fire" = 0, "Atmosphere" = 0, "Power" = 0, "Camera" = 0)
|
||||
var/list/alarm_types_clear = list("Motion" = 0, "Fire" = 0, "Atmosphere" = 0, "Power" = 0, "Camera" = 0)
|
||||
|
||||
@@ -112,6 +112,12 @@
|
||||
killing = 0
|
||||
hud1.icon_state = "disarm/kill"
|
||||
return
|
||||
|
||||
if(ishuman(affecting))
|
||||
var/mob/living/carbon/human/H = affecting
|
||||
var/datum/organ/external/head = H.get_organ("head")
|
||||
head.add_autopsy_data("Strangulation", 0)
|
||||
|
||||
affecting.Weaken(5) // Should keep you down unless you get help.
|
||||
affecting.Stun(5) // It will hamper your voice, being choked and all.
|
||||
affecting.losebreath = min(affecting.losebreath + 2, 3)
|
||||
@@ -293,4 +299,4 @@
|
||||
/obj/item/weapon/grab/Del()
|
||||
del(hud1)
|
||||
..()
|
||||
return
|
||||
return
|
||||
|
||||
@@ -147,24 +147,7 @@
|
||||
return 1
|
||||
|
||||
if(href_list["ready"])
|
||||
var/num_old_slots = GetAvailableAlienPlayerSlots()
|
||||
var/new_slots = num_old_slots
|
||||
if(!ready)
|
||||
if(num_old_slots >= 1 || preferences.species == "Human")
|
||||
ready = 1
|
||||
new_slots = GetAvailableAlienPlayerSlots()
|
||||
else
|
||||
src << "\red Unable to declare ready. Too many players have already elected to play as aliens."
|
||||
else
|
||||
ready = 0
|
||||
new_slots = GetAvailableAlienPlayerSlots()
|
||||
|
||||
if(num_old_slots < 1 && new_slots >= 1)
|
||||
for(var/mob/new_player/N in world)
|
||||
N << "\blue A new alien player slot has opened."
|
||||
else if(num_old_slots >= 1 && new_slots < 1)
|
||||
for(var/mob/new_player/N in world)
|
||||
N << "\red New alien players can no longer enter the game."
|
||||
ready = !ready
|
||||
|
||||
if(href_list["refresh"])
|
||||
src << browse(null, "window=playersetup") //closes the player setup window
|
||||
@@ -205,9 +188,6 @@
|
||||
if(!is_alien_whitelisted(src, preferences.species) && config.usealienwhitelist)
|
||||
src << alert("You are currently not whitelisted to play [preferences.species].")
|
||||
return 0
|
||||
else if(GetAvailableAlienPlayerSlots() < 1)
|
||||
src << "\red Unable to join game. Too many players have already joined as aliens."
|
||||
return 0
|
||||
|
||||
LateChoices()
|
||||
|
||||
@@ -356,15 +336,10 @@
|
||||
src << alert("[rank] is not available. Please try another.")
|
||||
return 0
|
||||
|
||||
var/num_old_slots = GetAvailableAlienPlayerSlots()
|
||||
var/new_slots = num_old_slots
|
||||
if(preferences.species != "Human")
|
||||
if(!is_alien_whitelisted(src, preferences.species) && config.usealienwhitelist)
|
||||
src << alert("You are currently not whitelisted to play [preferences.species].")
|
||||
return 0
|
||||
else if(num_old_slots < 1)
|
||||
src << "\red Unable to join game. Too many players have already joined as aliens."
|
||||
return 0
|
||||
|
||||
job_master.AssignRole(src, rank, 1)
|
||||
|
||||
@@ -384,14 +359,6 @@
|
||||
ticker.minds += character.mind//Cyborgs and AIs handle this in the transform proc. //TODO!!!!! ~Carn
|
||||
AnnounceArrival(character, rank)
|
||||
|
||||
new_slots = GetAvailableAlienPlayerSlots()
|
||||
if(num_old_slots < 1 && new_slots >= 1)
|
||||
for(var/mob/new_player/N in world)
|
||||
N << "\blue A new alien player slot has opened."
|
||||
else if(num_old_slots >= 1 && new_slots < 1)
|
||||
for(var/mob/new_player/N in world)
|
||||
N << "\red New alien players can no longer enter the game."
|
||||
|
||||
else
|
||||
character.Robotize()
|
||||
del(src)
|
||||
@@ -492,22 +459,3 @@
|
||||
proc/close_spawn_windows()
|
||||
src << browse(null, "window=latechoices") //closes late choices window
|
||||
src << browse(null, "window=playersetup") //closes the player setup window
|
||||
|
||||
//limits the number of alien players in a game
|
||||
/proc/GetAvailableAlienPlayerSlots()
|
||||
if(!config.limitalienplayers)
|
||||
return 9999
|
||||
|
||||
var/num_players = 0
|
||||
|
||||
//check new players
|
||||
for(var/mob/new_player/N in world)
|
||||
if(N.preferences && N.ready)
|
||||
num_players++
|
||||
|
||||
//check players already spawned, only count humans or aliens
|
||||
for(var/mob/living/carbon/human/H in world)
|
||||
if(H.ckey)
|
||||
num_players++
|
||||
|
||||
return round(num_players * (config.alien_to_human_ratio / 100))
|
||||
|
||||
Reference in New Issue
Block a user