Merged master into BEF.

Signed-off-by: Mloc-Argent <colmohici@gmail.com>
This commit is contained in:
Mloc-Argent
2013-05-06 15:43:50 +01:00
41 changed files with 271 additions and 139 deletions

View File

@@ -10,7 +10,7 @@
switch(href_list["makeAntag"])
if("1")
log_admin("[key_name(usr)] has spawned a traitor.")
if(!src.makeTratiors())
if(!src.makeTraitors())
usr << "\red Unfortunatly there were no candidates available"
if("2")
log_admin("[key_name(usr)] has spawned a changeling.")

View File

@@ -55,7 +55,7 @@ var/inactive_keys = "None<br>"
//run a query to get all ckeys inactive for over 2 months
var/list/inactive_ckeys = list()
if(ckeys_with_customitems.len)
var/DBQuery/query_inactive = dbcon.NewQuery("SELECT ckey, lastseen FROM erro_player WHERE datediff(Now(),lastseen) > 2")
var/DBQuery/query_inactive = dbcon.NewQuery("SELECT ckey, lastseen FROM erro_player WHERE datediff(Now(), lastseen) > 60")
query_inactive.Execute()
while(query_inactive.NextRow())
var/cur_ckey = query_inactive.item[1]

View File

@@ -11,7 +11,7 @@ client/proc/one_click_antag()
/datum/admins/proc/one_click_antag()
var/dat = {"<B>One-click Antagonist</B><br>
<a href='?src=\ref[src];makeAntag=1'>Make Tratiors</a><br>
<a href='?src=\ref[src];makeAntag=1'>Make Traitors</a><br>
<a href='?src=\ref[src];makeAntag=2'>Make Changlings</a><br>
<a href='?src=\ref[src];makeAntag=3'>Make Revs</a><br>
<a href='?src=\ref[src];makeAntag=4'>Make Cult</a><br>
@@ -53,7 +53,7 @@ client/proc/one_click_antag()
return 0
/datum/admins/proc/makeTratiors()
/datum/admins/proc/makeTraitors()
var/datum/game_mode/traitor/temp = new
if(config.protect_roles_from_antagonist)

View File

@@ -2,7 +2,7 @@
//SECURITY//
////////////
#define TOPIC_SPAM_DELAY 4 //4 ticks is about 3/10ths of a second
#define UPLOAD_LIMIT 1048576 //Restricts client uploads to the server to 1MB //Could probably do with being lower.
#define UPLOAD_LIMIT 10485760 //Restricts client uploads to the server to 10MB //Boosted this thing. What's the worst that can happen?
#define MIN_CLIENT_VERSION 0 //Just an ambiguously low version for now, I don't want to suddenly stop people playing.
//I would just like the code ready should it ever need to be used.
/*

View File

@@ -252,6 +252,7 @@ datum/preferences
dat += "Blood Type: <a href='byond://?src=\ref[user];preference=b_type;task=input'>[b_type]</a><br>"
dat += "Skin Tone: <a href='?_src_=prefs;preference=s_tone;task=input'>[-s_tone + 35]/220<br></a>"
//dat += "Skin pattern: <a href='byond://?src=\ref[user];preference=skin_style;task=input'>Adjust</a><br>"
dat += "Needs Glasses: <a href='?_src_=prefs;preference=disabilities'><b>[disabilities == 0 ? "No" : "Yes"]</b></a><br>"
dat += "Limbs: <a href='byond://?src=\ref[user];preference=limbs;task=input'>Adjust</a><br>"
//display limbs below
@@ -1008,6 +1009,9 @@ datum/preferences
else
gender = MALE
if("disabilities") //please note: current code only allows nearsightedness as a disability
disabilities = !disabilities//if you want to add actual disabilities, code that selects them should be here
if("hear_adminhelps")
toggles ^= SOUND_ADMINHELP

View File

@@ -237,6 +237,7 @@
S["sec_record"] << sec_record
S["player_alt_titles"] << player_alt_titles
S["be_special"] << be_special
S["disabilities"] << disabilities
S["used_skillpoints"] << used_skillpoints
S["skills"] << skills
S["skill_specialization"] << skill_specialization

View File

@@ -1,6 +1,7 @@
/obj/item/clothing
name = "clothing"
//Ears: currently only used for headsets and earmuffs
/obj/item/clothing/ears
name = "ears"

View File

@@ -19,6 +19,8 @@
vision_flags = SEE_TURFS
/obj/item/clothing/glasses/meson/prescription
name = "prescription mesons"
desc = "Optical Meson Scanner with prescription lenses."
prescription = 1
/obj/item/clothing/glasses/science
@@ -61,6 +63,7 @@
desc = "Made by Nerd. Co."
icon_state = "glasses"
item_state = "glasses"
prescription = 1
/obj/item/clothing/glasses/regular/hipster
name = "Prescription Glasses"
@@ -129,6 +132,7 @@
vision_flags = BLIND
/obj/item/clothing/glasses/sunglasses/prescription
name = "prescription sunglasses"
prescription = 1
/obj/item/clothing/glasses/sunglasses/big

View File

@@ -97,6 +97,7 @@
return
/mob/living/carbon/electrocute_act(var/shock_damage, var/obj/source, var/siemens_coeff = 1.0)
if(status_flags & GODMODE) return 0 //godmode
shock_damage *= siemens_coeff
if (shock_damage<1)
return 0
@@ -384,13 +385,13 @@
item.layer = initial(item.layer)
u_equip(item)
update_icons()
//if(src.client)
//src.client.screen -= item
//item.loc = src.loc
//if(istype(item, /obj/item))
//item:dropped(src) // let it know it's been dropped
if (istype(usr, /mob/living/carbon/monkey)) //Check if a monkey is throwing. Modify/remove this line as required.
item.loc = src.loc
if(src.client)
src.client.screen -= item
if(istype(item, /obj/item))
item:dropped(src) // let it know it's been dropped
//actually throw it!
if (item)

View File

@@ -450,6 +450,7 @@
SA.moles = 0
if( (abs(310.15 - breath.temperature) > 50) && !(COLD_RESISTANCE in mutations)) // Hot air hurts :(
if(status_flags & GODMODE) return 1 //godmode
if(breath.temperature < 260.15)
if(prob(20))
src << "\red You feel your face freezing and an icicle forming in your lungs!"
@@ -518,6 +519,7 @@
if(bodytemperature > BODYTEMP_HEAT_DAMAGE_LIMIT)
//Body temperature is too hot.
fire_alert = max(fire_alert, 1)
if(status_flags & GODMODE) return 1 //godmode
switch(bodytemperature)
if(360 to 400)
apply_damage(HEAT_DAMAGE_LEVEL_1, BURN, used_weapon = "High Body Temperature")
@@ -531,6 +533,7 @@
else if(bodytemperature < BODYTEMP_COLD_DAMAGE_LIMIT)
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(200 to 260)
@@ -548,6 +551,7 @@
var/pressure = environment.return_pressure()
var/adjusted_pressure = calculate_affecting_pressure(pressure) //Returns how much pressure actually affects the mob.
if(status_flags & GODMODE) return 1 //godmode
switch(adjusted_pressure)
if(HAZARD_HIGH_PRESSURE to INFINITY)
adjustBruteLoss( min( ( (adjusted_pressure / HAZARD_HIGH_PRESSURE) -1 )*PRESSURE_DAMAGE_COEFFICIENT , MAX_HIGH_PRESSURE_DAMAGE) )
@@ -783,8 +787,8 @@
var/total_plasmaloss = 0
for(var/obj/item/I in src)
if(I.contaminated)
total_plasmaloss += vsc.plc.CONTAMINATION_LOSS
total_plasmaloss += vsc.plc.CONTAMINATION_LOSS
if(status_flags & GODMODE) return 0 //godmode
adjustToxLoss(total_plasmaloss)
// if(dna && dna.mutantrace == "plant") //couldn't think of a better place to place it, since it handles nutrition -- Urist
@@ -1223,8 +1227,14 @@
if(blinded) blind.layer = 18
else blind.layer = 0
if( disabilities & NEARSIGHTED && !istype(glasses, /obj/item/clothing/glasses/regular) )
client.screen += global_hud.vimpaired
if(disabilities & NEARSIGHTED) //this looks meh but saves a lot of memory by not requiring to add var/prescription
if(glasses) //to every /obj/item
var/obj/item/clothing/glasses/G = glasses
if(!G.prescription)
client.screen += global_hud.vimpaired
else
client.screen += global_hud.vimpaired
if(eye_blurry) client.screen += global_hud.blurry
if(druggy) client.screen += global_hud.druggy
@@ -1270,6 +1280,7 @@
playsound_local(src,pick(scarySounds),50, 1, -1)
proc/handle_virus_updates()
if(status_flags & GODMODE) return 0 //godmode
if(bodytemperature > 406)
for(var/datum/disease/D in viruses)
D.cure()
@@ -1319,7 +1330,7 @@
handle_shock()
..()
if(status_flags & GODMODE) return 0 //godmode
if(analgesic) return // analgesic avoids all traumatic shock temporarily
if(health < 0)// health 0 makes you immediately collapse

View File

@@ -228,6 +228,7 @@
// damage ONE external organ, organ gets randomly selected from damaged ones.
/mob/living/proc/take_organ_damage(var/brute, var/burn)
if(status_flags & GODMODE) return 0 //godmode
adjustBruteLoss(brute)
adjustFireLoss(burn)
src.updatehealth()
@@ -240,6 +241,7 @@
// damage MANY external organs, in random order
/mob/living/proc/take_overall_damage(var/brute, var/burn, var/used_weapon = null)
if(status_flags & GODMODE) return 0 //godmode
adjustBruteLoss(brute)
adjustFireLoss(burn)
src.updatehealth()

View File

@@ -234,16 +234,12 @@ var/list/ai_list = list()
/mob/living/silicon/ai/proc/ai_roster()
set category = "AI Commands"
set name = "Show Crew Manifest"
var/dat = "<html><head><title>Crew Roster</title></head><body><b>Crew Roster:</b><br><br>"
var/list/L = list()
for (var/datum/data/record/t in data_core.general)
var/R = t.fields["name"] + " - " + t.fields["rank"]
L += R
for(var/R in sortList(L))
dat += "[R]<br>"
dat += "</body></html>"
var/dat
dat += "<h4>Crew Manifest</h4>"
if(data_core)
dat += data_core.get_manifest(0) // make it monochrome
dat += "<br>"
src << browse(dat, "window=airoster")
onclose(src, "airoster")
@@ -743,4 +739,4 @@ var/list/ai_list = list()
anchored = 1
return
else
return ..()
return ..()

View File

@@ -413,14 +413,9 @@
/mob/living/silicon/pai/proc/softwareManifest()
var/dat = ""
dat += "<h2>Crew Manifest</h2><br><br>"
var/list/L = list()
if(!isnull(data_core.general))
for (var/datum/data/record/t in sortRecord(data_core.general))
var/R = t.fields["name"] + " - " + t.fields["rank"]
L += R
for(var/R in sortList(L))
dat += "[R]<br>"
dat += "</body></html>"
if(data_core)
dat += data_core.get_manifest(0) // make it monochrome
dat += "<br>"
return dat
// Medical Records

View File

@@ -74,6 +74,9 @@
// if(!istype(V,/obj/machinery/atmoalter/siphs/fullairsiphon/air_vent))
// return
if(src.stat != CONSCIOUS) return
var/obj/machinery/atmospherics/unary/vent_pump/vent_found
var/welded = 0
for(var/obj/machinery/atmospherics/unary/vent_pump/v in range(1,src))

View File

@@ -170,7 +170,7 @@
//This is just a commonly used configuration for the equip_to_slot_if_possible() proc, used to equip people when the rounds tarts and when events happen and such.
/mob/proc/equip_to_slot_or_del(obj/item/W as obj, slot)
equip_to_slot_if_possible(W, slot, 1, 1, 0)
return equip_to_slot_if_possible(W, slot, 1, 1, 0)
//The list of slots by priority. equip_to_appropriate_slot() uses this list. Doesn't matter if a mob type doesn't have a slot.
var/list/slot_equipment_priority = list( \

View File

@@ -365,6 +365,10 @@
new_character.dna.ready_dna(new_character)
new_character.dna.b_type = client.prefs.b_type
if(client.prefs.disabilities)
new_character.dna.struc_enzymes = setblock(new_character.dna.struc_enzymes,GLASSESBLOCK,toggledblock(getblock(new_character.dna.struc_enzymes,GLASSESBLOCK,3)),3)
new_character.disabilities |= NEARSIGHTED
new_character.key = key //Manually transfer the key to log them in
return new_character

View File

@@ -558,6 +558,9 @@ datum/preferences
else if(backbag == 3 || backbag == 4)
clothes_s.Blend(new /icon('icons/mob/back.dmi', "satchel"), ICON_OVERLAY)
if(disabilities & NEARSIGHTED)
clothes_s.Blend(new /icon('icons/mob/eyes.dmi', "glasses"), ICON_OVERLAY)
preview_icon.Blend(eyes_s, ICON_OVERLAY)
if(clothes_s)
preview_icon.Blend(clothes_s, ICON_OVERLAY)

View File

@@ -5,10 +5,10 @@
desc = "It's a high efficiency thermoelectric generator."
icon_state = "teg"
density = 1
use_power = 0
anchored = 0
idle_power_usage = 50
active_power_usage = 1000
use_power = 1
idle_power_usage = 100 //Watts, I hope. Just enough to do the computer and display things.
var/obj/machinery/atmospherics/binary/circulator/circ1
var/obj/machinery/atmospherics/binary/circulator/circ2
@@ -57,7 +57,7 @@
if(lastgenlev != 0)
overlays += image('icons/obj/power.dmi', "teg-op[lastgenlev]")
#define GENRATE 800 // generator output coefficient from Q
/obj/machinery/power/generator/process()
@@ -87,13 +87,9 @@
//world << "delta_temperature = [delta_temperature]; air1_heat_capacity = [air1_heat_capacity]; air2_heat_capacity = [air2_heat_capacity]"
if(delta_temperature > 0 && air1_heat_capacity > 0 && air2_heat_capacity > 0)
use_power = 2
var/efficiency = 0.65
var/energy_transfer = delta_temperature*air2_heat_capacity*air1_heat_capacity/(air2_heat_capacity+air1_heat_capacity)
var/heat = energy_transfer*(1-efficiency)
lastgen = energy_transfer*efficiency
//world << "lastgen = [lastgen]; heat = [heat]; delta_temperature = [delta_temperature]; air2_heat_capacity = [air2_heat_capacity]; air1_heat_capacity = [air1_heat_capacity];"
if(air2.temperature > air1.temperature)
air2.temperature = air2.temperature - energy_transfer/air2_heat_capacity
@@ -102,28 +98,20 @@
air2.temperature = air2.temperature + heat/air2_heat_capacity
air1.temperature = air1.temperature - energy_transfer/air1_heat_capacity
//world << "POWER: [lastgen] W generated at [efficiency*100]% efficiency and sinks sizes [air1_heat_capacity], [air2_heat_capacity]"
lastgen = circ1.ReturnPowerGeneration() + circ2.ReturnPowerGeneration()
if(lastgen > 0)
add_avail(lastgen)
add_avail(lastgen)
if(air1)
circ1.air2.merge(air1)
if(air2)
circ2.air2.merge(air2)
else
add_load(-lastgen)
// update icon overlays and power usage only if displayed level has changed
var/genlev = max(0, min( round(11*lastgen / 100000), 11))
if(genlev != lastgenlev)
lastgenlev = genlev
active_power_usage = lastgenlev * 1000
if(lastgenlev > 0)
use_power = 2
else
use_power = 1
updateicon()
src.updateDialog()
updateDialog()
/obj/machinery/power/generator/attack_ai(mob/user)
if(stat & (BROKEN|NOPOWER)) return
@@ -162,12 +150,15 @@
t += "Inlet Temperature: [round(circ1.air1.temperature, 0.1)] K<BR>"
t += "Outlet Pressure: [round(circ1.air2.return_pressure(), 0.1)] kPa<BR>"
t += "Outlet Temperature: [round(circ1.air2.temperature, 0.1)] K<BR>"
t += "Turbine Status: <A href='?src=\ref[src];turbine1=1'>[circ1.turbine_pumping ? "Pumping" : "Generating"]</a><br><br>"
t += "<B>Secondary Circulator (bottom/left)</B><BR>"
t += "Inlet Pressure: [round(circ2.air1.return_pressure(), 0.1)] kPa<BR>"
t += "Inlet Temperature: [round(circ2.air1.temperature, 0.1)] K<BR>"
t += "Outlet Pressure: [round(circ2.air2.return_pressure(), 0.1)] kPa<BR>"
t += "Outlet Temperature: [round(circ2.air2.temperature, 0.1)] K<BR>"
t += "Turbine Status: <A href='?src=\ref[src];turbine2=1'>[circ2.turbine_pumping ? "Pumping" : "Generating"]</a><br>"
else
t += "Unable to connect to circulators.<br>"
t += "Ensure both are in position and wrenched into place."
@@ -187,6 +178,15 @@
usr << browse(null, "window=teg")
usr.unset_machine()
return 0
if( href_list["turbine2"] )
if(circ2)
circ2.turbine_pumping = !circ2.turbine_pumping
if( href_list["turbine1"] )
if(circ1)
circ1.turbine_pumping = !circ1.turbine_pumping
updateDialog()
return 1
@@ -196,12 +196,22 @@
updateicon()
/obj/machinery/power/generator/verb/rotate()
/obj/machinery/power/generator/verb/rotate_clock()
set category = "Object"
set name = "Rotate Generator"
set name = "Rotate Generator (Clockwise)"
set src in view(1)
if (usr.stat || usr.restrained() || anchored)
return
src.dir = turn(src.dir, 90)
/obj/machinery/power/generator/verb/rotate_anticlock()
set category = "Object"
set name = "Rotate Generator (Counterclockwise)"
set src in view(1)
if (usr.stat || usr.restrained() || anchored)
return
src.dir = turn(src.dir, -90)

View File

@@ -341,8 +341,9 @@
P.icon_state = "pill"+pillsprite
reagents.trans_to(P,50)
if(src.loaded_pill_bottle)
P.loc = src.loaded_pill_bottle
src.updateUsrDialog()
if(loaded_pill_bottle.contents.len < loaded_pill_bottle.storage_slots)
P.loc = loaded_pill_bottle
src.updateUsrDialog()
else if (href_list["createbottle"])
if(!condi)
var/name = reject_bad_text(input(usr,"Name:","Name your bottle!",reagents.get_master_reagent_name()))

View File

@@ -1136,26 +1136,15 @@ datum
reagent_state = LIQUID
color = "#660000" // rgb: 102, 0, 0
//Commenting this out as it's horribly broken. It's a neat effect though, so it might be worth making a new reagent (that is less common) with similar effects. -Pete
/*
reaction_obj(var/obj/O, var/volume)
src = null
var/turf/the_turf = get_turf(O)
if(!the_turf)
return //No sense trying to start a fire if you don't have a turf to set on fire. --NEO
var/datum/gas_mixture/napalm = new
var/datum/gas/volatile_fuel/fuel = new
fuel.moles = 15
napalm.trace_gases += fuel
the_turf.assume_air(napalm)
new /obj/effect/decal/cleanable/liquid_fuel(the_turf, volume)
reaction_turf(var/turf/T, var/volume)
src = null
var/datum/gas_mixture/napalm = new
var/datum/gas/volatile_fuel/fuel = new
fuel.moles = 15
napalm.trace_gases += fuel
T.assume_air(napalm)
return*/
new /obj/effect/decal/cleanable/liquid_fuel(T, volume)
return
on_mob_life(var/mob/living/M as mob)
if(!M) M = holder.my_atom
M.adjustToxLoss(1)

View File

@@ -385,8 +385,10 @@ datum
for(var/turf/simulated/floor/target_tile in range(0,location))
var/datum/gas_mixture/napalm = new
var/datum/gas/volatile_fuel/fuel = new
fuel.moles = created_volume
napalm.trace_gases += fuel
napalm.toxins = created_volume*10
napalm.temperature = 400+T0C
napalm.update_values()

View File

@@ -595,7 +595,7 @@ datum/design/posibrain
build_type = PROTOLATHE
materials = list("$metal" = 2000, "$glass" = 1000, "$silver" = 1000, "$gold" = 500, "$plasma" = 500, "$diamond" = 100)
build_path = "/obj/item/device/posibrain"
build_path = "/obj/item/device/mmi/posibrain"
///////////////////////////////////
//////////Mecha Module Disks///////