Merge branch 'master' of https://github.com/tgstation/-tg-station into shotglasseshowdotheywork

This commit is contained in:
TheVekter
2015-02-10 12:06:04 -06:00
86 changed files with 9785 additions and 9114 deletions
+3 -1
View File
@@ -114,7 +114,9 @@ var/list/admin_verbs_debug = list(
/client/proc/restart_controller,
/client/proc/enable_debug_verbs,
/client/proc/callproc,
/client/proc/SDQL2_query
/client/proc/SDQL2_query,
/client/proc/test_movable_UI,
/client/proc/test_snap_UI
)
var/list/admin_verbs_possess = list(
/proc/possess,
+7 -6
View File
@@ -465,20 +465,21 @@ client/proc/one_click_antag()
//Spawn and equip the officer
var/mob/living/carbon/human/ERTOperative = new(spawnloc)
var/list/lastname = last_names
chosen_candidate.client.prefs.copy_to(ERTOperative)
ready_dna(ERTOperative)
switch(numagents)
if(1)
ERTOperative.real_name = "Commander [pick(ERTOperative.real_name)]"
ERTOperative.real_name = "Commander [pick(lastname)]"
equip_emergencyresponsesquad(ERTOperative, "commander")
if(2 || 5)
ERTOperative.real_name = "Officer [pick(ERTOperative.real_name)]"
ERTOperative.real_name = "Security Officer [pick(lastname)]"
equip_emergencyresponsesquad(ERTOperative, "sec")
if(3 || 6)
ERTOperative.real_name = "Officer [pick(ERTOperative.real_name)]"
ERTOperative.real_name = "Medical Officer [pick(lastname)]"
equip_emergencyresponsesquad(ERTOperative, "med")
if(4 || 7)
ERTOperative.real_name = "Officer [pick(ERTOperative.real_name)]"
ERTOperative.real_name = "Engineer [pick(lastname)]"
equip_emergencyresponsesquad(ERTOperative, "eng")
ERTOperative.key = chosen_candidate.key
ERTOperative.mind.assigned_role = "ERT"
@@ -493,7 +494,7 @@ client/proc/one_click_antag()
ERTOperative.mind.objectives += missionobj
//Greet the commando
ERTOperative << "<B><font size=3 color=red>You are the [numagents==1?"Emergency Response Team Commander":"Emergency Response Officer"].</font></B>"
ERTOperative << "<B><font size=3 color=red>You are [numagents==1?"the Emergency Response Team Commander":"an Emergency Response Officer"].</font></B>"
var/missiondesc = "Your squad is being sent on a mission to [station_name()] by Nanotrasen's Security Division."
if(numagents == 1) //If Squad Leader
missiondesc += " Lead your squad to ensure the completion of the mission. Avoid civilian casualites when possible. Board the shuttle when your team is ready."
@@ -505,7 +506,7 @@ client/proc/one_click_antag()
//Logging and cleanup
if(numagents == 1)
message_admins("The emergency response team has spawned with the mission: [mission].")
log_game("[key_name(ERTOperative)] has been selected as a Emergency Response Officer")
log_game("[key_name(ERTOperative)] has been selected as an Emergency Response Officer")
spawnpoints -= spawnloc
numagents--
+1 -1
View File
@@ -150,7 +150,7 @@
prefs.save_preferences()
src << "Others can[(prefs.toggles & MEMBER_PUBLIC) ? "" : "not"] see whether you are a byond member."
var/list/ghost_forms = list("ghost","ghostking","ghostian2","ghost_red","ghost_black", \
var/list/ghost_forms = list("ghost","ghostking","ghostian2","skeleghost","ghost_red","ghost_black", \
"ghost_blue","ghost_yellow","ghost_green","ghost_pink", \
"ghost_cyan","ghost_dblue","ghost_dred","ghost_dgreen", \
"ghost_dcyan","ghost_grey","ghost_dyellow","ghost_dpink")
+1 -1
View File
@@ -40,7 +40,7 @@
icon_state = "securityhud"
hud_type = DATA_HUD_SECURITY_ADVANCED
/obj/item/clothing/glasses/hud/security/eyepatch
/obj/item/clothing/glasses/hud/security/sunglasses/eyepatch
name = "Eyepatch HUD"
desc = "A heads-up display that connects directly to the optical nerve of the user, replacing the need for that useless eyeball."
icon_state = "hudpatch"
+2 -1
View File
@@ -13,7 +13,8 @@
strip_delay = 60
/obj/item/clothing/head/helmet/alt
desc = "A bulletproof helmet that excels in protecting the wearer against traditional projectile weaponry and explosives to a minor extent."
name = "bulletproof helmet"
desc = "A bulletproof combat helmet that excels in protecting the wearer against traditional projectile weaponry and explosives to a minor extent."
icon_state = "helmetalt"
item_state = "helmetalt"
armor = list(melee = 25, bullet = 80, laser = 10, energy = 10, bomb = 40, bio = 0, rad = 0)
-8
View File
@@ -16,14 +16,6 @@
blood_overlay_type = "armor"
armor = list(melee = 50, bullet = 15, laser = 50, energy = 10, bomb = 25, bio = 0, rad = 0)
/obj/item/clothing/suit/armor/vest/alt
name = "armor"
desc = "An armored vest that protects against most types of damage. This is a civilian variant."
icon_state = "armoralt"
item_state = "armoralt"
blood_overlay_type = "armor"
armor = list(melee = 50, bullet = 15, laser = 50, energy = 10, bomb = 25, bio = 0, rad = 0)
/obj/item/clothing/suit/armor/hos
name = "armored greatcoat"
desc = "A greatcoat enchanced with a special alloy for some protection and style for those with a commanding presence."
+19 -12
View File
@@ -10,19 +10,19 @@
*/
/obj/item/clothing/under/rank/security
name = "security suit"
desc = "A formal security suit for officers complete with nanotrasen belt buckle."
name = "security jumpsuit"
desc = "A tactical security jumpsuit for officers complete with nanotrasen belt buckle."
icon_state = "security"
item_state = "gy_suit"
item_state = "r_suit"
item_color = "security"
armor = list(melee = 10, bullet = 0, laser = 0,energy = 0, bomb = 0, bio = 0, rad = 0)
strip_delay = 50
/obj/item/clothing/under/rank/warden
name = "warden's suit"
desc = "A formal security suit for the warden with blue desginations and '/Warden/' stiched into the shoulders."
name = "warden's jumpsuit"
desc = "A tactical security jumpsuit for the warden with silver desginations and '/Warden/' stiched into the shoulders."
icon_state = "warden"
item_state = "gy_suit"
item_state = "r_suit"
item_color = "warden"
armor = list(melee = 10, bullet = 0, laser = 0,energy = 0, bomb = 0, bio = 0, rad = 0)
strip_delay = 50
@@ -50,20 +50,27 @@
* Head of Security
*/
/obj/item/clothing/under/rank/head_of_security
name = "head of security's suit"
desc = "A security suit decorated for those few with the dedication to achieve the position of Head of Security."
name = "head of security's jumpsuit"
desc = "A security jumpsuit decorated for those few with the dedication to achieve the position of Head of Security."
icon_state = "hos"
item_state = "gy_suit"
item_state = "r_suit"
item_color = "hos"
armor = list(melee = 10, bullet = 0, laser = 0,energy = 0, bomb = 0, bio = 0, rad = 0)
strip_delay = 60
/obj/item/clothing/under/rank/head_of_security/alt
name = "head of security's turtleneck"
desc = "A stylish alternative to the normal head of security jumpsuit, complete with tactical pants."
icon_state = "hosalt"
item_state = "bl_suit"
item_color = "hosalt"
/*
* Navy uniforms
*/
/obj/item/clothing/under/rank/security/navyblue
name = "security officer's uniform"
name = "security officer's formal uniform"
desc = "The latest in fashionable security outfits."
icon_state = "officerblueclothes"
item_state = "officerblueclothes"
@@ -71,14 +78,14 @@
/obj/item/clothing/under/rank/head_of_security/navyblue
desc = "The insignia on this uniform tells you that this uniform belongs to the Head of Security."
name = "head of security's uniform"
name = "head of security's formal uniform"
icon_state = "hosblueclothes"
item_state = "hosblueclothes"
item_color = "hosblueclothes"
/obj/item/clothing/under/rank/warden/navyblue
desc = "The insignia on this uniform tells you that this uniform belongs to the Warden."
name = "warden's uniform"
name = "warden's formal uniform"
icon_state = "wardenblueclothes"
item_state = "wardenblueclothes"
item_color = "wardenblueclothes"
+4
View File
@@ -161,6 +161,7 @@
dat += "Medical belt: <A href='?src=\ref[src];create=mbelt;amount=1'>Make</A> ([300/efficiency])<BR>"
dat += "Janitorial belt: <A href='?src=\ref[src];create=jbelt;amount=1'>Make</A> ([300/efficiency])<BR>"
dat += "Bandolier belt: <A href='?src=\ref[src];create=bbelt;amount=1'>Make</A> ([300/efficiency])<BR>"
dat += "Shoulder holster: <A href='?src=\ref[src];create=sholster;amount=1'>Make</A> ([400/efficiency])<BR>"
dat += "Leather Satchel: <A href='?src=\ref[src];create=satchel;amount=1'>Make</A> ([400/efficiency])<BR>"
dat += "Leather Jacket: <A href='?src=\ref[src];create=jacket;amount=1'>Make</A> ([500/efficiency])<BR>"
dat += "</div>"
@@ -283,6 +284,9 @@
if("bbelt")
if (check_cost(300/efficiency)) return 0
else new/obj/item/weapon/storage/belt/bandolier(src.loc)
if("sholster")
if (check_cost(400/efficiency)) return 0
else new/obj/item/weapon/storage/belt/holster(src.loc)
if("satchel")
if (check_cost(400/efficiency)) return 0
else new/obj/item/weapon/storage/backpack/satchel(src.loc)
+4 -4
View File
@@ -161,8 +161,8 @@
I.loc = src
inserted_id = I
else usr << "<span class='warning'>No valid ID.</span>"
if(href_list["release"] && istype(inserted_id))
if(check_access(inserted_id))
if(href_list["release"])
if(check_access(inserted_id) || usr.has_unlimited_silicon_privilege)
if(!(text2path(href_list["release"]) in stack_list)) return
var/obj/item/stack/sheet/inp = stack_list[text2path(href_list["release"])]
var/obj/item/stack/sheet/out = new inp.type()
@@ -173,8 +173,8 @@
unload_mineral(out)
else
usr << "<span class='warning'>Required access not found.</span>"
if(href_list["plasteel"] && istype(inserted_id))
if(check_access(inserted_id))
if(href_list["plasteel"])
if(check_access(inserted_id) || usr.has_unlimited_silicon_privilege)
if(!(/obj/item/stack/sheet/metal in stack_list)) return
if(!(/obj/item/stack/sheet/mineral/plasma in stack_list)) return
var/obj/item/stack/sheet/metalstack = stack_list[/obj/item/stack/sheet/metal]
@@ -159,8 +159,7 @@ var/const/BLOOD_VOLUME_SURVIVE = 122
B.data["resistances"] = src.resistances.Copy()
var/list/temp_chem = list()
for(var/datum/reagent/R in src.reagents.reagent_list)
temp_chem += R.name
temp_chem[R.name] = R.volume
temp_chem[R.id] = R.volume
B.data["trace_chem"] = list2params(temp_chem)
if(mind)
B.data["mind"] = src.mind
@@ -206,7 +205,7 @@ var/const/BLOOD_VOLUME_SURVIVE = 122
container.reagents.remove_reagent("blood", amount)
//Transfers blood from container to vessels, respecting blood types compatability.
//Transfers blood from container to vessels, respecting blood types compatibility.
/mob/living/carbon/human/inject_blood(obj/item/weapon/reagent_containers/container, var/amount)
var/datum/reagent/blood/injected = get_blood(container.reagents)
@@ -622,7 +622,7 @@
gain = 100
if(mind.assigned_role == "Clown")
gain = rand(-300, 300)
investigate_log(" has consumed [key_name(src)].","singulo") //Oh that's where the clown ended up!
investigate_log("([key_name(src)]) has been consumed by the singularity.","singulo") //Oh that's where the clown ended up!
gib()
return(gain)
@@ -37,6 +37,7 @@
var/hair_color = null // this allows races to have specific hair colors... if null, it uses the H's hair/facial hair colors. if "mutcolor", it uses the H's mutant_color
var/hair_alpha = 255 // the alpha used by the hair. 255 is completely solid, 0 is transparent.
var/use_skintones = 0 // does it use skintones or not? (spoiler alert this is only used by humans)
var/exotic_blood = null // If your race wants to bleed something other than bog standard blood, change this.
var/meat = /obj/item/weapon/reagent_containers/food/snacks/meat/human //What the species drops on gibbing
var/list/no_equip = list() // slots the race can't equip stuff to
var/nojumpsuit = 0 // this is sorta... weird. it basically lets you equip stuff that usually needs jumpsuits without one, like belts and pockets and ids
@@ -158,7 +158,33 @@
hair_alpha = 150
ignored_by = list(/mob/living/carbon/slime)
meat = /obj/item/weapon/reagent_containers/food/snacks/meat/human/mutant/slime
exotic_blood = /datum/reagent/toxin/slimejelly
var/recently_changed = 1
/datum/species/slime/spec_life(mob/living/carbon/human/H)
if(!H.reagents.get_reagent_amount("slimejelly"))
if(recently_changed)
H.reagents.add_reagent("slimejelly", 80)
recently_changed = 0
else
H.reagents.add_reagent("slimejelly", 5)
H.adjustBruteLoss(5)
H << "<span class='danger'>You feel empty!</span>"
for(var/datum/reagent/toxin/slimejelly/S in H.reagents.reagent_list)
if(S.volume < 100)
if(H.nutrition >= NUTRITION_LEVEL_STARVING)
H.reagents.add_reagent("slimejelly", 0.5)
H.nutrition -= 5
if(S.volume < 50)
if(prob(5))
H << "<span class='danger'>You feel drained!</span>"
if(S.volume < 10)
H.losebreath++
/datum/species/slime/handle_chemicals(datum/reagent/chem, mob/living/carbon/human/H)
if(chem.id == "slimejelly")
return 1
/*
JELLYPEOPLE
*/
@@ -172,7 +198,32 @@
eyes = "jelleyes"
specflags = list(MUTCOLORS,EYECOLOR,NOBLOOD)
meat = /obj/item/weapon/reagent_containers/food/snacks/meat/human/mutant/slime
exotic_blood = /datum/reagent/toxin/slimejelly
var/recently_changed = 1
/datum/species/jelly/spec_life(mob/living/carbon/human/H)
if(!H.reagents.get_reagent_amount("slimejelly"))
if(recently_changed)
H.reagents.add_reagent("slimejelly", 80)
recently_changed = 0
else
H.reagents.add_reagent("slimejelly", 5)
H.adjustBruteLoss(5)
H << "<span class='danger'>You feel empty!</span>"
for(var/datum/reagent/toxin/slimejelly/S in H.reagents.reagent_list)
if(S.volume < 100)
if(H.nutrition >= NUTRITION_LEVEL_STARVING)
H.reagents.add_reagent("slimejelly", 0.5)
H.nutrition -= 5
else if(prob(5))
H << "<span class='danger'>You feel drained!</span>"
if(S.volume < 10)
H.losebreath++
/datum/species/jelly/handle_chemicals(datum/reagent/chem, mob/living/carbon/human/H)
if(chem.id == "slimejelly")
return 1
/*
GOLEMS
*/
+1 -1
View File
@@ -774,7 +774,7 @@ Sorry Giacom. Please don't be mad :(
/mob/living/singularity_act()
var/gain = 20
investigate_log(" has consumed [key_name(src)].","singulo") //Oh that's where the clown ended up!
investigate_log("([key_name(src)]) has been consumed by the singularity.","singulo") //Oh that's where the clown ended up!
gib()
return(gain)
+1 -1
View File
@@ -230,7 +230,7 @@ var/list/ai_list = list()
borg_area = get_area(R)
//Name, Health, Battery, Module, Area, and Status! Everything an AI wants to know about its borgies!
stat(null, text("[R.name] | S.Integrity: [R.health]% | Cell: [R.cell ? "[R.cell.charge]/[R.cell.maxcharge]" : "Empty"] | \
Module: [R.designation] | Loc: [borg_area.name] | Status: [R.stat ? "Offline" : "Normal"]"))
Module: [R.designation] | Loc: [borg_area.name] | Status: [R.stat || !R.client ? "OFFLINE" : "Normal"]"))
else
stat(null, text("Systems nonfunctional"))
@@ -23,10 +23,8 @@ var/datum/cameranet/cameranet = new()
// Returns the chunk in the x, y, z.
// If there is no chunk, it creates a new chunk and returns that.
/datum/cameranet/proc/getCameraChunk(x, y, z)
x &= ~(CHUNK_SIZE - 1)
y &= ~(CHUNK_SIZE - 1)
var/key = "[x],[y],[z]"
if(!chunks[key])
if(!chunkGenerated(x, y, z))
chunks[key] = new /datum/camerachunk(null, x, y, z)
return chunks[key]
@@ -162,7 +162,7 @@
modules += new /obj/item/device/flashlight/seclite(src)
modules += new /obj/item/weapon/restraints/handcuffs/cable/zipties/cyborg(src)
modules += new /obj/item/weapon/melee/baton/loaded(src)
modules += new /obj/item/weapon/gun/energy/gun/advtaser/cyborg(src)
modules += new /obj/item/weapon/gun/energy/disabler/cyborg(src)
modules += new /obj/item/clothing/mask/gas/sechailer/cyborg(src)
emag = new /obj/item/weapon/gun/energy/laser/cyborg(src)
fix_modules()
@@ -149,7 +149,7 @@
//The objects that corgis can wear on their backs.
var/list/allowed_types = list(
/obj/item/clothing/suit/armor/vest/alt,
/obj/item/clothing/suit/armor/vest,
/obj/item/device/radio,
/obj/item/device/radio/off,
/obj/item/clothing/suit/cardborg,
+5
View File
@@ -35,6 +35,11 @@
if(istype(I, /obj/item/weapon/paper) || istype(I, /obj/item/weapon/folder) || istype(I, /obj/item/weapon/photo))
I.loc = src
/obj/structure/filingcabinet/ex_act(severity, target)
for(var/obj/item/I in src)
I.loc = src.loc
qdel(src)
..()
/obj/structure/filingcabinet/attackby(obj/item/P, mob/user)
if(istype(P, /obj/item/weapon/paper) || istype(P, /obj/item/weapon/folder) || istype(P, /obj/item/weapon/photo) || istype(P, /obj/item/documents))
@@ -132,7 +132,7 @@
if(!suppressed)
playsound(src.loc, 'sound/weapons/kenetic_reload.ogg', 60, 1)
else
playsound(user, 'sound/weapons/kenetic_reload.ogg', 60, 1)
user << "<span class='warning'>You silently charge [src].<span>"
recent_reload = 1
update_icon()
return
@@ -165,6 +165,36 @@
item_state = null
ammo_type = list(/obj/item/ammo_casing/energy/disabler)
/obj/item/weapon/gun/energy/disabler/cyborg
name = "cyborg disabler"
desc = "An integrated disabler that draws from a cyborg's power cell. This weapon contains a limiter to prevent the cyborg's power cell from overheating."
var/charge_tick = 0
var/recharge_time = 2.5
/obj/item/weapon/gun/energy/disabler/cyborg/New()
..()
SSobj.processing.Add(src)
/obj/item/weapon/gun/energy/disabler/cyborg/Destroy()
SSobj.processing.Remove(src)
..()
/obj/item/weapon/gun/energy/disabler/cyborg/process() //Every [recharge_time] ticks, recharge a shot for the cyborg
charge_tick++
if(charge_tick < recharge_time) return 0
charge_tick = 0
if(!power_supply) return 0 //sanity
if(isrobot(src.loc))
var/mob/living/silicon/robot/R = src.loc
if(R && R.cell)
var/obj/item/ammo_casing/energy/shot = ammo_type[select] //Necessary to find cost of shot
if(R.cell.use(shot.e_cost)) //Take power from the borg...
power_supply.give(shot.e_cost) //... to recharge the shot
update_icon()
return 1
/obj/item/weapon/gun/energy/wormhole_projector
name = "bluespace wormhole projector"
@@ -59,7 +59,6 @@
nodamage = 0
weaken = 5
stutter = 5
range = 7
/obj/item/projectile/energy/bolt/large
damage = 20
@@ -552,7 +552,7 @@ datum/reagent/atropine/overdose_process(var/mob/living/M as mob)
datum/reagent/epinephrine
name = "Epinephrine"
id = "epinephrine"
description = "Reduces most of the knockout/stun effects, minor stamina regeneration buff. Attempts to cap OXY damage at 35 and LOSEBREATH at 3. If health is between -10 to -65, heals 1 TOX, 1 BRUTE, 1 BURN."
description = "Reduces most of the knockout/stun effects, minor stamina regeneration buff. Attempts to cap OXY damage at 35 and LOSEBREATH at 10. If health is between -10 to -65, heals 1 TOX, 1 BRUTE, 1 BURN."
reagent_state = LIQUID
color = "#C8A5DC" // rgb: 200, 165, 220
metabolization_rate = 0.2
@@ -566,8 +566,8 @@ datum/reagent/epinephrine/on_mob_life(var/mob/living/M as mob)
M.adjustFireLoss(-1*REM)
if(M.oxyloss > 35)
M.setOxyLoss(35)
if(M.losebreath > 3)
M.losebreath = 3
if(M.losebreath >= 10)
M.losebreath = max(10, M.losebreath-5)
M.adjustStaminaLoss(-1*REM)
if(prob(30))
M.AdjustParalysis(-1)
+5 -4
View File
@@ -114,7 +114,7 @@ datum/reagents/proc/trans_to(var/obj/target, var/amount=1, var/multiplier=1, var
var/current_reagent_transfer = current_reagent.volume * part
if(preserve_data)
trans_data = copy_data(current_reagent)
R.add_reagent(current_reagent.id, (current_reagent_transfer * multiplier), trans_data)
R.add_reagent(current_reagent.id, (current_reagent_transfer * multiplier), trans_data, src.chem_temp)
src.remove_reagent(current_reagent.id, current_reagent_transfer)
src.update_total()
@@ -159,7 +159,7 @@ datum/reagents/proc/trans_id_to(var/obj/target, var/reagent, var/amount=1, var/p
if(current_reagent.id == reagent)
if(preserve_data)
trans_data = current_reagent.data
R.add_reagent(current_reagent.id, amount, trans_data)
R.add_reagent(current_reagent.id, amount, trans_data, src.chem_temp)
src.remove_reagent(current_reagent.id, amount, 1)
break
@@ -318,7 +318,7 @@ datum/reagents/proc/handle_reactions()
if(C.result)
feedback_add_details("chemical_reaction","[C.result]|[C.result_amount*multiplier]")
multiplier = max(multiplier, 1) //this shouldnt happen ...
add_reagent(C.result, C.result_amount*multiplier)
add_reagent(C.result, C.result_amount*multiplier, null, chem_temp)
var/list/seen = viewers(4, get_turf(my_atom))
@@ -409,10 +409,11 @@ datum/reagents/proc/reaction(var/atom/A, var/method=TOUCH, var/volume_modifier=0
R.reaction_obj(A, R.volume+volume_modifier)
return
datum/reagents/proc/add_reagent(var/reagent, var/amount, var/list/data=null)
datum/reagents/proc/add_reagent(var/reagent, var/amount, var/list/data=null, var/reagtemp = 300)
if(!isnum(amount)) return 1
update_total()
if(total_volume + amount > maximum_volume) amount = (maximum_volume - total_volume) //Doesnt fit in. Make it disappear. Shouldnt happen. Will happen.
chem_temp = round(((amount * reagtemp) + (total_volume * chem_temp)) / (total_volume + amount)) //equalize with new chems
for(var/A in reagent_list)
+61 -40
View File
@@ -340,25 +340,48 @@
reagents.trans_to(P, 50)
if(beaker)
var/datum/reagents/R = beaker.reagents
if (href_list["analyze"])
var/dat = ""
dat += "<B>[condi ? "Condiment" : "Chemical"] information:</B><BR><BR>"
dat += "<B>Name:</B><BR>[href_list["name"]]<BR><BR>"
dat += "<B>Description:</B><BR>[href_list["desc"]]<BR><BR><BR>"
dat += "<A href='?src=\ref[src];main=1'>Back</A>"
var/datum/browser/popup = new(usr, "chem_master", name)
popup.set_content(dat)
popup.set_title_image(usr.browse_rsc_icon(src.icon, src.icon_state))
popup.open(1)
if(href_list["analyze"])
if(locate(href_list["reagent"]))
var/datum/reagent/R = locate(href_list["reagent"])
if(R)
var/dat = ""
dat += "<H1>[condi ? "Condiment" : "Chemical"] information:</H1>"
dat += "<B>Name:</B> [initial(R.name)]<BR><BR>"
dat += "<B>State:</B> "
if(initial(R.reagent_state) == 1)
dat += "Solid"
else if(initial(R.reagent_state) == 2)
dat += "Liquid"
else if(initial(R.reagent_state) == 3)
dat += "Gas"
else
dat += "Unknown"
dat += "<BR>"
dat += "<B>Color:</B> <span style='color:[initial(R.color)];background-color:[initial(R.color)];font:Lucida Console'>[initial(R.color)]</span><BR><BR>"
dat += "<B>Description:</B> [initial(R.description)]<BR><BR>"
var/const/P = 3 //The number of seconds between life ticks
var/T = initial(R.metabolization_rate) * (60 / P)
dat += "<B>Metabolization Rate:</B> [T]u/minute<BR>"
dat += "<B>Overdose Threshold:</B> [initial(R.overdose_threshold) ? "[initial(R.overdose_threshold)]u" : "none"]<BR>"
dat += "<B>Addiction Threshold:</B> [initial(R.addiction_threshold) ? "[initial(R.addiction_threshold)]u" : "none"]<BR><BR>"
dat += "<BR><A href='?src=\ref[src];main=1'>Back</A>"
var/datum/browser/popup = new(usr, "chem_master", name)
popup.set_content(dat)
popup.set_title_image(usr.browse_rsc_icon(src.icon, src.icon_state))
popup.open(1)
return
else if(href_list["main"]) // Used to exit the analyze screen.
attack_hand(usr)
return
else if(href_list["add"])
if(href_list["amount"])
var/id = href_list["add"]
var/amount = text2num(href_list["amount"])
if (amount < 0) return
R.trans_id_to(src, id, amount)
if (amount > 0)
beaker.reagents.trans_id_to(src, id, amount)
else if(href_list["addcustom"])
var/id = href_list["addcustom"]
@@ -372,11 +395,11 @@
if(href_list["amount"])
var/id = href_list["remove"]
var/amount = text2num(href_list["amount"])
if (amount < 0) return
if(mode)
reagents.trans_id_to(beaker, id, amount)
else
reagents.remove_reagent(id, amount)
if (amount > 0)
if(mode)
reagents.trans_id_to(beaker, id, amount)
else
reagents.remove_reagent(id, amount)
else if(href_list["removecustom"])
var/id = href_list["removecustom"]
@@ -386,10 +409,6 @@
useramount = amt_temp
src.Topic(null, list("amount" = "[useramount]", "remove" = "[id]"))
else if(href_list["main"])
attack_hand(usr)
return
else if(href_list["eject"])
if(beaker)
beaker.loc = src.loc
@@ -478,7 +497,7 @@
if(beaker.reagents.total_volume)
for(var/datum/reagent/G in beaker.reagents.reagent_list)
dat += "<LI>[G.name], [G.volume] Units - "
dat += "<A href='?src=\ref[src];analyze=1;desc=[G.description];name=[G.name]'>Analyze</A> "
dat += "<A href='?src=\ref[src];analyze=1;reagent=\ref[G]'>Analyze</A> "
dat += "<A href='?src=\ref[src];add=[G.id];amount=1'>1</A> "
dat += "<A href='?src=\ref[src];add=[G.id];amount=5'>5</A> "
dat += "<A href='?src=\ref[src];add=[G.id];amount=10'>10</A> "
@@ -493,7 +512,7 @@
if(reagents.total_volume)
for(var/datum/reagent/N in reagents.reagent_list)
dat += "<LI>[N.name], [N.volume] Units - "
dat += "<A href='?src=\ref[src];analyze=1;desc=[N.description];name=[N.name]'>Analyze</A> "
dat += "<A href='?src=\ref[src];analyze=1;reagent=\ref[N]'>Analyze</A> "
dat += "<A href='?src=\ref[src];remove=[N.id];amount=1'>1</A> "
dat += "<A href='?src=\ref[src];remove=[N.id];amount=5'>5</A> "
dat += "<A href='?src=\ref[src];remove=[N.id];amount=10'>10</A> "
@@ -1284,7 +1303,8 @@ obj/machinery/computer/pandemic/proc/replicator_cooldown(var/waittime)
O.reagents.trans_to(beaker, amount)
if(!O.reagents.total_volume)
remove_object(O)
////////////////////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////////////////////
/obj/machinery/chem_heater
name = "chemical heater"
density = 1
@@ -1294,22 +1314,22 @@ obj/machinery/computer/pandemic/proc/replicator_cooldown(var/waittime)
use_power = 1
idle_power_usage = 40
var/obj/item/weapon/reagent_containers/beaker = null
var/temperature = 300
var/rate = 10 //heating/cooling rate, default is 10 kelvin per tick
var/desired_temp = 300
var/heater_coefficient = 0.15
var/on = FALSE
/obj/machinery/chem_heater/New()
..()
component_parts = list()
component_parts += new /obj/item/weapon/circuitboard/chem_heater(null)
component_parts += new /obj/item/weapon/stock_parts/manipulator(null)
component_parts += new /obj/item/weapon/stock_parts/micro_laser(null)
component_parts += new /obj/item/weapon/stock_parts/console_screen(null)
RefreshParts()
/obj/machinery/chem_heater/RefreshParts()
rate = 10
for(var/obj/item/weapon/stock_parts/manipulator/M in component_parts)
rate *= M.rating
heater_coefficient = 0.15
for(var/obj/item/weapon/stock_parts/micro_laser/M in component_parts)
heater_coefficient *= M.rating
/obj/machinery/chem_heater/process()
..()
@@ -1318,14 +1338,15 @@ obj/machinery/computer/pandemic/proc/replicator_cooldown(var/waittime)
var/state_change = 0
if(on)
if(beaker)
if(beaker.reagents.chem_temp > temperature)
beaker.reagents.chem_temp = max(beaker.reagents.chem_temp-rate, temperature)
beaker.reagents.handle_reactions()
state_change = 1
else if(beaker.reagents.chem_temp < temperature)
beaker.reagents.chem_temp = min(beaker.reagents.chem_temp+rate, temperature)
if(beaker.reagents.chem_temp != desired_temp)
beaker.reagents.chem_temp += ((desired_temp - beaker.reagents.chem_temp) * heater_coefficient)
beaker.reagents.chem_temp = round(beaker.reagents.chem_temp) //stops stuff like 456.12312312302
if(beaker.reagents.chem_temp == ((desired_temp-3) || (desired_temp+3)))//need better way to stop superdecimals and rounding drops
beaker.reagents.chem_temp = desired_temp
beaker.reagents.handle_reactions()
state_change = 1
if(state_change)
SSnano.update_uis(src)
@@ -1387,9 +1408,9 @@ obj/machinery/computer/pandemic/proc/replicator_cooldown(var/waittime)
if(href_list["adjust_temperature"])
var/val = href_list["adjust_temperature"]
if(isnum(val))
temperature = Clamp(temperature+val, 0, 1000)
desired_temp = Clamp(desired_temp+val, 0, 1000)
else if(val == "input")
temperature = Clamp(input("Please input the target temperature", name) as num, 0, 1000)
desired_temp = Clamp(input("Please input the target temperature", name) as num, 0, 1000)
else
return 0
. = 1
@@ -1402,7 +1423,7 @@ obj/machinery/computer/pandemic/proc/replicator_cooldown(var/waittime)
if(user.stat || user.restrained()) return
var/data[0]
data["targetTemp"] = temperature
data["targetTemp"] = desired_temp
data["isActive"] = on
data["isBeakerLoaded"] = beaker ? 1 : 0
@@ -68,7 +68,7 @@
if(ishuman(target))
var/mob/living/carbon/human/H = target
if(H.dna)
if(NOBLOOD in H.dna.species.specflags)
if(NOBLOOD in H.dna.species.specflags && !H.dna.species.exotic_blood)
user << "<span class='notice'>You are unable to locate any blood.</span>"
return
if(reagents.has_reagent("blood"))
@@ -94,6 +94,13 @@
var/datum/reagent/B
B = T.take_blood(src,amount)
if(!B && ishuman(target))
var/mob/living/carbon/human/H = target
if(H.dna && H.dna.species.exotic_blood && H.reagents.total_volume)
target.reagents.trans_to(src, amount)
else
user << "<span class='notice'>You are unable to locate any blood.</span>"
return
if (B)
src.reagents.reagent_list += B
src.reagents.update_total()
@@ -635,11 +635,11 @@
construction_time = 120
category = list("Cyborg Upgrade Modules")
/datum/design/borg_upgrade_tasercooler
name = "Cyborg Upgrade Module (Rapid Taser Cooling Module)"
id = "borg_upgrade_tasercooler"
/datum/design/borg_upgrade_disablercooler
name = "Cyborg Upgrade Module (Rapid Disabler Cooling Module)"
id = "borg_upgrade_disablercooler"
build_type = MECHFAB
build_path = /obj/item/borg/upgrade/tasercooler
build_path = /obj/item/borg/upgrade/disablercooler
req_tech = list("combat" = 5, "power" = 4)
materials = list("$metal"=80000 , "$glass"=6000 , "$gold"= 2000, "$diamond" = 500)
construction_time = 120
+15 -4
View File
@@ -26,7 +26,6 @@
var/mob/trackedIan
var/mob/trackedRuntime
var/obj/item/loaded_item = null
///
var/badThingCoeff = 0
var/resetTime = 15
var/cloneMode = FALSE
@@ -168,6 +167,9 @@
return
/obj/machinery/r_n_d/experimentor/default_deconstruction_crowbar(var/obj/item/O)
ejectItem()
..(O)
/obj/machinery/r_n_d/experimentor/attack_hand(mob/user as mob)
user.set_machine(src)
@@ -225,7 +227,10 @@
--cloneCount
if(cloneCount == 0)
cloneMode = FALSE
loaded_item.loc = get_turf(pick(oview(1,src)))
var/turf/dropturf = get_turf(pick(oview(1,src)))
if(!dropturf) //Failsafe to prevent the object being lost in the void forever.
dropturf = get_turf(src)
loaded_item.loc = dropturf
if(delete)
qdel(loaded_item)
loaded_item = null
@@ -272,7 +277,8 @@
if(target)
var/obj/item/throwing = loaded_item
ejectItem()
throwing.throw_at(target, 10, 1)
if(throwing)
throwing.throw_at(target, 10, 1)
////////////////////////////////////////////////////////////////////////////////////////////////
if(exp == SCANTYPE_IRRADIATE)
visible_message("<span class='notice'>[src] reflects radioactive rays at [exp_on]!</span>")
@@ -521,6 +527,7 @@
if(D)
linked_console = D
else if(scantype == "eject")
busy = 0
ejectItem()
else if(scantype == "refresh")
src.updateUsrDialog()
@@ -528,7 +535,11 @@
if(recentlyExperimented)
usr << "<span class='notice'>[src] has been used too recently!</span>"
return
var/dotype = matchReaction(process,scantype)
var/dotype
if(text2num(scantype) == SCANTYPE_DISCOVER)
dotype = SCANTYPE_DISCOVER
else
dotype = matchReaction(process,scantype)
experiment(dotype,process)
use_power(750)
if(dotype != FAIL)
+95 -3
View File
@@ -1,5 +1,3 @@
//This file was auto-corrected by findeclaration.exe on 25.5.2012 20:42:33
/*
Research and Development (R&D) Console
@@ -50,6 +48,7 @@ won't update every console in existence) but it's more of a hassle to do. Also,
req_access = list(access_tox) //Data and setting manipulation requires scientist access.
var/selected_category
var/list/datum/design/matching_designs = list() //for the search function
/obj/machinery/computer/rdconsole/proc/CallTechName(var/ID) //A simple helper proc to find the name of a tech with a given ID.
@@ -130,6 +129,7 @@ won't update every console in existence) but it's more of a hassle to do. Also,
/obj/machinery/computer/rdconsole/New()
..()
files = new /datum/research(src) //Setup the research data holder.
matching_designs = list()
if(!id)
for(var/obj/machinery/r_n_d/server/centcom/S in world)
S.initialize()
@@ -566,6 +566,25 @@ won't update every console in existence) but it's more of a hassle to do. Also,
spawn(20)
screen = 1.6
updateUsrDialog()
else if(href_list["search"]) //Search for designs with name matching pattern
var/compare
matching_designs.Cut()
if(href_list["type"] == "proto")
compare = PROTOLATHE
screen = 3.17
else
compare = IMPRINTER
screen = 4.17
for(var/datum/design/D in files.known_designs)
if(!(D.build_type & compare))
continue
if(findtext(D.name,href_list["to_search"]))
matching_designs.Add(D)
updateUsrDialog()
return
@@ -776,7 +795,15 @@ won't update every console in existence) but it's more of a hassle to do. Also,
dat += "<A href='?src=\ref[src];menu=3.3'>Chemical Storage</A><div class='statusDisplay'>"
dat += "<h3>Protolathe Menu:</h3><BR>"
dat += "<B>Material Amount:</B> [linked_lathe.TotalMaterials()] / [linked_lathe.max_material_storage]<BR>"
dat += "<B>Chemical Volume:</B> [linked_lathe.reagents.total_volume] / [linked_lathe.reagents.maximum_volume]<HR>"
dat += "<B>Chemical Volume:</B> [linked_lathe.reagents.total_volume] / [linked_lathe.reagents.maximum_volume]<BR>"
dat += "<form name='search' action='?src=\ref[src]'> \
<input type='hidden' name='src' value='\ref[src]'> \
<input type='hidden' name='search' value='to_search'> \
<input type='hidden' name='type' value='proto'> \
<input type='text' name='to_search'> \
<input type='submit' value='Search'> \
</form><HR>"
dat += list_categories(linked_lathe.categories, 3.15)
@@ -816,6 +843,39 @@ won't update every console in existence) but it's more of a hassle to do. Also,
dat += "<BR>"
dat += "</div>"
if(3.17) //Display search result
dat += "<A href='?src=\ref[src];menu=1.0'>Main Menu</A>"
dat += "<A href='?src=\ref[src];menu=3.1'>Protolathe Menu</A>"
dat += "<div class='statusDisplay'><h3>Search results:</h3><BR>"
dat += "<B>Material Amount:</B> [linked_lathe.TotalMaterials()] / [linked_lathe.max_material_storage]<BR>"
dat += "<B>Chemical Volume:</B> [linked_lathe.reagents.total_volume] / [linked_lathe.reagents.maximum_volume]<HR>"
var/coeff = linked_lathe.efficiency_coeff
for(var/datum/design/D in matching_designs)
var/temp_material
var/c = 50
var/t
for(var/M in D.materials)
t = linked_lathe.check_mat(D, M)
temp_material += " | "
if (!t)
temp_material += "<span class='bad'>[D.materials[M]/coeff] [CallMaterialName(M)]</span>"
else
temp_material += " [D.materials[M]/coeff] [CallMaterialName(M)]"
c = min(c,t)
if (c)
dat += "<A href='?src=\ref[src];build=[D.id];amount=1'>[D.name]</A>"
if(c >= 5.0)
dat += "<A href='?src=\ref[src];build=[D.id];amount=5'>x5</A>"
if(c >= 10.0)
dat += "<A href='?src=\ref[src];build=[D.id];amount=10'>x10</A>"
dat += "[temp_material]"
else
dat += "<span class='linkOff'>[D.name]</span>[temp_material]"
dat += "<BR>"
dat += "</div>"
if(3.2) //Protolathe Material Storage Sub-menu
dat += "<A href='?src=\ref[src];menu=1.0'>Main Menu</A>"
dat += "<A href='?src=\ref[src];menu=3.1'>Protolathe Menu</A><div class='statusDisplay'>"
@@ -891,6 +951,14 @@ won't update every console in existence) but it's more of a hassle to do. Also,
dat += "Material Amount: [linked_imprinter.TotalMaterials()]<BR>"
dat += "Chemical Volume: [linked_imprinter.reagents.total_volume]<HR>"
dat += "<form name='search' action='?src=\ref[src]'> \
<input type='hidden' name='src' value='\ref[src]'> \
<input type='hidden' name='search' value='to_search'> \
<input type='hidden' name='type' value='imprint'> \
<input type='text' name='to_search'> \
<input type='submit' value='Search'> \
</form><HR>"
dat += list_categories(linked_imprinter.categories, 4.15)
if(4.15)
@@ -919,6 +987,30 @@ won't update every console in existence) but it's more of a hassle to do. Also,
dat += "<span class='linkOff'>[D.name]</span>[temp_materials]<BR>"
dat += "</div>"
if(4.17)
dat += "<A href='?src=\ref[src];menu=1.0'>Main Menu</A>"
dat += "<A href='?src=\ref[src];menu=4.1'>Circuit Imprinter Menu</A>"
dat += "<div class='statusDisplay'><h3>Search results:</h3><BR>"
dat += "Material Amount: [linked_imprinter.TotalMaterials()]<BR>"
dat += "Chemical Volume: [linked_imprinter.reagents.total_volume]<HR>"
var/coeff = linked_imprinter.efficiency_coeff
for(var/datum/design/D in matching_designs)
var/temp_materials
var/check_materials = 1
for(var/M in D.materials)
temp_materials += " | "
if (!linked_imprinter.check_mat(D, M))
check_materials = 0
temp_materials += " <span class='bad'>[D.materials[M]/coeff] [CallMaterialName(M)]</span>"
else
temp_materials += " [D.materials[M]/coeff] [CallMaterialName(M)]"
if (check_materials)
dat += "<A href='?src=\ref[src];imprint=[D.id]'>[D.name]</A>[temp_materials]<BR>"
else
dat += "<span class='linkOff'>[D.name]</span>[temp_materials]<BR>"
dat += "</div>"
if(4.2)
dat += "<A href='?src=\ref[src];menu=1.0'>Main Menu</A>"
dat += "<A href='?src=\ref[src];menu=4.1'>Imprinter Menu</A>"