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
+2 -3
View File
@@ -968,11 +968,10 @@ var/global/BSACooldown = 0
if ((src.rank in list( "Trial Admin", "Badmin", "Game Admin", "Game Master" )))
var/mob/M = locate(href_list["forcespeech"])
if (ismob(M))
var/speech = input("What will [key_name(M)] say?.", "Force speech", "")
var/speech = copytext(sanitize(input("What will [key_name(M)] say?.", "Force speech", "")),1,MAX_MESSAGE_LEN)
if(!speech)
return
M.say(speech)
speech = copytext(sanitize(speech), 1, MAX_MESSAGE_LEN)
log_admin("[key_name(usr)] forced [key_name(M)] to say: [speech]")
message_admins("\blue [key_name_admin(usr)] forced [key_name_admin(M)] to say: [speech]")
else
@@ -1883,7 +1882,7 @@ var/global/BSACooldown = 0
if(!ticker)
alert("The game hasn't started yet!")
return
var/objective = input("Enter an objective")
var/objective = copytext(sanitize(input("Enter an objective")),1,MAX_MESSAGE_LEN)
if(!objective)
return
//feedback_inc("admin_secrets_fun_used",1)
+54
View File
@@ -0,0 +1,54 @@
#define MEMOFILE "data/memo.sav" //where the memos are saved
#define ENABLE_MEMOS 1 //using a define because screw making a config variable for it. This is more efficient and purty.
//switch verb so we don't spam up the verb lists with like, 3 verbs for this feature.
/client/proc/admin_memo(task in list("write","show","delete"))
set name = "Memo"
set category = "Server"
if(!holder) return
switch(task)
if("write")
admin_memo_write()
if("show")
admin_memo_show()
if("delete")
admin_memo_delete()
//write a message
/client/proc/admin_memo_write()
var/savefile/F = new(MEMOFILE)
if(F)
var/memo = input(src,"Type your memo\n(Leaving it blank will delete your current memo):","Write Memo",null) as null|message
switch(memo)
if(null)
return
if("")
F.dir.Remove(ckey)
src << "<b>Memo removed</b>"
return
if( findtext(memo,"<script",1,0) )
return
F[ckey] << "[key] on [time2text(world.realtime,"(DDD) DD MMM hh:mm")]<br>[memo]"
message_admins("[key] set an admin memo:<br>[memo]")
//show all memos
/client/proc/admin_memo_show()
if(ENABLE_MEMOS)
var/savefile/F = new(MEMOFILE)
if(F)
for(var/ckey in F.dir)
src << "<center><span class='motd'><b>Admin Memo</b><i> by [F[ckey]]</i></span></center>"
//delete your own or somebody else's memo
/client/proc/admin_memo_delete()
var/savefile/F = new(MEMOFILE)
if(F)
var/ckey
if( holder.rank == "Game Master" )
ckey = input(src,"Whose memo shall we remove?","Remove Memo",null) as null|anything in F.dir
else
ckey = src.ckey
if(ckey)
F.dir.Remove(ckey)
src << "<b>Removed Memo created by [ckey].</b>"
+8 -6
View File
@@ -144,7 +144,7 @@
verbs += /client/proc/voting
verbs += /client/proc/hide_verbs
verbs += /client/proc/general_report
verbs += /client/proc/air_report
//verbs += /client/proc/air_report
verbs += /client/proc/deadmin_self
//verbs += /client/proc/cmd_admin_prison --Merged with player panel
//verbs += /obj/admins/proc/unprison --Merged with player panel
@@ -248,7 +248,7 @@
// verbs += /client/proc/mapload
verbs += /client/proc/check_words
verbs += /client/proc/drop_bomb
verbs += /client/proc/kill_airgroup
//verbs += /client/proc/kill_airgroup
//verbs += /client/proc/cmd_admin_drop_everything --Merged with view variables
verbs += /client/proc/make_sound
verbs += /client/proc/play_local_sound
@@ -260,6 +260,7 @@
verbs += /client/proc/toggle_gravity_off
verbs += /client/proc/toggle_random_events
verbs += /client/proc/deadmin_self
if(ENABLE_MEMOS) verbs += /client/proc/admin_memo
//verbs += /client/proc/cmd_mass_modify_object_variables --Merged with view variables
//verbs += /client/proc/cmd_admin_explosion --Merged with view variables
//verbs += /client/proc/cmd_admin_emp --Merged with view variables
@@ -278,7 +279,7 @@
verbs += /client/proc/Force_Event_admin
verbs += /client/proc/radioalert
verbs += /client/proc/CarbonCopy
verbs += /client/proc/jump_to_dead_group
//verbs += /client/proc/jump_to_dead_group
else return
//Game Master
@@ -403,7 +404,7 @@
verbs -= /client/proc/voting
verbs -= /client/proc/hide_verbs
verbs -= /client/proc/general_report
verbs -= /client/proc/air_report
//verbs -= /client/proc/air_report
verbs -= /client/proc/cmd_admin_say
verbs -= /client/proc/cmd_admin_gib_self
verbs -= /client/proc/restartcontroller
@@ -425,6 +426,7 @@
verbs -= /client/proc/giveruntimelog //used by coders to retrieve runtime logs
verbs -= /client/proc/getserverlog
verbs -= /client/proc/cinematic //show a cinematic sequence
verbs -= /client/proc/admin_memo
verbs -= /client/proc/cmd_admin_change_custom_event
verbs -= /client/proc/admin_invis
verbs -= /client/proc/callprocgen
@@ -452,13 +454,13 @@
//verbs -= /obj/admins/proc/unprison --Merged with player panel
//verbs -= /client/proc/cmd_switch_radio --removed because tcommsat is staying
verbs -= /client/proc/togglebuildmodeself
verbs -= /client/proc/kill_airgroup
//verbs -= /client/proc/kill_airgroup
verbs -= /client/proc/debug_master_controller
verbs -= /client/proc/make_tajaran
verbs -= /client/proc/admin_deny_shuttle
verbs -= /client/proc/cmd_admin_christmas
verbs -= /client/proc/editappear
verbs -= /client/proc/jump_to_dead_group
//verbs -= /client/proc/jump_to_dead_group
verbs -= /client/proc/playernotes
verbs -= /obj/admins/proc/show_skills
verbs -= /client/proc/enable_debug_verbs
+4 -4
View File
@@ -22,7 +22,7 @@
usr << browse(output,"window=generalreport")
//feedback_add_details("admin_verb","SGR") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
air_report()
/* air_report()
set category = "Debug"
set name = "Show Air Report"
@@ -83,7 +83,7 @@
for(var/datum/gas/trace_gas in GM.trace_gases)
usr << "[trace_gas.type]: [trace_gas.moles]"
//feedback_add_details("admin_verb","DAST") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
*/
fix_next_move()
set category = "Debug"
set name = "Unfreeze Everyone"
@@ -183,7 +183,7 @@
//feedback_add_details("admin_verb","RLDA") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
jump_to_dead_group()
/*jump_to_dead_group()
set name = "Jump to dead group"
set category = "Debug"
if(!holder)
@@ -221,7 +221,7 @@
else
usr << "Local airgroup is unsimulated!"
//feedback_add_details("admin_verb","KLAG") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
*/
tension_report()
set category = "Debug"
+2 -2
View File
@@ -130,14 +130,14 @@ var/intercom_range_display_status = 0
src.verbs += /client/proc/camera_view //-errorage
src.verbs += /client/proc/sec_camera_report //-errorage
src.verbs += /client/proc/intercom_view //-errorage
src.verbs += /client/proc/air_status //Air things
//src.verbs += /client/proc/air_status //Air things
src.verbs += /client/proc/Cell //More air things
src.verbs += /client/proc/atmosscan //check plumbing
src.verbs += /client/proc/powerdebug //check power
src.verbs += /client/proc/count_objects_on_z_level
src.verbs += /client/proc/count_objects_all
src.verbs += /client/proc/cmd_assume_direct_control //-errorage
src.verbs += /client/proc/jump_to_dead_group
//src.verbs += /client/proc/jump_to_dead_group
src.verbs += /client/proc/startSinglo
src.verbs += /client/proc/ticklag //allows you to set the ticklag.
src.verbs += /client/proc/cmd_admin_grantfullaccess
+7 -4
View File
@@ -621,10 +621,13 @@ Traitors and the like can also be revived with the previous role mostly intact.
/client/proc/cmd_admin_gib_self()
set name = "Gibself"
set category = "Fun"
if (istype(mob, /mob/dead/observer)) // so they don't spam gibs everywhere
return
else
mob.gib()
var/confirm = alert(src, "You sure?", "Confirm", "Yes", "No")
if(confirm == "Yes")
if (istype(mob, /mob/dead/observer)) // so they don't spam gibs everywhere
return
else
mob.gib()
log_admin("[key_name(usr)] used gibself.")
message_admins("\blue [key_name_admin(usr)] used gibself.", 1)
+1 -1
View File
@@ -24,7 +24,7 @@ var/global/sent_strike_team = 0
var/input = null
while(!input)
input = input(src, "Please specify which mission the death commando squad shall undertake.", "Specify Mission", "") as text|null
input = copytext(sanitize(input(src, "Please specify which mission the death commando squad shall undertake.", "Specify Mission", "")),1,MAX_MESSAGE_LEN)
if(!input)
if(alert("Error, no mission set. Do you want to exit the setup process?",,"Yes","No")=="Yes")
return
@@ -24,7 +24,7 @@ var/global/sent_syndicate_strike_team = 0
var/input = null
while(!input)
input = input(src, "Please specify which mission the syndicate strike team shall undertake.", "Specify Mission", "")
input = copytext(sanitize(input(src, "Please specify which mission the syndicate strike team shall undertake.", "Specify Mission", "")),1,MAX_MESSAGE_LEN)
if(!input)
if(alert("Error, no mission set. Do you want to exit the setup process?",,"Yes","No")=="Yes")
return
+6 -3
View File
@@ -261,23 +261,25 @@ datum
for(var/mob/living/carbon/metroid/M in T)
M.adjustToxLoss(rand(15,20))
var/hotspot = (locate(/obj/effect/hotspot) in T)
var/hotspot = (locate(/obj/fire) in T)
if(hotspot && !istype(T, /turf/space))
var/datum/gas_mixture/lowertemp = T.remove_air( T:air:total_moles )
lowertemp.temperature = max( min(lowertemp.temperature-2000,lowertemp.temperature / 2) ,0)
lowertemp.react()
T.assume_air(lowertemp)
T.apply_fire_protection()
del(hotspot)
return
reaction_obj(var/obj/O, var/volume)
src = null
var/turf/T = get_turf(O)
var/hotspot = (locate(/obj/effect/hotspot) in T)
var/hotspot = (locate(/obj/fire) in T)
if(hotspot && !istype(T, /turf/space))
var/datum/gas_mixture/lowertemp = T.remove_air( T:air:total_moles )
lowertemp.temperature = max( min(lowertemp.temperature-2000,lowertemp.temperature / 2) ,0)
lowertemp.react()
T.assume_air(lowertemp)
T.apply_fire_protection()
del(hotspot)
if(istype(O,/obj/item/weapon/reagent_containers/food/snacks/monkeycube))
var/obj/item/weapon/reagent_containers/food/snacks/monkeycube/cube = O
@@ -2142,12 +2144,13 @@ datum
if(T.wet_overlay)
T.overlays -= T.wet_overlay
T.wet_overlay = null
var/hotspot = (locate(/obj/effect/hotspot) in T)
var/hotspot = (locate(/obj/fire) in T)
if(hotspot)
var/datum/gas_mixture/lowertemp = T.remove_air( T:air:total_moles )
lowertemp.temperature = max( min(lowertemp.temperature-2000,lowertemp.temperature / 2) ,0)
lowertemp.react()
T.assume_air(lowertemp)
T.apply_fire_protection()
del(hotspot)
enzyme
@@ -350,8 +350,6 @@ datum
on_reaction(var/datum/reagents/holder, var/created_volume)
var/turf/location = get_turf(holder.my_atom.loc)
for(var/turf/simulated/floor/target_tile in range(0,location))
if(target_tile.parent && target_tile.parent.group_processing)
target_tile.parent.suspend_group_processing()
var/datum/gas_mixture/napalm = new
+9
View File
@@ -2912,6 +2912,15 @@
src.pixel_x = rand(-10.0, 10)
src.pixel_y = rand(-10.0, 10)
/obj/item/weapon/reagent_containers/food/drinks/waterbottle
name = "water bottle"
desc = "Straight from the ice lakes of Mars!"
icon_state = "waterbottle"
New()
..()
reagents.add_reagent("water", 30)
src.pixel_x = rand(-10.0, 10)
src.pixel_y = rand(-10.0, 10)
/obj/item/weapon/reagent_containers/food/drinks/sillycup
name = "Paper Cup"
+12
View File
@@ -28,6 +28,18 @@
protective_temperature = 10000
slowdown = 1.5
/obj/item/clothing/head/helmet/space/fire_helmet
name = "Fire Helmet"
desc = "A helmet designed to protect against fires in sealed areas, which often create extreme pressures."
flags = FPRINT | TABLEPASS | HEADSPACE | HEADCOVERSEYES | BLOCKHAIR
see_face = 0.0
permeability_coefficient = 0.01
heat_transfer_coefficient = 0.01
armor = list(melee = 0, bullet = 0, laser = 0,energy = 0, bomb = 0, bio = 100, rad = 50)
flags_inv = HIDEMASK|HIDEEARS|HIDEEYES
icon_state = "hazmat_firered"
item_state = "hazhat_firered"
/obj/item/clothing/head/radiation
+7 -1
View File
@@ -48,5 +48,11 @@
/obj/item/clothing/suit/storage/labcoat/fr_jacket
name = "first responder jacket"
desc = "\"The first moments are the most crucial.\""
desc = "A high-visibility jacket worn by medical first responders."
icon_state = "fr_jacket_open"
item_state = "fr_jacket"
/obj/item/clothing/suit/storage/labcoat/fr_jacket/sleeve
name = "first responder jacket"
desc = "A high-visibility jacket worn by medical first responders. Has rolled up sleeves."
icon_state = "fr_sleeve_open"
+1
View File
@@ -315,6 +315,7 @@
dug = 1
icon_plating = "asteroid_dug"
icon_state = "asteroid_dug"
return
else
..(W,user)
if ((istype(W,/obj/item/weapon/pickaxe/drill)))
@@ -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
+1 -2
View File
@@ -35,8 +35,7 @@
user << "\blue You put the [W] into the folder."
update_icon()
else if(istype(W, /obj/item/weapon/pen))
var/n_name = input(usr, "What would you like to label the folder?", "Folder Labelling", null) as text
n_name = copytext(n_name, 1, 32)
var/n_name = copytext(sanitize(input(usr, "What would you like to label the folder?", "Folder Labelling", null) as text),1,MAX_NAME_LEN)
if ((loc == usr && usr.stat == 0))
name = "folder[(n_name ? text("- '[n_name]'") : null)]"
return
+1 -4
View File
@@ -40,13 +40,10 @@
if(mode)
usr << "\blue You turn on the hand labeler."
//Now let them chose the text.
var/str = reject_bad_text(input(usr,"Label text?","Set label","")) //sanitize stuff! GOD DAMN THIS IS A SECURITY HOLE
var/str = copytext(reject_bad_text(input(usr,"Label text?","Set label","")),1,MAX_NAME_LEN)
if(!str || !length(str))
usr << "\red Invalid text."
return
if(length(str) > 64)
usr << "\red Text too long."
return
label = str
usr << "\blue You set the text to '[str]'."
else
+1 -1
View File
@@ -62,7 +62,7 @@
if ((usr.mutations & CLUMSY) && prob(50))
usr << "\red You cut yourself on the paper."
return
var/n_name = input(usr, "What would you like to label the paper?", "Paper Labelling", null) as text
var/n_name = copytext(sanitize(input(usr, "What would you like to label the paper?", "Paper Labelling", null) as text),1,MAX_NAME_LEN)
n_name = copytext(n_name, 1, 32)
if ((loc == usr && usr.stat == 0))
name = "paper[(n_name ? text("- '[n_name]'") : null)]"
@@ -1,6 +1,6 @@
/obj/item/weapon/gun/projectile/detective
desc = "A cheap Martian knock-off of a Smith & Wesson Model 10. Uses .38-Special rounds."
name = "\improper Revolver"
name = "revolver"
icon_state = "detective"
caliber = "357"
origin_tech = "combat=2;materials=2"
@@ -18,7 +18,8 @@
verb/rename_gun()
set name = "Name Gun"
set desc = "Click to rename your gun."
set category = "Object"
set desc = "Click to rename your gun. If you're the detective."
var/mob/M = usr
if(!M.mind) return 0
@@ -26,8 +27,7 @@
M << "\red You don't feel cool enough to name this gun, chump."
return 0
var/input = input("What do you want to name the gun?",,"")
input = sanitize(input)
var/input = copytext(sanitize(input("What do you want to name the gun?",,"")),1,MAX_NAME_LEN)
if(src && input && !M.stat && in_range(M,src))
name = input
@@ -38,7 +38,7 @@
/obj/item/weapon/gun/projectile/mateba
name = "\improper Mateba"
name = "mateba"
desc = "When you absolutely, positively need a 10mm hole in the other guy. Uses .357 ammo."
icon_state = "mateba"
origin_tech = "combat=2;materials=2"
@@ -48,6 +48,6 @@
M:Alienize()
if("human")
if (M.monkeyizing)
return
return
return
+8 -22
View File
@@ -52,26 +52,19 @@
else if(istype(W, /obj/item/weapon/pen))
switch(alert("What would you like to alter?",,"Title","Description", "Cancel"))
if("Title")
var/str = input(usr,"Label text?","Set label","")
var/str = copytext(sanitize(input(usr,"Label text?","Set label","")),1,MAX_NAME_LEN)
if(!str || !length(str))
usr << "\red Invalid text."
return
if(length(str) > 64)
usr << "\red Text too long."
return
var/label = str
for(var/mob/M in viewers())
M << "\blue [user] labels [src] as [label]."
src.name = "[src.name] ([label])"
M << "\blue [user] labels [src] as [str]."
src.name = "[src.name] ([str])"
update_icon()
if("Description")
var/str = input(usr,"Label text?","Set label","")
var/str = copytext(sanitize(input(usr,"Label text?","Set label","")),1,MAX_NAME_LEN)
if(!str || !length(str))
usr << "\red Invalid text."
return
if(length(str) > 64)
usr << "\red Text too long."
return
examtext = str
for(var/mob/M in viewers())
M << "\blue [user] labels [src] with the note: [examtext]."
@@ -128,26 +121,19 @@
else if(istype(W, /obj/item/weapon/pen))
switch(alert("What would you like to alter?",,"Title","Description", "Cancel"))
if("Title")
var/str = input(usr,"Label text?","Set label","")
var/str = copytext(sanitize(input(usr,"Label text?","Set label","")),1,MAX_NAME_LEN)
if(!str || !length(str))
usr << "\red Invalid text."
return
if(length(str) > 64)
usr << "\red Text too long."
return
var/label = str
for(var/mob/M in viewers())
M << "\blue [user] labels [src] as [label]."
src.name = "[src.name] ([label])"
M << "\blue [user] labels [src] as [str]."
src.name = "[src.name] ([str])"
update_icon()
if("Description")
var/str = input(usr,"Label text?","Set label","")
var/str = copytext(sanitize(input(usr,"Label text?","Set label","")),1,MAX_NAME_LEN)
if(!str || !length(str))
usr << "\red Invalid text."
return
if(length(str) > 64)
usr << "\red Text too long."
return
examtext = str
for(var/mob/M in viewers())
M << "\blue [user] labels [src] with the note: [examtext]."