Merge github.com:Baystation12/Baystation12

Conflicts:
	code/modules/mob/mob.dm
	code/modules/projectiles/projectile/change.dm
This commit is contained in:
cib
2012-05-29 13:43:20 +02:00
119 changed files with 12083 additions and 10356 deletions
@@ -146,7 +146,7 @@
using.name = "drop"
using.icon = 'screen1_alien.dmi'
using.icon_state = "act_drop"
using.screen_loc = ui_dropbutton
using.screen_loc = ui_dropbutton_old
using.layer = 19
src.adding += using
@@ -183,7 +183,7 @@
if(istype(loc, /obj/machinery/atmospherics/unary/cryo_cell)) return
var/datum/gas_mixture/environment = loc.return_air()
var/datum/air_group/breath
var/datum/gas_mixture/breath
// HACK NEED CHANGING LATER
if(src.health < 0)
src.losebreath++
@@ -56,7 +56,7 @@
using.dir = SOUTHWEST
using.icon = 'screen1_alien.dmi'
using.icon_state = (mymob.m_intent == "run" ? "running" : "walking")
using.screen_loc = ui_movi_old
using.screen_loc = ui_acti
using.layer = 20
src.adding += using
move_intent = using
@@ -158,7 +158,7 @@
if(istype(loc, /obj/machinery/atmospherics/unary/cryo_cell)) return
var/datum/gas_mixture/environment = loc.return_air()
var/datum/air_group/breath
var/datum/gas_mixture/breath
// HACK NEED CHANGING LATER
if(health < 0)
losebreath++
@@ -76,7 +76,7 @@
param = trim(param)
var/input
if(!param)
input = input("Choose an emote to display.") as text|null
input = copytext(sanitize(input("Choose an emote to display.") as text|null),1,MAX_MESSAGE_LEN)
else
input = param
if(input)
+16 -3
View File
@@ -359,7 +359,7 @@
if(istype(loc, /obj/machinery/atmospherics/unary/cryo_cell)) return
var/datum/gas_mixture/environment = loc.return_air()
var/datum/air_group/breath
var/datum/gas_mixture/breath
// HACK NEED CHANGING LATER
if(isbreathing && health < config.health_threshold_crit)
@@ -420,6 +420,16 @@
smoke.reagents.copy_to(src, 10) // I dunno, maybe the reagents enter the blood stream through the lungs?
break // If they breathe in the nasty stuff once, no need to continue checking
if(istype(wear_mask, /obj/item/clothing/mask/gas))
var/datum/gas_mixture/filtered = new()
filtered.toxins = breath.toxins
filtered.trace_gases = breath.trace_gases.Copy()
filtered.update_values()
breath.toxins = 0
breath.trace_gases = list()
breath.update_values()
loc.assume_air(filtered)
else //Still give containing object the chance to interact
if(istype(loc, /obj/))
var/obj/location_as_object = loc
@@ -469,7 +479,7 @@
var/safe_oxygen_min = 16 // Minimum safe partial pressure of O2, in kPa
//var/safe_oxygen_max = 140 // Maximum safe partial pressure of O2, in kPa (Not used for now)
var/safe_co2_max = 10 // Yes it's an arbitrary value who cares?
var/safe_toxins_max = 0.005
var/safe_toxins_max = 0.0025
var/SA_para_min = 1
var/SA_sleep_min = 5
var/oxygen_used = 0
@@ -649,7 +659,7 @@
//Account for massive pressure differences. Done by Polymorph
var/pressure = environment.return_pressure()
if(!istype(wear_suit, /obj/item/clothing/suit/space))
if(!istype(wear_suit, /obj/item/clothing/suit/space) && !istype(wear_suit, /obj/item/clothing/suit/fire))
/*if(pressure < 20)
if(prob(25))
src << "You feel the splittle on your lips and the fluid on your eyes boiling away, the capillteries in your skin breaking."
@@ -658,6 +668,9 @@
if(pressure > HAZARD_HIGH_PRESSURE)
adjustBruteLoss(min((10+(round(pressure/(HIGH_STEP_PRESSURE)-2)*5)),MAX_PRESSURE_DAMAGE))
if(environment.toxins > MOLES_PLASMA_VISIBLE)
pl_effects()
return //TODO: DEFERRED
adjust_body_temperature(current, loc_temp, boost)
@@ -187,7 +187,7 @@
if(!loc) return //probably ought to make a proper fix for this, but :effort: --NeoFite
var/datum/gas_mixture/environment = loc.return_air()
var/datum/air_group/breath
var/datum/gas_mixture/breath
if(losebreath>0) //Suffocating so do not take a breath
src.losebreath--
+1 -7
View File
@@ -40,14 +40,8 @@
return 0
var/mob/living/carbon/human/H = src //make this damage method divide the damage to be done among all the body parts, then burn each body part for that much damage. will have better effect then just randomly picking a body part
var/divided_damage = (burn_amount)/(H.organs.len)
var/extradam = 0 //added to when organ is at max dam
for(var/name in H.organs)
var/datum/organ/external/affecting = H.organs[name]
if(!affecting) continue
if(affecting.take_damage(0, divided_damage+extradam, 0, used_weapon))
extradam = 0
else
extradam += divided_damage
apply_damage(divided_damage, BURN, name, 0, 0, "Skin Burns")
H.UpdateDamageIcon()
H.updatehealth()
return 1
@@ -54,10 +54,9 @@
m_type = 2
if ("custom")
var/input = input("Choose an emote to display.") as text|null
var/input = copytext(sanitize(input("Choose an emote to display.") as text|null),1,MAX_MESSAGE_LEN)
if (!input)
return
input = sanitize(input)
var/input2 = input("Is this a visible or hearable emote?") in list("Visible","Hearable")
if (input2 == "Visible")
m_type = 1
+1 -1
View File
@@ -202,7 +202,7 @@
mymob.pullin.icon = 'screen1_robot.dmi'
mymob.pullin.icon_state = "pull0"
mymob.pullin.name = "pull"
mymob.pullin.screen_loc = ui_pull_old
mymob.pullin.screen_loc = ui_pull_borg
mymob.blind = new /obj/screen( null )
mymob.blind.icon = 'screen1_robot.dmi'
+19 -8
View File
@@ -238,7 +238,19 @@
/mob/proc/show_inv(mob/user as mob)
user.machine = src
var/dat = text("<TT>\n<B><FONT size=3>[]</FONT></B><BR>\n\t<B>Head(Mask):</B> <A href='?src=\ref[];item=mask'>[]</A><BR>\n\t<B>Left Hand:</B> <A href='?src=\ref[];item=l_hand'>[]</A><BR>\n\t<B>Right Hand:</B> <A href='?src=\ref[];item=r_hand'>[]</A><BR>\n\t<B>Back:</B> <A href='?src=\ref[];item=back'>[]</A><BR>\n\t[]<BR>\n\t[]<BR>\n\t[]<BR>\n\t<A href='?src=\ref[];item=pockets'>Empty Pockets</A><BR>\n<A href='?src=\ref[];mach_close=mob[]'>Close</A><BR>\n</TT>", name, src, (wear_mask ? text("[]", wear_mask) : "Nothing"), src, (l_hand ? text("[]", l_hand) : "Nothing"), src, (r_hand ? text("[]", r_hand) : "Nothing"), src, (back ? text("[]", back) : "Nothing"), ((istype(wear_mask, /obj/item/clothing/mask) && istype(back, /obj/item/weapon/tank) && !( internal )) ? text(" <A href='?src=\ref[];item=internal'>Set Internal</A>", src) : ""), (internal ? text("<A href='?src=\ref[];item=internal'>Remove Internal</A>", src) : ""), (handcuffed ? text("<A href='?src=\ref[];item=handcuff'>Handcuffed</A>", src) : text("<A href='?src=\ref[];item=handcuff'>Not Handcuffed</A>", src)), src, user, name)
var/dat = {"
<B><HR><FONT size=3>[name]</FONT></B>
<BR><HR>
<BR><B>Head(Mask):</B> <A href='?src=\ref[src];item=mask'>[(wear_mask ? wear_mask : "Nothing")]</A>
<BR><B>Left Hand:</B> <A href='?src=\ref[src];item=l_hand'>[(l_hand ? l_hand : "Nothing")]</A>
<BR><B>Right Hand:</B> <A href='?src=\ref[src];item=r_hand'>[(r_hand ? r_hand : "Nothing")]</A>
<BR><B>Back:</B> <A href='?src=\ref[src];item=back'>[(back ? back : "Nothing")]</A> [((istype(wear_mask, /obj/item/clothing/mask) && istype(back, /obj/item/weapon/tank) && !( internal )) ? text(" <A href='?src=\ref[];item=internal'>Set Internal</A>", src) : "")]
<BR>[(handcuffed ? text("<A href='?src=\ref[src];item=handcuff'>Handcuffed</A>") : text("<A href='?src=\ref[src];item=handcuff'>Not Handcuffed</A>"))]
<BR>[(internal ? text("<A href='?src=\ref[src];item=internal'>Remove Internal</A>") : "")]
<BR><A href='?src=\ref[src];item=pockets'>Empty Pockets</A>
<BR><A href='?src=\ref[user];refresh=1'>Refresh</A>
<BR><A href='?src=\ref[user];mach_close=mob[name]'>Close</A>
<BR>"}
user << browse(dat, text("window=mob[];size=325x500", name))
onclose(user, "mob[name]")
return
@@ -746,8 +758,8 @@
return
/client/New()
if(findtextEx(key, "Telnet @"))
src << "Sorry, this game does not support Telnet."
if( connection != "seeker" )
src << "Sorry, this game does not support [connection] connections." //doesn't work
del(src)
if (CheckBan(src))
del(src)
@@ -770,8 +782,6 @@
..()
makejson()
if (join_motd)
src << "<div class=\"motd\">[join_motd]</div>"
if(custom_event_msg && custom_event_msg != "")
src << "<h1 class='alert'>Custom Event</h1>"
@@ -779,10 +789,11 @@
src << "<span class='alert'>[html_encode(custom_event_msg)]</span>"
src << "<br>"
if(admins.Find(ckey))
if( ckey in admins )
holder = new /obj/admins(src)
holder.rank = admins[ckey]
update_admins(admins[ckey])
admin_memo_show()
if(ticker && ticker.mode && ticker.mode.name =="sandbox")
mob.CanBuild()
@@ -1147,7 +1158,7 @@ note dizziness decrements automatically in the mob's Life() proc.
if(!isemptylist(args))
for(var/file in args)
src << browse_rsc(file)
return 1
return 1
return 0
@@ -1170,4 +1181,4 @@ note dizziness decrements automatically in the mob's Life() proc.
/mob/update_clothing()
// Call this proc whenever something about the clothing of a mob changes. Normally, you
// don't need to call this by hand, as the equip procs will do it for you.
..()
..()
@@ -15,6 +15,9 @@
anchored = 1 // don't get pushed around
Login()
if (join_motd)
src << "<div class=\"motd\">[join_motd]</div>"
if(!preferences)
preferences = new
+8 -18
View File
@@ -633,16 +633,15 @@ datum/preferences
switch(link_tags["real_name"])
if("input")
new_name = input(user, "Please select a name:", "Character Generation") as text
new_name = copytext( (input(user, "Please select a name:", "Character Generation") as text) ,1,MAX_NAME_LEN)
var/list/bad_characters = list("_", "'", "\"", "<", ">", ";", "\[", "\]", "{", "}", "|", "\\","0","1","2","3","4","5","6","7","8","9")
for(var/c in bad_characters)
new_name = dd_replacetext(new_name, c, "")
if(!new_name || (new_name == "Unknown") || (new_name == "floor") || (new_name == "wall") || (new_name == "r-wall"))
alert("Invalid name. Don't do that!")
return
if(length(new_name) >= 26)
alert("That name is too long.")
return
//Make it so number one. (means you can have names like McMillian). Credit to: Jtgibson
new_name = simple_titlecase(new_name)
/*
@@ -660,8 +659,6 @@ datum/preferences
randomize_name()
if(new_name)
if(length(new_name) >= 26)
new_name = copytext(new_name, 1, 26)
real_name = new_name
if(link_tags["age"])
@@ -675,17 +672,9 @@ datum/preferences
if(link_tags["OOC"])
var/tempnote = ""
tempnote = input(user, "Please enter your OOC Notes!:", "OOC notes" , metadata) as text
var/list/bad_characters = list("_", "\"", "<", ">", ";", "\[", "\]", "{", "}", "|", "\\","0","1","2","3","4","5","6","7","8","9")
for(var/c in bad_characters)
tempnote = dd_replacetext(tempnote, c, "")
if(length(tempnote) >= 255)
alert("That name is too long. (255 character max, please)")
return
metadata = tempnote
tempnote = copytext(sanitize(input(user, "Please enter your OOC Notes!:", "OOC notes" , metadata) as text),1,MAX_MESSAGE_LEN)
if(tempnote)
metadata = tempnote
return
@@ -757,7 +746,7 @@ datum/preferences
if("random")
randomize_skin_tone()
if("input")
var/new_tone = input(user, "Please select skin tone level: 1-220 (1=albino, 35=caucasian, 150=black, 220='very' black) or 20-70 for Tajarans", "Character Generation") as text
var/new_tone = input(user, "Please select skin tone level: 1-220 (1=albino, 35=caucasian, 150=black, 220='very' black) or 20-70 for Tajarans", "Character Generation") as num
if(new_tone)
if(species == "Tajaran")
s_tone = max(min(round(text2num(new_tone)), 70), 20)
@@ -769,6 +758,7 @@ datum/preferences
if(species != "Human")
return
switch(link_tags["h_style"])
// New and improved hair selection code, by Doohl
if("random") // random hair selection
+1 -1
View File
@@ -104,7 +104,7 @@
burn *= 0.66 //~2/3 damage for ROBOLIMBS
if(owner && !robot)
owner.pain(display_name, (brute+burn)*3, 1)
owner.pain(display_name, (brute+burn)*3, 1, burn > brute)
if(sharp)
var/nux = brute * rand(10,15)
if(brute_dam >= max_damage)
+21 -10
View File
@@ -7,7 +7,7 @@ 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)
mob/proc/pain(var/partname, var/amount, var/force, var/burning = 0)
if(stat >= 2) return
if(world.time < next_pain_time && !force)
return
@@ -17,15 +17,26 @@ mob/proc/pain(var/partname, var/amount, var/force)
if(amount > 50 && prob(amount / 5))
src:drop_item()
var/msg
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(burning)
switch(amount)
if(1 to 10)
msg = "\red <b>Your [partname] burns.</b>"
if(11 to 90)
flash_weak_pain()
msg = "\red <b><font size=2>Your [partname] burns badly!</font></b>"
if(91 to 10000)
flash_pain()
msg = "\red <b><font size=3>OH GOD! Your [partname] is on fire!</font></b>"
else
switch(amount)
if(1 to 10)
msg = "<b>Your [partname] hurts.</b>"
if(11 to 90)
flash_weak_pain()
msg = "<b><font size=2>Your [partname] hurts badly.</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