Merge pull request #1981 from Fox-McCloud/rnd-cargo

R&D Update and Fix & Cargo Tweaks
This commit is contained in:
Mark van Alphen
2015-09-10 01:15:26 +02:00
13 changed files with 194 additions and 123 deletions
@@ -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 = "biotech=3;programming=2"
var/searching = 0
var/askDelay = 10 * 60 * 1
+1 -3
View File
@@ -22,7 +22,7 @@ The currently supporting non-reagent materials:
Don't add new keyword/IDs if they are made from an existing one (such as rods which are made from metal). Only add raw materials.
Design Guidlines
- The reliability formula for all R&D built items is reliability_base (a fixed number) + total tech levels required to make it +
- The reliability formula for all R&D built items is reliability (a fixed number) + total tech levels required to make it +
reliability_mod (starts at 0, gets improved through experimentation). Example: PACMAN generator. 79 base reliablity + 6 tech
(3 plasmatech, 3 powerstorage) + 0 (since it's completely new) = 85% reliability. Reliability is the chance it works CORRECTLY.
- When adding new designs, check rdreadme.dm to see what kind of things have already been made and where new stuff is needed.
@@ -38,8 +38,6 @@ other types of metals and chemistry for reagents).
var/desc = "Desc" //Description of the created object.
var/id = "id" //ID of the created object for easy refernece. Alphanumeric, lower-case, no symbols
var/list/req_tech = list() //IDs of that techs the object originated from and the minimum level requirements.
var/reliability_mod = 0 //Reliability modifier of the device at it's starting point.
var/reliability_base = 100 //Base reliability of a device before modifiers.
var/reliability = 100 //Reliability of the device.
var/build_type = null //Flag as to what kind machine the design is built in. See defines.
var/list/materials = list() //List of materials. Format: "id" = amount.
@@ -8,7 +8,7 @@
req_tech = list("bluespace" = 4, "materials" = 6)
build_type = PROTOLATHE
materials = list(MAT_DIAMOND = 1500, MAT_PLASMA = 1500)
reliability_base = 100
reliability = 100
build_path = /obj/item/bluespace_crystal/artificial
category = list("Bluespace")
@@ -19,7 +19,7 @@
req_tech = list("bluespace" = 4, "materials" = 6)
build_type = PROTOLATHE
materials = list(MAT_GOLD = 3000, MAT_DIAMOND = 1500, MAT_URANIUM = 250)
reliability_base = 80
reliability = 80
build_path = /obj/item/weapon/storage/backpack/holding
category = list("Bluespace")
@@ -30,7 +30,7 @@
req_tech = list("bluespace" = 4, "materials" = 6)
build_type = PROTOLATHE
materials = list(MAT_GOLD = 1500, MAT_DIAMOND = 3000, MAT_URANIUM = 1000)
reliability_base = 80
reliability = 80
build_path = /obj/item/weapon/storage/belt/bluespace
category = list("Bluespace")
@@ -41,7 +41,7 @@
req_tech = list("bluespace" = 2, "materials" = 6)
build_type = PROTOLATHE
materials = list(MAT_METAL = 3000, MAT_PLASMA = 3000, MAT_DIAMOND = 500)
reliability_base = 76
reliability = 76
build_path = /obj/item/weapon/reagent_containers/glass/beaker/bluespace
category = list("Medical")
@@ -8,7 +8,7 @@
req_tech = list("biotech" = 2, "magnets" = 4)
build_type = PROTOLATHE
materials = list(MAT_METAL = 30, MAT_GLASS = 20)
reliability_base = 74
reliability = 74
build_path = "/obj/item/device/mass_spectrometer/adv"
category = list("Medical")
@@ -19,7 +19,7 @@
req_tech = list("biotech" = 2, "magnets" = 4)
build_type = PROTOLATHE
materials = list(MAT_METAL = 30, MAT_GLASS = 20)
reliability_base = 74
reliability = 74
build_path = /obj/item/device/reagent_scanner/adv
category = list("Medical")
@@ -30,7 +30,7 @@
req_tech = list("materials" = 2)
build_type = PROTOLATHE
materials = list(MAT_METAL = 3000)
reliability_base = 76
reliability = 76
build_path = /obj/item/weapon/reagent_containers/glass/beaker/noreact
category = list("Medical")
@@ -41,7 +41,7 @@
req_tech = list("programming" = 2, "biotech" = 2, "magnets" = 2)
build_type = PROTOLATHE
materials = list(MAT_METAL = 30, MAT_GLASS = 20)
reliability_base = 76
reliability = 76
build_path = /obj/item/device/robotanalyzer
category = list("Medical")
@@ -84,7 +84,7 @@
req_tech = list("biotech" = 4, "magnets" = 3, "materials" = 3)
build_type = PROTOLATHE
materials = list(MAT_METAL = 30, MAT_GLASS = 20)
reliability_base = 76
reliability = 76
build_path = /obj/item/device/sensor_device
category = list("Medical")
@@ -96,7 +96,7 @@
build_type = PROTOLATHE | MECHFAB
materials = list(MAT_METAL = 1000, MAT_GLASS = 500)
construction_time = 75
reliability_base = 76
reliability = 76
build_path = /obj/item/device/mmi
category = list("Misc","Medical")
@@ -107,17 +107,19 @@
req_tech = list("biotech" = 2, "magnets" = 2)
build_type = PROTOLATHE
materials = list(MAT_METAL = 30, MAT_GLASS = 20)
reliability_base = 76
reliability = 76
build_path = /obj/item/device/mass_spectrometer
category = list("Medical")
/datum/design/posibrain
name = "Positronic Brain"
desc = "Allows for the construction of a positronic brain"
id = "posibrain"
req_tech = list("engineering" = 4, "materials" = 6, "bluespace" = 2, "programming" = 4)
build_type = PROTOLATHE
materials = list(MAT_METAL = 2000, MAT_GLASS = 1000, MAT_SILVER = 1000, MAT_GOLD = 500, MAT_PLASMA = 500, MAT_DIAMOND = 100)
desc = "The latest in Artificial Intelligences."
id = "mmi_posi"
req_tech = list("programming" = 5, "biotech" = 4)
build_type = PROTOLATHE | MECHFAB
materials = list(MAT_METAL = 1700, MAT_GLASS = 1350, MAT_GOLD = 500) //Gold, because SWAG.
reliability = 74
construction_time = 75
build_path = /obj/item/device/mmi/posibrain
category = list("Misc","Medical")
@@ -129,7 +131,7 @@
build_type = PROTOLATHE | MECHFAB
materials = list(MAT_METAL = 1200, MAT_GLASS = 500)
construction_time = 75
reliability_base = 74
reliability = 74
build_path = /obj/item/device/mmi/radio_enabled
category = list("Misc","Medical")
@@ -150,7 +152,7 @@
req_tech = list("biotech" = 2, "magnets" = 2)
build_type = PROTOLATHE
materials = list(MAT_METAL = 30, MAT_GLASS = 20)
reliability_base = 76
reliability = 76
build_path = /obj/item/device/reagent_scanner
category = list("Medical")
@@ -162,7 +164,7 @@
build_type = MECHFAB
materials = list(MAT_METAL = 750, MAT_GLASS = 750)
construction_time = 100
reliability_base = 76
reliability = 76
build_path = /obj/item/device/flash/synthetic
category = list("Misc")
@@ -8,7 +8,7 @@
req_tech = list("materials" = 6, "powerstorage" = 4, "engineering" = 4)
build_type = PROTOLATHE
materials = list(MAT_METAL = 3000, MAT_GLASS = 1000, MAT_DIAMOND = 3750) //Yes, a whole diamond is needed.
reliability_base = 79
reliability = 79
build_path = /obj/item/weapon/pickaxe/drill/diamonddrill
category = list("Mining")
@@ -39,7 +39,7 @@
req_tech = list("materials" = 2, "plasmatech" = 2, "engineering" = 2, "combat" = 1, "magnets" = 2)
build_type = PROTOLATHE
materials = list(MAT_METAL = 1500, MAT_GLASS = 500, MAT_GOLD = 500, MAT_PLASMA = 500)
reliability_base = 79
reliability = 79
build_path = /obj/item/weapon/gun/energy/plasmacutter
category = list("Mining")
@@ -50,7 +50,7 @@
req_tech = list("materials" = 4, "plasmatech" = 3, "engineering" = 3, "combat" = 3, "magnets" = 3)
build_type = PROTOLATHE
materials = list(MAT_METAL = 3000, MAT_GLASS = 1000, MAT_PLASMA = 2000, MAT_GOLD = 500)
reliability_base = 79
reliability = 79
build_path = /obj/item/weapon/gun/energy/plasmacutter/adv
category = list("Mining")
@@ -29,7 +29,7 @@
desc = "A power cell that holds 30000 units of energy"
id = "hyper_cell"
req_tech = list("powerstorage" = 5, "materials" = 4)
reliability_base = 70
reliability = 70
build_type = PROTOLATHE | MECHFAB | PODFAB
materials = list(MAT_METAL = 400, MAT_GOLD = 150, MAT_SILVER = 150, MAT_GLASS = 70)
construction_time=100
@@ -41,7 +41,7 @@
desc = "A power cell that holds 20000 units of energy"
id = "super_cell"
req_tech = list("powerstorage" = 3, "materials" = 2)
reliability_base = 75
reliability = 75
build_type = PROTOLATHE | MECHFAB | PODFAB
materials = list(MAT_METAL = 700, MAT_GLASS = 70)
construction_time=100
@@ -53,7 +53,7 @@
desc = "A power cell that holds 40000 units of energy."
id = "bluespace_cell"
req_tech = list("powerstorage" = 6, "materials" = 5)
reliability_base = 70
reliability = 70
build_type = PROTOLATHE | MECHFAB
materials = list(MAT_METAL = 800, MAT_GOLD = 300, MAT_SILVER = 300, MAT_GLASS = 160, MAT_DIAMOND = 160)
construction_time=100
@@ -66,7 +66,7 @@
id = "pacman"
req_tech = list("programming" = 3, "plasmatech" = 3, "powerstorage" = 3, "engineering" = 3)
build_type = IMPRINTER
reliability_base = 79
reliability = 79
materials = list(MAT_GLASS = 1000, "sacid" = 20)
build_path = /obj/item/weapon/circuitboard/pacman
category = list("Engineering Machinery")
@@ -77,7 +77,7 @@
id = "mrspacman"
req_tech = list("programming" = 3, "powerstorage" = 5, "engineering" = 5)
build_type = IMPRINTER
reliability_base = 74
reliability = 74
materials = list(MAT_GLASS = 2000, "sacid" = 20)
build_path = /obj/item/weapon/circuitboard/pacman/mrs
category = list("Engineering Machinery")
@@ -88,7 +88,7 @@
id = "superpacman"
req_tech = list("programming" = 3, "powerstorage" = 4, "engineering" = 4)
build_type = IMPRINTER
reliability_base = 76
reliability = 76
materials = list(MAT_GLASS = 1000, "sacid" = 20)
build_path = /obj/item/weapon/circuitboard/pacman/super
category = list("Engineering Machinery")
@@ -108,7 +108,7 @@
id = "super_capacitor"
req_tech = list("powerstorage" = 5, "materials" = 4)
build_type = PROTOLATHE
reliability_base = 71
reliability = 71
materials = list(MAT_METAL = 50, MAT_GLASS = 50, MAT_GOLD = 20)
build_path = /obj/item/weapon/stock_parts/capacitor/super
category = list("Stock Parts")
@@ -120,7 +120,7 @@
req_tech = list("magnets" = 5, "materials" = 3)
build_type = PROTOLATHE
materials = list(MAT_METAL = 50, MAT_GLASS = 20, MAT_SILVER = 10)
reliability_base = 72
reliability = 72
build_path = /obj/item/weapon/stock_parts/scanning_module/phasic
category = list("Stock Parts")
@@ -131,7 +131,7 @@
req_tech = list("materials" = 5, "programming" = 2)
build_type = PROTOLATHE
materials = list(MAT_METAL = 30)
reliability_base = 73
reliability = 73
build_path = /obj/item/weapon/stock_parts/manipulator/pico
category = list("Stock Parts")
@@ -142,7 +142,7 @@
req_tech = list("magnets" = 5, "materials" = 5)
build_type = PROTOLATHE
materials = list(MAT_METAL = 10, MAT_GLASS = 20, MAT_URANIUM = 10)
reliability_base = 70
reliability = 70
build_path = /obj/item/weapon/stock_parts/micro_laser/ultra
category = list("Stock Parts")
@@ -153,7 +153,7 @@
req_tech = list("materials" = 5)
build_type = PROTOLATHE
materials = list(MAT_METAL = 80)
reliability_base = 75
reliability = 75
build_path = /obj/item/weapon/stock_parts/matter_bin/super
category = list("Stock Parts")
@@ -163,7 +163,7 @@
id = "quadratic_capacitor"
req_tech = list("powerstorage" = 6, "materials" = 5)
build_type = PROTOLATHE
reliability_base = 71
reliability = 71
materials = list(MAT_METAL = 100, MAT_GLASS = 100, MAT_DIAMOND = 40)
build_path = /obj/item/weapon/stock_parts/capacitor/quadratic
category = list("Stock Parts")
@@ -175,7 +175,7 @@
req_tech = list("magnets" = 6, "materials" = 4)
build_type = PROTOLATHE
materials = list(MAT_METAL = 100, MAT_GLASS = 40, MAT_DIAMOND = 20)
reliability_base = 72
reliability = 72
build_path = /obj/item/weapon/stock_parts/scanning_module/triphasic
category = list("Stock Parts")
@@ -186,7 +186,7 @@
req_tech = list("materials" = 6, "programming" = 3)
build_type = PROTOLATHE
materials = list(MAT_METAL = 60, MAT_DIAMOND = 30)
reliability_base = 73
reliability = 73
build_path = /obj/item/weapon/stock_parts/manipulator/femto
category = list("Stock Parts")
@@ -197,7 +197,7 @@
req_tech = list("magnets" = 6, "materials" = 6)
build_type = PROTOLATHE
materials = list(MAT_METAL = 20, MAT_GLASS = 40, MAT_URANIUM = 20, MAT_DIAMOND = 20)
reliability_base = 70
reliability = 70
build_path = /obj/item/weapon/stock_parts/micro_laser/quadultra
category = list("Stock Parts")
@@ -208,7 +208,7 @@
req_tech = list("materials" = 6)
build_type = PROTOLATHE
materials = list(MAT_METAL = 160, MAT_DIAMOND = 200)
reliability_base = 75
reliability = 75
build_path = /obj/item/weapon/stock_parts/matter_bin/bluespace
category = list("Stock Parts")
@@ -9,7 +9,7 @@
req_tech = list("combat" = 4, "materials" = 5, "powerstorage" = 3)
build_type = PROTOLATHE
materials = list(MAT_METAL = 5000, MAT_GLASS = 1000, MAT_URANIUM = 2000)
reliability_base = 76
reliability = 76
build_path = /obj/item/weapon/gun/energy/gun/nuclear
locked = 1
category = list("Weapons")
@@ -35,6 +35,7 @@
build_path = /obj/item/weapon/gun/energy/kinetic_accelerator/crossbow/large
locked = 1
category = list("Weapons")
reliability = 76
/datum/design/flora_gun
name = "Floral Somatoray"
@@ -64,7 +65,7 @@
req_tech = list("combat" = 3, "materials" = 2)
build_type = PROTOLATHE
materials = list(MAT_METAL = 3000)
reliability_base = 79
reliability = 79
build_path = /obj/item/weapon/grenade/chem_grenade/large
category = list("Weapons")
+24 -15
View File
@@ -49,7 +49,7 @@ won't update every console in existence) but it's more of a hassle to do. Also,
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
req_access = list(access_research) //Data and setting manipulation requires scientist access.
req_access = list(access_tox) //Data and setting manipulation requires scientist access.
var/selected_category
var/list/datum/design/matching_designs = list() //for the search function
@@ -162,11 +162,12 @@ won't update every console in existence) but it's more of a hassle to do. Also,
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 << "<span class='danger'> Machine cannot accept disks in that format.</span>"
user << "<span class='danger'>Machine cannot accept disks in that format.</span>"
return
if(!user.drop_item())
return
user.drop_item()
D.loc = src
user << "<span class='notice'> You add the disk to the machine!</span>"
user << "<span class='notice'>You add the disk to the machine!</span>"
else
..()
src.updateUsrDialog()
@@ -270,7 +271,7 @@ 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 << "<span class='danger'> The destructive analyzer is busy at the moment.</span>"
usr << "<span class='danger'>The destructive analyzer is busy at the moment.</span>"
else
var/choice = input("Proceeding will destroy loaded item.") in list("Proceed", "Cancel")
if(choice == "Cancel" || !linked_destroy) return
@@ -283,7 +284,7 @@ won't update every console in existence) but it's more of a hassle to do. Also,
linked_destroy.busy = 0
if(!linked_destroy.hacked)
if(!linked_destroy.loaded_item)
usr <<"<span class='danger'> The destructive analyzer appears to be empty.</span>"
usr <<"<span class='danger'>The destructive analyzer appears to be empty.</span>"
screen = 1.0
return
if((linked_destroy.loaded_item.reliability >= 99 - (linked_destroy.decon_mod * 3)) || linked_destroy.loaded_item.crit_fail)
@@ -328,7 +329,7 @@ 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 << "<span class='danger'> You must connect to the network first!</span>"
usr << "<span class='danger'>You must connect to the network first!</span>"
else
griefProtection() //Putting this here because I dont trust the sync process
spawn(30)
@@ -433,7 +434,7 @@ won't update every console in existence) but it's more of a hassle to do. Also,
var/obj/item/new_item = new P(src)
if( new_item.type == /obj/item/weapon/storage/backpack/holding )
new_item.investigate_log("built by [key]","singulo")
new_item.reliability = R
new_item.reliability = 100
new_item.materials[MAT_METAL] /= coeff
new_item.materials[MAT_GLASS] /= coeff
if(linked_lathe.hacked)
@@ -496,7 +497,7 @@ won't update every console in existence) but it's more of a hassle to do. Also,
spawn(16)
if(g2g)
var/obj/item/new_item = new P(src)
new_item.reliability = R
new_item.reliability = 100
new_item.loc = linked_imprinter.loc
linked_imprinter.busy = 0
screen = old_screen
@@ -736,11 +737,14 @@ 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: [Clamp((d_disk.blueprint.reliability + rand(-15,15)), 0, 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 += "Level: [d_disk.blueprint.reliability]<BR>"
var/b_type = d_disk.blueprint.build_type
if(b_type)
dat += "Lathe Types:<BR>"
if(b_type & IMPRINTER) dat += "Circuit Imprinter<BR>"
if(b_type & PROTOLATHE) dat += "Proto-lathe<BR>"
if(b_type & AUTOLATHE) dat += "Auto-lathe<BR>"
if(b_type & MECHFAB) dat += "Mech Fabricator<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>"
@@ -813,7 +817,12 @@ won't update every console in existence) but it's more of a hassle to do. Also,
dat += "Origin Tech:<BR>"
var/list/temp_tech = linked_destroy.ConvertReqString2List(linked_destroy.loaded_item.origin_tech)
for(var/T in temp_tech)
dat += "* [CallTechName(T)] [temp_tech[T]]<BR>"
dat += "* [CallTechName(T)] [temp_tech[T]]"
for(var/datum/tech/F in files.known_tech)
if(F.name == CallTechName(T))
dat += " (Current: [F.level])"
break
dat += "<BR>"
dat += "</div>Options: "
dat += "<A href='?src=\ref[src];deconstruct=1'>Deconstruct Item</A>"
dat += "<A href='?src=\ref[src];eject_item=1'>Eject Item</A>"
+26 -4
View File
@@ -101,8 +101,8 @@ research holder datum.
/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(D.reliability > known.reliability)
known.reliability = D.reliability
return
known_designs += D
return
@@ -117,7 +117,7 @@ research holder datum.
if(DesignHasReqs(PD))
AddDesign2Known(PD)
for(var/datum/tech/T in known_tech)
T = between(1,T.level,20)
T = Clamp(T.level, 1, 20)
for(var/datum/design/D in known_designs)
D.CalcReliability(known_tech)
return
@@ -127,7 +127,8 @@ research holder datum.
/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.level <= level)
KT.level = max((KT.level + 1), (level - 1))
return
/datum/research/proc/UpdateDesigns(var/obj/item/I, var/list/temp_tech)
@@ -172,6 +173,7 @@ datum/tech //Datum of individual technologies.
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/max_level = 1 // Maximum level this can be at (for job objectives)
var/rare = 1 //How much CentCom wants to get that tech. Used in supply shuttle tech cost calculation.
var/list/req_tech = list() //List of ids associated values of techs required to research this tech. "id" = #
@@ -194,6 +196,7 @@ datum/tech/plasmatech
desc = "Research into the mysterious substance colloqually known as 'plasma'."
id = "plasmatech"
max_level = 4
rare = 3
datum/tech/powerstorage
name = "Power Manipulation Technology"
@@ -206,6 +209,7 @@ datum/tech/bluespace
desc = "Research into the sub-reality known as 'blue-space'"
id = "bluespace"
max_level = 6
rare = 2
datum/tech/biotech
name = "Biological Technology"
@@ -236,6 +240,7 @@ datum/tech/syndicate
desc = "The study of technologies that violate standard Nanotrasen regulations."
id = "syndicate"
max_level = 0 // Don't count towards maxed research, since it's illegal.
rare = 4
/*
datum/tech/arcane
@@ -264,6 +269,23 @@ datum/tech/robotics
req_tech = list("materials" = 3, "programming" = 3)
*/
/datum/tech/proc/getCost(var/current_level = null)
// Calculates tech disk's supply points sell cost
if(!current_level)
current_level = initial(level)
if(current_level >= level)
return 0
var/cost = 0
var/i
for(i=current_level+1, i<=level, i++)
if(i == initial(level))
continue
cost += i*5*rare
return cost
/obj/item/weapon/disk/tech_disk
name = "Technology Disk"
desc = "A disk for storing technology data for further research."
+10 -7
View File
@@ -23,7 +23,7 @@
component_parts += new /obj/item/stack/cable_coil(null,1)
RefreshParts()
initialize(); //Agouri
/obj/machinery/r_n_d/server/upgraded/New()
..()
component_parts = list()
@@ -63,16 +63,20 @@
if(0 to T0C)
health = min(100, health + 1)
if(T0C to (T20C + 20))
health = between(0, health, 100)
health = Clamp(health, 0, 100)
if((T20C + 20) to (T0C + 70))
health = max(0, health - 1)
if(health <= 0)
griefProtection() //I dont like putting this in process() but it's the best I can do without re-writing a chunk of rd servers.
/*griefProtection() This seems to get called twice before running any code that deletes/damages the server or it's files anwyay.
refreshParts and the hasReq procs that get called by this are laggy and do not need to be called by every server on the map every tick */
var/updateRD = 0
files.known_designs = list()
for(var/datum/tech/T in files.known_tech)
if(prob(1))
updateRD++
T.level--
files.RefreshResearch()
if(updateRD)
files.RefreshResearch()
if(delay)
delay--
else
@@ -244,7 +248,7 @@
temp_server.id_with_download += num
else if(href_list["reset_tech"])
var/choice = alert("Technology Data Rest", "Are you sure you want to reset this technology to its default data? Data lost cannot be recovered.", "Continue", "Cancel")
var/choice = alert("Technology Data Reset", "Are you sure you want to reset this technology to its default data? Data lost cannot be recovered.", "Continue", "Cancel")
if(choice == "Continue")
for(var/datum/tech/T in temp_server.files.known_tech)
if(T.id == href_list["reset_tech"])
@@ -257,7 +261,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()
@@ -279,7 +282,7 @@
if(istype(S, /obj/machinery/r_n_d/server/centcom) && !badmin)
continue
dat += "[S.name] || "
dat += "<A href='?src=\ref[src];access=[S.server_id]'> Access Rights</A> | "
dat += "<A href='?src=\ref[src];access=[S.server_id]'>Access Rights</A> | "
dat += "<A href='?src=\ref[src];data=[S.server_id]'>Data Management</A>"
if(badmin) dat += " | <A href='?src=\ref[src];transfer=[S.server_id]'>Server-to-Server Transfer</A>"
dat += "<BR>"
+11 -11
View File
@@ -1,12 +1,12 @@
/datum/shuttle/ferry/supply
var/away_location = 1 //the location to hide at while pretending to be in-transit
var/late_chance = 80
var/late_chance = 0
var/max_late_time = 300
/datum/shuttle/ferry/supply/short_jump(var/area/origin,var/area/destination)
if(moving_status != SHUTTLE_IDLE)
if(moving_status != SHUTTLE_IDLE)
return
if(isnull(location))
return
@@ -17,18 +17,18 @@
if (!at_station()) //at centcom
supply_controller.buy()
//it would be cool to play a sound here
moving_status = SHUTTLE_WARMUP
spawn(warmup_time*10)
if (moving_status == SHUTTLE_IDLE)
if (moving_status == SHUTTLE_IDLE)
return //someone cancelled the launch
if (at_station() && forbidden_atoms_check())
//cancel the launch because of forbidden atoms. announce over supply channel?
moving_status = SHUTTLE_IDLE
return
//We pretend it's a long_jump by making the shuttle stay at centcom for the "in-transit" period.
var/area/away_area = get_location_area(away_location)
if (origin == away_area)
@@ -45,11 +45,11 @@
//late
if (prob(late_chance))
sleep(rand(0,max_late_time))
move(away_area, destination)
moving_status = SHUTTLE_IDLE
if (!at_station()) //at centcom
supply_controller.sell()
@@ -57,7 +57,7 @@
/datum/shuttle/ferry/supply/proc/forbidden_atoms_check()
if (!at_station())
return 0 //if badmins want to send mobs or a nuke on the supply shuttle from centcom we don't care
return supply_controller.forbidden_atoms_check(get_location_area())
/datum/shuttle/ferry/supply/proc/at_station()