Integrated BS12's improved uplink code, courtesy of SkyMarshal.

This means items now spawn in your hand if possible, items are sorted into categories, and only items you have enough telecrystals to purchase will be displayed.  Also, the same basic code is now used for PDA, headset and nuke-round uplinks, and it should be easier to add new items.

git-svn-id: http://tgstation13.googlecode.com/svn/trunk@3216 316c924e-a436-60f5-8080-3fe189b3f50e
This commit is contained in:
musketstgstation@gmail.com
2012-02-29 22:50:14 +00:00
parent 8ddcc6a963
commit ddc7f45a13
24 changed files with 564 additions and 26 deletions

View File

@@ -0,0 +1,53 @@
/obj/item/weapon/storage/syndie_kit
name = "Box"
desc = "A sleek, sturdy box"
icon_state = "box_of_doom"
item_state = "syringe_kit"
/obj/item/weapon/storage/syndie_kit/imp_freedom
name = "Freedom Implant (with injector)"
/obj/item/weapon/storage/syndie_kit/imp_freedom/New()
var/obj/item/weapon/implanter/O = new /obj/item/weapon/implanter(src)
O.imp = new /obj/item/weapon/implant/freedom(O)
O.update()
..()
return
/*/obj/item/weapon/storage/syndie_kit/imp_compress
name = "Compressed Matter Implant (with injector)"
/obj/item/weapon/storage/syndie_kit/imp_compress/New()
new /obj/item/weapon/implanter/compressed(src)
..()
return
/obj/item/weapon/storage/syndie_kit/imp_explosive
name = "Explosive Implant (with injector)"
/obj/item/weapon/storage/syndie_kit/imp_explosive/New()
var/obj/item/weapon/implanter/O = new /obj/item/weapon/implanter(src)
O.imp = new /obj/item/weapon/implant/explosive(O)
O.name = "(BIO-HAZARD) BIO-detpack"
O.update()
..()
return*/
/obj/item/weapon/storage/syndie_kit/imp_uplink
name = "Uplink Implant (with injector)"
/obj/item/weapon/storage/syndie_kit/imp_uplink/New()
var/obj/item/weapon/implanter/O = new /obj/item/weapon/implanter(src)
O.imp = new /obj/item/weapon/implant/uplink(O)
O.update()
..()
return
/obj/item/weapon/storage/syndie_kit/space
name = "Space Suit and Helmet"
/obj/item/weapon/storage/syndie_kit/space/New()
new /obj/item/clothing/suit/space/syndicate(src)
new /obj/item/clothing/head/helmet/space/syndicate(src)
..()
return

View File

