mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-07-20 19:44:09 +01:00
Merge pull request #786 from SkyMarshal/Airlocks
Adds dismemberment to Tajarans and Monkeys. Added some sanity checks to prevent people from punching you when they are missing hands. Fixed more wound stuff. Some examine fixes.
This commit is contained in:
@@ -78,6 +78,20 @@
|
||||
var/datum/player_info/P = new
|
||||
P.author = usr.key
|
||||
P.content = add
|
||||
var/modifyer = "th"
|
||||
switch(time2text(world.timeofday, "DD"))
|
||||
if("01","21","31")
|
||||
modifyer = "st"
|
||||
if("02","22",)
|
||||
modifyer = "nd"
|
||||
if("03","23")
|
||||
modifyer = "rd"
|
||||
var/day_string = "[time2text(world.timeofday, "DD")][modifyer]"
|
||||
if(copytext(day_string,1,2) == "0")
|
||||
day_string = copytext(day_string,2)
|
||||
var/full_date = time2text(world.timeofday, "DDD, MMM DD of YYYY")
|
||||
var/day_loc = findtext(full_date, time2text(world.timeofday, "DD"))
|
||||
P.timestamp = "[copytext(full_date,1,day_loc)][day_string][copytext(full_date,day_loc+2)]"
|
||||
|
||||
infos += P
|
||||
|
||||
@@ -1871,6 +1885,7 @@
|
||||
/datum/player_info/var
|
||||
author // admin who authored the information
|
||||
content // text content of the information
|
||||
timestamp // Because this is bloody annoying
|
||||
|
||||
/obj/admins/proc/player_has_info(var/key as text)
|
||||
var/savefile/info = new("data/player_saves/[copytext(key, 1, 2)]/[key]/info.sav")
|
||||
@@ -1896,13 +1911,18 @@
|
||||
if(!infos)
|
||||
dat += "No information found on the given key.<br>"
|
||||
else
|
||||
var/update_file = 0
|
||||
var/i = 0
|
||||
for(var/datum/player_info/I in infos)
|
||||
i += 1
|
||||
dat += "<font color=#008800>[I.content]</font> <i>by [I.author]</i> "
|
||||
if(!I.timestamp)
|
||||
I.timestamp = "Pre-4/3/2012"
|
||||
update_file = 1
|
||||
dat += "<font color=#008800>[I.content]</font> <i>by [I.author]</i> on <i><font color=blue>[I.timestamp]</i></font> "
|
||||
if(I.author == usr.key)
|
||||
dat += "<A href='?src=\ref[src];remove_player_info=[key];remove_index=[i]'>Remove</A>"
|
||||
dat += "<br><br>"
|
||||
if(update_file) info << infos
|
||||
|
||||
dat += "<br>"
|
||||
dat += "<A href='?src=\ref[src];add_player_info=[key]'>Add Comment</A><br>"
|
||||
@@ -1941,6 +1961,7 @@
|
||||
if(!note_keys)
|
||||
dat += "No notes found."
|
||||
else
|
||||
sortList(note_keys)
|
||||
for(var/t in note_keys)
|
||||
dat += text("<tr><td><A href='?src=\ref[src];view_player_info=[t]'>[t]</A></td></tr>")
|
||||
dat += "</table>"
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
dat += "<body><table border=1 cellspacing=5><B><tr><th>Name/Real Name</th><th>Type</th><th>Assigned Job</th><th>Info</th><th>Options</th><th>Traitor?</th></tr></B>"
|
||||
//add <th>IP:</th> to this if wanting to add back in IP checking
|
||||
//add <td>(IP: [M.lastKnownIP])</td> if you want to know their ip to the lists below
|
||||
var/list/mobs = sortmobs()
|
||||
var/list/mobs = get_sorted_mobs()
|
||||
var/i = 1
|
||||
|
||||
for(var/mob/M in mobs)
|
||||
@@ -45,7 +45,7 @@
|
||||
else if(istype(M,/mob/new_player))
|
||||
dat += "<td>New Player</td>"
|
||||
else
|
||||
dat += "<td>ERROR</td>"
|
||||
dat += "<td>\red ERROR</td>\black"
|
||||
|
||||
if(M.mind && M.mind.assigned_role && istype(M, /mob/living/carbon/human)) // Adds a column to Player Panel that shows their current job.
|
||||
var/mob/living/carbon/human/H = M
|
||||
@@ -117,7 +117,7 @@
|
||||
dat += "<body><table border=1 cellspacing=5><B><tr><th>Name</th><th>Real Name</th><th>Assigned Job</th><th>Key</th><th>Options</th><th>PM</th><th>Traitor?</th></tr></B>"
|
||||
//add <th>IP:</th> to this if wanting to add back in IP checking
|
||||
//add <td>(IP: [M.lastKnownIP])</td> if you want to know their ip to the lists below
|
||||
var/list/mobs = sortmobs()
|
||||
var/list/mobs = get_sorted_mobs()
|
||||
|
||||
for(var/mob/M in mobs)
|
||||
if(!M.ckey) continue
|
||||
|
||||
@@ -28,7 +28,7 @@
|
||||
alert("Admin jumping disabled")
|
||||
return
|
||||
|
||||
/client/proc/jumptomob(var/mob/M in world)
|
||||
/client/proc/jumptomob()
|
||||
set category = "Admin"
|
||||
set name = "Jump to Mob"
|
||||
|
||||
@@ -37,15 +37,18 @@
|
||||
return
|
||||
|
||||
if(config.allow_admin_jump)
|
||||
log_admin("[key_name(usr)] jumped to [key_name(M)]")
|
||||
message_admins("[key_name_admin(usr)] jumped to [key_name_admin(M)]", 1)
|
||||
if(src.mob)
|
||||
var/mob/A = src.mob
|
||||
var/turf/T = get_turf(M)
|
||||
if(T && isturf(T))
|
||||
A.loc = T
|
||||
else
|
||||
A << "This mob is not located in the game world."
|
||||
var/selection = input("Please, select a player!", "Admin Jumping", null, null) as null|anything in getmobs()
|
||||
var/mob/M = selection
|
||||
if(!istype(M))
|
||||
return
|
||||
var/mob/A = src.mob
|
||||
var/turf/T = get_turf(M)
|
||||
if(T && isturf(T))
|
||||
A.loc = T
|
||||
log_admin("[key_name(usr)] jumped to [key_name(M)]")
|
||||
message_admins("[key_name_admin(usr)] jumped to [key_name_admin(M)]", 1)
|
||||
else
|
||||
A << "This mob is not located in the game world."
|
||||
else
|
||||
alert("Admin jumping disabled")
|
||||
|
||||
@@ -71,7 +74,7 @@
|
||||
else
|
||||
alert("Admin jumping disabled")
|
||||
|
||||
/client/proc/Getmob(var/mob/M in world)
|
||||
/client/proc/Getmob()
|
||||
set category = "Admin"
|
||||
set name = "Get Mob"
|
||||
set desc = "Mob to teleport"
|
||||
@@ -79,9 +82,18 @@
|
||||
src << "Only administrators may use this command."
|
||||
return
|
||||
if(config.allow_admin_jump)
|
||||
log_admin("[key_name(usr)] teleported [key_name(M)]")
|
||||
message_admins("[key_name_admin(usr)] teleported [key_name_admin(M)]", 1)
|
||||
M.loc = get_turf(usr)
|
||||
var/selection = input("Please, select a player!", "Admin Jumping", null, null) as null|anything in getmobs()
|
||||
var/mob/M = selection
|
||||
if(!istype(M))
|
||||
return
|
||||
var/mob/A = src.mob
|
||||
var/turf/T = get_turf(A)
|
||||
if(T && isturf(T))
|
||||
M.loc = T
|
||||
log_admin("[key_name(usr)] teleported [key_name(M)]")
|
||||
message_admins("[key_name_admin(usr)] teleported [key_name_admin(M)]", 1)
|
||||
else
|
||||
A << "You are not located in the game world."
|
||||
else
|
||||
alert("Admin jumping disabled")
|
||||
|
||||
|
||||
@@ -50,7 +50,7 @@ But you can call procs that are of type /mob/living/carbon/human/proc/ for that
|
||||
if("Obj")
|
||||
target = input("Enter target:","Target",usr) as obj in world
|
||||
if("Mob")
|
||||
target = input("Enter target:","Target",usr) as mob in world
|
||||
target = input("Enter target:","Target",usr) as mob in getmobs()
|
||||
if("Area or Turf")
|
||||
target = input("Enter target:","Target",usr.loc) as area|turf in world
|
||||
if("Client")
|
||||
@@ -105,7 +105,7 @@ But you can call procs that are of type /mob/living/carbon/human/proc/ for that
|
||||
lst[i] = input("Select reference:","Reference") as null|mob|obj|turf|area in world
|
||||
|
||||
if("mob reference")
|
||||
lst[i] = input("Select reference:","Reference",usr) as mob in world
|
||||
lst[i] = input("Select reference:","Reference",usr) as mob in getmobs()
|
||||
|
||||
if("file")
|
||||
lst[i] = input("Pick file:","File") as file
|
||||
@@ -117,10 +117,11 @@ But you can call procs that are of type /mob/living/carbon/human/proc/ for that
|
||||
var/list/keys = list()
|
||||
for(var/mob/M in world)
|
||||
keys += M.client
|
||||
sortList(keys)
|
||||
lst[i] = input("Please, select a player!", "Selection", null, null) as null|anything in keys
|
||||
|
||||
if("mob's area")
|
||||
var/mob/temp = input("Select mob", "Selection", usr) as mob in world
|
||||
var/mob/temp = input("Select mob", "Selection", usr) as mob in getmobs()
|
||||
lst[i] = temp.loc
|
||||
|
||||
|
||||
|
||||
@@ -62,7 +62,7 @@
|
||||
var_value = input("Select reference:","Reference") as null|mob|obj|turf|area in world
|
||||
|
||||
if("mob reference")
|
||||
var_value = input("Select reference:","Reference") as null|mob in world
|
||||
var_value = input("Select reference:","Reference") as null|mob in get_sorted_mobs()
|
||||
|
||||
if("file")
|
||||
var_value = input("Pick file:","File") as null|file
|
||||
@@ -99,10 +99,10 @@
|
||||
switch(class)
|
||||
|
||||
if("text")
|
||||
var_value = input("Enter new text:","Text") as text
|
||||
var_value = input("Enter new text:","Text") as null|text
|
||||
|
||||
if("num")
|
||||
var_value = input("Enter new number:","Num") as num
|
||||
var_value = input("Enter new number:","Num") as null|num
|
||||
|
||||
if("type")
|
||||
var_value = input("Enter type:","Type") in typesof(/obj,/mob,/area,/turf)
|
||||
@@ -127,13 +127,13 @@
|
||||
var_value = input("Select reference:","Reference") as null|mob|obj|turf|area in world
|
||||
|
||||
if("mob reference")
|
||||
var_value = input("Select reference:","Reference") as mob in world
|
||||
var_value = input("Select reference:","Reference") as null|mob in get_sorted_mobs()
|
||||
|
||||
if("file")
|
||||
var_value = input("Pick file:","File") as file
|
||||
var_value = input("Pick file:","File") as null|file
|
||||
|
||||
if("icon")
|
||||
var_value = input("Pick icon:","Icon") as icon
|
||||
var_value = input("Pick icon:","Icon") as null|icon
|
||||
|
||||
if("marked datum")
|
||||
var_value = holder.marked_datum
|
||||
@@ -263,11 +263,11 @@
|
||||
|
||||
if("text")
|
||||
variable = input("Enter new text:","Text",\
|
||||
variable) as text
|
||||
variable) as null|text
|
||||
|
||||
if("num")
|
||||
variable = input("Enter new number:","Num",\
|
||||
variable) as num
|
||||
variable) as null|num
|
||||
|
||||
if("type")
|
||||
variable = input("Enter type:","Type",variable) \
|
||||
@@ -276,7 +276,7 @@
|
||||
if("reference")
|
||||
switch(alert("Would you like to enter a specific object, or search for it from the world?","Choose!","Specifc UID (Hexadecimal number)", "Search"))
|
||||
if("Specifc UID (Hexadecimal number)")
|
||||
var/UID = input("Type in UID, without the leading 0x","Type in UID") as text|null
|
||||
var/UID = input("Type in UID, without the leading 0x","Type in UID") as null|text
|
||||
if(!UID) return
|
||||
if(length(UID) != 7)
|
||||
usr << "ERROR. UID must be 7 digits"
|
||||
@@ -294,15 +294,15 @@
|
||||
|
||||
if("mob reference")
|
||||
variable = input("Select reference:","Reference",\
|
||||
variable) as mob in world
|
||||
variable) as null|mob in get_sorted_mobs()
|
||||
|
||||
if("file")
|
||||
variable = input("Pick file:","File",variable) \
|
||||
as file
|
||||
as null|file
|
||||
|
||||
if("icon")
|
||||
variable = input("Pick icon:","Icon",variable) \
|
||||
as icon
|
||||
as null|icon
|
||||
|
||||
if("marked datum")
|
||||
variable = holder.marked_datum
|
||||
@@ -533,7 +533,7 @@
|
||||
O.vars[variable] = var_new
|
||||
|
||||
if("mob reference")
|
||||
var/var_new = input("Select reference:","Reference",O.vars[variable]) as null|mob in world
|
||||
var/var_new = input("Select reference:","Reference",O.vars[variable]) as null|mob in get_sorted_mobs()
|
||||
if(var_new==null) return
|
||||
O.vars[variable] = var_new
|
||||
|
||||
|
||||
@@ -397,12 +397,12 @@ datum
|
||||
return 0
|
||||
|
||||
get_reagent_amount(var/reagent)
|
||||
var/total = 0
|
||||
for(var/A in reagent_list)
|
||||
var/datum/reagent/R = A
|
||||
if (R.id == reagent)
|
||||
return R.volume
|
||||
|
||||
return 0
|
||||
total += R.volume
|
||||
return total
|
||||
|
||||
get_reagents()
|
||||
var/res = ""
|
||||
|
||||
@@ -96,7 +96,7 @@ datum
|
||||
|
||||
|
||||
blood
|
||||
data = list("donor"=null,"viruses"=null,"blood_DNA"=null,"blood_type"=null,"resistances"=null,"trace_chem"=null,"virus2"=null,"antibodies"=0)
|
||||
data = new/list("donor"=null,"viruses"=null,"blood_DNA"=null,"blood_type"=null,"resistances"=null,"trace_chem"=null,"virus2"=null,"antibodies"=0)
|
||||
name = "Blood"
|
||||
id = "blood"
|
||||
reagent_state = LIQUID
|
||||
@@ -1338,8 +1338,9 @@ datum
|
||||
if(M:getBruteLoss() && prob(40)) M:heal_organ_damage(1,0)
|
||||
if(M:getFireLoss() && prob(40)) M:heal_organ_damage(0,1)
|
||||
if(M:getToxLoss() && prob(40)) M:adjustToxLoss(-1)
|
||||
if(volume > REAGENTS_OVERDOSE)
|
||||
M:adjustToxLoss(1)
|
||||
// if(volume > REAGENTS_OVERDOSE)
|
||||
// M:adjustToxLoss(1)
|
||||
//As hilarious as it was watching Asanadas projectile vomit everywhere from some overzealous medibots, and some antitoxin making 170 units, it was waaay bad.
|
||||
..()
|
||||
return
|
||||
|
||||
|
||||
@@ -35,7 +35,7 @@
|
||||
if(prob(src.getBruteLoss() - 50))
|
||||
src.gib()
|
||||
|
||||
/mob/living/carbon/gib(give_medal)
|
||||
/mob/living/carbon/gib(give_medal,ex_act)
|
||||
for(var/mob/M in src)
|
||||
if(M in src.stomach_contents)
|
||||
src.stomach_contents.Remove(M)
|
||||
@@ -43,9 +43,22 @@
|
||||
for(var/mob/N in viewers(src, null))
|
||||
if(N.client)
|
||||
N.show_message(text("\red <B>[M] bursts out of [src]!</B>"), 2)
|
||||
. = ..(give_medal)
|
||||
. = ..(ex_act)
|
||||
|
||||
/mob/living/carbon/attack_hand(mob/M as mob)
|
||||
if (M.hand)
|
||||
if(ishuman(M) || ismonkey(M))
|
||||
var/datum/organ/external/temp = M:organs["l_hand"]
|
||||
if(temp.destroyed)
|
||||
M << "\red Yo- wait a minute."
|
||||
return
|
||||
else
|
||||
if(ishuman(M) || ismonkey(M))
|
||||
var/datum/organ/external/temp = M:organs["r_hand"]
|
||||
if(temp.destroyed)
|
||||
M << "\red Yo- wait a minute."
|
||||
return
|
||||
|
||||
if(!istype(M, /mob/living/carbon)) return
|
||||
|
||||
for(var/datum/disease/D in viruses)
|
||||
@@ -84,6 +97,18 @@
|
||||
|
||||
/mob/living/carbon/attack_paw(mob/M as mob)
|
||||
if(!istype(M, /mob/living/carbon)) return
|
||||
if (M.hand)
|
||||
if(ishuman(M) || ismonkey(M))
|
||||
var/datum/organ/external/temp = M:organs["l_hand"]
|
||||
if(temp.destroyed)
|
||||
M << "\red Yo- wait a minute."
|
||||
return
|
||||
else
|
||||
if(ishuman(M) || ismonkey(M))
|
||||
var/datum/organ/external/temp = M:organs["r_hand"]
|
||||
if(temp.destroyed)
|
||||
M << "\red Yo- wait a minute."
|
||||
return
|
||||
|
||||
|
||||
for(var/datum/disease/D in viruses)
|
||||
@@ -216,4 +241,16 @@
|
||||
for(var/datum/organ/external/O in L)
|
||||
bruteloss += O.get_damage_brute()
|
||||
fireloss += O.get_damage_fire()
|
||||
return
|
||||
return
|
||||
|
||||
/mob/living/carbon/proc/check_dna()
|
||||
dna.check_integrity(src)
|
||||
return
|
||||
|
||||
/mob/living/carbon/proc/get_organ(var/zone)
|
||||
if(!zone) zone = "chest"
|
||||
for(var/name in organs)
|
||||
var/datum/organ/external/O = organs[name]
|
||||
if(O.name == zone)
|
||||
return O
|
||||
return null
|
||||
@@ -4,6 +4,7 @@
|
||||
halloss = 0
|
||||
// And the suffocation was a hallucination (lazy)
|
||||
//oxyloss = 0
|
||||
updatehealth()
|
||||
return
|
||||
if(src.stat == 2)
|
||||
return
|
||||
|
||||
@@ -54,7 +54,7 @@
|
||||
t_his = "her"
|
||||
t_him = "her"
|
||||
|
||||
msg += "<EM>\a [src]</EM>!\n"
|
||||
msg += "<EM>\a [src]</EM>[examine_text ? ", [examine_text]":""]!\n"
|
||||
|
||||
//uniform
|
||||
if (src.w_uniform && !skipjumpsuit)
|
||||
@@ -237,11 +237,13 @@
|
||||
|
||||
var/list/wound_descriptions = list()
|
||||
var/list/wound_flavor_text = list()
|
||||
var/list/is_destroyed = list()
|
||||
for(var/named in organs)
|
||||
var/datum/organ/external/temp = organs[named]
|
||||
if(temp)
|
||||
if(temp.destroyed)
|
||||
wound_flavor_text["[temp.display_name]"] = "<span class='warning'><b>[src.name] is missing [t_his] [temp.display_name].</b></span>\n"
|
||||
is_destroyed["[temp.display_name]"] = 1
|
||||
wound_flavor_text["[temp.display_name]"] = "<span class='warning'><b>[t_He] is missing [t_his] [temp.display_name].</b></span>\n"
|
||||
continue
|
||||
if(temp.wounds)
|
||||
var/list/wounds = list(list(),list(),list(),list(),list(),list())
|
||||
@@ -401,22 +403,22 @@
|
||||
switch(tally[tallied])
|
||||
if(1)
|
||||
if(!flavor_text.len)
|
||||
flavor_text += "<span class='warning'>[src] has[prob(4) && !(tallied in no_exclude) ? " what might be" : ""] a [tallied_rename[tallied]]"
|
||||
flavor_text += "<span class='warning'>\The [src] has[prob(10) && !(tallied in no_exclude) ? " what might be" : ""] a [tallied_rename[tallied]]"
|
||||
else
|
||||
flavor_text += "[prob(4) && !(tallied in no_exclude) ? " what might be" : ""] a [tallied_rename[tallied]]"
|
||||
flavor_text += "[prob(10) && !(tallied in no_exclude) ? " what might be" : ""] a [tallied_rename[tallied]]"
|
||||
if(2)
|
||||
if(!flavor_text.len)
|
||||
flavor_text += "<span class='warning'>[src] has[prob(4) && !(tallied in no_exclude) ? " what might be" : ""] a pair of [tallied_rename[tallied]]s"
|
||||
flavor_text += "<span class='warning'>\The [src] has[prob(10) && !(tallied in no_exclude) ? " what might be" : ""] a pair of [tallied_rename[tallied]]s"
|
||||
else
|
||||
flavor_text += "[prob(4) && !(tallied in no_exclude) ? " what might be" : ""] a pair of [tallied_rename[tallied]]s"
|
||||
flavor_text += "[prob(10) && !(tallied in no_exclude) ? " what might be" : ""] a pair of [tallied_rename[tallied]]s"
|
||||
if(3 to 5)
|
||||
if(!flavor_text.len)
|
||||
flavor_text += "<span class='warning'>[src] has several [tallied_rename[tallied]]s"
|
||||
flavor_text += "<span class='warning'>\The [src] has several [tallied_rename[tallied]]s"
|
||||
else
|
||||
flavor_text += " several [tallied_rename[tallied]]s"
|
||||
if(6 to INFINITY)
|
||||
if(!flavor_text.len)
|
||||
flavor_text += "<span class='warning'>[src] has a bunch of [tallied_rename[tallied]]s"
|
||||
flavor_text += "<span class='warning'>\The [src] has a bunch of [tallied_rename[tallied]]s"
|
||||
else
|
||||
flavor_text += " a ton of [tallied_rename[tallied]]s"
|
||||
if(flavor_text.len)
|
||||
@@ -429,47 +431,50 @@
|
||||
flavor_text_string += flavor_text[text]
|
||||
flavor_text_string += " on [t_his] [named].</span><br>"
|
||||
wound_flavor_text["[named]"] = flavor_text_string
|
||||
if(wound_flavor_text["head"] && !skipmask && !(wear_mask && istype(wear_mask, /obj/item/clothing/mask/gas)))
|
||||
|
||||
//Handles the text strings being added to the actual description.
|
||||
//If they have something that covers the limb, and it is not missing, put flavortext. If it is covered but bleeding, add other flavortext.
|
||||
if(wound_flavor_text["head"] && (is_destroyed["head"] || (!skipmask && !(wear_mask && istype(wear_mask, /obj/item/clothing/mask/gas)))))
|
||||
msg += wound_flavor_text["head"]
|
||||
else if(is_bleeding["head"])
|
||||
msg += "<span class='warning'>[src] has blood running down [t_his] face!</span>\n"
|
||||
if(wound_flavor_text["chest"] && !w_uniform && !skipjumpsuit)
|
||||
if(wound_flavor_text["chest"] && !w_uniform && !skipjumpsuit) //No need. A missing chest gibs you.
|
||||
msg += wound_flavor_text["chest"]
|
||||
else if(is_bleeding["chest"])
|
||||
msg += "<span class='warning'>[src] has blood soaking through from under [t_his] clothing!</span>\n"
|
||||
if(wound_flavor_text["left arm"] && !w_uniform && !skipjumpsuit)
|
||||
if(wound_flavor_text["left arm"] && (is_destroyed["left arm"] || (!w_uniform && !skipjumpsuit)))
|
||||
msg += wound_flavor_text["left arm"]
|
||||
else if(is_bleeding["left arm"])
|
||||
msg += "<span class='warning'>[src] has blood soaking through from under [t_his] clothing!</span>\n"
|
||||
if(wound_flavor_text["left hand"] && !gloves && !skipgloves)
|
||||
if(wound_flavor_text["left hand"] && (is_destroyed["left hand"] || (!gloves && !skipgloves)))
|
||||
msg += wound_flavor_text["left hand"]
|
||||
else if(is_bleeding["left hand"])
|
||||
msg += "<span class='warning'>[src] has blood running from under [t_his] gloves!</span>\n"
|
||||
if(wound_flavor_text["right arm"] && !w_uniform && !skipjumpsuit)
|
||||
if(wound_flavor_text["right arm"] && (is_destroyed["right arm"] || (!w_uniform && !skipjumpsuit)))
|
||||
msg += wound_flavor_text["right arm"]
|
||||
else if(is_bleeding["right arm"])
|
||||
msg += "<span class='warning'>[src] has blood soaking through from under [t_his] clothing!</span>\n"
|
||||
if(wound_flavor_text["right hand"] && !gloves && !skipgloves)
|
||||
if(wound_flavor_text["right hand"] && (is_destroyed["right hand"] || (!gloves && !skipgloves)))
|
||||
msg += wound_flavor_text["right hand"]
|
||||
else if(is_bleeding["right hand"])
|
||||
msg += "<span class='warning'>[src] has blood running from under [t_his] gloves!</span>\n"
|
||||
if(wound_flavor_text["groin"] && !w_uniform && !skipjumpsuit)
|
||||
if(wound_flavor_text["groin"] && (is_destroyed["groin"] || (!w_uniform && !skipjumpsuit)))
|
||||
msg += wound_flavor_text["groin"]
|
||||
else if(is_bleeding["groin"])
|
||||
msg += "<span class='warning'>[src] has blood soaking through from under [t_his] clothing!</span>\n"
|
||||
if(wound_flavor_text["left leg"] && !w_uniform && !skipjumpsuit)
|
||||
if(wound_flavor_text["left leg"] && (is_destroyed["left leg"] || (!w_uniform && !skipjumpsuit)))
|
||||
msg += wound_flavor_text["left leg"]
|
||||
else if(is_bleeding["left leg"])
|
||||
msg += "<span class='warning'>[src] has blood soaking through from under [t_his] clothing!</span>\n"
|
||||
if(wound_flavor_text["left foot"]&& !shoes && !skipshoes)
|
||||
if(wound_flavor_text["left foot"]&& (is_destroyed["left foot"] || (!shoes && !skipshoes)))
|
||||
msg += wound_flavor_text["left foot"]
|
||||
else if(is_bleeding["left foot"])
|
||||
msg += "<span class='warning'>[src] has blood running from [t_his] shoes!</span>\n"
|
||||
if(wound_flavor_text["right leg"] && !w_uniform && !skipjumpsuit)
|
||||
if(wound_flavor_text["right leg"] && (is_destroyed["right leg"] || (!w_uniform && !skipjumpsuit)))
|
||||
msg += wound_flavor_text["right leg"]
|
||||
else if(is_bleeding["right leg"])
|
||||
msg += "<span class='warning'>[src] has blood soaking through from under [t_his] clothing!</span>\n"
|
||||
if(wound_flavor_text["right foot"]&& !shoes && !skipshoes)
|
||||
if(wound_flavor_text["right foot"]&& (is_destroyed["right foot"] || (!shoes && !skipshoes)))
|
||||
msg += wound_flavor_text["right foot"]
|
||||
else if(is_bleeding["right foot"])
|
||||
msg += "<span class='warning'>[src] has blood running from [t_his] shoes!</span>\n"
|
||||
|
||||
@@ -60,6 +60,7 @@
|
||||
var/bloodloss = 0
|
||||
var/datum/reagents/vessel
|
||||
var/pale = 0
|
||||
var/examine_text = ""
|
||||
|
||||
/mob/living/carbon/human/dummy
|
||||
real_name = "Test Dummy"
|
||||
@@ -75,26 +76,22 @@
|
||||
|
||||
if(!dna) dna = new /datum/dna(null)
|
||||
|
||||
organs2 += new /datum/organ/external/chest(src)
|
||||
organs2 += new /datum/organ/external/groin(src)
|
||||
organs2 += new /datum/organ/external/head(src)
|
||||
organs2 += new /datum/organ/external/l_arm(src)
|
||||
organs2 += new /datum/organ/external/r_arm(src)
|
||||
organs2 += new /datum/organ/external/r_leg(src)
|
||||
organs2 += new /datum/organ/external/l_leg(src)
|
||||
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)
|
||||
|
||||
var/datum/organ/external/part = new /datum/organ/external/l_hand(src)
|
||||
part.parent = organs["l_arm"]
|
||||
organs2 += part
|
||||
part = new /datum/organ/external/l_foot(src)
|
||||
part.parent = organs["l_leg"]
|
||||
organs2 += part
|
||||
part = new /datum/organ/external/r_hand(src)
|
||||
part.parent = organs["r_arm"]
|
||||
organs2 += part
|
||||
part = new /datum/organ/external/r_foot(src)
|
||||
part.parent = organs["r_leg"]
|
||||
organs2 += part
|
||||
|
||||
var/g = "m"
|
||||
if (gender == MALE)
|
||||
@@ -325,7 +322,7 @@
|
||||
if (1.0)
|
||||
b_loss += 500
|
||||
if (!prob(getarmor(null, "bomb")))
|
||||
gib(1)
|
||||
gib(1,1)
|
||||
return
|
||||
else
|
||||
var/atom/target = get_edge_target_turf(src, get_dir(src, get_step_away(src, src)))
|
||||
@@ -981,7 +978,7 @@
|
||||
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)
|
||||
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)
|
||||
@@ -2742,7 +2739,3 @@ It can still be worn/put on as normal.
|
||||
else
|
||||
reset_view(0)
|
||||
remoteobserve = null
|
||||
|
||||
/mob/living/carbon/human/proc/check_dna()
|
||||
dna.check_integrity(src)
|
||||
return
|
||||
|
||||
@@ -30,15 +30,6 @@
|
||||
body_lying += DI
|
||||
|
||||
|
||||
/mob/living/carbon/human/proc/get_organ(var/zone)
|
||||
if(!zone) zone = "chest"
|
||||
for(var/name in organs)
|
||||
var/datum/organ/external/O = organs[name]
|
||||
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, var/sharp = 0, var/used_weapon = null)
|
||||
if((damagetype != BRUTE) && (damagetype != BURN))
|
||||
..(damage, damagetype, def_zone, blocked)
|
||||
|
||||
@@ -26,6 +26,6 @@
|
||||
if(10)
|
||||
usr << text("\blue <B>[] seems to have extreme electrical activity inside it!</B>", src.name)
|
||||
|
||||
print_flavor_text()
|
||||
usr << print_flavor_text()
|
||||
|
||||
return
|
||||
@@ -1,34 +1,247 @@
|
||||
/mob/living/carbon/monkey/examine()
|
||||
set src in oview()
|
||||
|
||||
usr << "\blue *---------*"
|
||||
usr << text("\blue This is \icon[] <B>[]</B>!", src, src.name)
|
||||
if(!usr || !src) return
|
||||
if(((usr.sdisabilities & 1) || usr.blinded || usr.stat) && !(istype(usr,/mob/dead/observer/)))
|
||||
usr << "<span class='notice'>Something is there but you can't see it.</span>"
|
||||
return
|
||||
|
||||
var/msg = "<span class='info'>*---------*\nThis is \icon[src] \a <EM>[src]</EM>!\n"
|
||||
|
||||
if (src.handcuffed)
|
||||
usr << text("\blue [] is handcuffed! \icon[]", src.name, src.handcuffed)
|
||||
msg += "It is \icon[src.handcuffed] handcuffed!\n"
|
||||
if (src.wear_mask)
|
||||
usr << text("\blue [] has a \icon[] [] on \his[] head!", src.name, src.wear_mask, src.wear_mask.name, src)
|
||||
msg += "It has \icon[src.wear_mask] \a [src.wear_mask] on its head.\n"
|
||||
if (src.l_hand)
|
||||
usr << text("\blue [] has a \icon[] [] in \his[] left hand!", src.name, src.l_hand, src.l_hand.name, src)
|
||||
msg += "It has \icon[src.l_hand] \a [src.l_hand] in its left hand.\n"
|
||||
if (src.r_hand)
|
||||
usr << text("\blue [] has a \icon[] [] in \his[] right hand!", src.name, src.r_hand, src.r_hand.name, src)
|
||||
msg += "It has \icon[src.r_hand] \a [src.r_hand] in its right hand.\n"
|
||||
if (src.back)
|
||||
usr << text("\blue [] has a \icon[] [] on \his[] back!", src.name, src.back, src.back.name, src)
|
||||
if (src.stat == 2)
|
||||
usr << text("\red [] is limp and unresponsive, a dull lifeless look in their eyes.", src.name)
|
||||
else
|
||||
if (src.getBruteLoss())
|
||||
if (src.getBruteLoss() < 30)
|
||||
usr << text("\red [] looks slightly bruised!", src.name)
|
||||
else
|
||||
usr << text("\red <B>[] looks severely bruised!</B>", src.name)
|
||||
if (src.getFireLoss())
|
||||
if (src.getFireLoss() < 30)
|
||||
usr << text("\red [] looks slightly burnt!", src.name)
|
||||
else
|
||||
usr << text("\red <B>[] looks severely burnt!</B>", src.name)
|
||||
if (src.stat == 1)
|
||||
usr << text("\red [] doesn't seem to be responding to anything around them, their eyes closed as though asleep.", src.name)
|
||||
msg += "It has \icon[src.back] \a [src.back] on its back.\n"
|
||||
if (src.stat == DEAD)
|
||||
msg += "<span class='deadsay'>It is limp and unresponsive, with no signs of life.</span>\n"
|
||||
|
||||
print_flavor_text()
|
||||
var/list/wound_descriptions = list()
|
||||
var/list/wound_flavor_text = list()
|
||||
for(var/named in organs)
|
||||
var/datum/organ/external/temp = organs[named]
|
||||
if(temp)
|
||||
if(temp.destroyed)
|
||||
wound_flavor_text["[temp.display_name]"] = "<span class='warning'><b>It is missing its [temp.display_name].</b></span>\n"
|
||||
continue
|
||||
if(temp.wounds)
|
||||
var/list/wounds = list(list(),list(),list(),list(),list(),list())
|
||||
for(var/datum/organ/wound/w in temp.wounds)
|
||||
switch(w.healing_state)
|
||||
if(0)
|
||||
var/list/cut = wounds[1]
|
||||
cut += w
|
||||
wounds[1] = cut
|
||||
if(1)
|
||||
var/list/cut = wounds[2]
|
||||
cut += w
|
||||
wounds[2] = cut
|
||||
if(2)
|
||||
var/list/cut = wounds[3]
|
||||
cut += w
|
||||
wounds[3] = cut
|
||||
if(3)
|
||||
var/list/cut = wounds[4]
|
||||
cut += w
|
||||
wounds[4] = cut
|
||||
if(4)
|
||||
var/list/cut = wounds[5]
|
||||
cut += w
|
||||
wounds[5] = cut
|
||||
if(5)
|
||||
var/list/cut = wounds[6]
|
||||
cut += w
|
||||
wounds[6] = cut
|
||||
wound_descriptions["[temp.display_name]"] = wounds
|
||||
else
|
||||
wound_flavor_text["[temp.display_name]"] = ""
|
||||
//Now that we have a big list of all the wounds, on all the limbs.
|
||||
var/list/is_bleeding = list()
|
||||
for(var/named in wound_descriptions)
|
||||
var/list/wound_states = wound_descriptions[named]
|
||||
var/list/flavor_text = list()
|
||||
for(var/i = 1, i <= 6, i++)
|
||||
var/list/wound_state = wound_states[i] //All wounds at this level of healing.
|
||||
var/list/tally = list("cut" = 0, "deep cut" = 0, "flesh wound" = 0, "gaping wound" = 0, "big gaping wound" = 0, "massive wound" = 0,\
|
||||
"tiny bruise" = 0, "small bruise" = 0, "moderate bruise" = 0, "large bruise" = 0, "huge bruise" = 0, "monumental bruise" = 0,\
|
||||
"small burn" = 0, "moderate burn" = 0, "large burn" = 0, "severe burn" = 0, "deep burn" = 0, "carbonised area" = 0) //How many wounds of what size.
|
||||
for(var/datum/organ/wound/w in wound_state)
|
||||
if(w.bleeding && !is_bleeding[named]) is_bleeding[named] = 1
|
||||
switch(w.wound_size)
|
||||
if(1)
|
||||
switch(w.wound_type)
|
||||
if(0)
|
||||
tally["cut"] += 1
|
||||
if(1)
|
||||
tally["tiny bruise"] += 1
|
||||
if(2)
|
||||
tally["small burn"] += 1
|
||||
if(2)
|
||||
switch(w.wound_type)
|
||||
if(0)
|
||||
tally["deep cut"] += 1
|
||||
if(1)
|
||||
tally["small bruise"] += 1
|
||||
if(2)
|
||||
tally["moderate burn"] += 1
|
||||
if(3)
|
||||
switch(w.wound_type)
|
||||
if(0)
|
||||
tally["flesh wound"] += 1
|
||||
if(1)
|
||||
tally["moderate bruise"] += 1
|
||||
if(2)
|
||||
tally["large burn"] += 1
|
||||
if(4)
|
||||
switch(w.wound_type)
|
||||
if(0)
|
||||
tally["gaping wound"] += 1
|
||||
if(1)
|
||||
tally["large bruise"] += 1
|
||||
if(2)
|
||||
tally["severe burn"] += 1
|
||||
if(5)
|
||||
switch(w.wound_type)
|
||||
if(0)
|
||||
tally["big gaping wound"] += 1
|
||||
if(1)
|
||||
tally["huge bruise"] += 1
|
||||
if(2)
|
||||
tally["deep burn"] += 1
|
||||
if(6)
|
||||
switch(w.wound_type)
|
||||
if(0)
|
||||
tally["massive wound"] += 1
|
||||
if(1)
|
||||
tally["monumental bruise"] += 1
|
||||
if(2)
|
||||
tally["carbonised area"] += 1
|
||||
for(var/tallied in tally)
|
||||
if(!tally[tallied])
|
||||
continue
|
||||
//if(flavor_text_string && tally[tallied])
|
||||
// for(
|
||||
// flavor_text_string += pick(list(", as well as", ", in addition to")) //add more later.
|
||||
var/tallied_rename = list("cut" = "cut","deep cut" = "deep cut", "flesh wound" = "flesh wound",\
|
||||
"gaping wound" = "gaping wound", "big gaping wound" = "big gaping wound", "massive wound" = "massive wound",\
|
||||
"tiny bruise" = "tiny bruise", "small bruise" = "small bruise", "moderate bruise" = "moderate bruise",\
|
||||
"large bruise" = "large bruise", "huge bruise" = "huge bruise", "monumental bruise" = "monumental bruise",\
|
||||
"small burn" = "small burn", "moderate burn" = "moderate burn", "large burn" = "large burn",\
|
||||
"severe burn" = "severe burn", "deep burn" = "deep burn", "carbonised area" = "carbonised area")
|
||||
switch(i)
|
||||
if(2) //Healing wounds.
|
||||
if(tallied in list("cut","small burn"))
|
||||
continue
|
||||
tallied_rename = list("deep cut" = "clotted cut", "flesh wound" = "small bandaged wound",\
|
||||
"gaping wound" = "bandaged wound", "big gaping wound" = "gauze wrapped wound",\
|
||||
"massive wound" = "massive blood soaked bandage", "tiny bruise" = "tiny bruise", "small bruise" = "small bruise",\
|
||||
"moderate bruise" = "moderate bruise", "large bruise" = "large bruise",\
|
||||
"huge bruise" = "huge bruise", "monumental bruise" = "monumental bruise",\
|
||||
"moderate burn" = "moderate salved burn", "large burn" = "large salved burn",\
|
||||
"severe burn" = "severe salved burn", "deep burn" = "deep salved burn",\
|
||||
"carbonised area" = "treated carbonised area")
|
||||
if(3)
|
||||
if(tallied in list("cut","tiny bruise","small burn"))
|
||||
continue
|
||||
tallied_rename = list("deep cut" = "fading cut", "flesh wound" = "small healing wound",\
|
||||
"gaping wound" = "healing wound", "big gaping wound" = "big healing wound",\
|
||||
"massive wound" = "massive healing wound", "small bruise" = "tiny bruise",\
|
||||
"moderate bruise" = "small bruise", "large bruise" = "moderate bruise",\
|
||||
"huge bruise" = "large bruise", "monumental bruise" = "huge bruise",\
|
||||
"moderate burn" = "healing moderate burn", "large burn" = "healing large burn",\
|
||||
"severe burn" = "healing severe burn", "deep burn" = "healing deep burn",\
|
||||
"carbonised area" = "slowly healing carbonised area")
|
||||
if(4)
|
||||
if(tallied in list("cut","deep cut","tiny bruise", "small bruise","small burn", "moderate burn"))
|
||||
continue
|
||||
tallied_rename = list("flesh wound" = "small red scar", "gaping wound" = "angry straight scar",\
|
||||
"big gaping wound" = "jagged angry scar", "massive wound" = "gigantic angry scar",\
|
||||
"moderate bruise" = "tiny bruise", "large bruise" = "small bruise",\
|
||||
"huge bruise" = "moderate bruise", "monumental bruise" = "large bruise",\
|
||||
"large burn" = "large burn scar", "severe burn" = "severe burn scar",\
|
||||
"deep burn" = "deep burn scar", "carbonised area" = "healing carbonised area")
|
||||
if(5)
|
||||
if(tallied in list("cut","deep cut","tiny bruise", "moderate bruise", "small bruise","small burn", "moderate burn"))
|
||||
continue
|
||||
tallied_rename = list("flesh wound" = "small scar", "gaping wound" = "straight scar",\
|
||||
"big gaping wound" = "jagged scar", "massive wound" = "gigantic scar",\
|
||||
"large bruise" = "tiny bruise",\
|
||||
"huge bruise" = "small bruise", "monumental bruise" = "moderate bruise",\
|
||||
"large burn" = "large burn scar", "severe burn" = "severe burn scar",\
|
||||
"deep burn" = "deep burn scar", "carbonised area" = "large scarred area")
|
||||
if(6)
|
||||
if(tallied in list("cut","deep cut","flesh wound","tiny bruise", "small bruise", "moderate bruise", "large bruise", "huge bruise","small burn", "moderate burn"))
|
||||
continue
|
||||
tallied_rename = list("gaping wound" = "straight scar",\
|
||||
"big gaping wound" = "jagged scar", "massive wound" = "gigantic scar",\
|
||||
"monumental bruise" = "tiny bruise",\
|
||||
"large burn" = "large burn scar", "severe burn" = "severe burn scar",\
|
||||
"deep burn" = "deep burn scar", "carbonised area" = "large scarred area")
|
||||
var/list/no_exclude = list("gaping wound", "big gaping wound", "massive wound", "large bruise",\
|
||||
"huge bruise", "massive bruise", "severe burn", "large burn", "deep burn", "carbonised area")
|
||||
switch(tally[tallied])
|
||||
if(1)
|
||||
if(!flavor_text.len)
|
||||
flavor_text += "<span class='warning'>\The [src] has[prob(4) && !(tallied in no_exclude) ? " what might be" : ""] a [tallied_rename[tallied]]"
|
||||
else
|
||||
flavor_text += "[prob(4) && !(tallied in no_exclude) ? " what might be" : ""] a [tallied_rename[tallied]]"
|
||||
if(2)
|
||||
if(!flavor_text.len)
|
||||
flavor_text += "<span class='warning'>\The [src] has[prob(4) && !(tallied in no_exclude) ? " what might be" : ""] a pair of [tallied_rename[tallied]]s"
|
||||
else
|
||||
flavor_text += "[prob(4) && !(tallied in no_exclude) ? " what might be" : ""] a pair of [tallied_rename[tallied]]s"
|
||||
if(3 to 5)
|
||||
if(!flavor_text.len)
|
||||
flavor_text += "<span class='warning'>\The [src] has several [tallied_rename[tallied]]s"
|
||||
else
|
||||
flavor_text += " several [tallied_rename[tallied]]s"
|
||||
if(6 to INFINITY)
|
||||
if(!flavor_text.len)
|
||||
flavor_text += "<span class='warning'>\The [src] has a bunch of [tallied_rename[tallied]]s"
|
||||
else
|
||||
flavor_text += " a ton of [tallied_rename[tallied]]s"
|
||||
if(flavor_text.len)
|
||||
var/flavor_text_string = ""
|
||||
for(var/text = 1, text <= flavor_text.len, text++)
|
||||
if(text == flavor_text.len && flavor_text.len > 1)
|
||||
flavor_text_string += ", and"
|
||||
else if(flavor_text.len > 1 && text > 1)
|
||||
flavor_text_string += ","
|
||||
flavor_text_string += flavor_text[text]
|
||||
flavor_text_string += " on its [named].</span><br>"
|
||||
wound_flavor_text["[named]"] = flavor_text_string
|
||||
if(wound_flavor_text["head"])
|
||||
msg += wound_flavor_text["head"]
|
||||
if(wound_flavor_text["chest"])
|
||||
msg += wound_flavor_text["chest"]
|
||||
if(wound_flavor_text["left arm"])
|
||||
msg += wound_flavor_text["left arm"]
|
||||
if(wound_flavor_text["left hand"])
|
||||
msg += wound_flavor_text["left hand"]
|
||||
if(wound_flavor_text["right arm"])
|
||||
msg += wound_flavor_text["right arm"]
|
||||
if(wound_flavor_text["right hand"])
|
||||
msg += wound_flavor_text["right hand"]
|
||||
if(wound_flavor_text["groin"])
|
||||
msg += wound_flavor_text["groin"]
|
||||
if(wound_flavor_text["left leg"])
|
||||
msg += wound_flavor_text["left leg"]
|
||||
if(wound_flavor_text["left foot"])
|
||||
msg += wound_flavor_text["left foot"]
|
||||
if(wound_flavor_text["right leg"])
|
||||
msg += wound_flavor_text["right leg"]
|
||||
if(wound_flavor_text["right foot"])
|
||||
msg += wound_flavor_text["right foot"]
|
||||
|
||||
|
||||
msg += print_flavor_text()
|
||||
|
||||
msg += "*---------*</span>"
|
||||
|
||||
usr << msg
|
||||
return
|
||||
@@ -3,8 +3,8 @@
|
||||
voice_name = "monkey"
|
||||
voice_message = "chimpers"
|
||||
say_message = "chimpers"
|
||||
icon = 'monkey.dmi'
|
||||
icon_state = "monkey1"
|
||||
icon = 'mob.dmi'
|
||||
icon_state = "m-none"
|
||||
gender = NEUTER
|
||||
pass_flags = PASSTABLE
|
||||
|
||||
@@ -418,6 +418,28 @@
|
||||
return //TODO: DEFERRED
|
||||
|
||||
handle_regular_status_updates()
|
||||
var/leg_tally = 2
|
||||
for(var/name in organs)
|
||||
var/datum/organ/external/E = organs[name]
|
||||
E.process()
|
||||
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
|
||||
|
||||
health = 100 - (getOxyLoss() + getToxLoss() + getFireLoss() + getBruteLoss() + getCloneLoss())
|
||||
|
||||
|
||||
@@ -2,6 +2,10 @@
|
||||
var/datum/reagents/R = new/datum/reagents(1000)
|
||||
reagents = R
|
||||
R.my_atom = src
|
||||
if(name == "monkey")
|
||||
name = text("monkey ([rand(1, 1000)])")
|
||||
real_name = name
|
||||
|
||||
if (!(dna))
|
||||
if(gender == NEUTER)
|
||||
gender = pick(MALE, FEMALE)
|
||||
@@ -18,55 +22,35 @@
|
||||
dna.uni_identity += gendervar
|
||||
dna.uni_identity += "12C"
|
||||
dna.uni_identity += "4E2"
|
||||
dna.b_type = "A+"
|
||||
dna.original_name = real_name
|
||||
|
||||
if(name == "monkey")
|
||||
name = text("monkey ([rand(1, 1000)])")
|
||||
real_name = name
|
||||
var/datum/organ/external/chest/chest = new /datum/organ/external/chest( src )
|
||||
chest.owner = src
|
||||
organs2 += chest
|
||||
var/datum/organ/external/groin/groin = new /datum/organ/external/groin( src )
|
||||
groin.owner = src
|
||||
organs2 += groin
|
||||
var/datum/organ/external/head/head = new /datum/organ/external/head( src )
|
||||
head.owner = src
|
||||
organs2 += head
|
||||
var/datum/organ/external/l_arm/l_arm = new /datum/organ/external/l_arm( src )
|
||||
l_arm.owner = src
|
||||
organs2 += l_arm
|
||||
var/datum/organ/external/r_arm/r_arm = new /datum/organ/external/r_arm( src )
|
||||
r_arm.owner = src
|
||||
organs2 += r_arm
|
||||
var/datum/organ/external/l_hand/l_hand = new /datum/organ/external/l_hand( src )
|
||||
l_hand.owner = src
|
||||
organs2 += l_hand
|
||||
var/datum/organ/external/r_hand/r_hand = new /datum/organ/external/r_hand( src )
|
||||
r_hand.owner = src
|
||||
organs2 += r_hand
|
||||
var/datum/organ/external/l_leg/l_leg = new /datum/organ/external/l_leg( src )
|
||||
l_leg.owner = src
|
||||
organs2 += l_leg
|
||||
var/datum/organ/external/r_leg/r_leg = new /datum/organ/external/r_leg( src )
|
||||
r_leg.owner = src
|
||||
organs2 += r_leg
|
||||
var/datum/organ/external/l_foot/l_foot = new /datum/organ/external/l_foot( src )
|
||||
l_foot.owner = src
|
||||
organs2 += l_foot
|
||||
var/datum/organ/external/r_foot/r_foot = new /datum/organ/external/r_foot( src )
|
||||
r_foot.owner = src
|
||||
organs2 += r_foot
|
||||
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)
|
||||
|
||||
var/datum/organ/external/part = new /datum/organ/external/l_hand(src)
|
||||
part.parent = organs["l_arm"]
|
||||
part = new /datum/organ/external/l_foot(src)
|
||||
part.parent = organs["l_leg"]
|
||||
part = new /datum/organ/external/r_hand(src)
|
||||
part.parent = organs["r_arm"]
|
||||
part = new /datum/organ/external/r_foot(src)
|
||||
part.parent = organs["r_leg"]
|
||||
|
||||
spawn (1)
|
||||
if(!stand_icon)
|
||||
stand_icon = new /icon('monkey.dmi', "monkey1")
|
||||
if(!lying_icon)
|
||||
lying_icon = new /icon('monkey.dmi', "monkey0")
|
||||
icon = stand_icon
|
||||
update_clothing()
|
||||
src << "\blue Your icons have been generated!"
|
||||
|
||||
organs["chest"] = chest
|
||||
organs["groin"] = groin
|
||||
organs["head"] = head
|
||||
organs["l_arm"] = l_arm
|
||||
organs["r_arm"] = r_arm
|
||||
organs["l_hand"] = l_hand
|
||||
organs["r_hand"] = r_hand
|
||||
organs["l_leg"] = l_leg
|
||||
organs["r_leg"] = r_leg
|
||||
organs["l_foot"] = l_foot
|
||||
organs["r_foot"] = r_foot
|
||||
..()
|
||||
return
|
||||
|
||||
@@ -461,6 +445,10 @@
|
||||
stat("Genetic Damage Time", changeling.geneticdamage)
|
||||
return
|
||||
|
||||
|
||||
|
||||
/mob/living/carbon/monkey/var/icon/stand_icon = null
|
||||
/mob/living/carbon/monkey/var/icon/lying_icon = null
|
||||
/mob/living/carbon/monkey/update_clothing()
|
||||
if(buckled)
|
||||
if(istype(buckled, /obj/structure/stool/bed/chair))
|
||||
@@ -468,14 +456,18 @@
|
||||
else
|
||||
lying = 1
|
||||
|
||||
if(!stand_icon || !lying_icon)
|
||||
update_body()
|
||||
|
||||
if(update_icon) // Skie
|
||||
..()
|
||||
overlays = null
|
||||
|
||||
if (!( lying ))
|
||||
icon_state = "monkey1"
|
||||
else
|
||||
icon_state = "monkey0"
|
||||
if (lying)
|
||||
icon = lying_icon
|
||||
|
||||
else
|
||||
icon = stand_icon
|
||||
|
||||
if(client && client.admin_invis)
|
||||
invisibility = 100
|
||||
@@ -549,6 +541,31 @@
|
||||
return
|
||||
return
|
||||
|
||||
/mob/living/carbon/monkey/proc/update_body()
|
||||
|
||||
stand_icon = new /icon('monkey.dmi', "torso_s")
|
||||
lying_icon = new /icon('monkey.dmi', "torso_l")
|
||||
|
||||
stand_icon.Blend(new /icon('monkey.dmi', "chest_s"), ICON_OVERLAY)
|
||||
lying_icon.Blend(new /icon('monkey.dmi', "chest_l"), ICON_OVERLAY)
|
||||
|
||||
var/datum/organ/external/head = organs["head"]
|
||||
if(!head.destroyed)
|
||||
stand_icon.Blend(new /icon('monkey.dmi', "head_s"), ICON_OVERLAY)
|
||||
lying_icon.Blend(new /icon('monkey.dmi', "head_l"), ICON_OVERLAY)
|
||||
|
||||
for(var/name in organs)
|
||||
var/datum/organ/external/part = organs[name]
|
||||
if(!istype(part, /datum/organ/external/groin) \
|
||||
&& !istype(part, /datum/organ/external/chest) \
|
||||
&& !istype(part, /datum/organ/external/head) \
|
||||
&& !part.destroyed)
|
||||
stand_icon.Blend(new /icon('monkey.dmi', "[part.icon_name]_s"), ICON_OVERLAY)
|
||||
lying_icon.Blend(new /icon('monkey.dmi', "[part.icon_name]_l"), ICON_OVERLAY)
|
||||
|
||||
stand_icon.Blend(new /icon('monkey.dmi', "groin_s"), ICON_OVERLAY)
|
||||
lying_icon.Blend(new /icon('monkey.dmi', "groin_l"), ICON_OVERLAY)
|
||||
|
||||
/mob/living/carbon/monkey/Move()
|
||||
if ((!( buckled ) || buckled.loc != loc))
|
||||
buckled = null
|
||||
@@ -838,3 +855,135 @@
|
||||
if(!ticker.mode.name == "monkey") return 0
|
||||
return 1
|
||||
|
||||
/mob/living/carbon/monkey/apply_damage(var/damage = 0,var/damagetype = BRUTE, var/def_zone = null, var/blocked = 0, var/sharp = 0, var/used_weapon = null)
|
||||
if((damagetype != BRUTE) && (damagetype != BURN))
|
||||
..(damage, damagetype, def_zone, blocked)
|
||||
return 1
|
||||
|
||||
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)
|
||||
organ = get_organ(check_zone(def_zone))
|
||||
if(!organ || organ.destroyed) return 0
|
||||
if(blocked)
|
||||
damage = (damage/(blocked+1))
|
||||
|
||||
switch(damagetype)
|
||||
if(BRUTE)
|
||||
organ.take_damage(damage, 0, sharp, used_weapon)
|
||||
if(BURN)
|
||||
organ.take_damage(0, damage, sharp, used_weapon)
|
||||
|
||||
if(used_weapon)
|
||||
organ.add_wound(used_weapon, damage)
|
||||
|
||||
UpdateDamageIcon()
|
||||
updatehealth()
|
||||
update_clothing()
|
||||
return 1
|
||||
|
||||
/*/mob/living/carbon/monkey/UpdateDamageIcon()
|
||||
del(body_standing)
|
||||
body_standing = list()
|
||||
del(body_lying)
|
||||
body_lying = list()
|
||||
|
||||
for(var/name in organs)
|
||||
var/datum/organ/external/O = organs[name]
|
||||
if(!O.destroyed)
|
||||
O.update_icon()
|
||||
var/icon/DI = new /icon('dam_human.dmi', O.damage_state) // the damage icon for whole human
|
||||
DI.Blend(new /icon('dam_mask.dmi', O.icon_name), ICON_MULTIPLY) // mask with this organ's pixels
|
||||
// world << "[O.icon_name] [O.damage_state] \icon[DI]"
|
||||
body_standing += DI
|
||||
DI = new /icon('dam_human.dmi', "[O.damage_state]-2") // repeat for lying icons
|
||||
DI.Blend(new /icon('dam_mask.dmi', "[O.icon_name]2"), ICON_MULTIPLY)
|
||||
// world << "[O.r_name]2 [O.d_i_state]-2 \icon[DI]"
|
||||
body_lying += DI*/
|
||||
|
||||
/mob/living/carbon/monkey/proc/HealDamage(zone, brute, burn)
|
||||
var/datum/organ/external/E = get_organ(zone)
|
||||
if(istype(E, /datum/organ/external))
|
||||
if (E.heal_damage(brute, burn))
|
||||
UpdateDamageIcon()
|
||||
else
|
||||
return 0
|
||||
return
|
||||
|
||||
/mob/living/carbon/monkey/proc/get_damaged_organs(var/brute, var/burn)
|
||||
var/list/datum/organ/external/parts = list()
|
||||
for(var/name in organs)
|
||||
var/datum/organ/external/organ = organs[name]
|
||||
if((brute && organ.brute_dam) || (burn && organ.burn_dam))
|
||||
parts += organ
|
||||
return parts
|
||||
|
||||
/mob/living/carbon/monkey/proc/get_damageable_organs()
|
||||
var/list/datum/organ/external/parts = list()
|
||||
for(var/name in organs)
|
||||
var/datum/organ/external/organ = organs[name]
|
||||
if(organ.brute_dam + organ.burn_dam < organ.max_damage)
|
||||
parts += organ
|
||||
return parts
|
||||
|
||||
// heal ONE external organ, organ gets randomly selected from damaged ones.
|
||||
/mob/living/carbon/monkey/heal_organ_damage(var/brute, var/burn)
|
||||
var/list/datum/organ/external/parts = get_damaged_organs(brute,burn)
|
||||
if(!parts.len)
|
||||
return
|
||||
var/datum/organ/external/picked = pick(parts)
|
||||
picked.heal_damage(brute,burn)
|
||||
updatehealth()
|
||||
UpdateDamageIcon()
|
||||
|
||||
// damage ONE external organ, organ gets randomly selected from damaged ones.
|
||||
/mob/living/carbon/monkey/take_organ_damage(var/brute, var/burn)
|
||||
var/list/datum/organ/external/parts = get_damageable_organs()
|
||||
if(!parts.len)
|
||||
return
|
||||
var/datum/organ/external/picked = pick(parts)
|
||||
picked.take_damage(brute,burn)
|
||||
updatehealth()
|
||||
UpdateDamageIcon()
|
||||
|
||||
// heal MANY external organs, in random order
|
||||
/mob/living/carbon/monkey/heal_overall_damage(var/brute, var/burn)
|
||||
var/list/datum/organ/external/parts = get_damaged_organs(brute,burn)
|
||||
|
||||
while(parts.len && (brute>0 || burn>0) )
|
||||
var/datum/organ/external/picked = pick(parts)
|
||||
|
||||
var/brute_was = picked.brute_dam
|
||||
var/burn_was = picked.burn_dam
|
||||
|
||||
picked.heal_damage(brute,burn)
|
||||
|
||||
brute -= (brute_was-picked.brute_dam)
|
||||
burn -= (burn_was-picked.burn_dam)
|
||||
|
||||
parts -= picked
|
||||
updatehealth()
|
||||
UpdateDamageIcon()
|
||||
|
||||
// damage MANY external organs, in random order
|
||||
/mob/living/carbon/monkey/take_overall_damage(var/brute, var/burn, var/used_weapon = null)
|
||||
var/list/datum/organ/external/parts = get_damageable_organs()
|
||||
|
||||
while(parts.len && (brute>0 || burn>0) )
|
||||
var/datum/organ/external/picked = pick(parts)
|
||||
|
||||
var/brute_was = picked.brute_dam
|
||||
var/burn_was = picked.burn_dam
|
||||
|
||||
picked.take_damage(brute,burn, 0, used_weapon)
|
||||
|
||||
brute -= (picked.brute_dam-brute_was)
|
||||
burn -= (picked.burn_dam-burn_was)
|
||||
|
||||
parts -= picked
|
||||
updatehealth()
|
||||
UpdateDamageIcon()
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
Returns
|
||||
standard 0 if fail
|
||||
*/
|
||||
/mob/living/proc/apply_damage(var/damage = 0,var/damagetype = BRUTE, var/def_zone = null, var/blocked = 0, var/slash = 0, var/used_weapon = null)
|
||||
/mob/living/proc/apply_damage(var/damage = 0,var/damagetype = BRUTE, var/def_zone = null, var/blocked = 0, var/sharp = 0, var/used_weapon = null)
|
||||
if(!damage || (blocked >= 2)) return 0
|
||||
switch(damagetype)
|
||||
if(BRUTE)
|
||||
@@ -39,7 +39,7 @@
|
||||
|
||||
|
||||
/mob/living/proc/apply_effect(var/effect = 0,var/effecttype = STUN, var/blocked = 0)
|
||||
if(!effect || (blocked >= 2)) return 0
|
||||
if(!effect || (blocked)) return 0
|
||||
switch(effecttype)
|
||||
if(STUN)
|
||||
Stun((effect - (min(effect*getarmor(null, "laser"), effect*(0.75 + (blocked*0.05))))))
|
||||
@@ -76,4 +76,4 @@
|
||||
|
||||
|
||||
/mob/living/proc/react_to_attack(mob/M)
|
||||
return
|
||||
return
|
||||
|
||||
@@ -19,6 +19,6 @@
|
||||
if (src.stat == 1)
|
||||
usr << text("\red [] doesn't seem to be responding.", src.name)
|
||||
|
||||
print_flavor_text()
|
||||
usr << print_flavor_text()
|
||||
|
||||
return
|
||||
@@ -19,6 +19,6 @@
|
||||
if (src.stat == 1)
|
||||
usr << text("\red [] doesn't seem to be responding.", src.name)
|
||||
|
||||
print_flavor_text()
|
||||
usr << print_flavor_text()
|
||||
|
||||
return
|
||||
@@ -22,6 +22,6 @@
|
||||
else
|
||||
usr << "The cover is closed."
|
||||
|
||||
print_flavor_text()
|
||||
usr << print_flavor_text()
|
||||
|
||||
return
|
||||
+22
-20
@@ -290,9 +290,9 @@
|
||||
|
||||
//Attemps to remove an object on a mob. Will not move it to another area or such, just removes from the mob.
|
||||
/mob/proc/remove_from_mob(var/obj/O)
|
||||
src.u_equip(O)
|
||||
if (src.client)
|
||||
src.client.screen -= O
|
||||
u_equip(O)
|
||||
if (client)
|
||||
client.screen -= O
|
||||
O.layer = initial(O.layer)
|
||||
O.screen_loc = null
|
||||
return 1
|
||||
@@ -398,10 +398,10 @@
|
||||
msg = copytext(msg, 1, MAX_MESSAGE_LEN)
|
||||
msg = html_encode(msg)
|
||||
|
||||
src.flavor_text = msg
|
||||
flavor_text = msg
|
||||
|
||||
/mob/proc/warn_flavor_changed()
|
||||
if(src.flavor_text && src.flavor_text != "") // don't spam people that don't use it!
|
||||
if(flavor_text && flavor_text != "") // don't spam people that don't use it!
|
||||
src << "<h2 class='alert'>OOC Warning:</h2>"
|
||||
src << "<span class='alert'>Your flavor text is likely out of date! <a href='byond://?src=\ref[src];flavor_change=1'>Change</a></span>"
|
||||
|
||||
@@ -409,9 +409,9 @@
|
||||
if (flavor_text && flavor_text != "")
|
||||
var/msg = dd_replacetext(flavor_text, "\n", " ")
|
||||
if(lentext(msg) <= 40)
|
||||
usr << "\blue [msg]"
|
||||
return "\blue [msg]"
|
||||
else
|
||||
usr << "\blue [copytext(msg, 1, 37)]... <a href='byond://?src=\ref[src];flavor_more=1'>More...</a>"
|
||||
return "\blue [copytext(msg, 1, 37)]... <a href='byond://?src=\ref[src];flavor_more=1'>More...</a>"
|
||||
|
||||
|
||||
/*
|
||||
@@ -610,7 +610,7 @@
|
||||
src << browse(null, t1)
|
||||
|
||||
if(href_list["teleto"])
|
||||
src.client.jumptoturf(locate(href_list["teleto"]))
|
||||
client.jumptoturf(locate(href_list["teleto"]))
|
||||
|
||||
if(href_list["priv_msg"])
|
||||
var/mob/M = locate(href_list["priv_msg"])
|
||||
@@ -648,8 +648,8 @@
|
||||
if(K.client && K.client.holder && K.key != usr.key && K.key != M.key)
|
||||
K << "<b><font color='blue'>PM: [key_name(usr, K)]->[key_name(M, K)]:</b> \blue [t]</font>"
|
||||
if(href_list["flavor_more"])
|
||||
usr << browse(text("<HTML><HEAD><TITLE>[]</TITLE></HEAD><BODY><TT>[]</TT></BODY></HTML>", src.name, dd_replacetext(src.flavor_text, "\n", "<BR>")), text("window=[];size=500x200", src.name))
|
||||
onclose(usr, "[src.name]")
|
||||
usr << browse(text("<HTML><HEAD><TITLE>[]</TITLE></HEAD><BODY><TT>[]</TT></BODY></HTML>", name, dd_replacetext(flavor_text, "\n", "<BR>")), text("window=[];size=500x200", name))
|
||||
onclose(usr, "[name]")
|
||||
if(href_list["flavor_change"])
|
||||
update_flavor_text()
|
||||
..()
|
||||
@@ -659,9 +659,9 @@
|
||||
return health
|
||||
|
||||
/mob/proc/UpdateLuminosity()
|
||||
if(src.total_luminosity == src.last_luminosity) return 0//nothing to do here
|
||||
src.last_luminosity = src.total_luminosity
|
||||
sd_SetLuminosity(min(src.total_luminosity,7))//Current hardcode max at 7, should likely be a const somewhere else
|
||||
if(total_luminosity == last_luminosity) return 0//nothing to do here
|
||||
last_luminosity = total_luminosity
|
||||
sd_SetLuminosity(min(total_luminosity,7))//Current hardcode max at 7, should likely be a const somewhere else
|
||||
return 1
|
||||
|
||||
/mob/MouseDrop(mob/M as mob)
|
||||
@@ -722,7 +722,7 @@
|
||||
del(src)
|
||||
*/
|
||||
|
||||
if(IsGuestKey(src.key))
|
||||
if(IsGuestKey(key))
|
||||
alert(src,"Baystation12 doesn't allow guest accounts to play. Please go to http://www.byond.com/ and register for a key.","Guest","OK")
|
||||
del(src)
|
||||
|
||||
@@ -778,7 +778,7 @@
|
||||
|
||||
//This is the proc for gibbing a mob. Cannot gib ghosts. Removed the medal reference,
|
||||
//added different sort of gibs and animations. N
|
||||
/mob/proc/gib()
|
||||
/mob/proc/gib(var/ex_act = 0)
|
||||
|
||||
if (istype(src, /mob/dead/observer))
|
||||
gibs(loc, viruses)
|
||||
@@ -837,8 +837,10 @@ Currently doesn't work, but should be useful later or at least as a template
|
||||
else
|
||||
gibs(loc, viruses, dna)
|
||||
sleep(15)
|
||||
for(var/obj/item/I in src.contents)
|
||||
for(var/obj/item/I in contents)
|
||||
I.loc = get_turf(src)
|
||||
if(ex_act)
|
||||
I.ex_act(ex_act)
|
||||
del(src)
|
||||
|
||||
/*
|
||||
@@ -874,7 +876,7 @@ Dusting robots does not eject the MMI, so it's a bit more powerful than gib() /N
|
||||
sleep(15)
|
||||
if(isrobot(src)&&src:mmi)//Is a robot and it has an mmi.
|
||||
del(src:mmi)//Delete the MMI first so that it won't go popping out.
|
||||
for(var/obj/item/I in src.contents)
|
||||
for(var/obj/item/I in contents)
|
||||
I.loc = get_turf(src)
|
||||
del(src)
|
||||
|
||||
@@ -1009,17 +1011,17 @@ note dizziness decrements automatically in the mob's Life() proc.
|
||||
boom.icon_state = "loss_general"
|
||||
#elif
|
||||
/client/proc/station_explosion_cinematic(var/derp)
|
||||
if(!src.mob)
|
||||
if(!mob)
|
||||
return
|
||||
|
||||
var/mob/M = src.mob
|
||||
var/mob/M = mob
|
||||
M.loc = null // HACK, but whatever, this works
|
||||
|
||||
if(!M.hud_used)
|
||||
return
|
||||
|
||||
var/obj/screen/boom = M.hud_used.station_explosion
|
||||
src.screen += boom
|
||||
screen += boom
|
||||
if(ticker)
|
||||
switch(ticker.mode.name)
|
||||
if("nuclear emergency")
|
||||
|
||||
@@ -280,7 +280,6 @@ the mob is also allowed to move without any sort of restriction. For instance, i
|
||||
|
||||
// var/obj/effect/organstructure/organStructure = null //for dem organs
|
||||
var/list/organs = list( ) //List of organs.
|
||||
var/list/organs2 = list()
|
||||
|
||||
//Singularity wants you!
|
||||
var/grav_delay = 0
|
||||
@@ -312,7 +311,7 @@ the mob is also allowed to move without any sort of restriction. For instance, i
|
||||
//src.virus.cure(0)
|
||||
|
||||
var/datum/disease/v = new virus.type
|
||||
src.viruses += v
|
||||
viruses += v
|
||||
v.affected_mob = src
|
||||
v.strain_data = v.strain_data.Copy()
|
||||
v.holder = src
|
||||
@@ -320,7 +319,7 @@ the mob is also allowed to move without any sort of restriction. For instance, i
|
||||
v.carrier = 1
|
||||
return
|
||||
|
||||
//if(src.virus) //
|
||||
//if(virus) //
|
||||
//return //
|
||||
|
||||
|
||||
@@ -464,7 +463,7 @@ the mob is also allowed to move without any sort of restriction. For instance, i
|
||||
return
|
||||
else*/
|
||||
var/datum/disease/v = new virus.type
|
||||
src.viruses += v
|
||||
viruses += v
|
||||
v.affected_mob = src
|
||||
v.strain_data = v.strain_data.Copy()
|
||||
v.holder = src
|
||||
|
||||
@@ -110,6 +110,11 @@ 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
|
||||
|
||||
@@ -315,19 +320,19 @@ It's fairly easy to fix if dealing with single letters but not so much with comp
|
||||
|
||||
|
||||
/mob/proc/abiotic(var/full_body = 0)
|
||||
if(full_body && ((src.l_hand && !( src.l_hand.abstract )) || (src.r_hand && !( src.r_hand.abstract )) || (src.back || src.wear_mask)))
|
||||
if(full_body && ((l_hand && !( l_hand.abstract )) || (r_hand && !( r_hand.abstract )) || (back || wear_mask)))
|
||||
return 1
|
||||
|
||||
if((src.l_hand && !( src.l_hand.abstract )) || (src.r_hand && !( src.r_hand.abstract )))
|
||||
if((l_hand && !( l_hand.abstract )) || (r_hand && !( r_hand.abstract )))
|
||||
return 1
|
||||
|
||||
return 0
|
||||
|
||||
/mob/proc/abiotic2(var/full_body2 = 0)
|
||||
if(full_body2 && ((src.l_hand && !( src.l_hand.abstract )) || (src.r_hand && !( src.r_hand.abstract )) || (src.back || src.wear_mask)))
|
||||
if(full_body2 && ((l_hand && !( l_hand.abstract )) || (r_hand && !( r_hand.abstract )) || (back || wear_mask)))
|
||||
return 1
|
||||
|
||||
if((src.l_hand && !( src.l_hand.abstract )) || (src.r_hand && !( src.r_hand.abstract )))
|
||||
if((l_hand && !( l_hand.abstract )) || (r_hand && !( r_hand.abstract )))
|
||||
return 1
|
||||
|
||||
return 0
|
||||
|
||||
@@ -332,7 +332,7 @@
|
||||
for(var/turf/turf in oview(1,src))
|
||||
if(istype(turf,/turf/space))
|
||||
continue
|
||||
if(istype(turf,/turf/simulated/floor) && (src.flags & NOGRAV))
|
||||
if(istype(turf,/turf/simulated/floor) && (flags & NOGRAV))
|
||||
continue
|
||||
dense_object++
|
||||
break
|
||||
|
||||
@@ -65,7 +65,7 @@
|
||||
var/stage = 0
|
||||
var/wound = 0
|
||||
|
||||
New(mob/living/carbon/human/H)
|
||||
New(mob/living/carbon/H)
|
||||
..(H)
|
||||
if(!display_name)
|
||||
display_name = name
|
||||
@@ -95,7 +95,7 @@
|
||||
droplimb()
|
||||
return
|
||||
else if(prob(nux))
|
||||
createwound(max(1,min(6,round(brute/10) + rand(-1,1))),0,brute)
|
||||
createwound(max(1,min(6,round(brute/10) + rand(0,2))),0,brute)
|
||||
owner << "You feel something wet on your [display_name]"
|
||||
|
||||
if((brute_dam + burn_dam + brute + burn) < max_damage)
|
||||
@@ -104,10 +104,10 @@
|
||||
if(prob(brute) && brute > 20 && !sharp)
|
||||
createwound(rand(4,6),0,brute)
|
||||
else if(!sharp)
|
||||
createwound(max(1,min(6,round(brute/10) + rand(0,2))),1,brute)
|
||||
createwound(max(1,min(6,round(brute/10) + rand(1,3))),1,brute)
|
||||
if(burn)
|
||||
burn_dam += burn
|
||||
createwound(max(1,min(6,round(burn/10) + rand(-1,1))),2,burn)
|
||||
createwound(max(1,min(6,round(burn/10) + rand(0,2))),2,burn)
|
||||
else
|
||||
var/can_inflict = src.max_damage - (src.brute_dam + src.burn_dam)
|
||||
if(can_inflict)
|
||||
@@ -237,7 +237,7 @@
|
||||
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 = "broken" //Randomise in future
|
||||
wound = pick("broken","fracture","hairline fracture") //Randomise in future. Edit: Randomized. --SkyMarshal
|
||||
perma_injury = brute_dam
|
||||
return
|
||||
return
|
||||
@@ -277,111 +277,133 @@
|
||||
return 1
|
||||
return 0
|
||||
|
||||
proc/droplimb()
|
||||
proc/droplimb(var/override = 0)
|
||||
if(override)
|
||||
destroyed = 1
|
||||
if(destroyed)
|
||||
//owner.unlock_medal("Lost something?", 0, "Lose a limb.", "easy")
|
||||
|
||||
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.")
|
||||
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)
|
||||
var/obj/item/weapon/organ/head/H = new(owner.loc, owner)
|
||||
if(owner.gender == FEMALE)
|
||||
H.icon_state = "head_f_l"
|
||||
H.overlays += owner.face_lying
|
||||
H.transfer_identity(owner)
|
||||
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
|
||||
H.name = "[owner.name]'s head"
|
||||
|
||||
var/lol = pick(cardinal)
|
||||
step(H,lol)
|
||||
owner.update_face()
|
||||
owner.update_body()
|
||||
owner.death()
|
||||
if(ARM_RIGHT)
|
||||
var/obj/item/weapon/organ/r_arm/H = new(owner.loc, owner)
|
||||
H = new /obj/item/weapon/organ/r_arm(owner.loc, owner)
|
||||
if(ismonkey(owner))
|
||||
H.icon_state = "r_arm_l"
|
||||
if(owner:organs["r_hand"])
|
||||
var/datum/organ/external/S = owner:organs["r_hand"]
|
||||
if(!S.destroyed)
|
||||
S.droplimb()
|
||||
var/lol = pick(cardinal)
|
||||
step(H,lol)
|
||||
destroyed = 1
|
||||
S.droplimb(1)
|
||||
if(ARM_LEFT)
|
||||
var/obj/item/weapon/organ/l_arm/H = new(owner.loc, owner)
|
||||
H = new /obj/item/weapon/organ/l_arm(owner.loc, owner)
|
||||
if(ismonkey(owner))
|
||||
H.icon_state = "l_arm_l"
|
||||
if(owner:organs["l_hand"])
|
||||
var/datum/organ/external/S = owner:organs["l_hand"]
|
||||
if(!S.destroyed)
|
||||
S.droplimb()
|
||||
var/lol = pick(cardinal)
|
||||
step(H,lol)
|
||||
destroyed = 1
|
||||
S.droplimb(1)
|
||||
if(LEG_RIGHT)
|
||||
var/obj/item/weapon/organ/r_leg/H = new(owner.loc, owner)
|
||||
H = new /obj/item/weapon/organ/r_leg(owner.loc, owner)
|
||||
if(ismonkey(owner))
|
||||
H.icon_state = "r_leg_l"
|
||||
if(owner:organs["r_foot"])
|
||||
var/datum/organ/external/S = owner:organs["r_foot"]
|
||||
if(!S.destroyed)
|
||||
S.droplimb()
|
||||
var/lol = pick(cardinal)
|
||||
step(H,lol)
|
||||
destroyed = 1
|
||||
S.droplimb(1)
|
||||
if(LEG_LEFT)
|
||||
var/obj/item/weapon/organ/l_leg/H = new(owner.loc, owner)
|
||||
H = new /obj/item/weapon/organ/l_leg(owner.loc, owner)
|
||||
if(ismonkey(owner))
|
||||
H.icon_state = "l_leg_l"
|
||||
if(owner:organs["l_foot"])
|
||||
var/datum/organ/external/S = owner:organs["l_foot"]
|
||||
if(!S.destroyed)
|
||||
S.droplimb()
|
||||
var/lol = pick(cardinal)
|
||||
step(H,lol)
|
||||
destroyed = 1
|
||||
S.droplimb(1)
|
||||
if(HAND_RIGHT)
|
||||
var/obj/item/weapon/organ/r_hand/X = new(owner.loc, owner)
|
||||
var/lol2 = pick(cardinal)
|
||||
step(X,lol2)
|
||||
destroyed = 1
|
||||
H = new /obj/item/weapon/organ/r_hand(owner.loc, owner)
|
||||
if(ismonkey(owner))
|
||||
H.icon_state = "r_hand_l"
|
||||
if(HAND_LEFT)
|
||||
var/obj/item/weapon/organ/l_hand/X = new(owner.loc, owner)
|
||||
var/lol2 = pick(cardinal)
|
||||
step(X,lol2)
|
||||
destroyed = 1
|
||||
H = new /obj/item/weapon/organ/l_hand(owner.loc, owner)
|
||||
if(ismonkey(owner))
|
||||
H.icon_state = "l_hand_l"
|
||||
if(FOOT_RIGHT)
|
||||
var/obj/item/weapon/organ/r_foot/X = new(owner.loc, owner)
|
||||
var/lol2 = pick(cardinal)
|
||||
step(X,lol2)
|
||||
destroyed = 1
|
||||
H = new /obj/item/weapon/organ/r_foot/(owner.loc, owner)
|
||||
if(ismonkey(owner))
|
||||
H.icon_state = "r_foot_l"
|
||||
if(FOOT_LEFT)
|
||||
var/obj/item/weapon/organ/l_foot/X = new(owner.loc, owner)
|
||||
var/lol2 = pick(cardinal)
|
||||
step(X,lol2)
|
||||
destroyed = 1
|
||||
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
|
||||
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.")
|
||||
for(var/datum/organ/wound/W in wounds)
|
||||
W.update_health()
|
||||
del(W)
|
||||
del(wounds)
|
||||
src.owner.update_clothing()
|
||||
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.type == type && W.wound_size < 3 && size < 3 && !W.is_healing)
|
||||
possible_wounds += W
|
||||
if(ishuman(owner))
|
||||
var/datum/organ/wound/W = new(src)
|
||||
bleeding = !type //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()
|
||||
if(!possible_wounds.len || prob(25))
|
||||
var/datum/organ/wound/W = new(src)
|
||||
bleeding = !type //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
|
||||
spawn W.start_close() //Let small cuts close themselves.
|
||||
wounds += W
|
||||
var/datum/organ/wound/W = pick(possible_wounds)
|
||||
bleeding = !type //Sharp objects cause bleeding.
|
||||
W.bleeding = !type
|
||||
// owner:bloodloss += 10 * size
|
||||
W.damage += damage
|
||||
W.initial_dmg += damage
|
||||
W.wound_size = round(sqrt(size^2 + W.wound_size^2))
|
||||
if(type == 1)
|
||||
spawn W.become_scar()
|
||||
else
|
||||
spawn W.start_close() //Let small cuts close themselves.
|
||||
wounds += W
|
||||
|
||||
/datum/organ/wound
|
||||
name = "wound"
|
||||
|
||||
@@ -392,7 +392,6 @@ mob/proc
|
||||
m_intent = "walk"
|
||||
hud_used.move_intent.icon_state = "walking"
|
||||
while(targeted_by && T.client)
|
||||
sleep(1)
|
||||
if(last_move_intent > I.lock_time + 10 && !T.client.target_can_move) //If the target moved while targeted
|
||||
I.TargetActed(src)
|
||||
if(I.last_moved_mob == src) //If they were the last ones to move, give them more of a grace period, so that an automatic weapon can hold down a room better.
|
||||
@@ -411,6 +410,7 @@ mob/proc
|
||||
I.lock_time = world.time + 5
|
||||
I.lock_time = world.time + 5
|
||||
I.last_moved_mob = src
|
||||
sleep(1)
|
||||
|
||||
NotTargeted(var/obj/item/weapon/gun/I)
|
||||
if(!I.silenced)
|
||||
|
||||
@@ -58,13 +58,11 @@
|
||||
proc/check_fire(var/mob/living/target as mob, var/mob/living/user as mob) //Checks if you can hit them or not.
|
||||
if(!istype(target) || !istype(user))
|
||||
return 0
|
||||
var/obj/item/projectile/test/in_chamber = new /obj/item/projectile/test(get_turf(src)) //Making the test....
|
||||
var/turf/curloc = get_turf(user)
|
||||
var/turf/targloc = get_turf(target)
|
||||
in_chamber.yo = targloc.y - curloc.y
|
||||
in_chamber.xo = targloc.x - curloc.x
|
||||
var/obj/item/projectile/test/in_chamber = new /obj/item/projectile/test(get_step_to(user,target)) //Making the test....
|
||||
in_chamber.target = target
|
||||
in_chamber.flags = flags //Set the flags...
|
||||
in_chamber.pass_flags = pass_flags //And the pass flags to that of the real projectile...
|
||||
in_chamber.firer = user
|
||||
var/output = in_chamber.fired() //Test it!
|
||||
del(in_chamber) //No need for it anymore
|
||||
return output //Send it back to the gun!
|
||||
@@ -150,24 +148,37 @@
|
||||
yo = null
|
||||
xo = null
|
||||
var
|
||||
turf/target = null
|
||||
target = null
|
||||
result = 0 //To pass the message back to the gun.
|
||||
|
||||
Bump(atom/A as mob|obj|turf|area)
|
||||
if(A == firer)
|
||||
loc = A.loc
|
||||
return //cannot shoot yourself
|
||||
if(istype(A, /obj/item/projectile))
|
||||
return
|
||||
if(istype(A, /mob/living))
|
||||
result = 2 //We hit someone, return 1!
|
||||
return ..()
|
||||
return
|
||||
result = 1
|
||||
return
|
||||
|
||||
fired()
|
||||
target = locate(min(max(x + xo, 1), world.maxx), min(max(y + yo, 1), world.maxy), z) //Finding the target turf at map edge
|
||||
while(!result) //Loop on through!
|
||||
if(!step_towards(src,target)) //If we hit something...
|
||||
if(!result) //And the var is not already set....
|
||||
result = 1 //Return 0
|
||||
break
|
||||
var/turf/curloc = get_turf(src)
|
||||
var/turf/targloc = get_turf(target)
|
||||
yo = targloc.y - curloc.y
|
||||
xo = targloc.x - curloc.x
|
||||
target = targloc
|
||||
while(src) //Loop on through!
|
||||
if(result)
|
||||
return (result - 1)
|
||||
if((!( target ) || loc == target))
|
||||
target = locate(min(max(x + xo, 1), world.maxx), min(max(y + yo, 1), world.maxy), z) //Finding the target turf at map edge
|
||||
step_towards(src, target)
|
||||
var/mob/living/M = locate() in get_turf(src)
|
||||
if(istype(M)) //If there is someting living...
|
||||
return 1 //Return 1
|
||||
else
|
||||
var/mob/living/M = locate() in get_turf(src)
|
||||
if(istype(M)) //If there is someting living...
|
||||
result = 2 //Return 1
|
||||
break
|
||||
return (result-1)
|
||||
M = locate() in get_step(src,target)
|
||||
if(istype(M))
|
||||
return 1
|
||||
Reference in New Issue
Block a user