mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-07-18 02:24:11 +01:00
Xenos gamemode rework
This commit is contained in:
@@ -13,12 +13,13 @@ var/global/list/special_roles = list( //keep synced with the defines BE_* in set
|
||||
"alien candidate" = 1, //always show // 6
|
||||
"pAI candidate" = 1, // -- TLE // 7
|
||||
"cultist" = IS_MODE_COMPILED("cult"), // 8
|
||||
"plant" = 1, // 9
|
||||
"plant" = 1, // 9
|
||||
"ninja" = "true", // 10
|
||||
"vox raider" = IS_MODE_COMPILED("heist"), // 11
|
||||
"slime" = 1, // 12
|
||||
"vampire" = IS_MODE_COMPILED("vampire"), // 13
|
||||
"mutineer" = IS_MODE_COMPILED("mutiny") // 14
|
||||
"vampire" = IS_MODE_COMPILED("vampire"), // 13
|
||||
"mutineer" = IS_MODE_COMPILED("mutiny"), // 14
|
||||
"blob" = IS_MODE_COMPILED("blob") // 15
|
||||
)
|
||||
|
||||
var/const/MAX_SAVE_SLOTS = 10
|
||||
|
||||
@@ -15,21 +15,32 @@
|
||||
|
||||
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
|
||||
updatePlasmaDisplay()
|
||||
@@ -52,10 +63,8 @@
|
||||
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)
|
||||
|
||||
@@ -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)
|
||||
@@ -184,6 +193,21 @@
|
||||
|
||||
/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"
|
||||
|
||||
/*----------------------------------------
|
||||
Proc: AddInfectionImages()
|
||||
@@ -193,7 +217,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 +234,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 +243,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()
|
||||
|
||||
@@ -23,26 +23,17 @@ Doesn't work on other aliens/AI.*/
|
||||
set desc = "Plants some alien weeds"
|
||||
set category = "Alien"
|
||||
|
||||
if(locate(/obj/effect/alien/weeds/node) in get_turf(src))
|
||||
src << "There's already a weed node here."
|
||||
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)
|
||||
O.show_message(text("<span class='alertalien'>[src] has planted some alien weeds!</span>"), 1)
|
||||
new /obj/effect/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,30 +79,51 @@ 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>")
|
||||
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)"
|
||||
@@ -119,21 +131,32 @@ Doesn't work on other aliens/AI.*/
|
||||
set category = "Alien"
|
||||
|
||||
if(powerc(75))
|
||||
if(constructing)
|
||||
src << "<span class='noticealien'>You are already constructing something.</span>"
|
||||
return
|
||||
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]."
|
||||
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)
|
||||
switch(choice)
|
||||
if("resin door")
|
||||
new /obj/structure/mineral_door/resin(loc)
|
||||
if("resin wall")
|
||||
new /obj/effect/alien/resin/wall(loc)
|
||||
if("resin membrane")
|
||||
new /obj/effect/alien/resin/membrane(loc)
|
||||
if("resin nest")
|
||||
new /obj/structure/stool/bed/nest(loc)
|
||||
|
||||
if(!choice || !powerc(75))
|
||||
return
|
||||
|
||||
constructing = 1
|
||||
stunned = 5
|
||||
src << "<span class='noticealien'>You start shaping a [choice].</span>"
|
||||
spawn(60)
|
||||
adjustToxLoss(-75)
|
||||
for(var/mob/O in viewers(src, null))
|
||||
O.show_message(text("<span class='noticealien'>[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)
|
||||
if("resin membrane")
|
||||
new /obj/effect/alien/resin/membrane(loc)
|
||||
if("resin nest")
|
||||
new /obj/structure/stool/bed/nest(loc)
|
||||
constructing = 0
|
||||
stunned = 0
|
||||
return
|
||||
|
||||
/mob/living/carbon/alien/humanoid/verb/regurgitate()
|
||||
@@ -148,5 +171,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,10 +36,10 @@
|
||||
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)
|
||||
del(src)
|
||||
else
|
||||
|
||||
@@ -12,65 +12,139 @@
|
||||
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()
|
||||
leap_on_click = !leap_on_click
|
||||
leap_icon.icon_state = "leap_[leap_on_click ? "on":"off"]"
|
||||
src << "<span class='noticealien'>You will now [leap_on_click ? "leap at":"slash at"] enemies!</span>"
|
||||
|
||||
/mob/living/carbon/alien/humanoid/hunter/ClickOn(var/atom/A, var/params)
|
||||
face_atom(A)
|
||||
if(leap_on_click)
|
||||
leap_at(A)
|
||||
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
|
||||
*/
|
||||
..()
|
||||
|
||||
#define MAX_ALIEN_LEAP_DIST 7
|
||||
|
||||
/mob/living/carbon/alien/humanoid/hunter/proc/leap_at(var/atom/A)
|
||||
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
|
||||
|
||||
leaping = 1
|
||||
update_icons()
|
||||
throw_at(A,MAX_ALIEN_LEAP_DIST,1)
|
||||
leaping = 0
|
||||
update_icons()
|
||||
|
||||
/mob/living/carbon/alien/humanoid/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)
|
||||
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
|
||||
@@ -7,61 +7,7 @@
|
||||
max_plasma = 250
|
||||
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,7 +18,13 @@
|
||||
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
|
||||
update_hud() //TODO: remove the need for this to be here
|
||||
@@ -85,4 +37,55 @@
|
||||
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("\green <B>[src] begins to twist and contort!</B>"), 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
|
||||
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,28 @@
|
||||
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"
|
||||
|
||||
set category = "Alien"
|
||||
|
||||
if(locate(/obj/effect/alien/egg) in get_turf(src))
|
||||
src << "There's already an egg here."
|
||||
return
|
||||
|
||||
|
||||
if(constructing)
|
||||
src << "<span class='noticealien'>You are already constructing something.</span>"
|
||||
return
|
||||
|
||||
if(powerc(250,1))//Can't plant eggs on spess tiles. That's silly.
|
||||
adjustToxLoss(-250)
|
||||
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
|
||||
constructing = 1
|
||||
stunned = 5
|
||||
src << "<span class='noticealien'>You start laying an egg.</span>"
|
||||
spawn(30)
|
||||
adjustToxLoss(-250)
|
||||
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)
|
||||
constructing = 0
|
||||
stunned = 0
|
||||
return
|
||||
|
||||
@@ -9,14 +9,16 @@
|
||||
var/caste = ""
|
||||
var/next_attack = 0
|
||||
update_icon = 1
|
||||
var/leap_on_click = 0
|
||||
var/constructing = 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)
|
||||
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
|
||||
..()
|
||||
|
||||
@@ -58,6 +60,9 @@
|
||||
if (istype(src, /mob/living/carbon/alien/humanoid/hunter))
|
||||
tally = -1 // 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
|
||||
|
||||
@@ -116,12 +121,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 +135,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 +195,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."
|
||||
@@ -332,48 +293,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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -9,6 +9,7 @@
|
||||
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 +25,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
|
||||
..()
|
||||
|
||||
@@ -60,17 +61,26 @@
|
||||
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."
|
||||
return
|
||||
|
||||
|
||||
if(constructing)
|
||||
src << "<span class='noticealien'>You are already constructing something.</span>"
|
||||
return
|
||||
|
||||
if(powerc(250,1))//Can't plant eggs on spess tiles. That's silly.
|
||||
adjustToxLoss(-250)
|
||||
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
|
||||
constructing = 1
|
||||
stunned = 5
|
||||
src << "<span class='noticealien'>You start laying an egg.</span>"
|
||||
spawn(60)
|
||||
adjustToxLoss(-250)
|
||||
for(var/mob/O in viewers(src, null))
|
||||
O.show_message(text("<span class='alertalien'>[src] has laid an egg!</span>"), 1)
|
||||
new /obj/effect/alien/egg(loc)
|
||||
constructing = 0
|
||||
stunned = 0
|
||||
return
|
||||
|
||||
|
||||
/mob/living/carbon/alien/humanoid/queen/large
|
||||
@@ -113,7 +123,7 @@
|
||||
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/empress/large/new_xeno = new (loc)
|
||||
var/mob/living/carbon/alien/humanoid/empress/new_xeno = new (loc)
|
||||
if(mind)
|
||||
mind.transfer_to(new_xeno)
|
||||
else
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
|
||||
@@ -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()
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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"
|
||||
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,71 @@
|
||||
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.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 +121,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
|
||||
@@ -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.
|
||||
|
||||
@@ -464,19 +464,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
|
||||
|
||||
@@ -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
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -39,6 +39,7 @@
|
||||
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/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 +124,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
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -570,6 +570,7 @@ var/list/beam_master = list()
|
||||
icon_state = "xray"
|
||||
damage = 15
|
||||
irradiate = 30
|
||||
kill_count = 50
|
||||
|
||||
|
||||
/obj/item/projectile/beam/pulse
|
||||
|
||||
@@ -223,9 +223,4 @@
|
||||
/obj/item/projectile/bullet/neurotoxin/on_hit(var/atom/target, var/blocked = 0)
|
||||
if(isalien(target))
|
||||
return 0
|
||||
if(ishuman(target))
|
||||
var/mob/living/carbon/human/H = target
|
||||
if(prob(H.getarmor(def_zone, "melee")))
|
||||
H.visible_message("\red The [src.name] splatters uselessly on the armor!")
|
||||
return 0
|
||||
..() // Execute the rest of the code.
|
||||
|
||||
@@ -146,7 +146,7 @@
|
||||
user.visible_message(msg, self_msg)
|
||||
|
||||
target.op_stage.ribcage = 0
|
||||
|
||||
|
||||
//////////////////////////////////////////////////////////////////
|
||||
// ALIEN EMBRYO SURGERY //
|
||||
//////////////////////////////////////////////////////////////////
|
||||
@@ -163,7 +163,7 @@
|
||||
|
||||
can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
var/embryo = 0
|
||||
for(var/mob/living/carbon/alien/embryo/A in target)
|
||||
for(var/obj/item/alien_embryo/A in target)
|
||||
embryo = 1
|
||||
break
|
||||
return ..() && embryo && target.op_stage.ribcage == 2
|
||||
@@ -179,10 +179,8 @@
|
||||
user.visible_message("\red [user] rips the larva out of [target]'s ribcage!",
|
||||
"You rip the larva out of [target]'s ribcage!")
|
||||
|
||||
for(var/mob/living/carbon/alien/embryo/A in target)
|
||||
for(var/obj/item/alien_embryo/A in target)
|
||||
A.loc = A.loc.loc
|
||||
A.death()
|
||||
|
||||
|
||||
//////////////////////////////////////////////////////////////////
|
||||
// CHEST INTERNAL ORGAN SURGERY //
|
||||
|
||||
@@ -56,7 +56,6 @@
|
||||
var/stage = 0
|
||||
/obj/machinery/telepad_cargo/attackby(obj/item/weapon/W as obj, mob/user as mob)
|
||||
if(istype(W, /obj/item/weapon/wrench))
|
||||
anchored = 0
|
||||
playsound(src, 'sound/items/Ratchet.ogg', 50, 1)
|
||||
if(anchored)
|
||||
anchored = 0
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
var/teleport_cooldown = 0 // every index requires a bluespace crystal
|
||||
var/list/power_options = list(5, 10, 20, 25, 30, 40, 50, 80, 100)
|
||||
var/teleporting = 0
|
||||
var/starting_crystals = 3
|
||||
var/starting_crystals = 0
|
||||
var/max_crystals = 4
|
||||
var/list/crystals = list()
|
||||
var/obj/item/device/gps/inserted_gps
|
||||
|
||||
Reference in New Issue
Block a user