@@ -0,0 +1,369 @@
/*
SYNDICATE UPLINKS
TO-DO:
Once wizard is fixed, make sure the uplinks work correctly for it. wizard.dm is right now uncompiled and with broken code in it.
Clean the code up and comment it. Part of it is right now copy-pasted, with the general Topic() and modifications by Abi79.
I should take a more in-depth look at both the copy-pasted code for the individual uplinks below, and at each gamemode's code
to see how uplinks are assigned and if there are any bugs with those.
A list of items and costs is stored under the datum of every game mode, alongside the number of crystals, and the welcoming message.
*/
/obj/item/device/uplink
var/welcome // Welcoming menu message
var/menu_message = "" // The actual menu text
var/items // List of items
var/list/ItemList // Parsed list of items
var/uses // Numbers of crystals
// List of items not to shove in their hands.
var/list/NotInHand = list(/obj/machinery/singularity_beacon/syndicate)
New()
welcome = ticker.mode.uplink_welcome
items = dd_replacetext(ticker.mode.uplink_items, "\n", "") // Getting the text string of items
ItemList = dd_text2list(src.items, ";") // Parsing the items text string
uses = ticker.mode.uplink_uses
//Let's build a menu!
proc/generate_menu()
src.menu_message = "<B>[src.welcome]</B><BR>"
src.menu_message += "Tele-Crystals left: [src.uses]<BR>"
src.menu_message += "<HR>"
src.menu_message += "<B>Request item:</B><BR>"
src.menu_message += "<I>Each item costs a number of tele-crystals as indicated by the number following their name.</I><br><BR>"
var/cost
var/item
var/name
var/path_obj
var/path_text
var/category_items = 1 //To prevent stupid :P
for(var/D in ItemList)
var/list/O = stringsplit(D, ":")
if(O.len != 3) //If it is not an actual item, make a break in the menu.
if(O.len == 1) //If there is one item, it's probably a title
src.menu_message += "<b>[O[1]]</b><br>"
category_items = 0
else //Else, it's a white space.
if(category_items < 1) //If there were no itens in the last category...
src.menu_message += "<i>We apologize, as you could not afford anything from this category.</i><br>"
src.menu_message += "<br>"
continue
path_text = O[1]
cost = text2num(O[2])
if(cost>uses)
continue
path_obj = text2path(path_text)
item = new path_obj()
name = O[3]
del item
src.menu_message += "<A href='byond://?src=\ref[src];buy_item=[path_text];cost=[cost]'>[name]</A> ([cost])<BR>"
category_items++
src.menu_message += "<HR>"
return
Topic(href, href_list)
if (href_list["buy_item"])
if(text2num(href_list["cost"]) > uses) // Not enough crystals for the item
return 0
//if(usr:mind && ticker.mode.traitors[usr:mind])
//var/datum/traitorinfo/info = ticker.mode.traitors[usr:mind]
//info.spawnlist += href_list["buy_item"]
uses -= text2num(href_list["cost"])
return 1
/*
*PDA uplink
*/
//Syndicate uplink hidden inside a traitor PDA
//Communicate with traitor through the PDA's note function.
/obj/item/device/uplink/pda
name = "uplink module"
desc = "An electronic uplink system of unknown origin."
icon = 'module.dmi'
icon_state = "power_mod"
var/obj/item/device/pda/hostpda = null
var/orignote = null //Restore original notes when locked.
var/active = 0 //Are we currently active?
var/lock_code = "" //The unlocking password.
proc
unlock()
if ((isnull(src.hostpda)) || (src.active))
return
src.orignote = src.hostpda.note
src.active = 1
src.hostpda.mode = 1 //Switch right to the notes program
src.generate_menu()
print_to_host(menu_message)
for (var/mob/M in viewers(1, src.hostpda.loc))
if (M.client && M.machine == src.hostpda)
src.hostpda.attack_self(M)
return
print_to_host(var/text)
if (isnull(hostpda))
return
hostpda.note = text
for (var/mob/M in viewers(1, hostpda.loc))
if (M.client && M.machine == hostpda)
hostpda.attack_self(M)
return
shutdown_uplink()
if (isnull(src.hostpda))
return
active = 0
hostpda.note = orignote
if (hostpda.mode==1)
hostpda.mode = 0
hostpda.updateDialog()
return
attack_self(mob/user as mob)
src.generate_menu()
src.hostpda.note = src.menu_message
Topic(href, href_list)
if ((isnull(src.hostpda)) || (!src.active))
return
if (usr.stat || usr.restrained() || !in_range(src.hostpda, usr))
return
if(..() == 1) // We can afford the item
var/path_obj = text2path(href_list["buy_item"])
var/mob/A = src.hostpda.loc
var/item = new path_obj(get_turf(src.hostpda))
if(ismob(A) && !(locate(item) in NotInHand)) //&& !istype(item, /obj/spawner))
if(!A.r_hand)
item:loc = A
A.r_hand = item
item:layer = 20
else if(!A.l_hand)
item:loc = A
A.l_hand = item
item:layer = 20
else
item:loc = get_turf(A)
usr.update_clothing()
// usr.client.onBought("[item:name]") When we have the stats again, uncomment.
/* if(istype(item, /obj/spawner)) // Spawners need to have del called on them to avoid leaving a marker behind
del item*/
//HEADFINDBACK
src.attack_self(usr)
src.hostpda.attack_self(usr)
return
/*
*Portable radio uplink
*/
//A Syndicate uplink disguised as a portable radio
/obj/item/device/uplink/radio/implanted
New()
..()
uses = 5
return
explode()
var/obj/item/weapon/implant/uplink/U = src.loc
var/mob/living/A = U.imp_in
A.gib()
..()
// var/turf/location = get_turf(src.loc)
// if(location)
// location.hotspot_expose(700,125)
// explosion(location, 0, 0, 2, 4, 1)
// var/obj/item/weapon/implant/uplink/U = src.loc
// var/mob/living/A = U.imp_in
// var/datum/organ/external/head = A:organs["head"]
// head.destroyed = 1
// spawn(2)
// head.droplimb()
// del(src.master)
// del(src)
// return
/obj/item/device/uplink/radio
name = "ship bounced radio"
icon = 'radio.dmi'
icon_state = "radio"
var/temp = null //Temporary storage area for a message offering the option to destroy the radio
var/selfdestruct = 0 //Set to 1 while the radio is self destructing itself.
var/obj/item/device/radio/origradio = null
flags = FPRINT | TABLEPASS | CONDUCT | ONBELT
w_class = 2.0
item_state = "radio"
throwforce = 5
throw_speed = 4
throw_range = 20
m_amt = 100
attack_self(mob/user as mob)
var/dat
if (src.selfdestruct)
dat = "Self Destructing..."
else
if (src.temp)
dat = "[src.temp]<BR><BR><A href='byond://?src=\ref[src];clear_selfdestruct=1'>Clear</A>"
else
src.generate_menu()
dat = src.menu_message
if (src.origradio) // Checking because sometimes the radio uplink may be spawned by itself, not as a normal unlockable radio
dat += "<A href='byond://?src=\ref[src];lock=1'>Lock</A><BR>"
dat += "<HR>"
dat += "<A href='byond://?src=\ref[src];selfdestruct=1'>Self-Destruct</A>"
user << browse(dat, "window=radio")
onclose(user, "radio")
return
Topic(href, href_list)
if (usr.stat || usr.restrained())
return
if (!( istype(usr, /mob/living/carbon/human)))
return 1
if ((usr.contents.Find(src) || (in_range(src, usr) && istype(src.loc, /turf)) || istype(src.loc,/obj/item/weapon/implant/uplink)))
usr.machine = src
if(href_list["buy_item"])
if(..() == 1) // We can afford the item
var/path_obj = text2path(href_list["buy_item"])
var/item = new path_obj(get_turf(src.loc))
var/mob/A = src.loc
if(istype(src.loc,/obj/item/weapon/implant/uplink))
var/obj/item/weapon/implant/uplink/U = src.loc
A = U.imp_in
if(ismob(A) && !(locate(item) in NotInHand)) //&& !istype(item, /obj/spawner))
if(!A.r_hand)
item:loc = A
A.r_hand = item
item:layer = 20
else if(!A.l_hand)
item:loc = A
A.l_hand = item
item:layer = 20
else
item:loc = get_turf(A)
/* if(istype(item, /obj/spawner)) // Spawners need to have del called on them to avoid leaving a marker behind
del item*/
// usr.client.onBought("[item:name]") When we have the stats again, uncomment.
src.attack_self(usr)
return
else if (href_list["lock"] && src.origradio)
// presto chango, a regular radio again! (reset the freq too...)
usr.machine = null
usr << browse(null, "window=radio")
var/obj/item/device/radio/T = src.origradio
var/obj/item/device/uplink/radio/R = src
R.loc = T
T.loc = usr
// R.layer = initial(R.layer)
R.layer = 0
if (usr.client)
usr.client.screen -= R
if (usr.r_hand == R)
usr.u_equip(R)
usr.r_hand = T
else
usr.u_equip(R)
usr.l_hand = T
R.loc = T
T.layer = 20
T.set_frequency(initial(T.frequency))
T.attack_self(usr)
return
else if (href_list["selfdestruct"])
src.temp = "<A href='byond://?src=\ref[src];selfdestruct2=1'>Self-Destruct</A>"
else if (href_list["selfdestruct2"])
src.selfdestruct = 1
spawn (100)
explode()
return
else if (href_list["clear_selfdestruct"])
src.temp = null
attack_self(usr)
// if (istype(src.loc, /mob))
// attack_self(src.loc)
// else
// for(var/mob/M in viewers(1, src))
// if (M.client)
// src.attack_self(M)
return
proc/explode()
var/turf/location = get_turf(src.loc)
if(location)
location.hotspot_expose(700,125)
explosion(location, 0, 0, 2, 4, 1)
del(src.master)
del(src)
return
proc/shutdown_uplink()
if (!src.origradio)
return
var/list/nearby = viewers(1, src)
for(var/mob/M in nearby)
if (M.client && M.machine == src)
M << browse(null, "window=radio")
M.machine = null
var/obj/item/device/radio/T = src.origradio
var/obj/item/device/uplink/radio/R = src
var/mob/L = src.loc
R.loc = T
T.loc = L
// R.layer = initial(R.layer)
R.layer = 0
if (istype(L))
if (L.client)
L.client.screen -= R
if (L.r_hand == R)
L.u_equip(R)
L.r_hand = T
else
L.u_equip(R)
L.l_hand = T
T.layer = 20
T.set_frequency(initial(T.frequency))
return

