Skip to content
This repository has been archived by the owner on Jan 22, 2020. It is now read-only.

Commit

Permalink
Merge branch 'master' into dev
Browse files Browse the repository at this point in the history
  • Loading branch information
comma committed Mar 8, 2014
2 parents d6115c9 + 4dba89a commit cca2c99
Show file tree
Hide file tree
Showing 15 changed files with 143 additions and 67 deletions.
7 changes: 6 additions & 1 deletion code/datums/datacore.dm
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@
return

/obj/effect/datacore/proc/manifest_modify(var/name, var/assignment)
if(PDA_Manifest.len)
PDA_Manifest.Cut()
var/datum/data/record/foundrecord
var/real_title = assignment

Expand All @@ -34,6 +36,9 @@
foundrecord.fields["real_rank"] = real_title

/obj/effect/datacore/proc/manifest_inject(var/mob/living/carbon/human/H)
if(PDA_Manifest.len)
PDA_Manifest.Cut()

if(H.mind && (H.mind.assigned_role != "MODE"))
var/assignment
if(H.mind.role_alt_title)
Expand Down Expand Up @@ -269,4 +274,4 @@ proc/get_id_photo(var/mob/living/carbon/human/H)
del(eyes_s)
del(clothes_s)

return preview_icon
return preview_icon
13 changes: 12 additions & 1 deletion code/defines/obj.dm
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,8 @@
//This list tracks characters spawned in the world and cannot be modified in-game. Currently referenced by respawn_character().
var/locked[] = list()



/obj/effect/datacore/proc/get_manifest(monochrome, OOC)
var/list/heads = new()
var/list/sec = new()
Expand Down Expand Up @@ -165,9 +167,16 @@

/*
We can't just insert in HTML into the nanoUI so we need the raw data to play with.
Instead of creating this list over and over when someone leaves their PDA open to the page
we'll only update it when it changes. The PDA_Manifest global list is zeroed out upon any change
using /obj/effect/datacore/proc/manifest_inject( ), or manifest_insert( )
*/

var/global/list/PDA_Manifest = list()

/obj/effect/datacore/proc/get_manifest_json()
if(PDA_Manifest.len)
return PDA_Manifest
var/heads[0]
var/sec[0]
var/eng[0]
Expand Down Expand Up @@ -227,7 +236,8 @@ We can't just insert in HTML into the nanoUI so we need the raw data to play wit
if(!department && !(name in heads))
misc[++misc.len] = list("name" = name, "rank" = rank, "active" = isactive)

