Addendum to: r1655

#Added an icon helper procs library by Lummox Jr.
#Added more icon+overlay functionality by DarkCampainger. Both can be found under icon_procs.dm.
#Added continuous beam code by Gunbuddy to atom.dm. You can now create continuous beams of energy/magic/monkeys/whatever. For instance, pAI cords. It's really awesome.
#Like optical camo? Well I have good news. New stealth "graphic." May need some fine tuning depending on player/coder preference. It's also a little slow to change (due to update_clothing()). With that said, it's a lot cooler than what we had before. Check it out.
#Added the getIconMask() and AddCamoOverlay() procs for the above.
#Added animated satic filter icons by Koil to icons.
#New force wall and shield icons. Shield icons moved to effects.dmi.
#Changed up the abandoned mining station.
#Moved a few carp spawn points closer to the station. Added a few more.

Ninjas:
No longer spawn whoknowswhere like they did at times before.
Get a unique stealth graphic. Yup. Also, small chance of failure.
New energy net icon and effects. Energy net now uses the beam code mentioned above. It will now check for stealth.
Fixed some graphical icon issues with ninja suit. Added a female black jumpsuit to icons for this reason. Added icon directions to ninja effects.
Some more general code cleanup.

git-svn-id: http://tgstation13.googlecode.com/svn/trunk@1664 316c924e-a436-60f5-8080-3fe189b3f50e
This commit is contained in:
noisomehollow@lycos.com
2011-06-05 09:25:15 +00:00
parent d67f72c5db
commit fe889a3e8d
25 changed files with 3136 additions and 2250 deletions

View File

