mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-27 07:08:00 +01:00
[MIRROR] Removes bepis Techweb and reworks tech disks in general [MDB IGNORE] (#20102)
* Removes bepis Techweb and reworks tech disks in general * e Co-Authored-By: san7890 <the@san7890.com> * e * it will be done --------- Co-authored-by: John Willard <53777086+JohnFulpWillard@users.noreply.github.com> Co-authored-by: Gandalf <9026500+Gandalf2k15@users.noreply.github.com> Co-authored-by: san7890 <the@san7890.com> Co-authored-by: Paxilmaniac <paxilmaniac@gmail.com>
This commit is contained in:
co-authored by
san7890
John Willard
Gandalf
Paxilmaniac
parent
5af1238201
commit
9faf2a16ec
@@ -18,8 +18,8 @@
|
||||
description = "It turns out the diskettes the BEPIS prints experimental nodes on are extremely space-efficient. Send us one of your spares when you're done with it."
|
||||
reward = CARGO_CRATE_VALUE * 8
|
||||
wanted_types = list(
|
||||
/obj/item/disk/tech_disk/major = TRUE,
|
||||
/obj/item/disk/tech_disk/spaceloot = TRUE,
|
||||
/obj/item/disk/design_disk/bepis/remove_tech = TRUE,
|
||||
/obj/item/disk/design_disk/bepis = TRUE,
|
||||
)
|
||||
|
||||
/datum/bounty/item/science/genetics
|
||||
|
||||
@@ -29,7 +29,7 @@
|
||||
|
||||
mail_goodies = list(
|
||||
/obj/item/raw_anomaly_core/random = 10,
|
||||
/obj/item/disk/tech_disk/spaceloot = 2,
|
||||
/obj/item/disk/design_disk/bepis = 2,
|
||||
/obj/item/camera_bug = 1
|
||||
)
|
||||
rpg_title = "Thaumaturgist"
|
||||
|
||||
@@ -1,15 +1,13 @@
|
||||
//If you're looking for spawners like ash walker eggs, check ghost_role_spawners.dm
|
||||
|
||||
///Wizard tower item
|
||||
/obj/item/disk/design_disk/adv/knight_gear
|
||||
/obj/item/disk/design_disk/knight_gear
|
||||
name = "Magic Disk of Smithing"
|
||||
|
||||
/obj/item/disk/design_disk/adv/knight_gear/Initialize(mapload)
|
||||
/obj/item/disk/design_disk/knight_gear/Initialize(mapload)
|
||||
. = ..()
|
||||
var/datum/design/knight_armour/A = new
|
||||
var/datum/design/knight_helmet/H = new
|
||||
blueprints[1] = A
|
||||
blueprints[2] = H
|
||||
blueprints += new /datum/design/knight_armour
|
||||
blueprints += new /datum/design/knight_helmet
|
||||
|
||||
//Free Golems
|
||||
|
||||
@@ -17,12 +15,10 @@
|
||||
name = "Golem Creation Disk"
|
||||
desc = "A gift from the Liberator."
|
||||
icon_state = "datadisk1"
|
||||
max_blueprints = 1
|
||||
|
||||
/obj/item/disk/design_disk/golem_shell/Initialize(mapload)
|
||||
. = ..()
|
||||
var/datum/design/golem_shell/G = new
|
||||
blueprints[1] = G
|
||||
blueprints += new /datum/design/golem_shell
|
||||
|
||||
/datum/design/golem_shell
|
||||
name = "Golem Shell Construction"
|
||||
|
||||
@@ -1,13 +1,12 @@
|
||||
/////////// cleric's den items.
|
||||
|
||||
//Primary reward: the cleric's mace design disk.
|
||||
/obj/item/disk/design_disk/adv/cleric_mace
|
||||
/obj/item/disk/design_disk/cleric_mace
|
||||
name = "Enshrined Disc of Smiting"
|
||||
|
||||
/obj/item/disk/design_disk/adv/cleric_mace/Initialize(mapload)
|
||||
/obj/item/disk/design_disk/cleric_mace/Initialize(mapload)
|
||||
. = ..()
|
||||
var/datum/design/cleric_mace/M = new
|
||||
blueprints[1] = M
|
||||
blueprints += new /datum/design/cleric_mace
|
||||
|
||||
/obj/item/paper/fluff/ruins/clericsden/contact
|
||||
default_raw_text = "Father Aurellion, the ritual is complete, and soon our brothers at the bastion will see the error of our ways. After all, a god of clockwork or blood? Preposterous. Only the TRUE GOD should have so much power. Signed, Father Odivallus."
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
|
||||
/obj/item/disk/design_disk/modkit_disc/Initialize(mapload)
|
||||
. = ..()
|
||||
blueprints[1] = new modkit_design
|
||||
blueprints += new modkit_design
|
||||
|
||||
/obj/item/disk/design_disk/modkit_disc/mob_and_turf_aoe
|
||||
name = "Offensive Mining Explosion Mod Disk"
|
||||
|
||||
@@ -269,7 +269,7 @@
|
||||
if((gauss_real >= gauss_major)) //Major Success.
|
||||
if(SSresearch.techweb_nodes_experimental.len > 0)
|
||||
say("Experiment concluded with major success. New technology node discovered on technology disc.")
|
||||
new /obj/item/disk/tech_disk/major(dropturf,1)
|
||||
new /obj/item/disk/design_disk/bepis/remove_tech(dropturf,1)
|
||||
return
|
||||
say("Expended all available experimental technology nodes. Resorting to minor rewards.")
|
||||
if(gauss_real >= gauss_minor) //Minor Success.
|
||||
|
||||
@@ -98,19 +98,57 @@ other types of metals and chemistry for reagents).
|
||||
name = "Component Design Disk"
|
||||
desc = "A disk for storing device design data for construction in lathes."
|
||||
icon_state = "datadisk1"
|
||||
custom_materials = list(/datum/material/iron =300, /datum/material/glass =100)
|
||||
custom_materials = list(/datum/material/iron = 300, /datum/material/glass = 100)
|
||||
|
||||
///List of all `/datum/design` stored on the disk.
|
||||
var/list/blueprints = list()
|
||||
var/max_blueprints = 1
|
||||
|
||||
/obj/item/disk/design_disk/Initialize(mapload)
|
||||
. = ..()
|
||||
pixel_x = base_pixel_x + rand(-5, 5)
|
||||
pixel_y = base_pixel_y + rand(-5, 5)
|
||||
for(var/i in 1 to max_blueprints)
|
||||
blueprints += null
|
||||
if(mapload)
|
||||
pixel_x = base_pixel_x + rand(-5, 5)
|
||||
pixel_y = base_pixel_y + rand(-5, 5)
|
||||
|
||||
/**
|
||||
* Used for special interactions with a techweb when uploading the designs.
|
||||
* Args:
|
||||
* - stored_research - The techweb that's storing us.
|
||||
*/
|
||||
/obj/item/disk/design_disk/proc/on_upload(datum/techweb/stored_research)
|
||||
return
|
||||
|
||||
/obj/item/disk/design_disk/bepis
|
||||
name = "Old experimental technology disk"
|
||||
desc = "A disk containing some long-forgotten technology from a past age. You hope it still works after all these years. Upload the disk to an R&D Console to redeem the tech."
|
||||
icon_state = "rndmajordisk"
|
||||
|
||||
///The bepis node we have the design id's of
|
||||
var/datum/techweb_node/bepis_node
|
||||
|
||||
/obj/item/disk/design_disk/bepis/Initialize(mapload)
|
||||
. = ..()
|
||||
var/bepis_id = pick(SSresearch.techweb_nodes_experimental)
|
||||
bepis_node = (SSresearch.techweb_node_by_id(bepis_id))
|
||||
|
||||
for(var/entry in bepis_node.design_ids)
|
||||
var/datum/design/new_entry = SSresearch.techweb_design_by_id(entry)
|
||||
blueprints += new_entry
|
||||
|
||||
///Unhide and research our node so we show up in the R&D console.
|
||||
/obj/item/disk/design_disk/bepis/on_upload(datum/techweb/stored_research)
|
||||
stored_research.hidden_nodes -= bepis_node.id
|
||||
stored_research.research_node(bepis_node, force = TRUE, auto_adjust_cost = FALSE)
|
||||
|
||||
/**
|
||||
* Subtype of Bepis tech disk
|
||||
* Removes the tech disk that's held on it from the experimental node list, making them not show up in future disks.
|
||||
*/
|
||||
/obj/item/disk/design_disk/bepis/remove_tech
|
||||
name = "Reformatted technology disk"
|
||||
desc = "A disk containing a new, completed tech from the B.E.P.I.S. Upload the disk to an R&D Console to redeem the tech."
|
||||
|
||||
/obj/item/disk/design_disk/bepis/remove_tech/Initialize(mapload)
|
||||
. = ..()
|
||||
SSresearch.techweb_nodes_experimental -= bepis_node.id
|
||||
log_research("[bepis_node.display_name] has been removed from experimental nodes through the BEPIS techweb's \"remove tech\" feature.")
|
||||
|
||||
/obj/item/disk/design_disk/adv
|
||||
name = "Advanced Component Design Disk"
|
||||
desc = "A disk for storing device design data for construction in lathes. This one has extra storage space."
|
||||
custom_materials = list(/datum/material/iron =300, /datum/material/glass = 100, /datum/material/silver = 50)
|
||||
max_blueprints = 5
|
||||
|
||||
@@ -42,30 +42,6 @@
|
||||
////////////////////////////////////////
|
||||
//////////Disk Construction Disks///////
|
||||
////////////////////////////////////////
|
||||
/datum/design/design_disk
|
||||
name = "Design Storage Disk"
|
||||
desc = "Produce additional disks for storing device designs."
|
||||
id = "design_disk"
|
||||
build_type = PROTOLATHE | AWAY_LATHE | AUTOLATHE
|
||||
materials = list(/datum/material/iron = 300, /datum/material/glass = 100)
|
||||
build_path = /obj/item/disk/design_disk
|
||||
category = list(
|
||||
RND_CATEGORY_EQUIPMENT + RND_SUBCATEGORY_EQUIPMENT_SCIENCE
|
||||
)
|
||||
departmental_flags = DEPARTMENT_BITFLAG_SCIENCE
|
||||
|
||||
/datum/design/design_disk_adv
|
||||
name = "Advanced Design Storage Disk"
|
||||
desc = "Produce additional disks for storing device designs."
|
||||
id = "design_disk_adv"
|
||||
build_type = PROTOLATHE | AWAY_LATHE
|
||||
materials = list(/datum/material/iron = 300, /datum/material/glass = 100, /datum/material/silver=50)
|
||||
build_path = /obj/item/disk/design_disk/adv
|
||||
category = list(
|
||||
RND_CATEGORY_EQUIPMENT + RND_SUBCATEGORY_EQUIPMENT_SCIENCE
|
||||
)
|
||||
departmental_flags = DEPARTMENT_BITFLAG_SCIENCE
|
||||
|
||||
/datum/design/tech_disk
|
||||
name = "Technology Data Storage Disk"
|
||||
desc = "Produce additional disks for storing technology data."
|
||||
|
||||
@@ -224,7 +224,6 @@
|
||||
|
||||
/obj/item/disk/design_disk/limbs/Initialize(mapload)
|
||||
. = ..()
|
||||
max_blueprints = limb_designs.len
|
||||
for(var/design in limb_designs)
|
||||
var/datum/design/new_design = design
|
||||
blueprints += new new_design
|
||||
|
||||
@@ -181,16 +181,9 @@ Nothing else in the console has ID requirements.
|
||||
"stored_research" = t_disk.stored_research.researched_nodes,
|
||||
)
|
||||
if (d_disk)
|
||||
data["d_disk"] = list (
|
||||
"max_blueprints" = d_disk.max_blueprints,
|
||||
"blueprints" = list(),
|
||||
)
|
||||
for (var/i in 1 to d_disk.max_blueprints)
|
||||
if (d_disk.blueprints[i])
|
||||
var/datum/design/D = d_disk.blueprints[i]
|
||||
data["d_disk"]["blueprints"] += D.id
|
||||
else
|
||||
data["d_disk"]["blueprints"] += null
|
||||
data["d_disk"] = list("blueprints" = list())
|
||||
for (var/datum/design/D in d_disk.blueprints)
|
||||
data["d_disk"]["blueprints"] += D.id
|
||||
|
||||
|
||||
// Serialize all nodes to display
|
||||
@@ -295,7 +288,7 @@ Nothing else in the console has ID requirements.
|
||||
.["static_data"] = list(
|
||||
"node_cache" = node_cache,
|
||||
"design_cache" = design_cache,
|
||||
"id_cache" = flat_id_cache
|
||||
"id_cache" = flat_id_cache,
|
||||
)
|
||||
|
||||
/obj/machinery/computer/rdconsole/ui_act(action, list/params)
|
||||
@@ -326,55 +319,6 @@ Nothing else in the console has ID requirements.
|
||||
if ("ejectDisk")
|
||||
eject_disk(params["type"])
|
||||
return TRUE
|
||||
if ("writeDesign")
|
||||
if(QDELETED(d_disk))
|
||||
say("No Design Disk Inserted!")
|
||||
return TRUE
|
||||
var/slot = text2num(params["slot"])
|
||||
var/design_id = params["selectedDesign"]
|
||||
if(!stored_research.researched_designs.Find(design_id))
|
||||
stack_trace("ID did not map to a researched datum [design_id]")
|
||||
return
|
||||
var/datum/design/design = SSresearch.techweb_design_by_id(design_id)
|
||||
if(design)
|
||||
if(design.build_type & (AUTOLATHE|PROTOLATHE|AWAY_LATHE)) // Specifically excludes circuit imprinter and mechfab
|
||||
if(design.autolathe_exportable && !design.reagents_list.len)
|
||||
design.build_type |= AUTOLATHE
|
||||
design.category |= RND_CATEGORY_IMPORTED
|
||||
d_disk.blueprints[slot] = design
|
||||
return TRUE
|
||||
if ("uploadDesignSlot")
|
||||
if(QDELETED(d_disk))
|
||||
say("No design disk found.")
|
||||
return TRUE
|
||||
var/n = text2num(params["slot"])
|
||||
stored_research.add_design(d_disk.blueprints[n], TRUE)
|
||||
return TRUE
|
||||
if ("clearDesignSlot")
|
||||
if(QDELETED(d_disk))
|
||||
say("No design disk inserted!")
|
||||
return TRUE
|
||||
var/n = text2num(params["slot"])
|
||||
var/datum/design/D = d_disk.blueprints[n]
|
||||
say("Wiping design [D.name] from design disk.")
|
||||
d_disk.blueprints[n] = null
|
||||
return TRUE
|
||||
if ("eraseDisk")
|
||||
if (params["type"] == RND_DESIGN_DISK)
|
||||
if(QDELETED(d_disk))
|
||||
say("No design disk inserted!")
|
||||
return TRUE
|
||||
say("Wiping design disk.")
|
||||
for(var/i in 1 to d_disk.max_blueprints)
|
||||
d_disk.blueprints[i] = null
|
||||
if (params["type"] == RND_TECH_DISK)
|
||||
if(QDELETED(t_disk))
|
||||
say("No tech disk inserted!")
|
||||
return TRUE
|
||||
qdel(t_disk.stored_research)
|
||||
t_disk.stored_research = new
|
||||
say("Wiping technology disk.")
|
||||
return TRUE
|
||||
if ("uploadDisk")
|
||||
if (params["type"] == RND_DESIGN_DISK)
|
||||
if(QDELETED(d_disk))
|
||||
@@ -383,6 +327,9 @@ Nothing else in the console has ID requirements.
|
||||
for(var/D in d_disk.blueprints)
|
||||
if(D)
|
||||
stored_research.add_design(D, TRUE)
|
||||
say("Uploading blueprints from disk.")
|
||||
d_disk.on_upload(stored_research)
|
||||
return TRUE
|
||||
if (params["type"] == RND_TECH_DISK)
|
||||
if (QDELETED(t_disk))
|
||||
say("No tech disk inserted!")
|
||||
@@ -390,6 +337,7 @@ Nothing else in the console has ID requirements.
|
||||
say("Uploading technology disk.")
|
||||
t_disk.stored_research.copy_research_to(stored_research)
|
||||
return TRUE
|
||||
//Tech disk-only action.
|
||||
if ("loadTech")
|
||||
if(QDELETED(t_disk))
|
||||
say("No tech disk inserted!")
|
||||
|
||||
@@ -21,23 +21,3 @@
|
||||
/obj/item/disk/tech_disk/debug/Initialize(mapload)
|
||||
stored_research = SSresearch.admin_tech
|
||||
return ..()
|
||||
|
||||
/obj/item/disk/tech_disk/major
|
||||
name = "Reformatted technology disk"
|
||||
desc = "A disk containing a new, completed tech from the B.E.P.I.S. Upload the disk to an R&D Console to redeem the tech."
|
||||
icon_state = "rndmajordisk"
|
||||
custom_materials = list(/datum/material/iron=300, /datum/material/glass=100)
|
||||
|
||||
/obj/item/disk/tech_disk/major/Initialize(mapload)
|
||||
stored_research = new /datum/techweb/bepis
|
||||
return ..()
|
||||
|
||||
/obj/item/disk/tech_disk/spaceloot
|
||||
name = "Old experimental technology disk"
|
||||
desc = "A disk containing some long-forgotten technology from a past age. You hope it still works after all these years. Upload the disk to an R&D Console to redeem the tech."
|
||||
icon_state = "rndmajordisk"
|
||||
custom_materials = list(/datum/material/iron=300, /datum/material/glass=100)
|
||||
|
||||
/obj/item/disk/tech_disk/spaceloot/Initialize(mapload)
|
||||
stored_research = new /datum/techweb/bepis(remove_tech = FALSE)
|
||||
return ..()
|
||||
|
||||
@@ -143,12 +143,11 @@
|
||||
l[i] = amount
|
||||
modify_point_list(l)
|
||||
|
||||
/datum/techweb/proc/copy_research_to(datum/techweb/receiver, unlock_hidden = TRUE) //Adds any missing research to theirs.
|
||||
if(unlock_hidden)
|
||||
for(var/i in receiver.hidden_nodes)
|
||||
CHECK_TICK
|
||||
if(available_nodes[i] || researched_nodes[i] || visible_nodes[i])
|
||||
receiver.hidden_nodes -= i //We can see it so let them see it too.
|
||||
/datum/techweb/proc/copy_research_to(datum/techweb/receiver) //Adds any missing research to theirs.
|
||||
for(var/i in receiver.hidden_nodes)
|
||||
CHECK_TICK
|
||||
if(available_nodes[i] || researched_nodes[i] || visible_nodes[i])
|
||||
receiver.hidden_nodes -= i //We can see it so let them see it too.
|
||||
for(var/i in researched_nodes)
|
||||
CHECK_TICK
|
||||
receiver.research_node_id(i, TRUE, FALSE, FALSE)
|
||||
@@ -217,6 +216,8 @@
|
||||
else
|
||||
researched_designs[design.id] = TRUE
|
||||
|
||||
hidden_nodes -= design.id
|
||||
|
||||
return TRUE
|
||||
|
||||
/datum/techweb/proc/remove_design_by_id(id, custom = FALSE)
|
||||
|
||||
@@ -38,7 +38,6 @@
|
||||
"conveyor_belt",
|
||||
"conveyor_switch",
|
||||
"custom_vendor_refill",
|
||||
"design_disk",
|
||||
"destructive_analyzer",
|
||||
"destructive_scanner",
|
||||
"desttagger",
|
||||
|
||||
@@ -29,25 +29,6 @@
|
||||
research_points[i] = INFINITY
|
||||
hidden_nodes = list()
|
||||
|
||||
/**
|
||||
* Techweb made through BEPIS machine
|
||||
* Should only contain 1 BEPIS tech at random.
|
||||
*/
|
||||
/datum/techweb/bepis
|
||||
id = "EXPERIMENTAL"
|
||||
organization = "Nanotrasen R&D"
|
||||
|
||||
/datum/techweb/bepis/New(remove_tech = TRUE)
|
||||
. = ..()
|
||||
var/bepis_id = pick(SSresearch.techweb_nodes_experimental) //To add a new tech to the BEPIS, add the ID to this pick list.
|
||||
var/datum/techweb_node/BN = (SSresearch.techweb_node_by_id(bepis_id))
|
||||
hidden_nodes -= BN.id //Has to be removed from hidden nodes
|
||||
research_node(BN, TRUE, FALSE, FALSE)
|
||||
update_node_status(BN)
|
||||
if(remove_tech)
|
||||
SSresearch.techweb_nodes_experimental -= bepis_id
|
||||
log_research("[BN.display_name] has been removed from experimental nodes through the BEPIS techweb's \"remove tech\" feature.")
|
||||
|
||||
/**
|
||||
* Techweb made through tech disks
|
||||
* Contains nothing, subtype mostly meant to make it easy for admins to see.
|
||||
|
||||
Reference in New Issue
Block a user