return list(\

PDA_Manifest = list(\
"heads" = heads,\
"sec" = sec,\
"eng" = eng,\
Expand All @@ -237,6 +247,7 @@ We can't just insert in HTML into the nanoUI so we need the raw data to play wit
"bot" = bot,\
"misc" = misc\
)
return PDA_Manifest



Expand Down
2 changes: 2 additions & 0 deletions code/game/jobs/whitelist.dm
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,8 @@ var/list/whitelist = list()
return 1
if(species == "human" || species == "Human")
return 1
if(species == "machine" || species == "Machine")
return 1
if(check_rights(R_ADMIN, 0))
return 1
if(!alien_whitelist)
Expand Down
11 changes: 10 additions & 1 deletion code/game/machinery/computer/skills.dm
Original file line number Diff line number Diff line change
Expand Up @@ -289,6 +289,8 @@ What a mess.*/
temp += "<a href='?src=\ref[src];choice=Clear Screen'>No</a>"

if ("Purge All Records")
if(PDA_Manifest.len)
PDA_Manifest.Cut()
for(var/datum/data/record/R in data_core.security)
del(R)
temp = "All Employment records deleted."
Expand All @@ -300,6 +302,9 @@ What a mess.*/
temp += "<a href='?src=\ref[src];choice=Clear Screen'>No</a>"
//RECORD CREATE
if ("New Record (General)")

if(PDA_Manifest.len)
PDA_Manifest.Cut()
var/datum/data/record/G = new /datum/data/record()
G.fields["name"] = "New Record"
G.fields["id"] = text("[]", add_zero(num2hex(rand(1, 1.6777215E7)), 6))
Expand Down Expand Up @@ -372,12 +377,16 @@ What a mess.*/
switch(href_list["choice"])
if ("Change Rank")
if (active1)
if(PDA_Manifest.len)
PDA_Manifest.Cut()
active1.fields["rank"] = href_list["rank"]
if(href_list["rank"] in joblist)
active1.fields["real_rank"] = href_list["real_rank"]

if ("Delete Record (ALL) Execute")
if (active1)
if(PDA_Manifest.len)
PDA_Manifest.Cut()
for(var/datum/data/record/R in data_core.medical)
if ((R.fields["name"] == active1.fields["name"] || R.fields["id"] == active1.fields["id"]))
del(R)
Expand Down Expand Up @@ -416,4 +425,4 @@ What a mess.*/
del(R)
continue

..(severity)
..(severity)
26 changes: 13 additions & 13 deletions code/game/machinery/constructable_frame.dm
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ to destroy them and players will be able to make replacements.
build_path = "/obj/machinery/r_n_d/destructive_analyzer"
board_type = "machine"
origin_tech = "magnets=2;engineering=2;programming=2"
frame_desc = "Requires 1 Scanning Module, 1 Manipulator, and 1 Micro-Laser."
frame_desc = "Requires 1 Scanning Module, 1 Micro Manipulator, and 1 Micro-Laser."
req_components = list(
"/obj/item/weapon/stock_parts/scanning_module" = 1,
"/obj/item/weapon/stock_parts/manipulator" = 1,
Expand All @@ -179,7 +179,7 @@ to destroy them and players will be able to make replacements.
build_path = "/obj/machinery/autolathe"
board_type = "machine"
origin_tech = "engineering=2;programming=2"
frame_desc = "Requires 3 Matter Bins, 1 Manipulator, and 1 Console Screen."
frame_desc = "Requires 3 Matter Bins, 1 Micro Manipulator, and 1 Console Screen."
req_components = list(
"/obj/item/weapon/stock_parts/matter_bin" = 3,
"/obj/item/weapon/stock_parts/manipulator" = 1,
Expand All @@ -190,7 +190,7 @@ to destroy them and players will be able to make replacements.
build_path = "/obj/machinery/r_n_d/protolathe"
board_type = "machine"
origin_tech = "engineering=2;programming=2"
frame_desc = "Requires 2 Matter Bins, 2 Manipulators, and 2 Beakers."
frame_desc = "Requires 2 Matter Bins, 2 Micro Manipulators, and 2 Beakers."
req_components = list(
"/obj/item/weapon/stock_parts/matter_bin" = 2,
"/obj/item/weapon/stock_parts/manipulator" = 2,
Expand All @@ -202,7 +202,7 @@ to destroy them and players will be able to make replacements.
build_path = "/obj/machinery/r_n_d/circuit_imprinter"
board_type = "machine"
origin_tech = "engineering=2;programming=2"
frame_desc = "Requires 1 Matter Bin, 1 Manipulator, and 2 Beakers."
frame_desc = "Requires 1 Matter Bin, 1 Micro Manipulator, and 2 Beakers."
req_components = list(
"/obj/item/weapon/stock_parts/matter_bin" = 1,
"/obj/item/weapon/stock_parts/manipulator" = 1,
Expand Down Expand Up @@ -245,7 +245,7 @@ obj/item/weapon/circuitboard/rdserver
build_path = "/obj/machinery/mecha_part_fabricator"
board_type = "machine"
origin_tech = "programming=3;engineering=3"
frame_desc = "Requires 2 Matter Bins, 1 Manipulator, 1 Micro-Laser and 1 Console Screen."
frame_desc = "Requires 2 Matter Bins, 1 Micro Manipulator, 1 Micro-Laser and 1 Console Screen."
req_components = list(
"/obj/item/weapon/stock_parts/matter_bin" = 2,
"/obj/item/weapon/stock_parts/manipulator" = 1,
Expand All @@ -269,7 +269,7 @@ obj/item/weapon/circuitboard/rdserver
build_path = "/obj/machinery/dna_scannernew"
board_type = "machine"
origin_tech = "programming=2;biotech=2"
frame_desc = "Requires 1 Scanning module, 1 Manipulator, 1 Micro-Laser, 2 pieces of cable and 1 Console Screen."
frame_desc = "Requires 1 Scanning module, 1 Micro Manipulator, 1 Micro-Laser, 2 pieces of cable and 1 Console Screen."
req_components = list(
"/obj/item/weapon/stock_parts/scanning_module" = 1,
"/obj/item/weapon/stock_parts/manipulator" = 1,
Expand All @@ -285,7 +285,7 @@ obj/item/weapon/circuitboard/rdserver
build_path = "/obj/machinery/telecomms/receiver"
board_type = "machine"
origin_tech = "programming=4;engineering=3;bluespace=2"
frame_desc = "Requires 1 Subspace Ansible, 1 Hyperwave Filter, 2 Manipulators, and 1 Micro-Laser."
frame_desc = "Requires 1 Subspace Ansible, 1 Hyperwave Filter, 2 Micro Manipulators, and 1 Micro-Laser."
req_components = list(
"/obj/item/weapon/stock_parts/subspace/ansible" = 1,
"/obj/item/weapon/stock_parts/subspace/filter" = 1,
Expand All @@ -297,7 +297,7 @@ obj/item/weapon/circuitboard/rdserver
build_path = "/obj/machinery/telecomms/hub"
board_type = "machine"
origin_tech = "programming=4;engineering=4"
frame_desc = "Requires 2 Manipulators, 2 Cable Coil and 2 Hyperwave Filter."
frame_desc = "Requires 2 Micro Manipulators, 2 Cable Coil and 2 Hyperwave Filter."
req_components = list(
"/obj/item/weapon/stock_parts/manipulator" = 2,
"/obj/item/weapon/cable_coil" = 2,
Expand All @@ -308,7 +308,7 @@ obj/item/weapon/circuitboard/rdserver
build_path = "/obj/machinery/telecomms/relay"
board_type = "machine"
origin_tech = "programming=3;engineering=4;bluespace=3"
frame_desc = "Requires 2 Manipulators, 2 Cable Coil and 2 Hyperwave Filters."
frame_desc = "Requires 2 Micro Manipulators, 2 Cable Coil and 2 Hyperwave Filters."
req_components = list(
"/obj/item/weapon/stock_parts/manipulator" = 2,
"/obj/item/weapon/cable_coil" = 2,
Expand All @@ -319,7 +319,7 @@ obj/item/weapon/circuitboard/rdserver
build_path = "/obj/machinery/telecomms/bus"
board_type = "machine"
origin_tech = "programming=4;engineering=4"
frame_desc = "Requires 2 Manipulators, 1 Cable Coil and 1 Hyperwave Filter."
frame_desc = "Requires 2 Micro Manipulators, 1 Cable Coil and 1 Hyperwave Filter."
req_components = list(
"/obj/item/weapon/stock_parts/manipulator" = 2,
"/obj/item/weapon/cable_coil" = 1,
Expand All @@ -330,7 +330,7 @@ obj/item/weapon/circuitboard/rdserver
build_path = "/obj/machinery/telecomms/processor"
board_type = "machine"
origin_tech = "programming=4;engineering=4"
frame_desc = "Requires 3 Manipulators, 1 Hyperwave Filter, 2 Treatment Disks, 1 Wavelength Analyzer, 2 Cable Coils and 1 Subspace Amplifier."
frame_desc = "Requires 3 Micro Manipulators, 1 Hyperwave Filter, 2 Treatment Disks, 1 Wavelength Analyzer, 2 Cable Coils and 1 Subspace Amplifier."
req_components = list(
"/obj/item/weapon/stock_parts/manipulator" = 3,
"/obj/item/weapon/stock_parts/subspace/filter" = 1,
Expand All @@ -344,7 +344,7 @@ obj/item/weapon/circuitboard/rdserver
build_path = "/obj/machinery/telecomms/server"
board_type = "machine"
origin_tech = "programming=4;engineering=4"
frame_desc = "Requires 2 Manipulators, 1 Cable Coil and 1 Hyperwave Filter."
frame_desc = "Requires 2 Micro Manipulators, 1 Cable Coil and 1 Hyperwave Filter."
req_components = list(
"/obj/item/weapon/stock_parts/manipulator" = 2,
"/obj/item/weapon/cable_coil" = 1,
Expand All @@ -355,7 +355,7 @@ obj/item/weapon/circuitboard/rdserver
build_path = "/obj/machinery/telecomms/broadcaster"
board_type = "machine"
origin_tech = "programming=4;engineering=4;bluespace=2"
frame_desc = "Requires 2 Manipulators, 1 Cable Coil, 1 Hyperwave Filter, 1 Ansible Crystal and 2 High-Powered Micro-Lasers. "
frame_desc = "Requires 2 Micro Manipulators, 1 Cable Coil, 1 Hyperwave Filter, 1 Ansible Crystal and 2 High-Powered Micro-Lasers. "
req_components = list(
"/obj/item/weapon/stock_parts/manipulator" = 2,
"/obj/item/weapon/cable_coil" = 1,
Expand Down
3 changes: 3 additions & 0 deletions code/game/machinery/cryopod.dm
Original file line number Diff line number Diff line change
Expand Up @@ -240,6 +240,9 @@ obj/machinery/computer/cryopod/Topic(href, href_list)
current_mode.possible_traitors.Remove(occupant)

// Delete them from datacore.

if(PDA_Manifest.len)
PDA_Manifest.Cut()
for(var/datum/data/record/R in data_core.medical)
if ((R.fields["name"] == occupant.real_name))
del(R)
Expand Down
9 changes: 8 additions & 1 deletion code/game/mecha/mech_fabricator.dm
Original file line number Diff line number Diff line change
Expand Up @@ -498,13 +498,15 @@
src.updateUsrDialog()
return
*/
if(!silent)
if(!silent)
temp = "Updating local R&D database..."
src.updateUsrDialog()
sleep(30) //only sleep if called by user
var/found = 0
for(var/obj/machinery/computer/rdconsole/RDC in get_area(src))
if(!RDC.sync)
continue
found++
for(var/datum/tech/T in RDC.files.known_tech)
files.AddTech2Known(T)
for(var/datum/design/D in RDC.files.known_designs)
Expand All @@ -519,6 +521,11 @@
src.updateUsrDialog()
if(i || tech_output)
src.visible_message("\icon[src] <b>[src]</b> beeps, \"Successfully synchronized with R&D server. New data processed.\"")
if(found == 0)
temp = "Couldn't contact R&D server.<br>"
temp += "<a href='?src=\ref[src];clear_temp=1'>Return</a>"
src.updateUsrDialog()
src.visible_message("\icon[src] <b>[src]</b> beeps, \"Error! Couldn't connect to R&D server.\"")
return

/obj/machinery/mecha_part_fabricator/proc/get_resource_cost_w_coeff(var/obj/item/part as obj,var/resource as text, var/roundto=1)
Expand Down
Loading

0 comments on commit cca2c99

Please sign in to comment.