Merge pull request #1857 from comma/master

Alt titles, char records & small fixes.
This commit is contained in:
headswe
2012-11-02 10:11:45 -07:00
22 changed files with 252 additions and 380 deletions
+7 -1
View File
@@ -112,4 +112,10 @@
name = "suspenders"
desc = "They suspend the illusion of the mime's play."
icon = 'icons/obj/clothing/belts.dmi'
icon_state = "suspenders"
icon_state = "suspenders"
/obj/item/clothing/suit/fr_jacket
name = "first responder jacket"
desc = "A high-visibility jacket worn by medical first responders."
icon_state = "fr_jacket_open"
item_state = "fr_jacket"
+3 -3
View File
@@ -332,19 +332,19 @@
icon = 'custom_items.dmi'
icon_state = "swatcap"
/obj/item/clothing/head/helmet/welding/fluff/alice_mccrea_1 //madmalicemccrea: Alice McCrea
/obj/item/clothing/head/welding/fluff/alice_mccrea_1 //madmalicemccrea: Alice McCrea
name = "flame decal welding helmet"
desc = "A welding helmet adorned with flame decals, and several cryptic slogans of varying degrees of legibility. \"Fly the Friendly Skies\" is clearly visible, written above the visor, for some reason."
icon = 'custom_items.dmi'
icon_state = "alice_mccrea_1"
/obj/item/clothing/head/helmet/welding/fluff/yuki_matsuda_1 //searif: Yuki Matsuda
/obj/item/clothing/head/welding/fluff/yuki_matsuda_1 //searif: Yuki Matsuda
name = "white decal welding helmet"
desc = "A white welding helmet with a character written across it."
icon = 'custom_items.dmi'
icon_state = "yuki_matsuda_1"
/obj/item/clothing/head/helmet/welding/fluff/norah_briggs_1 //bountylord13: Norah Briggs
/obj/item/clothing/head/welding/fluff/norah_briggs_1 //bountylord13: Norah Briggs
name = "blue flame decal welding helmet"
desc = "A welding helmet with blue flame decals on it."
icon = 'custom_items.dmi'
+23 -1
View File
@@ -805,4 +805,26 @@
xylophone = 1
spawn(1200)
xylophone=0
return
return
/mob/living/carbon/human/proc/vomit()
if(!lastpuke)
lastpuke = 1
src << "<spawn class='warning'>You feel nauseous..."
spawn(150) //15 seconds until second warning
src << "<spawn class='warning'>You feel like you are about to throw up!"
spawn(100) //and you have 10 more for mad dash to the bucket
Stun(5)
src.visible_message("<spawn class='warning'>[src] throws up!","<spawn class='warning'>You throw up!")
playsound(loc, 'sound/effects/splat.ogg', 50, 1)
var/turf/location = loc
if (istype(location, /turf/simulated))
location.add_vomit_floor(src, 1)
nutrition -= 40
adjustToxLoss(-3)
spawn(350) //wait 35 seconds before next volley
lastpuke = 0
@@ -191,6 +191,27 @@
if(w_uniform)
w_uniform.add_fingerprint(M)
var/datum/organ/external/affecting = get_organ(ran_zone(M.zone_sel.selecting))
if (istype(r_hand,/obj/item/weapon/gun) || istype(l_hand,/obj/item/weapon/gun))
var/obj/item/weapon/gun/W = null
var/chance = 0
if (istype(l_hand,/obj/item/weapon/gun))
W = l_hand
chance = hand ? 40 : 20
if (istype(r_hand,/obj/item/weapon/gun))
W = r_hand
chance = !hand ? 40 : 20
if (prob(chance))
visible_message("<spawn class=danger>[src]'s [W] goes off during struggle!")
var/list/turfs = list()
for(var/turf/T in view())
turfs += T
var/turf/target = pick(turfs)
return W.afterattack(target,src)
var/randn = rand(1, 100)
if (randn <= 25)
apply_effect(4, WEAKEN, run_armor_check(affecting, "melee"))
+1 -17
View File
@@ -1400,23 +1400,7 @@ AND YOU */
// Puke if toxloss is too high
if(!stat)
if (getToxLoss() >= 45 && nutrition > 20)
lastpuke ++
if(lastpuke >= 25) // about 25 second delay I guess
Stun(5)
for(var/mob/O in viewers(world.view, src))
O.show_message(text("<b>\red [] throws up!</b>", src), 1)
playsound(loc, 'sound/effects/splat.ogg', 50, 1)
var/turf/location = loc
if (istype(location, /turf/simulated))
location.add_vomit_floor(src, 1)
nutrition -= 20
adjustToxLoss(-3)
// make it so you can only puke so fast
lastpuke = 0
vomit()
//0.1% chance of playing a scary sound to someone who's in complete darkness
if(isturf(loc) && rand(1,1000) == 1)
@@ -245,21 +245,8 @@ proc/get_damage_icon_part(damage_state, body_part)
lying_icon = new /icon('icons/mob/human.dmi', "torso_[g]_l")
individual_limbs = 1
//remove destroyed limbs from base icon
for(var/datum/organ/external/part in organs)
if(!istype(part, /datum/organ/external/groin) \
&& !istype(part, /datum/organ/external/chest) \
&& (part.status & ORGAN_DESTROYED))
var/icon/temp = new /icon('dam_mask.dmi', "[part.icon_name]")
temp.MapColors(-1,0,0,0, 0,-1,0,0, 0,0,-1,0, 0,0,0,-1, 1,1,1,1)
stand_icon.AddAlphaMask(temp)
temp = new /icon('dam_mask.dmi', "[part.icon_name]2")
temp.MapColors(-1,0,0,0, 0,-1,0,0, 0,0,-1,0, 0,0,0,-1, 1,1,1,1)
lying_icon.AddAlphaMask(temp)
// Draw each individual limb (AterIgnis: not sure why this is needed at all - base icon have all of these, but that was before me)
if(!husk && individual_limbs)
// Draw each individual limb
if(individual_limbs)
stand_icon.Blend(new /icon('icons/mob/human.dmi', "chest_[g]_s"), ICON_OVERLAY)
lying_icon.Blend(new /icon('icons/mob/human.dmi', "chest_[g]_l"), ICON_OVERLAY)
@@ -268,24 +255,35 @@ proc/get_damage_icon_part(damage_state, body_part)
stand_icon.Blend(new /icon('icons/mob/human.dmi', "head_[g]_s"), ICON_OVERLAY)
lying_icon.Blend(new /icon('icons/mob/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.status & ORGAN_DESTROYED))
var/icon/temp = new /icon('human.dmi', "[part.icon_name]_s")
if(part.status & ORGAN_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.status & ORGAN_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)
// Draw nondestroyed robotic limbs grayscale
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.status & ORGAN_DESTROYED))
var/icon/temp = new /icon('human.dmi', "[part.icon_name]_s")
if(part.status & ORGAN_ROBOT)
temp.MapColors(rgb(77,77,77,0), rgb(150,150,150), rgb(28,28,28), rgb(0,0,0))
stand_icon.Blend(temp, ICON_OVERLAY)
if (husk)
var/icon/husk_s = new /icon('human.dmi', "husk_s")
var/icon/husk_l = new /icon('human.dmi', "husk_l")
temp = new /icon('human.dmi', "[part.icon_name]_l")
if(part.status & ORGAN_ROBOT)
temp.MapColors(rgb(77,77,77,0), rgb(150,150,150), rgb(28,28,28), rgb(0,0,0))
lying_icon.Blend(temp, 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.status & ORGAN_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)
//Skin tone
if(!skeleton)
@@ -143,6 +143,62 @@
else
message = "<B>[src]</B> looks."
m_type = 1
if("beep")
var/M = null
if(param)
for (var/mob/A in view(null, null))
if (param == A.name)
M = A
break
if(!M)
param = null
if (param)
message = "<B>[src]</B> beeps at [param]."
else
message = "<B>[src]</B> beeps."
playsound(src.loc, 'twobeep.ogg', 50, 0)
m_type = 2
if("ping")
var/M = null
if(param)
for (var/mob/A in view(null, null))
if (param == A.name)
M = A
break
if(!M)
param = null
if (param)
message = "<B>[src]</B> pings at [param]."
else
message = "<B>[src]</B> pings."
playsound(src.loc, 'ping.ogg', 50, 0)
m_type = 2
if("buzz")
var/M = null
if(param)
for (var/mob/A in view(null, null))
if (param == A.name)
M = A
break
if(!M)
param = null
if (param)
message = "<B>[src]</B> buzzes at [param]."
else
message = "<B>[src]</B> buzzes."
playsound(src.loc, 'buzz-sigh.ogg', 50, 0)
m_type = 2
if("law")
message = "<B>[src]</B> shows its legal authorization barcode."
playsound(src.loc, 'biamthelaw.ogg', 50, 0)
m_type = 2
else
src << text("Invalid Emote: []", act)
if ((message && src.stat == 0))
+2
View File
@@ -64,6 +64,8 @@
var/real_name = null
// var/original_name = null //Original name is only used in ghost chat! Depracated, now used bb
var/flavor_text = ""
var/med_record = ""
var/sec_record = ""
var/blinded = null
var/bhunger = 0 //Carbon
var/ajourn = 0
+43 -33
View File
@@ -272,7 +272,7 @@ datum/preferences
if(jobban_isbanned(user, "Records"))
dat += "<b>You are banned from using character records.</b><br>"
else
dat += "<b><a href=\"byond://?src=\ref[user];preference=records;task=input\">Character Records</a></b><br><br>"
dat += "<b><a href=\"byond://?src=\ref[user];preference=records;record=1\">Character Records</a></b><br><br>"
dat += "<b>Flavor Text</b><br>"
dat += "<a href='byond://?src=\ref[user];preference=flavor_text;task=input'>Change</a><br>"
@@ -401,14 +401,14 @@ datum/preferences
HTML += "<tt><center>"
HTML += "<b>Set Character Records</b><br>"
HTML += "<a href=\"byond://?src=\ref[user];preferences=1;med_record=1\">Medical Records</a><br>"
HTML += "<a href=\"byond://?src=\ref[user];preference=records;task=med_record\">Medical Records</a><br>"
if(lentext(med_record) <= 40)
HTML += "[med_record]"
else
HTML += "[copytext(med_record, 1, 37)]..."
HTML += "<br><br><a href=\"byond://?src=\ref[user];preferences=1;sec_record=1\">Security Records</a><br>"
HTML += "<br><br><a href=\"byond://?src=\ref[user];preference=records;task=sec_record\">Security Records</a><br>"
if(lentext(sec_record) <= 40)
HTML += "[sec_record]<br>"
@@ -416,7 +416,7 @@ datum/preferences
HTML += "[copytext(sec_record, 1, 37)]...<br>"
HTML += "<br>"
HTML += "<a href=\"byond://?src=\ref[user];preferences=1;records=-1\">\[Done\]</a>"
HTML += "<a href=\"byond://?src=\ref[user];preference=records;records=-1\">\[Done\]</a>"
HTML += "</center></tt>"
user << browse(null, "window=preferences")
@@ -453,7 +453,7 @@ datum/preferences
//The job before the current job. I only use this to get the previous jobs color when I'm filling in blank rows.
var/datum/job/lastJob
if (!job_master) return
for(var/datum/job/job in job_master.occupations)
index += 1
@@ -500,6 +500,8 @@ datum/preferences
HTML += " <font color=orange>\[Low]</font>"
else
HTML += " <font color=red>\[NEVER]</font>"
if(job.alt_titles)
HTML += "</a><br> <a href=\"byond://?src=\ref[user];preference=job;task=alt_title;job=\ref[job]\">\[[GetAltTitle(job)]\]</a></td></tr>"
HTML += "</a></td></tr>"
HTML += "</td'></tr></table>"
@@ -625,7 +627,6 @@ datum/preferences
proc/process_link(mob/user, list/href_list)
if(!user) return
if(href_list["preference"] == "job")
switch(href_list["task"])
if("close")
@@ -634,6 +635,14 @@ datum/preferences
if("random")
userandomjob = !userandomjob
SetChoices(user)
if ("alt_title")
var/datum/job/job = locate(href_list["job"])
if (job)
var/choices = list(job.title) + job.alt_titles
var/choice = input("Pick a title for [job.title].", "Character Generation", GetAltTitle(job)) as anything in choices | null
if(choice)
SetAltTitle(job, choice)
SetChoices(user)
if("input")
SetJob(user, href_list["text"])
else
@@ -674,6 +683,32 @@ datum/preferences
SetSkills(user)
return 1
else if(href_list["preference"] == "records")
if(text2num(href_list["record"]) >= 1)
SetRecords(user)
return
else
user << browse(null, "window=records")
if(href_list["task"] == "med_record")
var/medmsg = input(usr,"Set your medical notes here.","Medical Records",html_decode(med_record)) as message
if(medmsg != null)
medmsg = copytext(medmsg, 1, MAX_PAPER_MESSAGE_LEN)
medmsg = html_encode(medmsg)
med_record = medmsg
SetRecords(user)
if(href_list["task"] == "sec_record")
var/secmsg = input(usr,"Set your security notes here.","Security Records",html_decode(sec_record)) as message
if(secmsg != null)
secmsg = copytext(secmsg, 1, MAX_PAPER_MESSAGE_LEN)
secmsg = html_encode(secmsg)
sec_record = secmsg
SetRecords(user)
switch(href_list["task"])
if("random")
switch(href_list["preference"])
@@ -936,33 +971,6 @@ datum/preferences
else
user << browse(null, "window=disabil")
if("records")
if(text2num(href_list["records"]) >= 1)
SetRecords(user)
return
else
user << browse(null, "window=records")
if("med_record")
var/medmsg = input(usr,"Set your medical notes here.","Medical Records",html_decode(med_record)) as message
if(medmsg != null)
medmsg = copytext(medmsg, 1, MAX_PAPER_MESSAGE_LEN)
medmsg = html_encode(medmsg)
med_record = medmsg
SetRecords(user)
if("sec_record")
var/secmsg = input(usr,"Set your security notes here.","Security Records",html_decode(sec_record)) as message
if(secmsg != null)
secmsg = copytext(secmsg, 1, MAX_PAPER_MESSAGE_LEN)
secmsg = html_encode(secmsg)
sec_record = secmsg
SetRecords(user)
if("limbs")
var/limb_name = input(user, "Which limb do you want to change?") as null|anything in list("Left Leg","Right Leg","Left Arm","Right Arm","Left Foot","Right Foot","Left Hand","Right Hand")
if(!limb_name) return
@@ -1139,6 +1147,8 @@ datum/preferences
character.dna.real_name = character.real_name
character.flavor_text = flavor_text
character.med_record = med_record
character.sec_record = sec_record
character.gender = gender