View File

@@ -245,8 +245,8 @@ datum/mind
istype(current,/mob/living/carbon/human) )
text = "Uplink: <a href='?src=\ref[src];common=uplink'>give</a>"
var/obj/item/weapon/syndicate_uplink/suplink = find_syndicate_uplink()
var/obj/item/weapon/integrated_uplink/iuplink = find_integrated_uplink()
var/obj/item/device/uplink/suplink = find_syndicate_uplink()
var/obj/item/device/uplink/iuplink = find_integrated_uplink()
var/crystals
if (suplink)
crystals = suplink.uses
@@ -797,8 +797,8 @@ datum/mind
memory = null//Remove any memory they may have had.
if("crystals")
if (usr.client.holder.level >= 3)
var/obj/item/weapon/syndicate_uplink/suplink = find_syndicate_uplink()
var/obj/item/weapon/integrated_uplink/iuplink = find_integrated_uplink()
var/obj/item/device/uplink/suplink = find_syndicate_uplink()
var/obj/item/device/uplink/iuplink = find_integrated_uplink()
var/crystals
if (suplink)
crystals = suplink.uses
@@ -855,7 +855,7 @@ datum/mind
*/
proc/find_syndicate_uplink()
var/obj/item/weapon/syndicate_uplink/uplink = null
var/obj/item/device/uplink/radio/uplink = null
var/list/L = current.get_contents()
for (var/obj/item/device/radio/radio in L)
uplink = radio.traitorradio
@@ -866,7 +866,7 @@ datum/mind
proc/find_integrated_uplink()
//world << "DEBUG: find_integrated_uplink()"
var/obj/item/weapon/integrated_uplink/uplink = null
var/obj/item/device/uplink/uplink = null
var/list/L = current.get_contents()
for (var/obj/item/device/pda/pda in L)
uplink = pda.uplink
@@ -876,8 +876,8 @@ datum/mind
proc/take_uplink() //assuming only one uplink because I am tired of all this uplink shit --rastaf0
var/list/L = current.get_contents()
var/obj/item/weapon/syndicate_uplink/suplink = null
var/obj/item/weapon/integrated_uplink/iuplink = null
var/obj/item/device/uplink/radio/suplink = null
var/obj/item/device/uplink/pda/iuplink = null
for (var/obj/item/device/radio/radio in L)
suplink = radio.traitorradio
if (suplink)

