mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-22 11:37:40 +01:00
Adds BS12 dismemberment. Not all features of it are implemented yet, but it should be equal to our previous system.
Adds greater changeling code, but doesn't change the genome count yet on it. Renames registered to registered_name on IDs because bs12 had it and it seemed like a good idea to do last night. For some reason. Adds an afterattack to mobs that can be used. (In fairness, lots of shit in attack_hand should be in there instead, like stungloves and stuff, to minimize duplicated code) git-svn-id: http://tgstation13.googlecode.com/svn/trunk@3537 316c924e-a436-60f5-8080-3fe189b3f50e
This commit is contained in:
@@ -189,6 +189,9 @@
|
||||
verbs += /client/proc/toggleadminhelpsound
|
||||
verbs += /proc/possess
|
||||
verbs += /proc/release
|
||||
verbs += /client/proc/make_tajaran
|
||||
|
||||
|
||||
else return
|
||||
|
||||
//Badmin
|
||||
@@ -417,6 +420,7 @@
|
||||
verbs -= /client/proc/togglebuildmodeself
|
||||
verbs -= /client/proc/kill_airgroup
|
||||
verbs -= /client/proc/debug_master_controller
|
||||
verbs -= /client/proc/make_tajaran
|
||||
return
|
||||
|
||||
|
||||
|
||||
@@ -359,9 +359,9 @@ But you can call procs that are of type /mob/living/carbon/human/proc/ for that
|
||||
var/obj/item/weapon/card/id/id = new/obj/item/weapon/card/id(M);
|
||||
id.icon_state = "gold"
|
||||
id:access = get_all_accesses()+get_all_centcom_access()+get_all_syndicate_access()
|
||||
id.registered = H.real_name
|
||||
id.registered_name = H.real_name
|
||||
id.assignment = "Captain"
|
||||
id.name = "[id.registered]'s ID Card ([id.assignment])"
|
||||
id.name = "[id.registered_name]'s ID Card ([id.assignment])"
|
||||
H.equip_if_possible(id, H.slot_wear_id)
|
||||
H.update_clothing()
|
||||
else
|
||||
@@ -557,7 +557,7 @@ But you can call procs that are of type /mob/living/carbon/human/proc/ for that
|
||||
W.name = "[M.real_name]'s ID Card"
|
||||
W.access = get_all_accesses()
|
||||
W.assignment = "Tunnel Clown!"
|
||||
W.registered = M.real_name
|
||||
W.registered_name = M.real_name
|
||||
M.equip_if_possible(W, M.slot_wear_id)
|
||||
|
||||
var/obj/item/weapon/twohanded/fireaxe/fire_axe = new(M)
|
||||
@@ -614,7 +614,7 @@ But you can call procs that are of type /mob/living/carbon/human/proc/ for that
|
||||
W.name = "[M.real_name]'s ID Card"
|
||||
W.access = get_all_accesses()
|
||||
W.assignment = "Reaper"
|
||||
W.registered = M.real_name
|
||||
W.registered_name = M.real_name
|
||||
M.equip_if_possible(W, M.slot_wear_id)
|
||||
|
||||
if("death commando")//Was looking to add this for a while.
|
||||
@@ -647,7 +647,7 @@ But you can call procs that are of type /mob/living/carbon/human/proc/ for that
|
||||
W.access = get_all_accesses()
|
||||
W.access += list("VIP Guest","Custodian","Thunderdome Overseer","Intel Officer","Medical Officer","Death Commando","Research Officer")
|
||||
W.assignment = "CentCom Review Official"
|
||||
W.registered = M.real_name
|
||||
W.registered_name = M.real_name
|
||||
M.equip_if_possible(W, M.slot_wear_id)
|
||||
|
||||
if("centcom commander")
|
||||
@@ -669,7 +669,7 @@ But you can call procs that are of type /mob/living/carbon/human/proc/ for that
|
||||
W.access = get_all_accesses()
|
||||
W.access += get_all_centcom_access()
|
||||
W.assignment = "CentCom Commanding Officer"
|
||||
W.registered = M.real_name
|
||||
W.registered_name = M.real_name
|
||||
M.equip_if_possible(W, M.slot_wear_id)
|
||||
|
||||
if("special ops officer")
|
||||
@@ -691,7 +691,7 @@ But you can call procs that are of type /mob/living/carbon/human/proc/ for that
|
||||
W.access = get_all_accesses()
|
||||
W.access += get_all_centcom_access()
|
||||
W.assignment = "Special Operations Officer"
|
||||
W.registered = M.real_name
|
||||
W.registered_name = M.real_name
|
||||
M.equip_if_possible(W, M.slot_wear_id)
|
||||
|
||||
if("blue wizard")
|
||||
@@ -745,7 +745,7 @@ But you can call procs that are of type /mob/living/carbon/human/proc/ for that
|
||||
W.access = get_all_accesses()
|
||||
W.access += get_all_centcom_access()
|
||||
W.assignment = "Admiral"
|
||||
W.registered = M.real_name
|
||||
W.registered_name = M.real_name
|
||||
M.equip_if_possible(W, M.slot_wear_id)
|
||||
|
||||
M.update_clothing()
|
||||
|
||||
@@ -49,7 +49,7 @@
|
||||
W.access = get_all_accesses()
|
||||
W.access += get_all_centcom_access()
|
||||
W.assignment = "Highlander"
|
||||
W.registered = H.real_name
|
||||
W.registered_name = H.real_name
|
||||
H.equip_if_possible(W, H.slot_wear_id)
|
||||
|
||||
message_admins("\blue [key_name_admin(usr)] used THERE CAN BE ONLY ONE!", 1)
|
||||
|
||||
@@ -135,7 +135,7 @@ var/global/sent_strike_team = 0
|
||||
if(!(new_commando.mind in ticker.mode.traitors))//If they weren't already an extra traitor.
|
||||
ticker.mode.traitors += new_commando.mind//Adds them to current traitor list. Which is really the extra antagonist list.
|
||||
new_commando.equip_death_commando(leader_selected)
|
||||
del(spawn_location)
|
||||
// del(spawn_location)
|
||||
return new_commando
|
||||
|
||||
/mob/living/carbon/human/proc/equip_death_commando(leader_selected = 0)
|
||||
@@ -190,7 +190,7 @@ var/global/sent_strike_team = 0
|
||||
W.access = get_all_accesses()//They get full station access.
|
||||
W.access += list(access_cent_general, access_cent_specops, access_cent_living, access_cent_storage)//Let's add their alloted CentCom access.
|
||||
W.assignment = "Death Commando"
|
||||
W.registered = real_name
|
||||
W.registered_name = real_name
|
||||
equip_if_possible(W, slot_wear_id)
|
||||
|
||||
resistances += "alien_embryo"
|
||||
|
||||
@@ -186,7 +186,7 @@ var/global/sent_syndicate_strike_team = 0
|
||||
W.access = get_all_accesses()//They get full station access because obviously the syndicate has HAAAX, and can make special IDs for their most elite members.
|
||||
W.access += list(access_cent_general, access_cent_specops, access_cent_living, access_cent_storage, access_syndicate)//Let's add their forged CentCom access and syndicate access.
|
||||
W.assignment = "Syndicate Commando"
|
||||
W.registered = real_name
|
||||
W.registered_name = real_name
|
||||
equip_if_possible(W, slot_wear_id)
|
||||
|
||||
resistances += "alien_embryo"
|
||||
|
||||
@@ -653,27 +653,30 @@ datum
|
||||
del (M:wear_mask)
|
||||
M << "\red Your mask melts away but protects you from the acid!"
|
||||
return
|
||||
if(!M.unacidable)
|
||||
if(prob(15) && istype(M, /mob/living/carbon/human) && volume >= 30)
|
||||
|
||||
if(prob(15) && istype(M, /mob/living/carbon/human) && volume >= 30)
|
||||
var/datum/organ/external/affecting = M:get_organ("head")
|
||||
if(affecting)
|
||||
affecting.take_damage(25, 0)
|
||||
M:UpdateDamageIcon()
|
||||
M:emote("scream")
|
||||
M << "\red Your face has become disfigured!"
|
||||
M.real_name = "Unknown"
|
||||
else
|
||||
M.take_organ_damage(min(15, volume * 2)) // uses min() and volume to make sure they aren't being sprayed in trace amounts (1 unit != insta rape) -- Doohl
|
||||
var/datum/organ/external/affecting = M:get_organ("head")
|
||||
if(affecting)
|
||||
affecting.take_damage(25, 0)
|
||||
M:UpdateDamageIcon()
|
||||
M:emote("scream")
|
||||
M << "\red Your face has become disfigured!"
|
||||
M.real_name = "Unknown"
|
||||
else
|
||||
M.take_organ_damage(min(15, volume * 2)) // uses min() and volume to make sure they aren't being sprayed in trace amounts (1 unit != insta rape) -- Doohl
|
||||
else
|
||||
M.take_organ_damage(min(15, volume * 2))
|
||||
if(!M.unacidable)
|
||||
M.take_organ_damage(min(15, volume * 2))
|
||||
|
||||
reaction_obj(var/obj/O, var/volume)
|
||||
if((istype(O,/obj/item) || istype(O,/obj/effect/glowshroom)) && prob(10))
|
||||
var/obj/effect/decal/cleanable/molten_item/I = new/obj/effect/decal/cleanable/molten_item(O.loc)
|
||||
I.desc = "Looks like this was \an [O] some time ago."
|
||||
for(var/mob/M in viewers(5, O))
|
||||
M << "\red \the [O] melts."
|
||||
del(O)
|
||||
if(!O.unacidable)
|
||||
var/obj/effect/decal/cleanable/molten_item/I = new/obj/effect/decal/cleanable/molten_item(O.loc)
|
||||
I.desc = "Looks like this was \an [O] some time ago."
|
||||
for(var/mob/M in viewers(5, O))
|
||||
M << "\red \the [O] melts."
|
||||
del(O)
|
||||
|
||||
pacid
|
||||
name = "Polytrinic acid"
|
||||
@@ -704,38 +707,45 @@ datum
|
||||
else
|
||||
M << "\red Your helmet protects you from the acid!"
|
||||
return
|
||||
var/datum/organ/external/affecting = M:get_organ("head")
|
||||
affecting.take_damage(15, 0)
|
||||
M:UpdateDamageIcon()
|
||||
M:emote("scream")
|
||||
if(prob(15))
|
||||
M << "\red Your face has become disfigured!"
|
||||
M.real_name = "Unknown"
|
||||
|
||||
if(!M.unacidable)
|
||||
var/datum/organ/external/affecting = M:get_organ("head")
|
||||
affecting.take_damage(15, 0)
|
||||
M:UpdateDamageIcon()
|
||||
M:emote("scream")
|
||||
if(prob(15))
|
||||
M << "\red Your face has become disfigured!"
|
||||
M.real_name = "Unknown"
|
||||
else
|
||||
if(istype(M, /mob/living/carbon/monkey) && M:wear_mask)
|
||||
del (M:wear_mask)
|
||||
M << "\red Your mask melts away but protects you from the acid!"
|
||||
return
|
||||
M.take_organ_damage(min(15, volume * 4)) // same deal as sulphuric acid
|
||||
|
||||
|
||||
if(!M.unacidable)
|
||||
M.take_organ_damage(min(15, volume * 4)) // same deal as sulphuric acid
|
||||
else
|
||||
if(istype(M, /mob/living/carbon/human))
|
||||
var/datum/organ/external/affecting = M:get_organ("head")
|
||||
affecting.take_damage(15, 0)
|
||||
M:UpdateDamageIcon()
|
||||
M:emote("scream")
|
||||
if(prob(15))
|
||||
M << "\red Your face has become disfigured!"
|
||||
M.real_name = "Unknown"
|
||||
else
|
||||
M.take_organ_damage(min(15, volume * 4))
|
||||
if(!M.unacidable)
|
||||
if(istype(M, /mob/living/carbon/human))
|
||||
var/datum/organ/external/affecting = M:get_organ("head")
|
||||
affecting.take_damage(15, 0)
|
||||
M:UpdateDamageIcon()
|
||||
M:emote("scream")
|
||||
if(prob(15))
|
||||
M << "\red Your face has become disfigured!"
|
||||
M.real_name = "Unknown"
|
||||
else
|
||||
M.take_organ_damage(min(15, volume * 4))
|
||||
|
||||
reaction_obj(var/obj/O, var/volume)
|
||||
if((istype(O,/obj/item) || istype(O,/obj/effect/glowshroom)))
|
||||
var/obj/effect/decal/cleanable/molten_item/I = new/obj/effect/decal/cleanable/molten_item(O.loc)
|
||||
I.desc = "Looks like this was \an [O] some time ago."
|
||||
for(var/mob/M in viewers(5, O))
|
||||
M << "\red \the [O] melts."
|
||||
del(O)
|
||||
if(!O.unacidable)
|
||||
var/obj/effect/decal/cleanable/molten_item/I = new/obj/effect/decal/cleanable/molten_item(O.loc)
|
||||
I.desc = "Looks like this was \an [O] some time ago."
|
||||
for(var/mob/M in viewers(5, O))
|
||||
M << "\red \the [O] melts."
|
||||
del(O)
|
||||
|
||||
glycerol
|
||||
name = "Glycerol"
|
||||
|
||||
@@ -81,7 +81,7 @@
|
||||
if(perp.wear_id)
|
||||
C.images += image(tempHud,perp,"hud[ckey(perp:wear_id:GetJobName())]")
|
||||
if(istype(perp.wear_id,/obj/item/weapon/card/id))
|
||||
perpname = perp.wear_id:registered
|
||||
perpname = perp.wear_id:registered_name
|
||||
else if(istype(perp.wear_id,/obj/item/device/pda))
|
||||
var/obj/item/device/pda/tempPda = perp.wear_id
|
||||
perpname = tempPda.owner
|
||||
|
||||
@@ -22,7 +22,12 @@ Contains the procs that control attacking critters
|
||||
if (user.a_intent == "hurt")
|
||||
TakeDamage(rand(1,2) * brutevuln)
|
||||
|
||||
if(istype(user, /mob/living/carbon/human))
|
||||
if(istajaran(user))
|
||||
for(var/mob/O in viewers(src, null))
|
||||
O.show_message("\red <B>[user] has slashed at [src]!</B>", 1)
|
||||
playsound(src.loc, 'slice.ogg', 25, 1, -1)
|
||||
|
||||
else if(istype(user, /mob/living/carbon/human))
|
||||
for(var/mob/O in viewers(src, null))
|
||||
O.show_message("\red <B>[user] has punched [src]!</B>", 1)
|
||||
playsound(src.loc, pick('punch1.ogg','punch2.ogg','punch3.ogg','punch4.ogg'), 100, 1)
|
||||
@@ -32,6 +37,8 @@ Contains the procs that control attacking critters
|
||||
O.show_message("\red <B>[user] has slashed at [src]!</B>", 1)
|
||||
playsound(src.loc, 'slice.ogg', 25, 1, -1)
|
||||
|
||||
|
||||
|
||||
else
|
||||
for(var/mob/O in viewers(src, null))
|
||||
O.show_message("\red <B>[user] has bit [src]!</B>", 1)
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/mob/living/carbon/brain
|
||||
var
|
||||
obj/item/device/mmi/container = null
|
||||
obj/item/container = null
|
||||
timeofhostdeath = 0
|
||||
|
||||
New()
|
||||
@@ -29,4 +29,16 @@
|
||||
return 1
|
||||
if (istype(other, /mob/living/carbon/metroid))
|
||||
return 1
|
||||
return ..()
|
||||
return ..()
|
||||
|
||||
|
||||
/mob/living/carbon/brain/Login()
|
||||
..()
|
||||
|
||||
if (!isturf(src.loc))
|
||||
src.client.eye = src.loc
|
||||
src.client.perspective = EYE_PERSPECTIVE
|
||||
if (!container || !istype(container, /obj/item/device/mmi))
|
||||
src.verbs += /mob/proc/ghost
|
||||
|
||||
return
|
||||
@@ -1,5 +1,5 @@
|
||||
/mob/living/carbon/brain/death(gibbed)
|
||||
if(!gibbed && container)//If not gibbed but in a container.
|
||||
if(!gibbed && container && istype(container, /obj/item/device/mmi))//If not gibbed but in a container.
|
||||
for(var/mob/O in viewers(container, null))
|
||||
O.show_message(text("\red <B>[]'s MMI flatlines!</B>", src), 1, "\red You hear something flatline.", 2)
|
||||
container.icon_state = "mmi_dead"
|
||||
|
||||
@@ -40,6 +40,8 @@
|
||||
|
||||
clamp_values()
|
||||
|
||||
|
||||
|
||||
proc
|
||||
|
||||
clamp_values()
|
||||
@@ -311,4 +313,5 @@
|
||||
if(bodytemperature > 409)
|
||||
for(var/datum/disease/D in viruses)
|
||||
D.cure()
|
||||
return
|
||||
return
|
||||
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
/mob/living/carbon/brain/say(var/message)
|
||||
if(!container) return //No container, can't speak, bucko./N
|
||||
if(!(container && istype(container, /obj/item/device/mmi)))
|
||||
return //No MMI, can't speak, bucko./N
|
||||
else ..()
|
||||
@@ -167,7 +167,6 @@
|
||||
var/status = ""
|
||||
var/brutedamage = org.brute_dam
|
||||
var/burndamage = org.burn_dam
|
||||
|
||||
if(halloss > 0)
|
||||
if(prob(30))
|
||||
brutedamage += halloss
|
||||
@@ -214,4 +213,5 @@
|
||||
)
|
||||
|
||||
/mob/living/carbon/proc/eyecheck()
|
||||
return 0
|
||||
return 0
|
||||
|
||||
|
||||
@@ -0,0 +1,213 @@
|
||||
/mob/living/carbon/human/tajaran/examine()
|
||||
set src in view()
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/* BS12 Examine. Not sure why this is here, it seems to be mostly a copy and paste of the parent.
|
||||
/mob/living/carbon/human/tajaran/examine()
|
||||
set src in view()
|
||||
|
||||
usr << "\blue *---------*"
|
||||
|
||||
usr << "\blue This is \icon[src.icon] <B>[src.name]</B>! One of the cat-like Tajarans."
|
||||
|
||||
// crappy hack because you can't do \his[src] etc
|
||||
var/t_his = "its"
|
||||
var/t_him = "it"
|
||||
if (src.gender == MALE)
|
||||
t_his = "his"
|
||||
t_him = "him"
|
||||
else if (src.gender == FEMALE)
|
||||
t_his = "her"
|
||||
t_him = "her"
|
||||
|
||||
if (src.w_uniform)
|
||||
if (src.w_uniform.blood_DNA)
|
||||
usr << "\red [src.name] is wearing a[src.w_uniform.blood_DNA ? " bloody " : " "] \icon[src.w_uniform] [src.w_uniform.name]!"
|
||||
else
|
||||
usr << "\blue [src.name] is wearing a \icon[src.w_uniform] [src.w_uniform.name]."
|
||||
|
||||
if (src.handcuffed)
|
||||
usr << "\blue [src.name] is \icon[src.handcuffed] handcuffed!"
|
||||
|
||||
if (src.wear_suit)
|
||||
if (src.wear_suit.blood_DNA)
|
||||
usr << "\red [src.name] has a[src.wear_suit.blood_DNA ? " bloody " : " "] \icon[src.wear_suit] [src.wear_suit.name] on!"
|
||||
else
|
||||
usr << "\blue [src.name] has a \icon[src.wear_suit] [src.wear_suit.name] on."
|
||||
|
||||
if (src.l_ear)
|
||||
usr << "\blue [src.name] has a \icon[src.l_ear] [src.l_ear.name] on [t_his] left ear."
|
||||
|
||||
if (src.r_ear)
|
||||
usr << "\blue [src.name] has a \icon[src.r_ear] [src.r_ear.name] on [t_his] right ear."
|
||||
|
||||
if (src.wear_mask)
|
||||
if (src.wear_mask.blood_DNA)
|
||||
usr << "\red [src.name] has a[src.wear_mask.blood_DNA ? " bloody " : " "] \icon[src.wear_mask] [src.wear_mask.name] on [t_his] face!"
|
||||
else
|
||||
usr << "\blue [src.name] has a \icon[src.wear_mask] [src.wear_mask.name] on [t_his] face."
|
||||
|
||||
if (src.l_hand)
|
||||
if (src.l_hand.blood_DNA)
|
||||
usr << "\red [src.name] has a[src.l_hand.blood_DNA ? " bloody " : " "] \icon[src.l_hand] [src.l_hand.name] in [t_his] left hand!"
|
||||
else
|
||||
usr << "\blue [src.name] has a \icon[src.l_hand] [src.l_hand.name] in [t_his] left hand."
|
||||
|
||||
if (src.r_hand)
|
||||
if (src.r_hand.blood_DNA)
|
||||
usr << "\red [src.name] has a[src.r_hand.blood_DNA ? " bloody " : " "] \icon[src.r_hand] [src.r_hand.name] in [t_his] right hand!"
|
||||
else
|
||||
usr << "\blue [src.name] has a \icon[src.r_hand] [src.r_hand.name] in [t_his] right hand."
|
||||
|
||||
if (src.belt)
|
||||
if (src.belt.blood_DNA)
|
||||
usr << "\red [src.name] has a[src.belt.blood_DNA ? " bloody " : " "] \icon[src.belt] [src.belt.name] on [t_his] belt!"
|
||||
else
|
||||
usr << "\blue [src.name] has a \icon[src.belt] [src.belt.name] on [t_his] belt."
|
||||
if(src.s_store)
|
||||
if(src.s_store.blood_DNA)
|
||||
usr << "\red [src.name] has a[src.s_store.blood_DNA ? " bloody " : " "] \icon[src.s_store] [src.s_store.name] on [t_his][src.wear_suit.blood_DNA ? " bloody " : " "] \icon[src.wear_suit] [src.wear_suit.name]!"
|
||||
else
|
||||
usr << "\blue [src.name] has a \icon[src.s_store] [src.s_store.name] on [t_his][src.wear_suit.blood_DNA ? " bloody " : " "] \icon[src.wear_suit] [src.wear_suit.name]."
|
||||
if (src.shoes)
|
||||
usr << "[src.shoes.blood_DNA ? "\red" : "\blue"][src.name] has a[src.shoes.blood_DNA ? " bloody " : " "] \icon[src.shoes] [src.shoes.name] on [t_his] feet."
|
||||
|
||||
|
||||
if (src.gloves)
|
||||
if (src.gloves.blood_DNA)
|
||||
usr << "\red [src.name] has bloody \icon[src.gloves] [src.gloves.name] on [t_his] hands!"
|
||||
else
|
||||
usr << "\blue [src.name] has \icon[src.gloves] [src.gloves.name] on [t_his] hands."
|
||||
else if (src.blood_DNA)
|
||||
usr << "\red [src.name] has bloody hands!"
|
||||
|
||||
if (src.back)
|
||||
usr << "\blue [src.name] has a \icon[src.back] [src.back.name] on [t_his] back."
|
||||
|
||||
if (src.wear_id)
|
||||
var/id
|
||||
var/photo = 0
|
||||
if(istype(src:wear_id, /obj/item/device/pda))
|
||||
var/obj/item/device/pda/pda = src:wear_id
|
||||
id = pda.owner
|
||||
else
|
||||
id = src.wear_id.registered_name_name
|
||||
if (src.wear_id.PHOTO)
|
||||
photo = 1
|
||||
if (id != src.real_name && in_range(src, usr) && prob(10))
|
||||
if (photo)
|
||||
usr << "\red [src.name] is wearing \icon[src.wear_id] [src.wear_id.name] with a photo yet doesn't seem to be that person!!!"
|
||||
else
|
||||
usr << "\red [src.name] is wearing \icon[src.wear_id] [src.wear_id.name] yet doesn't seem to be that person!!!"
|
||||
else
|
||||
if (photo)
|
||||
usr << "\blue [src.name] is wearing \icon[src.wear_id] [src.wear_id.name] with a photo."
|
||||
else
|
||||
usr << "\blue [src.name] is wearing \icon[src.wear_id] [src.wear_id.name]."
|
||||
|
||||
|
||||
if (src.is_jittery)
|
||||
switch(src.jitteriness)
|
||||
if(300 to INFINITY)
|
||||
usr << "\red [src] is violently convulsing."
|
||||
if(200 to 300)
|
||||
usr << "\red [src] looks extremely jittery."
|
||||
if(100 to 200)
|
||||
usr << "\red [src] is twitching ever so slightly."
|
||||
|
||||
if (src.suiciding)
|
||||
switch(src.suiciding)
|
||||
if(1)
|
||||
usr << "\red [src.name] appears to have bitten [t_his] tongue off!"
|
||||
|
||||
var/distance = get_dist(usr,src)
|
||||
if(istype(usr, /mob/dead/observer) || usr.stat == 2) // ghosts can see anything
|
||||
distance = 1
|
||||
|
||||
if (src.stat == 1 || stat == 2)
|
||||
usr << "\red [name] doesn't seem to be responding to anything around [t_him], [t_his] eyes closed as though asleep."
|
||||
if(health < 0 && distance <= 3)
|
||||
usr << "\red [name] does not appear to be breathing."
|
||||
if(ishuman(src) && usr.stat == 0 && src.stat == 1 && distance <= 1)
|
||||
for(var/mob/O in viewers(usr.loc, null))
|
||||
O.show_message("[usr] checks [src]'s pulse.", 1)
|
||||
sleep(15)
|
||||
usr << "\blue [name] has a pulse!"
|
||||
|
||||
if (src.stat == 2 || (changeling && changeling.changeling_fakedeath == 1))
|
||||
if(distance <= 1)
|
||||
if(ishuman(usr) && usr.stat == 0)
|
||||
for(var/mob/O in viewers(usr.loc, null) )
|
||||
O.show_message("[usr] checks [src]'s pulse.", 1)
|
||||
sleep(15)
|
||||
usr << "\red [name] has no pulse!"
|
||||
else
|
||||
if (src.getBruteLoss())
|
||||
if (src.getBruteLoss() < 30)
|
||||
usr << "\red [src.name] looks slightly injured!"
|
||||
else
|
||||
usr << "\red <B>[src.name] looks severely injured!</B>"
|
||||
|
||||
if (src.cloneloss)
|
||||
if (src.cloneloss < 30)
|
||||
usr << "\red [src.name] looks slightly... unfinished?"
|
||||
else
|
||||
usr << "\red <B>[src.name] looks very... unfinished?</B>"
|
||||
|
||||
if (src.getFireLoss())
|
||||
if (src.getFireLoss() < 30)
|
||||
usr << "\red [src.name] looks slightly burned!"
|
||||
else
|
||||
usr << "\red <B>[src.name] looks severely burned!</B>"
|
||||
|
||||
if (src.nutrition < 100)
|
||||
usr << "\red [src.name] looks like flesh and bones."
|
||||
else if (src.nutrition >= 500)
|
||||
if (usr.nutrition < 100)
|
||||
usr << "\red [src.name] looks very round and delicious. Like a little piggy. A tasty piggy."
|
||||
else
|
||||
usr << "\blue [src.name] looks quite chubby."
|
||||
|
||||
else if (src.brainloss >= 60)
|
||||
usr << "\red [src.name] has a stupid expression on [t_his] face."
|
||||
if (!src.client)
|
||||
usr << "\red [src.name] doesn't seem as though they want to talk."
|
||||
|
||||
for(var/named in organs)
|
||||
var/datum/organ/external/temp = organs[named]
|
||||
if(temp.destroyed)
|
||||
usr << "\red [src.name] is missing [t_his] [temp.display_name]."
|
||||
if(temp.wounds)
|
||||
for(var/datum/organ/external/wound/w in temp.wounds)
|
||||
var/size = w.wound_size
|
||||
var/sizetext
|
||||
switch(size)
|
||||
if(1)
|
||||
sizetext = "cut"
|
||||
if(2)
|
||||
sizetext = "deep cut"
|
||||
if(3)
|
||||
sizetext = "flesh wound"
|
||||
if(4)
|
||||
sizetext = "gaping wound"
|
||||
if(5)
|
||||
sizetext = "big gaping wound"
|
||||
if(6)
|
||||
sizetext = "massive wound"
|
||||
if(w.bleeding)
|
||||
usr << "\red [src.name] is bleeding from a [sizetext] on [t_his] [temp.display_name]."
|
||||
continue
|
||||
|
||||
|
||||
usr << "\blue *---------*"
|
||||
*/
|
||||
@@ -0,0 +1,546 @@
|
||||
//their language needs to hook into radios as well
|
||||
|
||||
/mob/living/carbon/human/tajaran/say_quote(var/text,var/is_speaking_taj)
|
||||
//work out if the listener can understand or not
|
||||
|
||||
var/ending = copytext(text, length(text))
|
||||
if (src.stuttering)
|
||||
return "stammers, \"[text]\"";
|
||||
if (src.slurring)
|
||||
return "slurrs, \"[text]\"";
|
||||
if (src.brainloss >= 60)
|
||||
return "gibbers, \"[text]\"";
|
||||
|
||||
if(is_speaking_taj)
|
||||
return "mrowls, \"[text]\""//pick("yowls, \"[text]\"", "growls, \"[text]\"","mewls, \"[text]\"", "mrowls, \"[text]\"", "meows, \"[text]\"", "purrs, \"[text]\"");
|
||||
|
||||
if (ending == "?")
|
||||
return "asks, \"[text]\"";
|
||||
else if (ending == "!")
|
||||
return "exclaims, \"[text]\"";
|
||||
|
||||
return "says, \"[text]\"";
|
||||
|
||||
//convert message to an indecipherable series of sounds for anyone who isnt tajaran
|
||||
/mob/living/carbon/human/tajaran/proc/tajspeak(var/message)
|
||||
//return stars(message)
|
||||
var/te = html_decode(message)
|
||||
var/t = ""
|
||||
var/n = length(message)
|
||||
var/p = 1
|
||||
while(p <= n)
|
||||
if (copytext(te, p, p + 1) != " ")
|
||||
t = text("[][]", t, pick(tajspeak_letters))
|
||||
p++
|
||||
return html_encode(t)
|
||||
/*if (pr == null)
|
||||
pr = 25
|
||||
if (pr <= 0)
|
||||
return null
|
||||
else
|
||||
if (pr >= 100)
|
||||
return n
|
||||
var/te = html_decode(n)
|
||||
var/t = ""
|
||||
n = length(n)
|
||||
var/p = null
|
||||
p = 1
|
||||
while(p <= n)
|
||||
if ((copytext(te, p, p + 1) == " " || prob(pr)))
|
||||
t = text("[][]", t, copytext(te, p, p + 1))
|
||||
else
|
||||
t = text("[]*", t)
|
||||
p++
|
||||
return html_encode(t)*/
|
||||
|
||||
/mob/living/carbon/human/tajaran/say(var/message)
|
||||
var/message_old = message
|
||||
message = trim(copytext(sanitize(message), 1, MAX_MESSAGE_LEN))
|
||||
|
||||
if (!message)
|
||||
return
|
||||
|
||||
log_say("[name]/[key] : [message]")
|
||||
|
||||
if (length(message) >= 1)
|
||||
if (miming && copytext(message, 1, 2) != "*")
|
||||
return
|
||||
|
||||
if (stat == 2)
|
||||
return say_dead(message)
|
||||
|
||||
if (silent)
|
||||
return
|
||||
|
||||
if (src.client && (client.muted || src.client.muted_complete))
|
||||
src << "You are muted."
|
||||
return
|
||||
|
||||
// wtf?
|
||||
if (stat)
|
||||
return
|
||||
|
||||
// Mute disability
|
||||
if (disabilities & 64)
|
||||
return
|
||||
|
||||
if (istype(wear_mask, /obj/item/clothing/mask/muzzle))
|
||||
return
|
||||
|
||||
// emotes
|
||||
if (copytext(message, 1, 2) == "*" && !stat)
|
||||
return emote(copytext(message, 2))
|
||||
|
||||
var/alt_name = ""
|
||||
if (istype(src, /mob/living/carbon/human) && name != real_name)
|
||||
var/mob/living/carbon/human/H = src
|
||||
alt_name = " (as [H.get_visible_name()])"
|
||||
var/italics = 0
|
||||
var/message_range = null
|
||||
var/message_mode = null
|
||||
|
||||
if (brainloss >= 60 && prob(50))
|
||||
if (ishuman(src))
|
||||
message_mode = "headset"
|
||||
// Special message handling
|
||||
else if (copytext(message, 1, 2) == ";")
|
||||
if (ishuman(src))
|
||||
message_mode = "headset"
|
||||
else if(istype(src, /mob/living/silicon/pai) || istype(src, /mob/living/silicon/robot))
|
||||
message_mode = "pAI"
|
||||
message = copytext(message, 2)
|
||||
|
||||
else if (length(message) >= 2)
|
||||
var/channel_prefix = copytext(message, 1, 3)
|
||||
|
||||
var/list/keys = list(
|
||||
":r" = "right ear",
|
||||
":l" = "left ear",
|
||||
":i" = "intercom",
|
||||
":h" = "department",
|
||||
":c" = "Command",
|
||||
":n" = "Science",
|
||||
":m" = "Medical",
|
||||
":e" = "Engineering",
|
||||
":s" = "Security",
|
||||
":w" = "whisper",
|
||||
":b" = "binary",
|
||||
":a" = "alientalk",
|
||||
":t" = "Syndicate",
|
||||
":d" = "Mining",
|
||||
":q" = "Cargo",
|
||||
":g" = "changeling",
|
||||
|
||||
":R" = "right hand",
|
||||
":L" = "left hand",
|
||||
":I" = "intercom",
|
||||
":H" = "department",
|
||||
":C" = "Command",
|
||||
":N" = "Science",
|
||||
":M" = "Medical",
|
||||
":E" = "Engineering",
|
||||
":S" = "Security",
|
||||
":W" = "whisper",
|
||||
":B" = "binary",
|
||||
":A" = "alientalk",
|
||||
":T" = "Syndicate",
|
||||
":D" = "Mining",
|
||||
":Q" = "Cargo",
|
||||
":G" = "changeling",
|
||||
|
||||
//kinda localization -- rastaf0
|
||||
//same keys as above, but on russian keyboard layout. This file uses cp1251 as encoding.
|
||||
":ê" = "right hand",
|
||||
":ä" = "left hand",
|
||||
":ø" = "intercom",
|
||||
":ð" = "department",
|
||||
":ñ" = "Command",
|
||||
":ò" = "Science",
|
||||
":ü" = "Medical",
|
||||
":ó" = "Engineering",
|
||||
":û" = "Security",
|
||||
":ö" = "whisper",
|
||||
":è" = "binary",
|
||||
":ô" = "alientalk",
|
||||
":å" = "Syndicate",
|
||||
":â" = "Mining",
|
||||
":é" = "Cargo",
|
||||
":ï" = "changeling",
|
||||
)
|
||||
|
||||
message_mode = keys[channel_prefix]
|
||||
//world << "channel_prefix=[channel_prefix]; message_mode=[message_mode]"
|
||||
if (message_mode)
|
||||
message = trim(copytext(message, 3))
|
||||
if (!ishuman(src) && (message_mode=="department" || (message_mode in radiochannels)))
|
||||
message_mode = null //only humans can use headsets
|
||||
|
||||
if (!message)
|
||||
return
|
||||
|
||||
//work out if we're speaking tajaran or not
|
||||
var/is_speaking_taj = 0
|
||||
if(copytext(message, 1, 3) == ":j" || copytext(message, 1, 3) == ":J")
|
||||
message = copytext(message, 3)
|
||||
if(taj_talk_understand)
|
||||
is_speaking_taj = 1
|
||||
|
||||
if( !message_mode && (disease_symptoms & DISEASE_WHISPER))
|
||||
message_mode = "whisper"
|
||||
|
||||
if(src.stunned > 0 || (traumatic_shock > 61 && prob(50)))
|
||||
message_mode = "" //Stunned people shouldn't be able to physically turn on their radio/hold down the button to speak into it
|
||||
|
||||
|
||||
message = capitalize(message) //capitalize the first letter of what they actually say
|
||||
|
||||
// :downs:
|
||||
if (brainloss >= 60)
|
||||
message = dd_replacetext(message, " am ", " ")
|
||||
message = dd_replacetext(message, " is ", " ")
|
||||
message = dd_replacetext(message, " are ", " ")
|
||||
message = dd_replacetext(message, "you", "u")
|
||||
message = dd_replacetext(message, "help", "halp")
|
||||
message = dd_replacetext(message, "grief", "grife")
|
||||
message = dd_replacetext(message, "space", "spess")
|
||||
message = dd_replacetext(message, "carp", "crap")
|
||||
message = dd_replacetext(message, "reason", "raisin")
|
||||
if(prob(50))
|
||||
message = uppertext(message)
|
||||
message += "[stutter(pick("!", "!!", "!!!"))]"
|
||||
if(!stuttering && prob(15))
|
||||
message = stutter(message)
|
||||
|
||||
if (stuttering)
|
||||
message = stutter(message)
|
||||
if (slurring)
|
||||
message = slur(message)
|
||||
|
||||
/* //qw do not have beesease atm.
|
||||
if(virus)
|
||||
if(virus.name=="beesease" && virus.stage>=2)
|
||||
if(prob(virus.stage*10))
|
||||
var/bzz = length(message)
|
||||
message = "B"
|
||||
for(var/i=0,i<bzz,i++)
|
||||
message += "Z"
|
||||
*/
|
||||
var/list/obj/item/used_radios = new
|
||||
|
||||
switch (message_mode)
|
||||
if ("headset")
|
||||
if (src:l_ear && istype(src:l_ear,/obj/item/device/radio))
|
||||
src:l_ear.talk_into(src, message, 0, "[is_speaking_taj ? "tajaran" : "english"]")
|
||||
used_radios += src:l_ear
|
||||
else if (src:r_ear)
|
||||
src:r_ear.talk_into(src, message, 0, "[is_speaking_taj ? "tajaran" : "english"]")
|
||||
used_radios += src:r_ear
|
||||
|
||||
message_range = 1
|
||||
italics = 1
|
||||
|
||||
|
||||
if ("secure headset")
|
||||
if (src:l_ear && istype(src:l_ear,/obj/item/device/radio))
|
||||
src:l_ear.talk_into(src, message, 1, "[is_speaking_taj ? "tajaran" : "english"]")
|
||||
used_radios += src:l_ear
|
||||
else if (src:r_ear)
|
||||
src:r_ear.talk_into(src, message, 1, "[is_speaking_taj ? "tajaran" : "english"]")
|
||||
used_radios += src:r_ear
|
||||
|
||||
message_range = 1
|
||||
italics = 1
|
||||
|
||||
if ("right ear")
|
||||
if (src:r_ear)
|
||||
src:r_ear.talk_into(src, message, 0, "[is_speaking_taj ? "tajaran" : "english"]")
|
||||
used_radios += src:r_ear
|
||||
|
||||
message_range = 1
|
||||
italics = 1
|
||||
|
||||
if ("left ear")
|
||||
if (src:l_ear)
|
||||
src:l_ear.talk_into(src, message, 0, "[is_speaking_taj ? "tajaran" : "english"]")
|
||||
used_radios += src:l_ear
|
||||
|
||||
message_range = 1
|
||||
italics = 1
|
||||
|
||||
if ("intercom")
|
||||
for (var/obj/item/device/radio/intercom/I in view(1, null))
|
||||
I.talk_into(src, message, 0, "[is_speaking_taj ? "tajaran" : "english"]")
|
||||
used_radios += I
|
||||
|
||||
message_range = 1
|
||||
italics = 1
|
||||
|
||||
//I see no reason to restrict such way of whispering
|
||||
if ("whisper")
|
||||
whisper(trim(copytext(message_old, 3)))
|
||||
return
|
||||
|
||||
if ("binary")
|
||||
if(robot_talk_understand || binarycheck())
|
||||
//message = trim(copytext(sanitize(message), 1, MAX_MESSAGE_LEN)) //seems redundant
|
||||
robot_talk(message)
|
||||
return
|
||||
|
||||
if ("alientalk")
|
||||
if(alien_talk_understand || hivecheck())
|
||||
//message = trim(copytext(sanitize(message), 1, MAX_MESSAGE_LEN)) //seems redundant
|
||||
alien_talk(message)
|
||||
return
|
||||
|
||||
if ("department")
|
||||
if (src:l_ear && istype(src:l_ear,/obj/item/device/radio))
|
||||
src:l_ear.talk_into(src, message, message_mode)
|
||||
used_radios += src:l_ear
|
||||
else if (src:r_ear)
|
||||
src:r_ear.talk_into(src, message, message_mode)
|
||||
used_radios += src:r_ear
|
||||
message_range = 1
|
||||
italics = 1
|
||||
if("changeling")
|
||||
if(src.changeling)
|
||||
for(var/mob/living/carbon/aChangeling in world)
|
||||
if(aChangeling.changeling)
|
||||
aChangeling << "<i><font color=#800080><b>[gender=="male"?"Mr.":"Mrs."] [changeling.changelingID]:</b> [message]</font></i>"
|
||||
return
|
||||
////SPECIAL HEADSETS START
|
||||
else
|
||||
//world << "SPECIAL HEADSETS"
|
||||
if (message_mode in radiochannels)
|
||||
if (src:l_ear && istype(src:l_ear,/obj/item/device/radio))
|
||||
src:l_ear.talk_into(src, message, message_mode)
|
||||
used_radios += src:l_ear
|
||||
else if (src:r_ear)
|
||||
src:r_ear.talk_into(src, message, message_mode)
|
||||
used_radios += src:r_ear
|
||||
message_range = 1
|
||||
italics = 1
|
||||
/////SPECIAL HEADSETS END
|
||||
|
||||
var/list/listening
|
||||
/*
|
||||
if(istype(loc, /obj/item/device/aicard)) // -- TLE
|
||||
var/obj/O = loc
|
||||
if(istype(O.loc, /mob))
|
||||
var/mob/M = O.loc
|
||||
listening = hearers(message_range, M)
|
||||
else
|
||||
listening = hearers(message_range, O)
|
||||
else
|
||||
listening = hearers(message_range, src)
|
||||
|
||||
for (var/obj/O in view(message_range, src))
|
||||
for (var/mob/M in O)
|
||||
listening += M // maybe need to check if M can hear src
|
||||
spawn (0)
|
||||
if (O)
|
||||
O.hear_talk(src, message)
|
||||
|
||||
if (!(src in listening))
|
||||
listening += src
|
||||
|
||||
*/
|
||||
var/turf/T = get_turf(src)
|
||||
listening = hearers(message_range, T)
|
||||
var/list/V = view(message_range, T)
|
||||
var/list/W = V
|
||||
//find mobs in lockers, cryo, intellicards, brains, MMIs, and so on.
|
||||
for (var/mob/M in world)
|
||||
if (!M.client)
|
||||
continue //skip monkeys and leavers
|
||||
if (istype(M, /mob/new_player))
|
||||
continue
|
||||
if (M.stat <2) //is alive
|
||||
if (isturf(M.loc))
|
||||
continue //if M can hear us it was already found by hearers()
|
||||
if (get_turf(M) in V) //this is slow, but I don't think we'd have a lot of wardrobewhores every round --rastaf0
|
||||
listening+=M
|
||||
else
|
||||
if (M.client && M.client.ghost_ears)
|
||||
listening|=M
|
||||
|
||||
var/list/eavesdroppers = get_mobs_in_view(7, src)
|
||||
for(var/mob/M in listening)
|
||||
eavesdroppers.Remove(M)
|
||||
for(var/mob/M in eavesdroppers)
|
||||
if(M.stat)
|
||||
eavesdroppers.Remove(M)
|
||||
|
||||
for (var/obj/O in ((W | contents)-used_radios))
|
||||
W |= O
|
||||
|
||||
for (var/mob/M in W)
|
||||
W |= M.contents
|
||||
if(ishuman(M))
|
||||
var/mob/living/carbon/human/G = M
|
||||
for(var/name in G.organs)
|
||||
var/datum/organ/external/F = G.organs[name]
|
||||
W |= F.implant
|
||||
|
||||
for (var/obj/item/device/pda/M in W)
|
||||
W |= M.contents
|
||||
|
||||
for (var/obj/O in W) //radio in pocket could work, radio in backpack wouldn't --rastaf0
|
||||
spawn (0)
|
||||
if(O && !istype(O.loc, /obj/item/weapon/storage))
|
||||
O.hear_talk(src, message)
|
||||
|
||||
if(isbrain(src))//For brains to properly talk if they are in an MMI..or in a brain. Could be extended to other mobs I guess.
|
||||
for(var/obj/O in loc)//Kinda ugly but whatever.
|
||||
if(O)
|
||||
spawn(0)
|
||||
O.hear_talk(src, message)
|
||||
|
||||
var/list/heard_a = list() // understood us
|
||||
var/list/heard_b = list() // didn't understand us
|
||||
|
||||
for (var/mob/M in listening)
|
||||
//if speaking in tajaran, only let other tajs understand
|
||||
if ( M.say_understands(src) && (M.taj_talk_understand || !is_speaking_taj) )
|
||||
heard_a += M
|
||||
else
|
||||
heard_b += M
|
||||
|
||||
var/speech_bubble_test = say_test(message)
|
||||
var/image/speech_bubble = image('talk.dmi',src,"h[speech_bubble_test]")
|
||||
|
||||
var/rendered = null
|
||||
if (length(heard_a))
|
||||
var/message_a = say_quote(message,is_speaking_taj)
|
||||
if (italics)
|
||||
message_a = "<i>[message_a]</i>"
|
||||
if (!istype(src, /mob/living/carbon/human))
|
||||
rendered = "<span class='game say'><span class='name'>[name]</span> <span class='message'>[message_a]</span></span>"
|
||||
else if(istype(wear_mask, /obj/item/clothing/mask/gas/voice))
|
||||
if(wear_mask:vchange)
|
||||
rendered = "<span class='game say'><span class='name'>[wear_mask:voice]</span> <span class='message'>[message_a]</span></span>"
|
||||
else
|
||||
rendered = "<span class='game say'><span class='name'>[name]</span> <span class='message'>[message_a]</span></span>"
|
||||
else
|
||||
rendered = "<span class='game say'><span class='name'>[real_name]</span>[alt_name] <span class='message'>[message_a]</span></span>"
|
||||
|
||||
|
||||
/*
|
||||
// Create speech bubble
|
||||
var/obj/effect/speech_bubble/B = new/obj/effect/speech_bubble
|
||||
B.icon = 'speechbubble.dmi'
|
||||
B.parent = src
|
||||
B.mouse_opacity = 0
|
||||
B.invisibility = invisibility
|
||||
B.layer = 10
|
||||
|
||||
// Determine if the speech bubble's going to have a special look
|
||||
var/presay = ""
|
||||
if(istype(src, /mob/living/silicon))
|
||||
presay = "bot"
|
||||
if(istype(src, /mob/living/carbon/alien))
|
||||
presay = "xeno"
|
||||
if(istype(src, /mob/living/carbon/metroid))
|
||||
presay = "metroid"
|
||||
*/
|
||||
for (var/mob/M in heard_a)
|
||||
|
||||
M.show_message(rendered, 2)
|
||||
M << speech_bubble
|
||||
spawn(30) del(speech_bubble)
|
||||
//spawn(30) del(speech_bubble)
|
||||
/*
|
||||
if(M.client)
|
||||
|
||||
// If this client has bubbles disabled, obscure the bubble
|
||||
if(!M.client.bubbles || M == src)
|
||||
var/image/I = image('speechbubble.dmi', B, "override")
|
||||
I.override = 1
|
||||
M << I
|
||||
*/
|
||||
|
||||
/*
|
||||
// find the suffix, if bot, human or monkey
|
||||
var/punctuation = ""
|
||||
if(presay == "bot" || presay == "")
|
||||
var/ending = copytext(text, length(text))
|
||||
if (ending == "?")
|
||||
punctuation = "question"
|
||||
else if (ending == "!")
|
||||
punctuation = "exclamation"
|
||||
else
|
||||
punctuation = ""
|
||||
|
||||
// flick the bubble
|
||||
flick("[presay]say[punctuation]", B)
|
||||
|
||||
if(istype(loc, /turf))
|
||||
B.loc = loc
|
||||
else
|
||||
B.loc = loc.loc
|
||||
|
||||
spawn()
|
||||
sleep(11)
|
||||
del(B)
|
||||
*/
|
||||
|
||||
if (length(heard_b))
|
||||
var/message_b = tajspeak(message)
|
||||
message_b = say_quote(message_b,1)
|
||||
|
||||
if (italics)
|
||||
message_b = "<i>[message_b]</i>"
|
||||
|
||||
rendered = "<span class='game say'><span class='name'>[voice_name]</span> <span class='message'>[message_b]</span></span>"
|
||||
|
||||
|
||||
/*
|
||||
// Create speech bubble
|
||||
var/obj/effect/speech_bubble/B = new/obj/effect/speech_bubble
|
||||
B.icon = 'speechbubble.dmi'
|
||||
B.parent = src
|
||||
B.mouse_opacity = 0
|
||||
B.invisibility = invisibility
|
||||
B.layer = 10
|
||||
|
||||
// Determine if the speech bubble's going to have a special look
|
||||
var/presay = ""
|
||||
if(istype(src, /mob/living/silicon))
|
||||
presay = "bot"
|
||||
if(istype(src, /mob/living/carbon/alien))
|
||||
presay = "xeno"
|
||||
if(istype(src, /mob/living/carbon/metroid))
|
||||
presay = "metroid"
|
||||
*/
|
||||
|
||||
for (var/mob/M in heard_b)
|
||||
M.show_message(rendered, 2)
|
||||
M << speech_bubble
|
||||
spawn(30) del(speech_bubble)
|
||||
|
||||
/*
|
||||
if(M.client)
|
||||
|
||||
if(!M.client.bubbles || M == src)
|
||||
var/image/I = image('speechbubble.dmi', B, "override")
|
||||
I.override = 1
|
||||
M << I
|
||||
|
||||
|
||||
flick("[presay]say", B)
|
||||
|
||||
if(istype(loc, /turf))
|
||||
B.loc = loc
|
||||
else
|
||||
B.loc = loc.loc
|
||||
|
||||
spawn()
|
||||
sleep(11)
|
||||
del(B)
|
||||
*/
|
||||
|
||||
if (length(eavesdroppers))
|
||||
|
||||
for (var/mob/M in eavesdroppers)
|
||||
M << "\blue [src] speaks into their radio..."
|
||||
M << speech_bubble
|
||||
spawn(30) del(speech_bubble)
|
||||
@@ -0,0 +1,56 @@
|
||||
/mob/living/carbon/human/proc/Tajaraize()
|
||||
if (monkeyizing)
|
||||
return
|
||||
for(var/obj/item/W in src)
|
||||
drop_from_slot(W)
|
||||
update_clothing()
|
||||
monkeyizing = 1
|
||||
canmove = 0
|
||||
icon = null
|
||||
invisibility = 101
|
||||
for(var/datum/organ/external/organ in organs)
|
||||
del(organ)
|
||||
|
||||
|
||||
var/atom/movable/overlay/animation = new /atom/movable/overlay( loc )
|
||||
animation.icon_state = "blank"
|
||||
animation.icon = 'mob.dmi'
|
||||
animation.master = src
|
||||
flick("h2monkey", animation)
|
||||
sleep(48)
|
||||
//animation = null
|
||||
var/mob/living/carbon/human/tajaran/O = new /mob/living/carbon/human/tajaran( loc )
|
||||
del(animation)
|
||||
|
||||
O.real_name = real_name
|
||||
O.name = name
|
||||
O.dna = dna
|
||||
updateappearance(O,O.dna.uni_identity)
|
||||
O.loc = loc
|
||||
O.viruses = viruses
|
||||
viruses = list()
|
||||
for(var/datum/disease/D in O.viruses)
|
||||
D.affected_mob = O
|
||||
O.universal_speak = 1 //hacky fix until someone can figure out how to make them only understand humans
|
||||
|
||||
if (client)
|
||||
client.mob = O
|
||||
if(mind)
|
||||
mind.transfer_to(O)
|
||||
|
||||
O << "<B>You are now a Tajara.</B>"
|
||||
spawn(0)//To prevent the proc from returning null.
|
||||
del(src)
|
||||
return
|
||||
|
||||
/client/proc/make_tajaran(mob/living/carbon/human/H as mob)
|
||||
set category = "Fun"
|
||||
set name = "Make Tajaran"
|
||||
set desc = "Make (mob) into a tajaran."
|
||||
|
||||
if (!holder)
|
||||
src << "Only administrators may use this command."
|
||||
return
|
||||
|
||||
if(istype(H))
|
||||
H:Tajaraize()
|
||||
@@ -0,0 +1,703 @@
|
||||
/mob/living/carbon/human/tajaran
|
||||
name = "tajaran"
|
||||
real_name = "tajaran"
|
||||
voice_name = "tajaran"
|
||||
icon = 'tajaran.dmi'
|
||||
icon_state = "m-none"
|
||||
var/list/tajspeak_letters
|
||||
//
|
||||
universal_speak = 1 //hacky fix until someone can figure out how to make them only understand humans
|
||||
taj_talk_understand = 1
|
||||
voice_message = "mrowls"
|
||||
|
||||
/mob/living/carbon/human/tajaran/New()
|
||||
|
||||
..()
|
||||
|
||||
tajspeak_letters = new/list("~","*","-")
|
||||
|
||||
var/g = "m"
|
||||
if (gender == FEMALE)
|
||||
g = "f"
|
||||
|
||||
spawn(1)
|
||||
stand_icon = new /icon('tajaran.dmi', "body_[g]_s")
|
||||
lying_icon = new /icon('tajaran.dmi', "body_[g]_l")
|
||||
icon = stand_icon
|
||||
update_clothing()
|
||||
|
||||
src << "\blue Your Tajaran icons have been generated!"
|
||||
|
||||
|
||||
|
||||
|
||||
/mob/living/carbon/human/tajaran/update_clothing()
|
||||
// ..()
|
||||
|
||||
if (monkeyizing)
|
||||
return
|
||||
|
||||
overlays = null
|
||||
|
||||
// lol
|
||||
var/fat = ""
|
||||
/*if (mutations & FAT)
|
||||
fat = "fat"*/
|
||||
/*
|
||||
if (mutations & HULK)
|
||||
overlays += image("icon" = 'genetics.dmi', "icon_state" = "hulk[fat][!lying ? "_s" : "_l"]")
|
||||
*/
|
||||
if (mutations & COLD_RESISTANCE)
|
||||
overlays += image("icon" = 'genetics.dmi', "icon_state" = "fire[fat][!lying ? "_s" : "_l"]")
|
||||
|
||||
if (mutations & TK)
|
||||
overlays += image("icon" = 'genetics.dmi', "icon_state" = "telekinesishead[fat][!lying ? "_s" : "_l"]")
|
||||
|
||||
if (mutations & LASER)
|
||||
overlays += image("icon" = 'genetics.dmi', "icon_state" = "lasereyes[!lying ? "_s" : "_l"]")
|
||||
|
||||
if (mutantrace)
|
||||
switch(mutantrace)
|
||||
if("golem","metroid")
|
||||
overlays += image("icon" = 'genetics.dmi', "icon_state" = "[mutantrace][fat][!lying ? "_s" : "_l"]")
|
||||
if(face_standing)
|
||||
del(face_standing)
|
||||
if(face_lying)
|
||||
del(face_lying)
|
||||
if(stand_icon)
|
||||
del(stand_icon)
|
||||
if(lying_icon)
|
||||
del(lying_icon)
|
||||
if("lizard")
|
||||
overlays += image("icon" = 'genetics.dmi', "icon_state" = "[mutantrace][fat]_[gender][!lying ? "_s" : "_l"]")
|
||||
if(face_standing)
|
||||
del(face_standing)
|
||||
if(face_lying)
|
||||
del(face_lying)
|
||||
if(stand_icon)
|
||||
del(stand_icon)
|
||||
if(lying_icon)
|
||||
del(lying_icon)
|
||||
if("plant")
|
||||
if(stat != 2) //if not dead, that is
|
||||
overlays += image("icon" = 'genetics.dmi', "icon_state" = "[mutantrace][fat]_[gender][!lying ? "_s" : "_l"]")
|
||||
else
|
||||
overlays += image("icon" = 'genetics.dmi', "icon_state" = "[mutantrace]_d")
|
||||
if(face_standing)
|
||||
del(face_standing)
|
||||
if(face_lying)
|
||||
del(face_lying)
|
||||
if(stand_icon)
|
||||
del(stand_icon)
|
||||
if(lying_icon)
|
||||
del(lying_icon)
|
||||
else
|
||||
if(!face_standing || !face_lying)
|
||||
update_face()
|
||||
if(!stand_icon || !lying_icon)
|
||||
update_body()
|
||||
|
||||
if(buckled)
|
||||
if(istype(buckled, /obj/structure/stool/bed))
|
||||
lying = 1
|
||||
else
|
||||
lying = 0
|
||||
|
||||
// Automatically drop anything in store / id / belt if you're not wearing a uniform.
|
||||
if (!w_uniform)
|
||||
for (var/obj/item/thing in list(r_store, l_store, wear_id, belt))
|
||||
if (thing)
|
||||
u_equip(thing)
|
||||
if (client)
|
||||
client.screen -= thing
|
||||
|
||||
if (thing)
|
||||
thing.loc = loc
|
||||
thing.dropped(src)
|
||||
thing.layer = initial(thing.layer)
|
||||
|
||||
|
||||
//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 (lying)
|
||||
icon = lying_icon
|
||||
|
||||
overlays += body_lying
|
||||
|
||||
if (face_lying)
|
||||
overlays += face_lying
|
||||
else
|
||||
icon = stand_icon
|
||||
|
||||
overlays += body_standing
|
||||
|
||||
if (face_standing)
|
||||
overlays += face_standing
|
||||
|
||||
// Uniform
|
||||
if(w_uniform)
|
||||
/*if (mutations & FAT && !(w_uniform.flags & ONESIZEFITSALL))
|
||||
src << "\red You burst out of the [w_uniform.name]!"
|
||||
var/obj/item/clothing/c = w_uniform
|
||||
u_equip(c)
|
||||
if(client)
|
||||
client.screen -= c
|
||||
if(c)
|
||||
c:loc = loc
|
||||
c:dropped(src)
|
||||
c:layer = initial(c:layer)*/
|
||||
if(w_uniform)//I should really not need these
|
||||
w_uniform.screen_loc = ui_iclothing
|
||||
if(istype(w_uniform, /obj/item/clothing/under))
|
||||
var/t1 = w_uniform.color
|
||||
if (!t1)
|
||||
t1 = icon_state
|
||||
/*if (mutations & FAT)
|
||||
overlays += image("icon" = 'uniform_fat.dmi', "icon_state" = "[t1][!lying ? "_s" : "_l"]", "layer" = MOB_LAYER)
|
||||
else*/
|
||||
overlays += image("icon" = 'uniform.dmi', "icon_state" = text("[][]",t1, (!(lying) ? "_s" : "_l")), "layer" = MOB_LAYER)
|
||||
if (w_uniform.blood_DNA)
|
||||
var/icon/stain_icon = icon('blood.dmi', "uniformblood[!lying ? "" : "2"]")
|
||||
overlays += image("icon" = stain_icon, "layer" = MOB_LAYER)
|
||||
|
||||
if (wear_id)
|
||||
if(wear_id.over_jumpsuit)
|
||||
overlays += image("icon" = 'mob.dmi', "icon_state" = "id[!lying ? null : "2"]", "layer" = MOB_LAYER)
|
||||
|
||||
if (client)
|
||||
client.screen -= hud_used.intents
|
||||
client.screen -= hud_used.mov_int
|
||||
|
||||
|
||||
//Screenlocs for these slots are handled by the huds other_update()
|
||||
//because theyre located on the 'other' inventory bar.
|
||||
|
||||
// Gloves
|
||||
var/datum/organ/external/lo = get_organ("l_hand")
|
||||
var/datum/organ/external/ro = get_organ("r_hand")
|
||||
if (!lo.destroyed || !ro.destroyed)
|
||||
if (gloves)
|
||||
var/t1 = gloves.item_state
|
||||
if (!t1)
|
||||
t1 = gloves.icon_state
|
||||
var/icon/gloves_icon = new /icon("icon" = 'hands.dmi', "icon_state" = text("[][]", t1, (!( lying ) ? null : "2")))
|
||||
if(lo.destroyed)
|
||||
gloves_icon.Blend(new /icon('limb_mask.dmi', "right_[lying?"l":"s"]"), ICON_MULTIPLY)
|
||||
else if(ro.destroyed)
|
||||
gloves_icon.Blend(new /icon('limb_mask.dmi', "left_[lying?"l":"s"]"), ICON_MULTIPLY)
|
||||
overlays += image(gloves_icon, "layer" = MOB_LAYER)
|
||||
if (gloves.blood_DNA)
|
||||
var/icon/stain_icon = icon('blood.dmi', "bloodyhands[!lying ? "" : "2"]")
|
||||
if(lo.destroyed)
|
||||
stain_icon.Blend(new /icon('limb_mask.dmi', "right_[lying?"l":"s"]"), ICON_MULTIPLY)
|
||||
else if(ro.destroyed)
|
||||
stain_icon.Blend(new /icon('limb_mask.dmi', "left_[lying?"l":"s"]"), ICON_MULTIPLY)
|
||||
overlays += image("icon" = stain_icon, "layer" = MOB_LAYER)
|
||||
else if (blood_DNA)
|
||||
var/icon/stain_icon = icon('blood.dmi', "bloodyhands[!lying ? "" : "2"]")
|
||||
if(lo.destroyed)
|
||||
stain_icon.Blend(new /icon('limb_mask.dmi', "right_[lying?"l":"s"]"), ICON_MULTIPLY)
|
||||
else if(ro.destroyed)
|
||||
stain_icon.Blend(new /icon('limb_mask.dmi', "left_[lying?"l":"s"]"), ICON_MULTIPLY)
|
||||
overlays += image("icon" = stain_icon, "layer" = MOB_LAYER)
|
||||
// Glasses
|
||||
if (glasses)
|
||||
var/t1 = glasses.icon_state
|
||||
overlays += image("icon" = 'eyes.dmi', "icon_state" = text("[][]", t1, (!( lying ) ? null : "2")), "layer" = MOB_LAYER)
|
||||
// Ears
|
||||
/*
|
||||
if (l_ear)
|
||||
var/t1 = l_ear.icon_state
|
||||
overlays += image("icon" = 'ears.dmi', "icon_state" = text("[][]", t1, (!( lying ) ? null : "2")), "layer" = MOB_LAYER)
|
||||
if (r_ear)
|
||||
var/t1 = r_ear.icon_state
|
||||
overlays += image("icon" = 'ears.dmi', "icon_state" = text("[][]", t1, (!( lying ) ? null : "2")), "layer" = MOB_LAYER)
|
||||
|
||||
*/
|
||||
// Shoes
|
||||
lo = get_organ("l_foot")
|
||||
ro = get_organ("r_foot")
|
||||
if ((!lo.destroyed || !ro.destroyed) && shoes)
|
||||
var/t1 = shoes.icon_state
|
||||
var/icon/shoes_icon = new /icon("icon" = 'feet.dmi', "icon_state" = text("[][]", t1, (!( lying ) ? null : "2")))
|
||||
if(lo.destroyed && !lying)
|
||||
shoes_icon.Blend(new /icon('limb_mask.dmi', "right[lying?"_l":""]"), ICON_MULTIPLY)
|
||||
else if(ro.destroyed && !lying)
|
||||
shoes_icon.Blend(new /icon('limb_mask.dmi', "left[lying?"_l":""]"), ICON_MULTIPLY)
|
||||
overlays += image(shoes_icon, "layer" = MOB_LAYER)
|
||||
if (shoes.blood_DNA)
|
||||
var/icon/stain_icon = icon('blood.dmi', "shoesblood[!lying ? "" : "2"]")
|
||||
if(lo.destroyed)
|
||||
stain_icon.Blend(new /icon('limb_mask.dmi', "right_[lying?"l":"s"]"), ICON_MULTIPLY)
|
||||
else if(ro.destroyed)
|
||||
stain_icon.Blend(new /icon('limb_mask.dmi', "left_[lying?"l":"s"]"), ICON_MULTIPLY)
|
||||
overlays += image("icon" = stain_icon, "layer" = MOB_LAYER) // Radio
|
||||
/* if (w_radio)
|
||||
overlays += image("icon" = 'ears.dmi', "icon_state" = "headset[!lying ? "" : "2"]", "layer" = MOB_LAYER) */
|
||||
|
||||
if (s_store)
|
||||
var/t1 = s_store.item_state
|
||||
if (!t1)
|
||||
t1 = s_store.icon_state
|
||||
s_store.screen_loc = ui_sstore1
|
||||
|
||||
if (h_store)
|
||||
h_store.screen_loc = ui_hstore1
|
||||
|
||||
if(client) hud_used.other_update() //Update the screenloc of the items on the 'other' inventory bar
|
||||
//to hide / show them.
|
||||
if (client)
|
||||
if (i_select)
|
||||
if (intent)
|
||||
client.screen += hud_used.intents
|
||||
|
||||
var/list/L = dd_text2list(intent, ",")
|
||||
L[1] += ":-11"
|
||||
i_select.screen_loc = dd_list2text(L,",") //ICONS4, FUCKING SHIT
|
||||
else
|
||||
i_select.screen_loc = null
|
||||
if (m_select)
|
||||
if (m_int)
|
||||
client.screen += hud_used.mov_int
|
||||
|
||||
var/list/L = dd_text2list(m_int, ",")
|
||||
L[1] += ":-11"
|
||||
m_select.screen_loc = dd_list2text(L,",") //ICONS4, FUCKING SHIT
|
||||
else
|
||||
m_select.screen_loc = null
|
||||
|
||||
var/tail_shown = 1
|
||||
if (wear_suit)
|
||||
/*if (mutations & FAT && !(wear_suit.flags & ONESIZEFITSALL))
|
||||
src << "\red You burst out of the [wear_suit.name]!"
|
||||
var/obj/item/clothing/c = wear_suit
|
||||
u_equip(c)
|
||||
if(client)
|
||||
client.screen -= c
|
||||
if(c)
|
||||
c:loc = loc
|
||||
c:dropped(src)
|
||||
c:layer = initial(c:layer)*/
|
||||
if (istype(wear_suit, /obj/item/clothing/suit))
|
||||
var/t1 = wear_suit.icon_state
|
||||
overlays += image("icon" = 'suit.dmi', "icon_state" = text("[][]", t1, (!( lying ) ? null : "2")), "layer" = MOB_LAYER)
|
||||
if (wear_suit)
|
||||
if (wear_suit.blood_DNA)
|
||||
var/icon/stain_icon = null
|
||||
if (istype(wear_suit, /obj/item/clothing/suit/armor/vest))
|
||||
stain_icon = icon('blood.dmi', "armorblood[!lying ? "" : "2"]")
|
||||
|
||||
else
|
||||
stain_icon = icon('blood.dmi', "suitblood[!lying ? "" : "2"]")
|
||||
overlays += image("icon" = stain_icon, "layer" = MOB_LAYER)
|
||||
wear_suit.screen_loc = ui_oclothing
|
||||
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()
|
||||
hand = 0
|
||||
drop_item()
|
||||
hand = h
|
||||
//if wearing some suits, hide the tail
|
||||
if ( istype(wear_suit, /obj/item/clothing/suit/bio_suit) || istype(wear_suit, /obj/item/clothing/suit/bomb_suit) || istype(wear_suit, /obj/item/clothing/suit/space) )
|
||||
tail_shown = 0
|
||||
if(tail_shown)
|
||||
overlays += image("icon" = icon('tajaran.dmi', "tail_[gender==FEMALE ? "f" : "m"]_[lying ? "l" : "s"]"), "layer" = MOB_LAYER)
|
||||
|
||||
if (lying)
|
||||
if (face_lying)
|
||||
overlays += face_lying
|
||||
else
|
||||
if (face_standing)
|
||||
overlays += face_standing
|
||||
|
||||
if (wear_mask)
|
||||
if (istype(wear_mask, /obj/item/clothing/mask))
|
||||
var/t1 = wear_mask.icon_state
|
||||
overlays += image("icon" = 'mask.dmi', "icon_state" = text("[][]", t1, (!( lying ) ? null : "2")), "layer" = MOB_LAYER)
|
||||
if (!istype(wear_mask, /obj/item/clothing/mask/cigarette))
|
||||
if (wear_mask.blood_DNA)
|
||||
var/icon/stain_icon = icon('blood.dmi', "maskblood[!lying ? "" : "2"]")
|
||||
overlays += image("icon" = stain_icon, "layer" = MOB_LAYER)
|
||||
wear_mask.screen_loc = ui_mask
|
||||
|
||||
// Head
|
||||
if (head)
|
||||
var/t1 = head.icon_state
|
||||
var/icon/head_icon = icon('head.dmi', text("[][]", t1, (!( lying ) ? null : "2")))
|
||||
if(istype(head,/obj/item/clothing/head/kitty))
|
||||
head_icon = (( lying ) ? head:mob2 : head:mob)
|
||||
overlays += image("icon" = head_icon, "layer" = MOB_LAYER)
|
||||
if (head.blood_DNA)
|
||||
var/icon/stain_icon = icon('blood.dmi', "helmetblood[!lying ? "" : "2"]")
|
||||
overlays += image("icon" = stain_icon, "layer" = MOB_LAYER)
|
||||
head.screen_loc = ui_head
|
||||
else
|
||||
var/datum/organ/external/head = get_organ("head")
|
||||
if(!head.destroyed)
|
||||
//if not wearing anything on the head, show the ears
|
||||
overlays += image("icon" = icon('tajaran.dmi', "ears_[gender==FEMALE ? "f" : "m"]_[lying ? "l" : "s"]"), "layer" = MOB_LAYER)
|
||||
|
||||
// Belt
|
||||
if (belt)
|
||||
var/t1 = belt.item_state
|
||||
if (!t1)
|
||||
t1 = belt.icon_state
|
||||
overlays += image("icon" = 'belt.dmi', "icon_state" = text("[][]", t1, (!( lying ) ? null : "2")), "layer" = MOB_LAYER)
|
||||
belt.screen_loc = ui_belt
|
||||
|
||||
if ((wear_mask && !(wear_mask.see_face)) || (head && !(head.see_face))) // can't see the face
|
||||
if (wear_id)
|
||||
if (istype(wear_id, /obj/item/weapon/card/id))
|
||||
var/obj/item/weapon/card/id/id = wear_id
|
||||
if (id.registered_name)
|
||||
name = id.registered_name
|
||||
else
|
||||
name = "Unknown"
|
||||
else if (istype(wear_id, /obj/item/device/pda))
|
||||
var/obj/item/device/pda/pda = wear_id
|
||||
if (pda.owner)
|
||||
name = pda.owner
|
||||
else
|
||||
name = "Unknown"
|
||||
else
|
||||
name = "Unknown"
|
||||
else
|
||||
if (wear_id)
|
||||
if (istype(wear_id, /obj/item/weapon/card/id))
|
||||
var/obj/item/weapon/card/id/id = wear_id
|
||||
if (id.registered_name != real_name)
|
||||
name = "[real_name] (as [id.registered_name])"
|
||||
|
||||
|
||||
else if (istype(wear_id, /obj/item/device/pda))
|
||||
var/obj/item/device/pda/pda = wear_id
|
||||
if (pda.owner)
|
||||
if (pda.owner != real_name)
|
||||
name = "[real_name] (as [pda.owner])"
|
||||
else
|
||||
name = real_name
|
||||
|
||||
if (wear_id)
|
||||
wear_id.screen_loc = ui_id
|
||||
|
||||
if (l_store)
|
||||
l_store.screen_loc = ui_storage1
|
||||
|
||||
if (r_store)
|
||||
r_store.screen_loc = ui_storage2
|
||||
|
||||
if (back)
|
||||
var/t1 = back.icon_state
|
||||
overlays += image("icon" = 'back.dmi', "icon_state" = text("[][]", t1, (!( lying ) ? null : "2")), "layer" = MOB_LAYER)
|
||||
back.screen_loc = ui_back
|
||||
|
||||
if (handcuffed)
|
||||
pulling = null
|
||||
if (!lying)
|
||||
overlays += image("icon" = 'mob.dmi', "icon_state" = "handcuff1", "layer" = MOB_LAYER)
|
||||
else
|
||||
overlays += image("icon" = 'mob.dmi', "icon_state" = "handcuff2", "layer" = MOB_LAYER)
|
||||
|
||||
if (client)
|
||||
client.screen -= contents
|
||||
client.screen += contents
|
||||
|
||||
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)
|
||||
|
||||
r_hand.screen_loc = ui_rhand
|
||||
|
||||
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)
|
||||
|
||||
l_hand.screen_loc = ui_lhand
|
||||
|
||||
var/shielded = 0
|
||||
for (var/obj/item/weapon/cloaking_device/S in src)
|
||||
if (S.active)
|
||||
shielded = 2
|
||||
break
|
||||
|
||||
if(istype(wear_suit, /obj/item/clothing/suit/space/space_ninja)&&wear_suit:s_active)
|
||||
shielded = 3
|
||||
|
||||
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))
|
||||
//Ninjas may flick into view once in a while if they are stealthed.
|
||||
if(prob(90))
|
||||
NinjaStealthActive(loc)
|
||||
else
|
||||
NinjaStealthMalf()
|
||||
else
|
||||
invisibility = 0
|
||||
|
||||
if (shielded == 2)
|
||||
invisibility = 2
|
||||
else
|
||||
invisibility = 0
|
||||
/*
|
||||
for (var/mob/M in viewers(1, src))//For the love of god DO NOT REFRESH EVERY SECOND - Mport
|
||||
if ((M.client && M.machine == src))
|
||||
spawn (0)
|
||||
show_inv(M)
|
||||
return
|
||||
*/
|
||||
last_b_state = stat
|
||||
|
||||
/mob/living/carbon/human/tajaran/update_body()
|
||||
if(stand_icon)
|
||||
del(stand_icon)
|
||||
if(lying_icon)
|
||||
del(lying_icon)
|
||||
|
||||
if (mutantrace)
|
||||
return
|
||||
|
||||
var/g = "m"
|
||||
if (gender == MALE)
|
||||
g = "m"
|
||||
else if (gender == FEMALE)
|
||||
g = "f"
|
||||
|
||||
stand_icon = new /icon('tajaran.dmi', "torso_[g]_s")
|
||||
lying_icon = new /icon('tajaran.dmi', "torso_[g]_l")
|
||||
|
||||
|
||||
|
||||
var/husk = (mutations & HUSK)
|
||||
//var/obese = (mutations & FAT)
|
||||
|
||||
stand_icon.Blend(new /icon('tajaran.dmi', "chest_[g]_s"), ICON_OVERLAY)
|
||||
lying_icon.Blend(new /icon('tajaran.dmi', "chest_[g]_l"), ICON_OVERLAY)
|
||||
|
||||
var/datum/organ/external/head = get_organ("head")
|
||||
if(!head.destroyed)
|
||||
stand_icon.Blend(new /icon('tajaran.dmi', "head_[g]_s"), ICON_OVERLAY)
|
||||
lying_icon.Blend(new /icon('tajaran.dmi', "head_[g]_l"), ICON_OVERLAY)
|
||||
|
||||
for(var/datum/organ/external/part in organs)
|
||||
if(!istype(part, /datum/organ/external/groin) \
|
||||
&& !istype(part, /datum/organ/external/chest) \
|
||||
&& !istype(part, /datum/organ/external/head) \
|
||||
&& !part.destroyed)
|
||||
var/icon/temp = new /icon('tajaran.dmi', "[part.icon_name]_s")
|
||||
if(part.robot) temp.MapColors(rgb(77,77,77), rgb(150,150,150), rgb(28,28,28), rgb(0,0,0))
|
||||
stand_icon.Blend(temp, ICON_OVERLAY)
|
||||
temp = new /icon('tajaran.dmi', "[part.icon_name]_l")
|
||||
if(part.robot) temp.MapColors(rgb(77,77,77), rgb(150,150,150), rgb(28,28,28), rgb(0,0,0))
|
||||
lying_icon.Blend(temp , ICON_OVERLAY)
|
||||
|
||||
stand_icon.Blend(new /icon('tajaran.dmi', "groin_[g]_s"), ICON_OVERLAY)
|
||||
lying_icon.Blend(new /icon('tajaran.dmi', "groin_[g]_l"), ICON_OVERLAY)
|
||||
|
||||
if (husk)
|
||||
var/icon/husk_s = new /icon('tajaran.dmi', "husk_s")
|
||||
var/icon/husk_l = new /icon('tajaran.dmi', "husk_l")
|
||||
|
||||
for(var/datum/organ/external/part in organs)
|
||||
if(!istype(part, /datum/organ/external/groin) \
|
||||
&& !istype(part, /datum/organ/external/chest) \
|
||||
&& !istype(part, /datum/organ/external/head) \
|
||||
&& part.destroyed)
|
||||
husk_s.Blend(new /icon('dam_mask.dmi', "[part.icon_name]"), ICON_SUBTRACT)
|
||||
husk_l.Blend(new /icon('dam_mask.dmi', "[part.icon_name]2"), ICON_SUBTRACT)
|
||||
|
||||
stand_icon.Blend(husk_s, ICON_OVERLAY)
|
||||
lying_icon.Blend(husk_l, ICON_OVERLAY)
|
||||
/*else if(obese)
|
||||
stand_icon.Blend(new /icon('human.dmi', "fatbody_s"), ICON_OVERLAY)
|
||||
lying_icon.Blend(new /icon('human.dmi', "fatbody_l"), ICON_OVERLAY)*/
|
||||
|
||||
// Skin tone
|
||||
if (s_tone >= 0)
|
||||
stand_icon.Blend(rgb(s_tone, s_tone, s_tone), ICON_ADD)
|
||||
lying_icon.Blend(rgb(s_tone, s_tone, s_tone), ICON_ADD)
|
||||
else
|
||||
stand_icon.Blend(rgb(-s_tone, -s_tone, -s_tone), ICON_SUBTRACT)
|
||||
lying_icon.Blend(rgb(-s_tone, -s_tone, -s_tone), ICON_SUBTRACT)
|
||||
|
||||
if (underwear > 0)
|
||||
//if(!obese)
|
||||
stand_icon.Blend(new /icon('tajaran.dmi', "underwear[underwear]_[g]_s"), ICON_OVERLAY)
|
||||
lying_icon.Blend(new /icon('tajaran.dmi', "underwear[underwear]_[g]_l"), ICON_OVERLAY)
|
||||
|
||||
|
||||
/mob/living/carbon/human/tajaran/update_face()
|
||||
if(organs)
|
||||
var/datum/organ/external/head = get_organ("head")
|
||||
if(head)
|
||||
if(head.destroyed)
|
||||
del(face_standing)
|
||||
del(face_lying)
|
||||
return
|
||||
|
||||
//if(!facial_hair_style || !hair_style) return//Seems people like to lose their icons, this should stop the runtimes for now
|
||||
del(face_standing)
|
||||
del(face_lying)
|
||||
|
||||
if (mutantrace)
|
||||
return
|
||||
|
||||
var/g = "m"
|
||||
if (gender == MALE)
|
||||
g = "m"
|
||||
else if (gender == FEMALE)
|
||||
g = "f"
|
||||
|
||||
var/icon/eyes_s = new/icon("icon" = 'tajaran_face.dmi', "icon_state" = "eyes_s")
|
||||
var/icon/eyes_l = new/icon("icon" = 'tajaran_face.dmi', "icon_state" = "eyes_l")
|
||||
eyes_s.Blend(rgb(r_eyes, g_eyes, b_eyes), ICON_ADD)
|
||||
eyes_l.Blend(rgb(r_eyes, g_eyes, b_eyes), ICON_ADD)
|
||||
|
||||
//var/icon/hair_s = new/icon("icon" = hair_style.icon, "icon_state" = "[hair_style.icon_state]_s")
|
||||
//var/icon/hair_l = new/icon("icon" = hair_style.icon, "icon_state" = "[hair_style.icon_state]_l")
|
||||
//hair_s.Blend(rgb(r_hair, g_hair, b_hair), ICON_ADD)
|
||||
//hair_l.Blend(rgb(r_hair, g_hair, b_hair), ICON_ADD)
|
||||
|
||||
//var/icon/facial_s = new/icon("icon" = facial_hair_style.icon, "icon_state" = "[facial_hair_style.icon_state]_s")
|
||||
//var/icon/facial_l = new/icon("icon" = facial_hair_style.icon, "icon_state" = "[facial_hair_style.icon_state]_l")
|
||||
//facial_s.Blend(rgb(r_facial, g_facial, b_facial), ICON_ADD)
|
||||
//facial_l.Blend(rgb(r_facial, g_facial, b_facial), ICON_ADD)
|
||||
|
||||
var/icon/mouth_s = new/icon("icon" = 'tajaran_face.dmi', "icon_state" = "mouth_[g]_s")
|
||||
var/icon/mouth_l = new/icon("icon" = 'tajaran_face.dmi', "icon_state" = "mouth_[g]_l")
|
||||
|
||||
// if the head or mask has the flag BLOCKHAIR (equal to 5), then do not apply hair
|
||||
//if((!(head && (head.flags & BLOCKHAIR))) && !(wear_mask && (wear_mask.flags & BLOCKHAIR)))
|
||||
//eyes_s.Blend(hair_s, ICON_OVERLAY)
|
||||
//eyes_l.Blend(hair_l, ICON_OVERLAY)
|
||||
|
||||
eyes_s.Blend(mouth_s, ICON_OVERLAY)
|
||||
eyes_l.Blend(mouth_l, ICON_OVERLAY)
|
||||
|
||||
// if BLOCKHAIR, do not apply facial hair
|
||||
//if((!(head && (head.flags & BLOCKHAIR))) && !(wear_mask && (wear_mask.flags & BLOCKHAIR)))
|
||||
//eyes_s.Blend(facial_s, ICON_OVERLAY)
|
||||
//eyes_l.Blend(facial_l, ICON_OVERLAY)
|
||||
|
||||
|
||||
face_standing = new /image()
|
||||
face_lying = new /image()
|
||||
face_standing.icon = eyes_s
|
||||
face_standing.layer = MOB_LAYER
|
||||
face_lying.icon = eyes_l
|
||||
face_lying.layer = MOB_LAYER
|
||||
|
||||
del(mouth_l)
|
||||
del(mouth_s)
|
||||
//del(facial_l)
|
||||
//del(facial_s)
|
||||
//del(hair_l)
|
||||
//del(hair_s)
|
||||
del(eyes_l)
|
||||
del(eyes_s)
|
||||
|
||||
/mob/living/carbon/human/tajaran/co2overloadtime = null
|
||||
/mob/living/carbon/human/tajaran/temperature_resistance = T0C+70
|
||||
|
||||
|
||||
|
||||
/mob/living/carbon/human/tajaran/Emissary/
|
||||
unacidable = 1
|
||||
var/aegis = 1
|
||||
|
||||
/mob/living/carbon/human/tajaran/Emissary/New()
|
||||
|
||||
..()
|
||||
|
||||
reagents.add_reagent("hyperzine", 5000) //From the dark, to the light, it's a supersonic flight!
|
||||
// Gotta keep it going!
|
||||
if (!(mutations & HULK))
|
||||
mutations |= HULK
|
||||
|
||||
if (!(mutations & LASER))
|
||||
mutations |= LASER
|
||||
|
||||
if (!(mutations & XRAY))
|
||||
mutations |= XRAY
|
||||
sight |= (SEE_MOBS|SEE_OBJS|SEE_TURFS)
|
||||
see_in_dark = 8
|
||||
see_invisible = 2
|
||||
|
||||
if (!(mutations & COLD_RESISTANCE))
|
||||
mutations |= COLD_RESISTANCE
|
||||
|
||||
if (!(mutations & TK))
|
||||
mutations |= TK
|
||||
|
||||
if(!(mutations & HEAL))
|
||||
mutations |= HEAL
|
||||
|
||||
spawn(0)
|
||||
while(src)
|
||||
adjustBruteLoss(-10)
|
||||
adjustToxLoss(-10)
|
||||
adjustOxyLoss(-10)
|
||||
adjustFireLoss(-10)
|
||||
sleep(10)
|
||||
|
||||
|
||||
/mob/living/carbon/human/tajaran/Emissary/ex_act()
|
||||
return
|
||||
|
||||
/mob/living/carbon/human/tajaran/Emissary/afterattack(atom/target as mob|obj|turf|area, mob/living/user as mob|obj, inrange, params)
|
||||
if(istype(target , /obj/machinery/door/airlock))
|
||||
if(target:locked)
|
||||
target:locked = 0
|
||||
if(!target:density)
|
||||
return 1
|
||||
if(target:operating > 0)
|
||||
return
|
||||
if(!ticker)
|
||||
return 0
|
||||
if(!target:operating)
|
||||
target:operating = 1
|
||||
|
||||
target:animate("opening")
|
||||
target:sd_SetOpacity(0)
|
||||
sleep(10)
|
||||
target:layer = 2.7
|
||||
target:density = 0
|
||||
target:update_icon()
|
||||
target:sd_SetOpacity(0)
|
||||
target:update_nearby_tiles()
|
||||
|
||||
target:operating = -1
|
||||
|
||||
user << "You force the door open, shearing the bolts and burning out the motor."
|
||||
|
||||
if(target:operating)
|
||||
target:operating = -1
|
||||
else if(istype(target , /obj/machinery/door/firedoor))
|
||||
target:open()
|
||||
|
||||
/mob/living/carbon/human/tajaran/Emissary/Life()
|
||||
|
||||
..()
|
||||
|
||||
if (!(mutations & HULK))
|
||||
mutations |= HULK
|
||||
|
||||
|
||||
if((stat == 2) && aegis)
|
||||
src.show_message("\red [src]'s eyes open suddenlly.", 3, "\red \"I gave a solemn vow to never die for long.\"", 2)
|
||||
src.heal_overall_damage(9001,9001)
|
||||
src.stat = 0
|
||||
aegis = 0
|
||||
@@ -0,0 +1,167 @@
|
||||
/mob/living/carbon/human/tajaran/whisper(message as text)
|
||||
//Figured it out. If you use say :w (message) it HTML encodes it, THEN passes it to the whisper code, which does so again. Jeez. --SkyMarshal
|
||||
message = trim(copytext(sanitize(message), 1, MAX_MESSAGE_LEN))
|
||||
|
||||
if (!message)
|
||||
return
|
||||
|
||||
log_whisper("[src.name]/[src.key] : [message]")
|
||||
|
||||
if (src.client && (src.client.muted || src.client.muted_complete))
|
||||
src << "You are muted."
|
||||
return
|
||||
|
||||
if (src.stat == 2)
|
||||
return src.say_dead(message)
|
||||
|
||||
if (src.stat)
|
||||
return
|
||||
|
||||
var/alt_name = ""
|
||||
if (istype(src, /mob/living/carbon/human) && src.name != src.real_name)
|
||||
var/mob/living/carbon/human/H = src
|
||||
alt_name = " (as [H.get_visible_name()])"
|
||||
// Mute disability
|
||||
if (src.disabilities & 64)
|
||||
return
|
||||
|
||||
if (istype(src.wear_mask, /obj/item/clothing/mask/muzzle))
|
||||
return
|
||||
|
||||
var/italics = 1
|
||||
var/message_range = 1
|
||||
|
||||
//work out if we're speaking tajaran or not
|
||||
var/is_speaking_taj = 0
|
||||
if(copytext(message, 1, 4) == ":j ")
|
||||
message = copytext(message, 4)
|
||||
if(taj_talk_understand)
|
||||
is_speaking_taj = 1
|
||||
|
||||
if(istype(src.wear_mask, /obj/item/clothing/mask/gas/voice/space_ninja)&&src.wear_mask:voice=="Unknown")
|
||||
if(copytext(message, 1, 2) != "*")
|
||||
var/list/temp_message = dd_text2list(message, " ")
|
||||
var/list/pick_list = list()
|
||||
for(var/i = 1, i <= temp_message.len, i++)
|
||||
pick_list += i
|
||||
for(var/i=1, i <= abs(temp_message.len/3), i++)
|
||||
var/H = pick(pick_list)
|
||||
if(findtext(temp_message[H], "*") || findtext(temp_message[H], ";") || findtext(temp_message[H], ":")) continue
|
||||
temp_message[H] = ninjaspeak(temp_message[H])
|
||||
pick_list -= H
|
||||
message = dd_list2text(temp_message, " ")
|
||||
message = dd_replaceText(message, "o", "¤")
|
||||
message = dd_replaceText(message, "p", "þ")
|
||||
message = dd_replaceText(message, "l", "£")
|
||||
message = dd_replaceText(message, "s", "§")
|
||||
message = dd_replaceText(message, "u", "µ")
|
||||
message = dd_replaceText(message, "b", "ß")
|
||||
|
||||
message = capitalize(message)
|
||||
|
||||
if (src.stuttering)
|
||||
message = stutter(message)
|
||||
if (src.slurring)
|
||||
message = slur(message)
|
||||
|
||||
for (var/obj/O in view(message_range, src))
|
||||
spawn (0)
|
||||
if (O)
|
||||
O.hear_talk(src, message)
|
||||
|
||||
var/list/listening = hearers(message_range, src)
|
||||
listening -= src
|
||||
listening += src
|
||||
var/list/eavesdropping = hearers(2, src)
|
||||
eavesdropping -= src
|
||||
eavesdropping -= listening
|
||||
var/list/watching = hearers(5, src)
|
||||
watching -= src
|
||||
watching -= listening
|
||||
watching -= eavesdropping
|
||||
|
||||
var/list/heard_a = list() // understood us
|
||||
var/list/heard_b = list() // didn't understand us
|
||||
|
||||
for (var/mob/M in listening)
|
||||
if ( M.say_understands(src) && (M.taj_talk_understand || !is_speaking_taj) )
|
||||
heard_a += M
|
||||
else
|
||||
heard_b += M
|
||||
|
||||
var/rendered = null
|
||||
|
||||
for (var/mob/M in watching)
|
||||
if ( (M.say_understands(src) && !is_speaking_taj) || istype(M,/mob/living/carbon/human/tajaran) )
|
||||
rendered = "<span class='game say'><span class='name'>[src.name]</span> [is_speaking_taj ? "quietly mrowls" : "whispers"] something.</span>"
|
||||
else
|
||||
rendered = "<span class='game say'><span class='name'>[src.voice_name]</span> [is_speaking_taj ? "quietly mrowls" : "whispers"] something.</span>"
|
||||
M.show_message(rendered, 2)
|
||||
|
||||
if (length(heard_a))
|
||||
var/message_a = message
|
||||
|
||||
if (italics)
|
||||
message_a = "<i>[message_a]</i>"
|
||||
//This appears copied from carbon/living say.dm so the istype check for mob is probably not needed. Appending for src is also not needed as the game will check that automatically.
|
||||
if (!istype(src, /mob/living/carbon/human))
|
||||
rendered = "<span class='game say'><span class='name'>[name]</span> [is_speaking_taj ? "mrowls quietly" : "whispers"], <span class='message'>\"[message_a]\"</span></span>"
|
||||
else if (istype(wear_mask, /obj/item/clothing/mask/gas/voice))
|
||||
if (wear_mask:vchange)
|
||||
rendered = "<span class='game say'><span class='name'>[wear_mask:voice]</span> [is_speaking_taj ? "mrowls quietly" : "whispers"], <span class='message'>\"[message_a]\"</span></span>"
|
||||
else
|
||||
rendered = "<span class='game say'><span class='name'>[name]</span> [is_speaking_taj ? "mrowls quietly" : "whispers"], <span class='message'>\"[message_a]\"</span></span>"
|
||||
else
|
||||
rendered = "<span class='game say'><span class='name'>[real_name]</span>[alt_name] [is_speaking_taj ? "mrowls quietly" : "whispers"], <span class='message'>\"[message_a]\"</span></span>"
|
||||
|
||||
for (var/mob/M in heard_a)
|
||||
M.show_message(rendered, 2)
|
||||
|
||||
if (length(heard_b))
|
||||
var/message_b
|
||||
|
||||
message_b = tajspeak(message)
|
||||
|
||||
if (italics)
|
||||
message_b = "<i>[message_b]</i>"
|
||||
|
||||
rendered = "<span class='game say'><span class='name'>[src.voice_name]</span> mrows quietly, <span class='message'>\"[message_b]\"</span></span>"
|
||||
|
||||
for (var/mob/M in heard_b)
|
||||
M.show_message(rendered, 2)
|
||||
|
||||
for (var/mob/M in eavesdropping)
|
||||
if (M.say_understands(src))
|
||||
var/message_c = tajspeak(message)
|
||||
if (!istype(src, /mob/living/carbon/human))
|
||||
rendered = "<span class='game say'><span class='name'>[name]</span> mrowls quietly, <span class='message'>\"[message_c]\"</span></span>"
|
||||
else if(istype(wear_mask, /obj/item/clothing/mask/gas/voice))
|
||||
if(wear_mask:vchange)
|
||||
rendered = "<span class='game say'><span class='name'>[wear_mask:voice]</span> mrowls quietly, <span class='message'>\"[message_c]\"</span></span>"
|
||||
else
|
||||
rendered = "<span class='game say'><span class='name'>[name]</span> mrowls quietly, <span class='message'>\"[message_c]\"</span></span>"
|
||||
else
|
||||
rendered = "<span class='game say'><span class='name'>[real_name]</span>[alt_name] mrowls quietly, <span class='message'>\"[message_c]\"</span></span>"
|
||||
M.show_message(rendered, 2)
|
||||
else
|
||||
rendered = "<span class='game say'><span class='name'>[src.voice_name]</span> quietly mrowls something.</span>"
|
||||
M.show_message(rendered, 2)
|
||||
|
||||
if (italics)
|
||||
message = "<i>[message]</i>"
|
||||
|
||||
if (!istype(src, /mob/living/carbon/human))
|
||||
rendered = "<span class='game say'><span class='name'>[name]</span> [is_speaking_taj ? "mrowls quietly" : "whispers"], <span class='message'>\"[message]\"</span></span>"
|
||||
else if (istype(src.wear_mask, /obj/item/clothing/mask/gas/voice))
|
||||
if(wear_mask:vchange)
|
||||
rendered = "<span class='game say'><span class='name'>[wear_mask:voice]</span> [is_speaking_taj ? "mrowls quietly" : "whispers"], <span class='message'>\"[message]\"</span></span>"
|
||||
else
|
||||
rendered = "<span class='game say'><span class='name'>[name]</span> [is_speaking_taj ? "mrowls quietly" : "whispers"], <span class='message'>\"[message]\"</span></span>"
|
||||
else
|
||||
rendered = "<span class='game say'><span class='name'>[real_name]</span>[alt_name] [is_speaking_taj ? "mrowls quietly" : "whispers"], <span class='message'>\"[message]\"</span></span>"
|
||||
|
||||
for (var/mob/M in world)
|
||||
if (istype(M, /mob/new_player))
|
||||
continue
|
||||
if (M.stat > 1 && !(M in heard_a))
|
||||
M.show_message(rendered, 2)
|
||||
@@ -158,7 +158,7 @@
|
||||
id = pda.owner
|
||||
else if(istype(src.wear_id, /obj/item/weapon/card/id)) //just in case something other than a PDA/ID card somehow gets in the ID slot :[
|
||||
var/obj/item/weapon/card/id/idcard = src.wear_id
|
||||
id = idcard.registered
|
||||
id = idcard.registered_name
|
||||
if (id && (id != src.real_name) && (get_dist(src, usr) <= 1) && prob(10))
|
||||
msg += "<span class='warning'>[t_He] [t_is] wearing \icon[src.wear_id] \a [src.wear_id] yet something doesn't seem right...</span>\n"
|
||||
else
|
||||
@@ -244,7 +244,7 @@
|
||||
|
||||
if(wear_id)
|
||||
if(istype(wear_id,/obj/item/weapon/card/id))
|
||||
perpname = wear_id:registered
|
||||
perpname = wear_id:registered_name
|
||||
else if(istype(wear_id,/obj/item/device/pda))
|
||||
var/obj/item/device/pda/tempPda = wear_id
|
||||
perpname = tempPda.owner
|
||||
|
||||
@@ -54,6 +54,10 @@
|
||||
var/mutantrace = null
|
||||
|
||||
var/list/organs = list()
|
||||
var/bloodloss = 0
|
||||
var/datum/reagents/vessel
|
||||
var/pale = 0
|
||||
|
||||
|
||||
/mob/living/carbon/human/dummy
|
||||
real_name = "Test Dummy"
|
||||
@@ -62,30 +66,19 @@
|
||||
|
||||
|
||||
/mob/living/carbon/human/New()
|
||||
|
||||
..()
|
||||
|
||||
|
||||
|
||||
var/datum/reagents/R = new/datum/reagents(1000)
|
||||
reagents = R
|
||||
R.my_atom = src
|
||||
|
||||
if(!dna) dna = new /datum/dna(null)
|
||||
if(!dna)
|
||||
dna = new /datum/dna(null)
|
||||
|
||||
var/datum/organ/external/chest/chest = new /datum/organ/external/chest(src)
|
||||
var/datum/organ/external/head/head = new /datum/organ/external/head(src)
|
||||
var/datum/organ/external/l_arm/l_arm = new /datum/organ/external/l_arm(src)
|
||||
var/datum/organ/external/r_arm/r_arm = new /datum/organ/external/r_arm(src)
|
||||
var/datum/organ/external/r_leg/r_leg = new /datum/organ/external/r_leg(src)
|
||||
var/datum/organ/external/l_leg/l_leg = new /datum/organ/external/l_leg(src)
|
||||
chest.owner = src
|
||||
head.owner = src
|
||||
r_arm.owner = src
|
||||
l_arm.owner = src
|
||||
r_leg.owner = src
|
||||
l_leg.owner = src
|
||||
organs += chest
|
||||
organs += head
|
||||
organs += r_arm
|
||||
organs += l_arm
|
||||
organs += r_leg
|
||||
organs += l_leg
|
||||
make_human_organs()
|
||||
|
||||
var/g = "m"
|
||||
if (gender == MALE)
|
||||
@@ -96,16 +89,56 @@
|
||||
gender = MALE
|
||||
g = "m"
|
||||
|
||||
spawn (1)
|
||||
if(!stand_icon)
|
||||
stand_icon = new /icon('human.dmi', "body_[g]_s")
|
||||
if(!lying_icon)
|
||||
lying_icon = new /icon('human.dmi', "body_[g]_l")
|
||||
spawn(1)
|
||||
stand_icon = new /icon('human.dmi', "body_[g]_s")
|
||||
lying_icon = new /icon('human.dmi', "body_[g]_l")
|
||||
icon = stand_icon
|
||||
update_clothing()
|
||||
|
||||
src << "\blue Your icons have been generated!"
|
||||
|
||||
..()
|
||||
vessel = new/datum/reagents(600)
|
||||
vessel.my_atom = src
|
||||
vessel.add_reagent("blood",560)
|
||||
spawn(1)
|
||||
fixblood()
|
||||
|
||||
|
||||
/mob/living/carbon/human/proc/fixblood()
|
||||
for(var/datum/reagent/blood/B in vessel.reagent_list)
|
||||
if(B.id == "blood")
|
||||
B.data = list("donor"=src,"viruses"=null,"blood_DNA"=dna.unique_enzymes,"blood_type"=dna.b_type,"resistances"=null,"trace_chem"=null)
|
||||
|
||||
/mob/living/carbon/human/proc/drip(var/amt as num)
|
||||
if(!amt)
|
||||
return
|
||||
|
||||
var/amm = 0.1 * amt
|
||||
var/turf/T = get_turf(src)
|
||||
var/list/obj/effect/decal/cleanable/blood/drip/nums = list()
|
||||
var/list/iconL = list("1","2","3","4","5")
|
||||
|
||||
vessel.remove_reagent("blood",amm)
|
||||
|
||||
for(var/obj/effect/decal/cleanable/blood/drip/G in T)
|
||||
nums += G
|
||||
iconL.Remove(G.icon_state)
|
||||
if(nums.len >= 3)
|
||||
var/obj/effect/decal/cleanable/blood/drip/D = pick(nums)
|
||||
D.blood_DNA.len++
|
||||
D.blood_DNA[D.blood_DNA.len] = list(dna.unique_enzymes,dna.b_type)
|
||||
// if(virus2)
|
||||
// D.virus2 = virus2.getcopy()
|
||||
return
|
||||
|
||||
var/obj/effect/decal/cleanable/blood/drip/this = new(T)
|
||||
this.icon_state = pick(iconL)
|
||||
this.blood_DNA = list(list(dna.unique_enzymes,dna.b_type))
|
||||
// this.blood_owner = src
|
||||
|
||||
// if(virus2)
|
||||
// this.virus2 = virus2.getcopy()
|
||||
|
||||
|
||||
// organStructure = new /obj/effect/organstructure/human(src)
|
||||
|
||||
@@ -197,6 +230,14 @@
|
||||
var/hungry = (500 - nutrition)/5 // So overeat would be 100 and default level would be 80
|
||||
if (hungry >= 70) tally += hungry/50
|
||||
|
||||
|
||||
for(var/organ in list("l_leg","l_foot","r_leg","r_foot"))
|
||||
var/datum/organ/external/o = get_organ(organ)
|
||||
if(o.broken)
|
||||
tally += 6
|
||||
if(o.destroyed)
|
||||
tally += 12
|
||||
|
||||
if(wear_suit)
|
||||
tally += wear_suit.slowdown
|
||||
|
||||
@@ -1019,8 +1060,8 @@
|
||||
if (wear_id)
|
||||
if (istype(wear_id, /obj/item/weapon/card/id))
|
||||
var/obj/item/weapon/card/id/id = wear_id
|
||||
if (id.registered)
|
||||
name = id.registered
|
||||
if (id.registered_name)
|
||||
name = id.registered_name
|
||||
else
|
||||
name = "Unknown"
|
||||
else if (istype(wear_id, /obj/item/device/pda))
|
||||
@@ -1035,8 +1076,8 @@
|
||||
if (wear_id)
|
||||
if (istype(wear_id, /obj/item/weapon/card/id))
|
||||
var/obj/item/weapon/card/id/id = wear_id
|
||||
if (id.registered != real_name)
|
||||
name = "[real_name] (as [id.registered])"
|
||||
if (id.registered_name != real_name)
|
||||
name = "[real_name] (as [id.registered_name])"
|
||||
|
||||
|
||||
else if (istype(wear_id, /obj/item/device/pda))
|
||||
@@ -1219,58 +1260,152 @@
|
||||
return 1
|
||||
return 0
|
||||
|
||||
#define BS12TEST 1
|
||||
/mob/living/carbon/human/proc/update_body()
|
||||
if(stand_icon)
|
||||
del(stand_icon)
|
||||
if(lying_icon)
|
||||
del(lying_icon)
|
||||
|
||||
if (mutantrace)
|
||||
return
|
||||
if(!BS12TEST)
|
||||
|
||||
var/g = "m"
|
||||
if (gender == MALE)
|
||||
g = "m"
|
||||
else if (gender == FEMALE)
|
||||
g = "f"
|
||||
if(stand_icon)
|
||||
del(stand_icon)
|
||||
if(lying_icon)
|
||||
del(lying_icon)
|
||||
|
||||
stand_icon = new /icon('human.dmi', "blank")
|
||||
lying_icon = new /icon('human.dmi', "blank")
|
||||
if (mutantrace)
|
||||
return
|
||||
|
||||
var/husk = (mutations & HUSK)
|
||||
var/obese = (mutations & FAT)
|
||||
var/g = "m"
|
||||
if (gender == MALE)
|
||||
g = "m"
|
||||
else if (gender == FEMALE)
|
||||
g = "f"
|
||||
|
||||
stand_icon = new /icon('human.dmi', "blank")
|
||||
lying_icon = new /icon('human.dmi', "blank")
|
||||
|
||||
var/husk = (mutations & HUSK)
|
||||
var/obese = (mutations & FAT)
|
||||
|
||||
if (husk)
|
||||
stand_icon.Blend(new /icon('human.dmi', "husk_s"), ICON_OVERLAY)
|
||||
lying_icon.Blend(new /icon('human.dmi', "husk_l"), ICON_OVERLAY)
|
||||
else if(obese)
|
||||
stand_icon.Blend(new /icon('human.dmi', "fatbody_s"), ICON_OVERLAY)
|
||||
lying_icon.Blend(new /icon('human.dmi', "fatbody_l"), ICON_OVERLAY)
|
||||
else
|
||||
stand_icon.Blend(new /icon('human.dmi', "chest_[g]_s"), ICON_OVERLAY)
|
||||
lying_icon.Blend(new /icon('human.dmi', "chest_[g]_l"), ICON_OVERLAY)
|
||||
|
||||
for (var/part in list("head", "arm_left", "arm_right", "hand_left", "hand_right", "leg_left", "leg_right", "foot_left", "foot_right"))
|
||||
stand_icon.Blend(new /icon('human.dmi', "[part]_s"), ICON_OVERLAY)
|
||||
lying_icon.Blend(new /icon('human.dmi', "[part]_l"), ICON_OVERLAY)
|
||||
|
||||
stand_icon.Blend(new /icon('human.dmi', "groin_[g]_s"), ICON_OVERLAY)
|
||||
lying_icon.Blend(new /icon('human.dmi', "groin_[g]_l"), ICON_OVERLAY)
|
||||
|
||||
// Skin tone
|
||||
if (s_tone >= 0)
|
||||
stand_icon.Blend(rgb(s_tone, s_tone, s_tone), ICON_ADD)
|
||||
lying_icon.Blend(rgb(s_tone, s_tone, s_tone), ICON_ADD)
|
||||
else
|
||||
stand_icon.Blend(rgb(-s_tone, -s_tone, -s_tone), ICON_SUBTRACT)
|
||||
lying_icon.Blend(rgb(-s_tone, -s_tone, -s_tone), ICON_SUBTRACT)
|
||||
|
||||
if (underwear < 6 && underwear > 0)
|
||||
if(!obese)
|
||||
stand_icon.Blend(new /icon('human.dmi', "underwear[underwear]_[g]_s"), ICON_OVERLAY)
|
||||
lying_icon.Blend(new /icon('human.dmi', "underwear[underwear]_[g]_l"), ICON_OVERLAY)
|
||||
|
||||
if (husk)
|
||||
stand_icon.Blend(new /icon('human.dmi', "husk_s"), ICON_OVERLAY)
|
||||
lying_icon.Blend(new /icon('human.dmi', "husk_l"), ICON_OVERLAY)
|
||||
else if(obese)
|
||||
stand_icon.Blend(new /icon('human.dmi', "fatbody_s"), ICON_OVERLAY)
|
||||
lying_icon.Blend(new /icon('human.dmi', "fatbody_l"), ICON_OVERLAY)
|
||||
else
|
||||
if(stand_icon)
|
||||
del(stand_icon)
|
||||
if(lying_icon)
|
||||
del(lying_icon)
|
||||
|
||||
if (mutantrace)
|
||||
return
|
||||
|
||||
var/g = "m"
|
||||
if (gender == MALE)
|
||||
g = "m"
|
||||
else if (gender == FEMALE)
|
||||
g = "f"
|
||||
|
||||
stand_icon = new /icon('human.dmi', "torso_[g]_s")
|
||||
lying_icon = new /icon('human.dmi', "torso_[g]_l")
|
||||
|
||||
var/husk = (mutations & HUSK)
|
||||
var/obese = (mutations & FAT)
|
||||
|
||||
stand_icon.Blend(new /icon('human.dmi', "chest_[g]_s"), ICON_OVERLAY)
|
||||
lying_icon.Blend(new /icon('human.dmi', "chest_[g]_l"), ICON_OVERLAY)
|
||||
|
||||
for (var/part in list("head", "arm_left", "arm_right", "hand_left", "hand_right", "leg_left", "leg_right", "foot_left", "foot_right"))
|
||||
stand_icon.Blend(new /icon('human.dmi', "[part]_s"), ICON_OVERLAY)
|
||||
lying_icon.Blend(new /icon('human.dmi', "[part]_l"), ICON_OVERLAY)
|
||||
var/datum/organ/external/head = get_organ("head")
|
||||
if(!head.destroyed)
|
||||
stand_icon.Blend(new /icon('human.dmi', "head_[g]_s"), ICON_OVERLAY)
|
||||
lying_icon.Blend(new /icon('human.dmi', "head_[g]_l"), ICON_OVERLAY)
|
||||
|
||||
for(var/datum/organ/external/part in organs)
|
||||
if(!istype(part, /datum/organ/external/groin) \
|
||||
&& !istype(part, /datum/organ/external/chest) \
|
||||
&& !istype(part, /datum/organ/external/head) \
|
||||
&& !part.destroyed)
|
||||
var/icon/temp = new /icon('human.dmi', "[part.icon_name]_s")
|
||||
if(part.robot)
|
||||
temp.MapColors(rgb(77,77,77), rgb(150,150,150), rgb(28,28,28), rgb(0,0,0))
|
||||
stand_icon.Blend(temp, ICON_OVERLAY)
|
||||
temp = new /icon('human.dmi', "[part.icon_name]_l")
|
||||
if(part.robot)
|
||||
temp.MapColors(rgb(77,77,77), rgb(150,150,150), rgb(28,28,28), rgb(0,0,0))
|
||||
lying_icon.Blend(temp , ICON_OVERLAY)
|
||||
|
||||
stand_icon.Blend(new /icon('human.dmi', "groin_[g]_s"), ICON_OVERLAY)
|
||||
lying_icon.Blend(new /icon('human.dmi', "groin_[g]_l"), ICON_OVERLAY)
|
||||
|
||||
// Skin tone
|
||||
if (s_tone >= 0)
|
||||
stand_icon.Blend(rgb(s_tone, s_tone, s_tone), ICON_ADD)
|
||||
lying_icon.Blend(rgb(s_tone, s_tone, s_tone), ICON_ADD)
|
||||
else
|
||||
stand_icon.Blend(rgb(-s_tone, -s_tone, -s_tone), ICON_SUBTRACT)
|
||||
lying_icon.Blend(rgb(-s_tone, -s_tone, -s_tone), ICON_SUBTRACT)
|
||||
if (husk)
|
||||
var/icon/husk_s = new /icon('human.dmi', "husk_s")
|
||||
var/icon/husk_l = new /icon('human.dmi', "husk_l")
|
||||
|
||||
for(var/datum/organ/external/part in organs)
|
||||
if(!istype(part, /datum/organ/external/groin) \
|
||||
&& !istype(part, /datum/organ/external/chest) \
|
||||
&& !istype(part, /datum/organ/external/head) \
|
||||
&& part.destroyed)
|
||||
husk_s.Blend(new /icon('dam_mask.dmi', "[part.icon_name]"), ICON_SUBTRACT)
|
||||
husk_l.Blend(new /icon('dam_mask.dmi', "[part.icon_name]2"), ICON_SUBTRACT)
|
||||
|
||||
stand_icon.Blend(husk_s, ICON_OVERLAY)
|
||||
lying_icon.Blend(husk_l, ICON_OVERLAY)
|
||||
else if(obese)
|
||||
stand_icon.Blend(new /icon('human.dmi', "fatbody_s"), ICON_OVERLAY)
|
||||
lying_icon.Blend(new /icon('human.dmi', "fatbody_l"), ICON_OVERLAY)
|
||||
|
||||
// Skin tone
|
||||
if (s_tone >= 0)
|
||||
stand_icon.Blend(rgb(s_tone, s_tone, s_tone), ICON_ADD)
|
||||
lying_icon.Blend(rgb(s_tone, s_tone, s_tone), ICON_ADD)
|
||||
else
|
||||
stand_icon.Blend(rgb(-s_tone, -s_tone, -s_tone), ICON_SUBTRACT)
|
||||
lying_icon.Blend(rgb(-s_tone, -s_tone, -s_tone), ICON_SUBTRACT)
|
||||
// if(pale)
|
||||
// stand_icon.Blend(rgb(100,100,100))
|
||||
// lying_icon.Blend(rgb(100,100,100))
|
||||
|
||||
if (underwear < 6 && underwear > 0)
|
||||
if(!obese)
|
||||
stand_icon.Blend(new /icon('human.dmi', "underwear[underwear]_[g]_s"), ICON_OVERLAY)
|
||||
lying_icon.Blend(new /icon('human.dmi', "underwear[underwear]_[g]_l"), ICON_OVERLAY)
|
||||
|
||||
|
||||
|
||||
if (underwear < 6 && underwear > 0)
|
||||
if(!obese)
|
||||
stand_icon.Blend(new /icon('human.dmi', "underwear[underwear]_[g]_s"), ICON_OVERLAY)
|
||||
lying_icon.Blend(new /icon('human.dmi', "underwear[underwear]_[g]_l"), ICON_OVERLAY)
|
||||
|
||||
/mob/living/carbon/human/proc/update_face()
|
||||
if(organs)
|
||||
var/datum/organ/external/head = get_organ("head")
|
||||
if(head)
|
||||
if(head.destroyed)
|
||||
del(face_standing)
|
||||
del(face_lying)
|
||||
return
|
||||
if(!facial_hair_style || !hair_style) return//Seems people like to lose their icons, this should stop the runtimes for now
|
||||
del(face_standing)
|
||||
del(face_lying)
|
||||
@@ -2059,11 +2194,11 @@ It can still be worn/put on as normal.
|
||||
var/obj/item/weapon/card/id/id = wear_id
|
||||
if (istype(pda))
|
||||
if (pda.id)
|
||||
. = pda.id.registered
|
||||
. = pda.id.registered_name
|
||||
else
|
||||
. = pda.owner
|
||||
else if (istype(id))
|
||||
. = id.registered
|
||||
. = id.registered_name
|
||||
else
|
||||
return if_no_id
|
||||
return
|
||||
@@ -2076,7 +2211,7 @@ It can still be worn/put on as normal.
|
||||
if (istype(pda))
|
||||
. = pda.owner
|
||||
else if (istype(id))
|
||||
. = id.registered
|
||||
. = id.registered_name
|
||||
else
|
||||
return if_no_id
|
||||
return
|
||||
@@ -2203,7 +2338,7 @@ It can still be worn/put on as normal.
|
||||
|
||||
if(wear_id)
|
||||
if(istype(wear_id,/obj/item/weapon/card/id))
|
||||
perpname = wear_id:registered
|
||||
perpname = wear_id:registered_name
|
||||
else if(istype(wear_id,/obj/item/device/pda))
|
||||
var/obj/item/device/pda/tempPda = wear_id
|
||||
perpname = tempPda.owner
|
||||
|
||||
@@ -101,24 +101,45 @@
|
||||
if("hurt")
|
||||
M.attack_log += text("\[[time_stamp()]\] <font color='red'>Punched [src.name] ([src.ckey])</font>")
|
||||
src.attack_log += text("\[[time_stamp()]\] <font color='orange'>Has been punched by [M.name] ([M.ckey])</font>")
|
||||
|
||||
log_attack("<font color='red'>[M.name] ([M.ckey]) punched [src.name] ([src.ckey])</font>")
|
||||
|
||||
|
||||
var/attack_verb
|
||||
switch(M.mutantrace)
|
||||
if("lizard")
|
||||
attack_verb = "scratch"
|
||||
if("plant")
|
||||
attack_verb = "slash"
|
||||
else
|
||||
attack_verb = "punch"
|
||||
|
||||
if(istajaran(M))
|
||||
attack_verb = "slash"
|
||||
|
||||
var/damage = rand(0, 9)
|
||||
if(!damage)
|
||||
playsound(loc, 'punchmiss.ogg', 25, 1, -1)
|
||||
visible_message("\red <B>[M] has attempted to punch [src]!</B>")
|
||||
switch(attack_verb)
|
||||
if("slash")
|
||||
playsound(loc, 'slashmiss.ogg', 25, 1, -1)
|
||||
else
|
||||
playsound(loc, 'punchmiss.ogg', 25, 1, -1)
|
||||
|
||||
visible_message("\red <B>[M] has attempted to [attack_verb] [src]!</B>")
|
||||
return 0
|
||||
|
||||
|
||||
var/datum/organ/external/affecting = get_organ(ran_zone(M.zone_sel.selecting))
|
||||
var/armor_block = run_armor_check(affecting, "melee")
|
||||
|
||||
if(M.mutations & HULK) damage += 5
|
||||
playsound(loc, "punch", 25, 1, -1)
|
||||
|
||||
visible_message("\red <B>[M] has punched [src]!</B>")
|
||||
switch(attack_verb)
|
||||
if("slash")
|
||||
playsound(loc, 'slice.ogg', 25, 1, -1)
|
||||
else
|
||||
playsound(loc, "punch", 25, 1, -1)
|
||||
|
||||
visible_message("\red <B>[M] has [attack_verb]ed [src]!</B>")
|
||||
|
||||
apply_damage(damage, BRUTE, affecting, armor_block)
|
||||
if(damage >= 9)
|
||||
@@ -126,7 +147,6 @@
|
||||
apply_effect(4, WEAKEN, armor_block)
|
||||
UpdateDamageIcon()
|
||||
|
||||
|
||||
if("disarm")
|
||||
M.attack_log += text("\[[time_stamp()]\] <font color='red'>Disarmed [src.name] ([src.ckey])</font>")
|
||||
src.attack_log += text("\[[time_stamp()]\] <font color='orange'>Has been disarmed by [M.name] ([M.ckey])</font>")
|
||||
@@ -180,4 +200,7 @@
|
||||
|
||||
playsound(loc, 'punchmiss.ogg', 25, 1, -1)
|
||||
visible_message("\red <B>[M] attempted to disarm [src]!</B>")
|
||||
return
|
||||
|
||||
/mob/living/carbon/human/proc/afterattack(atom/target as mob|obj|turf|area, mob/living/user as mob|obj, inrange, params)
|
||||
return
|
||||
@@ -27,33 +27,37 @@
|
||||
|
||||
|
||||
/mob/living/carbon/human/proc/get_organ(var/zone)
|
||||
if(!zone) zone = "chest"
|
||||
if(!zone)
|
||||
zone = "chest"
|
||||
for(var/datum/organ/external/O in organs)
|
||||
if(O.name == zone)
|
||||
return O
|
||||
return null
|
||||
|
||||
|
||||
/mob/living/carbon/human/apply_damage(var/damage = 0,var/damagetype = BRUTE, var/def_zone = null, var/blocked = 0)
|
||||
/mob/living/carbon/human/apply_damage(var/damage = 0,var/damagetype = BRUTE, var/def_zone = null, var/blocked = 0 , var/weapon = null)
|
||||
if((damagetype != BRUTE) && (damagetype != BURN))
|
||||
..(damage, damagetype, def_zone, blocked)
|
||||
return 1
|
||||
|
||||
if(blocked >= 2) return 0
|
||||
if(blocked >= 2)
|
||||
return 0
|
||||
|
||||
var/datum/organ/external/organ = null
|
||||
if(isorgan(def_zone))
|
||||
organ = def_zone
|
||||
else
|
||||
if(!def_zone) def_zone = ran_zone(def_zone)
|
||||
if(!def_zone)
|
||||
def_zone = ran_zone(def_zone)
|
||||
organ = get_organ(check_zone(def_zone))
|
||||
if(!organ) return 0
|
||||
if(!organ)
|
||||
return 0
|
||||
if(blocked)
|
||||
damage = (damage/(blocked+1))
|
||||
|
||||
switch(damagetype)
|
||||
if(BRUTE)
|
||||
organ.take_damage(damage, 0)
|
||||
organ.take_damage(damage, 0, is_sharp(weapon), weapon)
|
||||
if(BURN)
|
||||
organ.take_damage(0, damage)
|
||||
UpdateDamageIcon()
|
||||
|
||||
@@ -111,6 +111,7 @@ emp_act
|
||||
if(!I || !user) return 0
|
||||
|
||||
var/datum/organ/external/affecting = get_organ(ran_zone(user.zone_sel.selecting))
|
||||
|
||||
var/hit_area = parse_zone(affecting.name)
|
||||
|
||||
if((user != src) && check_shields(I.force, "the [I.name]"))
|
||||
@@ -121,7 +122,8 @@ emp_act
|
||||
var/armor = run_armor_check(affecting, "melee", "Your armor has protected you from a hit to the [hit_area].", "Your armor has softened hit to your [hit_area].")
|
||||
if(armor >= 2) return 0
|
||||
if(!I.force) return 0
|
||||
apply_damage(I.force, I.damtype, affecting, armor)
|
||||
|
||||
apply_damage(I.force, I.damtype, affecting, armor , I)
|
||||
|
||||
var/bloody = 0
|
||||
if(((I.damtype == BRUTE) || (I.damtype == HALLOSS)) && prob(25 + (I.force * 2)))
|
||||
|
||||
@@ -719,6 +719,52 @@
|
||||
|
||||
// health = 100 - (getOxyLoss() + getToxLoss() + getFireLoss() + getBruteLoss() + getCloneLoss())
|
||||
|
||||
var/leg_tally = 2
|
||||
for(var/datum/organ/external/E in organs)
|
||||
E.process()
|
||||
if(E.robot && prob(E.brute_dam + E.burn_dam))
|
||||
if(E.name == "l_hand" || E.name == "l_arm")
|
||||
if(hand && equipped())
|
||||
drop_item()
|
||||
emote("custom v drops what they were holding, their limb malfunctioning!")
|
||||
var/datum/effect/effect/system/spark_spread/spark_system = new /datum/effect/effect/system/spark_spread()
|
||||
spark_system.set_up(5, 0, src)
|
||||
spark_system.attach(src)
|
||||
spark_system.start()
|
||||
spawn(10)
|
||||
del(spark_system)
|
||||
else if(E.name == "r_hand" || E.name == "r_arm")
|
||||
if(!hand && equipped())
|
||||
drop_item()
|
||||
emote("custom v drops what they were holding, their limb malfunctioning!")
|
||||
var/datum/effect/effect/system/spark_spread/spark_system = new /datum/effect/effect/system/spark_spread()
|
||||
spark_system.set_up(5, 0, src)
|
||||
spark_system.attach(src)
|
||||
spark_system.start()
|
||||
spawn(10)
|
||||
del(spark_system)
|
||||
else if(E.name == "l_leg" || E.name == "l_foot" \
|
||||
|| E.name == "r_leg" || E.name == "r_foot" && !lying)
|
||||
leg_tally-- // let it fail even if just foot&leg
|
||||
if(E.broken || E.destroyed)
|
||||
if(E.name == "l_hand" || E.name == "l_arm")
|
||||
if(hand && equipped())
|
||||
drop_item()
|
||||
emote("scream")
|
||||
else if(E.name == "r_hand" || E.name == "r_arm")
|
||||
if(!hand && equipped())
|
||||
drop_item()
|
||||
emote("scream")
|
||||
else if(E.name == "l_leg" || E.name == "l_foot" \
|
||||
|| E.name == "r_leg" || E.name == "r_foot" && !lying)
|
||||
leg_tally-- // let it fail even if just foot&leg
|
||||
|
||||
// can't stand
|
||||
if(leg_tally == 0 && !paralysis && !(lying || resting))
|
||||
emote("scream")
|
||||
emote("collapse")
|
||||
paralysis = 10
|
||||
|
||||
if(getOxyLoss() > 50) Paralyse(3)
|
||||
|
||||
if(health < config.health_threshold_dead || brain_op_stage == 4.0)
|
||||
@@ -733,6 +779,38 @@
|
||||
Paralyse(5)
|
||||
|
||||
if (stat != 2) //Alive.
|
||||
|
||||
var/blood_volume = round(vessel.get_reagent_amount("blood"))
|
||||
if(bloodloss)
|
||||
drip(bloodloss)
|
||||
if(!blood_volume)
|
||||
bloodloss = 0
|
||||
else if(blood_volume > 448)
|
||||
if(pale)
|
||||
pale = 0
|
||||
update_body()
|
||||
else if(blood_volume <= 448 && blood_volume > 336)
|
||||
adjustToxLoss(1)
|
||||
if(!pale)
|
||||
pale = 1
|
||||
update_body()
|
||||
var/word = pick("dizzy","woosey","faint")
|
||||
src << "\red You feel [word]"
|
||||
if(prob(1))
|
||||
var/word = pick("dizzy","woosey","faint")
|
||||
src << "\red You feel [word]"
|
||||
else if(blood_volume <= 336 && blood_volume > 244)
|
||||
adjustToxLoss(5)
|
||||
if(!pale)
|
||||
pale = 1
|
||||
update_body()
|
||||
eye_blurry += 6
|
||||
if(prob(15))
|
||||
paralysis += rand(1,3)
|
||||
else if(blood_volume <= 244 && blood_volume > 122)
|
||||
if(toxloss <= 101)
|
||||
toxloss = 101
|
||||
|
||||
if (silent)
|
||||
silent--
|
||||
|
||||
@@ -784,6 +862,32 @@
|
||||
|
||||
if (stuttering) stuttering--
|
||||
|
||||
var/datum/organ/external/head/head = get_organ("head")
|
||||
if(head && !head.disfigured)
|
||||
if(head.brute_dam >= 45 || head.burn_dam >= 45)
|
||||
head.disfigured = 1
|
||||
emote("scream")
|
||||
real_name = "Unknown"
|
||||
src << "\red Your face has become disfigured."
|
||||
// face_op_stage = 0.0
|
||||
var/blood_max = 0
|
||||
for(var/datum/organ/external/temp in organs)
|
||||
if(!temp.bleeding || temp.robot) //THAT WAS DUMB.
|
||||
continue
|
||||
// else
|
||||
// if(prob(35))
|
||||
// bloodloss += rand(1,10)
|
||||
if(temp.wounds)
|
||||
for(var/datum/organ/wound/W in temp.wounds)
|
||||
if(W.wound_size && W.bleeding)
|
||||
blood_max += W.wound_size
|
||||
if(temp.destroyed && !temp.gauzed)
|
||||
blood_max += 50 //Yer missing a fucking limb.
|
||||
bloodloss = min(bloodloss+1,(blood_max))
|
||||
|
||||
|
||||
|
||||
|
||||
if (eye_blind)
|
||||
eye_blind--
|
||||
blinded = 1
|
||||
@@ -882,22 +986,41 @@
|
||||
if (mutantrace == "lizard" || mutantrace == "metroid")
|
||||
see_in_dark = 3
|
||||
see_invisible = 1
|
||||
|
||||
else if (istajaran(src))
|
||||
see_in_dark = 8
|
||||
|
||||
else if (druggy) // If drugged~
|
||||
see_in_dark = 2
|
||||
//see_invisible regulated by drugs themselves.
|
||||
else
|
||||
see_in_dark = 2
|
||||
var/seer = 0
|
||||
for(var/obj/effect/rune/R in world)
|
||||
if(loc==R.loc && R.word1==wordsee && R.word2==wordhell && R.word3==wordjoin)
|
||||
seer = 1
|
||||
if(!seer)
|
||||
see_invisible = 0
|
||||
|
||||
else if(istype(head, /obj/item/clothing/head/helmet/welding))
|
||||
var/seer = 0
|
||||
for(var/obj/effect/rune/R in world)
|
||||
if(loc==R.loc && R.word1==wordsee && R.word2==wordhell && R.word3==wordjoin)
|
||||
seer = 1
|
||||
if(!seer)
|
||||
see_invisible = 0
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
else if(istype(head, /obj/item/clothing/head/helmet/welding)) // wat. This is never fucking called.
|
||||
if(!head:up && tinted_weldhelh)
|
||||
see_in_dark = 1
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/* HUD shit goes here, as long as it doesn't modify src.sight flags */
|
||||
// The purpose of this is to stop xray and w/e from preventing you from using huds -- Love, Doohl
|
||||
if(istype(glasses, /obj/item/clothing/glasses/hud/health))
|
||||
|
||||
@@ -88,4 +88,6 @@
|
||||
return 1
|
||||
if (istype(other, /mob/living/carbon/metroid))
|
||||
return 1
|
||||
if (istype(other, /mob/living/carbon/human/tajaran))
|
||||
return 1
|
||||
return ..()
|
||||
@@ -13,7 +13,7 @@
|
||||
client.images += image(tempHud,perp,"hud[ckey(perp:wear_id:GetJobName())]")
|
||||
var/perpname = "wot"
|
||||
if(istype(perp.wear_id,/obj/item/weapon/card/id))
|
||||
perpname = perp.wear_id:registered
|
||||
perpname = perp.wear_id:registered_name
|
||||
else if(istype(perp.wear_id,/obj/item/device/pda))
|
||||
var/obj/item/device/pda/tempPda = perp.wear_id
|
||||
perpname = tempPda.owner
|
||||
|
||||
@@ -103,6 +103,7 @@
|
||||
var/canmove = 1.0
|
||||
var/eye_stat = null//Living, potentially Carbon
|
||||
var/lastpuke = 0
|
||||
var/unacidable = 0
|
||||
|
||||
var/name_archive //For admin things like possession
|
||||
|
||||
@@ -242,7 +243,7 @@
|
||||
|
||||
var/robot_talk_understand = 0
|
||||
var/alien_talk_understand = 0
|
||||
|
||||
var/taj_talk_understand = 0
|
||||
|
||||
//You can guess what these are for. --SkyMarshal
|
||||
var/list/atom/hallucinations = list()
|
||||
@@ -273,4 +274,6 @@ the mob is also allowed to move without any sort of restriction. For instance, i
|
||||
|
||||
var/datum/preferences/storedpreferences = null
|
||||
|
||||
var/geaslist = list()
|
||||
var/geaslist = list()
|
||||
|
||||
|
||||
|
||||
@@ -60,6 +60,11 @@
|
||||
return 1
|
||||
return 0
|
||||
|
||||
/proc/istajaran(A)
|
||||
if(istype(A, /mob/living/carbon/human/tajaran))
|
||||
return 1
|
||||
return 0
|
||||
|
||||
/*proc/ishivebot(A)
|
||||
if(A && istype(A, /mob/living/silicon/hivebot))
|
||||
return 1
|
||||
@@ -105,12 +110,21 @@ proc/isorgan(A)
|
||||
return 1
|
||||
return 0
|
||||
|
||||
proc/hasorgans(A)
|
||||
if(ishuman(A) || ismonkey(A))
|
||||
return 1
|
||||
return 0
|
||||
|
||||
|
||||
|
||||
|
||||
/proc/hsl2rgb(h, s, l)
|
||||
return
|
||||
|
||||
|
||||
/proc/check_zone(zone)
|
||||
if(!zone) return "chest"
|
||||
if(!zone)
|
||||
return "chest"
|
||||
switch(zone)
|
||||
if("eyes")
|
||||
zone = "head"
|
||||
|
||||
+554
-38
@@ -1,17 +1,83 @@
|
||||
/datum/organ
|
||||
|
||||
|
||||
/datum/organ/var
|
||||
name = "organ"
|
||||
mob/living/carbon/human/owner = null
|
||||
|
||||
list/datum/autopsy_data/autopsy_data = list()
|
||||
list/trace_chemicals = list() // traces of chemicals in the organ,
|
||||
// links chemical IDs to number of ticks for which they'll stay in the blood
|
||||
|
||||
|
||||
/datum/organ/proc/process()
|
||||
return 0
|
||||
|
||||
/datum/organ/proc/receive_chem(chemical as obj)
|
||||
return 0
|
||||
|
||||
|
||||
|
||||
/mob/living/carbon/human/proc/make_human_organs()
|
||||
|
||||
new /datum/organ/external/chest(src)
|
||||
new /datum/organ/external/groin(src)
|
||||
new /datum/organ/external/head(src)
|
||||
new /datum/organ/external/l_arm(src)
|
||||
new /datum/organ/external/r_arm(src)
|
||||
new /datum/organ/external/r_leg(src)
|
||||
new /datum/organ/external/l_leg(src)
|
||||
new /datum/organ/external/l_hand(src)
|
||||
new /datum/organ/external/l_foot(src)
|
||||
new /datum/organ/external/r_hand(src)
|
||||
new /datum/organ/external/r_foot(src)
|
||||
|
||||
var/datum/organ/external/part = get_organ("chest")
|
||||
part.children = list(get_organ("r_leg"),get_organ("l_leg"),get_organ("r_arm"),get_organ("l_arm"),get_organ("groin"),get_organ("head"))
|
||||
part = get_organ("head")
|
||||
part.parent = get_organ("chest")
|
||||
part = get_organ("groin")
|
||||
part.parent = get_organ("chest")
|
||||
part = get_organ("r_leg")
|
||||
part.children = list(get_organ("r_foot"))
|
||||
part.parent = get_organ("chest")
|
||||
part = get_organ("l_leg")
|
||||
part.children = list(get_organ("l_foot"))
|
||||
part.parent = get_organ("chest")
|
||||
part = get_organ("r_arm")
|
||||
part.children = list(get_organ("r_hand"))
|
||||
part.parent = get_organ("chest")
|
||||
part = get_organ("l_arm")
|
||||
part.children = list(get_organ("l_hand"))
|
||||
part.parent = get_organ("chest")
|
||||
part = get_organ("r_foot")
|
||||
part.parent = get_organ("r_leg")
|
||||
part = get_organ("l_foot")
|
||||
part.parent = get_organ("l_leg")
|
||||
part = get_organ("r_hand")
|
||||
part.parent = get_organ("r_arm")
|
||||
part = get_organ("l_hand")
|
||||
part.parent = get_organ("l_arm")
|
||||
|
||||
|
||||
|
||||
|
||||
/datum/autopsy_data
|
||||
var
|
||||
name = "organ"
|
||||
owner = null
|
||||
|
||||
|
||||
proc/process()
|
||||
return 0
|
||||
|
||||
|
||||
proc/receive_chem(chemical as obj)
|
||||
return 0
|
||||
|
||||
weapon = null
|
||||
pretend_weapon = null
|
||||
damage = 0
|
||||
hits = 0
|
||||
time_inflicted = 0
|
||||
|
||||
proc/copy()
|
||||
var/datum/autopsy_data/W = new()
|
||||
W.weapon = weapon
|
||||
W.pretend_weapon = pretend_weapon
|
||||
W.damage = damage
|
||||
W.hits = hits
|
||||
W.time_inflicted = time_inflicted
|
||||
return W
|
||||
|
||||
/****************************************************
|
||||
EXTERNAL ORGANS
|
||||
@@ -27,47 +93,230 @@
|
||||
burn_dam = 0
|
||||
bandaged = 0
|
||||
max_damage = 0
|
||||
wound_size = 0
|
||||
max_size = 0
|
||||
tmp/list/obj/item/weapon/implant/implant = list()
|
||||
|
||||
display_name
|
||||
tmp/list/wounds = list()
|
||||
tmp/bleeding = 0
|
||||
tmp/perma_injury = 0
|
||||
tmp/perma_dmg = 0
|
||||
tmp/broken = 0
|
||||
tmp/destroyed = 0
|
||||
tmp/destspawn = 0 //Has it spawned the broken limb?
|
||||
tmp/gauzed = 0 //Has the missing limb been patched?
|
||||
tmp/robot = 0 //ROBOT ARM MAN!
|
||||
tmp/cutaway = 0 //First part of limb reattachment.
|
||||
tmp/attachable = 0 //Can limb be attached?
|
||||
min_broken_damage = 30
|
||||
datum/organ/external/parent
|
||||
list/datum/organ/external/children
|
||||
damage_msg = "\red You feel a intense pain"
|
||||
|
||||
proc/take_damage(brute, burn)
|
||||
if((brute <= 0) && (burn <= 0)) return 0
|
||||
if((src.brute_dam + src.burn_dam + brute + burn) < src.max_damage)
|
||||
src.brute_dam += brute
|
||||
src.burn_dam += burn
|
||||
var/open = 0
|
||||
var/stage = 0
|
||||
var/wound = 0
|
||||
|
||||
New(mob/living/carbon/H)
|
||||
..(H)
|
||||
if(!display_name)
|
||||
display_name = name
|
||||
if(istype(H))
|
||||
owner = H
|
||||
H:organs.Add(src)
|
||||
|
||||
Del()
|
||||
for(var/datum/organ/wound/W in wounds)
|
||||
del(W)
|
||||
..()
|
||||
|
||||
proc/take_damage(brute, burn, sharp, used_weapon = null, spread=0)
|
||||
if((brute <= 0) && (burn <= 0))
|
||||
return 0
|
||||
if(destroyed)
|
||||
return 0
|
||||
if(robot)
|
||||
brute *= 0.66 //~2/3 damage for ROBOLIMBS
|
||||
burn *= 0.66 //~2/3 damage for ROBOLIMBS
|
||||
|
||||
if(owner && !robot)
|
||||
owner.pain(display_name, (brute+burn)*3, 1)
|
||||
if(sharp)
|
||||
var/nux = brute * rand(10,15)
|
||||
if(brute_dam >= max_damage)
|
||||
if(prob(5 * brute))
|
||||
// for(var/mob/M in viewers(owner))
|
||||
// M.show_message("\red [owner.name]'s [display_name] flies off.")
|
||||
destroyed = 1
|
||||
droplimb()
|
||||
return
|
||||
else if(prob(nux))
|
||||
createwound(max(1,min(6,round(brute/10) + rand(0,1))),0,brute)
|
||||
if(!robot) owner << "You feel something wet on your [display_name]"
|
||||
|
||||
if((brute_dam + burn_dam + brute + burn) < max_damage)
|
||||
if(brute)
|
||||
brute_dam += brute
|
||||
if(prob(brute*2) && !sharp)
|
||||
createwound(rand(4,6),0,brute)
|
||||
else if(!sharp)
|
||||
createwound(max(1,min(6,round(brute/10) + rand(1,2))),1,brute)
|
||||
if(burn)
|
||||
burn_dam += burn
|
||||
createwound(max(1,min(6,round(burn/10) + rand(0,1))),2,burn)
|
||||
else
|
||||
var/can_inflict = src.max_damage - (src.brute_dam + src.burn_dam)
|
||||
var/can_inflict = max_damage - (brute_dam + burn_dam)
|
||||
if(can_inflict)
|
||||
if (brute > 0 && burn > 0)
|
||||
brute = can_inflict/2
|
||||
burn = can_inflict/2
|
||||
var/ratio = brute / (brute + burn)
|
||||
src.brute_dam += ratio * can_inflict
|
||||
src.burn_dam += (1 - ratio) * can_inflict
|
||||
brute_dam += ratio * can_inflict
|
||||
burn_dam += (1 - ratio) * can_inflict
|
||||
else
|
||||
if (brute > 0)
|
||||
brute = can_inflict
|
||||
src.brute_dam += brute
|
||||
brute_dam += brute
|
||||
if(!sharp && !prob(brute*3)) createwound(max(1,min(6,round(brute/10) + rand(0,1))),1,brute)
|
||||
else createwound(max(1,min(6,round(brute/10) + rand(1,2))),1,brute)
|
||||
else
|
||||
burn = can_inflict
|
||||
src.burn_dam += burn
|
||||
burn_dam += burn
|
||||
createwound(max(1,min(6,round(burn/10) + rand(0,1))),2,burn)
|
||||
else if(!robot)
|
||||
var/passed_dam = (brute + burn) - can_inflict //Getting how much overdamage we have.
|
||||
var/list/datum/organ/external/possible_points = list()
|
||||
if(parent)
|
||||
possible_points += parent
|
||||
if(children)
|
||||
possible_points += children
|
||||
if(!possible_points.len)
|
||||
message_admins("Oh god WHAT! [owner]'s [src] was unable to find an organ to pass overdamage too!")
|
||||
else
|
||||
if(!spread)
|
||||
var/datum/organ/external/target = pick(possible_points)
|
||||
if(brute)
|
||||
target.take_damage(passed_dam, 0, sharp, used_weapon,1)
|
||||
else
|
||||
target.take_damage(0, passed_dam, sharp, used_weapon,1)
|
||||
else
|
||||
return 0
|
||||
droplimb(1) //Robot limbs just kinda fail at full damage.
|
||||
|
||||
var/result = src.update_icon()
|
||||
|
||||
if(broken)
|
||||
owner.emote("scream")
|
||||
|
||||
if(used_weapon) add_wound(used_weapon, brute + burn)
|
||||
|
||||
var/result = update_icon()
|
||||
return result
|
||||
|
||||
|
||||
proc/heal_damage(brute, burn)
|
||||
src.brute_dam = max(0, src.brute_dam - brute)
|
||||
src.burn_dam = max(0, src.burn_dam - burn)
|
||||
proc/heal_damage(brute, burn, internal = 0, robo_repair = 0)
|
||||
if(robot && !robo_repair)
|
||||
return
|
||||
var/brute_to_heal = 0
|
||||
var/brute_wounds = list()
|
||||
var/burn_to_heal = 0
|
||||
var/burn_wounds = list()
|
||||
for(var/datum/organ/wound/W in wounds)
|
||||
if(W.wound_type > 1 && W.damage)
|
||||
burn_to_heal += W.damage
|
||||
burn_wounds += W
|
||||
else if(W.damage)
|
||||
brute_to_heal += W.damage
|
||||
brute_wounds += W
|
||||
if(brute && brute <= brute_to_heal)
|
||||
for(var/datum/organ/wound/W in brute_wounds)
|
||||
if(brute >= W.damage)
|
||||
brute_dam -= W.damage
|
||||
brute -= W.damage
|
||||
W.damage = 0
|
||||
W.initial_dmg = 0
|
||||
W.stopbleeding(1)
|
||||
else
|
||||
W.damage -= brute
|
||||
W.initial_dmg -= brute
|
||||
W.stopbleeding()
|
||||
else if(brute)
|
||||
for(var/datum/organ/wound/W in brute_wounds)
|
||||
W.damage = 0
|
||||
W.initial_dmg = 0
|
||||
W.stopbleeding(1)
|
||||
brute_dam = 0
|
||||
if(burn && burn <= burn_to_heal)
|
||||
for(var/datum/organ/wound/W in burn_wounds)
|
||||
if(burn >= W.damage)
|
||||
burn_dam -= W.damage
|
||||
burn -= W.damage
|
||||
W.damage = 0
|
||||
W.initial_dmg = 0
|
||||
W.stopbleeding()
|
||||
else
|
||||
W.damage -= burn
|
||||
W.initial_dmg -= burn
|
||||
W.stopbleeding()
|
||||
else if(burn)
|
||||
for(var/datum/organ/wound/W in burn_wounds)
|
||||
W.damage = 0
|
||||
W.initial_dmg = 0
|
||||
W.stopbleeding()
|
||||
burn_dam = 0
|
||||
if(internal)
|
||||
broken = 0
|
||||
perma_injury = 0
|
||||
// if all damage is healed, replace the wounds with scars
|
||||
if(brute_dam + burn_dam == 0)
|
||||
for(var/V in autopsy_data)
|
||||
var/datum/autopsy_data/W = autopsy_data[V]
|
||||
del W
|
||||
autopsy_data = list()
|
||||
return update_icon()
|
||||
|
||||
proc/add_wound(var/used_weapon, var/damage)
|
||||
var/datum/autopsy_data/W = autopsy_data[used_weapon]
|
||||
if(!W)
|
||||
W = new()
|
||||
W.weapon = used_weapon
|
||||
autopsy_data[used_weapon] = W
|
||||
|
||||
W.hits += 1
|
||||
W.damage += damage
|
||||
W.time_inflicted = world.time
|
||||
|
||||
|
||||
|
||||
proc/get_damage() //returns total damage
|
||||
return src.brute_dam + src.burn_dam //could use src.health?
|
||||
return max(brute_dam + burn_dam - perma_injury,perma_injury) //could use health?
|
||||
|
||||
proc/get_damage_brute()
|
||||
return max(brute_dam+perma_injury,perma_injury)
|
||||
|
||||
proc/get_damage_fire()
|
||||
return burn_dam
|
||||
|
||||
process()
|
||||
if(destroyed)
|
||||
if(!destspawn)
|
||||
droplimb()
|
||||
return
|
||||
if(broken == 0)
|
||||
perma_dmg = 0
|
||||
if(parent)
|
||||
if(parent.destroyed)
|
||||
destroyed = 1
|
||||
owner:update_body()
|
||||
return
|
||||
if(brute_dam > min_broken_damage && !robot)
|
||||
if(broken == 0)
|
||||
//owner.unlock_medal("Broke Yarrr Bones!", 0, "Break a bone.", "easy")
|
||||
owner.visible_message("\red You hear a loud cracking sound coming from [owner.name].","\red <b>Something feels like it shattered in your [display_name]!</b>","You hear a sickening crack.")
|
||||
owner.emote("scream")
|
||||
broken = 1
|
||||
wound = pick("broken","fracture","hairline fracture") //Randomise in future. Edit: Randomized. --SkyMarshal
|
||||
perma_injury = brute_dam
|
||||
return
|
||||
return
|
||||
|
||||
// new damage icon system
|
||||
// returns just the brute/burn damage code
|
||||
@@ -77,18 +326,18 @@
|
||||
|
||||
if(burn_dam ==0)
|
||||
tburn =0
|
||||
else if (src.burn_dam < (src.max_damage * 0.25 / 2))
|
||||
else if (burn_dam < (max_damage * 0.25 / 2))
|
||||
tburn = 1
|
||||
else if (src.burn_dam < (src.max_damage * 0.75 / 2))
|
||||
else if (burn_dam < (max_damage * 0.75 / 2))
|
||||
tburn = 2
|
||||
else
|
||||
tburn = 3
|
||||
|
||||
if (src.brute_dam == 0)
|
||||
if (brute_dam == 0)
|
||||
tbrute = 0
|
||||
else if (src.brute_dam < (src.max_damage * 0.25 / 2))
|
||||
else if (brute_dam < (max_damage * 0.25 / 2))
|
||||
tbrute = 1
|
||||
else if (src.brute_dam < (src.max_damage * 0.75 / 2))
|
||||
else if (brute_dam < (max_damage * 0.75 / 2))
|
||||
tbrute = 2
|
||||
else
|
||||
tbrute = 3
|
||||
@@ -98,13 +347,148 @@
|
||||
// new damage icon system
|
||||
// adjusted to set damage_state to brute/burn code only (without r_name0 as before)
|
||||
proc/update_icon()
|
||||
var/n_is = src.damage_state_text()
|
||||
if (n_is != src.damage_state)
|
||||
src.damage_state = n_is
|
||||
var/n_is = damage_state_text()
|
||||
if (n_is != damage_state)
|
||||
damage_state = n_is
|
||||
return 1
|
||||
return 0
|
||||
|
||||
|
||||
|
||||
proc/droplimb(var/override = 0,var/no_explode = 0)
|
||||
if(override)
|
||||
destroyed = 1
|
||||
if(destroyed)
|
||||
if(implant)
|
||||
for(var/implants in implant)
|
||||
del(implants)
|
||||
//owner.unlock_medal("Lost something?", 0, "Lose a limb.", "easy")
|
||||
|
||||
for(var/datum/organ/external/I in children)
|
||||
if(I && !I.destroyed)
|
||||
I.droplimb(1,1)
|
||||
var/obj/item/weapon/organ/H
|
||||
switch(body_part)
|
||||
if(UPPER_TORSO)
|
||||
owner.gib()
|
||||
if(LOWER_TORSO)
|
||||
owner << "\red You are now sterile."
|
||||
if(HEAD)
|
||||
H = new /obj/item/weapon/organ/head(owner.loc, owner)
|
||||
if(ishuman(owner))
|
||||
if(owner.gender == FEMALE)
|
||||
H.icon_state = "head_f_l"
|
||||
H.overlays += owner.face_lying
|
||||
if(ismonkey(owner))
|
||||
H.icon_state = "head_l"
|
||||
//H.overlays += owner.face_lying
|
||||
H:transfer_identity(owner)
|
||||
H.pixel_x = -10
|
||||
H.pixel_y = 6
|
||||
if(!owner.original_name)
|
||||
owner.original_name = owner.real_name
|
||||
H.name = "[owner.original_name]'s head"
|
||||
|
||||
owner.update_face()
|
||||
owner.update_body()
|
||||
owner.death()
|
||||
if(ARM_RIGHT)
|
||||
H = new /obj/item/weapon/organ/r_arm(owner.loc, owner)
|
||||
if(ismonkey(owner))
|
||||
H.icon_state = "r_arm_l"
|
||||
if(ARM_LEFT)
|
||||
H = new /obj/item/weapon/organ/l_arm(owner.loc, owner)
|
||||
if(ismonkey(owner))
|
||||
H.icon_state = "l_arm_l"
|
||||
if(LEG_RIGHT)
|
||||
H = new /obj/item/weapon/organ/r_leg(owner.loc, owner)
|
||||
if(ismonkey(owner))
|
||||
H.icon_state = "r_leg_l"
|
||||
if(LEG_LEFT)
|
||||
H = new /obj/item/weapon/organ/l_leg(owner.loc, owner)
|
||||
if(ismonkey(owner))
|
||||
H.icon_state = "l_leg_l"
|
||||
if(HAND_RIGHT)
|
||||
H = new /obj/item/weapon/organ/r_hand(owner.loc, owner)
|
||||
if(ismonkey(owner))
|
||||
H.icon_state = "r_hand_l"
|
||||
if(HAND_LEFT)
|
||||
H = new /obj/item/weapon/organ/l_hand(owner.loc, owner)
|
||||
if(ismonkey(owner))
|
||||
H.icon_state = "l_hand_l"
|
||||
if(FOOT_RIGHT)
|
||||
H = new /obj/item/weapon/organ/r_foot/(owner.loc, owner)
|
||||
if(ismonkey(owner))
|
||||
H.icon_state = "r_foot_l"
|
||||
if(FOOT_LEFT)
|
||||
H = new /obj/item/weapon/organ/l_foot(owner.loc, owner)
|
||||
if(ismonkey(owner))
|
||||
H.icon_state = "l_foot_l"
|
||||
if(ismonkey(owner))
|
||||
H.icon = 'monkey.dmi'
|
||||
if(istajaran(owner))
|
||||
H.icon = 'tajaran.dmi'
|
||||
var/lol = pick(cardinal)
|
||||
step(H,lol)
|
||||
destspawn = 1
|
||||
if(!robot)
|
||||
owner.visible_message("\red [owner.name]'s [display_name] flies off in an arc.",\
|
||||
"\red <b>Your [display_name] goes flying off!</b>",\
|
||||
"You hear a terrible sound of ripping tendons and flesh.")
|
||||
else
|
||||
owner.visible_message("\red [owner.name]'s [display_name] explodes violently!",\
|
||||
"\red <b>Your [display_name] explodes!</b>",\
|
||||
"You hear an explosion followed by a scream!")
|
||||
if(!no_explode)
|
||||
explosion(get_turf(owner),-1,-1,2,3)
|
||||
var/datum/effect/effect/system/spark_spread/spark_system = new /datum/effect/effect/system/spark_spread()
|
||||
spark_system.set_up(5, 0, src)
|
||||
spark_system.attach(src)
|
||||
spark_system.start()
|
||||
spawn(10)
|
||||
del(spark_system)
|
||||
for(var/datum/organ/wound/W in wounds)
|
||||
W.update_health()
|
||||
del(W)
|
||||
owner.update_body()
|
||||
owner.update_clothing()
|
||||
|
||||
proc/createwound(var/size = 1, var/type = 0, var/damage)
|
||||
var/list/datum/organ/wound/possible_wounds = list()
|
||||
for(var/datum/organ/wound/W in wounds)
|
||||
if(W.wound_type == type && W.wound_size <= 3 && size <= 3 && ((!W.is_healing && type == 1) || (!W.healing_state && type != 1)))
|
||||
possible_wounds += W
|
||||
if(hasorgans(owner))
|
||||
if(!possible_wounds.len || prob(20))
|
||||
var/datum/organ/wound/W = new(src)
|
||||
bleeding = max(!type,bleeding) //Sharp objects cause bleeding.
|
||||
W.bleeding = !type
|
||||
// owner:bloodloss += 10 * size
|
||||
W.damage = damage
|
||||
W.initial_dmg = damage
|
||||
W.wound_type = type
|
||||
W.wound_size = size
|
||||
W.owner = owner
|
||||
W.parent = src
|
||||
if(type == 1)
|
||||
spawn W.become_scar()
|
||||
else
|
||||
spawn W.start_close() //Let small cuts close themselves.
|
||||
wounds += W
|
||||
else
|
||||
var/datum/organ/wound/W = pick(possible_wounds)
|
||||
bleeding = max(!type,bleeding) //Sharp objects cause bleeding.
|
||||
W.bleeding = max(!type,W.bleeding)
|
||||
// owner:bloodloss += 10 * size
|
||||
W.damage += damage
|
||||
W.initial_dmg += damage
|
||||
W.wound_size = max(1,min(6,round(W.damage/10) + rand(0,1)))
|
||||
|
||||
proc/emp_act(severity)
|
||||
if(!robot) return
|
||||
if(prob(30*severity))
|
||||
take_damage(4(4-severity), 0, 1, used_weapon = "EMP")
|
||||
else
|
||||
droplimb(1)
|
||||
|
||||
proc/getDisplayName()
|
||||
switch(src.name)
|
||||
if("l_leg")
|
||||
@@ -115,9 +499,141 @@
|
||||
return "left arm"
|
||||
if("r_arm")
|
||||
return "right arm"
|
||||
if("l_foot")
|
||||
return "left foot"
|
||||
if("r_foot")
|
||||
return "right foot"
|
||||
if("l_hand")
|
||||
return "left hand"
|
||||
if("r_hand")
|
||||
return "right hand"
|
||||
else
|
||||
return src.name
|
||||
|
||||
/datum/organ/wound
|
||||
name = "wound"
|
||||
var/wound_type = 0 //0 = cut, 1 = bruise, 2 = burn
|
||||
var/damage = 0 //How much damage it caused.
|
||||
var/initial_dmg = 0
|
||||
var/wound_size = 1
|
||||
var/datum/organ/external/parent
|
||||
var/bleeding = 0 //You got wounded, of course it's bleeding. -- Scratch that. Rewrote it.
|
||||
var/healing_state = 0
|
||||
var/is_healing = 0
|
||||
var/slowheal = 3
|
||||
|
||||
proc/start_close()
|
||||
if(parent.robot)
|
||||
return
|
||||
sleep(rand(1800,3000)) //3-5 minutes
|
||||
if(prob(50) && wound_size == 1)
|
||||
parent.wounds.Remove(src)
|
||||
update_health(1)
|
||||
del(src)
|
||||
else if(prob(33) && wound_size < 3)
|
||||
stopbleeding()
|
||||
return
|
||||
sleep(rand(1800,3000))
|
||||
if(wound_size == 1) //Small cuts heal in 6-10 minutes.
|
||||
parent.wounds.Remove(src)
|
||||
update_health(1)
|
||||
del(src)
|
||||
else if(prob(50) && wound_size < 5 && bleeding)
|
||||
stopbleeding()
|
||||
return
|
||||
if(wound_size < 5 && bleeding) //Give it a chance to stop bleeding on it's own.
|
||||
spawn while(1)
|
||||
sleep(1200)
|
||||
if(prob(50))
|
||||
stopbleeding()
|
||||
return
|
||||
return
|
||||
|
||||
proc/stopbleeding(var/bleed = 0)
|
||||
if(is_healing)
|
||||
return 0
|
||||
// owner:bloodloss -= 10 * src.wound_size
|
||||
parent.bleeding = min(bleed,bleeding)
|
||||
for(var/datum/organ/wound/W in parent)
|
||||
if(W.bleeding && W != src)
|
||||
parent.bleeding = 1
|
||||
break
|
||||
bleeding = min(bleed,bleeding)
|
||||
is_healing = 1
|
||||
slowheal = 1
|
||||
if(!healing_state)
|
||||
spawn become_scar() //spawn off the process of becoming a scar.
|
||||
return 1
|
||||
|
||||
proc/become_scar()
|
||||
if(parent.robot)
|
||||
return
|
||||
healing_state = 1 //Patched
|
||||
spawn(200*slowheal) //~20-60 seconds
|
||||
update_health(5) //Heals some.
|
||||
|
||||
sleep(rand(1800,3000)*slowheal) //3-5 minutes
|
||||
|
||||
if(!parent || !parent.owner || parent.owner.stat == 2)
|
||||
if(!parent || !parent.owner)
|
||||
del(parent)
|
||||
del(src)
|
||||
return
|
||||
if(prob(80) && wound_size < 2) //Small cuts heal.
|
||||
update_health(1)
|
||||
parent.wounds.Remove(src)
|
||||
del(src)
|
||||
|
||||
healing_state = 2 //Noticibly healing.
|
||||
update_health(2) //Heals more.
|
||||
|
||||
sleep(rand(1800,3000)*slowheal) //3-5 minutes
|
||||
if(!parent || !parent.owner || parent.owner.stat == 2)
|
||||
if(!parent || !parent.owner)
|
||||
del(parent)
|
||||
del(src)
|
||||
return
|
||||
if(prob(60) && wound_size < 3) //Cuts heal up
|
||||
parent.wounds.Remove(src)
|
||||
del(src)
|
||||
healing_state = 3 //Angry red scar
|
||||
update_health(1) //Heals the rest of the way.
|
||||
|
||||
|
||||
sleep(rand(6000,9000)*slowheal) //10-15 minutes
|
||||
if(!parent || !parent.owner || parent.owner.stat == 2)
|
||||
if(!parent || !parent.owner)
|
||||
del(parent)
|
||||
del(src)
|
||||
return
|
||||
if(prob(80) && wound_size < 4) //Minor wounds heal up fully.
|
||||
parent.wounds.Remove(src)
|
||||
del(src)
|
||||
healing_state = 4 //Scar
|
||||
sleep(rand(6000,9000)*slowheal) //10-15 minutes
|
||||
if(!parent || !parent.owner || parent.owner.stat == 2)
|
||||
if(!parent || !parent.owner)
|
||||
del(parent)
|
||||
del(src)
|
||||
return
|
||||
if(prob(30) || wound_size < 4 || wound_type == 1) //Small chance for the scar to disappear, any small remaining wounds deleted.
|
||||
parent.wounds.Remove(src)
|
||||
del(src)
|
||||
healing_state = 5 //Faded scar
|
||||
return
|
||||
|
||||
proc/update_health(var/percent = 1)
|
||||
if(!owner || owner.stat == 2)
|
||||
return
|
||||
damage = max(damage - damage/percent,0) //Remove that amount of the damage
|
||||
if(wound_type > 1)
|
||||
parent.burn_dam = max(parent.burn_dam - (initial_dmg - damage),0)
|
||||
else
|
||||
parent.brute_dam = max(parent.brute_dam - (initial_dmg - damage),0)
|
||||
initial_dmg = damage //reset it for further updates.
|
||||
parent.owner.updatehealth()
|
||||
|
||||
|
||||
|
||||
|
||||
/****************************************************
|
||||
|
||||
@@ -2,61 +2,207 @@
|
||||
name = "chest"
|
||||
icon_name = "chest"
|
||||
max_damage = 150
|
||||
min_broken_damage = 75
|
||||
body_part = UPPER_TORSO
|
||||
|
||||
/*/datum/organ/external/groin
|
||||
/datum/organ/external/groin
|
||||
name = "groin"
|
||||
icon_name = "groin"
|
||||
icon_name = "diaper"
|
||||
max_damage = 115
|
||||
min_broken_damage = 70
|
||||
body_part = LOWER_TORSO
|
||||
*/
|
||||
|
||||
/datum/organ/external/head
|
||||
name = "head"
|
||||
icon_name = "head"
|
||||
max_damage = 125
|
||||
max_damage = 75
|
||||
min_broken_damage = 40
|
||||
body_part = HEAD
|
||||
var/disfigured = 0
|
||||
|
||||
/datum/organ/external/l_arm
|
||||
name = "l_arm"
|
||||
display_name = "left arm"
|
||||
icon_name = "l_arm"
|
||||
max_damage = 75
|
||||
min_broken_damage = 30
|
||||
body_part = ARM_LEFT
|
||||
|
||||
/datum/organ/external/l_leg
|
||||
name = "l_leg"
|
||||
display_name = "left leg"
|
||||
icon_name = "l_leg"
|
||||
max_damage = 75
|
||||
min_broken_damage = 30
|
||||
body_part = LEG_LEFT
|
||||
|
||||
/datum/organ/external/r_arm
|
||||
name = "r_arm"
|
||||
display_name = "right arm"
|
||||
icon_name = "r_arm"
|
||||
max_damage = 75
|
||||
min_broken_damage = 30
|
||||
body_part = ARM_RIGHT
|
||||
|
||||
/datum/organ/external/r_leg
|
||||
name = "r_leg"
|
||||
display_name = "right leg"
|
||||
icon_name = "r_leg"
|
||||
max_damage = 75
|
||||
min_broken_damage = 30
|
||||
body_part = LEG_RIGHT
|
||||
|
||||
/*Leaving these here in case we want to use them later
|
||||
/datum/organ/external/l_foot
|
||||
name = "l foot"
|
||||
name = "l_foot"
|
||||
display_name = "left foot"
|
||||
icon_name = "l_foot"
|
||||
max_damage = 40
|
||||
min_broken_damage = 15
|
||||
body_part = FOOT_LEFT
|
||||
|
||||
/datum/organ/external/r_foot
|
||||
name = "r foot"
|
||||
name = "r_foot"
|
||||
display_name = "right foot"
|
||||
icon_name = "r_foot"
|
||||
max_damage = 40
|
||||
min_broken_damage = 15
|
||||
body_part = FOOT_RIGHT
|
||||
|
||||
/datum/organ/external/r_hand
|
||||
name = "r hand"
|
||||
name = "r_hand"
|
||||
display_name = "right hand"
|
||||
icon_name = "r_hand"
|
||||
max_damage = 40
|
||||
min_broken_damage = 15
|
||||
body_part = HAND_RIGHT
|
||||
|
||||
/datum/organ/external/l_hand
|
||||
name = "l hand"
|
||||
name = "l_hand"
|
||||
display_name = "left hand"
|
||||
icon_name = "l_hand"
|
||||
max_damage = 40
|
||||
min_broken_damage = 15
|
||||
body_part = HAND_LEFT
|
||||
*/
|
||||
|
||||
|
||||
|
||||
obj/item/weapon/organ
|
||||
icon = 'human.dmi'
|
||||
|
||||
obj/item/weapon/organ/New(loc, mob/living/carbon/human/H)
|
||||
..(loc)
|
||||
if(!istype(H))
|
||||
return
|
||||
if(H.dna)
|
||||
if(blood_DNA && blood_DNA.len)
|
||||
blood_DNA.len++
|
||||
blood_DNA[blood_DNA.len] = list(H.dna.unique_enzymes, H.dna.b_type)
|
||||
else
|
||||
blood_DNA = list(list(H.dna.unique_enzymes, H.dna.b_type))
|
||||
|
||||
var/icon/I = new /icon(icon, icon_state)
|
||||
|
||||
if (H.s_tone >= 0)
|
||||
I.Blend(rgb(H.s_tone, H.s_tone, H.s_tone), ICON_ADD)
|
||||
else
|
||||
I.Blend(rgb(-H.s_tone, -H.s_tone, -H.s_tone), ICON_SUBTRACT)
|
||||
icon = I
|
||||
|
||||
obj/item/weapon/organ/head
|
||||
name = "head"
|
||||
icon_state = "head_m_l"
|
||||
var/mob/living/carbon/brain/brainmob
|
||||
var/brain_op_stage = 0
|
||||
|
||||
obj/item/weapon/organ/head/New()
|
||||
..()
|
||||
spawn(5)
|
||||
if(brainmob && brainmob.client)
|
||||
brainmob.client.screen.len = null //clear the hud
|
||||
|
||||
obj/item/weapon/organ/head/proc/transfer_identity(var/mob/living/carbon/human/H)//Same deal as the regular brain proc. Used for human-->head
|
||||
brainmob = new(src)
|
||||
brainmob.name = H.real_name
|
||||
brainmob.real_name = H.real_name
|
||||
brainmob.dna = H.dna
|
||||
if(H.mind)
|
||||
H.mind.transfer_to(brainmob)
|
||||
brainmob.container = src
|
||||
if (brainmob.client)
|
||||
spawn(10)
|
||||
if(brainmob.client)
|
||||
verbs += /mob/proc/ghost
|
||||
|
||||
obj/item/weapon/organ/head/attackby(obj/item/weapon/W as obj, mob/user as mob)
|
||||
if(istype(W,/obj/item/weapon/scalpel))
|
||||
switch(brain_op_stage)
|
||||
if(0)
|
||||
for(var/mob/O in (oviewers(brainmob) - user))
|
||||
O.show_message("\red [brainmob] is beginning to have \his head cut open with [src] by [user].", 1)
|
||||
brainmob << "\red [user] begins to cut open your head with [src]!"
|
||||
user << "\red You cut [brainmob]'s head open with [src]!"
|
||||
|
||||
brain_op_stage = 1
|
||||
|
||||
if(2)
|
||||
for(var/mob/O in (oviewers(brainmob) - user))
|
||||
O.show_message("\red [brainmob] is having \his connections to the brain delicately severed with [src] by [user].", 1)
|
||||
brainmob << "\red [user] begins to cut open your head with [src]!"
|
||||
user << "\red You cut [brainmob]'s head open with [src]!"
|
||||
|
||||
brain_op_stage = 3.0
|
||||
else
|
||||
..()
|
||||
else if(istype(W,/obj/item/weapon/circular_saw))
|
||||
switch(brain_op_stage)
|
||||
if(1)
|
||||
for(var/mob/O in (oviewers(brainmob) - user))
|
||||
O.show_message("\red [brainmob] has \his skull sawed open with [src] by [user].", 1)
|
||||
brainmob << "\red [user] begins to saw open your head with [src]!"
|
||||
user << "\red You saw [brainmob]'s head open with [src]!"
|
||||
|
||||
brain_op_stage = 2
|
||||
if(3)
|
||||
for(var/mob/O in (oviewers(brainmob) - user))
|
||||
O.show_message("\red [brainmob] has \his spine's connection to the brain severed with [src] by [user].", 1)
|
||||
brainmob << "\red [user] severs your brain's connection to the spine with [src]!"
|
||||
user << "\red You sever [brainmob]'s brain's connection to the spine with [src]!"
|
||||
|
||||
user.attack_log += "\[[time_stamp()]\]<font color='red'> Debrained [brainmob.name] ([brainmob.ckey]) with [src.name] (INTENT: [uppertext(user.a_intent)])</font>"
|
||||
brainmob.attack_log += "\[[time_stamp()]\]<font color='orange'> Debrained by [user.name] ([user.ckey]) with [src.name] (INTENT: [uppertext(user.a_intent)])</font>"
|
||||
log_admin("ATTACK: [brainmob] ([brainmob.ckey]) debrained [user] ([user.ckey]).")
|
||||
message_admins("ATTACK: [brainmob] ([brainmob.ckey]) debrained [user] ([user.ckey]).")
|
||||
|
||||
var/obj/item/brain/B = new(loc)
|
||||
B.transfer_identity(brainmob)
|
||||
|
||||
brain_op_stage = 4.0
|
||||
else
|
||||
..()
|
||||
else
|
||||
..()
|
||||
|
||||
obj/item/weapon/organ/l_arm
|
||||
name = "left arm"
|
||||
icon_state = "l_arm_l"
|
||||
obj/item/weapon/organ/l_foot
|
||||
name = "left foot"
|
||||
icon_state = "l_foot_l"
|
||||
obj/item/weapon/organ/l_hand
|
||||
name = "left hand"
|
||||
icon_state = "l_hand_l"
|
||||
obj/item/weapon/organ/l_leg
|
||||
name = "left leg"
|
||||
icon_state = "l_leg_l"
|
||||
obj/item/weapon/organ/r_arm
|
||||
name = "right arm"
|
||||
icon_state = "r_arm_l"
|
||||
obj/item/weapon/organ/r_foot
|
||||
name = "right foot"
|
||||
icon_state = "r_foot_l"
|
||||
obj/item/weapon/organ/r_hand
|
||||
name = "right hand"
|
||||
icon_state = "r_hand_l"
|
||||
obj/item/weapon/organ/r_leg
|
||||
name = "right leg"
|
||||
icon_state = "r_leg_l"
|
||||
|
||||
@@ -0,0 +1,56 @@
|
||||
mob/proc/flash_pain()
|
||||
// flick("pain",pain)
|
||||
return
|
||||
|
||||
mob/var/list/pain_stored = list()
|
||||
mob/var/last_pain_message = ""
|
||||
mob/var/next_pain_time = 0
|
||||
|
||||
// partname is the name of a body part
|
||||
// amount is a num from 1 to 100
|
||||
mob/proc/pain(var/partname, var/amount, var/force)
|
||||
if(stat >= 2) return
|
||||
if(world.time < next_pain_time && !force)
|
||||
return
|
||||
if(amount > 10 && istype(src,/mob/living/carbon/human))
|
||||
if(src:paralysis)
|
||||
src:paralysis = max(0, src:paralysis-round(amount/10))
|
||||
if(amount > 50 && prob(amount / 5))
|
||||
src:drop_item()
|
||||
/*
|
||||
switch(amount)
|
||||
if(1 to 10)
|
||||
msg = "<b>Your [partname] hurts a bit.</b>"
|
||||
if(11 to 90)
|
||||
// flash_weak_pain()
|
||||
msg = "<b><font size=1>Ouch! Your [partname] hurts.</font></b>"
|
||||
if(91 to 10000)
|
||||
flash_pain()
|
||||
msg = "<b><font size=3>OH GOD! Your [partname] is hurting terribly!</font></b>"
|
||||
|
||||
if(msg && (msg != last_pain_message || prob(10)))
|
||||
last_pain_message = msg
|
||||
src << msg
|
||||
|
||||
*/
|
||||
next_pain_time = world.time + (100 - amount)
|
||||
|
||||
mob/living/carbon/human/proc/handle_pain()
|
||||
// not when sleeping
|
||||
if(stat >= 2) return
|
||||
if(reagents.has_reagent("tramadol"))
|
||||
return
|
||||
if(reagents.has_reagent("oxycodone"))
|
||||
return
|
||||
var/maxdam = 0
|
||||
var/datum/organ/external/damaged_organ = null
|
||||
for(var/name in organs)
|
||||
var/datum/organ/external/E = organs[name]
|
||||
var/dam = E.get_damage()
|
||||
// make the choice of the organ depend on damage,
|
||||
// but also sometimes use one of the less damaged ones
|
||||
if(dam > maxdam && (maxdam == 0 || prob(70)) )
|
||||
damaged_organ = E
|
||||
maxdam = dam
|
||||
if(damaged_organ)
|
||||
pain(damaged_organ.display_name, maxdam, 0)
|
||||
Reference in New Issue
Block a user