NanoUI traitor uplink

This commit is contained in:
Markolie
2015-07-28 06:28:01 +02:00
parent 989280f9af
commit b6e446c446
5 changed files with 338 additions and 198 deletions
+2 -2
View File
@@ -63,7 +63,7 @@
G.fields["fingerprint"] = md5(H.dna.uni_identity)
G.fields["p_stat"] = "Active"
G.fields["m_stat"] = "Stable"
G.fields["sex"] = H.gender
G.fields["sex"] = capitalize(H.gender)
G.fields["species"] = H.get_species()
G.fields["photo"] = get_id_photo(H)
if(H.gen_record && !jobban_isbanned(H, "Records"))
@@ -114,7 +114,7 @@
L.fields["name"] = H.real_name
L.fields["rank"] = H.mind.assigned_role
L.fields["age"] = H.age
L.fields["sex"] = H.gender
L.fields["sex"] = capitalize(H.gender)
L.fields["b_type"] = H.b_type
L.fields["b_dna"] = H.dna.unique_enzymes
L.fields["enzymes"] = H.dna.SE // Used in respawning
+104 -8
View File
@@ -34,6 +34,10 @@ var/list/uplink_items = list()
return uplink_items
/datum/nano_item_lists
var/list/items_nano
var/list/items_reference
// You can change the order of the list by putting datums before/after one another OR
// you can use the last variable to make sure it appears last, well have the category appear last.
@@ -41,6 +45,7 @@ var/list/uplink_items = list()
var/name = "item name"
var/category = "item category"
var/desc = "Item Description"
var/reference = "Item Reference"
var/item = null
var/cost = 0
var/last = 0 // Appear last
@@ -56,17 +61,24 @@ var/list/uplink_items = list()
U.used_TC += cost
feedback_add_details("traitor_uplink_items_bought", name)
return new item(loc)
/datum/uplink_item/proc/description()
if(!desc)
// Fallback description
var/obj/temp = src.item
desc = replacetext(initial(temp.desc), "\n", "<br>")
return desc
/datum/uplink_item/proc/buy(var/obj/item/device/uplink/hidden/U, var/mob/user)
..()
if(!istype(U))
return 0
if (user.stat || user.restrained())
return 0
if (!( istype(user, /mob/living/carbon/human)))
if (!(istype(user, /mob/living/carbon/human)))
return 0
// If the uplink's holder is in the user's contents
@@ -87,7 +99,7 @@ var/list/uplink_items = list()
else
U.purchase_log += "<BIG>\icon[I]</BIG>"
U.interact(user)
//U.interact(user)
return 1
return 0
@@ -103,8 +115,9 @@ var/list/uplink_items = list()
//Clown
/datum/uplink_item/jobspecific/clowngrenade
name = "1 Banana Grenade"
name = "Banana Grenade"
desc = "A grenade that explodes into HONK! brand banana peels that are genetically modified to be extra slippery and extrude caustic acid when stepped on"
reference = "BG"
item = /obj/item/weapon/grenade/clown_grenade
cost = 8
job = list("Clown")
@@ -113,6 +126,7 @@ var/list/uplink_items = list()
/datum/uplink_item/jobspecific/specialsauce
name = "Chef Excellence's Special Sauce"
desc = "A custom made sauce made from the toxin glands of 1000 space carp, if somebody ingests enough they'll be dead in 3 minutes or less guaranteed."
reference = "ES"
item = /obj/item/weapon/reagent_containers/food/condiment/syndisauce
cost = 2
job = list("Chef")
@@ -120,6 +134,7 @@ var/list/uplink_items = list()
/datum/uplink_item/jobspecific/meatcleaver
name = "Meat Cleaver"
desc = "A mean looking meat cleaver that does damage comparable to an Energy Sword but with the added benefit of chopping your victim into hunks of meat after they've died and the chance to stun when thrown."
reference = "MC"
item = /obj/item/weapon/butch/meatcleaver
cost = 10
job = list("Chef")
@@ -127,6 +142,7 @@ var/list/uplink_items = list()
/datum/uplink_item/jobspecific/syndidonk
name = "Syndicate Donk Pockets"
desc = "A box of highly specialized donk pockets with a number of regenerative and stimulating chemicals inside of them; the box comes equipped with a self-heating mechanism."
reference = "DP"
item = /obj/item/weapon/storage/box/syndidonkpockets
cost = 2
job = list("Chef")
@@ -136,6 +152,7 @@ var/list/uplink_items = list()
/datum/uplink_item/jobspecific/cautionsign
name = "Proximity Mine"
desc = "An Anti-Personnel proximity mine cleverly disguised as a wet floor caution sign that is triggered by running past it, activate it to start the 15 second timer and activate again to disarm."
reference = "PM"
item = /obj/item/weapon/caution/proximity_sign
cost = 4
job = list("Janitor")
@@ -146,6 +163,7 @@ var/list/uplink_items = list()
/datum/uplink_item/jobspecific/rad_laser
name = "Radiation Laser"
desc = "A radiation laser concealed inside of a Health Analyser, After a moderate delay, causes temporary collapse and radiation. Has adjustable controls, but will not function as a regular health analyzer, only appears like one. May not function correctly on radiation resistent humanoids!"
reference = "RL"
item = /obj/item/device/rad_laser
cost = 6
job = list(
@@ -164,6 +182,7 @@ var/list/uplink_items = list()
/datum/uplink_item/jobspecific/pickpocketgloves
name = "Pickpocket's Gloves"
desc = "A pair of sleek gloves to aid in pickpocketing, while wearing these you can see inside the pockets of any unsuspecting mark, loot the ID or pockets without them knowing, and pickpocketing puts the item directly into your hand."
reference = "PG"
item = /obj/item/clothing/gloves/color/black/thief
cost = 6
job = list("Civilian")
@@ -173,6 +192,7 @@ var/list/uplink_items = list()
/datum/uplink_item/jobspecific/drunkbullets
name = "Boozey Shotgun Shells"
desc = "A box containing 6 shotgun shells that simulate the effects of extreme drunkeness on the target, more effective for each type of alcohol in the target's system."
reference = "BS"
item = /obj/item/weapon/storage/box/syndie_kit/boolets
cost = 6
job = list("Bartender")
@@ -182,6 +202,7 @@ var/list/uplink_items = list()
/datum/uplink_item/jobspecific/powergloves
name = "Power Gloves"
desc = "Insulated gloves that can utilize the power of the station to deliver a short arc of electricity at a target. Must be standing on a powered cable to use."
reference = "PG"
item = /obj/item/clothing/gloves/color/yellow/power
cost = 10
job = list("Station Engineer","Chief Engineer")
@@ -191,6 +212,7 @@ var/list/uplink_items = list()
/datum/uplink_item/jobspecific/telegun
name = "Telegun"
desc = "An extremely high-tech energy gun that utilizes bluespace technology to teleport away living targets; will teleport targets to the same beacon a teleporter is locked onto."
reference = "TG"
item = /obj/item/weapon/gun/energy/telegun
cost = 12
job = list("Research Director")
@@ -201,6 +223,7 @@ var/list/uplink_items = list()
/datum/uplink_item/jobspecific/stims
name = "Stimulants"
desc = "A highly illegal compound containd within a comapct auto-injector; when injected it makes the user extremely resistant to incapacitation and greatly enhances the body's ability to repair itself."
reference = "ST"
item = /obj/item/weapon/reagent_containers/hypospray/autoinjector/stimulants
cost = 7
job = list("Scientist","Research Director","Geneticist","Chief Medical Officer","Medical Doctor","Psychiatrist","Chemist","Paramedic","Virologist","Brig Physician")
@@ -210,6 +233,7 @@ var/list/uplink_items = list()
/datum/uplink_item/jobspecific/poisonbottle
name = "Poison Bottle"
desc = "The Syndicate will ship a bottle containing 40 units of a randomly selected poison. The poison can range from highly irritating to incredibly lethal."
reference = "PB"
item = /obj/item/weapon/reagent_containers/glass/bottle/traitor
cost = 2
job = list("Scientist","Research Director","Chief Medical Officer","Medical Doctor","Psychiatrist","Chemist","Paramedic","Virologist","Bartender")
@@ -222,12 +246,14 @@ var/list/uplink_items = list()
/datum/uplink_item/dangerous/pistol
name = "Syndicate Pistol"
reference = "PI"
desc = "A small, easily concealable handgun that uses 10mm auto rounds in 8-round magazines and is compatible with suppressors."
item = /obj/item/weapon/gun/projectile/automatic/pistol
cost = 9
/datum/uplink_item/dangerous/revolver
name = "Syndicate Revolver"
reference = "SR"
desc = "A brutally simple syndicate revolver that fires .357 Magnum cartridges and has 7 chambers."
item = /obj/item/weapon/gun/projectile/revolver
cost = 13
@@ -235,6 +261,7 @@ var/list/uplink_items = list()
/datum/uplink_item/dangerous/smg
name = "Syndicate SMG"
reference = "SM"
desc = "A fully-loaded Scarborough Arms bullpup submachine gun that fires .45 rounds with a 20-round magazine and is compatible with suppressors."
item = /obj/item/weapon/gun/projectile/automatic/c20r
cost = 14
@@ -244,6 +271,7 @@ var/list/uplink_items = list()
/datum/uplink_item/dangerous/car
name = "C-90gl Compact Assault Rifle"
desc = "A fully-loaded Zashchita Industriya toploading bullpup assault rifle that uses 30-round 5.45x39mm magazines with a togglable underslung 40mm grenade launcher."
reference = "AR"
item = /obj/item/weapon/gun/projectile/automatic/c90gl
cost = 18
gamemodes = list("nuclear emergency")
@@ -252,6 +280,7 @@ var/list/uplink_items = list()
/datum/uplink_item/dangerous/machinegun
name = "Syndicate LMG"
desc = "A fully-loaded Aussec Armoury belt-fed machine gun. This deadly weapon has a massive 50-round magazine of devastating 7.62x51mm ammunition."
reference = "MG"
item = /obj/item/weapon/gun/projectile/automatic/l6_saw
cost = 40
gamemodes = list("nuclear emergency")
@@ -260,6 +289,7 @@ var/list/uplink_items = list()
/datum/uplink_item/dangerous/crossbow
name = "Energy Crossbow"
desc = "A miniature energy crossbow that is small enough both to fit into a pocket and to slip into a backpack unnoticed by observers. Fires bolts tipped with toxin, a poisonous substance that is the product of a living organism. Stuns enemies for a short period of time. Recharges automatically."
reference = "EC"
item = /obj/item/weapon/gun/energy/kinetic_accelerator/crossbow
cost = 12
excludefrom = list("nuclear emergency")
@@ -268,6 +298,7 @@ var/list/uplink_items = list()
/datum/uplink_item/dangerous/flamethrower
name = "Flamethrower"
desc = "A flamethrower, fueled by a portion of highly flammable biotoxins stolen previously from Nanotrasen stations. Make a statement by roasting the filth in their own greed. Use with caution."
reference = "FT"
item = /obj/item/weapon/flamethrower/full/tank
cost = 11
gamemodes = list("nuclear emergency")
@@ -276,18 +307,21 @@ var/list/uplink_items = list()
/datum/uplink_item/dangerous/sword
name = "Energy Sword"
desc = "The esword is an edged weapon with a blade of pure energy. The sword is small enough to be pocketed when inactive. Activating it produces a loud, distinctive noise."
reference = "ES"
item = /obj/item/weapon/melee/energy/sword
cost = 8
/datum/uplink_item/dangerous/chainsaw
name = "Chainsaw"
desc = "A high powered chainsaw for cutting up ...you know...."
reference = "CH"
item = /obj/item/weapon/twohanded/chainsaw
cost = 13
/datum/uplink_item/dangerous/manhacks
name = "Viscerator Delivery Grenade"
desc = "A unique grenade that deploys a swarm of viscerators upon activation, which will chase down and shred any non-operatives in the area."
reference = "VG"
item = /obj/item/weapon/grenade/spawnergrenade/manhacks
cost = 8
gamemodes = list("nuclear emergency")
@@ -296,6 +330,7 @@ var/list/uplink_items = list()
/datum/uplink_item/dangerous/tabungrenades
name = "Tabun Gas Grenades"
desc = "A box of four (4) grenades filled with tabun, a deadly neurotoxin. Use extreme caution when handling and be sure to vacate the premise after using; ensure communication is maintaind with team to avoid accidental gassings."
reference = "TG"
item = /obj/item/weapon/storage/box/syndie_kit/tabun
cost = 15
gamemodes = list("nuclear emergency")
@@ -304,12 +339,14 @@ var/list/uplink_items = list()
/datum/uplink_item/dangerous/emp
name = "EMP Kit"
desc = "A box that contains two EMP grenades, an EMP implant and a short ranged recharging device disguised as a flashlight. Useful to disrupt communication and silicon lifeforms."
reference = "EK"
item = /obj/item/weapon/storage/box/syndie_kit/emp
cost = 5
/datum/uplink_item/dangerous/syndicate_minibomb
name = "Syndicate Minibomb"
desc = "The Minibomb is a grenade with a five-second fuse."
reference = "MB"
item = /obj/item/weapon/grenade/syndieminibomb
cost = 6
@@ -317,6 +354,7 @@ var/list/uplink_items = list()
name = "Gygax Exosuit"
desc = "A lightweight exosuit, painted in a dark scheme. Its speed and equipment selection make it excellent for hit-and-run style attacks. \
This model lacks a method of space propulsion, and therefore it is advised to repair the mothership's teleporter if you wish to make use of it."
reference = "GE"
item = /obj/mecha/combat/gygax/dark/loaded
cost = 90
gamemodes = list("nuclear emergency")
@@ -325,6 +363,7 @@ var/list/uplink_items = list()
/datum/uplink_item/dangerous/mauler
name = "Mauler Exosuit"
desc = "A massive and incredibly deadly Syndicate exosuit. Features long-range targetting, thrust vectoring, and deployable smoke."
reference = "ME"
item = /obj/mecha/combat/marauder/mauler/loaded
cost = 140
gamemodes = list("nuclear emergency")
@@ -333,6 +372,7 @@ var/list/uplink_items = list()
/datum/uplink_item/dangerous/syndieborg
name = "Syndicate Cyborg"
desc = "A cyborg designed and programmed for systematic extermination of non-Syndicate personnel."
reference = "SC"
item = /obj/item/weapon/antag_spawner/borg_tele
cost = 50
gamemodes = list("nuclear emergency")
@@ -353,18 +393,21 @@ var/list/uplink_items = list()
/datum/uplink_item/ammo/pistol
name = "Ammo-10mm"
desc = "An additional 8-round 10mm magazine for use in the syndicate pistol. These subsonic rounds are dirt cheap but are half as effective as .357 rounds."
reference = "PA"
item = /obj/item/ammo_box/magazine/m10mm
cost = 1
/datum/uplink_item/ammo/revolver
name = "Speed Loader - .357"
desc = "A speed loader that contains seven additional .357 Magnum rounds for the syndicate revolver. For when you really need a lot of things dead."
reference = "RA"
item = /obj/item/ammo_box/a357
cost = 4
/datum/uplink_item/ammo/smg
name = "Magazine - .45"
desc = "An additional 20-round .45 magazine for use in the C-20r submachine gun. These bullets pack a lot of punch that can knock most targets down, but do limited overall damage."
reference = "AA"
item = /obj/item/ammo_box/magazine/smgm45
cost = 2
gamemodes = list("nuclear emergency")
@@ -372,6 +415,7 @@ var/list/uplink_items = list()
/datum/uplink_item/ammo/bullbuck
name = "Drum Magazine - 12g buckshot"
desc = "An additional 8-round buckshot magazine for use in the Bulldog shotgun. Front towards enemy."
reference = "BS"
item = /obj/item/ammo_box/magazine/m12g
cost = 2
gamemodes = list("nuclear emergency")
@@ -379,6 +423,7 @@ var/list/uplink_items = list()
/datum/uplink_item/ammo/bullstun
name = "Drum Magazine - 12g Stun Slug"
desc = "An alternative 8-round stun slug magazine for use in the Bulldog shotgun. Saying that they're completely non-lethal would be lying."
reference = "12"
item = /obj/item/ammo_box/magazine/m12g/stun
cost = 3
gamemodes = list("nuclear emergency")
@@ -386,6 +431,7 @@ var/list/uplink_items = list()
/datum/uplink_item/ammo/bulldragon
name = "Drum Magazine - 12g Dragon's Breath"
desc = "An alternative 8-round dragon's breath magazine for use in the Bulldog shotgun. I'm a fire starter, twisted fire starter!"
reference = "DB"
item = /obj/item/ammo_box/magazine/m12g/dragon
cost = 3
gamemodes = list("nuclear emergency")
@@ -393,6 +439,7 @@ var/list/uplink_items = list()
/datum/uplink_item/ammo/car
name = "Box Magazine - 5.45x39mm"
desc = "An additional 30-round 5.45x39mm magazine for use in the C-90gl assault rifle. These bullets don't have the punch to knock most targets down, but dish out higher overall damage."
reference = "CAA"
item = /obj/item/ammo_box/magazine/m545
cost = 2
gamemodes = list("nuclear emergency")
@@ -400,6 +447,7 @@ var/list/uplink_items = list()
/datum/uplink_item/ammo/a40mm
name = "Ammo Box - 40mm grenades"
desc = "A box of 4 additional 40mm HE grenades for use the C-90gl's underbarrel grenade launcher. Your teammates will thank you to not shoot these down small hallways."
reference = "40"
item = /obj/item/ammo_box/a40mm
cost = 4
gamemodes = list("nuclear emergency")
@@ -407,6 +455,7 @@ var/list/uplink_items = list()
/datum/uplink_item/ammo/machinegun
name = "Box Magazine - 7.62×51mm"
desc = "A 50-round magazine of 7.62x51mm ammunition for use in the L6 SAW machinegun. By the time you need to use this, you'll already be on a pile of corpses."
reference = "LA"
item = /obj/item/ammo_box/magazine/m762
cost = 12
gamemodes = list("nuclear emergency")
@@ -420,6 +469,7 @@ var/list/uplink_items = list()
/datum/uplink_item/stealthy_weapons/sleepy_pen
name = "Sleepy Pen"
desc = "A syringe disguised as a functional pen. It's filled with a potent anaesthetic. \The pen holds two doses of the mixture. The pen can be refilled."
reference = "SP"
item = /obj/item/weapon/pen/sleepy
cost = 8
excludefrom = list("nuclear emergency")
@@ -427,6 +477,7 @@ var/list/uplink_items = list()
/datum/uplink_item/stealthy_weapons/soap
name = "Syndicate Soap"
desc = "A sinister-looking surfactant used to clean blood stains to hide murders and prevent DNA analysis. You can also drop it underfoot to slip people."
reference = "SO"
item = /obj/item/weapon/soap/syndie
cost = 1
surplus = 50
@@ -434,6 +485,7 @@ var/list/uplink_items = list()
/datum/uplink_item/stealthy_weapons/detomatix
name = "Detomatix PDA Cartridge"
desc = "When inserted into a personal digital assistant, this cartridge gives you five opportunities to detonate PDAs of crewmembers who have their message feature enabled. The concussive effect from the explosion will knock the recipient out for a short period, and deafen them for longer. It has a chance to detonate your PDA."
reference = "DM"
item = /obj/item/weapon/cartridge/syndicate
cost = 6
@@ -442,6 +494,7 @@ var/list/uplink_items = list()
/datum/uplink_item/stealthy_weapons/silencer
name = "Universal Suppressor"
desc = "Fitted for use on any small caliber weapon with a threaded barrel, this suppressor will silence the shots of the weapon for increased stealth and superior ambushing capability."
reference = "US"
item = /obj/item/weapon/suppressor
cost = 3
surplus = 10
@@ -449,6 +502,7 @@ var/list/uplink_items = list()
/datum/uplink_item/stealthy_weapons/pizza_bomb
name = "Pizza Bomb"
desc = "A pizza box with a bomb taped inside of it. The timer needs to be set by opening the box; afterwards, opening the box again will trigger the detonation."
reference = "PB"
item = /obj/item/device/pizza_bomb
cost = 4
surplus = 8
@@ -456,6 +510,7 @@ var/list/uplink_items = list()
/datum/uplink_item/stealthy_weapons/dehy_carp
name = "Dehydrated Space Carp"
desc = "Just add water to make your very own hostile to everything space carp. It looks just like a plushie."
reference = "DC"
item = /obj/item/toy/carpplushie/dehy_carp
cost = 3
@@ -467,6 +522,7 @@ var/list/uplink_items = list()
/datum/uplink_item/stealthy_tools/chameleon_jumpsuit
name = "Chameleon Jumpsuit"
desc = "A jumpsuit used to imitate the uniforms of Nanotrasen crewmembers."
reference = "CJ"
item = /obj/item/clothing/under/chameleon
cost = 4
@@ -474,6 +530,7 @@ var/list/uplink_items = list()
name = "Chameleon Stamp"
desc = "A stamp that can be activated to imitate an official Nanotrasen Stamp™. The disguised stamp will work exactly like the real stamp and will allow you to forge false documents to gain access or equipment; \
it can also be used in a washing machine to forge clothing."
reference = "ST"
item = /obj/item/weapon/stamp/chameleon
cost = 1
surplus = 35
@@ -481,30 +538,35 @@ var/list/uplink_items = list()
/datum/uplink_item/stealthy_tools/syndigolashes
name = "No-Slip Syndicate Shoes"
desc = "These allow you to run on wet floors. They do not work on lubricated surfaces."
reference = "NS"
item = /obj/item/clothing/shoes/syndigaloshes
cost = 4
/datum/uplink_item/stealthy_tools/agent_card
name = "Agent ID Card"
desc = "Agent cards prevent artificial intelligences from tracking the wearer, and can copy access from other identification cards. The access is cumulative, so scanning one card does not erase the access gained from another."
reference = "AC"
item = /obj/item/weapon/card/id/syndicate
cost = 3
/datum/uplink_item/stealthy_tools/voice_changer
name = "Voice Changer"
desc = "A conspicuous gas mask that mimics the voice named on your identification card. When no identification is worn, the mask will render your voice unrecognizable."
reference = "VC"
item = /obj/item/clothing/mask/gas/voice
cost = 5
/datum/uplink_item/stealthy_tools/chameleon_proj
name = "Chameleon-Projector"
desc = "Projects an image across a user, disguising them as an object scanned with it, as long as they don't move the projector from their hand. The disguised user cannot run and rojectiles pass over them."
reference = "CP"
item = /obj/item/device/chameleon
cost = 7
/datum/uplink_item/stealthy_tools/camera_bug
name = "Camera Bug"
desc = "Enables you to bug cameras to view them remotely. Adding particular items to it alters its functions."
reference = "CB"
item = /obj/item/device/camera_bug
cost = 2
surplus = 90
@@ -512,12 +574,14 @@ var/list/uplink_items = list()
/datum/uplink_item/stealthy_tools/dnascrambler
name = "DNA Scrambler"
desc = "A syringe with one injection that randomizes appearance and name upon use. A cheaper but less versatile alternative to an agent card and voice changer."
reference = "DS"
item = /obj/item/weapon/dnascrambler
cost = 4
/datum/uplink_item/stealthy_tools/smugglersatchel
name = "Smuggler's Satchel"
desc = "This satchel is thin enough to be hidden in the gap between plating and tiling, great for stashing your stolen goods. Comes with a crowbar and a floor tile inside."
reference = "SA"
item = /obj/item/weapon/storage/backpack/satchel_flat
cost = 2
surplus = 30
@@ -531,12 +595,14 @@ var/list/uplink_items = list()
/datum/uplink_item/device_tools/emag
name = "Cryptographic Sequencer"
desc = "The emag is a small card that unlocks hidden functions in electronic devices, subverts intended functions and characteristically breaks security mechanisms."
reference = "EM"
item = /obj/item/weapon/card/emag
cost = 6
/datum/uplink_item/device_tools/toolbox
name = "Fully Loaded Toolbox"
desc = "The syndicate toolbox is a suspicious black and red. Aside from tools, it comes with cable and a multitool. Insulated gloves are not included."
reference = "TB"
item = /obj/item/weapon/storage/toolbox/syndicate
cost = 1
@@ -545,6 +611,7 @@ var/list/uplink_items = list()
name = "Syndicate Combat Medic Kit"
desc = "The syndicate medkit is a suspicious black and red. Included is a combat stimulant injector for rapid healing, a medical hud for quick identification of injured comrades, \
and other medical supplies helpful for a medical field operative."
reference = "MK"
item = /obj/item/weapon/storage/firstaid/tactical
cost = 9
gamemodes = list("nuclear emergency")
@@ -552,12 +619,14 @@ var/list/uplink_items = list()
/datum/uplink_item/badass/syndiecigs
name = "Syndicate Smokes"
desc = "Strong flavor, dense smoke, infused with omnizine."
reference = "SG"
item = /obj/item/weapon/storage/fancy/cigarettes/cigpack_syndicate
cost = 4
/datum/uplink_item/device_tools/space_suit
name = "Space Suit"
desc = "The red and black syndicate space suit is less encumbering than Nanotrasen variants, fits inside bags, and has a weapon slot. Nanotrasen crewmembers are trained to report red space suit sightings."
reference = "SS"
item = /obj/item/weapon/storage/box/syndie_kit/space
cost = 5
@@ -566,18 +635,21 @@ var/list/uplink_items = list()
desc = "The feared suit of a syndicate nuclear agent. Features slightly better armoring. When the helmet is deployed your identity will be protected. Toggling the suit into combat mode \
will allow you all the mobility of a loose fitting uniform without sacrificing armoring. Additionally the suit is collapsible, small enough to fit within a backpack. \
Nanotrasen crewmembers are trained to report red space suit sightings, these suits in particular are known to drive employees into a panic."
reference = "HS"
item = /obj/item/weapon/storage/box/syndie_kit/hardsuit
cost = 8
/datum/uplink_item/device_tools/thermal
name = "Thermal Imaging Glasses"
desc = "These glasses are thermals disguised as engineers' optical meson scanners. They allow you to see organisms through walls by capturing the upper portion of the infrared light spectrum, emitted as heat and light by objects. Hotter objects, such as warm bodies, cybernetic organisms and artificial intelligence cores emit more of this light than cooler objects like walls and airlocks."
reference = "TH"
item = /obj/item/clothing/glasses/thermal/syndi
cost = 6
/datum/uplink_item/device_tools/binary
name = "Binary Translator Key"
desc = "A key, that when inserted into a radio headset, allows you to listen to and talk with artificial intelligences and cybernetic organisms in binary."
reference = "BI"
item = /obj/item/device/encryptionkey/binary
cost = 5
surplus = 75
@@ -585,6 +657,7 @@ var/list/uplink_items = list()
/datum/uplink_item/device_tools/cipherkey
name = "Syndicate Encryption Key"
desc = "A key, that when inserted into a radio headset, allows you to listen to all station department channels as well as talk on an encrypted Syndicate channel."
reference = "SK"
item = /obj/item/device/encryptionkey/syndicate
cost = 5
surplus = 75
@@ -592,6 +665,7 @@ var/list/uplink_items = list()
/datum/uplink_item/device_tools/hacked_module
name = "Hacked AI Upload Module"
desc = "When used with an upload console, this module allows you to upload priority laws to an artificial intelligence. Be careful with their wording, as artificial intelligences may look for loopholes to exploit."
reference = "HA"
item = /obj/item/weapon/aiModule/syndicate
cost = 14
@@ -599,6 +673,7 @@ var/list/uplink_items = list()
name = "Blood-Red Magboots"
desc = "A pair of magnetic boots with a Syndicate paintjob that assist with freer movement in space or on-station during gravitational generator failures. \
These reverse-engineered knockoffs of Nanotrasen's 'Advanced Magboots' slow you down in simulated-gravity environments much like the standard issue variety."
reference = "RM"
item = /obj/item/clothing/shoes/magboots/syndie
cost = 5
gamemodes = list("nuclear emergency")
@@ -606,18 +681,21 @@ var/list/uplink_items = list()
/datum/uplink_item/device_tools/plastic_explosives
name = "Composition C-4"
desc = "C-4 is plastic explosive of the common variety Composition C. You can use it to breach walls or connect a signaler to its wiring to make it remotely detonable. It has a modifiable timer with a minimum setting of 10 seconds."
reference = "C4"
item = /obj/item/weapon/c4
cost = 1
/datum/uplink_item/device_tools/powersink
name = "Power sink"
name = "Power Sink"
desc = "When screwed to wiring attached to an electric grid, then activated, this large device places excessive load on the grid, causing a stationwide blackout. The sink cannot be carried because of its excessive size. Ordering this sends you a small beacon that will teleport the power sink to your location on activation."
reference = "PS"
item = /obj/item/device/powersink
cost = 10
/datum/uplink_item/device_tools/singularity_beacon
name = "Singularity Beacon"
desc = "When screwed to wiring attached to an electric grid, then activated, this large device pulls the singularity towards it. Does not work when the singularity is still in containment. A singularity beacon can cause catastrophic damage to a space station, leading to an emergency evacuation. Because of its size, it cannot be carried. Ordering this sends you a small beacon that will teleport the larger beacon to your location on activation."
reference = "SL"
item = /obj/item/device/radio/beacon/syndicate
cost = 14
@@ -625,6 +703,7 @@ var/list/uplink_items = list()
name = "Syndicate Bomb"
desc = "The Syndicate Bomb has an adjustable timer with a minimum setting of 60 seconds. Ordering the bomb sends you a small beacon, which will teleport the explosive to your location when you activate it. \
You can wrench the bomb down to prevent removal. The crew may attempt to defuse the bomb."
reference = "SB"
item = /obj/item/device/radio/beacon/syndicate/bomb
cost = 11
@@ -632,6 +711,7 @@ var/list/uplink_items = list()
name = "Syndicate Detonator"
desc = "The Syndicate Detonator is a companion device to the Syndicate Bomb. Simply press the included button and an encrypted radio frequency will instruct all live syndicate bombs to detonate. \
Useful for when speed matters or you wish to synchronize multiple bomb blasts. Be sure to stand clear of the blast radius before using the detonator."
reference = "SD"
item = /obj/item/device/syndicatedetonator
cost = 3
gamemodes = list("nuclear emergency")
@@ -639,12 +719,14 @@ var/list/uplink_items = list()
/datum/uplink_item/device_tools/pdapinpointer
name = "PDA Pinpointer"
desc = "A pinpointer that tracks any PDA on the station. Useful for locating assassination targets or other high-value targets that you can't find. WARNING: Can only set once."
reference = "PD"
item = /obj/item/weapon/pinpointer/pdapinpointer
cost = 4
/datum/uplink_item/device_tools/ai_detector
name = "Artificial Intelligence Detector" // changed name in case newfriends thought it detected disguised ai's
desc = "A functional multitool that turns red when it detects an artificial intelligence watching it or its holder. Knowing when an artificial intelligence is watching you is useful for knowing when to maintain cover."
reference = "AD"
item = /obj/item/device/multitool/ai_detect
cost = 1
@@ -652,6 +734,7 @@ var/list/uplink_items = list()
name = "Teleporter Circuit Board"
desc = "A printed circuit board that completes the teleporter onboard the mothership. Advise you test fire the teleporter before entering it, as malfunctions can occur."
item = /obj/item/weapon/circuitboard/teleporter
reference = "TP"
cost = 40
gamemodes = list("nuclear emergency")
surplus = 0
@@ -660,6 +743,7 @@ var/list/uplink_items = list()
name = "Energy Shield"
desc = "An incredibly useful personal shield projector, capable of reflecting energy projectiles and defending against other attacks."
item = /obj/item/weapon/shield/energy
reference = "ES"
cost = 16
gamemodes = list("nuclear emergency")
surplus = 20
@@ -672,12 +756,14 @@ var/list/uplink_items = list()
/datum/uplink_item/implants/freedom
name = "Freedom Implant"
desc = "An implant injected into the body and later activated using a bodily gesture to attempt to slip restraints."
reference = "FI"
item = /obj/item/weapon/implanter/freedom
cost = 5
/datum/uplink_item/implants/uplink
name = "Uplink Implant"
desc = "An implant injected into the body, and later activated using a bodily gesture to open an uplink with 5 telecrystals. The ability for an agent to open an uplink after their posessions have been stripped from them makes this implant excellent for escaping confinement."
reference = "UI"
item = /obj/item/weapon/implanter/uplink
cost = 20
surplus = 0
@@ -685,24 +771,28 @@ var/list/uplink_items = list()
/datum/uplink_item/implants/explosive
name = "Explosive Implant"
desc = "An implant injected into the body, and later activated using a vocal command to cause a large explosion from the implant."
reference = "EI"
item = /obj/item/weapon/implanter/explosive
cost = 12
/datum/uplink_item/implants/compression
name = "Compressed Matter Implant"
desc = "An implant injected into the body, and later activated using a bodily gesture to retrieve an item that was earlier compressed."
reference = "CI"
item = /obj/item/weapon/implanter/compressed
cost = 8
/datum/uplink_item/implants/mindslave
name = "Mindslave Implant"
desc = "A box containing an implanter filled with a mindslave implant that when injected into another person makes them loyal to you and your cause, unless of course they're already implanted by someone else. Loyalty ends if the implant is no longer in their system."
reference = "MI"
item = /obj/item/weapon/implanter/traitor
cost = 10
/datum/uplink_item/implants/adrenal
name = "Adrenal Implant"
desc = "An implant injected into the body, and later activated using a bodily gesture to inject a chemical cocktail, which has a mild healing effect along with removing all stuns and increasing his speed."
reference = "AI"
item = /obj/item/weapon/implanter/adrenalin
cost = 8
@@ -715,6 +805,7 @@ var/list/uplink_items = list()
/datum/uplink_item/badass/bundle
name = "Syndicate Bundle"
desc = "Syndicate Bundles are specialised groups of items that arrive in a plain box. These items are collectively worth more than 20 telecrystals, but you do not know which specialisation you will receive."
reference = "SY"
item = /obj/item/weapon/storage/box/syndicate
cost = 20
excludefrom = list("nuclear emergency")
@@ -723,6 +814,7 @@ var/list/uplink_items = list()
name = "Syndicate Playing Cards"
desc = "A special deck of space-grade playing cards with a mono-molecular edge and metal reinforcement, making them lethal weapons both when wielded as a blade and when thrown. \
You can also play card games with them."
reference = "PC"
item = /obj/item/toy/cards/deck/syndicate
cost = 1
excludefrom = list("nuclear emergency")
@@ -732,20 +824,23 @@ var/list/uplink_items = list()
name = "Syndicate Briefcase Full of Cash"
desc = "A secure briefcase containing 5000 space credits. Useful for bribing personnel, or purchasing goods and services at lucrative prices. \
The briefcase also feels a little heavier to hold; it has been manufactured to pack a little bit more of a punch if your client needs some convincing."
reference = "CA"
item = /obj/item/weapon/storage/secure/briefcase/syndie
cost = 1
/datum/uplink_item/badass/balloon
name = "For showing that you are The Boss"
desc = "A useless red balloon with the syndicate logo on it, which can blow the deepest of covers."
reference = "BA"
item = /obj/item/toy/syndicateballoon
cost = 20
/datum/uplink_item/badass/random
/*/datum/uplink_item/badass/random
name = "Random Item"
desc = "Picking this choice will send you a random item from the list. Useful for when you cannot think of a strategy to finish your objectives with."
reference = "RA"
item = /obj/item/weapon/storage/box/syndicate
cost = 0
cost = 0
/datum/uplink_item/badass/random/spawn_item(var/turf/loc, var/obj/item/device/uplink/U)
@@ -764,11 +859,12 @@ var/list/uplink_items = list()
var/datum/uplink_item/I = pick(possible_items)
U.uses -= max(0, I.cost)
feedback_add_details("traitor_uplink_items_bought","RN")
return new I.item(loc)
return new I.item(loc) */
/datum/uplink_item/badass/surplus_crate
name = "Syndicate Surplus Crate"
desc = "A crate containing 50 telecrystals worth of random syndicate leftovers."
reference = "SU"
cost = 20
item = /obj/item/weapon/storage/box/syndicate
excludefrom = list("nuclear emergency")
-39
View File
@@ -33,45 +33,6 @@
var/ert_disabled = 0
var/uplink_welcome = "Syndicate Uplink Console:"
var/uplink_uses = 10
var/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/kinetic_accelerator/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/box/emps:3:5 EMP Grenades;
Whitespace:Seperator;
Stealthy and Inconspicuous Weapons;
/obj/item/weapon/pen/sleepy:3:Sleepy 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:2:Agent ID card;
/obj/item/clothing/mask/gas/voice:4:Voice Changer;
/obj/item/device/chameleon:4:Chameleon-Projector;
Whitespace:Seperator;
Devices and Tools;
/obj/item/weapon/card/emag:3:Cryptographic Sequencer;
/obj/item/weapon/storage/toolbox/syndicate:1:Fully Loaded Toolbox;
/obj/item/weapon/storage/box/syndie_kit/space:3:Space Suit;
/obj/item/clothing/glasses/thermal/syndi:3:Thermal Imaging Glasses;
/obj/item/device/encryptionkey/binary:3:Binary Translator Key;
/obj/item/weapon/aiModule/syndicate:7:Hacked AI Upload Module;
/obj/item/weapon/c4:2:C-4 (Destroys walls);
/obj/item/device/powersink:5:Powersink (DANGER!);
/obj/item/device/radio/beacon/syndicate:7:Singularity Beacon (DANGER!);
/obj/item/weapon/circuitboard/teleporter:20:Teleporter Circuit Board;
Whitespace:Seperator;
Implants;
/obj/item/weapon/storage/box/syndie_kit/imp_freedom:3:Freedom Implant;
/obj/item/weapon/storage/box/syndie_kit/imp_uplink:10:Uplink Implant (Contains 5 Telecrystals);
/obj/item/weapon/storage/box/syndie_kit/imp_explosive:6:Explosive Implant (DANGER!);
/obj/item/weapon/storage/box/syndie_kit/imp_compress:4:Compressed Matter Implant;Whitespace:Seperator;
(Pointless) Badassery;
/obj/item/toy/syndicateballoon:10:For showing that You Are The BOSS (Useless Balloon);"}
/datum/game_mode/proc/announce() //to be calles when round starts
world << "<B>Notice</B>: [src] did not define announce()"
+158 -126
View File
@@ -9,133 +9,134 @@ A list of items and costs is stored under the datum of every game mode, alongsid
var/list/world_uplinks = list()
/obj/item/device/uplink
var/welcome // Welcoming menu message
var/uses // Numbers of crystals
// List of items not to shove in their hands.
var/purchase_log = ""
var/show_description = null
var/active = 0
var/job = null
var/welcome // Welcoming menu message
var/uses // Numbers of crystals
var/list/ItemsCategory // List of categories with lists of items
var/list/ItemsReference // List of references with an associated item
var/list/nanoui_items // List of items for NanoUI use
var/nanoui_menu = 0 // The current menu we are in
var/list/nanoui_data = new // Additional data for NanoUI use
var/list/purchase_log = new
var/uplink_owner = null//text-only
var/used_TC = 0
var/job = null
var/show_descriptions = 0
/obj/item/device/uplink/New()
..()
world_uplinks+=src
welcome = ticker.mode.uplink_welcome
uses = ticker.mode.uplink_uses
ItemsCategory = get_uplink_items()
/obj/item/device/uplink/Destroy()
world_uplinks-=src
return ..()
world_uplinks += src
//Let's build a menu!
/obj/item/device/uplink/Del()
world_uplinks -= src
..()
/obj/item/device/uplink/proc/generate_items(mob/user as mob)
var/datum/nano_item_lists/IL = generate_item_lists(user)
nanoui_items = IL.items_nano
ItemsReference = IL.items_reference
// BS12 no longer use this menu but there are forks that do, hency why we keep it
/obj/item/device/uplink/proc/generate_menu(mob/user as mob)
if(!job)
job = user.mind.assigned_role
var/dat = "<B>[src.welcome]</B><BR>"
dat += "Tele-Crystals left: [src.uses]<BR>"
dat += "<HR>"
dat += "<B>Request item:</B><BR>"
dat += "<I>Each item costs a number of tele-crystals as indicated by the number following their name.</I><br>"
// AUTOFIXED BY fix_string_idiocy.py
// C:\Users\Rob\Documents\Projects\vgstation13\code\game\objects\items\devices\uplinks.dm:26: dat += "Tele-Crystals left: [src.uses]<BR>"
dat += {"Tele-Crystals left: [src.uses]<BR>
<HR>
<B>Request item:</B><BR>
<I>Each item costs a number of tele-crystals as indicated by the number following their name.</I><br><BR>"}
// END AUTOFIX
var/list/buyable_items = get_uplink_items()
// Loop through categories
var/index = 0
for(var/category in buyable_items)
index++
var/category_items = 1
for(var/category in ItemsCategory)
if(category_items < 1)
dat += "<i>We apologize, as you could not afford anything from this category.</i><br>"
dat += "<br>"
dat += "<b>[category]</b><br>"
category_items = 0
var/i = 0
// Loop through items in category
for(var/datum/uplink_item/item in buyable_items[category])
i++
var/cost_text = ""
var/desc = "[item.desc]"
if(item.job && item.job.len)
if(!(item.job.Find(job)))
//world.log << "Skipping job item that doesn't match"
for(var/datum/uplink_item/I in ItemsCategory[category])
if(I.cost > uses)
continue
if(I.job && I.job.len)
if(!(I.job.Find(job)))
continue
else
//world.log << "Found matching job item"
if(item.cost > 0)
cost_text = "([item.cost])"
if(item.cost <= uses)
dat += "<A href='byond://?src=\ref[src];buy_item=[category]:[i];'>[item.name]</A> [cost_text] "
else
dat += "<font color='grey'><i>[item.name] [cost_text] </i></font>"
if(item.desc)
if(show_description == 2)
dat += "<A href='byond://?src=\ref[src];show_desc=1'><font size=2>\[-\]</font></A><BR><font size=2>[desc]</font>"
else
dat += "<A href='byond://?src=\ref[src];show_desc=2'><font size=2>\[?\]</font></A>"
dat += "<BR>"
// Break up the categories, if it isn't the last.
if(buyable_items.len != index)
dat += "<br>"
dat += "<A href='byond://?src=\ref[src];buy_item=[I.reference];cost=[I.cost]'>[I.name]</A> ([I.cost])<BR>"
category_items++
dat += "<A href='byond://?src=\ref[src];buy_item=random'>Random Item (??)</A><br>"
dat += "<HR>"
return dat
// Interaction code. Gathers a list of items purchasable from the paren't uplink and displays it. It also adds a lock button.
/obj/item/device/uplink/interact(mob/user as mob)
/*
Built the item lists for use with NanoUI
*/
/obj/item/device/uplink/proc/generate_item_lists(mob/user as mob)
if(!job)
job = user.mind.assigned_role
var/list/nano = new
var/list/reference = new
var/dat = "<body link='yellow' alink='white' bgcolor='#601414'><font color='white'>"
dat += src.generate_menu(user)
for(var/category in ItemsCategory)
nano[++nano.len] = list("Category" = category, "items" = list())
for(var/datum/uplink_item/I in ItemsCategory[category])
if(I.job && I.job.len)
if(!(I.job.Find(job)))
continue
nano[nano.len]["items"] += list(list("Name" = I.name, "Description" = I.description(),"Cost" = I.cost, "obj_path" = I.reference))
reference[I.reference] = I
// AUTOFIXED BY fix_string_idiocy.py
// C:\Users\Rob\Documents\Projects\vgstation13\code\game\objects\items\devices\uplinks.dm:72: dat += "<A href='byond://?src=\ref[src];lock=1'>Lock</a>"
dat += {"<A href='byond://?src=\ref[src];lock=1'>Lock</a>
</font></body>"}
// END AUTOFIX
user << browse(dat, "window=hidden")
onclose(user, "hidden")
return
var/datum/nano_item_lists/result = new
result.items_nano = nano
result.items_reference = reference
return result
//If 'random' was selected
/obj/item/device/uplink/proc/chooseRandomItem()
if(uses <= 0)
return
var/list/random_items = new
for(var/IR in ItemsReference)
var/datum/uplink_item/UI = ItemsReference[IR]
if(UI.cost <= uses)
random_items += UI
return pick(random_items)
/obj/item/device/uplink/Topic(href, href_list)
if(..())
return 1
if(!active)
if(href_list["buy_item"] == "random")
var/datum/uplink_item/UI = chooseRandomItem()
href_list["buy_item"] = UI.reference
return buy(UI, "RN")
else
var/datum/uplink_item/UI = ItemsReference[href_list["buy_item"]]
return buy(UI, UI ? UI.reference : "")
return 0
/obj/item/device/uplink/proc/buy(var/datum/uplink_item/UI, var/reference)
if(!UI)
return
UI.buy(src,usr)
nanomanager.update_uis(src)
/* var/list/L = UI.spawn_item(get_turf(usr),src)
if(ishuman(usr))
var/mob/living/carbon/human/A = usr
for(var/obj/I in L)
A.put_in_any_hand_if_possible(I)
if (href_list["buy_item"])
purchase_log[UI] = purchase_log[UI] + 1 */
var/item = href_list["buy_item"]
var/list/split = text2list(item, ":") // throw away variable
if(split.len == 2)
// Collect category and number
var/category = split[1]
var/number = text2num(split[2])
var/list/buyable_items = get_uplink_items()
var/list/uplink = buyable_items[category]
if(uplink && uplink.len >= number)
var/datum/uplink_item/I = uplink[number]
if(I)
I.buy(src, usr)
else
var/text = "[key_name(usr)] tried to purchase an uplink item that doesn't exist"
var/textalt = "[key_name(usr)] tried to purchase an uplink item that doesn't exist [item]"
message_admins(text)
log_game(textalt)
admin_log.Add(textalt)
else if(href_list["show_desc"])
show_description = text2num(href_list["show_desc"])
interact(usr)
return 1
// HIDDEN UPLINK - Can be stored in anything but the host item has to have a trigger for it.
/* How to create an uplink in 3 easy steps!
@@ -150,16 +151,16 @@ var/list/world_uplinks = list()
*/
/obj/item/device/uplink/hidden
name = "Hidden Uplink."
name = "hidden uplink"
desc = "There is something wrong if you're examining this."
var/active = 0
/obj/item/device/uplink/hidden/Topic(href, href_list)
if(..())
return 1
if(href_list["lock"])
toggle()
usr << browse(null, "window=hidden")
return 1
// The hidden uplink MUST be inside an obj/item's contents.
/obj/item/device/uplink/hidden/New()
spawn(2)
if(!istype(src.loc, /obj/item))
del(src)
..()
// Toggles the uplink on and off. Normally this will bypass the item's normal functions and go to the uplink menu, if activated.
/obj/item/device/uplink/hidden/proc/toggle()
@@ -180,66 +181,97 @@ var/list/world_uplinks = list()
return 1
return 0
/*
/*
NANO UI FOR UPLINK WOOP WOOP
*/
/obj/item/device/uplink/hidden/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null, var/force_open = 1)
var/title = "Syndicate Uplink"
var/title = "Remote Uplink"
var/data[0]
data["crystals"] = uses
data["nano_items"] = nanoui_items
data["welcome"] = welcome
data["crystals"] = uses
data["menu"] = nanoui_menu
data["descriptions"] = show_descriptions
if(!nanoui_items)
generate_items(user)
data["nano_items"] = nanoui_items
data += nanoui_data
// update the ui if it exists, returns null if no ui is passed/found
ui = nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open)
if (!ui)
// the ui does not exist, so we'll create a new() one
// for a list of parameters and their descriptions see the code docs in \code\modules\nano\nanoui.dm
ui = new(user, src, ui_key, "uplink.tmpl", title, 450, 600)
ui = new(user, src, ui_key, "uplink.tmpl", title, 700, 600)
// when the ui is first opened this is the data it will use
ui.set_initial_data(data)
// open the new ui window
ui.open()
// Interaction code. Gathers a list of items purchasable from the paren't uplink and displays it. It also adds a lock button.
/obj/item/device/uplink/hidden/interact(mob/user)
ui_interact(user)
// The purchasing code.
/obj/item/device/uplink/hidden/Topic(href, href_list)
if (usr.stat || usr.restrained())
return
return 1
if (!( istype(usr, /mob/living/carbon/human)))
return 0
return 1
var/mob/user = usr
var/datum/nanoui/ui = nanomanager.get_open_ui(user, src, "main")
if ((usr.contents.Find(src.loc) || (in_range(src.loc, usr) && istype(src.loc.loc, /turf))))
usr.set_machine(src)
if(href_list["lock"])
if(..(href, href_list))
return 1
else if(href_list["lock"])
toggle()
ui.close()
return 1
if(href_list["return"])
nanoui_menu = round(nanoui_menu/10)
update_nano_data()
if(href_list["menu"])
nanoui_menu = text2num(href_list["menu"])
update_nano_data(href_list["id"])
if(href_list["menu"])
nanoui_menu = text2num(href_list["menu"])
update_nano_data(href_list["id"])
if(href_list["descriptions"])
show_descriptions = !show_descriptions
update_nano_data()
if(..(href, href_list) == 1)
if(!(href_list["buy_item"] in valid_items))
return
var/path_obj = text2path(href_list["buy_item"])
var/obj/I = new path_obj(get_turf(usr))
if(ishuman(usr))
var/mob/living/carbon/human/A = usr
A.put_in_any_hand_if_possible(I)
purchase_log += "[usr] ([usr.ckey]) bought [I]."
interact(usr)
nanomanager.update_uis(src)
return 1
*/
/obj/item/device/uplink/hidden/proc/update_nano_data(var/id)
if(nanoui_menu == 1)
var/permanentData[0]
for(var/datum/data/record/L in sortRecord(data_core.general))
permanentData[++permanentData.len] = list(Name = L.fields["name"],"id" = L.fields["id"])
nanoui_data["exploit_records"] = permanentData
if(nanoui_menu == 11)
nanoui_data["exploit_exists"] = 0
for(var/datum/data/record/L in data_core.general)
if(L.fields["id"] == id)
nanoui_data["exploit"] = list() // Setting this to equal L.fields passes it's variables that are lists as reference instead of value.
// We trade off being able to automatically add shit for more control over what gets passed to json
// and if it's sanitized for html.
nanoui_data["exploit"]["nanoui_exploit_record"] = html_encode(L.fields["exploit_record"]) // Change stuff into html
nanoui_data["exploit"]["nanoui_exploit_record"] = replacetext(nanoui_data["exploit"]["nanoui_exploit_record"], "\n", "<br>") // change line breaks into <br>
nanoui_data["exploit"]["name"] = html_encode(L.fields["name"])
nanoui_data["exploit"]["sex"] = html_encode(L.fields["sex"])
nanoui_data["exploit"]["age"] = html_encode(L.fields["age"])
nanoui_data["exploit"]["species"] = html_encode(L.fields["species"])
nanoui_data["exploit"]["rank"] = html_encode(L.fields["rank"])
nanoui_data["exploit"]["fingerprint"] = html_encode(L.fields["fingerprint"])
nanoui_data["exploit_exists"] = 1
break
// I placed this here because of how relevant it is.
// You place this in your uplinkable item to check if an uplink is active or not.
@@ -252,7 +284,7 @@ var/list/world_uplinks = list()
src.hidden_uplink.trigger(user)
return 1
return 0
//Refund proc for the borg teleporter (later I'll make a general refund proc if there is demand for it)
/obj/item/device/radio/uplink/attackby(obj/item/weapon/W as obj, mob/user as mob, params)
if(istype(W, /obj/item/weapon/antag_spawner/borg_tele))
+74 -23
View File
@@ -11,35 +11,86 @@ Used In File(s): \code\game\objects\items\devices\uplinks.dm
<b>Functions</b>:
</div>
<div class="itemContent">
{{:helper.link('Request Items', 'gear', {'menu' : 0}, null, 'fixedLeftWider')}}
{{:helper.link(data.descriptions ? 'Hide Descriptions' : 'Show Descriptions', 'gear', {'descriptions' : 1}, null, 'fixedLeftWider')}}
{{:helper.link('Exploitable Information', 'gear', {'menu' : 1}, null, 'fixedLeftWider')}}
{{:helper.link('Return', 'arrowreturn-1-w', {'return' : 1}, null, 'fixedLeft')}}
{{:helper.link('Close', 'gear', {'lock' : "1"}, null, 'fixedLeft')}}
</div>
</div>
<br>
<div class="item">
<div class="itemLabel">
<b>Tele-Crystals</b>:
</div>
<div class="itemContent">
{{:data.crystals}}
</div>
</div>
<H2><span class="white">Request items:</span></H2><br>
<span class="white"><i>Each item costs a number of tele-crystals as indicated by the number following their name.</i></span>
<br><br>
{{for data.nano_items}}
<div class="item">
<H3><span class="white">{{:value.Category}}</span></H3>
</div>
{{for data.items :itemValue:itemIndex}}
<div class="item">
{{:helper.link( itemValue.Name, 'gear', {'buy_item' : itemValue.obj_path, 'cost' : itemValue.Cost}, itemValue.Cost > data.crystals ? 'disabled' : null, null)}} - <span class="white">{{:itemValue.Cost}}</span>
{{if data.menu == 0}}
<H2><span class="white">Request items:</span></H2>
<span class="white"><i>Each item costs a number of tele-crystals as indicated by the number following their name.</i></span>
<div class="item">
<div class="itemLabel">
<b>Tele-Crystals</b>:
</div>
{{/for}}
<div class="itemContent">
{{:data.crystals}}
</div>
</div>
<br>
{{/for}}
{{for data.nano_items}}
<div class="item">
<h3><span class="white">{{:value.Category}}</span></h3>
</div>
{{for value.items :itemValue:itemIndex}}
<div class="item">
{{:helper.link( itemValue.Name, 'gear', {'buy_item' : itemValue.obj_path, 'cost' : itemValue.Cost}, itemValue.Cost > data.crystals ? 'disabled' : null, null)}} - <span class="white">{{:itemValue.Cost}}</span>
</div>
{{if itemValue.Cost <= data.crystals && data.descriptions}}
<div class="item">
{{:itemValue.Description}}
</div>
{{/if}}
{{/for}}
<br>
{{/for}}
<div class="item">
{{:helper.link('Buy Random (??)' , 'gear', {'buy_item' : 'random'}, null, 'fixedLeftWidest')}}
</div>
<div class="item">
{{:helper.link('Buy Random (??)' , 'gear', {'buy_item' : 'random'}, data.crystals <= 0 ? 'disabled' : null, null)}}
</div>
{{else data.menu == 1}}
<h2><span class="white">Information Record List:</span></h2>
<br>
<div class="item">
Select a Record
</div>
<br>
{{for data.exploit_records}}
<div class="item">
{{:helper.link(value.Name, 'gear', {'menu' : 11, 'id' : value.id}, null, null)}}
</div>
{{/for}}
{{else data.menu == 11}}
<h2><span class="white">Information Record:</span></h2>
<br>
<div class="statusDisplayRecords">
<div class="item">
<div class="itemContent" style="width: 100%;">
{{if data.exploit_exists == 1}}
<span class="good">Name: </span> <span class="average">{{:data.exploit.name}} </span><br>
<span class="good">Sex: </span> <span class="average">{{:data.exploit.sex}} </span><br>
<span class="good">Species: </span> <span class="average">{{:data.exploit.species}} </span><br>
<span class="good">Age: </span> <span class="average">{{:data.exploit.age}} </span><br>
<span class="good">Rank: </span> <span class="average">{{:data.exploit.rank}} </span><br>
<span class="good">Fingerprint: </span> <span class="average">{{:data.exploit.fingerprint}} </span><br>
<br>Acquired Information:<br>
<span class="good">Notes:<br> </span> <span class="average">{{:data.exploit.nanoui_exploit_record}}</span><br><br>
{{else}}
<span class="bad">
No exploitative information acquired!
<br>
<br>
</span>
{{/if}}
</div>
</div>
</div>
{{/if}}