Merge remote-tracking branch 'upstream/dev-freeze' into dev

Conflicts:
	code/game/objects/effects/decals/Cleanable/fuel.dm
	maps/exodus-5.dmm
This commit is contained in:
PsiOmega
2015-03-05 09:20:20 +01:00
25 changed files with 2719 additions and 2694 deletions
+7 -7
View File
@@ -50,21 +50,21 @@ proc/admin_proc()
NOTE: it checks usr! not src! So if you're checking somebody's rank in a proc which they did not call
you will have to do something like if(client.holder.rights & R_ADMIN) yourself.
*/
/proc/check_rights(rights_required, show_msg=1)
if(usr && usr.client)
/proc/check_rights(rights_required, show_msg=1, var/mob/user = usr)
if(user && user.client)
if(rights_required)
if(usr.client.holder)
if(rights_required & usr.client.holder.rights)
if(user.client.holder)
if(rights_required & user.client.holder.rights)
return 1
else
if(show_msg)
usr << "<font color='red'>Error: You do not have sufficient rights to do that. You require one of the following flags:[rights2text(rights_required," ")].</font>"
user << "<font color='red'>Error: You do not have sufficient rights to do that. You require one of the following flags:[rights2text(rights_required," ")].</font>"
else
if(usr.client.holder)
if(user.client.holder)
return 1
else
if(show_msg)
usr << "<font color='red'>Error: You are not an admin.</font>"
user << "<font color='red'>Error: You are not an admin.</font>"
return 0
//probably a bit iffy - will hopefully figure out a better solution
+55 -54
View File
@@ -1,54 +1,55 @@
proc/createRandomZlevel()
if(awaydestinations.len) //crude, but it saves another var!
return
var/list/potentialRandomZlevels = list()
world << "\red \b Searching for away missions..."
var/list/Lines = file2list("maps/RandomZLevels/fileList.txt")
if(!Lines.len) return
for (var/t in Lines)
if (!t)
continue
t = trim(t)
if (length(t) == 0)
continue
else if (copytext(t, 1, 2) == "#")
continue
var/pos = findtext(t, " ")
var/name = null
// var/value = null
if (pos)
// No, don't do lowertext here, that breaks paths on linux
name = copytext(t, 1, pos)
// value = copytext(t, pos + 1)
else
// No, don't do lowertext here, that breaks paths on linux
name = t
if (!name)
continue
potentialRandomZlevels.Add(name)
if(potentialRandomZlevels.len)
world << "\red \b Loading away mission..."
var/map = pick(potentialRandomZlevels)
var/file = file(map)
if(isfile(file))
maploader.load_map(file, load_speed = 100)
for(var/obj/effect/landmark/L in landmarks_list)
if (L.name != "awaystart")
continue
awaydestinations.Add(L)
world << "\red \b Away mission loaded."
else
world << "\red \b No away missions found."
return
proc/createRandomZlevel()
if(awaydestinations.len) //crude, but it saves another var!
return
var/list/potentialRandomZlevels = list()
world << "\red \b Searching for away missions..."
var/list/Lines = file2list("maps/RandomZLevels/fileList.txt")
if(!Lines.len) return
for (var/t in Lines)
if (!t)
continue
t = trim(t)
if (length(t) == 0)
continue
else if (copytext(t, 1, 2) == "#")
continue
var/pos = findtext(t, " ")
var/name = null
// var/value = null
if (pos)
// No, don't do lowertext here, that breaks paths on linux
name = copytext(t, 1, pos)
// value = copytext(t, pos + 1)
else
// No, don't do lowertext here, that breaks paths on linux
name = t
if (!name)
continue
potentialRandomZlevels.Add(name)
if(potentialRandomZlevels.len)
world << "\red \b Loading away mission..."
var/map = pick(potentialRandomZlevels)
var/file = file(map)
if(isfile(file))
maploader.load_map(file)
world.log << "away mission loaded: [map]"
for(var/obj/effect/landmark/L in landmarks_list)
if (L.name != "awaystart")
continue
awaydestinations.Add(L)
world << "\red \b Away mission loaded."
else
world << "\red \b No away missions found."
return
@@ -20,7 +20,7 @@
if(!isnull(seed.chems["pacid"]))
spawn(rand(5,25)) floor.ex_act(3)
continue
else if(!floor.Enter(src))
if(!Adjacent(floor))
continue
neighbors |= floor
// Update all of our friends.
@@ -60,11 +60,13 @@
if(buckled_mob)
return
if(!Adjacent(victim))
return
victim.buckled = src
victim.update_canmove()
buckled_mob = victim
var/turf/T = get_turf(src)
if(victim.loc != T && T.Enter(victim, get_turf(victim)))
if(victim.loc != get_turf(src))
src.visible_message("<span class='danger'>Tendrils lash out from \the [src] and drag \the [victim] in!</span>")
victim.loc = src.loc
victim << "<span class='danger'>Tendrils [pick("wind", "tangle", "tighten")] around you!</span>"
@@ -248,6 +248,15 @@
icon_state = "unathiknife"
attack_verb = list("ripped", "torn", "cut")
/obj/item/weapon/hatchet/tacknife
name = "tactical knife"
desc = "You'd be killing loads of people if this was Medal of Valor: Heroes of Nyx."
icon = 'icons/obj/weapons.dmi'
icon_state = "tacknife"
item_state = "knife"
attack_verb = list("stabbed", "chopped", "cut")
/obj/item/weapon/scythe
icon_state = "scythe0"
name = "scythe"
+1 -2
View File
@@ -53,10 +53,9 @@ dmm_suite{
*/
verb/load_map(var/dmm_file as file, var/z_offset as num, var/load_speed as num)
verb/load_map(var/dmm_file as file, var/z_offset as num)
// dmm_file: A .dmm file to load (Required).
// z_offset: A number representing the z-level on which to start loading the map (Optional).
// load_speed: How many tiles should be loaded per second, defaults to no pause (Optional)
verb/write_map(var/turf/t1 as turf, var/turf/t2 as turf, var/flags as num){
// t1: A turf representing one corner of a three dimensional grid (Required).
+41 -43
View File
@@ -600,32 +600,35 @@
// Hot air hurts :(
if((breath.temperature < species.cold_level_1 || breath.temperature > species.heat_level_1) && !(COLD_RESISTANCE in mutations))
if(breath.temperature < species.cold_level_1)
if(breath.temperature <= species.cold_level_1)
if(prob(20))
src << "<span class='danger'>You feel your face freezing and icicles forming in your lungs!</span>"
else if(breath.temperature > species.heat_level_1)
else if(breath.temperature >= species.heat_level_1)
if(prob(20))
src << "<span class='danger'>You feel your face burning and a searing heat in your lungs!</span>"
switch(breath.temperature)
if(-INFINITY to species.cold_level_3)
apply_damage(COLD_GAS_DAMAGE_LEVEL_3, BURN, "head", used_weapon = "Excessive Cold")
fire_alert = max(fire_alert, 1)
if(species.cold_level_3 to species.cold_level_2)
apply_damage(COLD_GAS_DAMAGE_LEVEL_2, BURN, "head", used_weapon = "Excessive Cold")
fire_alert = max(fire_alert, 1)
if(species.cold_level_2 to species.cold_level_1)
apply_damage(COLD_GAS_DAMAGE_LEVEL_1, BURN, "head", used_weapon = "Excessive Cold")
fire_alert = max(fire_alert, 1)
if(species.heat_level_1 to species.heat_level_2)
if(breath.temperature >= species.heat_level_1)
if(breath.temperature < species.heat_level_2)
apply_damage(HEAT_GAS_DAMAGE_LEVEL_1, BURN, "head", used_weapon = "Excessive Heat")
fire_alert = max(fire_alert, 2)
if(species.heat_level_2 to species.heat_level_3)
else if(breath.temperature < species.heat_level_3)
apply_damage(HEAT_GAS_DAMAGE_LEVEL_2, BURN, "head", used_weapon = "Excessive Heat")
fire_alert = max(fire_alert, 2)
if(species.heat_level_3 to INFINITY)
else
apply_damage(HEAT_GAS_DAMAGE_LEVEL_3, BURN, "head", used_weapon = "Excessive Heat")
fire_alert = max(fire_alert, 2)
else if(breath.temperature <= species.cold_level_1)
if(breath.temperature > species.cold_level_2)
apply_damage(COLD_GAS_DAMAGE_LEVEL_1, BURN, "head", used_weapon = "Excessive Cold")
fire_alert = max(fire_alert, 1)
else if(breath.temperature > species.cold_level_3)
apply_damage(COLD_GAS_DAMAGE_LEVEL_2, BURN, "head", used_weapon = "Excessive Cold")
fire_alert = max(fire_alert, 1)
else
apply_damage(COLD_GAS_DAMAGE_LEVEL_3, BURN, "head", used_weapon = "Excessive Cold")
fire_alert = max(fire_alert, 1)
//breathing in hot/cold air also heats/cools you a bit
var/temp_adj = breath.temperature - bodytemperature
@@ -695,43 +698,38 @@
//Use heat transfer as proportional to the gas density. However, we only care about the relative density vs standard 101 kPa/20 C air. Therefore we can use mole ratios
var/relative_density = environment.total_moles / MOLES_CELLSTANDARD
temp_adj *= relative_density
if (temp_adj > BODYTEMP_HEATING_MAX) temp_adj = BODYTEMP_HEATING_MAX
if (temp_adj < BODYTEMP_COOLING_MAX) temp_adj = BODYTEMP_COOLING_MAX
//world << "Environment: [loc_temp], [src]: [bodytemperature], Adjusting: [temp_adj]"
bodytemperature += temp_adj
bodytemperature += between(BODYTEMP_COOLING_MAX, temp_adj*relative_density, BODYTEMP_HEATING_MAX)
// +/- 50 degrees from 310.15K is the 'safe' zone, where no damage is dealt.
if(bodytemperature > species.heat_level_1)
if(bodytemperature >= species.heat_level_1)
//Body temperature is too hot.
fire_alert = max(fire_alert, 1)
if(status_flags & GODMODE) return 1 //godmode
switch(bodytemperature)
if(species.heat_level_1 to species.heat_level_2)
take_overall_damage(burn=HEAT_DAMAGE_LEVEL_1, used_weapon = "High Body Temperature")
fire_alert = max(fire_alert, 2)
if(species.heat_level_2 to species.heat_level_3)
take_overall_damage(burn=HEAT_DAMAGE_LEVEL_2, used_weapon = "High Body Temperature")
fire_alert = max(fire_alert, 2)
if(species.heat_level_3 to INFINITY)
take_overall_damage(burn=HEAT_DAMAGE_LEVEL_3, used_weapon = "High Body Temperature")
fire_alert = max(fire_alert, 2)
if(bodytemperature < species.heat_level_2)
take_overall_damage(burn=HEAT_DAMAGE_LEVEL_1, used_weapon = "High Body Temperature")
fire_alert = max(fire_alert, 2)
else if(bodytemperature < species.heat_level_3)
take_overall_damage(burn=HEAT_DAMAGE_LEVEL_2, used_weapon = "High Body Temperature")
fire_alert = max(fire_alert, 2)
else
take_overall_damage(burn=HEAT_DAMAGE_LEVEL_3, used_weapon = "High Body Temperature")
fire_alert = max(fire_alert, 2)
else if(bodytemperature < species.cold_level_1)
else if(bodytemperature <= species.cold_level_1)
fire_alert = max(fire_alert, 1)
if(status_flags & GODMODE) return 1 //godmode
if(!istype(loc, /obj/machinery/atmospherics/unary/cryo_cell))
switch(bodytemperature)
if(species.cold_level_2 to species.cold_level_1)
take_overall_damage(burn=COLD_DAMAGE_LEVEL_1, used_weapon = "High Body Temperature")
fire_alert = max(fire_alert, 1)
if(species.cold_level_3 to species.cold_level_2)
take_overall_damage(burn=COLD_DAMAGE_LEVEL_2, used_weapon = "High Body Temperature")
fire_alert = max(fire_alert, 1)
if(-INFINITY to species.cold_level_3)
take_overall_damage(burn=COLD_DAMAGE_LEVEL_3, used_weapon = "High Body Temperature")
fire_alert = max(fire_alert, 1)
if(bodytemperature > species.cold_level_2)
take_overall_damage(burn=COLD_DAMAGE_LEVEL_1, used_weapon = "High Body Temperature")
fire_alert = max(fire_alert, 1)
else if(bodytemperature > species.cold_level_3)
take_overall_damage(burn=COLD_DAMAGE_LEVEL_2, used_weapon = "High Body Temperature")
fire_alert = max(fire_alert, 1)
else
take_overall_damage(burn=COLD_DAMAGE_LEVEL_3, used_weapon = "High Body Temperature")
fire_alert = max(fire_alert, 1)
// Account for massive pressure differences. Done by Polymorph
// Made it possible to actually have something that can protect against high pressure... Done by Errorage. Polymorph now has an axe sticking from his head for his previous hardcoded nonsense!
@@ -678,7 +678,7 @@
taj_sideburns
name = "Tajara Sideburns"
icon_state = "facial_mutton"
icon_state = "facial_sideburns"
species_allowed = list("Tajara")
taj_mutton
+1 -1
View File
@@ -13,7 +13,7 @@
return STATUS_CLOSE // By default no mob can do anything with NanoUI
/mob/dead/observer/can_use_topic()
if(check_rights(R_ADMIN, 0))
if(check_rights(R_ADMIN, 0, src))
return STATUS_INTERACTIVE // Admins are more equal
return STATUS_UPDATE // Ghosts can view updates
+1 -1
View File
@@ -220,7 +220,7 @@
*/
/datum/nanomanager/proc/user_transferred(var/mob/oldMob, var/mob/newMob)
//testing("nanomanager/user_transferred from mob [oldMob.name] to mob [newMob.name]")
if (isnull(oldMob.open_uis) || !istype(oldMob.open_uis, /list) || open_uis.len == 0)
if (!oldMob || isnull(oldMob.open_uis) || !istype(oldMob.open_uis, /list) || open_uis.len == 0)
//testing("nanomanager/user_transferred mob [oldMob.name] has no open uis")
return 0 // has no open uis
+3 -3
View File
@@ -311,9 +311,9 @@ var/global/photo_count = 0
var/obj/item/weapon/photo/p = new/obj/item/weapon/photo()
p.name = name
p.icon = icon
p.tiny = tiny
p.img = img
p.icon = icon(icon, icon_state)
p.tiny = icon(tiny)
p.img = icon(img)
p.desc = desc
p.pixel_x = pixel_x
p.pixel_y = pixel_y
+10 -10
View File
@@ -82,27 +82,27 @@ proc/do_surgery(mob/living/carbon/M, mob/living/user, obj/item/tool)
return 0
if (user.a_intent == "harm") //check for Hippocratic Oath
return 0
if(M.op_stage.in_progress) //Can't operate on someone repeatedly.
user << "\red You can't operate on the patient while surgery is already in progress."
var/zone = user.zone_sel.selecting
if(zone in M.op_stage.in_progress) //Can't operate on someone repeatedly.
user << "\red You can't operate on this area while surgery is already in progress."
return 1
for(var/datum/surgery_step/S in surgery_steps)
//check if tool is right or close enough and if this step is possible
if(S.tool_quality(tool))
var/step_is_valid = S.can_use(user, M, user.zone_sel.selecting, tool)
var/step_is_valid = S.can_use(user, M, zone, tool)
if(step_is_valid && S.is_valid_target(M))
if(step_is_valid == 2) // This is a failure that already has a message for failing.
return 1
M.op_stage.in_progress = 1
S.begin_step(user, M, user.zone_sel.selecting, tool) //start on it
M.op_stage.in_progress += zone
S.begin_step(user, M, zone, tool) //start on it
//We had proper tools! (or RNG smiled.) and user did not move or change hands.
if(prob(S.tool_quality(tool)) && do_mob(user, M, rand(S.min_duration, S.max_duration)))
S.end_step(user, M, user.zone_sel.selecting, tool) //finish successfully
S.end_step(user, M, zone, tool) //finish successfully
else if ((tool in user.contents) && user.Adjacent(M)) //or
S.fail_step(user, M, user.zone_sel.selecting, tool) //malpractice~
S.fail_step(user, M, zone, tool) //malpractice~
else // This failing silently was a pain.
user << "\red You must remain close to your patient to conduct surgery."
M.op_stage.in_progress = 0 // Clear the in-progress flag.
M.op_stage.in_progress -= zone // Clear the in-progress flag.
if (ishuman(M))
var/mob/living/carbon/human/H = M
H.update_surgery()
@@ -134,4 +134,4 @@ proc/sort_surgeries()
var/face = 0
var/head_reattach = 0
var/current_organ = "organ"
var/in_progress = 0
var/list/in_progress = list()