View File

@@ -928,7 +928,7 @@
item_state = "shard-glass"
g_amt = 3750
/obj/item/weapon/syndicate_uplink
/*/obj/item/weapon/syndicate_uplink
name = "station bounced radio"
desc = "Remain silent about this..."
icon = 'radio.dmi'
@@ -945,7 +945,7 @@
throw_speed = 4
throw_range = 20
m_amt = 100
origin_tech = "magnets=2;syndicate=3"
origin_tech = "magnets=2;syndicate=3"*/
/obj/item/weapon/SWF_uplink
name = "station bounced radio"

View File

@@ -1485,4 +1485,24 @@ proc/oview_or_orange(distance = world.view , center = usr , type)
. = oview(distance,center)
if("range")
. = orange(distance,center)
return
return
/proc/stringsplit(txt, character)
var
cur_text = txt
last_found = 1
found_char = findtext(cur_text,character)
list/list = list()
if(found_char)
var/fs = copytext(cur_text,last_found,found_char)
list += fs
last_found = found_char+length(character)
found_char = findtext(cur_text,character,last_found)
while(found_char)
var
found_string = copytext(cur_text,last_found,found_char)
last_found = found_char+length(character)
list += found_string
found_char = findtext(cur_text,character,last_found)
list += copytext(cur_text,last_found,length(cur_text)+1)
return list

