Merge pull request #9362 from Kelenius/ofResearchAndPrototypes

Updates to science
This commit is contained in:
PsiOmegaDelta
2015-05-25 19:55:01 +02:00
147 changed files with 2431 additions and 3002 deletions
+1 -1
View File
@@ -9,7 +9,7 @@
throwforce = 2
throw_speed = 3
throw_range = 10
origin_tech = "magnets=1"
origin_tech = list(TECH_MAGNET = 1)
var/secured = 1
var/list/attached_overlays = null
+2 -2
View File
@@ -2,8 +2,8 @@
name = "igniter"
desc = "A small electronic device able to ignite combustable substances."
icon_state = "igniter"
matter = list(DEFAULT_WALL_MATERIAL = 500, "glass" = 50, "waste" = 10)
origin_tech = "magnets=1"
origin_tech = list(TECH_MAGNET = 1)
matter = list(DEFAULT_WALL_MATERIAL = 500, "glass" = 50, "waste" = 10)
secured = 1
wires = WIRE_RECEIVE
+2 -2
View File
@@ -4,8 +4,8 @@
name = "infrared emitter"
desc = "Emits a visible or invisible beam and is triggered when the beam is interrupted."
icon_state = "infrared"
matter = list(DEFAULT_WALL_MATERIAL = 1000, "glass" = 500, "waste" = 100)
origin_tech = "magnets=2"
origin_tech = list(TECH_MAGNET = 2)
matter = list(DEFAULT_WALL_MATERIAL = 1000, "glass" = 500, "waste" = 100)
wires = WIRE_PULSE
+2 -2
View File
@@ -2,8 +2,8 @@
name = "mousetrap"
desc = "A handy little spring-loaded trap for catching pesty rodents."
icon_state = "mousetrap"
matter = list(DEFAULT_WALL_MATERIAL = 100, "waste" = 10)
origin_tech = "combat=1"
origin_tech = list(TECH_COMBAT = 1)
matter = list(DEFAULT_WALL_MATERIAL = 100, "waste" = 10)
var/armed = 0
+2 -2
View File
@@ -2,8 +2,8 @@
name = "proximity sensor"
desc = "Used for scanning and alerting when someone enters a certain proximity."
icon_state = "prox"
matter = list(DEFAULT_WALL_MATERIAL = 800, "glass" = 200, "waste" = 50)
origin_tech = "magnets=1"
origin_tech = list(TECH_MAGNET = 1)
matter = list(DEFAULT_WALL_MATERIAL = 800, "glass" = 200, "waste" = 50)
wires = WIRE_PULSE
+2 -2
View File
@@ -3,8 +3,8 @@
desc = "Used to remotely activate devices."
icon_state = "signaller"
item_state = "signaler"
matter = list(DEFAULT_WALL_MATERIAL = 1000, "glass" = 200, "waste" = 100)
origin_tech = "magnets=1"
origin_tech = list(TECH_MAGNET = 1)
matter = list(DEFAULT_WALL_MATERIAL = 1000, "glass" = 200, "waste" = 100)
wires = WIRE_RECEIVE | WIRE_PULSE | WIRE_RADIO_PULSE | WIRE_RADIO_RECEIVE
secured = 1
+2 -2
View File
@@ -2,8 +2,8 @@
name = "timer"
desc = "Used to time things. Works well with contraptions which has to count down. Tick tock."
icon_state = "timer"
matter = list(DEFAULT_WALL_MATERIAL = 500, "glass" = 50, "waste" = 10)
origin_tech = "magnets=1"
origin_tech = list(TECH_MAGNET = 1)
matter = list(DEFAULT_WALL_MATERIAL = 500, "glass" = 50, "waste" = 10)
wires = WIRE_PULSE
+1 -1
View File
@@ -2,8 +2,8 @@
name = "voice analyzer"
desc = "A small electronic device able to record a voice sample, and send a signal when that sample is repeated."
icon_state = "voice"
origin_tech = list(TECH_MAGNET = 1)
matter = list(DEFAULT_WALL_MATERIAL = 500, "glass" = 50, "waste" = 10)
origin_tech = "magnets=1"
var/listening = 0
var/recorded //the activation message
-2
View File
@@ -212,8 +212,6 @@ BLIND // can't see anything
cell.charge -= 1000 / severity
if (cell.charge < 0)
cell.charge = 0
if(cell.reliability != 100 && prob(50/severity))
cell.reliability -= 10 / severity
..()
// Called just before an attack_hand(), in mob/UnarmedAttack()
+5 -5
View File
@@ -38,7 +38,7 @@
icon_state = "meson"
item_state = "glasses"
icon_action_button = "action_meson" //This doesn't actually matter, the action button is generated from the current icon_state. But, this is the only way to get it to show up.
origin_tech = "magnets=2;engineering=2"
origin_tech = list(TECH_MAGNET = 2, TECH_ENGINERING = 2)
toggleable = 1
vision_flags = SEE_TURFS
@@ -73,7 +73,7 @@
desc = "You can totally see in the dark now!"
icon_state = "night"
item_state = "glasses"
origin_tech = "magnets=2"
origin_tech = list(TECH_MAGNET = 2)
darkness_view = 7
toggleable = 1
icon_action_button = "action_nvg"
@@ -103,7 +103,7 @@
icon_state = "material"
item_state = "glasses"
icon_action_button = "action_material"
origin_tech = "magnets=3;engineering=3"
origin_tech = list(TECH_MAGNET = 3, TECH_ENGINERING = 3)
toggleable = 1
vision_flags = SEE_OBJS
@@ -221,7 +221,7 @@
desc = "Thermals in the shape of glasses."
icon_state = "thermal"
item_state = "glasses"
origin_tech = "magnets=3"
origin_tech = list(TECH_MAGNET = 3)
toggleable = 1
icon_action_button = "action_thermal"
vision_flags = SEE_MOBS
@@ -249,7 +249,7 @@
name = "Optical Meson Scanner"
desc = "Used for seeing walls, floors, and stuff through anything."
icon_state = "meson"
origin_tech = "magnets=3;syndicate=4"
origin_tech = list(TECH_MAGNET = 3, TECH_ILLEGAL = 4)
/obj/item/clothing/glasses/thermal/plain
toggleable = 0
+1 -1
View File
@@ -2,7 +2,7 @@
name = "HUD"
desc = "A heads-up display that provides important info in (almost) real time."
flags = null //doesn't protect eyes because it's a monocle, duh
origin_tech = "magnets=3;biotech=2"
origin_tech = list(TECH_MAGNET = 3, TECH_BIO = 2)
var/list/icon/current = list() //the current hud icons
proc
+1 -1
View File
@@ -8,7 +8,7 @@
name = "gas mask"
desc = "A face-covering mask that can be connected to an air supply. It seems to house some odd electronics."
var/obj/item/voice_changer/changer
origin_tech = "syndicate=4"
origin_tech = list(TECH_ILLEGAL = 4)
/obj/item/clothing/mask/gas/voice/verb/Toggle_Voice_Changer()
set category = "Object"
+1 -1
View File
@@ -5,7 +5,7 @@
item_state = "brown"
permeability_coefficient = 0.05
flags = NOSLIP
origin_tech = "syndicate=3"
origin_tech = list(TECH_ILLEGAL = 3)
var/list/clothing_choices = list()
siemens_coefficient = 0.8
species_restricted = null
+9 -9
View File
@@ -9,7 +9,7 @@
item_state = "bl_suit"
worn_state = "black"
desc = "It's a plain jumpsuit. It seems to have a small dial on the wrist."
origin_tech = "syndicate=3"
origin_tech = list(TECH_ILLEGAL = 3)
var/list/clothing_choices = list()
/obj/item/clothing/under/chameleon/New()
@@ -60,7 +60,7 @@
icon_state = "greysoft"
item_state = "greysoft"
desc = "It looks like a plain hat, but upon closer inspection, there's an advanced holographic array installed inside. It seems to have a small dial inside."
origin_tech = "syndicate=3"
origin_tech = list(TECH_ILLEGAL = 3)
body_parts_covered = 0
var/list/clothing_choices = list()
@@ -110,7 +110,7 @@
icon_state = "armor"
item_state = "armor"
desc = "It appears to be a vest of standard armor, except this is embedded with a hidden holographic cloaker, allowing it to change it's appearance, but offering no protection.. It seems to have a small dial inside."
origin_tech = "syndicate=3"
origin_tech = list(TECH_ILLEGAL = 3)
var/list/clothing_choices = list()
/obj/item/clothing/suit/chameleon/New()
@@ -159,7 +159,7 @@
icon_state = "black"
item_state = "black"
desc = "They're comfy black shoes, with clever cloaking technology built in. It seems to have a small dial on the back of each shoe."
origin_tech = "syndicate=3"
origin_tech = list(TECH_ILLEGAL = 3)
var/list/clothing_choices = list()
/obj/item/clothing/shoes/chameleon/New()
@@ -206,7 +206,7 @@
icon_state = "backpack"
item_state = "backpack"
desc = "A backpack outfitted with cloaking tech. It seems to have a small dial inside, kept away from the storage."
origin_tech = "syndicate=3"
origin_tech = list(TECH_ILLEGAL = 3)
var/list/clothing_choices = list()
/obj/item/weapon/storage/backpack/chameleon/New()
@@ -260,7 +260,7 @@
icon_state = "black"
item_state = "bgloves"
desc = "It looks like a pair of gloves, but it seems to have a small dial inside."
origin_tech = "syndicate=3"
origin_tech = list(TECH_ILLEGAL = 3)
var/list/clothing_choices = list()
/obj/item/clothing/gloves/chameleon/New()
@@ -308,7 +308,7 @@
icon_state = "gas_alt"
item_state = "gas_alt"
desc = "It looks like a plain gask mask, but on closer inspection, it seems to have a small dial inside."
origin_tech = "syndicate=3"
origin_tech = list(TECH_ILLEGAL = 3)
var/list/clothing_choices = list()
/obj/item/clothing/mask/chameleon/New()
@@ -358,7 +358,7 @@
icon_state = "meson"
item_state = "glasses"
desc = "It looks like a plain set of mesons, but on closer inspection, it seems to have a small dial inside."
origin_tech = "syndicate=3"
origin_tech = list(TECH_ILLEGAL = 3)
var/list/clothing_choices = list()
/obj/item/clothing/glasses/chameleon/New()
@@ -407,7 +407,7 @@
w_class = 3.0
max_shells = 7
caliber = ".45"
origin_tech = "combat=2;materials=2;syndicate=8"
origin_tech = list(TECH_COMBAT = 2, TECH_MATERIAL = 2, TECH_ILLEGAL = 8)
ammo_type = "/obj/item/ammo_casing/chameleon"
matter = list()
var/list/gun_choices = list()
+3 -3
View File
@@ -27,8 +27,8 @@
desc = "A stack of sheets of [material.display_name]."
recipes = material.get_recipes()
stacktype = material.stack_type
origin_tech = material.stack_origin_tech
perunit = material.stack_per_sheet
origin_tech = material.stack_origin_tech.Copy()
perunit = SHEET_MATERIAL_AMOUNT
if(apply_colour)
color = material.icon_colour
@@ -42,7 +42,7 @@
for(var/material_string in material.composite_material)
matter[material_string] = material.composite_material[material_string]
else
matter[material.name] = material.stack_per_sheet
matter[material.name] = SHEET_MATERIAL_AMOUNT
return 1
obj/item/stack/material/iron
+24 -27
View File
@@ -58,12 +58,11 @@ var/list/name_to_material
var/destruction_desc = "breaks apart" // Fancy string for barricades/tables/objects exploding.
// Icons
var/icon_colour // Colour applied to products of this material.
var/icon_base = "metal" // Wall and table base icon tag. See header.
var/door_icon_base = "metal" // Door base icon tag. See header.
var/icon_reinf = "reinf_metal" // Overlay used
var/stack_origin_tech = "materials=1" // Research level for stacks.
var/stack_per_sheet = 2000 // perunit value for stacks.
var/icon_colour // Colour applied to products of this material.
var/icon_base = "metal" // Wall and table base icon tag. See header.
var/door_icon_base = "metal" // Door base icon tag. See header.
var/icon_reinf = "reinf_metal" // Overlay used
var/list/stack_origin_tech = list(TECH_MATERIAL = 1) // Research level for stacks.
// Attributes
var/cut_delay = 0 // Delay in ticks when cutting through this wall.
@@ -153,7 +152,7 @@ var/list/name_to_material
icon_reinf = "reinf_stone"
icon_colour = "#007A00"
weight = 22
stack_origin_tech = "materials=5"
stack_origin_tech = list(TECH_MATERIAL = 5)
door_icon_base = "stone"
/material/diamond
@@ -166,8 +165,7 @@ var/list/name_to_material
shard_type = SHARD_SHARD
tableslam_noise = 'sound/effects/Glasshit.ogg'
hardness = 100
stack_origin_tech = "materials=6"
stack_per_sheet = 3750
stack_origin_tech = list(TECH_MATERIAL = 6)
/material/gold
name = "gold"
@@ -175,7 +173,7 @@ var/list/name_to_material
icon_colour = "#EDD12F"
weight = 24
hardness = 40
stack_origin_tech = "materials=4"
stack_origin_tech = list(TECH_MATERIAL = 4)
/material/silver
name = "silver"
@@ -183,8 +181,8 @@ var/list/name_to_material
icon_colour = "#D1E6E3"
weight = 22
hardness = 50
stack_origin_tech = "materials=3"
stack_origin_tech = list(TECH_MATERIAL = 3)
/material/phoron
name = "phoron"
stack_type = /obj/item/stack/material/phoron
@@ -193,7 +191,7 @@ var/list/name_to_material
icon_colour = "#FC2BC5"
shard_type = SHARD_SHARD
hardness = 30
stack_origin_tech = "phorontech=2;materials=2"
stack_origin_tech = list(TECH_MATERIAL = 2, TECH_PHORON = 2)
door_icon_base = "stone"
/material/stone
@@ -238,7 +236,7 @@ var/list/name_to_material
explosion_resistance = 25
hardness = 80
weight = 23
stack_origin_tech = "materials=2"
stack_origin_tech = list(TECH_MATERIAL = 2)
composite_material = list() //todo
/material/glass
@@ -262,12 +260,12 @@ var/list/name_to_material
ignition_point = 300
integrity = 200 // idk why but phoron windows are strong, so.
icon_colour = "#FC2BC5"
stack_origin_tech = "materials=3;phorontech=2"
stack_origin_tech = list(TECH_MATERIAL = 3, TECH_PHORON = 2)
/material/glass/phoron/reinforced
name = "reinforced phoron glass"
stack_type = /obj/item/stack/material/glass/phoronrglass
stack_origin_tech = "materials=4;phorontech=2"
stack_origin_tech = list(TECH_MATERIAL = 4, TECH_PHORON = 2)
composite_material = list() //todo
/material/glass/reinforced
@@ -281,7 +279,7 @@ var/list/name_to_material
tableslam_noise = 'sound/effects/Glasshit.ogg'
hardness = 40
weight = 30
stack_origin_tech = "materials=2"
stack_origin_tech = list(TECH_MATERIAL = 2)
composite_material = list() //todo
/material/plastic
@@ -293,39 +291,38 @@ var/list/name_to_material
icon_colour = "#CCCCCC"
hardness = 10
weight = 12
stack_origin_tech = "materials=3"
stack_origin_tech = list(TECH_MATERIAL = 3)
/material/osmium
name = "osmium"
stack_type = /obj/item/stack/material/osmium
icon_colour = "#9999FF"
stack_origin_tech = "materials=5"
stack_origin_tech = list(TECH_MATERIAL = 5)
/material/tritium
name = "tritium"
stack_type = /obj/item/stack/material/tritium
icon_colour = "#777777"
stack_origin_tech = "materials=5"
stack_origin_tech = list(TECH_MATERIAL = 5)
/material/mhydrogen
name = "mhydrogen"
stack_type = /obj/item/stack/material/mhydrogen
icon_colour = "#E6C5DE"
stack_origin_tech = "materials=6;powerstorage=5;magnets=5"
stack_origin_tech = list(TECH_MATERIAL = 6, TECH_POWER = 6, TECH_MAGNET = 5)
/material/platinum
name = "platinum"
stack_type = /obj/item/stack/material/platinum
icon_colour = "#9999FF"
weight = 27
stack_origin_tech = "materials=2"
stack_origin_tech = list(TECH_MATERIAL = 2)
/material/iron
name = "iron"
stack_type = /obj/item/stack/material/iron
icon_colour = "#5C5454"
weight = 22
stack_per_sheet = 3750
/material/wood
name = "wood"
@@ -338,7 +335,7 @@ var/list/name_to_material
shard_can_repair = 0 // you can't weld splinters back into planks
hardness = 15
weight = 18
stack_origin_tech = "materials=1;biotech=1"
stack_origin_tech = list(TECH_MATERIAL = 1, TECH_BIO = 1)
dooropen_noise = 'sound/effects/doorcreaky.ogg'
door_icon_base = "wood"
destruction_desc = "splinters"
@@ -358,13 +355,13 @@ var/list/name_to_material
icon_colour = "#AAAAAA"
hardness = 1
weight = 1
stack_origin_tech = "materials=1"
stack_origin_tech = list(TECH_MATERIAL = 1)
door_icon_base = "wood"
destruction_desc = "crumples"
/material/cloth //todo
name = "cloth"
stack_origin_tech = "materials=2"
stack_origin_tech = list(TECH_MATERIAL = 2)
door_icon_base = "wood"
/material/cult
@@ -403,7 +400,7 @@ var/list/name_to_material
/material/leather //todo
name = "leather"
icon_colour = "#5C4831"
stack_origin_tech = "materials=2"
stack_origin_tech = list(TECH_MATERIAL = 2)
/material/carpet
name = "carpet"
+1 -1
View File
@@ -4,8 +4,8 @@
icon = 'icons/obj/device.dmi'
icon_state = "forensic0-old" //GET A BETTER SPRITE.
item_state = "electronic"
origin_tech = list(TECH_MAGNET = 1, TECH_ENGINERING = 1)
matter = list(DEFAULT_WALL_MATERIAL = 150)
origin_tech = "magnets=1;engineering=1"
/obj/item/weapon/mining_scanner/attack_self(mob/user as mob)
user << "You begin sweeping \the [src] about, scanning for metal deposits."
+9 -9
View File
@@ -51,7 +51,7 @@
w_class = 4.0
matter = list(DEFAULT_WALL_MATERIAL = 3750)
var/digspeed = 40 //moving the delay to an item var so R&D can make improved picks. --NEO
origin_tech = "materials=1;engineering=1"
origin_tech = list(TECH_MATERIAL = 1, TECH_ENGINERING = 1)
attack_verb = list("hit", "pierced", "sliced", "attacked")
var/drill_sound = 'sound/weapons/Genhit.ogg'
var/drill_verb = "drilling"
@@ -69,7 +69,7 @@
icon_state = "spickaxe"
item_state = "spickaxe"
digspeed = 30
origin_tech = "materials=3"
origin_tech = list(TECH_MATERIAL = 3)
desc = "This makes no metallurgic sense."
/obj/item/weapon/pickaxe/drill
@@ -77,7 +77,7 @@
icon_state = "handdrill"
item_state = "jackhammer"
digspeed = 30
origin_tech = "materials=2;powerstorage=3;engineering=2"
origin_tech = list(TECH_MATERIAL = 2, TECH_POWER = 3, TECH_ENGINERING = 2)
desc = "Yours is the drill that will pierce through the rock walls."
drill_verb = "drilling"
@@ -86,7 +86,7 @@
icon_state = "jackhammer"
item_state = "jackhammer"
digspeed = 20 //faster than drill, but cannot dig
origin_tech = "materials=3;powerstorage=2;engineering=2"
origin_tech = list(TECH_MATERIAL = 3, TECH_POWER = 2, TECH_ENGINERING = 2)
desc = "Cracks rocks with sonic blasts, perfect for killing cave lizards."
drill_verb = "hammering"
@@ -95,7 +95,7 @@
icon_state = "gpickaxe"
item_state = "gpickaxe"
digspeed = 20
origin_tech = "materials=4"
origin_tech = list(TECH_MATERIAL = 4)
desc = "This makes no metallurgic sense."
drill_verb = "picking"
@@ -106,7 +106,7 @@
w_class = 3.0 //it is smaller than the pickaxe
damtype = "fire"
digspeed = 20 //Can slice though normal walls, all girders, or be used in reinforced wall deconstruction/ light thermite on fire
origin_tech = "materials=4;phorontech=3;engineering=3"
origin_tech = list(TECH_MATERIAL = 4, TECH_PHORON = 3, TECH_ENGINERING = 3)
desc = "A rock cutter that uses bursts of hot plasma. You could use it to cut limbs off of xenos! Or, you know, mine stuff."
drill_verb = "cutting"
drill_sound = 'sound/items/Welder.ogg'
@@ -118,7 +118,7 @@
icon_state = "dpickaxe"
item_state = "dpickaxe"
digspeed = 10
origin_tech = "materials=6;engineering=4"
origin_tech = list(TECH_MATERIAL = 6, TECH_ENGINERING = 4)
desc = "A pickaxe with a diamond pick head."
drill_verb = "picking"
@@ -127,7 +127,7 @@
icon_state = "diamonddrill"
item_state = "jackhammer"
digspeed = 5 //Digs through walls, girders, and can dig up sand
origin_tech = "materials=6;powerstorage=4;engineering=5"
origin_tech = list(TECH_MATERIAL = 6, TECH_POWER = 4, TECH_ENGINERING = 5)
desc = "Yours is the drill that will pierce the heavens!"
drill_verb = "drilling"
@@ -152,8 +152,8 @@
throwforce = 4.0
item_state = "shovel"
w_class = 3.0
origin_tech = list(TECH_MATERIAL = 1, TECH_ENGINERING = 1)
matter = list(DEFAULT_WALL_MATERIAL = 50)
origin_tech = "materials=1;engineering=1"
attack_verb = list("bashed", "bludgeoned", "thrashed", "whacked")
sharp = 0
edge = 1
+8 -8
View File
@@ -9,49 +9,49 @@
/obj/item/weapon/ore/uranium
name = "pitchblende"
icon_state = "ore_uranium"
origin_tech = "materials=5"
origin_tech = list(TECH_MATERIAL = 5)
material = "uranium"
/obj/item/weapon/ore/iron
name = "hematite"
icon_state = "ore_iron"
origin_tech = "materials=1"
origin_tech = list(TECH_MATERIAL = 1)
material = "hematite"
/obj/item/weapon/ore/coal
name = "raw carbon"
icon_state = "ore_coal"
origin_tech = "materials=1"
origin_tech = list(TECH_MATERIAL = 1)
material = "carbon"
/obj/item/weapon/ore/glass
name = "impure silicates"
icon_state = "ore_glass"
origin_tech = "materials=1"
origin_tech = list(TECH_MATERIAL = 1)
material = "sand"
/obj/item/weapon/ore/phoron
name = "phoron crystals"
icon_state = "ore_phoron"
origin_tech = "materials=2"
origin_tech = list(TECH_MATERIAL = 2)
material = "phoron"
/obj/item/weapon/ore/silver
name = "native silver ore"
icon_state = "ore_silver"
origin_tech = "materials=3"
origin_tech = list(TECH_MATERIAL = 3)
material = "silver"
/obj/item/weapon/ore/gold
name = "native gold ore"
icon_state = "ore_gold"
origin_tech = "materials=4"
origin_tech = list(TECH_MATERIAL = 4)
material = "gold"
/obj/item/weapon/ore/diamond
name = "diamonds"
icon_state = "ore_diamond"
origin_tech = "materials=6"
origin_tech = list(TECH_MATERIAL = 6)
material = "diamond"
/obj/item/weapon/ore/osmium
+3 -3
View File
@@ -55,14 +55,14 @@
name = "diona nymph"
desc = "It's a tiny plant critter."
icon_state = "nymph"
origin_tech = "magnets=3;biotech=5"
origin_tech = list(TECH_MAGNET = 3, TECH_BIO = 5)
slot_flags = SLOT_HEAD | SLOT_OCLOTHING
/obj/item/weapon/holder/drone
name = "maintenance drone"
desc = "It's a small maintenance robot."
icon_state = "drone"
origin_tech = "magnets=3;engineering=5"
origin_tech = list(TECH_MAGNET = 3, TECH_ENGINERING = 5)
/obj/item/weapon/holder/cat
name = "cat"
@@ -90,7 +90,7 @@
name = "cortical borer"
desc = "It's a slimy brain slug. Gross."
icon_state = "borer"
origin_tech = "biotech=6"
origin_tech = list(TECH_BIO = 6)
/obj/item/weapon/holder/monkey
name = "monkey"
+2 -2
View File
@@ -23,7 +23,7 @@
icon = 'icons/obj/assemblies.dmi'
icon_state = "mmi_empty"
w_class = 3
origin_tech = "biotech=3"
origin_tech = list(TECH_BIO = 3)
var/list/construction_cost = list(DEFAULT_WALL_MATERIAL=1000,"glass"=500)
var/construction_time = 75
@@ -134,7 +134,7 @@
/obj/item/device/mmi/radio_enabled
name = "radio-enabled man-machine interface"
desc = "The Warrior's bland acronym, MMI, obscures the true horror of this monstrosity. This one comes with a built-in radio."
origin_tech = "biotech=4"
origin_tech = list(TECH_BIO = 4)
var/obj/item/device/radio/radio = null//Let's give it a radio.
@@ -11,7 +11,7 @@
throwforce = 1.0
throw_speed = 3
throw_range = 5
origin_tech = "biotech=3"
origin_tech = list(TECH_BIO = 3)
attack_verb = list("attacked", "slapped", "whacked")
var/mob/living/carbon/brain/brainmob = null
@@ -4,7 +4,7 @@
icon = 'icons/obj/assemblies.dmi'
icon_state = "posibrain"
w_class = 3
origin_tech = "engineering=4;materials=4;bluespace=2;programming=4"
origin_tech = list(TECH_ENGINERING = 4, TECH_MATERIAL = 4, TECH_BLUESPACE = 2, TECH_DATA = 4)
var/searching = 0
construction_cost = list(DEFAULT_WALL_MATERIAL=500,"glass"=500,"silver"=200,"gold"=200,"phoron"=100,"diamond"=10)
construction_time = 75
@@ -4,7 +4,7 @@
icon = 'icons/obj/module.dmi'
icon_state = "mainboard"
w_class = 3
origin_tech = "engineering=4;materials=3;programming=4"
origin_tech = list(TECH_ENGINERING = 4, TECH_MATERIAL = 3, TECH_DATA = 4)
/obj/item/device/mmi/digital/robot/New()
..()
@@ -8,7 +8,7 @@
throwforce = 0
throw_speed = 3
throw_range = 6
origin_tech = "biotech=4"
origin_tech = list(TECH_BIO = 4)
var/Uses = 1 // uses before it goes inert
var/enhanced = 0 //has it been enhanced before?
@@ -295,7 +295,7 @@
throwforce = 1.0
throw_speed = 2
throw_range = 6
origin_tech = "biotech=4"
origin_tech = list(TECH_BIO = 4)
var/POWERFLAG = 0 // sshhhhhhh
var/Flush = 30
var/Uses = 5 // uses before it goes inert
@@ -327,7 +327,7 @@
icon = 'icons/mob/mob.dmi'
icon_state = "slime egg-growing"
bitesize = 12
origin_tech = "biotech=4"
origin_tech = list(TECH_BIO = 4)
var/grown = 0
/obj/item/weapon/reagent_containers/food/snacks/egg/slime/New()
@@ -12,8 +12,8 @@
w_class = 2.0
throw_speed = 5
throw_range = 10
origin_tech = list(TECH_MAGNET = 2, TECH_BIO = 1, TECH_ENGINERING = 2)
matter = list(DEFAULT_WALL_MATERIAL = 500, "glass" = 200)
origin_tech = "magnets=2;biotech=1;engineering=2"
var/mode = 1;
/obj/item/device/robotanalyzer/attack(mob/living/M as mob, mob/living/user as mob)
@@ -28,12 +28,11 @@
user << "You activate the analyzer's microlaser, analyzing \the [loaded_item] and breaking it down."
flick("portable_analyzer_scan", src)
playsound(src.loc, 'sound/items/Welder2.ogg', 50, 1)
if(loaded_item.reliability >= min_reliability)
var/list/temp_tech = ConvertReqString2List(loaded_item.origin_tech)
for(var/T in temp_tech)
files.UpdateTech(T, temp_tech[T])
user << "\The [loaded_item] had level [temp_tech[T]] in [T]."
loaded_item = null
var/list/temp_tech = ConvertReqString2List(loaded_item.origin_tech)
for(var/T in temp_tech)
files.UpdateTech(T, temp_tech[T])
user << "\The [loaded_item] had level [temp_tech[T]] in [T]."
loaded_item = null
for(var/obj/I in contents)
for(var/mob/M in I.contents)
M.death()
@@ -57,8 +56,6 @@
if(response == "Sync")
var/success = 0
for(var/obj/machinery/r_n_d/server/S in machines)
if(S.disabled)
continue
for(var/datum/tech/T in files.known_tech) //Uploading
S.files.AddTech2Known(T)
for(var/datum/tech/T in S.files.known_tech) //Downloading
@@ -9,7 +9,7 @@
desc = "A fragment of the legendary treasure known simply as the 'Soul Stone'. The shard still flickers with a fraction of the full artefacts power."
w_class = 1.0
slot_flags = SLOT_BELT
origin_tech = "bluespace=4;materials=4"
origin_tech = list(TECH_BLUESPACE = 4, TECH_MATERIAL = 4)
var/imprinted = "empty"
//////////////////////////////Capturing////////////////////////////////////////////////////////
@@ -214,7 +214,7 @@
//spawn 1-4 boards of a random type
var/spawnees = 0
var/num_boards = rand(1,4)
var/list/options = list(1,2,4,8,16,32,64,128,256, 512)
var/list/options = list(1,2,4,8,16,32,64,128,256,512)
for(var/i=0, i<num_boards, i++)
var/chosen = pick(options)
options.Remove(options.Find(chosen))
@@ -223,52 +223,52 @@
if(spawnees & 1)
C = new(src.loc)
C.name = "Drone CPU motherboard"
C.origin_tech = "programming=[rand(3,6)]"
C.origin_tech = list(TECH_DATA = rand(3, 6))
if(spawnees & 2)
C = new(src.loc)
C.name = "Drone neural interface"
C.origin_tech = "biotech=[rand(3,6)]"
C.origin_tech = list(TECH_BIO = rand(3,6))
if(spawnees & 4)
C = new(src.loc)
C.name = "Drone suspension processor"
C.origin_tech = "magnets=[rand(3,6)]"
C.origin_tech = list(TECH_MAGNET = rand(3,6))
if(spawnees & 8)
C = new(src.loc)
C.name = "Drone shielding controller"
C.origin_tech = "bluespace=[rand(3,6)]"
C.origin_tech = list(TECH_BLUESPACE = rand(3,6))
if(spawnees & 16)
C = new(src.loc)
C.name = "Drone power capacitor"
C.origin_tech = "powerstorage=[rand(3,6)]"
C.origin_tech = list(TECH_POWER = rand(3,6))
if(spawnees & 32)
C = new(src.loc)
C.name = "Drone hull reinforcer"
C.origin_tech = "materials=[rand(3,6)]"
C.origin_tech = list(TECH_MATERIAL = rand(3,6))
if(spawnees & 64)
C = new(src.loc)
C.name = "Drone auto-repair system"
C.origin_tech = "engineering=[rand(3,6)]"
C.origin_tech = list(TECH_ENGINERING = rand(3,6))
if(spawnees & 128)
C = new(src.loc)
C.name = "Drone phoron overcharge counter"
C.origin_tech = "phorontech=[rand(3,6)]"
C.origin_tech = list(TECH_PHORON = rand(3,6))
if(spawnees & 256)
C = new(src.loc)
C.name = "Drone targetting circuitboard"
C.origin_tech = "combat=[rand(3,6)]"
C.origin_tech = list(TECH_COMBAT = rand(3,6))
if(spawnees & 512)
C = new(src.loc)
C.name = "Corrupted drone morality core"
C.origin_tech = "illegal=[rand(3,6)]"
C.origin_tech = list(TECH_ILLEGAL = rand(3,6))
..()
+2 -2
View File
@@ -59,7 +59,7 @@
desc = "It's a black ink pen with a sharp point and a carefully engraved \"Waffle Co.\""
flags = OPENCONTAINER
slot_flags = SLOT_BELT
origin_tech = "materials=2;syndicate=5"
origin_tech = list(TECH_MATERIAL = 2, TECH_ILLEGAL = 5)
/obj/item/weapon/pen/sleepypen/New()
@@ -86,7 +86,7 @@
/obj/item/weapon/pen/paralysis
flags = OPENCONTAINER
slot_flags = SLOT_BELT
origin_tech = "materials=2;syndicate=5"
origin_tech = list(TECH_MATERIAL = 2, TECH_ILLEGAL = 5)
/obj/item/weapon/pen/paralysis/attack(mob/living/M as mob, mob/user as mob)
-2
View File
@@ -87,8 +87,6 @@
M.state = 2
M.icon_state = "box_1"
for(var/obj/I in component_parts)
if(I.reliability != 100 && crit_fail)
I.crit_fail = 1
I.loc = src.loc
qdel(src)
return 1
-10
View File
@@ -67,12 +67,6 @@
if(maxcharge < amount) return 0
var/amount_used = min(maxcharge-charge,amount)
if(crit_fail) return 0
if(!prob(reliability))
minor_fault++
if(prob(minor_fault))
crit_fail = 1
return 0
charge += amount_used
return amount_used
@@ -85,8 +79,6 @@
user << "[desc]\nThe manufacturer's label states this cell has a power rating of [maxcharge], and that you should not swallow it.\nThe charge meter reads [round(src.percent() )]%."
else
user << "This power cell has an exciting chrome finish, as it is an uber-capacity cell type! It has a power rating of [maxcharge]!\nThe charge meter reads [round(src.percent() )]%."
if(crit_fail)
user << "\red This power cell seems to be faulty."
/obj/item/weapon/cell/attackby(obj/item/W, mob/user)
..()
@@ -147,8 +139,6 @@
charge -= maxcharge / severity
if (charge < 0)
charge = 0
if(reliability != 100 && prob(50/severity))
reliability -= 10 / severity
..()
/obj/item/weapon/cell/ex_act(severity)
+1 -8
View File
@@ -43,21 +43,16 @@
RefreshParts()
var/temp_rating = 0
var/temp_reliability = 0
for(var/obj/item/weapon/stock_parts/SP in component_parts)
if(istype(SP, /obj/item/weapon/stock_parts/matter_bin))
//max_coins = SP.rating * SP.rating * 1000
else if(istype(SP, /obj/item/weapon/stock_parts/micro_laser) || istype(SP, /obj/item/weapon/stock_parts/capacitor))
temp_rating += SP.rating
for(var/obj/item/weapon/CP in component_parts)
temp_reliability += CP.reliability
reliability = min(round(temp_reliability / 4), 100)
power_gen = round(initial(power_gen) * (max(2, temp_rating) / 2))
examine(mob/user)
..(user)
user << "\blue The generator has [P.air_contents.phoron] units of fuel left, producing [power_gen] per cycle."
if(crit_fail) user << "\red The generator seems to have broken down."
handleInactive()
heat -= 2
@@ -108,8 +103,6 @@
else if(istype(O, /obj/item/weapon/crowbar) && !open)
var/obj/machinery/constructable_frame/machine_frame/new_frame = new /obj/machinery/constructable_frame/machine_frame(src.loc)
for(var/obj/item/I in component_parts)
if(I.reliability < 100)
I.crit_fail = 1
I.loc = src.loc
new_frame.state = 2
new_frame.icon_state = "box_1"
@@ -159,7 +152,7 @@
src.add_fingerprint(usr)
if(href_list["action"])
if(href_list["action"] == "enable")
if(!active && HasFuel() && !crit_fail)
if(!active && HasFuel())
active = 1
icon_state = "portgen1"
src.updateUsrDialog()
+1 -15
View File
@@ -15,7 +15,7 @@
var/power_output = 1
/obj/machinery/power/port_gen/proc/IsBroken()
return (crit_fail || (stat & (BROKEN|EMPED)))
return (stat & (BROKEN|EMPED))
/obj/machinery/power/port_gen/proc/HasFuel() //Placeholder for fuel check.
return 1
@@ -137,13 +137,6 @@
else if(istype(SP, /obj/item/weapon/stock_parts/micro_laser) || istype(SP, /obj/item/weapon/stock_parts/capacitor))
temp_rating += SP.rating
var/temp_reliability = 0
var/part_count = 0
for(var/obj/item/weapon/CP in component_parts)
temp_reliability += CP.reliability
part_count++
reliability = min(round(temp_reliability / part_count), 100)
power_gen = round(initial(power_gen) * (max(2, temp_rating) / 2))
/obj/machinery/power/port_gen/pacman/examine(mob/user)
@@ -168,13 +161,6 @@
sheets -= amount
/obj/machinery/power/port_gen/pacman/UseFuel()
//break down sometimes
if (reliability < 100)
if (prob(1) && prob(1) && prob(100 - reliability))
stat |= BROKEN
crit_fail = 1
if (prob(100 - reliability))
explode()
//how much material are we using this iteration?
var/needed_sheets = power_output / time_per_sheet
+6 -63
View File
@@ -1,20 +1,10 @@
#define IMPRINTER 1 //For circuits. Uses glass/chemicals.
//////////////////////////////////////
// RUST Core Control computer
/obj/item/weapon/circuitboard/rust_core_control
name = "Circuit board (RUST core controller)"
build_path = "/obj/machinery/computer/rust_core_control"
origin_tech = "programming=4;engineering=4"
datum/design/rust_core_control
name = "Circuit Design (RUST core controller)"
desc = "Allows for the construction of circuit boards used to build a core control console for the RUST fusion engine."
id = "rust_core_control"
req_tech = list("programming" = 4, "engineering" = 4)
build_type = IMPRINTER
materials = list("$glass" = 2000, "sacid" = 20)
build_path = "/obj/item/weapon/circuitboard/rust_core_control"
origin_tech = list(TECH_DATA = 4, TECH_ENGINERING = 4)
//////////////////////////////////////
// RUST Fuel Control computer
@@ -22,16 +12,7 @@ datum/design/rust_core_control
/obj/item/weapon/circuitboard/rust_fuel_control
name = "Circuit board (RUST fuel controller)"
build_path = "/obj/machinery/computer/rust_fuel_control"
origin_tech = "programming=4;engineering=4"
datum/design/rust_fuel_control
name = "Circuit Design (RUST fuel controller)"
desc = "Allows for the construction of circuit boards used to build a fuel injector control console for the RUST fusion engine."
id = "rust_fuel_control"
req_tech = list("programming" = 4, "engineering" = 4)
build_type = IMPRINTER
materials = list("$glass" = 2000, "sacid" = 20)
build_path = "/obj/item/weapon/circuitboard/rust_fuel_control"
origin_tech = list(TECH_DATA = 4, TECH_ENGINERING = 4)
//////////////////////////////////////
// RUST Fuel Port board
@@ -39,16 +20,7 @@ datum/design/rust_fuel_control
/obj/item/weapon/module/rust_fuel_port
name = "Internal circuitry (RUST fuel port)"
icon_state = "card_mod"
origin_tech = "engineering=4;materials=5"
datum/design/rust_fuel_port
name = "Internal circuitry (RUST fuel port)"
desc = "Allows for the construction of circuit boards used to build a fuel injection port for the RUST fusion engine."
id = "rust_fuel_port"
req_tech = list("engineering" = 4, "materials" = 5)
build_type = IMPRINTER
materials = list("$glass" = 2000, "sacid" = 20, "$uranium" = 3000)
build_path = "/obj/item/weapon/module/rust_fuel_port"
origin_tech = list(TECH_ENGINERING = 4, TECH_MATERIAL = 5)
//////////////////////////////////////
// RUST Fuel Compressor board
@@ -56,16 +28,7 @@ datum/design/rust_fuel_port
/obj/item/weapon/module/rust_fuel_compressor
name = "Internal circuitry (RUST fuel compressor)"
icon_state = "card_mod"
origin_tech = "materials=6;phorontech=4"
datum/design/rust_fuel_compressor
name = "Circuit Design (RUST fuel compressor)"
desc = "Allows for the construction of circuit boards used to build a fuel compressor of the RUST fusion engine."
id = "rust_fuel_compressor"
req_tech = list("materials" = 6, "phorontech" = 4)
build_type = IMPRINTER
materials = list("$glass" = 2000, "sacid" = 20, "$phoron" = 3000, "$diamond" = 1000)
build_path = "/obj/item/weapon/module/rust_fuel_compressor"
origin_tech = list(TECH_MATERIAL = 6, TECH_PHORON = 4)
//////////////////////////////////////
// RUST Tokamak Core board
@@ -74,7 +37,7 @@ datum/design/rust_fuel_compressor
name = "Internal circuitry (RUST tokamak core)"
build_path = "/obj/machinery/power/rust_core"
board_type = "machine"
origin_tech = "bluespace=3;phorontech=4;magnets=5;powerstorage=6"
origin_tech = list(TECH_BLUESPACE = 3, TECH_PHORON = 4, TECH_MAGNET = 5, TECH_POWER = 6)
req_components = list(
"/obj/item/weapon/stock_parts/manipulator/pico" = 2,
"/obj/item/weapon/stock_parts/micro_laser/ultra" = 1,
@@ -82,16 +45,6 @@ datum/design/rust_fuel_compressor
"/obj/item/weapon/stock_parts/console_screen" = 1,
"/obj/item/stack/cable_coil" = 5)
datum/design/rust_core
name = "Internal circuitry (RUST tokamak core)"
desc = "The circuit board that for a RUST-pattern tokamak fusion core."
id = "pacman"
req_tech = list(bluespace = 3, phorontech = 4, magnets = 5, powerstorage = 6)
build_type = IMPRINTER
reliability_base = 79
materials = list("$glass" = 2000, "sacid" = 20, "$phoron" = 3000, "$diamond" = 2000)
build_path = "/obj/item/weapon/circuitboard/rust_core"
//////////////////////////////////////
// RUST Fuel Injector board
@@ -99,20 +52,10 @@ datum/design/rust_core
name = "Internal circuitry (RUST fuel injector)"
build_path = "/obj/machinery/power/rust_fuel_injector"
board_type = "machine"
origin_tech = "powerstorage=3;engineering=4;phorontech=4;materials=6"
origin_tech = list(TECH_POWER = 3, TECH_ENGINERING = 4, TECH_PHORON = 4, TECH_MATERIAL = 6)
req_components = list(
"/obj/item/weapon/stock_parts/manipulator/pico" = 2,
"/obj/item/weapon/stock_parts/scanning_module/phasic" = 1,
"/obj/item/weapon/stock_parts/matter_bin/super" = 1,
"/obj/item/weapon/stock_parts/console_screen" = 1,
"/obj/item/stack/cable_coil" = 5)
datum/design/rust_injector
name = "Internal circuitry (RUST tokamak core)"
desc = "The circuit board that for a RUST-pattern particle accelerator."
id = "pacman"
req_tech = list(powerstorage = 3, engineering = 4, phorontech = 4, materials = 6)
build_type = IMPRINTER
reliability_base = 79
materials = list("$glass" = 2000, "sacid" = 20, "$phoron" = 3000, "$uranium" = 2000)
build_path = "/obj/item/weapon/circuitboard/rust_core"
-2
View File
@@ -342,8 +342,6 @@
M.state = 2
M.icon_state = "box_1"
for(var/obj/I in component_parts)
if(I.reliability != 100 && crit_fail)
I.crit_fail = 1
I.loc = src.loc
qdel(src)
return
+9 -9
View File
@@ -51,7 +51,7 @@
/obj/item/ammo_magazine/mc9mm
name = "magazine (9mm)"
icon_state = "9x19p"
origin_tech = "combat=2"
origin_tech = list(TECH_COMBAT = 2)
mag_type = MAGAZINE
matter = list(DEFAULT_WALL_MATERIAL = 600)
caliber = "9mm"
@@ -67,9 +67,9 @@
/obj/item/ammo_magazine/c9mm
name = "ammunition Box (9mm)"
icon_state = "9mm"
origin_tech = "combat=2"
matter = list(DEFAULT_WALL_MATERIAL = 1800)
icon_state = "9mm"
origin_tech = list(TECH_COMBAT = 2)
matter = list(DEFAULT_WALL_MATERIAL = 1800)
caliber = "9mm"
ammo_type = /obj/item/ammo_casing/c9mm
max_ammo = 30
@@ -101,7 +101,7 @@
/obj/item/ammo_magazine/c45
name = "ammunition Box (.45)"
icon_state = "9mm"
origin_tech = "combat=2"
origin_tech = list(TECH_COMBAT = 2)
caliber = ".45"
matter = list(DEFAULT_WALL_MATERIAL = 2250)
ammo_type = /obj/item/ammo_casing/c45
@@ -113,7 +113,7 @@
/obj/item/ammo_magazine/a12mm
name = "magazine (12mm)"
icon_state = "12mm"
origin_tech = "combat=2"
origin_tech = list(TECH_COMBAT = 2)
mag_type = MAGAZINE
caliber = "12mm"
matter = list(DEFAULT_WALL_MATERIAL = 1500)
@@ -127,7 +127,7 @@
/obj/item/ammo_magazine/a556
name = "magazine (5.56mm)"
icon_state = "5.56"
origin_tech = "combat=2"
origin_tech = list(TECH_COMBAT = 2)
mag_type = MAGAZINE
caliber = "a556"
matter = list(DEFAULT_WALL_MATERIAL = 1800)
@@ -145,7 +145,7 @@
/obj/item/ammo_magazine/a50
name = "magazine (.50)"
icon_state = "50ae"
origin_tech = "combat=2"
origin_tech = list(TECH_COMBAT = 2)
mag_type = MAGAZINE
caliber = ".50"
matter = list(DEFAULT_WALL_MATERIAL = 1260)
@@ -171,7 +171,7 @@
/obj/item/ammo_magazine/a762
name = "magazine box (7.62mm)"
icon_state = "a762"
origin_tech = "combat=2"
origin_tech = list(TECH_COMBAT = 2)
mag_type = MAGAZINE
caliber = "a762"
matter = list(DEFAULT_WALL_MATERIAL = 4500)
+1 -1
View File
@@ -47,7 +47,7 @@
throw_speed = 4
throw_range = 5
force = 5
origin_tech = "combat=1"
origin_tech = list(TECH_COMBAT = 1)
attack_verb = list("struck", "hit", "bashed")
zoomdevicename = "scope"
@@ -7,8 +7,8 @@
slot_flags = SLOT_BELT|SLOT_BACK
w_class = 3
force = 10
matter = list(DEFAULT_WALL_MATERIAL = 2000)
origin_tech = "combat=3;magnets=2"
origin_tech = list(TECH_COMBAT = 3, TECH_MAGNET = 2)
matter = list(DEFAULT_WALL_MATERIAL = 2000)
projectile_type = /obj/item/projectile/beam
fire_delay = 1 //rapid fire
@@ -52,7 +52,7 @@ obj/item/weapon/gun/energy/retro
icon_state = "lasercannon"
item_state = null
fire_sound = 'sound/weapons/lasercannonfire.ogg'
origin_tech = "combat=4;materials=3;powerstorage=3"
origin_tech = list(TECH_COMBAT = 4, TECH_MATERIAL = 3, TECH_POWER = 3)
slot_flags = SLOT_BELT|SLOT_BACK
projectile_type = /obj/item/projectile/beam/heavylaser
charge_cost = 400
@@ -71,7 +71,7 @@ obj/item/weapon/gun/energy/retro
icon_state = "xray"
item_state = "xray"
fire_sound = 'sound/weapons/laser3.ogg'
origin_tech = "combat=5;materials=3;magnets=2;syndicate=2"
origin_tech = list(TECH_COMBAT = 5, TECH_MATERIAL = 3, TECH_MAGNET = 2, TECH_ILLEGAL = 2)
projectile_type = /obj/item/projectile/beam/xray
charge_cost = 100
max_shots = 20
@@ -83,7 +83,7 @@ obj/item/weapon/gun/energy/retro
icon_state = "sniper"
item_state = "laser"
fire_sound = 'sound/weapons/marauder.ogg'
origin_tech = "combat=6;materials=5;powerstorage=4"
origin_tech = list(TECH_COMBAT = 6, TECH_MATERIAL = 5, TECH_POWER = 4)
projectile_type = /obj/item/projectile/beam/sniper
slot_flags = SLOT_BACK
charge_cost = 400
@@ -107,7 +107,7 @@ obj/item/weapon/gun/energy/retro
name = "laser tag gun"
item_state = "laser"
desc = "Standard issue weapon of the Imperial Guard"
origin_tech = "combat=1;magnets=2"
origin_tech = list(TECH_COMBAT = 1, TECH_MAGNET = 2)
self_recharge = 1
matter = list(DEFAULT_WALL_MATERIAL = 2000)
fire_sound = 'sound/weapons/Laser.ogg'
@@ -7,7 +7,7 @@
max_shots = 10
projectile_type = /obj/item/projectile/beam/stun
origin_tech = "combat=3;magnets=2"
origin_tech = list(TECH_COMBAT = 3, TECH_MAGNET = 2)
modifystate = "energystun"
firemodes = list(
@@ -24,7 +24,7 @@
name = "advanced energy gun"
desc = "An energy gun with an experimental miniaturized reactor."
icon_state = "nucgun"
origin_tech = "combat=3;materials=5;powerstorage=3"
origin_tech = list(TECH_COMBAT = 3, TECH_MATERIAL = 5, TECH_POWER = 3)
slot_flags = SLOT_BELT
force = 8 //looks heavier than a pistol
self_recharge = 1
@@ -44,46 +44,16 @@
charge_tick = 0
if(!power_supply) return 0
if((power_supply.charge / power_supply.maxcharge) != 1)
if(!failcheck()) return 0
power_supply.give(charge_cost)
update_icon()
return 1
/obj/item/weapon/gun/energy/gun/nuclear/proc/failcheck()
lightfail = 0
if (prob(src.reliability)) return 1 //No failure
if (prob(src.reliability))
for (var/mob/living/M in range(0,src)) //Only a minor failure, enjoy your radiation if you're in the same tile or carrying it
if (src in M.contents)
M << "<span class='warning'>Your gun feels pleasantly warm for a moment.</span>"
else
M << "<span class='warning'>You feel a warm sensation.</span>"
M.apply_effect(rand(3,120), IRRADIATE)
lightfail = 1
else
for (var/mob/living/M in range(rand(1,4),src)) //Big failure, TIME FOR RADIATION BITCHES
if (src in M.contents)
M << "<span class='danger'>Your gun's reactor overloads!</span>"
M << "<span class='warning'>You feel a wave of heat wash over you.</span>"
M.apply_effect(300, IRRADIATE)
crit_fail = 1 //break the gun so it stops recharging
processing_objects.Remove(src)
update_icon()
return 0
/obj/item/weapon/gun/energy/gun/nuclear/proc/update_charge()
if (crit_fail)
overlays += "nucgun-whee"
return
var/ratio = power_supply.charge / power_supply.maxcharge
ratio = round(ratio, 0.25) * 100
overlays += "nucgun-[ratio]"
/obj/item/weapon/gun/energy/gun/nuclear/proc/update_reactor()
if(crit_fail)
overlays += "nucgun-crit"
return
if(lightfail)
overlays += "nucgun-medium"
else if ((power_supply.charge/power_supply.maxcharge) <= 0.5)
@@ -97,10 +67,6 @@
if("stun") overlays += "nucgun-stun"
if("lethal") overlays += "nucgun-kill"
/obj/item/weapon/gun/energy/gun/nuclear/emp_act(severity)
..()
reliability -= round(15/severity)
/obj/item/weapon/gun/energy/gun/nuclear/update_icon()
overlays.Cut()
update_charge()
@@ -4,7 +4,7 @@
icon_state = "ionrifle"
item_state = "ionrifle"
fire_sound = 'sound/weapons/Laser.ogg'
origin_tech = "combat=2;magnets=4"
origin_tech = list(TECH_COMBAT = 2, TECH_MAGNET = 4)
w_class = 4
force = 10
flags = CONDUCT
@@ -28,9 +28,9 @@
desc = "A gun that discharges high amounts of controlled radiation to slowly break a target into component elements."
icon_state = "decloner"
item_state = "decloner"
fire_sound = 'sound/weapons/pulse3.ogg'
origin_tech = "combat=5;materials=4;powerstorage=3"
max_shots = 10
fire_sound = 'sound/weapons/pulse3.ogg'
origin_tech = list(TECH_COMBAT = 5, TECH_MATERIAL = 4, TECH_POWER = 3)
max_shots = 10
projectile_type = /obj/item/projectile/energy/declone
/obj/item/weapon/gun/energy/floragun
@@ -42,7 +42,7 @@
charge_cost = 100
max_shots = 10
projectile_type = /obj/item/projectile/energy/floramut
origin_tech = "materials=2;biotech=3;powerstorage=3"
origin_tech = list(TECH_MATERIAL = 2, TECH_BIO = 3, TECH_POWER = 3)
modifystate = "floramut"
self_recharge = 1
@@ -95,7 +95,7 @@
icon_state = "toxgun"
fire_sound = 'sound/effects/stealthoff.ogg'
w_class = 3.0
origin_tech = "combat=5;phorontech=4"
origin_tech = list(TECH_COMBAT = 5, TECH_PHORON = 4)
projectile_type = /obj/item/projectile/energy/phoron
/* Staves */
+4 -4
View File
@@ -23,8 +23,8 @@
desc = "A high-tech revolver that fires stun cartridges. The stun cartridges can be recharged using a conventional energy weapon recharger."
icon_state = "stunrevolver"
item_state = "stunrevolver"
fire_sound = 'sound/weapons/Gunshot.ogg'
origin_tech = "combat=3;materials=3;powerstorage=2"
fire_sound = 'sound/weapons/Gunshot.ogg'
origin_tech = list(TECH_COMBAT = 3, TECH_MATERIAL = 3, TECH_POWER = 2)
projectile_type = /obj/item/projectile/energy/electrode/stunshot
max_shots = 8
@@ -35,8 +35,8 @@
icon_state = "crossbow"
w_class = 2.0
item_state = "crossbow"
matter = list(DEFAULT_WALL_MATERIAL = 2000)
origin_tech = "combat=2;magnets=2;syndicate=5"
origin_tech = list(TECH_COMBAT = 2, TECH_MAGNET = 2, TECH_ILLEGAL = 5)
matter = list(DEFAULT_WALL_MATERIAL = 2000)
slot_flags = SLOT_BELT
silenced = 1
fire_sound = 'sound/weapons/Genhit.ogg'
@@ -6,7 +6,7 @@
var/temperature = T20C
var/current_temperature = T20C
charge_cost = 100
origin_tech = "combat=3;materials=4;powerstorage=3;magnets=2"
origin_tech = list(TECH_COMBAT = 3, TECH_MATERIAL = 4, TECH_POWER = 3, TECH_MAGNET = 2)
slot_flags = SLOT_BELT|SLOT_BACK
projectile_type = /obj/item/projectile/temp
@@ -9,7 +9,7 @@
force = 5.0
flags = CONDUCT | USEDELAY
slot_flags = 0
origin_tech = "combat=8;materials=5"
origin_tech = list(TECH_COMBAT = 8, TECH_MATERIAL = 5)
fire_sound = 'sound/effects/bang.ogg'
release_force = 15
+1 -1
View File
@@ -6,7 +6,7 @@
name = "gun"
desc = "A gun that fires bullets."
icon_state = "revolver"
origin_tech = "combat=2;materials=2"
origin_tech = list(TECH_COMBAT = 2, TECH_MATERIAL = 2)
w_class = 3
matter = list(DEFAULT_WALL_MATERIAL = 1000)
recoil = 1
@@ -6,7 +6,7 @@
load_method = SPEEDLOADER //yup. until someone sprites a magazine for it.
max_shells = 22
caliber = "9mm"
origin_tech = "combat=4;materials=2"
origin_tech = list(TECH_COMBAT = 4, TECH_MATERIAL = 2)
slot_flags = SLOT_BELT
ammo_type = /obj/item/ammo_casing/c9mm
multi_aim = 1
@@ -25,7 +25,7 @@
load_method = SPEEDLOADER //yup. until someone sprites a magazine for it.
max_shells = 15
caliber = ".45"
origin_tech = "combat=5;materials=2;syndicate=8"
origin_tech = list(TECH_COMBAT = 5, TECH_MATERIAL = 2, TECH_ILLEGAL = 8)
ammo_type = /obj/item/ammo_casing/c45
/obj/item/weapon/gun/projectile/automatic/c20r
@@ -36,7 +36,7 @@
w_class = 3
force = 10
caliber = "12mm"
origin_tech = "combat=5;materials=2;syndicate=8"
origin_tech = list(TECH_COMBAT = 5, TECH_MATERIAL = 2, TECH_ILLEGAL = 8)
slot_flags = SLOT_BELT|SLOT_BACK
fire_sound = 'sound/weapons/Gunshot_smg.ogg'
load_method = MAGAZINE
@@ -60,7 +60,7 @@
w_class = 4
force = 10
caliber = "a762"
origin_tech = "combat=6;materials=1;syndicate=4"
origin_tech = list(TECH_COMBAT = 6, TECH_MATERIAL = 1, TECH_ILLEGAL = 4)
slot_flags = SLOT_BACK
load_method = MAGAZINE
magazine_type = /obj/item/ammo_magazine/c762
@@ -83,7 +83,7 @@
item_state = "wt550"
w_class = 3
caliber = "9mm"
origin_tech = "combat=5;materials=2"
origin_tech = list(TECH_COMBAT = 5, TECH_MATERIAL = 2)
slot_flags = SLOT_BELT
ammo_type = "/obj/item/ammo_casing/c9mmr"
fire_sound = 'sound/weapons/Gunshot_smg.ogg'
@@ -109,7 +109,7 @@
w_class = 4
force = 10
caliber = "a556"
origin_tech = "combat=8;materials=3"
origin_tech = list(TECH_COMBAT = 8, TECH_MATERIAL = 3)
ammo_type = "/obj/item/ammo_casing/a556"
fire_sound = 'sound/weapons/Gunshot.ogg'
slot_flags = SLOT_BACK
@@ -179,7 +179,7 @@
slot_flags = 0
max_shells = 50
caliber = "a762"
origin_tech = "combat=6;materials=1;syndicate=2"
origin_tech = list(TECH_COMBAT = 6, TECH_MATERIAL = 1, TECH_ILLEGAL = 2)
slot_flags = SLOT_BACK
ammo_type = "/obj/item/ammo_casing/a762"
fire_sound = 'sound/weapons/Gunshot_smg.ogg'
@@ -34,7 +34,7 @@
desc = "A rack of hollow darts."
icon_state = "darts"
item_state = "rcdammo"
origin_tech = "materials=2"
origin_tech = list(TECH_MATERIAL = 2)
mag_type = MAGAZINE
caliber = "dart"
ammo_type = /obj/item/ammo_casing/chemdart
@@ -4,7 +4,7 @@
magazine_type = /obj/item/ammo_magazine/c45m
icon_state = "colt"
caliber = ".45"
origin_tech = "combat=2;materials=2"
origin_tech = list(TECH_COMBAT = 2, TECH_MATERIAL = 2)
load_method = MAGAZINE
/obj/item/weapon/gun/projectile/colt/detective
@@ -35,7 +35,7 @@
icon_state = "secguncomp"
magazine_type = /obj/item/ammo_magazine/c45m/rubber
caliber = ".45"
origin_tech = "combat=2;materials=2"
origin_tech = list(TECH_COMBAT = 2, TECH_MATERIAL = 2)
load_method = MAGAZINE
/obj/item/weapon/gun/projectile/sec/flash
@@ -54,7 +54,7 @@
w_class = 3
caliber = ".45"
silenced = 1
origin_tech = "combat=2;materials=2;syndicate=8"
origin_tech = list(TECH_COMBAT = 2, TECH_MATERIAL = 2, TECH_ILLEGAL = 8)
load_method = MAGAZINE
magazine_type = /obj/item/ammo_magazine/c45m
@@ -89,7 +89,7 @@
max_shells = 8
caliber = "75"
fire_sound = 'sound/effects/Explosion1.ogg'
origin_tech = "combat=3"
origin_tech = list(TECH_COMBAT = 3)
ammo_type = "/obj/item/ammo_casing/a75"
load_method = MAGAZINE
magazine_type = /obj/item/ammo_magazine/a75
@@ -111,7 +111,7 @@
w_class = 2
caliber = "9mm"
silenced = 0
origin_tech = "combat=2;materials=2;syndicate=2"
origin_tech = list(TECH_COMBAT = 2, TECH_MATERIAL = 2, TECH_ILLEGAL = 2)
load_method = MAGAZINE
magazine_type = /obj/item/ammo_magazine/mc9mm
@@ -4,7 +4,7 @@
icon_state = "revolver"
item_state = "revolver"
caliber = "357"
origin_tech = "combat=2;materials=2"
origin_tech = list(TECH_COMBAT = 2, TECH_MATERIAL = 2)
handle_casings = CYCLE_CASINGS
max_shells = 7
ammo_type = /obj/item/ammo_casing/a357
@@ -13,7 +13,7 @@
name = "mateba"
desc = "When you absolutely, positively need a 10mm hole in the other guy. Uses .357 ammo." //>10mm hole >.357
icon_state = "mateba"
origin_tech = "combat=2;materials=2"
origin_tech = list(TECH_COMBAT = 2, TECH_MATERIAL = 2)
/obj/item/weapon/gun/projectile/revolver/detective
name = "revolver"
@@ -21,7 +21,7 @@
icon_state = "detective"
max_shells = 6
caliber = "38"
origin_tech = "combat=2;materials=2"
origin_tech = list(TECH_COMBAT = 2, TECH_MATERIAL = 2)
ammo_type = /obj/item/ammo_casing/c38
/obj/item/weapon/gun/projectile/revolver/detective/verb/rename_gun()
@@ -9,7 +9,7 @@
flags = CONDUCT
slot_flags = SLOT_BACK
caliber = "shotgun"
origin_tech = "combat=4;materials=2"
origin_tech = list(TECH_COMBAT = 4, TECH_MATERIAL = 2)
load_method = SINGLE_CASING
ammo_type = /obj/item/ammo_casing/shotgun/beanbag
handle_casings = HOLD_CASINGS
@@ -43,7 +43,7 @@
name = "combat shotgun"
icon_state = "cshotgun"
item_state = "cshotgun"
origin_tech = "combat=5;materials=2"
origin_tech = list(TECH_COMBAT = 5, TECH_MATERIAL = 2)
max_shells = 7 //match the ammo box capacity, also it can hold a round in the chamber anyways, for a total of 8.
ammo_type = /obj/item/ammo_casing/shotgun
@@ -63,7 +63,7 @@
flags = CONDUCT
slot_flags = SLOT_BACK
caliber = "shotgun"
origin_tech = "combat=3;materials=1"
origin_tech = list(TECH_COMBAT = 3, TECH_MATERIAL = 1)
ammo_type = /obj/item/ammo_casing/shotgun/beanbag
burst_delay = 0
@@ -6,7 +6,7 @@
w_class = 4
force = 10
slot_flags = SLOT_BACK
origin_tech = "combat=8;materials=2;syndicate=8"
origin_tech = list(TECH_COMBAT = 8, TECH_MATERIAL = 2, TECH_ILLEGAL = 8)
caliber = "14.5mm"
recoil = 2 //extra kickback
//fire_sound = 'sound/weapons/sniper.ogg'
@@ -156,7 +156,7 @@
w_class = 3.0
possible_transfer_amounts = null
volume = 600
origin_tech = "combat=3;materials=3;engineering=3"
origin_tech = list(TECH_COMBAT = 3, TECH_MATERIAL = 3, TECH_ENGINERING = 3)
/obj/item/weapon/reagent_containers/spray/chemsprayer/Spray_at(atom/A as mob|obj)
var/direction = get_dir(src, A)
+133 -77
View File
@@ -1,20 +1,21 @@
/*///////////////Circuit Imprinter (By Darem)////////////////////////
Used to print new circuit boards (for computers and similar systems) and AI modules. Each circuit board pattern are stored in
a /datum/desgin on the linked R&D console. You can then print them out in a fasion similar to a regular lathe. However, instead of
using metal and glass, it uses glass and reagents (usually sulfuric acis).
using metal and glass, it uses glass and reagents (usually sulphuric acid).
*/
/obj/machinery/r_n_d/circuit_imprinter
name = "Circuit Imprinter"
icon_state = "circuit_imprinter"
flags = OPENCONTAINER
var/g_amount = 0
var/gold_amount = 0
var/diamond_amount = 0
var/uranium_amount = 0
var/max_material_amount = 75000.0
var/list/materials = list("metal" = 0, "glass" = 0, "gold" = 0, "silver" = 0, "phoron" = 0, "uranium" = 0, "diamond" = 0)
var/list/datum/design/queue = list()
var/progress = 0
var/max_material_storage = 75000
var/mat_efficiency = 1
var/speed = 1
use_power = 1
idle_power_usage = 30
@@ -30,25 +31,51 @@ using metal and glass, it uses glass and reagents (usually sulfuric acis).
component_parts += new /obj/item/weapon/reagent_containers/glass/beaker(src)
RefreshParts()
/obj/machinery/r_n_d/circuit_imprinter/process()
..()
if(stat)
update_icon()
return
if(queue.len == 0)
busy = 0
update_icon()
return
var/datum/design/D = queue[1]
if(canBuild(D))
busy = 1
progress += speed
if(progress >= D.time)
build(D)
progress = 0
removeFromQueue(1)
if(linked_console)
linked_console.updateUsrDialog()
update_icon()
else
if(busy)
visible_message("<span class='notice'>\icon [src] flashes: insufficient materials: [getLackingMaterials(D)].</span>")
busy = 0
update_icon()
/obj/machinery/r_n_d/circuit_imprinter/RefreshParts()
var/T = 0
for(var/obj/item/weapon/reagent_containers/glass/G in component_parts)
T += G.reagents.maximum_volume
var/datum/reagents/R = new/datum/reagents(T) //Holder for the reagents used as materials.
reagents = R
R.my_atom = src
T = 0
create_reagents(T)
max_material_storage = 0
for(var/obj/item/weapon/stock_parts/matter_bin/M in component_parts)
T += M.rating
max_material_amount = T * 75000.0
max_material_storage += M.rating * 75000
T = 0
for(var/obj/item/weapon/stock_parts/manipulator/M in component_parts)
T += M.rating
mat_efficiency = 1 - (T - 1) / 4
speed = T
/obj/machinery/r_n_d/circuit_imprinter/update_icon()
if(panel_open)
icon_state = "circuit_imprinter_t"
else if(busy)
icon_state = "circuit_imprinter_ani"
else
icon_state = "circuit_imprinter"
@@ -61,29 +88,27 @@ using metal and glass, it uses glass and reagents (usually sulfuric acis).
return
/obj/machinery/r_n_d/circuit_imprinter/proc/TotalMaterials()
return g_amount + gold_amount + diamond_amount + uranium_amount
var/t = 0
for(var/f in materials)
t += materials[f]
return t
/obj/machinery/r_n_d/circuit_imprinter/dismantle()
for(var/obj/I in component_parts)
if(istype(I, /obj/item/weapon/reagent_containers/glass/beaker))
reagents.trans_to_obj(I, reagents.total_volume)
if(g_amount >= 3750)
var/obj/item/stack/material/glass/G = new /obj/item/stack/material/glass(loc)
G.amount = round(g_amount / 3750)
if(gold_amount >= 2000)
var/obj/item/stack/material/gold/G = new /obj/item/stack/material/gold(loc)
G.amount = round(gold_amount / 2000)
if(diamond_amount >= 2000)
var/obj/item/stack/material/diamond/G = new /obj/item/stack/material/diamond(loc)
G.amount = round(diamond_amount / 2000)
if(uranium_amount >= 2000)
var/obj/item/stack/material/uranium/G = new /obj/item/stack/material/uranium(loc)
G.amount = round(uranium_amount / 2000)
if(istype(I, /obj/item/weapon/reagent_containers/glass/beaker))
reagents.trans_to_obj(I, reagents.total_volume)
for(var/f in materials)
if(materials[f] >= SHEET_MATERIAL_AMOUNT)
var/path = getMaterialType(f)
if(path)
var/obj/item/stack/S = new f(loc)
S.amount = round(materials[f] / SHEET_MATERIAL_AMOUNT)
..()
/obj/machinery/r_n_d/circuit_imprinter/attackby(var/obj/item/O as obj, var/mob/user as mob)
if(shocked)
shock(user, 50)
if(busy)
user << "<span class='notice'>\The [src] is busy. Please wait for completion of previous operation.</span>"
return 1
if(default_deconstruction_screwdriver(user, O))
if(linked_console)
linked_console.linked_imprinter = null
@@ -96,60 +121,91 @@ using metal and glass, it uses glass and reagents (usually sulfuric acis).
if(panel_open)
user << "<span class='notice'>You can't load \the [src] while it's opened.</span>"
return 1
if(disabled)
user << "\The [src] appears to not be working!"
return
if(!linked_console)
user << "\The [src] must be linked to an R&D console first!"
user << "\The [src] must be linked to an R&D console first."
return 1
if(O.is_open_container())
return 0
// if(!istype(O, /obj/item/stack/material/glass) && !istype(O, /obj/item/stack/material/gold) && !istype(O, /obj/item/stack/material/diamond) && !istype(O, /obj/item/stack/material/uranium))
// user << "<span class='notice'>You cannot insert this item into \the [src]!</span>"
// return 1
if(O.is_open_container())
return 0
if(!istype(O, /obj/item/stack/material/glass) && !istype(O, /obj/item/stack/material/gold) && !istype(O, /obj/item/stack/material/diamond) && !istype(O, /obj/item/stack/material/uranium))
user << "<span class='notice'>You cannot insert this item into \the [src].</span>"
return 1
if(stat)
return 1
if(busy)
user << "<span class='notice'>\The [src] is busy. Please wait for completion of previous operation.</span>"
return 1
if(istype(O, /obj/item/stack/material/glass) || istype(O, /obj/item/stack/material/gold) || istype(O, /obj/item/stack/material/diamond) || istype(O, /obj/item/stack/material/uranium))
if(TotalMaterials() + SHEET_MATERIAL_AMOUNT > max_material_storage)
user << "<span class='notice'>\The [src]'s material bin is full. Please remove material before adding more.</span>"
return 1
var/obj/item/stack/material/stack = O
if((TotalMaterials() + stack.perunit) > max_material_amount)
user << "<span class='notice'>\The [src] is full. Please remove glass from \the [src] in order to insert more.</span>"
return 1
var/obj/item/stack/stack = O
var/amount = round(input("How many sheets do you want to add?") as num)
if(amount < 0)
amount = 0
if(amount == 0)
return
if(amount > stack.amount)
amount = min(stack.amount, round((max_material_amount - TotalMaterials()) / stack.perunit))
var/amount = round(input("How many sheets do you want to add?") as num)
if(!O)
return
if(amount <= 0)//No negative numbers
return
if(amount > stack.get_amount())
amount = stack.get_amount()
if(max_material_storage - TotalMaterials() < (amount * SHEET_MATERIAL_AMOUNT)) //Can't overfill
amount = min(stack.get_amount(), round((max_material_storage - TotalMaterials()) / SHEET_MATERIAL_AMOUNT))
busy = 1
use_power(max(1000, (3750 * amount / 10)))
var/stacktype = stack.type
stack.use(amount)
if(do_after(usr, 16))
user << "<span class='notice'>You add [amount] sheets to \the [src].</span>"
switch(stacktype)
if(/obj/item/stack/material/glass)
g_amount += amount * 3750
if(/obj/item/stack/material/gold)
gold_amount += amount * 2000
if(/obj/item/stack/material/diamond)
diamond_amount += amount * 2000
if(/obj/item/stack/material/uranium)
uranium_amount += amount * 2000
else
new stacktype(loc, amount)
busy = 0
updateUsrDialog()
busy = 1
use_power(max(1000, (SHEET_MATERIAL_AMOUNT * amount / 10)))
var/stacktype = stack.type
var/t = getMaterialName(stacktype)
if(t)
if(do_after(usr, 16))
if(stack.use(amount))
user << "<span class='notice'>You add [amount] sheets to \the [src].</span>"
materials[t] += amount * SHEET_MATERIAL_AMOUNT
busy = 0
updateUsrDialog()
..()
/obj/machinery/r_n_d/circuit_imprinter/proc/addToQueue(var/datum/design/D)
queue += D
return
//This is to stop these machines being hackable via clicking.
/obj/machinery/r_n_d/circuit_imprinter/attack_hand(mob/user as mob)
return
/obj/machinery/r_n_d/circuit_imprinter/proc/removeFromQueue(var/index)
queue.Cut(index, index + 1)
return
/obj/machinery/r_n_d/circuit_imprinter/proc/canBuild(var/datum/design/D)
for(var/M in D.materials)
if(materials[M] < D.materials[M])
return 0
for(var/C in D.chemicals)
if(!reagents.has_reagent(C, D.chemicals[C]))
return 0
return 1
/obj/machinery/r_n_d/circuit_imprinter/proc/getLackingMaterials(var/datum/design/D)
var/ret = ""
for(var/M in D.materials)
if(materials[M] < D.materials[M])
if(ret != "")
ret += ", "
ret += "[D.materials[M] - materials[M]] [M]"
for(var/C in D.chemicals)
if(!reagents.has_reagent(C, D.chemicals[C]))
if(ret != "")
ret += ", "
ret += C
return ret
/obj/machinery/r_n_d/circuit_imprinter/proc/build(var/datum/design/D)
var/power = active_power_usage
for(var/M in D.materials)
power += round(D.materials[M] / 5)
power = max(active_power_usage, power)
use_power(power)
for(var/M in D.materials)
materials[M] = max(0, materials[M] - D.materials[M] * mat_efficiency)
for(var/C in D.chemicals)
reagents.remove_reagent(C, D.chemicals[C] * mat_efficiency)
if(D.build_path)
var/obj/new_item = new D.build_path(src)
new_item.loc = loc
if(mat_efficiency != 1) // No matter out of nowhere
if(new_item.matter && new_item.matter.len > 0)
for(var/i in new_item.matter)
new_item.matter[i] = new_item.matter[i] * mat_efficiency
File diff suppressed because it is too large Load Diff
+14 -22
View File
@@ -1,5 +1,3 @@
//This file was auto-corrected by findeclaration.exe on 25.5.2012 20:42:33
/*
Destructive Analyzer
@@ -7,12 +5,12 @@ It is used to destroy hand-held objects and advance technological research. Cont
Note: Must be placed within 3 tiles of the R&D Console
*/
/obj/machinery/r_n_d/destructive_analyzer
name = "destructive analyzer"
icon_state = "d_analyzer"
var/obj/item/weapon/loaded_item = null
var/decon_mod = 1
var/min_reliability = 90
var/obj/item/weapon/loaded_item = null
var/decon_mod = 0
use_power = 1
idle_power_usage = 30
@@ -32,7 +30,6 @@ Note: Must be placed within 3 tiles of the R&D Console
for(var/obj/item/weapon/stock_parts/S in src)
T += S.rating
decon_mod = T * 0.1
min_reliability = 93 - T
/obj/machinery/r_n_d/destructive_analyzer/meteorhit()
qdel(src)
@@ -47,8 +44,12 @@ Note: Must be placed within 3 tiles of the R&D Console
icon_state = "d_analyzer"
/obj/machinery/r_n_d/destructive_analyzer/attackby(var/obj/O as obj, var/mob/user as mob)
if(shocked)
shock(user, 50)
if(busy)
user << "<span class='notice'>\The [src] is busy right now.</span>"
return
if(loaded_item)
user << "<span class='notice'>There is something already loaded into \the [src].</span>"
return 1
if(default_deconstruction_screwdriver(user, O))
if(linked_console)
linked_console.linked_destroy = null
@@ -61,32 +62,23 @@ Note: Must be placed within 3 tiles of the R&D Console
if(panel_open)
user << "<span class='notice'>You can't load \the [src] while it's opened.</span>"
return 1
if(disabled)
return
if(!linked_console)
user << "<span class='notice'>\The [src] must be linked to an R&D console first!</span>"
return
if(busy)
user << "<span class='notice'>\The [src] is busy right now.</span>"
user << "<span class='notice'>\The [src] must be linked to an R&D console first.</span>"
return
if(istype(O, /obj/item) && !loaded_item)
if(isrobot(user)) //Don't put your module items in there!
return
if(!O.origin_tech)
user << "<span class='notice'>This doesn't seem to have a tech origin!</span>"
user << "<span class='notice'>This doesn't seem to have a tech origin.</span>"
return
var/list/temp_tech = ConvertReqString2List(O.origin_tech)
if(temp_tech.len == 0)
user << "<span class='notice'>You cannot deconstruct this item!</span>"
return
if(O.reliability < min_reliability && O.crit_fail == 0)
usr << "<span class='warning'>Item is neither reliable enough nor broken enough to learn from.</span>"
if(O.origin_tech.len == 0)
user << "<span class='notice'>You cannot deconstruct this item.</span>"
return
busy = 1
loaded_item = O
user.drop_item()
O.loc = src
user << "<span class='notice'>You add \the [O] to \the [src]!</span>"
user << "<span class='notice'>You add \the [O] to \the [src].</span>"
flick("d_analyzer_la", src)
spawn(10)
update_icon()
+131 -103
View File
@@ -1,12 +1,3 @@
/*
Protolathe
Similar to an autolathe, you load glass and metal sheets (but not other objects) into it to be used as raw materials for the stuff
it creates. All the menus and other manipulation commands are in the R&D console.
Note: Must be placed west/left of and R&D console to function.
*/
/obj/machinery/r_n_d/protolathe
name = "Protolathe"
icon_state = "protolathe"
@@ -16,16 +7,14 @@ Note: Must be placed west/left of and R&D console to function.
idle_power_usage = 30
active_power_usage = 5000
var/max_material_storage = 100000 //All this could probably be done better with a list but meh.
var/m_amount = 0.0
var/g_amount = 0.0
var/gold_amount = 0.0
var/silver_amount = 0.0
var/phoron_amount = 0.0
var/uranium_amount = 0.0
var/diamond_amount = 0.0
var/max_material_storage = 100000
var/list/materials = list("metal" = 0, "glass" = 0, "gold" = 0, "silver" = 0, "phoron" = 0, "uranium" = 0, "diamond" = 0)
var/list/datum/design/queue = list()
var/progress = 0
var/mat_efficiency = 1
var/speed = 1
/obj/machinery/r_n_d/protolathe/New()
..()
@@ -39,61 +28,76 @@ Note: Must be placed west/left of and R&D console to function.
component_parts += new /obj/item/weapon/reagent_containers/glass/beaker(src)
RefreshParts()
/obj/machinery/r_n_d/protolathe/process()
..()
if(stat)
update_icon()
return
if(queue.len == 0)
busy = 0
update_icon()
return
var/datum/design/D = queue[1]
if(canBuild(D))
busy = 1
progress += speed
if(progress >= D.time)
build(D)
progress = 0
removeFromQueue(1)
if(linked_console)
linked_console.updateUsrDialog()
update_icon()
else
if(busy)
visible_message("<span class='notice'>\icon [src] flashes: insufficient materials: [getLackingMaterials(D)].</span>")
busy = 0
update_icon()
/obj/machinery/r_n_d/protolathe/proc/TotalMaterials() //returns the total of all the stored materials. Makes code neater.
return m_amount + g_amount + gold_amount + silver_amount + phoron_amount + uranium_amount + diamond_amount
var/t = 0
for(var/f in materials)
t += materials[f]
return t
/obj/machinery/r_n_d/protolathe/RefreshParts()
var/T = 0
for(var/obj/item/weapon/reagent_containers/glass/G in component_parts)
T += G.reagents.maximum_volume
var/datum/reagents/R = new/datum/reagents(T) //Holder for the reagents used as materials.
reagents = R
R.my_atom = src
T = 0
create_reagents(T)
max_material_storage = 0
for(var/obj/item/weapon/stock_parts/matter_bin/M in component_parts)
T += M.rating
max_material_storage = T * 75000
max_material_storage += M.rating * 75000
T = 0
for(var/obj/item/weapon/stock_parts/manipulator/M in component_parts)
T += M.rating
mat_efficiency = 1 - (T - 2) / 8
speed = T / 2
/obj/machinery/r_n_d/protolathe/dismantle()
for(var/obj/I in component_parts)
if(istype(I, /obj/item/weapon/reagent_containers/glass/beaker))
reagents.trans_to_obj(I, reagents.total_volume)
if(m_amount >= 3750)
var/obj/item/stack/material/steel/G = new /obj/item/stack/material/steel(loc)
G.amount = round(m_amount / G.perunit)
if(g_amount >= 3750)
var/obj/item/stack/material/glass/G = new /obj/item/stack/material/glass(loc)
G.amount = round(g_amount / G.perunit)
if(phoron_amount >= 2000)
var/obj/item/stack/material/phoron/G = new /obj/item/stack/material/phoron(loc)
G.amount = round(phoron_amount / G.perunit)
if(silver_amount >= 2000)
var/obj/item/stack/material/silver/G = new /obj/item/stack/material/silver(loc)
G.amount = round(silver_amount / G.perunit)
if(gold_amount >= 2000)
var/obj/item/stack/material/gold/G = new /obj/item/stack/material/gold(loc)
G.amount = round(gold_amount / G.perunit)
if(uranium_amount >= 2000)
var/obj/item/stack/material/uranium/G = new /obj/item/stack/material/uranium(loc)
G.amount = round(uranium_amount / G.perunit)
if(diamond_amount >= 2000)
var/obj/item/stack/material/diamond/G = new /obj/item/stack/material/diamond(loc)
G.amount = round(diamond_amount / G.perunit)
for(var/f in materials)
if(materials[f] >= SHEET_MATERIAL_AMOUNT)
var/path = getMaterialType(f)
if(path)
var/obj/item/stack/S = new f(loc)
S.amount = round(materials[f] / SHEET_MATERIAL_AMOUNT)
..()
/obj/machinery/r_n_d/protolathe/update_icon()
if(panel_open)
icon_state = "protolathe_t"
else if(busy)
icon_state = "protolathe_n"
else
icon_state = "protolathe"
/obj/machinery/r_n_d/protolathe/attackby(var/obj/item/O as obj, var/mob/user as mob)
if(shocked)
shock(user, 50)
if(busy)
user << "<span class='notice'>\The [src] is busy. Please wait for completion of previous operation.</span>"
return 1
if(default_deconstruction_screwdriver(user, O))
if(linked_console)
linked_console.linked_lathe = null
@@ -108,69 +112,93 @@ Note: Must be placed west/left of and R&D console to function.
if(panel_open)
user << "<span class='notice'>You can't load \the [src] while it's opened.</span>"
return 1
if(disabled)
return
if(!linked_console)
user << "<span class='notice'>\The [src] must be linked to an R&D console first!</span>"
return 1
if(busy)
user << "<span class='notice'>\The [src] is busy. Please wait for completion of previous operation.</span>"
if(!istype(O, /obj/item/stack/material))
user << "<span class='notice'>You cannot insert this item into \the [src]!</span>"
return 1
if(stat)
return 1
if(istype(O,/obj/item/stack/material))
var/obj/item/stack/material/S = O
if(TotalMaterials() + S.perunit > max_material_storage)
user << "<span class='notice'>\The [src]'s material bin is full. Please remove material before adding more.</span>"
return 1
var/obj/item/stack/material/stack = O
var/amount = round(input("How many sheets do you want to add?") as num)//No decimals
if(!O)
return
if(amount < 0)//No negative numbers
amount = 0
if(amount == 0)
return
if(amount > stack.get_amount())
amount = stack.get_amount()
if(max_material_storage - TotalMaterials() < (amount * stack.perunit))//Can't overfill
amount = min(stack.amount, round((max_material_storage - TotalMaterials()) / stack.perunit))
if(TotalMaterials() + SHEET_MATERIAL_AMOUNT > max_material_storage)
user << "<span class='notice'>\The [src]'s material bin is full. Please remove material before adding more.</span>"
return 1
overlays += "protolathe_[stack.name]"
sleep(10)
overlays -= "protolathe_[stack.name]"
icon_state = "protolathe"
busy = 1
use_power(max(1000, (3750 * amount / 10)))
var/stacktype = stack.type
stack.use(amount)
if(do_after(user, 16))
user << "<span class='notice'>You add [amount] sheets to \the [src].</span>"
icon_state = "protolathe"
switch(stacktype)
if(/obj/item/stack/material/steel)
m_amount += amount * 3750
if(/obj/item/stack/material/glass)
g_amount += amount * 3750
if(/obj/item/stack/material/gold)
gold_amount += amount * 2000
if(/obj/item/stack/material/silver)
silver_amount += amount * 2000
if(/obj/item/stack/material/phoron)
phoron_amount += amount * 2000
if(/obj/item/stack/material/uranium)
uranium_amount += amount * 2000
if(/obj/item/stack/material/diamond)
diamond_amount += amount * 2000
else
new stacktype(loc, amount)
busy = 0
updateUsrDialog()
var/obj/item/stack/material/stack = O
var/amount = round(input("How many sheets do you want to add?") as num)//No decimals
if(!O)
return
..()
if(amount <= 0)//No negative numbers
return
if(amount > stack.get_amount())
amount = stack.get_amount()
if(max_material_storage - TotalMaterials() < (amount * SHEET_MATERIAL_AMOUNT)) //Can't overfill
amount = min(stack.get_amount(), round((max_material_storage - TotalMaterials()) / SHEET_MATERIAL_AMOUNT))
//This is to stop these machines being hackable via clicking.
/obj/machinery/r_n_d/protolathe/attack_hand(mob/user as mob)
return
var/stacktype = stack.type
var/t = getMaterialName(stacktype)
overlays += "protolathe_[t]"
spawn(10)
overlays -= "protolathe_[t]"
busy = 1
use_power(max(1000, (SHEET_MATERIAL_AMOUNT * amount / 10)))
if(t)
if(do_after(user, 16))
if(stack.use(amount))
user << "<span class='notice'>You add [amount] sheets to \the [src].</span>"
materials[t] += amount * SHEET_MATERIAL_AMOUNT
busy = 0
updateUsrDialog()
return
/obj/machinery/r_n_d/protolathe/proc/addToQueue(var/datum/design/D)
queue += D
return
/obj/machinery/r_n_d/protolathe/proc/removeFromQueue(var/index)
queue.Cut(index, index + 1)
return
/obj/machinery/r_n_d/protolathe/proc/canBuild(var/datum/design/D)
for(var/M in D.materials)
if(materials[M] < D.materials[M])
return 0
for(var/C in D.chemicals)
if(!reagents.has_reagent(C, D.chemicals[C]))
return 0
return 1
/obj/machinery/r_n_d/protolathe/proc/getLackingMaterials(var/datum/design/D)
var/ret = ""
for(var/M in D.materials)
if(materials[M] < D.materials[M])
if(ret != "")
ret += ", "
ret += "[D.materials[M] - materials[M]] [M]"
for(var/C in D.chemicals)
if(!reagents.has_reagent(C, D.chemicals[C]))
if(ret != "")
ret += ", "
ret += C
return ret
/obj/machinery/r_n_d/protolathe/proc/build(var/datum/design/D)
var/power = active_power_usage
for(var/M in D.materials)
power += round(D.materials[M] / 5)
power = max(active_power_usage, power)
use_power(power)
for(var/M in D.materials)
materials[M] = max(0, materials[M] - D.materials[M] * mat_efficiency)
for(var/C in D.chemicals)
reagents.remove_reagent(C, D.chemicals[C] * mat_efficiency)
if(D.build_path)
var/obj/new_item = new D.build_path(src)
new_item.loc = loc
if(mat_efficiency != 1) // No matter out of nowhere
if(new_item.matter && new_item.matter.len > 0)
for(var/i in new_item.matter)
new_item.matter[i] = new_item.matter[i] * mat_efficiency
+1 -208
View File
@@ -3,7 +3,7 @@ Research and Development System. (Designed specifically for the /tg/station 13 (
///////////////Overview///////////////////
This system is a "tech tree" research and development system designed for SS13. It allows a "researcher" job (this document assumes
the "scientist" job is given this role) the tools necessiary to research new and better technologies. In general, the system works
the "scientist" job is given this role) the tools necessary to research new and better technologies. In general, the system works
by breaking existing technology and using what you learn from to advance your knowledge of SCIENCE! As your knowledge progresses,
you can build newer (and better?) devices (which you can also, eventually, deconstruct to advance your knowledge).
@@ -29,211 +29,4 @@ Each tech path should have at LEAST one item at every level (levels 1 - 20). Thi
researching. Existing tech (ie, anything you can find on the station or get from the quartermaster) shouldn't go higher then
level 5 or 7. Everything past that should be stuff you research.
Below is a checklist to make sure every tree is filled. As new items get added to R&D, add them here if there is an empty slot.
When thinking about new stuff, check here to see if there are any slots unfilled.
//MATERIALS
1 | Metal
2 | Solid Phoron
3 | Silver
4 | Gold, Super Capacitor
5 | Uranium, Nuclear Gun, SUPERPACMAN
6 | Diamond, MRSPACMAN
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
//PHORON TECH
1 |
2 | Solid Phoron
3 | Pacman Generator
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
//POWER TECH
1 | Basic Capacitor, Basic Cell
2 | High-Capacity Cell (10,000)
3 | Super-Capacity Cell (20,000), Powersink, PACMAN
4 | SUPERPACMAN
5 | MRSPACMAN, Super Capacitor
6 | Hyper-Capacity Cell (30,000)
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
//BLUE SPACE
1 |
2 | Teleporter Console Board
3 | Teleport Gun, Hand Tele
4 | Teleportation Scroll
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
//BIOTECH
1 | Bruise Pack, Scalpel
2 | PANDEMIC Board, Mass Spectrometer
3 | AI Core, Brains (MMI)
4 | MMI+Radio
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
//MAGNETS
1 | Basic Sensor
2 | Comm Console Board
3 | Adv Sensor
4 | Adv Mass Spectrometer, Chameleon Projector
5 | Phasic Sensor
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
//PROGRAMMING
1 | Arcade Board
2 | Sec Camera
3 | Cloning Machine Console Board
4 | AI Core, Intellicard
5 | Pico-Manipulator, Ultra-Micro-Laser
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
//SYNDICATE
1 | Sleepypen
2 | TYRANT Module, Emag
3 | Cloaking Device, Power Sink
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
//COMBAT
1 | Flashbang, Mousetrap, Nettle
2 | Stun Baton
3 | Power Axe, Death Nettle, Nuclear Gun
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
*/
+140 -253
View File
@@ -43,7 +43,6 @@ won't update every console in existence) but it's more of a hassle to do. Also,
var/screen = 1.0 //Which screen is currently showing.
var/id = 0 //ID of the computer (for server restrictions).
var/sync = 1 //If sync = 0, it doesn't show up on Server Control Console
var/errored = 0 //Errored during item construction.
req_access = list(access_research) //Data and setting manipulation requires scientist access.
@@ -58,43 +57,43 @@ won't update every console in existence) but it's more of a hassle to do. Also,
qdel(check_tech)
check_tech = null
break
return return_name
/obj/machinery/computer/rdconsole/proc/CallMaterialName(var/ID)
var/return_name = ID
switch(return_name)
if("metal")
return_name = "Metal"
if("glass")
return_name = "Glass"
if("gold")
return_name = "Gold"
if("silver")
return_name = "Silver"
if("phoron")
return_name = "Solid Phoron"
if("uranium")
return_name = "Uranium"
if("diamond")
return_name = "Diamond"
return return_name
/obj/machinery/computer/rdconsole/proc/CallReagentName(var/ID)
var/return_name = ID
var/datum/reagent/temp_reagent
var/return_name = null
if (copytext(ID, 1, 2) == "$")
return_name = copytext(ID, 2)
switch(return_name)
if(DEFAULT_WALL_MATERIAL)
return_name = "Steel"
if("glass")
return_name = "Glass"
if("gold")
return_name = "Gold"
if("silver")
return_name = "Silver"
if("phoron")
return_name = "Solid Phoron"
if("uranium")
return_name = "Uranium"
if("diamond")
return_name = "Diamond"
else
for(var/R in typesof(/datum/reagent) - /datum/reagent)
for(var/R in (typesof(/datum/reagent) - /datum/reagent))
temp_reagent = null
temp_reagent = new R()
if(temp_reagent.id == ID)
return_name = temp_reagent.name
qdel(temp_reagent)
temp_reagent = null
temp_reagent = new R()
if(temp_reagent.id == ID)
return_name = temp_reagent.name
qdel(temp_reagent)
temp_reagent = null
break
break
return return_name
/obj/machinery/computer/rdconsole/proc/SyncRDevices() //Makes sure it is properly sync'ed up with the devices attached to it (if any).
for(var/obj/machinery/r_n_d/D in oview(3,src))
if(D.linked_console != null || D.disabled || D.panel_open)
for(var/obj/machinery/r_n_d/D in range(3, src))
if(D.linked_console != null || D.panel_open)
continue
if(istype(D, /obj/machinery/r_n_d/destructive_analyzer))
if(linked_destroy == null)
@@ -110,8 +109,7 @@ won't update every console in existence) but it's more of a hassle to do. Also,
D.linked_console = src
return
//Have it automatically push research to the centcomm server so wild griffins can't fuck up R&D's work --NEO
/obj/machinery/computer/rdconsole/proc/griefProtection()
/obj/machinery/computer/rdconsole/proc/griefProtection() //Have it automatically push research to the centcomm server so wild griffins can't fuck up R&D's work
for(var/obj/machinery/r_n_d/server/centcom/C in machines)
for(var/datum/tech/T in files.known_tech)
C.files.AddTech2Known(T)
@@ -130,11 +128,6 @@ won't update every console in existence) but it's more of a hassle to do. Also,
/obj/machinery/computer/rdconsole/initialize()
SyncRDevices()
/* Instead of calling this every tick, it is only being called when needed
/obj/machinery/computer/rdconsole/process()
griefProtection()
*/
/obj/machinery/computer/rdconsole/attackby(var/obj/item/weapon/D as obj, var/mob/user as mob)
//Loading a disk into it.
if(istype(D, /obj/item/weapon/disk))
@@ -142,18 +135,20 @@ won't update every console in existence) but it's more of a hassle to do. Also,
user << "A disk is already loaded into the machine."
return
if(istype(D, /obj/item/weapon/disk/tech_disk)) t_disk = D
else if (istype(D, /obj/item/weapon/disk/design_disk)) d_disk = D
if(istype(D, /obj/item/weapon/disk/tech_disk))
t_disk = D
else if (istype(D, /obj/item/weapon/disk/design_disk))
d_disk = D
else
user << "\red Machine cannot accept disks in that format."
user << "<span class='notice'>Machine cannot accept disks in that format.</span>"
return
user.drop_item()
D.loc = src
user << "\blue You add the disk to the machine!"
user << "<span class='notice'>You add \the [D] to the machine.</span>"
else if(istype(D, /obj/item/weapon/card/emag) && !emagged)
playsound(src.loc, 'sound/effects/sparks4.ogg', 75, 1)
emagged = 1
user << "\blue You you disable the security protocols"
user << "<span class='notice'>You you disable the security protocols.</span>"
else
//The construction/deconstruction of the console code.
..()
@@ -170,17 +165,11 @@ won't update every console in existence) but it's more of a hassle to do. Also,
usr.set_machine(src)
if(href_list["menu"]) //Switches menu screens. Converts a sent text string into a number. Saves a LOT of code.
var/temp_screen = text2num(href_list["menu"])
if(temp_screen <= 1.1 || (3 <= temp_screen && 4.9 >= temp_screen) || src.allowed(usr) || emagged) //Unless you are making something, you need access.
if(temp_screen <= 1.1 || (3 <= temp_screen && 4.9 >= temp_screen) || allowed(usr) || emagged) //Unless you are making something, you need access.
screen = temp_screen
else
usr << "Unauthorized Access."
else if(href_list["reset"])
warning("RnD console has errored during protolathe operation. Resetting.")
errored = 0
screen = 1.0
updateUsrDialog()
else if(href_list["updt_tech"]) //Update the research holder with information from the technology disk.
screen = 0.0
spawn(50)
@@ -193,7 +182,7 @@ won't update every console in existence) but it's more of a hassle to do. Also,
t_disk.stored = null
else if(href_list["eject_tech"]) //Eject the technology disk.
t_disk:loc = src.loc
t_disk.loc = loc
t_disk = null
screen = 1.0
@@ -216,7 +205,7 @@ won't update every console in existence) but it's more of a hassle to do. Also,
d_disk.blueprint = null
else if(href_list["eject_design"]) //Eject the design disk.
d_disk:loc = src.loc
d_disk.loc = loc
d_disk = null
screen = 1.0
@@ -230,7 +219,7 @@ won't update every console in existence) but it's more of a hassle to do. Also,
else if(href_list["eject_item"]) //Eject the item inside the destructive analyzer.
if(linked_destroy)
if(linked_destroy.busy)
usr << "\red The destructive analyzer is busy at the moment."
usr << "<span class='notice'>The destructive analyzer is busy at the moment.</span>"
else if(linked_destroy.loaded_item)
linked_destroy.loaded_item.loc = linked_destroy.loc
@@ -241,9 +230,10 @@ won't update every console in existence) but it's more of a hassle to do. Also,
else if(href_list["deconstruct"]) //Deconstruct the item in the destructive analyzer and update the research holder.
if(linked_destroy)
if(linked_destroy.busy)
usr << "\red The destructive analyzer is busy at the moment."
usr << "<span class='notice'>The destructive analyzer is busy at the moment.</span>"
else
if(alert("Proceeding will destroy loaded item. Continue?", "Destructive analyzer confirmation", "Yes", "No") == "No" || !linked_destroy) return
if(alert("Proceeding will destroy loaded item. Continue?", "Destructive analyzer confirmation", "Yes", "No") == "No" || !linked_destroy)
return
linked_destroy.busy = 1
screen = 0.1
updateUsrDialog()
@@ -251,26 +241,24 @@ won't update every console in existence) but it's more of a hassle to do. Also,
spawn(24)
if(linked_destroy)
linked_destroy.busy = 0
if(!linked_destroy.hacked)
if(!linked_destroy.loaded_item)
usr <<"\red The destructive analyzer appears to be empty."
screen = 1.0
return
if(linked_destroy.loaded_item.reliability >= linked_destroy.min_reliability)
var/list/temp_tech = ConvertReqString2List(linked_destroy.loaded_item.origin_tech)
for(var/T in temp_tech)
files.UpdateTech(T, temp_tech[T])
if(linked_destroy.loaded_item.reliability < 100 && linked_destroy.loaded_item.crit_fail)
files.UpdateDesign(linked_destroy.loaded_item.type)
if(linked_lathe && linked_destroy.loaded_item.matter) //Also sends salvaged materials to a linked protolathe, if any.
linked_lathe.m_amount += min((linked_lathe.max_material_storage - linked_lathe.TotalMaterials()), (linked_destroy.loaded_item.matter[DEFAULT_WALL_MATERIAL]*linked_destroy.decon_mod))
linked_lathe.g_amount += min((linked_lathe.max_material_storage - linked_lathe.TotalMaterials()), (linked_destroy.loaded_item.matter["glass"]*linked_destroy.decon_mod))
linked_destroy.loaded_item = null
if(!linked_destroy.loaded_item)
usr <<"<span class='notice'>The destructive analyzer appears to be empty.</span>"
screen = 1.0
return
for(var/T in linked_destroy.loaded_item.origin_tech)
files.UpdateTech(T, linked_destroy.loaded_item.origin_tech[T])
if(linked_lathe && linked_destroy.loaded_item.matter) // Also sends salvaged materials to a linked protolathe, if any.
for(var/t in linked_destroy.loaded_item.matter)
if(t in linked_lathe.materials)
linked_lathe.materials[t] += min(linked_lathe.max_material_storage - linked_lathe.TotalMaterials(), linked_destroy.loaded_item.matter[t] * linked_destroy.decon_mod)
linked_destroy.loaded_item = null
for(var/obj/I in linked_destroy.contents)
for(var/mob/M in I.contents)
M.death()
M.death()
if(istype(I,/obj/item/stack/material))//Only deconsturcts one sheet at a time instead of the entire stack
var/obj/item/stack/material/S = I
var/obj/item/stack/material/S = I
if(S.get_amount() > 1)
S.use(1)
linked_destroy.loaded_item = S
@@ -281,12 +269,13 @@ won't update every console in existence) but it's more of a hassle to do. Also,
if(!(I in linked_destroy.component_parts))
qdel(I)
linked_destroy.icon_state = "d_analyzer"
use_power(linked_destroy.active_power_usage)
screen = 1.0
updateUsrDialog()
else if(href_list["lock"]) //Lock the console from use by anyone without tox access.
if(src.allowed(usr))
if(allowed(usr))
screen = text2num(href_list["lock"])
else
usr << "Unauthorized Access."
@@ -294,15 +283,13 @@ won't update every console in existence) but it's more of a hassle to do. Also,
else if(href_list["sync"]) //Sync the research holder with all the R&D consoles in the game that aren't sync protected.
screen = 0.0
if(!sync)
usr << "\red You must connect to the network first!"
usr << "<span class='notice'>You must connect to the network first.</span>"
else
griefProtection() //Putting this here because I dont trust the sync process
spawn(30)
if(src)
for(var/obj/machinery/r_n_d/server/S in machines)
var/server_processed = 0
if(S.disabled)
continue
if((id in S.id_with_upload) || istype(S, /obj/machinery/r_n_d/server/centcom))
for(var/datum/tech/T in files.known_tech)
S.files.AddTech2Known(T)
@@ -310,7 +297,7 @@ won't update every console in existence) but it's more of a hassle to do. Also,
S.files.AddDesign2Known(D)
S.files.RefreshResearch()
server_processed = 1
if(((id in S.id_with_download) && !istype(S, /obj/machinery/r_n_d/server/centcom)) || S.hacked)
if((id in S.id_with_download) && !istype(S, /obj/machinery/r_n_d/server/centcom))
for(var/datum/tech/T in S.files.known_tech)
files.AddTech2Known(T)
for(var/datum/design/D in S.files.known_designs)
@@ -333,57 +320,10 @@ won't update every console in existence) but it's more of a hassle to do. Also,
being_built = D
break
if(being_built)
var/power = linked_lathe.active_power_usage
for(var/M in being_built.materials)
power += round(being_built.materials[M] / 5)
power = max(linked_lathe.active_power_usage, power)
screen = 0.3
linked_lathe.busy = 1
flick("protolathe_n",linked_lathe)
var/key = usr.key //so we don't lose the info during the spawn delay
spawn(16)
use_power(power)
spawn(16)
errored = 1
for(var/M in being_built.materials)
switch(M)
if("$metal")
linked_lathe.m_amount = max(0, (linked_lathe.m_amount-being_built.materials[M]*linked_lathe.mat_efficiency))
if("$glass")
linked_lathe.g_amount = max(0, (linked_lathe.g_amount-being_built.materials[M]*linked_lathe.mat_efficiency))
if("$gold")
linked_lathe.gold_amount = max(0, (linked_lathe.gold_amount-being_built.materials[M]*linked_lathe.mat_efficiency))
if("$silver")
linked_lathe.silver_amount = max(0, (linked_lathe.silver_amount-being_built.materials[M]*linked_lathe.mat_efficiency))
if("$phoron")
linked_lathe.phoron_amount = max(0, (linked_lathe.phoron_amount-being_built.materials[M]*linked_lathe.mat_efficiency))
if("$uranium")
linked_lathe.uranium_amount = max(0, (linked_lathe.uranium_amount-being_built.materials[M]*linked_lathe.mat_efficiency))
if("$diamond")
linked_lathe.diamond_amount = max(0, (linked_lathe.diamond_amount-being_built.materials[M]*linked_lathe.mat_efficiency))
else
linked_lathe.reagents.remove_reagent(M, being_built.materials[M]*linked_lathe.mat_efficiency)
linked_lathe.addToQueue(being_built)
if(being_built.build_path)
var/obj/new_item = new being_built.build_path(src)
if( new_item.type == /obj/item/weapon/storage/backpack/holding )
new_item.investigate_log("built by [key]","singulo")
new_item.reliability = being_built.reliability
if(linked_lathe.hacked) being_built.reliability = max((reliability / 2), 0)
/*if(being_built.locked)
var/obj/item/weapon/storage/lockbox/L = new/obj/item/weapon/storage/lockbox(linked_lathe.loc)
new_item.loc = L
L.name += " ([new_item.name])"*/
else
new_item.loc = linked_lathe.loc
if(linked_lathe.mat_efficiency != 1) // No matter out of nowhere
if(new_item.matter && new_item.matter.len > 0)
for(var/i in new_item.matter)
new_item.matter[i] = new_item.matter[i] * linked_lathe.mat_efficiency
linked_lathe.busy = 0
screen = 3.1
errored = 0
updateUsrDialog()
screen = 3.1
updateUsrDialog()
else if(href_list["imprint"]) //Causes the Circuit Imprinter to build something.
if(linked_imprinter)
@@ -393,36 +333,9 @@ won't update every console in existence) but it's more of a hassle to do. Also,
being_built = D
break
if(being_built)
var/power = linked_imprinter.active_power_usage
for(var/M in being_built.materials)
power += round(being_built.materials[M] / 5)
power = max(linked_imprinter.active_power_usage, power)
screen = 0.4
linked_imprinter.busy = 1
flick("circuit_imprinter_ani",linked_imprinter)
spawn(16)
errored = 1
use_power(power)
for(var/M in being_built.materials)
switch(M)
if("$glass")
linked_imprinter.g_amount = max(0, (linked_imprinter.g_amount-being_built.materials[M]*linked_imprinter.mat_efficiency))
if("$gold")
linked_imprinter.gold_amount = max(0, (linked_imprinter.gold_amount-being_built.materials[M]*linked_imprinter.mat_efficiency))
if("$diamond")
linked_imprinter.diamond_amount = max(0, (linked_imprinter.diamond_amount-being_built.materials[M]*linked_imprinter.mat_efficiency))
if("$uranium")
linked_imprinter.uranium_amount = max(0, (linked_imprinter.uranium_amount-being_built.materials[M]*linked_imprinter.mat_efficiency))
else
linked_imprinter.reagents.remove_reagent(M, being_built.materials[M]*linked_imprinter.mat_efficiency)
var/obj/new_item = new being_built.build_path(src)
new_item.reliability = being_built.reliability
if(linked_imprinter.hacked) being_built.reliability = max((reliability / 2), 0)
new_item.loc = linked_imprinter.loc
linked_imprinter.busy = 0
screen = 4.1
errored = 0
updateUsrDialog()
linked_imprinter.addToQueue(being_built)
screen = 4.1
updateUsrDialog()
else if(href_list["disposeI"] && linked_imprinter) //Causes the circuit imprinter to dispose of a single reagent (all of it)
linked_imprinter.reagents.del_reagent(href_list["dispose"])
@@ -430,12 +343,18 @@ won't update every console in existence) but it's more of a hassle to do. Also,
else if(href_list["disposeallI"] && linked_imprinter) //Causes the circuit imprinter to dispose of all it's reagents.
linked_imprinter.reagents.clear_reagents()
else if(href_list["removeI"] && linked_lathe)
linked_imprinter.removeFromQueue(text2num(href_list["removeI"]))
else if(href_list["disposeP"] && linked_lathe) //Causes the protolathe to dispose of a single reagent (all of it)
linked_lathe.reagents.del_reagent(href_list["dispose"])
else if(href_list["disposeallP"] && linked_lathe) //Causes the protolathe to dispose of all it's reagents.
linked_lathe.reagents.clear_reagents()
else if(href_list["removeP"] && linked_lathe)
linked_lathe.removeFromQueue(text2num(href_list["removeP"]))
else if(href_list["lathe_ejectsheet"] && linked_lathe) //Causes the protolathe to eject a sheet of material
var/desired_num_sheets = text2num(href_list["amount"])
var/res_amount, type
@@ -462,9 +381,9 @@ won't update every console in existence) but it's more of a hassle to do. Also,
if(ispath(type) && hasvar(linked_lathe, res_amount))
var/obj/item/stack/material/sheet = new type(linked_lathe.loc)
var/available_num_sheets = round(linked_lathe.vars[res_amount]/sheet.perunit)
if(available_num_sheets>0)
if(available_num_sheets > 0)
sheet.amount = min(available_num_sheets, desired_num_sheets)
linked_lathe.vars[res_amount] = max(0, (linked_lathe.vars[res_amount]-sheet.amount * sheet.perunit))
linked_lathe.vars[res_amount] = max(0, (linked_lathe.vars[res_amount] - sheet.amount * sheet.perunit))
else
qdel(sheet)
else if(href_list["imprinter_ejectsheet"] && linked_imprinter) //Causes the protolathe to eject a sheet of material
@@ -488,13 +407,13 @@ won't update every console in existence) but it's more of a hassle to do. Also,
var/available_num_sheets = round(linked_imprinter.vars[res_amount]/sheet.perunit)
if(available_num_sheets>0)
sheet.amount = min(available_num_sheets, desired_num_sheets)
linked_imprinter.vars[res_amount] = max(0, (linked_imprinter.vars[res_amount]-sheet.amount * sheet.perunit))
linked_imprinter.vars[res_amount] = max(0, (linked_imprinter.vars[res_amount] - sheet.amount * sheet.perunit))
else
qdel(sheet)
else if(href_list["find_device"]) //The R&D console looks for devices nearby to link up with.
screen = 0.0
spawn(20)
spawn(10)
SyncRDevices()
screen = 1.7
updateUsrDialog()
@@ -548,6 +467,8 @@ won't update every console in existence) but it's more of a hassle to do. Also,
var/dat
dat += "<UL>"
for(var/datum/tech/T in files.known_tech)
if(T.level < 1)
continue
dat += "<LI>"
dat += "[T.name]"
dat += "<UL>"
@@ -587,17 +508,14 @@ won't update every console in existence) but it's more of a hassle to do. Also,
if(linked_imprinter == null)
screen = 4.0
if(errored)
dat += "An error has occured when constructing prototype. Try refreshing the console."
dat += "<br>If problem persists submit bug report stating which item you tried to build."
dat += "<br><A href='?src=\ref[src];reset=1'>RESET CONSOLE</A><br><br>"
switch(screen)
//////////////////////R&D CONSOLE SCREENS//////////////////
if(0.0) dat += "Updating Database...."
if(0.0)
dat += "Updating Database..."
if(0.1) dat += "Processing and Updating Database..."
if(0.1)
dat += "Processing and Updating Database..."
if(0.2)
dat += "SYSTEM LOCKED<BR><BR>"
@@ -676,11 +594,9 @@ won't update every console in existence) but it's more of a hassle to do. Also,
dat += "<A href='?src=\ref[src];menu=1.5'>Load Design to Disk</A> || "
else
dat += "Name: [d_disk.blueprint.name]<BR>"
dat += "Level: [between(0, (d_disk.blueprint.reliability + rand(-15,15)), 100)]<BR>"
switch(d_disk.blueprint.build_type)
if(IMPRINTER) dat += "Lathe Type: Circuit Imprinter<BR>"
if(PROTOLATHE) dat += "Lathe Type: Proto-lathe<BR>"
if(AUTOLATHE) dat += "Lathe Type: Auto-lathe<BR>"
dat += "Required Materials:<BR>"
for(var/M in d_disk.blueprint.materials)
if(copytext(M, 1, 2) == "$") dat += "* [copytext(M, 2)] x [d_disk.blueprint.materials[M]]<BR>"
@@ -751,9 +667,8 @@ won't update every console in existence) but it's more of a hassle to do. Also,
dat += "Name: [linked_destroy.loaded_item.name]<BR>"
dat += "Origin Tech:"
dat += "<UL>"
var/list/temp_tech = ConvertReqString2List(linked_destroy.loaded_item.origin_tech)
for(var/T in temp_tech)
dat += "<LI>[CallTechName(T)] [temp_tech[T]]"
for(var/T in linked_destroy.loaded_item.origin_tech)
dat += "<LI>[CallTechName(T)] [linked_destroy.loaded_item.origin_tech[T]]"
for(var/datum/tech/F in files.known_tech)
if(F.name == CallTechName(T))
dat += " (Current: [F.level])"
@@ -769,6 +684,7 @@ won't update every console in existence) but it's more of a hassle to do. Also,
if(3.1)
dat += "<A href='?src=\ref[src];menu=1.0'>Main Menu</A> || "
dat += "<A href='?src=\ref[src];menu=3.4'>View Queue</A> || "
dat += "<A href='?src=\ref[src];menu=3.2'>Material Storage</A> || "
dat += "<A href='?src=\ref[src];menu=3.3'>Chemical Storage</A><HR>"
dat += "Protolathe Menu:<BR><BR>"
@@ -779,35 +695,16 @@ won't update every console in existence) but it's more of a hassle to do. Also,
if(!D.build_path || !(D.build_type & PROTOLATHE))
continue
var/temp_dat
var/check_materials = 1
for(var/M in D.materials)
temp_dat += ", [D.materials[M]*linked_lathe.mat_efficiency] [CallMaterialName(M)]"
if(copytext(M, 1, 2) == "$")
switch(M)
if("$glass")
if(D.materials[M]*linked_lathe.mat_efficiency > linked_lathe.g_amount) check_materials = 0
if("$metal")
if(D.materials[M]*linked_lathe.mat_efficiency > linked_lathe.m_amount) check_materials = 0
if("$gold")
if(D.materials[M]*linked_lathe.mat_efficiency > linked_lathe.gold_amount) check_materials = 0
if("$silver")
if(D.materials[M]*linked_lathe.mat_efficiency > linked_lathe.silver_amount) check_materials = 0
if("$phoron")
if(D.materials[M]*linked_lathe.mat_efficiency > linked_lathe.phoron_amount) check_materials = 0
if("$uranium")
if(D.materials[M]*linked_lathe.mat_efficiency > linked_lathe.uranium_amount) check_materials = 0
if("$diamond")
if(D.materials[M]*linked_lathe.mat_efficiency > linked_lathe.diamond_amount) check_materials = 0
else if (!linked_lathe.reagents.has_reagent(M, D.materials[M]*linked_lathe.mat_efficiency))
check_materials = 0
temp_dat += ", [D.materials[M]] [CallMaterialName(M)]"
for(var/T in D.chemicals)
temp_dat += ", [D.chemicals[T]*linked_imprinter.mat_efficiency] [CallReagentName(T)]"
if(temp_dat)
temp_dat = " \[[copytext(temp_dat,3)]\]"
if(check_materials)
temp_dat = " \[[copytext(temp_dat, 3)]\]"
if(linked_lathe.canBuild(D))
dat += "<LI><B><A href='?src=\ref[src];build=[D.id]'>[D.name]</A></B>[temp_dat]"
else
dat += "<LI><B>[D.name]</B>[temp_dat]"
if(D.reliability < 100)
dat += " (Reliability: [D.reliability])"
dat += "</UL>"
if(3.2) //Protolathe Material Storage Sub-menu
@@ -815,33 +712,13 @@ 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.1'>Protolathe Menu</A><HR>"
dat += "Material Storage<BR><HR>"
dat += "<UL>"
for(var/M in list(DEFAULT_WALL_MATERIAL, "glass", "gold", "silver", "phoron", "uranium", "diamond"))
var/amount
var/sheetsize = 2000
switch(M)
if(DEFAULT_WALL_MATERIAL)
amount = linked_lathe.m_amount
sheetsize = 3750
if("glass")
amount = linked_lathe.g_amount
sheetsize = 3750
if("gold")
amount = linked_lathe.gold_amount
if("silver")
amount = linked_lathe.silver_amount
if("phoron")
amount = linked_lathe.phoron_amount
if("uranium")
amount = linked_lathe.uranium_amount
if("diamond")
amount = linked_lathe.diamond_amount
else
continue
for(var/M in linked_lathe.materials)
var/amount = linked_lathe.materials[M]
dat += "<LI><B>[capitalize(M)]</B>: [amount] cm<sup>3</sup>"
if(amount >= sheetsize)
if(amount >= SHEET_MATERIAL_AMOUNT)
dat += " || Eject "
for (var/C in list(1,3,5,10,15,20,25,30,40))
if(amount < C * sheetsize)
for (var/C in list(1, 3, 5, 10, 15, 20, 25, 30, 40))
if(amount < C * SHEET_MATERIAL_AMOUNT)
break
dat += "[C > 1 ? ", " : ""]<A href='?src=\ref[src];lathe_ejectsheet=[M];amount=[C]'>[C]</A> "
@@ -858,6 +735,24 @@ won't update every console in existence) but it's more of a hassle to do. Also,
dat += "<A href='?src=\ref[src];disposeP=[R.id]'>(Purge)</A><BR>"
dat += "<A href='?src=\ref[src];disposeallP=1'><U>Disposal All Chemicals in Storage</U></A><BR>"
if(3.4) // Protolathe queue
dat += "<A href='?src=\ref[src];menu=1.0'>Main Menu</A> || "
dat += "<A href='?src=\ref[src];menu=3.1'>Protolathe Menu</A><HR>"
dat += "Queue<BR><HR>"
if(!linked_lathe.queue.len)
dat += "Empty"
else
var/tmp = 1
for(var/datum/design/D in linked_lathe.queue)
if(tmp == 1)
if(linked_lathe.busy)
dat += "<B>1: [D.name]</B><BR>"
else
dat += "<B>1: [D.name]</B> (Awaiting materials) <A href='?src=\ref[src];removeP=[tmp]'>(Remove)</A><BR>"
else
dat += "[tmp]: [D.name] <A href='?src=\ref[src];removeP=[tmp]'>(Remove)</A><BR>"
++tmp
///////////////////CIRCUIT IMPRINTER SCREENS////////////////////
if(4.0)
dat += "<A href='?src=\ref[src];menu=1.0'>Main Menu</A><HR>"
@@ -865,6 +760,7 @@ won't update every console in existence) but it's more of a hassle to do. Also,
if(4.1)
dat += "<A href='?src=\ref[src];menu=1.0'>Main Menu</A> || "
dat += "<A href='?src=\ref[src];menu=4.4'>View Queue</A> || "
dat += "<A href='?src=\ref[src];menu=4.3'>Material Storage</A> || "
dat += "<A href='?src=\ref[src];menu=4.2'>Chemical Storage</A><HR>"
dat += "Circuit Imprinter Menu:<BR><BR>"
@@ -875,29 +771,16 @@ won't update every console in existence) but it's more of a hassle to do. Also,
if(!D.build_path || !(D.build_type & IMPRINTER))
continue
var/temp_dat
var/check_materials = 1
for(var/M in D.materials)
temp_dat += ", [D.materials[M]*linked_imprinter.mat_efficiency] [CallMaterialName(M)]"
if(copytext(M, 1, 2) == "$")
switch(M)
if("$glass")
if(D.materials[M]*linked_imprinter.mat_efficiency > linked_imprinter.g_amount) check_materials = 0
if("$gold")
if(D.materials[M]*linked_imprinter.mat_efficiency > linked_imprinter.gold_amount) check_materials = 0
if("$diamond")
if(D.materials[M]*linked_imprinter.mat_efficiency > linked_imprinter.diamond_amount) check_materials = 0
if("$uranium")
if(D.materials[M]*linked_imprinter.mat_efficiency > linked_imprinter.uranium_amount) check_materials = 0
else if (!linked_imprinter.reagents.has_reagent(M, D.materials[M]*linked_imprinter.mat_efficiency))
check_materials = 0
for(var/T in D.chemicals)
temp_dat += ", [D.chemicals[T]*linked_imprinter.mat_efficiency] [CallReagentName(T)]"
if(temp_dat)
temp_dat = " \[[copytext(temp_dat,3)]\]"
if (check_materials)
if(linked_imprinter.canBuild(D))
dat += "<LI><B><A href='?src=\ref[src];imprint=[D.id]'>[D.name]</A></B>[temp_dat]"
else
dat += "<LI><B>[D.name]</B>[temp_dat]"
if(D.reliability < 100)
dat += " (Reliability: [D.reliability])"
dat += "</UL>"
if(4.2)
@@ -914,24 +797,13 @@ won't update every console in existence) but it's more of a hassle to do. Also,
dat += "<A href='?src=\ref[src];menu=4.1'>Circuit Imprinter Menu</A><HR>"
dat += "Material Storage<BR><HR>"
dat += "<UL>"
for(var/M in list("glass", "gold", "diamond", "uranium"))
var/amount
var/sheetsize = 2000
switch(M)
if("glass")
amount = linked_imprinter.g_amount
sheetsize = 3750
if("gold")
amount = linked_imprinter.gold_amount
if("diamond")
amount = linked_imprinter.diamond_amount
if("uranium")
amount = linked_imprinter.uranium_amount
for(var/M in linked_imprinter.materials)
var/amount = linked_imprinter.materials[M]
dat += "<LI><B>[capitalize(M)]</B>: [amount] cm<sup>3</sup>"
if(amount >= sheetsize)
if(amount >= SHEET_MATERIAL_AMOUNT)
dat += " || Eject: "
for (var/C in list(1,3,5,10,15,20,25,30,40))
if(amount < C * sheetsize)
for (var/C in list(1, 3, 5, 10, 15, 20, 25, 30, 40))
if(amount < C * SHEET_MATERIAL_AMOUNT)
break
dat += "[C > 1 ? ", " : ""]<A href='?src=\ref[src];imprinter_ejectsheet=[M];amount=[C]'>[C]</A> "
@@ -939,6 +811,21 @@ won't update every console in existence) but it's more of a hassle to do. Also,
dat += ""
dat += "</UL>"
if(4.4)
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><HR>"
dat += "Queue<BR><HR>"
if(linked_imprinter.queue.len == 0)
dat += "Empty"
else
var/tmp = 1
for(var/datum/design/D in linked_imprinter.queue)
if(tmp == 1)
dat += "<B>1: [D.name]</B><BR>"
else
dat += "[tmp]: [D.name] <A href='?src=\ref[src];removeI=[tmp]'>(Remove)</A><BR>"
++tmp
///////////////////Research Information Browser////////////////////
if(5.0)
dat += "<A href='?src=\ref[src];menu=1.0'>Main Menu</A> || "
+33 -75
View File
@@ -2,7 +2,6 @@
//All devices that link into the R&D console fall into thise type for easy identification and some shared procs.
/obj/machinery/r_n_d
name = "R&D Device"
icon = 'icons/obj/machines/research.dmi'
@@ -10,83 +9,42 @@
anchored = 1
use_power = 1
var/busy = 0
var/hacked = 0
var/disabled = 0
var/shocked = 0
var/list/wires = list()
var/hack_wire
var/disable_wire
var/shock_wire
var/obj/machinery/computer/rdconsole/linked_console
/obj/machinery/r_n_d/New()
..()
wires["Red"] = 0
wires["Blue"] = 0
wires["Green"] = 0
wires["Yellow"] = 0
wires["Black"] = 0
wires["White"] = 0
var/list/w = list("Red","Blue","Green","Yellow","Black","White")
src.hack_wire = pick(w)
w -= src.hack_wire
src.shock_wire = pick(w)
w -= src.shock_wire
src.disable_wire = pick(w)
w -= src.disable_wire
/obj/machinery/r_n_d/attack_hand(mob/user as mob)
if (shocked)
shock(user,50)
if(panel_open)
var/dat as text
dat += "[src.name] Wires:<BR>"
for(var/wire in src.wires)
dat += text("[wire] Wire: <A href='?src=\ref[src];wire=[wire];cut=1'>[src.wires[wire] ? "Mend" : "Cut"]</A> <A href='?src=\ref[src];wire=[wire];pulse=1'>Pulse</A><BR>")
dat += text("The red light is [src.disabled ? "off" : "on"].<BR>")
dat += text("The green light is [src.shocked ? "off" : "on"].<BR>")
dat += text("The blue light is [src.hacked ? "off" : "on"].<BR>")
user << browse("<HTML><HEAD><TITLE>[src.name] Hacking</TITLE></HEAD><BODY>[dat]</BODY></HTML>","window=hack_win")
return
/obj/machinery/r_n_d/proc/getMaterialType(var/name)
switch(name)
if("metal")
return /obj/item/stack/material/steel
if("glass")
return /obj/item/stack/material/glass
if("gold")
return /obj/item/stack/material/gold
if("silver")
return /obj/item/stack/material/silver
if("phoron")
return /obj/item/stack/material/phoron
if("uranium")
return /obj/item/stack/material/uranium
if("diamond")
return /obj/item/stack/material/diamond
return null
/obj/machinery/r_n_d/Topic(href, href_list)
if(..())
return
usr.set_machine(src)
src.add_fingerprint(usr)
if(href_list["pulse"])
var/temp_wire = href_list["wire"]
if (!istype(usr.get_active_hand(), /obj/item/device/multitool))
usr << "You need a multitool!"
else
if(src.wires[temp_wire])
usr << "You can't pulse a cut wire."
else
if(src.hack_wire == href_list["wire"])
src.hacked = !src.hacked
spawn(100) src.hacked = !src.hacked
if(src.disable_wire == href_list["wire"])
src.disabled = !src.disabled
src.shock(usr,50)
spawn(100) src.disabled = !src.disabled
if(src.shock_wire == href_list["wire"])
src.shocked = !src.shocked
src.shock(usr,50)
spawn(100) src.shocked = !src.shocked
if(href_list["cut"])
if (!istype(usr.get_active_hand(), /obj/item/weapon/wirecutters))
usr << "You need wirecutters!"
else
var/temp_wire = href_list["wire"]
wires[temp_wire] = !wires[temp_wire]
if(src.hack_wire == temp_wire)
src.hacked = !src.hacked
if(src.disable_wire == temp_wire)
src.disabled = !src.disabled
src.shock(usr,50)
if(src.shock_wire == temp_wire)
src.shocked = !src.shocked
src.shock(usr,50)
src.updateUsrDialog()
/obj/machinery/r_n_d/proc/getMaterialName(var/type)
switch(type)
if(/obj/item/stack/material/steel)
return "metal"
if(/obj/item/stack/material/glass)
return "glass"
if(/obj/item/stack/material/gold)
return "gold"
if(/obj/item/stack/material/silver)
return "silver"
if(/obj/item/stack/material/phoron)
return "phoron"
if(/obj/item/stack/material/uranium)
return "uranium"
if(/obj/item/stack/material/diamond)
return "diamond"
+57 -129
View File
@@ -45,16 +45,13 @@ research holder datum.
***************************************************************/
/datum/research //Holder for all the existing, archived, and known tech. Individual to console.
//Datum/tech go here.
var/list/possible_tech = list() //List of all tech in the game that players have access to (barring special events).
var/list/known_tech = list() //List of locally known tech.
var/list/possible_designs = list() //List of all designs (at base reliability).
var/list/known_designs = list() //List of available designs (at base reliability).
var/list/known_tech = list() //List of locally known tech. Datum/tech go here.
var/list/possible_designs = list() //List of all designs.
var/list/known_designs = list() //List of available designs.
/datum/research/New() //Insert techs into possible_tech here. Known_tech automatically updated.
for(var/T in typesof(/datum/tech) - /datum/tech)
possible_tech += new T(src)
known_tech += new T(src)
for(var/D in typesof(/datum/design) - /datum/design)
possible_designs += new D(src)
RefreshResearch()
@@ -63,59 +60,26 @@ research holder datum.
/datum/research/techonly/New()
for(var/T in typesof(/datum/tech) - /datum/tech)
possible_tech += new T(src)
known_tech += new T(src)
RefreshResearch()
//Checks to see if tech has all the required pre-reqs.
//Input: datum/tech; Output: 0/1 (false/true)
/datum/research/proc/TechHasReqs(var/datum/tech/T)
if(T.req_tech.len == 0)
return 1
var/matches = 0
for(var/req in T.req_tech)
for(var/datum/tech/known in known_tech)
if((req == known.id) && (known.level >= T.req_tech[req]))
matches++
break
if(matches == T.req_tech.len)
return 1
else
return 0
//Checks to see if design has all the required pre-reqs.
//Input: datum/design; Output: 0/1 (false/true)
/datum/research/proc/DesignHasReqs(var/datum/design/D)
if(D.req_tech.len == 0)
return 1
var/matches = 0
var/list/k_tech = list()
for(var/datum/tech/known in known_tech)
k_tech[known.id] = known.level
for(var/req in D.req_tech)
if(!isnull(k_tech[req]) && k_tech[req] >= D.req_tech[req])
matches++
if(matches == D.req_tech.len)
return 1
else
return 0
/*
//Checks to see if design has all the required pre-reqs.
//Input: datum/design; Output: 0/1 (false/true)
/datum/research/proc/DesignHasReqs(var/datum/design/D)
if(D.req_tech.len == 0)
return 1
var/matches = 0
for(var/req in D.req_tech)
for(var/datum/tech/known in known_tech)
if((req == known.id) && (known.level >= D.req_tech[req]))
matches++
break
if(matches == D.req_tech.len)
return 1
else
return 0
*/
if(isnull(k_tech[req]) || k_tech[req] < D.req_tech[req])
return 0
return 1
//Adds a tech to known_tech list. Checks to make sure there aren't duplicates and updates existing tech's levels if needed.
//Input: datum/tech; Output: Null
/datum/research/proc/AddTech2Known(var/datum/tech/T)
@@ -124,143 +88,107 @@ research holder datum.
if(T.level > known.level)
known.level = T.level
return
known_tech += T
return
/datum/research/proc/AddDesign2Known(var/datum/design/D)
for(var/datum/design/known in known_designs)
if(D.id == known.id)
if(D.reliability_mod > known.reliability_mod)
known.reliability_mod = D.reliability_mod
if(!known_designs.len) // Special case
known_designs.Add(D)
return
for(var/i = 1 to known_designs.len)
var/datum/design/A = known_designs[i]
if(A.id == D.id) // We are guaranteed to reach this if the ids are the same, because sort_string will also be the same
return
known_designs += D
if(A.sort_string > D.sort_string)
known_designs.Insert(i, D)
return
known_designs.Add(D)
return
//Refreshes known_tech and known_designs list. Then updates the reliability vars of the designs in the known_designs list.
//Refreshes known_tech and known_designs list
//Input/Output: n/a
/datum/research/proc/RefreshResearch()
for(var/datum/tech/PT in possible_tech)
if(TechHasReqs(PT))
AddTech2Known(PT)
for(var/datum/design/PD in possible_designs)
if(DesignHasReqs(PD))
AddDesign2Known(PD)
for(var/datum/tech/T in known_tech)
T = between(1,T.level,20)
for(var/datum/design/D in known_designs)
D.CalcReliability(known_tech)
T = between(0, T.level, 20)
return
//Refreshes the levels of a given tech.
//Input: Tech's ID and Level; Output: null
/datum/research/proc/UpdateTech(var/ID, var/level)
for(var/datum/tech/KT in known_tech)
if(KT.id == ID)
if(KT.level <= level) KT.level = max((KT.level + 1), (level - 1))
if(KT.id == ID && KT.level <= level)
KT.level = max(KT.level + 1, level - 1)
return
/datum/research/proc/UpdateDesign(var/path)
for(var/datum/design/KD in known_designs)
if(KD.build_path == path)
KD.reliability_mod += rand(1,2)
break
return
/***************************************************************
** Technology Datums **
** Includes all the various technoliges and what they make. **
***************************************************************/
datum/tech //Datum of individual technologies.
/datum/tech //Datum of individual technologies.
var/name = "name" //Name of the technology.
var/desc = "description" //General description of what it does and what it makes.
var/id = "id" //An easily referenced ID. Must be alphanumeric, lower-case, and no symbols.
var/level = 1 //A simple number scale of the research level. Level 0 = Secret tech.
var/list/req_tech = list() //List of ids associated values of techs required to research this tech. "id" = #
//Trunk Technologies (don't require any other techs and you start knowning them).
datum/tech/materials
/datum/tech/materials
name = "Materials Research"
desc = "Development of new and improved materials."
id = "materials"
id = TECH_MATERIAL
datum/tech/engineering
/datum/tech/engineering
name = "Engineering Research"
desc = "Development of new and improved engineering parts."
id = "engineering"
id = TECH_ENGINERING
datum/tech/phorontech
/datum/tech/phorontech
name = "Phoron Research"
desc = "Research into the mysterious substance colloqually known as 'phoron'."
id = "phorontech"
id = TECH_PHORON
datum/tech/powerstorage
/datum/tech/powerstorage
name = "Power Manipulation Technology"
desc = "The various technologies behind the storage and generation of electicity."
id = "powerstorage"
id = TECH_POWER
datum/tech/bluespace
/datum/tech/bluespace
name = "'Blue-space' Research"
desc = "Research into the sub-reality known as 'blue-space'"
id = "bluespace"
id = TECH_BLUESPACE
datum/tech/biotech
/datum/tech/biotech
name = "Biological Technology"
desc = "Research into the deeper mysteries of life and organic substances."
id = "biotech"
id = TECH_BIO
datum/tech/combat
/datum/tech/combat
name = "Combat Systems Research"
desc = "The development of offensive and defensive systems."
id = "combat"
id = TECH_COMBAT
datum/tech/magnets
/datum/tech/magnets
name = "Electromagnetic Spectrum Research"
desc = "Research into the electromagnetic spectrum. No clue how they actually work, though."
id = "magnets"
id = TECH_MAGNET
datum/tech/programming
/datum/tech/programming
name = "Data Theory Research"
desc = "The development of new computer and artificial intelligence and data storage systems."
id = "programming"
id = TECH_DATA
datum/tech/syndicate
/datum/tech/syndicate
name = "Illegal Technologies Research"
desc = "The study of technologies that violate standard Nanotrasen regulations."
id = "syndicate"
id = TECH_ILLEGAL
level = 0
/*
datum/tech/arcane
/datum/tech/arcane
name = "Arcane Research"
desc = "Research into the occult and arcane field for use in practical science"
id = "arcane"
level = 0 //It didn't become "secret" as advertised.
//Branch Techs
datum/tech/explosives
name = "Explosives Research"
desc = "The creation and application of explosive materials."
id = "explosives"
req_tech = list("materials" = 3)
datum/tech/generators
name = "Power Generation Technology"
desc = "Research into more powerful and more reliable sources."
id = "generators"
req_tech = list("powerstorage" = 2)
datum/tech/robotics
name = "Robotics Technology"
desc = "The development of advanced automated, autonomous machines."
id = "robotics"
req_tech = list("materials" = 3, "programming" = 3)
*/
id = TECH_ARCANE
level = 0
/obj/item/weapon/disk/tech_disk
name = "technology disk"
@@ -273,8 +201,8 @@ datum/tech/robotics
var/datum/tech/stored
/obj/item/weapon/disk/tech_disk/New()
src.pixel_x = rand(-5.0, 5)
src.pixel_y = rand(-5.0, 5)
pixel_x = rand(-5.0, 5)
pixel_y = rand(-5.0, 5)
/obj/item/weapon/disk/design_disk
name = "component design disk"
@@ -283,9 +211,9 @@ datum/tech/robotics
icon_state = "datadisk2"
item_state = "card-id"
w_class = 2.0
matter = list(DEFAULT_WALL_MATERIAL = 30,"glass" = 10)
matter = list(DEFAULT_WALL_MATERIAL = 30, "glass" = 10)
var/datum/design/blueprint
/obj/item/weapon/disk/design_disk/New()
src.pixel_x = rand(-5.0, 5)
src.pixel_y = rand(-5.0, 5)
pixel_x = rand(-5.0, 5)
pixel_y = rand(-5.0, 5)
+13 -52
View File
@@ -4,7 +4,7 @@
icon_state = "server"
var/datum/research/files
var/health = 100
var/list/id_with_upload = list() //List of R&D consoles with upload to server access.
var/list/id_with_upload = list() //List of R&D consoles with upload to server access.
var/list/id_with_download = list() //List of R&D consoles with download from server access.
var/id_with_upload_string = "" //String versions for easy editing in map editor.
var/id_with_download_string = ""
@@ -22,7 +22,7 @@
component_parts += new /obj/item/stack/cable_coil(src)
component_parts += new /obj/item/stack/cable_coil(src)
RefreshParts()
src.initialize(); //Agouri
initialize();
/obj/machinery/r_n_d/server/Destroy()
griefProtection()
@@ -35,7 +35,8 @@
idle_power_usage /= max(1, tot_rating)
/obj/machinery/r_n_d/server/initialize()
if(!files) files = new /datum/research(src)
if(!files)
files = new /datum/research(src)
var/list/temp_list
if(!id_with_upload.len)
temp_list = list()
@@ -74,23 +75,18 @@
griefProtection()
..()
/obj/machinery/r_n_d/server/emp_act(severity)
griefProtection()
..()
/obj/machinery/r_n_d/server/ex_act(severity)
griefProtection()
..()
/obj/machinery/r_n_d/server/blob_act()
griefProtection()
..()
//Backup files to centcomm to help admins recover data after greifer attacks
/obj/machinery/r_n_d/server/proc/griefProtection()
for(var/obj/machinery/r_n_d/server/centcom/C in machines)
@@ -101,10 +97,10 @@
C.files.RefreshResearch()
/obj/machinery/r_n_d/server/proc/produce_heat()
if (!produces_heat)
if(!produces_heat)
return
if (!use_power)
if(!use_power)
return
if(!(stat & (NOPOWER|BROKEN))) //Blatently stolen from telecoms
@@ -124,43 +120,12 @@
env.merge(removed)
/obj/machinery/r_n_d/server/attackby(var/obj/item/O as obj, var/mob/user as mob)
if (disabled)
if(default_deconstruction_screwdriver(user, O))
return
if (shocked)
shock(user,50)
if (istype(O, /obj/item/weapon/screwdriver))
if (!panel_open)
panel_open = 1
icon_state = "server_o"
user << "You open the maintenance hatch of [src]."
else
panel_open = 0
icon_state = "server"
user << "You close the maintenance hatch of [src]."
if(default_deconstruction_crowbar(user, O))
return
if(default_part_replacement(user, O))
return
if (panel_open)
if(istype(O, /obj/item/weapon/crowbar))
griefProtection()
playsound(src.loc, 'sound/items/Crowbar.ogg', 50, 1)
var/obj/machinery/constructable_frame/machine_frame/M = new /obj/machinery/constructable_frame/machine_frame(src.loc)
M.state = 2
M.icon_state = "box_1"
for(var/obj/I in component_parts)
if(I.reliability != 100 && crit_fail)
I.crit_fail = 1
I.loc = src.loc
qdel(src)
return 1
/obj/machinery/r_n_d/server/attack_hand(mob/user as mob)
if (disabled)
return
if (shocked)
shock(user,50)
return
/obj/machinery/r_n_d/server/centcom
name = "Centcom Central R&D Database"
@@ -190,8 +155,7 @@
no_id_servers -= S
/obj/machinery/r_n_d/server/centcom/process()
return PROCESS_KILL //don't need process()
return PROCESS_KILL //don't need process()
/obj/machinery/computer/rdservercontrol
name = "R&D Server Controller"
@@ -210,8 +174,8 @@
add_fingerprint(usr)
usr.set_machine(src)
if(!src.allowed(usr) && !emagged)
usr << "\red You do not have the required access level"
if(!allowed(usr) && !emagged)
usr << "<span class='warning'>You do not have the required access level</span>"
return
if(href_list["main"])
@@ -267,7 +231,6 @@
if(choice == "Continue")
for(var/datum/design/D in temp_server.files.known_designs)
if(D.id == href_list["reset_design"])
D.reliability_mod = 0
temp_server.files.known_designs -= D
break
temp_server.files.RefreshResearch()
@@ -344,14 +307,12 @@
src.updateUsrDialog()
return ..()
/obj/machinery/r_n_d/server/robotics
name = "Robotics R&D Server"
id_with_upload_string = "1;2"
id_with_download_string = "1;2"
server_id = 2
/obj/machinery/r_n_d/server/core
name = "Core R&D Server"
id_with_upload_string = "1"
@@ -30,7 +30,7 @@
icon_state = "strange"
var/obj/item/weapon/inside
var/method = 0// 0 = fire, 1 = brush, 2 = pick
origin_tech = "materials=5"
origin_tech = list(TECH_MATERIAL = 5)
/obj/item/weapon/ore/strangerock/New(loc, var/inside_item_type = 0)
..(loc)