@@ -4,14 +4,14 @@
var/datum/reagents/R = new/datum/reagents(100)
reagents = R
R.my_atom = src
if(src.name == "alien")
src.name = text("alien ([rand(1, 1000)])")
src.real_name = src.name
if(name == "alien")
name = text("alien ([rand(1, 1000)])")
real_name = name
spawn (1)
if(!istype(src, /mob/living/carbon/alien/humanoid/queen))
src.stand_icon = new /icon('alien.dmi', "alien_s")
src.lying_icon = new /icon('alien.dmi', "alien_l")
src.icon = src.stand_icon
stand_icon = new /icon('alien.dmi', "alien_s")
lying_icon = new /icon('alien.dmi', "alien_l")
icon = stand_icon
update_clothing()
src << "\blue Your icons have been generated!"
..()
@@ -20,23 +20,23 @@
//This is fine, works the same as a human
/mob/living/carbon/alien/humanoid/Bump(atom/movable/AM as mob|obj, yes)
spawn( 0 )
if ((!( yes ) || src.now_pushing))
if ((!( yes ) || now_pushing))
return
src.now_pushing = 0
now_pushing = 0
..()
if (!istype(AM, /atom/movable))
return
if (!src.now_pushing)
src.now_pushing = 1
if (!now_pushing)
now_pushing = 1
if (!AM.anchored)
var/t = get_dir(src, AM)
if (istype(AM, /obj/window))
if(AM:ini_dir == NORTHWEST || AM:ini_dir == NORTHEAST || AM:ini_dir == SOUTHWEST || AM:ini_dir == SOUTHEAST)
for(var/obj/window/win in get_step(AM,t))
src.now_pushing = 0
now_pushing = 0
return
step(AM, t)
src.now_pushing = null
now_pushing = null
return
return
@@ -55,14 +55,14 @@
..()
statpanel("Status")
if (src.client && src.client.holder)
if (client && client.holder)
stat(null, "([x], [y], [z])")
stat(null, "Intent: [src.a_intent]")
stat(null, "Move Mode: [src.m_intent]")
stat(null, "Intent: [a_intent]")
stat(null, "Move Mode: [m_intent]")
if (src.client.statpanel == "Status")
stat(null, "Plasma Stored: [src.toxloss]")
if (client.statpanel == "Status")
stat(null, "Plasma Stored: [toxloss]")
/mob/living/carbon/alien/humanoid/bullet_act(flag, A as obj)
var/shielded = 0
@@ -81,57 +81,57 @@
if ((shielded && flag != "bullet"))
if (!flag)
src << "\blue Your shield was disturbed by a laser!"
if(src.paralysis <= 12) src.paralysis = 12
src.updatehealth()
if(paralysis <= 12) paralysis = 12
updatehealth()
if (locate(/obj/item/weapon/grab, src))
var/mob/safe = null
if (istype(src.l_hand, /obj/item/weapon/grab))
var/obj/item/weapon/grab/G = src.l_hand
if ((G.state == 3 && get_dir(src, A) == src.dir))
if (istype(l_hand, /obj/item/weapon/grab))
var/obj/item/weapon/grab/G = l_hand
if ((G.state == 3 && get_dir(src, A) == dir))
safe = G.affecting
if (istype(src.r_hand, /obj/item/weapon/grab))
var/obj/item/weapon.grab/G = src.r_hand
if ((G.state == 3 && get_dir(src, A) == src.dir))
if (istype(r_hand, /obj/item/weapon/grab))
var/obj/item/weapon.grab/G = r_hand
if ((G.state == 3 && get_dir(src, A) == dir))
safe = G.affecting
if (safe)
return safe.bullet_act(flag, A)
switch(flag)//Did these people not know that switch is a function that exists? I swear, half of the code ignores switch completely.
if(PROJECTILE_BULLET)
var/d = 51
if (src.stat != 2)
src.bruteloss += d
src.updatehealth()
if (stat != 2)
bruteloss += d
updatehealth()
if (prob(50)&&weakened <= 5)
src.weakened = 5
weakened = 5
if(PROJECTILE_TASER)
if (prob(75) && src.stunned <= 10)
src.stunned = 10
if (prob(75) && stunned <= 10)
stunned = 10
else
src.weakened = 10
weakened = 10
if(PROJECTILE_DART)//Nothing is supposed to happen, just making sure it's listed.
if(PROJECTILE_LASER)
var/d = 20
// if (!src.eye_blurry) src.eye_blurry = 4 //This stuff makes no sense but lasers need a buff./ It really doesn't make any sense. /N
if (prob(25)) src.stunned++
if (src.stat != 2)
src.bruteloss += d
src.updatehealth()
// if (!eye_blurry) eye_blurry = 4 //This stuff makes no sense but lasers need a buff./ It really doesn't make any sense. /N
if (prob(25)) stunned++
if (stat != 2)
bruteloss += d
updatehealth()
if (prob(25))
src.stunned = 1
stunned = 1
if(PROJECTILE_PULSE)
var/d = 40
if (src.stat != 2)
src.bruteloss += d
src.updatehealth()
if (stat != 2)
bruteloss += d
updatehealth()
if (prob(50))
src.stunned = min(src.stunned, 5)
stunned = min(stunned, 5)
if(PROJECTILE_BOLT)
src.toxloss += 3
src.radiation += 100
src.updatehealth()
src.drowsyness += 5
toxloss += 3
radiation += 100
updatehealth()
drowsyness += 5
return
/mob/living/carbon/alien/humanoid/emp_act(severity)
@@ -142,15 +142,14 @@
..()
/mob/living/carbon/alien/humanoid/ex_act(severity)
flick("flash", src.flash)
flick("flash", flash)
if (src.stat == 2 && src.client)
src.gib(1)
if (stat == 2 && client)
gib(1)
return
else if (src.stat == 2 && !src.client)
var/virus = src.virus
gibs(src.loc, virus)
else if (stat == 2 && !client)
gibs(loc, virus)
del(src)
return
@@ -165,7 +164,7 @@
switch (severity)
if (1.0)
b_loss += 500
src.gib(1)
gib(1)
return
if (2.0)
@@ -174,39 +173,39 @@
f_loss += 60
src.ear_damage += 30
src.ear_deaf += 120
ear_damage += 30
ear_deaf += 120
if(3.0)
b_loss += 30
if (prob(50) && !shielded)
src.paralysis += 1
src.ear_damage += 15
src.ear_deaf += 60
paralysis += 1
ear_damage += 15
ear_deaf += 60
src.bruteloss += b_loss
src.fireloss += f_loss
bruteloss += b_loss
fireloss += f_loss
src.updatehealth()
updatehealth()
/mob/living/carbon/alien/humanoid/blob_act()
if (src.stat == 2)
if (stat == 2)
return
var/shielded = 0
for(var/obj/item/device/shield/S in src)
if (S.active)
shielded = 1
var/damage = null
if (src.stat != 2)
if (stat != 2)
damage = rand(30,40)
if(shielded)
damage /= 4
src.show_message("\red The magma splashes on you!")
show_message("\red The magma splashes on you!")
src.fireloss += damage
fireloss += damage
return
@@ -226,7 +225,7 @@
l_hand = null
/mob/living/carbon/alien/humanoid/db_click(text, t1)
var/obj/item/W = src.equipped()
var/obj/item/W = equipped()
var/emptyHand = (W == null)
if ((!emptyHand) && (!istype(W, /obj/item)))
return
@@ -238,55 +237,55 @@
//if emptyhand then wear the suit, no bedsheet clothes for the alien
if("o_clothing")
if (src.wear_suit)
if (wear_suit)
if (emptyHand)
src.wear_suit.DblClick()
wear_suit.DblClick()
return
if (( istype(W, /obj/alien/skin_suit) ))
src.u_equip(W)
src.head = W
u_equip(W)
head = W
return
return
/* if (!( istype(W, /obj/item/clothing/suit) ))
return
src.u_equip(W)
src.wear_suit = W
u_equip(W)
wear_suit = W
W.equipped(src, text)
*/
if("head")
if (src.head)
if (head)
if (emptyHand)
src.head.DblClick()
head.DblClick()
return
if (( istype(W, /obj/alien/head) ))
src.u_equip(W)
src.head = W
u_equip(W)
head = W
return
return
/* if (!( istype(W, /obj/item/clothing/head) ))
return
src.u_equip(W)
src.head = W
u_equip(W)
head = W
W.equipped(src, text)
*/
if("storage1")
if (src.l_store)
if (l_store)
if (emptyHand)
src.l_store.DblClick()
l_store.DblClick()
return
if ((!( istype(W, /obj/item) ) || W.w_class > 3))
return
src.u_equip(W)
src.l_store = W
u_equip(W)
l_store = W
if("storage2")
if (src.r_store)
if (r_store)
if (emptyHand)
src.r_store.DblClick()
r_store.DblClick()
return
if ((!( istype(W, /obj/item) ) || W.w_class > 3))
return
src.u_equip(W)
src.r_store = W
u_equip(W)
r_store = W
else
return
@@ -294,51 +293,51 @@
for(var/mob/M in viewers(src, null))
if ((M.client && !( M.blinded )))
M.show_message(text("\red [] has been hit by []", src, O), 1)
if (src.health > 0)
src.bruteloss += (istype(O, /obj/meteor/small) ? 10 : 25)
src.fireloss += 30
if (health > 0)
bruteloss += (istype(O, /obj/meteor/small) ? 10 : 25)
fireloss += 30
src.updatehealth()
updatehealth()
return
/mob/living/carbon/alien/humanoid/Move(a, b, flag)
if (src.buckled)
if (buckled)
return 0
if (src.restrained())
src.pulling = null
if (restrained())
pulling = null
var/t7 = 1
if (src.restrained())
if (restrained())
for(var/mob/M in range(src, 1))
if ((M.pulling == src && M.stat == 0 && !( M.restrained() )))
t7 = null
if ((t7 && (src.pulling && ((get_dist(src, src.pulling) <= 1 || src.pulling.loc == src.loc) && (src.client && src.client.moving)))))
var/turf/T = src.loc
if ((t7 && (pulling && ((get_dist(src, pulling) <= 1 || pulling.loc == loc) && (client && client.moving)))))
var/turf/T = loc
. = ..()
if (src.pulling && src.pulling.loc)
if(!( isturf(src.pulling.loc) ))
src.pulling = null
if (pulling && pulling.loc)
if(!( isturf(pulling.loc) ))
pulling = null
return
else
if(Debug)
diary <<"src.pulling disappeared? at __LINE__ in mob.dm - src.pulling = [src.pulling]"
diary <<"pulling disappeared? at __LINE__ in mob.dm - pulling = [pulling]"
diary <<"REPORT THIS"
/////
if(src.pulling && src.pulling.anchored)
src.pulling = null
if(pulling && pulling.anchored)
pulling = null
return
if (!src.restrained())
var/diag = get_dir(src, src.pulling)
if (!restrained())
var/diag = get_dir(src, pulling)
if ((diag - 1) & diag)
else
diag = null
if ((get_dist(src, src.pulling) > 1 || diag))
if (ismob(src.pulling))
var/mob/M = src.pulling
if ((get_dist(src, pulling) > 1 || diag))
if (ismob(pulling))
var/mob/M = pulling
var/ok = 1
if (locate(/obj/item/weapon/grab, M.grabbed_by))
if (prob(75))
@@ -356,144 +355,144 @@
var/t = M.pulling
M.pulling = null
step(src.pulling, get_dir(src.pulling.loc, T))
step(pulling, get_dir(pulling.loc, T))
M.pulling = t
else
if (src.pulling)
if (istype(src.pulling, /obj/window))
if(src.pulling:ini_dir == NORTHWEST || src.pulling:ini_dir == NORTHEAST || src.pulling:ini_dir == SOUTHWEST || src.pulling:ini_dir == SOUTHEAST)
for(var/obj/window/win in get_step(src.pulling,get_dir(src.pulling.loc, T)))
src.pulling = null
if (src.pulling)
step(src.pulling, get_dir(src.pulling.loc, T))
if (pulling)
if (istype(pulling, /obj/window))
if(pulling:ini_dir == NORTHWEST || pulling:ini_dir == NORTHEAST || pulling:ini_dir == SOUTHWEST || pulling:ini_dir == SOUTHEAST)
for(var/obj/window/win in get_step(pulling,get_dir(pulling.loc, T)))
pulling = null
if (pulling)
step(pulling, get_dir(pulling.loc, T))
else
src.pulling = null
pulling = null
. = ..()
if ((src.s_active && !( s_active in src.contents ) ))
src.s_active.close(src)
if ((s_active && !( s_active in contents ) ))
s_active.close(src)
return
/mob/living/carbon/alien/humanoid/update_clothing()
..()
if (src.monkeyizing)
if (monkeyizing)
return
src.overlays = null
overlays = null
if(src.buckled)
if(istype(src.buckled, /obj/stool/bed))
src.lying = 1
if(buckled)
if(istype(buckled, /obj/stool/bed))
lying = 1
else
src.lying = 0
lying = 0
// Automatically drop anything in store / id / belt if you're not wearing a uniform.
if (src.zone_sel)
src.zone_sel.overlays = null
src.zone_sel.overlays += src.body_standing
src.zone_sel.overlays += image("icon" = 'zone_sel.dmi', "icon_state" = text("[]", src.zone_sel.selecting))
if (zone_sel)
zone_sel.overlays = null
zone_sel.overlays += body_standing
zone_sel.overlays += image("icon" = 'zone_sel.dmi', "icon_state" = text("[]", zone_sel.selecting))
if (src.lying)
if(src.update_icon)
src.icon = src.lying_icon
if (lying)
if(update_icon)
icon = lying_icon
src.overlays += src.body_lying
overlays += body_lying
if (src.face_lying)
src.overlays += src.face_lying
if (face_lying)
overlays += face_lying
else
if(src.update_icon)
src.icon = src.stand_icon
if(update_icon)
icon = stand_icon
src.overlays += src.body_standing
overlays += body_standing
if (src.face_standing)
src.overlays += src.face_standing
if (face_standing)
overlays += face_standing
// Uniform
if (src.client)
src.client.screen -= src.hud_used.other
src.client.screen -= src.hud_used.intents
src.client.screen -= src.hud_used.mov_int
if (client)
client.screen -= hud_used.other
client.screen -= hud_used.intents
client.screen -= hud_used.mov_int
// ???
if (src.client && src.other)
src.client.screen += src.hud_used.other
if (client && other)
client.screen += hud_used.other
if (src.client)
if (src.i_select)
if (src.intent)
src.client.screen += src.hud_used.intents
if (client)
if (i_select)
if (intent)
client.screen += hud_used.intents
var/list/L = dd_text2list(src.intent, ",")
var/list/L = dd_text2list(intent, ",")
L[1] += ":-11"
src.i_select.screen_loc = dd_list2text(L,",") //ICONS4, FUCKING SHIT
i_select.screen_loc = dd_list2text(L,",") //ICONS4, FUCKING SHIT
else
src.i_select.screen_loc = null
if (src.m_select)
if (src.m_int)
src.client.screen += src.hud_used.mov_int
i_select.screen_loc = null
if (m_select)
if (m_int)
client.screen += hud_used.mov_int
var/list/L = dd_text2list(src.m_int, ",")
var/list/L = dd_text2list(m_int, ",")
L[1] += ":-11"
src.m_select.screen_loc = dd_list2text(L,",") //ICONS4, FUCKING SHIT
m_select.screen_loc = dd_list2text(L,",") //ICONS4, FUCKING SHIT
else
src.m_select.screen_loc = null
m_select.screen_loc = null
if (src.wear_suit)
var/t1 = src.wear_suit.item_state
if (wear_suit)
var/t1 = wear_suit.item_state
if (!t1)
t1 = src.wear_suit.icon_state
src.overlays += image("icon" = 'mob.dmi', "icon_state" = text("[][]", t1, (!( src.lying ) ? null : "2")), "layer" = MOB_LAYER)
if (src.wear_suit.blood_DNA)
if (istype(src.wear_suit, /obj/item/clothing/suit/armor))
src.overlays += image("icon" = 'blood.dmi', "icon_state" = "armorblood[!src.lying ? "" : "2"]", "layer" = MOB_LAYER)
t1 = wear_suit.icon_state
overlays += image("icon" = 'mob.dmi', "icon_state" = text("[][]", t1, (!( lying ) ? null : "2")), "layer" = MOB_LAYER)
if (wear_suit.blood_DNA)
if (istype(wear_suit, /obj/item/clothing/suit/armor))
overlays += image("icon" = 'blood.dmi', "icon_state" = "armorblood[!lying ? "" : "2"]", "layer" = MOB_LAYER)
else
src.overlays += image("icon" = 'blood.dmi', "icon_state" = "suitblood[!src.lying ? "" : "2"]", "layer" = MOB_LAYER)
src.wear_suit.screen_loc = ui_iclothing
if (istype(src.wear_suit, /obj/item/clothing/suit/straight_jacket))
if (src.handcuffed)
src.handcuffed.loc = src.loc
src.handcuffed.layer = initial(src.handcuffed.layer)
src.handcuffed = null
if ((src.l_hand || src.r_hand))
var/h = src.hand
src.hand = 1
overlays += image("icon" = 'blood.dmi', "icon_state" = "suitblood[!lying ? "" : "2"]", "layer" = MOB_LAYER)
wear_suit.screen_loc = ui_iclothing
if (istype(wear_suit, /obj/item/clothing/suit/straight_jacket))
if (handcuffed)
handcuffed.loc = loc
handcuffed.layer = initial(handcuffed.layer)
handcuffed = null
if ((l_hand || r_hand))
var/h = hand
hand = 1
drop_item()
src.hand = 0
hand = 0
drop_item()
src.hand = h
hand = h
// Head
if (src.head)
var/t1 = src.head.item_state
if (head)
var/t1 = head.item_state
if (!t1)
t1 = src.head.icon_state
src.overlays += image("icon" = 'mob.dmi', "icon_state" = text("[][]", t1, (!( src.lying ) ? null : "2")), "layer" = MOB_LAYER)
if (src.head.blood_DNA)
src.overlays += image("icon" = 'blood.dmi', "icon_state" = "helmetblood[!src.lying ? "" : "2"]", "layer" = MOB_LAYER)
src.head.screen_loc = ui_oclothing
t1 = head.icon_state
overlays += image("icon" = 'mob.dmi', "icon_state" = text("[][]", t1, (!( lying ) ? null : "2")), "layer" = MOB_LAYER)
if (head.blood_DNA)
overlays += image("icon" = 'blood.dmi', "icon_state" = "helmetblood[!lying ? "" : "2"]", "layer" = MOB_LAYER)
head.screen_loc = ui_oclothing
if (src.l_store)
src.l_store.screen_loc = ui_storage1
if (l_store)
l_store.screen_loc = ui_storage1
if (src.r_store)
src.r_store.screen_loc = ui_storage2
if (r_store)
r_store.screen_loc = ui_storage2
if (src.client)
src.client.screen -= src.contents
src.client.screen += src.contents
if (client)
client.screen -= contents
client.screen += contents
if (src.r_hand)
src.overlays += image("icon" = 'items_righthand.dmi', "icon_state" = src.r_hand.item_state ? src.r_hand.item_state : src.r_hand.icon_state, "layer" = MOB_LAYER+1)
if (r_hand)
overlays += image("icon" = 'items_righthand.dmi', "icon_state" = r_hand.item_state ? r_hand.item_state : r_hand.icon_state, "layer" = MOB_LAYER+1)
src.r_hand.screen_loc = ui_id
r_hand.screen_loc = ui_id
if (src.l_hand)
src.overlays += image("icon" = 'items_lefthand.dmi', "icon_state" = src.l_hand.item_state ? src.l_hand.item_state : src.l_hand.icon_state, "layer" = MOB_LAYER+1)
if (l_hand)
overlays += image("icon" = 'items_lefthand.dmi', "icon_state" = l_hand.item_state ? l_hand.item_state : l_hand.icon_state, "layer" = MOB_LAYER+1)
src.l_hand.screen_loc = ui_belt
l_hand.screen_loc = ui_belt
@@ -508,21 +507,21 @@
shielded = 2
break
if (shielded == 2 || src.alien_invis)
src.invisibility = 2
if (shielded == 2 || alien_invis)
invisibility = 2
//New stealth. Hopefully doesn't lag too much. /N
if(istype(loc, /turf))//If they are standing on a turf.
AddCamoOverlay(loc)//Overlay camo.
else
src.invisibility = 0
if (shielded || src.alien_invis)
src.overlays += image("icon" = 'mob.dmi', "icon_state" = "shield", "layer" = MOB_LAYER)
invisibility = 0
for (var/mob/M in viewers(1, src))
if ((M.client && M.machine == src))
spawn (0)
src.show_inv(M)
show_inv(M)
return
src.last_b_state = src.stat
last_b_state = stat
/mob/living/carbon/alien/humanoid/hand_p(mob/M as mob)
if (!ticker)
@@ -532,13 +531,13 @@
if (M.a_intent == "hurt")
if (istype(M.wear_mask, /obj/item/clothing/mask/muzzle))
return
if (src.health > 0)
if (health > 0)
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)
bruteloss += rand(1, 3)
src.updatehealth()
updatehealth()
return
/mob/living/carbon/alien/humanoid/attack_paw(mob/living/carbon/monkey/M as mob)
@@ -548,7 +547,7 @@
M << "You cannot attack people before the game has started."
return
if (istype(src.loc, /turf) && istype(src.loc.loc, /area/start))
if (istype(loc, /turf) && istype(loc.loc, /area/start))
M << "No attacking people at spawn, you jackass."
return
..()
@@ -556,17 +555,17 @@
switch(M.a_intent)
if ("help")
src.help_shake_act(M)
help_shake_act(M)
else
if (istype(src.wear_mask, /obj/item/clothing/mask/muzzle))
if (istype(wear_mask, /obj/item/clothing/mask/muzzle))
return
if (src.health > 0)
playsound(src.loc, 'bite.ogg', 50, 1, -1)
if (health > 0)
playsound(loc, '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)
src.bruteloss += rand(1, 3)
src.updatehealth()
bruteloss += rand(1, 3)
updatehealth()
return
/mob/living/carbon/alien/humanoid/attack_hand(mob/living/carbon/human/M as mob)
@@ -574,7 +573,7 @@
M << "You cannot attack people before the game has started."
return
if (istype(src.loc, /turf) && istype(src.loc.loc, /area/start))
if (istype(loc, /turf) && istype(loc.loc, /area/start))
M << "No attacking people at spawn, you jackass."
return
@@ -583,12 +582,12 @@
if(M.gloves && M.gloves.elecgen == 1)//Stungloves. Any contact will stun the alien.
if(M.gloves.uses > 0)
M.gloves.uses--
if (src.weakened < 5)
src.weakened = 5
if (src.stuttering < 5)
src.stuttering = 5
if (src.stunned < 5)
src.stunned = 5
if (weakened < 5)
weakened = 5
if (stuttering < 5)
stuttering = 5
if (stunned < 5)
stunned = 5
for(var/mob/O in viewers(src, null))
if ((O.client && !( O.blinded )))
O.show_message("\red <B>[src] has been touched with the stun gloves by [M]!</B>", 1, "\red You hear someone fall.", 2)
@@ -596,20 +595,20 @@
switch(M.a_intent)
if ("help")
if (src.health > 0)
src.help_shake_act(M)
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 )) || ((src.head && src.head.flags & 4) || (src.wear_mask && !( src.wear_mask.flags & 32 ))))))
if (((M.head && M.head.flags & 4) || ((M.wear_mask && !( M.wear_mask.flags & 32 )) || ((head && head.flags & 4) || (wear_mask && !( wear_mask.flags & 32 ))))))
M << "\blue <B>Remove that mask!</B>"
return
var/obj/equip_e/human/O = new /obj/equip_e/human( )
O.source = M
O.target = src
O.s_loc = M.loc
O.t_loc = src.loc
O.t_loc = loc
O.place = "CPR"
src.requests += O
requests += O
spawn( 0 )
O.process()
return
@@ -625,9 +624,9 @@
M.r_hand = G
G.layer = 20
G.affecting = src
src.grabbed_by += G
grabbed_by += G
G.synch()
playsound(src.loc, 'thudswoosh.ogg', 50, 1, -1)
playsound(loc, '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)
@@ -638,46 +637,46 @@
if (M.mutations & HULK)//HULK SMASH
damage += 14
spawn(0)
src.paralysis += 5
paralysis += 5
step_away(src,M,15)
sleep(3)
step_away(src,M,15)
playsound(src.loc, "punch", 25, 1, -1)
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 > 9||prob(5))//Regular humans have a very small chance of weakening an alien.
if (src.weakened < 10)
src.weakened = rand(1,5)
if (weakened < 10)
weakened = rand(1,5)
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)
src.bruteloss += damage
src.updatehealth()
bruteloss += damage
updatehealth()
else
playsound(src.loc, 'punchmiss.ogg', 25, 1, -1)
playsound(loc, '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)
if ("disarm")
if (!src.lying)
if (!lying)
var/randn = rand(1, 100)
if (randn <= 5)//Very small chance to push an alien down.
src.weakened = 2
playsound(src.loc, 'thudswoosh.ogg', 50, 1, -1)
weakened = 2
playsound(loc, 'thudswoosh.ogg', 50, 1, -1)
for(var/mob/O in viewers(src, null))
if ((O.client && !( O.blinded )))
O.show_message(text("\red <B>[] has pushed down []!</B>", M, src), 1)
else
if (randn <= 50)
src.drop_item()
playsound(src.loc, 'thudswoosh.ogg', 50, 1, -1)
drop_item()
playsound(loc, 'thudswoosh.ogg', 50, 1, -1)
for(var/mob/O in viewers(src, null))
if ((O.client && !( O.blinded )))
O.show_message(text("\red <B>[] has disarmed []!</B>", M, src), 1)
else
playsound(src.loc, 'punchmiss.ogg', 25, 1, -1)
playsound(loc, '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 disarm []!</B>", M, src), 1)
@@ -693,7 +692,7 @@ In all, this is a lot like the monkey code. /N
M << "You cannot attack people before the game has started."
return
if (istype(src.loc, /turf) && istype(src.loc.loc, /area/start))
if (istype(loc, /turf) && istype(loc.loc, /area/start))
M << "No attacking people at spawn, you jackass."
return
@@ -702,31 +701,31 @@ In all, this is a lot like the monkey code. /N
switch(M.a_intent)
if ("help")
src.sleeping = 0
src.resting = 0
if (src.paralysis >= 3) src.paralysis -= 3
if (src.stunned >= 3) src.stunned -= 3
if (src.weakened >= 3) src.weakened -= 3
sleeping = 0
resting = 0
if (paralysis >= 3) paralysis -= 3
if (stunned >= 3) stunned -= 3
if (weakened >= 3) weakened -= 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 (src.health > 0)
playsound(src.loc, 'bite.ogg', 50, 1, -1)
if (health > 0)
playsound(loc, '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)
src.bruteloss += damage
src.updatehealth()
bruteloss += damage
updatehealth()
else
M << "\green <B>[src.name] is too injured for that.</B>"
M << "\green <B>[name] is too injured for that.</B>"
return
/mob/living/carbon/alien/humanoid/restrained()
if (src.handcuffed)
if (handcuffed)
return 1
return 0
@@ -738,25 +737,25 @@ In all, this is a lot like the monkey code. /N
user.machine = src
var/dat = {"
<B><HR><FONT size=3>[src.name]</FONT></B>
<B><HR><FONT size=3>[name]</FONT></B>
<BR><HR>
<BR><B>Left Hand:</B> <A href='?src=\ref[src];item=l_hand'>[(src.l_hand ? text("[]", src.l_hand) : "Nothing")]</A>
<BR><B>Right Hand:</B> <A href='?src=\ref[src];item=r_hand'>[(src.r_hand ? text("[]", src.r_hand) : "Nothing")]</A>
<BR><B>Head:</B> <A href='?src=\ref[src];item=head'>[(src.head ? text("[]", src.head) : "Nothing")]</A>
<BR><B>(Exo)Suit:</B> <A href='?src=\ref[src];item=suit'>[(src.wear_suit ? text("[]", src.wear_suit) : "Nothing")]</A>
<BR><B>Left Hand:</B> <A href='?src=\ref[src];item=l_hand'>[(l_hand ? text("[]", l_hand) : "Nothing")]</A>
<BR><B>Right Hand:</B> <A href='?src=\ref[src];item=r_hand'>[(r_hand ? text("[]", r_hand) : "Nothing")]</A>
<BR><B>Head:</B> <A href='?src=\ref[src];item=head'>[(head ? text("[]", head) : "Nothing")]</A>
<BR><B>(Exo)Suit:</B> <A href='?src=\ref[src];item=suit'>[(wear_suit ? text("[]", wear_suit) : "Nothing")]</A>
<BR><A href='?src=\ref[src];item=pockets'>Empty Pockets</A>
<BR><A href='?src=\ref[user];mach_close=mob[src.name]'>Close</A>
<BR><A href='?src=\ref[user];mach_close=mob[name]'>Close</A>
<BR>"}
user << browse(dat, text("window=mob[src.name];size=340x480"))
onclose(user, "mob[src.name]")
user << browse(dat, text("window=mob[name];size=340x480"))
onclose(user, "mob[name]")
return
/mob/living/carbon/alien/humanoid/updatehealth()
if (src.nodamage == 0)
if (nodamage == 0)
//oxyloss is only used for suicide
//toxloss isn't used for aliens, its actually used as alien powers!!
src.health = 100 - src.oxyloss - src.fireloss - src.bruteloss
health = 100 - oxyloss - fireloss - bruteloss
else
src.health = 100
src.stat = 0
health = 100
stat = 0

View File

@@ -3,9 +3,9 @@
var/datum/reagents/R = new/datum/reagents(100)
reagents = R
R.my_atom = src
if(src.name == "alien larva")
src.name = text("alien larva ([rand(1, 1000)])")
src.real_name = src.name
if(name == "alien larva")
name = text("alien larva ([rand(1, 1000)])")
real_name = name
spawn (1)
update_clothing()
src << "\blue Your icons have been generated!"
@@ -17,9 +17,9 @@
/mob/living/carbon/alien/larva/Bump(atom/movable/AM as mob|obj, yes)
spawn( 0 )
if ((!( yes ) || src.now_pushing))
if ((!( yes ) || now_pushing))
return
src.now_pushing = 1
now_pushing = 1
if(ismob(AM))
var/mob/tmob = AM
if(istype(tmob, /mob/living/carbon/human) && tmob.mutations & FAT)
@@ -27,18 +27,18 @@
for(var/mob/M in viewers(src, null))
if(M.client)
M << "\red <B>[src] fails to push [tmob]'s fat ass out of the way.</B>"
src.now_pushing = 0
now_pushing = 0
return
src.now_pushing = 0
now_pushing = 0
..()
if (!( istype(AM, /atom/movable) ))
return
if (!( src.now_pushing ))
src.now_pushing = 1
if (!( now_pushing ))
now_pushing = 1
if (!( AM.anchored ))
var/t = get_dir(src, AM)
step(AM, t)
src.now_pushing = null
now_pushing = null
return
return
@@ -47,28 +47,28 @@
..()
statpanel("Status")
if (src.client && src.client.holder)
if (client && client.holder)
stat(null, "([x], [y], [z])")
stat(null, "Intent: [src.a_intent]")
stat(null, "Move Mode: [src.m_intent]")
stat(null, "Intent: [a_intent]")
stat(null, "Move Mode: [m_intent]")
if (src.client.statpanel == "Status")
stat(null, "Progress: [src.amount_grown]/200")
stat(null, "Plasma Stored: [src.toxloss]")
if (client.statpanel == "Status")
stat(null, "Progress: [amount_grown]/200")
stat(null, "Plasma Stored: [toxloss]")
//This is okay I guess unless we add alien shields or something. Should be cleaned up a bit.
/mob/living/carbon/alien/larva/bullet_act(flag, A as obj)
if (locate(/obj/item/weapon/grab, src))
var/mob/safe = null
if (istype(src.l_hand, /obj/item/weapon/grab))
var/obj/item/weapon/grab/G = src.l_hand
if ((G.state == 3 && get_dir(src, A) == src.dir))
if (istype(l_hand, /obj/item/weapon/grab))
var/obj/item/weapon/grab/G = l_hand
if ((G.state == 3 && get_dir(src, A) == dir))
safe = G.affecting
if (istype(src.r_hand, /obj/item/weapon/grab))
var/obj/item/weapon.grab/G = src.r_hand
if ((G.state == 3 && get_dir(src, A) == src.dir))
if (istype(r_hand, /obj/item/weapon/grab))
var/obj/item/weapon.grab/G = r_hand
if ((G.state == 3 && get_dir(src, A) == dir))
safe = G.affecting
if (safe)
return safe.bullet_act(flag, A)
@@ -76,49 +76,49 @@
if(PROJECTILE_BULLET)
var/d = 51
if (src.stat != 2)
src.bruteloss += d
if (stat != 2)
bruteloss += d
src.updatehealth()
updatehealth()
if (prob(50))
if(src.weakened <= 5) src.weakened = 5
if(weakened <= 5) weakened = 5
return
if(PROJECTILE_TASER)
if (prob(75) && src.stunned <= 10)
src.stunned = 10
if (prob(75) && stunned <= 10)
stunned = 10
else
src.weakened = 10
if (src.stuttering < 10)
src.stuttering = 10
weakened = 10
if (stuttering < 10)
stuttering = 10
if(PROJECTILE_DART)
return
if(PROJECTILE_LASER)
var/d = 20
// if (!src.eye_blurry) src.eye_blurry = 4 //This stuff makes no sense but lasers need a buff./ It really doesn't make any sense. /N
if (prob(25)) src.stunned++
// if (!eye_blurry) eye_blurry = 4 //This stuff makes no sense but lasers need a buff./ It really doesn't make any sense. /N
if (prob(25)) stunned++
if (src.stat != 2)
src.bruteloss += d
if (stat != 2)
bruteloss += d
src.updatehealth()
updatehealth()
if (prob(25))
src.stunned = 1
stunned = 1
if(PROJECTILE_PULSE)
var/d = 40
if (src.stat != 2)
src.bruteloss += d
if (stat != 2)
bruteloss += d
src.updatehealth()
updatehealth()
if (prob(50))
src.stunned = min(src.stunned, 5)
stunned = min(stunned, 5)
if(PROJECTILE_BOLT)
src.toxloss += 3
src.radiation += 100
src.updatehealth()
src.stuttering += 5
src.drowsyness += 5
toxloss += 3
radiation += 100
updatehealth()
stuttering += 5
drowsyness += 5
return
/mob/living/carbon/alien/larva/emp_act(severity)
@@ -126,15 +126,14 @@
/mob/living/carbon/alien/larva/ex_act(severity)
flick("flash", src.flash)
flick("flash", flash)
if (src.stat == 2 && src.client)
src.gib(1)
if (stat == 2 && client)
gib(1)
return
else if (src.stat == 2 && !src.client)
var/virus = src.virus
gibs(src.loc, virus)
else if (stat == 2 && !client)
gibs(loc, virus)
del(src)
return
@@ -143,7 +142,7 @@
switch (severity)
if (1.0)
b_loss += 500
src.gib(1)
gib(1)
return
if (2.0)
@@ -152,42 +151,42 @@
f_loss += 60
src.ear_damage += 30
src.ear_deaf += 120
ear_damage += 30
ear_deaf += 120
if(3.0)
b_loss += 30
if (prob(50))
src.paralysis += 1
src.ear_damage += 15
src.ear_deaf += 60
paralysis += 1
ear_damage += 15
ear_deaf += 60
src.bruteloss += b_loss
src.fireloss += f_loss
bruteloss += b_loss
fireloss += f_loss
src.updatehealth()
updatehealth()
/mob/living/carbon/alien/larva/blob_act()
if (src.stat == 2)
if (stat == 2)
return
var/shielded = 0
var/damage = null
if (src.stat != 2)
if (stat != 2)
damage = rand(10,30)
if(shielded)
damage /= 4
//src.paralysis += 1
//paralysis += 1
src.show_message("\red The magma splashes on you!")
show_message("\red The magma splashes on you!")
src.fireloss += damage
fireloss += damage
src.updatehealth()
updatehealth()
return
//can't unequip since it can't equip anything
@@ -202,46 +201,46 @@
for(var/mob/M in viewers(src, null))
if ((M.client && !( M.blinded )))
M.show_message(text("\red [] has been hit by []", src, O), 1)
if (src.health > 0)
src.bruteloss += (istype(O, /obj/meteor/small) ? 10 : 25)
src.fireloss += 30
if (health > 0)
bruteloss += (istype(O, /obj/meteor/small) ? 10 : 25)
fireloss += 30
src.updatehealth()
updatehealth()
return
/mob/living/carbon/alien/larva/Move(a, b, flag)
var/t7 = 1
if (src.restrained())
if (restrained())
for(var/mob/M in range(src, 1))
if ((M.pulling == src && M.stat == 0 && !( M.restrained() )))
t7 = null
if ((t7 && (src.pulling && ((get_dist(src, src.pulling) <= 1 || src.pulling.loc == src.loc) && (src.client && src.client.moving)))))
var/turf/T = src.loc
if ((t7 && (pulling && ((get_dist(src, pulling) <= 1 || pulling.loc == loc) && (client && client.moving)))))
var/turf/T = loc
. = ..()
if (src.pulling && src.pulling.loc)
if(!( isturf(src.pulling.loc) ))
src.pulling = null
if (pulling && pulling.loc)
if(!( isturf(pulling.loc) ))
pulling = null
return
else
if(Debug)
diary <<"src.pulling disappeared? at __LINE__ in mob.dm - src.pulling = [src.pulling]"
diary <<"pulling disappeared? at __LINE__ in mob.dm - pulling = [pulling]"
diary <<"REPORT THIS"
/////
if(src.pulling && src.pulling.anchored)
src.pulling = null
if(pulling && pulling.anchored)
pulling = null
return
if (!src.restrained())
var/diag = get_dir(src, src.pulling)
if (!restrained())
var/diag = get_dir(src, pulling)
if ((diag - 1) & diag)
else
diag = null
if ((get_dist(src, src.pulling) > 1 || diag))
if (ismob(src.pulling))
var/mob/M = src.pulling
if ((get_dist(src, pulling) > 1 || diag))
if (ismob(pulling))
var/mob/M = pulling
var/ok = 1
if (locate(/obj/item/weapon/grab, M.grabbed_by))
if (prob(75))
@@ -258,57 +257,56 @@
if (ok)
var/t = M.pulling
M.pulling = null
step(src.pulling, get_dir(src.pulling.loc, T))
step(pulling, get_dir(pulling.loc, T))
M.pulling = t
else
if (src.pulling)
step(src.pulling, get_dir(src.pulling.loc, T))
if (pulling)
step(pulling, get_dir(pulling.loc, T))
else
src.pulling = null
pulling = null
. = ..()
if ((src.s_active && !( s_active in src.contents ) ))
src.s_active.close(src)
if ((s_active && !( s_active in contents ) ))
s_active.close(src)
return
/mob/living/carbon/alien/larva/update_clothing()
..()
if (src.monkeyizing)
if (monkeyizing)
return
if (src.client)
if (src.i_select)
if (src.intent)
src.client.screen += src.hud_used.intents
if (client)
if (i_select)
if (intent)
client.screen += hud_used.intents
var/list/L = dd_text2list(src.intent, ",")
var/list/L = dd_text2list(intent, ",")
L[1] += ":-11"
src.i_select.screen_loc = dd_list2text(L,",") //ICONS4, FUCKING SHIT
i_select.screen_loc = dd_list2text(L,",") //ICONS4, FUCKING SHIT
else
src.i_select.screen_loc = null
if (src.m_select)
if (src.m_int)
src.client.screen += src.hud_used.mov_int
i_select.screen_loc = null
if (m_select)
if (m_int)
client.screen += hud_used.mov_int
var/list/L = dd_text2list(src.m_int, ",")
var/list/L = dd_text2list(m_int, ",")
L[1] += ":-11"
src.m_select.screen_loc = dd_list2text(L,",") //ICONS4, FUCKING SHIT
m_select.screen_loc = dd_list2text(L,",") //ICONS4, FUCKING SHIT
else
src.m_select.screen_loc = null
m_select.screen_loc = null
if (src.alien_invis)
src.invisibility = 2
if (alien_invis)
invisibility = 2
if(istype(loc, /turf))//If they are standing on a turf.
AddCamoOverlay(loc)//Overlay camo.
else
src.invisibility = 0
if (src.alien_invis)
src.overlays += image("icon" = 'mob.dmi', "icon_state" = "shield", "layer" = MOB_LAYER)
invisibility = 0
for (var/mob/M in viewers(1, src))
if ((M.client && M.machine == src))
spawn (0)
src.show_inv(M)
show_inv(M)
return
@@ -320,16 +318,16 @@
if (M.a_intent == "hurt")
if (istype(M.wear_mask, /obj/item/clothing/mask/muzzle))
return
if (src.health > 0)
if (health > 0)
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)
var/damage = rand(1, 3)
src.bruteloss += damage
bruteloss += damage
src.updatehealth()
updatehealth()
return
@@ -340,7 +338,7 @@
M << "You cannot attack people before the game has started."
return
if (istype(src.loc, /turf) && istype(src.loc.loc, /area/start))
if (istype(loc, /turf) && istype(loc.loc, /area/start))
M << "No attacking people at spawn, you jackass."
return
..()
@@ -348,17 +346,17 @@
switch(M.a_intent)
if ("help")
src.help_shake_act(M)
help_shake_act(M)
else
if (istype(src.wear_mask, /obj/item/clothing/mask/muzzle))
if (istype(wear_mask, /obj/item/clothing/mask/muzzle))
return
if (src.health > 0)
playsound(src.loc, 'bite.ogg', 50, 1, -1)
if (health > 0)
playsound(loc, '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)
src.bruteloss += rand(1, 3)
src.updatehealth()
bruteloss += rand(1, 3)
updatehealth()
return
/mob/living/carbon/alien/larva/attack_hand(mob/living/carbon/human/M as mob)
@@ -366,7 +364,7 @@
M << "You cannot attack people before the game has started."
return
if (istype(src.loc, /turf) && istype(src.loc.loc, /area/start))
if (istype(loc, /turf) && istype(loc.loc, /area/start))
M << "No attacking people at spawn, you jackass."
return
@@ -375,12 +373,12 @@
if(M.gloves && M.gloves.elecgen == 1)//Stungloves. Any contact will stun the alien.
if(M.gloves.uses > 0)
M.gloves.uses--
if (src.weakened < 5)
src.weakened = 5
if (src.stuttering < 5)
src.stuttering = 5
if (src.stunned < 5)
src.stunned = 5
if (weakened < 5)
weakened = 5
if (stuttering < 5)
stuttering = 5
if (stunned < 5)
stunned = 5
for(var/mob/O in viewers(src, null))
if ((O.client && !( O.blinded )))
O.show_message("\red <B>[src] has been touched with the stun gloves by [M]!</B>", 1, "\red You hear someone fall.", 2)
@@ -388,8 +386,8 @@
switch(M.a_intent)
if ("help")
if (src.health > 0)
src.help_shake_act(M)
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 )) )
@@ -399,9 +397,9 @@
O.source = M
O.target = src
O.s_loc = M.loc
O.t_loc = src.loc
O.t_loc = loc
O.place = "CPR"
src.requests += O
requests += O
spawn( 0 )
O.process()
return
@@ -417,9 +415,9 @@
M.r_hand = G
G.layer = 20
G.affecting = src
src.grabbed_by += G
grabbed_by += G
G.synch()
playsound(src.loc, 'thudswoosh.ogg', 50, 1, -1)
playsound(loc, '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)
@@ -430,24 +428,24 @@
if (M.mutations & HULK)
damage += 5
spawn(0)
src.paralysis += 1
paralysis += 1
step_away(src,M,15)
sleep(3)
step_away(src,M,15)
playsound(src.loc, "punch", 25, 1, -1)
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)
if (src.weakened < 10)
src.weakened = rand(10, 15)
if (weakened < 10)
weakened = 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)
src.bruteloss += damage
src.updatehealth()
bruteloss += damage
updatehealth()
else
playsound(src.loc, 'punchmiss.ogg', 25, 1, -1)
playsound(loc, '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)
@@ -458,7 +456,7 @@
M << "You cannot attack people before the game has started."
return
if (istype(src.loc, /turf) && istype(src.loc.loc, /area/start))
if (istype(loc, /turf) && istype(loc.loc, /area/start))
M << "No attacking people at spawn, you jackass."
return
@@ -467,26 +465,26 @@
switch(M.a_intent)
if ("help")
src.sleeping = 0
src.resting = 0
if (src.paralysis >= 3) src.paralysis -= 3
if (src.stunned >= 3) src.stunned -= 3
if (src.weakened >= 3) src.weakened -= 3
sleeping = 0
resting = 0
if (paralysis >= 3) paralysis -= 3
if (stunned >= 3) stunned -= 3
if (weakened >= 3) weakened -= 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 (src.health > 0)
playsound(src.loc, 'bite.ogg', 50, 1, -1)
if (health > 0)
playsound(loc, '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)
src.bruteloss += damage
src.updatehealth()
bruteloss += damage
updatehealth()
else
M << "\green <B>[src.name] is too injured for that.</B>"
M << "\green <B>[name] is too injured for that.</B>"
return
/mob/living/carbon/alien/larva/restrained()
@@ -503,29 +501,29 @@
user.machine = src
var/dat = {"
<B><HR><FONT size=3>[src.name]</FONT></B>
<B><HR><FONT size=3>[name]</FONT></B>
<BR><HR><BR>
<BR><A href='?src=\ref[user];mach_close=mob[src.name]'>Close</A>
<BR><A href='?src=\ref[user];mach_close=mob[name]'>Close</A>
<BR>"}
user << browse(dat, text("window=mob[src.name];size=340x480"))
onclose(user, "mob[src.name]")
user << browse(dat, text("window=mob[name];size=340x480"))
onclose(user, "mob[name]")
return
/mob/living/carbon/alien/larva/updatehealth()
if (src.nodamage == 0)
if (nodamage == 0)
//oxyloss is only used for suicide
//toxloss isn't used for aliens, its actually used as alien powers!!
src.health = 25 - src.oxyloss - src.fireloss - src.bruteloss
health = 25 - oxyloss - fireloss - bruteloss
else
src.health = 25
src.stat = 0
health = 25
stat = 0
/* Commented out because it's duplicated in life.dm
/mob/living/carbon/alien/larva/proc/grow() // Larvae can grow into full fledged Xenos if they survive long enough -- TLE
if(src.icon_state == "larva_l" && !src.canmove) // This is a shit death check. It is made of shit and death. Fix later.
if(icon_state == "larva_l" && !canmove) // This is a shit death check. It is made of shit and death. Fix later.
return
else
var/mob/living/carbon/alien/humanoid/A = new(src.loc)
A.key = src.key
var/mob/living/carbon/alien/humanoid/A = new(loc)
A.key = key
del(src) */

View File

@@ -1365,15 +1365,24 @@
break
if(istype(wear_suit, /obj/item/clothing/suit/space/space_ninja)&&wear_suit:s_active)
shielded = 2
shielded = 3
if (shielded == 2)
invisibility = 2
else
invisibility = 0
if (shielded)
overlays += image("icon" = 'mob.dmi', "icon_state" = "shield", "layer" = MOB_LAYER)
switch(shielded)
if(1)
overlays += image("icon" = 'effects.dmi', "icon_state" = "shield", "layer" = MOB_LAYER+1)
if(2)
invisibility = 2
//New stealth. Hopefully doesn't lag too much. /N
if(istype(loc, /turf))//If they are standing on a turf.
AddCamoOverlay(loc)//Overlay camo.
if(3)
if(istype(loc, /turf))
if(prob(90))//Ninjas may flick into view once in a while if they are stealthed.
NinjaStealthActive(loc)
else
NinjaStealthMalf()
else
invisibility = 0
for (var/mob/M in viewers(1, src))
if ((M.client && M.machine == src))

View File

@@ -2,47 +2,47 @@
var/datum/reagents/R = new/datum/reagents(1000)
reagents = R
R.my_atom = src
if (!(src.dna))
if(src.gender == NEUTER)
src.gender = pick(MALE, FEMALE)
src.dna = new /datum/dna( null )
src.dna.uni_identity = "00600200A00E0110148FC01300B009"
src.dna.struc_enzymes = "0983E840344C39F4B059D5145FC5785DC6406A4BB8"
src.dna.unique_enzymes = md5(src.name)
if (!(dna))
if(gender == NEUTER)
gender = pick(MALE, FEMALE)
dna = new /datum/dna( null )
dna.uni_identity = "00600200A00E0110148FC01300B009"
dna.struc_enzymes = "0983E840344C39F4B059D5145FC5785DC6406A4BB8"
dna.unique_enzymes = md5(name)
//////////blah
var/gendervar
if (src.gender == "male")
if (gender == "male")
gendervar = add_zero2(num2hex((rand(1,2049)),1), 3)
else
gendervar = add_zero2(num2hex((rand(2051,4094)),1), 3)
src.dna.uni_identity += gendervar
src.dna.uni_identity += "12C"
src.dna.uni_identity += "4E2"
dna.uni_identity += gendervar
dna.uni_identity += "12C"
dna.uni_identity += "4E2"
if(src.name == "monkey")
src.name = text("monkey ([rand(1, 1000)])")
src.real_name = src.name
if(name == "monkey")
name = text("monkey ([rand(1, 1000)])")
real_name = name
..()
return
/mob/living/carbon/monkey/movement_delay()
var/tally = 0
if(src.reagents)
if(src.reagents.has_reagent("hyperzine")) return -1
if(reagents)
if(reagents.has_reagent("hyperzine")) return -1
var/health_deficiency = (100 - src.health)
var/health_deficiency = (100 - health)
if(health_deficiency >= 45) tally += (health_deficiency / 25)
if (src.bodytemperature < 283.222)
tally += (283.222 - src.bodytemperature) / 10 * 1.75
if (bodytemperature < 283.222)
tally += (283.222 - bodytemperature) / 10 * 1.75
return tally
/mob/living/carbon/monkey/Bump(atom/movable/AM as mob|obj, yes)
spawn( 0 )
if ((!( yes ) || src.now_pushing))
if ((!( yes ) || now_pushing))
return
src.now_pushing = 1
now_pushing = 1
if(ismob(AM))
var/mob/tmob = AM
if(istype(tmob, /mob/living/carbon/human) && tmob.mutations & FAT)
@@ -50,23 +50,23 @@
for(var/mob/M in viewers(src, null))
if(M.client)
M << "\red <B>[src] fails to push [tmob]'s fat ass out of the way.</B>"
src.now_pushing = 0
now_pushing = 0
return
src.now_pushing = 0
now_pushing = 0
..()
if (!( istype(AM, /atom/movable) ))
return
if (!( src.now_pushing ))
src.now_pushing = 1
if (!( now_pushing ))
now_pushing = 1
if (!( AM.anchored ))
var/t = get_dir(src, AM)
if (istype(AM, /obj/window))
if(AM:ini_dir == NORTHWEST || AM:ini_dir == NORTHEAST || AM:ini_dir == SOUTHWEST || AM:ini_dir == SOUTHEAST)
for(var/obj/window/win in get_step(AM,t))
src.now_pushing = 0
now_pushing = 0
return
step(AM, t)
src.now_pushing = null
now_pushing = null
return
return
@@ -74,7 +74,7 @@
..()
if (href_list["mach_close"])
var/t1 = text("window=[]", href_list["mach_close"])
src.machine = null
machine = null
src << browse(null, t1)
if ((href_list["item"] && !( usr.stat ) && !( usr.restrained() ) && in_range(src, usr) ))
var/obj/equip_e/monkey/O = new /obj/equip_e/monkey( )
@@ -82,9 +82,9 @@
O.target = src
O.item = usr.equipped()
O.s_loc = usr.loc
O.t_loc = src.loc
O.t_loc = loc
O.place = href_list["item"]
src.requests += O
requests += O
spawn( 0 )
O.process()
return
@@ -94,16 +94,16 @@
/mob/living/carbon/monkey/meteorhit(obj/O as obj)
for(var/mob/M in viewers(src, null))
M.show_message(text("\red [] has been hit by []", src, O), 1)
if (src.health > 0)
if (health > 0)
var/shielded = 0
for(var/obj/item/device/shield/S in src)
if (S.active)
shielded = 1
else
src.bruteloss += 30
bruteloss += 30
if ((O.icon_state == "flaming" && !( shielded )))
src.fireloss += 40
src.health = 100 - src.oxyloss - src.toxloss - src.fireloss - src.bruteloss
fireloss += 40
health = 100 - oxyloss - toxloss - fireloss - bruteloss
return
/mob/living/carbon/monkey/bullet_act(flag)
@@ -122,8 +122,8 @@
if (stuttering < 10)
stuttering = 10
else if (flag == PROJECTILE_DART)
src.weakened += 5
src.toxloss += 10
weakened += 5
toxloss += 10
else if(flag == PROJECTILE_LASER)
if (!eye_blurry) eye_blurry = 4 //This stuff makes no sense but lasers need a buff.
if (prob(25)) stunned++
@@ -152,14 +152,14 @@
return
/mob/living/carbon/monkey/hand_p(mob/M as mob)
if ((M.a_intent == "hurt" && !( istype(src.wear_mask, /obj/item/clothing/mask/muzzle) )))
if ((prob(75) && src.health > 0))
if ((M.a_intent == "hurt" && !( istype(wear_mask, /obj/item/clothing/mask/muzzle) )))
if ((prob(75) && health > 0))
for(var/mob/O in viewers(src, null))
O.show_message(text("\red <B>[M.name] has bit []!</B>", src), 1)
var/damage = rand(1, 5)
if (src.mutations & HULK) damage += 10
src.bruteloss += damage
src.updatehealth()
if (mutations & HULK) damage += 10
bruteloss += damage
updatehealth()
else
for(var/mob/O in viewers(src, null))
O.show_message(text("\red <B>[M.name] has attempted to bite []!</B>", src), 1)
@@ -169,19 +169,19 @@
..()
if (M.a_intent == "help")
src.help_shake_act(M)
help_shake_act(M)
else
if ((M.a_intent == "hurt" && !( istype(src.wear_mask, /obj/item/clothing/mask/muzzle) )))
if ((prob(75) && src.health > 0))
playsound(src.loc, 'bite.ogg', 50, 1, -1)
if ((M.a_intent == "hurt" && !( istype(wear_mask, /obj/item/clothing/mask/muzzle) )))
if ((prob(75) && health > 0))
playsound(loc, 'bite.ogg', 50, 1, -1)
for(var/mob/O in viewers(src, null))
O.show_message("\red <B>[M.name] has bit [src.name]!</B>", 1)
O.show_message("\red <B>[M.name] has bit [name]!</B>", 1)
var/damage = rand(1, 5)
src.bruteloss += damage
src.health = 100 - src.oxyloss - src.toxloss - src.fireloss - src.bruteloss
bruteloss += damage
health = 100 - oxyloss - toxloss - fireloss - bruteloss
else
for(var/mob/O in viewers(src, null))
O.show_message("\red <B>[M.name] has attempted to bite [src.name]!</B>", 1)
O.show_message("\red <B>[M.name] has attempted to bite [name]!</B>", 1)
return
/mob/living/carbon/monkey/attack_hand(mob/living/carbon/human/M as mob)
@@ -189,18 +189,18 @@
M << "You cannot attack people before the game has started."
return
if (istype(src.loc, /turf) && istype(src.loc.loc, /area/start))
if (istype(loc, /turf) && istype(loc.loc, /area/start))
M << "No attacking people at spawn, you jackass."
return
if ((M:gloves && M:gloves.elecgen == 1 && M.a_intent == "hurt") /*&& (!istype(src:wear_suit, /obj/item/clothing/suit/judgerobe))*/)
if(M:gloves.uses > 0)
M:gloves.uses--
if (src.weakened < 5)
src.weakened = 5
if (src.stuttering < 5)
src.stuttering = 5
if (src.stunned < 5)
src.stunned = 5
if (weakened < 5)
weakened = 5
if (stuttering < 5)
stuttering = 5
if (stunned < 5)
stunned = 5
for(var/mob/O in viewers(src, null))
if (O.client)
O.show_message("\red <B>[src] has been touched with the stun gloves by [M]!</B>", 1, "\red You hear someone fall", 2)
@@ -210,32 +210,32 @@
return
if (M.a_intent == "help")
src.help_shake_act(M)
help_shake_act(M)
else
if (M.a_intent == "hurt")
if ((prob(75) && src.health > 0))
if ((prob(75) && health > 0))
for(var/mob/O in viewers(src, null))
if ((O.client && !( O.blinded )))
O.show_message(text("\red <B>[] has punched [src.name]!</B>", M), 1)
O.show_message(text("\red <B>[] has punched [name]!</B>", M), 1)
playsound(src.loc, "punch", 25, 1, -1)
playsound(loc, "punch", 25, 1, -1)
var/damage = rand(5, 10)
if (prob(40))
damage = rand(10, 15)
if (src.paralysis < 5)
src.paralysis = rand(10, 15)
if (paralysis < 5)
paralysis = rand(10, 15)
spawn( 0 )
for(var/mob/O in viewers(src, null))
if ((O.client && !( O.blinded )))
O.show_message(text("\red <B>[] has knocked out [src.name]!</B>", M), 1)
O.show_message(text("\red <B>[] has knocked out [name]!</B>", M), 1)
return
src.bruteloss += damage
src.updatehealth()
bruteloss += damage
updatehealth()
else
playsound(src.loc, 'punchmiss.ogg', 25, 1, -1)
playsound(loc, '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 [src.name]!</B>", M), 1)
O.show_message(text("\red <B>[] has attempted to punch [name]!</B>", M), 1)
else
if (M.a_intent == "grab")
if (M == src)
@@ -248,25 +248,25 @@
M.r_hand = G
G.layer = 20
G.affecting = src
src.grabbed_by += G
grabbed_by += G
G.synch()
playsound(src.loc, 'thudswoosh.ogg', 50, 1, -1)
playsound(loc, 'thudswoosh.ogg', 50, 1, -1)
for(var/mob/O in viewers(src, null))
O.show_message(text("\red [] has grabbed [src.name] passively!", M), 1)
O.show_message(text("\red [] has grabbed [name] passively!", M), 1)
else
if (!( src.paralysis ))
if (!( paralysis ))
if (prob(25))
src.paralysis = 2
playsound(src.loc, 'thudswoosh.ogg', 50, 1, -1)
paralysis = 2
playsound(loc, 'thudswoosh.ogg', 50, 1, -1)
for(var/mob/O in viewers(src, null))
if ((O.client && !( O.blinded )))
O.show_message(text("\red <B>[] has pushed down [src.name]!</B>", M), 1)
O.show_message(text("\red <B>[] has pushed down [name]!</B>", M), 1)
else
drop_item()
playsound(src.loc, 'thudswoosh.ogg', 50, 1, -1)
playsound(loc, 'thudswoosh.ogg', 50, 1, -1)
for(var/mob/O in viewers(src, null))
if ((O.client && !( O.blinded )))
O.show_message(text("\red <B>[] has disarmed [src.name]!</B>", M), 1)
O.show_message(text("\red <B>[] has disarmed [name]!</B>", M), 1)
return
/mob/living/carbon/monkey/attack_alien(mob/living/carbon/alien/humanoid/M as mob)
@@ -274,7 +274,7 @@
M << "You cannot attack people before the game has started."
return
if (istype(src.loc, /turf) && istype(src.loc.loc, /area/start))
if (istype(loc, /turf) && istype(loc.loc, /area/start))
M << "No attacking people at spawn, you jackass."
return
@@ -285,27 +285,27 @@
O.show_message(text("\blue [M] caresses [src] with its scythe like arm."), 1)
if ("hurt")
if ((prob(95) && src.health > 0))
playsound(src.loc, 'slice.ogg', 25, 1, -1)
if ((prob(95) && health > 0))
playsound(loc, 'slice.ogg', 25, 1, -1)
var/damage = rand(15, 30)
if (damage >= 25)
damage = rand(20, 40)
if (src.paralysis < 15)
src.paralysis = rand(10, 15)
if (paralysis < 15)
paralysis = rand(10, 15)
for(var/mob/O in viewers(src, null))
if ((O.client && !( O.blinded )))
O.show_message(text("\red <B>[] has wounded [src.name]!</B>", M), 1)
O.show_message(text("\red <B>[] has wounded [name]!</B>", M), 1)
else
for(var/mob/O in viewers(src, null))
if ((O.client && !( O.blinded )))
O.show_message(text("\red <B>[] has slashed [src.name]!</B>", M), 1)
src.bruteloss += damage
src.updatehealth()
O.show_message(text("\red <B>[] has slashed [name]!</B>", M), 1)
bruteloss += damage
updatehealth()
else
playsound(src.loc, 'slashmiss.ogg', 25, 1, -1)
playsound(loc, 'slashmiss.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 lunge at [src.name]!</B>", M), 1)
O.show_message(text("\red <B>[] has attempted to lunge at [name]!</B>", M), 1)
if ("grab")
if (M == src)
@@ -318,168 +318,168 @@
M.r_hand = G
G.layer = 20
G.affecting = src
src.grabbed_by += G
grabbed_by += G
G.synch()
playsound(src.loc, 'thudswoosh.ogg', 50, 1, -1)
playsound(loc, 'thudswoosh.ogg', 50, 1, -1)
for(var/mob/O in viewers(src, null))
O.show_message(text("\red [] has grabbed [src.name] passively!", M), 1)
O.show_message(text("\red [] has grabbed [name] passively!", M), 1)
if ("disarm")
playsound(src.loc, 'pierce.ogg', 25, 1, -1)
playsound(loc, 'pierce.ogg', 25, 1, -1)
var/damage = 5
if(prob(95))
src.weakened = rand(10, 15)
weakened = rand(10, 15)
for(var/mob/O in viewers(src, null))
if ((O.client && !( O.blinded )))
O.show_message(text("\red <B>[] has tackled down [src.name]!</B>", M), 1)
O.show_message(text("\red <B>[] has tackled down [name]!</B>", M), 1)
else
drop_item()
for(var/mob/O in viewers(src, null))
if ((O.client && !( O.blinded )))
O.show_message(text("\red <B>[] has disarmed [src.name]!</B>", M), 1)
src.bruteloss += damage
src.updatehealth()
O.show_message(text("\red <B>[] has disarmed [name]!</B>", M), 1)
bruteloss += damage
updatehealth()
return
/mob/living/carbon/monkey/Stat()
..()
statpanel("Status")
stat(null, text("Intent: []", src.a_intent))
stat(null, text("Move Mode: []", src.m_intent))
stat(null, text("Intent: []", a_intent))
stat(null, text("Move Mode: []", m_intent))
if(client && mind)
if (src.client.statpanel == "Status")
if (src.mind.special_role == "Changeling")
stat("Chemical Storage", src.chem_charges)
if (client.statpanel == "Status")
if (mind.special_role == "Changeling")
stat("Chemical Storage", chem_charges)
return
/mob/living/carbon/monkey/update_clothing()
if(src.buckled)
if(istype(src.buckled, /obj/stool/bed))
src.lying = 1
if(buckled)
if(istype(buckled, /obj/stool/bed))
lying = 1
else
src.lying = 0
lying = 0
if(src.update_icon) // Skie
if(update_icon) // Skie
..()
for(var/i in src.overlays)
src.overlays -= i
for(var/i in overlays)
overlays -= i
if (!( src.lying ))
src.icon_state = "monkey1"
if (!( lying ))
icon_state = "monkey1"
else
src.icon_state = "monkey0"
icon_state = "monkey0"
if (src.wear_mask)
if (istype(src.wear_mask, /obj/item/clothing/mask))
var/t1 = src.wear_mask.icon_state
src.overlays += image("icon" = 'monkey.dmi', "icon_state" = text("[][]", t1, (!( src.lying ) ? null : "2")), "layer" = src.layer)
src.wear_mask.screen_loc = ui_mask
if (wear_mask)
if (istype(wear_mask, /obj/item/clothing/mask))
var/t1 = wear_mask.icon_state
overlays += image("icon" = 'monkey.dmi', "icon_state" = text("[][]", t1, (!( lying ) ? null : "2")), "layer" = layer)
wear_mask.screen_loc = ui_mask
if (src.r_hand)
if(src.update_icon)
src.overlays += image("icon" = 'items_righthand.dmi', "icon_state" = src.r_hand.item_state ? src.r_hand.item_state : src.r_hand.icon_state, "layer" = src.layer)
src.r_hand.screen_loc = ui_rhand
if (r_hand)
if(update_icon)
overlays += image("icon" = 'items_righthand.dmi', "icon_state" = r_hand.item_state ? r_hand.item_state : r_hand.icon_state, "layer" = layer)
r_hand.screen_loc = ui_rhand
if (src.l_hand)
if(src.update_icon)
src.overlays += image("icon" = 'items_lefthand.dmi', "icon_state" = src.l_hand.item_state ? src.l_hand.item_state : src.l_hand.icon_state, "layer" = src.layer)
src.l_hand.screen_loc = ui_lhand
if (l_hand)
if(update_icon)
overlays += image("icon" = 'items_lefthand.dmi', "icon_state" = l_hand.item_state ? l_hand.item_state : l_hand.icon_state, "layer" = layer)
l_hand.screen_loc = ui_lhand
if (src.back)
var/t1 = src.back.icon_state //apparently tables make me upset and cause my dreams to shatter
src.overlays += image("icon" = 'back.dmi', "icon_state" = text("[][]", t1, (!( src.lying ) ? null : "2")), "layer" = src.layer)
src.back.screen_loc = ui_back
if (back)
var/t1 = back.icon_state //apparently tables make me upset and cause my dreams to shatter
overlays += image("icon" = 'back.dmi', "icon_state" = text("[][]", t1, (!( lying ) ? null : "2")), "layer" = layer)
back.screen_loc = ui_back
if (src.handcuffed && src.update_icon)
src.pulling = null
if (!( src.lying ))
src.overlays += image("icon" = 'monkey.dmi', "icon_state" = "handcuff1", "layer" = src.layer)
if (handcuffed && update_icon)
pulling = null
if (!( lying ))
overlays += image("icon" = 'monkey.dmi', "icon_state" = "handcuff1", "layer" = layer)
else
src.overlays += image("icon" = 'monkey.dmi', "icon_state" = "handcuff2", "layer" = src.layer)
overlays += image("icon" = 'monkey.dmi', "icon_state" = "handcuff2", "layer" = layer)
if (src.client)
src.client.screen -= src.contents
src.client.screen += src.contents
src.client.screen -= src.hud_used.m_ints
src.client.screen -= src.hud_used.mov_int
if (src.i_select)
if (src.intent)
src.client.screen += src.hud_used.m_ints
if (client)
client.screen -= contents
client.screen += contents
client.screen -= hud_used.m_ints
client.screen -= hud_used.mov_int
if (i_select)
if (intent)
client.screen += hud_used.m_ints
var/list/L = dd_text2list(src.intent, ",")
var/list/L = dd_text2list(intent, ",")
L[1] += ":-11"
src.i_select.screen_loc = dd_list2text(L,",") //ICONS, FUCKING SHIT
i_select.screen_loc = dd_list2text(L,",") //ICONS, FUCKING SHIT//What
else
src.i_select.screen_loc = null
if (src.m_select)
if (src.m_int)
src.client.screen += src.hud_used.mov_int
i_select.screen_loc = null
if (m_select)
if (m_int)
client.screen += hud_used.mov_int
var/list/L = dd_text2list(src.m_int, ",")
var/list/L = dd_text2list(m_int, ",")
L[1] += ":-11"
src.m_select.screen_loc = dd_list2text(L,",") //ICONS, FUCKING SHIT
m_select.screen_loc = dd_list2text(L,",") //ICONS, FUCKING SHIT//the fuck
else
src.m_select.screen_loc = null
m_select.screen_loc = null
for(var/mob/M in viewers(1, src))
if ((M.client && M.machine == src))
spawn( 0 )
src.show_inv(M)
show_inv(M)
return
return
/mob/living/carbon/monkey/Move()
if ((!( src.buckled ) || src.buckled.loc != src.loc))
src.buckled = null
if (src.buckled)
if ((!( buckled ) || buckled.loc != loc))
buckled = null
if (buckled)
return
if (src.restrained())
src.pulling = null
if (restrained())
pulling = null
var/t7 = 1
if (src.restrained())
if (restrained())
for(var/mob/M in range(src, 1))
if ((M.pulling == src && M.stat == 0 && !( M.restrained() )))
return 0
if ((t7 && src.pulling && get_dist(src, src.pulling) <= 1))
if (src.pulling.anchored)
src.pulling = null
var/T = src.loc
if ((t7 && pulling && get_dist(src, pulling) <= 1))
if (pulling.anchored)
pulling = null
var/T = loc
. = ..()
if (!( isturf(src.pulling.loc) ))
src.pulling = null
if (!( isturf(pulling.loc) ))
pulling = null
return
if (!( src.restrained() ))
var/diag = get_dir(src, src.pulling)
if (!( restrained() ))
var/diag = get_dir(src, pulling)
if ((diag - 1) & diag)
else
diag = null
if ((ismob(src.pulling) && (get_dist(src, src.pulling) > 1 || diag)))
if (istype(src.pulling, src.type))
var/mob/M = src.pulling
if ((ismob(pulling) && (get_dist(src, pulling) > 1 || diag)))
if (istype(pulling, type))
var/mob/M = pulling
var/mob/t = M.pulling
M.pulling = null
step(src.pulling, get_dir(src.pulling.loc, T))
step(pulling, get_dir(pulling.loc, T))
M.pulling = t
else
if (src.pulling)
if (istype(src.pulling, /obj/window))
if(src.pulling:ini_dir == NORTHWEST || src.pulling:ini_dir == NORTHEAST || src.pulling:ini_dir == SOUTHWEST || src.pulling:ini_dir == SOUTHEAST)
for(var/obj/window/win in get_step(src.pulling,get_dir(src.pulling.loc, T)))
src.pulling = null
if (src.pulling)
step(src.pulling, get_dir(src.pulling.loc, T))
if (pulling)
if (istype(pulling, /obj/window))
if(pulling:ini_dir == NORTHWEST || pulling:ini_dir == NORTHEAST || pulling:ini_dir == SOUTHWEST || pulling:ini_dir == SOUTHEAST)
for(var/obj/window/win in get_step(pulling,get_dir(pulling.loc, T)))
pulling = null
if (pulling)
step(pulling, get_dir(pulling.loc, T))
else
src.pulling = null
pulling = null
. = ..()
if ((src.s_active && !( src.contents.Find(src.s_active) )))
src.s_active.close(src)
if ((s_active && !( contents.Find(s_active) )))
s_active.close(src)
return
/mob/living/carbon/monkey/verb/removeinternal()
set name = "Remove Internals"
set category = "IC"
src.internal = null
internal = null
return
/mob/living/carbon/monkey/var/co2overloadtime = null
@@ -490,213 +490,213 @@
..()
/mob/living/carbon/monkey/ex_act(severity)
flick("flash", src.flash)
flick("flash", flash)
switch(severity)
if(1.0)
if (src.stat != 2)
src.bruteloss += 200
src.health = 100 - src.oxyloss - src.toxloss - src.fireloss - src.bruteloss
if (stat != 2)
bruteloss += 200
health = 100 - oxyloss - toxloss - fireloss - bruteloss
if(2.0)
if (src.stat != 2)
src.bruteloss += 60
src.fireloss += 60
src.health = 100 - src.oxyloss - src.toxloss - src.fireloss - src.bruteloss
if (stat != 2)
bruteloss += 60
fireloss += 60
health = 100 - oxyloss - toxloss - fireloss - bruteloss
if(3.0)
if (src.stat != 2)
src.bruteloss += 30
src.health = 100 - src.oxyloss - src.toxloss - src.fireloss - src.bruteloss
if (stat != 2)
bruteloss += 30
health = 100 - oxyloss - toxloss - fireloss - bruteloss
if (prob(50))
src.paralysis += 10
paralysis += 10
else
return
/mob/living/carbon/monkey/blob_act()
if (src.stat != 2)
src.fireloss += 60
src.health = 100 - src.oxyloss - src.toxloss - src.fireloss - src.bruteloss
if (stat != 2)
fireloss += 60
health = 100 - oxyloss - toxloss - fireloss - bruteloss
if (prob(50))
src.paralysis += 10
paralysis += 10
/obj/equip_e/monkey/process()
if (src.item)
src.item.add_fingerprint(src.source)
if (!( src.item ))
switch(src.place)
if (item)
item.add_fingerprint(source)
if (!( item ))
switch(place)
if("head")
if (!( src.target.wear_mask ))
if (!( target.wear_mask ))
del(src)
return
if("l_hand")
if (!( src.target.l_hand ))
if (!( target.l_hand ))
del(src)
return
if("r_hand")
if (!( src.target.r_hand ))
if (!( target.r_hand ))
del(src)
return
if("back")
if (!( src.target.back ))
if (!( target.back ))
del(src)
return
if("handcuff")
if (!( src.target.handcuffed ))
if (!( target.handcuffed ))
del(src)
return
if("internal")
if ((!( (istype(src.target.wear_mask, /obj/item/clothing/mask) && istype(src.target.back, /obj/item/weapon/tank) && !( src.target.internal )) ) && !( src.target.internal )))
if ((!( (istype(target.wear_mask, /obj/item/clothing/mask) && istype(target.back, /obj/item/weapon/tank) && !( target.internal )) ) && !( target.internal )))
del(src)
return
if (src.item)
for(var/mob/O in viewers(src.target, null))
if (item)
for(var/mob/O in viewers(target, null))
if ((O.client && !( O.blinded )))
O.show_message(text("\red <B>[] is trying to put a [] on []</B>", src.source, src.item, src.target), 1)
O.show_message(text("\red <B>[] is trying to put a [] on []</B>", source, item, target), 1)
else
var/message = null
switch(src.place)
switch(place)
if("mask")
if(istype(src.target.wear_mask, /obj/item/clothing)&&!src.target.wear_mask:canremove)
message = text("\red <B>[] fails to take off \a [] from []'s body!</B>", src.source, src.target.wear_mask, src.target)
if(istype(target.wear_mask, /obj/item/clothing)&&!target.wear_mask:canremove)
message = text("\red <B>[] fails to take off \a [] from []'s body!</B>", source, target.wear_mask, target)
else
message = text("\red <B>[] is trying to take off \a [] from []'s head!</B>", src.source, src.target.wear_mask, src.target)
message = text("\red <B>[] is trying to take off \a [] from []'s head!</B>", source, target.wear_mask, target)
if("l_hand")
message = text("\red <B>[] is trying to take off a [] from []'s left hand!</B>", src.source, src.target.l_hand, src.target)
message = text("\red <B>[] is trying to take off a [] from []'s left hand!</B>", source, target.l_hand, target)
if("r_hand")
message = text("\red <B>[] is trying to take off a [] from []'s right hand!</B>", src.source, src.target.r_hand, src.target)
message = text("\red <B>[] is trying to take off a [] from []'s right hand!</B>", source, target.r_hand, target)
if("back")
message = text("\red <B>[] is trying to take off a [] from []'s back!</B>", src.source, src.target.back, src.target)
message = text("\red <B>[] is trying to take off a [] from []'s back!</B>", source, target.back, target)
if("handcuff")
message = text("\red <B>[] is trying to unhandcuff []!</B>", src.source, src.target)
message = text("\red <B>[] is trying to unhandcuff []!</B>", source, target)
if("internal")
if (src.target.internal)
message = text("\red <B>[] is trying to remove []'s internals</B>", src.source, src.target)
if (target.internal)
message = text("\red <B>[] is trying to remove []'s internals</B>", source, target)
else
message = text("\red <B>[] is trying to set on []'s internals.</B>", src.source, src.target)
message = text("\red <B>[] is trying to set on []'s internals.</B>", source, target)
else
for(var/mob/M in viewers(src.target, null))
for(var/mob/M in viewers(target, null))
M.show_message(message, 1)
spawn( 30 )
src.done()
done()
return
return
/obj/equip_e/monkey/done()
if(!src.source || !src.target) return
if(src.source.loc != src.s_loc) return
if(src.target.loc != src.t_loc) return
if(LinkBlocked(src.s_loc,src.t_loc)) return
if(src.item && src.source.equipped() != src.item) return
if ((src.source.restrained() || src.source.stat)) return
switch(src.place)
if(!source || !target) return
if(source.loc != s_loc) return
if(target.loc != t_loc) return
if(LinkBlocked(s_loc,t_loc)) return
if(item && source.equipped() != item) return
if ((source.restrained() || source.stat)) return
switch(place)
if("mask")
if (src.target.wear_mask)
if(istype(src.target.wear_mask, /obj/item/clothing)&& !src.target.wear_mask:canremove)
if (target.wear_mask)
if(istype(target.wear_mask, /obj/item/clothing)&& !target.wear_mask:canremove)
return
var/obj/item/W = src.target.wear_mask
src.target.u_equip(W)
if (src.target.client)
src.target.client.screen -= W
var/obj/item/W = target.wear_mask
target.u_equip(W)
if (target.client)
target.client.screen -= W
if (W)
W.loc = src.target.loc
W.dropped(src.target)
W.loc = target.loc
W.dropped(target)
W.layer = initial(W.layer)
W.add_fingerprint(src.source)
W.add_fingerprint(source)
else
if (istype(src.item, /obj/item/clothing/mask))
src.source.drop_item()
src.loc = src.target
src.item.layer = 20
src.target.wear_mask = src.item
src.item.loc = src.target
if (istype(item, /obj/item/clothing/mask))
source.drop_item()
loc = target
item.layer = 20
target.wear_mask = item
item.loc = target
if("l_hand")
if (src.target.l_hand)
var/obj/item/W = src.target.l_hand
src.target.u_equip(W)
if (src.target.client)
src.target.client.screen -= W
if (target.l_hand)
var/obj/item/W = target.l_hand
target.u_equip(W)
if (target.client)
target.client.screen -= W
if (W)
W.loc = src.target.loc
W.dropped(src.target)
W.loc = target.loc
W.dropped(target)
W.layer = initial(W.layer)
W.add_fingerprint(src.source)
W.add_fingerprint(source)
else
if (istype(src.item, /obj/item))
src.source.drop_item()
src.loc = src.target
src.item.layer = 20
src.target.l_hand = src.item
src.item.loc = src.target
if (istype(item, /obj/item))
source.drop_item()
loc = target
item.layer = 20
target.l_hand = item
item.loc = target
if("r_hand")
if (src.target.r_hand)
var/obj/item/W = src.target.r_hand
src.target.u_equip(W)
if (src.target.client)
src.target.client.screen -= W
if (target.r_hand)
var/obj/item/W = target.r_hand
target.u_equip(W)
if (target.client)
target.client.screen -= W
if (W)
W.loc = src.target.loc
W.dropped(src.target)
W.loc = target.loc
W.dropped(target)
W.layer = initial(W.layer)
W.add_fingerprint(src.source)
W.add_fingerprint(source)
else
if (istype(src.item, /obj/item))
src.source.drop_item()
src.loc = src.target
src.item.layer = 20
src.target.r_hand = src.item
src.item.loc = src.target
if (istype(item, /obj/item))
source.drop_item()
loc = target
item.layer = 20
target.r_hand = item
item.loc = target
if("back")
if (src.target.back)
var/obj/item/W = src.target.back
src.target.u_equip(W)
if (src.target.client)
src.target.client.screen -= W
if (target.back)
var/obj/item/W = target.back
target.u_equip(W)
if (target.client)
target.client.screen -= W
if (W)
W.loc = src.target.loc
W.dropped(src.target)
W.loc = target.loc
W.dropped(target)
W.layer = initial(W.layer)
W.add_fingerprint(src.source)
W.add_fingerprint(source)
else
if ((istype(src.item, /obj/item) && src.item.flags & 1))
src.source.drop_item()
src.loc = src.target
src.item.layer = 20
src.target.back = src.item
src.item.loc = src.target
if ((istype(item, /obj/item) && item.flags & 1))
source.drop_item()
loc = target
item.layer = 20
target.back = item
item.loc = target
if("handcuff")
if (src.target.handcuffed)
var/obj/item/W = src.target.handcuffed
src.target.u_equip(W)
if (src.target.client)
src.target.client.screen -= W
if (target.handcuffed)
var/obj/item/W = target.handcuffed
target.u_equip(W)
if (target.client)
target.client.screen -= W
if (W)
W.loc = src.target.loc
W.dropped(src.target)
W.loc = target.loc
W.dropped(target)
W.layer = initial(W.layer)
W.add_fingerprint(src.source)
W.add_fingerprint(source)
else
if (istype(src.item, /obj/item/weapon/handcuffs))
src.source.drop_item()
src.target.handcuffed = src.item
src.item.loc = src.target
if (istype(item, /obj/item/weapon/handcuffs))
source.drop_item()
target.handcuffed = item
item.loc = target
if("internal")
if (src.target.internal)
src.target.internal.add_fingerprint(src.source)
src.target.internal = null
if (target.internal)
target.internal.add_fingerprint(source)
target.internal = null
else
if (src.target.internal)
src.target.internal = null
if (!( istype(src.target.wear_mask, /obj/item/clothing/mask) ))
if (target.internal)
target.internal = null
if (!( istype(target.wear_mask, /obj/item/clothing/mask) ))
return
else
if (istype(src.target.back, /obj/item/weapon/tank))
src.target.internal = src.target.back
src.target.internal.add_fingerprint(src.source)
for(var/mob/M in viewers(src.target, 1))
if (istype(target.back, /obj/item/weapon/tank))
target.internal = target.back
target.internal.add_fingerprint(source)
for(var/mob/M in viewers(target, 1))
if ((M.client && !( M.blinded )))
M.show_message(text("[] is now running on internals.", src.target), 1)
M.show_message(text("[] is now running on internals.", target), 1)
else
src.source.update_clothing()
src.target.update_clothing()
source.update_clothing()
target.update_clothing()
del(src)
return

View File

@@ -1769,12 +1769,12 @@ proc/isobserver(A)
var/limit = 2//For only two trailing shadows.
for(var/turf/T in getline(mobloc, mob.loc))
spawn(0)
anim(T,mob,'mob.dmi',,"shadow")
anim(T,mob,'mob.dmi',,"shadow",,mob.dir)
limit--
if(limit<=0) break
else
spawn(0)
anim(mobloc,mob,'mob.dmi',,"shadow")
anim(mobloc,mob,'mob.dmi',,"shadow",,mob.dir)
mob.loc = get_step(mob, direct)
mob.dir = direct
return