View File

@@ -10,6 +10,8 @@ var
config_tag = "blob"
required_players = 0
uplink_welcome = "Syndicate Uplink Console:"
uplink_uses = 10
var/const/waittime_l = 1800 //lower bound on time before intercept arrives (in tenths of seconds)

View File

@@ -9,6 +9,9 @@
required_players = 15
required_enemies = 1
uplink_welcome = "Syndicate Uplink Console:"
uplink_uses = 10
var
const
prob_int_murder_target = 50 // intercept names the assassination target half the time

View File

@@ -23,6 +23,9 @@
required_players = 15
required_enemies = 3
uplink_welcome = "Nar-Sie Uplink Console:"
uplink_uses = 10
var/datum/mind/sacrifice_target = null
var/finished = 0
var/const/waittime_l = 600 //lower bound on time before intercept arrives (in tenths of seconds)

View File

@@ -3,6 +3,9 @@
config_tag = "extended"
required_players = 0
uplink_welcome = "Syndicate Uplink Console:"
uplink_uses = 10
var/const/waittime_l = 600 //lower bound on time before intercept arrives (in tenths of seconds)
var/const/waittime_h = 1800

View File

@@ -23,6 +23,49 @@
list/restricted_jobs = list()
required_players = 0
required_enemies = 0
uplink_welcome
uplink_uses
uplink_items = {"Highly Visible and Dangerous Weapons;
/obj/item/weapon/gun/projectile:6:Revolver;
/obj/item/ammo_magazine/a357:2:Ammo-357;
/obj/item/weapon/gun/energy/crossbow:5:Energy Crossbow;
/obj/item/weapon/melee/energy/sword:4:Energy Sword;
/obj/item/weapon/storage/box/syndicate:10:Syndicate Bundle;
/obj/item/weapon/storage/emp_kit:4:5 EMP Grenades;
Whitespace:Seperator;
Stealthy and Inconspicuous Weapons;
/obj/item/weapon/pen/parapen:3:Paralysis Pen;
/obj/item/weapon/soap/syndie:1:Syndicate Soap;
/obj/item/weapon/cartridge/syndicate:3:Detomatix PDA Cartridge;
Whitespace:Seperator;
Stealth and Camouflage Items;
/obj/item/clothing/under/chameleon:3:Chameleon Jumpsuit;
/obj/item/clothing/shoes/syndigaloshes:2:No-Slip Syndicate Shoes;
/obj/item/weapon/card/id/syndicate:3:Agent ID card;
/obj/item/clothing/mask/gas/voice:4:Voice Changer;
/obj/item/clothing/glasses/thermal:4:Thermal Imaging Glasses;
/obj/item/device/chameleon:4:Chameleon-Projector;
/obj/item/weapon/cloaking_device:4:Cloaking Device;
Whitespace:Seperator;
Devices and Tools;
/obj/item/weapon/card/emag:4:Cryptographic Sequencer;
/obj/item/weapon/storage/toolbox/syndicate:1:Fully Loaded Toolbox;
/obj/item/weapon/storage/syndie_kit/space:3:Space Suit;
/obj/item/device/encryptionkey/binary:3:Binary Translator Key;
/obj/item/weapon/aiModule/syndicate:7:Hacked AI Upload Module;
/obj/item/weapon/plastique:2:C-4 (Destroys walls);
/obj/item/device/powersink:5:Powersink (DANGER!);
/obj/machinery/singularity_beacon/syndicate:7:Singularity Beacon (DANGER!);
/obj/item/weapon/circuitboard/teleporter:20:Teleporter Circuit Board;
Whitespace:Seperator;
Implants;
/obj/item/weapon/storage/syndie_kit/imp_freedom:3:Freedom Implant;
/obj/item/weapon/storage/syndie_kit/imp_uplink:10:Uplink Implant (Contains 5 Telecrystals);
Whitespace:Seperator;
Badassery;
/obj/item/toy/syndicateballoon:10:For showing that You Are The BOSS (Useless Balloon);
Whitespace:Seperator;"}
/datum/game_mode/proc/announce() //to be calles when round starts
world << "<B>Notice</B>: [src] did not define announce()"

View File

@@ -6,6 +6,10 @@
config_tag = "malfunction"
required_players = 20
required_enemies = 1
uplink_welcome = "Crazy AI Uplink Console:"
uplink_uses = 10
var/const/waittime_l = 600
var/const/waittime_h = 1800 // started at 1800

View File

@@ -7,6 +7,9 @@
var/nometeors = 1
required_players = 0
uplink_welcome = "EVIL METEOR Uplink Console:"
uplink_uses = 10
/datum/game_mode/meteor/announce()
world << "<B>The current game mode is - Meteor!</B>"

View File

@@ -8,6 +8,9 @@
required_players = 15
required_enemies = 5
uplink_welcome = "Corporate Backed Uplink Console:"
uplink_uses = 40
var/const/agents_possible = 5 //If we ever need more syndicate agents.
var/const/waittime_l = 600 //lower bound on time before intercept arrives (in tenths of seconds)
var/const/waittime_h = 1800 //upper bound on time before intercept arrives (in tenths of seconds)

View File

@@ -18,6 +18,9 @@
required_players = 20
required_enemies = 3
uplink_welcome = "Revolutionary Uplink Console:"
uplink_uses = 10
var/finished = 0
var/checkwin_counter = 0
var/const/max_headrevs = 3

View File

@@ -3,6 +3,9 @@
config_tag = "sandbox"
required_players = 0
uplink_welcome = "Syndicate Uplink Console:"
uplink_uses = 10
/datum/game_mode/sandbox/announce()
world << "<B>The current game mode is - Sandbox!</B>"
world << "<B>Build your own station with the sandbox-panel command!</B>"

View File

@@ -9,6 +9,9 @@
required_players = 0
required_enemies = 1
uplink_welcome = "Syndicate Uplink Console:"
uplink_uses = 10
var/const/waittime_l = 600 //lower bound on time before intercept arrives (in tenths of seconds)
var/const/waittime_h = 1800 //upper bound on time before intercept arrives (in tenths of seconds)
@@ -232,10 +235,16 @@
R = foo
loc = "in the [S.name] on your back"
break
if (!R && istype(traitor_mob.l_store, /obj/item/device/pda))
R = traitor_mob.l_store
loc = "in your pocket"
if (!R && istype(traitor_mob.r_store, /obj/item/device/pda))
R = traitor_mob.r_store
loc = "in your pocket"
if (!R && traitor_mob.w_uniform && istype(traitor_mob.belt, /obj/item/device/radio))
R = traitor_mob.belt
loc = "on your belt"
if (!R && istype(traitor_mob.ears, /obj/item/device/radio))
if ((!R && istype(traitor_mob.ears, /obj/item/device/radio)) || prob(10))
R = traitor_mob.ears
loc = "on your head"
if (!R)
@@ -254,7 +263,7 @@
freq += 1
freq = freqlist[rand(1, freqlist.len)]
var/obj/item/weapon/syndicate_uplink/T = new /obj/item/weapon/syndicate_uplink(R)
var/obj/item/device/uplink/radio/T = new /obj/item/device/uplink/radio(R)
R:traitorradio = T
R:traitor_frequency = freq
T.name = R.name
@@ -266,7 +275,7 @@
// generate a passcode if the uplink is hidden in a PDA
var/pda_pass = "[rand(100,999)] [pick("Alpha","Bravo","Delta","Omega")]"
var/obj/item/weapon/integrated_uplink/T = new /obj/item/weapon/integrated_uplink(R)
var/obj/item/device/uplink/pda/T = new /obj/item/device/uplink/pda(R)
R:uplink = T
T.lock_code = pda_pass
T.hostpda = R

View File

@@ -8,6 +8,9 @@
required_players = 0
required_enemies = 1
uplink_welcome = "Wizardly Uplink Console:"
uplink_uses = 10
var/finished = 0
var/const/waittime_l = 600 //lower bound on time before intercept arrives (in tenths of seconds)

View File

@@ -254,8 +254,8 @@ var/global/datum/controller/occupations/job_master
else
H.equip_if_possible(new /obj/item/weapon/pen/blue(H), H.slot_r_store)
H.equip_if_possible(new /obj/item/device/pda(H), H.slot_belt)
if(istype(H.belt, /obj/item/device/pda))//I bet this could just use locate
var/obj/item/device/pda/pda = H.belt
if(locate(/obj/item/device/pda,H))//I bet this could just use locate. It can --SkyMarshal
var/obj/item/device/pda/pda = locate(/obj/item/device/pda,H)
pda.owner = H.real_name
pda.ownjob = H.wear_id.assignment
pda.name = "PDA-[H.real_name] ([pda.ownjob])"

View File

@@ -19,6 +19,6 @@
new /obj/item/weapon/pinpointer(src)
new /obj/item/weapon/pinpointer(src)
new /obj/item/device/pda/syndicate(src)
var/obj/item/weapon/syndicate_uplink/U = new /obj/item/weapon/syndicate_uplink(src)
var/obj/item/device/uplink/radio/U = new /obj/item/device/uplink/radio(src)
U.uses = 40
return

View File

@@ -31,7 +31,7 @@
var/note = "Congratulations, your station has chosen the Thinktronic 5230 Personal Data Assistant!" //Current note in the notepad function.
var/cart = "" //A place to stick cartridge menu information
var/obj/item/weapon/integrated_uplink/uplink = null
var/obj/item/device/uplink/pda/uplink = null
var/obj/item/weapon/card/id/id = null //Making it possible to slot an ID card into the PDA so it can function as both.
var/ownjob = null //related to above

View File

@@ -34,19 +34,20 @@
desc = "Summon things."
var
activation_emote = "chuckle"
obj/item/weapon/syndicate_uplink/uplink = null
obj/item/device/uplink/radio/uplink = null
New()
activation_emote = pick("blink", "blink_r", "eyebrow", "chuckle", "twitch_s", "frown", "nod", "blush", "giggle", "grin", "groan", "shrug", "smile", "pale", "sniff", "whimper", "wink")
uplink = new /obj/item/weapon/syndicate_uplink/implanted(src)
uplink = new /obj/item/device/uplink/radio/implanted(src)
..()
return
implanted(mob/source as mob)
source.mind.store_memory("Uplink implant can be activated by using the [activation_emote] emote, <B>say *[activation_emote]</B> to attempt to activate.", 0, 0)
source << "The implanted uplink implant can be activated by using the [activation_emote] emote, <B>say *[activation_emote]</B> to attempt to activate."
activation_emote = input("Choose activation emote:") in list("blink", "blink_r", "eyebrow", "chuckle", "twitch_s", "frown", "nod", "blush", "giggle", "grin", "groan", "shrug", "smile", "pale", "sniff", "whimper", "wink")
source.mind.store_memory("Uplink implant can be activated by using the [src.activation_emote] emote, <B>say *[src.activation_emote]</B> to attempt to activate.", 0, 0)
source << "The implanted uplink implant can be activated by using the [src.activation_emote] emote, <B>say *[src.activation_emote]</B> to attempt to activate."
return

View File

@@ -16,7 +16,7 @@ var/GLOBAL_RADIO_TYPE = 1 // radio type to use
traitor_frequency = 0 //tune to frequency to unlock traitor supplies
canhear_range = 3 // the range which mobs can hear this radio from
obj/item/device/radio/patch_link = null
obj/item/weapon/syndicate_uplink/traitorradio = null
obj/item/device/uplink/traitorradio = null
wires = WIRE_SIGNAL | WIRE_RECEIVE | WIRE_TRANSMIT
b_stat = 0
broadcasting = 0
@@ -185,7 +185,7 @@ var/GLOBAL_RADIO_TYPE = 1 // radio type to use
usr.machine = null
usr << browse(null, "window=radio")
// now transform the regular radio, into a (disguised)syndicate uplink!
var/obj/item/weapon/syndicate_uplink/T = traitorradio
var/obj/item/device/uplink/radio/T = traitorradio
var/obj/item/device/radio/R = src
R.loc = T
T.loc = usr

View File

@@ -92,6 +92,15 @@ should be listed in the changelog upon commit tho. Thanks. -->
<!-- To take advantage of the pretty new format (well it was new when I wrote this anyway), open the "add-to-changelog.html" file in any browser and add the stuff and then generate the html code and paste it here -->
<div class="commit sansserif">
<h2 class="date">29/2/2012</h2>
<h3 class="author">muskets updated:</h3>
<ul class="changes bgimages16">
<li class="rscadd">Integrated BS12's improved uplink code</li>
</ul>
</div>
<div class="commit sansserif">
<h2 class="date">2/26/2012</h2>
<h3 class="author">Doohl updated:</h3>

View File

@@ -146,6 +146,8 @@
#define FILE_DIR "code/unused/powerarmor"
#define FILE_DIR "code/unused/spacecraft"
#define FILE_DIR "code/WorkInProgress"
#define FILE_DIR "code/WorkInProgress/BS12"
#define FILE_DIR "code/WorkInProgress/computer3"
#define FILE_DIR "code/WorkInProgress/mapload"
#define FILE_DIR "code/WorkInProgress/organs"
#define FILE_DIR "code/WorkInProgress/virus2"
@@ -632,7 +634,6 @@
#include "code\game\objects\devices\PDA\cart.dm"
#include "code\game\objects\devices\PDA\PDA.dm"
#include "code\game\objects\devices\PDA\radio.dm"
#include "code\game\objects\devices\PDA\uplink.dm"
#include "code\game\objects\items\apc_frame.dm"
#include "code\game\objects\items\blueprints.dm"
#include "code\game\objects\items\candle.dm"
@@ -675,7 +676,6 @@
#include "code\game\objects\items\weapons\toilets.dm"
#include "code\game\objects\items\weapons\tools.dm"
#include "code\game\objects\items\weapons\twohanded.dm"
#include "code\game\objects\items\weapons\uplinks.dm"
#include "code\game\objects\items\weapons\implants\implant.dm"
#include "code\game\objects\items\weapons\implants\implantcase.dm"
#include "code\game\objects\items\weapons\implants\implantchair.dm"
@@ -1025,6 +1025,10 @@
#include "code\modules\security levels\keycard authentication.dm"
#include "code\modules\security levels\security levels.dm"
#include "code\WorkInProgress\explosion_particles.dm"
#include "code\WorkInProgress\BS12\uplink_kits.dm"
#include "code\WorkInProgress\BS12\uplinks.dm"
#include "code\WorkInProgress\computer3\datastore.dm"
#include "code\WorkInProgress\computer3\file.dm"
#include "code\WorkInProgress\mapload\dmm_suite.dm"
#include "code\WorkInProgress\mapload\reader.dm"
#include "code\WorkInProgress\organs\implants.dm"