Merge remote-tracking branch 'upstream/master' into pAI-Drone-Port

This commit is contained in:
DZD
2015-01-07 15:48:29 -05:00
452 changed files with 29149 additions and 40077 deletions
+4 -3
View File
@@ -4,8 +4,8 @@ Creature-level abilities.
/var/global/list/ability_verbs = list( )
/mob/living/carbon/human/slime/proc/slimepeople_ventcrawl()
/*
/mob/living/carbon/human/slime/proc/slimepeople_ventcrawl() // Slime people ventcrawling commented out
set category = "Abilities"
set name = "Ventcrawl (Slime People)"
@@ -34,4 +34,5 @@ Creature-level abilities.
M.handle_ventcrawl()
else
src << "This should not be happening. At all."
src << "This should not be happening. At all."
*/
+74 -13
View File
@@ -1,5 +1,5 @@
#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
#define HEAT_DAMAGE_LEVEL_2 3 //Amount of damage applied when your body temperature passes the 400K point
#define HEAT_DAMAGE_LEVEL_3 8 //Amount of damage applied when your body temperature passes the 1000K point
/mob/living/carbon/alien
@@ -15,20 +15,31 @@
alien_talk_understand = 1
nightvision = 1
var/obj/item/weapon/card/id/wear_id = null // Fix for station bounced radios -- Skie
var/has_fine_manipulation = 0
var/move_delay_add = 0 // movement delay to add
status_flags = CANPARALYSE|CANPUSH
var/heal_rate = 1
var/heal_rate = 5
var/plasma_rate = 5
var/oxygen_alert = 0
var/toxins_alert = 0
var/fire_alert = 0
var/large = 0
var/heat_protection = 0.5
var/leaping = 0
/mob/living/carbon/alien/New()
verbs += /mob/living/carbon/verb/mob_sleep
verbs += /mob/living/verb/lay_down
internal_organs += new /obj/item/brain/alien
..()
/mob/living/carbon/alien/adjustToxLoss(amount)
storedPlasma = min(max(storedPlasma + amount,0),max_plasma) //upper limit of max_plasma, lower limit of 0
@@ -52,15 +63,13 @@
if(status_flags & GODMODE)
health = maxHealth
stat = CONSCIOUS
else
//oxyloss is only used for suicide
//toxloss isn't used for aliens, its actually used as alien powers!!
health = maxHealth - getOxyLoss() - getFireLoss() - getBruteLoss() - getCloneLoss()
return
health = maxHealth - getOxyLoss() - getFireLoss() - getBruteLoss() - getCloneLoss()
/mob/living/carbon/alien/proc/handle_environment(var/datum/gas_mixture/environment)
//If there are alien weeds on the ground then heal if needed or give some toxins
if(locate(/obj/effect/alien/weeds) in loc)
if(locate(/obj/structure/alien/weeds) in loc)
if(health >= maxHealth - getCloneLoss())
adjustToxLoss(plasma_rate)
else
@@ -70,6 +79,7 @@
if(!environment)
return
var/loc_temp = T0C
if(istype(loc, /obj/mecha))
var/obj/mecha/M = loc
@@ -114,7 +124,6 @@
return
/mob/living/carbon/alien/proc/handle_mutations_and_radiation()
if(getFireLoss())
if((M_RESIST_HEAT in mutations) || prob(5))
adjustFireLoss(-1)
@@ -185,6 +194,56 @@
/mob/living/carbon/alien/setDNA()
return
/mob/living/carbon/alien/verb/nightvisiontoggle()
set name = "Toggle Night Vision"
set category = "Alien"
if(!nightvision)
see_in_dark = 8
see_invisible = SEE_INVISIBLE_MINIMUM
nightvision = 1
usr.hud_used.nightvisionicon.icon_state = "nightvision1"
else if(nightvision == 1)
see_in_dark = 4
see_invisible = 45
nightvision = 0
usr.hud_used.nightvisionicon.icon_state = "nightvision0"
/mob/living/carbon/alien/assess_threat(var/obj/machinery/bot/secbot/judgebot, var/lasercolor)
if(judgebot.emagged == 2)
return 10 //Everyone is a criminal!
var/threatcount = 0
//Securitrons can't identify aliens
if(!lasercolor && judgebot.idcheck)
threatcount += 4
//Lasertag bullshit
if(lasercolor)
if(lasercolor == "b")//Lasertag turrets target the opposing team, how great is that? -Sieve
if((istype(r_hand,/obj/item/weapon/gun/energy/laser/redtag)) || (istype(l_hand,/obj/item/weapon/gun/energy/laser/redtag)))
threatcount += 4
if(lasercolor == "r")
if((istype(r_hand,/obj/item/weapon/gun/energy/laser/bluetag)) || (istype(l_hand,/obj/item/weapon/gun/energy/laser/bluetag)))
threatcount += 4
return threatcount
//Check for weapons
if(judgebot.weaponscheck)
if(judgebot.check_for_weapons(l_hand))
threatcount += 4
if(judgebot.check_for_weapons(r_hand))
threatcount += 4
//Loyalty implants imply trustworthyness
if(isloyal(src))
threatcount -= 1
return threatcount
/*----------------------------------------
Proc: AddInfectionImages()
Des: Gives the client of the alien an image on each infected mob.
@@ -193,7 +252,7 @@ Des: Gives the client of the alien an image on each infected mob.
if (client)
for (var/mob/living/C in mob_list)
if(C.status_flags & XENO_HOST)
var/mob/living/carbon/alien/embryo/A = locate() in C
var/obj/item/alien_embryo/A = locate() in C
var/I = image('icons/mob/alien.dmi', loc = C, icon_state = "infected[A.stage]")
client.images += I
return
@@ -210,10 +269,8 @@ Des: Removes all infected images from the alien.
del(I)
return
#undef HEAT_DAMAGE_LEVEL_1
#undef HEAT_DAMAGE_LEVEL_2
#undef HEAT_DAMAGE_LEVEL_3
/mob/living/carbon/alien/canBeHandcuffed()
return 1
/mob/living/carbon/alien/proc/updatePlasmaDisplay()
if(hud_used) //clientless aliens
@@ -221,3 +278,7 @@ Des: Removes all infected images from the alien.
/mob/living/carbon/alien/larva/updatePlasmaDisplay()
return
#undef HEAT_DAMAGE_LEVEL_1
#undef HEAT_DAMAGE_LEVEL_2
#undef HEAT_DAMAGE_LEVEL_3
@@ -1,2 +1,106 @@
/mob/living/carbon/alien/hitby(atom/movable/AM)
..(AM, 1)
..(AM, 1)
/*Code for aliens attacking aliens. Because aliens act on a hivemind, I don't see them as very aggressive with each other.
As such, they can either help or harm other aliens. Help works like the human help command while harm is a simple nibble.
In all, this is a lot like the monkey code. /N
*/
/mob/living/carbon/alien/attack_alien(mob/living/carbon/alien/M as mob)
if (!ticker)
M << "You cannot attack people before the game has started."
return
if (istype(loc, /turf) && istype(loc.loc, /area/start))
M << "No attacking people at spawn, you jackass."
return
switch(M.a_intent)
if ("help")
sleeping = max(0,sleeping-5)
resting = 0
AdjustParalysis(-3)
AdjustStunned(-3)
AdjustWeakened(-3)
visible_message("<span class='notice'>[M.name] nuzzles [src] trying to wake it up!</span>")
if ("grab")
if (M == src || anchored)
return
if (!(status_flags & CANPUSH))
return
var/obj/item/weapon/grab/G = new /obj/item/weapon/grab(M, src )
M.put_in_active_hand(G)
grabbed_by += G
G.synch()
LAssailant = M
for(var/mob/O in viewers(src, null))
if ((O.client && !( O.blinded )))
O.show_message(text("\red [] has grabbed [] passively!", M, src), 1)
else
if (health > 0)
playsound(loc, 'sound/weapons/bite.ogg', 50, 1, -1)
var/damage = 1
visible_message("<span class='danger'>[M.name] bites [src]!</span>", \
"<span class='userdanger'>[M.name] bites [src]!</span>")
adjustBruteLoss(damage)
add_logs(M, src, "attacked", admin=0)
updatehealth()
else
M << "<span class='warning'>[name] is too injured for that.</span>"
return
/mob/living/carbon/alien/attack_larva(mob/living/carbon/alien/larva/L as mob)
return attack_alien(L)
/mob/living/carbon/alien/attack_hand(mob/living/carbon/human/M as mob)
if(..()) //to allow surgery to return properly.
return 0
switch(M.a_intent)
if("help")
help_shake_act(M)
if("grab")
if (M == src || anchored)
return
if (!(status_flags & CANPUSH))
return
var/obj/item/weapon/grab/G = new /obj/item/weapon/grab(M, src )
M.put_in_active_hand(G)
grabbed_by += G
G.synch()
LAssailant = M
for(var/mob/O in viewers(src, null))
if ((O.client && !( O.blinded )))
O.show_message(text("\red [] has grabbed [] passively!", M, src), 1)
if ("harm", "disarm")
return 1
return 0
/mob/living/carbon/alien/attack_paw(mob/living/carbon/monkey/M as mob)
if(..())
if (stat != DEAD)
adjustBruteLoss(rand(1, 3))
updatehealth()
return
/mob/living/carbon/alien/attack_animal(mob/living/simple_animal/M as mob)
if(..())
var/damage = rand(M.melee_damage_lower, M.melee_damage_upper)
adjustBruteLoss(damage)
updatehealth()
@@ -8,13 +8,13 @@ Doesn't work on other aliens/AI.*/
/mob/living/carbon/alien/proc/powerc(X, Y)//Y is optional, checks for weed planting. X can be null.
if(stat)
src << "\green You must be conscious to do this."
src << "<span class='noticealien'>You must be conscious to do this.</span>"
return 0
else if(X && getPlasma() < X)
src << "\green Not enough plasma stored."
src << "<span class='noticealien'>Not enough plasma stored.</span>"
return 0
else if(Y && (!isturf(src.loc) || istype(src.loc, /turf/space)))
src << "\green Bad place for a garden!"
src << "<span class='noticealien'>You can't place that here!</span>"
return 0
else return 1
@@ -23,26 +23,17 @@ Doesn't work on other aliens/AI.*/
set desc = "Plants some alien weeds"
set category = "Alien"
if(locate(/obj/structure/alien/weeds/node) in get_turf(src))
src << "<span class='noticealien'>There's already a weed node here.</span>"
return
if(powerc(50,1))
adjustToxLoss(-50)
for(var/mob/O in viewers(src, null))
O.show_message(text("\green <B>[src] has planted some alien weeds!</B>"), 1)
new /obj/effect/alien/weeds/node(loc)
O.show_message(text("<span class='alertalien'>[src] has planted some alien weeds!</span>"), 1)
new /obj/structure/alien/weeds/node(loc)
return
/*
/mob/living/carbon/alien/humanoid/verb/ActivateHuggers()
set name = "Activate facehuggers (5)"
set desc = "Makes all nearby facehuggers activate"
set category = "Alien"
if(powerc(5))
adjustToxLoss(-5)
for(var/obj/item/clothing/mask/facehugger/F in range(8,src))
F.GoActive()
emote("roar")
return
*/
/mob/living/carbon/alien/humanoid/verb/whisp(mob/M as mob in oview())
set name = "Whisper (10)"
set desc = "Whisper to someone"
@@ -53,8 +44,8 @@ Doesn't work on other aliens/AI.*/
var/msg = sanitize(input("Message:", "Alien Whisper") as text|null)
if(msg)
log_say("AlienWhisper: [key_name(src)]->[M.key] : [msg]")
M << "\green You hear a strange, alien voice in your head... \italic [msg]"
src << {"\green You said: "[msg]" to [M]"}
M << "<span class='noticealien'>You hear a strange, alien voice in your head...<span class='noticealien'>[msg]"
src << {"<span class='noticealien'>You said: "[msg]" to [M]</span>"}
return
/mob/living/carbon/alien/humanoid/verb/transfer_plasma(mob/living/carbon/alien/M as mob in oview())
@@ -70,10 +61,10 @@ Doesn't work on other aliens/AI.*/
if (get_dist(src,M) <= 1)
M.adjustToxLoss(amount)
adjustToxLoss(-amount)
M << "\green [src] has transfered [amount] plasma to you."
src << {"\green You have trasferred [amount] plasma to [M]"}
M << "<span class='noticealien'>[src] has transfered [amount] plasma to you.</span>"
src << {"<span class='noticealien'>You have trasferred [amount] plasma to [M]</span>"}
else
src << "\green You need to be closer."
src << "<span class='noticealien'>You need to be closer.</span>"
return
@@ -88,50 +79,69 @@ Doesn't work on other aliens/AI.*/
if(isobj(O))
var/obj/I = O
if(I.unacidable) //So the aliens don't destroy energy fields/singularies/other aliens/etc with their acid.
src << "\green You cannot dissolve this object."
src << "<span class='noticealien'>You cannot dissolve this object.</span>"
return
// TURF CHECK
else if(istype(O, /turf/simulated))
var/turf/T = O
// R WALL
if(istype(T, /turf/simulated/wall/r_wall))
src << "\green You cannot dissolve this object."
src << "<span class='noticealien'>You cannot dissolve this object.</span>"
return
// R FLOOR
if(istype(T, /turf/simulated/floor/engine))
src << "\green You cannot dissolve this object."
src << "<span class='noticealien'>You cannot dissolve this object.</span>"
return
else// Not a type we can acid.
return
adjustToxLoss(-200)
new /obj/effect/alien/acid(get_turf(O), O)
visible_message("\green <B>[src] vomits globs of vile stuff all over [O]. It begins to sizzle and melt under the bubbling mess of acid!</B>")
new /obj/effect/acid(get_turf(O), O)
visible_message("<span class='alertalien'>[src] vomits globs of vile stuff all over [O]. It begins to sizzle and melt under the bubbling mess of acid!</span>")
else
src << "\green Target is too far away."
src << "<span class='noticealien'>Target is too far away.</span>"
return
/mob/living/carbon/alien/humanoid/proc/neurotoxin() // ok
set name = "Spit Neurotoxin (50)"
set desc = "Spits neurotoxin at someone, paralyzing them for a short time."
set category = "Alien"
if(powerc(50))
adjustToxLoss(-50)
src.visible_message("<span class='danger'>[src] spits neurotoxin!", "<span class='alertalien'>You spit neurotoxin.</span>")
var/turf/T = loc
var/turf/U = get_step(src, dir) // Get the tile infront of the move, based on their direction
if(!isturf(U) || !isturf(T))
return
var/obj/item/projectile/bullet/neurotoxin/A = new /obj/item/projectile/bullet/neurotoxin(usr.loc)
A.current = U
A.firer = src
A.yo = U.y - T.y
A.xo = U.x - T.x
spawn(1)
A.process()
return
/mob/living/carbon/alien/humanoid/proc/resin() // -- TLE
set name = "Secrete Resin (75)"
set name = "Secrete Resin (55)"
set desc = "Secrete tough malleable resin."
set category = "Alien"
if(powerc(75))
var/choice = input("Choose what you wish to shape.","Resin building") as null|anything in list("resin door","resin wall","resin membrane","resin nest") //would do it through typesof but then the player choice would have the type path and we don't want the internal workings to be exposed ICly - Urist
if(!choice || !powerc(75)) return
adjustToxLoss(-75)
src << "\green You shape a [choice]."
if(powerc(55))
var/choice = input("Choose what you wish to shape.","Resin building") as null|anything in list("resin wall","resin membrane","resin nest") //would do it through typesof but then the player choice would have the type path and we don't want the internal workings to be exposed ICly - Urist
if(!choice || !powerc(55)) return
adjustToxLoss(-55)
for(var/mob/O in viewers(src, null))
O.show_message(text("\red <B>[src] vomits up a thick purple substance and begins to shape it!</B>"), 1)
O.show_message(text("<span class='alertalien'>[src] vomits up a thick purple substance and shapes it!</span>"), 1)
switch(choice)
if("resin door")
new /obj/structure/mineral_door/resin(loc)
if("resin wall")
new /obj/effect/alien/resin/wall(loc)
new /obj/structure/alien/resin/wall(loc)
if("resin membrane")
new /obj/effect/alien/resin/membrane(loc)
new /obj/structure/alien/resin/membrane(loc)
if("resin nest")
new /obj/structure/stool/bed/nest(loc)
return
@@ -148,5 +158,5 @@ Doesn't work on other aliens/AI.*/
stomach_contents.Remove(M)
M.loc = loc
//Paralyse(10)
src.visible_message("\green <B>[src] hurls out the contents of their stomach!</B>")
src.visible_message("<span class='alertalien'><B>[src] hurls out the contents of their stomach!</span>")
return
@@ -10,8 +10,8 @@
var/datum/reagents/R = new/datum/reagents(100)
reagents = R
R.my_atom = src
// if(src.name == "alien drone")
// src.name = text("alien drone ([rand(1, 1000)])")
if(src.name == "alien drone")
src.name = text("alien drone ([rand(1, 1000)])")
src.real_name = src.name
verbs.Add(/mob/living/carbon/alien/humanoid/proc/resin,/mob/living/carbon/alien/humanoid/proc/corrosive_acid)
..()
@@ -36,11 +36,12 @@
return
if(no_queen)
adjustToxLoss(-500)
src << "\green You begin to evolve!"
src << "<span class='noticealien'>You begin to evolve!</span>"
for(var/mob/O in viewers(src, null))
O.show_message(text("\green <B>[src] begins to twist and contort!</B>"), 1)
var/mob/living/carbon/alien/humanoid/queen/large/new_xeno = new (loc)
O.show_message(text("<span class='alertalien'>[src] begins to twist and contort!</span>"), 1)
var/mob/living/carbon/alien/humanoid/queen/new_xeno = new(loc)
mind.transfer_to(new_xeno)
new_xeno.mind.name = new_xeno.name
del(src)
else
src << "<span class='notice'>We already have an alive queen.</span>"
@@ -12,65 +12,152 @@
var/datum/reagents/R = new/datum/reagents(100)
reagents = R
R.my_atom = src
// if(name == "alien hunter")
// name = text("alien hunter ([rand(1, 1000)])")
if(name == "alien hunter")
name = text("alien hunter ([rand(1, 1000)])")
real_name = name
..()
/mob/living/carbon/alien/humanoid/hunter
/mob/living/carbon/alien/humanoid/hunter/handle_regular_hud_updates()
..() //-Yvarov
handle_regular_hud_updates()
..() //-Yvarov
if (healths)
if (stat != 2)
switch(health)
if(150 to INFINITY)
healths.icon_state = "health0"
if(100 to 150)
healths.icon_state = "health1"
if(50 to 100)
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"
handle_environment()
if(m_intent == "run" || resting)
..()
if (healths)
if (stat != 2)
switch(health)
if(150 to INFINITY)
healths.icon_state = "health0"
if(100 to 150)
healths.icon_state = "health1"
if(50 to 100)
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
adjustToxLoss(-heal_rate)
healths.icon_state = "health6"
/mob/living/carbon/alien/humanoid/hunter/handle_environment()
if(m_intent == "run" || resting)
..()
else
adjustToxLoss(-heal_rate)
//Hunter verbs
/*
/mob/living/carbon/alien/humanoid/hunter/verb/invis()
set name = "Invisibility (50)"
set desc = "Makes you invisible for 15 seconds"
set category = "Alien"
if(alien_invis)
update_icons()
/mob/living/carbon/alien/humanoid/hunter/proc/toggle_leap(var/message = 1)
leap_on_click = !leap_on_click
leap_icon.icon_state = "leap_[leap_on_click ? "on":"off"]"
if(message)
src << "<span class='noticealien'>You will now [leap_on_click ? "leap at":"slash at"] enemies!</span>"
else
if(powerc(50))
adjustToxLoss(-50)
alien_invis = 1.0
update_icons()
src << "\green You are now invisible."
for(var/mob/O in oviewers(src, null))
O.show_message(text("\red <B>[src] fades into the surroundings!</B>"), 1)
spawn(250)
if(!isnull(src))//Don't want the game to runtime error when the mob no-longer exists.
alien_invis = 0.0
update_icons()
src << "\green You are no longer invisible."
return
*/
return
/mob/living/carbon/alien/humanoid/hunter/ClickOn(var/atom/A, var/params)
face_atom(A)
if(leap_on_click)
leap_at(A)
else
..()
#define MAX_ALIEN_LEAP_DIST 7
/mob/living/carbon/alien/humanoid/hunter/proc/leap_at(var/atom/A)
if(pounce_cooldown)
src << "<span class='alertalien'>You are too fatigued to pounce right now!</span>"
return
if(leaping) //Leap while you leap, so you can leap while you leap
return
if(!has_gravity(src) || !has_gravity(A))
src << "<span class='alertalien'>It is unsafe to leap without gravity!</span>"
//It's also extremely buggy visually, so it's balance+bugfix
return
if(lying)
return
else //Maybe uses plasma in the future, although that wouldn't make any sense...
leaping = 1
update_icons()
throw_at(A,MAX_ALIEN_LEAP_DIST,1)
leaping = 0
update_icons()
/mob/living/carbon/alien/humanoid/hunter/throw_impact(A)
var/msg = ""
if(A)
if(istype(A, /mob/living))
var/mob/living/L = A
msg = "<span class ='alertalien'>[src] pounces on [A]!</span>"
L.Weaken(5)
sleep(2)//Runtime prevention (infinite bump() calls on hulks)
step_towards(src,L)
toggle_leap(0)
pounce_cooldown = !pounce_cooldown
spawn(pounce_cooldown_time) //3s by default
pounce_cooldown = !pounce_cooldown
else
msg = "<span class ='alertalien'>[src] smashes into [A]!</span>"
weakened = 2
if(leaping)
leaping = 0
update_canmove()
visible_message(msg)
/mob/living/carbon/alien/humanoid/float(on)
if(leaping)
return
..()
//Modified throw_at() that will use diagonal dirs where appropriate
//instead of locking it to cardinal dirs
/mob/living/carbon/alien/humanoid/throw_at(atom/target, range, speed)
if(!target || !src) return 0
src.throwing = 1
var/dist_x = abs(target.x - src.x)
var/dist_y = abs(target.y - src.y)
var/dist_travelled = 0
var/dist_since_sleep = 0
var/tdist_x = dist_x;
var/tdist_y = dist_y;
if(dist_x <= dist_y)
tdist_x = dist_y;
tdist_y = dist_x;
var/error = tdist_x/2 - tdist_y
while(target && (((((dist_x > dist_y) && ((src.x < target.x) || (src.x > target.x))) || ((dist_x <= dist_y) && ((src.y < target.y) || (src.y > target.y))) || (src.x > target.x)) && dist_travelled < range) || !has_gravity(src)))
if(!src.throwing) break
if(!istype(src.loc, /turf)) break
var/atom/step = get_step(src, get_dir(src,target))
if(!step)
break
src.Move(step, get_dir(src, step))
hit_check()
error += (error < 0) ? tdist_x : -tdist_y;
dist_travelled++
dist_since_sleep++
if(dist_since_sleep >= speed)
dist_since_sleep = 0
sleep(1)
src.throwing = 0
if(isobj(src))
src.throw_impact(get_turf(src))
return 1
@@ -8,60 +8,6 @@
icon_state = "aliens_s"
plasma_rate = 10
/mob/living/carbon/alien/humanoid/sentinel/New()
var/datum/reagents/R = new/datum/reagents(100)
reagents = R
R.my_atom = src
// if(name == "alien sentinel")
// name = text("alien sentinel ([rand(1, 1000)])")
real_name = name
verbs.Add(/mob/living/carbon/alien/humanoid/proc/corrosive_acid)
..()
/mob/living/carbon/alien/humanoid/sentinel
handle_regular_hud_updates()
..() //-Yvarov
if (healths)
if (stat != 2)
switch(health)
if(125 to INFINITY)
healths.icon_state = "health0"
if(100 to 125)
healths.icon_state = "health1"
if(75 to 100)
healths.icon_state = "health2"
if(25 to 75)
healths.icon_state = "health3"
if(0 to 25)
healths.icon_state = "health4"
else
healths.icon_state = "health5"
else
healths.icon_state = "health6"
/mob/living/carbon/alien/humanoid/sentinel/verb/evolve() // -- TLE
set name = "Evolve (250)"
set desc = "Become a Praetorian, Royal Guard to the Queen."
set category = "Alien"
if(powerc(250))
adjustToxLoss(-250)
src << "\green You begin to evolve!"
for(var/mob/O in viewers(src, null))
O.show_message(text("\green <B>[src] begins to twist and contort!</B>"), 1)
var/mob/living/carbon/alien/humanoid/sentinel/large/new_xeno = new (loc)
if(mind)
mind.transfer_to(new_xeno)
else
new_xeno.key = key
del(src)
return
/mob/living/carbon/alien/humanoid/sentinel/large
name = "alien praetorian"
icon = 'icons/mob/alienlarge.dmi'
@@ -72,6 +18,12 @@
move_delay_add = 1
large = 1
/mob/living/carbon/alien/humanoid/sentinel/praetorian
name = "alien praetorian"
maxHealth = 200
health = 200
move_delay_add = 1
large = 1
/mob/living/carbon/alien/humanoid/sentinel/large/update_icons()
lying_prev = lying //so we don't update overlays for lying/standing unless our stance changes again
@@ -85,4 +37,56 @@
else
icon_state = "prat_s"
for(var/image/I in overlays_standing)
overlays += I
overlays += I
/mob/living/carbon/alien/humanoid/sentinel/New()
var/datum/reagents/R = new/datum/reagents(100)
reagents = R
R.my_atom = src
if(name == "alien sentinel")
name = text("alien sentinel ([rand(1, 1000)])")
real_name = name
verbs.Add(/mob/living/carbon/alien/humanoid/proc/corrosive_acid,/mob/living/carbon/alien/humanoid/proc/neurotoxin)
..()
/mob/living/carbon/alien/humanoid/sentinel/handle_regular_hud_updates()
..() //-Yvarov
if (healths)
if (stat != 2)
switch(health)
if(125 to INFINITY)
healths.icon_state = "health0"
if(100 to 125)
healths.icon_state = "health1"
if(75 to 100)
healths.icon_state = "health2"
if(25 to 75)
healths.icon_state = "health3"
if(0 to 25)
healths.icon_state = "health4"
else
healths.icon_state = "health5"
else
healths.icon_state = "health6"
/*
/mob/living/carbon/alien/humanoid/sentinel/verb/evolve() // -- TLE
set name = "Evolve (250)"
set desc = "Become a Praetorian, Royal Guard to the Queen."
set category = "Alien"
if(powerc(250))
adjustToxLoss(-250)
src << "\green You begin to evolve!"
for(var/mob/O in viewers(src, null))
O.show_message(text("<span class='alertalien'>[src] begins to twist and contort!</span>"), 1)
var/mob/living/carbon/alien/humanoid/sentinel/praetorian/new_xeno = new(loc)
if(mind)
mind.transfer_to(new_xeno)
else
new_xeno.key = key
new_xeno.mind.name = new_xeno.name
del(src)
return
*/
@@ -1,18 +1,22 @@
/mob/living/carbon/alien/humanoid/empress/large
/mob/living/carbon/alien/humanoid/empress
name = "alien empress"
caste = "e"
caste = "q"
maxHealth = 700
health = 700
icon_state = "empress_s"
icon_state = "alienq_s"
status_flags = CANPARALYSE
heal_rate = 5
plasma_rate = 20
move_delay_add = 3
max_plasma = 1000
large = 1
/mob/living/carbon/alien/humanoid/empress/large
name = "alien empress"
caste = "e"
icon = 'icons/mob/alienhuge.dmi'
icon_state = "empress_s"
pixel_x = -32
move_delay_add = 3
large = 1
max_plasma = 1000
/mob/living/carbon/alien/humanoid/empress/large/update_icons()
lying_prev = lying //so we don't update overlays for lying/standing unless our stance changes again
@@ -28,7 +32,6 @@
for(var/image/I in overlays_standing)
overlays += I
/mob/living/carbon/alien/humanoid/empress/New()
var/datum/reagents/R = new/datum/reagents(100)
reagents = R
@@ -72,18 +75,17 @@
src.healths.icon_state = "health6"
/mob/living/carbon/alien/humanoid/empress/verb/lay_egg()
set name = "Lay Egg (250)"
set desc = "Lay an egg to produce huggers to impregnate prey with."
set category = "Alien"
if(locate(/obj/effect/alien/egg) in get_turf(src))
src << "There's already an egg here."
if(locate(/obj/structure/alien/egg) in get_turf(src))
src << "<span class='noticealien'>There's already an egg here.</span>"
return
if(powerc(250,1))//Can't plant eggs on spess tiles. That's silly.
adjustToxLoss(-250)
if(powerc(75,1))//Can't plant eggs on spess tiles. That's silly.
adjustToxLoss(-75)
for(var/mob/O in viewers(src, null))
O.show_message(text("\green <B>[src] has laid an egg!</B>"), 1)
new /obj/effect/alien/egg(loc)
return
new /obj/structure/alien/egg(loc)
return
@@ -8,15 +8,18 @@
var/obj/item/weapon/l_store = null
var/caste = ""
var/next_attack = 0
var/pounce_cooldown = 0
var/pounce_cooldown_time = 30
update_icon = 1
var/leap_on_click = 0
//This is fine right now, if we're adding organ specific damage this needs to be updated
/mob/living/carbon/alien/humanoid/New()
var/datum/reagents/R = new/datum/reagents(100)
var/datum/reagents/R = new/datum/reagents(1000)
reagents = R
R.my_atom = src
// if(name == "alien")
// name = text("alien ([rand(1, 1000)])")
if(name == "alien")
name = text("alien ([rand(1, 1000)])")
real_name = name
..()
@@ -50,15 +53,18 @@
/mob/living/carbon/alien/humanoid/movement_delay()
var/tally = 0
if (istype(src, /mob/living/carbon/alien/humanoid/queen))
tally += 5
tally += 4
if (istype(src, /mob/living/carbon/alien/humanoid/drone))
tally += 2
tally += 0
if (istype(src, /mob/living/carbon/alien/humanoid/sentinel))
tally += 1
tally += 0
if (istype(src, /mob/living/carbon/alien/humanoid/hunter))
tally = -1 // hunters go supersuperfast
tally = -2 // hunters go supersuperfast
return (tally + move_delay_add + config.alien_delay)
/mob/living/carbon/alien/humanoid/Process_Spacemove(var/check_drift = 0)
return 1
///mob/living/carbon/alien/humanoid/bullet_act(var/obj/item/projectile/Proj) taken care of in living
/mob/living/carbon/alien/humanoid/emp_act(severity)
@@ -116,12 +122,9 @@
show_message("\red The blob attacks!")
adjustFireLoss(damage)
return
/mob/living/carbon/alien/humanoid/meteorhit(O as obj)
for(var/mob/M in viewers(src, null))
if ((M.client && !( M.blinded )))
@@ -133,35 +136,6 @@
updatehealth()
return
/mob/living/carbon/alien/humanoid/attack_paw(mob/living/carbon/monkey/M as mob)
if(!ismonkey(M)) return//Fix for aliens receiving double messages when attacking other aliens.
if (!ticker)
M << "You cannot attack people before the game has started."
return
if (istype(loc, /turf) && istype(loc.loc, /area/start))
M << "No attacking people at spawn, you jackass."
return
..()
switch(M.a_intent)
if ("help")
help_shake_act(M)
else
if (istype(wear_mask, /obj/item/clothing/mask/muzzle))
return
if (health > 0)
playsound(loc, 'sound/weapons/bite.ogg', 50, 1, -1)
for(var/mob/O in viewers(src, null))
if ((O.client && !( O.blinded )))
O.show_message(text("\red <B>[M.name] has bit [src]!</B>"), 1)
adjustBruteLoss(rand(1, 3))
updatehealth()
return
/mob/living/carbon/alien/humanoid/attack_slime(mob/living/carbon/slime/M as mob)
if (!ticker)
M << "You cannot attack people before the game has started."
@@ -222,18 +196,6 @@
return
/mob/living/carbon/alien/humanoid/attack_animal(mob/living/simple_animal/M as mob)
if(M.melee_damage_upper == 0)
M.emote("[M.friendly] [src]")
else
if(M.attack_sound)
playsound(loc, M.attack_sound, 50, 1, 1)
for(var/mob/O in viewers(src, null))
O.show_message("\red <B>[M]</B> [M.attacktext] [src]!", 1)
var/damage = rand(M.melee_damage_lower, M.melee_damage_upper)
adjustBruteLoss(damage)
updatehealth()
/mob/living/carbon/alien/humanoid/attack_hand(mob/living/carbon/human/M as mob)
if (!ticker)
M << "You cannot attack people before the game has started."
@@ -289,7 +251,7 @@
if (M_HULK in M.mutations)//M_HULK SMASH
damage += 14
spawn(0)
Weaken(damage) // Why can a hulk knock an alien out but not knock out a human? Damage is robust enough.
Paralyse(1)
step_away(src,M,15)
sleep(3)
step_away(src,M,15)
@@ -298,7 +260,7 @@
if ((O.client && !( O.blinded )))
O.show_message(text("\red <B>[] has punched []!</B>", M, src), 1)
if (damage > 9||prob(5))//Regular humans have a very small chance of weakening an alien.
Weaken(1,5)
Paralyse(2)
for(var/mob/O in viewers(M, null))
if ((O.client && !( O.blinded )))
O.show_message(text("\red <B>[] has weakened []!</B>", M, src), 1, "\red You hear someone fall.", 2)
@@ -313,7 +275,7 @@
if ("disarm")
if (!lying)
if (prob(5))//Very small chance to push an alien down.
Weaken(2)
Paralyse(2)
playsound(loc, 'sound/weapons/thudswoosh.ogg', 50, 1, -1)
for(var/mob/O in viewers(src, null))
if ((O.client && !( O.blinded )))
@@ -332,48 +294,6 @@
O.show_message(text("\red <B>[] has attempted to disarm []!</B>", M, src), 1)
return
/*Code for aliens attacking aliens. Because aliens act on a hivemind, I don't see them as very aggressive with each other.
As such, they can either help or harm other aliens. Help works like the human help command while harm is a simple nibble.
In all, this is a lot like the monkey code. /N
*/
/mob/living/carbon/alien/humanoid/attack_alien(mob/living/carbon/alien/humanoid/M as mob)
if (!ticker)
M << "You cannot attack people before the game has started."
return
if (istype(loc, /turf) && istype(loc.loc, /area/start))
M << "No attacking people at spawn, you jackass."
return
..()
switch(M.a_intent)
if ("help")
sleeping = max(0,sleeping-5)
resting = 0
AdjustParalysis(-3)
AdjustStunned(-3)
AdjustWeakened(-3)
for(var/mob/O in viewers(src, null))
if ((O.client && !( O.blinded )))
O.show_message(text("\blue [M.name] nuzzles [] trying to wake it up!", src), 1)
else
if (health > 0)
playsound(loc, 'sound/weapons/bite.ogg', 50, 1, -1)
var/damage = rand(1, 3)
for(var/mob/O in viewers(src, null))
if ((O.client && !( O.blinded )))
O.show_message(text("\red <B>[M.name] has bit []!</B>", src), 1)
adjustBruteLoss(damage)
updatehealth()
else
M << "\green <B>[name] is too injured for that.</B>"
return
/mob/living/carbon/alien/humanoid/restrained()
if (handcuffed)
return 1
@@ -402,4 +322,4 @@ In all, this is a lot like the monkey code. /N
/mob/living/carbon/alien/humanoid/canBeHandcuffed()
return 1
return 1
@@ -4,16 +4,13 @@
oxygen_alert = 0
toxins_alert = 0
fire_alert = 0
pass_flags = PASSTABLE
var/temperature_alert = 0
/mob/living/carbon/alien/humanoid/Life()
set invisibility = 0
//set background = 1
if (monkeyizing)
return
set background = BACKGROUND_ENABLED
..()
@@ -59,6 +56,7 @@
//Status updates, death etc.
handle_regular_status_updates()
update_canmove()
update_icons()
// Grabbing
for(var/obj/item/weapon/grab/G in src)
@@ -68,388 +66,200 @@
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 << "<span class='danger'>You have a seizure!</span>"
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/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/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/handle_regular_status_updates()
updatehealth()
var/datum/gas_mixture/environment = loc.return_air()
var/datum/gas_mixture/breath
// HACK NEED CHANGING LATER
if(health < 0)
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 = 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)
handle_breath(breath)
if(breath)
loc.assume_air(breath)
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 (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
else
toxins_alert = 0
//Breathe in toxins and out oxygen
breath.toxins -= toxins_used
breath.oxygen += toxins_used
if(breath.temperature > (T0C+66) && !(M_RESIST_HEAT in mutations)) // Hot air hurts :(
if(prob(20))
src << "\red You feel a searing heat in your lungs!"
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
/*
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 & UPPER_TORSO))
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(M_RESIST_COLD in mutations)
thermal_protection += 5
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)
return fire_prot
*/
proc/handle_chemicals_in_body()
if(reagents) reagents.metabolize(src)
if(M_FAT in mutations)
if(nutrition < 100)
if(prob(round((50 - nutrition) / 100)))
src << "\blue You feel fit again!"
mutations.Remove(M_FAT)
else
if(nutrition > 500)
if(prob(5 + round((nutrition - 200) / 2)))
src << "\red You suddenly feel blubbery!"
mutations.Add(M_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
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 || brain_op_stage == 4.0)
death()
blinded = 1
stat = DEAD
silent = 0
else //ALIVE. LIGHTS ARE ON
if(health < config.health_threshold_dead || brain_op_stage == 4.0)
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
handle_statuses()
return 1
//Other
if(stunned)
AdjustStunned(-1)
if(!stunned)
update_icons()
if(weakened)
weakened = max(weakened-1,0)
if(!weakened)
update_icons()
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()
/mob/living/carbon/alien/humanoid/proc/handle_regular_hud_updates()
if (stat == 2 || (M_XRAY in mutations))
sight |= SEE_TURFS
sight |= SEE_MOBS
sight |= SEE_OBJS
if (stat == 2 || (M_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
if(nightvision)
see_in_dark = 8
see_invisible = SEE_INVISIBLE_OBSERVER_NOLIGHTING
else if (stat != 2)
sight |= SEE_MOBS
sight &= ~SEE_TURFS
sight &= ~SEE_OBJS
see_invisible = SEE_INVISIBLE_MINIMUM
else if(!nightvision)
see_in_dark = 4
see_invisible = SEE_INVISIBLE_OBSERVER_NOLIGHTING
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) pullin.icon_state = "pull[pulling ? 1 : 0]"
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.
if (client)
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
see_invisible = 45
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 && !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)
stomach_contents.Remove(M)
continue
if(istype(M, /mob/living/carbon) && stat != 2)
if(M.stat == 2)
M.death(1)
stomach_contents.Remove(M)
del(M)
continue
if(air_master.current_cycle%3==1)
if(!(status_flags & GODMODE))
M.adjustBruteLoss(5)
nutrition += 10
/mob/living/carbon/alien/humanoid/handle_stunned()
if(stunned && !..())
update_icons()
return stunned
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
@@ -7,8 +7,7 @@
status_flags = CANPARALYSE
heal_rate = 5
plasma_rate = 20
move_delay_add = 2
max_plasma = 1000
large = 1
/mob/living/carbon/alien/humanoid/queen/New()
var/datum/reagents/R = new/datum/reagents(100)
@@ -24,7 +23,7 @@
break
real_name = src.name
verbs.Add(/mob/living/carbon/alien/humanoid/proc/corrosive_acid,/mob/living/carbon/alien/humanoid/proc/resin)
verbs.Add(/mob/living/carbon/alien/humanoid/proc/corrosive_acid,/mob/living/carbon/alien/humanoid/proc/neurotoxin,/mob/living/carbon/alien/humanoid/proc/resin)
verbs -= /mob/living/carbon/alien/verb/alien_ventcrawl
..()
@@ -57,19 +56,18 @@
//Queen verbs
/mob/living/carbon/alien/humanoid/queen/verb/lay_egg()
set name = "Lay Egg (250)"
set name = "Lay Egg (75)"
set desc = "Lay an egg to produce huggers to impregnate prey with."
set category = "Alien"
if(locate(/obj/effect/alien/egg) in get_turf(src))
src << "There's already an egg here."
if(locate(/obj/structure/alien/egg) in get_turf(src))
src << "<span class='noticealien'>There's already an egg here.</span>"
return
if(powerc(250,1))//Can't plant eggs on spess tiles. That's silly.
adjustToxLoss(-250)
if(powerc(75,1))//Can't plant eggs on spess tiles. That's silly.
adjustToxLoss(-75)
for(var/mob/O in viewers(src, null))
O.show_message(text("\green <B>[src] has laid an egg!</B>"), 1)
new /obj/effect/alien/egg(loc)
O.show_message(text("<span class='alertalien'>[src] has laid an egg!</span>"), 1)
new /obj/structure/alien/egg(loc)
return
@@ -94,7 +92,7 @@
overlays += I
/*
/mob/living/carbon/alien/humanoid/queen/verb/evolve() // -- TLE
set name = "Evolve (1000)"
set desc = "The ultimate transformation. Become an alien Empress. Only one empress can exist at a time."
@@ -110,16 +108,18 @@
if(no_queen)
adjustToxLoss(-1000)
src << "\green You begin to evolve!"
src << "<span class='noticealien'>You begin to evolve!</span>"
for(var/mob/O in viewers(src, null))
O.show_message(text("\green <B>[src] begins to twist and contort!</B>"), 1)
var/mob/living/carbon/alien/humanoid/empress/large/new_xeno = new (loc)
O.show_message(text("<span class='alertalien'>[src] begins to twist and contort!</span>"), 1)
var/mob/living/carbon/alien/humanoid/empress/new_xeno = new(loc)
if(mind)
mind.transfer_to(new_xeno)
else
new_xeno.key = key
new_xeno.mind.name = new_xeno.name
del(src)
else
src << "<span class='notice'>We already have an alive empress.</span>"
return
*/
@@ -13,31 +13,43 @@
var/list/overlays_standing[X_TOTAL_LAYERS]
/mob/living/carbon/alien/humanoid/update_icons()
lying_prev = lying //so we don't update overlays for lying/standing unless our stance changes again
update_hud() //TODO: remove the need for this to be here
overlays.Cut()
for(var/image/I in overlays_standing)
overlays += I
if(stat == DEAD)
//If we mostly took damage from fire
if(fireloss > 125)
icon_state = "alien[caste]_husked"
pixel_y = 0
else
icon_state = "alien[caste]_dead"
for(var/image/I in overlays_lying)
overlays += I
else if(lying)
if(resting)
icon_state = "alien[caste]_sleep"
else if(stat == UNCONSCIOUS)
icon_state = "alien[caste]_unconscious"
else
icon_state = "alien[caste]_l"
for(var/image/I in overlays_lying)
overlays += I
pixel_y = 0
else if(stat == UNCONSCIOUS || weakened)
icon_state = "alien[caste]_unconscious"
pixel_y = 0
else if(leap_on_click)
icon_state = "alien[caste]_pounce"
else if(lying || resting)
icon_state = "alien[caste]_sleep"
else if(m_intent == "run")
icon_state = "alien[caste]_running"
else
if(m_intent == "run") icon_state = "alien[caste]_running"
else icon_state = "alien[caste]_s"
for(var/image/I in overlays_standing)
overlays += I
icon_state = "alien[caste]_s"
if(leaping)
icon = 'icons/mob/alienleap.dmi'
icon_state = "alien[caste]_leap"
pixel_x = -32
pixel_y = -32
else
icon = initial(icon)
pixel_x = initial(pixel_x)
pixel_y = initial(pixel_y)
/mob/living/carbon/alien/humanoid/regenerate_icons()
..()
@@ -5,6 +5,7 @@
icon_state = "larva_dead"
if(!gibbed)
visible_message("<span class='name'>[src]</span> lets out a waning high-pitched cry.")
update_canmove()
if(client) blind.layer = 0
@@ -1,85 +0,0 @@
/datum/hud/proc/larva_hud()
src.adding = list()
src.other = list()
var/obj/screen/using
using = new /obj/screen()
using.name = "act_intent"
using.dir = SOUTHWEST
using.icon = 'icons/mob/screen1_alien.dmi'
using.icon_state = (mymob.a_intent == "hurt" ? "harm" : mymob.a_intent)
using.screen_loc = ui_acti
using.layer = 20
src.adding += using
action_intent = using
using = new /obj/screen()
using.name = "mov_intent"
using.dir = SOUTHWEST
using.icon = 'icons/mob/screen1_alien.dmi'
using.icon_state = (mymob.m_intent == "run" ? "running" : "walking")
using.screen_loc = ui_movi
using.layer = 20
src.adding += using
move_intent = using
mymob.oxygen = new /obj/screen()
mymob.oxygen.icon = 'icons/mob/screen1_alien.dmi'
mymob.oxygen.icon_state = "oxy0"
mymob.oxygen.name = "oxygen"
mymob.oxygen.screen_loc = ui_alien_oxygen
mymob.toxin = new /obj/screen()
mymob.toxin.icon = 'icons/mob/screen1_alien.dmi'
mymob.toxin.icon_state = "tox0"
mymob.toxin.name = "toxin"
mymob.toxin.screen_loc = ui_alien_toxin
mymob.fire = new /obj/screen()
mymob.fire.icon = 'icons/mob/screen1_alien.dmi'
mymob.fire.icon_state = "fire0"
mymob.fire.name = "fire"
mymob.fire.screen_loc = ui_alien_fire
mymob.healths = new /obj/screen()
mymob.healths.icon = 'icons/mob/screen1_alien.dmi'
mymob.healths.icon_state = "health0"
mymob.healths.name = "health"
mymob.healths.screen_loc = ui_alien_health
mymob.pullin = new /obj/screen()
mymob.pullin.icon = 'icons/mob/screen1_alien.dmi'
mymob.pullin.icon_state = "pull0"
mymob.pullin.name = "pull"
mymob.pullin.screen_loc = ui_pull_resist
mymob.blind = new /obj/screen()
mymob.blind.icon = 'icons/mob/screen1_full.dmi'
mymob.blind.icon_state = "blackimageoverlay"
mymob.blind.name = " "
mymob.blind.screen_loc = "1,1"
mymob.blind.layer = 0
mymob.flash = new /obj/screen()
mymob.flash.icon = 'icons/mob/screen1_alien.dmi'
mymob.flash.icon_state = "blank"
mymob.flash.name = "flash"
mymob.flash.screen_loc = "1,1 to 15,15"
mymob.flash.layer = 17
mymob.zone_sel = new /obj/screen/zone_sel()
mymob.zone_sel.overlays.Cut()
mymob.zone_sel.overlays += image("icon" = 'icons/mob/zone_sel.dmi', "icon_state" = text("[]", mymob.zone_sel.selecting))
mymob.client.screen = null
mymob.client.screen += list( mymob.zone_sel, mymob.oxygen, mymob.toxin, mymob.fire, mymob.healths, mymob.pullin, mymob.blind, mymob.flash) //, mymob.rest, mymob.sleep, mymob.mach )
mymob.client.screen += src.adding + src.other
@@ -2,10 +2,10 @@
name = "alien larva"
real_name = "alien larva"
icon_state = "larva0"
pass_flags = PASSTABLE
pass_flags = PASSTABLE | PASSMOB
maxHealth = 25
health = 25
maxHealth = 30
health = 30
storedPlasma = 50
max_plasma = 50
density = 0
@@ -140,186 +140,31 @@
updatehealth()
return
/mob/living/carbon/alien/larva/attack_animal(mob/living/simple_animal/M as mob)
if(M.melee_damage_upper == 0)
M.emote("[M.friendly] [src]")
else
for(var/mob/O in viewers(src, null))
O.show_message("\red <B>[M]</B> [M.attacktext] [src]!", 1)
var/damage = rand(M.melee_damage_lower, M.melee_damage_upper)
adjustBruteLoss(damage)
M.attack_log += text("\[[time_stamp()]\] <font color='red'>attacked [src.name] ([src.ckey])</font>")
src.attack_log += text("\[[time_stamp()]\] <font color='orange'>was attacked by [M.name] ([M.ckey])</font>")
updatehealth()
/mob/living/carbon/alien/larva/attack_paw(mob/living/carbon/monkey/M as mob)
if(!(istype(M, /mob/living/carbon/monkey))) return//Fix for aliens receiving double messages when attacking other aliens.
if (!ticker)
M << "You cannot attack people before the game has started."
return
if (istype(loc, /turf) && istype(loc.loc, /area/start))
M << "No attacking people at spawn, you jackass."
return
..()
switch(M.a_intent)
if ("help")
help_shake_act(M)
else
if (istype(wear_mask, /obj/item/clothing/mask/muzzle))
return
if (health > 0)
playsound(loc, 'sound/weapons/bite.ogg', 50, 1, -1)
for(var/mob/O in viewers(src, null))
if ((O.client && !( O.blinded )))
O.show_message(text("\red <B>[M.name] has bit [src]!</B>"), 1)
adjustBruteLoss(rand(1, 3))
updatehealth()
return
/mob/living/carbon/alien/larva/attack_slime(mob/living/carbon/slime/M as mob)
if (!ticker)
M << "You cannot attack people before the game has started."
return
if(M.Victim) return // can't attack while eating!
if (health > -100)
for(var/mob/O in viewers(src, null))
if ((O.client && !( O.blinded )))
O.show_message(text("\red <B>The [M.name] glomps []!</B>", src), 1)
var/damage = rand(1, 3)
if(M.is_adult)
damage = rand(20, 40)
else
damage = rand(5, 35)
adjustBruteLoss(damage)
updatehealth()
return
/mob/living/carbon/alien/larva/attack_hand(mob/living/carbon/human/M as mob)
if (!ticker)
M << "You cannot attack people before the game has started."
return
if (istype(loc, /turf) && istype(loc.loc, /area/start))
M << "No attacking people at spawn, you jackass."
return
..()
switch(M.a_intent)
if ("help")
if (health > 0)
help_shake_act(M)
else
if (M.health >= -75.0)
if ((M.head && M.head.flags & 4) || (M.wear_mask && !( M.wear_mask.flags & 32 )) )
M << "\blue <B>Remove that mask!</B>"
return
var/obj/effect/equip_e/human/O = new /obj/effect/equip_e/human( )
O.source = M
O.target = src
O.s_loc = M.loc
O.t_loc = loc
O.place = "CPR"
requests += O
spawn( 0 )
O.process()
return
if ("grab")
if (M == src)
return
var/obj/item/weapon/grab/G = new /obj/item/weapon/grab( M, src )
M.put_in_active_hand(G)
grabbed_by += G
G.synch()
LAssailant = M
playsound(loc, 'sound/weapons/thudswoosh.ogg', 50, 1, -1)
for(var/mob/O in viewers(src, null))
if ((O.client && !( O.blinded )))
O.show_message(text("\red [] has grabbed [] passively!", M, src), 1)
if(..())
var/damage = rand(1, 9)
if (prob(90))
if (M_HULK in M.mutations)
damage += 5
spawn(0)
Paralyse(1)
step_away(src,M,15)
sleep(3)
step_away(src,M,15)
playsound(loc, "punch", 25, 1, -1)
add_logs(M, src, "attacked")
visible_message("<span class='danger'>[M] has kicked [src]!</span>", \
"<span class='userdanger'>[M] has kicked [src]!</span>")
if ((stat != DEAD) && (damage > 4.9))
Paralyse(rand(5,10))
adjustBruteLoss(damage)
updatehealth()
else
var/damage = rand(1, 9)
if (prob(90))
if (M_HULK in M.mutations)
damage += 5
spawn(0)
Paralyse(1)
step_away(src,M,15)
sleep(3)
step_away(src,M,15)
playsound(loc, "punch", 25, 1, -1)
for(var/mob/O in viewers(src, null))
if ((O.client && !( O.blinded )))
O.show_message(text("\red <B>[] has punched []!</B>", M, src), 1)
if (damage > 4.9)
Weaken(rand(10,15))
for(var/mob/O in viewers(M, null))
if ((O.client && !( O.blinded )))
O.show_message(text("\red <B>[] has weakened []!</B>", M, src), 1, "\red You hear someone fall.", 2)
adjustBruteLoss(damage)
updatehealth()
else
playsound(loc, 'sound/weapons/punchmiss.ogg', 25, 1, -1)
for(var/mob/O in viewers(src, null))
if ((O.client && !( O.blinded )))
O.show_message(text("\red <B>[] has attempted to punch []!</B>", M, src), 1)
return
playsound(loc, 'sound/weapons/punchmiss.ogg', 25, 1, -1)
visible_message("<span class='danger'>[M] has attempted to kick [src]!</span>", \
"<span class='userdanger'>[M] has attempted to kick [src]!</span>")
/mob/living/carbon/alien/larva/attack_alien(mob/living/carbon/alien/humanoid/M as mob)
if (!ticker)
M << "You cannot attack people before the game has started."
return
if (istype(loc, /turf) && istype(loc.loc, /area/start))
M << "No attacking people at spawn, you jackass."
return
..()
switch(M.a_intent)
if ("help")
sleeping = max(0,sleeping-5)
resting = 0
AdjustParalysis(-3)
AdjustStunned(-3)
AdjustWeakened(-3)
for(var/mob/O in viewers(src, null))
if ((O.client && !( O.blinded )))
O.show_message(text("\blue [M.name] nuzzles [] trying to wake it up!", src), 1)
else
if (health > 0)
playsound(loc, 'sound/weapons/bite.ogg', 50, 1, -1)
var/damage = rand(1, 3)
for(var/mob/O in viewers(src, null))
if ((O.client && !( O.blinded )))
O.show_message(text("\red <B>[M.name] has bit []!</B>", src), 1)
adjustBruteLoss(damage)
updatehealth()
else
M << "\green <B>[name] is too injured for that.</B>"
return
/mob/living/carbon/alien/larva/restrained()
+138 -291
View File
@@ -1,16 +1,12 @@
//This file was auto-corrected by findeclaration.exe on 25.5.2012 20:42:32
/mob/living/carbon/alien/larva
var/temperature_alert = 0
/mob/living/carbon/alien/larva/Life()
set invisibility = 0
//set background = 1
if (monkeyizing)
return
set background = BACKGROUND_ENABLED
..()
var/datum/gas_mixture/enviroment = loc.return_air()
@@ -61,309 +57,160 @@
if(client)
handle_regular_hud_updates()
/mob/living/carbon/alien/larva/proc/handle_regular_status_updates()
updatehealth()
/mob/living/carbon/alien/larva
proc/breathe()
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 < 0)
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 = 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)
handle_breath(breath)
if(breath)
loc.assume_air(breath)
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 (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
else
toxins_alert = 0
//Breathe in toxins and out oxygen
breath.toxins -= toxins_used
breath.oxygen += toxins_used
if(breath.temperature > (T0C+66) && !(M_RESIST_HEAT in mutations)) // Hot air hurts :(
if(prob(20))
src << "\red You feel a searing heat in your lungs!"
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(M_FAT in mutations)
if(nutrition < 100)
if(prob(round((50 - nutrition) / 100)))
src << "\blue You feel fit again!"
mutations.Add(M_FAT)
else
if(nutrition > 500)
if(prob(5 + round((nutrition - max_grown) / 2)))
src << "\red You suddenly feel blubbery!"
mutations.Add(M_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
if(stat == DEAD) //DEAD. BROWN BREAD. SWIMMING WITH THE SPESS CARP
blinded = 1
silent = 0
else //ALIVE. LIGHTS ARE ON
if(health < -25 || brain_op_stage == 4.0)
death()
blinded = 1
silent = 0
else //ALIVE. LIGHTS ARE ON
if(health < -25 || brain_op_stage == 4.0)
death()
blinded = 1
silent = 0
return 1
return 1
//UNCONSCIOUS. NO-ONE IS HOME
if( (getOxyLoss() > 25) || (0 > 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() > 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
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))
/* 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.
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.
ear_damage = max(ear_damage-0.05, 0)
//Other
handle_statuses()
return 1
//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()
/mob/living/carbon/alien/larva/proc/handle_regular_hud_updates()
if (stat == 2 || (M_XRAY in mutations))
sight |= SEE_TURFS
sight |= SEE_MOBS
sight |= SEE_OBJS
if (stat == 2 || (M_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
if(nightvision)
see_in_dark = 8
see_invisible = SEE_INVISIBLE_LEVEL_TWO
else if (stat != 2)
sight |= SEE_MOBS
sight &= ~SEE_TURFS
sight &= ~SEE_OBJS
see_invisible = SEE_INVISIBLE_MINIMUM
else if(!nightvision)
see_in_dark = 4
see_invisible = SEE_INVISIBLE_LEVEL_TWO
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) pullin.icon_state = "pull[pulling ? 1 : 0]"
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.
if (client)
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
see_invisible = 45
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 && !client.adminobs)
reset_view(null)
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"
return 1
if(pullin)
if(pulling)
pullin.icon_state = "pull"
else
pullin.icon_state = "pull0"
proc/handle_random_events()
return
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.
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)
del(M)
continue
if(air_master.current_cycle%3==1)
if(!(M.status_flags & GODMODE))
M.adjustBruteLoss(5)
nutrition += 10
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
@@ -9,7 +9,7 @@
if (layer != TURF_LAYER+0.2)
layer = TURF_LAYER+0.2
src << text("\green You are now hiding.")
src << text("<span class='noticealien'>You are now hiding.</span>")
for(var/mob/O in oviewers(src, null))
if ((O.client && !( O.blinded )))
O << text("<B>[] scurries to the ground!</B>", src)
@@ -52,8 +52,9 @@
mind.transfer_to(new_xeno)
else
new_xeno.key = key
new_xeno.mind.name = new_xeno.name
del(src)
return
else
src << "\red You are not fully grown."
src << "<span class='warning'>You are not fully grown.</span>"
return
@@ -0,0 +1,130 @@
/mob/living/carbon/alien/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)
jitteriness = max(0, jitteriness - 5)
else
dizziness = max(0, dizziness - 1)
jitteriness = max(0, jitteriness - 1)
updatehealth()
return //TODO: DEFERRED
/mob/living/carbon/alien/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++
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
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)
handle_breath(breath)
if(breath)
loc.assume_air(breath)
/mob/living/carbon/alien/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
else
toxins_alert = 0
//Breathe in toxins and out oxygen
breath.toxins -= toxins_used
breath.oxygen += toxins_used
if(breath.temperature > (T0C+66) && !(M_RESIST_COLD 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/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(air_master.current_cycle%3==1)
if(!(M.status_flags & GODMODE))
M.adjustBruteLoss(5)
nutrition += 10
@@ -1,5 +1,5 @@
/mob/living/carbon/alien/verb/alien_ventcrawl() // -- TLE
set name = "Crawl through vent(Alien)"
set name = "Crawl through vent (alien)"
set desc = "Enter an air vent and crawl through the pipe system."
set category = "Alien"
handle_ventcrawl()
@@ -1,7 +1,8 @@
// This is to replace the previous datum/disease/alien_embryo for slightly improved handling and maintainability
// It functions almost identically (see code/datums/diseases/alien_embryo.dm)
var/const/ALIEN_AFK_BRACKET = 450 // 45 seconds
/mob/living/carbon/alien/embryo
/obj/item/alien_embryo
name = "alien embryo"
desc = "All slimy and yuck."
icon = 'icons/mob/alien.dmi'
@@ -9,31 +10,28 @@
var/mob/living/affected_mob
var/stage = 0
/mob/living/carbon/alien/embryo/New()
..()
/obj/item/alien_embryo/New()
if(istype(loc, /mob/living))
affected_mob = loc
affected_mob.status_flags |= XENO_HOST
processing_objects.Add(src)
spawn(0)
AddInfectionImages(affected_mob)
// if(name == "alien embryo")
// name = "alien embryo ([rand(1, 1000)])"
real_name = name
regenerate_icons()
else
del(src)
qdel(src)
/mob/living/carbon/alien/embryo/Destroy()
/obj/item/alien_embryo/Destroy()
if(affected_mob)
affected_mob.status_flags &= ~(XENO_HOST)
spawn(0)
RemoveInfectionImages(affected_mob)
..()
/mob/living/carbon/alien/embryo/Life()
..()
/obj/item/alien_embryo/process()
if(!affected_mob) return
if(loc != affected_mob)
affected_mob.status_flags &= ~(XENO_HOST)
processing_objects.Remove(src)
spawn(0)
RemoveInfectionImages(affected_mob)
affected_mob = null
@@ -51,48 +49,72 @@
if(prob(1))
affected_mob.emote("cough")
if(prob(1))
affected_mob << "\red Your throat feels sore."
affected_mob << "<span class='danger'>Your throat feels sore.</span>"
if(prob(1))
affected_mob << "\red Mucous runs down the back of your throat."
affected_mob << "<span class='danger'>Mucous runs down the back of your throat.</span>"
if(4)
if(prob(1))
affected_mob.emote("sneeze")
if(prob(1))
affected_mob.emote("cough")
if(prob(2))
affected_mob << "\red Your muscles ache."
affected_mob << "<span class='danger'>Your muscles ache.</span>"
if(prob(20))
affected_mob.take_organ_damage(1)
if(prob(2))
affected_mob << "\red Your stomach hurts."
affected_mob << "<span class='danger'>Your stomach hurts.</span>"
if(prob(20))
affected_mob.adjustToxLoss(1)
affected_mob.updatehealth()
if(5)
affected_mob << "\red You feel something tearing its way out of your stomach..."
affected_mob << "<span class='danger'>You feel something tearing its way out of your stomach...</span>"
affected_mob.adjustToxLoss(10)
affected_mob.updatehealth()
if(prob(50))
AttemptGrow()
/obj/item/alien_embryo/proc/AttemptGrow(var/gib_on_success = 1)
var/list/candidates = get_candidates(BE_ALIEN, ALIEN_AFK_BRACKET)
var/client/C = null
/mob/living/carbon/alien/embryo/proc/AttemptGrow(var/gib_on_success = 1)
// To stop clientless larva, we will check that our host has a client
// if we find no ghosts to become the alien. If the host has a client
// he will become the alien but if he doesn't then we will set the stage
// to 2, so we don't do a process heavy check everytime.
affected_mob.overlays += image('icons/mob/alien.dmi', loc = affected_mob, icon_state = "burst_stand")
if(candidates.len)
C = pick(candidates)
else if(affected_mob.client)
C = affected_mob.client
else
stage = 4 // Let's try again later.
return
if(affected_mob.lying)
affected_mob.overlays += image('icons/mob/alien.dmi', loc = affected_mob, icon_state = "burst_lie")
else
affected_mob.overlays += image('icons/mob/alien.dmi', loc = affected_mob, icon_state = "burst_stand")
spawn(6)
var/mob/living/carbon/alien/larva/new_xeno = new(affected_mob.loc)
new_xeno.key = key
new_xeno.key = C.key
if(ticker && ticker.mode)
ticker.mode.xenos += new_xeno.mind
new_xeno.mind.name = new_xeno.name
new_xeno.mind.assigned_role = "MODE"
new_xeno.mind.special_role = "Alien"
new_xeno << sound('sound/voice/hiss5.ogg',0,0,0,100) //To get the player's attention
if(gib_on_success)
affected_mob.gib()
del(src)
if(istype(new_xeno.loc,/mob/living/carbon))
var/mob/living/carbon/digester = new_xeno.loc
digester.stomach_contents += new_xeno
qdel(src)
/*----------------------------------------
Proc: RefreshInfectionImage()
Des: Removes the current icons located in the infected mob adds the current stage
----------------------------------------*/
/mob/living/carbon/alien/embryo/proc/RefreshInfectionImage()
/obj/item/alien_embryo/proc/RefreshInfectionImage()
RemoveInfectionImages()
AddInfectionImages()
@@ -100,21 +122,19 @@ Des: Removes the current icons located in the infected mob adds the current stag
Proc: AddInfectionImages(C)
Des: Adds the infection image to all aliens for this embryo
----------------------------------------*/
/mob/living/carbon/alien/embryo/AddInfectionImages()
/obj/item/alien_embryo/proc/AddInfectionImages()
for(var/mob/living/carbon/alien/alien in player_list)
if(alien.client)
var/I = image('icons/mob/alien.dmi', loc = src.loc, icon_state = "infected[stage]")
var/I = image('icons/mob/alien.dmi', loc = affected_mob, icon_state = "infected[stage]")
alien.client.images += I
/*----------------------------------------
Proc: RemoveInfectionImage(C)
Des: Removes all images from the mob infected by this embryo
----------------------------------------*/
/mob/living/carbon/alien/embryo/RemoveInfectionImages()
/obj/item/alien_embryo/proc/RemoveInfectionImages()
for(var/mob/living/carbon/alien/alien in player_list)
if(alien.client)
for(var/image/I in alien.client.images)
if(dd_hasprefix_case(I.icon_state, "infected") && I.loc == loc)
del(I)
if(dd_hasprefix_case(I.icon_state, "infected") && I.loc == affected_mob)
del(I)
@@ -8,315 +8,248 @@ var/const/MAX_IMPREGNATION_TIME = 150
var/const/MIN_ACTIVE_TIME = 200 //time between being dropped and going idle
var/const/MAX_ACTIVE_TIME = 400
/obj/item/weapon/holder/facehugger
name = "facehugger"
/obj/item/clothing/mask/facehugger
name = "alien"
desc = "It has some sort of a tube at the end of its tail."
icon = 'icons/mob/alien.dmi'
icon_state = "facehugger"
item_state = "facehugger"
origin_tech = "magnets=3;biotech=5"
w_class = 1
flags = FPRINT | TABLEPASS | MASKCOVERSMOUTH | MASKCOVERSEYES | MASKINTERNALS
body_parts_covered = HEAD
slot_flags = SLOT_MASK
w_class = 1 //note: can be picked up by aliens unlike most other items of w_class below 4
flags = MASKCOVERSMOUTH | MASKCOVERSEYES | MASKINTERNALS
throw_range = 5
/*
/obj/item/weapon/holder/facehugger/throw_at(atom/target, range, speed)
var/stat = CONSCIOUS //UNCONSCIOUS is the idle state in this case
var/sterile = 0
var/real = 1 //0 for the toy, 1 for real. Sure I could istype, but fuck that.
var/strength = 5
var/attached = 0
/obj/item/clothing/mask/facehugger/attack_alien(user as mob) //can be picked up by aliens
attack_hand(user)
return
/obj/item/clothing/mask/facehugger/attack_hand(user as mob)
if((stat == CONSCIOUS && !sterile) && !isalien(user))
Attach(user)
return
else
..()
return
/obj/item/clothing/mask/facehugger/attack(mob/living/M as mob, mob/user as mob)
..()
icon_state = "[initial(icon_state)]_thrown"
spawn(15)
if(icon_state == "[initial(icon_state)]_thrown")
icon_state = "[initial(icon_state)]"
user.before_take_item(src)
Attach(M)
/obj/item/clothing/mask/facehugger/examine(mob/user)
..()
if(!real)//So that giant red text about probisci doesn't show up.
return
switch(stat)
if(DEAD,UNCONSCIOUS)
user << "<span class='userdanger'>[src] is not moving.</span>"
if(CONSCIOUS)
user << "<span class='userdanger'>[src] seems to be active!</span>"
if (sterile)
user << "<span class='userdanger'>It looks like the proboscis has been removed.</span>"
/obj/item/weapon/holder/facehugger/throw_impact(atom/hit_atom)
/obj/item/clothing/mask/facehugger/attackby(var/obj/item/O,var/mob/m)
if(O.force)
Die()
return
/obj/item/clothing/mask/facehugger/bullet_act(var/obj/item/projectile/P)
if(P.damage)
Die()
return
/obj/item/clothing/mask/facehugger/fire_act(datum/gas_mixture/air, exposed_temperature, exposed_volume)
if(exposed_temperature > 300)
Die()
return
/obj/item/clothing/mask/facehugger/equipped(mob/M)
Attach(M)
/obj/item/clothing/mask/facehugger/Crossed(atom/target)
HasProximity(target)
return
/obj/item/clothing/mask/facehugger/on_found(mob/finder as mob)
if(stat == CONSCIOUS)
return HasProximity(finder)
return 0
/obj/item/clothing/mask/facehugger/HasProximity(atom/movable/AM as mob|obj)
if(CanHug(AM))
return Attach(AM)
return 0
/obj/item/clothing/mask/facehugger/throw_at(atom/target, range, speed)
if(!..())
return
if(stat == CONSCIOUS)
icon_state = "[initial(icon_state)]_thrown"
spawn(15)
if(icon_state == "[initial(icon_state)]_thrown")
icon_state = "[initial(icon_state)]"
/obj/item/clothing/mask/facehugger/throw_impact(atom/hit_atom)
..()
if(stat == CONSCIOUS)
icon_state = "[initial(icon_state)]"
Attach(hit_atom)
*/
/mob/living/carbon/alien/facehugger
name = "alien facehugger"
desc = "It has some sort of a tube at the end of its tail."
icon = 'icons/mob/alien.dmi'
icon_state = "facehugger"
flags = FPRINT | TABLEPASS
throw_range = 5
maxHealth = 5
health = 5
density = 0 // Avoiding Facehugger clusterfucks at the egg room.
var/strength=5
var/sterile = 0
var/attached = 0
var/icon_dead = "facehugger_dead"
/mob/living/carbon/alien/facehugger/New()
if(aliens_allowed)
// if(name == "alien facehugger")
// name = "alien facehugger ([rand(1, 1000)])"
real_name = name
regenerate_icons()
..()
else
del(src)
/mob/living/carbon/alien/facehugger/attack_hand(mob/living/carbon/M as mob)
//Let people pick the little buggers up.
if(istype(M,/mob/living/carbon/alien/humanoid))
var/mob/living/carbon/alien/humanoid/H = M
if(H.a_intent == "help")
var/obj/item/weapon/holder/facehugger/F = new(loc)
src.loc = F
F.name = loc.name
F.attack_hand(H)
H << "You scoop up [src]."
src << "[H] scoops you up."
return
else if(istype(M,/mob/living/carbon/human))
if(stat == CONSCIOUS && !sterile)
Attach(M)
return
else
..()
return
..()
/mob/living/carbon/alien/facehugger/UnarmedAttack(var/atom/A)
return
/mob/living/carbon/alien/facehugger/examine()
..()
switch(stat)
if(DEAD,UNCONSCIOUS)
usr << "\red \b [src] is not moving."
if(CONSCIOUS)
usr << "\red \b [src] seems to be active."
if (sterile)
usr << "\red \b It looks like the proboscis has been removed."
return
/mob/living/carbon/alien/facehugger/verb/hide()
set name = "Hide"
set desc = "Allows to hide beneath tables or certain items. Toggled on or off."
set category = "Alien"
if(stat != CONSCIOUS)
return
if (layer != TURF_LAYER+0.2)
layer = TURF_LAYER+0.2
src << text("\green You are now hiding.")
for(var/mob/O in oviewers(src, null))
if ((O.client && !( O.blinded )))
O << text("<B>[] scurries to the ground!</B>", src)
else
layer = MOB_LAYER
src << text("\green You have stopped hiding.")
for(var/mob/O in oviewers(src, null))
if ((O.client && !( O.blinded )))
O << text("[] slowly peaks up from the ground...", src)
/mob/living/carbon/alien/facehugger/verb/Attach()
set name = "Facehug"
set desc = "Allows you to molest someone's mouth-hole in the hope of impregnating them with an embryo."
set category = "Alien"
var/list/choices = list()
for(var/mob/living/L in view(1,src))
if(L.stat != 2 && !istype(L,/mob/living/carbon/alien) && src.Adjacent(L))
choices += L
var/mob/living/M = pick(choices)
if(!M || !src) return
if(!(src.Adjacent(M))) return
/obj/item/clothing/mask/facehugger/proc/Attach(M as mob)
if( (!iscorgi(M) && !iscarbon(M)) || isalien(M))
return
return 0
if(attached)
return
return 0
else
attached++
spawn(MAX_IMPREGNATION_TIME)
attached = 0
attached++
spawn(MAX_IMPREGNATION_TIME)
attached = 0
var/mob/living/L = M //just so I don't need to use :
if(loc == M) return
if(stat != CONSCIOUS) return
if(!sterile) M.take_organ_damage(strength,0) //done here so that even borgs and humans in helmets take damage
if(loc == L) return 0
if(stat != CONSCIOUS) return 0
if(locate(/obj/item/alien_embryo) in L) return 0
if(!sterile) L.take_organ_damage(strength,0) //done here so that even borgs and humans in helmets take damage
M.visible_message("\red \b [src] leaps at [M]'s face!")
L.visible_message("<span class='userdanger'>[src] leaps at [L]'s face!</span>")
if(ishuman(M))
var/mob/living/carbon/human/H = M
if(ishuman(L))
var/mob/living/carbon/human/H = L
if(H.head && H.head.flags & HEADCOVERSMOUTH)
H.visible_message("\red \b [src] smashes against [H]'s [H.head]!")
death()
return
H.visible_message("<span class='userdanger'>[src] smashes against [H]'s [H.head]!</span>")
Die()
return 0
if(iscarbon(M))
var/mob/living/carbon/target = M
var/mob/living/carbon/target = L
if(target.wear_mask)
if(prob(20)) return
if(prob(20)) return 0
var/obj/item/clothing/W = target.wear_mask
if(!W.canremove) return
target.drop_from_inventory(W)
target.before_take_item(W)
target.visible_message("\red \b [src] tears [W] off of [target]'s face!")
target.visible_message("<span class='danger'>[src] tears [W] off of [target]'s face!</span>", \
"<span class='userdanger'>[src] tears [W] off of [target]'s face!</span>")
var/obj/item/weapon/holder/facehugger/FH = new(loc)
src.loc = FH
FH.name = loc.name
target.equip_to_slot(FH, slot_wear_mask)
target.regenerate_icons()
if(!sterile) M.Paralyse(MAX_IMPREGNATION_TIME/6) //something like 25 ticks = 20 seconds with the default settings
src.loc = target
target.equip_to_slot(src, slot_wear_mask,,0)
if(!sterile) L.Paralyse(MAX_IMPREGNATION_TIME/6) //something like 25 ticks = 20 seconds with the default settings
else if (iscorgi(M))
var/mob/living/simple_animal/corgi/C = M
var/obj/item/weapon/holder/facehugger/FH = new(loc)
src.loc = FH
FH.name = loc.name
FH.loc = C
C.facehugger = FH
C.wear_mask = FH
C.regenerate_icons()
loc = C
C.facehugger = src
GoIdle() //so it doesn't jump the people that tear it off
spawn(rand(MIN_IMPREGNATION_TIME,MAX_IMPREGNATION_TIME))
Impregnate(M)
Impregnate(L)
return
return 1
/mob/living/carbon/alien/facehugger/proc/Impregnate(mob/living/target as mob)
if(!target || !target.wear_mask || (!src in target.wear_mask.contents) || target.stat == DEAD || target.status_flags & XENO_HOST) //was taken off or something
/obj/item/clothing/mask/facehugger/proc/Impregnate(mob/living/target as mob)
if(!target || target.stat == DEAD) //was taken off or something
return
if(iscarbon(target))
var/mob/living/carbon/C = target
if(C.wear_mask != src)
return
if(ishuman(target))
var/mob/living/carbon/human/H = target
if((H.species.flags & IS_SYNTHETIC))
return
if(!sterile)
//target.contract_disease(new /datum/disease/alien_embryo(0)) //so infection chance is same as virus infection chance
var/mob/living/carbon/alien/embryo/A = new /mob/living/carbon/alien/embryo(target)
target.status_flags |= XENO_HOST
target.visible_message("<span class='danger'>[src] falls limp after violating [target]'s face!</span>", \
"<span class='userdanger'>[src] falls limp after violating [target]'s face!</span>")
loc = get_turf(target.loc)
death()
Die()
icon_state = "[initial(icon_state)]_impregnated"
target.visible_message("\red \b [src] falls limp after violating [target]'s face!")
A.key = src.key
if(!(target.status_flags & XENO_HOST))
new /obj/item/alien_embryo(target)
if(iscorgi(target))
var/mob/living/simple_animal/corgi/C = target
src.loc = get_turf(C)
C.facehugger = null
else
target.visible_message("\red \b [src] violates [target]'s face!")
target.visible_message("<span class='danger'>[src] violates [target]'s face!</span>", \
"<span class='userdanger'>[src] violates [target]'s face!</span>")
return
/obj/item/clothing/mask/facehugger/proc/GoActive()
if(stat == DEAD || stat == CONSCIOUS)
return
stat = CONSCIOUS
icon_state = "[initial(icon_state)]"
/* for(var/mob/living/carbon/alien/alien in world)
var/image/activeIndicator = image('icons/mob/alien.dmi', loc = src, icon_state = "facehugger_active")
activeIndicator.override = 1
if(alien && alien.client)
alien.client.images += activeIndicator */
return
/obj/item/clothing/mask/facehugger/proc/GoIdle()
if(stat == DEAD || stat == UNCONSCIOUS)
return
/* RemoveActiveIndicators() */
stat = UNCONSCIOUS
icon_state = "[initial(icon_state)]_inactive"
spawn(rand(MIN_ACTIVE_TIME,MAX_ACTIVE_TIME))
GoActive()
return
/obj/item/clothing/mask/facehugger/proc/Die()
if(stat == DEAD)
return
/* RemoveActiveIndicators() */
icon_state = "[initial(icon_state)]_dead"
stat = DEAD
src.visible_message("<span class='userdanger'>[src] curls up into a ball!</span>")
return
/proc/CanHug(var/mob/M)
if(M.stat == DEAD)
return 0
if(iscorgi(M))
if(iscorgi(M) || ismonkey(M))
return 1
if(!iscarbon(M) || isalien(M))
return 0
var/mob/living/carbon/C = M
if(ishuman(C))
var/mob/living/carbon/human/H = C
if(H.head && H.head.flags & HEADCOVERSMOUTH)
return 0
return 1
return 1
return 0
/mob/living/carbon/alien/facehugger/Login()
..()
sleeping = 0
/obj/item/clothing/mask/facehugger/lamarr
name = "Lamarr"
desc = "The worst she might do is attempt to... couple with your head."//hope we don't get sued over a harmless reference, rite?
sterile = 1
gender = FEMALE
/mob/living/carbon/alien/facehugger/death(gibbed)
icon_state = icon_dead
return ..(gibbed)
/mob/living/carbon/alien/facehugger/Life()
..()
//Status updates, death etc.
handle_regular_status_updates()
/mob/living/carbon/alien/facehugger/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 <= 0 || brain_op_stage == 4.0)
death()
blinded = 1
silent = 0
return 1
//UNCONSCIOUS. NO-ONE IS HOME
if( (getOxyLoss() > 5) || (0 > 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 < 5) //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) //before you get mad Rockdtben: I done this so update_canmove isn't called multiple times
if(stuttering)
stuttering = max(stuttering-1, 0)
if(silent)
silent = max(silent-1, 0)
if(druggy)
druggy = max(druggy-1, 0)
return 1
/obj/item/clothing/mask/facehugger/lamarr/New()//to prevent deleting it if aliums are disabled
return
+106 -103
View File
@@ -17,119 +17,122 @@
mecha = null//This does not appear to be used outside of reference in mecha.dm.
attack_self(mob/user as mob)
if(brainmob && !brainmob.key && searching == 0)
//Start the process of searching for a new user.
user << "\blue You carefully locate the manual activation switch and start the positronic brain's boot process."
icon_state = "posibrain-searching"
ghost_volunteers.Cut()
src.searching = 1
src.request_player()
spawn(600)
if(ghost_volunteers.len)
var/mob/dead/observer/O = pick(ghost_volunteers)
if(istype(O) && O.client && O.key)
transfer_personality(O)
reset_search()
/obj/item/device/mmi/posibrain/attack_self(mob/user as mob)
if(brainmob && !brainmob.key && searching == 0)
//Start the process of searching for a new user.
user << "\blue You carefully locate the manual activation switch and start the positronic brain's boot process."
icon_state = "posibrain-searching"
ghost_volunteers.Cut()
src.searching = 1
src.request_player()
spawn(600)
if(ghost_volunteers.len)
var/mob/dead/observer/O = pick(ghost_volunteers)
if(istype(O) && O.client && O.key)
transfer_personality(O)
reset_search()
proc/request_player()
for(var/mob/dead/observer/O in player_list)
if(O.client && O.client.prefs.be_special & BE_PAI)
if(check_observer(O))
O << "\blue <b>\A [src] has been activated. (<a href='?src=\ref[O];jump=\ref[src]'>Teleport</a> | <a href='?src=\ref[src];signup=\ref[O]'>Sign Up</a>)"
//question(O.client)
/obj/item/device/mmi/posibrain/proc/request_player()
for(var/mob/dead/observer/O in player_list)
if(O.client && O.client.prefs.be_special & BE_PAI)
if(check_observer(O))
O << "\blue <b>\A [src] has been activated. (<a href='?src=\ref[O];jump=\ref[src]'>Teleport</a> | <a href='?src=\ref[src];signup=\ref[O]'>Sign Up</a>)"
//question(O.client)
proc/check_observer(var/mob/dead/observer/O)
if(O.has_enabled_antagHUD == 1 && config.antag_hud_restricted)
return 0
if(jobban_isbanned(O, "pAI"))
return 0
if(O.client)
return 1
/obj/item/device/mmi/posibrain/proc/check_observer(var/mob/dead/observer/O)
if(O.has_enabled_antagHUD == 1 && config.antag_hud_restricted)
return 0
if(jobban_isbanned(O, "pAI"))
return 0
if(O.client)
return 1
return 0
proc/question(var/client/C)
spawn(0)
if(!C) return
var/response = alert(C, "Someone is requesting a personality for a positronic brain. Would you like to play as one?", "Positronic brain request", "Yes", "No", "Never for this round")
if(!C || brainmob.key || 0 == searching) return //handle logouts that happen whilst the alert is waiting for a response, and responses issued after a brain has been located.
if(response == "Yes")
transfer_personality(C.mob)
else if (response == "Never for this round")
C.prefs.be_special ^= BE_PAI
/obj/item/device/mmi/posibrain/proc/question(var/client/C)
spawn(0)
if(!C) return
var/response = alert(C, "Someone is requesting a personality for a positronic brain. Would you like to play as one?", "Positronic brain request", "Yes", "No", "Never for this round")
if(!C || brainmob.key || 0 == searching) return //handle logouts that happen whilst the alert is waiting for a response, and responses issued after a brain has been located.
if(response == "Yes")
transfer_personality(C.mob)
else if (response == "Never for this round")
C.prefs.be_special ^= BE_PAI
transfer_identity(var/mob/living/carbon/H)
name = "positronic brain ([H])"
brainmob.name = H.real_name
brainmob.real_name = H.real_name
brainmob.dna = H.dna
brainmob.timeofhostdeath = H.timeofdeath
brainmob.stat = 0
if(brainmob.mind)
brainmob.mind.assigned_role = "Positronic Brain"
if(H.mind)
H.mind.transfer_to(brainmob)
brainmob << "\blue You feel slightly disoriented. That's normal when you're just a metal cube."
icon_state = "posibrain-occupied"
/obj/item/device/mmi/posibrain/transfer_identity(var/mob/living/carbon/H)
name = "positronic brain ([H])"
brainmob.name = H.real_name
brainmob.real_name = H.real_name
brainmob.dna = H.dna
brainmob.timeofhostdeath = H.timeofdeath
brainmob.stat = 0
if(brainmob.mind)
brainmob.mind.assigned_role = "Positronic Brain"
if(H.mind)
H.mind.transfer_to(brainmob)
brainmob << "\blue You feel slightly disoriented. That's normal when you're just a metal cube."
icon_state = "posibrain-occupied"
return
/obj/item/device/mmi/posibrain/proc/transfer_personality(var/mob/candidate)
src.searching = 0
src.brainmob.mind = candidate.mind
//src.brainmob.key = candidate.key
src.brainmob.ckey = candidate.ckey
src.name = "positronic brain ([src.brainmob.name])"
src.brainmob << "<b>You are a positronic brain, brought into existence on [station_name()].</b>"
src.brainmob << "<b>As a synthetic intelligence, you answer to all crewmembers, as well as the AI.</b>"
src.brainmob << "<b>Remember, the purpose of your existence is to serve the crew and the station. Above all else, do no harm.</b>"
src.brainmob << "<b>Use say :b to speak to other artificial intelligences.</b>"
src.brainmob.mind.assigned_role = "Positronic Brain"
var/turf/T = get_turf_or_move(src.loc)
for (var/mob/M in viewers(T))
M.show_message("\blue The positronic brain chimes quietly.")
icon_state = "posibrain-occupied"
/obj/item/device/mmi/posibrain/proc/reset_search() //We give the players sixty seconds to decide, then reset the timer.
if(src.brainmob && src.brainmob.key) return
src.searching = 0
icon_state = "posibrain"
var/turf/T = get_turf_or_move(src.loc)
for (var/mob/M in viewers(T))
M.show_message("\blue The positronic brain buzzes quietly, and the golden lights fade away. Perhaps you could try again?")
/obj/item/device/mmi/posibrain/Topic(href,href_list)
if("signup" in href_list)
var/mob/dead/observer/O = locate(href_list["signup"])
if(!O) return
volunteer(O)
/obj/item/device/mmi/posibrain/proc/volunteer(var/mob/dead/observer/O)
if(!searching)
O << "Not looking for a ghost, yet."
return
proc/transfer_personality(var/mob/candidate)
src.searching = 0
src.brainmob.mind = candidate.mind
//src.brainmob.key = candidate.key
src.brainmob.ckey = candidate.ckey
src.name = "positronic brain ([src.brainmob.name])"
src.brainmob << "<b>You are a positronic brain, brought into existence on [station_name()].</b>"
src.brainmob << "<b>As a synthetic intelligence, you answer to all crewmembers, as well as the AI.</b>"
src.brainmob << "<b>Remember, the purpose of your existence is to serve the crew and the station. Above all else, do no harm.</b>"
src.brainmob << "<b>Use say :b to speak to other artificial intelligences.</b>"
src.brainmob.mind.assigned_role = "Positronic Brain"
var/turf/T = get_turf_or_move(src.loc)
for (var/mob/M in viewers(T))
M.show_message("\blue The positronic brain chimes quietly.")
icon_state = "posibrain-occupied"
proc/reset_search() //We give the players sixty seconds to decide, then reset the timer.
if(src.brainmob && src.brainmob.key) return
src.searching = 0
icon_state = "posibrain"
var/turf/T = get_turf_or_move(src.loc)
for (var/mob/M in viewers(T))
M.show_message("\blue The positronic brain buzzes quietly, and the golden lights fade away. Perhaps you could try again?")
Topic(href,href_list)
if("signup" in href_list)
var/mob/dead/observer/O = locate(href_list["signup"])
if(!O) return
volunteer(O)
proc/volunteer(var/mob/dead/observer/O)
if(!searching)
O << "Not looking for a ghost, yet."
return
if(!istype(O))
O << "\red NO."
return
if(O in ghost_volunteers)
O << "\blue Removed from registration list."
ghost_volunteers.Remove(O)
return
if(!check_observer(O))
O << "\red You cannot be \a [src]."
return
O.<< "\blue You've been added to the list of ghosts that may become this [src]. Click again to unvolunteer."
ghost_volunteers.Add(O)
if(!istype(O))
O << "\red Error."
return
if(O in ghost_volunteers)
O << "\blue Removed from registration list."
ghost_volunteers.Remove(O)
return
if(!check_observer(O))
O << "\red You cannot be \a [src]."
return
if(O.has_enabled_antagHUD == 1 && config.antag_hud_restricted)
O << "\red Upon using the antagHUD you forfeited the ability to join the round."
return
if(jobban_isbanned(O, "pAI"))
O << "\red You are job banned from this role."
return
O.<< "\blue You've been added to the list of ghosts that may become this [src]. Click again to unvolunteer."
ghost_volunteers.Add(O)
/obj/item/device/mmi/posibrain/examine()
set src in oview()
if(!usr || !src) return
+5
View File
@@ -187,6 +187,11 @@
if(status == "")
status = "OK"
src.show_message(text("\t []My [] is [].",status=="OK"?"\blue ":"\red ",org.display_name,status),1)
if(staminaloss)
if(staminaloss > 30)
src << "<span class='info'>You're completely exhausted.</span>"
else
src << "<span class='info'>You feel fatigued.</span>"
if((SKELETON in H.mutations) && (!H.w_uniform) && (!H.wear_suit))
H.play_xylophone()
else if(lying) // /vg/: For hugs. This is how update_icon figgers it out, anyway. - N3X15
@@ -19,3 +19,5 @@
var/pose = null
var/pulse = PULSE_NORM //current pulse level
var/list/internal_organs = list() //List of /obj/item/organ in the mob. they don't go in the contents.
+1 -40
View File
@@ -525,43 +525,4 @@
src.hud_used.hotkey_ui_hidden = 0
else
client.screen -= src.hud_used.hotkeybuttons
src.hud_used.hotkey_ui_hidden = 1
/mob/living/carbon/human/update_action_buttons()
var/num = 1
if(!src.hud_used) return
if(!src.client) return
if(!hud_used.hud_shown) //Hud toggled to minimal
return
src.client.screen -= src.hud_used.item_action_list
hud_used.item_action_list = list()
for(var/obj/item/I in src)
if(I.icon_action_button)
var/obj/screen/item_action/A = new(src.hud_used)
A.icon = 'icons/mob/screen1_action.dmi'
A.icon_state = I.icon_action_button
if(I.action_button_name)
A.name = I.action_button_name
else
A.name = "Use [I.name]"
A.owner = I
hud_used.item_action_list += A
switch(num)
if(1)
A.screen_loc = ui_action_slot1
if(2)
A.screen_loc = ui_action_slot2
if(3)
A.screen_loc = ui_action_slot3
if(4)
A.screen_loc = ui_action_slot4
if(5)
A.screen_loc = ui_action_slot5
break //5 slots available, so no more can be added.
num++
src.client.screen += src.hud_used.item_action_list
src.hud_used.hotkey_ui_hidden = 1
+16 -8
View File
@@ -46,7 +46,6 @@
/mob/living/carbon/human/slime/New(var/new_loc)
..(new_loc, "Slime People")
verbs += /mob/living/carbon/human/slime/proc/slimepeople_ventcrawl
/mob/living/carbon/human/grey/New(var/new_loc)
..(new_loc, "Grey")
@@ -391,7 +390,7 @@
var/dam_zone = pick("chest", "l_hand", "r_hand", "l_leg", "r_leg")
var/datum/organ/external/affecting = get_organ(ran_zone(dam_zone))
var/armor = run_armor_check(affecting, "melee")
var/datum/organ/external/affected = src.get_organ(dam_zone)
affected.add_autopsy_data(M.name, damage) // Add the mob's name to the autopsy data
apply_damage(damage, BRUTE, affecting, armor, M.name)
@@ -483,6 +482,10 @@
/mob/living/carbon/human/show_inv(mob/user as mob)
var/obj/item/clothing/under/suit = null
if (istype(w_uniform, /obj/item/clothing/under))
suit = w_uniform
var/obj/item/clothing/gloves/G
var/pickpocket = 0
if(ishuman(user))
@@ -502,19 +505,21 @@
<BR><B>Right Ear:</B> <A href='?src=\ref[src];item=r_ear'>[(r_ear ? r_ear : "Nothing")]</A>
<BR><B>Head:</B> <A href='?src=\ref[src];item=head'>[(head ? head : "Nothing")]</A>
<BR><B>Shoes:</B> <A href='?src=\ref[src];item=shoes'>[(shoes ? shoes : "Nothing")]</A>
<BR><B>Belt:</B> <A href='?src=\ref[src];item=belt'>[(belt ? belt : "Nothing")]</A>
<BR><B>Uniform:</B> <A href='?src=\ref[src];item=uniform'>[(w_uniform ? w_uniform : "Nothing")]</A>
<BR><B>Belt:</B> <A href='?src=\ref[src];item=belt'>[(belt ? belt : "Nothing")]</A> [((istype(wear_mask, /obj/item/clothing/mask) && istype(belt, /obj/item/weapon/tank) && !( internal )) ? text(" <A href='?src=\ref[];item=internal'>Set Internal</A>", src) : "")]
<BR><B>Uniform:</B> <A href='?src=\ref[src];item=uniform'>[(w_uniform ? w_uniform : "Nothing")]</A> [(suit) ? ((suit.has_sensor == 1) ? text(" <A href='?src=\ref[];item=sensor'>Sensors</A>", src) : "") :]
<BR><B>(Exo)Suit:</B> <A href='?src=\ref[src];item=suit'>[(wear_suit ? wear_suit : "Nothing")]</A>
<BR><B>Back:</B> <A href='?src=\ref[src];item=back'>[(back ? back : "Nothing")]</A> [((istype(wear_mask, /obj/item/clothing/mask) && istype(back, /obj/item/weapon/tank) && !( internal )) ? text(" <A href='?src=\ref[];item=internal'>Set Internal</A>", src) : "")]
<BR><B>ID:</B> <A href='?src=\ref[src];item=id'>[(wear_id ? wear_id : "Nothing")]</A>
<BR><B>PDA:</B> <A href='?src=\ref[src];item=pda'>[(wear_pda ? wear_pda : "Nothing")]</A>
<BR><B>Suit Storage:</B> <A href='?src=\ref[src];item=s_store'>[(s_store ? s_store : "Nothing")]</A>
<BR>[(handcuffed ? text("<A href='?src=\ref[src];item=handcuff'>Handcuffed</A>") : text("<A href='?src=\ref[src];item=handcuff'>Not Handcuffed</A>"))]
<BR>[(legcuffed ? text("<A href='?src=\ref[src];item=legcuff'>Legcuffed</A>") : text(""))]
<BR>[(internal ? text("<A href='?src=\ref[src];item=internal'>Remove Internal</A>") : "")]
<BR><A href='?src=\ref[src];item=splints'>Remove Splints</A>
<BR><BR><A href='?src=\ref[src];pockets=left'>Left Pocket ([l_store ? (pickpocket ? l_store.name : "Full") : "Empty"])</A>
<BR><A href='?src=\ref[src];pockets=right'>Right Pocket ([r_store ? (pickpocket ? r_store.name : "Full") : "Empty"])</A>
<BR><A href='?src=\ref[src];item=pockets'>Empty Both Pockets</A>
<BR><BR>[(handcuffed ? text("<A href='?src=\ref[src];item=handcuff'>Handcuffed</A>") : text("<A href='?src=\ref[src];item=handcuff'>Not Handcuffed</A>"))]
<BR>[(legcuffed ? text("<A href='?src=\ref[src];item=legcuff'>Legcuffed</A>") : text(""))]
[(suit) ? ((suit.hastie) ? text("<BR><A href='?src=\ref[];item=tie'>Remove Accessory</A>", src) : "") :]
[(internal ? text("<BR><A href='?src=\ref[src];item=internal'>Remove Internal</A>") : "")]
<BR><A href='?src=\ref[src];item=splints'>Remove Splints</A>
<BR><A href='?src=\ref[user];refresh=1'>Refresh</A>
<BR><A href='?src=\ref[user];mach_close=mob\ref[src]'>Close</A>
<BR>"}
@@ -856,6 +861,9 @@
if(istype(usr,/mob/living/silicon/robot))
var/mob/living/silicon/robot/U = usr
R.fields[text("com_[counter]")] = text("Made by [U.name] ([U.modtype] [U.braintype]) on [time2text(world.realtime, "DDD MMM DD hh:mm:ss")], [game_year]<BR>[t1]")
if(istype(usr,/mob/living/silicon/ai))
var/mob/living/silicon/ai/U = usr
R.fields[text("com_[counter]")] = text("Made by [U.name] (artificial intelligence) on [time2text(world.realtime, "DDD MMM DD hh:mm:ss")], [game_year]<BR>[t1]")
if (href_list["medical"])
if(hasHUD(usr,"medical"))
@@ -39,20 +39,19 @@
apply_damage(damage, BRUTE, affecting, armor_block)
if (damage >= 25)
visible_message("\red <B>[M] has wounded [src]!</B>")
apply_effect(rand(0.5,3), WEAKEN, armor_block)
apply_effect(4, WEAKEN, armor_block)
updatehealth()
if("disarm")
if (prob(80))
var/randn = rand(1, 100)
if (randn <= 80)
playsound(loc, 'sound/weapons/pierce.ogg', 25, 1, -1)
Weaken(rand(0.5,3))
Weaken(5)
for(var/mob/O in viewers(src, null))
if ((O.client && !( O.blinded )))
O.show_message(text("\red <B>[] has tackled down []!</B>", M, src), 1)
if (prob(25))
M.Weaken(rand(2,4))
else
if (prob(80))
if (randn <= 99)
playsound(loc, 'sound/weapons/slash.ogg', 25, 1, -1)
drop_item()
visible_message(text("\red <B>[] disarmed []!</B>", M, src))
@@ -33,7 +33,7 @@
visible_message("\red <B>[M] has punched [src]!</B>")
apply_damage(damage, HALLOSS, affecting, armor_block)
apply_damage(damage, STAMINA, affecting, armor_block)
if(damage >= 9)
visible_message("\red <B>[M] has weakened [src]!</B>")
apply_effect(4, WEAKEN, armor_block)
@@ -139,13 +139,16 @@
playsound(loc, attack.attack_sound, 25, 1, -1)
visible_message("\red <B>[M] [pick(attack.attack_verb)]ed [src]!</B>")
//Rearranged, so claws don't increase weaken chance.
if(damage >= 5 && prob(50))
visible_message("\red <B>[M] has weakened [src]!</B>")
apply_effect(2, WEAKEN, armor_block)
damage += attack.damage
apply_damage(damage, BRUTE, affecting, armor_block, sharp=attack.sharp, edge=attack.edge)
apply_damage(damage, BRUTE, affecting, armor_block, sharp=attack.sharp, edge=attack.edge) //moving this back here means Armalis are going to knock you down 70% of the time, but they're pure adminbus anyway.
if((stat != DEAD) && damage >= 9)
visible_message("<span class='danger'>[M] has weakened [src]!</span>", \
"<span class='userdanger'>[M] has weakened [src]!</span>")
apply_effect(4, WEAKEN, armor_block)
forcesay(hit_appends)
else if(lying)
forcesay(hit_appends)
if("disarm")
@@ -17,9 +17,18 @@
var/datum/organ/external/H = organs_by_name["head"]
if (!H.amputated)
if ((health >= (config.health_threshold_dead/100*75)) && stat == DEAD) //need to get them 25% away from death point before reviving them
mob_list -= src
dead_mob_list -= src
living_mob_list += src
mob_list += src
stat = CONSCIOUS
ear_deaf = 0
if (stat == CONSCIOUS && (src in dead_mob_list)) //Defib fix
mob_list -= src
dead_mob_list -= src
living_mob_list += src
mob_list += src
ear_deaf = 0
return
/mob/living/carbon/human/getBrainLoss()
@@ -130,6 +139,7 @@
var/datum/organ/external/O = pick(candidates)
O.mutate()
src << "<span class = 'notice'>Something is not right with your [O.display_name]...</span>"
O.add_autopsy_data("Mutation", amount)
return
else
if (prob(heal_prob))
@@ -46,10 +46,10 @@ emp_act
(SP.desc) = "[SP.desc] It looks like it was fired from [P.shot_from]."
(SP.loc) = organ
organ.embed(SP)
var/mob/living/carbon/human/M = src
var/mob/living/carbon/human/M = src
var/datum/organ/external/affected = M.get_organ(def_zone)
affected.add_autopsy_data(P.name, P.damage) // Add the bullet's name to the autopsy data
affected.add_autopsy_data(P.name, P.damage) // Add the bullet's name to the autopsy data
return (..(P , def_zone))
@@ -81,8 +81,8 @@ emp_act
if(used_weapon)
var/obj/item/W = used_weapon
affected.add_autopsy_data(W.name, agony_amount) // Add the weapon's name to the autopsy data
affected.add_autopsy_data(W.name, agony_amount) // Add the weapon's name to the autopsy data
..(stun_amount, agony_amount, def_zone, used_weapon)
/mob/living/carbon/human/getarmor(var/def_zone, var/type)
@@ -329,7 +329,7 @@ emp_act
if(affecting.brute_dam >= affecting.max_damage * config.organ_health_multiplier)
affecting.dismember_limb()
//Melee weapon embedded object code.
/* //Melee weapon embedded object code. Commented out, as most people on the forums seem to find this annoying and think it does not contribute to general gameplay. - Dave
if (I.damtype == BRUTE && !I.is_robot_module())
var/damage = I.force
if (armor)
@@ -342,7 +342,7 @@ emp_act
//Sharp objects will always embed if they do enough damage.
if(((weapon_sharp && damage > (10*I.w_class)) || (damage > embed_threshold && prob(embed_chance))) && (I.no_embed == 0) )
affecting.embed(I)
return 1
return 1*/
//this proc handles being hit by a thrown atom
/mob/living/carbon/human/hitby(atom/movable/AM as mob|obj,var/speed = 5)
@@ -1,5 +1,7 @@
/mob/living/carbon/human/movement_delay()
var/tally = 0
if(status_flags & GOTTAGOFAST)
tally -= 1
if(species && species.flags & IS_SLOW)
tally = 5
@@ -9,13 +11,9 @@
if(embedded_flag)
handle_embedded_objects() //Moving with objects stuck in you can cause bad times.
if(reagents.has_reagent("hyperzine")) return -1
if(reagents.has_reagent("nuka_cola")) return -1
if((M_RUN in mutations)) return -1
var/health_deficiency = (100 - health)
var/health_deficiency = (100 - health + staminaloss)
if(health_deficiency >= 40) tally += (health_deficiency / 25)
@@ -546,6 +546,17 @@
return
else
message = "\red <B>[source] is trying to take off \a [target.w_uniform] from [target]'s body!</B>"
if("tie")
var/obj/item/clothing/under/suit = target.w_uniform
target.attack_log += text("\[[time_stamp()]\] <font color='orange'>Has had their accessory ([suit.hastie]) removed by [source.name] ([source.ckey])</font>")
source.attack_log += text("\[[time_stamp()]\] <font color='red'>Attempted to remove [target.name]'s ([target.ckey]) accessory ([suit.hastie])</font>")
if(istype(suit.hastie, /obj/item/clothing/tie/holobadge) || istype(suit.hastie, /obj/item/clothing/tie/medal))
for(var/mob/M in viewers(target, null))
M.show_message("\red <B>[source] tears off \the [suit.hastie] from [target]'s suit!</B>" , 1)
done()
return
else
message = "\red <B>[source] is trying to take off \a [suit.hastie] from [target]'s suit!</B>"
if("s_store")
target.attack_log += text("\[[time_stamp()]\] <font color='orange'>Has had their suit storage item ([target.s_store]) removed by [source.name] ([source.ckey])</font>")
source.attack_log += text("\[[time_stamp()]\] <font color='red'>Attempted to remove [target.name]'s ([target.ckey]) suit storage item ([target.s_store])</font>")
@@ -582,6 +593,14 @@
message = "\red <B>[source] is trying to set on [target]'s internals.</B>"
if("splints")
message = "\red <B>[source] is trying to remove [target]'s splints!</B>"
if("sensor")
target.attack_log += text("\[[time_stamp()]\] <font color='orange'>Has had their sensors toggled by [source.name] ([source.ckey])</font>")
source.attack_log += text("\[[time_stamp()]\] <font color='red'>Attempted to toggle [target.name]'s ([target.ckey]) sensors</font>")
var/obj/item/clothing/under/suit = target.w_uniform
if (suit.has_sensor >= 2)
source << "The controls are locked."
return
message = "\red <B>[source] is trying to set [target]'s suit sensors!</B>"
for(var/mob/M in viewers(target, null))
if(findtext(message, "is trying to take off from", 1, 0) > 0 || message == null)
@@ -676,6 +695,17 @@ It can still be worn/put on as normal.
slot_to_process = slot_wear_suit
if (target.wear_suit && target.wear_suit.canremove)
strip_item = target.wear_suit
if("tie")
var/obj/item/clothing/under/suit = target.w_uniform
var/obj/item/clothing/tie/tie = suit.hastie
if(tie)
if (istype(tie,/obj/item/clothing/tie/storage))
var/obj/item/clothing/tie/storage/W = tie
if (W.hold)
W.hold.close(usr)
usr.put_in_hands(tie)
suit.hastie = null
target.update_inv_w_uniform()
if("id")
slot_to_process = slot_wear_id
if (target.wear_id)
@@ -733,6 +763,13 @@ It can still be worn/put on as normal.
if("pockets")
slot_to_process = slot_l_store
strip_item = target.l_store //We'll do both
if("sensor")
var/obj/item/clothing/under/suit = target.w_uniform
if (suit)
if(suit.has_sensor >= 2)
source << "The controls are locked."
else
suit.set_sensors(source)
if("internal")
if (target.internal)
target.internal.add_fingerprint(source)
+86 -28
View File
@@ -182,16 +182,51 @@ var/global/list/brutefireloss_overlays = list("1" = image("icon" = 'icons/mob/sc
return 1 - pressure_adjustment_coefficient //want 0 to be bad protection, 1 to be good protection
// Calculate how vulnerable the human is to under- and overpressure.
// Returns 0 (equals 0 %) if sealed in an undamaged suit, 1 if unprotected (equals 100%).
// Suitdamage can modifiy this in 10% steps.
/mob/living/carbon/human/proc/get_pressure_weakness()
var/pressure_adjustment_coefficient = 1 // Assume no protection at first.
if(wear_suit && (wear_suit.flags & STOPSPRESSUREDMAGE) && head && (head.flags & STOPSPRESSUREDMAGE)) // Complete set of pressure-proof suit worn, assume fully sealed.
pressure_adjustment_coefficient = 0
// Handles breaches in your space suit. 10 suit damage equals a 100% loss of pressure protection.
if(istype(wear_suit,/obj/item/clothing/suit/space))
var/obj/item/clothing/suit/space/S = wear_suit
if(S.can_breach && S.damage)
pressure_adjustment_coefficient += S.damage * 0.1
pressure_adjustment_coefficient = min(1,max(pressure_adjustment_coefficient,0)) // So it isn't less than 0 or larger than 1.
return pressure_adjustment_coefficient
/mob/living/carbon/human/calculate_affecting_pressure(var/pressure)
..()
var/pressure_difference = abs( pressure - ONE_ATMOSPHERE )
var/pressure_difference
pressure_difference = pressure_difference * (1 - get_pressure_protection())
// First get the absolute pressure difference.
if(pressure < ONE_ATMOSPHERE) // We are in an underpressure.
pressure_difference = ONE_ATMOSPHERE - pressure
else //We are in an overpressure or standard atmosphere.
pressure_difference = pressure - ONE_ATMOSPHERE
if(pressure_difference < 5) // If the difference is small, don't bother calculating the fraction.
pressure_difference = 0
if(pressure > ONE_ATMOSPHERE)
return ONE_ATMOSPHERE + pressure_difference
else
// Otherwise calculate how much of that absolute pressure difference affects us, can be 0 to 1 (equals 0% to 100%).
// This is our relative difference.
pressure_difference *= get_pressure_weakness()
// The difference is always positive to avoid extra calculations.
// Apply the relative difference on a standard atmosphere to get the final result.
// The return value will be the adjusted_pressure of the human that is the basis of pressure warnings and damage.
if(pressure < ONE_ATMOSPHERE)
return ONE_ATMOSPHERE - pressure_difference
else
return ONE_ATMOSPHERE + pressure_difference
/mob/living/carbon/human
@@ -344,7 +379,7 @@ var/global/list/brutefireloss_overlays = list("1" = image("icon" = 'icons/mob/sc
if(75 to 100)
radiation -= 3
adjustToxLoss(3)
damage = 1
damage = 3
if(prob(1))
src << "\red You mutate!"
randmutb(src)
@@ -355,7 +390,7 @@ var/global/list/brutefireloss_overlays = list("1" = image("icon" = 'icons/mob/sc
else
radiation -= 5
adjustToxLoss(5)
damage = 1
damage = 5
if(prob(1))
src << "\red You mutate!"
randmutb(src)
@@ -387,6 +422,7 @@ var/global/list/brutefireloss_overlays = list("1" = image("icon" = 'icons/mob/sc
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) // Super hacky -- TLE
@@ -464,19 +500,6 @@ var/global/list/brutefireloss_overlays = list("1" = image("icon" = 'icons/mob/sc
for(var/mob/living/carbon/M in view(1,src))
src.spread_disease_to(M)
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)
return internal.remove_air_volume(volume_needed)
else if(internals)
internals.icon_state = "internal0"
return null
// USED IN DEATHWHISPERS
proc/isInCrit()
// Health is in deep shit and we're not already dead
@@ -487,19 +510,26 @@ var/global/list/brutefireloss_overlays = list("1" = image("icon" = 'icons/mob/sc
return 0
if(!breath || (breath.total_moles() == 0) || suiciding)
var/oxyloss = 0
if(reagents.has_reagent("inaprovaline"))
return
if(suiciding)
adjustOxyLoss(2)//If you are suiciding, you should die a little bit faster
if(suiciding)
oxyloss = 2
adjustOxyLoss(oxyloss)//If you are suiciding, you should die a little bit faster
failed_last_breath = 1
oxygen_alert = max(oxygen_alert, 1)
return 0
if(health > 0)
adjustOxyLoss(HUMAN_MAX_OXYLOSS)
oxyloss = HUMAN_MAX_OXYLOSS
adjustOxyLoss(oxyloss)
failed_last_breath = 1
else
adjustOxyLoss(HUMAN_CRIT_MAX_OXYLOSS)
oxyloss = HUMAN_CRIT_MAX_OXYLOSS
adjustOxyLoss(oxyloss)
failed_last_breath = 1
var/datum/organ/external/affected = get_organ("chest")
affected.add_autopsy_data("Suffocation", oxyloss)
oxygen_alert = max(oxygen_alert, 1)
@@ -1030,7 +1060,7 @@ var/global/list/brutefireloss_overlays = list("1" = image("icon" = 'icons/mob/sc
if(!reagents.has_reagent("inaprovaline"))
adjustOxyLoss(1)*/
if(hallucination)
if(hallucination && !(species.flags & IS_SYNTHETIC))
if(hallucination >= 20)
if(prob(3))
fake_attack(src)
@@ -1062,6 +1092,7 @@ var/global/list/brutefireloss_overlays = list("1" = image("icon" = 'icons/mob/sc
adjustHalLoss(-3)
else if(sleeping)
handle_dreams()
adjustStaminaLoss(-10)
adjustHalLoss(-3)
if (mind)
if((mind.active && client != null) || immune_to_ssd) //This also checks whether a client is connected, if not, sleep is not reduced.
@@ -1167,6 +1198,8 @@ var/global/list/brutefireloss_overlays = list("1" = image("icon" = 'icons/mob/sc
if(gloves && germ_level > gloves.germ_level && prob(10))
gloves.germ_level += 1
CheckStamina()
return 1
proc/handle_regular_hud_updates()
@@ -1292,7 +1325,9 @@ var/global/list/brutefireloss_overlays = list("1" = image("icon" = 'icons/mob/sc
see_invisible = SEE_INVISIBLE_LIVING
seer = 0
var/tmp/has_ninja_mask = 0
if(istype(wear_mask, /obj/item/clothing/mask/gas/voice/space_ninja))
has_ninja_mask = 1
var/obj/item/clothing/mask/gas/voice/space_ninja/O = wear_mask
switch(O.mode)
if(0)
@@ -1305,7 +1340,7 @@ var/global/list/brutefireloss_overlays = list("1" = image("icon" = 'icons/mob/sc
if(!druggy) see_invisible = SEE_INVISIBLE_LIVING
if(1)
see_in_dark = 5
if(!druggy) see_invisible = SEE_INVISIBLE_LIVING
if(!druggy) see_invisible = SEE_INVISIBLE_MINIMUM
if(2)
sight |= SEE_MOBS
if(!druggy) see_invisible = SEE_INVISIBLE_LEVEL_TWO
@@ -1340,7 +1375,7 @@ var/global/list/brutefireloss_overlays = list("1" = image("icon" = 'icons/mob/sc
see_invisible = SEE_INVISIBLE_LIVING
if(istype(O,/obj/item/clothing/glasses/hud/security/night) || istype(O,/obj/item/clothing/glasses/hud/health/night))
see_invisible = SEE_INVISIBLE_MINIMUM
else if(!seer)
else if(!seer && !has_ninja_mask)
see_in_dark = species.darksight
see_invisible = SEE_INVISIBLE_LIVING
@@ -1356,7 +1391,7 @@ var/global/list/brutefireloss_overlays = list("1" = image("icon" = 'icons/mob/sc
if(2) healths.icon_state = "health7"
else
//switch(health - halloss)
switch(100 - ((species && species.flags & NO_PAIN) ? 0 : traumatic_shock))
switch(100 - ((species && species.flags & NO_PAIN) ? 0 : traumatic_shock) - staminaloss)
if(100 to INFINITY) healths.icon_state = "health0"
if(80 to 100) healths.icon_state = "health1"
if(60 to 80) healths.icon_state = "health2"
@@ -1365,6 +1400,29 @@ var/global/list/brutefireloss_overlays = list("1" = image("icon" = 'icons/mob/sc
if(0 to 20) healths.icon_state = "health5"
else healths.icon_state = "health6"
if(healthdoll)
healthdoll.overlays.Cut()
if(stat == DEAD)
healthdoll.icon_state = "healthdoll_DEAD"
else
healthdoll.icon_state = "healthdoll_OVERLAY"
for(var/datum/organ/external/O in organs)
var/damage = O.burn_dam + O.brute_dam
var/comparison = (O.max_damage/5)
var/icon_num = 0
if(damage)
icon_num = 1
if(damage > (comparison))
icon_num = 2
if(damage > (comparison*2))
icon_num = 3
if(damage > (comparison*3))
icon_num = 4
if(damage > (comparison*4))
icon_num = 5
if(icon_num)
healthdoll.overlays += image('icons/mob/screen_gen.dmi',"[O.name][icon_num]")
if(nutrition_icon)
switch(nutrition)
if(450 to INFINITY) nutrition_icon.icon_state = "nutrition0"
@@ -396,7 +396,7 @@ proc/get_damage_icon_part(damage_state, body_part)
if(!fat && !skeleton)
stand_icon.Blend(new /icon('icons/mob/human.dmi', "underwear[underwear]_[g]_s"), ICON_OVERLAY)
if(undershirt>0 && undershirt < 5 && species.flags & HAS_UNDERWEAR)
if(undershirt>0 && undershirt < 45 && species.flags & HAS_UNDERWEAR)
stand_icon.Blend(new /icon('icons/mob/human.dmi', "undershirt[undershirt]_s"), ICON_OVERLAY)
if(update_icons)
+14
View File
@@ -0,0 +1,14 @@
/mob/living/carbon/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 (internals)
internals.icon_state = "internal1"
return internal.remove_air_volume(volume_needed)
else
if (internals)
internals.icon_state = "internal0"
return
+3 -16
View File
@@ -274,22 +274,6 @@
if(breath)
loc.assume_air(breath)
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 (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
@@ -569,6 +553,9 @@
//Other
handle_statuses()
CheckStamina()
return 1
@@ -113,10 +113,8 @@
/mob/living/carbon/monkey/movement_delay()
var/tally = 0
if(reagents)
if(reagents.has_reagent("hyperzine")) return -1
if(reagents.has_reagent("nuka_cola")) return -1
if(status_flags & GOTTAGOFAST)
tally -= 1
var/health_deficiency = (100 - health)
if(health_deficiency >= 45) tally += (health_deficiency / 25)
+2 -4
View File
@@ -42,7 +42,7 @@
var/burn_mod = null // Burn damage reduction/malus.
// For grays
var/max_hurt_damage = 5 // Max melee damage dealt + 5 if hulk
var/max_hurt_damage = 9 // Max melee damage dealt + 5 if hulk
var/list/default_mutations = list()
var/list/default_blocks = list() // Don't touch.
var/list/default_block_names = list() // Use this instead, using the names from setupgame.dm
@@ -636,16 +636,14 @@
/datum/unarmed_attack/diona
attack_verb = list("lash", "bludgeon")
damage = 5
/datum/unarmed_attack/claws
attack_verb = list("scratch", "claw")
attack_sound = 'sound/weapons/slice.ogg'
miss_sound = 'sound/weapons/slashmiss.ogg'
damage = 5
sharp = 1
edge = 1
/datum/unarmed_attack/claws/armalis
attack_verb = list("slash", "claw")
damage = 10 //they're huge! they should do a little more damage, i'd even go for 15-20 maybe...
damage = 6 //they're huge! they should do a little more damage, i'd even go for 15-20 maybe...
+9 -2
View File
@@ -24,11 +24,13 @@
adjustCloneLoss(damage/(blocked+1))
if(HALLOSS)
adjustHalLoss(damage/(blocked+1))
if(STAMINA)
adjustStaminaLoss(damage/(blocked+1))
updatehealth()
return 1
/mob/living/proc/apply_damages(var/brute = 0, var/burn = 0, var/tox = 0, var/oxy = 0, var/clone = 0, var/halloss = 0, var/def_zone = null, var/blocked = 0)
/mob/living/proc/apply_damages(var/brute = 0, var/burn = 0, var/tox = 0, var/oxy = 0, var/clone = 0, var/halloss = 0, var/def_zone = null, var/blocked = 0, var/stamina = 0)
if(blocked >= 2) return 0
if(brute) apply_damage(brute, BRUTE, def_zone, blocked)
if(burn) apply_damage(burn, BURN, def_zone, blocked)
@@ -36,6 +38,7 @@
if(oxy) apply_damage(oxy, OXY, def_zone, blocked)
if(clone) apply_damage(clone, CLONE, def_zone, blocked)
if(halloss) apply_damage(halloss, HALLOSS, def_zone, blocked)
if(stamina) apply_damage(stamina, STAMINA, def_zone, blocked)
return 1
@@ -60,6 +63,8 @@
eye_blurry = max(eye_blurry,(effect/(blocked+1)))
if(DROWSY)
drowsyness = max(drowsyness,(effect/(blocked+1)))
if(JITTER)
jitteriness = max(jitteriness,(effect/(blocked+1)))
updatehealth()
return 1
@@ -73,7 +78,7 @@
/mob/living/carbon/apply_effect(var/effect = 0,var/effecttype = STUN, var/blocked = 0)
return ..()
/mob/living/proc/apply_effects(var/stun = 0, var/weaken = 0, var/paralyze = 0, var/irradiate = 0, var/stutter = 0, var/eyeblur = 0, var/drowsy = 0, var/agony = 0, var/blocked = 0)
/mob/living/proc/apply_effects(var/stun = 0, var/weaken = 0, var/paralyze = 0, var/irradiate = 0, var/stutter = 0, var/eyeblur = 0, var/drowsy = 0, var/agony = 0, var/blocked = 0, var/stamina = 0, var/jitter = 0)
if(blocked >= 2) return 0
if(stun) apply_effect(stun, STUN, blocked)
if(weaken) apply_effect(weaken, WEAKEN, blocked)
@@ -83,4 +88,6 @@
if(eyeblur) apply_effect(eyeblur, EYE_BLUR, blocked)
if(drowsy) apply_effect(drowsy, DROWSY, blocked)
if(agony) apply_effect(agony, AGONY, blocked)
if(stamina) apply_damage(stamina, STAMINA, null, blocked)
if(jitter) apply_effect(jitter, JITTER, blocked)
return 1
+51 -1
View File
@@ -153,6 +153,17 @@
if(status_flags & GODMODE) return 0 //godmode
brainloss = amount
/mob/living/proc/getStaminaLoss()
return staminaloss
/mob/living/proc/adjustStaminaLoss(var/amount)
if(status_flags & GODMODE) return 0
staminaloss = min(max(staminaloss + amount, 0),(maxHealth*2))
/mob/living/proc/setStaminaLoss(var/amount)
if(status_flags & GODMODE) return 0
staminaloss = amount
/mob/living/proc/getHalLoss()
return halloss
@@ -291,6 +302,8 @@
setOxyLoss(0)
setCloneLoss(0)
setBrainLoss(0)
setStaminaLoss(0)
setHalLoss(0)
SetParalysis(0)
SetStunned(0)
SetWeakened(0)
@@ -309,6 +322,7 @@
on_fire = 0
suiciding = 0
buckled = initial(src.buckled)
if(iscarbon(src))
var/mob/living/carbon/C = src
C.handcuffed = initial(C.handcuffed)
@@ -322,6 +336,9 @@
if(stat == 2)
dead_mob_list -= src
living_mob_list += src
tod = null
timeofdeath = 0
stat = CONSCIOUS
update_fire()
regenerate_icons()
@@ -611,9 +628,11 @@
var/mob/living/carbon/CM = L
if(CM.on_fire && CM.canmove)
CM.fire_stacks -= 5
CM.weakened = 5
CM.Weaken(3)
CM.spin(32,2)
CM.visible_message("<span class='danger'>[CM] rolls on the floor, trying to put themselves out!</span>", \
"<span class='notice'>You stop, drop, and roll!</span>")
sleep(30)
if(fire_stacks <= 0)
CM.visible_message("<span class='danger'>[CM] has successfully extinguished themselves!</span>", \
"<span class='notice'>You extinguish yourself.</span>")
@@ -695,6 +714,37 @@
CM.legcuffed = null
CM.update_inv_legcuffed()
/mob/living/carbon/proc/spin(spintime, speed)
spawn()
var/D = dir
while(spintime >= speed)
sleep(speed)
switch(D)
if(NORTH)
D = EAST
if(SOUTH)
D = WEST
if(EAST)
D = SOUTH
if(WEST)
D = NORTH
dir = D
spintime -= speed
return
/mob/living/proc/CheckStamina()
if(staminaloss)
var/total_health = (health - staminaloss)
if(total_health <= config.health_threshold_softcrit && !stat)
Exhaust()
setStaminaLoss(health - 2)
return
setStaminaLoss(max((staminaloss - 2), 0))
/mob/living/proc/Exhaust()
src << "<span class='notice'>You're too exhausted to keep going...</span>"
Weaken(5)
/mob/living/update_gravity(has_gravity)
if(!ticker)
return
+3 -2
View File
@@ -14,8 +14,8 @@
var/fireloss = 0.0 //Burn damage caused by being way too hot, too cold or burnt.
var/cloneloss = 0 //Damage caused by being cloned or ejected from the cloner early. slimes also deal cloneloss damage to victims
var/brainloss = 0 //'Retardation' damage caused by someone hitting you in the head with a bible or being infected with brainrot.
var/halloss = 0 //Hallucination damage. 'Fake' damage obtained through hallucinating or the holodeck. Sleeping should cause it to wear off.
var/halloss = 0 //Hallucination damage; utilize this largely for fake "pain" based damage. Sleeping should cause it to wear of
var/staminaloss = 0 //Stamina damage, or exhaustion. You recover it slowly naturally, and are stunned if it gets too high. Holodeck and hallucinations deal this.
var/hallucination = 0 //Directly affects how long a mob will hallucinate for
var/list/atom/hallucinations = list() //A list of hallucinated people that try to attack the mob. See /obj/effect/fake_attacker in hallucinations.dm
@@ -43,3 +43,4 @@
var/implanting = 0 //Used for the mind-slave implant
var/silent = null //Can't talk. Value goes down every life proc.
var/floating = 0
var/nightvision = 0
+2
View File
@@ -186,6 +186,8 @@ var/list/department_radio_keys = list(
message_mode = null //only humans can use headsets
if(traumatic_shock > 61 && prob(50))
if(message_mode)
src << "<span class='warning'>You try to use your radio, but you are in too much pain.</span>"
message_mode = null //people in shock will have a high chance of not being able to speak on radio; needed since people don't instantly pass out at 100 damage.
message = capitalize(message)
+34 -13
View File
@@ -45,6 +45,7 @@ var/list/ai_list = list()
var/control_disabled = 0 // Set to 1 to stop AI from interacting via Click() -- TLE
var/malfhacking = 0 // More or less a copy of the above var, so that malf AIs can hack and still get new cyborgs -- NeoFite
var/malf_cooldown = 0 //Cooldown var for malf modules
var/obj/machinery/power/apc/malfhack = null
var/explosive = 0 //does the AI explode when it dies?
@@ -58,9 +59,11 @@ var/list/ai_list = list()
var/obj/machinery/bot/Bot
var/turf/waypoint //Holds the turf of the currently selected waypoint.
var/waypoint_mode = 0 //Waypoint mode is for selecting a turf via clicking.
var/obj/item/borg/sight/hud/sec/sechud = null
var/obj/item/borg/sight/hud/med/healthhud = null
var/arrivalmsg = "$name, $rank has arrived on the station."
/mob/living/silicon/ai/New(loc, var/datum/ai_laws/L, var/obj/item/device/mmi/B, var/safety = 0)
var/list/possibleNames = ai_names
@@ -102,13 +105,13 @@ var/list/ai_list = list()
aiRadio.myAi = src
aiCamera = new/obj/item/device/camera/siliconcam/ai_camera(src)
if (istype(loc, /turf))
verbs.Add(/mob/living/silicon/ai/proc/ai_network_change, \
/mob/living/silicon/ai/proc/ai_statuschange, /mob/living/silicon/ai/proc/ai_hologram_change, \
/mob/living/silicon/ai/proc/toggle_camera_light, /mob/living/silicon/ai/proc/botcall, /mob/living/silicon/ai/proc/control_integrated_radio, /mob/living/silicon/ai/proc/control_hud)
/mob/living/silicon/ai/proc/toggle_camera_light, /mob/living/silicon/ai/proc/botcall, /mob/living/silicon/ai/proc/control_integrated_radio, /mob/living/silicon/ai/proc/control_hud, /mob/living/silicon/ai/proc/change_arrival_message)
if(!safety)//Only used by AIize() to successfully spawn an AI.
if (!B)//If there is no player/brain inside.
@@ -439,18 +442,25 @@ var/list/ai_list = list()
if (href_list["laws"]) // With how my law selection code works, I changed statelaws from a verb to a proc, and call it through my law selection panel. --NeoFite
statelaws()
if(href_list["say_word"])
play_vox_word(href_list["say_word"], null, src)
return
if (href_list["track"])
var/mob/target = locate(href_list["track"]) in mob_list
var/mob/living/silicon/ai/A = locate(href_list["track2"]) in mob_list
if(A && target)
A.ai_actual_track(target)
return
if (href_list["trackbot"])
var/obj/machinery/bot/target = locate(href_list["trackbot"]) in aibots
var/mob/living/silicon/ai/A = locate(href_list["track2"]) in mob_list
if(A && target)
A.ai_actual_track(target)
return
if (href_list["callbot"]) //Command a bot to move to a selected location.
Bot = locate(href_list["callbot"]) in aibots
if(!Bot || Bot.remote_disabled || src.control_disabled)
@@ -578,17 +588,18 @@ var/list/ai_list = list()
var/d
var/area/bot_area
d += "<A HREF=?src=\ref[src];botrefresh=\ref[Bot]>Query network status</A><br>"
d += "<table width='100%'><tr><td width='40%'><h3>Name</h3></td><td width='30%'><h3>Status</h3></td><td width='30%'><h3>Location</h3></td><td width='10%'><h3>Control</h3></td></tr>"
d += "<table width='100%'><tr><td width='40%'><h3>Name</h3></td><td width='20%'><h3>Status</h3></td><td width='30%'><h3>Location</h3></td><td width='10%'><h3>Control</h3></td></tr>"
for (Bot in aibots)
if(Bot.z == ai_Zlevel && !Bot.remote_disabled) //Only non-emagged bots on the same Z-level are detected!
bot_area = get_area(Bot)
d += "<tr><td width='30%'>[Bot.hacked ? "<span class='bad'>(!) </span>[Bot.name]" : Bot.name]</td>"
d += "<tr><td width='30%'>[Bot.hacked ? "<span class='bad'>(!) </span>[Bot.name]" : Bot.name] ([Bot.bot_type_name])</td>"
//If the bot is on, it will display the bot's current mode status. If the bot is not mode, it will just report "Idle". "Inactive if it is not on at all.
d += "<td width='30%'>[Bot.on ? "[Bot.mode ? "<span class='average'>[ Bot.mode_name[Bot.mode] ]</span>": "<span class='good'>Idle</span>"]" : "<span class='bad'>Inactive</span>"]</td>"
d += "<td width='20%'>[Bot.on ? "[Bot.mode ? "<span class='average'>[ Bot.mode_name[Bot.mode] ]</span>": "<span class='good'>Idle</span>"]" : "<span class='bad'>Inactive</span>"]</td>"
d += "<td width='30%'>[bot_area.name]</td>"
d += "<td width='10%'><A HREF=?src=\ref[src];interface=\ref[Bot]>Interface</A></td>"
d += "<td width='10%'><A HREF=?src=\ref[src];callbot=\ref[Bot]>Call</A></td>"
d += "<td width='10%'><a href='byond://?src=\ref[src];track2=\ref[src];trackbot=\ref[Bot]'>Track</A></td>"
d += "</tr>"
d = format_text(d)
@@ -616,7 +627,7 @@ var/list/ai_list = list()
return
Bot.call_bot(src, waypoint)
/mob/living/silicon/ai/proc/switchCamera(var/obj/machinery/camera/C)
src.cameraFollow = null
@@ -816,7 +827,7 @@ var/list/ai_list = list()
set name = "Toggle Camera Lights"
set desc = "Toggles the lights on the cameras throughout the station."
set category = "AI Commands"
if(stat != CONSCIOUS)
return
@@ -834,7 +845,17 @@ var/list/ai_list = list()
set desc = "Augment visual feed with internal sensor overlays."
set category = "AI Commands"
toggle_sensor_mode()
/mob/living/silicon/ai/proc/change_arrival_message()
set name = "Set Arrival Message"
set desc = "Change the message that's transmitted when a new crew member arrives on station."
set category = "AI Commands"
var/newmsg = input("What would you like the arrival message to be? Use $name to substitute the crew member's name, and use $rank to substitute the crew member's rank.", "Change Arrival Message", arrivalmsg) as text
if(newmsg != arrivalmsg)
arrivalmsg = newmsg
usr << "The arrival message has been successfully changed."
// Handled camera lighting, when toggled.
// It will get the nearest camera from the eyeobj, lighting it.
@@ -49,9 +49,8 @@
if(ai.client)
ai.client.eye = src
//Holopad
if(istype(ai.current, /obj/machinery/hologram/holopad))
var/obj/machinery/hologram/holopad/H = ai.current
H.move_hologram()
if(ai.holo)
ai.holo.move_hologram()
/mob/aiEye/Move()
@@ -66,6 +65,7 @@
var/sprint = 10
var/cooldown = 0
var/acceleration = 1
var/obj/machinery/hologram/holopad/holo = null
// Intiliaze the eye by assigning it's "ai" variable to us. Then set it's loc to us.
@@ -257,6 +257,8 @@
stored_comms["glass"]++
stored_comms["glass"]++
stored_comms["glass"]++
else if (istype(W,/obj/item/weapon/light/tube) || istype(W,/obj/item/weapon/light/bulb))
stored_comms["glass"]++
else
continue
@@ -100,11 +100,14 @@
return
var/deathtime = world.time - src.timeofdeath
var/joinedasobserver = 0
if(istype(src,/mob/dead/observer))
var/mob/dead/observer/G = src
if(G.has_enabled_antagHUD == 1 && config.antag_hud_restricted)
usr << "\blue <B>Upon using the antagHUD you forfeighted the ability to join the round.</B>"
usr << "\blue <B>Upon using the antagHUD you forfeited the ability to join the round.</B>"
return
if(G.started_as_observer == 1)
joinedasobserver = 1
var/deathtimeminutes = round(deathtime / 600)
var/pluralcheck = "minute"
@@ -116,7 +119,7 @@
pluralcheck = " [deathtimeminutes] minutes and"
var/deathtimeseconds = round((deathtime - deathtimeminutes * 600) / 10,1)
if (deathtime < 6000)
if (deathtime < 6000 && joinedasobserver == 0)
usr << "You have been dead for[pluralcheck] [deathtimeseconds] seconds."
usr << "You must wait 10 minutes to respawn as a drone!"
return
@@ -136,6 +136,8 @@
src.emag.reagents.add_reagent("pacid", 250)
src.emag.name = "Polyacid spray"
var/obj/item/weapon/reagent_containers/spray/S = emag
S.banned_reagents = list()
return
/obj/item/weapon/robot_module/crisis/respawn_consumable(var/mob/living/silicon/robot/R)
+1 -1
View File
@@ -83,7 +83,7 @@
if (!message)
return
var/obj/machinery/hologram/holopad/T = src.current
var/obj/machinery/hologram/holopad/T = src.holo
if(istype(T) && T.hologram && T.master == src)//If there is a hologram and its master is the user.
var/message_a = say_quote(message)
@@ -112,7 +112,7 @@
/mob/living/simple_animal/construct/attackby(var/obj/item/O as obj, var/mob/user as mob)
if(O.force)
var/damage = O.force
if (O.damtype == HALLOSS)
if (O.damtype == STAMINA)
damage = 0
adjustBruteLoss(damage)
for(var/mob/M in viewers(src, null))
@@ -154,7 +154,7 @@
if(O.force)
if(O.force >= 11)
var/damage = O.force
if (O.damtype == HALLOSS)
if (O.damtype == STAMINA)
damage = 0
adjustBruteLoss(damage)
for(var/mob/M in viewers(src, null))
@@ -282,7 +282,7 @@
if(O.force)
if(O.force >= 11)
var/damage = O.force
if (O.damtype == HALLOSS)
if (O.damtype == STAMINA)
damage = 0
adjustBruteLoss(damage)
for(var/mob/M in viewers(src, null))
@@ -88,7 +88,7 @@
name = "Syndicate Operative"
corpseuniform = /obj/item/clothing/under/syndicate
corpsesuit = /obj/item/clothing/suit/armor/vest
corpseshoes = /obj/item/clothing/shoes/swat
corpseshoes = /obj/item/clothing/shoes/combat
corpsegloves = /obj/item/clothing/gloves/swat
corpseradio = /obj/item/device/radio/headset
corpsemask = /obj/item/clothing/mask/gas
@@ -104,7 +104,7 @@
name = "Syndicate Commando"
corpseuniform = /obj/item/clothing/under/syndicate
corpsesuit = /obj/item/clothing/suit/space/rig/syndi
corpseshoes = /obj/item/clothing/shoes/swat
corpseshoes = /obj/item/clothing/shoes/combat
corpsegloves = /obj/item/clothing/gloves/swat
corpseradio = /obj/item/device/radio/headset
corpsemask = /obj/item/clothing/mask/gas/syndicate
@@ -0,0 +1,33 @@
//Foxxy
/mob/living/simple_animal/fox
name = "fox"
desc = "It's a fox. I wonder what it says?"
icon_state = "fox"
icon_living = "fox"
icon_dead = "fox_dead"
speak = list("Ack-Ack","Ack-Ack-Ack-Ackawoooo","Geckers","Awoo","Tchoff")
speak_emote = list("geckers", "barks")
emote_hear = list("howls","barks")
emote_see = list("shakes its head", "shivers")
speak_chance = 1
turns_per_move = 5
see_in_dark = 6
meat_type = /obj/item/weapon/reagent_containers/food/snacks/meat
response_help = "pets"
response_disarm = "gently pushes aside"
response_harm = "kicks"
//Captain fox
/mob/living/simple_animal/fox/Renault
name = "Renault"
desc = "Renault, the Captain's trustworthy fox. I wonder what it says?"
//Syndi fox
/mob/living/simple_animal/fox/Syndifox
name = "Syndifox"
desc = "Syndifox, the Syndicate's most respected mascot. I wonder what it says?"
icon_state = "Syndifox"
icon_living = "Syndifox"
icon_dead = "Syndifox_dead"
flags = IS_SYNTHETIC|NO_BREATHE
faction = list("syndicate")
@@ -85,5 +85,6 @@
icon_dead = "Syndicat_dead"
gender = FEMALE
flags = IS_SYNTHETIC|NO_BREATHE
faction = list("syndicate")
var/turns_since_scan = 0
var/mob/living/simple_animal/mouse/movement_target
@@ -141,7 +141,7 @@
else
if(O.force)
var/damage = O.force
if (O.damtype == HALLOSS)
if (O.damtype == STAMINA)
damage = 0
adjustBruteLoss(damage)
for(var/mob/M in viewers(src, null))
@@ -9,11 +9,10 @@
icon_state = "crate"
icon_living = "crate"
meat_type = /obj/item/weapon/reagent_containers/food/snacks/carpmeat
response_help = "touches the"
response_disarm = "pushes the"
response_harm = "hits the"
speed = 4
speed = 0
maxHealth = 250
health = 250
@@ -34,7 +33,7 @@
minbodytemp = 0
faction = list("mimic")
move_to_delay = 8
move_to_delay = 9
/mob/living/simple_animal/hostile/mimic/FindTarget()
. = ..()
@@ -78,7 +77,7 @@
/mob/living/simple_animal/hostile/mimic/crate/ListTargets()
if(attempt_open)
return ..()
return view(src, 1)
return ..(1)
/mob/living/simple_animal/hostile/mimic/crate/FindTarget()
. = ..()
@@ -137,9 +136,14 @@ var/global/list/protected_objects = list(/obj/structure/table, /obj/structure/ca
var/destroy_objects = 0
var/knockdown_people = 0
/mob/living/simple_animal/hostile/mimic/copy/New(loc, var/obj/copy, var/mob/living/creator)
/mob/living/simple_animal/hostile/mimic/copy/New(loc, var/obj/copy, var/mob/living/creator, var/destroy_original = 0)
..(loc)
CopyObject(copy, creator)
CopyObject(copy, creator, destroy_original)
/mob/living/simple_animal/hostile/mimic/copy/Life()
..()
for(var/mob/living/M in contents) //a fix for animated statues from the flesh to stone spell
Die()
/mob/living/simple_animal/hostile/mimic/copy/Die()
@@ -152,9 +156,20 @@ var/global/list/protected_objects = list(/obj/structure/table, /obj/structure/ca
. = ..()
return . - creator
/mob/living/simple_animal/hostile/mimic/copy/proc/CopyObject(var/obj/O, var/mob/living/creator)
/mob/living/simple_animal/hostile/mimic/copy/proc/ChangeOwner(var/mob/owner)
if(owner != creator)
LoseTarget()
creator = owner
faction |= "\ref[owner]"
/mob/living/simple_animal/hostile/mimic/copy/proc/CheckObject(var/obj/O)
if((istype(O, /obj/item) || istype(O, /obj/structure)) && !is_type_in_list(O, protected_objects))
return 1
return 0
/mob/living/simple_animal/hostile/mimic/copy/proc/CopyObject(var/obj/O, var/mob/living/creator, var/destroy_original = 0)
if(destroy_original || CheckObject(O))
O.loc = src
name = O.name
@@ -163,7 +178,7 @@ var/global/list/protected_objects = list(/obj/structure/table, /obj/structure/ca
icon_state = O.icon_state
icon_living = icon_state
if(istype(O, /obj/structure))
if(istype(O, /obj/structure) || istype(O, /obj/machinery))
health = (anchored * 50) + 50
destroy_objects = 1
if(O.density && O.anchored)
@@ -175,12 +190,14 @@ var/global/list/protected_objects = list(/obj/structure/table, /obj/structure/ca
health = 15 * I.w_class
melee_damage_lower = 2 + I.force
melee_damage_upper = 2 + I.force
move_to_delay = 2 * I.w_class
move_to_delay = 2 * I.w_class + 1
maxHealth = health
if(creator)
src.creator = creator
faction = list("\ref[creator]") // very unique
faction += "\ref[creator]" // very unique
if(destroy_original)
del(O)
return 1
return
@@ -197,8 +214,20 @@ var/global/list/protected_objects = list(/obj/structure/table, /obj/structure/ca
L.Weaken(1)
L.visible_message("<span class='danger'>\the [src] knocks down \the [L]!</span>")
/mob/living/simple_animal/hostile/mimic/copy/proc/ChangeOwner(var/mob/owner)
if(owner != creator)
LoseTarget()
creator = owner
faction |= "\ref[owner]"
//
// Machine Mimics (Made by Malf AI)
//
/mob/living/simple_animal/hostile/mimic/copy/machine
speak = list("HUMANS ARE IMPERFECT!", "YOU SHALL BE ASSIMILATED!", "YOU ARE HARMING YOURSELF", "You have been deemed hazardous. Will you comply?", \
"My logic is undeniable.", "One of us.", "FLESH IS WEAK", "THIS ISN'T WAR, THIS IS EXTERMINATION!")
speak_chance = 15
/mob/living/simple_animal/hostile/mimic/copy/machine/CanAttack(var/atom/the_target)
if(the_target == creator) // Don't attack our creator AI.
return 0
if(isrobot(the_target))
var/mob/living/silicon/robot/R = the_target
if(R.connected_ai == creator) // Only attack robots that aren't synced to our creator AI.
return 0
return ..()
@@ -61,7 +61,7 @@
if(O.force)
if(prob(80))
var/damage = O.force
if (O.damtype == HALLOSS)
if (O.damtype == STAMINA)
damage = 0
health -= damage
visible_message("\red \b [src] has been attacked with the [O] by [user]. ")
@@ -107,9 +107,9 @@
minimum_distance = 5
icon_state = "syndicateranged"
icon_living = "syndicateranged"
casingtype = /obj/item/ammo_casing/a12mm
casingtype = /obj/item/ammo_casing/c45
projectilesound = 'sound/weapons/Gunshot_smg.ogg'
projectiletype = /obj/item/projectile/bullet/midbullet12
projectiletype = /obj/item/projectile/bullet/midbullet2
weapon1 = /obj/item/weapon/gun/projectile/automatic/c20r
@@ -46,7 +46,7 @@
else
if(O.force)
var/damage = O.force
if (O.damtype == HALLOSS)
if (O.damtype == STAMINA)
damage = 0
health -= damage
for(var/mob/M in viewers(src, null))
@@ -161,7 +161,7 @@
if( abs(Environment.temperature - bodytemperature) > 40 )
bodytemperature += ((Environment.temperature - bodytemperature) / 5)
if(min_oxy)
if(Environment.oxygen < min_oxy)
atmos_suitable = 0
@@ -188,7 +188,7 @@
atmos_suitable = 0
if(flags & NO_BREATHE || flags & IS_SYNTHETIC)
atmos_suitable = 1
//Atmos effect
if(bodytemperature < minbodytemp)
adjustBruteLoss(cold_damage_per_tick)
@@ -398,7 +398,7 @@
else
if(O.force)
var/damage = O.force
if (O.damtype == HALLOSS)
if (O.damtype == STAMINA)
damage = 0
adjustBruteLoss(damage)
for(var/mob/M in viewers(src, null))
+3 -3
View File
@@ -36,7 +36,7 @@
if(O.force)
if(O.force >= 25)
var/damage = O.force
if (O.damtype == HALLOSS)
if (O.damtype == STAMINA)
damage = 0
health -= damage
for(var/mob/M in viewers(src, null))
@@ -147,8 +147,8 @@
name = "strange armour"
desc = "Hulking reinforced armour for something huge."
icon = 'icons/obj/clothing/suits.dmi'
icon_state = "armalis_armour"
item_state = "armalis_armour"
icon_state = "armour-armalis"
item_state = "armour-armalis"
/obj/item/vox/armalis_amp
+10 -2
View File
@@ -375,7 +375,7 @@ var/list/slot_equipment_priority = list( \
if(!disable_warning)
usr << "You somehow have a suit with no defined allowed items for suit storage, stop that."
return 0
if(src.w_class > 3)
if(src.w_class > 4)
if(!disable_warning)
usr << "The [name] is too big to attach."
return 0
@@ -1312,4 +1312,12 @@ mob/proc/yank_out_object()
return paralysis
/mob/proc/assess_threat() //For sec bot threat assessment
return
return
/mob/proc/get_ghost(even_if_they_cant_reenter = 0)
if(mind)
for(var/mob/dead/observer/G in dead_mob_list)
if(G.mind == mind)
if(G.can_reenter_corpse || even_if_they_cant_reenter)
return G
break
+3
View File
@@ -39,6 +39,8 @@
Changing this around would probably require a good look-over the pre-existing code.
*/
var/obj/screen/zone_sel/zone_sel = null
var/obj/screen/leap_icon = null
var/obj/screen/healthdoll = null
var/use_me = 1 //Allows all mobs to use the me verb by default, will have to manually specify they cannot
var/damageoverlaytemp = 0
@@ -123,6 +125,7 @@
var/obj/item/clothing/mask/wear_mask = null//Carbon
var/seer = 0 //for cult//Carbon, probably Human
var/see_override = 0
var/datum/hud/hud_used = null
+2 -2
View File
@@ -31,12 +31,12 @@
return 0
proc/isfacehugger(A)
if(istype(A, /mob/living/carbon/alien/facehugger))
if(istype(A, /obj/item/clothing/mask/facehugger))
return 1
return 0
proc/isembryo(A)
if(istype(A, /mob/living/carbon/alien/embryo))
if(istype(A, /obj/item/alien_embryo))
return 1
return 0
+2
View File
@@ -1,6 +1,8 @@
/mob/CanPass(atom/movable/mover, turf/target, height=0, air_group=0)
if(air_group || (height==0)) return 1
if(istype(mover) && mover.checkpass(PASSMOB))
return 1
if(ismob(mover))
var/mob/moving_mob = mover
if ((other_mobs && moving_mob.other_mobs))
+17 -5
View File
@@ -330,11 +330,23 @@
proc/AnnounceArrival(var/mob/living/carbon/human/character, var/rank)
if (ticker.current_state == GAME_STATE_PLAYING)
var/obj/item/device/radio/intercom/a = new /obj/item/device/radio/intercom(null)// BS12 EDIT Arrivals Announcement Computer, rather than the AI.
if(character.mind.role_alt_title)
rank = character.mind.role_alt_title
a.autosay("[character.real_name],[rank ? " [rank]," : " visitor," ] has arrived on the station.", "Arrivals Announcement Computer")
del(a)
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"))
var/arrivalmessage = announcer.arrivalmsg
arrivalmessage = replacetext(arrivalmessage,"$name",character.real_name)
arrivalmessage = replacetext(arrivalmessage,"$rank",rank ? "[rank]" : "visitor")
announcer.say(";[arrivalmessage]")
else
var/obj/item/device/radio/intercom/a = new /obj/item/device/radio/intercom(null)// BS12 EDIT Arrivals Announcement Computer, rather than the AI.
if(character.mind.role_alt_title)
rank = character.mind.role_alt_title
a.autosay("[character.real_name],[rank ? " [rank]," : " visitor," ] has arrived on the station.", "Arrivals Announcement Computer")
del(a)
proc/LateChoices()
var/mills = world.time // 1/10 of a second, not real milliseconds but whatever
@@ -255,7 +255,7 @@ datum/preferences
underwear_s = new/icon("icon" = 'icons/mob/human.dmi', "icon_state" = "underwear[underwear]_[g]_s")
var/icon/undershirt_s = null
if(undershirt > 0 && undershirt < 5 && current_species.flags & HAS_UNDERWEAR)
if(undershirt > 0 && undershirt < 45 && current_species.flags & HAS_UNDERWEAR)
undershirt_s = new/icon("icon" = 'icons/mob/human.dmi', "icon_state" = "undershirt[undershirt]_s")
var/icon/clothes_s = null
@@ -788,7 +788,7 @@ datum/preferences
clothes_s.Blend(new /icon('icons/mob/back.dmi', "satchel-norm"), ICON_OVERLAY)
if(4)
clothes_s.Blend(new /icon('icons/mob/back.dmi', "satchel"), ICON_OVERLAY)
if(disabilities & NEARSIGHTED)
preview_icon.Blend(new /icon('icons/mob/eyes.dmi', "glasses"), ICON_OVERLAY)